From owner-svn-src-all@freebsd.org Sun Nov 22 01:16:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04EFBA33915; Sun, 22 Nov 2015 01:16:45 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7AE91E89; Sun, 22 Nov 2015 01:16:44 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAM1Gh4O052605; Sun, 22 Nov 2015 01:16:43 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAM1GhDJ052603; Sun, 22 Nov 2015 01:16:43 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201511220116.tAM1GhDJ052603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 22 Nov 2015 01:16:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291151 - head/sys/powerpc/mpc85xx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2015 01:16:45 -0000 Author: jhibbits Date: Sun Nov 22 01:16:43 2015 New Revision: 291151 URL: https://svnweb.freebsd.org/changeset/base/291151 Log: Modernize mpc85xx PCI hostbridge driver. Summary: * Take advantage of NEW_PCIB to remove a lot of setup code. * Fix some bugs related to multiple PCI bridges. There's still room for more cleanup, and still some bugs leftover, but this cleans up a lot. Test Plan: Tested on P5020 board with IDT PCIe switch. Differential Revision: https://reviews.freebsd.org/D4127 Modified: head/sys/powerpc/mpc85xx/pci_mpc85xx.c head/sys/powerpc/mpc85xx/pci_mpc85xx_pcib.c Modified: head/sys/powerpc/mpc85xx/pci_mpc85xx.c ============================================================================== --- head/sys/powerpc/mpc85xx/pci_mpc85xx.c Sat Nov 21 23:55:46 2015 (r291150) +++ head/sys/powerpc/mpc85xx/pci_mpc85xx.c Sun Nov 22 01:16:43 2015 (r291151) @@ -104,9 +104,9 @@ struct fsl_pcib_softc { device_t sc_dev; int sc_iomem_target; - bus_addr_t sc_iomem_alloc, sc_iomem_start, sc_iomem_end; + bus_addr_t sc_iomem_start, sc_iomem_end; int sc_ioport_target; - bus_addr_t sc_ioport_alloc, sc_ioport_start, sc_ioport_end; + bus_addr_t sc_ioport_start, sc_ioport_end; struct resource *sc_res; bus_space_handle_t sc_bsh; @@ -266,9 +266,8 @@ fsl_pcib_attach(device_t dev) /* * Scan bus using firmware configured, 0 based bus numbering. */ - sc->sc_busnr = 0; maxslot = (sc->sc_pcie) ? 0 : PCI_SLOTMAX; - sc->sc_busnr = fsl_pcib_init(sc, sc->sc_busnr, maxslot); + fsl_pcib_init(sc, sc->sc_busnr, maxslot); if (sc->sc_pcie) { ltssm = fsl_pcib_cfgread(sc, 0, 0, 0, PCIR_LTSSM, 1); @@ -285,6 +284,7 @@ fsl_pcib_attach(device_t dev) return (ofw_pci_attach(dev)); err: + //panic("Because I said so\n"); return (ENXIO); } @@ -294,9 +294,6 @@ fsl_pcib_cfgread(struct fsl_pcib_softc * { uint32_t addr, data; - if (bus == sc->sc_busnr - 1) - bus = 0; - addr = CONFIG_ACCESS_ENABLE; addr |= (bus & 0xff) << 16; addr |= (slot & 0x1f) << 11; @@ -335,9 +332,6 @@ fsl_pcib_cfgwrite(struct fsl_pcib_softc { uint32_t addr; - if (bus == sc->sc_busnr - 1) - bus = 0; - addr = CONFIG_ACCESS_ENABLE; addr |= (bus & 0xff) << 16; addr |= (slot & 0x1f) << 11; @@ -449,74 +443,14 @@ fsl_pcib_init_via(struct fsl_pcib_softc } static int -fsl_pcib_init_bar(struct fsl_pcib_softc *sc, int bus, int slot, int func, - int barno) -{ - bus_addr_t *allocp; - uint32_t addr, mask, size; - int reg, width; - - reg = PCIR_BAR(barno); - - if (DEVFN(bus, slot, func) == sc->sc_devfn_via_ide) { - switch (barno) { - case 0: addr = 0x1f0; break; - case 1: addr = 0x3f4; break; - case 2: addr = 0x170; break; - case 3: addr = 0x374; break; - case 4: addr = 0xcc0; break; - default: return (1); - } - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, reg, addr, 4); - return (1); - } - - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, reg, ~0, 4); - size = fsl_pcib_read_config(sc->sc_dev, bus, slot, func, reg, 4); - if (size == 0) - return (1); - width = ((size & 7) == 4) ? 2 : 1; - - if (size & 1) { /* I/O port */ - allocp = &sc->sc_ioport_alloc; - size &= ~3; - if ((size & 0xffff0000) == 0) - size |= 0xffff0000; - } else { /* memory */ - allocp = &sc->sc_iomem_alloc; - size &= ~15; - } - mask = ~size; - size = mask + 1; - /* Sanity check (must be a power of 2). */ - if (size & mask) - return (width); - - addr = (*allocp + mask) & ~mask; - *allocp = addr + size; - - if (bootverbose) - printf("PCI %u:%u:%u:%u: reg %x: size=%08x: addr=%08x\n", - device_get_unit(sc->sc_dev), bus, slot, func, reg, - size, addr); - - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, reg, addr, 4); - if (width == 2) - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, reg + 4, - 0, 4); - return (width); -} - -static int fsl_pcib_init(struct fsl_pcib_softc *sc, int bus, int maxslot) { int secbus; int old_pribus, old_secbus, old_subbus; int new_pribus, new_secbus, new_subbus; int slot, func, maxfunc; - int bar, maxbar; uint16_t vendor, device; - uint8_t command, hdrtype, class, subclass; + uint8_t command, hdrtype, subclass; secbus = bus; for (slot = 0; slot <= maxslot; slot++) { @@ -550,26 +484,9 @@ fsl_pcib_init(struct fsl_pcib_softc *sc, if (vendor == 0x1106) fsl_pcib_init_via(sc, device, bus, slot, func); - /* Program the base address registers. */ - maxbar = (hdrtype & PCIM_HDRTYPE) ? 1 : 6; - bar = 0; - while (bar < maxbar) - bar += fsl_pcib_init_bar(sc, bus, slot, func, - bar); - - /* Put a placeholder interrupt value */ - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_INTLINE, PCI_INVALID_IRQ, 1); - - command |= PCIM_CMD_MEMEN | PCIM_CMD_PORTEN; - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_COMMAND, command, 1); - /* * Handle PCI-PCI bridges */ - class = fsl_pcib_read_config(sc->sc_dev, bus, slot, - func, PCIR_CLASS, 1); subclass = fsl_pcib_read_config(sc->sc_dev, bus, slot, func, PCIR_SUBCLASS, 1); @@ -579,32 +496,6 @@ fsl_pcib_init(struct fsl_pcib_softc *sc, secbus++; - /* Program I/O decoder. */ - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_IOBASEL_1, sc->sc_ioport_start >> 8, 1); - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_IOLIMITL_1, sc->sc_ioport_end >> 8, 1); - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_IOBASEH_1, sc->sc_ioport_start >> 16, 2); - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_IOLIMITH_1, sc->sc_ioport_end >> 16, 2); - - /* Program (non-prefetchable) memory decoder. */ - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_MEMBASE_1, sc->sc_iomem_start >> 16, 2); - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_MEMLIMIT_1, sc->sc_iomem_end >> 16, 2); - - /* Program prefetchable memory decoder. */ - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_PMBASEL_1, 0x0010, 2); - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_PMLIMITL_1, 0x000f, 2); - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_PMBASEH_1, 0x00000000, 4); - fsl_pcib_write_config(sc->sc_dev, bus, slot, func, - PCIR_PMLIMITH_1, 0x00000000, 4); - /* Read currect bus register configuration */ old_pribus = fsl_pcib_read_config(sc->sc_dev, bus, slot, func, PCIR_PRIBUS_1, 1); @@ -678,10 +569,10 @@ fsl_pcib_outbound(struct fsl_pcib_softc switch (res) { case SYS_RES_MEMORY: - attr = 0x80044000 | (ffsl(size) - 2); + attr = 0x80044000 | (ffsll(size) - 2); break; case SYS_RES_IOPORT: - attr = 0x80088000 | (ffsl(size) - 2); + attr = 0x80088000 | (ffsll(size) - 2); break; default: attr = 0x0004401f; @@ -785,7 +676,6 @@ fsl_pcib_decode_win(phandle_t node, stru sc->sc_ioport_start = sc->pci_sc.sc_range[i].pci; sc->sc_ioport_end = sc->pci_sc.sc_range[i].pci + sc->pci_sc.sc_range[i].size - 1; - sc->sc_ioport_alloc = 0x1000 + sc->pci_sc.sc_range[i].pci; break; case OFW_PCI_PHYS_HI_SPACE_MEM32: case OFW_PCI_PHYS_HI_SPACE_MEM64: @@ -797,7 +687,6 @@ fsl_pcib_decode_win(phandle_t node, stru sc->sc_iomem_start = sc->pci_sc.sc_range[i].pci; sc->sc_iomem_end = sc->pci_sc.sc_range[i].pci + sc->pci_sc.sc_range[i].size - 1; - sc->sc_iomem_alloc = sc->pci_sc.sc_range[i].pci; break; default: panic("Unknown range type %#x\n", Modified: head/sys/powerpc/mpc85xx/pci_mpc85xx_pcib.c ============================================================================== --- head/sys/powerpc/mpc85xx/pci_mpc85xx_pcib.c Sat Nov 21 23:55:46 2015 (r291150) +++ head/sys/powerpc/mpc85xx/pci_mpc85xx_pcib.c Sun Nov 22 01:16:43 2015 (r291151) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); static int fsl_pcib_rc_probe(device_t dev) { + if (pci_get_vendor(dev) != 0x1957) return (ENXIO); if (pci_get_progif(dev) != 0) @@ -71,28 +72,8 @@ fsl_pcib_rc_probe(device_t dev) return (BUS_PROBE_DEFAULT); } -static int -fsl_pcib_rc_attach(device_t dev) -{ - struct pcib_softc *sc; - device_t child; - - pcib_bridge_init(dev); - pcib_attach_common(dev); - - sc = device_get_softc(dev); - if (sc->bus.sec != 0) { - child = device_add_child(dev, "pci", -1); - if (child != NULL) - return (bus_generic_attach(dev)); - } - - return (0); -} - static device_method_t fsl_pcib_rc_methods[] = { DEVMETHOD(device_probe, fsl_pcib_rc_probe), - DEVMETHOD(device_attach, fsl_pcib_rc_attach), DEVMETHOD_END }; From owner-svn-src-all@freebsd.org Sun Nov 22 01:20:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24FA5A33A13; Sun, 22 Nov 2015 01:20:38 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E18F11057; Sun, 22 Nov 2015 01:20:37 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAM1KaR5053124; Sun, 22 Nov 2015 01:20:36 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAM1Kaj1053123; Sun, 22 Nov 2015 01:20:36 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201511220120.tAM1Kaj1053123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 22 Nov 2015 01:20:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291152 - head/sys/powerpc/mpc85xx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2015 01:20:38 -0000 Author: jhibbits Date: Sun Nov 22 01:20:36 2015 New Revision: 291152 URL: https://svnweb.freebsd.org/changeset/base/291152 Log: Remove a debug panic that crept into r291151 Modified: head/sys/powerpc/mpc85xx/pci_mpc85xx.c Modified: head/sys/powerpc/mpc85xx/pci_mpc85xx.c ============================================================================== --- head/sys/powerpc/mpc85xx/pci_mpc85xx.c Sun Nov 22 01:16:43 2015 (r291151) +++ head/sys/powerpc/mpc85xx/pci_mpc85xx.c Sun Nov 22 01:20:36 2015 (r291152) @@ -284,7 +284,6 @@ fsl_pcib_attach(device_t dev) return (ofw_pci_attach(dev)); err: - //panic("Because I said so\n"); return (ENXIO); } From owner-svn-src-all@freebsd.org Sun Nov 22 02:01:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18502A3514F; Sun, 22 Nov 2015 02:01:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E263D1FD3; Sun, 22 Nov 2015 02:01:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAM211pa070055; Sun, 22 Nov 2015 02:01:01 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAM211Bh070048; Sun, 22 Nov 2015 02:01:01 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201511220201.tAM211Bh070048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 22 Nov 2015 02:01:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291153 - in head/sys: amd64/linux arm/arm modules/cryptodev modules/linux64 opencrypto vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2015 02:01:03 -0000 Author: markj Date: Sun Nov 22 02:01:01 2015 New Revision: 291153 URL: https://svnweb.freebsd.org/changeset/base/291153 Log: Remove unneeded includes of opt_kdtrace.h. As of r258541, KDTRACE_HOOKS is defined in opt_global.h, so opt_kdtrace.h is not needed when defining SDT(9) probes. Modified: head/sys/amd64/linux/linux_dummy.c head/sys/arm/arm/exception.S head/sys/modules/cryptodev/Makefile head/sys/modules/linux64/Makefile head/sys/opencrypto/cryptodev.c head/sys/vm/vm_pageout.c Modified: head/sys/amd64/linux/linux_dummy.c ============================================================================== --- head/sys/amd64/linux/linux_dummy.c Sun Nov 22 01:20:36 2015 (r291152) +++ head/sys/amd64/linux/linux_dummy.c Sun Nov 22 02:01:01 2015 (r291153) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/arm/arm/exception.S ============================================================================== --- head/sys/arm/arm/exception.S Sun Nov 22 01:20:36 2015 (r291152) +++ head/sys/arm/arm/exception.S Sun Nov 22 02:01:01 2015 (r291153) @@ -48,7 +48,6 @@ #include "assym.s" -#include "opt_kdtrace.h" #include #include #include Modified: head/sys/modules/cryptodev/Makefile ============================================================================== --- head/sys/modules/cryptodev/Makefile Sun Nov 22 01:20:36 2015 (r291152) +++ head/sys/modules/cryptodev/Makefile Sun Nov 22 02:01:01 2015 (r291153) @@ -3,6 +3,6 @@ .PATH: ${.CURDIR}/../../opencrypto KMOD = cryptodev SRCS = cryptodev.c -SRCS += bus_if.h device_if.h opt_compat.h opt_kdtrace.h +SRCS += bus_if.h device_if.h opt_compat.h .include Modified: head/sys/modules/linux64/Makefile ============================================================================== --- head/sys/modules/linux64/Makefile Sun Nov 22 01:20:36 2015 (r291152) +++ head/sys/modules/linux64/Makefile Sun Nov 22 02:01:01 2015 (r291153) @@ -10,7 +10,7 @@ SRCS= linux_fork.c linux_dummy.c linux_f linux_machdep.c linux_misc.c linux_signal.c \ linux_socket.c linux_stats.c linux_sysctl.c linux_sysent.c \ linux_sysvec.c linux_time.c linux_vdso.c linux_timer.c \ - opt_inet6.h opt_compat.h opt_kdtrace.h opt_posix.h opt_usb.h \ + opt_inet6.h opt_compat.h opt_posix.h opt_usb.h \ vnode_if.h device_if.h bus_if.h assym.s \ linux_support.s DPSRCS= linux_genassym.c Modified: head/sys/opencrypto/cryptodev.c ============================================================================== --- head/sys/opencrypto/cryptodev.c Sun Nov 22 01:20:36 2015 (r291152) +++ head/sys/opencrypto/cryptodev.c Sun Nov 22 02:01:01 2015 (r291153) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#include "opt_kdtrace.h" #include #include Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sun Nov 22 01:20:36 2015 (r291152) +++ head/sys/vm/vm_pageout.c Sun Nov 22 02:01:01 2015 (r291153) @@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$"); #include "opt_vm.h" -#include "opt_kdtrace.h" + #include #include #include From owner-svn-src-all@freebsd.org Sun Nov 22 02:40:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD144A357D2; Sun, 22 Nov 2015 02:40:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A039120B; Sun, 22 Nov 2015 02:40:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAM2eJYG082450; Sun, 22 Nov 2015 02:40:19 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAM2eJiO082449; Sun, 22 Nov 2015 02:40:19 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511220240.tAM2eJiO082449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 22 Nov 2015 02:40:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291154 - head/sys/mips/malta X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2015 02:40:20 -0000 Author: adrian Date: Sun Nov 22 02:40:19 2015 New Revision: 291154 URL: https://svnweb.freebsd.org/changeset/base/291154 Log: [mips]: Don't hard-code PHYS_AVAIL_ENTRIES. Modified: head/sys/mips/malta/malta_machdep.c Modified: head/sys/mips/malta/malta_machdep.c ============================================================================== --- head/sys/mips/malta/malta_machdep.c Sun Nov 22 02:01:01 2015 (r291153) +++ head/sys/mips/malta/malta_machdep.c Sun Nov 22 02:40:19 2015 (r291154) @@ -177,7 +177,7 @@ mips_init(unsigned long memsize, uint64_ { int i; - for (i = 0; i < 10; i++) { + for (i = 0; i < PHYS_AVAIL_ENTRIES; i++) { phys_avail[i] = 0; } From owner-svn-src-all@freebsd.org Sun Nov 22 02:43:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1325EA358D7; Sun, 22 Nov 2015 02:43:16 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E29F215D4; Sun, 22 Nov 2015 02:43:15 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAM2hFq1085230; Sun, 22 Nov 2015 02:43:15 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAM2hEtH085226; Sun, 22 Nov 2015 02:43:14 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201511220243.tAM2hEtH085226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 22 Nov 2015 02:43:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291155 - head/usr.bin/bc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2015 02:43:16 -0000 Author: pfg Date: Sun Nov 22 02:43:14 2015 New Revision: 291155 URL: https://svnweb.freebsd.org/changeset/base/291155 Log: bc: sync with OpenBSD tty.c Rev. 1.3 Avoid unintended problems with operator precedence when doing an assignment and comparison. bc.1, Rev. 1.31, 1.32 '.Ql Quit' -> '.Ql quit' because only the lowercase command is valid. Clarify sentence about `quit` in BUGS section. extern.h, Rev. 1.12 whitespace bc.y, Rev. 1.47 Prefer setvbuf() to setlinebuf() for portability Obtained from: OpenBSD MFC after: 2 weeks Modified: head/usr.bin/bc/bc.1 head/usr.bin/bc/bc.y head/usr.bin/bc/extern.h head/usr.bin/bc/tty.c Modified: head/usr.bin/bc/bc.1 ============================================================================== --- head/usr.bin/bc/bc.1 Sun Nov 22 02:40:19 2015 (r291154) +++ head/usr.bin/bc/bc.1 Sun Nov 22 02:43:14 2015 (r291155) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.\" $OpenBSD: bc.1,v 1.30 2014/01/14 07:42:42 jmc Exp $ +.\" $OpenBSD: bc.1,v 1.32 2015/11/17 05:45:35 mmcc Exp $ .\" .\" Copyright (C) Caldera International Inc. 2001-2002. .\" All rights reserved. @@ -35,7 +35,7 @@ .\" .\" @(#)bc.1 6.8 (Berkeley) 8/8/91 .\" -.Dd April 16, 2014 +.Dd November 21 2015 .Dt BC 1 .Os .Sh NAME @@ -407,8 +407,9 @@ The current version of the utility was written by .An Otto Moerbeek . .Sh BUGS -.Ql Quit -is interpreted when read, not when executed. +The +.Ql quit +statement is interpreted when read, not when executed. .Pp Some non-portable extensions, as found in the GNU version of the .Nm Modified: head/usr.bin/bc/bc.y ============================================================================== --- head/usr.bin/bc/bc.y Sun Nov 22 02:40:19 2015 (r291154) +++ head/usr.bin/bc/bc.y Sun Nov 22 02:43:14 2015 (r291155) @@ -1125,7 +1125,7 @@ main(int argc, char *argv[]) int ch, i; init(); - setlinebuf(stdout); + setvbuf(stdout, NULL, _IOLBF, 0); sargv = malloc(argc * sizeof(char *)); if (sargv == NULL) Modified: head/usr.bin/bc/extern.h ============================================================================== --- head/usr.bin/bc/extern.h Sun Nov 22 02:40:19 2015 (r291154) +++ head/usr.bin/bc/extern.h Sun Nov 22 02:43:14 2015 (r291155) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $OpenBSD: extern.h,v 1.10 2013/09/19 16:12:01 otto Exp $ */ +/* $OpenBSD: extern.h,v 1.12 2014/04/17 19:07:14 otto Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek @@ -39,9 +39,9 @@ extern int fileindex; extern int sargc; extern const char **sargv; extern const char *filename; -extern bool interactive; -extern EditLine *el; -extern History *hist; -extern HistEvent he; +extern bool interactive; +extern EditLine *el; +extern History *hist; +extern HistEvent he; extern char *cmdexpr; extern struct termios ttysaved; Modified: head/usr.bin/bc/tty.c ============================================================================== --- head/usr.bin/bc/tty.c Sun Nov 22 02:40:19 2015 (r291154) +++ head/usr.bin/bc/tty.c Sun Nov 22 02:43:14 2015 (r291155) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $OpenBSD: tty.c,v 1.2 2013/11/12 13:54:51 deraadt Exp $ */ +/* $OpenBSD: tty.c,v 1.3 2015/09/05 09:49:24 jsg Exp $ */ /* * Copyright (c) 2013, Otto Moerbeek @@ -30,7 +30,7 @@ settty(struct termios *t) { int ret; - while ((ret = tcsetattr(0, TCSADRAIN, t) == -1) && errno == EINTR) + while ((ret = tcsetattr(0, TCSADRAIN, t)) == -1 && errno == EINTR) continue; return ret; } @@ -40,7 +40,7 @@ gettty(struct termios *t) { int ret; - while ((ret = tcgetattr(0, t) == -1) && errno == EINTR) + while ((ret = tcgetattr(0, t)) == -1 && errno == EINTR) continue; return ret; } From owner-svn-src-all@freebsd.org Sun Nov 22 05:26:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B86DA354DE; Sun, 22 Nov 2015 05:26:15 +0000 (UTC) (envelope-from whu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE4331309; Sun, 22 Nov 2015 05:26:14 +0000 (UTC) (envelope-from whu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAM5QDa6046030; Sun, 22 Nov 2015 05:26:13 GMT (envelope-from whu@FreeBSD.org) Received: (from whu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAM5QDAD046029; Sun, 22 Nov 2015 05:26:13 GMT (envelope-from whu@FreeBSD.org) Message-Id: <201511220526.tAM5QDAD046029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: whu set sender to whu@FreeBSD.org using -f From: Wei Hu Date: Sun, 22 Nov 2015 05:26:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291156 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2015 05:26:15 -0000 Author: whu Date: Sun Nov 22 05:26:13 2015 New Revision: 291156 URL: https://svnweb.freebsd.org/changeset/base/291156 Log: Ignore the inbound checksum flags when doing packet forwarding in netvsc driver. PR: 20363 Submitted by: whu Reviewed by: royger, whu Approved by: royger MFC after: 1 week Relnotes: No Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4131 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Sun Nov 22 02:43:14 2015 (r291155) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Sun Nov 22 05:26:13 2015 (r291156) @@ -128,6 +128,15 @@ __FBSDID("$FreeBSD$"); #define HV_NV_SC_PTR_OFFSET_IN_BUF 0 #define HV_NV_PACKET_OFFSET_IN_BUF 16 +/* + * A unified flag for all outbound check sum flags is useful, + * and it helps avoiding unnecessary check sum calculation in + * network forwarding scenario. + */ +#define HV_CSUM_FOR_OUTBOUND \ + (CSUM_IP|CSUM_IP_UDP|CSUM_IP_TCP|CSUM_IP_SCTP|CSUM_IP_TSO| \ + CSUM_IP_ISCSI|CSUM_IP6_UDP|CSUM_IP6_TCP|CSUM_IP6_SCTP| \ + CSUM_IP6_TSO|CSUM_IP6_ISCSI) /* * Data types @@ -570,7 +579,8 @@ hn_start_locked(struct ifnet *ifp) packet->vlan_tci & 0xfff; } - if (0 == m_head->m_pkthdr.csum_flags) { + /* Only check the flags for outbound and ignore the ones for inbound */ + if (0 == (m_head->m_pkthdr.csum_flags & HV_CSUM_FOR_OUTBOUND)) { goto pre_send; } From owner-svn-src-all@freebsd.org Sun Nov 22 09:48:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32E8CA35CBE; Sun, 22 Nov 2015 09:48:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E92FE1E0D; Sun, 22 Nov 2015 09:48:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAM9m4po048511; Sun, 22 Nov 2015 09:48:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAM9m4Iw048510; Sun, 22 Nov 2015 09:48:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511220948.tAM9m4Iw048510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 22 Nov 2015 09:48:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291157 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2015 09:48:05 -0000 Author: kib Date: Sun Nov 22 09:48:03 2015 New Revision: 291157 URL: https://svnweb.freebsd.org/changeset/base/291157 Log: Noted by: glebius Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vnode_pager.c Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Sun Nov 22 05:26:13 2015 (r291156) +++ head/sys/vm/vnode_pager.c Sun Nov 22 09:48:03 2015 (r291157) @@ -770,7 +770,7 @@ vnode_pager_generic_getpages(struct vnod struct bufobj *bo; struct buf *bp; daddr_t firstaddr, reqblock; - off_t foff; + off_t foff, pib; int pbefore, pafter, i, size, bsize, first, last, *freecnt; int count, error, before, after, secmask; @@ -864,8 +864,9 @@ vnode_pager_generic_getpages(struct vnod VM_OBJECT_WUNLOCK(object); } - pbefore = (daddr_t)before * bsize / PAGE_SIZE; - pafter = (daddr_t)after * bsize / PAGE_SIZE; + pib = IDX_TO_OFF(m[reqpage]->pindex) % bsize; + pbefore = ((daddr_t)before * bsize + pib) / PAGE_SIZE; + pafter = ((daddr_t)(after + 1) * bsize - pib) / PAGE_SIZE - 1; first = reqpage < pbefore ? 0 : reqpage - pbefore; last = reqpage + pafter >= count ? count - 1 : reqpage + pafter; if (first > 0 || last + 1 < count) { @@ -887,7 +888,7 @@ vnode_pager_generic_getpages(struct vnod * here on direct device I/O */ firstaddr = reqblock; - firstaddr += (IDX_TO_OFF(m[reqpage]->pindex) % bsize) / DEV_BSIZE; + firstaddr += pib / DEV_BSIZE; firstaddr -= IDX_TO_OFF(reqpage - first) / DEV_BSIZE; /* From owner-svn-src-all@freebsd.org Sun Nov 22 09:50:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19F0EA35D1B; Sun, 22 Nov 2015 09:50:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D95C81F9C; Sun, 22 Nov 2015 09:50:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAM9oDg0048859; Sun, 22 Nov 2015 09:50:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAM9oDdP048858; Sun, 22 Nov 2015 09:50:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511220950.tAM9oDdP048858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 22 Nov 2015 09:50:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291158 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2015 09:50:15 -0000 Author: kib Date: Sun Nov 22 09:50:13 2015 New Revision: 291158 URL: https://svnweb.freebsd.org/changeset/base/291158 Log: Record proper commit message for r291157. The r289895 revision did not accounted for the block containing the requested page, when calculating the run of pages. Include the pages before/after the requested page, that fit into the reqblock, into the calculation. Noted by: glebius Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vnode_pager.c Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Sun Nov 22 09:48:03 2015 (r291157) +++ head/sys/vm/vnode_pager.c Sun Nov 22 09:50:13 2015 (r291158) @@ -1082,7 +1082,7 @@ vnode_pager_putpages(vm_object_t object, /* * Force synchronous operation if we are extremely low on memory * to prevent a low-memory deadlock. VOP operations often need to - * allocate more memory to initiate the I/O ( i.e. do a BMAP + * allocate more memory to initiate the I/O ( i.e. do a BMAP * operation ). The swapper handles the case by limiting the amount * of asynchronous I/O, but that sort of solution doesn't scale well * for the vnode pager without a lot of work. From owner-svn-src-all@freebsd.org Sun Nov 22 11:13:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97AF8A35E93; Sun, 22 Nov 2015 11:13:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72FE81847; Sun, 22 Nov 2015 11:13:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAMBD9e5083570; Sun, 22 Nov 2015 11:13:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAMBD9Vr083568; Sun, 22 Nov 2015 11:13:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511221113.tAMBD9Vr083568@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 22 Nov 2015 11:13:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291159 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2015 11:13:10 -0000 Author: mav Date: Sun Nov 22 11:13:09 2015 New Revision: 291159 URL: https://svnweb.freebsd.org/changeset/base/291159 Log: Add mode mailbox command codes. Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/ispmbox.h Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sun Nov 22 09:50:13 2015 (r291158) +++ head/sys/dev/isp/isp.c Sun Nov 22 11:13:09 2015 (r291159) @@ -6900,7 +6900,7 @@ static const uint32_t mbpfc[] = { */ static const char *fc_mbcmd_names[] = { - "NO-OP", + "NO-OP", /* 00h */ "LOAD RAM", "EXEC FIRMWARE", "DUMP RAM", @@ -6912,11 +6912,11 @@ static const char *fc_mbcmd_names[] = { "LOAD RAM (2100)", "DUMP RAM", "LOAD RISC RAM", - NULL, + "DUMP RISC RAM", "WRITE RAM WORD EXTENDED", "CHECK FIRMWARE", "READ RAM WORD EXTENDED", - "INIT REQUEST QUEUE", + "INIT REQUEST QUEUE", /* 10h */ "INIT RESULT QUEUE", "EXECUTE IOCB", "WAKE UP", @@ -6932,9 +6932,9 @@ static const char *fc_mbcmd_names[] = { "GET DEV QUEUE STATUS", NULL, "GET FIRMWARE STATUS", - "GET LOOP ID", + "GET LOOP ID", /* 20h */ NULL, - "GET RETRY COUNT", + "GET TIMEOUT PARAMS", NULL, NULL, NULL, @@ -6942,15 +6942,15 @@ static const char *fc_mbcmd_names[] = { NULL, "GET FIRMWARE OPTIONS", "GET PORT QUEUE PARAMS", + "GENERATE SYSTEM ERROR", NULL, NULL, NULL, NULL, NULL, - NULL, - NULL, - NULL, - "SET RETRY COUNT", + "WRITE SFP", /* 30h */ + "READ SFP", + "SET TIMEOUT PARAMS", NULL, NULL, NULL, @@ -6959,17 +6959,17 @@ static const char *fc_mbcmd_names[] = { "SET FIRMWARE OPTIONS", "SET PORT QUEUE PARAMS", NULL, + "SET FC LED CONF", NULL, + "RESTART NIC FIRMWARE", + "ACCESS CONTROL", NULL, - NULL, - NULL, - NULL, - "LOOP PORT BYPASS", + "LOOP PORT BYPASS", /* 40h */ "LOOP PORT ENABLE", "GET RESOURCE COUNT", "REQUEST NON PARTICIPATING MODE", - NULL, - NULL, + "DIAGNOSTIC ECHO TEST", + "DIAGNOSTIC LOOPBACK", NULL, "GET PORT DATABASE ENHANCED", "INIT FIRMWARE MULTI ID", @@ -6980,24 +6980,24 @@ static const char *fc_mbcmd_names[] = { NULL, NULL, NULL, + "GET FCF LIST", /* 50h */ + "GET DCBX PARAMETERS", NULL, - NULL, - NULL, - NULL, + "HOST MEMORY COPY", "EXECUTE IOCB A64", NULL, NULL, + "SEND RNID", NULL, - NULL, - NULL, - NULL, + "SET PARAMETERS", + "GET PARAMETERS", "DRIVER HEARTBEAT", - NULL, + "FIRMWARE HEARTBEAT", "GET/SET DATA RATE", + "SEND RNFT", NULL, - NULL, - "INIT FIRMWARE", - NULL, + "INIT FIRMWARE", /* 60h */ + "GET INIT CONTROL BLOCK", "INIT LIP", "GET FC-AL POSITION MAP", "GET PORT DATABASE", @@ -7009,10 +7009,10 @@ static const char *fc_mbcmd_names[] = { "GET PORT NAME", "GET LINK STATUS", "INIT LIP RESET", - NULL, + "GET LINK STATS & PRIVATE DATA CNTS", "SEND SNS", "FABRIC LOGIN", - "SEND CHANGE REQUEST", + "SEND CHANGE REQUEST", /* 70h */ "FABRIC LOGOUT", "INIT LIP LOGIN", NULL, @@ -7022,11 +7022,11 @@ static const char *fc_mbcmd_names[] = { "INITIALIZE IP MAILBOX", NULL, NULL, + "GET XGMAC STATS", NULL, - NULL, - "Get ID List", + "GET ID LIST", "SEND LFA", - "Lun RESET" + "LUN RESET" }; static void Modified: head/sys/dev/isp/ispmbox.h ============================================================================== --- head/sys/dev/isp/ispmbox.h Sun Nov 22 09:50:13 2015 (r291158) +++ head/sys/dev/isp/ispmbox.h Sun Nov 22 11:13:09 2015 (r291159) @@ -48,7 +48,7 @@ #define MBOX_LOAD_RISC_RAM_2100 0x0009 /* a */ #define MBOX_LOAD_RISC_RAM 0x000b - /* c */ +#define MBOX_DUMP_RISC_RAM 0x000c #define MBOX_WRITE_RAM_WORD_EXTENDED 0x000d #define MBOX_CHECK_FIRMWARE 0x000e #define MBOX_READ_RAM_WORD_EXTENDED 0x000f @@ -122,22 +122,60 @@ #define MBOX_GET_TARGET_STATUS 0x0056 /* These are for the ISP2X00 FC cards */ +#define MBOX_WRITE_FC_SERDES_REG 0x0003 /* FC only */ +#define MBOX_READ_FC_SERDES_REG 0x0004 /* FC only */ +#define MBOX_GET_IO_STATUS 0x0012 +#define MBOX_SET_TRANSMIT_PARAMS 0x0019 +#define MBOX_SET_PORT_PARAMS 0x001a +#define MBOX_LOAD_OP_FW_PARAMS 0x001b +#define MBOX_INIT_MULTIPLE_QUEUE 0x001f #define MBOX_GET_LOOP_ID 0x0020 /* for 24XX cards, outgoing mailbox 7 has these values for F or FL topologies */ #define ISP24XX_INORDER 0x0100 #define ISP24XX_NPIV_SAN 0x0400 #define ISP24XX_VSAN_SAN 0x1000 #define ISP24XX_FC_SP_SAN 0x2000 - +#define MBOX_GET_TIMEOUT_PARAMS 0x0022 #define MBOX_GET_FIRMWARE_OPTIONS 0x0028 +#define MBOX_GENERATE_SYSTEM_ERROR 0x002a +#define MBOX_WRITE_SFP 0x0030 +#define MBOX_READ_SFP 0x0031 +#define MBOX_SET_TIMEOUT_PARAMS 0x0032 #define MBOX_SET_FIRMWARE_OPTIONS 0x0038 +#define MBOX_GET_SET_FC_LED_CONF 0x003b +#define MBOX_RESTART_NIC_FIRMWARE 0x003d /* FCoE only */ +#define MBOX_ACCESS_CONTROL 0x003e +#define MBOX_LOOP_PORT_BYPASS 0x0040 /* FC only */ +#define MBOX_LOOP_PORT_ENABLE 0x0041 /* FC only */ #define MBOX_GET_RESOURCE_COUNT 0x0042 #define MBOX_REQUEST_OFFLINE_MODE 0x0043 +#define MBOX_DIAGNOSTIC_ECHO_TEST 0x0044 +#define MBOX_DIAGNOSTIC_LOOPBACK 0x0045 #define MBOX_ENHANCED_GET_PDB 0x0047 #define MBOX_INIT_FIRMWARE_MULTI_ID 0x0048 /* 2400 only */ #define MBOX_GET_VP_DATABASE 0x0049 /* 2400 only */ #define MBOX_GET_VP_DATABASE_ENTRY 0x004a /* 2400 only */ +#define MBOX_GET_FCF_LIST 0x0050 /* FCoE only */ +#define MBOX_GET_DCBX_PARAMETERS 0x0051 /* FCoE only */ +#define MBOX_HOST_MEMORY_COPY 0x0053 #define MBOX_EXEC_COMMAND_IOCB_A64 0x0054 +#define MBOX_SEND_RNID 0x0057 +#define MBOX_SET_PARAMETERS 0x0059 +#define MBOX_GET_PARAMETERS 0x005a +#define MBOX_DRIVER_HEARTBEAT 0x005B /* FC only */ +#define MBOX_FW_HEARTBEAT 0x005C +#define MBOX_GET_SET_DATA_RATE 0x005D /* >=23XX only */ +#define MBGSD_GET_RATE 0 +#define MBGSD_SET_RATE 1 +#define MBGSD_SET_RATE_NOW 2 /* 24XX only */ +#define MBGSD_1GB 0x00 +#define MBGSD_2GB 0x01 +#define MBGSD_AUTO 0x02 +#define MBGSD_4GB 0x03 /* 24XX only */ +#define MBGSD_8GB 0x04 /* 25XX only */ +#define MBGSD_16GB 0x05 /* 26XX only */ +#define MBGSD_10GB 0x13 /* 26XX only */ +#define MBOX_SEND_RNFT 0x005e #define MBOX_INIT_FIRMWARE 0x0060 #define MBOX_GET_INIT_CONTROL_BLOCK 0x0061 #define MBOX_INIT_LIP 0x0062 @@ -151,30 +189,19 @@ #define MBOX_GET_PORT_NAME 0x006A #define MBOX_GET_LINK_STATUS 0x006B #define MBOX_INIT_LIP_RESET 0x006C +#define MBOX_GET_LINK_STAT_PR_DATA_CNT 0x006D #define MBOX_SEND_SNS 0x006E #define MBOX_FABRIC_LOGIN 0x006F #define MBOX_SEND_CHANGE_REQUEST 0x0070 #define MBOX_FABRIC_LOGOUT 0x0071 #define MBOX_INIT_LIP_LOGIN 0x0072 #define MBOX_GET_PORT_NODE_NAME_LIST 0x0075 +#define MBOX_SET_VENDOR_ID 0x0076 +#define MBOX_GET_XGMAC_STATS 0x007a #define MBOX_GET_ID_LIST 0x007C +#define MBOX_SEND_LFA 0x007d #define MBOX_LUN_RESET 0x007E -#define MBOX_DRIVER_HEARTBEAT 0x005B -#define MBOX_FW_HEARTBEAT 0x005C - -#define MBOX_GET_SET_DATA_RATE 0x005D /* 24XX/23XX only */ -#define MBGSD_GET_RATE 0 -#define MBGSD_SET_RATE 1 -#define MBGSD_SET_RATE_NOW 2 /* 24XX only */ -#define MBGSD_1GB 0x00 -#define MBGSD_2GB 0x01 -#define MBGSD_AUTO 0x02 -#define MBGSD_4GB 0x03 /* 24XX only */ -#define MBGSD_8GB 0x04 /* 25XX only */ -#define MBGSD_16GB 0x05 /* 26XX only */ -#define MBGSD_10GB 0x13 /* 26XX only */ - #define ISP2100_SET_PCI_PARAM 0x00ff #define MBOX_BUSY 0x04 From owner-svn-src-all@freebsd.org Sun Nov 22 11:44:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F90AA3568E; Sun, 22 Nov 2015 11:44:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02B3A19E2; Sun, 22 Nov 2015 11:44:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAMBiVTT095735; Sun, 22 Nov 2015 11:44:31 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAMBiVrs095733; Sun, 22 Nov 2015 11:44:31 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511221144.tAMBiVrs095733@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 22 Nov 2015 11:44:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291160 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2015 11:44:32 -0000 Author: mav Date: Sun Nov 22 11:44:30 2015 New Revision: 291160 URL: https://svnweb.freebsd.org/changeset/base/291160 Log: Add some more asynchronous event status codes. Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/ispmbox.h Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sun Nov 22 11:13:09 2015 (r291159) +++ head/sys/dev/isp/isp.c Sun Nov 22 11:44:30 2015 (r291160) @@ -5800,7 +5800,10 @@ isp_parse_async_fc(ispsoftc_t *isp, uint ISPASYNC_CHANGE_SNS, portid); break; } - + case ASYNC_ERR_LOGGING_DISABLED: + isp_prt(isp, ISP_LOGWARN, "Error logging disabled (reason 0x%x)", + ISP_READ(isp, OUTMAILBOX1)); + break; case ASYNC_CONNMODE: /* * This only applies to 2100 amd 2200 cards @@ -5843,7 +5846,10 @@ isp_parse_async_fc(ispsoftc_t *isp, uint FCPARAM(isp, chan)->isp_loopstate = LOOP_NIL; isp_async(isp, ISPASYNC_CHANGE_NOTIFY, chan, ISPASYNC_CHANGE_OTHER); break; - + case ASYNC_P2P_INIT_ERR: + isp_prt(isp, ISP_LOGWARN, "P2P init error (reason 0x%x)", + ISP_READ(isp, OUTMAILBOX1)); + break; case ASYNC_RCV_ERR: if (IS_24XX(isp)) { isp_prt(isp, ISP_LOGWARN, "Receive Error"); @@ -5855,11 +5861,23 @@ isp_parse_async_fc(ispsoftc_t *isp, uint if (IS_24XX(isp)) { isp_prt(isp, ISP_LOGTDEBUG0, "LS_RJT sent"); break; - } else if (IS_2200(isp)) { + } else { isp_prt(isp, ISP_LOGTDEBUG0, "QFULL sent"); break; } - /* FALLTHROUGH */ + case ASYNC_FW_RESTART_COMPLETE: + isp_prt(isp, ISP_LOGDEBUG0, "FW restart complete"); + break; + case ASYNC_TEMPERATURE_ALERT: + isp_prt(isp, ISP_LOGERR, "Temperature alert (subcode 0x%x)", + ISP_READ(isp, OUTMAILBOX1)); + break; + case ASYNC_AUTOLOAD_FW_COMPLETE: + isp_prt(isp, ISP_LOGDEBUG0, "Autoload FW init complete"); + break; + case ASYNC_AUTOLOAD_FW_FAILURE: + isp_prt(isp, ISP_LOGERR, "Autoload FW init failure"); + break; default: isp_prt(isp, ISP_LOGWARN, "Unknown Async Code 0x%x", mbox); break; Modified: head/sys/dev/isp/ispmbox.h ============================================================================== --- head/sys/dev/isp/ispmbox.h Sun Nov 22 11:13:09 2015 (r291159) +++ head/sys/dev/isp/ispmbox.h Sun Nov 22 11:44:30 2015 (r291160) @@ -246,14 +246,15 @@ #define ASYNC_HUNG_SCSI 0x800C #define ASYNC_KILLED_BUS 0x800D #define ASYNC_BUS_TRANSIT 0x800E /* LVD -> HVD, eg. */ -#define ASYNC_LIP_OCCURRED 0x8010 +#define ASYNC_LIP_OCCURRED 0x8010 /* FC only */ #define ASYNC_LOOP_UP 0x8011 #define ASYNC_LOOP_DOWN 0x8012 -#define ASYNC_LOOP_RESET 0x8013 +#define ASYNC_LOOP_RESET 0x8013 /* FC only */ #define ASYNC_PDB_CHANGED 0x8014 #define ASYNC_CHANGE_NOTIFY 0x8015 -#define ASYNC_LIP_F8 0x8016 -#define ASYNC_LIP_ERROR 0x8017 +#define ASYNC_LIP_F8 0x8016 /* FC only */ +#define ASYNC_LIP_ERROR 0x8017 /* FC only */ +#define ASYNC_AUTO_PLOGI_RJT 0x8018 #define ASYNC_SECURITY_UPDATE 0x801B #define ASYNC_CMD_CMPLT 0x8020 #define ASYNC_CTIO_DONE 0x8021 @@ -265,7 +266,8 @@ #define ASYNC_IP_RCVQ_LOW 0x8025 #define ASYNC_IP_RCVQ_EMPTY 0x8026 #define ASYNC_IP_RECV_DONE_ALIGNED 0x8027 -#define ASYNC_PTPMODE 0x8030 +#define ASYNC_ERR_LOGGING_DISABLED 0x8029 +#define ASYNC_PTPMODE 0x8030 /* FC only */ #define ASYNC_RIO16_1 0x8031 #define ASYNC_RIO16_2 0x8032 #define ASYNC_RIO16_3 0x8033 @@ -277,9 +279,25 @@ #define ISP_CONN_BADLIP 3 #define ISP_CONN_FATAL 4 #define ISP_CONN_LOOPBACK 5 +#define ASYNC_P2P_INIT_ERR 0x8037 #define ASYNC_RIOZIO_STALL 0x8040 /* there's a RIO/ZIO entry that hasn't been serviced */ #define ASYNC_RIO32_2_2200 0x8042 /* same as ASYNC_RIO32_2, but for 2100/2200 */ #define ASYNC_RCV_ERR 0x8048 +/* + * 2.01.31 2200 Only. Need Bit 13 in Mailbox 1 for Set Firmware Options + * mailbox command to enable this. + */ +#define ASYNC_QFULL_SENT 0x8049 +#define ASYNC_RJT_SENT 0x8049 /* 24XX only */ +#define ASYNC_SEL_CLASS2_P_RJT_SENT 0x804f +#define ASYNC_FW_RESTART_COMPLETE 0x8060 +#define ASYNC_TEMPERATURE_ALERT 0x8070 +#define ASYNC_INTER_DRIVER_COMP 0x8100 /* FCoE only */ +#define ASYNC_INTER_DRIVER_NOTIFY 0x8101 /* FCoE only */ +#define ASYNC_INTER_DRIVER_TIME_EXT 0x8102 /* FCoE only */ +#define ASYNC_NIC_FW_STATE_CHANGE 0x8200 /* FCoE only */ +#define ASYNC_AUTOLOAD_FW_COMPLETE 0x8400 +#define ASYNC_AUTOLOAD_FW_FAILURE 0x8401 /* * Firmware Options. There are a lot of them. @@ -303,20 +321,6 @@ #define IFCOPT3_NOPRLI (1 << 4) /* disable automatic sending of PRLI on local loops */ #define IFCOPT3_RNDASYNC (1 << 1) -/* - * 2.01.31 2200 Only. Need Bit 13 in Mailbox 1 for Set Firmware Options - * mailbox command to enable this. - */ -#define ASYNC_QFULL_SENT 0x8049 - -/* - * Needs to be enabled - */ -#define ASYNC_AUTO_PLOGI_RJT 0x8018 -/* - * 24XX only - */ -#define ASYNC_RJT_SENT 0x8049 /* * All IOCB Queue entries are this size From owner-svn-src-all@freebsd.org Sun Nov 22 15:57:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46038A34C33; Sun, 22 Nov 2015 15:57:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11D951435; Sun, 22 Nov 2015 15:57:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAMFvt5k074526; Sun, 22 Nov 2015 15:57:55 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAMFvtdF074525; Sun, 22 Nov 2015 15:57:55 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511221557.tAMFvtdF074525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 22 Nov 2015 15:57:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291161 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2015 15:57:56 -0000 Author: mav Date: Sun Nov 22 15:57:54 2015 New Revision: 291161 URL: https://svnweb.freebsd.org/changeset/base/291161 Log: Gracefully stop firmware before resetting chip when changing role. Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sun Nov 22 11:44:30 2015 (r291160) +++ head/sys/dev/isp/isp.c Sun Nov 22 15:57:54 2015 (r291161) @@ -1338,11 +1338,32 @@ isp_reset(ispsoftc_t *isp, int do_load_d } /* + * Clean firmware shutdown. + */ +static int +isp_deinit(ispsoftc_t *isp) +{ + mbreg_t mbs; + + isp->isp_state = ISP_NILSTATE; + MBSINIT(&mbs, MBOX_STOP_FIRMWARE, MBLOGALL, 500000); + mbs.param[1] = 0; + mbs.param[2] = 0; + mbs.param[3] = 0; + mbs.param[4] = 0; + mbs.param[5] = 0; + mbs.param[6] = 0; + mbs.param[7] = 0; + mbs.param[8] = 0; + isp_mboxcmd(isp, &mbs); + return (mbs.param[0] == MBOX_COMMAND_COMPLETE ? 0 : mbs.param[0]); +} + +/* * Initialize Parameters of Hardware to a known state. * * Locks are held before coming here. */ - void isp_init(ispsoftc_t *isp) { @@ -6799,7 +6820,7 @@ static const uint32_t mbpfc[] = { ISP_FC_OPMAP(0x2f, 0x21), /* 0x11: MBOX_INIT_RES_QUEUE */ ISP_FC_OPMAP(0x0f, 0x01), /* 0x12: MBOX_EXECUTE_IOCB */ ISP_FC_OPMAP(0x03, 0x03), /* 0x13: MBOX_WAKE_UP */ - ISP_FC_OPMAP(0x01, 0xff), /* 0x14: MBOX_STOP_FIRMWARE */ + ISP_FC_OPMAP_HALF(0x1, 0xff, 0x0, 0x03), /* 0x14: MBOX_STOP_FIRMWARE */ ISP_FC_OPMAP(0x4f, 0x01), /* 0x15: MBOX_ABORT */ ISP_FC_OPMAP(0x07, 0x01), /* 0x16: MBOX_ABORT_DEVICE */ ISP_FC_OPMAP(0x07, 0x01), /* 0x17: MBOX_ABORT_TARGET */ @@ -7621,6 +7642,8 @@ isp_reinit(ispsoftc_t *isp, int do_load_ { int i, res = 0; + if (isp->isp_state == ISP_RUNSTATE) + isp_deinit(isp); if (isp->isp_state != ISP_RESETSTATE) isp_reset(isp, do_load_defaults); if (isp->isp_state != ISP_RESETSTATE) { From owner-svn-src-all@freebsd.org Sun Nov 22 16:55:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53C20A3574B; Sun, 22 Nov 2015 16:55:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19EDD1C8C; Sun, 22 Nov 2015 16:55:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAMGtiBD091766; Sun, 22 Nov 2015 16:55:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAMGtis5091765; Sun, 22 Nov 2015 16:55:44 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511221655.tAMGtis5091765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 22 Nov 2015 16:55:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291162 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2015 16:55:45 -0000 Author: mav Date: Sun Nov 22 16:55:43 2015 New Revision: 291162 URL: https://svnweb.freebsd.org/changeset/base/291162 Log: Generate fake ISPASYNC_CHANGE_PDB on fake login on pre-24xx. This makes port scanner fix absent port ID for added initiator. Modified: head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sun Nov 22 15:57:54 2015 (r291161) +++ head/sys/dev/isp/isp_freebsd.c Sun Nov 22 16:55:43 2015 (r291162) @@ -2354,6 +2354,7 @@ isp_handle_platform_atio(ispsoftc_t *isp static void isp_handle_platform_atio2(ispsoftc_t *isp, at2_entry_t *aep) { + fcparam *fcp; lun_id_t lun; fcportdb_t *lp; tstate_t *tptr; @@ -2374,6 +2375,7 @@ isp_handle_platform_atio2(ispsoftc_t *is return; } + fcp = FCPARAM(isp, 0); if (ISP_CAP_SCCFW(isp)) { lun = aep->at_scclun; #if __FreeBSD_version < 1000700 @@ -2444,7 +2446,7 @@ isp_handle_platform_atio2(ispsoftc_t *is SLIST_REMOVE_HEAD(&tptr->atios, sim_links.sle); tptr->atio_count--; isp_prt(isp, ISP_LOGTDEBUG2, "Take FREE ATIO count now %d", tptr->atio_count); - atiop->ccb_h.target_id = FCPARAM(isp, 0)->isp_loopid; + atiop->ccb_h.target_id = fcp->isp_loopid; atiop->ccb_h.target_lun = lun; /* @@ -2467,6 +2469,10 @@ isp_handle_platform_atio2(ispsoftc_t *is (((uint64_t) aep->at_wwpn[3]) << 0); isp_add_wwn_entry(isp, 0, wwpn, INI_NONE, nphdl, PORT_ANY, 0); + if (fcp->isp_loopstate > LOOP_LTEST_DONE) + fcp->isp_loopstate = LOOP_LTEST_DONE; + isp_async(isp, ISPASYNC_CHANGE_NOTIFY, 0, + ISPASYNC_CHANGE_PDB, nphdl, 0x06, 0xff); isp_find_pdb_by_handle(isp, 0, nphdl, &lp); } atiop->init_id = FC_PORTDB_TGT(isp, 0, lp); From owner-svn-src-all@freebsd.org Sun Nov 22 17:03:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A63C3A35B2A; Sun, 22 Nov 2015 17:03:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57C1A116E; Sun, 22 Nov 2015 17:03:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAMH3cdE094626; Sun, 22 Nov 2015 17:03:38 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAMH3cxq094625; Sun, 22 Nov 2015 17:03:38 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511221703.tAMH3cxq094625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 22 Nov 2015 17:03:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291163 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2015 17:03:39 -0000 Author: mav Date: Sun Nov 22 17:03:38 2015 New Revision: 291163 URL: https://svnweb.freebsd.org/changeset/base/291163 Log: Explicitly call SEND CHANGE REQUEST for pre-24xx chips in target mode. While later firmware always registers for RSCN requests, older one does it only in initiator mode. But in target mode there RSCN can be the only way to detect gone intiator. Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sun Nov 22 16:55:43 2015 (r291162) +++ head/sys/dev/isp/isp.c Sun Nov 22 17:03:38 2015 (r291163) @@ -122,6 +122,7 @@ static int isp_gid_ft_sns(ispsoftc_t *, static int isp_gid_ft_ct_passthru(ispsoftc_t *, int); static int isp_scan_fabric(ispsoftc_t *, int); static int isp_login_device(ispsoftc_t *, int, uint32_t, isp_pdb_t *, uint16_t *); +static int isp_send_change_request(ispsoftc_t *, int); static int isp_register_fc4_type(ispsoftc_t *, int); static int isp_register_fc4_type_24xx(ispsoftc_t *, int); static int isp_register_fc4_features_24xx(ispsoftc_t *, int); @@ -2904,6 +2905,8 @@ isp_fclink_test(ispsoftc_t *isp, int cha } else { fcp->isp_sns_hdl = SNS_ID; r = isp_register_fc4_type(isp, chan); + if (r == 0 && fcp->role == ISP_ROLE_TARGET) + isp_send_change_request(isp, chan); } if (r) { isp_prt(isp, ISP_LOGWARN|ISP_LOG_SANCFG, "%s: register fc4 type failed", __func__); @@ -3733,6 +3736,18 @@ isp_login_device(ispsoftc_t *isp, int ch } static int +isp_send_change_request(ispsoftc_t *isp, int chan) +{ + mbreg_t mbs; + + MBSINIT(&mbs, MBOX_SEND_CHANGE_REQUEST, MBLOGALL, 500000); + mbs.param[1] = 0x03; + mbs.param[9] = chan; + isp_mboxcmd(isp, &mbs); + return (mbs.param[0] == MBOX_COMMAND_COMPLETE ? 0 : -1); +} + +static int isp_register_fc4_type(ispsoftc_t *isp, int chan) { fcparam *fcp = FCPARAM(isp, chan); @@ -5815,8 +5830,8 @@ isp_parse_async_fc(ispsoftc_t *isp, uint fcp = FCPARAM(isp, chan); if (fcp->role == ISP_ROLE_NONE) break; - if (fcp->isp_loopstate > LOOP_LSCAN_DONE) - fcp->isp_loopstate = LOOP_LSCAN_DONE; + if (fcp->isp_loopstate > LOOP_LTEST_DONE) + fcp->isp_loopstate = LOOP_LTEST_DONE; isp_async(isp, ISPASYNC_CHANGE_NOTIFY, chan, ISPASYNC_CHANGE_SNS, portid); break; @@ -6912,7 +6927,7 @@ static const uint32_t mbpfc[] = { ISP_FC_OPMAP(0x00, 0x00), /* 0x6d: */ ISP_FC_OPMAP(0xcf, 0x03), /* 0x6e: MBOX_SEND_SNS */ ISP_FC_OPMAP(0x0f, 0x07), /* 0x6f: MBOX_FABRIC_LOGIN */ - ISP_FC_OPMAP(0x03, 0x01), /* 0x70: MBOX_SEND_CHANGE_REQUEST */ + ISP_FC_OPMAP_HALF(0x02, 0x03, 0x00, 0x03), /* 0x70: MBOX_SEND_CHANGE_REQUEST */ ISP_FC_OPMAP(0x03, 0x03), /* 0x71: MBOX_FABRIC_LOGOUT */ ISP_FC_OPMAP(0x0f, 0x0f), /* 0x72: MBOX_INIT_LIP_LOGIN */ ISP_FC_OPMAP(0x00, 0x00), /* 0x73: */ From owner-svn-src-all@freebsd.org Sun Nov 22 20:38:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45226A2E84F; Sun, 22 Nov 2015 20:38:52 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E93D019C9; Sun, 22 Nov 2015 20:38:51 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAMKcoUe066062; Sun, 22 Nov 2015 20:38:50 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAMKcoWk066061; Sun, 22 Nov 2015 20:38:50 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201511222038.tAMKcoWk066061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 22 Nov 2015 20:38:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291164 - head/sys/boot/uboot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2015 20:38:52 -0000 Author: ian Date: Sun Nov 22 20:38:50 2015 New Revision: 291164 URL: https://svnweb.freebsd.org/changeset/base/291164 Log: Print more detailed info about the disk and partition chosen for booting. No behavioral changes, just cosmetics. A partition number of zero is not a wildcard, it's the 'a' partition in a BSD slice, so don't print it as "". (Only slices are 1-based, unit and partition numbers are 0-based and -1 is their wildcard marker.) Also, after doing all the probing and choosing, print the final result as "Booting from " where disk spec has all the wildcards resolved and looks like familiar BSD slice-and-partition notation (disk0s3a, etc). Modified: head/sys/boot/uboot/common/main.c Modified: head/sys/boot/uboot/common/main.c ============================================================================== --- head/sys/boot/uboot/common/main.c Sun Nov 22 17:03:38 2015 (r291163) +++ head/sys/boot/uboot/common/main.c Sun Nov 22 20:38:50 2015 (r291164) @@ -315,7 +315,7 @@ print_disk_probe_info() else strcpy(slice, ""); - if (currdev.d_disk.partition > 0) + if (currdev.d_disk.partition >= 0) sprintf(partition, "%d", currdev.d_disk.partition); else strcpy(partition, ""); @@ -382,7 +382,7 @@ probe_disks(int devidx, int load_type, i printf("\n"); } - printf(" Requested disk type/unit not found\n"); + printf(" Requested disk type/unit/slice/partition not found\n"); return (-1); } @@ -392,7 +392,7 @@ main(void) struct api_signature *sig = NULL; int load_type, load_unit, load_slice, load_partition; int i; - const char * loaderdev; + const char *ldev; /* * If we can't find the magic signature and related info, exit with a @@ -485,10 +485,10 @@ main(void) return (0xbadef1ce); } - env_setenv("currdev", EV_VOLATILE, uboot_fmtdev(&currdev), - uboot_setcurrdev, env_nounset); - env_setenv("loaddev", EV_VOLATILE, uboot_fmtdev(&currdev), - env_noset, env_nounset); + ldev = uboot_fmtdev(&currdev); + env_setenv("currdev", EV_VOLATILE, ldev, uboot_setcurrdev, env_nounset); + env_setenv("loaddev", EV_VOLATILE, ldev, env_noset, env_nounset); + printf("Booting from %s %\n", ldev); setenv("LINES", "24", 1); /* optional */ setenv("prompt", "loader>", 1); From owner-svn-src-all@freebsd.org Sun Nov 22 23:07:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E626A33802; Sun, 22 Nov 2015 23:07:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BF2C1196; Sun, 22 Nov 2015 23:07:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAMN77NB020692; Sun, 22 Nov 2015 23:07:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAMN77qC020691; Sun, 22 Nov 2015 23:07:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511222307.tAMN77qC020691@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 22 Nov 2015 23:07:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291165 - head/sys/modules/ipoib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2015 23:07:08 -0000 Author: ngie Date: Sun Nov 22 23:07:07 2015 New Revision: 291165 URL: https://svnweb.freebsd.org/changeset/base/291165 Log: Don't explicitly set INET/INET6 in the Makefile; opt_inet.h and opt_inet6.h already do this MFC after: never (depends on kern.opts.mk; will not be MFCed probably) Modified: head/sys/modules/ipoib/Makefile Modified: head/sys/modules/ipoib/Makefile ============================================================================== --- head/sys/modules/ipoib/Makefile Sun Nov 22 20:38:50 2015 (r291164) +++ head/sys/modules/ipoib/Makefile Sun Nov 22 23:07:07 2015 (r291165) @@ -10,7 +10,6 @@ SRCS= device_if.h bus_if.h vnode_if.h pc CFLAGS+= -I${.CURDIR}/../../ofed/drivers/infiniband/ulp/ipoib CFLAGS+= -I${.CURDIR}/../../ofed/include CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include -CFLAGS+= -DINET6 -DINET .include From owner-svn-src-all@freebsd.org Sun Nov 22 23:15:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF7B1A339F3; Sun, 22 Nov 2015 23:15:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 823FB1598; Sun, 22 Nov 2015 23:15:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAMNFiYA023571; Sun, 22 Nov 2015 23:15:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAMNFiWl023570; Sun, 22 Nov 2015 23:15:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511222315.tAMNFiWl023570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 22 Nov 2015 23:15:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291166 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2015 23:15:45 -0000 Author: ngie Date: Sun Nov 22 23:15:44 2015 New Revision: 291166 URL: https://svnweb.freebsd.org/changeset/base/291166 Log: Recommend cc -Wall instead of gcc -Wall MFC after: 1 week Modified: head/share/man/man9/style.9 Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Sun Nov 22 23:07:07 2015 (r291165) +++ head/share/man/man9/style.9 Sun Nov 22 23:15:44 2015 (r291166) @@ -834,7 +834,7 @@ Whenever possible, code should be run th (e.g., .Xr lint 1 or -.Nm gcc Fl Wall ) +.Nm cc Fl Wall ) and produce minimal warnings. .Sh SEE ALSO .Xr indent 1 , From owner-svn-src-all@freebsd.org Sun Nov 22 23:16:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82DA2A33A53; Sun, 22 Nov 2015 23:16:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BC441809; Sun, 22 Nov 2015 23:16:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAMNGFiN023637; Sun, 22 Nov 2015 23:16:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAMNGFQc023636; Sun, 22 Nov 2015 23:16:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511222316.tAMNGFQc023636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 22 Nov 2015 23:16:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291167 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2015 23:16:16 -0000 Author: ngie Date: Sun Nov 22 23:16:15 2015 New Revision: 291167 URL: https://svnweb.freebsd.org/changeset/base/291167 Log: Bump .Dd Modified: head/share/man/man9/style.9 Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Sun Nov 22 23:15:44 2015 (r291166) +++ head/share/man/man9/style.9 Sun Nov 22 23:16:15 2015 (r291167) @@ -26,7 +26,7 @@ .\" From: @(#)style 1.14 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd July 6, 2015 +.Dd November 22, 2015 .Dt STYLE 9 .Os .Sh NAME From owner-svn-src-all@freebsd.org Mon Nov 23 00:39:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 722DBA35B86; Mon, 23 Nov 2015 00:39:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 402C21839; Mon, 23 Nov 2015 00:39:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAN0dmdo048688; Mon, 23 Nov 2015 00:39:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAN0dmHV048687; Mon, 23 Nov 2015 00:39:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511230039.tAN0dmHV048687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 00:39:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291168 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 00:39:49 -0000 Author: ngie Date: Mon Nov 23 00:39:48 2015 New Revision: 291168 URL: https://svnweb.freebsd.org/changeset/base/291168 Log: - Fix bad double space between HW and LRO - Fix improperly capitalized `interface` MFC after: 1 week Modified: head/share/man/man4/mlx5en.4 Modified: head/share/man/man4/mlx5en.4 ============================================================================== --- head/share/man/man4/mlx5en.4 Sun Nov 22 23:16:15 2015 (r291167) +++ head/share/man/man4/mlx5en.4 Mon Nov 23 00:39:48 2015 (r291168) @@ -53,10 +53,10 @@ driver provides support for PCI Express ConnectX-4 and ConnectX-4 LX. The driver supports Jumbo Frames, Transmit/Receive checksum offload, TCP segmentation offload (TSO), Large Receive Offload (LRO), -HW Large Receive Offload (HW LRO), VLAN tag insertion/extraction, +HW Large Receive Offload (HW LRO), VLAN tag insertion/extraction, VLAN checksum offload, VLAN TSO, and Receive Side Steering (RSS). .br -The network Interface is named mce. +The network interface is named mce. .br For further hardware information and questions related to hardware requirements, see From owner-svn-src-all@freebsd.org Mon Nov 23 00:40:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52764A35BDC; Mon, 23 Nov 2015 00:40:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B1BC199A; Mon, 23 Nov 2015 00:40:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAN0e9Ks048773; Mon, 23 Nov 2015 00:40:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAN0e9NY048772; Mon, 23 Nov 2015 00:40:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511230040.tAN0e9NY048772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 00:40:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291169 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 00:40:10 -0000 Author: ngie Date: Mon Nov 23 00:40:08 2015 New Revision: 291169 URL: https://svnweb.freebsd.org/changeset/base/291169 Log: Bump .Dd Modified: head/share/man/man4/mlx5en.4 Modified: head/share/man/man4/mlx5en.4 ============================================================================== --- head/share/man/man4/mlx5en.4 Mon Nov 23 00:39:48 2015 (r291168) +++ head/share/man/man4/mlx5en.4 Mon Nov 23 00:40:08 2015 (r291169) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 15, 2015 +.Dd November 22, 2015 .Dt mlx5en 4 .Os .Sh NAME From owner-svn-src-all@freebsd.org Mon Nov 23 00:43:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6DB0A35E04; Mon, 23 Nov 2015 00:43:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 900CC1EF9; Mon, 23 Nov 2015 00:43:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAN0hN2f051581; Mon, 23 Nov 2015 00:43:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAN0hNDY051580; Mon, 23 Nov 2015 00:43:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511230043.tAN0hNDY051580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 00:43:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291170 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 00:43:24 -0000 Author: ngie Date: Mon Nov 23 00:43:23 2015 New Revision: 291170 URL: https://svnweb.freebsd.org/changeset/base/291170 Log: Install mce(4) and mlx5en(4) if MK_OFED != no MFC after: 1 week Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Mon Nov 23 00:40:08 2015 (r291169) +++ head/share/man/man4/Makefile Mon Nov 23 00:43:23 2015 (r291170) @@ -274,7 +274,6 @@ MAN= aac.4 \ mk48txx.4 \ mld.4 \ mlx.4 \ - mlx5en.4 \ mly.4 \ mmc.4 \ mmcsd.4 \ @@ -653,7 +652,6 @@ MLINKS+=lp.4 plip.4 MLINKS+=malo.4 if_malo.4 MLINKS+=md.4 vn.4 MLINKS+=mem.4 kmem.4 -MLINKS+=mlx5en.4 mce.4 MLINKS+=mn.4 if_mn.4 MLINKS+=mos.4 if_mos.4 MLINKS+=msk.4 if_msk.4 @@ -853,6 +851,12 @@ MAN+= iscsi_initiator.4 .endif +.if ${MK_OFED} != "no" +MAN+= mlx5en.4 + +MLINKS+=mlx5en.4 mce.4 +.endif + .if ${MK_TESTS} != "no" ATF= ${.CURDIR}/../../../contrib/atf .PATH: ${ATF}/doc From owner-svn-src-all@freebsd.org Mon Nov 23 03:22:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 988C5A35724; Mon, 23 Nov 2015 03:22:58 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pa0-x22b.google.com (mail-pa0-x22b.google.com [IPv6:2607:f8b0:400e:c03::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6ED94175E; Mon, 23 Nov 2015 03:22:58 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by pabfh17 with SMTP id fh17so182373093pab.0; Sun, 22 Nov 2015 19:22:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=wYJNt7NdMGb3KqKsr+ebDQ4WYas68J2UPw0ku3RYBys=; b=b0hLQuyBLhwW/QRbWIQ0S4coGvTHQz8ibZ8zQE6EQh/JEwFYLtnH6AbZZU90dpE2cm JGSQ7krmBol6HFOQZD0C7FGfvhF7UEbT39W796jwP8aaDTLlFdgCL1o6Tl5AdB4yIKUS vWxNDxz22pzRha68GS0mtPeVUNMAA6tvqplFjXEjdp6QxChA1CootG/+VS7mvZIzIRxW mG48tm7JRdiR6W7x0Tp8ru39qlQhFiIoPJaXgPJwXCB28YtSCXlOpSAmabMzDfHTaFIQ vhky7u3eVRjWL5nijYdWLV7i2D05bm4WxKxqht/fvNvAWKNuNOnnNbhW/jL6a0xFJSTI LDoA== X-Received: by 10.98.67.68 with SMTP id q65mr13344019pfa.63.1448248977985; Sun, 22 Nov 2015 19:22:57 -0800 (PST) Received: from raichu ([104.232.114.184]) by smtp.gmail.com with ESMTPSA id ef5sm8139468pbc.46.2015.11.22.19.22.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Nov 2015 19:22:57 -0800 (PST) Sender: Mark Johnston Date: Sun, 22 Nov 2015 19:22:53 -0800 From: Mark Johnston To: Svatopluk Kraus Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291142 - in head/sys: arm/arm arm64/arm64 mips/mips powerpc/powerpc x86/x86 Message-ID: <20151123032253.GA2084@raichu> References: <201511211955.tALJt18a052565@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201511211955.tALJt18a052565@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 03:22:58 -0000 On Sat, Nov 21, 2015 at 07:55:01PM +0000, Svatopluk Kraus wrote: > Author: skra > Date: Sat Nov 21 19:55:01 2015 > New Revision: 291142 > URL: https://svnweb.freebsd.org/changeset/base/291142 > > Log: > Fix BUS_DMA_MIN_ALLOC_COMP flag logic. When bus_dmamap_t map is being > created for bus_dma_tag_t tag, bounce pages should be allocated > only if needed. > > Before the fix, they were allocated always if BUS_DMA_COULD_BOUNCE flag > was set but BUS_DMA_MIN_ALLOC_COMP not. As bounce pages are never freed, > it could cause memory exhaustion when a lot of such tags together with > their maps were created. > > Note that there could be more maps in one tag by current design. > However BUS_DMA_MIN_ALLOC_COMP flag is tag's flag. It's set after > bounce pages are allocated. Thus, they are allocated only for first > tag's map which needs them. This appears to cause a hang with one of the re(4) interfaces in my workstation. I can use it to start an ssh session, but it quickly hits a point where it stops transmitting or receiving packets, and I need to reboot the system to recover. Interestingly, the other re(4) interface in this system works fine, but it drives a different card: working: re0@pci0:3:0:0: class=0x020000 card=0x85051043 chip=0x816810ec rev=0x09 hdr=0x00 vendor = 'Realtek Semiconductor Co., Ltd.' device = 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller' class = network subclass = ethernet non-working: re1@pci0:5:0:0: class=0x020000 card=0x816910ec chip=0x816910ec rev=0x10 hdr=0x00 vendor = 'Realtek Semiconductor Co., Ltd.' device = 'RTL8169 PCI Gigabit Ethernet Controller' class = network subclass = ethernet From owner-svn-src-all@freebsd.org Mon Nov 23 04:48:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16A20A353B5 for ; Mon, 23 Nov 2015 04:48:35 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from erouter6.ore.mailhop.org (erouter6.ore.mailhop.org [54.187.213.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7833104D for ; Mon, 23 Nov 2015 04:48:34 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound3.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Mon, 23 Nov 2015 04:46:47 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id tAN4lOcD006198; Sun, 22 Nov 2015 21:47:24 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1448254044.1398.22.camel@freebsd.org> Subject: Re: svn commit: r291142 - in head/sys: arm/arm arm64/arm64 mips/mips powerpc/powerpc x86/x86 From: Ian Lepore To: Mark Johnston , Svatopluk Kraus Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 22 Nov 2015 21:47:24 -0700 In-Reply-To: <20151123032253.GA2084@raichu> References: <201511211955.tALJt18a052565@repo.freebsd.org> <20151123032253.GA2084@raichu> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 04:48:35 -0000 On Sun, 2015-11-22 at 19:22 -0800, Mark Johnston wrote: > On Sat, Nov 21, 2015 at 07:55:01PM +0000, Svatopluk Kraus wrote: > > Author: skra > > Date: Sat Nov 21 19:55:01 2015 > > New Revision: 291142 > > URL: https://svnweb.freebsd.org/changeset/base/291142 > > > > Log: > > Fix BUS_DMA_MIN_ALLOC_COMP flag logic. When bus_dmamap_t map is > > being > > created for bus_dma_tag_t tag, bounce pages should be allocated > > only if needed. > > > > Before the fix, they were allocated always if > > BUS_DMA_COULD_BOUNCE flag > > was set but BUS_DMA_MIN_ALLOC_COMP not. As bounce pages are never > > freed, > > it could cause memory exhaustion when a lot of such tags together > > with > > their maps were created. > > > > Note that there could be more maps in one tag by current design. > > However BUS_DMA_MIN_ALLOC_COMP flag is tag's flag. It's set after > > bounce pages are allocated. Thus, they are allocated only for > > first > > tag's map which needs them. > > This appears to cause a hang with one of the re(4) interfaces in my > workstation. I can use it to start an ssh session, but it quickly > hits a > point where it stops transmitting or receiving packets, and I need to > reboot the system to recover. Interestingly, the other re(4) > interface > in this system works fine, but it drives a different card: > > working: > re0@pci0:3:0:0: class=0x020000 card=0x85051043 chip=0x816810ec > rev=0x09 hdr=0x00 > vendor = 'Realtek Semiconductor Co., Ltd.' > device = 'RTL8111/8168/8411 PCI Express Gigabit Ethernet > Controller' > class = network > subclass = ethernet > > non-working: > re1@pci0:5:0:0: class=0x020000 card=0x816910ec chip=0x816910ec > rev=0x10 hdr=0x00 > vendor = 'Realtek Semiconductor Co., Ltd.' > device = 'RTL8169 PCI Gigabit Ethernet Controller' > class = network > subclass = ethernet > With the old logic (which I'm no great defender of beyond "it worked"), with every map added to a tag, some extra bounce pages would be added to the tag's bounce zone to account for the new map's needs, up to some arbitrary #define'd limit. With the new logic, it appears that pages will only be added to a bounce zone one time for each tag, either when the tag is created or when the first map for the tag is created. After that no more bounce pages are ever added no matter how many more maps are created for that tag. So a network driver that creates 1024 maps off a single tag may have to bounce every single one of those transfers due to alignment but may have only enough resources to bounce one transfer at a time. More likely it will have enough to do several mappings at a time, because usually there's only one bounce zone being used by all tags and maps, so extra pages will get added for other tags that will never bounce, and they'll get consumed by a driver that does need to bounce. I would especially expect trouble on ARM where many many mappings need to bounce due to alignment (but I haven't actually had any trouble since this change went in). -- Ian From owner-svn-src-all@freebsd.org Mon Nov 23 06:02:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2775CA35FB5; Mon, 23 Nov 2015 06:02:23 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22d.google.com (mail-ig0-x22d.google.com [IPv6:2607:f8b0:4001:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E49E319CB; Mon, 23 Nov 2015 06:02:22 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igcph11 with SMTP id ph11so45006935igc.1; Sun, 22 Nov 2015 22:02:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=5BSSHIxBFmUIguFJBughHXfSs378QTluyA/Yv0josPk=; b=lPays9Ec3UYbTD/mVUS0PVfrNf6cn1RZfz1H6fVKMNkjdUiVVlUS8ljzEZJMwrjcZc 7amKbjLemKL3zb9ZypTVsbKl2aX1kfhHeVZyFaB1jEZOOoxcD+BZXTgj4/m+drXtkKnX 27qGk9pdn+rCrqAmEwDU/vtpnbOl8xAL5ExXB/REC2AKqU/CMc4n2a2MWkDg4c/m0B2b jaVYVGTtTioP4HWeAwui9wuBY48XauuQF8L+vjcjLlEjJK84g/yMIFkzVYqiFVvHgdy0 M2UTGJ9ZBLSSamrseUy9GBBAFph7U22zoociCT0MT/4a904sb2lN/QKH5Ker1HOrrXLv XeYg== MIME-Version: 1.0 X-Received: by 10.50.73.228 with SMTP id o4mr10866516igv.37.1448258542204; Sun, 22 Nov 2015 22:02:22 -0800 (PST) Received: by 10.36.217.196 with HTTP; Sun, 22 Nov 2015 22:02:22 -0800 (PST) In-Reply-To: <1448254044.1398.22.camel@freebsd.org> References: <201511211955.tALJt18a052565@repo.freebsd.org> <20151123032253.GA2084@raichu> <1448254044.1398.22.camel@freebsd.org> Date: Sun, 22 Nov 2015 22:02:22 -0800 Message-ID: Subject: Re: svn commit: r291142 - in head/sys: arm/arm arm64/arm64 mips/mips powerpc/powerpc x86/x86 From: Adrian Chadd To: Ian Lepore Cc: Mark Johnston , Svatopluk Kraus , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 06:02:23 -0000 On 22 November 2015 at 20:47, Ian Lepore wrote: > On Sun, 2015-11-22 at 19:22 -0800, Mark Johnston wrote: >> On Sat, Nov 21, 2015 at 07:55:01PM +0000, Svatopluk Kraus wrote: >> > Author: skra >> > Date: Sat Nov 21 19:55:01 2015 >> > New Revision: 291142 >> > URL: https://svnweb.freebsd.org/changeset/base/291142 >> > >> > Log: >> > Fix BUS_DMA_MIN_ALLOC_COMP flag logic. When bus_dmamap_t map is >> > being >> > created for bus_dma_tag_t tag, bounce pages should be allocated >> > only if needed. >> > >> > Before the fix, they were allocated always if >> > BUS_DMA_COULD_BOUNCE flag >> > was set but BUS_DMA_MIN_ALLOC_COMP not. As bounce pages are never >> > freed, >> > it could cause memory exhaustion when a lot of such tags together >> > with >> > their maps were created. >> > >> > Note that there could be more maps in one tag by current design. >> > However BUS_DMA_MIN_ALLOC_COMP flag is tag's flag. It's set after >> > bounce pages are allocated. Thus, they are allocated only for >> > first >> > tag's map which needs them. >> >> This appears to cause a hang with one of the re(4) interfaces in my >> workstation. I can use it to start an ssh session, but it quickly >> hits a >> point where it stops transmitting or receiving packets, and I need to >> reboot the system to recover. Interestingly, the other re(4) >> interface >> in this system works fine, but it drives a different card: >> >> working: >> re0@pci0:3:0:0: class=0x020000 card=0x85051043 chip=0x816810ec >> rev=0x09 hdr=0x00 >> vendor = 'Realtek Semiconductor Co., Ltd.' >> device = 'RTL8111/8168/8411 PCI Express Gigabit Ethernet >> Controller' >> class = network >> subclass = ethernet >> >> non-working: >> re1@pci0:5:0:0: class=0x020000 card=0x816910ec chip=0x816910ec >> rev=0x10 hdr=0x00 >> vendor = 'Realtek Semiconductor Co., Ltd.' >> device = 'RTL8169 PCI Gigabit Ethernet Controller' >> class = network >> subclass = ethernet >> > > With the old logic (which I'm no great defender of beyond "it worked"), > with every map added to a tag, some extra bounce pages would be added > to the tag's bounce zone to account for the new map's needs, up to some > arbitrary #define'd limit. > > With the new logic, it appears that pages will only be added to a > bounce zone one time for each tag, either when the tag is created or > when the first map for the tag is created. After that no more bounce > pages are ever added no matter how many more maps are created for that > tag. So a network driver that creates 1024 maps off a single tag may > have to bounce every single one of those transfers due to alignment but > may have only enough resources to bounce one transfer at a time. > > More likely it will have enough to do several mappings at a time, > because usually there's only one bounce zone being used by all tags and > maps, so extra pages will get added for other tags that will never > bounce, and they'll get consumed by a driver that does need to bounce. > > I would especially expect trouble on ARM where many many mappings need > to bounce due to alignment (but I haven't actually had any trouble > since this change went in). ... uhm, shall we revert this then? This seems very risky. -adrian From owner-svn-src-all@freebsd.org Mon Nov 23 07:09:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52E40A35BE9; Mon, 23 Nov 2015 07:09:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 200071300; Mon, 23 Nov 2015 07:09:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAN79a1B062234; Mon, 23 Nov 2015 07:09:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAN79Z4L062228; Mon, 23 Nov 2015 07:09:35 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511230709.tAN79Z4L062228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 23 Nov 2015 07:09:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291171 - in head/sys: amd64/amd64 compat/ia32 i386/i386 kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 07:09:37 -0000 Author: kib Date: Mon Nov 23 07:09:35 2015 New Revision: 291171 URL: https://svnweb.freebsd.org/changeset/base/291171 Log: Split kerne timekeep ABI structure vdso_sv_tk out of the struct sysentvec. This allows the timekeep data to be shared between similar ABIs which cannot share sysentvec. Make the timekeep_push_vdso() tick callback to the timekeep structures instead of sysentvecs. If several sysentvec share the vdso_sv_tk structure, we would update the userspace data several times on each tick, without the change. Only allocate vdso_sv_tk in the exec_sysvec_init() sysinit when sysentvec is marked with the new SV_TIMEKEEP flag. This saves allocation and update of unneeded vdso_sv_tk for ABIs which do not provide userspace gettimeofday yet, which are PowerPCs arches right now. Make vdso_sv_tk allocator public, namely split out and export alloc_sv_tk() and alloc_sv_tk_compat32(). ABIs which share timekeep data now can allocate it manually and share as appropriate. Requested by: nwhitehorn Tested by: nwhitehorn, pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/amd64/amd64/elf_machdep.c head/sys/compat/ia32/ia32_sysvec.c head/sys/i386/i386/elf_machdep.c head/sys/kern/kern_sharedpage.c head/sys/sys/sysent.h head/sys/sys/vdso.h Modified: head/sys/amd64/amd64/elf_machdep.c ============================================================================== --- head/sys/amd64/amd64/elf_machdep.c Mon Nov 23 00:43:23 2015 (r291170) +++ head/sys/amd64/amd64/elf_machdep.c Mon Nov 23 07:09:35 2015 (r291171) @@ -75,7 +75,7 @@ struct sysentvec elf64_freebsd_sysvec = .sv_setregs = exec_setregs, .sv_fixlimit = NULL, .sv_maxssiz = NULL, - .sv_flags = SV_ABI_FREEBSD | SV_LP64 | SV_SHP, + .sv_flags = SV_ABI_FREEBSD | SV_LP64 | SV_SHP | SV_TIMEKEEP, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, Modified: head/sys/compat/ia32/ia32_sysvec.c ============================================================================== --- head/sys/compat/ia32/ia32_sysvec.c Mon Nov 23 00:43:23 2015 (r291170) +++ head/sys/compat/ia32/ia32_sysvec.c Mon Nov 23 07:09:35 2015 (r291171) @@ -125,7 +125,7 @@ struct sysentvec ia32_freebsd_sysvec = { .sv_maxssiz = &ia32_maxssiz, .sv_flags = SV_ABI_FREEBSD | SV_IA32 | SV_ILP32 | #ifdef __amd64__ - SV_SHP + SV_SHP | SV_TIMEKEEP #else 0 #endif Modified: head/sys/i386/i386/elf_machdep.c ============================================================================== --- head/sys/i386/i386/elf_machdep.c Mon Nov 23 00:43:23 2015 (r291170) +++ head/sys/i386/i386/elf_machdep.c Mon Nov 23 07:09:35 2015 (r291171) @@ -81,7 +81,8 @@ struct sysentvec elf32_freebsd_sysvec = .sv_setregs = exec_setregs, .sv_fixlimit = NULL, .sv_maxssiz = NULL, - .sv_flags = SV_ABI_FREEBSD | SV_IA32 | SV_ILP32 | SV_SHP, + .sv_flags = SV_ABI_FREEBSD | SV_IA32 | SV_ILP32 | SV_SHP | + SV_TIMEKEEP, .sv_set_syscall_retval = cpu_set_syscall_retval, .sv_fetch_syscall_args = cpu_fetch_syscall_args, .sv_syscallnames = syscallnames, Modified: head/sys/kern/kern_sharedpage.c ============================================================================== --- head/sys/kern/kern_sharedpage.c Mon Nov 23 00:43:23 2015 (r291170) +++ head/sys/kern/kern_sharedpage.c Mon Nov 23 07:09:35 2015 (r291171) @@ -1,7 +1,11 @@ /*- * Copyright (c) 2010, 2012 Konstantin Belousov + * Copyright (c) 2015 The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -34,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -127,7 +132,7 @@ SYSINIT(shp, SI_SUB_EXEC, SI_ORDER_FIRST * calls us after the timehands are updated). */ static void -timehands_update(struct sysentvec *sv) +timehands_update(struct vdso_sv_tk *svtk) { struct vdso_timehands th; struct vdso_timekeep *tk; @@ -135,20 +140,20 @@ timehands_update(struct sysentvec *sv) enabled = tc_fill_vdso_timehands(&th); th.th_gen = 0; - idx = sv->sv_timekeep_curr; + idx = svtk->sv_timekeep_curr; if (++idx >= VDSO_TH_NUM) idx = 0; - sv->sv_timekeep_curr = idx; - if (++sv->sv_timekeep_gen == 0) - sv->sv_timekeep_gen = 1; + svtk->sv_timekeep_curr = idx; + if (++svtk->sv_timekeep_gen == 0) + svtk->sv_timekeep_gen = 1; tk = (struct vdso_timekeep *)(shared_page_mapping + - sv->sv_timekeep_off); + svtk->sv_timekeep_off); tk->tk_th[idx].th_gen = 0; atomic_thread_fence_rel(); if (enabled) tk->tk_th[idx] = th; - atomic_store_rel_32(&tk->tk_th[idx].th_gen, sv->sv_timekeep_gen); + atomic_store_rel_32(&tk->tk_th[idx].th_gen, svtk->sv_timekeep_gen); atomic_store_rel_32(&tk->tk_current, idx); /* @@ -160,7 +165,7 @@ timehands_update(struct sysentvec *sv) #ifdef COMPAT_FREEBSD32 static void -timehands_update32(struct sysentvec *sv) +timehands_update32(struct vdso_sv_tk *svtk) { struct vdso_timehands32 th; struct vdso_timekeep32 *tk; @@ -168,20 +173,20 @@ timehands_update32(struct sysentvec *sv) enabled = tc_fill_vdso_timehands32(&th); th.th_gen = 0; - idx = sv->sv_timekeep_curr; + idx = svtk->sv_timekeep_curr; if (++idx >= VDSO_TH_NUM) idx = 0; - sv->sv_timekeep_curr = idx; - if (++sv->sv_timekeep_gen == 0) - sv->sv_timekeep_gen = 1; + svtk->sv_timekeep_curr = idx; + if (++svtk->sv_timekeep_gen == 0) + svtk->sv_timekeep_gen = 1; tk = (struct vdso_timekeep32 *)(shared_page_mapping + - sv->sv_timekeep_off); + svtk->sv_timekeep_off); tk->tk_th[idx].th_gen = 0; atomic_thread_fence_rel(); if (enabled) tk->tk_th[idx] = th; - atomic_store_rel_32(&tk->tk_th[idx].th_gen, sv->sv_timekeep_gen); + atomic_store_rel_32(&tk->tk_th[idx].th_gen, svtk->sv_timekeep_gen); atomic_store_rel_32(&tk->tk_current, idx); tk->tk_enabled = enabled; } @@ -192,33 +197,69 @@ timehands_update32(struct sysentvec *sv) * that needs to be iterated over from the hardclock interrupt * context. */ -static struct sysentvec *host_sysentvec; +static struct vdso_sv_tk *host_svtk; #ifdef COMPAT_FREEBSD32 -static struct sysentvec *compat32_sysentvec; +static struct vdso_sv_tk *compat32_svtk; #endif void timekeep_push_vdso(void) { - if (host_sysentvec != NULL && host_sysentvec->sv_timekeep_base != 0) - timehands_update(host_sysentvec); + if (host_svtk != NULL) + timehands_update(host_svtk); #ifdef COMPAT_FREEBSD32 - if (compat32_sysentvec != NULL && - compat32_sysentvec->sv_timekeep_base != 0) - timehands_update32(compat32_sysentvec); + if (compat32_svtk != NULL) + timehands_update32(compat32_svtk); #endif } +struct vdso_sv_tk * +alloc_sv_tk(void) +{ + struct vdso_sv_tk *svtk; + int tk_base; + uint32_t tk_ver; + + tk_ver = VDSO_TK_VER_CURR; + svtk = malloc(sizeof(struct vdso_sv_tk), M_TEMP, M_WAITOK | M_ZERO); + tk_base = shared_page_alloc(sizeof(struct vdso_timekeep) + + sizeof(struct vdso_timehands) * VDSO_TH_NUM, 16); + KASSERT(tk_base != -1, ("tk_base -1 for native")); + shared_page_write(tk_base + offsetof(struct vdso_timekeep, tk_ver), + sizeof(uint32_t), &tk_ver); + svtk->sv_timekeep_off = tk_base; + timekeep_push_vdso(); + return (svtk); +} + +#ifdef COMPAT_FREEBSD32 +struct vdso_sv_tk * +alloc_sv_tk_compat32(void) +{ + struct vdso_sv_tk *svtk; + int tk_base; + uint32_t tk_ver; + + svtk = malloc(sizeof(struct vdso_sv_tk), M_TEMP, M_WAITOK | M_ZERO); + tk_ver = VDSO_TK_VER_CURR; + tk_base = shared_page_alloc(sizeof(struct vdso_timekeep32) + + sizeof(struct vdso_timehands32) * VDSO_TH_NUM, 16); + KASSERT(tk_base != -1, ("tk_base -1 for 32bit")); + shared_page_write(tk_base + offsetof(struct vdso_timekeep32, + tk_ver), sizeof(uint32_t), &tk_ver); + svtk->sv_timekeep_off = tk_base; + timekeep_push_vdso(); + return (svtk); +} +#endif + void exec_sysvec_init(void *param) { struct sysentvec *sv; - int tk_base; - uint32_t tk_ver; sv = (struct sysentvec *)param; - if ((sv->sv_flags & SV_SHP) == 0) return; sv->sv_shared_page_obj = shared_page_obj; @@ -226,30 +267,22 @@ exec_sysvec_init(void *param) shared_page_fill(*(sv->sv_szsigcode), 16, sv->sv_sigcode); if ((sv->sv_flags & SV_ABI_MASK) != SV_ABI_FREEBSD) return; - tk_ver = VDSO_TK_VER_CURR; + if ((sv->sv_flags & SV_TIMEKEEP) != 0) { #ifdef COMPAT_FREEBSD32 - if ((sv->sv_flags & SV_ILP32) != 0) { - tk_base = shared_page_alloc(sizeof(struct vdso_timekeep32) + - sizeof(struct vdso_timehands32) * VDSO_TH_NUM, 16); - KASSERT(tk_base != -1, ("tk_base -1 for 32bit")); - shared_page_write(tk_base + offsetof(struct vdso_timekeep32, - tk_ver), sizeof(uint32_t), &tk_ver); - KASSERT(compat32_sysentvec == 0, - ("Native compat32 already registered")); - compat32_sysentvec = sv; - } else { -#endif - tk_base = shared_page_alloc(sizeof(struct vdso_timekeep) + - sizeof(struct vdso_timehands) * VDSO_TH_NUM, 16); - KASSERT(tk_base != -1, ("tk_base -1 for native")); - shared_page_write(tk_base + offsetof(struct vdso_timekeep, - tk_ver), sizeof(uint32_t), &tk_ver); - KASSERT(host_sysentvec == 0, ("Native already registered")); - host_sysentvec = sv; + if ((sv->sv_flags & SV_ILP32) != 0) { + KASSERT(compat32_svtk == NULL, + ("Compat32 already registered")); + compat32_svtk = alloc_sv_tk_compat32(); + sv->sv_timekeep_base = sv->sv_shared_page_base + + compat32_svtk->sv_timekeep_off; + } else { +#endif + KASSERT(host_svtk == NULL, ("Host already registered")); + host_svtk = alloc_sv_tk(); + sv->sv_timekeep_base = sv->sv_shared_page_base + + host_svtk->sv_timekeep_off; #ifdef COMPAT_FREEBSD32 - } + } #endif - sv->sv_timekeep_base = sv->sv_shared_page_base + tk_base; - sv->sv_timekeep_off = tk_base; - timekeep_push_vdso(); + } } Modified: head/sys/sys/sysent.h ============================================================================== --- head/sys/sys/sysent.h Mon Nov 23 00:43:23 2015 (r291170) +++ head/sys/sys/sysent.h Mon Nov 23 07:09:35 2015 (r291171) @@ -127,13 +127,10 @@ struct sysentvec { int (*sv_fetch_syscall_args)(struct thread *, struct syscall_args *); const char **sv_syscallnames; + vm_offset_t sv_timekeep_base; vm_offset_t sv_shared_page_base; vm_offset_t sv_shared_page_len; vm_offset_t sv_sigcode_base; - vm_offset_t sv_timekeep_base; - int sv_timekeep_off; - int sv_timekeep_curr; - uint32_t sv_timekeep_gen; void *sv_shared_page_obj; void (*sv_schedtail)(struct thread *); void (*sv_thread_detach)(struct thread *); @@ -145,6 +142,7 @@ struct sysentvec { #define SV_AOUT 0x008000 /* a.out executable. */ #define SV_SHP 0x010000 /* Shared page. */ #define SV_CAPSICUM 0x020000 /* Force cap_enter() on startup. */ +#define SV_TIMEKEEP 0x040000 #define SV_ABI_MASK 0xff #define SV_PROC_FLAG(p, x) ((p)->p_sysent->sv_flags & (x)) @@ -274,6 +272,7 @@ int shared_page_alloc(int size, int alig int shared_page_fill(int size, int align, const void *data); void shared_page_write(int base, int size, const void *data); void exec_sysvec_init(void *param); +void exec_inittk(void); #define INIT_SYSENTVEC(name, sv) \ SYSINIT(name, SI_SUB_EXEC, SI_ORDER_ANY, \ Modified: head/sys/sys/vdso.h ============================================================================== --- head/sys/sys/vdso.h Mon Nov 23 00:43:23 2015 (r291170) +++ head/sys/sys/vdso.h Mon Nov 23 07:09:35 2015 (r291171) @@ -71,6 +71,12 @@ int __vdso_gettimekeep(struct vdso_timek struct timecounter; +struct vdso_sv_tk { + int sv_timekeep_off; + int sv_timekeep_curr; + uint32_t sv_timekeep_gen; +}; + void timekeep_push_vdso(void); uint32_t tc_fill_vdso_timehands(struct vdso_timehands *vdso_th); @@ -86,6 +92,8 @@ uint32_t tc_fill_vdso_timehands(struct v uint32_t cpu_fill_vdso_timehands(struct vdso_timehands *vdso_th, struct timecounter *tc); +struct vdso_sv_tk *alloc_sv_tk(void); + #define VDSO_TH_NUM 4 #ifdef COMPAT_FREEBSD32 @@ -115,6 +123,7 @@ struct vdso_timekeep32 { uint32_t tc_fill_vdso_timehands32(struct vdso_timehands32 *vdso_th32); uint32_t cpu_fill_vdso_timehands32(struct vdso_timehands32 *vdso_th32, struct timecounter *tc); +struct vdso_sv_tk *alloc_sv_tk_compat32(void); #endif #endif From owner-svn-src-all@freebsd.org Mon Nov 23 07:57:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FB20A3554E; Mon, 23 Nov 2015 07:57:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 477E71447; Mon, 23 Nov 2015 07:57:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAN7vf34076468; Mon, 23 Nov 2015 07:57:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAN7vf8N076467; Mon, 23 Nov 2015 07:57:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511230757.tAN7vf8N076467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 07:57:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291172 - head/lib/libc/tests/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 07:57:42 -0000 Author: ngie Date: Mon Nov 23 07:57:41 2015 New Revision: 291172 URL: https://svnweb.freebsd.org/changeset/base/291172 Log: Use __MAKE_SHELL instead of HOST_SHELL when generating aton_ether_subr.c (HOST_SHELL is used in NetBSD) This fixes permission denied issues when gen_ether_subr is not executable MFC after: 3 days Reported by: José Pérez Suggested by: bdrewery, sjg Modified: head/lib/libc/tests/net/Makefile Modified: head/lib/libc/tests/net/Makefile ============================================================================== --- head/lib/libc/tests/net/Makefile Mon Nov 23 07:09:35 2015 (r291171) +++ head/lib/libc/tests/net/Makefile Mon Nov 23 07:57:41 2015 (r291172) @@ -28,7 +28,7 @@ LDADD.h_nsd_recurse+= -lpthread CLEANFILES+= aton_ether_subr.c aton_ether_subr.c: gen_ether_subr ${SRCTOP}/sys/net/if_ethersubr.c - ${HOST_SH} ${.ALLSRC} ${.TARGET} + ${__MAKE_SHELL} ${.ALLSRC} ${.TARGET} .include "../Makefile.netbsd-tests" From owner-svn-src-all@freebsd.org Mon Nov 23 08:17:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5DFAA35AEB; Mon, 23 Nov 2015 08:17:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C25C1F0A; Mon, 23 Nov 2015 08:17:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAN8HWrY082303; Mon, 23 Nov 2015 08:17:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAN8HWQY082301; Mon, 23 Nov 2015 08:17:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511230817.tAN8HWQY082301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 08:17: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: r291173 - in stable/10: etc/mtree tests/sys/kern tests/sys/kern/acct tools/regression/acct X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 08:17:33 -0000 Author: ngie Date: Mon Nov 23 08:17:32 2015 New Revision: 291173 URL: https://svnweb.freebsd.org/changeset/base/291173 Log: MFC r290905,r290922: r290905: Integrate acct(2) testcase in as tests/sys/kern/acct/acct_test The :encode_tv_random_million testcase fails the epsilon tests a few thousand times out of one million, so expect the testcase to fail Submitted by: keramida Sponsored by: EMC / Isilon Storage Division r290922: Remove directory made obsolete by r290905 X-MFC note: stable/10 only Sponsored by: EMC / Isilon Storage Division Added: stable/10/tests/sys/kern/acct/ - copied from r290905, head/tests/sys/kern/acct/ Deleted: stable/10/tools/regression/acct/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/tests/sys/kern/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Mon Nov 23 07:57:41 2015 (r291172) +++ stable/10/etc/mtree/BSD.tests.dist Mon Nov 23 08:17:32 2015 (r291173) @@ -197,6 +197,8 @@ file .. kern + acct + .. execve .. .. Modified: stable/10/tests/sys/kern/Makefile ============================================================================== --- stable/10/tests/sys/kern/Makefile Mon Nov 23 07:57:41 2015 (r291172) +++ stable/10/tests/sys/kern/Makefile Mon Nov 23 08:17:32 2015 (r291173) @@ -12,6 +12,7 @@ LDADD.unix_seqpacket_test+= -lpthread WARNS?= 5 +TESTS_SUBDIRS+= acct TESTS_SUBDIRS+= execve .include From owner-svn-src-all@freebsd.org Mon Nov 23 08:18:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE5A3A35B67; Mon, 23 Nov 2015 08:18:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95A691072; Mon, 23 Nov 2015 08:18:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAN8IqMx082407; Mon, 23 Nov 2015 08:18:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAN8IqWT082406; Mon, 23 Nov 2015 08:18:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511230818.tAN8IqWT082406@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 08:18:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291174 - stable/10/contrib/netbsd-tests/lib/libcrypt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 08:18:53 -0000 Author: ngie Date: Mon Nov 23 08:18:52 2015 New Revision: 291174 URL: https://svnweb.freebsd.org/changeset/base/291174 Log: MFC r290907: Expect all testcases dealing with invalid salts to fail on FreeBSD Sponsored by: EMC / Isilon Storage Division Modified: stable/10/contrib/netbsd-tests/lib/libcrypt/t_crypt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libcrypt/t_crypt.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libcrypt/t_crypt.c Mon Nov 23 08:17:32 2015 (r291173) +++ stable/10/contrib/netbsd-tests/lib/libcrypt/t_crypt.c Mon Nov 23 08:18:52 2015 (r291174) @@ -124,6 +124,10 @@ ATF_TC_HEAD(crypt_salts, tc) ATF_TC_BODY(crypt_salts, tc) { for (size_t i = 0; tests[i].hash; i++) { +#if defined(__FreeBSD__) + if (22 <= i) + atf_tc_expect_fail("Old-style/bad inputs fail on FreeBSD"); +#endif char *hash = crypt(tests[i].pw, tests[i].hash); if (!hash) { ATF_CHECK_MSG(0, "Test %zu NULL\n", i); From owner-svn-src-all@freebsd.org Mon Nov 23 08:22:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA50FA35CE9; Mon, 23 Nov 2015 08:22:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F5B114CB; Mon, 23 Nov 2015 08:22:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAN8MeWa085082; Mon, 23 Nov 2015 08:22:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAN8Mea1085077; Mon, 23 Nov 2015 08:22:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511230822.tAN8Mea1085077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 08:22: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: r291175 - in stable/10: lib/libc/tests/net tools/regression/lib/libc/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 08:22:41 -0000 Author: ngie Date: Mon Nov 23 08:22:40 2015 New Revision: 291175 URL: https://svnweb.freebsd.org/changeset/base/291175 Log: MFC r290563,r290868,r291038: r290563: Integrate tools/regression/lib/libc/net into the FreeBSD test suite as lib/libc/tests/net Also, fix eui64_aton_test:test_str(..). The test was comparing the result of eui64_aton to a pointer of the expected result. Sponsored by: EMC / Isilon Storage Division r290868: Fix -Wformat issues Reported by: gcc Sponsored by: EMC / Isilon Storage Division r291038: Do not print out errno if the call succeeded unexpectedly; this was a mistake made in r290868 Reported by: jilles Sponsored by: EMC / Isilon Storage Division Added: stable/10/lib/libc/tests/net/ether_test.c - copied, changed from r290563, head/lib/libc/tests/net/ether_test.c stable/10/lib/libc/tests/net/eui64_aton_test.c - copied unchanged from r290563, head/lib/libc/tests/net/eui64_aton_test.c stable/10/lib/libc/tests/net/eui64_ntoa_test.c - copied unchanged from r290563, head/lib/libc/tests/net/eui64_ntoa_test.c stable/10/lib/libc/tests/net/test-eui64.h - copied unchanged from r290563, head/lib/libc/tests/net/test-eui64.h Deleted: stable/10/tools/regression/lib/libc/net/ Modified: stable/10/lib/libc/tests/net/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/net/Makefile ============================================================================== --- stable/10/lib/libc/tests/net/Makefile Mon Nov 23 08:18:52 2015 (r291174) +++ stable/10/lib/libc/tests/net/Makefile Mon Nov 23 08:22:40 2015 (r291175) @@ -1,24 +1,25 @@ # $FreeBSD$ -.include - TESTSDIR= ${TESTSBASE}/lib/libc/net -BINDIR= ${TESTSDIR} +ATF_TESTS_C+= ether_test +ATF_TESTS_C+= eui64_aton_test +ATF_TESTS_C+= eui64_ntoa_test -NETBSD_ATF_TESTS_C= getprotoent_test -NETBSD_ATF_TESTS_C+= ether_aton_test +CFLAGS+= -I${.CURDIR} -SRCS.t_ether_aton= aton_ether_subr.c t_ether_aton.c +NETBSD_ATF_TESTS_C+= getprotoent_test +NETBSD_ATF_TESTS_C+= ether_aton_test -aton_ether_subr.c: gen_ether_subr ${.CURDIR:H:H:H:H}/sys/net/if_ethersubr.c - ${HOST_SH} ${.ALLSRC} ${.TARGET} +SRCS.ether_aton_test= aton_ether_subr.c t_ether_aton.c # TODO: hostent_test NETBSD_ATF_TESTS_SH= nsdispatch_test NETBSD_ATF_TESTS_SH+= protoent_test NETBSD_ATF_TESTS_SH+= servent_test +BINDIR= ${TESTSDIR} + PROGS= h_nsd_recurse PROGS+= h_protoent PROGS+= h_servent @@ -28,12 +29,14 @@ DPADD.h_nsd_recurse+= ${LIBPTHREAD} LDADD.h_nsd_recurse+= -lpthread CLEANFILES+= aton_ether_subr.c +aton_ether_subr.c: gen_ether_subr ${SRCTOP}/sys/net/if_ethersubr.c + ${HOST_SH} ${.ALLSRC} ${.TARGET} .include "../Makefile.netbsd-tests" # TODO: the testcases needs to be ported to FreeBSD #TESTS_SUBDIRS= getaddrinfo -FILES= hosts +FILES+= hosts FILES+= resolv.conf .include Copied and modified: stable/10/lib/libc/tests/net/ether_test.c (from r290563, head/lib/libc/tests/net/ether_test.c) ============================================================================== --- head/lib/libc/tests/net/ether_test.c Sun Nov 8 23:06:40 2015 (r290563, copy source) +++ stable/10/lib/libc/tests/net/ether_test.c Mon Nov 23 08:22:40 2015 (r291175) @@ -65,7 +65,7 @@ ATF_TC_BODY(ether_line_bad_1, tc) char hostname[256]; ATF_REQUIRE_MSG(ether_line(ether_line_bad_1_string, &e, hostname) != 0, - "ether_line succeeded unexpectedly", errno); + "ether_line succeeded unexpectedly"); } static const char *ether_line_bad_2_string = "x x"; @@ -77,7 +77,7 @@ ATF_TC_BODY(ether_line_bad_2, tc) char hostname[256]; ATF_REQUIRE_MSG(ether_line(ether_line_bad_2_string, &e, hostname) != 0, - "ether_line succeeded unexpectedly", errno); + "ether_line succeeded unexpectedly"); } static const char *ether_aton_string = "01:23:45:67:89:ab"; @@ -92,7 +92,7 @@ ATF_TC_BODY(ether_aton_r, tc) ep = ether_aton_r(ether_aton_string, &e); - ATF_REQUIRE_MSG(ep != NULL, "ether_aton_r failed", errno); + ATF_REQUIRE_MSG(ep != NULL, "ether_aton_r failed; errno=%d", errno); ATF_REQUIRE_MSG(ep == &e, "ether_aton_r returned different pointers; %p != %p", ep, &e); } Copied: stable/10/lib/libc/tests/net/eui64_aton_test.c (from r290563, head/lib/libc/tests/net/eui64_aton_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/net/eui64_aton_test.c Mon Nov 23 08:22:40 2015 (r291175, copy of r290563, head/lib/libc/tests/net/eui64_aton_test.c) @@ -0,0 +1,104 @@ +/* + * Copyright 2004 The Aerospace Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions, and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of The Aerospace Corporation may not be used to endorse or + * promote products derived from this software. + * + * THIS SOFTWARE IS PROVIDED BY THE AEROSPACE CORPORATION "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 AEROSPACE CORPORATION BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include + +#include + +#include "test-eui64.h" + +static void +test_str(const char *str, const struct eui64 *eui) +{ + struct eui64 e; + char buf[EUI64_SIZ]; + int rc; + + ATF_REQUIRE_MSG(eui64_aton(str, &e) == 0, "eui64_aton failed"); + rc = memcmp(&e, eui, sizeof(e)); + if (rc != 0) { + eui64_ntoa(&e, buf, sizeof(buf)); + atf_tc_fail( + "eui64_aton(\"%s\", ..) failed; memcmp returned %d. " + "String obtained form eui64_ntoa was: `%s`", + str, rc, buf); + } +} + +ATF_TC_WITHOUT_HEAD(id_ascii); +ATF_TC_BODY(id_ascii, tc) +{ + + test_str(test_eui64_id_ascii, &test_eui64_id); +} + +ATF_TC_WITHOUT_HEAD(id_colon_ascii); +ATF_TC_BODY(id_colon_ascii, tc) +{ + + test_str(test_eui64_id_colon_ascii, &test_eui64_id); +} + +ATF_TC_WITHOUT_HEAD(mac_ascii); +ATF_TC_BODY(mac_ascii, tc) +{ + + test_str(test_eui64_mac_ascii, &test_eui64_eui48); +} + +ATF_TC_WITHOUT_HEAD(mac_colon_ascii); +ATF_TC_BODY(mac_colon_ascii, tc) +{ + + test_str(test_eui64_mac_colon_ascii, &test_eui64_eui48); +} + +ATF_TC_WITHOUT_HEAD(hex_ascii); +ATF_TC_BODY(hex_ascii, tc) +{ + + test_str(test_eui64_hex_ascii, &test_eui64_id); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, id_ascii); + ATF_TP_ADD_TC(tp, id_colon_ascii); + ATF_TP_ADD_TC(tp, mac_ascii); + ATF_TP_ADD_TC(tp, mac_colon_ascii); + ATF_TP_ADD_TC(tp, hex_ascii); + + return (atf_no_error()); +} Copied: stable/10/lib/libc/tests/net/eui64_ntoa_test.c (from r290563, head/lib/libc/tests/net/eui64_ntoa_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/net/eui64_ntoa_test.c Mon Nov 23 08:22:40 2015 (r291175, copy of r290563, head/lib/libc/tests/net/eui64_ntoa_test.c) @@ -0,0 +1,64 @@ +/* + * Copyright 2004 The Aerospace Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions, and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of The Aerospace Corporation may not be used to endorse or + * promote products derived from this software. + * + * THIS SOFTWARE IS PROVIDED BY THE AEROSPACE CORPORATION "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 AEROSPACE CORPORATION BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include + +#include + +#include "test-eui64.h" + +static void +test_str(const char *str, const struct eui64 *eui) +{ + char a[EUI64_SIZ]; + + ATF_REQUIRE_MSG(eui64_ntoa(&test_eui64_id, a, sizeof(a)) == 0, + "eui64_ntoa failed"); + ATF_REQUIRE_MSG(strcmp(a, test_eui64_id_ascii) == 0, + "the strings mismatched: `%s` != `%s`", a, test_eui64_id_ascii); +} + +ATF_TC_WITHOUT_HEAD(id_ascii); +ATF_TC_BODY(id_ascii, tc) +{ + + test_str(test_eui64_id_ascii, &test_eui64_id); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, id_ascii); + + return (atf_no_error()); +} Copied: stable/10/lib/libc/tests/net/test-eui64.h (from r290563, head/lib/libc/tests/net/test-eui64.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/net/test-eui64.h Mon Nov 23 08:22:40 2015 (r291175, copy of r290563, head/lib/libc/tests/net/test-eui64.h) @@ -0,0 +1,55 @@ +/* + * Copyright 2004 The Aerospace Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions, and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of The Aerospace Corporation may not be used to endorse or + * promote products derived from this software. + * + * THIS SOFTWARE IS PROVIDED BY THE AEROSPACE CORPORATION "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 AEROSPACE CORPORATION 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 _TEST_EUI64_H +#define _TEST_EUI64_H + +struct eui64 test_eui64_id = {{0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77}}; +struct eui64 test_eui64_eui48 = {{0x00,0x11,0x22,0xFF,0xFE,0x33,0x44,0x55}}; +struct eui64 test_eui64_mac48 = {{0x00,0x11,0x22,0xFF,0xFF,0x33,0x44,0x55}}; + +#define test_eui64_id_ascii "00-11-22-33-44-55-66-77" +#define test_eui64_id_colon_ascii "00:11:22:33:44:55:66:77" +#define test_eui64_hex_ascii "0x0011223344556677" +#define test_eui64_eui48_ascii "00-11-22-ff-fe-33-44-55" +#define test_eui64_mac48_ascii "00-11-22-ff-fe-33-44-55" +#define test_eui64_mac_ascii "00-11-22-33-44-55" +#define test_eui64_mac_colon_ascii "00:11:22:33:44:55" +#define test_eui64_id_host "id" +#define test_eui64_eui48_host "eui-48" +#define test_eui64_mac48_host "mac-48" + +#define test_eui64_line_id "00-11-22-33-44-55-66-77 id" +#define test_eui64_line_id_colon "00:11:22:33:44:55:66:77 id" +#define test_eui64_line_eui48 "00-11-22-FF-fe-33-44-55 eui-48" +#define test_eui64_line_mac48 "00-11-22-FF-ff-33-44-55 mac-48" +#define test_eui64_line_eui48_6byte "00-11-22-33-44-55 eui-48" +#define test_eui64_line_eui48_6byte_c "00:11:22:33:44:55 eui-48" + +#endif /* !_TEST_EUI64_H */ From owner-svn-src-all@freebsd.org Mon Nov 23 08:24:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 642FDA35E16; Mon, 23 Nov 2015 08:24:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1167317C7; Mon, 23 Nov 2015 08:24:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAN8OnhY085207; Mon, 23 Nov 2015 08:24:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAN8On0O085206; Mon, 23 Nov 2015 08:24:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511230824.tAN8On0O085206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 08:24: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: r291176 - stable/10/contrib/netbsd-tests/lib/libc/regex X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 08:24:50 -0000 Author: ngie Date: Mon Nov 23 08:24:48 2015 New Revision: 291176 URL: https://svnweb.freebsd.org/changeset/base/291176 Log: MFC r290869: Redo r290847: use #ifdef __NetBSD__ on all the non-public APIs to mute -Wunused-but-set-variable warnings with gcc dealing with the function calls Reported by: gcc Sponsored by: EMC / Isilon Storage Division Modified: stable/10/contrib/netbsd-tests/lib/libc/regex/debug.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/regex/debug.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/regex/debug.c Mon Nov 23 08:22:40 2015 (r291175) +++ stable/10/contrib/netbsd-tests/lib/libc/regex/debug.c Mon Nov 23 08:24:48 2015 (r291176) @@ -45,16 +45,18 @@ #include "test_regex.h" +#ifdef __NetBSD__ static void s_print(struct re_guts *, FILE *); static char *regchar(int); +#endif +#ifdef __NetBSD__ /* * regprint - print a regexp for debugging */ void regprint(regex_t *r, FILE *d) { -#ifdef __NetBSD__ struct re_guts *g = r->re_g; int c; int last; @@ -116,7 +118,6 @@ regprint(regex_t *r, FILE *d) } fprintf(d, "\n"); } -#endif } /* @@ -126,15 +127,11 @@ static void s_print(struct re_guts *g, FILE *d) { sop *s; -#ifdef __NetBSD__ cset *cs; -#endif int done = 0; sop opnd; int col = 0; -#ifdef __NetBSD__ ssize_t last; -#endif sopno offset = 2; # define GAP() { if (offset % 5 == 0) { \ if (col > 40) { \ @@ -181,7 +178,6 @@ s_print(struct re_guts *g, FILE *d) break; case OANYOF: fprintf(d, "[(%ld)", (long)opnd); -#ifdef __NetBSD__ cs = &g->sets[opnd]; last = -1; for (size_t i = 0; i < g->csetsize+1; i++) /* +1 flushes */ @@ -198,7 +194,6 @@ s_print(struct re_guts *g, FILE *d) last = -1; } } -#endif fprintf(d, "]"); break; case OBACK_: @@ -254,11 +249,7 @@ s_print(struct re_guts *g, FILE *d) fprintf(d, ">"); break; default: -#ifdef __FreeBSD__ - fprintf(d, "!%ld(%ld)!", OP(*s), opnd); -#else fprintf(d, "!%d(%d)!", OP(*s), opnd); -#endif break; } if (!done) @@ -280,3 +271,10 @@ regchar(int ch) sprintf(buf, "\\%o", ch); return(buf); } +#else +void +regprint(regex_t *r, FILE *d) +{ + +} +#endif From owner-svn-src-all@freebsd.org Mon Nov 23 08:26:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FD39A35EB6; Mon, 23 Nov 2015 08:26:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B3D31981; Mon, 23 Nov 2015 08:26:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAN8QQfb085329; Mon, 23 Nov 2015 08:26:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAN8QQNC085328; Mon, 23 Nov 2015 08:26:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511230826.tAN8QQNC085328@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 08:26: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: r291177 - stable/10/contrib/netbsd-tests/lib/libc/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 08:26:27 -0000 Author: ngie Date: Mon Nov 23 08:26:26 2015 New Revision: 291177 URL: https://svnweb.freebsd.org/changeset/base/291177 Log: MFC r290850: Cast xdr_void to xdrproc_t to mute -Wincompatible-pointer-types warnings from clang This pattern is used in other areas of lib/libc/rpc Sponsored by: EMC / Isilon Storage Division Modified: stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Mon Nov 23 08:24:48 2015 (r291176) +++ stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Mon Nov 23 08:26:26 2015 (r291177) @@ -73,8 +73,14 @@ onehost(const char *host, const char *tr tv.tv_sec = 1; tv.tv_usec = 0; +#ifdef __FreeBSD__ + if (clnt_call(clnt, RPCBPROC_NULL, (xdrproc_t)xdr_void, NULL, + (xdrproc_t)xdr_void, NULL, tv) + != RPC_SUCCESS) +#else if (clnt_call(clnt, RPCBPROC_NULL, xdr_void, NULL, xdr_void, NULL, tv) != RPC_SUCCESS) +#endif ERRX(EXIT_FAILURE, "clnt_call (%s)", clnt_sperror(clnt, "")); clnt_control(clnt, CLGET_SVC_ADDR, (char *) &addr); reply(NULL, &addr, NULL); From owner-svn-src-all@freebsd.org Mon Nov 23 08:31:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D8EFA35F3B; Mon, 23 Nov 2015 08:31:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8CB31BF3; Mon, 23 Nov 2015 08:31:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAN8Vhve088061; Mon, 23 Nov 2015 08:31:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAN8Vfix088046; Mon, 23 Nov 2015 08:31:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511230831.tAN8Vfix088046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 08: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: r291178 - in stable/10: lib/libc/tests/locale tools/regression/lib/libc/locale X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 08:31:44 -0000 Author: ngie Date: Mon Nov 23 08:31:41 2015 New Revision: 291178 URL: https://svnweb.freebsd.org/changeset/base/291178 Log: MFC r290532,r290561,r290843,r290844,r290845: r290532: Integrate tools/regression/lib/libc/locale into the FreeBSD test suite as lib/libc/tests/locale Sponsored by: EMC / Isilon Storage Division r290561: Delete leftover printfs from when these were TAP tests Sponsored by: EMC / Isilon Storage Division r290843: Polish up the tests a bit more after projects/collation was merged to head Provide more meaningful diagnostic messages if LC_CTYPE can't be set properly instead of segfaulting, because setlocale returns NULL and strcmp(NULL, b) will always segfault Split up the testcases so one failing (in this case en_US.ISO8859-15) won't cause the rest of the testcases to be skipped Remove some unused variables Sponsored by: EMC / Isilon Storage Division r290844: Polish up iswctype_test - Split up the testcases into C locale and ja_JP.eucJP testcases. - Avoid a segfault in the event that setlocale fails, similar to r290843 - Replace `sizeof(x) / sizeof(*x)` pattern with `nitems(x)` Sponsored by: EMC / Isilon Storage Division r290845: Remove unused variables; sort by alignment where needed Sponsored by: EMC / Isilon Storage Division Added: stable/10/lib/libc/tests/locale/btowc_test.c - copied unchanged from r290532, head/lib/libc/tests/locale/btowc_test.c stable/10/lib/libc/tests/locale/c16rtomb_test.c - copied, changed from r290532, head/lib/libc/tests/locale/c16rtomb_test.c stable/10/lib/libc/tests/locale/iswctype_test.c - copied, changed from r290532, head/lib/libc/tests/locale/iswctype_test.c stable/10/lib/libc/tests/locale/mblen_test.c - copied, changed from r290532, head/lib/libc/tests/locale/mblen_test.c stable/10/lib/libc/tests/locale/mbrlen_test.c - copied, changed from r290532, head/lib/libc/tests/locale/mbrlen_test.c stable/10/lib/libc/tests/locale/mbrtoc16_test.c - copied, changed from r290532, head/lib/libc/tests/locale/mbrtoc16_test.c stable/10/lib/libc/tests/locale/mbrtowc_test.c - copied, changed from r290532, head/lib/libc/tests/locale/mbrtowc_test.c stable/10/lib/libc/tests/locale/mbsnrtowcs_test.c - copied unchanged from r290532, head/lib/libc/tests/locale/mbsnrtowcs_test.c stable/10/lib/libc/tests/locale/mbsrtowcs_test.c - copied, changed from r290532, head/lib/libc/tests/locale/mbsrtowcs_test.c stable/10/lib/libc/tests/locale/mbstowcs_test.c - copied unchanged from r290532, head/lib/libc/tests/locale/mbstowcs_test.c stable/10/lib/libc/tests/locale/mbtowc_test.c - copied, changed from r290532, head/lib/libc/tests/locale/mbtowc_test.c stable/10/lib/libc/tests/locale/towctrans_test.c - copied unchanged from r290532, head/lib/libc/tests/locale/towctrans_test.c stable/10/lib/libc/tests/locale/wcrtomb_test.c - copied unchanged from r290532, head/lib/libc/tests/locale/wcrtomb_test.c stable/10/lib/libc/tests/locale/wcsnrtombs_test.c - copied unchanged from r290532, head/lib/libc/tests/locale/wcsnrtombs_test.c stable/10/lib/libc/tests/locale/wcsrtombs_test.c - copied unchanged from r290532, head/lib/libc/tests/locale/wcsrtombs_test.c stable/10/lib/libc/tests/locale/wcstombs_test.c - copied unchanged from r290532, head/lib/libc/tests/locale/wcstombs_test.c stable/10/lib/libc/tests/locale/wctomb_test.c - copied unchanged from r290532, head/lib/libc/tests/locale/wctomb_test.c Deleted: stable/10/tools/regression/lib/libc/locale/ Modified: stable/10/lib/libc/tests/locale/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/locale/Makefile ============================================================================== --- stable/10/lib/libc/tests/locale/Makefile Mon Nov 23 08:26:26 2015 (r291177) +++ stable/10/lib/libc/tests/locale/Makefile Mon Nov 23 08:31:41 2015 (r291178) @@ -4,6 +4,24 @@ TESTSDIR= ${TESTSBASE}/lib/libc/locale +ATF_TESTS_C+= btowc_test +ATF_TESTS_C+= c16rtomb_test +ATF_TESTS_C+= iswctype_test +ATF_TESTS_C+= mblen_test +ATF_TESTS_C+= mbrlen_test +ATF_TESTS_C+= mbrtoc16_test +ATF_TESTS_C+= mbrtowc_2_test +ATF_TESTS_C+= mbsnrtowcs_2_test +ATF_TESTS_C+= mbsrtowcs_test +ATF_TESTS_C+= mbstowcs_2_test +ATF_TESTS_C+= mbtowc_2_test +ATF_TESTS_C+= towctrans_test +ATF_TESTS_C+= wcrtomb_test +ATF_TESTS_C+= wcsnrtombs_test +ATF_TESTS_C+= wcsrtombs_test +ATF_TESTS_C+= wcstombs_test +ATF_TESTS_C+= wctomb_2_test + NETBSD_ATF_TESTS_C= io_test NETBSD_ATF_TESTS_C+= mbrtowc_test NETBSD_ATF_TESTS_C+= mbstowcs_test @@ -15,7 +33,13 @@ NETBSD_ATF_TESTS_C+= wcsspn_test NETBSD_ATF_TESTS_C+= wcstod_test NETBSD_ATF_TESTS_C+= wctomb_test -CFLAGS.t_wctomb.c+= -Wno-stack-protector +SRCS.mbrtowc_2_test= mbrtowc_test.c +SRCS.mbsnrtowcs_2_test= mbsnrtowcs_test.c +SRCS.mbstowcs_2_test= mbstowcs_test.c +SRCS.mbtowc_2_test= mbtowc_test.c +SRCS.wctomb_2_test= wctomb_test.c + +CFLAGS.t_wctomb.c+= -Wno-stack-protector .include "../Makefile.netbsd-tests" Copied: stable/10/lib/libc/tests/locale/btowc_test.c (from r290532, head/lib/libc/tests/locale/btowc_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/locale/btowc_test.c Mon Nov 23 08:31:41 2015 (r291178, copy of r290532, head/lib/libc/tests/locale/btowc_test.c) @@ -0,0 +1,71 @@ +/*- + * Copyright (c) 2002 Tim J. Robbins + * 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. + */ + +/* + * Test program for btowc() and wctob() as specified by IEEE Std. 1003.1-2001 + * and ISO/IEC 9899:1999. + * + * The function is tested in the "C" and "ja_JP.eucJP" locales. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include + +ATF_TC_WITHOUT_HEAD(btowc_test); +ATF_TC_BODY(btowc_test, tc) +{ + int i; + + /* C/POSIX locale. */ + ATF_REQUIRE(btowc(EOF) == WEOF); + ATF_REQUIRE(wctob(WEOF) == EOF); + for (i = 0; i < UCHAR_MAX; i++) + ATF_REQUIRE(btowc(i) == (wchar_t)i && i == (int)wctob(i)); + + /* Japanese (EUC) locale. */ + ATF_REQUIRE(strcmp(setlocale(LC_CTYPE, "ja_JP.eucJP"), "ja_JP.eucJP") == 0); + ATF_REQUIRE(MB_CUR_MAX > 1); + ATF_REQUIRE(btowc('A') == L'A' && wctob(L'A') == 'A'); + ATF_REQUIRE(btowc(0xa3) == WEOF && wctob(0xa3c1) == EOF); + +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, btowc_test); + + return (atf_no_error()); +} Copied and modified: stable/10/lib/libc/tests/locale/c16rtomb_test.c (from r290532, head/lib/libc/tests/locale/c16rtomb_test.c) ============================================================================== --- head/lib/libc/tests/locale/c16rtomb_test.c Sun Nov 8 02:06:17 2015 (r290532, copy source) +++ stable/10/lib/libc/tests/locale/c16rtomb_test.c Mon Nov 23 08:31:41 2015 (r291178) @@ -42,13 +42,27 @@ __FBSDID("$FreeBSD$"); #include -ATF_TC_WITHOUT_HEAD(c16rtomb_test); -ATF_TC_BODY(c16rtomb_test, tc) +static void +require_lc_ctype(const char *locale_name) { - mbstate_t s; - char buf[MB_LEN_MAX + 1]; + char *lc_ctype_set; - /* C/POSIX locale. */ + lc_ctype_set = setlocale(LC_CTYPE, locale_name); + if (lc_ctype_set == NULL) + atf_tc_fail("setlocale(LC_CTYPE, \"%s\") failed; errno=%d", + locale_name, errno); + + ATF_REQUIRE(strcmp(lc_ctype_set, locale_name) == 0); +} + +static mbstate_t s; +static char buf[MB_LEN_MAX + 1]; + +ATF_TC_WITHOUT_HEAD(c16rtomb_c_locale_test); +ATF_TC_BODY(c16rtomb_c_locale_test, tc) +{ + + require_lc_ctype("C"); /* * If the buffer argument is NULL, c16 is implicitly 0, @@ -80,11 +94,13 @@ ATF_TC_BODY(c16rtomb_test, tc) ATF_REQUIRE(c16rtomb(buf, 0xdca9, &s) == (size_t)-1); ATF_REQUIRE(errno == EILSEQ); ATF_REQUIRE((unsigned char)buf[0] == 0xcc); +} - /* ISO8859-1. */ +ATF_TC_WITHOUT_HEAD(c16rtomb_iso_8859_1_test); +ATF_TC_BODY(c16rtomb_iso_8859_1_test, tc) +{ - ATF_REQUIRE(strcmp(setlocale(LC_CTYPE, "en_US.ISO8859-1"), - "en_US.ISO8859-1") == 0); + require_lc_ctype("en_US.ISO8859-1"); /* Unicode character 'Euro sign'. */ memset(&s, 0, sizeof(s)); @@ -92,21 +108,26 @@ ATF_TC_BODY(c16rtomb_test, tc) ATF_REQUIRE(c16rtomb(buf, 0x20ac, &s) == (size_t)-1); ATF_REQUIRE(errno == EILSEQ); ATF_REQUIRE((unsigned char)buf[0] == 0xcc); +} - /* ISO8859-15. */ +ATF_TC_WITHOUT_HEAD(c16rtomb_iso_8859_15_test); +ATF_TC_BODY(c16rtomb_iso_8859_15_test, tc) +{ - ATF_REQUIRE(strcmp(setlocale(LC_CTYPE, "en_US.ISO8859-15"), - "en_US.ISO8859-15") == 0); + require_lc_ctype("en_US.ISO8859-15"); /* Unicode character 'Euro sign'. */ memset(&s, 0, sizeof(s)); memset(buf, 0xcc, sizeof(buf)); ATF_REQUIRE(c16rtomb(buf, 0x20ac, &s) == 1); ATF_REQUIRE((unsigned char)buf[0] == 0xa4 && (unsigned char)buf[1] == 0xcc); +} - /* UTF-8. */ +ATF_TC_WITHOUT_HEAD(c16rtomb_utf_8_test); +ATF_TC_BODY(c16rtomb_utf_8_test, tc) +{ - ATF_REQUIRE(strcmp(setlocale(LC_CTYPE, "en_US.UTF-8"), "en_US.UTF-8") == 0); + require_lc_ctype("en_US.UTF-8"); /* Unicode character 'Pile of poo'. */ memset(&s, 0, sizeof(s)); @@ -136,7 +157,10 @@ ATF_TC_BODY(c16rtomb_test, tc) ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, c16rtomb_test); + ATF_TP_ADD_TC(tp, c16rtomb_c_locale_test); + ATF_TP_ADD_TC(tp, c16rtomb_iso_8859_1_test); + ATF_TP_ADD_TC(tp, c16rtomb_iso_8859_15_test); + ATF_TP_ADD_TC(tp, c16rtomb_utf_8_test); return (atf_no_error()); } Copied and modified: stable/10/lib/libc/tests/locale/iswctype_test.c (from r290532, head/lib/libc/tests/locale/iswctype_test.c) ============================================================================== --- head/lib/libc/tests/locale/iswctype_test.c Sun Nov 8 02:06:17 2015 (r290532, copy source) +++ stable/10/lib/libc/tests/locale/iswctype_test.c Mon Nov 23 08:31:41 2015 (r291178) @@ -34,6 +34,8 @@ #include __FBSDID("$FreeBSD$"); +#include +#include #include #include #include @@ -42,31 +44,45 @@ __FBSDID("$FreeBSD$"); #include -ATF_TC_WITHOUT_HEAD(iswctype_test); -ATF_TC_BODY(iswctype_test, tc) +static void +require_lc_ctype(const char *locale_name) { - wctype_t t; - int i, j; - struct { - const char *name; - int (*func)(wint_t); - } cls[] = { - { "alnum", iswalnum }, - { "alpha", iswalpha }, - { "blank", iswblank }, - { "cntrl", iswcntrl }, - { "digit", iswdigit }, - { "graph", iswgraph }, - { "lower", iswlower }, - { "print", iswprint }, - { "punct", iswpunct }, - { "space", iswspace }, - { "upper", iswupper }, - { "xdigit", iswxdigit } - }; + char *lc_ctype_set; - /* C/POSIX locale. */ - for (i = 0; i < sizeof(cls) / sizeof(*cls); i++) { + lc_ctype_set = setlocale(LC_CTYPE, locale_name); + if (lc_ctype_set == NULL) + atf_tc_fail("setlocale(LC_CTYPE, \"%s\") failed; errno=%d", + locale_name, errno); + + ATF_REQUIRE(strcmp(lc_ctype_set, locale_name) == 0); +} + +static wctype_t t; +static int i, j; +static struct { + const char *name; + int (*func)(wint_t); +} cls[] = { + { "alnum", iswalnum }, + { "alpha", iswalpha }, + { "blank", iswblank }, + { "cntrl", iswcntrl }, + { "digit", iswdigit }, + { "graph", iswgraph }, + { "lower", iswlower }, + { "print", iswprint }, + { "punct", iswpunct }, + { "space", iswspace }, + { "upper", iswupper }, + { "xdigit", iswxdigit } +}; + +ATF_TC_WITHOUT_HEAD(iswctype_c_locale_test); +ATF_TC_BODY(iswctype_c_locale_test, tc) +{ + + require_lc_ctype("C"); + for (i = 0; i < nitems(cls); i++) { t = wctype(cls[i].name); ATF_REQUIRE(t != 0); for (j = 0; j < 256; j++) @@ -76,10 +92,15 @@ ATF_TC_BODY(iswctype_test, tc) ATF_REQUIRE(t == 0); for (i = 0; i < 256; i++) ATF_REQUIRE(iswctype(i, t) == 0); +} + +ATF_TC_WITHOUT_HEAD(iswctype_euc_jp_test); +ATF_TC_BODY(iswctype_euc_jp_test, tc) +{ + + require_lc_ctype("ja_JP.eucJP"); - /* Japanese (EUC) locale. */ - ATF_REQUIRE(strcmp(setlocale(LC_CTYPE, "ja_JP.eucJP"), "ja_JP.eucJP") == 0); - for (i = 0; i < sizeof(cls) / sizeof(*cls); i++) { + for (i = 0; i < nitems(cls); i++) { t = wctype(cls[i].name); ATF_REQUIRE(t != 0); for (j = 0; j < 65536; j++) @@ -94,7 +115,8 @@ ATF_TC_BODY(iswctype_test, tc) ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, iswctype_test); + ATF_TP_ADD_TC(tp, iswctype_c_locale_test); + ATF_TP_ADD_TC(tp, iswctype_euc_jp_test); return (atf_no_error()); } Copied and modified: stable/10/lib/libc/tests/locale/mblen_test.c (from r290532, head/lib/libc/tests/locale/mblen_test.c) ============================================================================== --- head/lib/libc/tests/locale/mblen_test.c Sun Nov 8 02:06:17 2015 (r290532, copy source) +++ stable/10/lib/libc/tests/locale/mblen_test.c Mon Nov 23 08:31:41 2015 (r291178) @@ -46,15 +46,12 @@ __FBSDID("$FreeBSD$"); ATF_TC_WITHOUT_HEAD(mblen_test); ATF_TC_BODY(mblen_test, tc) { - size_t len; char buf[MB_LEN_MAX + 1]; /* * C/POSIX locale. */ - printf("1..1\n"); - ATF_REQUIRE(MB_CUR_MAX == 1); /* No shift states in C locale. */ Copied and modified: stable/10/lib/libc/tests/locale/mbrlen_test.c (from r290532, head/lib/libc/tests/locale/mbrlen_test.c) ============================================================================== --- head/lib/libc/tests/locale/mbrlen_test.c Sun Nov 8 02:06:17 2015 (r290532, copy source) +++ stable/10/lib/libc/tests/locale/mbrlen_test.c Mon Nov 23 08:31:41 2015 (r291178) @@ -49,7 +49,6 @@ ATF_TC_WITHOUT_HEAD(mbrlen_test); ATF_TC_BODY(mbrlen_test, tc) { mbstate_t s; - size_t len; char buf[MB_LEN_MAX + 1]; /* C/POSIX locale. */ Copied and modified: stable/10/lib/libc/tests/locale/mbrtoc16_test.c (from r290532, head/lib/libc/tests/locale/mbrtoc16_test.c) ============================================================================== --- head/lib/libc/tests/locale/mbrtoc16_test.c Sun Nov 8 02:06:17 2015 (r290532, copy source) +++ stable/10/lib/libc/tests/locale/mbrtoc16_test.c Mon Nov 23 08:31:41 2015 (r291178) @@ -42,18 +42,27 @@ __FBSDID("$FreeBSD$"); #include -ATF_TC_WITHOUT_HEAD(mbrtoc16_test); -ATF_TC_BODY(mbrtoc16_test, tc) +static void +require_lc_ctype(const char *locale_name) { - mbstate_t s; - size_t len; - char16_t c16; - - /* - * C/POSIX locale. - */ + char *lc_ctype_set; - printf("1..1\n"); + lc_ctype_set = setlocale(LC_CTYPE, locale_name); + if (lc_ctype_set == NULL) + atf_tc_fail("setlocale(LC_CTYPE, \"%s\") failed; errno=%d", + locale_name, errno); + + ATF_REQUIRE(strcmp(lc_ctype_set, locale_name) == 0); +} + +static mbstate_t s; +static char16_t c16; + +ATF_TC_WITHOUT_HEAD(mbrtoc16_c_locale_test); +ATF_TC_BODY(mbrtoc16_c_locale_test, tc) +{ + + require_lc_ctype("C"); /* Null wide character, internal state. */ ATF_REQUIRE(mbrtoc16(&c16, "", 1, NULL) == 0); @@ -93,35 +102,37 @@ ATF_TC_BODY(mbrtoc16_test, tc) ATF_REQUIRE(mbrtoc16(&c16, "C", 1, &s) == 1); ATF_REQUIRE(c16 == L'C'); - /* - * ISO-8859-1. - */ +} - ATF_REQUIRE(strcmp(setlocale(LC_CTYPE, "en_US.ISO8859-1"), - "en_US.ISO8859-1") == 0); +ATF_TC_WITHOUT_HEAD(mbrtoc16_iso_8859_1_test); +ATF_TC_BODY(mbrtoc16_iso_8859_1_test, tc) +{ + + require_lc_ctype("en_US.ISO8859-1"); /* Currency sign. */ memset(&s, 0, sizeof(s)); ATF_REQUIRE(mbrtoc16(&c16, "\xa4", 1, &s) == 1); ATF_REQUIRE(c16 == 0xa4); +} - /* - * ISO-8859-15. - */ +ATF_TC_WITHOUT_HEAD(mbrtoc16_iso_8859_15_test); +ATF_TC_BODY(mbrtoc16_iso_8859_15_test, tc) +{ - ATF_REQUIRE(strcmp(setlocale(LC_CTYPE, "en_US.ISO8859-15"), - "en_US.ISO8859-15") == 0); + require_lc_ctype("en_US.ISO8859-15"); /* Euro sign. */ memset(&s, 0, sizeof(s)); ATF_REQUIRE(mbrtoc16(&c16, "\xa4", 1, &s) == 1); ATF_REQUIRE(c16 == 0x20ac); +} - /* - * UTF-8. - */ +ATF_TC_WITHOUT_HEAD(mbrtoc16_utf_8_test); +ATF_TC_BODY(mbrtoc16_utf_8_test, tc) +{ - ATF_REQUIRE(strcmp(setlocale(LC_CTYPE, "en_US.UTF-8"), "en_US.UTF-8") == 0); + require_lc_ctype("en_US.UTF-8"); /* Null wide character, internal state. */ ATF_REQUIRE(mbrtoc16(NULL, 0, 0, NULL) == 0); @@ -194,7 +205,10 @@ ATF_TC_BODY(mbrtoc16_test, tc) ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, mbrtoc16_test); + ATF_TP_ADD_TC(tp, mbrtoc16_c_locale_test); + ATF_TP_ADD_TC(tp, mbrtoc16_iso_8859_1_test); + ATF_TP_ADD_TC(tp, mbrtoc16_iso_8859_15_test); + ATF_TP_ADD_TC(tp, mbrtoc16_utf_8_test); return (atf_no_error()); } Copied and modified: stable/10/lib/libc/tests/locale/mbrtowc_test.c (from r290532, head/lib/libc/tests/locale/mbrtowc_test.c) ============================================================================== --- head/lib/libc/tests/locale/mbrtowc_test.c Sun Nov 8 02:06:17 2015 (r290532, copy source) +++ stable/10/lib/libc/tests/locale/mbrtowc_test.c Mon Nov 23 08:31:41 2015 (r291178) @@ -49,7 +49,6 @@ ATF_TC_WITHOUT_HEAD(mbrtowc_test); ATF_TC_BODY(mbrtowc_test, tc) { mbstate_t s; - size_t len; wchar_t wc; char buf[MB_LEN_MAX + 1]; @@ -57,8 +56,6 @@ ATF_TC_BODY(mbrtowc_test, tc) * C/POSIX locale. */ - printf("1..1\n"); - ATF_REQUIRE(MB_CUR_MAX == 1); /* Null wide character, internal state. */ Copied: stable/10/lib/libc/tests/locale/mbsnrtowcs_test.c (from r290532, head/lib/libc/tests/locale/mbsnrtowcs_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/locale/mbsnrtowcs_test.c Mon Nov 23 08:31:41 2015 (r291178, copy of r290532, head/lib/libc/tests/locale/mbsnrtowcs_test.c) @@ -0,0 +1,195 @@ +/*- + * Copyright (c) 2002-2004 Tim J. Robbins + * 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. + */ + +/* + * Test program for mbsnrtowcs(). + * + * The function is tested with both the "C" ("POSIX") LC_CTYPE setting and + * "ja_JP.eucJP". Other encodings are not tested. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +ATF_TC_WITHOUT_HEAD(mbsnrtowcs_test); +ATF_TC_BODY(mbsnrtowcs_test, tc) +{ + char srcbuf[128]; + wchar_t dstbuf[128]; + char *src; + mbstate_t s; + + /* C/POSIX locale. */ + + /* Simple null terminated string. */ + memset(srcbuf, 0xcc, sizeof(srcbuf)); + strcpy(srcbuf, "hello"); + wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf)); + src = srcbuf; + memset(&s, 0, sizeof(s)); + ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 6, sizeof(dstbuf) / + sizeof(*dstbuf), &s) == 5); + ATF_REQUIRE(wcscmp(dstbuf, L"hello") == 0); + ATF_REQUIRE(dstbuf[6] == 0xcccc); + ATF_REQUIRE(src == NULL); + + /* Simple null terminated string, stopping early. */ + memset(srcbuf, 0xcc, sizeof(srcbuf)); + strcpy(srcbuf, "hello"); + wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf)); + src = srcbuf; + memset(&s, 0, sizeof(s)); + ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 4, sizeof(dstbuf) / + sizeof(*dstbuf), &s) == 4); + ATF_REQUIRE(wmemcmp(dstbuf, L"hell", 4) == 0); + ATF_REQUIRE(dstbuf[5] == 0xcccc); + ATF_REQUIRE(src == srcbuf + 4); + + /* Not enough space in destination buffer. */ + memset(srcbuf, 0xcc, sizeof(srcbuf)); + strcpy(srcbuf, "hello"); + wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf)); + src = srcbuf; + memset(&s, 0, sizeof(s)); + ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 6, 4, &s) == 4); + ATF_REQUIRE(wmemcmp(dstbuf, L"hell", 4) == 0); + ATF_REQUIRE(dstbuf[5] == 0xcccc); + ATF_REQUIRE(src == srcbuf + 4); + + /* Null terminated string, internal dest. buffer */ + memset(srcbuf, 0xcc, sizeof(srcbuf)); + strcpy(srcbuf, "hello"); + src = srcbuf; + memset(&s, 0, sizeof(s)); + ATF_REQUIRE(mbsnrtowcs(NULL, (const char **)&src, 6, 0, &s) == 5); + + /* Null terminated string, internal dest. buffer, stopping early */ + memset(srcbuf, 0xcc, sizeof(srcbuf)); + strcpy(srcbuf, "hello"); + src = srcbuf; + memset(&s, 0, sizeof(s)); + ATF_REQUIRE(mbsnrtowcs(NULL, (const char **)&src, 4, 0, &s) == 4); + + /* Null terminated string, internal state. */ + memset(srcbuf, 0xcc, sizeof(srcbuf)); + strcpy(srcbuf, "hello"); + wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf)); + src = srcbuf; + ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 6, sizeof(dstbuf) / + sizeof(*dstbuf), NULL) == 5); + ATF_REQUIRE(wcscmp(dstbuf, L"hello") == 0); + ATF_REQUIRE(dstbuf[6] == 0xcccc); + ATF_REQUIRE(src == NULL); + + /* Null terminated string, internal state, internal dest. buffer. */ + memset(srcbuf, 0xcc, sizeof(srcbuf)); + strcpy(srcbuf, "hello"); + src = srcbuf; + ATF_REQUIRE(mbsnrtowcs(NULL, (const char **)&src, 6, 0, NULL) == 5); + + /* Empty source buffer. */ + memset(srcbuf, 0xcc, sizeof(srcbuf)); + srcbuf[0] = '\0'; + src = srcbuf; + memset(&s, 0, sizeof(s)); + wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf)); + ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 1, 1, &s) == 0); + ATF_REQUIRE(dstbuf[0] == 0); + ATF_REQUIRE(dstbuf[1] == 0xcccc); + ATF_REQUIRE(src == NULL); + + /* Zero length destination buffer. */ + memset(srcbuf, 0xcc, sizeof(srcbuf)); + strcpy(srcbuf, "hello"); + src = srcbuf; + memset(&s, 0, sizeof(s)); + wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf)); + ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 1, 0, &s) == 0); + ATF_REQUIRE(dstbuf[0] == 0xcccc); + ATF_REQUIRE(src == srcbuf); + + /* Zero length source buffer. */ + memset(srcbuf, 0xcc, sizeof(srcbuf)); + src = srcbuf; + memset(&s, 0, sizeof(s)); + wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf)); + ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 0, 1, &s) == 0); + ATF_REQUIRE(dstbuf[0] == 0xcccc); + ATF_REQUIRE(src == srcbuf); + + /* + * Japanese (EUC) locale. + */ + + ATF_REQUIRE(strcmp(setlocale(LC_CTYPE, "ja_JP.eucJP"), "ja_JP.eucJP") == 0); + ATF_REQUIRE(MB_CUR_MAX > 1); + + memset(srcbuf, 0xcc, sizeof(srcbuf)); + strcpy(srcbuf, "\xA3\xC1 B \xA3\xC3"); + src = srcbuf; + memset(&s, 0, sizeof(s)); + wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf)); + ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 8, sizeof(dstbuf) / + sizeof(*dstbuf), &s) == 5); + ATF_REQUIRE(dstbuf[0] == 0xA3C1 && dstbuf[1] == 0x20 && dstbuf[2] == 0x42 && + dstbuf[3] == 0x20 && dstbuf[4] == 0xA3C3 && dstbuf[5] == 0); + ATF_REQUIRE(src == NULL); + + /* Partial character. */ + memset(srcbuf, 0xcc, sizeof(srcbuf)); + strcpy(srcbuf, "\xA3\xC1 B \xA3\xC3"); + src = srcbuf; + memset(&s, 0, sizeof(s)); + wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf)); + ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 6, sizeof(dstbuf) / + sizeof(*dstbuf), &s) == 4); + ATF_REQUIRE(src == srcbuf + 6); + ATF_REQUIRE(!mbsinit(&s)); + ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 1, sizeof(dstbuf) / + sizeof(*dstbuf), &s) == 1); + ATF_REQUIRE(src == srcbuf + 7); + ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 1, sizeof(dstbuf) / + sizeof(*dstbuf), &s) == 0); + ATF_REQUIRE(src == NULL); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, mbsnrtowcs_test); + + return (atf_no_error()); +} Copied and modified: stable/10/lib/libc/tests/locale/mbsrtowcs_test.c (from r290532, head/lib/libc/tests/locale/mbsrtowcs_test.c) ============================================================================== --- head/lib/libc/tests/locale/mbsrtowcs_test.c Sun Nov 8 02:06:17 2015 (r290532, copy source) +++ stable/10/lib/libc/tests/locale/mbsrtowcs_test.c Mon Nov 23 08:31:41 2015 (r291178) @@ -57,8 +57,6 @@ ATF_TC_BODY(mbsrtowcs_test, tc) * C/POSIX locale. */ - printf("1..1\n"); - /* Simple null terminated string. */ memset(srcbuf, 0xcc, sizeof(srcbuf)); strcpy(srcbuf, "hello"); Copied: stable/10/lib/libc/tests/locale/mbstowcs_test.c (from r290532, head/lib/libc/tests/locale/mbstowcs_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/locale/mbstowcs_test.c Mon Nov 23 08:31:41 2015 (r291178, copy of r290532, head/lib/libc/tests/locale/mbstowcs_test.c) @@ -0,0 +1,111 @@ +/*- + * Copyright (c) 2002 Tim J. Robbins + * 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. + */ + +/* + * Test program for mbstowcs(), as specified by IEEE Std. 1003.1-2001 and + * ISO/IEC 9899:1999. + * + * The function is tested with both the "C" ("POSIX") LC_CTYPE setting and + * "ja_JP.eucJP". Other encodings are not tested. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +ATF_TC_WITHOUT_HEAD(mbstowcs_test); +ATF_TC_BODY(mbstowcs_test, tc) +{ + char srcbuf[128]; + wchar_t dstbuf[128]; + + /* C/POSIX locale. */ + + /* Simple null terminated string. */ + memset(srcbuf, 0xcc, sizeof(srcbuf)); + strcpy(srcbuf, "hello"); + wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf)); + ATF_REQUIRE(mbstowcs(dstbuf, srcbuf, sizeof(dstbuf) / sizeof(*dstbuf)) == 5); + ATF_REQUIRE(wcscmp(dstbuf, L"hello") == 0); + ATF_REQUIRE(dstbuf[6] == 0xcccc); + + /* Not enough space in destination buffer. */ + memset(srcbuf, 0xcc, sizeof(srcbuf)); + strcpy(srcbuf, "hello"); + wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf)); + ATF_REQUIRE(mbstowcs(dstbuf, srcbuf, 4) == 4); + ATF_REQUIRE(wmemcmp(dstbuf, L"hell", 4) == 0); + ATF_REQUIRE(dstbuf[5] == 0xcccc); + + /* Null terminated string, internal dest. buffer (XSI extension) */ + memset(srcbuf, 0xcc, sizeof(srcbuf)); + strcpy(srcbuf, "hello"); + ATF_REQUIRE(mbstowcs(NULL, srcbuf, 0) == 5); + + /* Empty source buffer. */ + memset(srcbuf, 0xcc, sizeof(srcbuf)); + srcbuf[0] = '\0'; + wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf)); + ATF_REQUIRE(mbstowcs(dstbuf, srcbuf, 1) == 0); + ATF_REQUIRE(dstbuf[0] == 0); + ATF_REQUIRE(dstbuf[1] == 0xcccc); + + /* Zero length destination buffer. */ + memset(srcbuf, 0xcc, sizeof(srcbuf)); + strcpy(srcbuf, "hello"); + wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf)); + ATF_REQUIRE(mbstowcs(dstbuf, srcbuf, 0) == 0); + ATF_REQUIRE(dstbuf[0] == 0xcccc); + + /* Japanese (EUC) locale. */ + + ATF_REQUIRE(strcmp(setlocale(LC_CTYPE, "ja_JP.eucJP"), "ja_JP.eucJP") == 0); + ATF_REQUIRE(MB_CUR_MAX > 1); + + memset(srcbuf, 0xcc, sizeof(srcbuf)); + strcpy(srcbuf, "\xA3\xC1 B \xA3\xC3"); + wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf)); + ATF_REQUIRE(mbstowcs(dstbuf, srcbuf, sizeof(dstbuf) / sizeof(*dstbuf)) == 5); + ATF_REQUIRE(dstbuf[0] == 0xA3C1 && dstbuf[1] == 0x20 && dstbuf[2] == 0x42 && + dstbuf[3] == 0x20 && dstbuf[4] == 0xA3C3 && dstbuf[5] == 0); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, mbstowcs_test); + + return (atf_no_error()); +} Copied and modified: stable/10/lib/libc/tests/locale/mbtowc_test.c (from r290532, head/lib/libc/tests/locale/mbtowc_test.c) ============================================================================== --- head/lib/libc/tests/locale/mbtowc_test.c Sun Nov 8 02:06:17 2015 (r290532, copy source) +++ stable/10/lib/libc/tests/locale/mbtowc_test.c Mon Nov 23 08:31:41 2015 (r291178) @@ -46,9 +46,8 @@ __FBSDID("$FreeBSD$"); ATF_TC_WITHOUT_HEAD(mbtowc_test); ATF_TC_BODY(mbtowc_test, tc) { - size_t len; - wchar_t wc; char buf[MB_LEN_MAX + 1]; + wchar_t wc; /* C/POSIX locale. */ Copied: stable/10/lib/libc/tests/locale/towctrans_test.c (from r290532, head/lib/libc/tests/locale/towctrans_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/locale/towctrans_test.c Mon Nov 23 08:31:41 2015 (r291178, copy of r290532, head/lib/libc/tests/locale/towctrans_test.c) @@ -0,0 +1,90 @@ +/*- + * Copyright (c) 2003 Tim J. Robbins + * 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. + */ + +/* + * Test program for wctrans() and towctrans() as specified by + * IEEE Std. 1003.1-2001 and ISO/IEC 9899:1999. + * + * The functions are tested in the "C" and "ja_JP.eucJP" locales. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include + +ATF_TC_WITHOUT_HEAD(towctrans_test); +ATF_TC_BODY(towctrans_test, tc) +{ + wctype_t t; + int i, j; + struct { + const char *name; + wint_t (*func)(wint_t); + } tran[] = { + { "tolower", towlower }, + { "toupper", towupper }, + }; + + /* C/POSIX locale. */ + for (i = 0; i < sizeof(tran) / sizeof(*tran); i++) { + t = wctrans(tran[i].name); + ATF_REQUIRE(t != 0); + for (j = 0; j < 256; j++) + ATF_REQUIRE(tran[i].func(j) == towctrans(j, t)); + } + t = wctrans("elephant"); + ATF_REQUIRE(t == 0); + for (i = 0; i < 256; i++) + ATF_REQUIRE(towctrans(i, t) == i); + + /* Japanese (EUC) locale. */ + ATF_REQUIRE(strcmp(setlocale(LC_CTYPE, "ja_JP.eucJP"), "ja_JP.eucJP") == 0); + for (i = 0; i < sizeof(tran) / sizeof(*tran); i++) { + t = wctrans(tran[i].name); + ATF_REQUIRE(t != 0); + for (j = 0; j < 65536; j++) + ATF_REQUIRE(tran[i].func(j) == towctrans(j, t)); + } + t = wctrans("elephant"); + ATF_REQUIRE(t == 0); + for (i = 0; i < 65536; i++) + ATF_REQUIRE(towctrans(i, t) == i); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, towctrans_test); + + return (atf_no_error()); +} Copied: stable/10/lib/libc/tests/locale/wcrtomb_test.c (from r290532, head/lib/libc/tests/locale/wcrtomb_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/locale/wcrtomb_test.c Mon Nov 23 08:31:41 2015 (r291178, copy of r290532, head/lib/libc/tests/locale/wcrtomb_test.c) @@ -0,0 +1,135 @@ +/*- + * Copyright (c) 2002 Tim J. Robbins + * 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. + */ + +/* + * Test program for wcrtomb(), as specified by IEEE Std. 1003.1-2001 and + * ISO/IEC 9899:1999. + * + * The function is tested with both the "C" ("POSIX") LC_CTYPE setting and + * "ja_JP.eucJP". Other encodings are not tested. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +ATF_TC_WITHOUT_HEAD(wcrtomb_test); +ATF_TC_BODY(wcrtomb_test, tc) +{ + mbstate_t s; + size_t len; + char buf[MB_LEN_MAX + 1]; + + /* C/POSIX locale. */ + + ATF_REQUIRE(MB_CUR_MAX == 1); + + /* + * If the buffer argument is NULL, wc is implicitly L'\0', + * wcrtomb() resets its internal state. + */ + ATF_REQUIRE(wcrtomb(NULL, L'\0', NULL) == 1); + ATF_REQUIRE(wcrtomb(NULL, UCHAR_MAX + 1, NULL) == 1); + + /* Null wide character. */ + memset(&s, 0, sizeof(s)); + memset(buf, 0xcc, sizeof(buf)); + len = wcrtomb(buf, L'\0', &s); + ATF_REQUIRE(len == 1); + ATF_REQUIRE((unsigned char)buf[0] == 0 && (unsigned char)buf[1] == 0xcc); + + /* Latin letter A, internal state. */ + ATF_REQUIRE(wcrtomb(NULL, L'\0', NULL) == 1); + ATF_REQUIRE(wcrtomb(NULL, L'A', NULL) == 1); + + /* Latin letter A. */ + memset(&s, 0, sizeof(s)); + memset(buf, 0xcc, sizeof(buf)); + len = wcrtomb(buf, L'A', &s); + ATF_REQUIRE(len == 1); + ATF_REQUIRE((unsigned char)buf[0] == 'A' && (unsigned char)buf[1] == 0xcc); + + /* Invalid code. */ + ATF_REQUIRE(wcrtomb(buf, UCHAR_MAX + 1, NULL) == (size_t)-1); + ATF_REQUIRE(errno == EILSEQ); + + /* + * Japanese (EUC) locale. + */ + + ATF_REQUIRE(strcmp(setlocale(LC_CTYPE, "ja_JP.eucJP"), "ja_JP.eucJP") == 0); + ATF_REQUIRE(MB_CUR_MAX == 3); + + /* + * If the buffer argument is NULL, wc is implicitly L'\0', *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Nov 23 08:33:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2993EA360AA; Mon, 23 Nov 2015 08:33:48 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E131C1F02; Mon, 23 Nov 2015 08:33:47 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 882181FE023; Mon, 23 Nov 2015 09:33:44 +0100 (CET) Subject: Re: svn commit: r291170 - head/share/man/man4 To: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201511230043.tAN0hNDY051580@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <5652CFD1.5040508@selasky.org> Date: Mon, 23 Nov 2015 09:35:29 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <201511230043.tAN0hNDY051580@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 08:33:48 -0000 On 11/23/15 01:43, Garrett Cooper wrote: > Author: ngie > Date: Mon Nov 23 00:43:23 2015 > New Revision: 291170 > URL: https://svnweb.freebsd.org/changeset/base/291170 > > Log: > Install mce(4) and mlx5en(4) if MK_OFED != no > > MFC after: 1 week > > Modified: > head/share/man/man4/Makefile > > Modified: head/share/man/man4/Makefile > ============================================================================== > --- head/share/man/man4/Makefile Mon Nov 23 00:40:08 2015 (r291169) > +++ head/share/man/man4/Makefile Mon Nov 23 00:43:23 2015 (r291170) > @@ -274,7 +274,6 @@ MAN= aac.4 \ > mk48txx.4 \ > mld.4 \ > mlx.4 \ > - mlx5en.4 \ > mly.4 \ > mmc.4 \ > mmcsd.4 \ > @@ -653,7 +652,6 @@ MLINKS+=lp.4 plip.4 > MLINKS+=malo.4 if_malo.4 > MLINKS+=md.4 vn.4 > MLINKS+=mem.4 kmem.4 > -MLINKS+=mlx5en.4 mce.4 > MLINKS+=mn.4 if_mn.4 > MLINKS+=mos.4 if_mos.4 > MLINKS+=msk.4 if_msk.4 > @@ -853,6 +851,12 @@ MAN+= iscsi_initiator.4 > > .endif > > +.if ${MK_OFED} != "no" > +MAN+= mlx5en.4 > + > +MLINKS+=mlx5en.4 mce.4 > +.endif > + > .if ${MK_TESTS} != "no" > ATF= ${.CURDIR}/../../../contrib/atf > .PATH: ${ATF}/doc > > Hi, Strictly speaking, mlx5 and mlx5en is not under OFED any more, and the manual page should be installed by default. --HPS From owner-svn-src-all@freebsd.org Mon Nov 23 08:36:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0258EA36124; Mon, 23 Nov 2015 08:36:46 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B78471093; Mon, 23 Nov 2015 08:36:45 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id E69421FE023; Mon, 23 Nov 2015 09:36:36 +0100 (CET) Subject: Re: svn commit: r291170 - head/share/man/man4 To: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201511230043.tAN0hNDY051580@repo.freebsd.org> <5652CFD1.5040508@selasky.org> From: Hans Petter Selasky Message-ID: <5652D07D.3060808@selasky.org> Date: Mon, 23 Nov 2015 09:38:21 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <5652CFD1.5040508@selasky.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 08:36:46 -0000 On 11/23/15 09:35, Hans Petter Selasky wrote: > > Hi, > > Strictly speaking, mlx5 and mlx5en is not under OFED any more, and the > manual page should be installed by default. > > --HPS Hi, Maybe for 10-stable it will be under the OFED option, but not for 11-current. --HPS From owner-svn-src-all@freebsd.org Mon Nov 23 08:44:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 041E9A3633A; Mon, 23 Nov 2015 08:44:54 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x22f.google.com (mail-pa0-x22f.google.com [IPv6:2607:f8b0:400e:c03::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C844F1772; Mon, 23 Nov 2015 08:44:53 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pacej9 with SMTP id ej9so184658190pac.2; Mon, 23 Nov 2015 00:44:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=gPdLRTb6WwCO2u3PlaCg6DcVFanw+3TrHyuTjmEEXh4=; b=x2xbEvw5HP9x3Ur3aiS3U1Z8w/Hbw9Z6C6imYfPYLxvHR0bYbZwgUGQnjen5VYfck2 wuV6nhYqwCT62vhK8rurr175EjEoXzeEbW1ldArKG9wM/BcfPhc66LVzguaJBONmchsl UdmMzFZuns0Ws+lDiskpJ/lVtRfk4riNQJaEWrNKTpvK2T1FZ2x2IMUWMy3FplJs1+K/ F8LFxzRnMqgAZ0bNAStC/nRTp2PS6cHWx2slamUbwfjyzHLzENjQhis93sww6zJu7/oY JKgNY//0kTvSCDRZA8UG8e6CrHYmN3HSmINhEjaGDvQ1wNljOyx8PF18Ykn2W1eUmNME 3hFw== X-Received: by 10.66.100.199 with SMTP id fa7mr34447613pab.149.1448268293433; Mon, 23 Nov 2015 00:44:53 -0800 (PST) Received: from ?IPv6:2601:601:800:126d:b089:4150:5db1:6222? ([2601:601:800:126d:b089:4150:5db1:6222]) by smtp.gmail.com with ESMTPSA id b6sm9388934pbu.57.2015.11.23.00.44.51 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 23 Nov 2015 00:44:51 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r291170 - head/share/man/man4 From: NGie Cooper In-Reply-To: <5652D07D.3060808@selasky.org> Date: Mon, 23 Nov 2015 00:44:50 -0800 Cc: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <52D633E7-92B1-49B7-85FF-FE57962B65FB@gmail.com> References: <201511230043.tAN0hNDY051580@repo.freebsd.org> <5652CFD1.5040508@selasky.org> <5652D07D.3060808@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 08:44:54 -0000 > On Nov 23, 2015, at 00:38, Hans Petter Selasky = wrote: >=20 > On 11/23/15 09:35, Hans Petter Selasky wrote: >>=20 >> Hi, >>=20 >> Strictly speaking, mlx5 and mlx5en is not under OFED any more, and = the >> manual page should be installed by default. >>=20 >> --HPS >=20 > Hi, >=20 > Maybe for 10-stable it will be under the OFED option, but not for = 11-current. Hmm.. does this have to do with the linuxkpi module? Also, technically mlx5 references files in ofed: sys/modules/mlx5/Makefile:CFLAGS+=3D -I${.CURDIR}/../../ofed/include Whether or not this is a typo is a good question *shrugs*. I tried = building the mlx4/mthca modules on vanilla FreeBSD and ran into some = minor speed bumps due to changes in module dependencies and options; = options LINUXCOMPAT was one of the items =E2=80=94 mlxen instead of = mlx4en was another minor inconsistency that didn=E2=80=99t make sense=E2=80= =A6 Thanks! -NGie= From owner-svn-src-all@freebsd.org Mon Nov 23 08:52:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6986A36592; Mon, 23 Nov 2015 08:52:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 814C51D91; Mon, 23 Nov 2015 08:52:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAN8qcpQ094057; Mon, 23 Nov 2015 08:52:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAN8qcxe094055; Mon, 23 Nov 2015 08:52:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511230852.tAN8qcxe094055@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 08:52:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291179 - in stable/10: contrib/netbsd-tests/kernel tests/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 08:52:39 -0000 Author: ngie Date: Mon Nov 23 08:52:38 2015 New Revision: 291179 URL: https://svnweb.freebsd.org/changeset/base/291179 Log: MFC r290911,r290912: r290911: Ignore EINTR from usleep(3) in try_locks(..) NetBSD's usleep(3) only returns -1/sets errno=EINVAL when `microseconds` is one million or more Submitted by: pho Sponsored by: EMC / Isilon Storage Division r290912: Integrate contrib/netbsd-tests/kernel/t_lockf.c into the FreeBSD test suite as tests/sys/kern/lockf_test Sponsored by: EMC / Isilon Storage Division Modified: stable/10/contrib/netbsd-tests/kernel/t_lockf.c stable/10/tests/sys/kern/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/kernel/t_lockf.c ============================================================================== --- stable/10/contrib/netbsd-tests/kernel/t_lockf.c Mon Nov 23 08:31:41 2015 (r291178) +++ stable/10/contrib/netbsd-tests/kernel/t_lockf.c Mon Nov 23 08:52:38 2015 (r291179) @@ -102,6 +102,9 @@ trylocks(int id) (void)fcntl(fd, F_SETLKW, &fl); if (usleep(sleeptime) < 0) +#if defined(__FreeBSD__) + if (errno != EINTR) +#endif err(1, "usleep"); } printf("%d: done\n", id); Modified: stable/10/tests/sys/kern/Makefile ============================================================================== --- stable/10/tests/sys/kern/Makefile Mon Nov 23 08:31:41 2015 (r291178) +++ stable/10/tests/sys/kern/Makefile Mon Nov 23 08:52:38 2015 (r291179) @@ -1,5 +1,9 @@ # $FreeBSD$ +SRCTOP= ${.CURDIR:H:H:H} +OBJTOP= ${.OBJDIR:H:H:H} +TESTSRC= ${SRCTOP}/contrib/netbsd-tests/kernel + TESTSDIR= ${TESTSBASE}/sys/kern ATF_TESTS_C+= kern_descrip_test @@ -10,9 +14,13 @@ TEST_METADATA.unix_seqpacket_test+= time LDADD.ptrace_test+= -lpthread LDADD.unix_seqpacket_test+= -lpthread +NETBSD_ATF_TESTS_C+= lockf_test + WARNS?= 5 TESTS_SUBDIRS+= acct TESTS_SUBDIRS+= execve +.include + .include From owner-svn-src-all@freebsd.org Mon Nov 23 08:55:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2128AA365E8; Mon, 23 Nov 2015 08:55:16 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D499C1F1C; Mon, 23 Nov 2015 08:55:15 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 97BAF1FE023; Mon, 23 Nov 2015 09:55:13 +0100 (CET) Subject: Re: svn commit: r291170 - head/share/man/man4 To: NGie Cooper References: <201511230043.tAN0hNDY051580@repo.freebsd.org> <5652CFD1.5040508@selasky.org> <5652D07D.3060808@selasky.org> <52D633E7-92B1-49B7-85FF-FE57962B65FB@gmail.com> Cc: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <5652D4DA.3030708@selasky.org> Date: Mon, 23 Nov 2015 09:56:58 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <52D633E7-92B1-49B7-85FF-FE57962B65FB@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 08:55:16 -0000 On 11/23/15 09:44, NGie Cooper wrote: > >> On Nov 23, 2015, at 00:38, Hans Petter Selasky wrote: >> >> On 11/23/15 09:35, Hans Petter Selasky wrote: >>> >>> Hi, >>> >>> Strictly speaking, mlx5 and mlx5en is not under OFED any more, and the >>> manual page should be installed by default. >>> >>> --HPS >> >> Hi, >> >> Maybe for 10-stable it will be under the OFED option, but not for 11-current. > Hi, > Hmm.. does this have to do with the linuxkpi module? Yes, the linuxkpi module is now standalone and outside OFED. OFED mostly is related to infiniband support at the moment and only needed for that. > > Also, technically mlx5 references files in ofed: > > sys/modules/mlx5/Makefile:CFLAGS+= -I${.CURDIR}/../../ofed/include We use one or two header files from there. No C-files. Does this cause any problems for you? In 10-stable it will be possibly be different, because the LinuxKPI resides under sys/ofed still. > Whether or not this is a typo is a good question *shrugs*. > I tried building the mlx4/mthca modules on vanilla FreeBSD and ran into some minor speed bumps due > to changes in module dependencies and options; options LINUXCOMPAT was one of the items > — mlxen instead of mlx4en was another minor inconsistency that didn’t make sense… This is mostly for historical reasons. --HPS From owner-svn-src-all@freebsd.org Mon Nov 23 09:15:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41641A36A74; Mon, 23 Nov 2015 09:15:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AA8B18D3; Mon, 23 Nov 2015 09:15:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAN9FLVZ099856; Mon, 23 Nov 2015 09:15:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAN9FLC5099855; Mon, 23 Nov 2015 09:15:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511230915.tAN9FLC5099855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 09:15:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291180 - head/tests/sys/kern/acct X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 09:15:22 -0000 Author: ngie Date: Mon Nov 23 09:15:20 2015 New Revision: 291180 URL: https://svnweb.freebsd.org/changeset/base/291180 Log: Fix up convert.c generation - Use a temporary file for convert.c to reduce likelihood of an interrupted build resulting in bad code being written to convert.c - Truncate the file instead of appending to it to ensure that the file being touched will not result in duplicate declarations/definitions from kern_acct.c if/when kern_acct.c changes. MFC after: 1 week Modified: head/tests/sys/kern/acct/Makefile Modified: head/tests/sys/kern/acct/Makefile ============================================================================== --- head/tests/sys/kern/acct/Makefile Mon Nov 23 08:52:38 2015 (r291179) +++ head/tests/sys/kern/acct/Makefile Mon Nov 23 09:15:20 2015 (r291180) @@ -6,12 +6,13 @@ ATF_TESTS_C= acct_test CFLAGS+= -I${.OBJDIR} -CLEANFILES+= convert.c +CLEANFILES+= convert.c convert.c.tmp DPSRCS.acct_test= convert.c convert.c: ${SRCTOP}/sys/kern/kern_acct.c sed -n -e 's/log(/syslog(/g' \ - -e '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' ${.ALLSRC} >>${.TARGET} + -e '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' ${.ALLSRC} >${.TARGET}.tmp + mv ${.TARGET}.tmp ${.TARGET} .include From owner-svn-src-all@freebsd.org Mon Nov 23 09:17:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EEA4A36AD3; Mon, 23 Nov 2015 09:17:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 670481A46; Mon, 23 Nov 2015 09:17:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAN9HPWp099960; Mon, 23 Nov 2015 09:17:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAN9HPlq099959; Mon, 23 Nov 2015 09:17:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511230917.tAN9HPlq099959@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 09:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291181 - head/tests/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 09:17:26 -0000 Author: ngie Date: Mon Nov 23 09:17:25 2015 New Revision: 291181 URL: https://svnweb.freebsd.org/changeset/base/291181 Log: Integrate contrib/netbsd-tests/kernel/t_mqueue into the FreeBSD test suite as tests/sys/kern/mqueue_test MFC after: 1 week Modified: head/tests/sys/kern/Makefile Modified: head/tests/sys/kern/Makefile ============================================================================== --- head/tests/sys/kern/Makefile Mon Nov 23 09:15:20 2015 (r291180) +++ head/tests/sys/kern/Makefile Mon Nov 23 09:17:25 2015 (r291181) @@ -14,6 +14,11 @@ LDADD.ptrace_test+= -lpthread LDADD.unix_seqpacket_test+= -lpthread NETBSD_ATF_TESTS_C+= lockf_test +NETBSD_ATF_TESTS_C+= mqueue_test + +CFLAGS.mqueue_test+= -I${SRCTOP}/tests +DPADD.mqueue_test+= ${LIBRT} +LDADD.mqueue_test+= -lrt WARNS?= 5 From owner-svn-src-all@freebsd.org Mon Nov 23 09:22:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDA30A36C99; Mon, 23 Nov 2015 09:22:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A76691DD2; Mon, 23 Nov 2015 09:22:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAN9M16O002846; Mon, 23 Nov 2015 09:22:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAN9M1xp002765; Mon, 23 Nov 2015 09:22:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511230922.tAN9M1xp002765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 09:22: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: r291182 - stable/10/lib/libc/tests/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 09:22:02 -0000 Author: ngie Date: Mon Nov 23 09:22:01 2015 New Revision: 291182 URL: https://svnweb.freebsd.org/changeset/base/291182 Log: MFC r290909: Add some initial tests for SLIST and STAILQ macros Sponsored by: EMC / Isilon Storage Division Added: stable/10/lib/libc/tests/sys/queue_test.c - copied unchanged from r290909, head/lib/libc/tests/sys/queue_test.c Modified: stable/10/lib/libc/tests/sys/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/sys/Makefile ============================================================================== --- stable/10/lib/libc/tests/sys/Makefile Mon Nov 23 09:17:25 2015 (r291181) +++ stable/10/lib/libc/tests/sys/Makefile Mon Nov 23 09:22:01 2015 (r291182) @@ -4,6 +4,8 @@ TESTSDIR= ${TESTSBASE}/lib/libc/sys +ATF_TESTS_C+= queue_test + # TODO: clone, lwp_create, lwp_ctl, posix_fadvise, recvmmsg, # swapcontext NETBSD_ATF_TESTS_C+= access_test Copied: stable/10/lib/libc/tests/sys/queue_test.c (from r290909, head/lib/libc/tests/sys/queue_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/sys/queue_test.c Mon Nov 23 09:22:01 2015 (r291182, copy of r290909, head/lib/libc/tests/sys/queue_test.c) @@ -0,0 +1,237 @@ +/*- + * Copyright (c) 2015 EMC Corp. + * 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 + +ATF_TC(slist_test); +ATF_TC_HEAD(slist_test, tc) +{ + + atf_tc_set_md_var(tc, "descr", "SLIST macro feature tests"); +} + +ATF_TC_BODY(slist_test, tc) +{ + SLIST_HEAD(stailhead, entry) head = SLIST_HEAD_INITIALIZER(head); + struct entry { + SLIST_ENTRY(entry) entries; + int i; + } *n1, *n2, *n3, *np; + int i, j, length; + + SLIST_INIT(&head); + + printf("Ensuring SLIST_EMPTY works\n"); + + ATF_REQUIRE(SLIST_EMPTY(&head)); + + i = length = 0; + + SLIST_FOREACH(np, &head, entries) { + length++; + } + ATF_REQUIRE_EQ(length, 0); + + printf("Ensuring SLIST_INSERT_HEAD works\n"); + + n1 = malloc(sizeof(struct entry)); + ATF_REQUIRE(n1 != NULL); + n1->i = i++; + + SLIST_INSERT_HEAD(&head, n1, entries); + + printf("Ensuring SLIST_FIRST returns element 1\n"); + ATF_REQUIRE_EQ(SLIST_FIRST(&head), n1); + + j = length = 0; + SLIST_FOREACH(np, &head, entries) { + ATF_REQUIRE_EQ_MSG(np->i, j, + "%d (entry counter) != %d (counter)", np->i, j); + j++; + length++; + } + ATF_REQUIRE_EQ(length, 1); + + printf("Ensuring SLIST_INSERT_AFTER works\n"); + + n2 = malloc(sizeof(struct entry)); + ATF_REQUIRE(n2 != NULL); + n2->i = i++; + + SLIST_INSERT_AFTER(n1, n2, entries); + + n3 = malloc(sizeof(struct entry)); + ATF_REQUIRE(n3 != NULL); + n3->i = i++; + + SLIST_INSERT_AFTER(n2, n3, entries); + + j = length = 0; + SLIST_FOREACH(np, &head, entries) { + ATF_REQUIRE_EQ_MSG(np->i, j, + "%d (entry counter) != %d (counter)", np->i, j); + j++; + length++; + } + ATF_REQUIRE_EQ(length, 3); + + printf("Ensuring SLIST_REMOVE_HEAD works\n"); + + printf("Ensuring SLIST_FIRST returns element 1\n"); + ATF_REQUIRE_EQ(SLIST_FIRST(&head), n1); + + SLIST_REMOVE_HEAD(&head, entries); + + printf("Ensuring SLIST_FIRST now returns element 2\n"); + ATF_REQUIRE_EQ(SLIST_FIRST(&head), n2); + + j = 1; /* Starting point's 1 this time */ + length = 0; + SLIST_FOREACH(np, &head, entries) { + ATF_REQUIRE_EQ_MSG(np->i, j, + "%d (entry counter) != %d (counter)", np->i, j); + j++; + length++; + } + ATF_REQUIRE_EQ(length, 2); + + printf("Ensuring SLIST_REMOVE_AFTER works by removing the tail\n"); + + SLIST_REMOVE_AFTER(n2, entries); + + j = 1; /* Starting point's 1 this time */ + length = 0; + SLIST_FOREACH(np, &head, entries) { + ATF_REQUIRE_EQ_MSG(np->i, j, + "%d (entry counter) != %d (counter)", np->i, j); + j++; + length++; + } + ATF_REQUIRE_EQ(length, 1); + + printf("Ensuring SLIST_FIRST returns element 2\n"); + ATF_REQUIRE_EQ(SLIST_FIRST(&head), n2); + +} + +ATF_TC(stailq_test); +ATF_TC_HEAD(stailq_test, tc) +{ + + atf_tc_set_md_var(tc, "descr", "STAILQ macro feature tests"); +} + +ATF_TC_BODY(stailq_test, tc) +{ + STAILQ_HEAD(stailhead, entry) head = STAILQ_HEAD_INITIALIZER(head); + struct entry { + STAILQ_ENTRY(entry) entries; + int i; + } *n1, *n2, *n3, *np; + int i, j, length; + + printf("Ensuring empty STAILQs are treated properly\n"); + STAILQ_INIT(&head); + ATF_REQUIRE(STAILQ_EMPTY(&head)); + + i = length = 0; + + STAILQ_FOREACH(np, &head, entries) { + length++; + } + ATF_REQUIRE_EQ(length, 0); + + printf("Ensuring STAILQ_INSERT_HEAD works\n"); + + n1 = malloc(sizeof(struct entry)); + ATF_REQUIRE(n1 != NULL); + n1->i = i++; + + STAILQ_INSERT_HEAD(&head, n1, entries); + + j = length = 0; + STAILQ_FOREACH(np, &head, entries) { + ATF_REQUIRE_EQ_MSG(np->i, j, + "%d (entry counter) != %d (counter)", np->i, j); + j++; + length++; + } + ATF_REQUIRE_EQ(length, 1); + + printf("Ensuring STAILQ_INSERT_TAIL works\n"); + + n2 = malloc(sizeof(struct entry)); + ATF_REQUIRE(n2 != NULL); + n2->i = i++; + + STAILQ_INSERT_TAIL(&head, n2, entries); + + n3 = malloc(sizeof(struct entry)); + ATF_REQUIRE(n3 != NULL); + n3->i = i++; + + STAILQ_INSERT_TAIL(&head, n3, entries); + + j = length = 0; + STAILQ_FOREACH(np, &head, entries) { + ATF_REQUIRE_EQ_MSG(np->i, j, + "%d (entry counter) != %d (counter)", np->i, j); + j++; + length++; + } + ATF_REQUIRE_EQ(length, 3); + + printf("Ensuring STAILQ_REMOVE_HEAD works\n"); + + STAILQ_REMOVE_HEAD(&head, entries); + + j = 1; /* Starting point's 1 this time */ + length = 0; + STAILQ_FOREACH(np, &head, entries) { + ATF_REQUIRE_EQ_MSG(np->i, j, + "%d (entry counter) != %d (counter)", np->i, j); + j++; + length++; + } + ATF_REQUIRE_EQ(length, 2); + +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, slist_test); + ATF_TP_ADD_TC(tp, stailq_test); + + return (atf_no_error()); +} From owner-svn-src-all@freebsd.org Mon Nov 23 09:26:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3533DA36DB7; Mon, 23 Nov 2015 09:26:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 008011FE6; Mon, 23 Nov 2015 09:26:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAN9QsiC003080; Mon, 23 Nov 2015 09:26:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAN9Qsxg003078; Mon, 23 Nov 2015 09:26:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511230926.tAN9Qsxg003078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 09:26: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: r291183 - in stable/10: etc/mtree tests/sys/kern tests/sys/kern/pipe tools/regression/pipe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 09:26:55 -0000 Author: ngie Date: Mon Nov 23 09:26:53 2015 New Revision: 291183 URL: https://svnweb.freebsd.org/changeset/base/291183 Log: MFC r290914: Integrate tools/regression/pipe in to the FreeBSD test suite as tests/sys/kern/pipe - Fix style(9) bugs - Fix compiler warnings - Use `nitems(x)` instead of `sizeof(x) / sizeof(*x)` pattern The testcases will be converted over to ATF eventually, but for now will be integrated in as plain C tests Sponsored by: EMC / Isilon Storage Division Added: stable/10/tests/sys/kern/pipe/ - copied from r290914, head/tests/sys/kern/pipe/ Deleted: stable/10/tools/regression/pipe/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/tests/sys/kern/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Mon Nov 23 09:22:01 2015 (r291182) +++ stable/10/etc/mtree/BSD.tests.dist Mon Nov 23 09:26:53 2015 (r291183) @@ -201,6 +201,8 @@ .. execve .. + pipe + .. .. kqueue .. Modified: stable/10/tests/sys/kern/Makefile ============================================================================== --- stable/10/tests/sys/kern/Makefile Mon Nov 23 09:22:01 2015 (r291182) +++ stable/10/tests/sys/kern/Makefile Mon Nov 23 09:26:53 2015 (r291183) @@ -20,6 +20,7 @@ WARNS?= 5 TESTS_SUBDIRS+= acct TESTS_SUBDIRS+= execve +TESTS_SUBDIRS+= pipe .include From owner-svn-src-all@freebsd.org Mon Nov 23 09:32:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E8ABA3500B; Mon, 23 Nov 2015 09:32:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE313145D; Mon, 23 Nov 2015 09:32:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAN9WXhM005903; Mon, 23 Nov 2015 09:32:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAN9WWHZ005893; Mon, 23 Nov 2015 09:32:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511230932.tAN9WWHZ005893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 23 Nov 2015 09: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: r291184 - in stable/10/sys: dev/mlx5 dev/mlx5/mlx5_core dev/mlx5/mlx5_en modules/mlx5 modules/mlx5en X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 09:32:34 -0000 Author: hselasky Date: Mon Nov 23 09:32:32 2015 New Revision: 291184 URL: https://svnweb.freebsd.org/changeset/base/291184 Log: MFC r290650, r290709, r291067, r291068, r291069 and r291070: Add mlx5 and mlx5en driver(s) for ConnectX-4 and ConnectX-4LX cards from Mellanox Technologies. The current driver supports ethernet speeds up to and including 100 GBit/s. Infiniband support will be done later. The code added is not compiled by default, which will be done by a separate commit. Sponsored by: Mellanox Technologies Differential Revision: https://reviews.freebsd.org/D4177 Differential Revision: https://reviews.freebsd.org/D4178 Differential Revision: https://reviews.freebsd.org/D4179 Differential Revision: https://reviews.freebsd.org/D4180 Added: stable/10/sys/dev/mlx5/ - copied from r290650, head/sys/dev/mlx5/ stable/10/sys/modules/mlx5/ - copied from r290650, head/sys/modules/mlx5/ stable/10/sys/modules/mlx5en/ - copied from r290650, head/sys/modules/mlx5en/ Modified: stable/10/sys/dev/mlx5/mlx5_core/mlx5_health.c stable/10/sys/dev/mlx5/mlx5_en/en.h stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c stable/10/sys/dev/mlx5/mlx5_en/tcp_tlro.c stable/10/sys/dev/mlx5/mlx5_en/tcp_tlro.h stable/10/sys/modules/mlx5/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/mlx5_core/mlx5_health.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_health.c Tue Nov 10 12:20:22 2015 (r290650) +++ stable/10/sys/dev/mlx5/mlx5_core/mlx5_health.c Mon Nov 23 09:32:32 2015 (r291184) @@ -115,7 +115,7 @@ static void print_health_info(struct mlx printf("mlx5_core: INFO: ""ext_sync 0x%04x\n", read_be16(&h->ext_sync)); } -static void poll_health(uintptr_t data) +static void poll_health(unsigned long data) { struct mlx5_core_dev *dev = (struct mlx5_core_dev *)data; struct mlx5_core_health *health = &dev->priv.health; @@ -155,7 +155,7 @@ void mlx5_start_health_poll(struct mlx5_ health->health = &dev->iseg->health; health->health_counter = &dev->iseg->health_counter; - setup_timer(&health->timer, poll_health, (uintptr_t)dev); + setup_timer(&health->timer, poll_health, (unsigned long)dev); mod_timer(&health->timer, round_jiffies(jiffies + MLX5_HEALTH_POLL_INTERVAL)); } Modified: stable/10/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- head/sys/dev/mlx5/mlx5_en/en.h Tue Nov 10 12:20:22 2015 (r290650) +++ stable/10/sys/dev/mlx5/mlx5_en/en.h Mon Nov 23 09:32:32 2015 (r291184) @@ -74,9 +74,9 @@ #define MLX5E_PARAMS_MAXIMUM_LOG_RQ_SIZE 0xd /* freeBSD HW LRO is limited by 16KB - the size of max mbuf */ -#define MLX5E_PARAMS_DEFAULT_LRO_WQE_SZ MJUM16BYTES +#define MLX5E_PARAMS_DEFAULT_LRO_WQE_SZ MJUM16BYTES #define MLX5E_PARAMS_DEFAULT_RX_CQ_MODERATION_USEC 0x10 -#define MLX5E_PARAMS_DEFAULT_RX_CQ_MODERATION_USEC_FROM_CQE 0x3 +#define MLX5E_PARAMS_DEFAULT_RX_CQ_MODERATION_USEC_FROM_CQE 0x3 #define MLX5E_PARAMS_DEFAULT_RX_CQ_MODERATION_PKTS 0x20 #define MLX5E_PARAMS_DEFAULT_TX_CQ_MODERATION_USEC 0x10 #define MLX5E_PARAMS_DEFAULT_TX_CQ_MODERATION_PKTS 0x20 @@ -89,13 +89,14 @@ ((swmtu) + (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN + ETHER_CRC_LEN)) #define MLX5E_SW2MB_MTU(swmtu) \ (MLX5E_SW2HW_MTU(swmtu) + MLX5E_NET_IP_ALIGN) -#define MLX5E_MTU_MIN 72 /* Min MTU allowed by the kernel */ -#define MLX5E_MTU_MAX MIN(ETHERMTU_JUMBO, MJUM16BYTES) /* Max MTU of Ethernet jumbo frames */ +#define MLX5E_MTU_MIN 72 /* Min MTU allowed by the kernel */ +#define MLX5E_MTU_MAX MIN(ETHERMTU_JUMBO, MJUM16BYTES) /* Max MTU of Ethernet + * jumbo frames */ #define MLX5E_BUDGET_MAX 8192 /* RX and TX */ #define MLX5E_RX_BUDGET_MAX 256 #define MLX5E_SQ_BF_BUDGET 16 -#define MLX5E_SQ_TX_QUEUE_SIZE 4096 /* SQ drbr queue size */ +#define MLX5E_SQ_TX_QUEUE_SIZE 4096 /* SQ drbr queue size */ #define MLX5E_MAX_TX_NUM_TC 8 /* units */ #define MLX5E_MAX_TX_HEADER 128 /* bytes */ @@ -141,6 +142,7 @@ typedef void (mlx5e_cq_comp_t)(struct ml m(+1, u64 rx_broadcast_bytes, "rx_broadcast_bytes", "Received broadcast bytes") \ m(+1, u64 tx_broadcast_packets, "tx_broadcast_packets", "Transmitted broadcast packets") \ m(+1, u64 tx_broadcast_bytes, "tx_broadcast_bytes", "Transmitted broadcast bytes") \ + m(+1, u64 rx_out_of_buffer, "rx_out_of_buffer", "Receive out of buffer, no recv wqes events") \ /* SW counters */ \ m(+1, u64 tso_packets, "tso_packets", "Transmitted TSO packets") \ m(+1, u64 tso_bytes, "tso_bytes", "Transmitted TSO bytes") \ @@ -158,9 +160,10 @@ typedef void (mlx5e_cq_comp_t)(struct ml #define MLX5E_VPORT_STATS_NUM (0 MLX5E_VPORT_STATS(MLX5E_STATS_COUNT)) struct mlx5e_vport_stats { - struct sysctl_ctx_list ctx; + struct sysctl_ctx_list ctx; u64 arg [0]; MLX5E_VPORT_STATS(MLX5E_STATS_VAR) + u32 rx_out_of_buffer_prev; }; #define MLX5E_PPORT_IEEE802_3_STATS(m) \ @@ -224,7 +227,7 @@ struct mlx5e_vport_stats { m(+1, u64 out_multicast_pkts, "out_multicast_pkts", "Out multicast packets") \ m(+1, u64 out_broadcast_pkts, "out_broadcast_pkts", "Out broadcast packets") -#define MLX5E_PPORT_PHYSICAL_LAYER_STATS_DEBUG(m) \ +#define MLX5E_PPORT_PHYSICAL_LAYER_STATS_DEBUG(m) \ m(+1, u64 time_since_last_clear, "time_since_last_clear", \ "Time since the last counters clear event (msec)") \ m(+1, u64 symbol_errors, "symbol_errors", "Symbol errors") \ @@ -265,17 +268,13 @@ struct mlx5e_vport_stats { m(+1, u64 rs_corrected_symbols_lane3, "rs_corrected_symbols_lane3", \ "FEC corrected symbol counter lane 3") \ -#define MLX5E_PPORT_Q_CONTERS(m) \ - m(+1, u64 out_of_rx_buffer, "out_of_rx_buffer", "out of rx buffers aka no recv wqes events") - /* * Make sure to update mlx5e_update_pport_counters() * when adding a new MLX5E_PPORT_STATS block */ #define MLX5E_PPORT_STATS(m) \ MLX5E_PPORT_IEEE802_3_STATS(m) \ - MLX5E_PPORT_RFC2819_STATS(m) \ - MLX5E_PPORT_Q_CONTERS(m) + MLX5E_PPORT_RFC2819_STATS(m) #define MLX5E_PORT_STATS_DEBUG(m) \ MLX5E_PPORT_RFC2819_STATS_DEBUG(m) \ @@ -293,19 +292,19 @@ struct mlx5e_vport_stats { (0 MLX5E_PPORT_RFC2819_STATS_DEBUG(MLX5E_STATS_COUNT)) #define MLX5E_PPORT_RFC2863_STATS_DEBUG_NUM \ (0 MLX5E_PPORT_RFC2863_STATS_DEBUG(MLX5E_STATS_COUNT)) -#define MLX5E_PPORT_PHYSICAL_LAYER_STATS_DEBUG_NUM \ +#define MLX5E_PPORT_PHYSICAL_LAYER_STATS_DEBUG_NUM \ (0 MLX5E_PPORT_PHYSICAL_LAYER_STATS_DEBUG(MLX5E_STATS_COUNT)) #define MLX5E_PORT_STATS_DEBUG_NUM \ (0 MLX5E_PORT_STATS_DEBUG(MLX5E_STATS_COUNT)) struct mlx5e_pport_stats { - struct sysctl_ctx_list ctx; + struct sysctl_ctx_list ctx; u64 arg [0]; MLX5E_PPORT_STATS(MLX5E_STATS_VAR) }; struct mlx5e_port_stats_debug { - struct sysctl_ctx_list ctx; + struct sysctl_ctx_list ctx; u64 arg [0]; MLX5E_PORT_STATS_DEBUG(MLX5E_STATS_VAR) }; @@ -322,7 +321,7 @@ struct mlx5e_port_stats_debug { #define MLX5E_RQ_STATS_NUM (0 MLX5E_RQ_STATS(MLX5E_STATS_COUNT)) struct mlx5e_rq_stats { - struct sysctl_ctx_list ctx; + struct sysctl_ctx_list ctx; u64 arg [0]; MLX5E_RQ_STATS(MLX5E_STATS_VAR) }; @@ -339,7 +338,7 @@ struct mlx5e_rq_stats { #define MLX5E_SQ_STATS_NUM (0 MLX5E_SQ_STATS(MLX5E_STATS_COUNT)) struct mlx5e_sq_stats { - struct sysctl_ctx_list ctx; + struct sysctl_ctx_list ctx; u64 arg [0]; MLX5E_SQ_STATS(MLX5E_STATS_VAR) }; @@ -362,8 +361,8 @@ struct mlx5e_params { u16 tx_cq_moderation_usec; u16 tx_cq_moderation_pkts; u16 min_rx_wqes; - bool hw_lro_en; - u32 lro_wqe_sz; + bool hw_lro_en; + u32 lro_wqe_sz; u16 rx_hash_log_tbl_sz; }; @@ -393,31 +392,31 @@ struct mlx5e_params_ethtool { /* EEPROM Standards for plug in modules */ #ifndef MLX5E_ETH_MODULE_SFF_8472 -#define MLX5E_ETH_MODULE_SFF_8472 0x1 -#define MLX5E_ETH_MODULE_SFF_8472_LEN 128 +#define MLX5E_ETH_MODULE_SFF_8472 0x1 +#define MLX5E_ETH_MODULE_SFF_8472_LEN 128 #endif #ifndef MLX5E_ETH_MODULE_SFF_8636 -#define MLX5E_ETH_MODULE_SFF_8636 0x2 -#define MLX5E_ETH_MODULE_SFF_8636_LEN 256 +#define MLX5E_ETH_MODULE_SFF_8636 0x2 +#define MLX5E_ETH_MODULE_SFF_8636_LEN 256 #endif #ifndef MLX5E_ETH_MODULE_SFF_8436 -#define MLX5E_ETH_MODULE_SFF_8436 0x3 -#define MLX5E_ETH_MODULE_SFF_8436_LEN 256 +#define MLX5E_ETH_MODULE_SFF_8436 0x3 +#define MLX5E_ETH_MODULE_SFF_8436_LEN 256 #endif /* EEPROM I2C Addresses */ -#define MLX5E_I2C_ADDR_LOW 0x50 -#define MLX5E_I2C_ADDR_HIGH 0x51 +#define MLX5E_I2C_ADDR_LOW 0x50 +#define MLX5E_I2C_ADDR_HIGH 0x51 -#define MLX5E_EEPROM_LOW_PAGE 0x0 -#define MLX5E_EEPROM_HIGH_PAGE 0x3 +#define MLX5E_EEPROM_LOW_PAGE 0x0 +#define MLX5E_EEPROM_HIGH_PAGE 0x3 -#define MLX5E_EEPROM_HIGH_PAGE_OFFSET 128 -#define MLX5E_EEPROM_PAGE_LENGTH 256 +#define MLX5E_EEPROM_HIGH_PAGE_OFFSET 128 +#define MLX5E_EEPROM_PAGE_LENGTH 256 -#define MLX5E_EEPROM_INFO_BYTES 0x3 +#define MLX5E_EEPROM_INFO_BYTES 0x3 struct mlx5e_cq { /* data path - accessed per cqe */ @@ -432,9 +431,9 @@ struct mlx5e_cq { } __aligned(MLX5E_CACHELINE_SIZE); struct mlx5e_rq_mbuf { - bus_dmamap_t dma_map; - caddr_t data; - struct mbuf *mbuf; + bus_dmamap_t dma_map; + caddr_t data; + struct mbuf *mbuf; }; struct mlx5e_rq { @@ -476,9 +475,9 @@ enum { struct mlx5e_sq { /* data path */ - struct mtx lock; + struct mtx lock; bus_dma_tag_t dma_tag; - struct mtx comp_lock; + struct mtx comp_lock; /* dirtied @completion */ u16 cc; @@ -486,31 +485,31 @@ struct mlx5e_sq { /* dirtied @xmit */ u16 pc __aligned(MLX5E_CACHELINE_SIZE); u16 bf_offset; - struct mlx5e_sq_stats stats; + struct mlx5e_sq_stats stats; - struct mlx5e_cq cq; - struct task sq_task; - struct taskqueue *sq_tq; + struct mlx5e_cq cq; + struct task sq_task; + struct taskqueue *sq_tq; /* pointers to per packet info: write@xmit, read@completion */ - struct mlx5e_sq_mbuf *mbuf; - struct buf_ring *br; + struct mlx5e_sq_mbuf *mbuf; + struct buf_ring *br; /* read only */ - struct mlx5_wq_cyc wq; - void __iomem *uar_map; - void __iomem *uar_bf_map; + struct mlx5_wq_cyc wq; + void __iomem *uar_map; + void __iomem *uar_bf_map; u32 sqn; u32 bf_buf_size; - struct device *pdev; + struct device *pdev; u32 mkey_be; /* control path */ - struct mlx5_wq_ctrl wq_ctrl; - struct mlx5_uar uar; - struct mlx5e_channel *channel; + struct mlx5_wq_ctrl wq_ctrl; + struct mlx5_uar uar; + struct mlx5e_channel *channel; int tc; - unsigned int queue_state; + unsigned int queue_state; } __aligned(MLX5E_CACHELINE_SIZE); static inline bool @@ -618,7 +617,7 @@ struct mlx5e_priv { u32 tdn; struct mlx5_core_mr mr; - struct mlx5e_channel * volatile *channel; + struct mlx5e_channel *volatile *channel; u32 tisn[MLX5E_MAX_TX_NUM_TC]; u32 rqtn; u32 tirn[MLX5E_NUM_TT]; @@ -665,15 +664,15 @@ struct mlx5e_rx_wqe { }; struct mlx5e_eeprom { - int lock_bit; - int i2c_addr; - int page_num; - int device_addr; - int module_num; - int len; - int type; - int page_valid; - u32 *data; + int lock_bit; + int i2c_addr; + int page_num; + int device_addr; + int module_num; + int len; + int type; + int page_valid; + u32 *data; }; enum mlx5e_link_mode { @@ -717,7 +716,7 @@ int mlx5e_close_locked(struct ifnet *); void mlx5e_cq_error_event(struct mlx5_core_cq *mcq, int event); void mlx5e_rx_cq_comp(struct mlx5_core_cq *); void mlx5e_tx_cq_comp(struct mlx5_core_cq *); -struct mlx5_cqe64 *mlx5e_get_cqe(struct mlx5e_cq *cq); +struct mlx5_cqe64 *mlx5e_get_cqe(struct mlx5e_cq *cq); void mlx5e_tx_que(void *context, int pending); int mlx5e_open_flow_table(struct mlx5e_priv *priv); Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Tue Nov 10 12:20:22 2015 (r290650) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c Mon Nov 23 09:32:32 2015 (r291184) @@ -184,8 +184,14 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARG } if (priv->ifp->if_capenable & IFCAP_LRO) priv->params.hw_lro_en = !!MLX5_CAP_ETH(priv->mdev, lro_cap); - } - else { + else { + /* set the correct (0) value to params_ethtool.hw_lro, issue a warning and return error */ + priv->params_ethtool.hw_lro = 0; + error = EINVAL; + if_printf(priv->ifp, "Can't set HW_LRO to a device with LRO turned off"); + goto done; + } + } else { priv->params.hw_lro_en = false; } @@ -236,7 +242,7 @@ mlx5e_get_eeprom_info(struct mlx5e_priv case SFF_8024_ID_QSFPPLUS: case SFF_8024_ID_QSFP28: if ((data & MLX5_EEPROM_IDENTIFIER_BYTE_MASK) == SFF_8024_ID_QSFP28 || - ((data & MLX5_EEPROM_REVISION_ID_BYTE_MASK) >> 8) >= 0x3) { + ((data & MLX5_EEPROM_REVISION_ID_BYTE_MASK) >> 8) >= 0x3) { eeprom->type = MLX5E_ETH_MODULE_SFF_8636; eeprom->len = MLX5E_ETH_MODULE_SFF_8636_LEN; } else { @@ -251,8 +257,9 @@ mlx5e_get_eeprom_info(struct mlx5e_priv eeprom->len = MLX5E_ETH_MODULE_SFF_8472_LEN; break; default: - if_printf(priv->ifp, "%s:%d: Not recognized cable type = 0x%x\n", - __func__, __LINE__, data & MLX5_EEPROM_IDENTIFIER_BYTE_MASK); + if_printf(priv->ifp, "%s:%d: Not recognized cable type = 0x%x(%s)\n", + __func__, __LINE__, data & MLX5_EEPROM_IDENTIFIER_BYTE_MASK, + sff_8024_id[data & MLX5_EEPROM_IDENTIFIER_BYTE_MASK]); return (EINVAL); } return (0); @@ -273,7 +280,7 @@ mlx5e_get_eeprom(struct mlx5e_priv *priv while (ee->device_addr < ee->len) { ret = mlx5_query_eeprom(dev, ee->i2c_addr, ee->page_num, ee->device_addr, ee->len - ee->device_addr, ee->module_num, - ee->data + (ee->device_addr/4), &size_read); + ee->data + (ee->device_addr / 4), &size_read); if (ret) { if_printf(priv->ifp, "%s:%d: Failed reading eeprom, " "error = 0x%02x\n", __func__, __LINE__, ret); @@ -290,8 +297,8 @@ mlx5e_get_eeprom(struct mlx5e_priv *priv while (ee->device_addr < MLX5E_EEPROM_PAGE_LENGTH) { ret = mlx5_query_eeprom(dev, ee->i2c_addr, ee->page_num, ee->device_addr, MLX5E_EEPROM_PAGE_LENGTH - ee->device_addr, - ee->module_num, ee->data + (ee->len/4) + - ((ee->device_addr - MLX5E_EEPROM_HIGH_PAGE_OFFSET)/4), + ee->module_num, ee->data + (ee->len / 4) + + ((ee->device_addr - MLX5E_EEPROM_HIGH_PAGE_OFFSET) / 4), &size_read); if (ret) { if_printf(priv->ifp, "%s:%d: Failed reading eeprom, " @@ -313,9 +320,9 @@ mlx5e_print_eeprom(struct mlx5e_eeprom * printf("\nOffset\t\tValues\n"); printf("------\t\t------\n"); while (row < eeprom->len) { - printf("0x%04x\t\t",row); + printf("0x%04x\t\t", row); for (i = 0; i < 16; i++) { - printf("%02x ", ((u8*)eeprom->data)[j]); + printf("%02x ", ((u8 *)eeprom->data)[j]); j++; row++; } @@ -328,9 +335,9 @@ mlx5e_print_eeprom(struct mlx5e_eeprom * printf("\nOffset\t\tValues\n"); printf("------\t\t------\n"); while (row < MLX5E_EEPROM_PAGE_LENGTH) { - printf("0x%04x\t\t",row); + printf("0x%04x\t\t", row); for (i = 0; i < 16; i++) { - printf("%02x ", ((u8*)eeprom->data)[j]); + printf("%02x ", ((u8 *)eeprom->data)[j]); j++; row++; } @@ -377,8 +384,10 @@ mlx5e_read_eeprom(SYSCTL_HANDLER_ARGS) error = 0; goto done; } - - /* Allocate needed length buffer and additional space for the 3rd */ + /* + * Allocate needed length buffer and additional space for + * page 0x03 + */ eeprom.data = malloc(eeprom.len + MLX5E_EEPROM_PAGE_LENGTH, M_MLX5EN, M_WAITOK | M_ZERO); @@ -388,9 +397,11 @@ mlx5e_read_eeprom(SYSCTL_HANDLER_ARGS) if_printf(priv->ifp, "%s:%d: Failed reading eeprom\n", __func__, __LINE__); error = 0; - /* Continue printing partial information in case of an error */ + /* + * Continue printing partial information in case of + * an error + */ } - mlx5e_print_eeprom(&eeprom); free(eeprom.data, M_MLX5EN); } @@ -490,4 +501,3 @@ mlx5e_create_ethtool(struct mlx5e_priv * CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, priv, 0, mlx5e_read_eeprom, "I", "EEPROM information"); } - Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c Tue Nov 10 12:20:22 2015 (r290650) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c Mon Nov 23 09:32:32 2015 (r291184) @@ -270,7 +270,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e } ai->tt_vec |= (1 << MLX5E_TT_ANY); } - match_criteria_enable = MLX5_MATCH_OUTER_HEADERS; MLX5_SET_TO_ONES(fte_match_param, match_criteria, outer_headers.ethertype); @@ -288,7 +287,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e } ai->tt_vec |= (1 << MLX5E_TT_IPV4); } - if (tt_vec & (1 << MLX5E_TT_IPV6)) { MLX5_SET(fte_match_param, match_value, outer_headers.ethertype, ETHERTYPE_IPV6); @@ -381,7 +379,6 @@ mlx5e_add_eth_addr_rule(struct mlx5e_pri err = -ENOMEM; goto add_eth_addr_rule_out; } - err = mlx5e_add_eth_addr_rule_sub(priv, ai, type, flow_context, match_criteria); if (err) @@ -423,12 +420,12 @@ mlx5e_add_vlan_rule(struct mlx5e_priv *p dest = MLX5_ADDR_OF(flow_context, flow_context, destination); MLX5_SET(flow_context, flow_context, action, - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST); + MLX5_FLOW_CONTEXT_ACTION_FWD_DEST); MLX5_SET(flow_context, flow_context, destination_list_size, 1); MLX5_SET(dest_format_struct, dest, destination_type, - MLX5_FLOW_CONTEXT_DEST_TYPE_FLOW_TABLE); + MLX5_FLOW_CONTEXT_DEST_TYPE_FLOW_TABLE); MLX5_SET(dest_format_struct, dest, destination_id, - mlx5_get_flow_table_id(priv->ft.main)); + mlx5_get_flow_table_id(priv->ft.main)); match_criteria_enable = MLX5_MATCH_OUTER_HEADERS; MLX5_SET_TO_ONES(fte_match_param, match_criteria, Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Tue Nov 10 12:20:22 2015 (r290650) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Mon Nov 23 09:32:32 2015 (r291184) @@ -261,7 +261,6 @@ mlx5e_media_change(struct ifnet *dev) error = EINVAL; goto done; } - link_mode = mlx5e_find_link_mode(IFM_SUBTYPE(priv->media.ifm_media)); error = mlx5_query_port_proto_cap(mdev, ð_proto_cap, MLX5_PTYS_EN); @@ -279,7 +278,6 @@ mlx5e_media_change(struct ifnet *dev) error = EINVAL; goto done; } - mlx5_set_port_status(mdev, MLX5_PORT_DOWN); mlx5_set_port_proto(mdev, link_mode, MLX5_PTYS_EN); mlx5_set_port_status(mdev, MLX5_PORT_UP); @@ -315,7 +313,7 @@ mlx5e_update_pport_counters(struct mlx5e unsigned x; unsigned y; - in = mlx5_vzalloc(sz); + in = mlx5_vzalloc(sz); out = mlx5_vzalloc(sz); if (in == NULL || out == NULL) goto free_out; @@ -334,7 +332,7 @@ mlx5e_update_pport_counters(struct mlx5e for (x = 0; x != MLX5E_PPORT_RFC2819_STATS_NUM; x++, y++) s->arg[y] = be64toh(ptr[x]); for (y = 0; x != MLX5E_PPORT_RFC2819_STATS_NUM + - MLX5E_PPORT_RFC2819_STATS_DEBUG_NUM; x++, y++) + MLX5E_PPORT_RFC2819_STATS_DEBUG_NUM; x++, y++) s_debug->arg[y] = be64toh(ptr[x]); MLX5_SET(ppcnt_reg, in, grp, MLX5_RFC_2863_COUNTERS_GROUP); @@ -343,8 +341,8 @@ mlx5e_update_pport_counters(struct mlx5e s_debug->arg[y] = be64toh(ptr[x]); MLX5_SET(ppcnt_reg, in, grp, MLX5_PHYSICAL_LAYER_COUNTERS_GROUP); - mlx5_core_access_reg(mdev, in, sz, out, sz, MLX5_REG_PPCNT, 0, 0); - for (x = 0; x != MLX5E_PPORT_PHYSICAL_LAYER_STATS_DEBUG_NUM; x++, y++) + mlx5_core_access_reg(mdev, in, sz, out, sz, MLX5_REG_PPCNT, 0, 0); + for (x = 0; x != MLX5E_PPORT_PHYSICAL_LAYER_STATS_DEBUG_NUM; x++, y++) s_debug->arg[y] = be64toh(ptr[x]); free_out: kvfree(in); @@ -364,6 +362,7 @@ mlx5e_update_stats_work(struct work_stru #if (__FreeBSD_version < 1100000) struct ifnet *ifp = priv->ifp; #endif + u32 in[MLX5_ST_SZ_DW(query_vport_counter_in)]; u32 *out; int outlen = MLX5_ST_SZ_BYTES(query_vport_counter_out); @@ -378,7 +377,7 @@ mlx5e_update_stats_work(struct work_stru u64 sw_lro_flushed = 0; u64 rx_csum_none = 0; u64 rx_wqe_err = 0; - u32 out_of_rx_buffer = 0; + u32 rx_out_of_buffer = 0; int i; int j; @@ -440,6 +439,16 @@ mlx5e_update_stats_work(struct work_stru memset(out, 0, outlen); + /* get number of out-of-buffer drops first */ + if (mlx5_vport_query_out_of_rx_buffer(mdev, priv->counter_set_id, + &rx_out_of_buffer)) + goto free_out; + + /* accumulate difference into a 64-bit counter */ + s->rx_out_of_buffer += (u64)(u32)(rx_out_of_buffer - s->rx_out_of_buffer_prev); + s->rx_out_of_buffer_prev = rx_out_of_buffer; + + /* get port statistics */ if (mlx5_cmd_exec(mdev, in, sizeof(in), out, outlen)) goto free_out; @@ -485,7 +494,8 @@ mlx5e_update_stats_work(struct work_stru s->rx_packets = s->rx_unicast_packets + s->rx_multicast_packets + - s->rx_broadcast_packets; + s->rx_broadcast_packets - + s->rx_out_of_buffer; s->rx_bytes = s->rx_unicast_bytes + s->rx_multicast_bytes + @@ -503,10 +513,14 @@ mlx5e_update_stats_work(struct work_stru s->tx_csum_offload = s->tx_packets - tx_offload_none; s->rx_csum_good = s->rx_packets - s->rx_csum_none; + /* Update per port counters */ + mlx5e_update_pport_counters(priv); + #if (__FreeBSD_version < 1100000) /* no get_counters interface in fbsd 10 */ ifp->if_ipackets = s->rx_packets; - ifp->if_ierrors = s->rx_error_packets; + ifp->if_ierrors = s->rx_error_packets; + ifp->if_iqdrops = s->rx_out_of_buffer; ifp->if_opackets = s->tx_packets; ifp->if_oerrors = s->tx_error_packets; ifp->if_snd.ifq_drops = s->tx_queue_dropped; @@ -514,12 +528,6 @@ mlx5e_update_stats_work(struct work_stru ifp->if_obytes = s->tx_bytes; #endif - mlx5_vport_query_out_of_rx_buffer(mdev, priv->counter_set_id, - &out_of_rx_buffer); - - /* Update per port counters */ - mlx5e_update_pport_counters(priv); - priv->stats.pport.out_of_rx_buffer = (u64)out_of_rx_buffer; free_out: kvfree(out); PRIV_UNLOCK(priv); @@ -596,18 +604,18 @@ mlx5e_create_rq(struct mlx5e_channel *c, /* Create DMA descriptor TAG */ if ((err = -bus_dma_tag_create( - bus_get_dma_tag(mdev->pdev->dev.bsddev), - 1, /* any alignment */ - 0, /* no boundary */ - BUS_SPACE_MAXADDR, /* lowaddr */ - BUS_SPACE_MAXADDR, /* highaddr */ - NULL, NULL, /* filter, filterarg */ - MJUM16BYTES, /* maxsize */ - 1, /* nsegments */ - MJUM16BYTES, /* maxsegsize */ - 0, /* flags */ - NULL, NULL, /* lockfunc, lockfuncarg */ - &rq->dma_tag))) + bus_get_dma_tag(mdev->pdev->dev.bsddev), + 1, /* any alignment */ + 0, /* no boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + MJUM16BYTES, /* maxsize */ + 1, /* nsegments */ + MJUM16BYTES, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockfuncarg */ + &rq->dma_tag))) goto done; err = mlx5_wq_ll_create(mdev, ¶m->wq, rqc_wq, &rq->wq, @@ -617,10 +625,9 @@ mlx5e_create_rq(struct mlx5e_channel *c, rq->wq.db = &rq->wq.db[MLX5_RCV_DBR]; - if (priv->params.hw_lro_en) { + if (priv->params.hw_lro_en) { rq->wqe_sz = priv->params.lro_wqe_sz; - } - else { + } else { rq->wqe_sz = MLX5E_SW2MB_MTU(priv->ifp->if_mtu); } if (rq->wqe_sz > MJUM16BYTES) { @@ -642,7 +649,6 @@ mlx5e_create_rq(struct mlx5e_channel *c, err = -ENOMEM; goto err_rq_wq_destroy; } - for (i = 0; i != wq_sz; i++) { struct mlx5e_rx_wqe *wqe = mlx5_wq_ll_get_wqe(&rq->wq, i); uint32_t byte_count = rq->wqe_sz - MLX5E_NET_IP_ALIGN; @@ -744,7 +750,7 @@ mlx5e_enable_rq(struct mlx5e_rq *rq, str MLX5_SET(rqc, rqc, state, MLX5_RQC_STATE_RST); MLX5_SET(rqc, rqc, flush_in_error_en, 1); if (priv->counter_set_id >= 0) - MLX5_SET(rqc, rqc, counter_set_id, priv->counter_set_id); + MLX5_SET(rqc, rqc, counter_set_id, priv->counter_set_id); MLX5_SET(wq, wq, log_wq_pg_sz, rq->wq_ctrl.buf.page_shift - PAGE_SHIFT); MLX5_SET64(wq, wq, dbr_addr, rq->wq_ctrl.db.dma); @@ -929,18 +935,18 @@ mlx5e_create_sq(struct mlx5e_channel *c, /* Create DMA descriptor TAG */ if ((err = -bus_dma_tag_create( - bus_get_dma_tag(mdev->pdev->dev.bsddev), - 1, /* any alignment */ - 0, /* no boundary */ - BUS_SPACE_MAXADDR, /* lowaddr */ - BUS_SPACE_MAXADDR, /* highaddr */ - NULL, NULL, /* filter, filterarg */ - MLX5E_MAX_TX_PAYLOAD_SIZE, /* maxsize */ - MLX5E_MAX_TX_MBUF_FRAGS, /* nsegments */ - MLX5E_MAX_TX_MBUF_SIZE, /* maxsegsize */ - 0, /* flags */ - NULL, NULL, /* lockfunc, lockfuncarg */ - &sq->dma_tag))) + bus_get_dma_tag(mdev->pdev->dev.bsddev), + 1, /* any alignment */ + 0, /* no boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + MLX5E_MAX_TX_PAYLOAD_SIZE, /* maxsize */ + MLX5E_MAX_TX_MBUF_FRAGS, /* nsegments */ + MLX5E_MAX_TX_MBUF_SIZE, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockfuncarg */ + &sq->dma_tag))) goto done; err = mlx5_alloc_map_uar(mdev, &sq->uar); @@ -954,7 +960,7 @@ mlx5e_create_sq(struct mlx5e_channel *c, sq->wq.db = &sq->wq.db[MLX5_SND_DBR]; sq->uar_map = sq->uar.map; - sq->uar_bf_map = sq->uar.bf_map; + sq->uar_bf_map = sq->uar.bf_map; sq->bf_buf_size = (1 << MLX5_CAP_GEN(mdev, log_bf_reg_size)) / 2; err = mlx5e_alloc_sq_db(sq); @@ -983,10 +989,10 @@ mlx5e_create_sq(struct mlx5e_channel *c, err = -ENOMEM; goto err_free_drbr; } + TASK_INIT(&sq->sq_task, 0, mlx5e_tx_que, sq); taskqueue_start_threads(&sq->sq_tq, 1, PI_NET, "%s tx sq", - c->ifp->if_xname); - + c->ifp->if_xname); snprintf(buffer, sizeof(buffer), "txstat%dtc%d", c->ix, tc); mlx5e_create_stats(&sq->stats.ctx, SYSCTL_CHILDREN(priv->sysctl_ifnet), @@ -1418,7 +1424,7 @@ mlx5e_chan_mtx_destroy(struct mlx5e_chan static int mlx5e_open_channel(struct mlx5e_priv *priv, int ix, struct mlx5e_channel_param *cparam, - struct mlx5e_channel * volatile *cp) + struct mlx5e_channel *volatile *cp) { struct mlx5e_channel *c; u8 rx_moderation_mode; @@ -1496,7 +1502,7 @@ err_free: } static void -mlx5e_close_channel(struct mlx5e_channel * volatile *pp) +mlx5e_close_channel(struct mlx5e_channel *volatile *pp) { struct mlx5e_channel *c = *pp; @@ -1508,7 +1514,7 @@ mlx5e_close_channel(struct mlx5e_channel } static void -mlx5e_close_channel_wait(struct mlx5e_channel * volatile *pp) +mlx5e_close_channel_wait(struct mlx5e_channel *volatile *pp) { struct mlx5e_channel *c = *pp; @@ -1805,19 +1811,17 @@ mlx5e_build_tir_ctx(struct mlx5e_priv *p MLX5_HASH_FIELD_SEL_IPSEC_SPI) if (priv->params.hw_lro_en) { - MLX5_SET(tirc, tirc, lro_enable_mask, - MLX5_TIRC_LRO_ENABLE_MASK_IPV4_LRO | - MLX5_TIRC_LRO_ENABLE_MASK_IPV6_LRO); - MLX5_SET(tirc, tirc, lro_max_msg_sz, - (priv->params.lro_wqe_sz - - ROUGH_MAX_L2_L3_HDR_SZ) >> 8); + MLX5_SET(tirc, tirc, lro_enable_mask, + MLX5_TIRC_LRO_ENABLE_MASK_IPV4_LRO | + MLX5_TIRC_LRO_ENABLE_MASK_IPV6_LRO); + MLX5_SET(tirc, tirc, lro_max_msg_sz, + (priv->params.lro_wqe_sz - + ROUGH_MAX_L2_L3_HDR_SZ) >> 8); /* TODO: add the option to choose timer value dynamically */ - MLX5_SET(tirc, tirc, lro_timeout_period_usecs, - MLX5_CAP_ETH(priv->mdev, - lro_timer_supported_periods[2])); + MLX5_SET(tirc, tirc, lro_timeout_period_usecs, + MLX5_CAP_ETH(priv->mdev, + lro_timer_supported_periods[2])); } - - switch (tt) { case MLX5E_TT_ANY: MLX5_SET(tirc, tirc, disp_type, @@ -2011,6 +2015,7 @@ mlx5e_set_dev_port_mtu(struct ifnet *ifp err = mlx5_set_port_mtu(mdev, 0); if (err) return (err); + err = mlx5_query_port_oper_mtu(mdev, &min_mtu); if (err) { if_printf(ifp, "Query port minimal MTU failed\n"); @@ -2178,6 +2183,9 @@ mlx5e_get_counter(struct ifnet *ifp, ift case IFCOUNTER_IERRORS: retval = priv->stats.vport.rx_error_packets; break; + case IFCOUNTER_IQDROPS: + retval = priv->stats.vport.rx_out_of_buffer; + break; case IFCOUNTER_OPACKETS: retval = priv->stats.vport.tx_packets; break; @@ -2330,7 +2338,6 @@ mlx5e_ioctl(struct ifnet *ifp, u_long co ifp->if_capenable ^= IFCAP_RXCSUM; if (mask & IFCAP_RXCSUM_IPV6) ifp->if_capenable ^= IFCAP_RXCSUM_IPV6; - if (mask & IFCAP_TSO4) { if (!(IFCAP_TSO4 & ifp->if_capenable) && !(IFCAP_TXCSUM & ifp->if_capenable)) { @@ -2351,7 +2358,6 @@ mlx5e_ioctl(struct ifnet *ifp, u_long co ifp->if_capenable ^= IFCAP_TSO6; ifp->if_hwassist ^= CSUM_IP6_TSO; } - if (mask & IFCAP_VLAN_HWFILTER) { if (ifp->if_capenable & IFCAP_VLAN_HWFILTER) mlx5e_disable_vlan_filter(priv); @@ -2362,13 +2368,12 @@ mlx5e_ioctl(struct ifnet *ifp, u_long co } if (mask & IFCAP_VLAN_HWTAGGING) ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; - if (mask & IFCAP_WOL_MAGIC) ifp->if_capenable ^= IFCAP_WOL_MAGIC; VLAN_CAPABILITIES(ifp); /* turn off LRO means also turn of HW LRO - if it's on */ - if (mask & IFCAP_LRO ) { + if (mask & IFCAP_LRO) { int was_opened = test_bit(MLX5E_STATE_OPENED, &priv->state); bool need_restart = false; @@ -2378,7 +2383,7 @@ mlx5e_ioctl(struct ifnet *ifp, u_long co priv->params.hw_lro_en = false; need_restart = true; /* Not sure this is the correct way */ - priv->params_ethtool.hw_lro = priv->params.hw_lro_en; + priv->params_ethtool.hw_lro = priv->params.hw_lro_en; } } if (was_opened && need_restart) { @@ -2393,7 +2398,10 @@ out: case SIOCGI2C: ifr = (struct ifreq *)data; - /* Copy from the user-space address ifr_data to the kernel-space address i2c */ + /* + * Copy from the user-space address ifr_data to the + * kernel-space address i2c + */ error = copyin(ifr->ifr_data, &i2c, sizeof(i2c)); if (error) break; @@ -2503,11 +2511,10 @@ mlx5e_build_ifp_priv(struct mlx5_core_de priv->params.default_vlan_prio = 0; priv->counter_set_id = -1; - /* - * hw lro is currently defaulted to off. - * when it won't anymore we will consider the - * HW capability: "!!MLX5_CAP_ETH(mdev, lro_cap)" - */ + /* + * hw lro is currently defaulted to off. when it won't anymore we + * will consider the HW capability: "!!MLX5_CAP_ETH(mdev, lro_cap)" + */ priv->params.hw_lro_en = false; priv->params.lro_wqe_sz = MLX5E_PARAMS_DEFAULT_LRO_WQE_SZ; @@ -2581,11 +2588,12 @@ mlx5e_priv_mtx_destroy(struct mlx5e_priv static int sysctl_firmware(SYSCTL_HANDLER_ARGS) { - /* %d.%d%.d the string format. + /* + * %d.%d%.d the string format. * fw_rev_{maj,min,sub} return u16, 2^16 = 65536. * We need at most 5 chars to store that. - * it also has: two "." and NULL at the end. - * Which means we need 18 (5*3 + 3) chars at most. + * It also has: two "." and NULL at the end, which means we need 18 + * (5*3 + 3) chars at most. */ char fw[18]; struct mlx5e_priv *priv = arg1; @@ -2690,6 +2698,7 @@ mlx5e_create_ifp(struct mlx5_core_dev *m mlx5_core_err(mdev, "SYSCTL_ADD_NODE() failed\n"); goto err_free_sysctl; } + /* HW sysctl tree */ child = SYSCTL_CHILDREN(device_get_sysctl_tree(mdev->pdev->dev.bsddev)); priv->sysctl_hw = SYSCTL_ADD_NODE(&priv->sysctl_ctx, child, @@ -2698,9 +2707,7 @@ mlx5e_create_ifp(struct mlx5_core_dev *m mlx5_core_err(mdev, "SYSCTL_ADD_NODE() failed\n"); goto err_free_sysctl; } - mlx5e_build_ifp_priv(mdev, priv, ncv); - err = mlx5_alloc_map_uar(mdev, &priv->cq_uar); if (err) { if_printf(ifp, "%s: mlx5_alloc_map_uar failed, %d\n", @@ -2713,15 +2720,12 @@ mlx5e_create_ifp(struct mlx5_core_dev *m __func__, err); goto err_unmap_free_uar; } - err = mlx5_alloc_transport_domain(mdev, &priv->tdn); - if (err) { if_printf(ifp, "%s: mlx5_alloc_transport_domain failed, %d\n", - __func__, err); + __func__, err); goto err_dealloc_pd; } - err = mlx5e_create_mkey(priv, priv->pdn, &priv->mr); if (err) { if_printf(ifp, "%s: mlx5e_create_mkey failed, %d\n", Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Tue Nov 10 12:20:22 2015 (r290650) +++ stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Mon Nov 23 09:32:32 2015 (r291184) @@ -95,7 +95,7 @@ mlx5e_post_rx_wqes(struct mlx5e_rq *rq) } static void -mlx5e_lro_update_hdr(struct mbuf* mb, struct mlx5_cqe64 *cqe) +mlx5e_lro_update_hdr(struct mbuf *mb, struct mlx5_cqe64 *cqe) { /* TODO: consider vlans, ip options, ... */ struct ether_header *eh; @@ -109,8 +109,8 @@ mlx5e_lro_update_hdr(struct mbuf* mb, st eh_type = ntohs(eh->ether_type); u8 l4_hdr_type = get_cqe_l4_hdr_type(cqe); - int tcp_ack = ((CQE_L4_HDR_TYPE_TCP_ACK_NO_DATA == l4_hdr_type) || - (CQE_L4_HDR_TYPE_TCP_ACK_AND_DATA == l4_hdr_type)); + int tcp_ack = ((CQE_L4_HDR_TYPE_TCP_ACK_NO_DATA == l4_hdr_type) || + (CQE_L4_HDR_TYPE_TCP_ACK_AND_DATA == l4_hdr_type)); /* TODO: consider vlan */ u16 tot_len = be32_to_cpu(cqe->byte_cnt) - ETHER_HDR_LEN; @@ -131,15 +131,16 @@ mlx5e_lro_update_hdr(struct mbuf* mb, st ts_ptr = (uint32_t *)(th + 1); if (get_cqe_lro_tcppsh(cqe)) - th->th_flags |= TH_PUSH; + th->th_flags |= TH_PUSH; if (tcp_ack) { - th->th_flags |= TH_ACK; - th->th_ack = cqe->lro_ack_seq_num; - th->th_win = cqe->lro_tcp_win; - - /* FreeBSD handles only 32bit aligned timestamp - * right after the TCP hdr + th->th_flags |= TH_ACK; + th->th_ack = cqe->lro_ack_seq_num; + th->th_win = cqe->lro_tcp_win; + + /* + * FreeBSD handles only 32bit aligned timestamp right after + * the TCP hdr * +--------+--------+--------+--------+ * | NOP | NOP | TSopt | 10 | * +--------+--------+--------+--------+ @@ -152,7 +153,8 @@ mlx5e_lro_update_hdr(struct mbuf* mb, st (__predict_true(*ts_ptr) == ntohl(TCPOPT_NOP << 24 | TCPOPT_NOP << 16 | TCPOPT_TIMESTAMP << 8 | TCPOLEN_TIMESTAMP))) { - /* cqe->timestamp is 64bit long. + /* + * cqe->timestamp is 64bit long. * [0-31] - timestamp. * [32-64] - timestamp echo replay. */ @@ -160,15 +162,14 @@ mlx5e_lro_update_hdr(struct mbuf* mb, st ts_ptr[2] = *((uint32_t *)&cqe->timestamp + 1); } } - if (ip4) { - ip4->ip_ttl = cqe->lro_min_ttl; - ip4->ip_len = cpu_to_be16(tot_len); - ip4->ip_sum = 0; - ip4->ip_sum = in_cksum(mb, ip4->ip_hl << 2); + ip4->ip_ttl = cqe->lro_min_ttl; + ip4->ip_len = cpu_to_be16(tot_len); + ip4->ip_sum = 0; + ip4->ip_sum = in_cksum(mb, ip4->ip_hl << 2); } else { - ip6->ip6_hlim = cqe->lro_min_ttl; - ip6->ip6_plen = cpu_to_be16(tot_len - + ip6->ip6_hlim = cqe->lro_min_ttl; + ip6->ip6_plen = cpu_to_be16(tot_len - sizeof(struct ip6_hdr)); } /* TODO: handle tcp checksum */ @@ -180,7 +181,7 @@ mlx5e_build_rx_mbuf(struct mlx5_cqe64 *c u32 cqe_bcnt) { struct ifnet *ifp = rq->ifp; - int lro_num_seg; /* HW LRO session aggregated packets counter */ + int lro_num_seg; /* HW LRO session aggregated packets counter */ lro_num_seg = be32_to_cpu(cqe->srqn) >> 24; if (lro_num_seg > 1) { @@ -195,6 +196,7 @@ mlx5e_build_rx_mbuf(struct mlx5_cqe64 *c mb->m_pkthdr.flowid = be32_to_cpu(cqe->rss_hash_result); else mb->m_pkthdr.flowid = rq->ix; + M_HASHTYPE_SET(mb, M_HASHTYPE_OPAQUE); mb->m_pkthdr.rcvif = ifp; @@ -306,6 +308,7 @@ mlx5e_rx_cq_comp(struct mlx5_core_cq *mc #ifdef HAVE_PER_CQ_EVENT_PACKET struct mbuf *mb = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, rq->wqe_sz); + if (mb != NULL) { /* this code is used for debugging purpose only */ mb->m_pkthdr.len = mb->m_len = 15; Modified: stable/10/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Tue Nov 10 12:20:22 2015 (r290650) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Nov 23 09:33:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E617A350D6; Mon, 23 Nov 2015 09:33:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCCF61843; Mon, 23 Nov 2015 09:33:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAN9XRPC006002; Mon, 23 Nov 2015 09:33:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAN9XR1Y006001; Mon, 23 Nov 2015 09:33:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511230933.tAN9XR1Y006001@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 09:33: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: r291185 - stable/10/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 09:33:29 -0000 Author: ngie Date: Mon Nov 23 09:33:27 2015 New Revision: 291185 URL: https://svnweb.freebsd.org/changeset/base/291185 Log: MFC r291047: Don't leak work if __mlx4_register_vlan(..) fails in mlx4_master_immediate_activate_vlan_qos(..) Differential Revision: https://reviews.freebsd.org/D4203 Submitted by: Miles Olrich Sponsored by: EMC / Isilon Storage Division Modified: stable/10/sys/ofed/drivers/net/mlx4/cmd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/net/mlx4/cmd.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/cmd.c Mon Nov 23 09:32:32 2015 (r291184) +++ stable/10/sys/ofed/drivers/net/mlx4/cmd.c Mon Nov 23 09:33:27 2015 (r291185) @@ -1784,6 +1784,7 @@ static int mlx4_master_immediate_activat mlx4_warn((&priv->dev), "No vlan resources slave %d, port %d\n", slave, port); + kfree(work); return err; } } else { From owner-svn-src-all@freebsd.org Mon Nov 23 09:36:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0013A3523A; Mon, 23 Nov 2015 09:36:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97A361B40; Mon, 23 Nov 2015 09:36:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAN9aPE0006166; Mon, 23 Nov 2015 09:36:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAN9aPUL006165; Mon, 23 Nov 2015 09:36:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511230936.tAN9aPUL006165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 09:36:25 +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: r291186 - stable/9/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 09:36:26 -0000 Author: ngie Date: Mon Nov 23 09:36:25 2015 New Revision: 291186 URL: https://svnweb.freebsd.org/changeset/base/291186 Log: MFstable/10 r291185: MFC r291047: Don't leak work if __mlx4_register_vlan(..) fails in mlx4_master_immediate_activate_vlan_qos(..) Differential Revision: https://reviews.freebsd.org/D4203 Submitted by: Miles Olrich Sponsored by: EMC / Isilon Storage Division Modified: stable/9/sys/ofed/drivers/net/mlx4/cmd.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/net/mlx4/cmd.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/cmd.c Mon Nov 23 09:33:27 2015 (r291185) +++ stable/9/sys/ofed/drivers/net/mlx4/cmd.c Mon Nov 23 09:36:25 2015 (r291186) @@ -1784,6 +1784,7 @@ static int mlx4_master_immediate_activat mlx4_warn((&priv->dev), "No vlan resources slave %d, port %d\n", slave, port); + kfree(work); return err; } } else { From owner-svn-src-all@freebsd.org Mon Nov 23 09:58:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F66DA3594D; Mon, 23 Nov 2015 09:58:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE3461629; Mon, 23 Nov 2015 09:58:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAN9wvTF012011; Mon, 23 Nov 2015 09:58:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAN9wvHE012010; Mon, 23 Nov 2015 09:58:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511230958.tAN9wvHE012010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 09:58: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: r291187 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 09:58:58 -0000 Author: ngie Date: Mon Nov 23 09:58:56 2015 New Revision: 291187 URL: https://svnweb.freebsd.org/changeset/base/291187 Log: MFC r264725: r264725 (by jilles): libc: Add fopen() test to regression Makefile. NOTE (ngie): this is a mergeinfo-only commit Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-all@freebsd.org Mon Nov 23 10:06:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A2AAA35CD2; Mon, 23 Nov 2015 10:06:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2836C1F88; Mon, 23 Nov 2015 10:06:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANA6KtM015076; Mon, 23 Nov 2015 10:06:20 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANA6KFS015072; Mon, 23 Nov 2015 10:06:20 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511231006.tANA6KFS015072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 23 Nov 2015 10:06:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291188 - in head: share/man/man4 sys/dev/isp sys/dev/ispfw sys/modules/ispfw sys/modules/ispfw/isp_1040_it sys/modules/ispfw/isp_1080_it sys/modules/ispfw/isp_12160_it X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 10:06:21 -0000 Author: mav Date: Mon Nov 23 10:06:19 2015 New Revision: 291188 URL: https://svnweb.freebsd.org/changeset/base/291188 Log: Rip off target mode support for parallel SCSI QLogic adapters. Hacks to enable target mode there complicated code, while didn't really work. And for outdated hardware fixing it is not really interesting. Initiator mode tested with Qlogic 1080 adapter is still working fine. Deleted: head/sys/modules/ispfw/isp_1040_it/ head/sys/modules/ispfw/isp_1080_it/ head/sys/modules/ispfw/isp_12160_it/ Modified: head/share/man/man4/isp.4 head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h head/sys/dev/isp/isp_library.c head/sys/dev/isp/isp_library.h head/sys/dev/isp/isp_pci.c head/sys/dev/isp/isp_sbus.c head/sys/dev/isp/isp_target.c head/sys/dev/isp/ispvar.h head/sys/dev/ispfw/asm_1040.h head/sys/dev/ispfw/asm_1080.h head/sys/dev/ispfw/asm_12160.h head/sys/dev/ispfw/ispfw.c head/sys/modules/ispfw/Makefile Modified: head/share/man/man4/isp.4 ============================================================================== --- head/share/man/man4/isp.4 Mon Nov 23 09:58:56 2015 (r291187) +++ head/share/man/man4/isp.4 Mon Nov 23 10:06:19 2015 (r291188) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 29, 2015 +.Dd November 22, 2015 .Dt ISP 4 .Os .Sh NAME @@ -60,31 +60,20 @@ devices. SCSI features include support for Ultra SCSI and wide mode transactions for .Tn SCSI , -Ultra2 LVD (ISP1080, ISP1280), and Ultra3 LVD (ISP12160). +Ultra2 LVD (1080, 1280), and Ultra3 LVD (10160, 12160). .Pp Fibre Channel support uses FCP SCSI profile for .Tn FibreChannel , -and utilizes Class 3 and Class 2 connections (Qlogic 2100 is Class -3 only, minor patches to the Qlogic 2200 to force Class 2 mode). -Support is available for Public and Private loops, and for -point-to-point connections (Qlogic 2200 only). +and utilizes Class 3 and Class 2 (2200 and later) connections. +Support is available for Public and Private loops, Point-to-Point +and Fabric connections. The newer 2-Gigabit cards (2300, 2312, 2322), 4-Gigabit (2422, 2432) -and 8-Gigabit (2532) are also supported. -Command tagging is supported for all (in fact, -.Tn FibreChannel -requires tagging). -Fabric support is enabled by default for other than 2100 cards. -Fabric support for 2100 cards has been so problematic and these cards are so -old now that it is just not worth your time to try it. +and 8-Gigabit (2532) are supported in both initiator and target modes. .Sh FIRMWARE -Firmware is available if the +Firmware loading is supported if the .Xr ispfw 4 -module is loaded during bootstrap (q.v.). -.Pp -It is -.Ar strongly -recommended that you use the firmware available -from +module is loaded. +It is strongly recommended that you use the firmware available from .Xr ispfw 4 as it is the most likely to have been tested with this driver. .Sh HARDWARE @@ -92,53 +81,47 @@ Cards supported by the .Nm driver include: .Bl -tag -width xxxxxx -offset indent -.It ISP1000 -SBus Fast Wide, Ultra Fast Wide cards, Single Ended or Differential -cards. -.It ISP1020 -Qlogic 1020 Fast Wide and Differential Fast Wide PCI cards. -.It ISP1040 -Qlogic 1040 Ultra Wide and Differential Ultra Wide PCI cards. -Also known as the DEC KZPBA-CA (single ended) and KZPBA-CB (HVD differential). +.It Qlogic 1000 +Fast Wide, Ultra Fast Wide cards, Single Ended or Differential SBus cards. .It Qlogic 1020 -Qlogic 1020 SCSI cards. +Fast Wide and Differential Fast Wide SCSI PCI cards. .It Qlogic 1040 -Qlogic 1040 Ultra SCSI cards. +Ultra Wide and Differential Ultra Wide SCSI PCI cards. +Also known as the DEC KZPBA-CA (single ended) and KZPBA-CB (HVD differential). .It Qlogic 1080 -Qlogic 1080 LVD Ultra2 Wide SCSI cards. +LVD Ultra2 Wide SCSI PCI cards. .It Qlogic 10160 -Qlogic 10160 LVD Ultra3 Wide PCI cards. +LVD Ultra3 Wide SCSI PCI cards. .It Qlogic 1240 -Qlogic 1240 Dual Bus Ultra Wide and Differential Ultra Wide PCI cards. +Dual Bus Ultra Wide and Differential Ultra Wide SCSI PCI cards. .It Qlogic 1280 -Qlogic 1280 Dual Bus LVD Ultra2 Wide PCI cards. +Dual Bus LVD Ultra2 Wide SCSI PCI cards. .It Qlogic 12160 -Qlogic 12160 Dual Bus LVD Ultra3 Wide PCI cards. +Dual Bus LVD Ultra3 Wide SCSI PCI cards. .It Qlogic 210X -Qlogic 2100 and 2100A Copper and Optical Fibre Channel Arbitrated -Loop (single, dual). +Copper and Optical Fibre Channel Arbitrated Loop PCI cards (single, dual). .It Qlogic 220X -Qlogic 2200 Copper and Optical Fibre Channel Arbitrated Loop PCI -cards (single, dual, quad). +Copper and Optical Fibre Channel Arbitrated Loop PCI cards (single, dual, quad). .It Qlogic 2300 -Qlogic 2300 Optical 2Gb Fibre Channel PCI cards. +Optical 2Gb Fibre Channel PCI cards. .It Qlogic 2312 -Qlogic 2312 Optical 2Gb Fibre Channel PCI cards. +Optical 2Gb Fibre Channel PCI cards. .It Qlogic 234X -Qlogic 234X Optical 2Gb Fibre Channel PCI cards (2312 chipset, single and dual attach). +Optical 2Gb Fibre Channel PCI cards (2312 chipset, single and dual attach). .It Qlogic 2322 -Qlogic 2322 Optical 2Gb Fibre Channel PCIe cards. +Optical 2Gb Fibre Channel PCIe cards. .It Qlogic 200 Dell branded version of the QLogic 2312. .It Qlogic 2422 -Qlogic 2422 Optical 4Gb Fibre Channel PCI cards. +Optical 4Gb Fibre Channel PCI cards. .It Qlogic 2432 -Qlogic 2432 Optical 4Gb Fibre Channel PCIe cards. +Optical 4Gb Fibre Channel PCIe cards. .It Qlogic 2532 -Qlogic 2532 Optical 8Gb Fibre Channel PCIe cards. +Optical 8Gb Fibre Channel PCIe cards. .El .Sh CONFIGURATION OPTIONS -Target mode support may be enabled with the +Target mode support for 23xx and above Fibre Channel adapters may be +enabled with the .Pp .Cd options ISP_TARGET_MODE .Pp @@ -192,7 +175,8 @@ cards in Local Loop topologies it is .Ar strongly recommended that you set this value to non-zero. .It Va hint.isp.0.role -A hint to define default role for isp instance (target, initiator, both). +A hint to define default role for isp instance (0 -- none, 1 -- target, +2 -- initiator, 3 -- both). .It Va hint.isp.0.debug A hint value for a driver debug level (see the file .Pa /usr/src/sys/dev/isp/ispvar.h @@ -236,5 +220,5 @@ Some later improvement was done by .Sh BUGS The driver currently ignores some NVRAM settings. .Pp -Target mode support works reasonably well for 23xx and above Fibre Channel -cards, but not really tested on older ones. +Fabric support for 2100 cards has been so problematic, and these cards are so +old now that it is just not worth your time to try it. Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Mon Nov 23 09:58:56 2015 (r291187) +++ head/sys/dev/isp/isp.c Mon Nov 23 10:06:19 2015 (r291188) @@ -1089,12 +1089,8 @@ isp_reset(ispsoftc_t *isp, int do_load_d (((uint64_t) mbs.param[17]) << 48); } } - } else if (IS_SCSI(isp)) { -#ifndef ISP_TARGET_MODE - isp->isp_fwattr = ISP_FW_ATTR_TMODE; -#else + } else { isp->isp_fwattr = 0; -#endif } isp_prt(isp, ISP_LOGCONFIG, "Board Type %s, Chip Revision 0x%x, %s F/W Revision %d.%d.%d", @@ -1907,10 +1903,10 @@ isp_fibre_init(ispsoftc_t *isp) icbp->icb_logintime = ICB_LOGIN_TOV; #ifdef ISP_TARGET_MODE - if (IS_23XX(isp) && (icbp->icb_fwoptions & ICBOPT_TGT_ENABLE)) { + if (icbp->icb_fwoptions & ICBOPT_TGT_ENABLE) { icbp->icb_lunenables = 0xffff; - icbp->icb_ccnt = DFLT_CMND_CNT; - icbp->icb_icnt = DFLT_INOT_CNT; + icbp->icb_ccnt = 0xff; + icbp->icb_icnt = 0xff; icbp->icb_lunetimeout = ICB_LUN_ENABLE_TOV; } #endif @@ -4144,14 +4140,6 @@ isp_start(XS_T *xs) } } else { sdparam *sdp = SDPARAM(isp, XS_CHANNEL(xs)); - if ((sdp->role & ISP_ROLE_INITIATOR) == 0) { - isp_prt(isp, ISP_LOGDEBUG1, - "%d.%d.%jx I am not an initiator", - XS_CHANNEL(xs), target, (uintmax_t)XS_LUN(xs)); - XS_SETERR(xs, HBA_SELTIMEOUT); - return (CMD_COMPLETE); - } - if (isp->isp_state != ISP_RUNSTATE) { isp_prt(isp, ISP_LOGERR, "Adapter not at RUNSTATE"); XS_SETERR(xs, HBA_BOTCH); @@ -4759,21 +4747,17 @@ isp_control(ispsoftc_t *isp, ispctl_t ct return (r); } case ISPCTL_CHANGE_ROLE: - { - int role, r; - - va_start(ap, ctl); - chan = va_arg(ap, int); - role = va_arg(ap, int); - va_end(ap); if (IS_FC(isp)) { + int role, r; + + va_start(ap, ctl); + chan = va_arg(ap, int); + role = va_arg(ap, int); + va_end(ap); r = isp_fc_change_role(isp, chan, role); - } else { - SDPARAM(isp, chan)->role = role; - r = 0; + return (r); } - return (r); - } + break; default: isp_prt(isp, ISP_LOGERR, "Unknown Control Opcode 0x%x", ctl); break; @@ -7446,13 +7430,10 @@ isp_setdfltsdparm(ispsoftc_t *isp) sdparam *sdp, *sdp1; sdp = SDPARAM(isp, 0); - sdp->role = GET_DEFAULT_ROLE(isp, 0); - if (IS_DUALBUS(isp)) { + if (IS_DUALBUS(isp)) sdp1 = sdp + 1; - sdp1->role = GET_DEFAULT_ROLE(isp, 1); - } else { + else sdp1 = NULL; - } /* * Establish some default parameters. @@ -7586,7 +7567,7 @@ isp_setdfltfcparm(ispsoftc_t *isp, int c /* * Establish some default parameters. */ - fcp->role = GET_DEFAULT_ROLE(isp, chan); + fcp->role = DEFAULT_ROLE(isp, chan); fcp->isp_maxalloc = ICB_DFLT_ALLOC; fcp->isp_retry_delay = ICB_DFLT_RDELAY; fcp->isp_retry_count = ICB_DFLT_RCOUNT; Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Mon Nov 23 09:58:56 2015 (r291187) +++ head/sys/dev/isp/isp_freebsd.c Mon Nov 23 10:06:19 2015 (r291188) @@ -441,11 +441,13 @@ ispioctl(struct cdev *dev, u_long c, cad if (IS_FC(isp)) { *(int *)addr = FCPARAM(isp, chan)->role; } else { - *(int *)addr = SDPARAM(isp, chan)->role; + *(int *)addr = ISP_ROLE_INITIATOR; } retval = 0; break; case ISP_SETROLE: + if (IS_SCSI(isp)) + break; nr = *(int *)addr; chan = nr >> 8; if (chan < 0 || chan >= isp->isp_nchan) { @@ -458,10 +460,7 @@ ispioctl(struct cdev *dev, u_long c, cad break; } ISP_LOCK(isp); - if (IS_FC(isp)) - *(int *)addr = FCPARAM(isp, chan)->role; - else - *(int *)addr = SDPARAM(isp, chan)->role; + *(int *)addr = FCPARAM(isp, chan)->role; retval = isp_control(isp, ISPCTL_CHANGE_ROLE, chan, nr); ISP_UNLOCK(isp); retval = 0; @@ -774,18 +773,15 @@ isp_intr_enable(void *arg) int chan; ispsoftc_t *isp = arg; ISP_LOCK(isp); - for (chan = 0; chan < isp->isp_nchan; chan++) { - if (IS_FC(isp)) { + if (IS_FC(isp)) { + for (chan = 0; chan < isp->isp_nchan; chan++) { if (FCPARAM(isp, chan)->role != ISP_ROLE_NONE) { ISP_ENABLE_INTS(isp); break; } - } else { - if (SDPARAM(isp, chan)->role != ISP_ROLE_NONE) { - ISP_ENABLE_INTS(isp); - break; - } } + } else { + ISP_ENABLE_INTS(isp); } isp->isp_osinfo.ehook_active = 0; ISP_UNLOCK(isp); @@ -831,9 +827,6 @@ isp_free_pcmd(ispsoftc_t *isp, union ccb * Put the target mode functions here, because some are inlines */ #ifdef ISP_TARGET_MODE -static ISP_INLINE void isp_tmlock(ispsoftc_t *, const char *); -static ISP_INLINE void isp_tmunlk(ispsoftc_t *); -static ISP_INLINE int is_any_lun_enabled(ispsoftc_t *, int); static ISP_INLINE int is_lun_enabled(ispsoftc_t *, int, lun_id_t); static ISP_INLINE tstate_t *get_lun_statep(ispsoftc_t *, int, lun_id_t); static ISP_INLINE tstate_t *get_lun_statep_from_tag(ispsoftc_t *, int, uint32_t); @@ -848,23 +841,16 @@ static ISP_INLINE void isp_put_ntpd(isps static cam_status create_lun_state(ispsoftc_t *, int, struct cam_path *, tstate_t **); static void destroy_lun_state(ispsoftc_t *, tstate_t *); static void isp_enable_lun(ispsoftc_t *, union ccb *); -static cam_status isp_enable_deferred_luns(ispsoftc_t *, int); -static cam_status isp_enable_deferred(ispsoftc_t *, int, lun_id_t); static void isp_disable_lun(ispsoftc_t *, union ccb *); -static int isp_enable_target_mode(ispsoftc_t *, int); -static int isp_disable_target_mode(ispsoftc_t *, int); -static void isp_ledone(ispsoftc_t *, lun_entry_t *); static timeout_t isp_refire_putback_atio; static timeout_t isp_refire_notify_ack; static void isp_complete_ctio(union ccb *); static void isp_target_putback_atio(union ccb *); enum Start_Ctio_How { FROM_CAM, FROM_TIMER, FROM_SRR, FROM_CTIO_DONE }; static void isp_target_start_ctio(ispsoftc_t *, union ccb *, enum Start_Ctio_How); -static void isp_handle_platform_atio(ispsoftc_t *, at_entry_t *); static void isp_handle_platform_atio2(ispsoftc_t *, at2_entry_t *); static void isp_handle_platform_atio7(ispsoftc_t *, at7_entry_t *); static void isp_handle_platform_ctio(ispsoftc_t *, void *); -static void isp_handle_platform_notify_scsi(ispsoftc_t *, in_entry_t *); static void isp_handle_platform_notify_fc(ispsoftc_t *, in_fcentry_t *); static void isp_handle_platform_notify_24xx(ispsoftc_t *, in_fcentry_24xx_t *); static int isp_handle_platform_target_notify_ack(ispsoftc_t *, isp_notify_t *); @@ -872,40 +858,6 @@ static void isp_handle_platform_target_t static void isp_target_mark_aborted(ispsoftc_t *, union ccb *); static void isp_target_mark_aborted_early(ispsoftc_t *, tstate_t *, uint32_t); -static ISP_INLINE void -isp_tmlock(ispsoftc_t *isp, const char *msg) -{ - while (isp->isp_osinfo.tmbusy) { - isp->isp_osinfo.tmwanted = 1; - mtx_sleep(isp, &isp->isp_lock, PRIBIO, msg, 0); - } - isp->isp_osinfo.tmbusy = 1; -} - -static ISP_INLINE void -isp_tmunlk(ispsoftc_t *isp) -{ - isp->isp_osinfo.tmbusy = 0; - if (isp->isp_osinfo.tmwanted) { - isp->isp_osinfo.tmwanted = 0; - wakeup(isp); - } -} - -static ISP_INLINE int -is_any_lun_enabled(ispsoftc_t *isp, int bus) -{ - struct tslist *lhp; - int i; - - for (i = 0; i < LUN_HASH_SIZE; i++) { - ISP_GET_PC_ADDR(isp, bus, lun_hash[i], lhp); - if (SLIST_FIRST(lhp)) - return (1); - } - return (0); -} - static ISP_INLINE int is_lun_enabled(ispsoftc_t *isp, int bus, lun_id_t lun) { @@ -1222,233 +1174,59 @@ destroy_lun_state(ispsoftc_t *isp, tstat free(tptr, M_DEVBUF); } -/* - * Enable a lun. - */ static void isp_enable_lun(ispsoftc_t *isp, union ccb *ccb) { - tstate_t *tptr = NULL; - int bus, tm_enabled, target_role; + tstate_t *tptr; + int bus; target_id_t target; lun_id_t lun; + if (!IS_FC(isp) || !ISP_CAP_TMODE(isp) || !ISP_CAP_SCCFW(isp)) { + xpt_print(ccb->ccb_h.path, "Target mode is not supported\n"); + ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; + xpt_done(ccb); + return; + } /* - * We only support either a wildcard target/lun or a target ID of zero and a non-wildcard lun + * We only support either target and lun both wildcard + * or target and lun both non-wildcard. */ bus = XS_CHANNEL(ccb); target = ccb->ccb_h.target_id; lun = ccb->ccb_h.target_lun; ISP_PATH_PRT(isp, ISP_LOGTDEBUG0|ISP_LOGCONFIG, ccb->ccb_h.path, "enabling lun %jx\n", (uintmax_t)lun); - if (target == CAM_TARGET_WILDCARD && lun != CAM_LUN_WILDCARD) { - ccb->ccb_h.status = CAM_LUN_INVALID; - xpt_done(ccb); - return; - } - - if (target != CAM_TARGET_WILDCARD && lun == CAM_LUN_WILDCARD) { + if ((target == CAM_TARGET_WILDCARD) != (lun == CAM_LUN_WILDCARD)) { ccb->ccb_h.status = CAM_LUN_INVALID; xpt_done(ccb); return; } - if (isp->isp_dblev & ISP_LOGTDEBUG0) { - xpt_print(ccb->ccb_h.path, - "enabling lun 0x%jx on channel %d\n", (uintmax_t)lun, bus); - } - - /* - * Wait until we're not busy with the lun enables subsystem - */ - isp_tmlock(isp, "isp_enable_lun"); - - /* - * This is as a good a place as any to check f/w capabilities. - */ - - if (IS_FC(isp)) { - if (ISP_CAP_TMODE(isp) == 0) { - xpt_print(ccb->ccb_h.path, "firmware does not support target mode\n"); - ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; - goto done; - } - /* - * We *could* handle non-SCCLUN f/w, but we'd have to - * dork with our already fragile enable/disable code. - */ - if (ISP_CAP_SCCFW(isp) == 0) { - xpt_print(ccb->ccb_h.path, "firmware not SCCLUN capable\n"); - ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; - goto done; - } - - target_role = (FCPARAM(isp, bus)->role & ISP_ROLE_TARGET) != 0; - - } else { - target_role = (SDPARAM(isp, bus)->role & ISP_ROLE_TARGET) != 0; - } - /* - * Create the state pointer. - * It should not already exist. - */ + /* Create the state pointer. It should not already exist. */ tptr = get_lun_statep(isp, bus, lun); if (tptr) { ccb->ccb_h.status = CAM_LUN_ALRDY_ENA; - goto done; + xpt_done(ccb); + return; } ccb->ccb_h.status = create_lun_state(isp, bus, ccb->ccb_h.path, &tptr); if (ccb->ccb_h.status != CAM_REQ_CMP) { - goto done; - } - - /* - * We have a tricky maneuver to perform here. - * - * If target mode isn't already enabled here, - * *and* our current role includes target mode, - * we enable target mode here. - * - */ - ISP_GET_PC(isp, bus, tm_enabled, tm_enabled); - if (tm_enabled == 0 && target_role != 0) { - if (isp_enable_target_mode(isp, bus)) { - ccb->ccb_h.status = CAM_REQ_CMP_ERR; - destroy_lun_state(isp, tptr); - tptr = NULL; - goto done; - } - tm_enabled = 1; - } - - /* - * Now check to see whether this bus is in target mode already. - * - * If not, a later role change into target mode will finish the job. - */ - if (tm_enabled == 0) { - ISP_SET_PC(isp, bus, tm_enable_defer, 1); - ccb->ccb_h.status = CAM_REQ_CMP; - xpt_print(ccb->ccb_h.path, "Target Mode not enabled yet- lun enable deferred\n"); - goto done1; - } - - /* - * Enable the lun. - */ - ccb->ccb_h.status = isp_enable_deferred(isp, bus, lun); - -done: - if (ccb->ccb_h.status != CAM_REQ_CMP) { - if (tptr) { - destroy_lun_state(isp, tptr); - tptr = NULL; - } - } else { - tptr->enabled = 1; - } -done1: - if (tptr) { - rls_lun_statep(isp, tptr); + xpt_done(ccb); + return; } - /* - * And we're outta here.... - */ - isp_tmunlk(isp); + rls_lun_statep(isp, tptr); + ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); } -static cam_status -isp_enable_deferred_luns(ispsoftc_t *isp, int bus) -{ - tstate_t *tptr = NULL; - struct tslist *lhp; - int i, n; - - - ISP_GET_PC(isp, bus, tm_enabled, i); - if (i == 1) { - return (CAM_REQ_CMP); - } - ISP_GET_PC(isp, bus, tm_enable_defer, i); - if (i == 0) { - return (CAM_REQ_CMP); - } - /* - * If this succeeds, it will set tm_enable - */ - if (isp_enable_target_mode(isp, bus)) { - return (CAM_REQ_CMP_ERR); - } - isp_tmlock(isp, "isp_enable_deferred_luns"); - for (n = i = 0; i < LUN_HASH_SIZE; i++) { - ISP_GET_PC_ADDR(isp, bus, lun_hash[i], lhp); - SLIST_FOREACH(tptr, lhp, next) { - tptr->hold++; - if (tptr->enabled == 0) { - if (isp_enable_deferred(isp, bus, tptr->ts_lun) == CAM_REQ_CMP) { - tptr->enabled = 1; - n++; - } - } else { - n++; - } - tptr->hold--; - } - } - isp_tmunlk(isp); - if (n == 0) { - return (CAM_REQ_CMP_ERR); - } - ISP_SET_PC(isp, bus, tm_enable_defer, 0); - return (CAM_REQ_CMP); -} - -static cam_status -isp_enable_deferred(ispsoftc_t *isp, int bus, lun_id_t lun) -{ - cam_status status; - int luns_already_enabled; - - ISP_GET_PC(isp, bus, tm_luns_enabled, luns_already_enabled); - isp_prt(isp, ISP_LOGTINFO, "%s: bus %d lun %jx luns_enabled %d", __func__, bus, (uintmax_t)lun, luns_already_enabled); - if (IS_23XX(isp) || IS_24XX(isp) || - (IS_FC(isp) && luns_already_enabled)) { - status = CAM_REQ_CMP; - } else { - int cmd_cnt, not_cnt; - - if (IS_23XX(isp)) { - cmd_cnt = DFLT_CMND_CNT; - not_cnt = DFLT_INOT_CNT; - } else { - cmd_cnt = 64; - not_cnt = 8; - } - status = CAM_REQ_INPROG; - isp->isp_osinfo.rptr = &status; - if (isp_lun_cmd(isp, RQSTYPE_ENABLE_LUN, bus, lun == CAM_LUN_WILDCARD? 0 : lun, cmd_cnt, not_cnt)) { - status = CAM_RESRC_UNAVAIL; - } else { - mtx_sleep(&status, &isp->isp_lock, PRIBIO, "isp_enable_deferred", 0); - } - isp->isp_osinfo.rptr = NULL; - } - if (status == CAM_REQ_CMP) { - ISP_SET_PC(isp, bus, tm_luns_enabled, 1); - isp_prt(isp, ISP_LOGCONFIG|ISP_LOGTINFO, "bus %d lun %jx now enabled for target mode", bus, (uintmax_t)lun); - } - return (status); -} - static void isp_disable_lun(ispsoftc_t *isp, union ccb *ccb) { tstate_t *tptr = NULL; int bus; - cam_status status; target_id_t target; lun_id_t lun; @@ -1457,143 +1235,24 @@ isp_disable_lun(ispsoftc_t *isp, union c lun = ccb->ccb_h.target_lun; ISP_PATH_PRT(isp, ISP_LOGTDEBUG0|ISP_LOGCONFIG, ccb->ccb_h.path, "disabling lun %jx\n", (uintmax_t)lun); - if (target == CAM_TARGET_WILDCARD && lun != CAM_LUN_WILDCARD) { + if ((target == CAM_TARGET_WILDCARD) != (lun == CAM_LUN_WILDCARD)) { ccb->ccb_h.status = CAM_LUN_INVALID; xpt_done(ccb); return; } - if (target != CAM_TARGET_WILDCARD && lun == CAM_LUN_WILDCARD) { - ccb->ccb_h.status = CAM_LUN_INVALID; + /* Find the state pointer. */ + if ((tptr = get_lun_statep(isp, bus, lun)) == NULL) { + ccb->ccb_h.status = CAM_PATH_INVALID; xpt_done(ccb); return; } - /* - * See if we're busy disabling a lun now. - */ - isp_tmlock(isp, "isp_disable_lun"); - status = CAM_REQ_INPROG; - - /* - * Find the state pointer. - */ - if ((tptr = get_lun_statep(isp, bus, lun)) == NULL) { - status = CAM_PATH_INVALID; - goto done; - } - - /* - * If we're a 24XX card, we're done. - */ - if (IS_23XX(isp) || IS_24XX(isp)) { - status = CAM_REQ_CMP; - goto done; - } - - /* - * For SCC FW, we only deal with lun zero. - */ - if (IS_FC(isp) && lun > 0) { - status = CAM_REQ_CMP; - goto done; - } - isp->isp_osinfo.rptr = &status; - if (isp_lun_cmd(isp, RQSTYPE_ENABLE_LUN, bus, lun, 0, 0)) { - status = CAM_RESRC_UNAVAIL; - } else { - mtx_sleep(&status, &isp->isp_lock, PRIBIO, "isp_disable_lun", 0); - } - isp->isp_osinfo.rptr = NULL; -done: - if (status == CAM_REQ_CMP) { - tptr->enabled = 0; - if (is_any_lun_enabled(isp, bus) == 0) { - if (isp_disable_target_mode(isp, bus)) { - status = CAM_REQ_CMP_ERR; - } - } - } - ccb->ccb_h.status = status; - if (status == CAM_REQ_CMP) { - destroy_lun_state(isp, tptr); - xpt_print(ccb->ccb_h.path, "lun now disabled for target mode\n"); - } else { - if (tptr) - rls_lun_statep(isp, tptr); - } - isp_tmunlk(isp); + destroy_lun_state(isp, tptr); + ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); } -static int -isp_enable_target_mode(ispsoftc_t *isp, int bus) -{ - int tm_enabled; - - ISP_GET_PC(isp, bus, tm_enabled, tm_enabled); - if (tm_enabled != 0) { - return (0); - } - if (IS_SCSI(isp)) { - mbreg_t mbs; - MBSINIT(&mbs, MBOX_ENABLE_TARGET_MODE, MBLOGALL, 0); - mbs.param[0] = MBOX_ENABLE_TARGET_MODE; - mbs.param[1] = ENABLE_TARGET_FLAG|ENABLE_TQING_FLAG; - mbs.param[2] = bus << 7; - if (isp_control(isp, ISPCTL_RUN_MBOXCMD, &mbs) < 0 || mbs.param[0] != MBOX_COMMAND_COMPLETE) { - isp_prt(isp, ISP_LOGERR, "Unable to enable Target Role on Bus %d", bus); - return (EIO); - } - } - ISP_SET_PC(isp, bus, tm_enabled, 1); - isp_prt(isp, ISP_LOGINFO, "Target Role enabled on Bus %d", bus); - return (0); -} - -static int -isp_disable_target_mode(ispsoftc_t *isp, int bus) -{ - int tm_enabled; - - ISP_GET_PC(isp, bus, tm_enabled, tm_enabled); - if (tm_enabled == 0) { - return (0); - } - if (IS_SCSI(isp)) { - mbreg_t mbs; - MBSINIT(&mbs, MBOX_ENABLE_TARGET_MODE, MBLOGALL, 0); - mbs.param[2] = bus << 7; - if (isp_control(isp, ISPCTL_RUN_MBOXCMD, &mbs) < 0 || mbs.param[0] != MBOX_COMMAND_COMPLETE) { - isp_prt(isp, ISP_LOGERR, "Unable to disable Target Role on Bus %d", bus); - return (EIO); - } - } - ISP_SET_PC(isp, bus, tm_enabled, 0); - isp_prt(isp, ISP_LOGINFO, "Target Role disabled on Bus %d", bus); - return (0); -} - -static void -isp_ledone(ispsoftc_t *isp, lun_entry_t *lep) -{ - uint32_t *rptr; - - rptr = isp->isp_osinfo.rptr; - if (lep->le_status != LUN_OK) { - isp_prt(isp, ISP_LOGERR, "ENABLE/MODIFY LUN returned 0x%x", lep->le_status); - if (rptr) { - *rptr = CAM_REQ_CMP_ERR; - wakeup_one(rptr); - } - } else { - if (rptr) { - *rptr = CAM_REQ_CMP; - wakeup_one(rptr); - } - } -} - static void isp_target_start_ctio(ispsoftc_t *isp, union ccb *ccb, enum Start_Ctio_How how) { @@ -1891,7 +1550,7 @@ isp_target_start_ctio(ispsoftc_t *isp, u isp_prt(isp, ISP_LOGTDEBUG0, "%s: CTIO7[0x%x] seq %u nc %d CDB0=%x sstatus=0x%x flags=0x%x xfrlen=%u off=%u", __func__, cto->ct_rxid, ATPD_GET_SEQNO(cto), ATPD_GET_NCAM(cto), atp->cdb0, cto->ct_scsi_status, cto->ct_flags, xfrlen, atp->bytes_xfered); } - } else if (IS_FC(isp)) { + } else { ct2_entry_t *cto = (ct2_entry_t *) local; if (isp->isp_osinfo.sixtyfourbit) @@ -2040,41 +1699,6 @@ isp_target_start_ctio(ispsoftc_t *isp, u } isp_prt(isp, ISP_LOGTDEBUG0, "%s: CTIO2[%x] seq %u nc %d CDB0=%x scsi status %x flags %x resid %d xfrlen %u offset %u", __func__, cto->ct_rxid, ATPD_GET_SEQNO(cto), ATPD_GET_NCAM(cto), atp->cdb0, cso->scsi_status, cto->ct_flags, cto->ct_resid, cso->dxfer_len, atp->bytes_xfered); - } else { - ct_entry_t *cto = (ct_entry_t *) local; - - cto->ct_header.rqs_entry_type = RQSTYPE_CTIO; - cto->ct_header.rqs_entry_count = 1; - cto->ct_header.rqs_seqno |= ATPD_SEQ_NOTIFY_CAM; - ATPD_SET_SEQNO(cto, atp); - cto->ct_iid = cso->init_id; - cto->ct_iid |= XS_CHANNEL(ccb) << 7; - cto->ct_tgt = ccb->ccb_h.target_id; - cto->ct_lun = ccb->ccb_h.target_lun; - cto->ct_fwhandle = cso->tag_id; - if (atp->rxid) { - cto->ct_tag_val = atp->rxid; - cto->ct_flags |= CT_TQAE; - } - if (ccb->ccb_h.flags & CAM_DIS_DISCONNECT) { - cto->ct_flags |= CT_NODISC; - } - if (cso->dxfer_len == 0) { - cto->ct_flags |= CT_NO_DATA; - } else if ((cso->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { - cto->ct_flags |= CT_DATA_IN; - } else { - cto->ct_flags |= CT_DATA_OUT; - } - if (ccb->ccb_h.flags & CAM_SEND_STATUS) { - cto->ct_flags |= CT_SENDSTATUS|CT_CCINCR; - cto->ct_scsi_status = cso->scsi_status; - cto->ct_resid = atp->orig_datalen - atp->bytes_xfered - atp->bytes_in_transit - xfrlen; - isp_prt(isp, ISP_LOGTDEBUG0, "%s: CTIO[%x] seq %u nc %d scsi status %x resid %d tag_id %x", __func__, - cto->ct_fwhandle, ATPD_GET_SEQNO(cto), ATPD_GET_NCAM(cto), cso->scsi_status, cso->resid, cso->tag_id); - } - ccb->ccb_h.flags &= ~CAM_SEND_SENSE; - cto->ct_timeout = 10; } if (isp_get_pcmd(isp, ccb)) { @@ -2104,11 +1728,8 @@ isp_target_start_ctio(ispsoftc_t *isp, u if (IS_24XX(isp)) { ct7_entry_t *cto = (ct7_entry_t *) local; cto->ct_syshandle = handle; - } else if (IS_FC(isp)) { - ct2_entry_t *cto = (ct2_entry_t *) local; - cto->ct_syshandle = handle; } else { - ct_entry_t *cto = (ct_entry_t *) local; + ct2_entry_t *cto = (ct2_entry_t *) local; cto->ct_syshandle = handle; } @@ -2167,6 +1788,7 @@ isp_target_putback_atio(union ccb *ccb) ispsoftc_t *isp; struct ccb_scsiio *cso; void *qe; + at2_entry_t local, *at = &local; isp = XS_ISP(ccb); @@ -2180,38 +1802,22 @@ isp_target_putback_atio(union ccb *ccb) } memset(qe, 0, QENTRY_LEN); cso = &ccb->csio; - if (IS_FC(isp)) { - at2_entry_t local, *at = &local; - ISP_MEMZERO(at, sizeof (at2_entry_t)); - at->at_header.rqs_entry_type = RQSTYPE_ATIO2; - at->at_header.rqs_entry_count = 1; - if (ISP_CAP_SCCFW(isp)) { - at->at_scclun = (uint16_t) ccb->ccb_h.target_lun; + ISP_MEMZERO(at, sizeof (at2_entry_t)); + at->at_header.rqs_entry_type = RQSTYPE_ATIO2; + at->at_header.rqs_entry_count = 1; + if (ISP_CAP_SCCFW(isp)) { + at->at_scclun = (uint16_t) ccb->ccb_h.target_lun; #if __FreeBSD_version < 1000700 - if (at->at_scclun >= 256) - at->at_scclun |= 0x4000; + if (at->at_scclun >= 256) + at->at_scclun |= 0x4000; #endif - } else { - at->at_lun = (uint8_t) ccb->ccb_h.target_lun; - } - at->at_status = CT_OK; - at->at_rxid = cso->tag_id; - at->at_iid = cso->ccb_h.target_id; - isp_put_atio2(isp, at, qe); } else { - at_entry_t local, *at = &local; - ISP_MEMZERO(at, sizeof (at_entry_t)); - at->at_header.rqs_entry_type = RQSTYPE_ATIO; - at->at_header.rqs_entry_count = 1; - at->at_iid = cso->init_id; - at->at_iid |= XS_CHANNEL(ccb) << 7; - at->at_tgt = cso->ccb_h.target_id; - at->at_lun = cso->ccb_h.target_lun; - at->at_status = CT_OK; - at->at_tag_val = AT_GET_TAG(cso->tag_id); - at->at_handle = AT_GET_HANDLE(cso->tag_id); - isp_put_atio(isp, at, qe); + at->at_lun = (uint8_t) ccb->ccb_h.target_lun; } + at->at_status = CT_OK; + at->at_rxid = cso->tag_id; + at->at_iid = cso->ccb_h.target_id; + isp_put_atio2(isp, at, qe); ISP_TDQE(isp, "isp_target_putback_atio", isp->isp_reqidx, qe); ISP_SYNC_REQUEST(isp); isp_complete_ctio(ccb); @@ -2226,131 +1832,6 @@ isp_complete_ctio(union ccb *ccb) } } -/* - * Handle ATIO stuff that the generic code can't. - * This means handling CDBs. - */ - -static void -isp_handle_platform_atio(ispsoftc_t *isp, at_entry_t *aep) -{ - tstate_t *tptr; - int status, bus; - struct ccb_accept_tio *atiop; - atio_private_data_t *atp; - - /* - * The firmware status (except for the QLTM_SVALID bit) - * indicates why this ATIO was sent to us. - * - * If QLTM_SVALID is set, the firmware has recommended Sense Data. - * - * If the DISCONNECTS DISABLED bit is set in the flags field, - * we're still connected on the SCSI bus. - */ - status = aep->at_status; - if ((status & ~QLTM_SVALID) == AT_PHASE_ERROR) { - /* - * Bus Phase Sequence error. We should have sense data - * suggested by the f/w. I'm not sure quite yet what - * to do about this for CAM. - */ - isp_prt(isp, ISP_LOGWARN, "PHASE ERROR"); - isp_endcmd(isp, aep, SCSI_STATUS_BUSY, 0); - return; - } - if ((status & ~QLTM_SVALID) != AT_CDB) { - isp_prt(isp, ISP_LOGWARN, "bad atio (0x%x) leaked to platform", status); - isp_endcmd(isp, aep, SCSI_STATUS_BUSY, 0); - return; - } - - bus = GET_BUS_VAL(aep->at_iid); - tptr = get_lun_statep(isp, bus, aep->at_lun); - if (tptr == NULL) { - tptr = get_lun_statep(isp, bus, CAM_LUN_WILDCARD); - if (tptr == NULL) { - /* - * Because we can't autofeed sense data back with - * a command for parallel SCSI, we can't give back - * a CHECK CONDITION. We'll give back a BUSY status - * instead. This works out okay because the only - * time we should, in fact, get this, is in the - * case that somebody configured us without the - * blackhole driver, so they get what they deserve. - */ - isp_endcmd(isp, aep, SCSI_STATUS_BUSY, 0); - return; - } - } - - atp = isp_get_atpd(isp, tptr, aep->at_handle); - atiop = (struct ccb_accept_tio *) SLIST_FIRST(&tptr->atios); - if (atiop == NULL || atp == NULL) { - /* - * Because we can't autofeed sense data back with - * a command for parallel SCSI, we can't give back - * a CHECK CONDITION. We'll give back a QUEUE FULL status - * instead. This works out okay because the only time we - * should, in fact, get this, is in the case that we've - * run out of ATIOS. - */ - xpt_print(tptr->owner, "no %s for lun %x from initiator %d\n", (atp == NULL && atiop == NULL)? "ATIOs *or* ATPS" : - ((atp == NULL)? "ATPs" : "ATIOs"), aep->at_lun, aep->at_iid); - isp_endcmd(isp, aep, SCSI_STATUS_BUSY, 0); - if (atp) { - isp_put_atpd(isp, tptr, atp); - } - rls_lun_statep(isp, tptr); - return; - } - atp->rxid = aep->at_tag_val; - atp->state = ATPD_STATE_ATIO; - SLIST_REMOVE_HEAD(&tptr->atios, sim_links.sle); - tptr->atio_count--; - ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, atiop->ccb_h.path, "Take FREE ATIO count now %d\n", tptr->atio_count); - atiop->ccb_h.target_id = aep->at_tgt; - atiop->ccb_h.target_lun = aep->at_lun; - if (aep->at_flags & AT_NODISC) { - atiop->ccb_h.flags |= CAM_DIS_DISCONNECT; - } else { - atiop->ccb_h.flags &= ~CAM_DIS_DISCONNECT; - } - - if (status & QLTM_SVALID) { - size_t amt = ISP_MIN(QLTM_SENSELEN, sizeof (atiop->sense_data)); - atiop->sense_len = amt; - ISP_MEMCPY(&atiop->sense_data, aep->at_sense, amt); - } else { - atiop->sense_len = 0; - } - - atiop->init_id = GET_IID_VAL(aep->at_iid); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Nov 23 10:10:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65DE4A35EE4; Mon, 23 Nov 2015 10:10:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E47F1390; Mon, 23 Nov 2015 10:10:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANA9xcA015265; Mon, 23 Nov 2015 10:09:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANA9xsT015264; Mon, 23 Nov 2015 10:09:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511231009.tANA9xsT015264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 10:09: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: r291189 - 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 10:10:00 -0000 Author: ngie Date: Mon Nov 23 10:09:59 2015 New Revision: 291189 URL: https://svnweb.freebsd.org/changeset/base/291189 Log: MFC r290870: Add NO_WERROR and WARNS to PROG_OVERRIDE_VARS for bsd.prog.mk compatibility Sponsored by: EMC / Isilon Storage Division Modified: stable/10/share/mk/bsd.progs.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.progs.mk ============================================================================== --- stable/10/share/mk/bsd.progs.mk Mon Nov 23 10:06:19 2015 (r291188) +++ stable/10/share/mk/bsd.progs.mk Mon Nov 23 10:09:59 2015 (r291189) @@ -42,8 +42,8 @@ PROG ?= $t .if defined(PROG) # just one of many -PROG_OVERRIDE_VARS += BINDIR BINGRP BINOWN BINMODE DPSRCS MAN PROGNAME \ - SRCS +PROG_OVERRIDE_VARS += BINDIR BINGRP BINOWN BINMODE DPSRCS MAN NO_WERROR \ + PROGNAME SRCS WARNS PROG_VARS += CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS LDADD LINKS \ LDFLAGS MLINKS ${PROG_OVERRIDE_VARS} .for v in ${PROG_VARS:O:u} From owner-svn-src-all@freebsd.org Mon Nov 23 10:53:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0BA2A30C3E; Mon, 23 Nov 2015 10:53:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D07F1AA6; Mon, 23 Nov 2015 10:53:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANAr2GS029586; Mon, 23 Nov 2015 10:53:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANAr1U4029577; Mon, 23 Nov 2015 10:53:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511231053.tANAr1U4029577@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 10:53: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: r291190 - stable/10/lib/libc/tests/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 10:53:04 -0000 Author: ngie Date: Mon Nov 23 10:53:01 2015 New Revision: 291190 URL: https://svnweb.freebsd.org/changeset/base/291190 Log: MFC r290572,r290646,r290848,r290849: r290572: Integrate tools/regression/lib/libc/gen into the FreeBSD test suite as lib/libc/tests/gen The code in test-fnmatch that was used for generating: - bin/sh/tests/builtins/case2.0 - bin/sh/tests/builtins/case3.0 has been left undisturbed. The target `make sh-tests` has been moved over from tools/regression/lib/libc/gen/Makefile to lib/libc/tests/gen/Makefile and made into a PHONY target case2.0 and case3.0 test input generation isn't being done automatically. This needs additional discussion. Sponsored by: EMC / Isilon Storage Division r290646: Add missing licensing boilerplate to test-fnmatch.c Carry over licensing author info from fnmatch_test.c (jilles@) Sponsored by: EMC / Isilon Storage Division r290848: Fix -Wunused warnings Sponsored by: EMC / Isilon Storage Division r290849: Fix -Wmissing-braces warnings by adding braces around all the testcase inputs Sponsored by: EMC / Isilon Storage Division Added: stable/10/lib/libc/tests/gen/fmtcheck_test.c - copied unchanged from r290572, head/lib/libc/tests/gen/fmtcheck_test.c stable/10/lib/libc/tests/gen/fmtmsg_test.c - copied unchanged from r290572, head/lib/libc/tests/gen/fmtmsg_test.c stable/10/lib/libc/tests/gen/fnmatch_test.c - copied unchanged from r290572, head/lib/libc/tests/gen/fnmatch_test.c stable/10/lib/libc/tests/gen/fnmatch_testcases.h - copied, changed from r290572, head/lib/libc/tests/gen/fnmatch_testcases.h stable/10/lib/libc/tests/gen/ftw_test.c - copied, changed from r290572, head/lib/libc/tests/gen/ftw_test.c stable/10/lib/libc/tests/gen/popen_test.c - copied, changed from r290572, head/lib/libc/tests/gen/popen_test.c stable/10/lib/libc/tests/gen/posix_spawn_test.c - copied unchanged from r290572, head/lib/libc/tests/gen/posix_spawn_test.c stable/10/lib/libc/tests/gen/test-fnmatch.c - copied, changed from r290572, head/lib/libc/tests/gen/test-fnmatch.c stable/10/lib/libc/tests/gen/wordexp_test.c - copied unchanged from r290572, head/lib/libc/tests/gen/wordexp_test.c Modified: stable/10/lib/libc/tests/gen/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/gen/Makefile ============================================================================== --- stable/10/lib/libc/tests/gen/Makefile Mon Nov 23 10:09:59 2015 (r291189) +++ stable/10/lib/libc/tests/gen/Makefile Mon Nov 23 10:53:01 2015 (r291190) @@ -4,8 +4,15 @@ TESTSDIR= ${TESTSBASE}/lib/libc/gen -ATF_TESTS_C= arc4random_test +ATF_TESTS_C+= arc4random_test +ATF_TESTS_C+= fmtcheck2_test +ATF_TESTS_C+= fmtmsg_test +ATF_TESTS_C+= fnmatch2_test ATF_TESTS_C+= fpclassify2_test +ATF_TESTS_C+= ftw_test +ATF_TESTS_C+= popen_test +ATF_TESTS_C+= posix_spawn_test +ATF_TESTS_C+= wordexp_test # TODO: t_closefrom, t_cpuset, t_fmtcheck, t_randomid, t_sleep # TODO: t_siginfo (fixes require further inspection) @@ -55,7 +62,25 @@ DPADD.nice_test+= ${LIBPTHREAD} LDADD.syslog_test+= -lpthread DPADD.syslog_test+= ${LIBPTHREAD} +CFLAGS+= -I${.CURDIR} + +SRCS.fmtcheck2_test= fmtcheck_test.c +SRCS.fnmatch2_test= fnmatch_test.c + TESTS_SUBDIRS= execve TESTS_SUBDIRS+= posix_spawn +# The old testcase name +TEST_FNMATCH= test-fnmatch +CLEANFILES+= ${GEN_SH_CASE_TESTCASES} +sh-tests: .PHONY +.for target in clean obj depend all + @cd ${.CURDIR} && ${MAKE} PROG=${TEST_FNMATCH} \ + -DNO_SUBDIR ${target} +.endfor + @cd ${.OBJDIR} && ./${TEST_FNMATCH} -s 1 > \ + ${SRCTOP}/bin/sh/tests/builtins/case2.0 + @cd ${.OBJDIR} && ./${TEST_FNMATCH} -s 2 > \ + ${SRCTOP}/bin/sh/tests/builtins/case3.0 + .include Copied: stable/10/lib/libc/tests/gen/fmtcheck_test.c (from r290572, head/lib/libc/tests/gen/fmtcheck_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/gen/fmtcheck_test.c Mon Nov 23 10:53:01 2015 (r291190, copy of r290572, head/lib/libc/tests/gen/fmtcheck_test.c) @@ -0,0 +1,105 @@ +/* $NetBSD: tfmtcheck.c,v 1.3 2008/04/28 20:23:04 martin Exp $ */ + +/*- + * Copyright (c) 2000 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code was contributed to The NetBSD Foundation by Allen Briggs. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include + +struct test_fmt { + char *fmt1; + char *fmt2; + int correct; +} test_fmts[] = { + { "%d", "%d", 1 }, + { "%2d", "%2.2d", 1 }, + { "%x", "%d", 1 }, + { "%u", "%d", 1 }, + { "%03d", "%d", 1 }, + { "%-2d", "%d", 1 }, + { "%d", "%-12.1d", 1 }, + { "%d", "%-01.3d", 1 }, + { "%X", "%-01.3d", 1 }, + { "%D", "%ld", 1 }, + { "%s", "%s", 1 }, + { "%s", "This is a %s test", 1 }, + { "Hi, there. This is a %s test", "%s", 1 }, + { "%d", "%s", 2 }, + { "%e", "%s", 2 }, + { "%r", "%d", 2 }, + { "%*.2d", "%*d", 1 }, + { "%2.*d", "%*d", 2 }, + { "%*d", "%*d", 1 }, + { "%-3", "%d", 2 }, + { "%d %s", "%d", 2 }, + { "%*.*.*d", "%*.*.*d", 2 }, + { "%d", "%d %s", 1 }, + { "%40s", "%20s", 1 }, + { "%x %x %x", "%o %u %d", 1 }, + { "%o %u %d", "%x %x %X", 1 }, + { "%#o %u %#-d", "%x %#x %X", 1 }, + { "%qd", "%llx", 1 }, + { "%%", "%llx", 1 }, + { "%p %30s %#llx %-10.*e", "This number %lu%% and string %s has %qd numbers and %.*g floats", 1 }, +}; + +ATF_TC_WITHOUT_HEAD(fmtcheck_test); +ATF_TC_BODY(fmtcheck_test, tc) +{ + int i; + const char *f, *cf, *f1, *f2; + + for (i = 0; i < nitems(test_fmts); i++) { + f1 = test_fmts[i].fmt1; + f2 = test_fmts[i].fmt2; + f = fmtcheck(f1, f2); + if (test_fmts[i].correct == 1) + cf = f1; + else + cf = f2; + ATF_CHECK_MSG(f == cf, + "Test %d: (%s) vs. (%s) failed " + "(should have returned %s)", i + 1, f1, f2, + (test_fmts[i].correct == 1) ? "1st" : "2nd"); + } +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, fmtcheck_test); + + return (atf_no_error()); +} Copied: stable/10/lib/libc/tests/gen/fmtmsg_test.c (from r290572, head/lib/libc/tests/gen/fmtmsg_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/gen/fmtmsg_test.c Mon Nov 23 10:53:01 2015 (r291190, copy of r290572, head/lib/libc/tests/gen/fmtmsg_test.c) @@ -0,0 +1,252 @@ +/*- + * Copyright (c) 2012 Jilles Tjoelker + * 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 + +static char *run_test(long classification, const char *label, int severity, + const char *text, const char *action, const char *tag); + +struct testcase { + long classification; + const char *label; + int severity; + const char *text; + const char *action; + const char *tag; + const char *msgverb; + const char *result; +} testcases[] = { + { + MM_UTIL | MM_PRINT, "BSD:ls", MM_ERROR, + "illegal option -- z", "refer to manual", "BSD:ls:001", + NULL, + "BSD:ls: ERROR: illegal option -- z\n" + "TO FIX: refer to manual BSD:ls:001\n" + }, + { + MM_UTIL | MM_PRINT, "BSD:ls", MM_ERROR, + "illegal option -- z", "refer to manual", "BSD:ls:001", + "text:severity:action:tag", + "illegal option -- z: ERROR\n" + "TO FIX: refer to manual BSD:ls:001\n" + }, + { + MM_UTIL | MM_PRINT, "BSD:ls", MM_ERROR, + "illegal option -- z", "refer to manual", "BSD:ls:001", + "text", + "illegal option -- z\n" + }, + { + MM_UTIL | MM_PRINT, "BSD:ls", MM_ERROR, + "illegal option -- z", "refer to manual", "BSD:ls:001", + "severity:text", + "ERROR: illegal option -- z\n" + }, + { + MM_UTIL | MM_PRINT, "BSD:ls", MM_ERROR, + "illegal option -- z", "refer to manual", "BSD:ls:001", + "ignore me", + "BSD:ls: ERROR: illegal option -- z\n" + "TO FIX: refer to manual BSD:ls:001\n" + }, + { + MM_UTIL | MM_PRINT, "BSD:ls", MM_ERROR, + "illegal option -- z", "refer to manual", "BSD:ls:001", + "tag:severity:text:nothing:action", + "BSD:ls: ERROR: illegal option -- z\n" + "TO FIX: refer to manual BSD:ls:001\n" + }, + { + MM_UTIL | MM_PRINT, "BSD:ls", MM_ERROR, + "illegal option -- z", "refer to manual", "BSD:ls:001", + "", + "BSD:ls: ERROR: illegal option -- z\n" + "TO FIX: refer to manual BSD:ls:001\n" + }, + { + MM_UTIL | MM_PRINT, MM_NULLLBL, MM_ERROR, + "illegal option -- z", "refer to manual", "BSD:ls:001", + NULL, + "ERROR: illegal option -- z\n" + "TO FIX: refer to manual BSD:ls:001\n" + }, + { + MM_UTIL | MM_PRINT, "BSD:ls", MM_ERROR, + "illegal option -- z", MM_NULLACT, MM_NULLTAG, + NULL, + "BSD:ls: ERROR: illegal option -- z\n" + }, + { + MM_UTIL | MM_NULLMC, "BSD:ls", MM_ERROR, + "illegal option -- z", "refer to manual", "BSD:ls:001", + NULL, + "" + }, + { + MM_APPL | MM_PRINT, "ABCDEFGHIJ:abcdefghijklmn", MM_INFO, + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + "refer to manual", "ABCDEFGHIJ:abcdefghijklmn:001", + NULL, + "ABCDEFGHIJ:abcdefghijklmn: INFO: " + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n" + "TO FIX: refer to manual ABCDEFGHIJ:abcdefghijklmn:001\n" + }, + { + MM_OPSYS | MM_PRINT, "TEST:test", MM_HALT, + "failed", "nothing can help me", "NOTHING", + NULL, + "TEST:test: HALT: failed\n" + "TO FIX: nothing can help me NOTHING\n" + }, + { + MM_OPSYS | MM_PRINT, "TEST:test", MM_WARNING, + "failed", "nothing can help me", "NOTHING", + NULL, + "TEST:test: WARNING: failed\n" + "TO FIX: nothing can help me NOTHING\n" + }, + { + MM_OPSYS | MM_PRINT, "TEST:test", MM_NOSEV, + "failed", "nothing can help me", "NOTHING", + NULL, + "TEST:test: failed\n" + "TO FIX: nothing can help me NOTHING\n" + } +}; + +static char * +run_test(long classification, const char *label, int severity, + const char *text, const char *action, const char *tag) +{ + int pip[2]; + pid_t pid, wpid; + char *result, *p; + size_t resultsize; + ssize_t n; + int status; + + if (pipe(pip) == -1) + err(2, "pipe"); + pid = fork(); + if (pid == -1) + err(2, "fork"); + if (pid == 0) { + close(pip[0]); + if (pip[1] != STDERR_FILENO && + dup2(pip[1], STDERR_FILENO) == -1) + _exit(2); + if (fmtmsg(classification, label, severity, text, action, tag) + != MM_OK) + _exit(1); + else + _exit(0); + } + close(pip[1]); + resultsize = 1024; + result = malloc(resultsize); + p = result; + while ((n = read(pip[0], p, result + resultsize - p - 1)) != 0) { + if (n == -1) { + if (errno == EINTR) + continue; + else + err(2, "read"); + } + p += n; + if (result + resultsize == p - 1) { + resultsize *= 2; + result = realloc(result, resultsize); + if (result == NULL) + err(2, "realloc"); + } + } + if (memchr(result, '\0', p - result) != NULL) { + free(result); + return (NULL); + } + *p = '\0'; + close(pip[0]); + while ((wpid = waitpid(pid, &status, 0)) == -1 && errno == EINTR) + ; + if (wpid == -1) + err(2, "waitpid"); + if (status != 0) { + free(result); + return (NULL); + } + return (result); +} + +ATF_TC_WITHOUT_HEAD(fmtmsg_test); +ATF_TC_BODY(fmtmsg_test, tc) +{ + char *result; + struct testcase *t; + int i; + + for (i = 0; i < nitems(testcases); i++) { + t = &testcases[i]; + if (t->msgverb != NULL) + setenv("MSGVERB", t->msgverb, 1); + else + unsetenv("MSGVERB"); + result = run_test(t->classification, t->label, t->severity, + t->text, t->action, t->tag); + ATF_CHECK_MSG(result != NULL, "testcase %d failed", i + 1); + if (result != NULL) + ATF_CHECK_MSG(strcmp(result, t->result) == 0, + "results for testcase %d didn't match; " + "`%s` != `%s`", i + 1, result, t->result); + free(result); + } +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, fmtmsg_test); + + return (atf_no_error()); +} Copied: stable/10/lib/libc/tests/gen/fnmatch_test.c (from r290572, head/lib/libc/tests/gen/fnmatch_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/gen/fnmatch_test.c Mon Nov 23 10:53:01 2015 (r291190, copy of r290572, head/lib/libc/tests/gen/fnmatch_test.c) @@ -0,0 +1,188 @@ +/*- + * Copyright (c) 2010 Jilles Tjoelker + * 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 "fnmatch_testcases.h" + +static const char * +flags_to_string(int flags) +{ + static const int flagvalues[] = { FNM_NOESCAPE, FNM_PATHNAME, + FNM_PERIOD, FNM_LEADING_DIR, FNM_CASEFOLD, 0 }; + static const char flagnames[] = "FNM_NOESCAPE\0FNM_PATHNAME\0FNM_PERIOD\0FNM_LEADING_DIR\0FNM_CASEFOLD\0"; + static char result[sizeof(flagnames) + 3 * sizeof(int) + 2]; + char *p; + size_t i, len; + const char *fp; + + p = result; + fp = flagnames; + for (i = 0; flagvalues[i] != 0; i++) { + len = strlen(fp); + if (flags & flagvalues[i]) { + if (p != result) + *p++ = '|'; + memcpy(p, fp, len); + p += len; + flags &= ~flagvalues[i]; + } + fp += len + 1; + } + if (p == result) + memcpy(p, "0", 2); + else if (flags != 0) + sprintf(p, "%d", flags); + else + *p = '\0'; + return result; +} + +ATF_TC_WITHOUT_HEAD(fnmatch_test); +ATF_TC_BODY(fnmatch_test, tc) +{ + size_t i; + int flags, result; + struct testcase *t; + + for (i = 0; i < nitems(testcases); i++) { + t = &testcases[i]; + flags = t->flags; + do { + result = fnmatch(t->pattern, t->string, flags); + if (result != t->result) + break; + if (strchr(t->pattern, '\\') == NULL && + !(flags & FNM_NOESCAPE)) { + flags |= FNM_NOESCAPE; + result = fnmatch(t->pattern, t->string, flags); + if (result != t->result) + break; + flags = t->flags; + } + if (strchr(t->pattern, '\\') != NULL && + strchr(t->string, '\\') == NULL && + t->result == FNM_NOMATCH && + !(flags & (FNM_NOESCAPE | FNM_LEADING_DIR))) { + flags |= FNM_NOESCAPE; + result = fnmatch(t->pattern, t->string, flags); + if (result != t->result) + break; + flags = t->flags; + } + if ((t->string[0] != '.' || t->pattern[0] == '.' || + t->result == FNM_NOMATCH) && + !(flags & (FNM_PATHNAME | FNM_PERIOD))) { + flags |= FNM_PERIOD; + result = fnmatch(t->pattern, t->string, flags); + if (result != t->result) + break; + flags = t->flags; + } + if ((strchr(t->string, '/') == NULL || + t->result == FNM_NOMATCH) && + !(flags & FNM_PATHNAME)) { + flags |= FNM_PATHNAME; + result = fnmatch(t->pattern, t->string, flags); + if (result != t->result) + break; + flags = t->flags; + } + if ((((t->string[0] != '.' || t->pattern[0] == '.') && + strstr(t->string, "/.") == NULL) || + t->result == FNM_NOMATCH) && + flags & FNM_PATHNAME && !(flags & FNM_PERIOD)) { + flags |= FNM_PERIOD; + result = fnmatch(t->pattern, t->string, flags); + if (result != t->result) + break; + flags = t->flags; + } + if ((((t->string[0] != '.' || t->pattern[0] == '.') && + strchr(t->string, '/') == NULL) || + t->result == FNM_NOMATCH) && + !(flags & (FNM_PATHNAME | FNM_PERIOD))) { + flags |= FNM_PATHNAME | FNM_PERIOD; + result = fnmatch(t->pattern, t->string, flags); + if (result != t->result) + break; + flags = t->flags; + } + if ((strchr(t->string, '/') == NULL || t->result == 0) + && !(flags & FNM_LEADING_DIR)) { + flags |= FNM_LEADING_DIR; + result = fnmatch(t->pattern, t->string, flags); + if (result != t->result) + break; + flags = t->flags; + } + if (t->result == 0 && !(flags & FNM_CASEFOLD)) { + flags |= FNM_CASEFOLD; + result = fnmatch(t->pattern, t->string, flags); + if (result != t->result) + break; + flags = t->flags; + } + if (strchr(t->pattern, '\\') == NULL && + t->result == 0 && + !(flags & (FNM_NOESCAPE | FNM_CASEFOLD))) { + flags |= FNM_NOESCAPE | FNM_CASEFOLD; + result = fnmatch(t->pattern, t->string, flags); + if (result != t->result) + break; + flags = t->flags; + } + } while (0); + + ATF_CHECK(result == t->result); + if (result == t->result) + printf("fnmatch(\"%s\", \"%s\", %s) == %d\n", + t->pattern, t->string, flags_to_string(flags), result); + else + printf("fnmatch(\"%s\", \"%s\", %s) != %d (was %d)\n", + t->pattern, t->string, flags_to_string(flags), + t->result, result); + } + +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, fnmatch_test); + + return (atf_no_error()); +} Copied and modified: stable/10/lib/libc/tests/gen/fnmatch_testcases.h (from r290572, head/lib/libc/tests/gen/fnmatch_testcases.h) ============================================================================== --- head/lib/libc/tests/gen/fnmatch_testcases.h Mon Nov 9 06:24:11 2015 (r290572, copy source) +++ stable/10/lib/libc/tests/gen/fnmatch_testcases.h Mon Nov 23 10:53:01 2015 (r291190) @@ -35,142 +35,142 @@ struct testcase { int flags; int result; } testcases[] = { - "", "", 0, 0, - "a", "a", 0, 0, - "a", "b", 0, FNM_NOMATCH, - "a", "A", 0, FNM_NOMATCH, - "*", "a", 0, 0, - "*", "aa", 0, 0, - "*a", "a", 0, 0, - "*a", "b", 0, FNM_NOMATCH, - "*a*", "b", 0, FNM_NOMATCH, - "*a*b*", "ab", 0, 0, - "*a*b*", "qaqbq", 0, 0, - "*a*bb*", "qaqbqbbq", 0, 0, - "*a*bc*", "qaqbqbcq", 0, 0, - "*a*bb*", "qaqbqbb", 0, 0, - "*a*bc*", "qaqbqbc", 0, 0, - "*a*bb", "qaqbqbb", 0, 0, - "*a*bc", "qaqbqbc", 0, 0, - "*a*bb", "qaqbqbbq", 0, FNM_NOMATCH, - "*a*bc", "qaqbqbcq", 0, FNM_NOMATCH, - "*a*a*a*a*a*a*a*a*a*a*", "aaaaaaaaa", 0, FNM_NOMATCH, - "*a*a*a*a*a*a*a*a*a*a*", "aaaaaaaaaa", 0, 0, - "*a*a*a*a*a*a*a*a*a*a*", "aaaaaaaaaaa", 0, 0, - ".*.*.*.*.*.*.*.*.*.*", ".........", 0, FNM_NOMATCH, - ".*.*.*.*.*.*.*.*.*.*", "..........", 0, 0, - ".*.*.*.*.*.*.*.*.*.*", "...........", 0, 0, - "*?*?*?*?*?*?*?*?*?*?*", "123456789", 0, FNM_NOMATCH, - "??????????*", "123456789", 0, FNM_NOMATCH, - "*??????????", "123456789", 0, FNM_NOMATCH, - "*?*?*?*?*?*?*?*?*?*?*", "1234567890", 0, 0, - "??????????*", "1234567890", 0, 0, - "*??????????", "1234567890", 0, 0, - "*?*?*?*?*?*?*?*?*?*?*", "12345678901", 0, 0, - "??????????*", "12345678901", 0, 0, - "*??????????", "12345678901", 0, 0, - "[x]", "x", 0, 0, - "[*]", "*", 0, 0, - "[?]", "?", 0, 0, - "[", "[", 0, 0, - "[[]", "[", 0, 0, - "[[]", "x", 0, FNM_NOMATCH, - "[*]", "", 0, FNM_NOMATCH, - "[*]", "x", 0, FNM_NOMATCH, - "[?]", "x", 0, FNM_NOMATCH, - "*[*]*", "foo*foo", 0, 0, - "*[*]*", "foo", 0, FNM_NOMATCH, - "[0-9]", "0", 0, 0, - "[0-9]", "5", 0, 0, - "[0-9]", "9", 0, 0, - "[0-9]", "/", 0, FNM_NOMATCH, - "[0-9]", ":", 0, FNM_NOMATCH, - "[0-9]", "*", 0, FNM_NOMATCH, - "[!0-9]", "0", 0, FNM_NOMATCH, - "[!0-9]", "5", 0, FNM_NOMATCH, - "[!0-9]", "9", 0, FNM_NOMATCH, - "[!0-9]", "/", 0, 0, - "[!0-9]", ":", 0, 0, - "[!0-9]", "*", 0, 0, - "*[0-9]", "a0", 0, 0, - "*[0-9]", "a5", 0, 0, - "*[0-9]", "a9", 0, 0, - "*[0-9]", "a/", 0, FNM_NOMATCH, - "*[0-9]", "a:", 0, FNM_NOMATCH, - "*[0-9]", "a*", 0, FNM_NOMATCH, - "*[!0-9]", "a0", 0, FNM_NOMATCH, - "*[!0-9]", "a5", 0, FNM_NOMATCH, - "*[!0-9]", "a9", 0, FNM_NOMATCH, - "*[!0-9]", "a/", 0, 0, - "*[!0-9]", "a:", 0, 0, - "*[!0-9]", "a*", 0, 0, - "*[0-9]", "a00", 0, 0, - "*[0-9]", "a55", 0, 0, - "*[0-9]", "a99", 0, 0, - "*[0-9]", "a0a0", 0, 0, - "*[0-9]", "a5a5", 0, 0, - "*[0-9]", "a9a9", 0, 0, - "\\*", "*", 0, 0, - "\\?", "?", 0, 0, - "\\[x]", "[x]", 0, 0, - "\\[", "[", 0, 0, - "\\\\", "\\", 0, 0, - "*\\**", "foo*foo", 0, 0, - "*\\**", "foo", 0, FNM_NOMATCH, - "*\\\\*", "foo\\foo", 0, 0, - "*\\\\*", "foo", 0, FNM_NOMATCH, - "\\(", "(", 0, 0, - "\\a", "a", 0, 0, - "\\*", "a", 0, FNM_NOMATCH, - "\\?", "a", 0, FNM_NOMATCH, - "\\*", "\\*", 0, FNM_NOMATCH, - "\\?", "\\?", 0, FNM_NOMATCH, - "\\[x]", "\\[x]", 0, FNM_NOMATCH, - "\\[x]", "\\x", 0, FNM_NOMATCH, - "\\[", "\\[", 0, FNM_NOMATCH, - "\\(", "\\(", 0, FNM_NOMATCH, - "\\a", "\\a", 0, FNM_NOMATCH, - "\\", "\\", 0, FNM_NOMATCH, - "\\", "", 0, 0, - "\\*", "\\*", FNM_NOESCAPE, 0, - "\\?", "\\?", FNM_NOESCAPE, 0, - "\\", "\\", FNM_NOESCAPE, 0, - "\\\\", "\\", FNM_NOESCAPE, FNM_NOMATCH, - "\\\\", "\\\\", FNM_NOESCAPE, 0, - "*\\*", "foo\\foo", FNM_NOESCAPE, 0, - "*\\*", "foo", FNM_NOESCAPE, FNM_NOMATCH, - "*", ".", FNM_PERIOD, FNM_NOMATCH, - "?", ".", FNM_PERIOD, FNM_NOMATCH, - ".*", ".", 0, 0, - ".*", "..", 0, 0, - ".*", ".a", 0, 0, - "[0-9]", ".", FNM_PERIOD, FNM_NOMATCH, - "a*", "a.", 0, 0, - "a/a", "a/a", FNM_PATHNAME, 0, - "a/*", "a/a", FNM_PATHNAME, 0, - "*/a", "a/a", FNM_PATHNAME, 0, - "*/*", "a/a", FNM_PATHNAME, 0, - "a*b/*", "abbb/x", FNM_PATHNAME, 0, - "a*b/*", "abbb/.x", FNM_PATHNAME, 0, - "*", "a/a", FNM_PATHNAME, FNM_NOMATCH, - "*/*", "a/a/a", FNM_PATHNAME, FNM_NOMATCH, - "b/*", "b/.x", FNM_PATHNAME | FNM_PERIOD, FNM_NOMATCH, - "b*/*", "a/.x", FNM_PATHNAME | FNM_PERIOD, FNM_NOMATCH, - "b/.*", "b/.x", FNM_PATHNAME | FNM_PERIOD, 0, - "b*/.*", "b/.x", FNM_PATHNAME | FNM_PERIOD, 0, - "a", "A", FNM_CASEFOLD, 0, - "A", "a", FNM_CASEFOLD, 0, - "[a]", "A", FNM_CASEFOLD, 0, - "[A]", "a", FNM_CASEFOLD, 0, - "a", "b", FNM_CASEFOLD, FNM_NOMATCH, - "a", "a/b", FNM_PATHNAME, FNM_NOMATCH, - "*", "a/b", FNM_PATHNAME, FNM_NOMATCH, - "*b", "a/b", FNM_PATHNAME, FNM_NOMATCH, - "a", "a/b", FNM_PATHNAME | FNM_LEADING_DIR, 0, - "*", "a/b", FNM_PATHNAME | FNM_LEADING_DIR, 0, - "*", ".a/b", FNM_PATHNAME | FNM_LEADING_DIR, 0, - "*a", ".a/b", FNM_PATHNAME | FNM_LEADING_DIR, 0, - "*", ".a/b", FNM_PATHNAME | FNM_PERIOD | FNM_LEADING_DIR, FNM_NOMATCH, - "*a", ".a/b", FNM_PATHNAME | FNM_PERIOD | FNM_LEADING_DIR, FNM_NOMATCH, - "a*b/*", "abbb/.x", FNM_PATHNAME | FNM_PERIOD, FNM_NOMATCH, + { "", "", 0, 0 }, + { "a", "a", 0, 0 }, + { "a", "b", 0, FNM_NOMATCH }, + { "a", "A", 0, FNM_NOMATCH }, + { "*", "a", 0, 0 }, + { "*", "aa", 0, 0 }, + { "*a", "a", 0, 0 }, + { "*a", "b", 0, FNM_NOMATCH }, + { "*a*", "b", 0, FNM_NOMATCH }, + { "*a*b*", "ab", 0, 0 }, + { "*a*b*", "qaqbq", 0, 0 }, + { "*a*bb*", "qaqbqbbq", 0, 0 }, + { "*a*bc*", "qaqbqbcq", 0, 0 }, + { "*a*bb*", "qaqbqbb", 0, 0 }, + { "*a*bc*", "qaqbqbc", 0, 0 }, + { "*a*bb", "qaqbqbb", 0, 0 }, + { "*a*bc", "qaqbqbc", 0, 0 }, + { "*a*bb", "qaqbqbbq", 0, FNM_NOMATCH }, + { "*a*bc", "qaqbqbcq", 0, FNM_NOMATCH }, + { "*a*a*a*a*a*a*a*a*a*a*", "aaaaaaaaa", 0, FNM_NOMATCH }, + { "*a*a*a*a*a*a*a*a*a*a*", "aaaaaaaaaa", 0, 0 }, + { "*a*a*a*a*a*a*a*a*a*a*", "aaaaaaaaaaa", 0, 0 }, + { ".*.*.*.*.*.*.*.*.*.*", ".........", 0, FNM_NOMATCH }, + { ".*.*.*.*.*.*.*.*.*.*", "..........", 0, 0 }, + { ".*.*.*.*.*.*.*.*.*.*", "...........", 0, 0 }, + { "*?*?*?*?*?*?*?*?*?*?*", "123456789", 0, FNM_NOMATCH }, + { "??????????*", "123456789", 0, FNM_NOMATCH }, + { "*??????????", "123456789", 0, FNM_NOMATCH }, + { "*?*?*?*?*?*?*?*?*?*?*", "1234567890", 0, 0 }, + { "??????????*", "1234567890", 0, 0 }, + { "*??????????", "1234567890", 0, 0 }, + { "*?*?*?*?*?*?*?*?*?*?*", "12345678901", 0, 0 }, + { "??????????*", "12345678901", 0, 0 }, + { "*??????????", "12345678901", 0, 0 }, + { "[x]", "x", 0, 0 }, + { "[*]", "*", 0, 0 }, + { "[?]", "?", 0, 0 }, + { "[", "[", 0, 0 }, + { "[[]", "[", 0, 0 }, + { "[[]", "x", 0, FNM_NOMATCH }, + { "[*]", "", 0, FNM_NOMATCH }, + { "[*]", "x", 0, FNM_NOMATCH }, + { "[?]", "x", 0, FNM_NOMATCH }, + { "*[*]*", "foo*foo", 0, 0 }, + { "*[*]*", "foo", 0, FNM_NOMATCH }, + { "[0-9]", "0", 0, 0 }, + { "[0-9]", "5", 0, 0 }, + { "[0-9]", "9", 0, 0 }, + { "[0-9]", "/", 0, FNM_NOMATCH }, + { "[0-9]", ":", 0, FNM_NOMATCH }, + { "[0-9]", "*", 0, FNM_NOMATCH }, + { "[!0-9]", "0", 0, FNM_NOMATCH }, + { "[!0-9]", "5", 0, FNM_NOMATCH }, + { "[!0-9]", "9", 0, FNM_NOMATCH }, + { "[!0-9]", "/", 0, 0 }, + { "[!0-9]", ":", 0, 0 }, + { "[!0-9]", "*", 0, 0 }, + { "*[0-9]", "a0", 0, 0 }, + { "*[0-9]", "a5", 0, 0 }, + { "*[0-9]", "a9", 0, 0 }, + { "*[0-9]", "a/", 0, FNM_NOMATCH }, + { "*[0-9]", "a:", 0, FNM_NOMATCH }, + { "*[0-9]", "a*", 0, FNM_NOMATCH }, + { "*[!0-9]", "a0", 0, FNM_NOMATCH }, + { "*[!0-9]", "a5", 0, FNM_NOMATCH }, + { "*[!0-9]", "a9", 0, FNM_NOMATCH }, + { "*[!0-9]", "a/", 0, 0 }, + { "*[!0-9]", "a:", 0, 0 }, + { "*[!0-9]", "a*", 0, 0 }, + { "*[0-9]", "a00", 0, 0 }, + { "*[0-9]", "a55", 0, 0 }, + { "*[0-9]", "a99", 0, 0 }, + { "*[0-9]", "a0a0", 0, 0 }, + { "*[0-9]", "a5a5", 0, 0 }, + { "*[0-9]", "a9a9", 0, 0 }, + { "\\*", "*", 0, 0 }, + { "\\?", "?", 0, 0 }, + { "\\[x]", "[x]", 0, 0 }, + { "\\[", "[", 0, 0 }, + { "\\\\", "\\", 0, 0 }, + { "*\\**", "foo*foo", 0, 0 }, + { "*\\**", "foo", 0, FNM_NOMATCH }, + { "*\\\\*", "foo\\foo", 0, 0 }, + { "*\\\\*", "foo", 0, FNM_NOMATCH }, + { "\\(", "(", 0, 0 }, + { "\\a", "a", 0, 0 }, + { "\\*", "a", 0, FNM_NOMATCH }, + { "\\?", "a", 0, FNM_NOMATCH }, + { "\\*", "\\*", 0, FNM_NOMATCH }, + { "\\?", "\\?", 0, FNM_NOMATCH }, + { "\\[x]", "\\[x]", 0, FNM_NOMATCH }, + { "\\[x]", "\\x", 0, FNM_NOMATCH }, + { "\\[", "\\[", 0, FNM_NOMATCH }, + { "\\(", "\\(", 0, FNM_NOMATCH }, + { "\\a", "\\a", 0, FNM_NOMATCH }, + { "\\", "\\", 0, FNM_NOMATCH }, + { "\\", "", 0, 0 }, + { "\\*", "\\*", FNM_NOESCAPE, 0 }, + { "\\?", "\\?", FNM_NOESCAPE, 0 }, + { "\\", "\\", FNM_NOESCAPE, 0 }, + { "\\\\", "\\", FNM_NOESCAPE, FNM_NOMATCH }, + { "\\\\", "\\\\", FNM_NOESCAPE, 0 }, + { "*\\*", "foo\\foo", FNM_NOESCAPE, 0 }, + { "*\\*", "foo", FNM_NOESCAPE, FNM_NOMATCH }, + { "*", ".", FNM_PERIOD, FNM_NOMATCH }, + { "?", ".", FNM_PERIOD, FNM_NOMATCH }, + { ".*", ".", 0, 0 }, + { ".*", "..", 0, 0 }, + { ".*", ".a", 0, 0 }, + { "[0-9]", ".", FNM_PERIOD, FNM_NOMATCH }, + { "a*", "a.", 0, 0 }, + { "a/a", "a/a", FNM_PATHNAME, 0 }, + { "a/*", "a/a", FNM_PATHNAME, 0 }, + { "*/a", "a/a", FNM_PATHNAME, 0 }, + { "*/*", "a/a", FNM_PATHNAME, 0 }, + { "a*b/*", "abbb/x", FNM_PATHNAME, 0 }, + { "a*b/*", "abbb/.x", FNM_PATHNAME, 0 }, + { "*", "a/a", FNM_PATHNAME, FNM_NOMATCH }, + { "*/*", "a/a/a", FNM_PATHNAME, FNM_NOMATCH }, + { "b/*", "b/.x", FNM_PATHNAME | FNM_PERIOD, FNM_NOMATCH }, + { "b*/*", "a/.x", FNM_PATHNAME | FNM_PERIOD, FNM_NOMATCH }, + { "b/.*", "b/.x", FNM_PATHNAME | FNM_PERIOD, 0 }, + { "b*/.*", "b/.x", FNM_PATHNAME | FNM_PERIOD, 0 }, + { "a", "A", FNM_CASEFOLD, 0 }, + { "A", "a", FNM_CASEFOLD, 0 }, + { "[a]", "A", FNM_CASEFOLD, 0 }, + { "[A]", "a", FNM_CASEFOLD, 0 }, + { "a", "b", FNM_CASEFOLD, FNM_NOMATCH }, + { "a", "a/b", FNM_PATHNAME, FNM_NOMATCH }, + { "*", "a/b", FNM_PATHNAME, FNM_NOMATCH }, + { "*b", "a/b", FNM_PATHNAME, FNM_NOMATCH }, + { "a", "a/b", FNM_PATHNAME | FNM_LEADING_DIR, 0 }, + { "*", "a/b", FNM_PATHNAME | FNM_LEADING_DIR, 0 }, + { "*", ".a/b", FNM_PATHNAME | FNM_LEADING_DIR, 0 }, + { "*a", ".a/b", FNM_PATHNAME | FNM_LEADING_DIR, 0 }, + { "*", ".a/b", FNM_PATHNAME | FNM_PERIOD | FNM_LEADING_DIR, FNM_NOMATCH }, + { "*a", ".a/b", FNM_PATHNAME | FNM_PERIOD | FNM_LEADING_DIR, FNM_NOMATCH }, + { "a*b/*", "abbb/.x", FNM_PATHNAME | FNM_PERIOD, FNM_NOMATCH }, }; Copied and modified: stable/10/lib/libc/tests/gen/ftw_test.c (from r290572, head/lib/libc/tests/gen/ftw_test.c) ============================================================================== --- head/lib/libc/tests/gen/ftw_test.c Mon Nov 9 06:24:11 2015 (r290572, copy source) +++ stable/10/lib/libc/tests/gen/ftw_test.c Mon Nov 23 10:53:01 2015 (r291190) @@ -49,7 +49,6 @@ extern char **environ; static char template[] = "testftw.XXXXXXXXXX"; static char dir[PATH_MAX]; -static int failures; static int ftwflags; static int Copied and modified: stable/10/lib/libc/tests/gen/popen_test.c (from r290572, head/lib/libc/tests/gen/popen_test.c) ============================================================================== --- head/lib/libc/tests/gen/popen_test.c Mon Nov 9 06:24:11 2015 (r290572, copy source) +++ stable/10/lib/libc/tests/gen/popen_test.c Mon Nov 23 10:53:01 2015 (r291190) @@ -71,7 +71,7 @@ check_cloexec(FILE *fp, const char *mode ATF_TC_WITHOUT_HEAD(popen_all_modes_test); ATF_TC_BODY(popen_all_modes_test, tc) { - FILE *fp, *fp2; + FILE *fp; int i, status; const char *mode; const char *allmodes[] = { "r", "w", "r+", "re", "we", "r+e", "re+" }; @@ -92,7 +92,7 @@ ATF_TC_BODY(popen_all_modes_test, tc) ATF_TC_WITHOUT_HEAD(popen_rmodes_test); ATF_TC_BODY(popen_rmodes_test, tc) { - FILE *fp, *fp2; + FILE *fp; const char *rmodes[] = { "r", "r+", "re", "r+e", "re+" }; const char *mode; char buf[80]; @@ -211,7 +211,7 @@ ATF_TC_WITHOUT_HEAD(popen_rwmodes_test); ATF_TC_BODY(popen_rwmodes_test, tc) { const char *rwmodes[] = { "r+", "r+e", "re+" }; - FILE *fp, *fp2; + FILE *fp; const char *mode; char *sres; char buf[80]; Copied: stable/10/lib/libc/tests/gen/posix_spawn_test.c (from r290572, head/lib/libc/tests/gen/posix_spawn_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/gen/posix_spawn_test.c Mon Nov 23 10:53:01 2015 (r291190, copy of r290572, head/lib/libc/tests/gen/posix_spawn_test.c) @@ -0,0 +1,103 @@ +/*- + * Copyright (c) 2011 Jilles Tjoelker + * 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. + */ + +/* + * Test program for posix_spawn() and posix_spawnp() as specified by + * IEEE Std. 1003.1-2008. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include + +char *myenv[2] = { "answer=42", NULL }; + +ATF_TC_WITHOUT_HEAD(posix_spawn_simple_test); +ATF_TC_BODY(posix_spawn_simple_test, tc) +{ + char *myargs[4]; + int error, status; + pid_t pid, waitres; + + /* Make sure we have no child processes. */ + while (waitpid(-1, NULL, 0) != -1) + ; + ATF_REQUIRE_MSG(errno == ECHILD, "errno was not ECHILD: %d", errno); + + /* Simple test. */ + myargs[0] = "sh"; + myargs[1] = "-c"; + myargs[2] = "exit $answer"; + myargs[3] = NULL; + error = posix_spawnp(&pid, myargs[0], NULL, NULL, myargs, myenv); + ATF_REQUIRE(error == 0); + waitres = waitpid(pid, &status, 0); + ATF_REQUIRE(waitres == pid); + ATF_REQUIRE(WIFEXITED(status) && WEXITSTATUS(status) == 42); +} + +ATF_TC_WITHOUT_HEAD(posix_spawn_no_such_command_negative_test); +ATF_TC_BODY(posix_spawn_no_such_command_negative_test, tc) +{ + char *myargs[4]; + int error, status; + pid_t pid, waitres; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Nov 23 10:57:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A25EA30D07; Mon, 23 Nov 2015 10:57:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 030031C35; Mon, 23 Nov 2015 10:57:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANAv5Cw029795; Mon, 23 Nov 2015 10:57:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANAv52V029794; Mon, 23 Nov 2015 10:57:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511231057.tANAv52V029794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 10:57:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291191 - stable/10/contrib/netbsd-tests/lib/libc/stdio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 10:57:06 -0000 Author: ngie Date: Mon Nov 23 10:57:04 2015 New Revision: 291191 URL: https://svnweb.freebsd.org/changeset/base/291191 Log: MFC r290856: r290856 (by bap): also skip the definition of ':fopen_regular' to avoid the build to fail due to unused variables defined by ATF macros Modified: stable/10/contrib/netbsd-tests/lib/libc/stdio/t_fopen.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/stdio/t_fopen.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/stdio/t_fopen.c Mon Nov 23 10:53:01 2015 (r291190) +++ stable/10/contrib/netbsd-tests/lib/libc/stdio/t_fopen.c Mon Nov 23 10:57:04 2015 (r291191) @@ -303,6 +303,7 @@ ATF_TC_BODY(fopen_perm, tc) ATF_REQUIRE_ERRNO(EACCES, fopen("/bin/ls", "w+") == NULL); } +#ifdef __NetBSD__ ATF_TC(fopen_regular); ATF_TC_HEAD(fopen_regular, tc) { @@ -335,6 +336,7 @@ ATF_TC_BODY(fopen_regular, tc) } } } +#endif ATF_TC_WITH_CLEANUP(fopen_seek); ATF_TC_HEAD(fopen_seek, tc) From owner-svn-src-all@freebsd.org Mon Nov 23 11:19:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6278BA353BA; Mon, 23 Nov 2015 11:19:02 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2254D17DE; Mon, 23 Nov 2015 11:19:02 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANBJ1LY035795; Mon, 23 Nov 2015 11:19:01 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANBJ0fR035789; Mon, 23 Nov 2015 11:19:00 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201511231119.tANBJ0fR035789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Mon, 23 Nov 2015 11:19:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291193 - in head/sys: arm/arm arm64/arm64 mips/mips powerpc/powerpc x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 11:19:02 -0000 Author: skra Date: Mon Nov 23 11:19:00 2015 New Revision: 291193 URL: https://svnweb.freebsd.org/changeset/base/291193 Log: Revert r291142. The not quite consistent logic for bounce pages allocation is utilizited by re(4) interface which can hang now. Approved by: kib (mentor) Modified: head/sys/arm/arm/busdma_machdep-v6.c head/sys/arm/arm/busdma_machdep.c head/sys/arm64/arm64/busdma_bounce.c head/sys/mips/mips/busdma_machdep.c head/sys/powerpc/powerpc/busdma_machdep.c head/sys/x86/x86/busdma_bounce.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Mon Nov 23 11:01:10 2015 (r291192) +++ head/sys/arm/arm/busdma_machdep-v6.c Mon Nov 23 11:19:00 2015 (r291193) @@ -654,8 +654,8 @@ allocate_bz_and_pages(bus_dma_tag_t dmat maxpages = MAX_BPAGES; else maxpages = 2 * bz->map_count; - if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0 && - bz->map_count > 0 && bz->total_bpages < maxpages) { + if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0 || + (bz->map_count > 0 && bz->total_bpages < maxpages)) { int pages; pages = atop(roundup2(dmat->maxsize, PAGE_SIZE)) + 1; Modified: head/sys/arm/arm/busdma_machdep.c ============================================================================== --- head/sys/arm/arm/busdma_machdep.c Mon Nov 23 11:01:10 2015 (r291192) +++ head/sys/arm/arm/busdma_machdep.c Mon Nov 23 11:19:00 2015 (r291193) @@ -569,8 +569,8 @@ allocate_bz_and_pages(bus_dma_tag_t dmat * basis up to a sane limit. */ maxpages = MAX_BPAGES; - if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0 && - bz->map_count > 0 && bz->total_bpages < maxpages) { + if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0 + || (bz->map_count > 0 && bz->total_bpages < maxpages)) { int pages; pages = MAX(atop(dmat->maxsize), 1); Modified: head/sys/arm64/arm64/busdma_bounce.c ============================================================================== --- head/sys/arm64/arm64/busdma_bounce.c Mon Nov 23 11:01:10 2015 (r291192) +++ head/sys/arm64/arm64/busdma_bounce.c Mon Nov 23 11:19:00 2015 (r291193) @@ -304,8 +304,8 @@ bounce_bus_dmamap_create(bus_dma_tag_t d else maxpages = MIN(MAX_BPAGES, Maxmem - atop(dmat->common.lowaddr)); - if ((dmat->bounce_flags & BUS_DMA_MIN_ALLOC_COMP) == 0 && - bz->map_count > 0 && bz->total_bpages < maxpages) { + if ((dmat->bounce_flags & BUS_DMA_MIN_ALLOC_COMP) == 0 || + (bz->map_count > 0 && bz->total_bpages < maxpages)) { pages = MAX(atop(dmat->common.maxsize), 1); pages = MIN(maxpages - bz->total_bpages, pages); pages = MAX(pages, 1); Modified: head/sys/mips/mips/busdma_machdep.c ============================================================================== --- head/sys/mips/mips/busdma_machdep.c Mon Nov 23 11:01:10 2015 (r291192) +++ head/sys/mips/mips/busdma_machdep.c Mon Nov 23 11:19:00 2015 (r291193) @@ -560,8 +560,8 @@ bus_dmamap_create(bus_dma_tag_t dmat, in * basis up to a sane limit. */ maxpages = MAX_BPAGES; - if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0 && - bz->map_count > 0 && bz->total_bpages < maxpages) { + if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0 + || (bz->map_count > 0 && bz->total_bpages < maxpages)) { int pages; pages = MAX(atop(dmat->maxsize), 1); Modified: head/sys/powerpc/powerpc/busdma_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/busdma_machdep.c Mon Nov 23 11:01:10 2015 (r291192) +++ head/sys/powerpc/powerpc/busdma_machdep.c Mon Nov 23 11:19:00 2015 (r291193) @@ -423,8 +423,8 @@ bus_dmamap_create(bus_dma_tag_t dmat, in maxpages = MAX_BPAGES; else maxpages = MIN(MAX_BPAGES, Maxmem -atop(dmat->lowaddr)); - if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0 && - bz->map_count > 0 && bz->total_bpages < maxpages) { + if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0 + || (bz->map_count > 0 && bz->total_bpages < maxpages)) { int pages; pages = MAX(atop(dmat->maxsize), 1); Modified: head/sys/x86/x86/busdma_bounce.c ============================================================================== --- head/sys/x86/x86/busdma_bounce.c Mon Nov 23 11:01:10 2015 (r291192) +++ head/sys/x86/x86/busdma_bounce.c Mon Nov 23 11:19:00 2015 (r291193) @@ -308,8 +308,8 @@ bounce_bus_dmamap_create(bus_dma_tag_t d else maxpages = MIN(MAX_BPAGES, Maxmem - atop(dmat->common.lowaddr)); - if ((dmat->bounce_flags & BUS_DMA_MIN_ALLOC_COMP) == 0 && - bz->map_count > 0 && bz->total_bpages < maxpages) { + if ((dmat->bounce_flags & BUS_DMA_MIN_ALLOC_COMP) == 0 || + (bz->map_count > 0 && bz->total_bpages < maxpages)) { pages = MAX(atop(dmat->common.maxsize), 1); pages = MIN(maxpages - bz->total_bpages, pages); pages = MAX(pages, 1); From owner-svn-src-all@freebsd.org Mon Nov 23 11:21:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D81FA3552A; Mon, 23 Nov 2015 11:21:38 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: from mail-ig0-x22b.google.com (mail-ig0-x22b.google.com [IPv6:2607:f8b0:4001:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CC2201E48; Mon, 23 Nov 2015 11:21:37 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: by igcmv3 with SMTP id mv3so26405747igc.0; Mon, 23 Nov 2015 03:21:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=V+T9UuNLg1Uc5VH6jelOeyd78fJCm1vDDNWBqyk6hv0=; b=exchIQ44xHwkBWFTjcY9kT1y+CNQ8WAuYPIPsnvZ+fgxgCsldyNO/QXwFe62jbm7yT 7R7PdUxktsLAh9Rz5tUFHPcK5Od3hpu0xi/Ayc8Ye31njUlQgr71YSTUmHutl0tqELhm h3XCtzTnyTjq4v/PI6ulHC9JvYbsBJSM1BM1xpnu020duZBBUsEouQji5KrgID9r6Wl0 hQfy+y9+O/wQ+F0YzXU8H4ZUm3BO9KwPS/kJEfhT53eCDXINhyg/pmA8pwaY+NoEnXBf 6LPG/KTYEIrLt8XyEXv6VCH5ZH1dRimRtLmiQjdzJycmmaEwp/zcb69k4p3Ihe9LXcHH RiEw== MIME-Version: 1.0 X-Received: by 10.50.43.225 with SMTP id z1mr10668319igl.19.1448277697270; Mon, 23 Nov 2015 03:21:37 -0800 (PST) Received: by 10.64.130.38 with HTTP; Mon, 23 Nov 2015 03:21:37 -0800 (PST) In-Reply-To: References: <201511211955.tALJt18a052565@repo.freebsd.org> <20151123032253.GA2084@raichu> <1448254044.1398.22.camel@freebsd.org> Date: Mon, 23 Nov 2015 12:21:37 +0100 Message-ID: Subject: Re: svn commit: r291142 - in head/sys: arm/arm arm64/arm64 mips/mips powerpc/powerpc x86/x86 From: Svatopluk Kraus To: Adrian Chadd Cc: Ian Lepore , Mark Johnston , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 11:21:38 -0000 Reverted in r291193. On Mon, Nov 23, 2015 at 7:02 AM, Adrian Chadd wrote: > On 22 November 2015 at 20:47, Ian Lepore wrote: >> On Sun, 2015-11-22 at 19:22 -0800, Mark Johnston wrote: >>> On Sat, Nov 21, 2015 at 07:55:01PM +0000, Svatopluk Kraus wrote: >>> > Author: skra >>> > Date: Sat Nov 21 19:55:01 2015 >>> > New Revision: 291142 >>> > URL: https://svnweb.freebsd.org/changeset/base/291142 >>> > >>> > Log: >>> > Fix BUS_DMA_MIN_ALLOC_COMP flag logic. When bus_dmamap_t map is >>> > being >>> > created for bus_dma_tag_t tag, bounce pages should be allocated >>> > only if needed. >>> > >>> > Before the fix, they were allocated always if >>> > BUS_DMA_COULD_BOUNCE flag >>> > was set but BUS_DMA_MIN_ALLOC_COMP not. As bounce pages are never >>> > freed, >>> > it could cause memory exhaustion when a lot of such tags together >>> > with >>> > their maps were created. >>> > >>> > Note that there could be more maps in one tag by current design. >>> > However BUS_DMA_MIN_ALLOC_COMP flag is tag's flag. It's set after >>> > bounce pages are allocated. Thus, they are allocated only for >>> > first >>> > tag's map which needs them. >>> >>> This appears to cause a hang with one of the re(4) interfaces in my >>> workstation. I can use it to start an ssh session, but it quickly >>> hits a >>> point where it stops transmitting or receiving packets, and I need to >>> reboot the system to recover. Interestingly, the other re(4) >>> interface >>> in this system works fine, but it drives a different card: >>> >>> working: >>> re0@pci0:3:0:0: class=0x020000 card=0x85051043 chip=0x816810ec >>> rev=0x09 hdr=0x00 >>> vendor = 'Realtek Semiconductor Co., Ltd.' >>> device = 'RTL8111/8168/8411 PCI Express Gigabit Ethernet >>> Controller' >>> class = network >>> subclass = ethernet >>> >>> non-working: >>> re1@pci0:5:0:0: class=0x020000 card=0x816910ec chip=0x816910ec >>> rev=0x10 hdr=0x00 >>> vendor = 'Realtek Semiconductor Co., Ltd.' >>> device = 'RTL8169 PCI Gigabit Ethernet Controller' >>> class = network >>> subclass = ethernet >>> >> >> With the old logic (which I'm no great defender of beyond "it worked"), >> with every map added to a tag, some extra bounce pages would be added >> to the tag's bounce zone to account for the new map's needs, up to some >> arbitrary #define'd limit. >> >> With the new logic, it appears that pages will only be added to a >> bounce zone one time for each tag, either when the tag is created or >> when the first map for the tag is created. After that no more bounce >> pages are ever added no matter how many more maps are created for that >> tag. So a network driver that creates 1024 maps off a single tag may >> have to bounce every single one of those transfers due to alignment but >> may have only enough resources to bounce one transfer at a time. >> >> More likely it will have enough to do several mappings at a time, >> because usually there's only one bounce zone being used by all tags and >> maps, so extra pages will get added for other tags that will never >> bounce, and they'll get consumed by a driver that does need to bounce. >> >> I would especially expect trouble on ARM where many many mappings need >> to bounce due to alignment (but I haven't actually had any trouble >> since this change went in). > > ... uhm, shall we revert this then? This seems very risky. > > > > -adrian From owner-svn-src-all@freebsd.org Mon Nov 23 12:10:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF821A35600; Mon, 23 Nov 2015 12:10:30 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B981B1B8F; Mon, 23 Nov 2015 12:10:30 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANCATDg051004; Mon, 23 Nov 2015 12:10:29 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANCATi3051003; Mon, 23 Nov 2015 12:10:29 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201511231210.tANCATi3051003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Mon, 23 Nov 2015 12:10: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: r291194 - stable/10/sys/dev/ixl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 12:10:31 -0000 Author: smh Date: Mon Nov 23 12:10:29 2015 New Revision: 291194 URL: https://svnweb.freebsd.org/changeset/base/291194 Log: MFC r290708: Fix ixl debug sysctls panic Sponsored by: Multiplay Modified: stable/10/sys/dev/ixl/if_ixl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ixl/if_ixl.c ============================================================================== --- stable/10/sys/dev/ixl/if_ixl.c Mon Nov 23 11:19:00 2015 (r291193) +++ stable/10/sys/dev/ixl/if_ixl.c Mon Nov 23 12:10:29 2015 (r291194) @@ -4676,17 +4676,9 @@ ixl_sysctl_hw_res_alloc(SYSCTL_HANDLER_A } error = sbuf_finish(buf); - if (error) { - device_printf(dev, "Error finishing sbuf: %d\n", error); - sbuf_delete(buf); - return error; - } - - error = sysctl_handle_string(oidp, sbuf_data(buf), sbuf_len(buf), req); - if (error) - device_printf(dev, "sysctl error: %d\n", error); sbuf_delete(buf); - return error; + + return (error); } /* @@ -4789,15 +4781,6 @@ ixl_sysctl_switch_config(SYSCTL_HANDLER_ sbuf_delete(nmbuf); error = sbuf_finish(buf); - if (error) { - device_printf(dev, "Error finishing sbuf: %d\n", error); - sbuf_delete(buf); - return error; - } - - error = sysctl_handle_string(oidp, sbuf_data(buf), sbuf_len(buf), req); - if (error) - device_printf(dev, "sysctl error: %d\n", error); sbuf_delete(buf); return (error); From owner-svn-src-all@freebsd.org Mon Nov 23 12:17:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 315EFA35882; Mon, 23 Nov 2015 12:17:48 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAC6A1089; Mon, 23 Nov 2015 12:17:47 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANCHlac053834; Mon, 23 Nov 2015 12:17:47 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANCHl1p053833; Mon, 23 Nov 2015 12:17:47 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201511231217.tANCHl1p053833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Mon, 23 Nov 2015 12:17: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: r291195 - stable/10/sys/geom/eli X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 12:17:48 -0000 Author: smh Date: Mon Nov 23 12:17:46 2015 New Revision: 291195 URL: https://svnweb.freebsd.org/changeset/base/291195 Log: MFC r290406: Fix g_eli error loss conditions Sponsored by: Multiplay Modified: stable/10/sys/geom/eli/g_eli.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/eli/g_eli.c ============================================================================== --- stable/10/sys/geom/eli/g_eli.c Mon Nov 23 12:10:29 2015 (r291194) +++ stable/10/sys/geom/eli/g_eli.c Mon Nov 23 12:17:46 2015 (r291195) @@ -201,7 +201,7 @@ g_eli_read_done(struct bio *bp) G_ELI_LOGREQ(2, bp, "Request done."); pbp = bp->bio_parent; - if (pbp->bio_error == 0) + if (pbp->bio_error == 0 && bp->bio_error != 0) pbp->bio_error = bp->bio_error; g_destroy_bio(bp); /* @@ -212,7 +212,8 @@ g_eli_read_done(struct bio *bp) return; sc = pbp->bio_to->geom->softc; if (pbp->bio_error != 0) { - G_ELI_LOGREQ(0, pbp, "%s() failed", __func__); + G_ELI_LOGREQ(0, pbp, "%s() failed (error=%d)", __func__, + pbp->bio_error); pbp->bio_completed = 0; if (pbp->bio_driver2 != NULL) { free(pbp->bio_driver2, M_ELI); @@ -241,10 +242,8 @@ g_eli_write_done(struct bio *bp) G_ELI_LOGREQ(2, bp, "Request done."); pbp = bp->bio_parent; - if (pbp->bio_error == 0) { - if (bp->bio_error != 0) - pbp->bio_error = bp->bio_error; - } + if (pbp->bio_error == 0 && bp->bio_error != 0) + pbp->bio_error = bp->bio_error; g_destroy_bio(bp); /* * Do we have all sectors already? @@ -255,14 +254,15 @@ g_eli_write_done(struct bio *bp) free(pbp->bio_driver2, M_ELI); pbp->bio_driver2 = NULL; if (pbp->bio_error != 0) { - G_ELI_LOGREQ(0, pbp, "Crypto WRITE request failed (error=%d).", + G_ELI_LOGREQ(0, pbp, "%s() failed (error=%d)", __func__, pbp->bio_error); pbp->bio_completed = 0; - } + } else + pbp->bio_completed = pbp->bio_length; + /* * Write is finished, send it up. */ - pbp->bio_completed = pbp->bio_length; sc = pbp->bio_to->geom->softc; g_io_deliver(pbp, pbp->bio_error); atomic_subtract_int(&sc->sc_inflight, 1); From owner-svn-src-all@freebsd.org Mon Nov 23 12:19:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E835CA3593D; Mon, 23 Nov 2015 12:19:37 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6264133D; Mon, 23 Nov 2015 12:19:37 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANCJagv053964; Mon, 23 Nov 2015 12:19:36 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANCJatU053963; Mon, 23 Nov 2015 12:19:36 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201511231219.tANCJatU053963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Mon, 23 Nov 2015 12:19: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: r291196 - stable/10/cddl/contrib/opensolaris/cmd/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 12:19:38 -0000 Author: smh Date: Mon Nov 23 12:19:36 2015 New Revision: 291196 URL: https://svnweb.freebsd.org/changeset/base/291196 Log: MFC r291071: Fix zfs(8) set options Sponsored by: Multiplay Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Nov 23 12:17:46 2015 (r291195) +++ stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Nov 23 12:19:36 2015 (r291196) @@ -117,7 +117,7 @@ .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Nm .Cm set -.Ar property Ns = Ns Ar value Oc ... +.Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Nm .Cm get @@ -2121,7 +2121,7 @@ option, but sorts by property in descend .It Xo .Nm .Cm set -.Ar property Ns = Ns Ar value Oc ... +.Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Xc .Pp From owner-svn-src-all@freebsd.org Mon Nov 23 12:47:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7B62A35FDD; Mon, 23 Nov 2015 12:47:09 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 927921F9A; Mon, 23 Nov 2015 12:47:09 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANCl8S0062452; Mon, 23 Nov 2015 12:47:08 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANCl8BS062451; Mon, 23 Nov 2015 12:47:08 GMT (envelope-from des@FreeBSD.org) Message-Id: <201511231247.tANCl8BS062451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Mon, 23 Nov 2015 12:47:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291197 - head/lib/libc/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 12:47:09 -0000 Author: des Date: Mon Nov 23 12:47:08 2015 New Revision: 291197 URL: https://svnweb.freebsd.org/changeset/base/291197 Log: markup fixes Modified: head/lib/libc/stdio/fopen.3 Modified: head/lib/libc/stdio/fopen.3 ============================================================================== --- head/lib/libc/stdio/fopen.3 Mon Nov 23 12:19:36 2015 (r291196) +++ head/lib/libc/stdio/fopen.3 Mon Nov 23 12:47:08 2015 (r291197) @@ -120,7 +120,9 @@ This is strictly for compatibility with .St -isoC and has effect only for .Fn fmemopen -; otherwise the ``b'' is ignored. +; otherwise +.Dq Li b +is ignored. .Pp Any created files will have mode .Do Dv S_IRUSR @@ -230,7 +232,9 @@ allocates .Fa size bytes of memory. This buffer is automatically freed when the stream is closed. Buffers can be opened in text-mode (default) or binary-mode -(if ``b'' is present in the second or third position of the +(if +.Dq Li b +is present in the second or third position of the .Fa mode argument). Buffers opened in text-mode make sure that writes are terminated with a NULL byte, if the last write hasn't filled up the whole buffer. Buffers @@ -343,5 +347,7 @@ The function conforms to .St -p1003.1-2008 . -The ``b'' mode does not conform to any standard +The +.Dq Li b +mode does not conform to any standard but is also supported by glibc. From owner-svn-src-all@freebsd.org Mon Nov 23 12:48:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 197DBA34045; Mon, 23 Nov 2015 12:48:17 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D209C113F; Mon, 23 Nov 2015 12:48:16 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANCmF7p062552; Mon, 23 Nov 2015 12:48:15 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANCmD16062530; Mon, 23 Nov 2015 12:48:13 GMT (envelope-from des@FreeBSD.org) Message-Id: <201511231248.tANCmD16062530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Mon, 23 Nov 2015 12:48:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291198 - in head: crypto/openssh crypto/openssh/openbsd-compat secure/lib/libssh secure/usr.bin/ssh secure/usr.sbin/sshd share/mk tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 12:48:17 -0000 Author: des Date: Mon Nov 23 12:48:13 2015 New Revision: 291198 URL: https://svnweb.freebsd.org/changeset/base/291198 Log: Retire the NONE cipher option. Deleted: head/tools/build/options/WITH_OPENSSH_NONE_CIPHER Modified: head/crypto/openssh/README.hpn head/crypto/openssh/cipher.c head/crypto/openssh/kex.c head/crypto/openssh/kex.h head/crypto/openssh/myproposal.h head/crypto/openssh/openbsd-compat/bsd-misc.h head/crypto/openssh/packet.c head/crypto/openssh/packet.h head/crypto/openssh/pathnames.h head/crypto/openssh/readconf.c head/crypto/openssh/readconf.h head/crypto/openssh/servconf.c head/crypto/openssh/servconf.h head/crypto/openssh/ssh.c head/crypto/openssh/sshconnect2.c head/crypto/openssh/sshd.c head/secure/lib/libssh/Makefile head/secure/usr.bin/ssh/Makefile head/secure/usr.sbin/sshd/Makefile head/share/mk/src.opts.mk Modified: head/crypto/openssh/README.hpn ============================================================================== --- head/crypto/openssh/README.hpn Mon Nov 23 12:47:08 2015 (r291197) +++ head/crypto/openssh/README.hpn Mon Nov 23 12:48:13 2015 (r291198) @@ -1,14 +1,5 @@ Notes: -NONE CIPHER: - To use the NONE option you must have the NoneEnabled switch set on the server - and you MUST have *both* NoneEnabled and NoneSwitch set to yes on the client. - The NONE feature works with ALL ssh subsystems (as far as we can tell) - as long as there is no tty allocated. - If a user uses the -T switch to prevent a tty being created the NONE cipher - will be disabled. - - PERFORMANCE: The performance increase will only be as good as the network and TCP stack tuning on the reciever side of the connection allows. As a rule of thumb a @@ -93,22 +84,6 @@ HPN SPECIFIC CONFIGURATION OPTIONS: the throughput will be no more than n/RTT. The minimum buffer size is 1KB. Default is the current system wide TCP receive buffer size. -- NoneEnabled=[yes/no] client/server - Enable or disable the use of the None cipher. Care must always be used when - enabling this as it will allow users to send data in the clear. However, it - is important to note that authentication information remains encrypted even - if this option is enabled. Set to no by default. - -- NoneSwitch=[yes/no] client - Switch the encryption cipher being used to the None cipher after - authentication takes place. NoneEnabled must be enabled on both the client - and server side of the connection. When the connection switches to the NONE - cipher a warning is sent to STDERR. The connection attempt will fail with an - error if a client requests a NoneSwitch from the server that does not - explicitly have NoneEnabled set to yes. - Note: The NONE cipher cannot be used in interactive (shell) sessions and it - will fail silently. Set to no by default. - CREDITS: Modified: head/crypto/openssh/cipher.c ============================================================================== --- head/crypto/openssh/cipher.c Mon Nov 23 12:47:08 2015 (r291197) +++ head/crypto/openssh/cipher.c Mon Nov 23 12:48:13 2015 (r291198) @@ -36,7 +36,6 @@ */ #include "includes.h" -__RCSID("$FreeBSD$"); #include @@ -225,12 +224,7 @@ ciphers_valid(const char *names) for ((p = strsep(&cp, CIPHER_SEP)); p && *p != '\0'; (p = strsep(&cp, CIPHER_SEP))) { c = cipher_by_name(p); -#ifdef NONE_CIPHER_ENABLED - if (c == NULL || (c->number != SSH_CIPHER_SSH2 && - c->number != SSH_CIPHER_NONE)) { -#else - if (c == NULL || (c->number != SSH_CIPHER_SSH2)) { -#endif + if (c == NULL || c->number != SSH_CIPHER_SSH2) { debug("bad cipher %s [%s]", p, names); free(cipher_list); return 0; @@ -485,9 +479,6 @@ cipher_get_keyiv(CipherContext *cc, u_ch } switch (c->number) { -#ifdef NONE_CIPHER_ENABLED - case SSH_CIPHER_NONE: -#endif case SSH_CIPHER_SSH2: case SSH_CIPHER_DES: case SSH_CIPHER_BLOWFISH: @@ -527,9 +518,6 @@ cipher_set_keyiv(CipherContext *cc, u_ch return; switch (c->number) { -#ifdef NONE_CIPHER_ENABLED - case SSH_CIPHER_NONE: -#endif case SSH_CIPHER_SSH2: case SSH_CIPHER_DES: case SSH_CIPHER_BLOWFISH: Modified: head/crypto/openssh/kex.c ============================================================================== --- head/crypto/openssh/kex.c Mon Nov 23 12:47:08 2015 (r291197) +++ head/crypto/openssh/kex.c Mon Nov 23 12:48:13 2015 (r291198) @@ -24,7 +24,6 @@ */ #include "includes.h" -__RCSID("$FreeBSD$"); #include @@ -146,13 +145,8 @@ kex_names_valid(const char *names) return 1; } -/* put algorithm proposal into buffer. */ -#ifndef NONE_CIPHER_ENABLED +/* put algorithm proposal into buffer */ static void -#else -/* Also used in sshconnect2.c. */ -void -#endif kex_prop2buf(Buffer *b, char *proposal[PROPOSAL_MAX]) { u_int i; @@ -466,9 +460,6 @@ kex_choose_conf(Kex *kex) int nenc, nmac, ncomp; u_int mode, ctos, need, dh_need, authlen; int first_kex_follows, type; -#ifdef NONE_CIPHER_ENABLED - int auth_flag; -#endif my = kex_buf2prop(&kex->my, NULL); peer = kex_buf2prop(&kex->peer, &first_kex_follows); @@ -492,10 +483,6 @@ kex_choose_conf(Kex *kex) } /* Algorithm Negotiation */ -#ifdef NONE_CIPHER_ENABLED - auth_flag = packet_get_authentication_state(); - debug ("AUTH STATE is %d", auth_flag); -#endif for (mode = 0; mode < MODE_MAX; mode++) { newkeys = xcalloc(1, sizeof(*newkeys)); kex->newkeys[mode] = newkeys; @@ -510,17 +497,6 @@ kex_choose_conf(Kex *kex) if (authlen == 0) choose_mac(&newkeys->mac, cprop[nmac], sprop[nmac]); choose_comp(&newkeys->comp, cprop[ncomp], sprop[ncomp]); -#ifdef NONE_CIPHER_ENABLED - debug("REQUESTED ENC.NAME is '%s'", newkeys->enc.name); - if (strcmp(newkeys->enc.name, "none") == 0) { - debug("Requesting NONE. Authflag is %d", auth_flag); - if (auth_flag == 1) - debug("None requested post authentication."); - else - fatal("Pre-authentication none cipher requests " - "are not allowed."); - } -#endif debug("kex: %s %s %s %s", ctos ? "client->server" : "server->client", newkeys->enc.name, Modified: head/crypto/openssh/kex.h ============================================================================== --- head/crypto/openssh/kex.h Mon Nov 23 12:47:08 2015 (r291197) +++ head/crypto/openssh/kex.h Mon Nov 23 12:48:13 2015 (r291198) @@ -1,5 +1,4 @@ /* $OpenBSD: kex.h,v 1.62 2014/01/27 18:58:14 markus Exp $ */ -/* $FreeBSD$ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. @@ -149,10 +148,6 @@ struct Kex { int kex_names_valid(const char *); char *kex_alg_list(char); -#ifdef NONE_CIPHER_ENABLED -void kex_prop2buf(Buffer *, char *[PROPOSAL_MAX]); -#endif - Kex *kex_setup(char *[PROPOSAL_MAX]); void kex_finish(Kex *); Modified: head/crypto/openssh/myproposal.h ============================================================================== --- head/crypto/openssh/myproposal.h Mon Nov 23 12:47:08 2015 (r291197) +++ head/crypto/openssh/myproposal.h Mon Nov 23 12:48:13 2015 (r291198) @@ -1,5 +1,4 @@ /* $OpenBSD: myproposal.h,v 1.35 2013/12/06 13:39:49 markus Exp $ */ -/* $FreeBSD$ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -110,10 +109,6 @@ "chacha20-poly1305@openssh.com," \ "aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc," \ "aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se" -#ifdef NONE_CIPHER_ENABLED -#define KEX_ENCRYPT_INCLUDE_NONE KEX_DEFAULT_ENCRYPT \ - ",none" -#endif #define KEX_DEFAULT_MAC \ "hmac-md5-etm@openssh.com," \ Modified: head/crypto/openssh/openbsd-compat/bsd-misc.h ============================================================================== --- head/crypto/openssh/openbsd-compat/bsd-misc.h Mon Nov 23 12:47:08 2015 (r291197) +++ head/crypto/openssh/openbsd-compat/bsd-misc.h Mon Nov 23 12:48:13 2015 (r291198) @@ -20,7 +20,6 @@ #define _BSD_MISC_H #include "includes.h" -__RCSID("$FreeBSD$"); char *ssh_get_progname(char *); Modified: head/crypto/openssh/packet.c ============================================================================== --- head/crypto/openssh/packet.c Mon Nov 23 12:47:08 2015 (r291197) +++ head/crypto/openssh/packet.c Mon Nov 23 12:48:13 2015 (r291198) @@ -202,9 +202,6 @@ struct session_state { }; static struct session_state *active_state, *backup_state; -#ifdef NONE_CIPHER_ENABLED -static int rekey_requested = 0; -#endif static struct session_state * alloc_session_state(void) @@ -1316,7 +1313,6 @@ packet_read_poll2(u_int32_t *seqnr_p) buffer_ptr(&active_state->input), block_size, 0, 0) != 0) fatal("Decryption integrity check failed"); cp = buffer_ptr(&active_state->incoming_packet); - active_state->packlen = get_u32(cp); if (active_state->packlen < 1 + 4 || active_state->packlen > PACKET_MAX_SIZE) { @@ -1943,26 +1939,12 @@ packet_send_ignore(int nbytes) } } -#ifdef NONE_CIPHER_ENABLED -void -packet_request_rekeying(void) -{ - rekey_requested = 1; -} -#endif - #define MAX_PACKETS (1U<<31) int packet_need_rekeying(void) { if (datafellows & SSH_BUG_NOREKEY) return 0; -#ifdef NONE_CIPHER_ENABLED - if (rekey_requested == 1) { - rekey_requested = 0; - return 1; - } -#endif return (active_state->p_send.packets > MAX_PACKETS) || (active_state->p_read.packets > MAX_PACKETS) || @@ -2074,11 +2056,3 @@ packet_restore_state(void) add_recv_bytes(len); } } - -#ifdef NONE_CIPHER_ENABLED -int -packet_get_authentication_state(void) -{ - return (active_state->after_authentication); -} -#endif Modified: head/crypto/openssh/packet.h ============================================================================== --- head/crypto/openssh/packet.h Mon Nov 23 12:47:08 2015 (r291197) +++ head/crypto/openssh/packet.h Mon Nov 23 12:48:13 2015 (r291198) @@ -1,5 +1,4 @@ /* $OpenBSD: packet.h,v 1.59 2013/07/12 00:19:59 djm Exp $ */ -/* $FreeBSD$ */ /* * Author: Tatu Ylonen @@ -39,9 +38,6 @@ void packet_set_interactive(int, int int packet_is_interactive(void); void packet_set_server(void); void packet_set_authenticated(void); -#ifdef NONE_CIPHER_ENABLED -int packet_get_authentication_state(void); -#endif void packet_start(u_char); void packet_put_char(int ch); @@ -119,9 +115,6 @@ do { \ } while (0) int packet_need_rekeying(void); -#ifdef NONE_CIPHER_ENABLED -void packet_request_rekeying(void); -#endif void packet_set_rekey_limits(u_int32_t, time_t); time_t packet_get_rekey_timeout(void); Modified: head/crypto/openssh/pathnames.h ============================================================================== --- head/crypto/openssh/pathnames.h Mon Nov 23 12:47:08 2015 (r291197) +++ head/crypto/openssh/pathnames.h Mon Nov 23 12:48:13 2015 (r291198) @@ -1,5 +1,4 @@ /* $OpenBSD: pathnames.h,v 1.24 2013/12/06 13:39:49 markus Exp $ */ -/* $FreeBSD$ */ /* * Author: Tatu Ylonen @@ -122,7 +121,7 @@ * Default location of askpass */ #ifndef _PATH_SSH_ASKPASS_DEFAULT -#define _PATH_SSH_ASKPASS_DEFAULT "/usr/local/bin/ssh-askpass" +#define _PATH_SSH_ASKPASS_DEFAULT "/usr/X11R6/bin/ssh-askpass" #endif /* Location of ssh-keysign for hostbased authentication */ @@ -137,7 +136,7 @@ /* xauth for X11 forwarding */ #ifndef _PATH_XAUTH -#define _PATH_XAUTH "/usr/local/bin/xauth" +#define _PATH_XAUTH "/usr/X11R6/bin/xauth" #endif /* UNIX domain socket for X11 server; displaynum will replace %u */ Modified: head/crypto/openssh/readconf.c ============================================================================== --- head/crypto/openssh/readconf.c Mon Nov 23 12:47:08 2015 (r291197) +++ head/crypto/openssh/readconf.c Mon Nov 23 12:48:13 2015 (r291198) @@ -154,9 +154,6 @@ typedef enum { oCanonicalizeFallbackLocal, oCanonicalizePermittedCNAMEs, oIgnoredUnknownOption, oHPNDisabled, oHPNBufferSize, oTcpRcvBufPoll, oTcpRcvBuf, -#ifdef NONE_CIPHER_ENABLED - oNoneEnabled, oNoneSwitch, -#endif oVersionAddendum, oDeprecated, oUnsupported } OpCodes; @@ -274,10 +271,6 @@ static struct { { "hpnbuffersize", oHPNBufferSize }, { "tcprcvbufpoll", oTcpRcvBufPoll }, { "tcprcvbuf", oTcpRcvBuf }, -#ifdef NONE_CIPHER_ENABLED - { "noneenabled", oNoneEnabled }, - { "noneswitch", oNoneSwitch }, -#endif { "versionaddendum", oVersionAddendum }, { NULL, oBadOption } @@ -1375,31 +1368,6 @@ parse_int: intptr = &options->tcp_rcv_buf; goto parse_int; -#ifdef NONE_CIPHER_ENABLED - case oNoneEnabled: - intptr = &options->none_enabled; - goto parse_flag; - - /* - * We check to see if the command comes from the command line or not. - * If it does then enable it otherwise fail. NONE must never be a - * default configuration. - */ - case oNoneSwitch: - if (strcmp(filename,"command-line") == 0) { - intptr = &options->none_switch; - goto parse_flag; - } else { - debug("NoneSwitch directive found in %.200s.", - filename); - error("NoneSwitch is found in %.200s.\n" - "You may only use this configuration option " - "from the command line", filename); - error("Continuing..."); - return 0; - } -#endif - case oVersionAddendum: if (s == NULL) fatal("%.200s line %d: Missing argument.", filename, @@ -1659,10 +1627,6 @@ initialize_options(Options * options) options->hpn_buffer_size = -1; options->tcp_rcv_buf_poll = -1; options->tcp_rcv_buf = -1; -#ifdef NONE_CIPHER_ENABLED - options->none_enabled = -1; - options->none_switch = -1; -#endif } /* @@ -1883,11 +1847,6 @@ fill_default_options(Options * options) options->tcp_rcv_buf *= 1024; if (options->tcp_rcv_buf_poll == -1) options->tcp_rcv_buf_poll = 1; -#ifdef NONE_CIPHER_ENABLED - /* options->none_enabled must not be set by default */ - if (options->none_switch == -1) - options->none_switch = 0; -#endif } /* Modified: head/crypto/openssh/readconf.h ============================================================================== --- head/crypto/openssh/readconf.h Mon Nov 23 12:47:08 2015 (r291197) +++ head/crypto/openssh/readconf.h Mon Nov 23 12:48:13 2015 (r291198) @@ -1,5 +1,4 @@ /* $OpenBSD: readconf.h,v 1.101 2014/02/23 20:11:36 djm Exp $ */ -/* $FreeBSD$ */ /* * Author: Tatu Ylonen @@ -165,10 +164,6 @@ typedef struct { * transfer. */ int tcp_rcv_buf; /* User switch to set tcp recv buffer. */ -#ifdef NONE_CIPHER_ENABLED - int none_enabled; /* Allow none to be used */ - int none_switch; /* Use none cipher */ -#endif } Options; #define SSH_CANONICALISE_NO 0 Modified: head/crypto/openssh/servconf.c ============================================================================== --- head/crypto/openssh/servconf.c Mon Nov 23 12:47:08 2015 (r291197) +++ head/crypto/openssh/servconf.c Mon Nov 23 12:48:13 2015 (r291198) @@ -158,9 +158,6 @@ initialize_server_options(ServerOptions options->hpn_disabled = -1; options->hpn_buffer_size = -1; options->tcp_rcv_buf_poll = -1; -#ifdef NONE_CIPHER_ENABLED - options->none_enabled = -1; -#endif } void @@ -389,9 +386,6 @@ typedef enum { sAuthorizedKeysCommand, sAuthorizedKeysCommandUser, sAuthenticationMethods, sHostKeyAgent, sHPNDisabled, sHPNBufferSize, sTcpRcvBufPoll, -#ifdef NONE_CIPHER_ENABLED - sNoneEnabled, -#endif sDeprecated, sUnsupported } ServerOpCodes; @@ -521,9 +515,6 @@ static struct { { "hpndisabled", sHPNDisabled, SSHCFG_ALL }, { "hpnbuffersize", sHPNBufferSize, SSHCFG_ALL }, { "tcprcvbufpoll", sTcpRcvBufPoll, SSHCFG_ALL }, -#ifdef NONE_CIPHER_ENABLED - { "noneenabled", sNoneEnabled, SSHCFG_ALL }, -#endif { NULL, sBadOption, 0 } }; @@ -1682,12 +1673,6 @@ process_server_config_line(ServerOptions intptr = &options->tcp_rcv_buf_poll; goto parse_flag; -#ifdef NONE_CIPHER_ENABLED - case sNoneEnabled: - intptr = &options->none_enabled; - goto parse_flag; -#endif - case sDeprecated: logit("%s line %d: Deprecated option %s", filename, linenum, arg); Modified: head/crypto/openssh/servconf.h ============================================================================== --- head/crypto/openssh/servconf.h Mon Nov 23 12:47:08 2015 (r291197) +++ head/crypto/openssh/servconf.h Mon Nov 23 12:48:13 2015 (r291198) @@ -1,5 +1,4 @@ /* $OpenBSD: servconf.h,v 1.112 2014/01/29 06:18:35 djm Exp $ */ -/* $FreeBSD$ */ /* * Author: Tatu Ylonen @@ -188,10 +187,6 @@ typedef struct { * kernels. */ u_int num_auth_methods; char *auth_methods[MAX_AUTH_METHODS]; - -#ifdef NONE_CIPHER_ENABLED - int none_enabled; /* Enable NONE cipher switch. */ -#endif } ServerOptions; /* Information about the incoming connection as used by Match */ Modified: head/crypto/openssh/ssh.c ============================================================================== --- head/crypto/openssh/ssh.c Mon Nov 23 12:47:08 2015 (r291197) +++ head/crypto/openssh/ssh.c Mon Nov 23 12:48:13 2015 (r291198) @@ -782,15 +782,6 @@ main(int ac, char **av) break; case 'T': options.request_tty = REQUEST_TTY_NO; -#ifdef NONE_CIPHER_ENABLED - /* - * Ensure that the user does not try to backdoor a - * NONE cipher switch on an interactive session by - * explicitly disabling it if the user asks for a - * session without a tty. - */ - options.none_switch = 0; -#endif break; case 'o': line = xstrdup(optarg); Modified: head/crypto/openssh/sshconnect2.c ============================================================================== --- head/crypto/openssh/sshconnect2.c Mon Nov 23 12:47:08 2015 (r291197) +++ head/crypto/openssh/sshconnect2.c Mon Nov 23 12:48:13 2015 (r291198) @@ -25,7 +25,6 @@ */ #include "includes.h" -__RCSID("$FreeBSD$"); #include #include @@ -80,16 +79,6 @@ __RCSID("$FreeBSD$"); extern char *client_version_string; extern char *server_version_string; extern Options options; -#ifdef NONE_CIPHER_ENABLED -extern Kex *xxx_kex; - -/* - * tty_flag is set in ssh.c so we can use it here. If set then prevent - * the switch to the null cipher. - */ - -extern int tty_flag; -#endif /* * SSH2 key exchange @@ -422,29 +411,6 @@ ssh_userauth2(const char *local_user, co pubkey_cleanup(&authctxt); dispatch_range(SSH2_MSG_USERAUTH_MIN, SSH2_MSG_USERAUTH_MAX, NULL); -#ifdef NONE_CIPHER_ENABLED - /* - * If the user explicitly requests to use the none cipher enable it - * post authentication and only if the right conditions are met: both - * of the NONE switches must be true and there must be no tty allocated. - */ - if (options.none_switch == 1 && options.none_enabled == 1) { - if (!tty_flag) { - debug("Requesting none cipher re-keying..."); - myproposal[PROPOSAL_ENC_ALGS_STOC] = "none"; - myproposal[PROPOSAL_ENC_ALGS_CTOS] = "none"; - kex_prop2buf(&xxx_kex->my, myproposal); - packet_request_rekeying(); - fprintf(stderr, "WARNING: enabled NONE cipher\n"); - } else { - /* Requested NONE cipher on an interactive session. */ - debug("Cannot switch to NONE cipher with tty " - "allocated"); - fprintf(stderr, "NONE cipher switch disabled given " - "a TTY is allocated\n"); - } - } -#endif debug("Authentication succeeded (%s).", authctxt.method->name); } Modified: head/crypto/openssh/sshd.c ============================================================================== --- head/crypto/openssh/sshd.c Mon Nov 23 12:47:08 2015 (r291197) +++ head/crypto/openssh/sshd.c Mon Nov 23 12:48:13 2015 (r291198) @@ -2501,12 +2501,6 @@ do_ssh2_kex(void) if (options.ciphers != NULL) { myproposal[PROPOSAL_ENC_ALGS_CTOS] = myproposal[PROPOSAL_ENC_ALGS_STOC] = options.ciphers; -#ifdef NONE_CIPHER_ENABLED - } else if (options.none_enabled == 1) { - debug ("WARNING: None cipher enabled"); - myproposal[PROPOSAL_ENC_ALGS_CTOS] = - myproposal[PROPOSAL_ENC_ALGS_STOC] = KEX_ENCRYPT_INCLUDE_NONE; -#endif } myproposal[PROPOSAL_ENC_ALGS_CTOS] = compat_cipher_proposal(myproposal[PROPOSAL_ENC_ALGS_CTOS]); Modified: head/secure/lib/libssh/Makefile ============================================================================== --- head/secure/lib/libssh/Makefile Mon Nov 23 12:47:08 2015 (r291197) +++ head/secure/lib/libssh/Makefile Mon Nov 23 12:48:13 2015 (r291198) @@ -43,10 +43,6 @@ CFLAGS+= -I${SSHDIR} -include ssh_namesp CFLAGS+= -include krb5_config.h .endif -.if ${MK_OPENSSH_NONE_CIPHER} != "no" -CFLAGS+= -DNONE_CIPHER_ENABLED -.endif - NO_LINT= LIBADD+= crypto crypt z Modified: head/secure/usr.bin/ssh/Makefile ============================================================================== --- head/secure/usr.bin/ssh/Makefile Mon Nov 23 12:47:08 2015 (r291197) +++ head/secure/usr.bin/ssh/Makefile Mon Nov 23 12:48:13 2015 (r291198) @@ -26,10 +26,6 @@ CFLAGS+= -include krb5_config.h LIBADD+= gssapi .endif -.if ${MK_OPENSSH_NONE_CIPHER} != "no" -CFLAGS+= -DNONE_CIPHER_ENABLED -.endif - LIBADD+= crypto .if defined(LOCALBASE) Modified: head/secure/usr.sbin/sshd/Makefile ============================================================================== --- head/secure/usr.sbin/sshd/Makefile Mon Nov 23 12:47:08 2015 (r291197) +++ head/secure/usr.sbin/sshd/Makefile Mon Nov 23 12:48:13 2015 (r291198) @@ -44,10 +44,6 @@ CFLAGS+= -include krb5_config.h LIBADD+= gssapi_krb5 gssapi krb5 .endif -.if ${MK_OPENSSH_NONE_CIPHER} != "no" -CFLAGS+= -DNONE_CIPHER_ENABLED -.endif - LIBADD+= crypto .if defined(LOCALBASE) Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Mon Nov 23 12:47:08 2015 (r291197) +++ head/share/mk/src.opts.mk Mon Nov 23 12:48:13 2015 (r291198) @@ -184,7 +184,6 @@ __DEFAULT_NO_OPTIONS = \ NAND \ OFED \ OPENLDAP \ - OPENSSH_NONE_CIPHER \ SHARED_TOOLCHAIN \ SORT_THREADS \ SVN From owner-svn-src-all@freebsd.org Mon Nov 23 12:55:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A9B5A34350; Mon, 23 Nov 2015 12:55:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBCDD18E2; Mon, 23 Nov 2015 12:55:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANCtcGu065384; Mon, 23 Nov 2015 12:55:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANCtcdo065383; Mon, 23 Nov 2015 12:55:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511231255.tANCtcdo065383@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 23 Nov 2015 12:55:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291199 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 12:55:39 -0000 Author: hselasky Date: Mon Nov 23 12:55:37 2015 New Revision: 291199 URL: https://svnweb.freebsd.org/changeset/base/291199 Log: Fix compile warning about shifting signed negative constant. MFC after: 3 days Modified: head/sys/dev/usb/controller/uhci.h Modified: head/sys/dev/usb/controller/uhci.h ============================================================================== --- head/sys/dev/usb/controller/uhci.h Mon Nov 23 12:48:13 2015 (r291198) +++ head/sys/dev/usb/controller/uhci.h Mon Nov 23 12:55:37 2015 (r291199) @@ -97,7 +97,7 @@ struct uhci_td { #define UHCI_TD_GET_ENDPT(s) (((s) >> 15) & 0xf) #define UHCI_TD_SET_DT(t) ((t) << 19) #define UHCI_TD_GET_DT(s) (((s) >> 19) & 1) -#define UHCI_TD_SET_MAXLEN(l) (((l)-1) << 21) +#define UHCI_TD_SET_MAXLEN(l) (((l)-1U) << 21) #define UHCI_TD_GET_MAXLEN(s) ((((s) >> 21) + 1) & 0x7ff) #define UHCI_TD_MAXLEN_MASK 0xffe00000 volatile uint32_t td_buffer; From owner-svn-src-all@freebsd.org Mon Nov 23 13:23:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59295A34A52; Mon, 23 Nov 2015 13:23:55 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20E2818A2; Mon, 23 Nov 2015 13:23:55 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANDNsvE073979; Mon, 23 Nov 2015 13:23:54 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANDNsUr073978; Mon, 23 Nov 2015 13:23:54 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201511231323.tANDNsUr073978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Mon, 23 Nov 2015 13:23:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291200 - head/sys/contrib/vchiq/interface/vchiq_arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 13:23:55 -0000 Author: skra Date: Mon Nov 23 13:23:53 2015 New Revision: 291200 URL: https://svnweb.freebsd.org/changeset/base/291200 Log: Fix inconsistent use of malloc type for cdev private data. Remove M_VCHIQ malloc type, now not used anywhere. Reviewed by: gonzo Approved by: kib (mentor) Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c Mon Nov 23 12:55:37 2015 (r291199) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c Mon Nov 23 13:23:53 2015 (r291200) @@ -54,8 +54,6 @@ #define KEEPALIVE_VER 1 #define KEEPALIVE_VER_MIN KEEPALIVE_VER -MALLOC_DEFINE(M_VCHIQ, "vchiq_cdev", "VideoCore cdev memroy"); - /* Run time control of log level, based on KERN_XXX level. */ int vchiq_arm_log_level = VCHIQ_LOG_DEFAULT; int vchiq_susp_log_level = VCHIQ_LOG_ERROR; @@ -1143,7 +1141,7 @@ static void instance_dtr(void *data) { - free(data, M_VCHIQ); + kfree(data); } /**************************************************************************** From owner-svn-src-all@freebsd.org Mon Nov 23 13:30:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E94CFA34C90; Mon, 23 Nov 2015 13:30:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C47131BC1; Mon, 23 Nov 2015 13:30:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANDUDTP074415; Mon, 23 Nov 2015 13:30:13 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANDUDav074409; Mon, 23 Nov 2015 13:30:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511231330.tANDUDav074409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 23 Nov 2015 13:30: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: r291201 - in stable/10: share/man/man4 sys/conf sys/modules X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 13:30:15 -0000 Author: hselasky Date: Mon Nov 23 13:30:13 2015 New Revision: 291201 URL: https://svnweb.freebsd.org/changeset/base/291201 Log: MFC r291072, r291168 and r291169: Add the mlx5 and mlx5en modules to the i386 and amd64 kernel builds by default and add a manual page for mlx5en. The mlx5 module contains shared code for both infiniband and ethernet. The mlx5en module contains specific code for ethernet functionality only. A mlx5ib module is in the works for infiniband support. Supported hardware: - ConnectX-4: 10/20/25/40/50/56/100Gb/s speeds. - ConnectX-4 LX: 10/25/40/50Gb/s speeds (low power consumption) Refer to the mlx5en(4) manual page for a comprehensive list. The team porting the mlx5 driver(s) to FreeBSD: - Hans Petter Selasky - Oded Shanoon - Meny Yossefi - Shany Michaely - Shahar Klein - Daria Genzel - Mark Bloch Differential Revision: https://reviews.freebsd.org/D4163 Sponsored by: Mellanox Technologies Added: stable/10/share/man/man4/mlx5en.4 - copied, changed from r291072, head/share/man/man4/mlx5en.4 Modified: stable/10/share/man/man4/Makefile stable/10/sys/conf/NOTES stable/10/sys/conf/files stable/10/sys/conf/options stable/10/sys/modules/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Mon Nov 23 13:23:53 2015 (r291200) +++ stable/10/share/man/man4/Makefile Mon Nov 23 13:30:13 2015 (r291201) @@ -260,6 +260,7 @@ MAN= aac.4 \ mk48txx.4 \ mld.4 \ mlx.4 \ + mlx5en.4 \ mly.4 \ mmc.4 \ mmcsd.4 \ @@ -636,6 +637,7 @@ MLINKS+=lp.4 plip.4 MLINKS+=malo.4 if_malo.4 MLINKS+=md.4 vn.4 MLINKS+=mem.4 kmem.4 +MLINKS+=mlx5en.4 mce.4 MLINKS+=mn.4 if_mn.4 MLINKS+=mos.4 if_mos.4 MLINKS+=msk.4 if_msk.4 Copied and modified: stable/10/share/man/man4/mlx5en.4 (from r291072, head/share/man/man4/mlx5en.4) ============================================================================== --- head/share/man/man4/mlx5en.4 Thu Nov 19 12:55:43 2015 (r291072, copy source) +++ stable/10/share/man/man4/mlx5en.4 Mon Nov 23 13:30:13 2015 (r291201) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 15, 2015 +.Dd November 22, 2015 .Dt mlx5en 4 .Os .Sh NAME @@ -53,10 +53,10 @@ driver provides support for PCI Express ConnectX-4 and ConnectX-4 LX. The driver supports Jumbo Frames, Transmit/Receive checksum offload, TCP segmentation offload (TSO), Large Receive Offload (LRO), -HW Large Receive Offload (HW LRO), VLAN tag insertion/extraction, +HW Large Receive Offload (HW LRO), VLAN tag insertion/extraction, VLAN checksum offload, VLAN TSO, and Receive Side Steering (RSS). .br -The network Interface is named mce. +The network interface is named mce. .br For further hardware information and questions related to hardware requirements, see Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Mon Nov 23 13:23:53 2015 (r291200) +++ stable/10/sys/conf/NOTES Mon Nov 23 13:30:13 2015 (r291201) @@ -351,6 +351,9 @@ options COMPAT_FREEBSD6 # Enable FreeBSD7 compatibility syscalls options COMPAT_FREEBSD7 +# Enable Linux Kernel Programming Interface +#options COMPAT_LINUXKPI + # # These three options provide support for System V Interface # Definition-style interprocess communication, in the form of shared @@ -1953,6 +1956,8 @@ device xmphy # XaQti XMAC II # 88E8062, 88E8035, 88E8036, 88E8038, 88E8050, 88E8052, 88E8053, # 88E8055, 88E8056 and D-Link 560T/550SX. # lmc: Support for the LMC/SBE wide-area network interface cards. +# mlx5: Mellanox ConnectX-4 and ConnectX-4 LX IB and Eth shared code module. +# mlx5en:Mellanox ConnectX-4 and ConnectX-4 LX PCIe Ethernet adapters. # my: Myson Fast Ethernet (MTD80X, MTD89X) # nge: Support for PCI gigabit ethernet adapters based on the National # Semiconductor DP83820 and DP83821 chipset. This includes the @@ -2071,6 +2076,8 @@ device gem # Apple GMAC/Sun ERI/Sun GE device hme # Sun HME (Happy Meal Ethernet) device jme # JMicron JMC250 Gigabit/JMC260 Fast Ethernet device lge # Level 1 LXT1001 gigabit Ethernet +#device mlx5 # Shared code module between IB and Ethernet +#device mlx5en # Mellanox ConnectX-4 and ConnectX-4 LX device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet device my # Myson Fast Ethernet (MTD80X, MTD89X) device nge # NatSemi DP83820 gigabit Ethernet Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Mon Nov 23 13:23:53 2015 (r291200) +++ stable/10/sys/conf/files Mon Nov 23 13:30:13 2015 (r291201) @@ -3639,11 +3639,11 @@ nlm/nlm_prot_xdr.c optional nfslockd | nlm/sm_inter_xdr.c optional nfslockd | nfsd # OpenFabrics Enterprise Distribution (Infiniband) -ofed/include/linux/linux_compat.c optional ofed \ +ofed/include/linux/linux_compat.c optional ofed | compat_linuxkpi \ no-depend compile-with "${OFED_C}" -ofed/include/linux/linux_idr.c optional ofed \ +ofed/include/linux/linux_idr.c optional ofed | compat_linuxkpi \ no-depend compile-with "${OFED_C}" -ofed/include/linux/linux_radix.c optional ofed \ +ofed/include/linux/linux_radix.c optional ofed | compat_linuxkpi \ no-depend compile-with "${OFED_C}" ofed/drivers/infiniband/core/addr.c optional ofed \ no-depend \ @@ -3890,6 +3890,60 @@ ofed/drivers/net/mlx4/en_tx.c optional no-depend obj-prefix "mlx4_" \ compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" +dev/mlx5/mlx5_core/mlx5_alloc.c optional mlx5 pci \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_cmd.c optional mlx5 pci \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_cq.c optional mlx5 pci \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_eq.c optional mlx5 pci \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_flow_table.c optional mlx5 pci \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_fw.c optional mlx5 pci \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_health.c optional mlx5 pci \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_mad.c optional mlx5 pci \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_main.c optional mlx5 pci \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_mcg.c optional mlx5 pci \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_mr.c optional mlx5 pci \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_pagealloc.c optional mlx5 pci \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_pd.c optional mlx5 pci \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_port.c optional mlx5 pci \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_qp.c optional mlx5 pci \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_srq.c optional mlx5 pci \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_transobj.c optional mlx5 pci \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_uar.c optional mlx5 pci \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_vport.c optional mlx5 pci \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_wq.c optional mlx5 pci \ + no-depend compile-with "${OFED_C}" + +dev/mlx5/mlx5_en/mlx5_en_ethtool.c optional mlx5en pci inet inet6 \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_en/mlx5_en_main.c optional mlx5en pci inet inet6 \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_en/mlx5_en_tx.c optional mlx5en pci inet inet6 \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_en/mlx5_en_flow_table.c optional mlx5en pci inet inet6 \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_en/mlx5_en_rx.c optional mlx5en pci inet inet6 \ + no-depend compile-with "${OFED_C}" +dev/mlx5/mlx5_en/mlx5_en_txrx.c optional mlx5en pci inet inet6 \ + no-depend compile-with "${OFED_C}" + ofed/drivers/infiniband/hw/mthca/mthca_allocator.c optional mthca \ no-depend compile-with "${OFED_C}" ofed/drivers/infiniband/hw/mthca/mthca_av.c optional mthca \ Modified: stable/10/sys/conf/options ============================================================================== --- stable/10/sys/conf/options Mon Nov 23 13:23:53 2015 (r291200) +++ stable/10/sys/conf/options Mon Nov 23 13:30:13 2015 (r291201) @@ -83,6 +83,7 @@ COMPAT_FREEBSD4 opt_compat.h COMPAT_FREEBSD5 opt_compat.h COMPAT_FREEBSD6 opt_compat.h COMPAT_FREEBSD7 opt_compat.h +COMPAT_LINUXKPI opt_compat.h COMPILING_LINT opt_global.h COMPRESS_USER_CORES opt_core.h CY_PCI_FASTINTR Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Mon Nov 23 13:23:53 2015 (r291200) +++ stable/10/sys/modules/Makefile Mon Nov 23 13:30:13 2015 (r291201) @@ -220,6 +220,8 @@ SUBDIR= \ ${_mlx4} \ ${_mlx4ib} \ ${_mlxen} \ + ${_mlx5} \ + ${_mlx5en} \ ${_mly} \ mmc \ mmcsd \ @@ -545,6 +547,11 @@ _mlx4ib= mlx4ib _mlxen= mlxen _mthca= mthca .endif +_mlx5= mlx5 +.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ + defined(ALL_MODULES) +_mlx5en= mlx5en +.endif _ncv= ncv _ndis= ndis _nsp= nsp @@ -749,6 +756,11 @@ _mlx4ib= mlx4ib _mlxen= mlxen _mthca= mthca .endif +_mlx5= mlx5 +.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \ + defined(ALL_MODULES) +_mlx5en= mlx5en +.endif _ndis= ndis _nfe= nfe _ntb= ntb From owner-svn-src-all@freebsd.org Mon Nov 23 13:36:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D201A34F59; Mon, 23 Nov 2015 13:36:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF89B1130; Mon, 23 Nov 2015 13:36:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANDaglZ077107; Mon, 23 Nov 2015 13:36:42 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANDagwD077106; Mon, 23 Nov 2015 13:36:42 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511231336.tANDagwD077106@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 23 Nov 2015 13:36: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: r291202 - stable/10/sys/dev/ti X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 13:36:43 -0000 Author: hselasky Date: Mon Nov 23 13:36:41 2015 New Revision: 291202 URL: https://svnweb.freebsd.org/changeset/base/291202 Log: MFC r284722 and r284724: Fix endless recursion in ti(4)'s ti_ifmedia_upd(), found by clang 3.7.0. Modified: stable/10/sys/dev/ti/if_ti.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ti/if_ti.c ============================================================================== --- stable/10/sys/dev/ti/if_ti.c Mon Nov 23 13:30:13 2015 (r291201) +++ stable/10/sys/dev/ti/if_ti.c Mon Nov 23 13:36:41 2015 (r291202) @@ -3335,7 +3335,7 @@ ti_ifmedia_upd(struct ifnet *ifp) sc = ifp->if_softc; TI_LOCK(sc); - error = ti_ifmedia_upd(ifp); + error = ti_ifmedia_upd_locked(sc); TI_UNLOCK(sc); return (error); From owner-svn-src-all@freebsd.org Mon Nov 23 13:38:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F1E7A3509C; Mon, 23 Nov 2015 13:38:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF71613BE; Mon, 23 Nov 2015 13:38:47 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANDckUG077226; Mon, 23 Nov 2015 13:38:46 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANDckSJ077225; Mon, 23 Nov 2015 13:38:46 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511231338.tANDckSJ077225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 23 Nov 2015 13:38: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: r291203 - stable/9/sys/dev/ti X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 13:38:48 -0000 Author: hselasky Date: Mon Nov 23 13:38:46 2015 New Revision: 291203 URL: https://svnweb.freebsd.org/changeset/base/291203 Log: MFC r284722 and r284724: Fix endless recursion in ti(4)'s ti_ifmedia_upd(), found by clang 3.7.0. Modified: stable/9/sys/dev/ti/if_ti.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ti/if_ti.c ============================================================================== --- stable/9/sys/dev/ti/if_ti.c Mon Nov 23 13:36:41 2015 (r291202) +++ stable/9/sys/dev/ti/if_ti.c Mon Nov 23 13:38:46 2015 (r291203) @@ -3354,7 +3354,7 @@ ti_ifmedia_upd(struct ifnet *ifp) sc = ifp->if_softc; TI_LOCK(sc); - error = ti_ifmedia_upd(ifp); + error = ti_ifmedia_upd_locked(sc); TI_UNLOCK(sc); return (error); From owner-svn-src-all@freebsd.org Mon Nov 23 13:44:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B214EA352D1; Mon, 23 Nov 2015 13:44:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EAB219C2; Mon, 23 Nov 2015 13:44:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANDiPEV080160; Mon, 23 Nov 2015 13:44:25 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANDiPKH080159; Mon, 23 Nov 2015 13:44:25 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511231344.tANDiPKH080159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 23 Nov 2015 13:44:25 +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: r291204 - stable/8/sys/dev/ti X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 13:44:26 -0000 Author: hselasky Date: Mon Nov 23 13:44:25 2015 New Revision: 291204 URL: https://svnweb.freebsd.org/changeset/base/291204 Log: MFC r284722 and r284724: Fix endless recursion in ti(4)'s ti_ifmedia_upd(), found by clang 3.7.0. Modified: stable/8/sys/dev/ti/if_ti.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/ti/ (props changed) Modified: stable/8/sys/dev/ti/if_ti.c ============================================================================== --- stable/8/sys/dev/ti/if_ti.c Mon Nov 23 13:38:46 2015 (r291203) +++ stable/8/sys/dev/ti/if_ti.c Mon Nov 23 13:44:25 2015 (r291204) @@ -3356,7 +3356,7 @@ ti_ifmedia_upd(struct ifnet *ifp) sc = ifp->if_softc; TI_LOCK(sc); - error = ti_ifmedia_upd(ifp); + error = ti_ifmedia_upd_locked(sc); TI_UNLOCK(sc); return (error); From owner-svn-src-all@freebsd.org Mon Nov 23 13:47:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03B3FA3536D; Mon, 23 Nov 2015 13:47:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A83021BA5; Mon, 23 Nov 2015 13:47:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANDlVkh080309; Mon, 23 Nov 2015 13:47:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANDlVuT080308; Mon, 23 Nov 2015 13:47:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511231347.tANDlVuT080308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 23 Nov 2015 13:47: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: r291205 - stable/10/sys/dev/usb/input X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 13:47:33 -0000 Author: hselasky Date: Mon Nov 23 13:47:31 2015 New Revision: 291205 URL: https://svnweb.freebsd.org/changeset/base/291205 Log: MFC r277974: Fix a bunch of -Wcast-qual warnings in sys/dev/usb/input/uhid.c, by using __DECONST. No functional change. Differential Revision: https://reviews.freebsd.org/D1743 Modified: stable/10/sys/dev/usb/input/uhid.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/input/uhid.c ============================================================================== --- stable/10/sys/dev/usb/input/uhid.c Mon Nov 23 13:44:25 2015 (r291204) +++ stable/10/sys/dev/usb/input/uhid.c Mon Nov 23 13:47:31 2015 (r291205) @@ -736,7 +736,7 @@ uhid_attach(device_t dev) if (uaa->info.idProduct == USB_PRODUCT_WACOM_GRAPHIRE) { sc->sc_repdesc_size = sizeof(uhid_graphire_report_descr); - sc->sc_repdesc_ptr = (void *)&uhid_graphire_report_descr; + sc->sc_repdesc_ptr = __DECONST(void *, &uhid_graphire_report_descr); sc->sc_flags |= UHID_FLAG_STATIC_DESC; } else if (uaa->info.idProduct == USB_PRODUCT_WACOM_GRAPHIRE3_4X5) { @@ -757,7 +757,7 @@ uhid_attach(device_t dev) usbd_errstr(error)); } sc->sc_repdesc_size = sizeof(uhid_graphire3_4x5_report_descr); - sc->sc_repdesc_ptr = (void *)&uhid_graphire3_4x5_report_descr; + sc->sc_repdesc_ptr = __DECONST(void *, &uhid_graphire3_4x5_report_descr); sc->sc_flags |= UHID_FLAG_STATIC_DESC; } } else if ((uaa->info.bInterfaceClass == UICLASS_VENDOR) && @@ -777,7 +777,7 @@ uhid_attach(device_t dev) } /* the Xbox 360 gamepad has no report descriptor */ sc->sc_repdesc_size = sizeof(uhid_xb360gp_report_descr); - sc->sc_repdesc_ptr = (void *)&uhid_xb360gp_report_descr; + sc->sc_repdesc_ptr = __DECONST(void *, &uhid_xb360gp_report_descr); sc->sc_flags |= UHID_FLAG_STATIC_DESC; } if (sc->sc_repdesc_ptr == NULL) { From owner-svn-src-all@freebsd.org Mon Nov 23 13:48:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AD6BA353C5; Mon, 23 Nov 2015 13:48:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B53E41D01; Mon, 23 Nov 2015 13:48:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANDmSMP080408; Mon, 23 Nov 2015 13:48:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANDmS4S080407; Mon, 23 Nov 2015 13:48:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511231348.tANDmS4S080407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 23 Nov 2015 13:48: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: r291206 - stable/9/sys/dev/usb/input X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 13:48:30 -0000 Author: hselasky Date: Mon Nov 23 13:48:28 2015 New Revision: 291206 URL: https://svnweb.freebsd.org/changeset/base/291206 Log: MFC r277974: Fix a bunch of -Wcast-qual warnings in sys/dev/usb/input/uhid.c, by using __DECONST. No functional change. Differential Revision: https://reviews.freebsd.org/D1743 Modified: stable/9/sys/dev/usb/input/uhid.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/input/uhid.c ============================================================================== --- stable/9/sys/dev/usb/input/uhid.c Mon Nov 23 13:47:31 2015 (r291205) +++ stable/9/sys/dev/usb/input/uhid.c Mon Nov 23 13:48:28 2015 (r291206) @@ -736,7 +736,7 @@ uhid_attach(device_t dev) if (uaa->info.idProduct == USB_PRODUCT_WACOM_GRAPHIRE) { sc->sc_repdesc_size = sizeof(uhid_graphire_report_descr); - sc->sc_repdesc_ptr = (void *)&uhid_graphire_report_descr; + sc->sc_repdesc_ptr = __DECONST(void *, &uhid_graphire_report_descr); sc->sc_flags |= UHID_FLAG_STATIC_DESC; } else if (uaa->info.idProduct == USB_PRODUCT_WACOM_GRAPHIRE3_4X5) { @@ -757,7 +757,7 @@ uhid_attach(device_t dev) usbd_errstr(error)); } sc->sc_repdesc_size = sizeof(uhid_graphire3_4x5_report_descr); - sc->sc_repdesc_ptr = (void *)&uhid_graphire3_4x5_report_descr; + sc->sc_repdesc_ptr = __DECONST(void *, &uhid_graphire3_4x5_report_descr); sc->sc_flags |= UHID_FLAG_STATIC_DESC; } } else if ((uaa->info.bInterfaceClass == UICLASS_VENDOR) && @@ -777,7 +777,7 @@ uhid_attach(device_t dev) } /* the Xbox 360 gamepad has no report descriptor */ sc->sc_repdesc_size = sizeof(uhid_xb360gp_report_descr); - sc->sc_repdesc_ptr = (void *)&uhid_xb360gp_report_descr; + sc->sc_repdesc_ptr = __DECONST(void *, &uhid_xb360gp_report_descr); sc->sc_flags |= UHID_FLAG_STATIC_DESC; } if (sc->sc_repdesc_ptr == NULL) { From owner-svn-src-all@freebsd.org Mon Nov 23 14:06:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E194A3585E; Mon, 23 Nov 2015 14:06:22 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A00A163D; Mon, 23 Nov 2015 14:06:22 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANE6LCY086135; Mon, 23 Nov 2015 14:06:21 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANE6LZ6086134; Mon, 23 Nov 2015 14:06:21 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201511231406.tANE6LZ6086134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Mon, 23 Nov 2015 14:06:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291207 - head/sbin/dumpon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 14:06:22 -0000 Author: smh Date: Mon Nov 23 14:06:21 2015 New Revision: 291207 URL: https://svnweb.freebsd.org/changeset/base/291207 Log: Fix dumpon compatibility with dumpdev kenv The dumpdev kenv supports devices without the /dev/ prefix, fix dumpon to also support this which is required after r288153. MFC after: 1 week Sponsored by: Multiplay Modified: head/sbin/dumpon/dumpon.c Modified: head/sbin/dumpon/dumpon.c ============================================================================== --- head/sbin/dumpon/dumpon.c Mon Nov 23 13:48:28 2015 (r291206) +++ head/sbin/dumpon/dumpon.c Mon Nov 23 14:06:21 2015 (r291207) @@ -152,16 +152,31 @@ main(int argc, char *argv[]) usage(); if (strcmp(argv[0], "off") != 0) { - fd = open(argv[0], O_RDONLY); + char tmp[PATH_MAX]; + char *dumpdev; + + if (strncmp(argv[0], _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) { + dumpdev = argv[0]; + } else { + i = snprintf(tmp, PATH_MAX, "%s%s", _PATH_DEV, argv[0]); + if (i < 0) { + err(EX_OSERR, "%s", argv[0]); + } else if (i >= PATH_MAX) { + errno = EINVAL; + err(EX_DATAERR, "%s", argv[0]); + } + dumpdev = tmp; + } + fd = open(dumpdev, O_RDONLY); if (fd < 0) - err(EX_OSFILE, "%s", argv[0]); - check_size(fd, argv[0]); + err(EX_OSFILE, "%s", dumpdev); + check_size(fd, dumpdev); u = 0; i = ioctl(fd, DIOCSKERNELDUMP, &u); u = 1; i = ioctl(fd, DIOCSKERNELDUMP, &u); if (i == 0 && verbose) - printf("kernel dumps on %s\n", argv[0]); + printf("kernel dumps on %s\n", dumpdev); } else { fd = open(_PATH_DEVNULL, O_RDONLY); if (fd < 0) From owner-svn-src-all@freebsd.org Mon Nov 23 15:49:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53717A3606D; Mon, 23 Nov 2015 15:49:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05E7B12D5; Mon, 23 Nov 2015 15:49:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANFnpu1015727; Mon, 23 Nov 2015 15:49:51 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANFnobU015721; Mon, 23 Nov 2015 15:49:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511231549.tANFnobU015721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 23 Nov 2015 15:49:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291209 - in head: share/man/man4 sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 15:49:52 -0000 Author: mav Date: Mon Nov 23 15:49:50 2015 New Revision: 291209 URL: https://svnweb.freebsd.org/changeset/base/291209 Log: Fix target mode support for Qlogic 2200 FC adapters. Now target mode works for all supported FC adapters except ancient 2100, which is not tested. Modified: head/share/man/man4/isp.4 head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_library.c head/sys/dev/isp/isp_pci.c head/sys/dev/isp/ispmbox.h Modified: head/share/man/man4/isp.4 ============================================================================== --- head/share/man/man4/isp.4 Mon Nov 23 15:04:24 2015 (r291208) +++ head/share/man/man4/isp.4 Mon Nov 23 15:49:50 2015 (r291209) @@ -1,7 +1,6 @@ -.\" $NetBSD: isp.4,v 1.5 1999/12/18 18:33:05 mjacob Exp $ -.\" -.\" Copyright (c) 1998, 1999, 2001 -.\" Matthew Jacob, for NASA/Ames Research Center +.\" Copyright (c) 2009-2015 Alexander Motin +.\" Copyright (c) 2006 Marcus Alves Grando +.\" Copyright (c) 1998-2001 Matthew Jacob, for NASA/Ames Research Center .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -25,8 +24,6 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" Additional Copyright (c) 2006 by Marcus Alves Grando -.\" .\" $FreeBSD$ .\" .Dd November 22, 2015 @@ -34,7 +31,7 @@ .Os .Sh NAME .Nm isp -.Nd Qlogic based SCSI and FibreChannel SCSI Host Adapters +.Nd Qlogic based SPI and FibreChannel SCSI Host Adapters .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -52,23 +49,19 @@ isp_load="YES" .Ed .Sh DESCRIPTION This driver provides access to -.Tn SCSI +.Tn SPI or .Tn FibreChannel -devices. +SCSI devices. .Pp -SCSI features include support for Ultra SCSI and wide mode transactions -for +SPI supports initiator mode for Ultra SCSI and wide mode transactions for .Tn SCSI , Ultra2 LVD (1080, 1280), and Ultra3 LVD (10160, 12160). .Pp -Fibre Channel support uses FCP SCSI profile for -.Tn FibreChannel , -and utilizes Class 3 and Class 2 (2200 and later) connections. +Fibre Channel supports initiator and target modes of FCP SCSI profile, +utilizing Class 3 and Class 2 (2200 and later) connections. Support is available for Public and Private loops, Point-to-Point and Fabric connections. -The newer 2-Gigabit cards (2300, 2312, 2322), 4-Gigabit (2422, 2432) -and 8-Gigabit (2532) are supported in both initiator and target modes. .Sh FIRMWARE Firmware loading is supported if the .Xr ispfw 4 @@ -120,8 +113,7 @@ Optical 4Gb Fibre Channel PCIe cards. Optical 8Gb Fibre Channel PCIe cards. .El .Sh CONFIGURATION OPTIONS -Target mode support for 23xx and above Fibre Channel adapters may be -enabled with the +Target mode support for Fibre Channel adapters may be enabled with the .Pp .Cd options ISP_TARGET_MODE .Pp Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Mon Nov 23 15:04:24 2015 (r291208) +++ head/sys/dev/isp/isp.c Mon Nov 23 15:49:50 2015 (r291209) @@ -1733,7 +1733,12 @@ isp_fibre_init(ispsoftc_t *isp) icbp->icb_fwoptions &= ~ICBOPT_TGT_ENABLE; } - if (fcp->role & ISP_ROLE_INITIATOR) { + /* + * For some reason my 2200 does not generate ATIOs in target mode + * if initiator is disabled. Extra logins are better then target + * not working at all. + */ + if ((fcp->role & ISP_ROLE_INITIATOR) || IS_2100(isp) || IS_2200(isp)) { icbp->icb_fwoptions &= ~ICBOPT_INI_DISABLE; } else { icbp->icb_fwoptions |= ICBOPT_INI_DISABLE; @@ -1954,6 +1959,8 @@ isp_fibre_init(ispsoftc_t *isp) } isp_prt(isp, ISP_LOGDEBUG0, "isp_fibre_init: fwopt 0x%x xfwopt 0x%x zfwopt 0x%x", icbp->icb_fwoptions, icbp->icb_xfwoptions, icbp->icb_zfwoptions); + if (isp->isp_dblev & ISP_LOGDEBUG1) + isp_print_bytes(isp, "isp_fibre_init", sizeof (*icbp), icbp); isp_put_icb(isp, icbp, (isp_icb_t *)fcp->isp_scratch); @@ -1966,17 +1973,14 @@ isp_fibre_init(ispsoftc_t *isp) mbs.param[3] = DMA_WD0(fcp->isp_scdma); mbs.param[6] = DMA_WD3(fcp->isp_scdma); mbs.param[7] = DMA_WD2(fcp->isp_scdma); - mbs.logval = MBLOGALL; isp_prt(isp, ISP_LOGDEBUG0, "INIT F/W from %p (%08x%08x)", fcp->isp_scratch, (uint32_t) ((uint64_t)fcp->isp_scdma >> 32), (uint32_t) fcp->isp_scdma); MEMORYBARRIER(isp, SYNC_SFORDEV, 0, sizeof (*icbp), 0); isp_mboxcmd(isp, &mbs); FC_SCRATCH_RELEASE(isp, 0); - if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - isp_print_bytes(isp, "isp_fibre_init", sizeof (*icbp), icbp); + if (mbs.param[0] != MBOX_COMMAND_COMPLETE) return; - } isp->isp_reqidx = 0; isp->isp_reqodx = 0; isp->isp_residx = 0; Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Mon Nov 23 15:04:24 2015 (r291208) +++ head/sys/dev/isp/isp_freebsd.c Mon Nov 23 15:49:50 2015 (r291209) @@ -4947,7 +4947,7 @@ isp_fcp_next_crn(ispsoftc_t *isp, uint8_ struct isp_nexus *nxp; int idx; - if (isp->isp_type < ISP_HA_FC_2300) + if (IS_2100(isp)) return (0); chan = XS_CHANNEL(cmd); Modified: head/sys/dev/isp/isp_library.c ============================================================================== --- head/sys/dev/isp/isp_library.c Mon Nov 23 15:04:24 2015 (r291208) +++ head/sys/dev/isp/isp_library.c Mon Nov 23 15:49:50 2015 (r291209) @@ -963,7 +963,8 @@ isp_put_request_t2(ispsoftc_t *isp, ispr ISP_IOXPUT_8(isp, src->req_target, &dst->req_target); ISP_IOXPUT_16(isp, src->req_scclun, &dst->req_scclun); ISP_IOXPUT_16(isp, src->req_flags, &dst->req_flags); - ISP_IOXPUT_16(isp, src->req_reserved, &dst->req_reserved); + ISP_IOXPUT_8(isp, src->req_crn, &dst->req_crn); + ISP_IOXPUT_8(isp, src->req_reserved, &dst->req_reserved); ISP_IOXPUT_16(isp, src->req_time, &dst->req_time); ISP_IOXPUT_16(isp, src->req_seg_count, &dst->req_seg_count); for (i = 0; i < ASIZE(src->req_cdb); i++) { @@ -985,7 +986,8 @@ isp_put_request_t2e(ispsoftc_t *isp, isp ISP_IOXPUT_16(isp, src->req_target, &dst->req_target); ISP_IOXPUT_16(isp, src->req_scclun, &dst->req_scclun); ISP_IOXPUT_16(isp, src->req_flags, &dst->req_flags); - ISP_IOXPUT_16(isp, src->req_reserved, &dst->req_reserved); + ISP_IOXPUT_8(isp, src->req_crn, &dst->req_crn); + ISP_IOXPUT_8(isp, src->req_reserved, &dst->req_reserved); ISP_IOXPUT_16(isp, src->req_time, &dst->req_time); ISP_IOXPUT_16(isp, src->req_seg_count, &dst->req_seg_count); for (i = 0; i < ASIZE(src->req_cdb); i++) { Modified: head/sys/dev/isp/isp_pci.c ============================================================================== --- head/sys/dev/isp/isp_pci.c Mon Nov 23 15:04:24 2015 (r291208) +++ head/sys/dev/isp/isp_pci.c Mon Nov 23 15:49:50 2015 (r291209) @@ -1488,7 +1488,7 @@ imc(void *arg, bus_dma_segment_t *segs, segs->ds_addr += ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(imushp->isp)); imushp->vbase += ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(imushp->isp)); - if (imushp->isp->isp_type >= ISP_HA_FC_2300) { + if (imushp->isp->isp_type >= ISP_HA_FC_2200) { imushp->isp->isp_osinfo.ecmd_dma = segs->ds_addr; imushp->isp->isp_osinfo.ecmd_free = (isp_ecmd_t *)imushp->vbase; imushp->isp->isp_osinfo.ecmd_base = imushp->isp->isp_osinfo.ecmd_free; @@ -1627,7 +1627,7 @@ isp_pci_mbxdma(ispsoftc_t *isp) len += ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(isp)); } #endif - if (isp->isp_type >= ISP_HA_FC_2300) { + if (isp->isp_type >= ISP_HA_FC_2200) { len += (N_XCMDS * XCMD_SIZE); } @@ -1689,7 +1689,7 @@ isp_pci_mbxdma(ispsoftc_t *isp) bus_dma_tag_destroy(fc->tdmat); goto bad; } - if (isp->isp_type >= ISP_HA_FC_2300) { + if (!IS_2100(isp)) { for (i = 0; i < INITIAL_NEXUS_COUNT; i++) { struct isp_nexus *n = malloc(sizeof (struct isp_nexus), M_DEVBUF, M_NOWAIT | M_ZERO); if (n == NULL) { Modified: head/sys/dev/isp/ispmbox.h ============================================================================== --- head/sys/dev/isp/ispmbox.h Mon Nov 23 15:04:24 2015 (r291208) +++ head/sys/dev/isp/ispmbox.h Mon Nov 23 15:49:50 2015 (r291209) @@ -481,7 +481,8 @@ typedef struct { uint16_t req_target; uint16_t req_scclun; uint16_t req_flags; - uint16_t req_reserved; + uint8_t req_crn; + uint8_t req_reserved; uint16_t req_time; uint16_t req_seg_count; uint8_t req_cdb[16]; @@ -1010,6 +1011,7 @@ typedef struct { #define ICBZOPT_RATE_AUTO 0x8000 #define ICBZOPT_RATE_TWOGB 0x4000 #define ICBZOPT_50_OHM 0x2000 +#define ICBZOPT_NO_LOCAL_PLOGI 0x0080 #define ICBZOPT_ENA_OOF 0x0040 /* out of order frame handling */ #define ICBZOPT_RSPSZ_MASK 0x0030 #define ICBZOPT_RSPSZ_24 0x0000 From owner-svn-src-all@freebsd.org Mon Nov 23 17:05:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF644A3242D; Mon, 23 Nov 2015 17:05:29 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D53E2000; Mon, 23 Nov 2015 17:05:29 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANH5SlV042729; Mon, 23 Nov 2015 17:05:28 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANH5SUe042728; Mon, 23 Nov 2015 17:05:28 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201511231705.tANH5SUe042728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 23 Nov 2015 17:05:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291210 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 17:05:29 -0000 Author: andrew Date: Mon Nov 23 17:05:28 2015 New Revision: 291210 URL: https://svnweb.freebsd.org/changeset/base/291210 Log: Only enable the first interrupt for now, we don't correctly configure or route interrupts to the needed cpu. Sponsored by: ABT Systems Ltd Modified: head/sys/arm/arm/pmu.c Modified: head/sys/arm/arm/pmu.c ============================================================================== --- head/sys/arm/arm/pmu.c Mon Nov 23 15:49:50 2015 (r291209) +++ head/sys/arm/arm/pmu.c Mon Nov 23 17:05:28 2015 (r291210) @@ -58,7 +58,11 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef notyet #define MAX_RLEN 8 +#else +#define MAX_RLEN 1 +#endif struct pmu_softc { struct resource *res[MAX_RLEN]; @@ -84,6 +88,8 @@ static struct ofw_compat_data compat_dat static struct resource_spec pmu_spec[] = { { SYS_RES_IRQ, 0, RF_ACTIVE }, + /* We don't currently handle pmu events, other than on cpu 0 */ +#if notyet { SYS_RES_IRQ, 1, RF_ACTIVE | RF_OPTIONAL }, { SYS_RES_IRQ, 2, RF_ACTIVE | RF_OPTIONAL }, { SYS_RES_IRQ, 3, RF_ACTIVE | RF_OPTIONAL }, @@ -91,6 +97,7 @@ static struct resource_spec pmu_spec[] = { SYS_RES_IRQ, 5, RF_ACTIVE | RF_OPTIONAL }, { SYS_RES_IRQ, 6, RF_ACTIVE | RF_OPTIONAL }, { SYS_RES_IRQ, 7, RF_ACTIVE | RF_OPTIONAL }, +#endif { -1, 0 } }; From owner-svn-src-all@freebsd.org Mon Nov 23 17:07:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3904A3254B; Mon, 23 Nov 2015 17:07:53 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7320112F5; Mon, 23 Nov 2015 17:07:53 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANH7qNa042848; Mon, 23 Nov 2015 17:07:52 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANH7qGS042842; Mon, 23 Nov 2015 17:07:52 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201511231707.tANH7qGS042842@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Mon, 23 Nov 2015 17:07:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291211 - in head/sys/powerpc: include powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 17:07:53 -0000 Author: nwhitehorn Date: Mon Nov 23 17:07:51 2015 New Revision: 291211 URL: https://svnweb.freebsd.org/changeset/base/291211 Log: Provide support for userland binaries using the new ELFv2 ABI. This is a new, simplified, ELF ABI that avoids some of the stranger aspects of the existing 64-bit PowerPC ABI (function descriptors, in particular). Actually generating such executables requires a new version of binutils and a newer compiler (either GCC or clang) than GCC 4.2.1. Modified: head/sys/powerpc/include/asm.h head/sys/powerpc/include/md_var.h head/sys/powerpc/include/profile.h head/sys/powerpc/powerpc/elf64_machdep.c head/sys/powerpc/powerpc/exec_machdep.c head/sys/powerpc/powerpc/sigcode64.S Modified: head/sys/powerpc/include/asm.h ============================================================================== --- head/sys/powerpc/include/asm.h Mon Nov 23 17:05:28 2015 (r291210) +++ head/sys/powerpc/include/asm.h Mon Nov 23 17:07:51 2015 (r291211) @@ -85,7 +85,9 @@ .section ".toc","aw"; \ TOC_REF(name): \ .tc name[TC],name +#endif +#if defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1) #define _ENTRY(name) \ .section ".text"; \ .p2align 2; \ Modified: head/sys/powerpc/include/md_var.h ============================================================================== --- head/sys/powerpc/include/md_var.h Mon Nov 23 17:05:28 2015 (r291210) +++ head/sys/powerpc/include/md_var.h Mon Nov 23 17:07:51 2015 (r291211) @@ -37,8 +37,8 @@ extern char sigcode32[]; extern int szsigcode32; #ifdef __powerpc64__ -extern char sigcode64[]; -extern int szsigcode64; +extern char sigcode64[], sigcode64_elfv2[]; +extern int szsigcode64, szsigcode64_elfv2; #endif extern long Maxmem; Modified: head/sys/powerpc/include/profile.h ============================================================================== --- head/sys/powerpc/include/profile.h Mon Nov 23 17:05:28 2015 (r291210) +++ head/sys/powerpc/include/profile.h Mon Nov 23 17:07:51 2015 (r291211) @@ -75,9 +75,10 @@ typedef __ptrdiff_t fptrdiff_t; * to be restored to what it was on entry to the profiled routine. */ -#ifdef __powerpc64__ -#define MCOUNT \ -__asm( " .text \n" \ +#if defined(__powerpc64__) + +#if !defined(_CALL_ELF) || _CALL_ELF == 1 +#define MCOUNT_PREAMBLE \ " .align 2 \n" \ " .globl _mcount \n" \ " .section \".opd\",\"aw\" \n" \ @@ -88,7 +89,17 @@ __asm( " .text \n" \ " .size _mcount,24 \n" \ " .type _mcount,@function \n" \ " .align 4 \n" \ - ".L._mcount: \n" \ + ".L._mcount: \n" +#else +#define MCOUNT_PREAMBLE \ + " .globl _mcount \n" \ + " .type _mcount,@function \n" \ + " .align 4 \n" \ + "_mcount: \n" +#endif + +#define MCOUNT \ +__asm( MCOUNT_PREAMBLE \ " stdu %r1,-(288+128)(%r1) \n" \ " std %r3,48(%r1) \n" \ " std %r4,56(%r1) \n" \ Modified: head/sys/powerpc/powerpc/elf64_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/elf64_machdep.c Mon Nov 23 17:05:28 2015 (r291210) +++ head/sys/powerpc/powerpc/elf64_machdep.c Mon Nov 23 17:07:51 2015 (r291211) @@ -49,7 +49,10 @@ #include #include -struct sysentvec elf64_freebsd_sysvec = { +static void exec_setregs_funcdesc(struct thread *td, struct image_params *imgp, + u_long stack); + +struct sysentvec elf64_freebsd_sysvec_v1 = { .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, .sv_mask = 0, @@ -74,6 +77,45 @@ struct sysentvec elf64_freebsd_sysvec = .sv_psstrings = PS_STRINGS, .sv_stackprot = VM_PROT_ALL, .sv_copyout_strings = exec_copyout_strings, + .sv_setregs = exec_setregs_funcdesc, + .sv_fixlimit = NULL, + .sv_maxssiz = NULL, + .sv_flags = SV_ABI_FREEBSD | SV_LP64 | SV_SHP, + .sv_set_syscall_retval = cpu_set_syscall_retval, + .sv_fetch_syscall_args = cpu_fetch_syscall_args, + .sv_syscallnames = syscallnames, + .sv_shared_page_base = SHAREDPAGE, + .sv_shared_page_len = PAGE_SIZE, + .sv_schedtail = NULL, + .sv_thread_detach = NULL, +}; +INIT_SYSENTVEC(elf64_sysvec_v1, &elf64_freebsd_sysvec_v1); + +struct sysentvec elf64_freebsd_sysvec_v2 = { + .sv_size = SYS_MAXSYSCALL, + .sv_table = sysent, + .sv_mask = 0, + .sv_sigsize = 0, + .sv_sigtbl = NULL, + .sv_errsize = 0, + .sv_errtbl = NULL, + .sv_transtrap = NULL, + .sv_fixup = __elfN(freebsd_fixup), + .sv_sendsig = sendsig, + .sv_sigcode = sigcode64_elfv2, + .sv_szsigcode = &szsigcode64_elfv2, + .sv_prepsyscall = NULL, + .sv_name = "FreeBSD ELF64 V2", + .sv_coredump = __elfN(coredump), + .sv_imgact_try = NULL, + .sv_minsigstksz = MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS, + .sv_usrstack = USRSTACK, + .sv_psstrings = PS_STRINGS, + .sv_stackprot = VM_PROT_ALL, + .sv_copyout_strings = exec_copyout_strings, .sv_setregs = exec_setregs, .sv_fixlimit = NULL, .sv_maxssiz = NULL, @@ -86,23 +128,44 @@ struct sysentvec elf64_freebsd_sysvec = .sv_schedtail = NULL, .sv_thread_detach = NULL, }; -INIT_SYSENTVEC(elf64_sysvec, &elf64_freebsd_sysvec); +INIT_SYSENTVEC(elf64_sysvec_v2, &elf64_freebsd_sysvec_v2); + +static boolean_t ppc64_elfv1_header_match(struct image_params *params); +static boolean_t ppc64_elfv2_header_match(struct image_params *params); + +static Elf64_Brandinfo freebsd_brand_info_elfv1 = { + .brand = ELFOSABI_FREEBSD, + .machine = EM_PPC64, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/libexec/ld-elf.so.1", + .sysvec = &elf64_freebsd_sysvec_v1, + .interp_newpath = NULL, + .brand_note = &elf64_freebsd_brandnote, + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE, + .header_supported = &ppc64_elfv1_header_match +}; + +SYSINIT(elf64v1, SI_SUB_EXEC, SI_ORDER_ANY, + (sysinit_cfunc_t) elf64_insert_brand_entry, + &freebsd_brand_info_elfv1); -static Elf64_Brandinfo freebsd_brand_info = { +static Elf64_Brandinfo freebsd_brand_info_elfv2 = { .brand = ELFOSABI_FREEBSD, .machine = EM_PPC64, .compat_3_brand = "FreeBSD", .emul_path = NULL, .interp_path = "/libexec/ld-elf.so.1", - .sysvec = &elf64_freebsd_sysvec, + .sysvec = &elf64_freebsd_sysvec_v2, .interp_newpath = NULL, .brand_note = &elf64_freebsd_brandnote, - .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE, + .header_supported = &ppc64_elfv2_header_match }; -SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY, +SYSINIT(elf64v2, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf64_insert_brand_entry, - &freebsd_brand_info); + &freebsd_brand_info_elfv2); static Elf64_Brandinfo freebsd_brand_oinfo = { .brand = ELFOSABI_FREEBSD, @@ -110,10 +173,11 @@ static Elf64_Brandinfo freebsd_brand_oin .compat_3_brand = "FreeBSD", .emul_path = NULL, .interp_path = "/usr/libexec/ld-elf.so.1", - .sysvec = &elf64_freebsd_sysvec, + .sysvec = &elf64_freebsd_sysvec_v1, .interp_newpath = NULL, .brand_note = &elf64_freebsd_brandnote, - .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE, + .header_supported = &ppc64_elfv1_header_match }; SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY, @@ -122,6 +186,50 @@ SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_AN void elf_reloc_self(Elf_Dyn *dynp, Elf_Addr relocbase); +static boolean_t +ppc64_elfv1_header_match(struct image_params *params) +{ + const Elf64_Ehdr *hdr = (const Elf64_Ehdr *)params->image_header; + int abi = (hdr->e_flags & 3); + + return (abi == 0 || abi == 1); +} + +static boolean_t +ppc64_elfv2_header_match(struct image_params *params) +{ + const Elf64_Ehdr *hdr = (const Elf64_Ehdr *)params->image_header; + int abi = (hdr->e_flags & 3); + + return (abi == 2); +} + +static void +exec_setregs_funcdesc(struct thread *td, struct image_params *imgp, + u_long stack) +{ + struct trapframe *tf; + register_t entry_desc[3]; + + tf = trapframe(td); + exec_setregs(td, imgp, stack); + + /* + * For 64-bit ELFv1, we need to disentangle the function + * descriptor + * + * 0. entry point + * 1. TOC value (r2) + * 2. Environment pointer (r11) + */ + + (void)copyin((void *)imgp->entry_addr, entry_desc, + sizeof(entry_desc)); + tf->srr0 = entry_desc[0] + imgp->reloc_base; + tf->fixreg[2] = entry_desc[1] + imgp->reloc_base; + tf->fixreg[11] = entry_desc[2] + imgp->reloc_base; +} + void elf64_dump_thread(struct thread *td, void *dst, size_t *off) { @@ -190,7 +298,11 @@ elf_reloc_internal(linker_file_t lf, Elf case R_PPC_JMP_SLOT: /* function descriptor copy */ lookup(lf, symidx, 1, &addr); +#if !defined(_CALL_ELF) || _CALL_ELF == 1 memcpy(where, (Elf_Addr *)addr, 3*sizeof(Elf_Addr)); +#else + memcpy(where, (Elf_Addr *)addr, sizeof(Elf_Addr)); +#endif __asm __volatile("dcbst 0,%0; sync" :: "r"(where) : "memory"); break; Modified: head/sys/powerpc/powerpc/exec_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/exec_machdep.c Mon Nov 23 17:05:28 2015 (r291210) +++ head/sys/powerpc/powerpc/exec_machdep.c Mon Nov 23 17:07:51 2015 (r291211) @@ -501,9 +501,6 @@ exec_setregs(struct thread *td, struct i { struct trapframe *tf; register_t argc; - #ifdef __powerpc64__ - register_t entry_desc[3]; - #endif tf = trapframe(td); bzero(tf, sizeof *tf); @@ -546,24 +543,13 @@ exec_setregs(struct thread *td, struct i tf->fixreg[7] = 0; /* termination vector */ tf->fixreg[8] = (register_t)imgp->ps_strings; /* NetBSD extension */ + tf->srr0 = imgp->entry_addr; #ifdef __powerpc64__ - /* - * For 64-bit, we need to disentangle the function descriptor - * - * 0. entry point - * 1. TOC value (r2) - * 2. Environment pointer (r11) - */ - - (void)copyin((void *)imgp->entry_addr, entry_desc, sizeof(entry_desc)); - tf->srr0 = entry_desc[0] + imgp->reloc_base; - tf->fixreg[2] = entry_desc[1] + imgp->reloc_base; - tf->fixreg[11] = entry_desc[2] + imgp->reloc_base; + tf->fixreg[12] = imgp->entry_addr; tf->srr1 = PSL_SF | PSL_USERSET | PSL_FE_DFLT; if (mfmsr() & PSL_HV) tf->srr1 |= PSL_HV; #else - tf->srr0 = imgp->entry_addr; tf->srr1 = PSL_USERSET | PSL_FE_DFLT; #endif td->td_pcb->pcb_flags = 0; Modified: head/sys/powerpc/powerpc/sigcode64.S ============================================================================== --- head/sys/powerpc/powerpc/sigcode64.S Mon Nov 23 17:05:28 2015 (r291210) +++ head/sys/powerpc/powerpc/sigcode64.S Mon Nov 23 17:07:51 2015 (r291211) @@ -42,15 +42,21 @@ * * On entry r1 points to a struct sigframe at bottom of current stack. * All other registers are unchanged. + * + * Entered midway through for v2 ELF binaries that don't need to deal with + * function descriptors. + * */ .globl CNAME(sigcode64),CNAME(szsigcode64) + .globl CNAME(sigcode64_elfv2),CNAME(szsigcode64_elfv2) CNAME(sigcode64): - addi 1,1,-112 /* reserved space for callee */ mflr 2 /* resolve function descriptor */ ld 0,0(2) ld 2,8(2) mtlr 0 +CNAME(sigcode64_elfv2): + addi 1,1,-112 /* reserved space for callee */ blrl addi 3,1,112+SF_UC /* restore sp, and get &frame->sf_uc */ @@ -64,3 +70,6 @@ endsigcode64: .data CNAME(szsigcode64): .long endsigcode64 - CNAME(sigcode64) +CNAME(szsigcode64_elfv2): + .long endsigcode64 - CNAME(sigcode64_elfv2) + From owner-svn-src-all@freebsd.org Mon Nov 23 17:26:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A513AA32880; Mon, 23 Nov 2015 17:26:21 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 635B11C80; Mon, 23 Nov 2015 17:26:21 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANHQKLf048758; Mon, 23 Nov 2015 17:26:20 GMT (envelope-from jimharris@FreeBSD.org) Received: (from jimharris@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANHQKs8048757; Mon, 23 Nov 2015 17:26:20 GMT (envelope-from jimharris@FreeBSD.org) Message-Id: <201511231726.tANHQKs8048757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jimharris set sender to jimharris@FreeBSD.org using -f From: Jim Harris Date: Mon, 23 Nov 2015 17:26: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: r291213 - stable/10/sys/dev/nvme X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 17:26:21 -0000 Author: jimharris Date: Mon Nov 23 17:26:20 2015 New Revision: 291213 URL: https://svnweb.freebsd.org/changeset/base/291213 Log: MFC r290198: nvme: fix race condition in split bio completion path Sponsored by: Intel Modified: stable/10/sys/dev/nvme/nvme_ns.c Modified: stable/10/sys/dev/nvme/nvme_ns.c ============================================================================== --- stable/10/sys/dev/nvme/nvme_ns.c Mon Nov 23 17:09:35 2015 (r291212) +++ stable/10/sys/dev/nvme/nvme_ns.c Mon Nov 23 17:26:20 2015 (r291213) @@ -239,7 +239,7 @@ static void nvme_bio_child_inbed(struct bio *parent, int bio_error) { struct nvme_completion parent_cpl; - int inbed; + int children, inbed; if (bio_error != 0) { parent->bio_flags |= BIO_ERROR; @@ -248,10 +248,13 @@ nvme_bio_child_inbed(struct bio *parent, /* * atomic_fetchadd will return value before adding 1, so we still - * must add 1 to get the updated inbed number. + * must add 1 to get the updated inbed number. Save bio_children + * before incrementing to guard against race conditions when + * two children bios complete on different queues. */ + children = atomic_load_acq_int(&parent->bio_children); inbed = atomic_fetchadd_int(&parent->bio_inbed, 1) + 1; - if (inbed == parent->bio_children) { + if (inbed == children) { bzero(&parent_cpl, sizeof(parent_cpl)); if (parent->bio_flags & BIO_ERROR) parent_cpl.status.sc = NVME_SC_DATA_TRANSFER_ERROR; From owner-svn-src-all@freebsd.org Mon Nov 23 17:27:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 791EAA328E4; Mon, 23 Nov 2015 17:27:31 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 298751DDD; Mon, 23 Nov 2015 17:27:31 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANHRUT9048902; Mon, 23 Nov 2015 17:27:30 GMT (envelope-from jimharris@FreeBSD.org) Received: (from jimharris@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANHRU5k048899; Mon, 23 Nov 2015 17:27:30 GMT (envelope-from jimharris@FreeBSD.org) Message-Id: <201511231727.tANHRU5k048899@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jimharris set sender to jimharris@FreeBSD.org using -f From: Jim Harris Date: Mon, 23 Nov 2015 17:27: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: r291214 - in stable/10/sys/dev: nvd nvme X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 17:27:31 -0000 Author: jimharris Date: Mon Nov 23 17:27:29 2015 New Revision: 291214 URL: https://svnweb.freebsd.org/changeset/base/291214 Log: MFC r290199: nvd, nvme: report stripesize through GEOM disk layer Sponsored by: Intel Modified: stable/10/sys/dev/nvd/nvd.c stable/10/sys/dev/nvme/nvme.h stable/10/sys/dev/nvme/nvme_ns.c Modified: stable/10/sys/dev/nvd/nvd.c ============================================================================== --- stable/10/sys/dev/nvd/nvd.c Mon Nov 23 17:26:20 2015 (r291213) +++ stable/10/sys/dev/nvd/nvd.c Mon Nov 23 17:27:29 2015 (r291214) @@ -279,6 +279,7 @@ nvd_new_disk(struct nvme_namespace *ns, disk->d_sectorsize = nvme_ns_get_sector_size(ns); disk->d_mediasize = (off_t)nvme_ns_get_size(ns); disk->d_delmaxsize = (off_t)nvme_ns_get_size(ns); + disk->d_stripesize = nvme_ns_get_stripesize(ns); if (TAILQ_EMPTY(&disk_head)) disk->d_unit = 0; Modified: stable/10/sys/dev/nvme/nvme.h ============================================================================== --- stable/10/sys/dev/nvme/nvme.h Mon Nov 23 17:26:20 2015 (r291213) +++ stable/10/sys/dev/nvme/nvme.h Mon Nov 23 17:27:29 2015 (r291214) @@ -870,6 +870,7 @@ const char * nvme_ns_get_serial_number(s const char * nvme_ns_get_model_number(struct nvme_namespace *ns); const struct nvme_namespace_data * nvme_ns_get_data(struct nvme_namespace *ns); +uint32_t nvme_ns_get_stripesize(struct nvme_namespace *ns); int nvme_ns_bio_process(struct nvme_namespace *ns, struct bio *bp, nvme_cb_fn_t cb_fn); Modified: stable/10/sys/dev/nvme/nvme_ns.c ============================================================================== --- stable/10/sys/dev/nvme/nvme_ns.c Mon Nov 23 17:26:20 2015 (r291213) +++ stable/10/sys/dev/nvme/nvme_ns.c Mon Nov 23 17:27:29 2015 (r291214) @@ -210,6 +210,13 @@ nvme_ns_get_data(struct nvme_namespace * return (&ns->data); } +uint32_t +nvme_ns_get_stripesize(struct nvme_namespace *ns) +{ + + return (ns->stripesize); +} + static void nvme_ns_bio_done(void *arg, const struct nvme_completion *status) { From owner-svn-src-all@freebsd.org Mon Nov 23 17:54:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 316FBA32F33; Mon, 23 Nov 2015 17:54:53 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CE8911C52; Mon, 23 Nov 2015 17:54:52 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by wmuu63 with SMTP id u63so64957752wmu.0; Mon, 23 Nov 2015 09:54:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=w5ENgGkO2O1CDp09ZKHHTjMOpBVauzehn8SzQjdOYxI=; b=iU2koufDpP3DJ0ogn5atkRB39MOCKwZiU1LavoN/8bRCJGABFD6HmrCr3E5ZnMWCqf v1O08PVYJ9pL/dELcdv3fgXOhK06liuZzLO5HDUOze7L+OeBAnpUWTF/+NqDsB+WJCGP 76z/hHWq+P+eY50CdAYqxTkkCK2PBJ7XVBlvSXKpLJP8PVRI6TXOafzOEbBZKbxGAyKY /4r7sKwHQxaqUdA9N2RYRCJcHPj4MtT3emWuwaxPWdyVG9m54AiRkWNS/UOxNEKovT2f vL7RI+7ow2Akm3oIlOgWto2Ugvi4P9j5zGOc2CpgC2QFl5tpFPrX4EuBY2R2BUnlRQAB rlyw== MIME-Version: 1.0 X-Received: by 10.194.142.45 with SMTP id rt13mr31553545wjb.45.1448301291259; Mon, 23 Nov 2015 09:54:51 -0800 (PST) Received: by 10.27.10.199 with HTTP; Mon, 23 Nov 2015 09:54:51 -0800 (PST) In-Reply-To: <201511231247.tANCl8BS062451@repo.freebsd.org> References: <201511231247.tANCl8BS062451@repo.freebsd.org> Date: Mon, 23 Nov 2015 11:54:51 -0600 Message-ID: Subject: Re: svn commit: r291197 - head/lib/libc/stdio From: Benjamin Kaduk To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 17:54:53 -0000 On Mon, Nov 23, 2015 at 6:47 AM, Dag-Erling Sm=C3=B8rgrav wrote: > Author: des > Date: Mon Nov 23 12:47:08 2015 > New Revision: 291197 > URL: https://svnweb.freebsd.org/changeset/base/291197 > > Log: > markup fixes > > Modified: > head/lib/libc/stdio/fopen.3 > > Modified: head/lib/libc/stdio/fopen.3 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libc/stdio/fopen.3 Mon Nov 23 12:19:36 2015 (r291196) > +++ head/lib/libc/stdio/fopen.3 Mon Nov 23 12:47:08 2015 (r291197) > @@ -120,7 +120,9 @@ This is strictly for compatibility with > .St -isoC > and has effect only for > .Fn fmemopen > -; otherwise the ``b'' is ignored. > +; otherwise > Hmm, I would have expected that the semicolon could go on the previous line, as is normally the case for punctuation following macros. Is this not the case here? -Ben > +.Dq Li b > +is ignored. > .Pp > Any created files will have mode > .Do Dv S_IRUSR > From owner-svn-src-all@freebsd.org Mon Nov 23 18:00:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA019A35188; Mon, 23 Nov 2015 18:00:56 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C53D22000; Mon, 23 Nov 2015 18:00:56 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANI0t9q058067; Mon, 23 Nov 2015 18:00:55 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANI0t3F058063; Mon, 23 Nov 2015 18:00:55 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201511231800.tANI0t3F058063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Mon, 23 Nov 2015 18:00: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: r291215 - in stable/10/sys: dev/null geom kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 18:00:57 -0000 Author: smh Date: Mon Nov 23 18:00:55 2015 New Revision: 291215 URL: https://svnweb.freebsd.org/changeset/base/291215 Log: MFC r274366: Add missing privilege check when setting the dump device. Approved by: pjd, secteam (both no objections) Sponsored by: Multiplay Modified: stable/10/sys/dev/null/null.c stable/10/sys/geom/geom_dev.c stable/10/sys/kern/kern_shutdown.c stable/10/sys/sys/conf.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/null/null.c ============================================================================== --- stable/10/sys/dev/null/null.c Mon Nov 23 17:27:29 2015 (r291214) +++ stable/10/sys/dev/null/null.c Mon Nov 23 18:00:55 2015 (r291215) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -89,9 +88,7 @@ null_ioctl(struct cdev *dev __unused, u_ switch (cmd) { case DIOCSKERNELDUMP: - error = priv_check(td, PRIV_SETDUMPER); - if (error == 0) - error = set_dumper(NULL, NULL); + error = set_dumper(NULL, NULL, td); break; case FIONBIO: break; Modified: stable/10/sys/geom/geom_dev.c ============================================================================== --- stable/10/sys/geom/geom_dev.c Mon Nov 23 17:27:29 2015 (r291214) +++ stable/10/sys/geom/geom_dev.c Mon Nov 23 18:00:55 2015 (r291215) @@ -127,14 +127,14 @@ g_dev_fini(struct g_class *mp) } static int -g_dev_setdumpdev(struct cdev *dev) +g_dev_setdumpdev(struct cdev *dev, struct thread *td) { struct g_kerneldump kd; struct g_consumer *cp; int error, len; if (dev == NULL) - return (set_dumper(NULL, NULL)); + return (set_dumper(NULL, NULL, td)); cp = dev->si_drv2; len = sizeof(kd); @@ -142,7 +142,7 @@ g_dev_setdumpdev(struct cdev *dev) kd.length = OFF_MAX; error = g_io_getattr("GEOM::kerneldump", cp, &len, &kd); if (error == 0) { - error = set_dumper(&kd.di, devtoname(dev)); + error = set_dumper(&kd.di, devtoname(dev), td); if (error == 0) dev->si_flags |= SI_DUMPDEV; } @@ -157,7 +157,7 @@ init_dumpdev(struct cdev *dev) return; if (strcmp(devtoname(dev), dumpdev) != 0) return; - if (g_dev_setdumpdev(dev) == 0) { + if (g_dev_setdumpdev(dev, curthread) == 0) { freeenv(dumpdev); dumpdev = NULL; } @@ -480,9 +480,9 @@ g_dev_ioctl(struct cdev *dev, u_long cmd break; case DIOCSKERNELDUMP: if (*(u_int *)data == 0) - error = g_dev_setdumpdev(NULL); + error = g_dev_setdumpdev(NULL, td); else - error = g_dev_setdumpdev(dev); + error = g_dev_setdumpdev(dev, td); break; case DIOCGFLUSH: error = g_io_flush(cp); @@ -700,7 +700,7 @@ g_dev_orphan(struct g_consumer *cp) /* Reset any dump-area set on this device */ if (dev->si_flags & SI_DUMPDEV) - set_dumper(NULL, NULL); + (void)set_dumper(NULL, NULL, curthread); /* Destroy the struct cdev *so we get no more requests */ destroy_dev_sched_cb(dev, g_dev_callback, cp); Modified: stable/10/sys/kern/kern_shutdown.c ============================================================================== --- stable/10/sys/kern/kern_shutdown.c Mon Nov 23 17:27:29 2015 (r291214) +++ stable/10/sys/kern/kern_shutdown.c Mon Nov 23 18:00:55 2015 (r291215) @@ -843,9 +843,14 @@ SYSCTL_STRING(_kern_shutdown, OID_AUTO, /* Registration of dumpers */ int -set_dumper(struct dumperinfo *di, const char *devname) +set_dumper(struct dumperinfo *di, const char *devname, struct thread *td) { size_t wantcopy; + int error; + + error = priv_check(td, PRIV_SETDUMPER); + if (error != 0) + return (error); if (di == NULL) { bzero(&dumper, sizeof dumper); Modified: stable/10/sys/sys/conf.h ============================================================================== --- stable/10/sys/sys/conf.h Mon Nov 23 17:27:29 2015 (r291214) +++ stable/10/sys/sys/conf.h Mon Nov 23 18:00:55 2015 (r291215) @@ -337,7 +337,7 @@ struct dumperinfo { off_t mediasize; /* Space available in bytes. */ }; -int set_dumper(struct dumperinfo *, const char *_devname); +int set_dumper(struct dumperinfo *, const char *_devname, struct thread *td); int dump_write(struct dumperinfo *, void *, vm_offset_t, off_t, size_t); void dumpsys(struct dumperinfo *); int doadump(boolean_t); From owner-svn-src-all@freebsd.org Mon Nov 23 18:20:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FA54A355C7; Mon, 23 Nov 2015 18:20:34 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDDA91F44; Mon, 23 Nov 2015 18:20:33 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANIKXjp063860; Mon, 23 Nov 2015 18:20:33 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANIKXRh063859; Mon, 23 Nov 2015 18:20:33 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201511231820.tANIKXRh063859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 23 Nov 2015 18:20:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291216 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 18:20:34 -0000 Author: andrew Date: Mon Nov 23 18:20:32 2015 New Revision: 291216 URL: https://svnweb.freebsd.org/changeset/base/291216 Log: Use #ifdef to get the file compiling without errors Modified: head/sys/arm/arm/pmu.c Modified: head/sys/arm/arm/pmu.c ============================================================================== --- head/sys/arm/arm/pmu.c Mon Nov 23 18:00:55 2015 (r291215) +++ head/sys/arm/arm/pmu.c Mon Nov 23 18:20:32 2015 (r291216) @@ -89,7 +89,7 @@ static struct ofw_compat_data compat_dat static struct resource_spec pmu_spec[] = { { SYS_RES_IRQ, 0, RF_ACTIVE }, /* We don't currently handle pmu events, other than on cpu 0 */ -#if notyet +#ifdef notyet { SYS_RES_IRQ, 1, RF_ACTIVE | RF_OPTIONAL }, { SYS_RES_IRQ, 2, RF_ACTIVE | RF_OPTIONAL }, { SYS_RES_IRQ, 3, RF_ACTIVE | RF_OPTIONAL }, From owner-svn-src-all@freebsd.org Mon Nov 23 18:45:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A951A35FF4; Mon, 23 Nov 2015 18:45:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 602FA1174; Mon, 23 Nov 2015 18:45:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANIjZ4Y075767; Mon, 23 Nov 2015 18:45:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANIjZfx075766; Mon, 23 Nov 2015 18:45:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201511231845.tANIjZfx075766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 23 Nov 2015 18:45:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291217 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 18:45:36 -0000 Author: markj Date: Mon Nov 23 18:45:35 2015 New Revision: 291217 URL: https://svnweb.freebsd.org/changeset/base/291217 Log: The buffer passed to an sbuf drain callback is not necessarily null-terminated, so don't assume that it is. Reported by: pho X-MFC-With: r291059 Modified: head/sys/kern/subr_witness.c Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Mon Nov 23 18:20:32 2015 (r291216) +++ head/sys/kern/subr_witness.c Mon Nov 23 18:45:35 2015 (r291217) @@ -2987,7 +2987,7 @@ static int witness_output_drain(void *arg __unused, const char *data, int len) { - witness_output("%s", data); + witness_output("%.*s", len, data); return (len); } From owner-svn-src-all@freebsd.org Mon Nov 23 18:56:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91139A36366; Mon, 23 Nov 2015 18:56:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A60D1CD4; Mon, 23 Nov 2015 18:56:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANIuApu079092; Mon, 23 Nov 2015 18:56:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANIuA3B079091; Mon, 23 Nov 2015 18:56:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201511231856.tANIuA3B079091@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 23 Nov 2015 18:56:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291218 - head/sbin/newfs_msdos X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 18:56:11 -0000 Author: emaste Date: Mon Nov 23 18:56:10 2015 New Revision: 291218 URL: https://svnweb.freebsd.org/changeset/base/291218 Log: Update $NetBSD$ ID NetBSD mkfs_msdos.h rev 1.3 removed the no-endorsement clause from the license block, which had already been done in the source I imported in r289629. Modified: head/sbin/newfs_msdos/mkfs_msdos.h Modified: head/sbin/newfs_msdos/mkfs_msdos.h ============================================================================== --- head/sbin/newfs_msdos/mkfs_msdos.h Mon Nov 23 18:45:35 2015 (r291217) +++ head/sbin/newfs_msdos/mkfs_msdos.h Mon Nov 23 18:56:10 2015 (r291218) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $NetBSD: mkfs_msdos.h,v 1.2 2013/01/23 15:29:15 christos Exp $ */ +/* $NetBSD: mkfs_msdos.h,v 1.3 2015/10/16 17:38:17 christos Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. From owner-svn-src-all@freebsd.org Mon Nov 23 18:58:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E34CA363BA; Mon, 23 Nov 2015 18:58:02 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F7D81E4C; Mon, 23 Nov 2015 18:58:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANIw1X8079195; Mon, 23 Nov 2015 18:58:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANIw196079193; Mon, 23 Nov 2015 18:58:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201511231858.tANIw196079193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 23 Nov 2015 18:58:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291219 - head/sbin/newfs_msdos X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 18:58:02 -0000 Author: emaste Date: Mon Nov 23 18:58:00 2015 New Revision: 291219 URL: https://svnweb.freebsd.org/changeset/base/291219 Log: newfs_msdos: rework error handling for eventual use in makefs Return -1 on errors from mkfs_msdos() instead of err()/errx(), to allow different consumers to handle errors as appropriate. Obtained from: NetBSD Sponsored by: The FreeBSD Foundation Modified: head/sbin/newfs_msdos/mkfs_msdos.c head/sbin/newfs_msdos/newfs_msdos.c Modified: head/sbin/newfs_msdos/mkfs_msdos.c ============================================================================== --- head/sbin/newfs_msdos/mkfs_msdos.c Mon Nov 23 18:56:10 2015 (r291218) +++ head/sbin/newfs_msdos/mkfs_msdos.c Mon Nov 23 18:58:00 2015 (r291219) @@ -214,12 +214,11 @@ static const u_int8_t bootcode[] = { static volatile sig_atomic_t got_siginfo; static void infohandler(int); -static void check_mounted(const char *, mode_t); -static void getstdfmt(const char *, struct bpb *); -static void getdiskinfo(int, const char *, const char *, int, - struct bpb *); +static int check_mounted(const char *, mode_t); +static int getstdfmt(const char *, struct bpb *); +static int getdiskinfo(int, const char *, const char *, int, struct bpb *); static void print_bpb(struct bpb *); -static u_int ckgeom(const char *, u_int, const char *); +static int ckgeom(const char *, u_int, const char *); static void mklabel(u_int8_t *, const char *); static int oklabel(const char *); static void setstr(u_int8_t *, const char *, size_t); @@ -247,20 +246,31 @@ int mkfs_msdos(const char *fname, const struct msdos_options o = *op; if (o.OEM_string && strlen(o.OEM_string) > 8) { - errx(1, "%s: bad OEM string", o.OEM_string); + warnx("%s: bad OEM string", o.OEM_string); + return -1; } if (o.create_size) { - if (o.no_create) - errx(1, "create (-C) is incompatible with -N"); + if (o.no_create) { + warnx("create (-C) is incompatible with -N"); + return -1; + } fd = open(fname, O_RDWR | O_CREAT | O_TRUNC, 0644); - if (fd == -1) - errx(1, "failed to create %s", fname); - if (ftruncate(fd, o.create_size)) - errx(1, "failed to initialize %jd bytes", (intmax_t)o.create_size); - } else if ((fd = open(fname, o.no_create ? O_RDONLY : O_RDWR)) == -1) - err(1, "%s", fname); - if (fstat(fd, &sb)) - err(1, "%s", fname); + if (fd == -1) { + warnx("failed to create %s", fname); + return -1; + } + if (ftruncate(fd, o.create_size)) { + warnx("failed to initialize %jd bytes", (intmax_t)o.create_size); + return -1; + } + } else if ((fd = open(fname, o.no_create ? O_RDONLY : O_RDWR)) == -1) { + warn("%s", fname); + return -1; + } + if (fstat(fd, &sb)) { + warn("%s", fname); + return -1; + } if (o.create_size) { if (!S_ISREG(sb.st_mode)) warnx("warning, %s is not a regular file", fname); @@ -269,12 +279,16 @@ int mkfs_msdos(const char *fname, const warnx("warning, %s is not a character device", fname); } if (!o.no_create) - check_mounted(fname, sb.st_mode); - if (o.offset && o.offset != lseek(fd, o.offset, SEEK_SET)) - errx(1, "cannot seek to %jd", (intmax_t)o.offset); + if (check_mounted(fname, sb.st_mode) == -1) + return -1; + if (o.offset && o.offset != lseek(fd, o.offset, SEEK_SET)) { + warnx("cannot seek to %jd", (intmax_t)o.offset); + return -1; + } memset(&bpb, 0, sizeof(bpb)); if (o.floppy) { - getstdfmt(o.floppy, &bpb); + if (getstdfmt(o.floppy, &bpb) == -1) + return -1; bpb.bpbHugeSectors = bpb.bpbSectors; bpb.bpbSectors = 0; bpb.bpbBigFATsecs = bpb.bpbFATsecs; @@ -313,58 +327,81 @@ int mkfs_msdos(const char *fname, const bpb.bpbSecPerClust = 64; /* otherwise 32k */ } } - if (!powerof2(bpb.bpbBytesPerSec)) - errx(1, "bytes/sector (%u) is not a power of 2", bpb.bpbBytesPerSec); - if (bpb.bpbBytesPerSec < MINBPS) - errx(1, "bytes/sector (%u) is too small; minimum is %u", + if (!powerof2(bpb.bpbBytesPerSec)) { + warnx("bytes/sector (%u) is not a power of 2", bpb.bpbBytesPerSec); + return -1; + } + if (bpb.bpbBytesPerSec < MINBPS) { + warnx("bytes/sector (%u) is too small; minimum is %u", bpb.bpbBytesPerSec, MINBPS); - if (o.volume_label && !oklabel(o.volume_label)) - errx(1, "%s: bad volume label", o.volume_label); + return -1; + } + + if (o.volume_label && !oklabel(o.volume_label)) { + warnx("%s: bad volume label", o.volume_label); + return -1; + } if (!(fat = o.fat_type)) { if (o.floppy) fat = 12; else if (!o.directory_entries && (o.info_sector || o.backup_sector)) fat = 32; } - if ((fat == 32 && o.directory_entries) || (fat != 32 && (o.info_sector || o.backup_sector))) - errx(1, "-%c is not a legal FAT%s option", + if ((fat == 32 && o.directory_entries) || (fat != 32 && (o.info_sector || o.backup_sector))) { + warnx("-%c is not a legal FAT%s option", fat == 32 ? 'e' : o.info_sector ? 'i' : 'k', fat == 32 ? "32" : "12/16"); + return -1; + } if (o.floppy && fat == 32) bpb.bpbRootDirEnts = 0; if (fat != 0 && fat != 12 && fat != 16 && fat != 32) { - errx(1, "%d: bad FAT type", fat); + warnx("%d: bad FAT type", fat); + return -1; } if (o.block_size) { - if (!powerof2(o.block_size)) - errx(1, "block size (%u) is not a power of 2", o.block_size); - if (o.block_size < bpb.bpbBytesPerSec) - errx(1, "block size (%u) is too small; minimum is %u", + if (!powerof2(o.block_size)) { + warnx("block size (%u) is not a power of 2", o.block_size); + return -1; + } + if (o.block_size < bpb.bpbBytesPerSec) { + warnx("block size (%u) is too small; minimum is %u", o.block_size, bpb.bpbBytesPerSec); - if (o.block_size > bpb.bpbBytesPerSec * MAXSPC) - errx(1, "block size (%u) is too large; maximum is %u", + return -1; + } + if (o.block_size > bpb.bpbBytesPerSec * MAXSPC) { + warnx("block size (%u) is too large; maximum is %u", o.block_size, bpb.bpbBytesPerSec * MAXSPC); + return -1; + } bpb.bpbSecPerClust = o.block_size / bpb.bpbBytesPerSec; } if (o.sectors_per_cluster) { - if (!powerof2(o.sectors_per_cluster)) - errx(1, "sectors/cluster (%u) is not a power of 2", o.sectors_per_cluster); + if (!powerof2(o.sectors_per_cluster)) { + warnx("sectors/cluster (%u) is not a power of 2", + o.sectors_per_cluster); + return -1; + } bpb.bpbSecPerClust = o.sectors_per_cluster; } if (o.reserved_sectors) bpb.bpbResSectors = o.reserved_sectors; if (o.num_FAT) { - if (o.num_FAT > MAXNFT) - errx(1, "number of FATs (%u) is too large; maximum is %u", + if (o.num_FAT > MAXNFT) { + warnx("number of FATs (%u) is too large; maximum is %u", o.num_FAT, MAXNFT); + return -1; + } bpb.bpbFATs = o.num_FAT; } if (o.directory_entries) bpb.bpbRootDirEnts = o.directory_entries; if (o.media_descriptor_set) { - if (o.media_descriptor < 0xf0) - errx(1, "illegal media descriptor (%#x)", o.media_descriptor); + if (o.media_descriptor < 0xf0) { + warnx("illegal media descriptor (%#x)", o.media_descriptor); + return -1; + } bpb.bpbMedia = o.media_descriptor; } if (o.sectors_per_fat) @@ -380,15 +417,21 @@ int mkfs_msdos(const char *fname, const bname = o.bootstrap; if (!strchr(bname, '/')) { snprintf(buf, sizeof(buf), "/boot/%s", bname); - if (!(bname = strdup(buf))) - err(1, NULL); + if (!(bname = strdup(buf))) { + warn(NULL); + return -1; + } + } + if ((fd1 = open(bname, O_RDONLY)) == -1 || fstat(fd1, &sb)) { + warn("%s", bname); + return -1; } - if ((fd1 = open(bname, O_RDONLY)) == -1 || fstat(fd1, &sb)) - err(1, "%s", bname); if (!S_ISREG(sb.st_mode) || sb.st_size % bpb.bpbBytesPerSec || sb.st_size < bpb.bpbBytesPerSec || - sb.st_size > bpb.bpbBytesPerSec * MAXU16) - errx(1, "%s: inappropriate file type or format", bname); + sb.st_size > bpb.bpbBytesPerSec * MAXU16) { + warnx("%s: inappropriate file type or format", bname); + return -1; + } bss = sb.st_size / bpb.bpbBytesPerSec; } if (!bpb.bpbFATs) @@ -420,27 +463,35 @@ int mkfs_msdos(const char *fname, const x = bss; if (fat == 32) { if (!bpb.bpbFSInfo) { - if (x == MAXU16 || x == bpb.bpbBackup) - errx(1, "no room for info sector"); + if (x == MAXU16 || x == bpb.bpbBackup) { + warnx("no room for info sector"); + return -1; + } bpb.bpbFSInfo = x; } if (bpb.bpbFSInfo != MAXU16 && x <= bpb.bpbFSInfo) x = bpb.bpbFSInfo + 1; if (!bpb.bpbBackup) { - if (x == MAXU16) - errx(1, "no room for backup sector"); + if (x == MAXU16) { + warnx("no room for backup sector"); + return -1; + } bpb.bpbBackup = x; - } else if (bpb.bpbBackup != MAXU16 && bpb.bpbBackup == bpb.bpbFSInfo) - errx(1, "backup sector would overwrite info sector"); + } else if (bpb.bpbBackup != MAXU16 && bpb.bpbBackup == bpb.bpbFSInfo) { + warnx("backup sector would overwrite info sector"); + return -1; + } if (bpb.bpbBackup != MAXU16 && x <= bpb.bpbBackup) x = bpb.bpbBackup + 1; } if (!bpb.bpbResSectors) bpb.bpbResSectors = fat == 32 ? MAX(x, MAX(16384 / bpb.bpbBytesPerSec, 4)) : x; - else if (bpb.bpbResSectors < x) - errx(1, "too few reserved sectors (need %d have %d)", x, + else if (bpb.bpbResSectors < x) { + warnx("too few reserved sectors (need %d have %d)", x, bpb.bpbResSectors); + return -1; + } if (fat != 32 && !bpb.bpbRootDirEnts) bpb.bpbRootDirEnts = DEFRDE; rds = howmany(bpb.bpbRootDirEnts, bpb.bpbBytesPerSec / sizeof(struct de)); @@ -457,12 +508,16 @@ int mkfs_msdos(const char *fname, const bpb.bpbSecPerClust <= bpb.bpbHugeSectors; bpb.bpbSecPerClust <<= 1) continue; - if (fat != 32 && bpb.bpbBigFATsecs > MAXU16) - errx(1, "too many sectors/FAT for FAT12/16"); + if (fat != 32 && bpb.bpbBigFATsecs > MAXU16) { + warnx("too many sectors/FAT for FAT12/16"); + return -1; + } x1 = bpb.bpbResSectors + rds; x = bpb.bpbBigFATsecs ? bpb.bpbBigFATsecs : 1; - if (x1 + (u_int64_t)x * bpb.bpbFATs > bpb.bpbHugeSectors) - errx(1, "meta data exceeds file system size"); + if (x1 + (u_int64_t)x * bpb.bpbFATs > bpb.bpbHugeSectors) { + warnx("meta data exceeds file system size"); + return -1; + } x1 += x * bpb.bpbFATs; x = (u_int64_t)(bpb.bpbHugeSectors - x1) * bpb.bpbBytesPerSec * NPB / (bpb.bpbSecPerClust * bpb.bpbBytesPerSec * NPB + fat / @@ -481,9 +536,11 @@ int mkfs_msdos(const char *fname, const if (bpb.bpbBigFATsecs < x2) warnx("warning: sectors/FAT limits file system to %u clusters", cls); - if (cls < mincls(fat)) - errx(1, "%u clusters too few clusters for FAT%u, need %u", cls, fat, + if (cls < mincls(fat)) { + warnx("%u clusters too few clusters for FAT%u, need %u", cls, fat, mincls(fat)); + return -1; + } if (cls > maxcls(fat)) { cls = maxcls(fat); bpb.bpbHugeSectors = x1 + (cls + 1) * bpb.bpbSecPerClust - 1; @@ -511,14 +568,18 @@ int mkfs_msdos(const char *fname, const gettimeofday(&tv, NULL); now = tv.tv_sec; tm = localtime(&now); - if (!(img = malloc(bpb.bpbBytesPerSec))) - err(1, NULL); + if (!(img = malloc(bpb.bpbBytesPerSec))) { + warn(NULL); + return -1; + } dir = bpb.bpbResSectors + (bpb.bpbFATsecs ? bpb.bpbFATsecs : bpb.bpbBigFATsecs) * bpb.bpbFATs; memset(&si_sa, 0, sizeof(si_sa)); si_sa.sa_handler = infohandler; - if (sigaction(SIGINFO, &si_sa, NULL) == -1) - err(1, "sigaction SIGINFO"); + if (sigaction(SIGINFO, &si_sa, NULL) == -1) { + warn("sigaction SIGINFO"); + return -1; + } for (lsn = 0; lsn < dir + (fat == 32 ? bpb.bpbSecPerClust : rds); lsn++) { if (got_siginfo) { fprintf(stderr,"%s: writing sector %u of %u (%u%%)\n", @@ -533,14 +594,20 @@ int mkfs_msdos(const char *fname, const fat == 32 && bpb.bpbBackup != MAXU16 && bss <= bpb.bpbBackup && x >= bpb.bpbBackup) { x -= bpb.bpbBackup; - if (!x && lseek(fd1, o.offset, SEEK_SET)) - err(1, "%s", bname); + if (!x && lseek(fd1, o.offset, SEEK_SET)) { + warn("%s", bname); + return -1; + } } if (o.bootstrap && x < bss) { - if ((n = read(fd1, img, bpb.bpbBytesPerSec)) == -1) - err(1, "%s", bname); - if ((unsigned)n != bpb.bpbBytesPerSec) - errx(1, "%s: can't read sector %u", bname, x); + if ((n = read(fd1, img, bpb.bpbBytesPerSec)) == -1) { + warn("%s", bname); + return -1; + } + if ((unsigned)n != bpb.bpbBytesPerSec) { + warnx("%s: can't read sector %u", bname, x); + return -1; + } } else memset(img, 0, bpb.bpbBytesPerSec); if (!lsn || @@ -627,19 +694,23 @@ int mkfs_msdos(const char *fname, const (u_int)tm->tm_mday; mk2(de->deMDate, x); } - if ((n = write(fd, img, bpb.bpbBytesPerSec)) == -1) - err(1, "%s", fname); - if ((unsigned)n != bpb.bpbBytesPerSec) - errx(1, "%s: can't write sector %u", fname, lsn); + if ((n = write(fd, img, bpb.bpbBytesPerSec)) == -1) { + warn("%s", fname); + return -1; + } + if ((unsigned)n != bpb.bpbBytesPerSec) { + warnx("%s: can't write sector %u", fname, lsn); + return -1; + } } } return 0; } /* - * Exit with error if file system is mounted. + * return -1 with error if file system is mounted. */ -static void +static int check_mounted(const char *fname, mode_t mode) { struct statfs *mp; @@ -647,8 +718,10 @@ check_mounted(const char *fname, mode_t size_t len; int n, r; - if (!(n = getmntinfo(&mp, MNT_NOWAIT))) - err(1, "getmntinfo"); + if (!(n = getmntinfo(&mp, MNT_NOWAIT))) { + warn("getmntinfo"); + return -1; + } len = strlen(_PATH_DEV); s1 = fname; if (!strncmp(s1, _PATH_DEV, len)) @@ -659,30 +732,36 @@ check_mounted(const char *fname, mode_t if (!strncmp(s2, _PATH_DEV, len)) s2 += len; if ((r && s2 != mp->f_mntfromname && !strcmp(s1 + 1, s2)) || - !strcmp(s1, s2)) - errx(1, "%s is mounted on %s", fname, mp->f_mntonname); + !strcmp(s1, s2)) { + warnx("%s is mounted on %s", fname, mp->f_mntonname); + return -1; + } } + return 0; } /* * Get a standard format. */ -static void +static int getstdfmt(const char *fmt, struct bpb *bpb) { u_int x, i; x = sizeof(stdfmt) / sizeof(stdfmt[0]); for (i = 0; i < x && strcmp(fmt, stdfmt[i].name); i++); - if (i == x) - errx(1, "%s: unknown standard format", fmt); + if (i == x) { + warnx("%s: unknown standard format", fmt); + return -1; + } *bpb = stdfmt[i].bpb; + return 0; } /* * Get disk slice, partition, and geometry information. */ -static void +static int getdiskinfo(int fd, const char *fname, const char *dtype, __unused int oflag, struct bpb *bpb) { @@ -750,16 +829,26 @@ getdiskinfo(int fd, const char *fname, c lp = &dlp; } - if (bpb->bpbBytesPerSec == 0) - bpb->bpbBytesPerSec = ckgeom(fname, lp->d_secsize, "bytes/sector"); - if (bpb->bpbSecPerTrack == 0) - bpb->bpbSecPerTrack = ckgeom(fname, lp->d_nsectors, "sectors/track"); - if (bpb->bpbHeads == 0) - bpb->bpbHeads = ckgeom(fname, lp->d_ntracks, "drive heads"); + if (bpb->bpbBytesPerSec == 0) { + if (ckgeom(fname, lp->d_secsize, "bytes/sector") == -1) + return -1; + bpb->bpbBytesPerSec = lp->d_secsize; + } + if (bpb->bpbSecPerTrack == 0) { + if (ckgeom(fname, lp->d_nsectors, "sectors/track") == -1) + return -1; + bpb->bpbSecPerTrack = lp->d_nsectors; + } + if (bpb->bpbHeads == 0) { + if (ckgeom(fname, lp->d_ntracks, "drive heads") == -1) + return -1; + bpb->bpbHeads = lp->d_ntracks; + } if (bpb->bpbHugeSectors == 0) bpb->bpbHugeSectors = lp->d_secperunit; if (bpb->bpbHiddenSecs == 0) bpb->bpbHiddenSecs = hs; + return 0; } /* @@ -796,14 +885,18 @@ print_bpb(struct bpb *bpb) /* * Check a disk geometry value. */ -static u_int +static int ckgeom(const char *fname, u_int val, const char *msg) { - if (!val) - errx(1, "%s: no default %s", fname, msg); - if (val > MAXU16) - errx(1, "%s: illegal %s %d", fname, msg, val); - return val; + if (!val) { + warnx("%s: no default %s", fname, msg); + return -1; + } + if (val > MAXU16) { + warnx("%s: illegal %s %d", fname, msg, val); + return -1; + } + return 0; } /* Modified: head/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- head/sbin/newfs_msdos/newfs_msdos.c Mon Nov 23 18:56:10 2015 (r291218) +++ head/sbin/newfs_msdos/newfs_msdos.c Mon Nov 23 18:58:00 2015 (r291219) @@ -159,7 +159,7 @@ main(int argc, char *argv[]) err(1, NULL); } dtype = *argv; - return mkfs_msdos(fname, dtype, &o); + return !!mkfs_msdos(fname, dtype, &o); } /* From owner-svn-src-all@freebsd.org Mon Nov 23 19:44:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3845A36B78; Mon, 23 Nov 2015 19:44:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A01D515B8; Mon, 23 Nov 2015 19:44:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANJidR4094321; Mon, 23 Nov 2015 19:44:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANJidZk094320; Mon, 23 Nov 2015 19:44:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511231944.tANJidZk094320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 23 Nov 2015 19:44:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291220 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 19:44:40 -0000 Author: ngie Date: Mon Nov 23 19:44:39 2015 New Revision: 291220 URL: https://svnweb.freebsd.org/changeset/base/291220 Log: Revert r291170 The mlx5* driver(s) are built [*]/installed separate from the OFED stack thanks to recent refactoring done in the linuxkpi(4) module. Always install the manpages instead of conditionally installing them if MK_OFED != no * Further refactoring of sys/ofed and linuxkpi(4) is pending to fully divorce mlx5* from ofed headers MFC after: never Requested by: hps Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Mon Nov 23 18:58:00 2015 (r291219) +++ head/share/man/man4/Makefile Mon Nov 23 19:44:39 2015 (r291220) @@ -274,6 +274,7 @@ MAN= aac.4 \ mk48txx.4 \ mld.4 \ mlx.4 \ + mlx5en.4 \ mly.4 \ mmc.4 \ mmcsd.4 \ @@ -652,6 +653,7 @@ MLINKS+=lp.4 plip.4 MLINKS+=malo.4 if_malo.4 MLINKS+=md.4 vn.4 MLINKS+=mem.4 kmem.4 +MLINKS+=mlx5en.4 mce.4 MLINKS+=mn.4 if_mn.4 MLINKS+=mos.4 if_mos.4 MLINKS+=msk.4 if_msk.4 @@ -851,12 +853,6 @@ MAN+= iscsi_initiator.4 .endif -.if ${MK_OFED} != "no" -MAN+= mlx5en.4 - -MLINKS+=mlx5en.4 mce.4 -.endif - .if ${MK_TESTS} != "no" ATF= ${.CURDIR}/../../../contrib/atf .PATH: ${ATF}/doc From owner-svn-src-all@freebsd.org Mon Nov 23 20:44:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C98FA366F8; Mon, 23 Nov 2015 20:44:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38C681B03; Mon, 23 Nov 2015 20:44:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANKiosh012928; Mon, 23 Nov 2015 20:44:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANKiohR012924; Mon, 23 Nov 2015 20:44:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511232044.tANKiohR012924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 23 Nov 2015 20:44:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291221 - in head: share/man/man4 sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 20:44:51 -0000 Author: mav Date: Mon Nov 23 20:44:49 2015 New Revision: 291221 URL: https://svnweb.freebsd.org/changeset/base/291221 Log: Remove "disable" hint, which duplicates system-wide "disabled". Modified: head/share/man/man4/isp.4 head/sys/dev/isp/isp_freebsd.h head/sys/dev/isp/isp_pci.c head/sys/dev/isp/isp_sbus.c Modified: head/share/man/man4/isp.4 ============================================================================== --- head/share/man/man4/isp.4 Mon Nov 23 19:44:39 2015 (r291220) +++ head/share/man/man4/isp.4 Mon Nov 23 20:44:49 2015 (r291221) @@ -124,8 +124,6 @@ The following options are switchable by .Pp They are: .Bl -tag -width indent -.It Va hint.isp.0.disable -A hint value to disable driver in kernel. .It Va hint.isp.0.fwload_disable A hint value to disable loading of firmware .Xr ispfw 4 . Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Mon Nov 23 19:44:39 2015 (r291220) +++ head/sys/dev/isp/isp_freebsd.h Mon Nov 23 20:44:49 2015 (r291221) @@ -311,7 +311,6 @@ struct isposinfo { timer_active : 1, autoconf : 1, ehook_active : 1, - disabled : 1, mbox_sleeping : 1, mbox_sleep_ok : 1, mboxcmd_done : 1, Modified: head/sys/dev/isp/isp_pci.c ============================================================================== --- head/sys/dev/isp/isp_pci.c Mon Nov 23 19:44:39 2015 (r291220) +++ head/sys/dev/isp/isp_pci.c Mon Nov 23 20:44:49 2015 (r291221) @@ -456,16 +456,6 @@ isp_get_generic_options(device_t dev, is { int tval; - /* - * Figure out if we're supposed to skip this one. - */ - tval = 0; - if (resource_int_value(device_get_name(dev), device_get_unit(dev), "disable", &tval) == 0 && tval) { - device_printf(dev, "disabled at user request\n"); - isp->isp_osinfo.disabled = 1; - return; - } - tval = 0; if (resource_int_value(device_get_name(dev), device_get_unit(dev), "fwload_disable", &tval) == 0 && tval != 0) { isp->isp_confopts |= ISP_CFG_NORELOAD; @@ -710,16 +700,6 @@ isp_pci_attach(device_t dev) isp_get_generic_options(dev, isp); /* - * Check to see if options have us disabled - */ - if (isp->isp_osinfo.disabled) { - /* - * But return zero to preserve unit numbering - */ - return (0); - } - - /* * Get PCI options- which in this case are just mapping preferences. */ isp_get_pci_options(dev, &m1, &m2); Modified: head/sys/dev/isp/isp_sbus.c ============================================================================== --- head/sys/dev/isp/isp_sbus.c Mon Nov 23 19:44:39 2015 (r291220) +++ head/sys/dev/isp/isp_sbus.c Mon Nov 23 20:44:49 2015 (r291221) @@ -155,19 +155,6 @@ isp_sbus_attach(device_t dev) sbs->sbus_dev = dev; sbs->sbus_mdvec = mdvec; - /* - * Figure out if we're supposed to skip this one. - * If we are, we actually go to ISP_ROLE_NONE. - */ - - tval = 0; - if (resource_int_value(device_get_name(dev), device_get_unit(dev), - "disable", &tval) == 0 && tval) { - device_printf(dev, "device is disabled\n"); - /* but return 0 so the !$)$)*!$*) unit isn't reused */ - return (0); - } - role = 0; if (resource_int_value(device_get_name(dev), device_get_unit(dev), "role", &role) == 0 && From owner-svn-src-all@freebsd.org Mon Nov 23 22:06:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62E04A3659B; Mon, 23 Nov 2015 22:06:57 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B9AA1951; Mon, 23 Nov 2015 22:06:56 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANM6u75036751; Mon, 23 Nov 2015 22:06:56 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANM6uKf036749; Mon, 23 Nov 2015 22:06:56 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201511232206.tANM6uKf036749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 23 Nov 2015 22:06:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291222 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 22:06:57 -0000 Author: ae Date: Mon Nov 23 22:06:55 2015 New Revision: 291222 URL: https://svnweb.freebsd.org/changeset/base/291222 Log: Add destroy_object callback to object rewriting framework. It is called when last reference to named object is going to be released and allows to do additional cleanup for implementation of named objects. Obtained from: Yandex LLC Sponsored by: Yandex LLC Modified: head/sys/netpfil/ipfw/ip_fw_private.h head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sys/netpfil/ipfw/ip_fw_private.h ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_private.h Mon Nov 23 20:44:49 2015 (r291221) +++ head/sys/netpfil/ipfw/ip_fw_private.h Mon Nov 23 22:06:55 2015 (r291222) @@ -564,7 +564,12 @@ typedef struct named_object *(ipfw_obj_f */ typedef int (ipfw_obj_create_cb)(struct ip_fw_chain *ch, struct tid_info *ti, uint16_t *pkidx); - +/* + * Object destroy callback. Intended to free resources allocated by + * create_object callback. + */ +typedef void (ipfw_obj_destroy_cb)(struct ip_fw_chain *ch, + struct named_object *no); struct opcode_obj_rewrite { uint32_t opcode; /* Opcode to act upon */ @@ -574,6 +579,7 @@ struct opcode_obj_rewrite { ipfw_obj_fname_cb *find_byname; /* Find named object by name */ ipfw_obj_fidx_cb *find_bykidx; /* Find named object by kidx */ ipfw_obj_create_cb *create_object; /* Create named object */ + ipfw_obj_destroy_cb *destroy_object;/* Destroy named object */ }; #define IPFW_ADD_OBJ_REWRITER(f, c) do { \ Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Mon Nov 23 20:44:49 2015 (r291221) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Mon Nov 23 22:06:55 2015 (r291222) @@ -2348,7 +2348,10 @@ unref_rule_objects(struct ip_fw_chain *c KASSERT(no->refcnt > 0, ("refcount for table %d is %d", kidx, no->refcnt)); - no->refcnt--; + if (no->refcnt == 1 && rw->destroy_object != NULL) + rw->destroy_object(ch, no); + else + no->refcnt--; } } From owner-svn-src-all@freebsd.org Mon Nov 23 23:04:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49F89A36292; Mon, 23 Nov 2015 23:04:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1836215CA; Mon, 23 Nov 2015 23:04:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANN4r0Q054362; Mon, 23 Nov 2015 23:04:53 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANN4rOH054361; Mon, 23 Nov 2015 23:04:53 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511232304.tANN4rOH054361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 23 Nov 2015 23:04:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291223 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 23:04:54 -0000 Author: bdrewery Date: Mon Nov 23 23:04:52 2015 New Revision: 291223 URL: https://svnweb.freebsd.org/changeset/base/291223 Log: There seems to be no reason to duplicate CANONICALOBJDIR logic from bsd.obj.mk, which is included for crunchgen builds. No change in build output occurred with this change. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.crunchgen.mk Modified: head/share/mk/bsd.crunchgen.mk ============================================================================== --- head/share/mk/bsd.crunchgen.mk Mon Nov 23 22:06:55 2015 (r291222) +++ head/share/mk/bsd.crunchgen.mk Mon Nov 23 23:04:52 2015 (r291223) @@ -38,13 +38,6 @@ OUTMK= ${PROG}.mk OUTC= ${PROG}.c OUTPUTS=${OUTMK} ${OUTC} ${PROG}.cache CRUNCHOBJS= ${.OBJDIR} -.if defined(MAKEOBJDIRPREFIX) -CANONICALOBJDIR:= ${MAKEOBJDIRPREFIX}${.CURDIR} -.elif defined(MAKEOBJDIR) && ${MAKEOBJDIR:M/*} != "" -CANONICALOBJDIR:= ${MAKEOBJDIR} -.else -CANONICALOBJDIR:= /usr/obj${.CURDIR} -.endif CRUNCH_GENERATE_LINKS?= yes CLEANFILES+= ${CONF} *.o *.lo *.c *.mk *.cache *.a *.h From owner-svn-src-all@freebsd.org Mon Nov 23 23:36:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46ED2A3669F; Mon, 23 Nov 2015 23:36:59 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AEC311E7; Mon, 23 Nov 2015 23:36:58 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANNawZk062858; Mon, 23 Nov 2015 23:36:58 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANNawFw062857; Mon, 23 Nov 2015 23:36:58 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201511232336.tANNawFw062857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 23 Nov 2015 23:36:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291224 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 23:36:59 -0000 Author: jkim Date: Mon Nov 23 23:36:57 2015 New Revision: 291224 URL: https://svnweb.freebsd.org/changeset/base/291224 Log: colldef(1) and mklocale(1) reappeared in r291115. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Nov 23 23:04:52 2015 (r291223) +++ head/ObsoleteFiles.inc Mon Nov 23 23:36:57 2015 (r291224) @@ -142,10 +142,6 @@ OLD_FILES+=usr/share/locale/sr_YU.UTF-8/ OLD_FILES+=usr/share/locale/sr_YU.UTF-8/LC_NUMERIC OLD_FILES+=usr/share/locale/sr_YU.UTF-8/LC_MESSAGES OLD_DIRS+=usr/share/locale/sr_YU.UTF-8 -OLD_FILES+=usr/bin/colldef -OLD_FILES+=usr/share/man/man1/colldef.1.gz -OLD_FILES+=usr/bin/mklocale -OLD_FILES+=usr/share/man/man1/mklocale.1.gz # 20151101: added missing _test suffix on multiple tests in lib/libc OLD_FILES+=usr/tests/lib/libc/c063/faccessat OLD_FILES+=usr/tests/lib/libc/c063/fchmodat From owner-svn-src-all@freebsd.org Mon Nov 23 23:39:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A8D6A3671B; Mon, 23 Nov 2015 23:39:05 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DE8881508; Mon, 23 Nov 2015 23:39:04 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wmuu63 with SMTP id u63so75162440wmu.0; Mon, 23 Nov 2015 15:39:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=3YqxOTfFdsHzAp7euUazWBDFdiPGNlsle/94KSgQEwk=; b=iw8tkI+LsgMoagGDYdjqhk2mooaVvkoH3Pgwav9/cMyL6GKfkHtCnh/wqSIkvMfTbJ BBIBMt6hFyeo2BZlCjw/cEbzuXjCPbBi3wK4UQP2ncV4WP6gGq/y3xToPsrPNiJkPSE8 ej2OLKxZUSTolRKEX5U1E4nzDooKBLetPzTw/nPzrBmJOFjYBufD+FATSNRqGdKt71ar es79FG1PufRiUurXAaZTLsDMNq6VV9NyMnD42hBFf7RM+2U/hTNtVjtTyftF2BGCMei6 RXXWYz0lxKggnJcpEi9qPTB4gLpMCeJBmOQvIkT9SjBoixW8LeA6kGyO3RuxZhpS7mHD p/DQ== X-Received: by 10.194.23.73 with SMTP id k9mr23893776wjf.3.1448321942007; Mon, 23 Nov 2015 15:39:02 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id t133sm15230385wmf.24.2015.11.23.15.39.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Nov 2015 15:39:01 -0800 (PST) Sender: Baptiste Daroussin Date: Tue, 24 Nov 2015 00:38:59 +0100 From: Baptiste Daroussin To: Jung-uk Kim Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291224 - head Message-ID: <20151123233859.GC76516@ivaldir.etoilebsd.net> References: <201511232336.tANNawFw062857@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="iFRdW5/EC4oqxDHL" Content-Disposition: inline In-Reply-To: <201511232336.tANNawFw062857@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 23:39:05 -0000 --iFRdW5/EC4oqxDHL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 23, 2015 at 11:36:58PM +0000, Jung-uk Kim wrote: > Author: jkim > Date: Mon Nov 23 23:36:57 2015 > New Revision: 291224 > URL: https://svnweb.freebsd.org/changeset/base/291224 >=20 > Log: > colldef(1) and mklocale(1) reappeared in r291115. >=20 Thank you! Best regards, Bapt --iFRdW5/EC4oqxDHL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlZTo5MACgkQ8kTtMUmk6EwlpACgs2OZHzZUup0h2DCKW64VS1vT ZAMAn2PAsG9FvYa8FxK3P9u1vsyLUQ79 =ckqI -----END PGP SIGNATURE----- --iFRdW5/EC4oqxDHL-- From owner-svn-src-all@freebsd.org Mon Nov 23 23:48:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99A3CA368A6; Mon, 23 Nov 2015 23:48:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 683FD1A92; Mon, 23 Nov 2015 23:48:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANNm7Mb065837; Mon, 23 Nov 2015 23:48:07 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANNm7Gp065833; Mon, 23 Nov 2015 23:48:07 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201511232348.tANNm7Gp065833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 23 Nov 2015 23:48:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291225 - in head: sys/dev/pci usr.sbin/pciconf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 23:48:08 -0000 Author: jhb Date: Mon Nov 23 23:48:07 2015 New Revision: 291225 URL: https://svnweb.freebsd.org/changeset/base/291225 Log: Add a new -B flag for use with list mode (-l) that lists details about bridges. Currently this includes information about what resources a bridge decodes on the upstream side for use by downstream devices including bus numbers, I/O port resources, and memory resources. Windows and bus ranges are enumerated for both PCI-PCI bridges and PCI-CardBus bridges. To simplify the implementation, all enumeration is done by reading the appropriate config space registers directly rather than querying the bridge driver in the kernel via new ioctls. This does result in a few limitations. First, an unimplemented window in a PCI-PCI bridge cannot be accurately detected as accurate detection requires writing to the window base register. That is not safe for pciconf(8). Instead, this assumes that any window where both the base and limit read as all zeroes is unimplemented. Second, the PCI-PCI bridge driver in a tree has a few quirks for PCI-PCI bridges that use subtractive decoding but do not indicate that via the progif config register. The list of quirks is duplicated in pciconf's source. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D4171 Modified: head/sys/dev/pci/pcireg.h head/sys/dev/pci/pcivar.h head/usr.sbin/pciconf/pciconf.8 head/usr.sbin/pciconf/pciconf.c Modified: head/sys/dev/pci/pcireg.h ============================================================================== --- head/sys/dev/pci/pcireg.h Mon Nov 23 23:36:57 2015 (r291224) +++ head/sys/dev/pci/pcireg.h Mon Nov 23 23:48:07 2015 (r291225) @@ -265,6 +265,11 @@ #define PCIR_BIOS_1 0x38 #define PCIR_BRIDGECTL_1 0x3e +#define PCI_PPBMEMBASE(h,l) ((((uint64_t)(h) << 32) + ((l)<<16)) & ~0xfffff) +#define PCI_PPBMEMLIMIT(h,l) ((((uint64_t)(h) << 32) + ((l)<<16)) | 0xfffff) +#define PCI_PPBIOBASE(h,l) ((((h)<<16) + ((l)<<8)) & ~0xfff) +#define PCI_PPBIOLIMIT(h,l) ((((h)<<16) + ((l)<<8)) | 0xfff) + /* config registers for header type 2 (CardBus) devices */ #define PCIR_MAX_BAR_2 0 @@ -284,6 +289,9 @@ #define PCIR_IOLIMIT0_2 0x30 #define PCIR_IOBASE1_2 0x34 #define PCIR_IOLIMIT1_2 0x38 +#define PCIM_CBBIO_16 0x0 +#define PCIM_CBBIO_32 0x1 +#define PCIM_CBBIO_MASK 0x3 #define PCIR_BRIDGECTL_2 0x3e @@ -292,6 +300,11 @@ #define PCIR_PCCARDIF_2 0x44 +#define PCI_CBBMEMBASE(l) ((l) & ~0xfffff) +#define PCI_CBBMEMLIMIT(l) ((l) | 0xfffff) +#define PCI_CBBIOBASE(l) ((l) & ~0x3) +#define PCI_CBBIOLIMIT(l) ((l) | 0x3) + /* PCI device class, subclass and programming interface definitions */ #define PCIC_OLD 0x00 @@ -479,6 +492,17 @@ #define PCIB_BCR_DISCARD_TIMER_STATUS 0x0400 #define PCIB_BCR_DISCARD_TIMER_SERREN 0x0800 +#define CBB_BCR_PERR_ENABLE 0x0001 +#define CBB_BCR_SERR_ENABLE 0x0002 +#define CBB_BCR_ISA_ENABLE 0x0004 +#define CBB_BCR_VGA_ENABLE 0x0008 +#define CBB_BCR_MASTER_ABORT_MODE 0x0020 +#define CBB_BCR_CARDBUS_RESET 0x0040 +#define CBB_BCR_IREQ_INT_ENABLE 0x0080 +#define CBB_BCR_PREFETCH_0_ENABLE 0x0100 +#define CBB_BCR_PREFETCH_1_ENABLE 0x0200 +#define CBB_BCR_WRITE_POSTING_ENABLE 0x0400 + /* PCI power manangement */ #define PCIR_POWER_CAP 0x2 #define PCIM_PCAP_SPEC 0x0007 Modified: head/sys/dev/pci/pcivar.h ============================================================================== --- head/sys/dev/pci/pcivar.h Mon Nov 23 23:36:57 2015 (r291224) +++ head/sys/dev/pci/pcivar.h Mon Nov 23 23:48:07 2015 (r291225) @@ -211,11 +211,6 @@ typedef struct pcicfg { /* additional type 1 device config header information (PCI to PCI bridge) */ -#define PCI_PPBMEMBASE(h,l) ((((pci_addr_t)(h) << 32) + ((l)<<16)) & ~0xfffff) -#define PCI_PPBMEMLIMIT(h,l) ((((pci_addr_t)(h) << 32) + ((l)<<16)) | 0xfffff) -#define PCI_PPBIOBASE(h,l) ((((h)<<16) + ((l)<<8)) & ~0xfff) -#define PCI_PPBIOLIMIT(h,l) ((((h)<<16) + ((l)<<8)) | 0xfff) - typedef struct { pci_addr_t pmembase; /* base address of prefetchable memory */ pci_addr_t pmemlimit; /* topmost address of prefetchable memory */ Modified: head/usr.sbin/pciconf/pciconf.8 ============================================================================== --- head/usr.sbin/pciconf/pciconf.8 Mon Nov 23 23:36:57 2015 (r291224) +++ head/usr.sbin/pciconf/pciconf.8 Mon Nov 23 23:48:07 2015 (r291225) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 06, 2015 +.Dd November 23, 2015 .Dt PCICONF 8 .Os .Sh NAME @@ -33,7 +33,7 @@ .Nd diagnostic utility for the PCI bus .Sh SYNOPSIS .Nm -.Fl l Oo Fl bcevV Oc Op Ar device +.Fl l Oo Fl BbceVv Oc Op Ar device .Nm .Fl a Ar device .Nm @@ -112,6 +112,42 @@ device, which contains several (similar one chip. .Pp If the +.Fl B +option is supplied, +.Nm +will list additional information for +.Tn PCI +to +.Tn PCI +and +.Tn PCI +to +.Tn CardBus +bridges, +specifically the resource ranges decoded by the bridge for use by devices +behind the bridge. +Each bridge lists a range of bus numbers handled by the bridge and its +downstream devices. +Memory and I/O port decoding windows are enumerated via a line in the +following format: +.Bd -literal + window[1c] = type I/O Port, range 16, addr 0x5000-0x8fff, enabled +.Ed +.Pp +The first value after the +.Dq Li window +prefix in the square brackets is the offset of the decoding window in +config space in hexadecimal. +The type of a window is one of +.Dq Memory , +.Dq Prefetchable Memory , +or +.Dq I/O Port . +The range indicates the binary log of the maximum address the window decodes. +The address field indicates the start and end addresses of the decoded range. +Finally, the last flag indicates if the window is enabled or disabled. +.Pp +If the .Fl b option is supplied, .Nm @@ -132,7 +168,7 @@ The type of a BAR is one of .Dq Prefetchable Memory , or .Dq I/O Port . -The range indicates the maximum address the BAR decodes. +The range indicates the binary log of the maximum address the BAR decodes. The base and size indicate the start and length of the BAR's address window, respectively. Finally, the last flag indicates if the BAR is enabled or disabled. Modified: head/usr.sbin/pciconf/pciconf.c ============================================================================== --- head/usr.sbin/pciconf/pciconf.c Mon Nov 23 23:36:57 2015 (r291224) +++ head/usr.sbin/pciconf/pciconf.c Mon Nov 23 23:48:07 2015 (r291225) @@ -39,6 +39,7 @@ static const char rcsid[] = #include #include #include +#include #include #include #include @@ -69,9 +70,10 @@ struct pci_vendor_info TAILQ_HEAD(,pci_vendor_info) pci_vendors; static struct pcisel getsel(const char *str); +static void list_bridge(int fd, struct pci_conf *p); static void list_bars(int fd, struct pci_conf *p); -static void list_devs(const char *name, int verbose, int bars, int caps, - int errors, int vpd); +static void list_devs(const char *name, int verbose, int bars, int bridge, + int caps, int errors, int vpd); static void list_verbose(struct pci_conf *p); static void list_vpd(int fd, struct pci_conf *p); static const char *guess_class(struct pci_conf *p); @@ -87,7 +89,7 @@ static void usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n", - "usage: pciconf -l [-bcevV] [device]", + "usage: pciconf -l [-BbcevV] [device]", " pciconf -a device", " pciconf -r [-b | -h] device addr[:addr2]", " pciconf -w [-b | -h] device addr value"); @@ -99,18 +101,22 @@ main(int argc, char **argv) { int c; int listmode, readmode, writemode, attachedmode; - int bars, caps, errors, verbose, vpd; + int bars, bridge, caps, errors, verbose, vpd; int byte, isshort; listmode = readmode = writemode = attachedmode = 0; - bars = caps = errors = verbose = vpd = byte = isshort = 0; + bars = bridge = caps = errors = verbose = vpd = byte = isshort = 0; - while ((c = getopt(argc, argv, "abcehlrwvV")) != -1) { + while ((c = getopt(argc, argv, "aBbcehlrwVv")) != -1) { switch(c) { case 'a': attachedmode = 1; break; + case 'B': + bridge = 1; + break; + case 'b': bars = 1; byte = 1; @@ -161,7 +167,7 @@ main(int argc, char **argv) if (listmode) { list_devs(optind + 1 == argc ? argv[optind] : NULL, verbose, - bars, caps, errors, vpd); + bars, bridge, caps, errors, vpd); } else if (attachedmode) { chkattached(argv[optind]); } else if (readmode) { @@ -178,8 +184,8 @@ main(int argc, char **argv) } static void -list_devs(const char *name, int verbose, int bars, int caps, int errors, - int vpd) +list_devs(const char *name, int verbose, int bars, int bridge, int caps, + int errors, int vpd) { int fd; struct pci_conf_io pc; @@ -190,7 +196,8 @@ list_devs(const char *name, int verbose, if (verbose) load_vendors(); - fd = open(_PATH_DEVPCI, (caps || errors) ? O_RDWR : O_RDONLY, 0); + fd = open(_PATH_DEVPCI, (bridge || caps || errors) ? O_RDWR : O_RDONLY, + 0); if (fd < 0) err(1, "%s", _PATH_DEVPCI); @@ -248,6 +255,8 @@ list_devs(const char *name, int verbose, list_verbose(p); if (bars) list_bars(fd, p); + if (bridge) + list_bridge(fd, p); if (caps) list_caps(fd, p); if (errors) @@ -261,6 +270,189 @@ list_devs(const char *name, int verbose, } static void +print_bus_range(int fd, struct pci_conf *p, int secreg, int subreg) +{ + uint8_t secbus, subbus; + + secbus = read_config(fd, &p->pc_sel, secreg, 1); + subbus = read_config(fd, &p->pc_sel, subreg, 1); + printf(" bus range = %u-%u\n", secbus, subbus); +} + +static void +print_window(int reg, const char *type, int range, uint64_t base, + uint64_t limit) +{ + + printf(" window[%02x] = type %s, range %2d, addr %#jx-%#jx, %s\n", + reg, type, range, (uintmax_t)base, (uintmax_t)limit, + base < limit ? "enabled" : "disabled"); +} + +static void +print_special_decode(bool isa, bool vga, bool subtractive) +{ + bool comma; + + if (isa || vga || subtractive) { + comma = false; + printf(" decode = "); + if (isa) { + printf("ISA"); + comma = true; + } + if (vga) { + printf("%sVGA", comma ? ", " : ""); + comma = true; + } + if (subtractive) + printf("%ssubtractive", comma ? ", " : ""); + printf("\n"); + } +} + +static void +print_bridge_windows(int fd, struct pci_conf *p) +{ + uint64_t base, limit; + uint32_t val; + uint16_t bctl; + bool subtractive; + int range; + + /* + * XXX: This assumes that a window with a base and limit of 0 + * is not implemented. In theory a window might be programmed + * at the smallest size with a base of 0, but those do not seem + * common in practice. + */ + val = read_config(fd, &p->pc_sel, PCIR_IOBASEL_1, 1); + if (val != 0 || read_config(fd, &p->pc_sel, PCIR_IOLIMITL_1, 1) != 0) { + if ((val & PCIM_BRIO_MASK) == PCIM_BRIO_32) { + base = PCI_PPBIOBASE( + read_config(fd, &p->pc_sel, PCIR_IOBASEH_1, 2), + val); + limit = PCI_PPBIOLIMIT( + read_config(fd, &p->pc_sel, PCIR_IOLIMITH_1, 2), + read_config(fd, &p->pc_sel, PCIR_IOLIMITL_1, 1)); + range = 32; + } else { + base = PCI_PPBIOBASE(0, val); + limit = PCI_PPBIOLIMIT(0, + read_config(fd, &p->pc_sel, PCIR_IOLIMITL_1, 1)); + range = 16; + } + print_window(PCIR_IOBASEL_1, "I/O Port", range, base, limit); + } + + base = PCI_PPBMEMBASE(0, + read_config(fd, &p->pc_sel, PCIR_MEMBASE_1, 2)); + limit = PCI_PPBMEMLIMIT(0, + read_config(fd, &p->pc_sel, PCIR_MEMLIMIT_1, 2)); + print_window(PCIR_MEMBASE_1, "Memory", 32, base, limit); + + val = read_config(fd, &p->pc_sel, PCIR_PMBASEL_1, 2); + if (val != 0 || read_config(fd, &p->pc_sel, PCIR_PMLIMITL_1, 2) != 0) { + if ((val & PCIM_BRPM_MASK) == PCIM_BRPM_64) { + base = PCI_PPBMEMBASE( + read_config(fd, &p->pc_sel, PCIR_PMBASEH_1, 4), + val); + limit = PCI_PPBMEMLIMIT( + read_config(fd, &p->pc_sel, PCIR_PMLIMITH_1, 4), + read_config(fd, &p->pc_sel, PCIR_PMLIMITL_1, 2)); + range = 64; + } else { + base = PCI_PPBMEMBASE(0, val); + limit = PCI_PPBMEMLIMIT(0, + read_config(fd, &p->pc_sel, PCIR_PMLIMITL_1, 2)); + range = 32; + } + print_window(PCIR_PMBASEL_1, "Prefetchable Memory", range, base, + limit); + } + + /* + * XXX: This list of bridges that are subtractive but do not set + * progif to indicate it is copied from pci_pci.c. + */ + subtractive = p->pc_progif == PCIP_BRIDGE_PCI_SUBTRACTIVE; + switch (p->pc_device << 16 | p->pc_vendor) { + case 0xa002177d: /* Cavium ThunderX */ + case 0x124b8086: /* Intel 82380FB Mobile */ + case 0x060513d7: /* Toshiba ???? */ + subtractive = true; + } + if (p->pc_vendor == 0x8086 && (p->pc_device & 0xff00) == 0x2400) + subtractive = true; + + bctl = read_config(fd, &p->pc_sel, PCIR_BRIDGECTL_1, 2); + print_special_decode(bctl & PCIB_BCR_ISA_ENABLE, + bctl & PCIB_BCR_VGA_ENABLE, subtractive); +} + +static void +print_cardbus_mem_window(int fd, struct pci_conf *p, int basereg, int limitreg, + bool prefetch) +{ + + print_window(basereg, prefetch ? "Prefetchable Memory" : "Memory", 32, + PCI_CBBMEMBASE(read_config(fd, &p->pc_sel, basereg, 4)), + PCI_CBBMEMLIMIT(read_config(fd, &p->pc_sel, limitreg, 4))); +} + +static void +print_cardbus_io_window(int fd, struct pci_conf *p, int basereg, int limitreg) +{ + uint32_t base, limit; + uint32_t val; + int range; + + val = read_config(fd, &p->pc_sel, basereg, 2); + if ((val & PCIM_CBBIO_MASK) == PCIM_CBBIO_32) { + base = PCI_CBBIOBASE(read_config(fd, &p->pc_sel, basereg, 4)); + limit = PCI_CBBIOBASE(read_config(fd, &p->pc_sel, limitreg, 4)); + range = 32; + } else { + base = PCI_CBBIOBASE(val); + limit = PCI_CBBIOBASE(read_config(fd, &p->pc_sel, limitreg, 2)); + range = 16; + } + print_window(basereg, "I/O Port", range, base, limit); +} + +static void +print_cardbus_windows(int fd, struct pci_conf *p) +{ + uint16_t bctl; + + bctl = read_config(fd, &p->pc_sel, PCIR_BRIDGECTL_2, 2); + print_cardbus_mem_window(fd, p, PCIR_MEMBASE0_2, PCIR_MEMLIMIT0_2, + bctl & CBB_BCR_PREFETCH_0_ENABLE); + print_cardbus_mem_window(fd, p, PCIR_MEMBASE1_2, PCIR_MEMLIMIT1_2, + bctl & CBB_BCR_PREFETCH_1_ENABLE); + print_cardbus_io_window(fd, p, PCIR_IOBASE0_2, PCIR_IOLIMIT0_2); + print_cardbus_io_window(fd, p, PCIR_IOBASE1_2, PCIR_IOLIMIT1_2); + print_special_decode(bctl & CBB_BCR_ISA_ENABLE, + bctl & CBB_BCR_VGA_ENABLE, false); +} + +static void +list_bridge(int fd, struct pci_conf *p) +{ + + switch (p->pc_hdr & PCIM_HDRTYPE) { + case PCIM_HDRTYPE_BRIDGE: + print_bus_range(fd, p, PCIR_SECBUS_1, PCIR_SUBBUS_1); + print_bridge_windows(fd, p); + break; + case PCIM_HDRTYPE_CARDBUS: + print_bus_range(fd, p, PCIR_SECBUS_2, PCIR_SUBBUS_2); + print_cardbus_windows(fd, p); + break; + } +} + +static void list_bars(int fd, struct pci_conf *p) { int i, max; From owner-svn-src-all@freebsd.org Mon Nov 23 23:51:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC19DA369C0; Mon, 23 Nov 2015 23:51:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B31181D34; Mon, 23 Nov 2015 23:51:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id AFE98B915; Mon, 23 Nov 2015 18:51:01 -0500 (EST) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291225 - in head: sys/dev/pci usr.sbin/pciconf Date: Mon, 23 Nov 2015 15:50:42 -0800 Message-ID: <1925707.i8OmFrBir6@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201511232348.tANNm7Gp065833@repo.freebsd.org> References: <201511232348.tANNm7Gp065833@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 23 Nov 2015 18:51:01 -0500 (EST) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 23:51:03 -0000 On Monday, November 23, 2015 11:48:07 PM John Baldwin wrote: > Author: jhb > Date: Mon Nov 23 23:48:07 2015 > New Revision: 291225 > URL: https://svnweb.freebsd.org/changeset/base/291225 > > Log: > Add a new -B flag for use with list mode (-l) that lists details about > bridges. Currently this includes information about what resources a > bridge decodes on the upstream side for use by downstream devices including > bus numbers, I/O port resources, and memory resources. Windows and bus > ranges are enumerated for both PCI-PCI bridges and PCI-CardBus bridges. > > To simplify the implementation, all enumeration is done by reading the > appropriate config space registers directly rather than querying the > bridge driver in the kernel via new ioctls. This does result in a few > limitations. > > First, an unimplemented window in a PCI-PCI bridge cannot be accurately > detected as accurate detection requires writing to the window base > register. That is not safe for pciconf(8). Instead, this assumes that > any window where both the base and limit read as all zeroes is > unimplemented. > > Second, the PCI-PCI bridge driver in a tree has a few quirks for > PCI-PCI bridges that use subtractive decoding but do not indicate that > via the progif config register. The list of quirks is duplicated in > pciconf's source. Some sample output: pcib6@pci0:0:30:0: class=0x060401 card=0x20f417aa chip=0x24488086 rev=0x93 hdr=0x01 bus range = 21-24 window[1c] = type I/O Port, range 16, addr 0x5000-0x8fff, enabled window[20] = type Memory, range 32, addr 0xf4300000-0xf7ffffff, enabled window[24] = type Prefetchable Memory, range 64, addr 0xf0000000-0xf3ffffff, enabled decode = ISA, subtractive ... cbb0@pci0:21:0:0: class=0x060700 card=0x20c617aa chip=0x04761180 rev=0xba hdr=0x02 bus range = 22-24 window[1c] = type Memory, range 32, addr 0xfff00000-0xfffff, disabled window[24] = type Memory, range 32, addr 0xfff00000-0xfffff, disabled window[2c] = type I/O Port, range 16, addr 0x5000-0x50fc, enabled window[34] = type I/O Port, range 16, addr 0xfffc-0, disabled -- John Baldwin From owner-svn-src-all@freebsd.org Tue Nov 24 00:49:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B9FDA354F9; Tue, 24 Nov 2015 00:49:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F04E1248; Tue, 24 Nov 2015 00:49:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAO0nTTF083067; Tue, 24 Nov 2015 00:49:29 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAO0nTql083066; Tue, 24 Nov 2015 00:49:29 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511240049.tAO0nTql083066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 24 Nov 2015 00:49:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291226 - head/gnu/usr.bin/binutils/ld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 00:49:30 -0000 Author: bdrewery Date: Tue Nov 24 00:49:29 2015 New Revision: 291226 URL: https://svnweb.freebsd.org/changeset/base/291226 Log: Fix ld not respecting --sysroot. ld(1) uses the /usr/libdata/ldscripts when linking. These scripts add in the default search paths of /lib and /usr/lib via 'SEARCH_DIR("DIR")'. These need to be prefixed by '=' so that the --sysroot flag is respected. This is not a problem with buildworld since the TOOLS_PREFIX is baked into the cross-ld. However it is a problem when trying to use ld(1) with --sysroot anywhere else as it ends up still reading /lib and /usr/lib despite --sysroot. The default --sysroot (TARGET_SYSTEM_ROOT) is '/' for /usr/bin/ld. I found this while building with META MODE with uses only --sysroot with /usr/bin/ld, and found that libraries that I had not built in its sysroot directory were leaking in. This didn't happen with ports binutils either. This would also impact external compiler support. Reviewed by: bapt, brooks MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D4262 Modified: head/gnu/usr.bin/binutils/ld/Makefile Modified: head/gnu/usr.bin/binutils/ld/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile Mon Nov 23 23:48:07 2015 (r291225) +++ head/gnu/usr.bin/binutils/ld/Makefile Tue Nov 24 00:49:29 2015 (r291226) @@ -50,7 +50,7 @@ FILES= ${LDSCRIPTS:S|^|ldscripts/|} FILESDIR= ${SCRIPTDIR} HOST= ${TARGET_TUPLE} -LIBSEARCHPATH= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\" +LIBSEARCHPATH= \"=/lib\":\"=/usr/lib\" .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${NATIVE_EMULATION}.${ext} ldscripts/${NATIVE_EMULATION}.${ext}: e${NATIVE_EMULATION}.c From owner-svn-src-all@freebsd.org Tue Nov 24 02:28:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C0E4A3682D; Tue, 24 Nov 2015 02:28:01 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C59C41D7A; Tue, 24 Nov 2015 02:28:00 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAO2RxtI013128; Tue, 24 Nov 2015 02:27:59 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAO2Rxlq013127; Tue, 24 Nov 2015 02:27:59 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201511240227.tAO2Rxlq013127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Tue, 24 Nov 2015 02:27:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291230 - head/usr.sbin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 02:28:01 -0000 Author: araujo Date: Tue Nov 24 02:27:59 2015 New Revision: 291230 URL: https://svnweb.freebsd.org/changeset/base/291230 Log: Connect ypldap(8) to the build. Approved by: bapt (mentor) Modified: head/usr.sbin/Makefile Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Tue Nov 24 02:01:01 2015 (r291229) +++ head/usr.sbin/Makefile Tue Nov 24 02:27:59 2015 (r291230) @@ -160,6 +160,7 @@ SUBDIR.${MK_NIS}+= rpc.yppasswdd SUBDIR.${MK_NIS}+= rpc.ypupdated SUBDIR.${MK_NIS}+= rpc.ypxfrd SUBDIR.${MK_NIS}+= ypbind +SUBDIR.${MK_NIS}+= ypldap SUBDIR.${MK_NIS}+= yp_mkdb SUBDIR.${MK_NIS}+= yppoll SUBDIR.${MK_NIS}+= yppush From owner-svn-src-all@freebsd.org Tue Nov 24 02:31:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B4C2A368B6; Tue, 24 Nov 2015 02:31:00 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 681AD1F93; Tue, 24 Nov 2015 02:31:00 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAO2UxQW015208; Tue, 24 Nov 2015 02:30:59 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAO2UxvB015207; Tue, 24 Nov 2015 02:30:59 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201511240230.tAO2UxvB015207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Tue, 24 Nov 2015 02:30:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291231 - head/usr.bin/ministat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 02:31:00 -0000 Author: araujo Date: Tue Nov 24 02:30:59 2015 New Revision: 291231 URL: https://svnweb.freebsd.org/changeset/base/291231 Log: Compute the median of the data set as the midpoint between the two middle values when the data set has an even number of elements. PR: 201582 Submitted by: Marcus Reid Reviewed by: imp Approved by: bapt (mentor) Modified: head/usr.bin/ministat/ministat.c Modified: head/usr.bin/ministat/ministat.c ============================================================================== --- head/usr.bin/ministat/ministat.c Tue Nov 24 02:27:59 2015 (r291230) +++ head/usr.bin/ministat/ministat.c Tue Nov 24 02:30:59 2015 (r291231) @@ -192,8 +192,10 @@ Avg(struct dataset *ds) static double Median(struct dataset *ds) { - - return (ds->points[ds->n / 2]); + if ((ds->n % 2) == 0) + return ((ds->points[ds->n / 2] + (ds->points[(ds->n / 2) - 1])) / 2); + else + return (ds->points[ds->n / 2]); } static double From owner-svn-src-all@freebsd.org Tue Nov 24 03:43:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AF98A3551C; Tue, 24 Nov 2015 03:43:00 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EACFC1CB8; Tue, 24 Nov 2015 03:42:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAO3gxxL036334; Tue, 24 Nov 2015 03:42:59 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAO3gw4w036329; Tue, 24 Nov 2015 03:42:58 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511240342.tAO3gw4w036329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 24 Nov 2015 03:42:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291233 - in head/sys: conf dev/ath modules/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 03:43:00 -0000 Author: adrian Date: Tue Nov 24 03:42:58 2015 New Revision: 291233 URL: https://svnweb.freebsd.org/changeset/base/291233 Log: [ath] migrate ioctl and busdma memory operations out into separate source files. This should be a big no-op pass; and reduces the size of if_ath.c. I'm hopefully soon going to take a whack at the USB support for ath(4) and this'll require some reuse of the busdma memory code. Added: head/sys/dev/ath/if_ath_descdma.c (contents, props changed) head/sys/dev/ath/if_ath_descdma.h (contents, props changed) head/sys/dev/ath/if_ath_ioctl.c (contents, props changed) head/sys/dev/ath/if_ath_ioctl.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_misc.h head/sys/dev/ath/if_ath_rx.c head/sys/dev/ath/if_ath_rx_edma.c head/sys/dev/ath/if_ath_tx_edma.c head/sys/modules/ath/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Nov 24 02:37:16 2015 (r291232) +++ head/sys/conf/files Tue Nov 24 03:42:58 2015 (r291233) @@ -748,8 +748,12 @@ dev/ath/if_ath_btcoex.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_debug.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" +dev/ath/if_ath_descdma.c optional ath \ + compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_keycache.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" +dev/ath/if_ath_ioctl.c optional ath \ + compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_led.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_lna_div.c optional ath \ Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Tue Nov 24 02:37:16 2015 (r291232) +++ head/sys/dev/ath/if_ath.c Tue Nov 24 03:42:58 2015 (r291233) @@ -116,6 +116,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #ifdef ATH_TX99_DIAG #include @@ -157,7 +159,6 @@ static int ath_reset_vap(struct ieee8021 static int ath_transmit(struct ieee80211com *, struct mbuf *); static int ath_media_change(struct ifnet *); static void ath_watchdog(void *); -static int ath_ioctl(struct ieee80211com *, u_long, void *); static void ath_parent(struct ieee80211com *); static void ath_fatal_proc(void *, int); static void ath_bmiss_vap(struct ieee80211vap *); @@ -3668,320 +3669,6 @@ ath_bstuck_proc(void *arg, int pending) ath_reset(sc, ATH_RESET_NOLOSS); } -static void -ath_load_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) -{ - bus_addr_t *paddr = (bus_addr_t*) arg; - KASSERT(error == 0, ("error %u on bus_dma callback", error)); - *paddr = segs->ds_addr; -} - -/* - * Allocate the descriptors and appropriate DMA tag/setup. - * - * For some situations (eg EDMA TX completion), there isn't a requirement - * for the ath_buf entries to be allocated. - */ -int -ath_descdma_alloc_desc(struct ath_softc *sc, - struct ath_descdma *dd, ath_bufhead *head, - const char *name, int ds_size, int ndesc) -{ -#define DS2PHYS(_dd, _ds) \ - ((_dd)->dd_desc_paddr + ((caddr_t)(_ds) - (caddr_t)(_dd)->dd_desc)) -#define ATH_DESC_4KB_BOUND_CHECK(_daddr, _len) \ - ((((u_int32_t)(_daddr) & 0xFFF) > (0x1000 - (_len))) ? 1 : 0) - int error; - - dd->dd_descsize = ds_size; - - DPRINTF(sc, ATH_DEBUG_RESET, - "%s: %s DMA: %u desc, %d bytes per descriptor\n", - __func__, name, ndesc, dd->dd_descsize); - - dd->dd_name = name; - dd->dd_desc_len = dd->dd_descsize * ndesc; - - /* - * Merlin work-around: - * Descriptors that cross the 4KB boundary can't be used. - * Assume one skipped descriptor per 4KB page. - */ - if (! ath_hal_split4ktrans(sc->sc_ah)) { - int numpages = dd->dd_desc_len / 4096; - dd->dd_desc_len += ds_size * numpages; - } - - /* - * Setup DMA descriptor area. - * - * BUS_DMA_ALLOCNOW is not used; we never use bounce - * buffers for the descriptors themselves. - */ - error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), /* parent */ - PAGE_SIZE, 0, /* alignment, bounds */ - BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ - BUS_SPACE_MAXADDR, /* highaddr */ - NULL, NULL, /* filter, filterarg */ - dd->dd_desc_len, /* maxsize */ - 1, /* nsegments */ - dd->dd_desc_len, /* maxsegsize */ - 0, /* flags */ - NULL, /* lockfunc */ - NULL, /* lockarg */ - &dd->dd_dmat); - if (error != 0) { - device_printf(sc->sc_dev, - "cannot allocate %s DMA tag\n", dd->dd_name); - return error; - } - - /* allocate descriptors */ - error = bus_dmamem_alloc(dd->dd_dmat, (void**) &dd->dd_desc, - BUS_DMA_NOWAIT | BUS_DMA_COHERENT, - &dd->dd_dmamap); - if (error != 0) { - device_printf(sc->sc_dev, - "unable to alloc memory for %u %s descriptors, error %u\n", - ndesc, dd->dd_name, error); - goto fail1; - } - - error = bus_dmamap_load(dd->dd_dmat, dd->dd_dmamap, - dd->dd_desc, dd->dd_desc_len, - ath_load_cb, &dd->dd_desc_paddr, - BUS_DMA_NOWAIT); - if (error != 0) { - device_printf(sc->sc_dev, - "unable to map %s descriptors, error %u\n", - dd->dd_name, error); - goto fail2; - } - - DPRINTF(sc, ATH_DEBUG_RESET, "%s: %s DMA map: %p (%lu) -> %p (%lu)\n", - __func__, dd->dd_name, (uint8_t *) dd->dd_desc, - (u_long) dd->dd_desc_len, (caddr_t) dd->dd_desc_paddr, - /*XXX*/ (u_long) dd->dd_desc_len); - - return (0); - -fail2: - bus_dmamem_free(dd->dd_dmat, dd->dd_desc, dd->dd_dmamap); -fail1: - bus_dma_tag_destroy(dd->dd_dmat); - memset(dd, 0, sizeof(*dd)); - return error; -#undef DS2PHYS -#undef ATH_DESC_4KB_BOUND_CHECK -} - -int -ath_descdma_setup(struct ath_softc *sc, - struct ath_descdma *dd, ath_bufhead *head, - const char *name, int ds_size, int nbuf, int ndesc) -{ -#define DS2PHYS(_dd, _ds) \ - ((_dd)->dd_desc_paddr + ((caddr_t)(_ds) - (caddr_t)(_dd)->dd_desc)) -#define ATH_DESC_4KB_BOUND_CHECK(_daddr, _len) \ - ((((u_int32_t)(_daddr) & 0xFFF) > (0x1000 - (_len))) ? 1 : 0) - uint8_t *ds; - struct ath_buf *bf; - int i, bsize, error; - - /* Allocate descriptors */ - error = ath_descdma_alloc_desc(sc, dd, head, name, ds_size, - nbuf * ndesc); - - /* Assume any errors during allocation were dealt with */ - if (error != 0) { - return (error); - } - - ds = (uint8_t *) dd->dd_desc; - - /* allocate rx buffers */ - bsize = sizeof(struct ath_buf) * nbuf; - bf = malloc(bsize, M_ATHDEV, M_NOWAIT | M_ZERO); - if (bf == NULL) { - device_printf(sc->sc_dev, - "malloc of %s buffers failed, size %u\n", - dd->dd_name, bsize); - goto fail3; - } - dd->dd_bufptr = bf; - - TAILQ_INIT(head); - for (i = 0; i < nbuf; i++, bf++, ds += (ndesc * dd->dd_descsize)) { - bf->bf_desc = (struct ath_desc *) ds; - bf->bf_daddr = DS2PHYS(dd, ds); - if (! ath_hal_split4ktrans(sc->sc_ah)) { - /* - * Merlin WAR: Skip descriptor addresses which - * cause 4KB boundary crossing along any point - * in the descriptor. - */ - if (ATH_DESC_4KB_BOUND_CHECK(bf->bf_daddr, - dd->dd_descsize)) { - /* Start at the next page */ - ds += 0x1000 - (bf->bf_daddr & 0xFFF); - bf->bf_desc = (struct ath_desc *) ds; - bf->bf_daddr = DS2PHYS(dd, ds); - } - } - error = bus_dmamap_create(sc->sc_dmat, BUS_DMA_NOWAIT, - &bf->bf_dmamap); - if (error != 0) { - device_printf(sc->sc_dev, "unable to create dmamap " - "for %s buffer %u, error %u\n", - dd->dd_name, i, error); - ath_descdma_cleanup(sc, dd, head); - return error; - } - bf->bf_lastds = bf->bf_desc; /* Just an initial value */ - TAILQ_INSERT_TAIL(head, bf, bf_list); - } - - /* - * XXX TODO: ensure that ds doesn't overflow the descriptor - * allocation otherwise weird stuff will occur and crash your - * machine. - */ - return 0; - /* XXX this should likely just call ath_descdma_cleanup() */ -fail3: - bus_dmamap_unload(dd->dd_dmat, dd->dd_dmamap); - bus_dmamem_free(dd->dd_dmat, dd->dd_desc, dd->dd_dmamap); - bus_dma_tag_destroy(dd->dd_dmat); - memset(dd, 0, sizeof(*dd)); - return error; -#undef DS2PHYS -#undef ATH_DESC_4KB_BOUND_CHECK -} - -/* - * Allocate ath_buf entries but no descriptor contents. - * - * This is for RX EDMA where the descriptors are the header part of - * the RX buffer. - */ -int -ath_descdma_setup_rx_edma(struct ath_softc *sc, - struct ath_descdma *dd, ath_bufhead *head, - const char *name, int nbuf, int rx_status_len) -{ - struct ath_buf *bf; - int i, bsize, error; - - DPRINTF(sc, ATH_DEBUG_RESET, "%s: %s DMA: %u buffers\n", - __func__, name, nbuf); - - dd->dd_name = name; - /* - * This is (mostly) purely for show. We're not allocating any actual - * descriptors here as EDMA RX has the descriptor be part - * of the RX buffer. - * - * However, dd_desc_len is used by ath_descdma_free() to determine - * whether we have already freed this DMA mapping. - */ - dd->dd_desc_len = rx_status_len * nbuf; - dd->dd_descsize = rx_status_len; - - /* allocate rx buffers */ - bsize = sizeof(struct ath_buf) * nbuf; - bf = malloc(bsize, M_ATHDEV, M_NOWAIT | M_ZERO); - if (bf == NULL) { - device_printf(sc->sc_dev, - "malloc of %s buffers failed, size %u\n", - dd->dd_name, bsize); - error = ENOMEM; - goto fail3; - } - dd->dd_bufptr = bf; - - TAILQ_INIT(head); - for (i = 0; i < nbuf; i++, bf++) { - bf->bf_desc = NULL; - bf->bf_daddr = 0; - bf->bf_lastds = NULL; /* Just an initial value */ - - error = bus_dmamap_create(sc->sc_dmat, BUS_DMA_NOWAIT, - &bf->bf_dmamap); - if (error != 0) { - device_printf(sc->sc_dev, "unable to create dmamap " - "for %s buffer %u, error %u\n", - dd->dd_name, i, error); - ath_descdma_cleanup(sc, dd, head); - return error; - } - TAILQ_INSERT_TAIL(head, bf, bf_list); - } - return 0; -fail3: - memset(dd, 0, sizeof(*dd)); - return error; -} - -void -ath_descdma_cleanup(struct ath_softc *sc, - struct ath_descdma *dd, ath_bufhead *head) -{ - struct ath_buf *bf; - struct ieee80211_node *ni; - int do_warning = 0; - - if (dd->dd_dmamap != 0) { - bus_dmamap_unload(dd->dd_dmat, dd->dd_dmamap); - bus_dmamem_free(dd->dd_dmat, dd->dd_desc, dd->dd_dmamap); - bus_dma_tag_destroy(dd->dd_dmat); - } - - if (head != NULL) { - TAILQ_FOREACH(bf, head, bf_list) { - if (bf->bf_m) { - /* - * XXX warn if there's buffers here. - * XXX it should have been freed by the - * owner! - */ - - if (do_warning == 0) { - do_warning = 1; - device_printf(sc->sc_dev, - "%s: %s: mbuf should've been" - " unmapped/freed!\n", - __func__, - dd->dd_name); - } - bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, - BUS_DMASYNC_POSTREAD); - bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); - m_freem(bf->bf_m); - bf->bf_m = NULL; - } - if (bf->bf_dmamap != NULL) { - bus_dmamap_destroy(sc->sc_dmat, bf->bf_dmamap); - bf->bf_dmamap = NULL; - } - ni = bf->bf_node; - bf->bf_node = NULL; - if (ni != NULL) { - /* - * Reclaim node reference. - */ - ieee80211_free_node(ni); - } - } - } - - if (head != NULL) - TAILQ_INIT(head); - - if (dd->dd_bufptr != NULL) - free(dd->dd_bufptr, M_ATHDEV); - memset(dd, 0, sizeof(*dd)); -} - static int ath_desc_alloc(struct ath_softc *sc) { @@ -6419,119 +6106,6 @@ ath_watchdog(void *arg) callout_schedule(&sc->sc_wd_ch, hz); } -/* - * Fetch the rate control statistics for the given node. - */ -static int -ath_ioctl_ratestats(struct ath_softc *sc, struct ath_rateioctl *rs) -{ - struct ath_node *an; - struct ieee80211com *ic = &sc->sc_ic; - struct ieee80211_node *ni; - int error = 0; - - /* Perform a lookup on the given node */ - ni = ieee80211_find_node(&ic->ic_sta, rs->is_u.macaddr); - if (ni == NULL) { - error = EINVAL; - goto bad; - } - - /* Lock the ath_node */ - an = ATH_NODE(ni); - ATH_NODE_LOCK(an); - - /* Fetch the rate control stats for this node */ - error = ath_rate_fetch_node_stats(sc, an, rs); - - /* No matter what happens here, just drop through */ - - /* Unlock the ath_node */ - ATH_NODE_UNLOCK(an); - - /* Unref the node */ - ieee80211_node_decref(ni); - -bad: - return (error); -} - -#ifdef ATH_DIAGAPI -/* - * Diagnostic interface to the HAL. This is used by various - * tools to do things like retrieve register contents for - * debugging. The mechanism is intentionally opaque so that - * it can change frequently w/o concern for compatiblity. - */ -static int -ath_ioctl_diag(struct ath_softc *sc, struct ath_diag *ad) -{ - struct ath_hal *ah = sc->sc_ah; - u_int id = ad->ad_id & ATH_DIAG_ID; - void *indata = NULL; - void *outdata = NULL; - u_int32_t insize = ad->ad_in_size; - u_int32_t outsize = ad->ad_out_size; - int error = 0; - - if (ad->ad_id & ATH_DIAG_IN) { - /* - * Copy in data. - */ - indata = malloc(insize, M_TEMP, M_NOWAIT); - if (indata == NULL) { - error = ENOMEM; - goto bad; - } - error = copyin(ad->ad_in_data, indata, insize); - if (error) - goto bad; - } - if (ad->ad_id & ATH_DIAG_DYN) { - /* - * Allocate a buffer for the results (otherwise the HAL - * returns a pointer to a buffer where we can read the - * results). Note that we depend on the HAL leaving this - * pointer for us to use below in reclaiming the buffer; - * may want to be more defensive. - */ - outdata = malloc(outsize, M_TEMP, M_NOWAIT); - if (outdata == NULL) { - error = ENOMEM; - goto bad; - } - } - - - ATH_LOCK(sc); - if (id != HAL_DIAG_REGS) - ath_power_set_power_state(sc, HAL_PM_AWAKE); - ATH_UNLOCK(sc); - - if (ath_hal_getdiagstate(ah, id, indata, insize, &outdata, &outsize)) { - if (outsize < ad->ad_out_size) - ad->ad_out_size = outsize; - if (outdata != NULL) - error = copyout(outdata, ad->ad_out_data, - ad->ad_out_size); - } else { - error = EINVAL; - } - - ATH_LOCK(sc); - if (id != HAL_DIAG_REGS) - ath_power_restore_power_state(sc); - ATH_UNLOCK(sc); - -bad: - if ((ad->ad_id & ATH_DIAG_IN) && indata != NULL) - free(indata, M_TEMP); - if ((ad->ad_id & ATH_DIAG_DYN) && outdata != NULL) - free(outdata, M_TEMP); - return error; -} -#endif /* ATH_DIAGAPI */ - static void ath_parent(struct ieee80211com *ic) { @@ -6578,73 +6152,6 @@ ath_parent(struct ieee80211com *ic) } } -static int -ath_ioctl(struct ieee80211com *ic, u_long cmd, void *data) -{ - struct ifreq *ifr = data; - struct ath_softc *sc = ic->ic_softc; - - switch (cmd) { - case SIOCGATHSTATS: { - struct ieee80211vap *vap; - struct ifnet *ifp; - const HAL_RATE_TABLE *rt; - - /* NB: embed these numbers to get a consistent view */ - sc->sc_stats.ast_tx_packets = 0; - sc->sc_stats.ast_rx_packets = 0; - TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { - ifp = vap->iv_ifp; - sc->sc_stats.ast_tx_packets += ifp->if_get_counter(ifp, - IFCOUNTER_OPACKETS); - sc->sc_stats.ast_rx_packets += ifp->if_get_counter(ifp, - IFCOUNTER_IPACKETS); - } - sc->sc_stats.ast_tx_rssi = ATH_RSSI(sc->sc_halstats.ns_avgtxrssi); - sc->sc_stats.ast_rx_rssi = ATH_RSSI(sc->sc_halstats.ns_avgrssi); -#ifdef IEEE80211_SUPPORT_TDMA - sc->sc_stats.ast_tdma_tsfadjp = TDMA_AVG(sc->sc_avgtsfdeltap); - sc->sc_stats.ast_tdma_tsfadjm = TDMA_AVG(sc->sc_avgtsfdeltam); -#endif - rt = sc->sc_currates; - sc->sc_stats.ast_tx_rate = - rt->info[sc->sc_txrix].dot11Rate &~ IEEE80211_RATE_BASIC; - if (rt->info[sc->sc_txrix].phy & IEEE80211_T_HT) - sc->sc_stats.ast_tx_rate |= IEEE80211_RATE_MCS; - return copyout(&sc->sc_stats, - ifr->ifr_data, sizeof (sc->sc_stats)); - } - case SIOCGATHAGSTATS: - return copyout(&sc->sc_aggr_stats, - ifr->ifr_data, sizeof (sc->sc_aggr_stats)); - case SIOCZATHSTATS: { - int error; - - error = priv_check(curthread, PRIV_DRIVER); - if (error == 0) { - memset(&sc->sc_stats, 0, sizeof(sc->sc_stats)); - memset(&sc->sc_aggr_stats, 0, - sizeof(sc->sc_aggr_stats)); - memset(&sc->sc_intr_stats, 0, - sizeof(sc->sc_intr_stats)); - } - return (error); - } -#ifdef ATH_DIAGAPI - case SIOCGATHDIAG: - return (ath_ioctl_diag(sc, data)); - case SIOCGATHPHYERR: - return (ath_ioctl_phyerr(sc, data)); -#endif - case SIOCGATHSPECTRAL: - return (ath_ioctl_spectral(sc, data)); - case SIOCGATHNODERATESTATS: - return (ath_ioctl_ratestats(sc, data)); - default: - return (ENOTTY); - } -} - /* * Announce various information on device/driver attach. */ Added: head/sys/dev/ath/if_ath_descdma.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/if_ath_descdma.c Tue Nov 24 03:42:58 2015 (r291233) @@ -0,0 +1,442 @@ +/*- + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Driver for the Atheros Wireless LAN controller. + * + * This software is derived from work of Atsushi Onoe; his contribution + * is greatly appreciated. + */ + +#include "opt_inet.h" +#include "opt_ath.h" +/* + * This is needed for register operations which are performed + * by the driver - eg, calls to ath_hal_gettsf32(). + * + * It's also required for any AH_DEBUG checks in here, eg the + * module dependencies. + */ +#include "opt_ah.h" +#include "opt_wlan.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* for mp_ncpus */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#ifdef IEEE80211_SUPPORT_SUPERG +#include +#endif +#ifdef IEEE80211_SUPPORT_TDMA +#include +#endif + +#include + +#ifdef INET +#include +#include +#endif + +#include +#include /* XXX for softled */ +#include + +#include +#include +#if 0 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif +#include + +MALLOC_DECLARE(M_ATHDEV); + +/* + * This is the descriptor setup / busdma memory intialisation and + * teardown routines. + */ + +static void +ath_load_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +{ + bus_addr_t *paddr = (bus_addr_t*) arg; + KASSERT(error == 0, ("error %u on bus_dma callback", error)); + *paddr = segs->ds_addr; +} + +/* + * Allocate the descriptors and appropriate DMA tag/setup. + * + * For some situations (eg EDMA TX completion), there isn't a requirement + * for the ath_buf entries to be allocated. + */ +int +ath_descdma_alloc_desc(struct ath_softc *sc, + struct ath_descdma *dd, ath_bufhead *head, + const char *name, int ds_size, int ndesc) +{ +#define DS2PHYS(_dd, _ds) \ + ((_dd)->dd_desc_paddr + ((caddr_t)(_ds) - (caddr_t)(_dd)->dd_desc)) +#define ATH_DESC_4KB_BOUND_CHECK(_daddr, _len) \ + ((((u_int32_t)(_daddr) & 0xFFF) > (0x1000 - (_len))) ? 1 : 0) + int error; + + dd->dd_descsize = ds_size; + + DPRINTF(sc, ATH_DEBUG_RESET, + "%s: %s DMA: %u desc, %d bytes per descriptor\n", + __func__, name, ndesc, dd->dd_descsize); + + dd->dd_name = name; + dd->dd_desc_len = dd->dd_descsize * ndesc; + + /* + * Merlin work-around: + * Descriptors that cross the 4KB boundary can't be used. + * Assume one skipped descriptor per 4KB page. + */ + if (! ath_hal_split4ktrans(sc->sc_ah)) { + int numpages = dd->dd_desc_len / 4096; + dd->dd_desc_len += ds_size * numpages; + } + + /* + * Setup DMA descriptor area. + * + * BUS_DMA_ALLOCNOW is not used; we never use bounce + * buffers for the descriptors themselves. + */ + error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), /* parent */ + PAGE_SIZE, 0, /* alignment, bounds */ + BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + dd->dd_desc_len, /* maxsize */ + 1, /* nsegments */ + dd->dd_desc_len, /* maxsegsize */ + 0, /* flags */ + NULL, /* lockfunc */ + NULL, /* lockarg */ + &dd->dd_dmat); + if (error != 0) { + device_printf(sc->sc_dev, + "cannot allocate %s DMA tag\n", dd->dd_name); + return error; + } + + /* allocate descriptors */ + error = bus_dmamem_alloc(dd->dd_dmat, (void**) &dd->dd_desc, + BUS_DMA_NOWAIT | BUS_DMA_COHERENT, + &dd->dd_dmamap); + if (error != 0) { + device_printf(sc->sc_dev, + "unable to alloc memory for %u %s descriptors, error %u\n", + ndesc, dd->dd_name, error); + goto fail1; + } + + error = bus_dmamap_load(dd->dd_dmat, dd->dd_dmamap, + dd->dd_desc, dd->dd_desc_len, + ath_load_cb, &dd->dd_desc_paddr, + BUS_DMA_NOWAIT); + if (error != 0) { + device_printf(sc->sc_dev, + "unable to map %s descriptors, error %u\n", + dd->dd_name, error); + goto fail2; + } + + DPRINTF(sc, ATH_DEBUG_RESET, "%s: %s DMA map: %p (%lu) -> %p (%lu)\n", + __func__, dd->dd_name, (uint8_t *) dd->dd_desc, + (u_long) dd->dd_desc_len, (caddr_t) dd->dd_desc_paddr, + /*XXX*/ (u_long) dd->dd_desc_len); + + return (0); + +fail2: + bus_dmamem_free(dd->dd_dmat, dd->dd_desc, dd->dd_dmamap); +fail1: + bus_dma_tag_destroy(dd->dd_dmat); + memset(dd, 0, sizeof(*dd)); + return error; +#undef DS2PHYS +#undef ATH_DESC_4KB_BOUND_CHECK +} + +int +ath_descdma_setup(struct ath_softc *sc, + struct ath_descdma *dd, ath_bufhead *head, + const char *name, int ds_size, int nbuf, int ndesc) +{ +#define DS2PHYS(_dd, _ds) \ + ((_dd)->dd_desc_paddr + ((caddr_t)(_ds) - (caddr_t)(_dd)->dd_desc)) +#define ATH_DESC_4KB_BOUND_CHECK(_daddr, _len) \ + ((((u_int32_t)(_daddr) & 0xFFF) > (0x1000 - (_len))) ? 1 : 0) + uint8_t *ds; + struct ath_buf *bf; + int i, bsize, error; + + /* Allocate descriptors */ + error = ath_descdma_alloc_desc(sc, dd, head, name, ds_size, + nbuf * ndesc); + + /* Assume any errors during allocation were dealt with */ + if (error != 0) { + return (error); + } + + ds = (uint8_t *) dd->dd_desc; + + /* allocate rx buffers */ + bsize = sizeof(struct ath_buf) * nbuf; + bf = malloc(bsize, M_ATHDEV, M_NOWAIT | M_ZERO); + if (bf == NULL) { + device_printf(sc->sc_dev, + "malloc of %s buffers failed, size %u\n", + dd->dd_name, bsize); + goto fail3; + } + dd->dd_bufptr = bf; + + TAILQ_INIT(head); + for (i = 0; i < nbuf; i++, bf++, ds += (ndesc * dd->dd_descsize)) { + bf->bf_desc = (struct ath_desc *) ds; + bf->bf_daddr = DS2PHYS(dd, ds); + if (! ath_hal_split4ktrans(sc->sc_ah)) { + /* + * Merlin WAR: Skip descriptor addresses which + * cause 4KB boundary crossing along any point + * in the descriptor. + */ + if (ATH_DESC_4KB_BOUND_CHECK(bf->bf_daddr, + dd->dd_descsize)) { + /* Start at the next page */ + ds += 0x1000 - (bf->bf_daddr & 0xFFF); + bf->bf_desc = (struct ath_desc *) ds; + bf->bf_daddr = DS2PHYS(dd, ds); + } + } + error = bus_dmamap_create(sc->sc_dmat, BUS_DMA_NOWAIT, + &bf->bf_dmamap); + if (error != 0) { + device_printf(sc->sc_dev, "unable to create dmamap " + "for %s buffer %u, error %u\n", + dd->dd_name, i, error); + ath_descdma_cleanup(sc, dd, head); + return error; + } + bf->bf_lastds = bf->bf_desc; /* Just an initial value */ + TAILQ_INSERT_TAIL(head, bf, bf_list); + } + + /* + * XXX TODO: ensure that ds doesn't overflow the descriptor + * allocation otherwise weird stuff will occur and crash your + * machine. + */ + return 0; + /* XXX this should likely just call ath_descdma_cleanup() */ +fail3: + bus_dmamap_unload(dd->dd_dmat, dd->dd_dmamap); + bus_dmamem_free(dd->dd_dmat, dd->dd_desc, dd->dd_dmamap); + bus_dma_tag_destroy(dd->dd_dmat); + memset(dd, 0, sizeof(*dd)); + return error; +#undef DS2PHYS +#undef ATH_DESC_4KB_BOUND_CHECK +} + +/* + * Allocate ath_buf entries but no descriptor contents. + * + * This is for RX EDMA where the descriptors are the header part of + * the RX buffer. + */ +int +ath_descdma_setup_rx_edma(struct ath_softc *sc, + struct ath_descdma *dd, ath_bufhead *head, + const char *name, int nbuf, int rx_status_len) +{ + struct ath_buf *bf; + int i, bsize, error; + + DPRINTF(sc, ATH_DEBUG_RESET, "%s: %s DMA: %u buffers\n", + __func__, name, nbuf); + + dd->dd_name = name; + /* + * This is (mostly) purely for show. We're not allocating any actual + * descriptors here as EDMA RX has the descriptor be part + * of the RX buffer. + * + * However, dd_desc_len is used by ath_descdma_free() to determine + * whether we have already freed this DMA mapping. + */ + dd->dd_desc_len = rx_status_len * nbuf; + dd->dd_descsize = rx_status_len; + + /* allocate rx buffers */ + bsize = sizeof(struct ath_buf) * nbuf; + bf = malloc(bsize, M_ATHDEV, M_NOWAIT | M_ZERO); + if (bf == NULL) { + device_printf(sc->sc_dev, + "malloc of %s buffers failed, size %u\n", + dd->dd_name, bsize); + error = ENOMEM; + goto fail3; + } + dd->dd_bufptr = bf; + + TAILQ_INIT(head); + for (i = 0; i < nbuf; i++, bf++) { + bf->bf_desc = NULL; + bf->bf_daddr = 0; + bf->bf_lastds = NULL; /* Just an initial value */ + + error = bus_dmamap_create(sc->sc_dmat, BUS_DMA_NOWAIT, + &bf->bf_dmamap); + if (error != 0) { + device_printf(sc->sc_dev, "unable to create dmamap " + "for %s buffer %u, error %u\n", + dd->dd_name, i, error); + ath_descdma_cleanup(sc, dd, head); + return error; + } + TAILQ_INSERT_TAIL(head, bf, bf_list); + } + return 0; +fail3: + memset(dd, 0, sizeof(*dd)); + return error; +} + +void +ath_descdma_cleanup(struct ath_softc *sc, + struct ath_descdma *dd, ath_bufhead *head) +{ + struct ath_buf *bf; + struct ieee80211_node *ni; + int do_warning = 0; + + if (dd->dd_dmamap != 0) { + bus_dmamap_unload(dd->dd_dmat, dd->dd_dmamap); + bus_dmamem_free(dd->dd_dmat, dd->dd_desc, dd->dd_dmamap); + bus_dma_tag_destroy(dd->dd_dmat); + } + + if (head != NULL) { + TAILQ_FOREACH(bf, head, bf_list) { + if (bf->bf_m) { + /* + * XXX warn if there's buffers here. + * XXX it should have been freed by the + * owner! + */ + + if (do_warning == 0) { + do_warning = 1; + device_printf(sc->sc_dev, + "%s: %s: mbuf should've been" + " unmapped/freed!\n", + __func__, + dd->dd_name); + } + bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, + BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); + m_freem(bf->bf_m); + bf->bf_m = NULL; + } + if (bf->bf_dmamap != NULL) { + bus_dmamap_destroy(sc->sc_dmat, bf->bf_dmamap); + bf->bf_dmamap = NULL; + } + ni = bf->bf_node; + bf->bf_node = NULL; + if (ni != NULL) { + /* + * Reclaim node reference. + */ + ieee80211_free_node(ni); + } + } + } + + if (head != NULL) + TAILQ_INIT(head); + + if (dd->dd_bufptr != NULL) + free(dd->dd_bufptr, M_ATHDEV); + memset(dd, 0, sizeof(*dd)); +} Added: head/sys/dev/ath/if_ath_descdma.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/if_ath_descdma.h Tue Nov 24 03:42:58 2015 (r291233) @@ -0,0 +1,46 @@ +/*- + * Copyright (c) 2015 Adrian Chadd + * All rights reserved. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Nov 24 04:15:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A608FA35AA8; Tue, 24 Nov 2015 04:15:14 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AB2F1B09; Tue, 24 Nov 2015 04:15:14 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAO4FDVk045441; Tue, 24 Nov 2015 04:15:13 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAO4FDmq045440; Tue, 24 Nov 2015 04:15:13 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201511240415.tAO4FDmq045440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 24 Nov 2015 04:15:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291234 - head/usr.bin/bc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 04:15:14 -0000 Author: pfg Date: Tue Nov 24 04:15:13 2015 New Revision: 291234 URL: https://svnweb.freebsd.org/changeset/base/291234 Log: bc(1): Fix memory corruption issues Fix crashes and hangs found by AFL. Improve handling of non-ascii chars. Obtained from: OpenBSD (CVS rev 1.49) Modified: head/usr.bin/bc/bc.y Modified: head/usr.bin/bc/bc.y ============================================================================== --- head/usr.bin/bc/bc.y Tue Nov 24 03:42:58 2015 (r291233) +++ head/usr.bin/bc/bc.y Tue Nov 24 04:15:13 2015 (r291234) @@ -80,7 +80,7 @@ static void grow(void); static ssize_t cs(const char *); static ssize_t as(const char *); static ssize_t node(ssize_t, ...); -static void emit(ssize_t); +static void emit(ssize_t, int); static void emit_macro(int, ssize_t); static void free_tree(void); static ssize_t numnode(int); @@ -196,7 +196,7 @@ program : /* empty */ input_item : semicolon_list NEWLINE { - emit($1); + emit($1, 0); macro_char = reset_macro_char; putchar('\n'); free_tree(); @@ -826,13 +826,18 @@ node(ssize_t arg, ...) } static void -emit(ssize_t i) +emit(ssize_t i, int level) { - if (instructions[i].index >= 0) - while (instructions[i].index != END_NODE) - emit(instructions[i++].index); - else + if (level > 1000) + errx(1, "internal error: tree level > 1000"); + if (instructions[i].index >= 0) { + while (instructions[i].index != END_NODE && + instructions[i].index != i) { + emit(instructions[i].index, level + 1); + i++; + } + } else if (instructions[i].index != END_NODE) fputs(instructions[i].u.cstr, stdout); } @@ -841,7 +846,7 @@ emit_macro(int nodeidx, ssize_t code) { putchar('['); - emit(code); + emit(code, 0); printf("]s%s\n", instructions[nodeidx].u.cstr); nesting--; } @@ -978,7 +983,7 @@ yyerror(const char *s) !isprint((unsigned char)yytext[0])) n = asprintf(&str, "%s: %s:%d: %s: ascii char 0x%02x unexpected", - __progname, filename, lineno, s, yytext[0]); + __progname, filename, lineno, s, yytext[0] & 0xff); else n = asprintf(&str, "%s: %s:%d: %s: %s unexpected", __progname, filename, lineno, s, yytext); From owner-svn-src-all@freebsd.org Tue Nov 24 04:19:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6001AA35B56; Tue, 24 Nov 2015 04:19:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34F5C1CC2; Tue, 24 Nov 2015 04:19:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAO4JvYq045628; Tue, 24 Nov 2015 04:19:57 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAO4JuBs045614; Tue, 24 Nov 2015 04:19:56 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511240419.tAO4JuBs045614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 24 Nov 2015 04:19:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291235 - in head: bin/rmail contrib/sendmail/include/sm lib/libmilter lib/libsm lib/libsmdb lib/libsmutil libexec/mail.local libexec/smrsh usr.bin/vacation usr.sbin/editmap usr.sbin/ma... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 04:19:58 -0000 Author: bdrewery Date: Tue Nov 24 04:19:55 2015 New Revision: 291235 URL: https://svnweb.freebsd.org/changeset/base/291235 Log: Remove unneeded libutil dependency for sendmail. It included libutil.h for setproctitle(3), which was moved from libutil to libc in r65353 in 2000. Reviewed by: gshapiro [sendmail change] Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D4261 Modified: head/bin/rmail/Makefile.depend head/contrib/sendmail/include/sm/conf.h head/lib/libmilter/Makefile.depend head/lib/libsm/Makefile.depend head/lib/libsmdb/Makefile.depend head/lib/libsmutil/Makefile.depend head/libexec/mail.local/Makefile.depend head/libexec/smrsh/Makefile.depend head/usr.bin/vacation/Makefile.depend head/usr.sbin/editmap/Makefile.depend head/usr.sbin/mailstats/Makefile.depend head/usr.sbin/makemap/Makefile.depend head/usr.sbin/praliases/Makefile.depend Modified: head/bin/rmail/Makefile.depend ============================================================================== --- head/bin/rmail/Makefile.depend Tue Nov 24 04:15:13 2015 (r291234) +++ head/bin/rmail/Makefile.depend Tue Nov 24 04:19:55 2015 (r291235) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libsm \ - lib/libutil \ .include Modified: head/contrib/sendmail/include/sm/conf.h ============================================================================== --- head/contrib/sendmail/include/sm/conf.h Tue Nov 24 04:15:13 2015 (r291234) +++ head/contrib/sendmail/include/sm/conf.h Tue Nov 24 04:19:55 2015 (r291235) @@ -1019,7 +1019,9 @@ extern unsigned int sleepX __P((unsigned # if __FreeBSD__ >= 2 # include # if __FreeBSD_version >= 199512 /* 2.2-current when it appeared */ +# if __FreeBSD_version < 500012 # include +# endif # define SPT_TYPE SPT_BUILTIN # endif /* __FreeBSD_version >= 199512 */ # if __FreeBSD_version >= 222000 /* 2.2.2-release and later */ Modified: head/lib/libmilter/Makefile.depend ============================================================================== --- head/lib/libmilter/Makefile.depend Tue Nov 24 04:15:13 2015 (r291234) +++ head/lib/libmilter/Makefile.depend Tue Nov 24 04:19:55 2015 (r291235) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - lib/libutil \ usr.bin/xinstall.host \ Modified: head/lib/libsm/Makefile.depend ============================================================================== --- head/lib/libsm/Makefile.depend Tue Nov 24 04:15:13 2015 (r291234) +++ head/lib/libsm/Makefile.depend Tue Nov 24 04:19:55 2015 (r291235) @@ -4,7 +4,6 @@ DIRDEPS = \ include \ include/xlocale \ - lib/libutil \ .include Modified: head/lib/libsmdb/Makefile.depend ============================================================================== --- head/lib/libsmdb/Makefile.depend Tue Nov 24 04:15:13 2015 (r291234) +++ head/lib/libsmdb/Makefile.depend Tue Nov 24 04:19:55 2015 (r291235) @@ -4,7 +4,6 @@ DIRDEPS = \ include \ include/xlocale \ - lib/libutil \ .include Modified: head/lib/libsmutil/Makefile.depend ============================================================================== --- head/lib/libsmutil/Makefile.depend Tue Nov 24 04:15:13 2015 (r291234) +++ head/lib/libsmutil/Makefile.depend Tue Nov 24 04:19:55 2015 (r291235) @@ -5,7 +5,6 @@ DIRDEPS = \ include \ include/arpa \ include/xlocale \ - lib/libutil \ .include Modified: head/libexec/mail.local/Makefile.depend ============================================================================== --- head/libexec/mail.local/Makefile.depend Tue Nov 24 04:15:13 2015 (r291234) +++ head/libexec/mail.local/Makefile.depend Tue Nov 24 04:19:55 2015 (r291235) @@ -11,7 +11,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libsm \ - lib/libutil \ .include Modified: head/libexec/smrsh/Makefile.depend ============================================================================== --- head/libexec/smrsh/Makefile.depend Tue Nov 24 04:15:13 2015 (r291234) +++ head/libexec/smrsh/Makefile.depend Tue Nov 24 04:19:55 2015 (r291235) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libsm \ - lib/libutil \ .include Modified: head/usr.bin/vacation/Makefile.depend ============================================================================== --- head/usr.bin/vacation/Makefile.depend Tue Nov 24 04:15:13 2015 (r291234) +++ head/usr.bin/vacation/Makefile.depend Tue Nov 24 04:19:55 2015 (r291235) @@ -12,7 +12,6 @@ DIRDEPS = \ lib/libsm \ lib/libsmdb \ lib/libsmutil \ - lib/libutil \ .include Modified: head/usr.sbin/editmap/Makefile.depend ============================================================================== --- head/usr.sbin/editmap/Makefile.depend Tue Nov 24 04:15:13 2015 (r291234) +++ head/usr.sbin/editmap/Makefile.depend Tue Nov 24 04:19:55 2015 (r291235) @@ -12,7 +12,6 @@ DIRDEPS = \ lib/libsm \ lib/libsmdb \ lib/libsmutil \ - lib/libutil \ .include Modified: head/usr.sbin/mailstats/Makefile.depend ============================================================================== --- head/usr.sbin/mailstats/Makefile.depend Tue Nov 24 04:15:13 2015 (r291234) +++ head/usr.sbin/mailstats/Makefile.depend Tue Nov 24 04:19:55 2015 (r291235) @@ -11,7 +11,6 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libsm \ lib/libsmutil \ - lib/libutil \ .include Modified: head/usr.sbin/makemap/Makefile.depend ============================================================================== --- head/usr.sbin/makemap/Makefile.depend Tue Nov 24 04:15:13 2015 (r291234) +++ head/usr.sbin/makemap/Makefile.depend Tue Nov 24 04:19:55 2015 (r291235) @@ -12,7 +12,6 @@ DIRDEPS = \ lib/libsm \ lib/libsmdb \ lib/libsmutil \ - lib/libutil \ .include Modified: head/usr.sbin/praliases/Makefile.depend ============================================================================== --- head/usr.sbin/praliases/Makefile.depend Tue Nov 24 04:15:13 2015 (r291234) +++ head/usr.sbin/praliases/Makefile.depend Tue Nov 24 04:19:55 2015 (r291235) @@ -12,7 +12,6 @@ DIRDEPS = \ lib/libsm \ lib/libsmdb \ lib/libsmutil \ - lib/libutil \ .include From owner-svn-src-all@freebsd.org Tue Nov 24 08:34:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1A59A363E4; Tue, 24 Nov 2015 08:34:50 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 957531F4D; Tue, 24 Nov 2015 08:34:50 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAO8YnWI020682; Tue, 24 Nov 2015 08:34:49 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAO8Ymqd020667; Tue, 24 Nov 2015 08:34:48 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201511240834.tAO8Ymqd020667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Tue, 24 Nov 2015 08:34:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291238 - in head: share/man/man4 sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 08:34:51 -0000 Author: kevlo Date: Tue Nov 24 08:34:48 2015 New Revision: 291238 URL: https://svnweb.freebsd.org/changeset/base/291238 Log: Add dependency to uether. Reviewed by: hselasky Modified: head/share/man/man4/aue.4 head/share/man/man4/axe.4 head/share/man/man4/axge.4 head/share/man/man4/cdce.4 head/share/man/man4/cue.4 head/share/man/man4/ipheth.4 head/share/man/man4/kue.4 head/share/man/man4/mos.4 head/share/man/man4/rue.4 head/share/man/man4/smsc.4 head/share/man/man4/udav.4 head/share/man/man4/urndis.4 head/sys/conf/NOTES head/sys/conf/files Modified: head/share/man/man4/aue.4 ============================================================================== --- head/share/man/man4/aue.4 Tue Nov 24 07:55:55 2015 (r291237) +++ head/share/man/man4/aue.4 Tue Nov 24 08:34:48 2015 (r291238) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 7, 2006 +.Dd November 24, 2015 .Dt AUE 4 .Os .Sh NAME @@ -45,6 +45,7 @@ kernel configuration file: .Cd "device ohci" .Cd "device usb" .Cd "device miibus" +.Cd "device uether" .Cd "device aue" .Ed .Pp Modified: head/share/man/man4/axe.4 ============================================================================== --- head/share/man/man4/axe.4 Tue Nov 24 07:55:55 2015 (r291237) +++ head/share/man/man4/axe.4 Tue Nov 24 08:34:48 2015 (r291238) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 25, 2013 +.Dd November 24, 2015 .Dt AXE 4 .Os .Sh NAME @@ -46,6 +46,7 @@ kernel configuration file: .Cd "device ohci" .Cd "device usb" .Cd "device miibus" +.Cd "device uether" .Cd "device axe" .Ed .Pp Modified: head/share/man/man4/axge.4 ============================================================================== --- head/share/man/man4/axge.4 Tue Nov 24 07:55:55 2015 (r291237) +++ head/share/man/man4/axge.4 Tue Nov 24 08:34:48 2015 (r291238) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2013 +.Dd November 24, 2015 .Dt AXGE 4 .Os .Sh NAME @@ -47,6 +47,7 @@ kernel configuration file: .Cd "device ohci" .Cd "device usb" .Cd "device miibus" +.Cd "device uether" .Cd "device axge" .Ed .Pp Modified: head/share/man/man4/cdce.4 ============================================================================== --- head/share/man/man4/cdce.4 Tue Nov 24 07:55:55 2015 (r291237) +++ head/share/man/man4/cdce.4 Tue Nov 24 08:34:48 2015 (r291238) @@ -28,7 +28,7 @@ .\" $NetBSD: cdce.4,v 1.4 2004/12/08 18:35:56 peter Exp $ .\" $FreeBSD$ .\" -.Dd September 25, 2014 +.Dd November 24, 2015 .Dt CDCE 4 .Os .Sh NAME @@ -42,6 +42,8 @@ kernel configuration file: .Cd "device uhci" .Cd "device ohci" .Cd "device usb" +.Cd "device miibus" +.Cd "device uether" .Cd "device cdce" .Ed .Pp Modified: head/share/man/man4/cue.4 ============================================================================== --- head/share/man/man4/cue.4 Tue Nov 24 07:55:55 2015 (r291237) +++ head/share/man/man4/cue.4 Tue Nov 24 08:34:48 2015 (r291238) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd November 24, 2015 .Dt CUE 4 .Os .Sh NAME @@ -44,6 +44,8 @@ kernel configuration file: .Cd "device uhci" .Cd "device ohci" .Cd "device usb" +.Cd "device miibus" +.Cd "device uether" .Cd "device cue" .Ed .Pp Modified: head/share/man/man4/ipheth.4 ============================================================================== --- head/share/man/man4/ipheth.4 Tue Nov 24 07:55:55 2015 (r291237) +++ head/share/man/man4/ipheth.4 Tue Nov 24 08:34:48 2015 (r291238) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 30, 2014 +.Dd November 24, 2015 .Dt IPHETH 4 .Os .Sh NAME @@ -47,6 +47,8 @@ following lines in your kernel configura .Cd "device uhci" .Cd "device ohci" .Cd "device usb" +.Cd "device miibus" +.Cd "device uether" .Cd "device ipheth" .Ed .Sh DESCRIPTION Modified: head/share/man/man4/kue.4 ============================================================================== --- head/share/man/man4/kue.4 Tue Nov 24 07:55:55 2015 (r291237) +++ head/share/man/man4/kue.4 Tue Nov 24 08:34:48 2015 (r291238) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 7, 2006 +.Dd November 24, 2015 .Dt KUE 4 .Os .Sh NAME @@ -44,6 +44,8 @@ kernel configuration file: .Cd "device uhci" .Cd "device ohci" .Cd "device usb" +.Cd "device miibus" +.Cd "device uether" .Cd "device kue" .Ed .Pp Modified: head/share/man/man4/mos.4 ============================================================================== --- head/share/man/man4/mos.4 Tue Nov 24 07:55:55 2015 (r291237) +++ head/share/man/man4/mos.4 Tue Nov 24 08:34:48 2015 (r291238) @@ -15,7 +15,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 14, 2011 +.Dd November 24, 2015 .Dt MOS 4 .Os .Sh NAME @@ -31,6 +31,7 @@ kernel configuration file: .Cd "device ehci" .Cd "device usb" .Cd "device miibus" +.Cd "device uether" .Cd "device mos" .Ed .Pp Modified: head/share/man/man4/rue.4 ============================================================================== --- head/share/man/man4/rue.4 Tue Nov 24 07:55:55 2015 (r291237) +++ head/share/man/man4/rue.4 Tue Nov 24 08:34:48 2015 (r291238) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 23, 2011 +.Dd November 24, 2015 .Dt RUE 4 .Os .Sh NAME @@ -40,6 +40,7 @@ kernel configuration file: .Cd "device ohci" .Cd "device usb" .Cd "device miibus" +.Cd "device uether" .Cd "device rue" .Ed .Pp Modified: head/share/man/man4/smsc.4 ============================================================================== --- head/share/man/man4/smsc.4 Tue Nov 24 07:55:55 2015 (r291237) +++ head/share/man/man4/smsc.4 Tue Nov 24 08:34:48 2015 (r291238) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 26, 2014 +.Dd November 24, 2015 .Dt SMSC 4 .Os .Sh NAME @@ -48,6 +48,7 @@ following lines in your kernel configura .Cd "device ohci" .Cd "device usb" .Cd "device miibus" +.Cd "device uether" .Cd "device smsc" .Ed .Sh DESCRIPTION Modified: head/share/man/man4/udav.4 ============================================================================== --- head/share/man/man4/udav.4 Tue Nov 24 07:55:55 2015 (r291237) +++ head/share/man/man4/udav.4 Tue Nov 24 08:34:48 2015 (r291238) @@ -32,7 +32,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd November 24, 2015 .Dt UDAV 4 .Os .Sh NAME @@ -48,6 +48,7 @@ kernel configuration file: .Cd "device ohci" .Cd "device usb" .Cd "device miibus" +.Cd "device uether" .Cd "device udav" .Ed .Pp Modified: head/share/man/man4/urndis.4 ============================================================================== --- head/share/man/man4/urndis.4 Tue Nov 24 07:55:55 2015 (r291237) +++ head/share/man/man4/urndis.4 Tue Nov 24 08:34:48 2015 (r291238) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 2, 2014 +.Dd November 24, 2015 .Dt URNDIS 4 .Os .Sh NAME @@ -45,6 +45,8 @@ kernel configuration file: .Cd "device ohci" .Cd "device xhci" .Cd "device usb" +.Cd "device miibus" +.Cd "device uether" .Cd "device urndis" .Ed .Pp Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Nov 24 07:55:55 2015 (r291237) +++ head/sys/conf/NOTES Tue Nov 24 08:34:48 2015 (r291238) @@ -2702,6 +2702,8 @@ device uvisor # USB serial support for DDI pocket's PHS device uvscom # +# USB ethernet support +device uether # ADMtek USB ethernet. Supports the LinkSys USB100TX, # the Billionton USB100, the Melco LU-ATX, the D-Link DSB-650TX # and the SMC 2202USB. Also works with the ADMtek AN986 Pegasus Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Nov 24 07:55:55 2015 (r291237) +++ head/sys/conf/files Tue Nov 24 08:34:48 2015 (r291238) @@ -2615,9 +2615,9 @@ dev/usb/net/if_udav.c optional udav dev/usb/net/if_usie.c optional usie dev/usb/net/if_urndis.c optional urndis dev/usb/net/ruephy.c optional rue -dev/usb/net/usb_ethernet.c optional aue | axe | axge | cdce | cue | kue | \ - mos | rue | smsc | udav | ipheth | \ - urndis +dev/usb/net/usb_ethernet.c optional uether | aue | axe | axge | cdce | \ + cue | ipheth | kue | mos | rue | \ + smsc | udav | urndis dev/usb/net/uhso.c optional uhso # # USB WLAN drivers From owner-svn-src-all@freebsd.org Tue Nov 24 08:41:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60737A36605; Tue, 24 Nov 2015 08:41:29 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3660E1251; Tue, 24 Nov 2015 08:41:29 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAO8fS9d022581; Tue, 24 Nov 2015 08:41:28 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAO8fRbl021905; Tue, 24 Nov 2015 08:41:27 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201511240841.tAO8fRbl021905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Tue, 24 Nov 2015 08: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: r291239 - in stable/10/sys: dev/xen/blkfront dev/xen/netfront x86/xen 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 08:41:29 -0000 Author: royger Date: Tue Nov 24 08:41:27 2015 New Revision: 291239 URL: https://svnweb.freebsd.org/changeset/base/291239 Log: MFC r286999: xen: allow disabling PV disks and nics Sponsored by: Citrix Systems R&D Modified: stable/10/sys/dev/xen/blkfront/blkfront.c stable/10/sys/dev/xen/netfront/netfront.c stable/10/sys/x86/xen/hvm.c stable/10/sys/xen/xen-os.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- stable/10/sys/dev/xen/blkfront/blkfront.c Tue Nov 24 08:34:48 2015 (r291238) +++ stable/10/sys/dev/xen/blkfront/blkfront.c Tue Nov 24 08:41:27 2015 (r291239) @@ -1367,6 +1367,11 @@ xbd_probe(device_t dev) if (strcmp(xenbus_get_type(dev), "vbd") != 0) return (ENXIO); +#ifdef XENHVM + if (xen_disable_pv_disks != 0) + return (ENXIO); +#endif + if (xen_hvm_domain()) { int error; char *type; Modified: stable/10/sys/dev/xen/netfront/netfront.c ============================================================================== --- stable/10/sys/dev/xen/netfront/netfront.c Tue Nov 24 08:34:48 2015 (r291238) +++ stable/10/sys/dev/xen/netfront/netfront.c Tue Nov 24 08:41:27 2015 (r291239) @@ -451,6 +451,11 @@ static int netfront_probe(device_t dev) { +#ifdef XENHVM + if (xen_disable_pv_nics != 0) + return (ENXIO); +#endif + if (!strcmp(xenbus_get_type(dev), "vif")) { device_set_desc(dev, "Virtual Network Interface"); return (0); Modified: stable/10/sys/x86/xen/hvm.c ============================================================================== --- stable/10/sys/x86/xen/hvm.c Tue Nov 24 08:34:48 2015 (r291238) +++ stable/10/sys/x86/xen/hvm.c Tue Nov 24 08:41:27 2015 (r291239) @@ -152,6 +152,13 @@ DPCPU_DEFINE(xen_intr_handle_t, ipi_hand char *hypercall_stubs; shared_info_t *HYPERVISOR_shared_info; + +/*------------------------------ Sysctl tunables -----------------------------*/ +int xen_disable_pv_disks = 0; +int xen_disable_pv_nics = 0; +TUNABLE_INT("hw.xen.disable_pv_disks", &xen_disable_pv_disks); +TUNABLE_INT("hw.xen.disable_pv_nics", &xen_disable_pv_nics); + #ifdef SMP /*---------------------------- XEN PV IPI Handlers ---------------------------*/ /* @@ -303,7 +310,7 @@ xen_ipi_vectored(u_int vector, int dest) } } -/* XEN diverged cpu operations */ +/*---------------------- XEN diverged cpu operations -------------------------*/ static void xen_hvm_cpu_resume(void) { @@ -503,12 +510,24 @@ enum { static void xen_hvm_disable_emulated_devices(void) { + u_short disable_devs = 0; + if (inw(XEN_MAGIC_IOPORT) != XMI_MAGIC) return; - if (bootverbose) - printf("XEN: Disabling emulated block and network devices\n"); - outw(XEN_MAGIC_IOPORT, XMI_UNPLUG_IDE_DISKS|XMI_UNPLUG_NICS); + if (xen_disable_pv_disks == 0) { + if (bootverbose) + printf("XEN: disabling emulated disks\n"); + disable_devs |= XMI_UNPLUG_IDE_DISKS; + } + if (xen_disable_pv_nics == 0) { + if (bootverbose) + printf("XEN: disabling emulated nics\n"); + disable_devs |= XMI_UNPLUG_NICS; + } + + if (disable_devs != 0) + outw(XEN_MAGIC_IOPORT, disable_devs); } static void Modified: stable/10/sys/xen/xen-os.h ============================================================================== --- stable/10/sys/xen/xen-os.h Tue Nov 24 08:34:48 2015 (r291238) +++ stable/10/sys/xen/xen-os.h Tue Nov 24 08:41:27 2015 (r291239) @@ -52,6 +52,11 @@ void force_evtchn_callback(void); extern shared_info_t *HYPERVISOR_shared_info; +#ifdef XENHVM +extern int xen_disable_pv_disks; +extern int xen_disable_pv_nics; +#endif + enum xen_domain_type { XEN_NATIVE, /* running on bare hardware */ XEN_PV_DOMAIN, /* running in a PV domain */ From owner-svn-src-all@freebsd.org Tue Nov 24 08:56:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4CFFA36791; Tue, 24 Nov 2015 08:56:21 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id ADA3919F8; Tue, 24 Nov 2015 08:56:21 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id E9052D97E; Tue, 24 Nov 2015 08:56:20 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id 9E1F747556; Tue, 24 Nov 2015 09:56:16 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Benjamin Kaduk Cc: "src-committers\@freebsd.org" , "svn-src-all\@freebsd.org" , "svn-src-head\@freebsd.org" Subject: Re: svn commit: r291197 - head/lib/libc/stdio References: <201511231247.tANCl8BS062451@repo.freebsd.org> Date: Tue, 24 Nov 2015 09:56:16 +0100 In-Reply-To: (Benjamin Kaduk's message of "Mon, 23 Nov 2015 11:54:51 -0600") Message-ID: <86vb8r3he7.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 08:56:22 -0000 Benjamin Kaduk writes: > Hmm, I would have expected that the semicolon could go on the previous > line, as is normally the case for punctuation following macros. Is > this not the case here? You're right. I didn't notice because I was just looking for double quotes. Feel free to fix. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@freebsd.org Tue Nov 24 09:13:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BAE8A36DD7; Tue, 24 Nov 2015 09:13:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3FB21553; Tue, 24 Nov 2015 09:13:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAO9DL4s032186; Tue, 24 Nov 2015 09:13:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAO9DLUC032185; Tue, 24 Nov 2015 09:13:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511240913.tAO9DLUC032185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 24 Nov 2015 09:13:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291242 - head/sys/powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 09:13:23 -0000 Author: kib Date: Tue Nov 24 09:13:21 2015 New Revision: 291242 URL: https://svnweb.freebsd.org/changeset/base/291242 Log: On PowerPC 64bit, the linux-compat mb() definition is implemented with lwsync instruction, which does not provide Store/Load barrier. Fix this by using "full" sync barrier for mb(). atomic_store_rel() does not need full barrier, change mb() call there to the lwsync instruction if not hitting the known CPU erratas (i.e. on 32bit). Provide powerpc_lwsync() helper to isolate the lwsync/sync compile time selection, and use it in atomic_store_rel() and several other places which duplicate the code. Noted by: alc Reviewed and tested by: nwhitehorn Sponsored by: The FreeBSD Foundation Modified: head/sys/powerpc/include/atomic.h Modified: head/sys/powerpc/include/atomic.h ============================================================================== --- head/sys/powerpc/include/atomic.h Tue Nov 24 09:08:31 2015 (r291241) +++ head/sys/powerpc/include/atomic.h Tue Nov 24 09:13:21 2015 (r291242) @@ -48,7 +48,7 @@ */ #ifdef __powerpc64__ -#define mb() __asm __volatile("lwsync" : : : "memory") +#define mb() __asm __volatile("sync" : : : "memory") #define rmb() __asm __volatile("lwsync" : : : "memory") #define wmb() __asm __volatile("lwsync" : : : "memory") #define __ATOMIC_REL() __asm __volatile("lwsync" : : : "memory") @@ -61,6 +61,17 @@ #define __ATOMIC_ACQ() __asm __volatile("isync" : : : "memory") #endif +static __inline void +powerpc_lwsync(void) +{ + +#ifdef __powerpc64__ + __asm __volatile("lwsync" : : : "memory"); +#else + __asm __volatile("sync" : : : "memory"); +#endif +} + /* * atomic_add(p, v) * { *p += v; } @@ -506,7 +517,8 @@ atomic_load_acq_##TYPE(volatile u_##TYPE static __inline void \ atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v) \ { \ - mb(); \ + \ + powerpc_lwsync(); \ *p = v; \ } @@ -734,34 +746,21 @@ static __inline void atomic_thread_fence_acq(void) { - /* See above comment about lwsync being broken on Book-E. */ -#ifdef __powerpc64__ - __asm __volatile("lwsync" : : : "memory"); -#else - __asm __volatile("sync" : : : "memory"); -#endif + powerpc_lwsync(); } static __inline void atomic_thread_fence_rel(void) { -#ifdef __powerpc64__ - __asm __volatile("lwsync" : : : "memory"); -#else - __asm __volatile("sync" : : : "memory"); -#endif + powerpc_lwsync(); } static __inline void atomic_thread_fence_acq_rel(void) { -#ifdef __powerpc64__ - __asm __volatile("lwsync" : : : "memory"); -#else - __asm __volatile("sync" : : : "memory"); -#endif + powerpc_lwsync(); } static __inline void From owner-svn-src-all@freebsd.org Tue Nov 24 09:17:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C27FA36ECB; Tue, 24 Nov 2015 09:17:52 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-qg0-x22a.google.com (mail-qg0-x22a.google.com [IPv6:2607:f8b0:400d:c04::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 06C431840; Tue, 24 Nov 2015 09:17:52 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by qgea14 with SMTP id a14so6266963qge.0; Tue, 24 Nov 2015 01:17:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=/MzzZVoCVvPU5WT4sL+qhQYSvZFThlCPqphdphqAcWQ=; b=K5XfDhK6gZWj07h7eP31shXDmVJaQVg9KdPS6W2R5L+oypHIC1vgYrMAfVu59B/SWs pUofNirrZ6/93BFW5NeUoy7ZlHpdEb8qqbDgOvGjWhlJyLz5ZnF/51KWcdo5JPin47mk 09gn5vpez0V0kTyvl+HGpM5aZ0rCwNTGh7nG4nxIRExj0z5X4Z2X/Couj88AgFNlISoE pX1Jc4LRpLoaD3fZ/XkU7feOg/SynX9+f59HWT8zx5UKB1IKwCyPdTFGsTO3DciMXVcx sYHSu+EW/pC5nYdRYfmuqeLsVNSp0AbKsmMfR2HvHq/4e1m4fMmPxFud5u82dhthWmAK S5BQ== X-Received: by 10.140.159.134 with SMTP id f128mr33415974qhf.72.1448356671018; Tue, 24 Nov 2015 01:17:51 -0800 (PST) Received: from mbp.home (179-125-129-84.desktop.com.br. [179.125.129.84]) by smtp.gmail.com with ESMTPSA id 79sm4046902qkv.23.2015.11.24.01.17.49 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Nov 2015 01:17:50 -0800 (PST) Sender: Renato Botelho Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Subject: Re: svn commit: r291239 - in stable/10/sys: dev/xen/blkfront dev/xen/netfront x86/xen xen From: Renato Botelho In-Reply-To: <201511240841.tAO8fRbl021905@repo.freebsd.org> Date: Tue, 24 Nov 2015 07:17:46 -0200 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <0DE43DB0-F3EB-4CD7-8637-1356E4DFD84C@FreeBSD.org> References: <201511240841.tAO8fRbl021905@repo.freebsd.org> To: =?utf-8?Q?Roger_Pau_Monn=C3=A9?= X-Mailer: Apple Mail (2.3096.5) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 09:17:52 -0000 > On Nov 24, 2015, at 06:41, Roger Pau Monn=C3=A9 = wrote: >=20 > Author: royger > Date: Tue Nov 24 08:41:27 2015 > New Revision: 291239 > URL: https://svnweb.freebsd.org/changeset/base/291239 >=20 > Log: > MFC r286999: >=20 > xen: allow disabling PV disks and nics >=20 > Sponsored by: Citrix Systems R&D Thanks! -- Renato Botelho From owner-svn-src-all@freebsd.org Tue Nov 24 09:21:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCE19A36F7D; Tue, 24 Nov 2015 09:21:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54F491BD3; Tue, 24 Nov 2015 09:21:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id tAO9LBvs069449 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 24 Nov 2015 11:21:11 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua tAO9LBvs069449 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id tAO9LBLx069448; Tue, 24 Nov 2015 11:21:11 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 24 Nov 2015 11:21:11 +0200 From: Konstantin Belousov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291242 - head/sys/powerpc/include Message-ID: <20151124092111.GF58629@kib.kiev.ua> References: <201511240913.tAO9DLUC032185@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201511240913.tAO9DLUC032185@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 09:21:17 -0000 On Tue, Nov 24, 2015 at 09:13:21AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Tue Nov 24 09:13:21 2015 > New Revision: 291242 > URL: https://svnweb.freebsd.org/changeset/base/291242 > > Log: > On PowerPC 64bit, the linux-compat mb() definition is implemented with > lwsync instruction, which does not provide Store/Load barrier. Fix > this by using "full" sync barrier for mb(). > > atomic_store_rel() does not need full barrier, change mb() call there > to the lwsync instruction if not hitting the known CPU erratas > (i.e. on 32bit). Provide powerpc_lwsync() helper to isolate the > lwsync/sync compile time selection, and use it in atomic_store_rel() > and several other places which duplicate the code. Note that powerpc/aim/slb.c issues mb() also intending to generate lwsync. This will be fixed to use powerpc_lwsync() in the separate commit. From owner-svn-src-all@freebsd.org Tue Nov 24 09:41:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 900E9A35643; Tue, 24 Nov 2015 09:41:51 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58A8B1885; Tue, 24 Nov 2015 09:41:51 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAO9fonB041051; Tue, 24 Nov 2015 09:41:50 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAO9fonq041050; Tue, 24 Nov 2015 09:41:50 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201511240941.tAO9fonq041050@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Tue, 24 Nov 2015 09:41:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291243 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 09:41:51 -0000 Author: smh Date: Tue Nov 24 09:41:50 2015 New Revision: 291243 URL: https://svnweb.freebsd.org/changeset/base/291243 Log: Belatedly bump __FreeBSD_version after r291215 Due to the change in args for g_dev_setdumpdev by r291215 belatedly bump __FreeBSD_version to allow any potential consumers to check for this, as requested by delphij. This is a direct commit to stable/10 Approved by: so (delphij) Sponsored by: Multiplay Modified: stable/10/sys/sys/param.h Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Tue Nov 24 09:13:21 2015 (r291242) +++ stable/10/sys/sys/param.h Tue Nov 24 09:41:50 2015 (r291243) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1002501 /* Master, propagated to newvers */ +#define __FreeBSD_version 1002502 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Tue Nov 24 09:45:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEA8BA356F4; Tue, 24 Nov 2015 09:45:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9A251AD9; Tue, 24 Nov 2015 09:45:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAO9ja5T041264; Tue, 24 Nov 2015 09:45:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAO9jaZm041263; Tue, 24 Nov 2015 09:45:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511240945.tAO9jaZm041263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 24 Nov 2015 09:45:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291244 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 09:45:38 -0000 Author: kib Date: Tue Nov 24 09:45:36 2015 New Revision: 291244 URL: https://svnweb.freebsd.org/changeset/base/291244 Log: Rework the vnode cache recycling to meet free and unused vnodes targets. See the comment above wantfreevnodes variable for the description of the algorithm. The vfs.vlru_alloc_cache_src sysctl is removed. New code frees namecache sources as the last chance to satisfy the highest watermark, instead of selecting the source vnodes randomly. This provides good enough behaviour to keep vn_fullpath() working in most situations. The filesystem layout with deep trees, where the removed knob was required, is thus handled automatically. Submitted by: bde Discussed with: mckusick Tested by: pho MFC after: 1 month Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Tue Nov 24 09:41:50 2015 (r291243) +++ head/sys/kern/vfs_subr.c Tue Nov 24 09:45:36 2015 (r291244) @@ -146,24 +146,38 @@ int vttoif_tab[10] = { static TAILQ_HEAD(freelst, vnode) vnode_free_list; /* - * Free vnode target. Free vnodes may simply be files which have been stat'd - * but not read. This is somewhat common, and a small cache of such files - * should be kept to avoid recreation costs. + * "Free" vnode target. Free vnodes are rarely completely free, but are + * just ones that are cheap to recycle. Usually they are for files which + * have been stat'd but not read; these usually have inode and namecache + * data attached to them. This target is the preferred minimum size of a + * sub-cache consisting mostly of such files. The system balances the size + * of this sub-cache with its complement to try to prevent either from + * thrashing while the other is relatively inactive. The targets express + * a preference for the best balance. + * + * "Above" this target there are 2 further targets (watermarks) related + * to recyling of free vnodes. In the best-operating case, the cache is + * exactly full, the free list has size between vlowat and vhiwat above the + * free target, and recycling from it and normal use maintains this state. + * Sometimes the free list is below vlowat or even empty, but this state + * is even better for immediate use provided the cache is not full. + * Otherwise, vnlru_proc() runs to reclaim enough vnodes (usually non-free + * ones) to reach one of these states. The watermarks are currently hard- + * coded as 4% and 9% of the available space higher. These and the default + * of 25% for wantfreevnodes are too large if the memory size is large. + * E.g., 9% of 75% of MAXVNODES is more than 566000 vnodes to reclaim + * whenever vnlru_proc() becomes active. */ static u_long wantfreevnodes; -SYSCTL_ULONG(_vfs, OID_AUTO, wantfreevnodes, CTLFLAG_RW, &wantfreevnodes, 0, ""); -/* Number of vnodes in the free list. */ +SYSCTL_ULONG(_vfs, OID_AUTO, wantfreevnodes, CTLFLAG_RW, + &wantfreevnodes, 0, "Target for minimum number of \"free\" vnodes"); static u_long freevnodes; -SYSCTL_ULONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, &freevnodes, 0, - "Number of vnodes in the free list"); - -static int vlru_allow_cache_src; -SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_cache_src, CTLFLAG_RW, - &vlru_allow_cache_src, 0, "Allow vlru to reclaim source vnode"); +SYSCTL_ULONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, + &freevnodes, 0, "Number of \"free\" vnodes"); static u_long recycles_count; SYSCTL_ULONG(_vfs, OID_AUTO, recycles, CTLFLAG_RD, &recycles_count, 0, - "Number of vnodes recycled to avoid exceding kern.maxvnodes"); + "Number of vnodes recycled to meet vnode cache targets"); /* * Various variables used for debugging the new implementation of @@ -267,14 +281,13 @@ static int syncer_worklist_len; static enum { SYNCER_RUNNING, SYNCER_SHUTTING_DOWN, SYNCER_FINAL_DELAY } syncer_state; -/* - * Number of vnodes we want to exist at any one time. This is mostly used - * to size hash tables in vnode-related code. It is normally not used in - * getnewvnode(), as wantfreevnodes is normally nonzero.) - * - * XXX desiredvnodes is historical cruft and should not exist. - */ +/* Target for maximum number of vnodes. */ int desiredvnodes; +static int gapvnodes; /* gap between wanted and desired */ +static int vhiwat; /* enough extras after expansion */ +static int vlowat; /* minimal extras before expansion */ +static int vstir; /* nonzero to stir non-free vnodes */ +static volatile int vsmalltrigger = 8; /* pref to keep if > this many pages */ static int sysctl_update_desiredvnodes(SYSCTL_HANDLER_ARGS) @@ -285,6 +298,8 @@ sysctl_update_desiredvnodes(SYSCTL_HANDL if ((error = sysctl_handle_int(oidp, arg1, arg2, req)) != 0) return (error); if (old_desiredvnodes != desiredvnodes) { + wantfreevnodes = desiredvnodes / 4; + /* XXX locking seems to be incomplete. */ vfs_hash_changesize(desiredvnodes); cache_changesize(desiredvnodes); } @@ -293,9 +308,9 @@ sysctl_update_desiredvnodes(SYSCTL_HANDL SYSCTL_PROC(_kern, KERN_MAXVNODES, maxvnodes, CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RW, &desiredvnodes, 0, - sysctl_update_desiredvnodes, "I", "Maximum number of vnodes"); + sysctl_update_desiredvnodes, "I", "Target for maximum number of vnodes"); SYSCTL_ULONG(_kern, OID_AUTO, minvnodes, CTLFLAG_RW, - &wantfreevnodes, 0, "Minimum number of vnodes (legacy)"); + &wantfreevnodes, 0, "Old name for vfs.wantfreevnodes (legacy)"); static int vnlru_nowhere; SYSCTL_INT(_debug, OID_AUTO, vnlru_nowhere, CTLFLAG_RW, &vnlru_nowhere, 0, "Number of times the vnlru process ran without success"); @@ -326,10 +341,10 @@ PCTRIE_DEFINE(BUF, buf, b_lblkno, buf_tr * * Reevaluate the following cap on the number of vnodes after the physical * memory size exceeds 512GB. In the limit, as the physical memory size - * grows, the ratio of physical pages to vnodes approaches sixteen to one. + * grows, the ratio of the memory size in KB to to vnodes approaches 64:1. */ #ifndef MAXVNODES_MAX -#define MAXVNODES_MAX (512 * (1024 * 1024 * 1024 / (int)PAGE_SIZE / 16)) +#define MAXVNODES_MAX (512 * 1024 * 1024 / 64) /* 8M */ #endif static void vntblinit(void *dummy __unused) @@ -340,15 +355,16 @@ vntblinit(void *dummy __unused) /* * Desiredvnodes is a function of the physical memory size and the * kernel's heap size. Generally speaking, it scales with the - * physical memory size. The ratio of desiredvnodes to physical pages - * is one to four until desiredvnodes exceeds 98,304. Thereafter, the - * marginal ratio of desiredvnodes to physical pages is one to - * sixteen. However, desiredvnodes is limited by the kernel's heap + * physical memory size. The ratio of desiredvnodes to the physical + * memory size is 1:16 until desiredvnodes exceeds 98,304. + * Thereafter, the + * marginal ratio of desiredvnodes to the physical memory size is + * 1:64. However, desiredvnodes is limited by the kernel's heap * size. The memory required by desiredvnodes vnodes and vm objects - * may not exceed one seventh of the kernel's heap size. + * must not exceed 1/7th of the kernel's heap size. */ - physvnodes = maxproc + vm_cnt.v_page_count / 16 + 3 * min(98304 * 4, - vm_cnt.v_page_count) / 16; + physvnodes = maxproc + pgtok(vm_cnt.v_page_count) / 64 + + 3 * min(98304 * 16, pgtok(vm_cnt.v_page_count)) / 64; virtvnodes = vm_kmem_size / (7 * (sizeof(struct vm_object) + sizeof(struct vnode))); desiredvnodes = min(physvnodes, virtvnodes); @@ -737,35 +753,41 @@ vattr_null(struct vattr *vap) * you set kern.maxvnodes to. Do not set kern.maxvnodes too low. */ static int -vlrureclaim(struct mount *mp) +vlrureclaim(struct mount *mp, int reclaim_nc_src, int trigger) { struct vnode *vp; - int done; - int trigger; - int usevnodes; - int count; + int count, done, target; - /* - * Calculate the trigger point, don't allow user - * screwups to blow us up. This prevents us from - * recycling vnodes with lots of resident pages. We - * aren't trying to free memory, we are trying to - * free vnodes. - */ - usevnodes = desiredvnodes; - if (usevnodes <= 0) - usevnodes = 1; - trigger = vm_cnt.v_page_count * 2 / usevnodes; done = 0; vn_start_write(NULL, &mp, V_WAIT); MNT_ILOCK(mp); - count = mp->mnt_nvnodelistsize / 10 + 1; - while (count != 0) { + count = mp->mnt_nvnodelistsize; + target = count * (int64_t)gapvnodes / imax(desiredvnodes, 1); + target = target / 10 + 1; + while (count != 0 && done < target) { vp = TAILQ_FIRST(&mp->mnt_nvnodelist); while (vp != NULL && vp->v_type == VMARKER) vp = TAILQ_NEXT(vp, v_nmntvnodes); if (vp == NULL) break; + /* + * XXX LRU is completely broken for non-free vnodes. First + * by calling here in mountpoint order, then by moving + * unselected vnodes to the end here, and most grossly by + * removing the vlruvp() function that was supposed to + * maintain the order. (This function was born broken + * since syncer problems prevented it doing anything.) The + * order is closer to LRC (C = Created). + * + * LRU reclaiming of vnodes seems to have last worked in + * FreeBSD-3 where LRU wasn't mentioned under any spelling. + * Then there was no hold count, and inactive vnodes were + * simply put on the free list in LRU order. The separate + * lists also break LRU. We prefer to reclaim from the + * free list for technical reasons. This tends to thrash + * the free list to keep very unrecently used held vnodes. + * The problem is mitigated by keeping the free list large. + */ TAILQ_REMOVE(&mp->mnt_nvnodelist, vp, v_nmntvnodes); TAILQ_INSERT_TAIL(&mp->mnt_nvnodelist, vp, v_nmntvnodes); --count; @@ -774,10 +796,12 @@ vlrureclaim(struct mount *mp) /* * If it's been deconstructed already, it's still * referenced, or it exceeds the trigger, skip it. + * Also skip free vnodes. We are trying to make space + * to expand the free list, not reduce it. */ if (vp->v_usecount || - (!vlru_allow_cache_src && - !LIST_EMPTY(&(vp)->v_cache_src)) || + (!reclaim_nc_src && !LIST_EMPTY(&vp->v_cache_src)) || + ((vp->v_iflag & VI_FREE) != 0) || (vp->v_iflag & VI_DOOMED) != 0 || (vp->v_object != NULL && vp->v_object->resident_page_count > trigger)) { VI_UNLOCK(vp); @@ -803,8 +827,8 @@ vlrureclaim(struct mount *mp) * vnode lock before our VOP_LOCK() call fails. */ if (vp->v_usecount || - (!vlru_allow_cache_src && - !LIST_EMPTY(&(vp)->v_cache_src)) || + (!reclaim_nc_src && !LIST_EMPTY(&vp->v_cache_src)) || + (vp->v_iflag & VI_FREE) != 0 || (vp->v_object != NULL && vp->v_object->resident_page_count > trigger)) { VOP_UNLOCK(vp, LK_INTERLOCK); @@ -837,7 +861,7 @@ relock_mnt: } /* - * Attempt to keep the free list at wantfreevnodes length. + * Attempt to reduce the free list by the requested amount. */ static void vnlru_free(int count) @@ -894,6 +918,24 @@ vnlru_free(int count) mtx_lock(&vnode_free_list_mtx); } } + +/* XXX some names and initialization are bad for limits and watermarks. */ +static int +vspace(void) +{ + int space; + + gapvnodes = imax(desiredvnodes - wantfreevnodes, 100); + vhiwat = gapvnodes / 11; /* 9% -- just under the 10% in vlrureclaim() */ + vlowat = vhiwat / 2; + if (numvnodes > desiredvnodes) + return (0); + space = desiredvnodes - numvnodes; + if (freevnodes > wantfreevnodes) + space += freevnodes - wantfreevnodes; + return (space); +} + /* * Attempt to recycle vnodes in a context that is always safe to block. * Calling vlrurecycle() from the bowels of filesystem code has some @@ -906,18 +948,36 @@ static void vnlru_proc(void) { struct mount *mp, *nmp; - int done; - struct proc *p = vnlruproc; + unsigned long ofreevnodes, onumvnodes; + int done, force, reclaim_nc_src, trigger, usevnodes; - EVENTHANDLER_REGISTER(shutdown_pre_sync, kproc_shutdown, p, + EVENTHANDLER_REGISTER(shutdown_pre_sync, kproc_shutdown, vnlruproc, SHUTDOWN_PRI_FIRST); + force = 0; for (;;) { - kproc_suspend_check(p); + kproc_suspend_check(vnlruproc); mtx_lock(&vnode_free_list_mtx); - if (freevnodes > wantfreevnodes) - vnlru_free(freevnodes - wantfreevnodes); - if (numvnodes <= desiredvnodes * 9 / 10) { + /* + * If numvnodes is too large (due to desiredvnodes being + * adjusted using its sysctl, or emergency growth), first + * try to reduce it by discarding from the free list. + */ + if (numvnodes > desiredvnodes && freevnodes > 0) + vnlru_free(ulmin(numvnodes - desiredvnodes, + freevnodes)); + /* + * Sleep if the vnode cache is in a good state. This is + * when it is not over-full and has space for about a 4% + * or 9% expansion (by growing its size or inexcessively + * reducing its free list). Otherwise, try to reclaim + * space for a 10% expansion. + */ + if (vstir && force == 0) { + force = 1; + vstir = 0; + } + if (vspace() >= vlowat && force == 0) { vnlruproc_sig = 0; wakeup(&vnlruproc_sig); msleep(vnlruproc, &vnode_free_list_mtx, @@ -926,30 +986,66 @@ vnlru_proc(void) } mtx_unlock(&vnode_free_list_mtx); done = 0; + ofreevnodes = freevnodes; + onumvnodes = numvnodes; + /* + * Calculate parameters for recycling. These are the same + * throughout the loop to give some semblance of fairness. + * The trigger point is to avoid recycling vnodes with lots + * of resident pages. We aren't trying to free memory; we + * are trying to recycle or at least free vnodes. + */ + if (numvnodes <= desiredvnodes) + usevnodes = numvnodes - freevnodes; + else + usevnodes = numvnodes; + if (usevnodes <= 0) + usevnodes = 1; + /* + * The trigger value is is chosen to give a conservatively + * large value to ensure that it alone doesn't prevent + * making progress. The value can easily be so large that + * it is effectively infinite in some congested and + * misconfigured cases, and this is necessary. Normally + * it is about 8 to 100 (pages), which is quite large. + */ + trigger = vm_cnt.v_page_count * 2 / usevnodes; + if (force < 2) + trigger = vsmalltrigger; + reclaim_nc_src = force >= 3; mtx_lock(&mountlist_mtx); for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) { if (vfs_busy(mp, MBF_NOWAIT | MBF_MNTLSTLOCK)) { nmp = TAILQ_NEXT(mp, mnt_list); continue; } - done += vlrureclaim(mp); + done += vlrureclaim(mp, reclaim_nc_src, trigger); mtx_lock(&mountlist_mtx); nmp = TAILQ_NEXT(mp, mnt_list); vfs_unbusy(mp); } mtx_unlock(&mountlist_mtx); + if (onumvnodes > desiredvnodes && numvnodes <= desiredvnodes) + uma_reclaim(); if (done == 0) { -#if 0 - /* These messages are temporary debugging aids */ - if (vnlru_nowhere < 5) - printf("vnlru process getting nowhere..\n"); - else if (vnlru_nowhere == 5) - printf("vnlru process messages stopped.\n"); -#endif + if (force == 0 || force == 1) { + force = 2; + continue; + } + if (force == 2) { + force = 3; + continue; + } + force = 0; vnlru_nowhere++; tsleep(vnlruproc, PPAUSE, "vlrup", hz * 3); } else kern_yield(PRI_USER); + /* + * After becoming active to expand above low water, keep + * active until above high water. + */ + force = vspace() < vhiwat; } } @@ -1023,22 +1119,31 @@ vtryrecycle(struct vnode *vp) return (0); } +static void +vcheckspace(void) +{ + + if (vspace() < vlowat && vnlruproc_sig == 0) { + vnlruproc_sig = 1; + wakeup(vnlruproc); + } +} + /* - * Wait for available vnodes. + * Wait if necessary for space for a new vnode. */ static int getnewvnode_wait(int suspended) { mtx_assert(&vnode_free_list_mtx, MA_OWNED); - if (numvnodes > desiredvnodes) { + if (numvnodes >= desiredvnodes) { if (suspended) { /* - * File system is beeing suspended, we cannot risk a - * deadlock here, so allocate new vnode anyway. + * The file system is being suspended. We cannot + * risk a deadlock here, so allow allocation of + * another vnode even if this would give too many. */ - if (freevnodes > wantfreevnodes) - vnlru_free(freevnodes - wantfreevnodes); return (0); } if (vnlruproc_sig == 0) { @@ -1048,18 +1153,34 @@ getnewvnode_wait(int suspended) msleep(&vnlruproc_sig, &vnode_free_list_mtx, PVFS, "vlruwk", hz); } - return (numvnodes > desiredvnodes ? ENFILE : 0); + /* Post-adjust like the pre-adjust in getnewvnode(). */ + if (numvnodes + 1 > desiredvnodes && freevnodes > 1) + vnlru_free(1); + return (numvnodes >= desiredvnodes ? ENFILE : 0); } +/* + * This hack is fragile, and probably not needed any more now that the + * watermark handling works. + */ void getnewvnode_reserve(u_int count) { struct thread *td; + /* Pre-adjust like the pre-adjust in getnewvnode(), with any count. */ + /* XXX no longer so quick, but this part is not racy. */ + mtx_lock(&vnode_free_list_mtx); + if (numvnodes + count > desiredvnodes && freevnodes > wantfreevnodes) + vnlru_free(ulmin(numvnodes + count - desiredvnodes, + freevnodes - wantfreevnodes)); + mtx_unlock(&vnode_free_list_mtx); + td = curthread; /* First try to be quick and racy. */ if (atomic_fetchadd_long(&numvnodes, count) + count <= desiredvnodes) { td->td_vp_reserv += count; + vcheckspace(); /* XXX no longer so quick, but more racy */ return; } else atomic_subtract_long(&numvnodes, count); @@ -1072,9 +1193,18 @@ getnewvnode_reserve(u_int count) atomic_add_long(&numvnodes, 1); } } + vcheckspace(); mtx_unlock(&vnode_free_list_mtx); } +/* + * This hack is fragile, especially if desiredvnodes or wantvnodes are + * misconfgured or changed significantly. Reducing desiredvnodes below + * the reserved amount should cause bizarre behaviour like reducing it + * below the number of active vnodes -- the system will try to reduce + * numvnodes to match, but should fail, so the subtraction below should + * not overflow. + */ void getnewvnode_drop_reserve(void) { @@ -1095,6 +1225,7 @@ getnewvnode(const char *tag, struct moun struct vnode *vp; struct bufobj *bo; struct thread *td; + static int cyclecount; int error; CTR3(KTR_VFS, "%s: mp %p with tag %s", __func__, mp, tag); @@ -1105,19 +1236,37 @@ getnewvnode(const char *tag, struct moun goto alloc; } mtx_lock(&vnode_free_list_mtx); - /* - * Lend our context to reclaim vnodes if they've exceeded the max. - */ - if (freevnodes > wantfreevnodes) + if (numvnodes < desiredvnodes) + cyclecount = 0; + else if (cyclecount++ >= freevnodes) { + cyclecount = 0; + vstir = 1; + } + /* + * Grow the vnode cache if it will not be above its target max + * after growing. Otherwise, if the free list is nonempty, try + * to reclaim 1 item from it before growing the cache (possibly + * above its target max if the reclamation failed or is delayed). + * Otherwise, wait for some space. In all cases, schedule + * vnlru_proc() if we are getting short of space. The watermarks + * should be chosen so that we never wait or even reclaim from + * the free list to below its target minimum. + */ + if (numvnodes + 1 <= desiredvnodes) + ; + else if (freevnodes > 0) vnlru_free(1); - error = getnewvnode_wait(mp != NULL && (mp->mnt_kern_flag & - MNTK_SUSPEND)); + else { + error = getnewvnode_wait(mp != NULL && (mp->mnt_kern_flag & + MNTK_SUSPEND)); #if 0 /* XXX Not all VFS_VGET/ffs_vget callers check returns. */ - if (error != 0) { - mtx_unlock(&vnode_free_list_mtx); - return (error); - } + if (error != 0) { + mtx_unlock(&vnode_free_list_mtx); + return (error); + } #endif + } + vcheckspace(); atomic_add_long(&numvnodes, 1); mtx_unlock(&vnode_free_list_mtx); alloc: @@ -2517,6 +2666,7 @@ _vdrop(struct vnode *vp, bool locked) v_actfreelist); mp->mnt_activevnodelistsize--; } + /* XXX V*AGE hasn't been set since 1997. */ if (vp->v_iflag & VI_AGE) { TAILQ_INSERT_HEAD(&vnode_free_list, vp, v_actfreelist); From owner-svn-src-all@freebsd.org Tue Nov 24 11:01:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B86CA3688D; Tue, 24 Nov 2015 11:01:44 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51D411E48; Tue, 24 Nov 2015 11:01:44 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAOB1h4V064183; Tue, 24 Nov 2015 11:01:43 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAOB1hHC064181; Tue, 24 Nov 2015 11:01:43 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201511241101.tAOB1hHC064181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 24 Nov 2015 11:01:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291246 - in head/sys/arm64: arm64 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 11:01:44 -0000 Author: andrew Date: Tue Nov 24 11:01:43 2015 New Revision: 291246 URL: https://svnweb.freebsd.org/changeset/base/291246 Log: Add support for moving the DMAP range. This is needed as some AMD SoCs place physical memory at an address outside the old DMAP range. This is an issue as we rely on being able to move from PA -> VA using this range. Obtained from: Patrick Wildt (earlier version) Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D3885 Modified: head/sys/arm64/arm64/pmap.c head/sys/arm64/include/vmparam.h Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Tue Nov 24 09:52:46 2015 (r291245) +++ head/sys/arm64/arm64/pmap.c Tue Nov 24 11:01:43 2015 (r291246) @@ -215,6 +215,8 @@ struct msgbuf *msgbufp = NULL; static struct rwlock_padalign pvh_global_lock; +vm_paddr_t dmap_phys_base; /* The start of the dmap region */ + /* * Data for the pv entry allocation mechanism */ @@ -446,18 +448,19 @@ pmap_early_vtophys(vm_offset_t l1pt, vm_ } static void -pmap_bootstrap_dmap(vm_offset_t l1pt) +pmap_bootstrap_dmap(vm_offset_t l1pt, vm_paddr_t kernstart) { vm_offset_t va; vm_paddr_t pa; pd_entry_t *l1; u_int l1_slot; + pa = dmap_phys_base = kernstart & ~L1_OFFSET; va = DMAP_MIN_ADDRESS; l1 = (pd_entry_t *)l1pt; l1_slot = pmap_l1_index(DMAP_MIN_ADDRESS); - for (pa = 0; va < DMAP_MAX_ADDRESS; + for (; va < DMAP_MAX_ADDRESS; pa += L1_SIZE, va += L1_SIZE, l1_slot++) { KASSERT(l1_slot < Ln_ENTRIES, ("Invalid L1 index")); @@ -548,7 +551,8 @@ pmap_bootstrap(vm_offset_t l1pt, vm_padd pt_entry_t *l2; vm_offset_t va, freemempos; vm_offset_t dpcpu, msgbufpv; - vm_paddr_t pa; + vm_paddr_t pa, min_pa; + int i; kern_delta = KERNBASE - kernstart; physmem = 0; @@ -566,8 +570,23 @@ pmap_bootstrap(vm_offset_t l1pt, vm_padd */ rw_init(&pvh_global_lock, "pmap pv global"); + /* Assume the address we were loaded to is a valid physical address */ + min_pa = KERNBASE - kern_delta; + + /* + * Find the minimum physical address. physmap is sorted, + * but may contain empty ranges. + */ + for (i = 0; i < (physmap_idx * 2); i += 2) { + if (physmap[i] == physmap[i + 1]) + continue; + if (physmap[i] <= min_pa) + min_pa = physmap[i]; + break; + } + /* Create a direct map region early so we can use it for pa -> va */ - pmap_bootstrap_dmap(l1pt); + pmap_bootstrap_dmap(l1pt, min_pa); va = KERNBASE; pa = KERNBASE - kern_delta; Modified: head/sys/arm64/include/vmparam.h ============================================================================== --- head/sys/arm64/include/vmparam.h Tue Nov 24 09:52:46 2015 (r291245) +++ head/sys/arm64/include/vmparam.h Tue Nov 24 11:01:43 2015 (r291246) @@ -160,11 +160,13 @@ #define DMAP_MIN_ADDRESS (0xffffffc000000000UL) #define DMAP_MAX_ADDRESS (0xffffffdfffffffffUL) -#define DMAP_MIN_PHYSADDR (0x0000000000000000UL) -#define DMAP_MAX_PHYSADDR (DMAP_MAX_ADDRESS - DMAP_MIN_ADDRESS) +extern vm_paddr_t dmap_phys_base; +#define DMAP_MIN_PHYSADDR (dmap_phys_base) +#define DMAP_MAX_PHYSADDR (dmap_phys_base + (DMAP_MAX_ADDRESS - DMAP_MIN_ADDRESS)) /* True if pa is in the dmap range */ -#define PHYS_IN_DMAP(pa) ((pa) <= DMAP_MAX_PHYSADDR) +#define PHYS_IN_DMAP(pa) ((pa) >= DMAP_MIN_PHYSADDR && \ + (pa) <= DMAP_MAX_PHYSADDR) /* True if va is in the dmap range */ #define VIRT_IN_DMAP(va) ((va) >= DMAP_MIN_ADDRESS && \ (va) <= DMAP_MAX_ADDRESS) @@ -174,7 +176,7 @@ KASSERT(PHYS_IN_DMAP(pa), \ ("%s: PA out of range, PA: 0x%lx", __func__, \ (vm_paddr_t)(pa))); \ - (pa) | DMAP_MIN_ADDRESS; \ + ((pa) - dmap_phys_base) | DMAP_MIN_ADDRESS; \ }) #define DMAP_TO_PHYS(va) \ @@ -182,7 +184,7 @@ KASSERT(VIRT_IN_DMAP(va), \ ("%s: VA out of range, VA: 0x%lx", __func__, \ (vm_offset_t)(va))); \ - (va) & ~DMAP_MIN_ADDRESS; \ + ((va) & ~DMAP_MIN_ADDRESS) + dmap_phys_base; \ }) #define VM_MIN_USER_ADDRESS (0x0000000000000000UL) From owner-svn-src-all@freebsd.org Tue Nov 24 11:07:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1066FA36998; Tue, 24 Nov 2015 11:07:39 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C837B1268; Tue, 24 Nov 2015 11:07:38 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAOB7bMS064410; Tue, 24 Nov 2015 11:07:37 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAOB7b98064409; Tue, 24 Nov 2015 11:07:37 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511241107.tAOB7b98064409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Tue, 24 Nov 2015 11:07:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291247 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 11:07:39 -0000 Author: ume Date: Tue Nov 24 11:07:37 2015 New Revision: 291247 URL: https://svnweb.freebsd.org/changeset/base/291247 Log: Add missing error check after xo_parse_args() in netstat(8). Submitted by: Oliver Pinter Differential Revision: https://reviews.freebsd.org/D4233 Modified: head/usr.bin/netstat/main.c Modified: head/usr.bin/netstat/main.c ============================================================================== --- head/usr.bin/netstat/main.c Tue Nov 24 11:01:43 2015 (r291246) +++ head/usr.bin/netstat/main.c Tue Nov 24 11:07:37 2015 (r291247) @@ -242,6 +242,8 @@ main(int argc, char *argv[]) af = AF_UNSPEC; argc = xo_parse_args(argc, argv); + if (argc < 0) + exit(EXIT_FAILURE); while ((ch = getopt(argc, argv, "46AaBbdF:f:ghI:iLlM:mN:np:Qq:RrSTsuWw:xz")) != -1) From owner-svn-src-all@freebsd.org Tue Nov 24 11:09:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7CCBA36A1D; Tue, 24 Nov 2015 11:09:41 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 416EE13DF; Tue, 24 Nov 2015 11:09:41 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAOB9emZ064517; Tue, 24 Nov 2015 11:09:40 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAOB9ehU064512; Tue, 24 Nov 2015 11:09:40 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201511241109.tAOB9ehU064512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Tue, 24 Nov 2015 11:09: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: r291248 - stable/10/sys/dev/ixl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 11:09:41 -0000 Author: smh Date: Tue Nov 24 11:09:39 2015 New Revision: 291248 URL: https://svnweb.freebsd.org/changeset/base/291248 Log: MFC r277082: Update to the shared code for Intel I40E drivers (by jfv) Sponsored by: Multiplay Modified: stable/10/sys/dev/ixl/i40e_adminq.c stable/10/sys/dev/ixl/i40e_adminq.h stable/10/sys/dev/ixl/i40e_adminq_cmd.h stable/10/sys/dev/ixl/i40e_common.c stable/10/sys/dev/ixl/i40e_lan_hmc.c stable/10/sys/dev/ixl/i40e_nvm.c stable/10/sys/dev/ixl/i40e_prototype.h stable/10/sys/dev/ixl/i40e_register.h stable/10/sys/dev/ixl/i40e_type.h stable/10/sys/dev/ixl/i40e_virtchnl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ixl/i40e_adminq.c ============================================================================== --- stable/10/sys/dev/ixl/i40e_adminq.c Tue Nov 24 11:07:37 2015 (r291247) +++ stable/10/sys/dev/ixl/i40e_adminq.c Tue Nov 24 11:09:39 2015 (r291248) @@ -589,10 +589,10 @@ enum i40e_status_code i40e_init_adminq(s if (ret_code != I40E_SUCCESS) goto init_adminq_free_asq; - if (i40e_is_vf(hw)) /* VF has no need of firmware */ - goto init_adminq_exit; - -/* There are some cases where the firmware may not be quite ready + /* VF has no need of firmware */ + if (i40e_is_vf(hw)) + goto init_adminq_exit; + /* There are some cases where the firmware may not be quite ready * for AdminQ operations, so we retry the AdminQ setup a few times * if we see timeouts in this first AQ call. */ @@ -600,6 +600,7 @@ enum i40e_status_code i40e_init_adminq(s ret_code = i40e_aq_get_firmware_version(hw, &hw->aq.fw_maj_ver, &hw->aq.fw_min_ver, + &hw->aq.fw_build, &hw->aq.api_maj_ver, &hw->aq.api_min_ver, NULL); @@ -625,7 +626,8 @@ enum i40e_status_code i40e_init_adminq(s /* pre-emptive resource lock release */ i40e_aq_release_resource(hw, I40E_NVM_RESOURCE_ID, 0, NULL); - hw->aq.nvm_busy = FALSE; + hw->aq.nvm_release_on_done = FALSE; + hw->nvmupd_state = I40E_NVMUPD_STATE_INIT; ret_code = i40e_aq_set_hmc_resource_profile(hw, I40E_HMC_PROFILE_DEFAULT, @@ -767,12 +769,6 @@ enum i40e_status_code i40e_asq_send_comm goto asq_send_command_exit; } - if (i40e_is_nvm_update_op(desc) && hw->aq.nvm_busy) { - i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, "AQTX: NVM busy.\n"); - status = I40E_ERR_NVM; - goto asq_send_command_exit; - } - details = I40E_ADMINQ_DETAILS(hw->aq.asq, hw->aq.asq.next_to_use); if (cmd_details) { i40e_memcpy(details, @@ -924,9 +920,6 @@ enum i40e_status_code i40e_asq_send_comm status = I40E_ERR_ADMIN_QUEUE_TIMEOUT; } - if (!status && i40e_is_nvm_update_op(desc)) - hw->aq.nvm_busy = TRUE; - asq_send_command_error: i40e_release_spinlock(&hw->aq.asq_spinlock); asq_send_command_exit: @@ -1042,7 +1035,6 @@ clean_arq_element_out: i40e_release_spinlock(&hw->aq.arq_spinlock); if (i40e_is_nvm_update_op(&e->desc)) { - hw->aq.nvm_busy = FALSE; if (hw->aq.nvm_release_on_done) { i40e_release_nvm(hw); hw->aq.nvm_release_on_done = FALSE; Modified: stable/10/sys/dev/ixl/i40e_adminq.h ============================================================================== --- stable/10/sys/dev/ixl/i40e_adminq.h Tue Nov 24 11:07:37 2015 (r291247) +++ stable/10/sys/dev/ixl/i40e_adminq.h Tue Nov 24 11:09:39 2015 (r291248) @@ -36,6 +36,7 @@ #define _I40E_ADMINQ_H_ #include "i40e_osdep.h" +#include "i40e_status.h" #include "i40e_adminq_cmd.h" #define I40E_ADMINQ_DESC(R, i) \ @@ -100,9 +101,9 @@ struct i40e_adminq_info { u16 asq_buf_size; /* send queue buffer size */ u16 fw_maj_ver; /* firmware major version */ u16 fw_min_ver; /* firmware minor version */ + u32 fw_build; /* firmware build number */ u16 api_maj_ver; /* api major version */ u16 api_min_ver; /* api minor version */ - bool nvm_busy; bool nvm_release_on_done; struct i40e_spinlock asq_spinlock; /* Send queue spinlock */ @@ -115,7 +116,7 @@ struct i40e_adminq_info { /* general information */ #define I40E_AQ_LARGE_BUF 512 -#define I40E_ASQ_CMD_TIMEOUT 100 /* msecs */ +#define I40E_ASQ_CMD_TIMEOUT 250 /* msecs */ void i40e_fill_default_direct_cmd_desc(struct i40e_aq_desc *desc, u16 opcode); Modified: stable/10/sys/dev/ixl/i40e_adminq_cmd.h ============================================================================== --- stable/10/sys/dev/ixl/i40e_adminq_cmd.h Tue Nov 24 11:07:37 2015 (r291247) +++ stable/10/sys/dev/ixl/i40e_adminq_cmd.h Tue Nov 24 11:09:39 2015 (r291248) @@ -263,6 +263,9 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_lldp_delete_tlv = 0x0A04, i40e_aqc_opc_lldp_stop = 0x0A05, i40e_aqc_opc_lldp_start = 0x0A06, + i40e_aqc_opc_get_cee_dcb_cfg = 0x0A07, + i40e_aqc_opc_lldp_set_local_mib = 0x0A08, + i40e_aqc_opc_lldp_stop_start_spec_agent = 0x0A09, /* Tunnel commands */ i40e_aqc_opc_add_udp_tunnel = 0x0B00, @@ -275,6 +278,8 @@ enum i40e_admin_queue_opc { /* OEM commands */ i40e_aqc_opc_oem_parameter_change = 0xFE00, i40e_aqc_opc_oem_device_status_change = 0xFE01, + i40e_aqc_opc_oem_ocsd_initialize = 0xFE02, + i40e_aqc_opc_oem_ocbb_initialize = 0xFE03, /* debug commands */ i40e_aqc_opc_debug_get_deviceid = 0xFF00, @@ -283,7 +288,6 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_debug_write_reg = 0xFF04, i40e_aqc_opc_debug_modify_reg = 0xFF07, i40e_aqc_opc_debug_dump_internals = 0xFF08, - i40e_aqc_opc_debug_modify_internals = 0xFF09, }; /* command structures and indirect data structures */ @@ -417,6 +421,7 @@ struct i40e_aqc_list_capabilities_elemen #define I40E_AQ_CAP_ID_VSI 0x0017 #define I40E_AQ_CAP_ID_DCB 0x0018 #define I40E_AQ_CAP_ID_FCOE 0x0021 +#define I40E_AQ_CAP_ID_ISCSI 0x0022 #define I40E_AQ_CAP_ID_RSS 0x0040 #define I40E_AQ_CAP_ID_RXQ 0x0041 #define I40E_AQ_CAP_ID_TXQ 0x0042 @@ -461,8 +466,11 @@ struct i40e_aqc_arp_proxy_data { __le32 pfpm_proxyfc; __le32 ip_addr; u8 mac_addr[6]; + u8 reserved[2]; }; +I40E_CHECK_STRUCT_LEN(0x14, i40e_aqc_arp_proxy_data); + /* Set NS Proxy Table Entry Command (indirect 0x0105) */ struct i40e_aqc_ns_proxy_data { __le16 table_idx_mac_addr_0; @@ -488,6 +496,8 @@ struct i40e_aqc_ns_proxy_data { u8 ipv6_addr_1[16]; }; +I40E_CHECK_STRUCT_LEN(0x3c, i40e_aqc_ns_proxy_data); + /* Manage LAA Command (0x0106) - obsolete */ struct i40e_aqc_mng_laa { __le16 command_flags; @@ -498,6 +508,8 @@ struct i40e_aqc_mng_laa { u8 reserved2[6]; }; +I40E_CHECK_CMD_LENGTH(i40e_aqc_mng_laa); + /* Manage MAC Address Read Command (indirect 0x0107) */ struct i40e_aqc_mac_address_read { __le16 command_flags; @@ -569,6 +581,8 @@ struct i40e_aqc_get_switch_config_header u8 reserved[12]; }; +I40E_CHECK_CMD_LENGTH(i40e_aqc_get_switch_config_header_resp); + struct i40e_aqc_switch_config_element_resp { u8 element_type; #define I40E_AQ_SW_ELEM_TYPE_MAC 1 @@ -594,6 +608,8 @@ struct i40e_aqc_switch_config_element_re __le16 element_info; }; +I40E_CHECK_STRUCT_LEN(0x10, i40e_aqc_switch_config_element_resp); + /* Get Switch Configuration (indirect 0x0200) * an array of elements are returned in the response buffer * the first in the array is the header, remainder are elements @@ -603,6 +619,8 @@ struct i40e_aqc_get_switch_config_resp { struct i40e_aqc_switch_config_element_resp element[1]; }; +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_get_switch_config_resp); + /* Add Statistics (direct 0x0201) * Remove Statistics (direct 0x0202) */ @@ -668,6 +686,8 @@ struct i40e_aqc_switch_resource_alloc_el u8 reserved2[6]; }; +I40E_CHECK_STRUCT_LEN(0x10, i40e_aqc_switch_resource_alloc_element_resp); + /* Add VSI (indirect 0x0210) * this indirect command uses struct i40e_aqc_vsi_properties_data * as the indirect buffer (128 bytes) @@ -1099,6 +1119,8 @@ struct i40e_aqc_remove_tag { u8 reserved[12]; }; +I40E_CHECK_CMD_LENGTH(i40e_aqc_remove_tag); + /* Add multicast E-Tag (direct 0x0257) * del multicast E-Tag (direct 0x0258) only uses pv_seid and etag fields * and no external data @@ -1214,7 +1236,7 @@ struct i40e_aqc_add_remove_cloud_filters } ipaddr; __le16 flags; #define I40E_AQC_ADD_CLOUD_FILTER_SHIFT 0 -#define I40E_AQC_ADD_CLOUD_FILTER_MASK (0x3F << \ +#define I40E_AQC_ADD_CLOUD_FILTER_MASK (0x3F << \ I40E_AQC_ADD_CLOUD_FILTER_SHIFT) /* 0x0000 reserved */ #define I40E_AQC_ADD_CLOUD_FILTER_OIP 0x0001 @@ -1247,7 +1269,7 @@ struct i40e_aqc_add_remove_cloud_filters u8 reserved[4]; __le16 queue_number; #define I40E_AQC_ADD_CLOUD_QUEUE_SHIFT 0 -#define I40E_AQC_ADD_CLOUD_QUEUE_MASK (0x3F << \ +#define I40E_AQC_ADD_CLOUD_QUEUE_MASK (0x7FF << \ I40E_AQC_ADD_CLOUD_QUEUE_SHIFT) u8 reserved2[14]; /* response section */ @@ -1366,6 +1388,8 @@ struct i40e_aqc_configure_vsi_ets_sla_bw u8 reserved1[28]; }; +I40E_CHECK_STRUCT_LEN(0x40, i40e_aqc_configure_vsi_ets_sla_bw_data); + /* Configure VSI Bandwidth Allocation per Traffic Type (indirect 0x0407) * responds with i40e_aqc_qs_handles_resp */ @@ -1377,6 +1401,8 @@ struct i40e_aqc_configure_vsi_tc_bw_data __le16 qs_handles[8]; }; +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_configure_vsi_tc_bw_data); + /* Query vsi bw configuration (indirect 0x0408) */ struct i40e_aqc_query_vsi_bw_config_resp { u8 tc_valid_bits; @@ -1390,6 +1416,8 @@ struct i40e_aqc_query_vsi_bw_config_resp u8 reserved3[23]; }; +I40E_CHECK_STRUCT_LEN(0x40, i40e_aqc_query_vsi_bw_config_resp); + /* Query VSI Bandwidth Allocation per Traffic Type (indirect 0x040A) */ struct i40e_aqc_query_vsi_ets_sla_config_resp { u8 tc_valid_bits; @@ -1401,6 +1429,8 @@ struct i40e_aqc_query_vsi_ets_sla_config __le16 tc_bw_max[2]; }; +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_query_vsi_ets_sla_config_resp); + /* Configure Switching Component Bandwidth Limit (direct 0x0410) */ struct i40e_aqc_configure_switching_comp_bw_limit { __le16 seid; @@ -1428,6 +1458,8 @@ struct i40e_aqc_configure_switching_comp u8 reserved2[96]; }; +I40E_CHECK_STRUCT_LEN(0x80, i40e_aqc_configure_switching_comp_ets_data); + /* Configure Switching Component Bandwidth Limits per Tc (indirect 0x0416) */ struct i40e_aqc_configure_switching_comp_ets_bw_limit_data { u8 tc_valid_bits; @@ -1439,6 +1471,8 @@ struct i40e_aqc_configure_switching_comp u8 reserved1[28]; }; +I40E_CHECK_STRUCT_LEN(0x40, i40e_aqc_configure_switching_comp_ets_bw_limit_data); + /* Configure Switching Component Bandwidth Allocation per Tc * (indirect 0x0417) */ @@ -1450,6 +1484,8 @@ struct i40e_aqc_configure_switching_comp u8 reserved1[20]; }; +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_configure_switching_comp_bw_config_data); + /* Query Switching Component Configuration (indirect 0x0418) */ struct i40e_aqc_query_switching_comp_ets_config_resp { u8 tc_valid_bits; @@ -1460,6 +1496,8 @@ struct i40e_aqc_query_switching_comp_ets u8 reserved2[23]; }; +I40E_CHECK_STRUCT_LEN(0x40, i40e_aqc_query_switching_comp_ets_config_resp); + /* Query PhysicalPort ETS Configuration (indirect 0x0419) */ struct i40e_aqc_query_port_ets_config_resp { u8 reserved[4]; @@ -1475,6 +1513,8 @@ struct i40e_aqc_query_port_ets_config_re u8 reserved3[32]; }; +I40E_CHECK_STRUCT_LEN(0x44, i40e_aqc_query_port_ets_config_resp); + /* Query Switching Component Bandwidth Allocation per Traffic Type * (indirect 0x041A) */ @@ -1489,6 +1529,8 @@ struct i40e_aqc_query_switching_comp_bw_ __le16 tc_bw_max[2]; }; +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_query_switching_comp_bw_config_resp); + /* Suspend/resume port TX traffic * (direct 0x041B and 0x041C) uses the generic SEID struct */ @@ -1502,6 +1544,8 @@ struct i40e_aqc_configure_partition_bw_d u8 max_bw[16]; /* bandwidth limit */ }; +I40E_CHECK_STRUCT_LEN(0x22, i40e_aqc_configure_partition_bw_data); + /* Get and set the active HMC resource profile and status. * (direct 0x0500) and (direct 0x0501) */ @@ -1584,6 +1628,8 @@ struct i40e_aqc_module_desc { u8 reserved2[8]; }; +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_module_desc); + struct i40e_aq_get_phy_abilities_resp { __le32 phy_type; /* bitmap using the above enum for offsets */ u8 link_speed; /* bitmap using the above enum bit patterns */ @@ -1612,6 +1658,8 @@ struct i40e_aq_get_phy_abilities_resp { struct i40e_aqc_module_desc qualified_module[I40E_AQ_PHY_MAX_QMS]; }; +I40E_CHECK_STRUCT_LEN(0x218, i40e_aq_get_phy_abilities_resp); + /* Set PHY Config (direct 0x0601) */ struct i40e_aq_set_phy_config { /* same bits as above in all */ __le32 phy_type; @@ -1795,12 +1843,12 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_nvm_updat /* NVM Config Read (indirect 0x0704) */ struct i40e_aqc_nvm_config_read { __le16 cmd_flags; -#define ANVM_SINGLE_OR_MULTIPLE_FEATURES_MASK 1 -#define ANVM_READ_SINGLE_FEATURE 0 -#define ANVM_READ_MULTIPLE_FEATURES 1 +#define I40E_AQ_ANVM_SINGLE_OR_MULTIPLE_FEATURES_MASK 1 +#define I40E_AQ_ANVM_READ_SINGLE_FEATURE 0 +#define I40E_AQ_ANVM_READ_MULTIPLE_FEATURES 1 __le16 element_count; - __le16 element_id; /* Feature/field ID */ - u8 reserved[2]; + __le16 element_id; /* Feature/field ID */ + __le16 element_id_msw; /* MSWord of field ID */ __le32 address_high; __le32 address_low; }; @@ -1818,21 +1866,31 @@ struct i40e_aqc_nvm_config_write { I40E_CHECK_CMD_LENGTH(i40e_aqc_nvm_config_write); +/* Used for 0x0704 as well as for 0x0705 commands */ +#define I40E_AQ_ANVM_FEATURE_OR_IMMEDIATE_SHIFT 1 +#define I40E_AQ_ANVM_FEATURE_OR_IMMEDIATE_MASK (1 << I40E_AQ_ANVM_FEATURE_OR_IMMEDIATE_SHIFT) +#define I40E_AQ_ANVM_FEATURE 0 +#define I40E_AQ_ANVM_IMMEDIATE_FIELD (1 << FEATURE_OR_IMMEDIATE_SHIFT) struct i40e_aqc_nvm_config_data_feature { __le16 feature_id; - __le16 instance_id; +#define I40E_AQ_ANVM_FEATURE_OPTION_OEM_ONLY 0x01 +#define I40E_AQ_ANVM_FEATURE_OPTION_DWORD_MAP 0x08 +#define I40E_AQ_ANVM_FEATURE_OPTION_POR_CSR 0x10 __le16 feature_options; __le16 feature_selection; }; +I40E_CHECK_STRUCT_LEN(0x6, i40e_aqc_nvm_config_data_feature); + struct i40e_aqc_nvm_config_data_immediate_field { -#define ANVM_FEATURE_OR_IMMEDIATE_MASK 0x2 - __le16 field_id; - __le16 instance_id; + __le32 field_id; + __le32 field_value; __le16 field_options; - __le16 field_value; + __le16 reserved; }; +I40E_CHECK_STRUCT_LEN(0xc, i40e_aqc_nvm_config_data_immediate_field); + /* Send to PF command (indirect 0x0801) id is only used by PF * Send to VF command (indirect 0x0802) id is only used by PF * Send to Peer PF command (indirect 0x0803) @@ -1995,9 +2053,77 @@ struct i40e_aqc_lldp_start { I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_start); -/* Apply MIB changes (0x0A07) - * uses the generic struc as it contains no data +/* Get CEE DCBX Oper Config (0x0A07) + * uses the generic descriptor struct + * returns below as indirect response + */ + +#define I40E_AQC_CEE_APP_FCOE_SHIFT 0x0 +#define I40E_AQC_CEE_APP_FCOE_MASK (0x7 << I40E_AQC_CEE_APP_FCOE_SHIFT) +#define I40E_AQC_CEE_APP_ISCSI_SHIFT 0x3 +#define I40E_AQC_CEE_APP_ISCSI_MASK (0x7 << I40E_AQC_CEE_APP_ISCSI_SHIFT) +#define I40E_AQC_CEE_APP_FIP_SHIFT 0x8 +#define I40E_AQC_CEE_APP_FIP_MASK (0x7 << I40E_AQC_CEE_APP_FIP_SHIFT) +#define I40E_AQC_CEE_PG_STATUS_SHIFT 0x0 +#define I40E_AQC_CEE_PG_STATUS_MASK (0x7 << I40E_AQC_CEE_PG_STATUS_SHIFT) +#define I40E_AQC_CEE_PFC_STATUS_SHIFT 0x3 +#define I40E_AQC_CEE_PFC_STATUS_MASK (0x7 << I40E_AQC_CEE_PFC_STATUS_SHIFT) +#define I40E_AQC_CEE_APP_STATUS_SHIFT 0x8 +#define I40E_AQC_CEE_APP_STATUS_MASK (0x7 << I40E_AQC_CEE_APP_STATUS_SHIFT) +struct i40e_aqc_get_cee_dcb_cfg_v1_resp { + u8 reserved1; + u8 oper_num_tc; + u8 oper_prio_tc[4]; + u8 reserved2; + u8 oper_tc_bw[8]; + u8 oper_pfc_en; + u8 reserved3; + __le16 oper_app_prio; + u8 reserved4; + __le16 tlv_status; +}; + +I40E_CHECK_STRUCT_LEN(0x18, i40e_aqc_get_cee_dcb_cfg_v1_resp); + +struct i40e_aqc_get_cee_dcb_cfg_resp { + u8 oper_num_tc; + u8 oper_prio_tc[4]; + u8 oper_tc_bw[8]; + u8 oper_pfc_en; + __le16 oper_app_prio; + __le32 tlv_status; + u8 reserved[12]; +}; + +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_get_cee_dcb_cfg_resp); + +/* Set Local LLDP MIB (indirect 0x0A08) + * Used to replace the local MIB of a given LLDP agent. e.g. DCBx + */ +struct i40e_aqc_lldp_set_local_mib { +#define SET_LOCAL_MIB_AC_TYPE_DCBX_SHIFT 0 +#define SET_LOCAL_MIB_AC_TYPE_DCBX_MASK (1 << SET_LOCAL_MIB_AC_TYPE_DCBX_SHIFT) + u8 type; + u8 reserved0; + __le16 length; + u8 reserved1[4]; + __le32 address_high; + __le32 address_low; +}; + +I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_set_local_mib); + +/* Stop/Start LLDP Agent (direct 0x0A09) + * Used for stopping/starting specific LLDP agent. e.g. DCBx */ +struct i40e_aqc_lldp_stop_start_specific_agent { +#define I40E_AQC_START_SPECIFIC_AGENT_SHIFT 0 +#define I40E_AQC_START_SPECIFIC_AGENT_MASK (1 << I40E_AQC_START_SPECIFIC_AGENT_SHIFT) + u8 command; + u8 reserved[15]; +}; + +I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_stop_start_specific_agent); /* Add Udp Tunnel command and completion (direct 0x0B00) */ struct i40e_aqc_add_udp_tunnel { @@ -2073,7 +2199,8 @@ struct i40e_aqc_oem_param_change { #define I40E_AQ_OEM_PARAM_TYPE_BW_CTL 1 #define I40E_AQ_OEM_PARAM_MAC 2 __le32 param_value1; - u8 param_value2[8]; + __le16 param_value2; + u8 reserved[6]; }; I40E_CHECK_CMD_LENGTH(i40e_aqc_oem_param_change); @@ -2087,6 +2214,28 @@ struct i40e_aqc_oem_state_change { I40E_CHECK_CMD_LENGTH(i40e_aqc_oem_state_change); +/* Initialize OCSD (0xFE02, direct) */ +struct i40e_aqc_opc_oem_ocsd_initialize { + u8 type_status; + u8 reserved1[3]; + __le32 ocsd_memory_block_addr_high; + __le32 ocsd_memory_block_addr_low; + __le32 requested_update_interval; +}; + +I40E_CHECK_CMD_LENGTH(i40e_aqc_opc_oem_ocsd_initialize); + +/* Initialize OCBB (0xFE03, direct) */ +struct i40e_aqc_opc_oem_ocbb_initialize { + u8 type_status; + u8 reserved1[3]; + __le32 ocbb_memory_block_addr_high; + __le32 ocbb_memory_block_addr_low; + u8 reserved2[4]; +}; + +I40E_CHECK_CMD_LENGTH(i40e_aqc_opc_oem_ocbb_initialize); + /* debug commands */ /* get device id (0xFF00) uses the generic structure */ Modified: stable/10/sys/dev/ixl/i40e_common.c ============================================================================== --- stable/10/sys/dev/ixl/i40e_common.c Tue Nov 24 11:07:37 2015 (r291247) +++ stable/10/sys/dev/ixl/i40e_common.c Tue Nov 24 11:09:39 2015 (r291248) @@ -95,47 +95,51 @@ void i40e_debug_aq(struct i40e_hw *hw, e { struct i40e_aq_desc *aq_desc = (struct i40e_aq_desc *)desc; u16 len = LE16_TO_CPU(aq_desc->datalen); - u8 *aq_buffer = (u8 *)buffer; - u32 data[4]; - u32 i = 0; + u8 *buf = (u8 *)buffer; + u16 i = 0; if ((!(mask & hw->debug_mask)) || (desc == NULL)) return; i40e_debug(hw, mask, "AQ CMD: opcode 0x%04X, flags 0x%04X, datalen 0x%04X, retval 0x%04X\n", - aq_desc->opcode, aq_desc->flags, aq_desc->datalen, - aq_desc->retval); + LE16_TO_CPU(aq_desc->opcode), + LE16_TO_CPU(aq_desc->flags), + LE16_TO_CPU(aq_desc->datalen), + LE16_TO_CPU(aq_desc->retval)); i40e_debug(hw, mask, "\tcookie (h,l) 0x%08X 0x%08X\n", - aq_desc->cookie_high, aq_desc->cookie_low); + LE32_TO_CPU(aq_desc->cookie_high), + LE32_TO_CPU(aq_desc->cookie_low)); i40e_debug(hw, mask, "\tparam (0,1) 0x%08X 0x%08X\n", - aq_desc->params.internal.param0, - aq_desc->params.internal.param1); + LE32_TO_CPU(aq_desc->params.internal.param0), + LE32_TO_CPU(aq_desc->params.internal.param1)); i40e_debug(hw, mask, "\taddr (h,l) 0x%08X 0x%08X\n", - aq_desc->params.external.addr_high, - aq_desc->params.external.addr_low); + LE32_TO_CPU(aq_desc->params.external.addr_high), + LE32_TO_CPU(aq_desc->params.external.addr_low)); if ((buffer != NULL) && (aq_desc->datalen != 0)) { - i40e_memset(data, 0, sizeof(data), I40E_NONDMA_MEM); i40e_debug(hw, mask, "AQ CMD Buffer:\n"); if (buf_len < len) len = buf_len; - for (i = 0; i < len; i++) { - data[((i % 16) / 4)] |= - ((u32)aq_buffer[i]) << (8 * (i % 4)); - if ((i % 16) == 15) { - i40e_debug(hw, mask, - "\t0x%04X %08X %08X %08X %08X\n", - i - 15, data[0], data[1], data[2], - data[3]); - i40e_memset(data, 0, sizeof(data), - I40E_NONDMA_MEM); - } + /* write the full 16-byte chunks */ + for (i = 0; i < (len - 16); i += 16) + i40e_debug(hw, mask, + "\t0x%04X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", + i, buf[i], buf[i+1], buf[i+2], buf[i+3], + buf[i+4], buf[i+5], buf[i+6], buf[i+7], + buf[i+8], buf[i+9], buf[i+10], buf[i+11], + buf[i+12], buf[i+13], buf[i+14], buf[i+15]); + /* write whatever's left over without overrunning the buffer */ + if (i < len) { + char d_buf[80]; + int j = 0; + + memset(d_buf, 0, sizeof(d_buf)); + j += sprintf(d_buf, "\t0x%04X ", i); + while (i < len) + j += sprintf(&d_buf[j], " %02X", buf[i++]); + i40e_debug(hw, mask, "%s\n", d_buf); } - if ((i % 16) != 0) - i40e_debug(hw, mask, "\t0x%04X %08X %08X %08X %08X\n", - i - (i % 16), data[0], data[1], data[2], - data[3]); } } @@ -546,6 +550,30 @@ struct i40e_rx_ptype_decoded i40e_ptype_ /** + * i40e_validate_mac_addr - Validate unicast MAC address + * @mac_addr: pointer to MAC address + * + * Tests a MAC address to ensure it is a valid Individual Address + **/ +enum i40e_status_code i40e_validate_mac_addr(u8 *mac_addr) +{ + enum i40e_status_code status = I40E_SUCCESS; + + DEBUGFUNC("i40e_validate_mac_addr"); + + /* Broadcast addresses ARE multicast addresses + * Make sure it is not a multicast address + * Reject the zero address + */ + if (I40E_IS_MULTICAST(mac_addr) || + (mac_addr[0] == 0 && mac_addr[1] == 0 && mac_addr[2] == 0 && + mac_addr[3] == 0 && mac_addr[4] == 0 && mac_addr[5] == 0)) + status = I40E_ERR_INVALID_MAC_ADDR; + + return status; +} + +/** * i40e_init_shared_code - Initialize the shared code * @hw: pointer to hardware structure * @@ -560,7 +588,7 @@ struct i40e_rx_ptype_decoded i40e_ptype_ enum i40e_status_code i40e_init_shared_code(struct i40e_hw *hw) { enum i40e_status_code status = I40E_SUCCESS; - u32 reg; + u32 port, ari, func_rid; DEBUGFUNC("i40e_init_shared_code"); @@ -575,18 +603,17 @@ enum i40e_status_code i40e_init_shared_c hw->phy.get_link_info = TRUE; - /* Determine port number */ - reg = rd32(hw, I40E_PFGEN_PORTNUM); - reg = ((reg & I40E_PFGEN_PORTNUM_PORT_NUM_MASK) >> - I40E_PFGEN_PORTNUM_PORT_NUM_SHIFT); - hw->port = (u8)reg; - - /* Determine the PF number based on the PCI fn */ - reg = rd32(hw, I40E_GLPCI_CAPSUP); - if (reg & I40E_GLPCI_CAPSUP_ARI_EN_MASK) - hw->pf_id = (u8)((hw->bus.device << 3) | hw->bus.func); + /* Determine port number and PF number*/ + port = (rd32(hw, I40E_PFGEN_PORTNUM) & I40E_PFGEN_PORTNUM_PORT_NUM_MASK) + >> I40E_PFGEN_PORTNUM_PORT_NUM_SHIFT; + hw->port = (u8)port; + ari = (rd32(hw, I40E_GLPCI_CAPSUP) & I40E_GLPCI_CAPSUP_ARI_EN_MASK) >> + I40E_GLPCI_CAPSUP_ARI_EN_SHIFT; + func_rid = rd32(hw, I40E_PF_FUNC_RID); + if (ari) + hw->pf_id = (u8)(func_rid & 0xff); else - hw->pf_id = (u8)hw->bus.func; + hw->pf_id = (u8)(func_rid & 0x7); status = i40e_init_nvm(hw); return status; @@ -728,25 +755,60 @@ void i40e_pre_tx_queue_cfg(struct i40e_h } /** - * i40e_validate_mac_addr - Validate unicast MAC address - * @mac_addr: pointer to MAC address + * i40e_read_pba_string - Reads part number string from EEPROM + * @hw: pointer to hardware structure + * @pba_num: stores the part number string from the EEPROM + * @pba_num_size: part number string buffer length * - * Tests a MAC address to ensure it is a valid Individual Address + * Reads the part number string from the EEPROM. **/ -enum i40e_status_code i40e_validate_mac_addr(u8 *mac_addr) +enum i40e_status_code i40e_read_pba_string(struct i40e_hw *hw, u8 *pba_num, + u32 pba_num_size) { enum i40e_status_code status = I40E_SUCCESS; + u16 pba_word = 0; + u16 pba_size = 0; + u16 pba_ptr = 0; + u16 i = 0; + + status = i40e_read_nvm_word(hw, I40E_SR_PBA_FLAGS, &pba_word); + if ((status != I40E_SUCCESS) || (pba_word != 0xFAFA)) { + DEBUGOUT("Failed to read PBA flags or flag is invalid.\n"); + return status; + } - DEBUGFUNC("i40e_validate_mac_addr"); + status = i40e_read_nvm_word(hw, I40E_SR_PBA_BLOCK_PTR, &pba_ptr); + if (status != I40E_SUCCESS) { + DEBUGOUT("Failed to read PBA Block pointer.\n"); + return status; + } - /* Broadcast addresses ARE multicast addresses - * Make sure it is not a multicast address - * Reject the zero address + status = i40e_read_nvm_word(hw, pba_ptr, &pba_size); + if (status != I40E_SUCCESS) { + DEBUGOUT("Failed to read PBA Block size.\n"); + return status; + } + + /* Subtract one to get PBA word count (PBA Size word is included in + * total size) */ - if (I40E_IS_MULTICAST(mac_addr) || - (mac_addr[0] == 0 && mac_addr[1] == 0 && mac_addr[2] == 0 && - mac_addr[3] == 0 && mac_addr[4] == 0 && mac_addr[5] == 0)) - status = I40E_ERR_INVALID_MAC_ADDR; + pba_size--; + if (pba_num_size < (((u32)pba_size * 2) + 1)) { + DEBUGOUT("Buffer to small for PBA data.\n"); + return I40E_ERR_PARAM; + } + + for (i = 0; i < pba_size; i++) { + status = i40e_read_nvm_word(hw, (pba_ptr + 1) + i, &pba_word); + if (status != I40E_SUCCESS) { + DEBUGOUT1("Failed to read PBA Block word %d.\n", i); + return status; + } + + pba_num[(i * 2)] = (pba_word >> 8) & 0xFF; + pba_num[(i * 2) + 1] = pba_word & 0xFF; + } + pba_num[(pba_size * 2)] = '\0'; return status; } @@ -799,7 +861,7 @@ static enum i40e_media_type i40e_get_med return media; } -#define I40E_PF_RESET_WAIT_COUNT 100 +#define I40E_PF_RESET_WAIT_COUNT 110 /** * i40e_pf_reset - Reset the PF * @hw: pointer to the hardware structure @@ -818,8 +880,9 @@ enum i40e_status_code i40e_pf_reset(stru * The grst delay value is in 100ms units, and we'll wait a * couple counts longer to be sure we don't just miss the end. */ - grst_del = rd32(hw, I40E_GLGEN_RSTCTL) & I40E_GLGEN_RSTCTL_GRSTDEL_MASK - >> I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT; + grst_del = (rd32(hw, I40E_GLGEN_RSTCTL) & + I40E_GLGEN_RSTCTL_GRSTDEL_MASK) >> + I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT; for (cnt = 0; cnt < grst_del + 2; cnt++) { reg = rd32(hw, I40E_GLGEN_RSTAT); if (!(reg & I40E_GLGEN_RSTAT_DEVSTATE_MASK)) @@ -1010,8 +1073,11 @@ static u32 i40e_led_is_mine(struct i40e_ return gpio_val; } -#define I40E_LED0 22 +#define I40E_COMBINED_ACTIVITY 0xA +#define I40E_FILTER_ACTIVITY 0xE #define I40E_LINK_ACTIVITY 0xC +#define I40E_MAC_ACTIVITY 0xD +#define I40E_LED0 22 /** * i40e_led_get - return current on/off mode @@ -1024,6 +1090,7 @@ static u32 i40e_led_is_mine(struct i40e_ **/ u32 i40e_led_get(struct i40e_hw *hw) { + u32 current_mode = 0; u32 mode = 0; int i; @@ -1036,6 +1103,20 @@ u32 i40e_led_get(struct i40e_hw *hw) if (!gpio_val) continue; + /* ignore gpio LED src mode entries related to the activity + * LEDs + */ + current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) + >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); + switch (current_mode) { + case I40E_COMBINED_ACTIVITY: + case I40E_FILTER_ACTIVITY: + case I40E_MAC_ACTIVITY: + continue; + default: + break; + } + mode = (gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT; break; @@ -1055,6 +1136,7 @@ u32 i40e_led_get(struct i40e_hw *hw) **/ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink) { + u32 current_mode = 0; int i; if (mode & 0xfffffff0) @@ -1069,6 +1151,20 @@ void i40e_led_set(struct i40e_hw *hw, u3 if (!gpio_val) continue; + /* ignore gpio LED src mode entries related to the activity + * LEDs + */ + current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) + >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); + switch (current_mode) { + case I40E_COMBINED_ACTIVITY: + case I40E_FILTER_ACTIVITY: + case I40E_MAC_ACTIVITY: + continue; + default: + break; + } + gpio_val &= ~I40E_GLGEN_GPIO_CTL_LED_MODE_MASK; /* this & is a bit of paranoia, but serves as a range check */ gpio_val |= ((mode << I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT) & @@ -1077,8 +1173,10 @@ void i40e_led_set(struct i40e_hw *hw, u3 if (mode == I40E_LINK_ACTIVITY) blink = FALSE; - gpio_val |= (blink ? 1 : 0) << - I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT; + if (blink) + gpio_val |= (1 << I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); + else + gpio_val &= ~(1 << I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); wr32(hw, I40E_GLGEN_GPIO_CTL(i), gpio_val); break; @@ -1207,7 +1305,7 @@ enum i40e_status_code i40e_set_fc(struct return status; } - memset(&config, 0, sizeof(struct i40e_aq_set_phy_config)); + memset(&config, 0, sizeof(config)); /* clear the old pause settings */ config.abilities = abilities.abilities & ~(I40E_AQ_PHY_FLAG_PAUSE_TX) & ~(I40E_AQ_PHY_FLAG_PAUSE_RX); @@ -1230,14 +1328,14 @@ enum i40e_status_code i40e_set_fc(struct *aq_failures |= I40E_SET_FC_AQ_FAIL_SET; } /* Update the link info */ - status = i40e_update_link_info(hw, TRUE); + status = i40e_aq_get_link_info(hw, TRUE, NULL, NULL); if (status) { /* Wait a little bit (on 40G cards it sometimes takes a really * long time for link to come back from the atomic reset) * and try once more */ i40e_msec_delay(1000); - status = i40e_update_link_info(hw, TRUE); + status = i40e_aq_get_link_info(hw, TRUE, NULL, NULL); } if (status) *aq_failures |= I40E_SET_FC_AQ_FAIL_UPDATE; @@ -1375,7 +1473,7 @@ enum i40e_status_code i40e_aq_get_link_i /* save off old link status information */ i40e_memcpy(&hw->phy.link_info_old, hw_link_info, - sizeof(struct i40e_link_status), I40E_NONDMA_TO_NONDMA); + sizeof(*hw_link_info), I40E_NONDMA_TO_NONDMA); /* update link status */ hw_link_info->phy_type = (enum i40e_aq_phy_type)resp->phy_type; @@ -1412,7 +1510,7 @@ enum i40e_status_code i40e_aq_get_link_i /* save link status information */ if (link) - i40e_memcpy(link, hw_link_info, sizeof(struct i40e_link_status), + i40e_memcpy(link, hw_link_info, sizeof(*hw_link_info), I40E_NONDMA_TO_NONDMA); /* flag cleared so helper functions don't call AQ again */ @@ -1423,36 +1521,6 @@ aq_get_link_info_exit: } /** - * i40e_update_link_info - * @hw: pointer to the hw struct - * @enable_lse: enable/disable LinkStatusEvent reporting - * - * Returns the link status of the adapter - **/ -enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw, - bool enable_lse) -{ - struct i40e_aq_get_phy_abilities_resp abilities; - enum i40e_status_code status; - - status = i40e_aq_get_link_info(hw, enable_lse, NULL, NULL); - if (status) - return status; - - status = i40e_aq_get_phy_capabilities(hw, FALSE, false, - &abilities, NULL); - if (status) - return status; - - if (abilities.abilities & I40E_AQ_PHY_AN_ENABLED) - hw->phy.link_info.an_enabled = TRUE; - else - hw->phy.link_info.an_enabled = FALSE; - - return status; -} - -/** * i40e_aq_set_phy_int_mask * @hw: pointer to the hw struct * @mask: interrupt mask to be set @@ -1904,6 +1972,7 @@ enum i40e_status_code i40e_aq_get_switch * @hw: pointer to the hw struct * @fw_major_version: firmware major version * @fw_minor_version: firmware minor version + * @fw_build: firmware build number * @api_major_version: major queue version * @api_minor_version: minor queue version * @cmd_details: pointer to command details structure or NULL @@ -1912,6 +1981,7 @@ enum i40e_status_code i40e_aq_get_switch **/ enum i40e_status_code i40e_aq_get_firmware_version(struct i40e_hw *hw, u16 *fw_major_version, u16 *fw_minor_version, + u32 *fw_build, u16 *api_major_version, u16 *api_minor_version, struct i40e_asq_cmd_details *cmd_details) { @@ -1929,6 +1999,8 @@ enum i40e_status_code i40e_aq_get_firmwa *fw_major_version = LE16_TO_CPU(resp->fw_major); if (fw_minor_version != NULL) *fw_minor_version = LE16_TO_CPU(resp->fw_minor); + if (fw_build != NULL) + *fw_build = LE32_TO_CPU(resp->fw_build); if (api_major_version != NULL) *api_major_version = LE16_TO_CPU(resp->api_major); if (api_minor_version != NULL) @@ -1969,7 +2041,7 @@ enum i40e_status_code i40e_aq_send_drive i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_driver_version); - desc.flags |= CPU_TO_LE16(I40E_AQ_FLAG_SI); + desc.flags |= CPU_TO_LE16(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD); cmd->driver_major_ver = dv->major_version; cmd->driver_minor_ver = dv->minor_version; cmd->driver_build_ver = dv->build_version; @@ -2173,7 +2245,7 @@ enum i40e_status_code i40e_aq_add_macvla if (count == 0 || !mv_list || !hw) return I40E_ERR_PARAM; - buf_size = count * sizeof(struct i40e_aqc_add_macvlan_element_data); + buf_size = count * sizeof(*mv_list); /* prep the rest of the request */ i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_add_macvlan); @@ -2215,7 +2287,7 @@ enum i40e_status_code i40e_aq_remove_mac if (count == 0 || !mv_list || !hw) return I40E_ERR_PARAM; - buf_size = count * sizeof(struct i40e_aqc_remove_macvlan_element_data); + buf_size = count * sizeof(*mv_list); /* prep the rest of the request */ i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_remove_macvlan); @@ -2255,7 +2327,7 @@ enum i40e_status_code i40e_aq_add_vlan(s if (count == 0 || !v_list || !hw) return I40E_ERR_PARAM; - buf_size = count * sizeof(struct i40e_aqc_add_remove_vlan_element_data); + buf_size = count * sizeof(*v_list); /* prep the rest of the request */ i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_add_vlan); @@ -2295,7 +2367,7 @@ enum i40e_status_code i40e_aq_remove_vla if (count == 0 || !v_list || !hw) return I40E_ERR_PARAM; - buf_size = count * sizeof(struct i40e_aqc_add_remove_vlan_element_data); + buf_size = count * sizeof(*v_list); /* prep the rest of the request */ i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_remove_vlan); @@ -2353,6 +2425,41 @@ enum i40e_status_code i40e_aq_send_msg_t } /** + * i40e_aq_debug_read_register *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Nov 24 12:11:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7C10A35049; Tue, 24 Nov 2015 12:11:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93D4518C9; Tue, 24 Nov 2015 12:11:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAOCBuSB082622; Tue, 24 Nov 2015 12:11:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAOCBuID082621; Tue, 24 Nov 2015 12:11:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511241211.tAOCBuID082621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 24 Nov 2015 12:11:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291249 - head/sys/ofed/include/rdma X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 12:11:57 -0000 Author: hselasky Date: Tue Nov 24 12:11:56 2015 New Revision: 291249 URL: https://svnweb.freebsd.org/changeset/base/291249 Log: Add some defines needed by the coming mlx5 infiniband support. Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/ofed/include/rdma/ib_pma.h Modified: head/sys/ofed/include/rdma/ib_pma.h ============================================================================== --- head/sys/ofed/include/rdma/ib_pma.h Tue Nov 24 11:09:39 2015 (r291248) +++ head/sys/ofed/include/rdma/ib_pma.h Tue Nov 24 12:11:56 2015 (r291249) @@ -37,6 +37,25 @@ #include +#define MAX_U32 0xffffffffULL +#define MAX_U16 0xffffUL + +/* Counters should be saturate once they reach their maximum value */ +#define ASSIGN_32BIT_COUNTER(counter, value) do { \ + if ((value) > MAX_U32) \ + counter = cpu_to_be32(MAX_U32); \ + else \ + counter = cpu_to_be32(value); \ +} while (0) + +/* Counters should be saturate once they reach their maximum value */ +#define ASSIGN_16BIT_COUNTER(counter, value) do { \ + if ((value) > MAX_U16) \ + counter = cpu_to_be16(MAX_U16); \ + else \ + counter = cpu_to_be16(value); \ +} while (0) + /* * PMA class portinfo capability mask bits */ From owner-svn-src-all@freebsd.org Tue Nov 24 12:17:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13225A35106; Tue, 24 Nov 2015 12:17:02 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDDC41B0E; Tue, 24 Nov 2015 12:17:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAOCH0nJ084764; Tue, 24 Nov 2015 12:17:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAOCH0v9084763; Tue, 24 Nov 2015 12:17:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511241217.tAOCH0v9084763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 24 Nov 2015 12:17: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: r291250 - 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 12:17:02 -0000 Author: hselasky Date: Tue Nov 24 12:17:00 2015 New Revision: 291250 URL: https://svnweb.freebsd.org/changeset/base/291250 Log: MFC r290326: Relax the BUS_DMA_KEEP_PG_OFFSET requirement to allow optimising allocation of DMA bounce buffers. Discussed with: ian @ Modified: stable/10/sys/dev/usb/usb_busdma.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usb_busdma.c ============================================================================== --- stable/10/sys/dev/usb/usb_busdma.c Tue Nov 24 12:11:56 2015 (r291249) +++ stable/10/sys/dev/usb/usb_busdma.c Tue Nov 24 12:17:00 2015 (r291250) @@ -474,9 +474,13 @@ usb_pc_common_mem_cb(void *arg, bus_dma_ pc->page_offset_buf = rem; pc->page_offset_end += rem; #ifdef USB_DEBUG - if (rem != (USB_P2U(pc->buffer) & (USB_PAGE_SIZE - 1))) { + if (nseg > 1 && + ((segs->ds_addr + segs->ds_len) & (USB_PAGE_SIZE - 1)) != + ((segs + 1)->ds_addr & (USB_PAGE_SIZE - 1))) { /* - * This check verifies that the physical address is correct: + * This check verifies there is no page offset hole + * between the first and second segment. See the + * BUS_DMA_KEEP_PG_OFFSET flag. */ DPRINTFN(0, "Page offset was not preserved\n"); error = 1; From owner-svn-src-all@freebsd.org Tue Nov 24 12:19:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E390A3518F; Tue, 24 Nov 2015 12:19:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C41C11CA0; Tue, 24 Nov 2015 12:19:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAOCJKFb084908; Tue, 24 Nov 2015 12:19:20 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAOCJKXr084907; Tue, 24 Nov 2015 12:19:20 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511241219.tAOCJKXr084907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 24 Nov 2015 12:19:20 +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: r291251 - 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 12:19:22 -0000 Author: hselasky Date: Tue Nov 24 12:19:20 2015 New Revision: 291251 URL: https://svnweb.freebsd.org/changeset/base/291251 Log: MFC r290326: Relax the BUS_DMA_KEEP_PG_OFFSET requirement to allow optimising allocation of DMA bounce buffers. Discussed with: ian @ Modified: stable/9/sys/dev/usb/usb_busdma.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/usb_busdma.c ============================================================================== --- stable/9/sys/dev/usb/usb_busdma.c Tue Nov 24 12:17:00 2015 (r291250) +++ stable/9/sys/dev/usb/usb_busdma.c Tue Nov 24 12:19:20 2015 (r291251) @@ -468,9 +468,13 @@ usb_pc_common_mem_cb(void *arg, bus_dma_ pc->page_offset_buf = rem; pc->page_offset_end += rem; #ifdef USB_DEBUG - if (rem != (USB_P2U(pc->buffer) & (USB_PAGE_SIZE - 1))) { + if (nseg > 1 && + ((segs->ds_addr + segs->ds_len) & (USB_PAGE_SIZE - 1)) != + ((segs + 1)->ds_addr & (USB_PAGE_SIZE - 1))) { /* - * This check verifies that the physical address is correct: + * This check verifies there is no page offset hole + * between the first and second segment. See the + * BUS_DMA_KEEP_PG_OFFSET flag. */ DPRINTFN(0, "Page offset was not preserved\n"); error = 1; From owner-svn-src-all@freebsd.org Tue Nov 24 12:23:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A703A3542F; Tue, 24 Nov 2015 12:23:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41DB01371; Tue, 24 Nov 2015 12:23:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAOCNFvT087756; Tue, 24 Nov 2015 12:23:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAOCNFZ3087755; Tue, 24 Nov 2015 12:23:15 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511241223.tAOCNFZ3087755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 24 Nov 2015 12:23:15 +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: r291252 - 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 12:23:16 -0000 Author: hselasky Date: Tue Nov 24 12:23:15 2015 New Revision: 291252 URL: https://svnweb.freebsd.org/changeset/base/291252 Log: MFC r290326: Relax the BUS_DMA_KEEP_PG_OFFSET requirement to allow optimising allocation of DMA bounce buffers. Discussed with: ian @ Modified: stable/8/sys/dev/usb/usb_busdma.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_busdma.c ============================================================================== --- stable/8/sys/dev/usb/usb_busdma.c Tue Nov 24 12:19:20 2015 (r291251) +++ stable/8/sys/dev/usb/usb_busdma.c Tue Nov 24 12:23:15 2015 (r291252) @@ -439,9 +439,13 @@ usb_pc_common_mem_cb(void *arg, bus_dma_ pc->page_offset_buf = rem; pc->page_offset_end += rem; #ifdef USB_DEBUG - if (rem != (USB_P2U(pc->buffer) & (USB_PAGE_SIZE - 1))) { + if (nseg > 1 && + ((segs->ds_addr + segs->ds_len) & (USB_PAGE_SIZE - 1)) != + ((segs + 1)->ds_addr & (USB_PAGE_SIZE - 1))) { /* - * This check verifies that the physical address is correct: + * This check verifies there is no page offset hole + * between the first and second segment. See the + * BUS_DMA_KEEP_PG_OFFSET flag. */ DPRINTFN(0, "Page offset was not preserved\n"); error = 1; From owner-svn-src-all@freebsd.org Tue Nov 24 12:25:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CCC1A354B8; Tue, 24 Nov 2015 12:25:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC2FD159B; Tue, 24 Nov 2015 12:25:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAOCPYwF087889; Tue, 24 Nov 2015 12:25:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAOCPYBW087888; Tue, 24 Nov 2015 12:25:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511241225.tAOCPYBW087888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 24 Nov 2015 12:25: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: r291253 - stable/10/usr.sbin/bluetooth/bthidd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 12:25:36 -0000 Author: hselasky Date: Tue Nov 24 12:25:34 2015 New Revision: 291253 URL: https://svnweb.freebsd.org/changeset/base/291253 Log: MFC r291145: Fix scancodes for Kana and Eisu keys. PR: 204709 Modified: stable/10/usr.sbin/bluetooth/bthidd/kbd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bluetooth/bthidd/kbd.c ============================================================================== --- stable/10/usr.sbin/bluetooth/bthidd/kbd.c Tue Nov 24 12:23:15 2015 (r291252) +++ stable/10/usr.sbin/bluetooth/bthidd/kbd.c Tue Nov 24 12:25:34 2015 (r291253) @@ -225,8 +225,8 @@ static int32_t const x[] = /* Keyboard Int'l 7 8D */ -1, /* Unassigned */ /* Keyboard Int'l 8 8E */ -1, /* Unassigned */ /* Keyboard Int'l 9 8F */ -1, /* Unassigned */ -/* Keyboard Lang 1 90 */ 0x71, /* eisu */ -/* Keyboard Lang 2 91 */ 0x72, /* kana */ +/* Keyboard Lang 1 90 */ 0x71, /* Kana */ +/* Keyboard Lang 2 91 */ 0x72, /* Eisu */ /* Keyboard Lang 3 92 */ 0x78, /* F8 */ /* Keyboard Lang 4 93 */ 0x77, /* F7 */ /* Keyboard Lang 5 94 */ 0x76, /* F6 */ From owner-svn-src-all@freebsd.org Tue Nov 24 12:28:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13532A35556; Tue, 24 Nov 2015 12:28:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4B2C18DE; Tue, 24 Nov 2015 12:28:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAOCSamo088047; Tue, 24 Nov 2015 12:28:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAOCSaaG088046; Tue, 24 Nov 2015 12:28:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511241228.tAOCSaaG088046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 24 Nov 2015 12:28: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: r291254 - stable/10/sys/dev/usb/input X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 12:28:38 -0000 Author: hselasky Date: Tue Nov 24 12:28:36 2015 New Revision: 291254 URL: https://svnweb.freebsd.org/changeset/base/291254 Log: MFC r291146: Add support for Kana and Eisu keys to the USB keyboard driver. PR: 204709 Modified: stable/10/sys/dev/usb/input/ukbd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/10/sys/dev/usb/input/ukbd.c Tue Nov 24 12:25:34 2015 (r291253) +++ stable/10/sys/dev/usb/input/ukbd.c Tue Nov 24 12:28:36 2015 (r291254) @@ -302,6 +302,10 @@ static const struct ukbd_mods ukbd_mods[ * 0x68: F13 * 0x69: F14 * 0x6a: F15 + * + * USB Apple Keyboard JIS generates: + * 0x90: Kana + * 0x91: Eisu */ static const uint8_t ukbd_trtab[256] = { 0, 0, 0, 0, 30, 48, 46, 32, /* 00 - 07 */ @@ -322,7 +326,7 @@ static const uint8_t ukbd_trtab[256] = { 109, 110, 112, 118, 114, 116, 117, 119, /* 78 - 7F */ 121, 120, NN, NN, NN, NN, NN, 123, /* 80 - 87 */ 124, 125, 126, 127, 128, NN, NN, NN, /* 88 - 8F */ - NN, NN, NN, NN, NN, NN, NN, NN, /* 90 - 97 */ + 129, 130, NN, NN, NN, NN, NN, NN, /* 90 - 97 */ NN, NN, NN, NN, NN, NN, NN, NN, /* 98 - 9F */ NN, NN, NN, NN, NN, NN, NN, NN, /* A0 - A7 */ NN, NN, NN, NN, NN, NN, NN, NN, /* A8 - AF */ @@ -2070,7 +2074,7 @@ ukbd_key2scan(struct ukbd_softc *sc, int 0x166, /* Sun Type 6 Find */ 0x167, /* Sun Type 6 Cut */ 0x125, /* Sun Type 6 Mute */ - /* 120 - 128 */ + /* 120 - 130 */ 0x11f, /* Sun Type 6 VolumeDown */ 0x11e, /* Sun Type 6 VolumeUp */ 0x120, /* Sun Type 6 PowerDown */ @@ -2082,6 +2086,8 @@ ukbd_key2scan(struct ukbd_softc *sc, int 0x79, /* Keyboard Intl' 4 (Henkan) */ 0x7b, /* Keyboard Intl' 5 (Muhenkan) */ 0x5c, /* Keyboard Intl' 6 (Keypad ,) (For PC-9821 layout) */ + 0x71, /* Apple Keyboard JIS (Kana) */ + 0x72, /* Apple Keyboard JIS (Eisu) */ }; if ((code >= 89) && (code < (int)(89 + (sizeof(scan) / sizeof(scan[0]))))) { From owner-svn-src-all@freebsd.org Tue Nov 24 12:30:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A45FA35615; Tue, 24 Nov 2015 12:30:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DE941BAF; Tue, 24 Nov 2015 12:30:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAOCULe7088185; Tue, 24 Nov 2015 12:30:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAOCULjY088184; Tue, 24 Nov 2015 12:30:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511241230.tAOCULjY088184@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 24 Nov 2015 12: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: r291255 - stable/9/sys/dev/usb/input X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 12:30:22 -0000 Author: hselasky Date: Tue Nov 24 12:30:21 2015 New Revision: 291255 URL: https://svnweb.freebsd.org/changeset/base/291255 Log: MFC r291146: Add support for Kana and Eisu keys to the USB keyboard driver. PR: 204709 Modified: stable/9/sys/dev/usb/input/ukbd.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/9/sys/dev/usb/input/ukbd.c Tue Nov 24 12:28:36 2015 (r291254) +++ stable/9/sys/dev/usb/input/ukbd.c Tue Nov 24 12:30:21 2015 (r291255) @@ -298,6 +298,10 @@ static const struct ukbd_mods ukbd_mods[ * 0x68: F13 * 0x69: F14 * 0x6a: F15 + * + * USB Apple Keyboard JIS generates: + * 0x90: Kana + * 0x91: Eisu */ static const uint8_t ukbd_trtab[256] = { 0, 0, 0, 0, 30, 48, 46, 32, /* 00 - 07 */ @@ -318,7 +322,7 @@ static const uint8_t ukbd_trtab[256] = { 109, 110, 112, 118, 114, 116, 117, 119, /* 78 - 7F */ 121, 120, NN, NN, NN, NN, NN, 123, /* 80 - 87 */ 124, 125, 126, 127, 128, NN, NN, NN, /* 88 - 8F */ - NN, NN, NN, NN, NN, NN, NN, NN, /* 90 - 97 */ + 129, 130, NN, NN, NN, NN, NN, NN, /* 90 - 97 */ NN, NN, NN, NN, NN, NN, NN, NN, /* 98 - 9F */ NN, NN, NN, NN, NN, NN, NN, NN, /* A0 - A7 */ NN, NN, NN, NN, NN, NN, NN, NN, /* A8 - AF */ @@ -2051,7 +2055,7 @@ ukbd_key2scan(struct ukbd_softc *sc, int 0x166, /* Sun Type 6 Find */ 0x167, /* Sun Type 6 Cut */ 0x125, /* Sun Type 6 Mute */ - /* 120 - 128 */ + /* 120 - 130 */ 0x11f, /* Sun Type 6 VolumeDown */ 0x11e, /* Sun Type 6 VolumeUp */ 0x120, /* Sun Type 6 PowerDown */ @@ -2063,6 +2067,8 @@ ukbd_key2scan(struct ukbd_softc *sc, int 0x79, /* Keyboard Intl' 4 (Henkan) */ 0x7b, /* Keyboard Intl' 5 (Muhenkan) */ 0x5c, /* Keyboard Intl' 6 (Keypad ,) (For PC-9821 layout) */ + 0x71, /* Apple Keyboard JIS (Kana) */ + 0x72, /* Apple Keyboard JIS (Eisu) */ }; if ((code >= 89) && (code < (int)(89 + (sizeof(scan) / sizeof(scan[0]))))) { From owner-svn-src-all@freebsd.org Tue Nov 24 12:32:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A573A35684; Tue, 24 Nov 2015 12:32:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 284D01DFC; Tue, 24 Nov 2015 12:32:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAOCWGBx088929; Tue, 24 Nov 2015 12:32:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAOCWGs3088928; Tue, 24 Nov 2015 12:32:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511241232.tAOCWGs3088928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 24 Nov 2015 12:32:16 +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: r291256 - stable/8/sys/dev/usb/input X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 12:32:17 -0000 Author: hselasky Date: Tue Nov 24 12:32:15 2015 New Revision: 291256 URL: https://svnweb.freebsd.org/changeset/base/291256 Log: MFC r291146: Add support for Kana and Eisu keys to the USB keyboard driver. PR: 204709 Modified: stable/8/sys/dev/usb/input/ukbd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/8/sys/dev/usb/input/ukbd.c Tue Nov 24 12:30:21 2015 (r291255) +++ stable/8/sys/dev/usb/input/ukbd.c Tue Nov 24 12:32:15 2015 (r291256) @@ -273,6 +273,10 @@ static const struct ukbd_mods ukbd_mods[ * 0x68: F13 * 0x69: F14 * 0x6a: F15 + * + * USB Apple Keyboard JIS generates: + * 0x90: Kana + * 0x91: Eisu */ static const uint8_t ukbd_trtab[256] = { 0, 0, 0, 0, 30, 48, 46, 32, /* 00 - 07 */ @@ -293,7 +297,7 @@ static const uint8_t ukbd_trtab[256] = { 109, 110, 112, 118, 114, 116, 117, 119, /* 78 - 7F */ 121, 120, NN, NN, NN, NN, NN, 123, /* 80 - 87 */ 124, 125, 126, 127, 128, NN, NN, NN, /* 88 - 8F */ - NN, NN, NN, NN, NN, NN, NN, NN, /* 90 - 97 */ + 129, 130, NN, NN, NN, NN, NN, NN, /* 90 - 97 */ NN, NN, NN, NN, NN, NN, NN, NN, /* 98 - 9F */ NN, NN, NN, NN, NN, NN, NN, NN, /* A0 - A7 */ NN, NN, NN, NN, NN, NN, NN, NN, /* A8 - AF */ @@ -2121,7 +2125,7 @@ ukbd_key2scan(struct ukbd_softc *sc, int 0x166, /* Sun Type 6 Find */ 0x167, /* Sun Type 6 Cut */ 0x125, /* Sun Type 6 Mute */ - /* 120 - 128 */ + /* 120 - 130 */ 0x11f, /* Sun Type 6 VolumeDown */ 0x11e, /* Sun Type 6 VolumeUp */ 0x120, /* Sun Type 6 PowerDown */ @@ -2133,6 +2137,8 @@ ukbd_key2scan(struct ukbd_softc *sc, int 0x79, /* Keyboard Intl' 4 (Henkan) */ 0x7b, /* Keyboard Intl' 5 (Muhenkan) */ 0x5c, /* Keyboard Intl' 6 (Keypad ,) (For PC-9821 layout) */ + 0x71, /* Apple Keyboard JIS (Kana) */ + 0x72, /* Apple Keyboard JIS (Eisu) */ }; if ((code >= 89) && (code < (int)(89 + (sizeof(scan) / sizeof(scan[0]))))) { From owner-svn-src-all@freebsd.org Tue Nov 24 13:47:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7687AA36805; Tue, 24 Nov 2015 13:47:22 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4112D1191; Tue, 24 Nov 2015 13:47:22 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAODlLr0014711; Tue, 24 Nov 2015 13:47:21 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAODlLuA014710; Tue, 24 Nov 2015 13:47:21 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201511241347.tAODlLuA014710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Tue, 24 Nov 2015 13:47:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291257 - head/usr.bin/calendar/calendars X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 13:47:22 -0000 Author: lidl Date: Tue Nov 24 13:47:21 2015 New Revision: 291257 URL: https://svnweb.freebsd.org/changeset/base/291257 Log: Add myself (lidl) to the calendar.freebsd file. Approved by: rpaulo (mentor) Differential Revision: https://reviews.freebsd.org/D4264 Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Nov 24 12:32:15 2015 (r291256) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue Nov 24 13:47:21 2015 (r291257) @@ -155,6 +155,7 @@ 05/09 Aaron Dalton born in Boise, Idaho, United States, 1973 05/09 Jase Thew born in Abergavenny, Gwent, United Kingdom, 1974 05/10 Markus Brueffer born in Gronau, Nordrhein-Westfalen, Germany, 1977 +05/11 Kurt Lidl born in Rockville, Maryland, United States, 1968 05/11 Jesus Rodriguez born in Barcelona, Spain, 1972 05/11 Roman Kurakin born in Moscow, USSR, 1979 05/11 Ulrich Spoerlein born in Schesslitz, Bayern, Germany, 1981 From owner-svn-src-all@freebsd.org Tue Nov 24 13:57:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 327CEA36AF8; Tue, 24 Nov 2015 13:57:43 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 081B61810; Tue, 24 Nov 2015 13:57:42 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAODvgTk017549; Tue, 24 Nov 2015 13:57:42 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAODvfvD017547; Tue, 24 Nov 2015 13:57:41 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201511241357.tAODvfvD017547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Tue, 24 Nov 2015 13:57:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291258 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 13:57:43 -0000 Author: skra Date: Tue Nov 24 13:57:41 2015 New Revision: 291258 URL: https://svnweb.freebsd.org/changeset/base/291258 Log: Flush all kernel mappings from TLB(s) in time when they are cleared. Replace tlb_flush_local() by tlb_flush() as even not global mappings could be fetched to TLB(s) on other cores by speculative table walk. From OS point of view, it was not a problem as either such mappings were not used anymore or they were flushed from TLB(s) when reused. However, from hardware point of view, it was a problem. Not flushed mappings could be a target for speculative reads or prefetches (which might be quite aggresive on ARM cores). As speculative read can fill cacheline, it can cause a real problem, when physical page is reused, but mapped with different memory attributes. Anyhow, it's good to have only valid mappings in TLB(s). Approved by: kib (mentor) Modified: head/sys/arm/arm/pmap-v6-new.c head/sys/arm/include/sf_buf.h Modified: head/sys/arm/arm/pmap-v6-new.c ============================================================================== --- head/sys/arm/arm/pmap-v6-new.c Tue Nov 24 13:47:21 2015 (r291257) +++ head/sys/arm/arm/pmap-v6-new.c Tue Nov 24 13:57:41 2015 (r291258) @@ -1541,12 +1541,12 @@ pmap_pt2pg_zero(vm_page_t m) panic("%s: CMAP2 busy", __func__); pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(pa, PTE2_AP_KRW, m->md.pat_mode)); - tlb_flush_local((vm_offset_t)sysmaps->CADDR2); /* Even VM_ALLOC_ZERO request is only advisory. */ if ((m->flags & PG_ZERO) == 0) pagezero(sysmaps->CADDR2); pte2_sync_range((pt2_entry_t *)sysmaps->CADDR2, PAGE_SIZE); pte2_clear(sysmaps->CMAP2); + tlb_flush((vm_offset_t)sysmaps->CADDR2); sched_unpin(); mtx_unlock(&sysmaps->lock); @@ -5470,7 +5470,6 @@ pmap_page_set_memattr(vm_page_t m, vm_me struct sysmaps *sysmaps; vm_memattr_t oma; vm_paddr_t pa; - vm_offset_t va; oma = m->md.pat_mode; m->md.pat_mode = ma; @@ -5502,10 +5501,9 @@ pmap_page_set_memattr(vm_page_t m, vm_me if (*sysmaps->CMAP2) panic("%s: CMAP2 busy", __func__); pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(pa, PTE2_AP_KRW, ma)); - va = (vm_offset_t)sysmaps->CADDR2; - tlb_flush_local(va); - dcache_wbinv_poc(va, pa, PAGE_SIZE); + dcache_wbinv_poc((vm_offset_t)sysmaps->CADDR2, pa, PAGE_SIZE); pte2_clear(sysmaps->CMAP2); + tlb_flush((vm_offset_t)sysmaps->CADDR2); sched_unpin(); mtx_unlock(&sysmaps->lock); } @@ -5594,9 +5592,9 @@ pmap_zero_page(vm_page_t m) panic("%s: CMAP2 busy", __func__); pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(VM_PAGE_TO_PHYS(m), PTE2_AP_KRW, m->md.pat_mode)); - tlb_flush_local((vm_offset_t)sysmaps->CADDR2); pagezero(sysmaps->CADDR2); pte2_clear(sysmaps->CMAP2); + tlb_flush((vm_offset_t)sysmaps->CADDR2); sched_unpin(); mtx_unlock(&sysmaps->lock); } @@ -5619,12 +5617,12 @@ pmap_zero_page_area(vm_page_t m, int off panic("%s: CMAP2 busy", __func__); pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(VM_PAGE_TO_PHYS(m), PTE2_AP_KRW, m->md.pat_mode)); - tlb_flush_local((vm_offset_t)sysmaps->CADDR2); if (off == 0 && size == PAGE_SIZE) pagezero(sysmaps->CADDR2); else bzero(sysmaps->CADDR2 + off, size); pte2_clear(sysmaps->CMAP2); + tlb_flush((vm_offset_t)sysmaps->CADDR2); sched_unpin(); mtx_unlock(&sysmaps->lock); } @@ -5644,9 +5642,9 @@ pmap_zero_page_idle(vm_page_t m) sched_pin(); pte2_store(CMAP3, PTE2_KERN_NG(VM_PAGE_TO_PHYS(m), PTE2_AP_KRW, m->md.pat_mode)); - tlb_flush_local((vm_offset_t)CADDR3); pagezero(CADDR3); pte2_clear(CMAP3); + tlb_flush((vm_offset_t)CADDR3); sched_unpin(); } @@ -5670,13 +5668,13 @@ pmap_copy_page(vm_page_t src, vm_page_t panic("%s: CMAP2 busy", __func__); pte2_store(sysmaps->CMAP1, PTE2_KERN_NG(VM_PAGE_TO_PHYS(src), PTE2_AP_KR | PTE2_NM, src->md.pat_mode)); - tlb_flush_local((vm_offset_t)sysmaps->CADDR1); pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(VM_PAGE_TO_PHYS(dst), PTE2_AP_KRW, dst->md.pat_mode)); - tlb_flush_local((vm_offset_t)sysmaps->CADDR2); bcopy(sysmaps->CADDR1, sysmaps->CADDR2, PAGE_SIZE); pte2_clear(sysmaps->CMAP1); + tlb_flush((vm_offset_t)sysmaps->CADDR1); pte2_clear(sysmaps->CMAP2); + tlb_flush((vm_offset_t)sysmaps->CADDR2); sched_unpin(); mtx_unlock(&sysmaps->lock); } @@ -5721,7 +5719,9 @@ pmap_copy_pages(vm_page_t ma[], vm_offse xfersize -= cnt; } pte2_clear(sysmaps->CMAP1); + tlb_flush((vm_offset_t)sysmaps->CADDR1); pte2_clear(sysmaps->CMAP2); + tlb_flush((vm_offset_t)sysmaps->CADDR2); sched_unpin(); mtx_unlock(&sysmaps->lock); } @@ -5740,8 +5740,6 @@ pmap_quick_enter_page(vm_page_t m) pte2_store(pte2p, PTE2_KERN_NG(VM_PAGE_TO_PHYS(m), PTE2_AP_KRW, pmap_page_get_memattr(m))); - tlb_flush_local(qmap_addr); - return (qmap_addr); } @@ -5758,6 +5756,7 @@ pmap_quick_remove_page(vm_offset_t addr) KASSERT(pte2_load(pte2p) != 0, ("%s: PTE2 not in use", __func__)); pte2_clear(pte2p); + tlb_flush(qmap_addr); critical_exit(); } @@ -6059,9 +6058,9 @@ pmap_dcache_wb_pou(vm_paddr_t pa, vm_siz if (*sysmaps->CMAP3) panic("%s: CMAP3 busy", __func__); pte2_store(sysmaps->CMAP3, PTE2_KERN_NG(pa, PTE2_AP_KRW, ma)); - tlb_flush_local((vm_offset_t)sysmaps->CADDR3); dcache_wb_pou((vm_offset_t)sysmaps->CADDR3 + (pa & PAGE_MASK), size); pte2_clear(sysmaps->CMAP3); + tlb_flush((vm_offset_t)sysmaps->CADDR3); sched_unpin(); mtx_unlock(&sysmaps->lock); } @@ -6313,13 +6312,13 @@ pmap_zero_page_check(vm_page_t m) panic("%s: CMAP2 busy", __func__); pte2_store(sysmaps->CMAP2, PTE2_KERN_NG(VM_PAGE_TO_PHYS(m), PTE2_AP_KRW, m->md.pat_mode)); - tlb_flush_local((vm_offset_t)sysmaps->CADDR2); end = (uint32_t*)(sysmaps->CADDR2 + PAGE_SIZE); for (p = (uint32_t*)sysmaps->CADDR2; p < end; p++) if (*p != 0) panic("%s: page %p not zero, va: %p", __func__, m, sysmaps->CADDR2); pte2_clear(sysmaps->CMAP2); + tlb_flush((vm_offset_t)sysmaps->CADDR2); sched_unpin(); mtx_unlock(&sysmaps->lock); } Modified: head/sys/arm/include/sf_buf.h ============================================================================== --- head/sys/arm/include/sf_buf.h Tue Nov 24 13:47:21 2015 (r291257) +++ head/sys/arm/include/sf_buf.h Tue Nov 24 13:57:41 2015 (r291258) @@ -44,7 +44,11 @@ static inline int sf_buf_unmap(struct sf_buf *sf) { +#ifdef ARM_NEW_PMAP + pmap_qremove(sf->kva, 1); +#else pmap_kremove(sf->kva); +#endif return (1); } #endif /* !_MACHINE_SF_BUF_H_ */ From owner-svn-src-all@freebsd.org Tue Nov 24 14:25:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FFDAA362DE; Tue, 24 Nov 2015 14:25:41 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7746C187F; Tue, 24 Nov 2015 14:25:41 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAOEPeIW029638; Tue, 24 Nov 2015 14:25:40 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAOEPe5d029637; Tue, 24 Nov 2015 14:25:40 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511241425.tAOEPe5d029637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Tue, 24 Nov 2015 14:25:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291259 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 14:25:41 -0000 Author: ume Date: Tue Nov 24 14:25:40 2015 New Revision: 291259 URL: https://svnweb.freebsd.org/changeset/base/291259 Log: Correct alignment of the addresses in the `netstat -aW' output. Modified: head/usr.bin/netstat/inet.c Modified: head/usr.bin/netstat/inet.c ============================================================================== --- head/usr.bin/netstat/inet.c Tue Nov 24 13:57:41 2015 (r291258) +++ head/usr.bin/netstat/inet.c Tue Nov 24 14:25:40 2015 (r291259) @@ -84,7 +84,8 @@ __FBSDID("$FreeBSD$"); #include "netstat.h" char *inetname(struct in_addr *); -void inetprint(const char *, struct in_addr *, int, const char *, int); +void inetprint(const char *, struct in_addr *, int, const char *, int, + const int); #ifdef INET6 static int udp_done, tcp_done, sdp_done; #endif /* INET6 */ @@ -417,18 +418,24 @@ protopr(u_long off, const char *name, in if (Lflag) xo_emit((Aflag && !Wflag) ? "{T:/%-5.5s} {T:/%-14.14s} {T:/%-18.18s}" : - "{T:/%-5.5s} {T:/%-14.14s} {T:/%-22.22s}", + ((!Wflag || af1 == AF_INET) ? + "{T:/%-5.5s} {T:/%-14.14s} {T:/%-22.22s}" : + "{T:/%-5.5s} {T:/%-14.14s} {T:/%-45.45s}"), "Proto", "Listen", "Local Address"); else if (Tflag) xo_emit((Aflag && !Wflag) ? "{T:/%-5.5s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-18.18s} {T:/%s}" : - "{T:/%-5.5s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-22.22s} {T:/%s}", + ((!Wflag || af1 == AF_INET) ? + "{T:/%-5.5s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-22.22s} {T:/%s}" : + "{T:/%-5.5s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-45.45s} {T:/%s}"), "Proto", "Rexmit", "OOORcv", "0-win", "Local Address", "Foreign Address"); else { xo_emit((Aflag && !Wflag) ? "{T:/%-5.5s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-18.18s} {T:/%-18.18s}" : - "{T:/%-5.5s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-22.22s} {T:/%-22.22s}", + ((!Wflag || af1 == AF_INET) ? + "{T:/%-5.5s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-22.22s} {T:/%-22.22s}" : + "{T:/%-5.5s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-45.45s} {T:/%-45.45s}"), "Proto", "Recv-Q", "Send-Q", "Local Address", "Foreign Address"); if (!xflag && !Rflag) @@ -499,10 +506,10 @@ protopr(u_long off, const char *name, in if (numeric_port) { if (inp->inp_vflag & INP_IPV4) { inetprint("local", &inp->inp_laddr, - (int)inp->inp_lport, name, 1); + (int)inp->inp_lport, name, 1, af1); if (!Lflag) inetprint("remote", &inp->inp_faddr, - (int)inp->inp_fport, name, 1); + (int)inp->inp_fport, name, 1, af1); } #ifdef INET6 else if (inp->inp_vflag & INP_IPV6) { @@ -516,10 +523,10 @@ protopr(u_long off, const char *name, in } else if (inp->inp_flags & INP_ANONPORT) { if (inp->inp_vflag & INP_IPV4) { inetprint("local", &inp->inp_laddr, - (int)inp->inp_lport, name, 1); + (int)inp->inp_lport, name, 1, af1); if (!Lflag) inetprint("remote", &inp->inp_faddr, - (int)inp->inp_fport, name, 0); + (int)inp->inp_fport, name, 0, af1); } #ifdef INET6 else if (inp->inp_vflag & INP_IPV6) { @@ -533,11 +540,12 @@ protopr(u_long off, const char *name, in } else { if (inp->inp_vflag & INP_IPV4) { inetprint("local", &inp->inp_laddr, - (int)inp->inp_lport, name, 0); + (int)inp->inp_lport, name, 0, af1); if (!Lflag) inetprint("remote", &inp->inp_faddr, (int)inp->inp_fport, name, - inp->inp_lport != inp->inp_fport); + inp->inp_lport != inp->inp_fport, + af1); } #ifdef INET6 else if (inp->inp_vflag & INP_IPV6) { @@ -1364,7 +1372,7 @@ pim_stats(u_long off __unused, const cha */ void inetprint(const char *container, struct in_addr *in, int port, - const char *proto, int num_port) + const char *proto, int num_port, const int af1) { struct servent *sp = 0; char line[80], *cp; @@ -1384,7 +1392,8 @@ inetprint(const char *container, struct sprintf(cp, "%.15s ", sp ? sp->s_name : "*"); else sprintf(cp, "%d ", ntohs((u_short)port)); - width = (Aflag && !Wflag) ? 18 : 22; + width = (Aflag && !Wflag) ? 18 : + ((!Wflag || af1 == AF_INET) ? 22 : 45); if (Wflag) xo_emit("{d:target/%-*s} ", width, line); else From owner-svn-src-all@freebsd.org Tue Nov 24 16:06:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A838EA36E0B; Tue, 24 Nov 2015 16:06:16 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7178F1AEA; Tue, 24 Nov 2015 16:06:16 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAOG6FFE092523; Tue, 24 Nov 2015 16:06:15 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAOG6F51092521; Tue, 24 Nov 2015 16:06:15 GMT (envelope-from des@FreeBSD.org) Message-Id: <201511241606.tAOG6F51092521@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Tue, 24 Nov 2015 16:06:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291260 - head/crypto/openssh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 16:06:16 -0000 Author: des Date: Tue Nov 24 16:06:15 2015 New Revision: 291260 URL: https://svnweb.freebsd.org/changeset/base/291260 Log: Remove description of the now-defunct NoneEnabled option. Modified: head/crypto/openssh/session.c head/crypto/openssh/sshd_config Modified: head/crypto/openssh/session.c ============================================================================== --- head/crypto/openssh/session.c Tue Nov 24 14:25:40 2015 (r291259) +++ head/crypto/openssh/session.c Tue Nov 24 16:06:15 2015 (r291260) @@ -1432,7 +1432,8 @@ static void do_nologin(struct passwd *pw) { FILE *f = NULL; - char buf[1024], *nl, *def_nl = _PATH_NOLOGIN; + char buf[1024], *def_nl = _PATH_NOLOGIN; + const char *nl; struct stat sb; #ifdef HAVE_LOGIN_CAP Modified: head/crypto/openssh/sshd_config ============================================================================== --- head/crypto/openssh/sshd_config Tue Nov 24 14:25:40 2015 (r291259) +++ head/crypto/openssh/sshd_config Tue Nov 24 16:06:15 2015 (r291260) @@ -137,9 +137,6 @@ Subsystem sftp /usr/libexec/sftp-server # TCP receive socket buffer polling for HPN. Disable on non autotuning kernels. #TcpRcvBufPoll yes -# Allow the use of the NONE cipher. -#NoneEnabled no - # Example of overriding settings on a per-user basis #Match User anoncvs # X11Forwarding no From owner-svn-src-all@freebsd.org Tue Nov 24 16:07:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BFACA36EA4; Tue, 24 Nov 2015 16:07:04 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 656631C6C; Tue, 24 Nov 2015 16:07:04 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAOG73K3092868; Tue, 24 Nov 2015 16:07:03 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAOG73cN092867; Tue, 24 Nov 2015 16:07:03 GMT (envelope-from des@FreeBSD.org) Message-Id: <201511241607.tAOG73cN092867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Tue, 24 Nov 2015 16:07:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291261 - head/crypto/openssh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 16:07:04 -0000 Author: des Date: Tue Nov 24 16:07:03 2015 New Revision: 291261 URL: https://svnweb.freebsd.org/changeset/base/291261 Log: Revert inadvertent commit of an incorrect patch Modified: head/crypto/openssh/session.c Modified: head/crypto/openssh/session.c ============================================================================== --- head/crypto/openssh/session.c Tue Nov 24 16:06:15 2015 (r291260) +++ head/crypto/openssh/session.c Tue Nov 24 16:07:03 2015 (r291261) @@ -1432,8 +1432,7 @@ static void do_nologin(struct passwd *pw) { FILE *f = NULL; - char buf[1024], *def_nl = _PATH_NOLOGIN; - const char *nl; + char buf[1024], *nl, *def_nl = _PATH_NOLOGIN; struct stat sb; #ifdef HAVE_LOGIN_CAP From owner-svn-src-all@freebsd.org Tue Nov 24 16:10:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CBA5A36F93; Tue, 24 Nov 2015 16:10:22 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3981A1EE9; Tue, 24 Nov 2015 16:10:22 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAOGALWe094277; Tue, 24 Nov 2015 16:10:21 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAOGAL23094276; Tue, 24 Nov 2015 16:10:21 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201511241610.tAOGAL23094276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Tue, 24 Nov 2015 16:10:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291262 - head/sys/powerpc/aim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 16:10:22 -0000 Author: nwhitehorn Date: Tue Nov 24 16:10:21 2015 New Revision: 291262 URL: https://svnweb.freebsd.org/changeset/base/291262 Log: Use what we really mean (powerpc_lwsync()) rather than the Linux-compat mb() here and provide some more documentation on what, exactly, makes this code safe. Requested by and discussed with: kib, alc Modified: head/sys/powerpc/aim/slb.c Modified: head/sys/powerpc/aim/slb.c ============================================================================== --- head/sys/powerpc/aim/slb.c Tue Nov 24 16:07:03 2015 (r291261) +++ head/sys/powerpc/aim/slb.c Tue Nov 24 16:10:21 2015 (r291262) @@ -140,7 +140,7 @@ make_new_leaf(uint64_t esid, uint64_t sl * that a lockless searcher always sees a valid path through * the tree. */ - mb(); + powerpc_lwsync(); idx = esid2idx(esid, parent->ua_level); parent->u.ua_child[idx] = child; @@ -188,7 +188,7 @@ make_intermediate(uint64_t esid, struct idx = esid2idx(child->ua_base, inter->ua_level); inter->u.ua_child[idx] = child; setbit(&inter->ua_alloc, idx); - mb(); + powerpc_lwsync(); /* Set up parent to point to intermediate node ... */ idx = esid2idx(inter->ua_base, parent->ua_level); @@ -241,6 +241,12 @@ user_va_to_slb_entry(pmap_t pm, vm_offse return ((ua->u.slb_entries[idx].slbe & SLBE_VALID) ? &ua->u.slb_entries[idx] : NULL); + /* + * The following accesses are implicitly ordered under the POWER + * ISA by load dependencies (the store ordering is provided by + * the powerpc_lwsync() calls elsewhere) and so are run without + * barriers. + */ ua = ua->u.ua_child[idx]; if (ua == NULL || esid2base(esid, ua->ua_level) != ua->ua_base) From owner-svn-src-all@freebsd.org Tue Nov 24 18:51:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7E4FA368F9; Tue, 24 Nov 2015 18:51:18 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 835B015F9; Tue, 24 Nov 2015 18:51:18 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAOIpHck066860; Tue, 24 Nov 2015 18:51:17 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAOIpHRK066859; Tue, 24 Nov 2015 18:51:17 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201511241851.tAOIpHRK066859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 24 Nov 2015 18:51:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291263 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 18:51:18 -0000 Author: cem Date: Tue Nov 24 18:51:17 2015 New Revision: 291263 URL: https://svnweb.freebsd.org/changeset/base/291263 Log: ntb: Add MW tunable for MMR Xeon errata workaround Adds a new tunable, ntb.hw.b2b_mw_idx, which specifies the offset (from the total number of memory windows) to use for register access on hardware with the SDOORBELL_LOCKUP errata. The default is -1, i.e., the last memory window. We map BARs before the b2b_mw_idx is selected, so map them all as memory windows initially. The register memory window should not be write-combined, so we explicitly disable WC on the selected MW later. This introduces a layer of abstraction between consumer memory window indices, which exclude any exclusive errata-workaround BARs, and internal memory window indices, which include such BARs. An internal routine, ntb_user_mw_to_idx(), converts the former to the latter. Public APIs have been updated to use this instead of assuming the exclusive workaround BAR is the last available MW. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Nov 24 16:10:21 2015 (r291262) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Nov 24 18:51:17 2015 (r291263) @@ -264,11 +264,13 @@ bus_space_write_8(bus_space_tag_t tag, b static int ntb_probe(device_t device); static int ntb_attach(device_t device); static int ntb_detach(device_t device); +static unsigned ntb_user_mw_to_idx(struct ntb_softc *, unsigned uidx); static inline enum ntb_bar ntb_mw_to_bar(struct ntb_softc *, unsigned mw); static inline bool bar_is_64bit(struct ntb_softc *, enum ntb_bar); static inline void bar_get_xlat_params(struct ntb_softc *, enum ntb_bar, uint32_t *base, uint32_t *xlat, uint32_t *lmt); static int ntb_map_pci_bars(struct ntb_softc *ntb); +static int ntb_mw_set_wc_internal(struct ntb_softc *, unsigned idx, bool wc); static void print_map_success(struct ntb_softc *, struct ntb_pci_bar_info *, const char *); static int map_mmr_bar(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar); @@ -332,6 +334,14 @@ static unsigned g_ntb_enable_wc = 1; SYSCTL_UINT(_hw_ntb, OID_AUTO, enable_writecombine, CTLFLAG_RDTUN, &g_ntb_enable_wc, 0, "Set to 1 to map memory windows write combining"); +static int g_ntb_mw_idx = -1; +SYSCTL_INT(_hw_ntb, OID_AUTO, b2b_mw_idx, CTLFLAG_RDTUN, &g_ntb_mw_idx, + 0, "Use this memory window to access the peer NTB registers. A " + "non-negative value starts from the first MW index; a negative value " + "starts from the last MW index. The default is -1, i.e., the last " + "available memory window. Both sides of the NTB MUST set the same " + "value here! (Applies on Xeon platforms with SDOORBELL_LOCKUP errata.)"); + static struct ntb_hw_info pci_ids[] = { /* XXX: PS/SS IDs left out until they are supported. */ { 0x0C4E8086, "BWD Atom Processor S1200 Non-Transparent Bridge B2B", @@ -579,11 +589,6 @@ ntb_detach(device_t device) mtx_destroy(&ntb->db_mask_lock); mtx_destroy(&ntb->ctx_lock); - /* - * Redetect total MWs so we unmap properly -- in case we lowered the - * maximum to work around Xeon errata. - */ - ntb_detect_max_mw(ntb); ntb_unmap_pci_bar(ntb); return (0); @@ -596,8 +601,7 @@ static inline enum ntb_bar ntb_mw_to_bar(struct ntb_softc *ntb, unsigned mw) { - KASSERT(mw < ntb->mw_count || - (mw != B2B_MW_DISABLED && mw == ntb->b2b_mw_idx), + KASSERT(mw < ntb->mw_count, ("%s: mw:%u > count:%u", __func__, mw, (unsigned)ntb->mw_count)); KASSERT(ntb->reg->mw_bar[mw] != 0, ("invalid mw")); @@ -668,11 +672,9 @@ ntb_map_pci_bars(struct ntb_softc *ntb) ntb->bar_info[NTB_B2B_BAR_1].pbarxlat_off = XEON_PBAR2XLAT_OFFSET; ntb->bar_info[NTB_B2B_BAR_2].pci_resource_id = PCIR_BAR(4); - /* XXX Are shared MW B2Bs write-combining? */ - if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP) && !HAS_FEATURE(NTB_SPLIT_BAR)) - rc = map_mmr_bar(ntb, &ntb->bar_info[NTB_B2B_BAR_2]); - else - rc = map_memory_window_bar(ntb, &ntb->bar_info[NTB_B2B_BAR_2]); + rc = map_memory_window_bar(ntb, &ntb->bar_info[NTB_B2B_BAR_2]); + if (rc != 0) + goto out; ntb->bar_info[NTB_B2B_BAR_2].psz_off = XEON_PBAR4SZ_OFFSET; ntb->bar_info[NTB_B2B_BAR_2].ssz_off = XEON_SBAR4SZ_OFFSET; ntb->bar_info[NTB_B2B_BAR_2].pbarxlat_off = XEON_PBAR4XLAT_OFFSET; @@ -681,10 +683,7 @@ ntb_map_pci_bars(struct ntb_softc *ntb) goto out; ntb->bar_info[NTB_B2B_BAR_3].pci_resource_id = PCIR_BAR(5); - if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) - rc = map_mmr_bar(ntb, &ntb->bar_info[NTB_B2B_BAR_3]); - else - rc = map_memory_window_bar(ntb, &ntb->bar_info[NTB_B2B_BAR_3]); + rc = map_memory_window_bar(ntb, &ntb->bar_info[NTB_B2B_BAR_3]); ntb->bar_info[NTB_B2B_BAR_3].psz_off = XEON_PBAR5SZ_OFFSET; ntb->bar_info[NTB_B2B_BAR_3].ssz_off = XEON_SBAR5SZ_OFFSET; ntb->bar_info[NTB_B2B_BAR_3].pbarxlat_off = XEON_PBAR5XLAT_OFFSET; @@ -1264,14 +1263,18 @@ ntb_xeon_init_dev(struct ntb_softc *ntb) /* * There is a Xeon hardware errata related to writes to SDOORBELL or * B2BDOORBELL in conjunction with inbound access to NTB MMIO space, - * which may hang the system. To workaround this use the second memory + * which may hang the system. To workaround this, use a memory * window to access the interrupt and scratch pad registers on the * remote system. */ - if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) - /* Use the last MW for mapping remote spad */ - ntb->b2b_mw_idx = ntb->mw_count - 1; - else if (HAS_FEATURE(NTB_B2BDOORBELL_BIT14)) + if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) { + ntb->b2b_mw_idx = (ntb->mw_count + g_ntb_mw_idx) % + ntb->mw_count; + ntb_printf(2, "Setting up b2b mw idx %d means %u\n", + g_ntb_mw_idx, ntb->b2b_mw_idx); + rc = ntb_mw_set_wc_internal(ntb, ntb->b2b_mw_idx, false); + KASSERT(rc == 0, ("shouldn't fail")); + } else if (HAS_FEATURE(NTB_B2BDOORBELL_BIT14)) /* * HW Errata on bit 14 of b2bdoorbell register. Writes will not be * mirrored to the remote system. Shrink the number of bits by one, @@ -1481,7 +1484,6 @@ xeon_setup_b2b_mw(struct ntb_softc *ntb, ntb->b2b_off = bar_size >> 1; else if (bar_size >= XEON_B2B_MIN_SIZE) { ntb->b2b_off = 0; - ntb->mw_count--; } else { device_printf(ntb->device, "B2B bar size is too small!\n"); @@ -1999,7 +2001,7 @@ ntb_sysctl_init(struct ntb_softc *ntb) "A", "Link status"); SYSCTL_ADD_U8(ctx, tree_par, OID_AUTO, "mw_count", CTLFLAG_RD, - &ntb->mw_count, 0, "MW count (excl. non-shared B2B register BAR)"); + &ntb->mw_count, 0, "MW count"); SYSCTL_ADD_U8(ctx, tree_par, OID_AUTO, "spad_count", CTLFLAG_RD, &ntb->spad_count, 0, "Scratchpad count"); SYSCTL_ADD_U8(ctx, tree_par, OID_AUTO, "db_count", CTLFLAG_RD, @@ -2341,6 +2343,16 @@ sysctl_handle_register(SYSCTL_HANDLER_AR return (EINVAL); } +static unsigned +ntb_user_mw_to_idx(struct ntb_softc *ntb, unsigned uidx) +{ + + if (ntb->b2b_mw_idx != B2B_MW_DISABLED && ntb->b2b_off == 0 && + uidx >= ntb->b2b_mw_idx) + return (uidx + 1); + return (uidx); +} + /* * Public API to the rest of the OS */ @@ -2361,10 +2373,18 @@ ntb_get_max_spads(struct ntb_softc *ntb) return (ntb->spad_count); } +/* + * ntb_mw_count() - Get the number of memory windows available for KPI + * consumers. + * + * (Excludes any MW wholly reserved for register access.) + */ uint8_t ntb_mw_count(struct ntb_softc *ntb) { + if (ntb->b2b_mw_idx != B2B_MW_DISABLED && ntb->b2b_off == 0) + return (ntb->mw_count - 1); return (ntb->mw_count); } @@ -2495,6 +2515,7 @@ ntb_mw_get_range(struct ntb_softc *ntb, if (mw_idx >= ntb_mw_count(ntb)) return (EINVAL); + mw_idx = ntb_user_mw_to_idx(ntb, mw_idx); bar_num = ntb_mw_to_bar(ntb, mw_idx); bar = &ntb->bar_info[bar_num]; @@ -2553,6 +2574,7 @@ ntb_mw_set_trans(struct ntb_softc *ntb, if (idx >= ntb_mw_count(ntb)) return (EINVAL); + idx = ntb_user_mw_to_idx(ntb, idx); bar_num = ntb_mw_to_bar(ntb, idx); bar = &ntb->bar_info[bar_num]; @@ -2658,6 +2680,7 @@ ntb_mw_get_wc(struct ntb_softc *ntb, uns if (idx >= ntb_mw_count(ntb)) return (EINVAL); + idx = ntb_user_mw_to_idx(ntb, idx); bar = &ntb->bar_info[ntb_mw_to_bar(ntb, idx)]; *wc = bar->mapped_wc; @@ -2676,13 +2699,21 @@ ntb_mw_get_wc(struct ntb_softc *ntb, uns int ntb_mw_set_wc(struct ntb_softc *ntb, unsigned idx, bool wc) { - struct ntb_pci_bar_info *bar; - vm_memattr_t attr; - int rc; if (idx >= ntb_mw_count(ntb)) return (EINVAL); + idx = ntb_user_mw_to_idx(ntb, idx); + return (ntb_mw_set_wc_internal(ntb, idx, wc)); +} + +static int +ntb_mw_set_wc_internal(struct ntb_softc *ntb, unsigned idx, bool wc) +{ + struct ntb_pci_bar_info *bar; + vm_memattr_t attr; + int rc; + bar = &ntb->bar_info[ntb_mw_to_bar(ntb, idx)]; if (bar->mapped_wc == wc) return (0); @@ -2741,9 +2772,6 @@ ntb_get_peer_db_addr(struct ntb_softc *n bar = &ntb->bar_info[NTB_CONFIG_BAR]; regoff = ntb->peer_reg->db_bell; } else { - KASSERT((HAS_FEATURE(NTB_SPLIT_BAR) && ntb->mw_count == 2) || - (!HAS_FEATURE(NTB_SPLIT_BAR) && ntb->mw_count == 1), - ("mw_count invalid after setup")); KASSERT(ntb->b2b_mw_idx != B2B_MW_DISABLED, ("invalid b2b idx")); From owner-svn-src-all@freebsd.org Tue Nov 24 19:20:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26FBCA36D3F; Tue, 24 Nov 2015 19:20:47 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC79D1042; Tue, 24 Nov 2015 19:20:46 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAOJKkPQ077326; Tue, 24 Nov 2015 19:20:46 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAOJKjed077323; Tue, 24 Nov 2015 19:20:45 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201511241920.tAOJKjed077323@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Tue, 24 Nov 2015 19:20:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291264 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 19:20:47 -0000 Author: avos Date: Tue Nov 24 19:20:45 2015 New Revision: 291264 URL: https://svnweb.freebsd.org/changeset/base/291264 Log: urtwn(4): rework ROM reading. - Add error handling for urtwn_(r88e_)read_rom() and urtwn_efuse_*() functions. - Remove code duplication between urtwn_efuse_read() and urtwn_r88e_read_rom(). - Merge r88e_rom and (r92c_)rom structures (only one of them can be used at the same time). - Other minor fixes / improvements. Tested with RTL8188EU, STA mode (URTWN_DEBUG + USB_DEBUG, hw.usb.urtwn.debug=3, no visual differences). Reviewed by: kevlo Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D4253 Modified: head/sys/dev/usb/wlan/if_urtwn.c head/sys/dev/usb/wlan/if_urtwnreg.h head/sys/dev/usb/wlan/if_urtwnvar.h Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Tue Nov 24 18:51:17 2015 (r291263) +++ head/sys/dev/usb/wlan/if_urtwn.c Tue Nov 24 19:20:45 2015 (r291264) @@ -214,12 +214,19 @@ static void urtwn_r88e_rf_write(struct static uint32_t urtwn_rf_read(struct urtwn_softc *, int, uint8_t); static int urtwn_llt_write(struct urtwn_softc *, uint32_t, uint32_t); -static uint8_t urtwn_efuse_read_1(struct urtwn_softc *, uint16_t); -static void urtwn_efuse_read(struct urtwn_softc *); +static int urtwn_efuse_read_next(struct urtwn_softc *, uint8_t *); +static int urtwn_efuse_read_data(struct urtwn_softc *, uint8_t *, + uint8_t, uint8_t); +#ifdef URTWN_DEBUG +static void urtwn_dump_rom_contents(struct urtwn_softc *, + uint8_t *, uint16_t); +#endif +static int urtwn_efuse_read(struct urtwn_softc *, uint8_t *, + uint16_t); static void urtwn_efuse_switch_power(struct urtwn_softc *); static int urtwn_read_chipid(struct urtwn_softc *); -static void urtwn_read_rom(struct urtwn_softc *); -static void urtwn_r88e_read_rom(struct urtwn_softc *); +static int urtwn_read_rom(struct urtwn_softc *); +static int urtwn_r88e_read_rom(struct urtwn_softc *); static int urtwn_ra_init(struct urtwn_softc *); static void urtwn_init_beacon(struct urtwn_softc *, struct urtwn_vap *); @@ -431,9 +438,15 @@ urtwn_attach(device_t self) } if (sc->chip & URTWN_CHIP_88E) - urtwn_r88e_read_rom(sc); + error = urtwn_r88e_read_rom(sc); else - urtwn_read_rom(sc); + error = urtwn_read_rom(sc); + if (error != 0) { + device_printf(sc->sc_dev, "%s: cannot read rom, error %d\n", + __func__, error); + URTWN_UNLOCK(sc); + goto detach; + } device_printf(sc->sc_dev, "MAC/BB RTL%s, RF 6052 %dT%dR\n", (sc->chip & URTWN_CHIP_92C) ? "8192CU" : @@ -1224,68 +1237,137 @@ urtwn_llt_write(struct urtwn_softc *sc, return (ETIMEDOUT); } -static uint8_t -urtwn_efuse_read_1(struct urtwn_softc *sc, uint16_t addr) +static int +urtwn_efuse_read_next(struct urtwn_softc *sc, uint8_t *val) { uint32_t reg; int ntries; + if (sc->last_rom_addr >= URTWN_EFUSE_MAX_LEN) + return (EFAULT); + reg = urtwn_read_4(sc, R92C_EFUSE_CTRL); - reg = RW(reg, R92C_EFUSE_CTRL_ADDR, addr); + reg = RW(reg, R92C_EFUSE_CTRL_ADDR, sc->last_rom_addr); reg &= ~R92C_EFUSE_CTRL_VALID; + urtwn_write_4(sc, R92C_EFUSE_CTRL, reg); /* Wait for read operation to complete. */ for (ntries = 0; ntries < 100; ntries++) { reg = urtwn_read_4(sc, R92C_EFUSE_CTRL); if (reg & R92C_EFUSE_CTRL_VALID) - return (MS(reg, R92C_EFUSE_CTRL_DATA)); + break; urtwn_ms_delay(sc); } - device_printf(sc->sc_dev, - "could not read efuse byte at address 0x%x\n", addr); - return (0xff); + if (ntries == 100) { + device_printf(sc->sc_dev, + "could not read efuse byte at address 0x%x\n", + sc->last_rom_addr); + return (ETIMEDOUT); + } + + *val = MS(reg, R92C_EFUSE_CTRL_DATA); + sc->last_rom_addr++; + + return (0); } +static int +urtwn_efuse_read_data(struct urtwn_softc *sc, uint8_t *rom, uint8_t off, + uint8_t msk) +{ + uint8_t reg; + int i, error; + + for (i = 0; i < 4; i++) { + if (msk & (1 << i)) + continue; + error = urtwn_efuse_read_next(sc, ®); + if (error != 0) + return (error); + DPRINTF("rom[0x%03X] == 0x%02X\n", off * 8 + i * 2, reg); + rom[off * 8 + i * 2 + 0] = reg; + + error = urtwn_efuse_read_next(sc, ®); + if (error != 0) + return (error); + DPRINTF("rom[0x%03X] == 0x%02X\n", off * 8 + i * 2 + 1, reg); + rom[off * 8 + i * 2 + 1] = reg; + } + + return (0); +} + +#ifdef URTWN_DEBUG static void -urtwn_efuse_read(struct urtwn_softc *sc) +urtwn_dump_rom_contents(struct urtwn_softc *sc, uint8_t *rom, uint16_t size) { - uint8_t *rom = (uint8_t *)&sc->rom; - uint16_t addr = 0; - uint32_t reg; - uint8_t off, msk; int i; + /* Dump ROM contents. */ + device_printf(sc->sc_dev, "%s:", __func__); + for (i = 0; i < size; i++) { + if (i % 32 == 0) + printf("\n%03X: ", i); + else if (i % 4 == 0) + printf(" "); + + printf("%02X", rom[i]); + } + printf("\n"); +} +#endif + +static int +urtwn_efuse_read(struct urtwn_softc *sc, uint8_t *rom, uint16_t size) +{ +#define URTWN_CHK(res) do { \ + if ((error = res) != 0) \ + goto end; \ +} while(0) + uint8_t msk, off, reg; + int error; + urtwn_efuse_switch_power(sc); - memset(&sc->rom, 0xff, sizeof(sc->rom)); - while (addr < 512) { - reg = urtwn_efuse_read_1(sc, addr); - if (reg == 0xff) - break; - addr++; - off = reg >> 4; - msk = reg & 0xf; - for (i = 0; i < 4; i++) { - if (msk & (1 << i)) + /* Read full ROM image. */ + sc->last_rom_addr = 0; + memset(rom, 0xff, size); + + URTWN_CHK(urtwn_efuse_read_next(sc, ®)); + while (reg != 0xff) { + /* check for extended header */ + if ((sc->chip & URTWN_CHIP_88E) && (reg & 0x1f) == 0x0f) { + off = reg >> 5; + URTWN_CHK(urtwn_efuse_read_next(sc, ®)); + + if ((reg & 0x0f) != 0x0f) + off = ((reg & 0xf0) >> 1) | off; + else continue; - rom[off * 8 + i * 2 + 0] = - urtwn_efuse_read_1(sc, addr); - addr++; - rom[off * 8 + i * 2 + 1] = - urtwn_efuse_read_1(sc, addr); - addr++; - } + } else + off = reg >> 4; + msk = reg & 0xf; + + URTWN_CHK(urtwn_efuse_read_data(sc, rom, off, msk)); + URTWN_CHK(urtwn_efuse_read_next(sc, ®)); } + +end: + #ifdef URTWN_DEBUG - if (urtwn_debug >= 2) { - /* Dump ROM content. */ - printf("\n"); - for (i = 0; i < sizeof(sc->rom); i++) - printf("%02x:", rom[i]); - printf("\n"); - } + if (urtwn_debug >= 2) + urtwn_dump_rom_contents(sc, rom, size); #endif + urtwn_write_1(sc, R92C_EFUSE_ACCESS, R92C_EFUSE_ACCESS_OFF); + + if (error != 0) { + device_printf(sc->sc_dev, "%s: error while reading ROM\n", + __func__); + } + + return (error); +#undef URTWN_CHK } static void @@ -1341,16 +1423,22 @@ urtwn_read_chipid(struct urtwn_softc *sc return (0); } -static void +static int urtwn_read_rom(struct urtwn_softc *sc) { - struct r92c_rom *rom = &sc->rom; + struct r92c_rom *rom = &sc->rom.r92c_rom; + int error; /* Read full ROM image. */ - urtwn_efuse_read(sc); + error = urtwn_efuse_read(sc, (uint8_t *)rom, sizeof(*rom)); + if (error != 0) + return (error); /* XXX Weird but this is what the vendor driver does. */ - sc->pa_setting = urtwn_efuse_read_1(sc, 0x1fa); + sc->last_rom_addr = 0x1fa; + error = urtwn_efuse_read_next(sc, &sc->pa_setting); + if (error != 0) + return (error); DPRINTF("PA setting=0x%x\n", sc->pa_setting); sc->board_type = MS(rom->rf_opt1, R92C_ROM_RF1_BOARD_TYPE); @@ -1362,67 +1450,40 @@ urtwn_read_rom(struct urtwn_softc *sc) sc->sc_rf_write = urtwn_r92c_rf_write; sc->sc_power_on = urtwn_r92c_power_on; sc->sc_dma_init = urtwn_r92c_dma_init; + + return (0); } -static void +static int urtwn_r88e_read_rom(struct urtwn_softc *sc) { - uint8_t *rom = sc->r88e_rom; - uint16_t addr = 0; - uint32_t reg; - uint8_t off, msk, tmp; - int i; - - off = 0; - urtwn_efuse_switch_power(sc); - - /* Read full ROM image. */ - memset(&sc->r88e_rom, 0xff, sizeof(sc->r88e_rom)); - while (addr < 512) { - reg = urtwn_efuse_read_1(sc, addr); - if (reg == 0xff) - break; - addr++; - if ((reg & 0x1f) == 0x0f) { - tmp = (reg & 0xe0) >> 5; - reg = urtwn_efuse_read_1(sc, addr); - if ((reg & 0x0f) != 0x0f) - off = ((reg & 0xf0) >> 1) | tmp; - addr++; - } else - off = reg >> 4; - msk = reg & 0xf; - for (i = 0; i < 4; i++) { - if (msk & (1 << i)) - continue; - rom[off * 8 + i * 2 + 0] = - urtwn_efuse_read_1(sc, addr); - addr++; - rom[off * 8 + i * 2 + 1] = - urtwn_efuse_read_1(sc, addr); - addr++; - } - } + uint8_t *rom = sc->rom.r88e_rom; + uint16_t addr; + int error, i; - urtwn_write_1(sc, R92C_EFUSE_ACCESS, R92C_EFUSE_ACCESS_OFF); + error = urtwn_efuse_read(sc, rom, sizeof(sc->rom.r88e_rom)); + if (error != 0) + return (error); addr = 0x10; for (i = 0; i < 6; i++) - sc->cck_tx_pwr[i] = sc->r88e_rom[addr++]; + sc->cck_tx_pwr[i] = rom[addr++]; for (i = 0; i < 5; i++) - sc->ht40_tx_pwr[i] = sc->r88e_rom[addr++]; - sc->bw20_tx_pwr_diff = (sc->r88e_rom[addr] & 0xf0) >> 4; + sc->ht40_tx_pwr[i] = rom[addr++]; + sc->bw20_tx_pwr_diff = (rom[addr] & 0xf0) >> 4; if (sc->bw20_tx_pwr_diff & 0x08) sc->bw20_tx_pwr_diff |= 0xf0; - sc->ofdm_tx_pwr_diff = (sc->r88e_rom[addr] & 0xf); + sc->ofdm_tx_pwr_diff = (rom[addr] & 0xf); if (sc->ofdm_tx_pwr_diff & 0x08) sc->ofdm_tx_pwr_diff |= 0xf0; - sc->regulatory = MS(sc->r88e_rom[0xc1], R92C_ROM_RF1_REGULATORY); - IEEE80211_ADDR_COPY(sc->sc_ic.ic_macaddr, &sc->r88e_rom[0xd7]); + sc->regulatory = MS(rom[0xc1], R92C_ROM_RF1_REGULATORY); + IEEE80211_ADDR_COPY(sc->sc_ic.ic_macaddr, &rom[0xd7]); sc->sc_rf_write = urtwn_r88e_rf_write; sc->sc_power_on = urtwn_r88e_power_on; sc->sc_dma_init = urtwn_r88e_dma_init; + + return (0); } /* @@ -2944,7 +3005,7 @@ urtwn_bb_init(struct urtwn_softc *sc) urtwn_bb_write(sc, R92C_OFDM0_AGCCORE1(0), 0x69553420); urtwn_ms_delay(sc); - crystalcap = sc->r88e_rom[0xb9]; + crystalcap = sc->rom.r88e_rom[0xb9]; if (crystalcap == 0xff) crystalcap = 0x20; crystalcap &= 0x3f; @@ -3210,7 +3271,7 @@ urtwn_get_txpower(struct urtwn_softc *sc uint16_t power[URTWN_RIDX_COUNT]) { struct ieee80211com *ic = &sc->sc_ic; - struct r92c_rom *rom = &sc->rom; + struct r92c_rom *rom = &sc->rom.r92c_rom; uint16_t cckpow, ofdmpow, htpow, diff, max; const struct urtwn_txpwr *base; int ridx, chan, group; Modified: head/sys/dev/usb/wlan/if_urtwnreg.h ============================================================================== --- head/sys/dev/usb/wlan/if_urtwnreg.h Tue Nov 24 18:51:17 2015 (r291263) +++ head/sys/dev/usb/wlan/if_urtwnreg.h Tue Nov 24 19:20:45 2015 (r291264) @@ -938,6 +938,8 @@ struct r92c_rom { uint8_t curstomer_id; } __packed; +#define URTWN_EFUSE_MAX_LEN 512 + /* Rx MAC descriptor. */ struct r92c_rx_stat { uint32_t rxdw0; Modified: head/sys/dev/usb/wlan/if_urtwnvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_urtwnvar.h Tue Nov 24 18:51:17 2015 (r291263) +++ head/sys/dev/usb/wlan/if_urtwnvar.h Tue Nov 24 19:20:45 2015 (r291264) @@ -128,6 +128,11 @@ enum { #define URTWN_EP_QUEUES URTWN_BULK_RX +union urtwn_rom { + struct r92c_rom r92c_rom; + uint8_t r88e_rom[URTWN_EFUSE_MAX_LEN]; +}; + struct urtwn_softc { struct ieee80211com sc_ic; struct mbufq sc_snd; @@ -177,12 +182,12 @@ struct urtwn_softc { struct urtwn_fw_info fw; void *fw_virtaddr; - struct r92c_rom rom; - uint8_t r88e_rom[512]; + union urtwn_rom rom; uint8_t cck_tx_pwr[6]; uint8_t ht40_tx_pwr[5]; int8_t bw20_tx_pwr_diff; int8_t ofdm_tx_pwr_diff; + uint16_t last_rom_addr; struct callout sc_watchdog_ch; struct mtx sc_mtx; From owner-svn-src-all@freebsd.org Tue Nov 24 19:20:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4102A36D61; Tue, 24 Nov 2015 19:20:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5849D1068; Tue, 24 Nov 2015 19:20:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAOJKoC7077375; Tue, 24 Nov 2015 19:20:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAOJKo8n077372; Tue, 24 Nov 2015 19:20:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511241920.tAOJKo8n077372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 24 Nov 2015 19:20:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291265 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 19:20:51 -0000 Author: mav Date: Tue Nov 24 19:20:49 2015 New Revision: 291265 URL: https://svnweb.freebsd.org/changeset/base/291265 Log: Rename ASYNC_LIP_F8 to ASYNC_LIP_NOS_OLS_RECV. New name better repsents its meaning for modern chips. Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_target.c head/sys/dev/isp/ispmbox.h Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Tue Nov 24 19:20:45 2015 (r291264) +++ head/sys/dev/isp/isp.c Tue Nov 24 19:20:49 2015 (r291265) @@ -5646,7 +5646,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint #endif break; case ASYNC_LIP_ERROR: - case ASYNC_LIP_F8: + case ASYNC_LIP_NOS_OLS_RECV: case ASYNC_LIP_OCCURRED: case ASYNC_PTPMODE: /* Modified: head/sys/dev/isp/isp_target.c ============================================================================== --- head/sys/dev/isp/isp_target.c Tue Nov 24 19:20:45 2015 (r291264) +++ head/sys/dev/isp/isp_target.c Tue Nov 24 19:20:49 2015 (r291265) @@ -639,7 +639,7 @@ isp_target_async(ispsoftc_t *isp, int bu isp_async(isp, ISPASYNC_TARGET_NOTIFY, ¬ify); break; case ASYNC_LIP_ERROR: - case ASYNC_LIP_F8: + case ASYNC_LIP_NOS_OLS_RECV: case ASYNC_LIP_OCCURRED: case ASYNC_LOOP_RESET: isp_prt(isp, ISP_LOGTDEBUG0, "%s: LIP RESET", __func__); Modified: head/sys/dev/isp/ispmbox.h ============================================================================== --- head/sys/dev/isp/ispmbox.h Tue Nov 24 19:20:45 2015 (r291264) +++ head/sys/dev/isp/ispmbox.h Tue Nov 24 19:20:49 2015 (r291265) @@ -252,7 +252,7 @@ #define ASYNC_LOOP_RESET 0x8013 /* FC only */ #define ASYNC_PDB_CHANGED 0x8014 #define ASYNC_CHANGE_NOTIFY 0x8015 -#define ASYNC_LIP_F8 0x8016 /* FC only */ +#define ASYNC_LIP_NOS_OLS_RECV 0x8016 /* FC only */ #define ASYNC_LIP_ERROR 0x8017 /* FC only */ #define ASYNC_AUTO_PLOGI_RJT 0x8018 #define ASYNC_SECURITY_UPDATE 0x801B From owner-svn-src-all@freebsd.org Tue Nov 24 19:55:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08A6AA35430; Tue, 24 Nov 2015 19:55:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C86231098; Tue, 24 Nov 2015 19:55:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAOJtBfx087380; Tue, 24 Nov 2015 19:55:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAOJtBk1087379; Tue, 24 Nov 2015 19:55:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511241955.tAOJtBk1087379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 24 Nov 2015 19:55:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291266 - head/sys/x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 19:55:13 -0000 Author: kib Date: Tue Nov 24 19:55:11 2015 New Revision: 291266 URL: https://svnweb.freebsd.org/changeset/base/291266 Log: Correct the number of DTLB entries reported for the CPUID Leaf 2 descriptor 0x6c. Confirmed by: Intel MFC after: 3 days Modified: head/sys/x86/x86/identcpu.c Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Tue Nov 24 19:20:49 2015 (r291265) +++ head/sys/x86/x86/identcpu.c Tue Nov 24 19:55:11 2015 (r291266) @@ -1890,7 +1890,7 @@ print_INTEL_TLB(u_int data) printf("DTLB: 4KByte pages, 8-way set associative, 256 entries\n"); break; case 0x6c: - printf("DTLB: 2M/4M pages, 8-way set associative, 126 entries\n"); + printf("DTLB: 2M/4M pages, 8-way set associative, 128 entries\n"); break; case 0x6d: printf("DTLB: 1 GByte pages, fully associative, 16 entries\n"); From owner-svn-src-all@freebsd.org Tue Nov 24 20:34:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48DC8A35E4D; Tue, 24 Nov 2015 20:34:45 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f177.google.com (mail-yk0-f177.google.com [209.85.160.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0DFD31175; Tue, 24 Nov 2015 20:34:44 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykdv3 with SMTP id v3so33147974ykd.0; Tue, 24 Nov 2015 12:34:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=lcl5gtILL9uc73uDOTMN0uq/0rRcYVUXeuMK9bCVBLQ=; b=fHaiWXFMaYKrqoI4znFQuociwzuo0G6k86IxJbv2laCVYwt91b1ofYYj/I8JNOuD/b aeGPcK9AcpMG6cPejmWGVdXuq9qPwOs9wBafH4zZIVDismiJLPqyjEILkiPp2ZUWjfGo 1e63wpQVOoZl5YYNqVeFDO7PTz+ucPAJNoYdrync5osuCg9jC0TuWJByHe6uCPlRMws5 K7qidV62/Bv9B5/YgJVKvKY879q449kfUibhF2gAYJTE/xjX7Y4fwVEAQ4vY1H7zwtOw CvTH1Z72WZSAOutbDEZhsLo1gtuWqv9t6oUz2e9/wCE3I+5fR2SkqCx8k1j8IaJ0AktV LCqQ== X-Received: by 10.129.102.131 with SMTP id a125mr18802530ywc.139.1448391485161; Tue, 24 Nov 2015 10:58:05 -0800 (PST) Received: from mail-yk0-f174.google.com (mail-yk0-f174.google.com. [209.85.160.174]) by smtp.gmail.com with ESMTPSA id e66sm16709116ywd.33.2015.11.24.10.58.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Nov 2015 10:58:05 -0800 (PST) Received: by ykdv3 with SMTP id v3so29899048ykd.0; Tue, 24 Nov 2015 10:58:04 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.13.214.83 with SMTP id y80mr26393492ywd.281.1448391484738; Tue, 24 Nov 2015 10:58:04 -0800 (PST) Reply-To: cem@FreeBSD.org Received: by 10.37.17.2 with HTTP; Tue, 24 Nov 2015 10:58:04 -0800 (PST) In-Reply-To: <201511241851.tAOIpHRK066859@repo.freebsd.org> References: <201511241851.tAOIpHRK066859@repo.freebsd.org> Date: Tue, 24 Nov 2015 10:58:04 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r291263 - head/sys/dev/ntb/ntb_hw From: Conrad Meyer To: svn-src-head@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 20:34:45 -0000 On Tue, Nov 24, 2015 at 10:51 AM, Conrad E. Meyer wrote: > Author: cem > Date: Tue Nov 24 18:51:17 2015 > New Revision: 291263 > URL: https://svnweb.freebsd.org/changeset/base/291263 > > Log: > ntb: Add MW tunable for MMR Xeon errata workaround > > Adds a new tunable, ntb.hw.b2b_mw_idx, which specifies the offset (from the > total number of memory windows) to use for register access on hardware with > the SDOORBELL_LOCKUP errata. The default is -1, i.e., the last memory > window. Ah, and I forgot to add: Non-negative 'b2b_mw_idx' values index the memory windows in the usual order (0 is the first window, 1 is the second, etc). Best, Conrad From owner-svn-src-all@freebsd.org Tue Nov 24 22:47:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70675A37689; Tue, 24 Nov 2015 22:47:20 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4306D1967; Tue, 24 Nov 2015 22:47:20 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAOMlJcb037497; Tue, 24 Nov 2015 22:47:19 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAOMlJgr037495; Tue, 24 Nov 2015 22:47:19 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201511242247.tAOMlJgr037495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Tue, 24 Nov 2015 22:47:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291267 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 22:47:20 -0000 Author: jilles Date: Tue Nov 24 22:47:19 2015 New Revision: 291267 URL: https://svnweb.freebsd.org/changeset/base/291267 Log: sh: Remove global state from nodes.c. No functional change is intended. Modified: head/bin/sh/mknodes.c head/bin/sh/nodes.c.pat Modified: head/bin/sh/mknodes.c ============================================================================== --- head/bin/sh/mknodes.c Tue Nov 24 19:55:11 2015 (r291266) +++ head/bin/sh/mknodes.c Tue Nov 24 22:47:19 2015 (r291267) @@ -296,10 +296,10 @@ outfunc(FILE *cfile, int calcsize) else fputs(" return NULL;\n", cfile); if (calcsize) - fputs(" funcblocksize += nodesize[n->type];\n", cfile); + fputs(" result->blocksize += nodesize[n->type];\n", cfile); else { - fputs(" new = funcblock;\n", cfile); - fputs(" funcblock = (char *)funcblock + nodesize[n->type];\n", cfile); + fputs(" new = state->block;\n", cfile); + fputs(" state->block = (char *)state->block + nodesize[n->type];\n", cfile); } fputs(" switch (n->type) {\n", cfile); for (sp = str ; sp < &str[nstr] ; sp++) { @@ -313,33 +313,33 @@ outfunc(FILE *cfile, int calcsize) case T_NODE: if (calcsize) { indent(12, cfile); - fprintf(cfile, "calcsize(n->%s.%s);\n", + fprintf(cfile, "calcsize(n->%s.%s, result);\n", sp->tag, fp->name); } else { indent(12, cfile); - fprintf(cfile, "new->%s.%s = copynode(n->%s.%s);\n", + fprintf(cfile, "new->%s.%s = copynode(n->%s.%s, state);\n", sp->tag, fp->name, sp->tag, fp->name); } break; case T_NODELIST: if (calcsize) { indent(12, cfile); - fprintf(cfile, "sizenodelist(n->%s.%s);\n", + fprintf(cfile, "sizenodelist(n->%s.%s, result);\n", sp->tag, fp->name); } else { indent(12, cfile); - fprintf(cfile, "new->%s.%s = copynodelist(n->%s.%s);\n", + fprintf(cfile, "new->%s.%s = copynodelist(n->%s.%s, state);\n", sp->tag, fp->name, sp->tag, fp->name); } break; case T_STRING: if (calcsize) { indent(12, cfile); - fprintf(cfile, "funcstringsize += strlen(n->%s.%s) + 1;\n", + fprintf(cfile, "result->stringsize += strlen(n->%s.%s) + 1;\n", sp->tag, fp->name); } else { indent(12, cfile); - fprintf(cfile, "new->%s.%s = nodesavestr(n->%s.%s);\n", + fprintf(cfile, "new->%s.%s = nodesavestr(n->%s.%s, state);\n", sp->tag, fp->name, sp->tag, fp->name); } break; Modified: head/bin/sh/nodes.c.pat ============================================================================== --- head/bin/sh/nodes.c.pat Tue Nov 24 19:55:11 2015 (r291266) +++ head/bin/sh/nodes.c.pat Tue Nov 24 22:47:19 2015 (r291267) @@ -46,19 +46,24 @@ #include "mystring.h" -static int funcblocksize; /* size of structures in function */ -static int funcstringsize; /* size of strings in node */ -static pointer funcblock; /* block to allocate function from */ -static char *funcstring; /* block to allocate strings from */ +struct nodesize { + int blocksize; /* size of structures in function */ + int stringsize; /* size of strings in node */ +}; + +struct nodecopystate { + pointer block; /* block to allocate function from */ + char *string; /* block to allocate strings from */ +}; %SIZES -static void calcsize(union node *); -static void sizenodelist(struct nodelist *); -static union node *copynode(union node *); -static struct nodelist *copynodelist(struct nodelist *); -static char *nodesavestr(const char *); +static void calcsize(union node *, struct nodesize *); +static void sizenodelist(struct nodelist *, struct nodesize *); +static union node *copynode(union node *, struct nodecopystate *); +static struct nodelist *copynodelist(struct nodelist *, struct nodecopystate *); +static char *nodesavestr(const char *, struct nodecopystate *); struct funcdef { @@ -73,18 +78,20 @@ struct funcdef { struct funcdef * copyfunc(union node *n) { + struct nodesize sz; + struct nodecopystate st; struct funcdef *fn; if (n == NULL) return NULL; - funcblocksize = offsetof(struct funcdef, n); - funcstringsize = 0; - calcsize(n); - fn = ckmalloc(funcblocksize + funcstringsize); + sz.blocksize = offsetof(struct funcdef, n); + sz.stringsize = 0; + calcsize(n, &sz); + fn = ckmalloc(sz.blocksize + sz.stringsize); fn->refcount = 1; - funcblock = (char *)fn + offsetof(struct funcdef, n); - funcstring = (char *)fn + funcblocksize; - copynode(n); + st.block = (char *)fn + offsetof(struct funcdef, n); + st.string = (char *)fn + sz.blocksize; + copynode(n, &st); return fn; } @@ -97,7 +104,7 @@ getfuncnode(struct funcdef *fn) static void -calcsize(union node *n) +calcsize(union node *n, struct nodesize *result) { %CALCSIZE } @@ -105,11 +112,11 @@ calcsize(union node *n) static void -sizenodelist(struct nodelist *lp) +sizenodelist(struct nodelist *lp, struct nodesize *result) { while (lp) { - funcblocksize += ALIGN(sizeof(struct nodelist)); - calcsize(lp->n); + result->blocksize += ALIGN(sizeof(struct nodelist)); + calcsize(lp->n, result); lp = lp->next; } } @@ -117,7 +124,7 @@ sizenodelist(struct nodelist *lp) static union node * -copynode(union node *n) +copynode(union node *n, struct nodecopystate *state) { union node *new; @@ -127,16 +134,17 @@ copynode(union node *n) static struct nodelist * -copynodelist(struct nodelist *lp) +copynodelist(struct nodelist *lp, struct nodecopystate *state) { struct nodelist *start; struct nodelist **lpp; lpp = &start; while (lp) { - *lpp = funcblock; - funcblock = (char *)funcblock + ALIGN(sizeof(struct nodelist)); - (*lpp)->n = copynode(lp->n); + *lpp = state->block; + state->block = (char *)state->block + + ALIGN(sizeof(struct nodelist)); + (*lpp)->n = copynode(lp->n, state); lp = lp->next; lpp = &(*lpp)->next; } @@ -147,15 +155,15 @@ copynodelist(struct nodelist *lp) static char * -nodesavestr(const char *s) +nodesavestr(const char *s, struct nodecopystate *state) { const char *p = s; - char *q = funcstring; - char *rtn = funcstring; + char *q = state->string; + char *rtn = state->string; while ((*q++ = *p++) != '\0') continue; - funcstring = q; + state->string = q; return rtn; } From owner-svn-src-all@freebsd.org Tue Nov 24 23:04:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 116E8A3794C; Tue, 24 Nov 2015 23:04:05 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C56161176; Tue, 24 Nov 2015 23:04:04 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAON43W3043279; Tue, 24 Nov 2015 23:04:03 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAON43uF043278; Tue, 24 Nov 2015 23:04:03 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201511242304.tAON43uF043278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 24 Nov 2015 23:04: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: r291268 - stable/10/usr.bin/ldd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 23:04:05 -0000 Author: jkim Date: Tue Nov 24 23:04:03 2015 New Revision: 291268 URL: https://svnweb.freebsd.org/changeset/base/291268 Log: MFC: r289425 Add support for ARM EABI. Note it is not a direct MFC because some macros are not defined in this branch. Modified: stable/10/usr.bin/ldd/ldd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/ldd/ldd.c ============================================================================== --- stable/10/usr.bin/ldd/ldd.c Tue Nov 24 22:47:19 2015 (r291267) +++ stable/10/usr.bin/ldd/ldd.c Tue Nov 24 23:04:03 2015 (r291268) @@ -377,9 +377,19 @@ is_executable(const char *fname, int fd, return (0); } if (hdr.elf.e_type == ET_DYN) { - if (hdr.elf.e_ident[EI_OSABI] == ELFOSABI_FREEBSD) { + switch (hdr.elf.e_ident[EI_OSABI]) { + case ELFOSABI_FREEBSD: *is_shlib = 1; return (1); +#ifdef __ARM_EABI__ + case ELFOSABI_NONE: + if (hdr.elf.e_machine != EM_ARM) + break; + if (((hdr.elf.e_flags & 0xff000000) >> 24) < 4) + break; + *is_shlib = 1; + return (1); +#endif } warnx("%s: not a FreeBSD ELF shared object", fname); return (0); From owner-svn-src-all@freebsd.org Wed Nov 25 01:59:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A37CA37A52; Wed, 25 Nov 2015 01:59:10 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0833A11DE; Wed, 25 Nov 2015 01:59:09 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAP1x9kW092789; Wed, 25 Nov 2015 01:59:09 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAP1x8no092787; Wed, 25 Nov 2015 01:59:08 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201511250159.tAP1x8no092787@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Wed, 25 Nov 2015 01:59:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291280 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 01:59:10 -0000 Author: cem Date: Wed Nov 25 01:59:08 2015 New Revision: 291280 URL: https://svnweb.freebsd.org/changeset/base/291280 Log: NTB: WC/WB isn't enough; set MMR region as UC And expose vm_memattr_t of current mapping to consumers (as well as the ability to change it to one of UC, WB, WC). After short discussion with: jhb (but no review) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_hw.h Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Nov 25 01:29:46 2015 (r291279) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Nov 25 01:59:08 2015 (r291280) @@ -114,7 +114,7 @@ struct ntb_pci_bar_info { vm_paddr_t pbase; caddr_t vbase; vm_size_t size; - bool mapped_wc : 1; + vm_memattr_t map_mode; /* Configuration register offsets */ uint32_t psz_off; @@ -270,7 +270,8 @@ static inline bool bar_is_64bit(struct n static inline void bar_get_xlat_params(struct ntb_softc *, enum ntb_bar, uint32_t *base, uint32_t *xlat, uint32_t *lmt); static int ntb_map_pci_bars(struct ntb_softc *ntb); -static int ntb_mw_set_wc_internal(struct ntb_softc *, unsigned idx, bool wc); +static int ntb_mw_set_wc_internal(struct ntb_softc *, unsigned idx, + vm_memattr_t); static void print_map_success(struct ntb_softc *, struct ntb_pci_bar_info *, const char *); static int map_mmr_bar(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar); @@ -718,6 +719,7 @@ map_mmr_bar(struct ntb_softc *ntb, struc return (ENXIO); save_bar_parameters(bar); + bar->map_mode = VM_MEMATTR_UNCACHEABLE; print_map_success(ntb, bar, "mmr"); return (0); } @@ -726,6 +728,7 @@ static int map_memory_window_bar(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar) { int rc; + vm_memattr_t mapmode; uint8_t bar_size_bits = 0; bar->pci_resource = bus_alloc_resource_any(ntb->device, SYS_RES_MEMORY, @@ -771,29 +774,34 @@ map_memory_window_bar(struct ntb_softc * save_bar_parameters(bar); } + bar->map_mode = VM_MEMATTR_UNCACHEABLE; print_map_success(ntb, bar, "mw"); - if (g_ntb_enable_wc == 0) - return (0); /* Mark bar region as write combining to improve performance. */ - rc = pmap_change_attr((vm_offset_t)bar->vbase, bar->size, - VM_MEMATTR_WRITE_COMBINING); + mapmode = VM_MEMATTR_WRITE_COMBINING; + if (g_ntb_enable_wc == 0) + mapmode = VM_MEMATTR_WRITE_BACK; + + rc = pmap_change_attr((vm_offset_t)bar->vbase, bar->size, mapmode); if (rc == 0) { - bar->mapped_wc = true; + bar->map_mode = mapmode; device_printf(ntb->device, "Marked BAR%d v:[%p-%p] p:[%p-%p] as " - "WRITE_COMBINING.\n", + "%s.\n", PCI_RID2BAR(bar->pci_resource_id), bar->vbase, (char *)bar->vbase + bar->size - 1, - (void *)bar->pbase, (void *)(bar->pbase + bar->size - 1)); + (void *)bar->pbase, (void *)(bar->pbase + bar->size - 1), + (mapmode == VM_MEMATTR_WRITE_COMBINING) ? "WRITE_COMBINING" + : "WRITE_BACK"); } else device_printf(ntb->device, "Unable to mark BAR%d v:[%p-%p] p:[%p-%p] as " - "WRITE_COMBINING: %d\n", + "%s: %d\n", PCI_RID2BAR(bar->pci_resource_id), bar->vbase, (char *)bar->vbase + bar->size - 1, (void *)bar->pbase, (void *)(bar->pbase + bar->size - 1), - rc); + (mapmode == VM_MEMATTR_WRITE_COMBINING) ? "WRITE_COMBINING" + : "WRITE_BACK", rc); /* Proceed anyway */ return (0); } @@ -1272,7 +1280,7 @@ ntb_xeon_init_dev(struct ntb_softc *ntb) ntb->mw_count; ntb_printf(2, "Setting up b2b mw idx %d means %u\n", g_ntb_mw_idx, ntb->b2b_mw_idx); - rc = ntb_mw_set_wc_internal(ntb, ntb->b2b_mw_idx, false); + rc = ntb_mw_set_wc_internal(ntb, ntb->b2b_mw_idx, VM_MEMATTR_UNCACHEABLE); KASSERT(rc == 0, ("shouldn't fail")); } else if (HAS_FEATURE(NTB_B2BDOORBELL_BIT14)) /* @@ -2672,9 +2680,11 @@ ntb_mw_clear_trans(struct ntb_softc *ntb * * Returns: Zero on success, setting *wc; otherwise an error number (e.g. if * idx is an invalid memory window). + * + * Mode is a VM_MEMATTR_* type. */ int -ntb_mw_get_wc(struct ntb_softc *ntb, unsigned idx, bool *wc) +ntb_mw_get_wc(struct ntb_softc *ntb, unsigned idx, vm_memattr_t *mode) { struct ntb_pci_bar_info *bar; @@ -2683,49 +2693,48 @@ ntb_mw_get_wc(struct ntb_softc *ntb, uns idx = ntb_user_mw_to_idx(ntb, idx); bar = &ntb->bar_info[ntb_mw_to_bar(ntb, idx)]; - *wc = bar->mapped_wc; + *mode = bar->map_mode; return (0); } /* * ntb_mw_set_wc - Set the write-combine status of a memory window * - * If 'wc' matches the current status, this does nothing and succeeds. + * If 'mode' matches the current status, this does nothing and succeeds. Mode + * is a VM_MEMATTR_* type. * * Returns: Zero on success, setting the caching attribute on the virtual * mapping of the BAR; otherwise an error number (e.g. if idx is an invalid * memory window, or if changing the caching attribute fails). */ int -ntb_mw_set_wc(struct ntb_softc *ntb, unsigned idx, bool wc) +ntb_mw_set_wc(struct ntb_softc *ntb, unsigned idx, vm_memattr_t mode) { if (idx >= ntb_mw_count(ntb)) return (EINVAL); idx = ntb_user_mw_to_idx(ntb, idx); - return (ntb_mw_set_wc_internal(ntb, idx, wc)); + return (ntb_mw_set_wc_internal(ntb, idx, mode)); } static int -ntb_mw_set_wc_internal(struct ntb_softc *ntb, unsigned idx, bool wc) +ntb_mw_set_wc_internal(struct ntb_softc *ntb, unsigned idx, vm_memattr_t mode) { struct ntb_pci_bar_info *bar; - vm_memattr_t attr; int rc; bar = &ntb->bar_info[ntb_mw_to_bar(ntb, idx)]; - if (bar->mapped_wc == wc) + if (bar->map_mode == mode) return (0); - if (wc) - attr = VM_MEMATTR_WRITE_COMBINING; - else - attr = VM_MEMATTR_DEFAULT; + if (mode != VM_MEMATTR_UNCACHEABLE && mode != VM_MEMATTR_DEFAULT && + mode != VM_MEMATTR_WRITE_COMBINING) + return (EINVAL); - rc = pmap_change_attr((vm_offset_t)bar->vbase, bar->size, attr); + rc = pmap_change_attr((vm_offset_t)bar->vbase, bar->size, mode); if (rc == 0) - bar->mapped_wc = wc; + bar->map_mode = mode; return (rc); } Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.h Wed Nov 25 01:29:46 2015 (r291279) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.h Wed Nov 25 01:59:08 2015 (r291280) @@ -82,8 +82,8 @@ int ntb_mw_get_range(struct ntb_softc *, int ntb_mw_set_trans(struct ntb_softc *, unsigned mw_idx, bus_addr_t, size_t); int ntb_mw_clear_trans(struct ntb_softc *, unsigned mw_idx); -int ntb_mw_get_wc(struct ntb_softc *, unsigned mw_idx, bool *wc); -int ntb_mw_set_wc(struct ntb_softc *, unsigned mw_idx, bool wc); +int ntb_mw_get_wc(struct ntb_softc *, unsigned mw_idx, vm_memattr_t *mode); +int ntb_mw_set_wc(struct ntb_softc *, unsigned mw_idx, vm_memattr_t mode); uint8_t ntb_get_max_spads(struct ntb_softc *ntb); int ntb_spad_write(struct ntb_softc *ntb, unsigned int idx, uint32_t val); From owner-svn-src-all@freebsd.org Wed Nov 25 07:15:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3420BA36E2B; Wed, 25 Nov 2015 07:15:00 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 018841B4A; Wed, 25 Nov 2015 07:14:59 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAP7ExAp085398; Wed, 25 Nov 2015 07:14:59 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAP7Ex5i085397; Wed, 25 Nov 2015 07:14:59 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201511250714.tAP7Ex5i085397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 25 Nov 2015 07:14:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291291 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 07:15:00 -0000 Author: ae Date: Wed Nov 25 07:14:58 2015 New Revision: 291291 URL: https://svnweb.freebsd.org/changeset/base/291291 Log: Check that hhk_helper pointer isn't NULL before access. It isn't forbidden to use NULL pointer for hook_helper in hookinfo structure when hhook_add_hook() adds new helper hook. Modified: head/sys/kern/kern_hhook.c Modified: head/sys/kern/kern_hhook.c ============================================================================== --- head/sys/kern/kern_hhook.c Wed Nov 25 04:13:28 2015 (r291290) +++ head/sys/kern/kern_hhook.c Wed Nov 25 07:14:58 2015 (r291291) @@ -101,7 +101,8 @@ hhook_run_hooks(struct hhook_head *hhh, HHH_RLOCK(hhh, &rmpt); STAILQ_FOREACH(hhk, &hhh->hhh_hooks, hhk_next) { - if (hhk->hhk_helper->h_flags & HELPER_NEEDS_OSD) { + if (hhk->hhk_helper != NULL && + hhk->hhk_helper->h_flags & HELPER_NEEDS_OSD) { hdata = osd_get(OSD_KHELP, hosd, hhk->hhk_helper->h_id); if (hdata == NULL) continue; From owner-svn-src-all@freebsd.org Wed Nov 25 07:32:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63BF2A37117; Wed, 25 Nov 2015 07:32:02 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C834C123B; Wed, 25 Nov 2015 07:32:01 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAP7W153090979; Wed, 25 Nov 2015 07:32:01 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAP7Vx4n090960; Wed, 25 Nov 2015 07:31:59 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201511250731.tAP7Vx4n090960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 25 Nov 2015 07:31:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291292 - in head/sys: conf modules modules/if_enc net netinet netinet6 netipsec sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 07:32:02 -0000 Author: ae Date: Wed Nov 25 07:31:59 2015 New Revision: 291292 URL: https://svnweb.freebsd.org/changeset/base/291292 Log: Overhaul if_enc(4) and make it loadable in run-time. Use hhook(9) framework to achieve ability of loading and unloading if_enc(4) kernel module. INET and INET6 code on initialization registers two helper hooks points in the kernel. if_enc(4) module uses these helper hook points and registers its hooks. IPSEC code uses these hhook points to call helper hooks implemented in if_enc(4). Added: head/sys/modules/if_enc/ head/sys/modules/if_enc/Makefile (contents, props changed) Modified: head/sys/conf/files head/sys/conf/options head/sys/modules/Makefile head/sys/net/if.c head/sys/net/if_enc.c head/sys/net/if_enc.h head/sys/net/if_var.h head/sys/netinet/ip_input.c head/sys/netinet6/ip6_input.c head/sys/netipsec/ipsec.c head/sys/netipsec/ipsec.h head/sys/netipsec/ipsec_input.c head/sys/netipsec/ipsec_output.c head/sys/sys/hhook.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Nov 25 07:14:58 2015 (r291291) +++ head/sys/conf/files Wed Nov 25 07:31:59 2015 (r291292) @@ -3466,7 +3466,7 @@ net/if_dead.c standard net/if_debug.c optional ddb net/if_disc.c optional disc net/if_edsc.c optional edsc -net/if_enc.c optional enc ipsec inet | enc ipsec inet6 +net/if_enc.c optional enc inet | enc inet6 net/if_epair.c optional epair net/if_ethersubr.c optional ether net/if_fddisubr.c optional fddi Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Wed Nov 25 07:14:58 2015 (r291291) +++ head/sys/conf/options Wed Nov 25 07:31:59 2015 (r291292) @@ -707,7 +707,6 @@ ISAPNP opt_isa.h # various 'device presence' options. DEV_BPF opt_bpf.h DEV_CARP opt_carp.h -DEV_ENC opt_enc.h DEV_MCA opt_mca.h DEV_NETMAP opt_global.h DEV_PCI opt_pci.h Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Wed Nov 25 07:14:58 2015 (r291291) +++ head/sys/modules/Makefile Wed Nov 25 07:31:59 2015 (r291292) @@ -142,6 +142,7 @@ SUBDIR= \ if_bridge \ if_disc \ if_edsc \ + ${_if_enc} \ if_epair \ ${_if_gif} \ ${_if_gre} \ @@ -429,6 +430,7 @@ SUBDIR+= cuse defined(ALL_MODULES) _carp= carp _toecore= toecore +_if_enc= if_enc _if_gif= if_gif _if_gre= if_gre .endif Added: head/sys/modules/if_enc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/if_enc/Makefile Wed Nov 25 07:31:59 2015 (r291292) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +SYSDIR?=${.CURDIR}/../.. +.include "${SYSDIR}/conf/kern.opts.mk" + +.PATH: ${SYSDIR}/net + +KMOD= if_enc +SRCS= if_enc.c opt_inet.h opt_inet6.h + +.include Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Wed Nov 25 07:14:58 2015 (r291291) +++ head/sys/net/if.c Wed Nov 25 07:31:59 2015 (r291292) @@ -183,6 +183,10 @@ static void if_detach_internal(struct if extern void nd6_setmtu(struct ifnet *); #endif +/* ipsec helper hooks */ +VNET_DEFINE(struct hhook_head *, ipsec_hhh_in[HHOOK_IPSEC_COUNT]); +VNET_DEFINE(struct hhook_head *, ipsec_hhh_out[HHOOK_IPSEC_COUNT]); + VNET_DEFINE(int, if_index); int ifqmaxlen = IFQ_MAXLEN; VNET_DEFINE(struct ifnethead, ifnet); /* depend on static init XXX */ Modified: head/sys/net/if_enc.c ============================================================================== --- head/sys/net/if_enc.c Wed Nov 25 07:14:58 2015 (r291291) +++ head/sys/net/if_enc.c Wed Nov 25 07:31:59 2015 (r291292) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2006 The FreeBSD Project. + * Copyright (c) 2015 Andrey V. Elsukov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -79,56 +80,67 @@ struct enchdr { u_int32_t spi; u_int32_t flags; }; - -struct ifnet *encif; -static struct mtx enc_mtx; - struct enc_softc { struct ifnet *sc_ifp; }; +static VNET_DEFINE(struct enc_softc *, enc_sc); +#define V_enc_sc VNET(enc_sc) +static VNET_DEFINE(struct if_clone *, enc_cloner); +#define V_enc_cloner VNET(enc_cloner) static int enc_ioctl(struct ifnet *, u_long, caddr_t); -static int enc_output(struct ifnet *ifp, struct mbuf *m, - const struct sockaddr *dst, struct route *ro); +static int enc_output(struct ifnet *, struct mbuf *, + const struct sockaddr *, struct route *); static int enc_clone_create(struct if_clone *, int, caddr_t); static void enc_clone_destroy(struct ifnet *); -static struct if_clone *enc_cloner; -static const char encname[] = "enc"; +static int enc_add_hhooks(struct enc_softc *); +static void enc_remove_hhooks(struct enc_softc *); -/* - * Sysctls. - */ +static const char encname[] = "enc"; /* * Before and after are relative to when we are stripping the * outer IP header. */ -static SYSCTL_NODE(_net, OID_AUTO, enc, CTLFLAG_RW, 0, "enc sysctl"); +static VNET_DEFINE(int, filter_mask_in) = IPSEC_ENC_BEFORE; +static VNET_DEFINE(int, bpf_mask_in) = IPSEC_ENC_BEFORE; +static VNET_DEFINE(int, filter_mask_out) = IPSEC_ENC_BEFORE; +static VNET_DEFINE(int, bpf_mask_out) = IPSEC_ENC_BEFORE | IPSEC_ENC_AFTER; +#define V_filter_mask_in VNET(filter_mask_in) +#define V_bpf_mask_in VNET(bpf_mask_in) +#define V_filter_mask_out VNET(filter_mask_out) +#define V_bpf_mask_out VNET(bpf_mask_out) +static SYSCTL_NODE(_net, OID_AUTO, enc, CTLFLAG_RW, 0, "enc sysctl"); static SYSCTL_NODE(_net_enc, OID_AUTO, in, CTLFLAG_RW, 0, "enc input sysctl"); -static int ipsec_filter_mask_in = ENC_BEFORE; -SYSCTL_INT(_net_enc_in, OID_AUTO, ipsec_filter_mask, CTLFLAG_RW, - &ipsec_filter_mask_in, 0, "IPsec input firewall filter mask"); -static int ipsec_bpf_mask_in = ENC_BEFORE; -SYSCTL_INT(_net_enc_in, OID_AUTO, ipsec_bpf_mask, CTLFLAG_RW, - &ipsec_bpf_mask_in, 0, "IPsec input bpf mask"); - static SYSCTL_NODE(_net_enc, OID_AUTO, out, CTLFLAG_RW, 0, "enc output sysctl"); -static int ipsec_filter_mask_out = ENC_BEFORE; -SYSCTL_INT(_net_enc_out, OID_AUTO, ipsec_filter_mask, CTLFLAG_RW, - &ipsec_filter_mask_out, 0, "IPsec output firewall filter mask"); -static int ipsec_bpf_mask_out = ENC_BEFORE|ENC_AFTER; -SYSCTL_INT(_net_enc_out, OID_AUTO, ipsec_bpf_mask, CTLFLAG_RW, - &ipsec_bpf_mask_out, 0, "IPsec output bpf mask"); +SYSCTL_INT(_net_enc_in, OID_AUTO, ipsec_filter_mask, + CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(filter_mask_in), 0, + "IPsec input firewall filter mask"); +SYSCTL_INT(_net_enc_in, OID_AUTO, ipsec_bpf_mask, + CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(bpf_mask_in), 0, + "IPsec input bpf mask"); +SYSCTL_INT(_net_enc_out, OID_AUTO, ipsec_filter_mask, + CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(filter_mask_out), 0, + "IPsec output firewall filter mask"); +SYSCTL_INT(_net_enc_out, OID_AUTO, ipsec_bpf_mask, + CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(bpf_mask_out), 0, + "IPsec output bpf mask"); static void enc_clone_destroy(struct ifnet *ifp) { - KASSERT(ifp != encif, ("%s: destroying encif", __func__)); + struct enc_softc *sc; + sc = ifp->if_softc; + KASSERT(sc == V_enc_sc, ("sc != ifp->if_softc")); + + enc_remove_hhooks(sc); bpfdetach(ifp); if_detach(ifp); if_free(ifp); + free(sc, M_DEVBUF); + V_enc_sc = NULL; } static int @@ -137,234 +149,255 @@ enc_clone_create(struct if_clone *ifc, i struct ifnet *ifp; struct enc_softc *sc; - sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK|M_ZERO); + sc = malloc(sizeof(struct enc_softc), M_DEVBUF, + M_WAITOK | M_ZERO); ifp = sc->sc_ifp = if_alloc(IFT_ENC); if (ifp == NULL) { free(sc, M_DEVBUF); return (ENOSPC); } - + if (V_enc_sc != NULL) { + if_free(ifp); + free(sc, M_DEVBUF); + return (EEXIST); + } + V_enc_sc = sc; if_initname(ifp, encname, unit); ifp->if_mtu = ENCMTU; ifp->if_ioctl = enc_ioctl; ifp->if_output = enc_output; - ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_softc = sc; if_attach(ifp); bpfattach(ifp, DLT_ENC, sizeof(struct enchdr)); - - mtx_lock(&enc_mtx); - /* grab a pointer to enc0, ignore the rest */ - if (encif == NULL) - encif = ifp; - mtx_unlock(&enc_mtx); - - return (0); -} - -static int -enc_modevent(module_t mod, int type, void *data) -{ - switch (type) { - case MOD_LOAD: - mtx_init(&enc_mtx, "enc mtx", NULL, MTX_DEF); - enc_cloner = if_clone_simple(encname, enc_clone_create, - enc_clone_destroy, 1); - break; - case MOD_UNLOAD: - printf("enc module unload - not possible for this module\n"); - return (EINVAL); - default: - return (EOPNOTSUPP); + if (enc_add_hhooks(sc) != 0) { + enc_clone_destroy(ifp); + return (ENXIO); } return (0); } -static moduledata_t enc_mod = { - "if_enc", - enc_modevent, - 0 -}; - -DECLARE_MODULE(if_enc, enc_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY); - static int enc_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, struct route *ro) { + m_freem(m); return (0); } -/* - * Process an ioctl request. - */ -/* ARGSUSED */ static int enc_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { - int error = 0; - - mtx_lock(&enc_mtx); - - switch (cmd) { - - case SIOCSIFFLAGS: - if (ifp->if_flags & IFF_UP) - ifp->if_drv_flags |= IFF_DRV_RUNNING; - else - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - - break; - - default: - error = EINVAL; - } - mtx_unlock(&enc_mtx); - return (error); + if (cmd != SIOCSIFFLAGS) + return (EINVAL); + if (ifp->if_flags & IFF_UP) + ifp->if_drv_flags |= IFF_DRV_RUNNING; + else + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + return (0); } -int -ipsec_filter(struct mbuf **mp, int dir, int flags) +/* + * One helper hook function is used by any hook points. + * + from hhook_type we can determine the packet direction: + * HHOOK_TYPE_IPSEC_IN or HHOOK_TYPE_IPSEC_OUT; + * + from hhook_id we can determine address family: AF_INET or AF_INET6; + * + udata contains pointer to enc_softc; + * + ctx_data contains pointer to struct ipsec_ctx_data. + */ +static int +enc_hhook(int32_t hhook_type, int32_t hhook_id, void *udata, void *ctx_data, + void *hdata, struct osd *hosd) { - int error, i; - struct ip *ip; - struct ifnet *rcvif; - - KASSERT(encif != NULL, ("%s: encif is null", __func__)); - KASSERT(flags & (ENC_IN|ENC_OUT), - ("%s: invalid flags: %04x", __func__, flags)); - - if ((encif->if_drv_flags & IFF_DRV_RUNNING) == 0) + struct enchdr hdr; + struct ipsec_ctx_data *ctx; + struct enc_softc *sc; + struct ifnet *ifp, *rcvif; + struct pfil_head *ph; + int pdir; + + sc = (struct enc_softc *)udata; + ifp = sc->sc_ifp; + if ((ifp->if_flags & IFF_UP) == 0) return (0); - if (flags & ENC_IN) { - if ((flags & ipsec_filter_mask_in) == 0) - return (0); - } else { - if ((flags & ipsec_filter_mask_out) == 0) - return (0); + ctx = (struct ipsec_ctx_data *)ctx_data; + /* XXX: wrong hook point was used by caller? */ + if (ctx->af != hhook_id) + return (EPFNOSUPPORT); + + if (((hhook_type == HHOOK_TYPE_IPSEC_IN && + (ctx->enc & V_bpf_mask_in) != 0) || + (hhook_type == HHOOK_TYPE_IPSEC_OUT && + (ctx->enc & V_bpf_mask_out) != 0)) && + bpf_peers_present(ifp->if_bpf) != 0) { + hdr.af = ctx->af; + hdr.spi = ctx->sav->spi; + hdr.flags = 0; + if (ctx->sav->alg_enc != SADB_EALG_NONE) + hdr.flags |= M_CONF; + if (ctx->sav->alg_auth != SADB_AALG_NONE) + hdr.flags |= M_AUTH; + bpf_mtap2(ifp->if_bpf, &hdr, sizeof(hdr), *ctx->mp); + } + + switch (hhook_type) { + case HHOOK_TYPE_IPSEC_IN: + if (ctx->enc == IPSEC_ENC_BEFORE) { + /* Do accounting only once */ + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); + if_inc_counter(ifp, IFCOUNTER_IBYTES, + (*ctx->mp)->m_pkthdr.len); + } + if ((ctx->enc & V_filter_mask_in) == 0) + return (0); /* skip pfil processing */ + pdir = PFIL_IN; + break; + case HHOOK_TYPE_IPSEC_OUT: + if (ctx->enc == IPSEC_ENC_BEFORE) { + /* Do accounting only once */ + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + if_inc_counter(ifp, IFCOUNTER_OBYTES, + (*ctx->mp)->m_pkthdr.len); + } + if ((ctx->enc & V_filter_mask_out) == 0) + return (0); /* skip pfil processing */ + pdir = PFIL_OUT; + break; + default: + return (EINVAL); } - /* Skip pfil(9) if no filters are loaded */ - if (1 + switch (hhook_id) { #ifdef INET - && !PFIL_HOOKED(&V_inet_pfil_hook) + case AF_INET: + ph = &V_inet_pfil_hook; + break; #endif #ifdef INET6 - && !PFIL_HOOKED(&V_inet6_pfil_hook) + case AF_INET6: + ph = &V_inet6_pfil_hook; + break; #endif - ) { + default: + ph = NULL; + } + if (ph == NULL || !PFIL_HOOKED(ph)) return (0); + /* Make a packet looks like it was received on enc(4) */ + rcvif = (*ctx->mp)->m_pkthdr.rcvif; + (*ctx->mp)->m_pkthdr.rcvif = ifp; + if (pfil_run_hooks(ph, ctx->mp, ifp, pdir, NULL) != 0 || + *ctx->mp == NULL) { + *ctx->mp = NULL; /* consumed by filter */ + return (EACCES); } + (*ctx->mp)->m_pkthdr.rcvif = rcvif; + return (0); +} - i = min((*mp)->m_pkthdr.len, max_protohdr); - if ((*mp)->m_len < i) { - *mp = m_pullup(*mp, i); - if (*mp == NULL) { - printf("%s: m_pullup failed\n", __func__); - return (-1); - } - } +static int +enc_add_hhooks(struct enc_softc *sc) +{ + struct hookinfo hki; + int error; - error = 0; - rcvif = (*mp)->m_pkthdr.rcvif; - (*mp)->m_pkthdr.rcvif = encif; - ip = mtod(*mp, struct ip *); - switch (ip->ip_v) { + error = EPFNOSUPPORT; + hki.hook_func = enc_hhook; + hki.hook_helper = NULL; + hki.hook_udata = sc; #ifdef INET - case 4: - error = pfil_run_hooks(&V_inet_pfil_hook, mp, - encif, dir, NULL); - break; + hki.hook_id = AF_INET; + hki.hook_type = HHOOK_TYPE_IPSEC_IN; + error = hhook_add_hook(V_ipsec_hhh_in[HHOOK_IPSEC_INET], + &hki, HHOOK_WAITOK); + if (error != 0) + return (error); + hki.hook_type = HHOOK_TYPE_IPSEC_OUT; + error = hhook_add_hook(V_ipsec_hhh_out[HHOOK_IPSEC_INET], + &hki, HHOOK_WAITOK); + if (error != 0) + return (error); #endif #ifdef INET6 - case 6: - error = pfil_run_hooks(&V_inet6_pfil_hook, mp, - encif, dir, NULL); - break; -#endif - default: - printf("%s: unknown IP version\n", __func__); - } - - /* - * If the mbuf was consumed by the filter for requeueing (dummynet, etc) - * then error will be zero but we still want to return an error to our - * caller so the null mbuf isn't forwarded further. - */ - if (*mp == NULL && error == 0) - return (-1); /* Consumed by the filter */ - if (*mp == NULL) + hki.hook_id = AF_INET6; + hki.hook_type = HHOOK_TYPE_IPSEC_IN; + error = hhook_add_hook(V_ipsec_hhh_in[HHOOK_IPSEC_INET6], + &hki, HHOOK_WAITOK); + if (error != 0) return (error); + hki.hook_type = HHOOK_TYPE_IPSEC_OUT; + error = hhook_add_hook(V_ipsec_hhh_out[HHOOK_IPSEC_INET6], + &hki, HHOOK_WAITOK); if (error != 0) - goto bad; - - (*mp)->m_pkthdr.rcvif = rcvif; + return (error); +#endif return (error); +} -bad: - m_freem(*mp); - *mp = NULL; - return (error); +static void +enc_remove_hhooks(struct enc_softc *sc) +{ + struct hookinfo hki; + + hki.hook_func = enc_hhook; + hki.hook_helper = NULL; + hki.hook_udata = sc; +#ifdef INET + hki.hook_id = AF_INET; + hki.hook_type = HHOOK_TYPE_IPSEC_IN; + hhook_remove_hook(V_ipsec_hhh_in[HHOOK_IPSEC_INET], &hki); + hki.hook_type = HHOOK_TYPE_IPSEC_OUT; + hhook_remove_hook(V_ipsec_hhh_out[HHOOK_IPSEC_INET], &hki); +#endif +#ifdef INET6 + hki.hook_id = AF_INET6; + hki.hook_type = HHOOK_TYPE_IPSEC_IN; + hhook_remove_hook(V_ipsec_hhh_in[HHOOK_IPSEC_INET6], &hki); + hki.hook_type = HHOOK_TYPE_IPSEC_OUT; + hhook_remove_hook(V_ipsec_hhh_out[HHOOK_IPSEC_INET6], &hki); +#endif } -void -ipsec_bpf(struct mbuf *m, struct secasvar *sav, int af, int flags) +static void +vnet_enc_init(const void *unused __unused) { - int mflags; - struct enchdr hdr; - KASSERT(encif != NULL, ("%s: encif is null", __func__)); - KASSERT(flags & (ENC_IN|ENC_OUT), - ("%s: invalid flags: %04x", __func__, flags)); - - if ((encif->if_drv_flags & IFF_DRV_RUNNING) == 0) - return; - - if (flags & ENC_IN) { - if ((flags & ipsec_bpf_mask_in) == 0) - return; - } else { - if ((flags & ipsec_bpf_mask_out) == 0) - return; - } + V_enc_sc = NULL; + V_enc_cloner = if_clone_simple(encname, enc_clone_create, + enc_clone_destroy, 1); +} +VNET_SYSINIT(vnet_enc_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, + vnet_enc_init, NULL); - if (bpf_peers_present(encif->if_bpf)) { - mflags = 0; - hdr.spi = 0; - if (!sav) { - struct m_tag *mtag; - mtag = m_tag_find(m, PACKET_TAG_IPSEC_IN_DONE, NULL); - if (mtag != NULL) { - struct tdb_ident *tdbi; - tdbi = (struct tdb_ident *) (mtag + 1); - if (tdbi->alg_enc != SADB_EALG_NONE) - mflags |= M_CONF; - if (tdbi->alg_auth != SADB_AALG_NONE) - mflags |= M_AUTH; - hdr.spi = tdbi->spi; - } - } else { - if (sav->alg_enc != SADB_EALG_NONE) - mflags |= M_CONF; - if (sav->alg_auth != SADB_AALG_NONE) - mflags |= M_AUTH; - hdr.spi = sav->spi; - } +static void +vnet_enc_uninit(const void *unused __unused) +{ + + if_clone_detach(V_enc_cloner); +} +VNET_SYSUNINIT(vnet_enc_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, + vnet_enc_uninit, NULL); - /* - * We need to prepend the address family as a four byte - * field. Cons up a dummy header to pacify bpf. This - * is safe because bpf will only read from the mbuf - * (i.e., it won't try to free it or keep a pointer a - * to it). - */ - hdr.af = af; - /* hdr.spi already set above */ - hdr.flags = mflags; +static int +enc_modevent(module_t mod, int type, void *data) +{ - bpf_mtap2(encif->if_bpf, &hdr, sizeof(hdr), m); + switch (type) { + case MOD_LOAD: + case MOD_UNLOAD: + break; + default: + return (EOPNOTSUPP); } + return (0); } + +static moduledata_t enc_mod = { + "if_enc", + enc_modevent, + 0 +}; + +DECLARE_MODULE(if_enc, enc_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY); Modified: head/sys/net/if_enc.h ============================================================================== --- head/sys/net/if_enc.h Wed Nov 25 07:14:58 2015 (r291291) +++ head/sys/net/if_enc.h Wed Nov 25 07:31:59 2015 (r291292) @@ -30,6 +30,13 @@ #ifndef _NET_IF_ENC_H #define _NET_IF_ENC_H -extern struct ifnet *encif; +struct ipsec_ctx_data { + struct mbuf **mp; + struct secasvar *sav; + uint8_t af; +#define IPSEC_ENC_BEFORE 0x01 +#define IPSEC_ENC_AFTER 0x02 + uint8_t enc; +}; #endif /* _NET_IF_ENC_H */ Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Wed Nov 25 07:14:58 2015 (r291291) +++ head/sys/net/if_var.h Wed Nov 25 07:31:59 2015 (r291292) @@ -93,6 +93,14 @@ TAILQ_HEAD(ifgrouphead, ifg_group); #ifdef _KERNEL VNET_DECLARE(struct pfil_head, link_pfil_hook); /* packet filter hooks */ #define V_link_pfil_hook VNET(link_pfil_hook) + +#define HHOOK_IPSEC_INET 0 +#define HHOOK_IPSEC_INET6 1 +#define HHOOK_IPSEC_COUNT 2 +VNET_DECLARE(struct hhook_head *, ipsec_hhh_in[HHOOK_IPSEC_COUNT]); +VNET_DECLARE(struct hhook_head *, ipsec_hhh_out[HHOOK_IPSEC_COUNT]); +#define V_ipsec_hhh_in VNET(ipsec_hhh_in) +#define V_ipsec_hhh_out VNET(ipsec_hhh_out) #endif /* _KERNEL */ typedef enum { Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Wed Nov 25 07:14:58 2015 (r291291) +++ head/sys/netinet/ip_input.c Wed Nov 25 07:31:59 2015 (r291292) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -318,6 +319,17 @@ ip_init(void) printf("%s: WARNING: unable to register pfil hook, " "error %d\n", __func__, i); + if (hhook_head_register(HHOOK_TYPE_IPSEC_IN, AF_INET, + &V_ipsec_hhh_in[HHOOK_IPSEC_INET], + HHOOK_WAITOK | HHOOK_HEADISINVNET) != 0) + printf("%s: WARNING: unable to register input helper hook\n", + __func__); + if (hhook_head_register(HHOOK_TYPE_IPSEC_OUT, AF_INET, + &V_ipsec_hhh_out[HHOOK_IPSEC_INET], + HHOOK_WAITOK | HHOOK_HEADISINVNET) != 0) + printf("%s: WARNING: unable to register output helper hook\n", + __func__); + /* Skip initialization of globals for non-default instances. */ if (!IS_DEFAULT_VNET(curvnet)) return; @@ -352,12 +364,24 @@ ip_init(void) void ip_destroy(void) { - int i; + int error; - if ((i = pfil_head_unregister(&V_inet_pfil_hook)) != 0) + if ((error = pfil_head_unregister(&V_inet_pfil_hook)) != 0) printf("%s: WARNING: unable to unregister pfil hook, " - "error %d\n", __func__, i); + "error %d\n", __func__, error); + error = hhook_head_deregister(V_ipsec_hhh_in[HHOOK_IPSEC_INET]); + if (error != 0) { + printf("%s: WARNING: unable to deregister input helper hook " + "type HHOOK_TYPE_IPSEC_IN, id HHOOK_IPSEC_INET: " + "error %d returned\n", __func__, error); + } + error = hhook_head_deregister(V_ipsec_hhh_out[HHOOK_IPSEC_INET]); + if (error != 0) { + printf("%s: WARNING: unable to deregister output helper hook " + "type HHOOK_TYPE_IPSEC_OUT, id HHOOK_IPSEC_INET: " + "error %d returned\n", __func__, error); + } /* Cleanup in_ifaddr hash table; should be empty. */ hashdestroy(V_in_ifaddrhashtbl, M_IFADDR, V_in_ifaddrhmask); Modified: head/sys/netinet6/ip6_input.c ============================================================================== --- head/sys/netinet6/ip6_input.c Wed Nov 25 07:14:58 2015 (r291291) +++ head/sys/netinet6/ip6_input.c Wed Nov 25 07:31:59 2015 (r291292) @@ -72,6 +72,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -201,6 +202,17 @@ ip6_init(void) printf("%s: WARNING: unable to register pfil hook, " "error %d\n", __func__, i); + if (hhook_head_register(HHOOK_TYPE_IPSEC_IN, AF_INET6, + &V_ipsec_hhh_in[HHOOK_IPSEC_INET6], + HHOOK_WAITOK | HHOOK_HEADISINVNET) != 0) + printf("%s: WARNING: unable to register input helper hook\n", + __func__); + if (hhook_head_register(HHOOK_TYPE_IPSEC_OUT, AF_INET6, + &V_ipsec_hhh_out[HHOOK_IPSEC_INET6], + HHOOK_WAITOK | HHOOK_HEADISINVNET) != 0) + printf("%s: WARNING: unable to register output helper hook\n", + __func__); + scope6_init(); addrsel_policy_init(); nd6_init(); @@ -300,11 +312,23 @@ ip6proto_unregister(short ip6proto) void ip6_destroy() { - int i; + int error; - if ((i = pfil_head_unregister(&V_inet6_pfil_hook)) != 0) + if ((error = pfil_head_unregister(&V_inet6_pfil_hook)) != 0) printf("%s: WARNING: unable to unregister pfil hook, " - "error %d\n", __func__, i); + "error %d\n", __func__, error); + error = hhook_head_deregister(V_ipsec_hhh_in[HHOOK_IPSEC_INET6]); + if (error != 0) { + printf("%s: WARNING: unable to deregister input helper hook " + "type HHOOK_TYPE_IPSEC_IN, id HHOOK_IPSEC_INET6: " + "error %d returned\n", __func__, error); + } + error = hhook_head_deregister(V_ipsec_hhh_out[HHOOK_IPSEC_INET6]); + if (error != 0) { + printf("%s: WARNING: unable to deregister output helper hook " + "type HHOOK_TYPE_IPSEC_OUT, id HHOOK_IPSEC_INET6: " + "error %d returned\n", __func__, error); + } hashdestroy(V_in6_ifaddrhashtbl, M_IFADDR, V_in6_ifaddrhmask); nd6_destroy(); callout_drain(&V_in6_tmpaddrtimer_ch); Modified: head/sys/netipsec/ipsec.c ============================================================================== --- head/sys/netipsec/ipsec.c Wed Nov 25 07:14:58 2015 (r291291) +++ head/sys/netipsec/ipsec.c Wed Nov 25 07:31:59 2015 (r291292) @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -55,6 +56,7 @@ #include #include +#include #include #include @@ -806,6 +808,34 @@ ipsec6_setspidx_ipaddr(struct mbuf *m, s } #endif +int +ipsec_run_hhooks(struct ipsec_ctx_data *ctx, int type) +{ + int idx; + + switch (ctx->af) { +#ifdef INET + case AF_INET: + idx = HHOOK_IPSEC_INET; + break; +#endif +#ifdef INET6 + case AF_INET6: + idx = HHOOK_IPSEC_INET6; + break; +#endif + default: + return (EPFNOSUPPORT); + } + if (type == HHOOK_TYPE_IPSEC_IN) + HHOOKS_RUN_IF(V_ipsec_hhh_in[idx], ctx, NULL); + else + HHOOKS_RUN_IF(V_ipsec_hhh_out[idx], ctx, NULL); + if (*ctx->mp == NULL) + return (EACCES); + return (0); +} + static void ipsec_delpcbpolicy(struct inpcbpolicy *p) { Modified: head/sys/netipsec/ipsec.h ============================================================================== --- head/sys/netipsec/ipsec.h Wed Nov 25 07:14:58 2015 (r291291) +++ head/sys/netipsec/ipsec.h Wed Nov 25 07:31:59 2015 (r291292) @@ -258,6 +258,15 @@ struct ipsecstat { #ifdef _KERNEL #include +struct ipsec_ctx_data; +#define IPSEC_INIT_CTX(_ctx, _mp, _sav, _af, _enc) do { \ + (_ctx)->mp = (_mp); \ + (_ctx)->sav = (_sav); \ + (_ctx)->af = (_af); \ + (_ctx)->enc = (_enc); \ +} while(0) +int ipsec_run_hhooks(struct ipsec_ctx_data *ctx, int direction); + VNET_DECLARE(int, ipsec_debug); #define V_ipsec_debug VNET(ipsec_debug) @@ -352,14 +361,6 @@ extern struct mbuf *m_makespace(struct m extern caddr_t m_pad(struct mbuf *m, int n); extern int m_striphdr(struct mbuf *m, int skip, int hlen); -#ifdef DEV_ENC -#define ENC_BEFORE 0x0001 -#define ENC_AFTER 0x0002 -#define ENC_IN 0x0100 -#define ENC_OUT 0x0200 -extern int ipsec_filter(struct mbuf **, int, int); -extern void ipsec_bpf(struct mbuf *, struct secasvar *, int, int); -#endif #endif /* _KERNEL */ #ifndef _KERNEL Modified: head/sys/netipsec/ipsec_input.c ============================================================================== --- head/sys/netipsec/ipsec_input.c Wed Nov 25 07:14:58 2015 (r291291) +++ head/sys/netipsec/ipsec_input.c Wed Nov 25 07:31:59 2015 (r291292) @@ -43,7 +43,6 @@ #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" -#include "opt_enc.h" #include #include @@ -53,11 +52,12 @@ #include #include #include +#include #include #include #include -#include +#include #include #include @@ -94,10 +94,6 @@ #include #include -#ifdef DEV_ENC -#include -#endif - #define IPSEC_ISTAT(proto, name) do { \ if ((proto) == IPPROTO_ESP) \ @@ -314,6 +310,7 @@ ipsec4_common_input_cb(struct mbuf *m, s int protoff) { char buf[INET6_ADDRSTRLEN]; + struct ipsec_ctx_data ctx; int prot, af, sproto, isr_prot; struct ip *ip; struct m_tag *mtag; @@ -368,16 +365,10 @@ ipsec4_common_input_cb(struct mbuf *m, s } prot = ip->ip_p; -#ifdef DEV_ENC - if_inc_counter(encif, IFCOUNTER_IPACKETS, 1); - if_inc_counter(encif, IFCOUNTER_IBYTES, m->m_pkthdr.len); - - /* Pass the mbuf to enc0 for bpf and pfil. */ - ipsec_bpf(m, sav, AF_INET, ENC_IN|ENC_BEFORE); - if ((error = ipsec_filter(&m, PFIL_IN, ENC_IN|ENC_BEFORE)) != 0) - return (error); + IPSEC_INIT_CTX(&ctx, &m, sav, AF_INET, IPSEC_ENC_BEFORE); + if ((error = ipsec_run_hhooks(&ctx, HHOOK_TYPE_IPSEC_IN)) != 0) + goto bad; ip = mtod(m, struct ip *); -#endif /* DEV_ENC */ /* IP-in-IP encapsulation */ if (prot == IPPROTO_IPIP && @@ -501,32 +492,18 @@ ipsec4_common_input_cb(struct mbuf *m, s */ if (saidx->mode == IPSEC_MODE_TRANSPORT) prot = IPPROTO_IPIP; -#ifdef DEV_ENC - /* - * Pass the mbuf to enc0 for bpf and pfil. - */ - if (prot == IPPROTO_IPIP) - ipsec_bpf(m, sav, AF_INET, ENC_IN|ENC_AFTER); -#ifdef INET6 - if (prot == IPPROTO_IPV6) - ipsec_bpf(m, sav, AF_INET6, ENC_IN|ENC_AFTER); -#endif - - if ((error = ipsec_filter(&m, PFIL_IN, ENC_IN|ENC_AFTER)) != 0) - return (error); -#endif /* DEV_ENC */ - /* * Re-dispatch via software interrupt. */ - switch (prot) { case IPPROTO_IPIP: isr_prot = NETISR_IP; + af = AF_INET; break; #ifdef INET6 case IPPROTO_IPV6: isr_prot = NETISR_IPV6; + af = AF_INET6; break; #endif default: @@ -537,6 +514,9 @@ ipsec4_common_input_cb(struct mbuf *m, s goto bad; } + IPSEC_INIT_CTX(&ctx, &m, sav, af, IPSEC_ENC_AFTER); + if ((error = ipsec_run_hhooks(&ctx, HHOOK_TYPE_IPSEC_IN)) != 0) + goto bad; error = netisr_queue_src(isr_prot, (uintptr_t)sav->spi, m); if (error) { IPSEC_ISTAT(sproto, qfull); @@ -611,6 +591,7 @@ ipsec6_common_input_cb(struct mbuf *m, s int protoff) { char buf[INET6_ADDRSTRLEN]; + struct ipsec_ctx_data ctx; int prot, af, sproto; struct ip6_hdr *ip6; struct m_tag *mtag; @@ -658,20 +639,13 @@ ipsec6_common_input_cb(struct mbuf *m, s ip6 = mtod(m, struct ip6_hdr *); ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(struct ip6_hdr)); + IPSEC_INIT_CTX(&ctx, &m, sav, af, IPSEC_ENC_BEFORE); + if ((error = ipsec_run_hhooks(&ctx, HHOOK_TYPE_IPSEC_IN)) != 0) + goto bad; /* Save protocol */ m_copydata(m, protoff, 1, &nxt8); prot = nxt8; -#ifdef DEV_ENC - if_inc_counter(encif, IFCOUNTER_IPACKETS, 1); - if_inc_counter(encif, IFCOUNTER_IBYTES, m->m_pkthdr.len); - - /* Pass the mbuf to enc0 for bpf and pfil. */ - ipsec_bpf(m, sav, AF_INET6, ENC_IN|ENC_BEFORE); - if ((error = ipsec_filter(&m, PFIL_IN, ENC_IN|ENC_BEFORE)) != 0) - return (error); -#endif /* DEV_ENC */ - /* IPv6-in-IP encapsulation */ if (prot == IPPROTO_IPV6 && saidx->mode != IPSEC_MODE_TRANSPORT) { @@ -778,20 +752,16 @@ ipsec6_common_input_cb(struct mbuf *m, s key_sa_recordxfer(sav, m); -#ifdef DEV_ENC - /* - * Pass the mbuf to enc0 for bpf and pfil. - */ + #ifdef INET if (prot == IPPROTO_IPIP) - ipsec_bpf(m, sav, AF_INET, ENC_IN|ENC_AFTER); + af = AF_INET; + else #endif - if (prot == IPPROTO_IPV6) - ipsec_bpf(m, sav, AF_INET6, ENC_IN|ENC_AFTER); - - if ((error = ipsec_filter(&m, PFIL_IN, ENC_IN|ENC_AFTER)) != 0) - return (error); -#endif /* DEV_ENC */ + af = AF_INET6; + IPSEC_INIT_CTX(&ctx, &m, sav, af, IPSEC_ENC_AFTER); + if ((error = ipsec_run_hhooks(&ctx, HHOOK_TYPE_IPSEC_IN)) != 0) + goto bad; if (skip == 0) { /* * We stripped outer IPv6 header. Modified: head/sys/netipsec/ipsec_output.c ============================================================================== --- head/sys/netipsec/ipsec_output.c Wed Nov 25 07:14:58 2015 (r291291) +++ head/sys/netipsec/ipsec_output.c Wed Nov 25 07:31:59 2015 (r291292) @@ -32,7 +32,6 @@ #include "opt_inet.h" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Nov 25 08:19:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DF12A37894; Wed, 25 Nov 2015 08:19:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 088FB1358; Wed, 25 Nov 2015 08:19:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAP8J2Vp002903; Wed, 25 Nov 2015 08:19:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAP8J1OX002896; Wed, 25 Nov 2015 08:19:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511250819.tAP8J1OX002896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 25 Nov 2015 08:19: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: r291293 - in stable/10: lib/libc/stdio tools/regression/lib/libc/stdio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 08:19:03 -0000 Author: ngie Date: Wed Nov 25 08:19:01 2015 New Revision: 291293 URL: https://svnweb.freebsd.org/changeset/base/291293 Log: MFC r264737: Discussed with: jilles r264737 (by jilles): libc/stdio: Fail fdopen() on an execute-only fd. An execute-only fd (opened with O_EXEC) allows neither read() nor write() and is therefore incompatible with all stdio modes. Therefore, the [EINVAL] error applies. Also adjust the similar check in freopen() with a NULL path, even though this checks an fd which is already from a FILE. Added: stable/10/tools/regression/lib/libc/stdio/test-fdopen.c - copied unchanged from r264737, head/tools/regression/lib/libc/stdio/test-fdopen.c stable/10/tools/regression/lib/libc/stdio/test-fdopen.t - copied unchanged from r264737, head/tools/regression/lib/libc/stdio/test-fdopen.t stable/10/tools/regression/lib/libc/stdio/test-freopen.c - copied unchanged from r264737, head/tools/regression/lib/libc/stdio/test-freopen.c stable/10/tools/regression/lib/libc/stdio/test-freopen.t - copied unchanged from r264737, head/tools/regression/lib/libc/stdio/test-freopen.t Modified: stable/10/lib/libc/stdio/fdopen.c stable/10/lib/libc/stdio/freopen.c stable/10/tools/regression/lib/libc/stdio/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdio/fdopen.c ============================================================================== --- stable/10/lib/libc/stdio/fdopen.c Wed Nov 25 07:31:59 2015 (r291292) +++ stable/10/lib/libc/stdio/fdopen.c Wed Nov 25 08:19:01 2015 (r291293) @@ -70,7 +70,8 @@ fdopen(int fd, const char *mode) /* Make sure the mode the user wants is a subset of the actual mode. */ if ((fdflags = _fcntl(fd, F_GETFL, 0)) < 0) return (NULL); - tmp = fdflags & O_ACCMODE; + /* Work around incorrect O_ACCMODE. */ + tmp = fdflags & (O_ACCMODE | O_EXEC); if (tmp != O_RDWR && (tmp != (oflags & O_ACCMODE))) { errno = EINVAL; return (NULL); Modified: stable/10/lib/libc/stdio/freopen.c ============================================================================== --- stable/10/lib/libc/stdio/freopen.c Wed Nov 25 07:31:59 2015 (r291292) +++ stable/10/lib/libc/stdio/freopen.c Wed Nov 25 08:19:01 2015 (r291293) @@ -92,8 +92,9 @@ freopen(const char * __restrict file, co errno = sverrno; return (NULL); } - if ((dflags & O_ACCMODE) != O_RDWR && (dflags & O_ACCMODE) != - (oflags & O_ACCMODE)) { + /* Work around incorrect O_ACCMODE. */ + if ((dflags & O_ACCMODE) != O_RDWR && + (dflags & (O_ACCMODE | O_EXEC)) != (oflags & O_ACCMODE)) { fclose(fp); FUNLOCKFILE(fp); errno = EBADF; Modified: stable/10/tools/regression/lib/libc/stdio/Makefile ============================================================================== --- stable/10/tools/regression/lib/libc/stdio/Makefile Wed Nov 25 07:31:59 2015 (r291292) +++ stable/10/tools/regression/lib/libc/stdio/Makefile Wed Nov 25 08:19:01 2015 (r291293) @@ -1,6 +1,8 @@ # $FreeBSD$ -TESTS= test-fopen \ +TESTS= test-fdopen \ + test-fopen \ + test-freopen \ test-getdelim \ test-mkostemp \ test-open_memstream \ Copied: stable/10/tools/regression/lib/libc/stdio/test-fdopen.c (from r264737, head/tools/regression/lib/libc/stdio/test-fdopen.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/regression/lib/libc/stdio/test-fdopen.c Wed Nov 25 08:19:01 2015 (r291293, copy of r264737, head/tools/regression/lib/libc/stdio/test-fdopen.c) @@ -0,0 +1,105 @@ +/*- + * Copyright (c) 2014 Jilles Tjoelker + * 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 + +static int testnum = 1; + +static void +runtest(const char *fname, int intmode, const char *strmode, bool success) +{ + FILE *fp; + int fd; + + fd = open(fname, intmode); + if (fd == -1) { + printf("not ok %d - open(\"%s\", %#x) failed\n", + testnum++, fname, intmode); + return; + } + fp = fdopen(fd, strmode); + if (fp == NULL) { + close(fd); + if (success) + printf("not ok %d - " + "fdopen(open(\"%s\", %#x), \"%s\") failed\n", + testnum++, fname, intmode, strmode); + else + printf("ok %d - " + "fdopen(open(\"%s\", %#x), \"%s\") failed\n", + testnum++, fname, intmode, strmode); + return; + } + if (success) + printf("ok %d - " + "fdopen(open(\"%s\", %#x), \"%s\") succeeded\n", + testnum++, fname, intmode, strmode); + else + printf("not ok %d - " + "fdopen(open(\"%s\", %#x), \"%s\") succeeded\n", + testnum++, fname, intmode, strmode); + fclose(fp); +} + +/* + * Test program for fdopen(). + */ +int +main(int argc, char *argv[]) +{ + printf("1..19\n"); + runtest("/dev/null", O_RDONLY, "r", true); + runtest("/dev/null", O_WRONLY, "r", false); + runtest("/dev/null", O_RDWR, "r", true); + runtest("/dev/null", O_RDONLY, "w", false); + runtest("/dev/null", O_WRONLY, "w", true); + runtest("/dev/null", O_RDWR, "w", true); + runtest("/dev/null", O_RDONLY, "a", false); + runtest("/dev/null", O_WRONLY, "a", true); + runtest("/dev/null", O_RDWR, "a", true); + runtest("/dev/null", O_RDONLY, "r+", false); + runtest("/dev/null", O_WRONLY, "r+", false); + runtest("/dev/null", O_RDWR, "r+", true); + runtest("/dev/null", O_RDONLY, "w+", false); + runtest("/dev/null", O_WRONLY, "w+", false); + runtest("/dev/null", O_RDWR, "w+", true); + runtest("/bin/sh", O_EXEC, "r", false); + runtest("/bin/sh", O_EXEC, "w", false); + runtest("/bin/sh", O_EXEC, "r+", false); + runtest("/bin/sh", O_EXEC, "w+", false); + + return 0; +} + +/* vim:ts=8:cin:sw=8 + * */ Copied: stable/10/tools/regression/lib/libc/stdio/test-fdopen.t (from r264737, head/tools/regression/lib/libc/stdio/test-fdopen.t) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/regression/lib/libc/stdio/test-fdopen.t Wed Nov 25 08:19:01 2015 (r291293, copy of r264737, head/tools/regression/lib/libc/stdio/test-fdopen.t) @@ -0,0 +1,10 @@ +#!/bin/sh +# $FreeBSD$ + +cd `dirname $0` + +executable=`basename $0 .t` + +make $executable 2>&1 > /dev/null + +exec ./$executable Copied: stable/10/tools/regression/lib/libc/stdio/test-freopen.c (from r264737, head/tools/regression/lib/libc/stdio/test-freopen.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/regression/lib/libc/stdio/test-freopen.c Wed Nov 25 08:19:01 2015 (r291293, copy of r264737, head/tools/regression/lib/libc/stdio/test-freopen.c) @@ -0,0 +1,109 @@ +/*- + * Copyright (c) 2014 Jilles Tjoelker + * 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 + +static int testnum = 1; + +static void +runtest(const char *fname1, const char *mode1, const char *fname2, + const char *mode2, bool success) +{ + FILE *fp1, *fp2; + const char *fname2_print; + + fname2_print = fname2 != NULL ? fname2 : ""; + fp1 = fopen(fname1, mode1); + if (fp1 == NULL) { + printf("not ok %d - fopen(\"%s\", \"%s\") failed\n", + testnum++, fname1, mode1); + return; + } + fp2 = freopen(fname2, mode2, fp1); + if (fp2 == NULL) { + fclose(fp1); + if (success) + printf("not ok %d - " + "freopen(\"%s\", \"%s\", fopen(\"%s\", \"%s\")) " + "failed\n", + testnum++, fname2_print, mode2, fname1, mode1); + else + printf("ok %d - " + "freopen(\"%s\", \"%s\", fopen(\"%s\", \"%s\")) " + "failed\n", + testnum++, fname2_print, mode2, fname1, mode1); + return; + } + if (success) + printf("ok %d - " + "freopen(\"%s\", \"%s\", fopen(\"%s\", \"%s\")) " + "succeeded\n", + testnum++, fname2_print, mode2, fname1, mode1); + else + printf("not ok %d - " + "freopen(\"%s\", \"%s\", fopen(\"%s\", \"%s\")) " + "succeeded\n", + testnum++, fname2_print, mode2, fname1, mode1); + fclose(fp2); +} + +/* + * Test program for freopen(). + */ +int +main(int argc, char *argv[]) +{ + printf("1..19\n"); + runtest("/dev/null", "r", NULL, "r", true); + runtest("/dev/null", "w", NULL, "r", false); + runtest("/dev/null", "r+", NULL, "r", true); + runtest("/dev/null", "r", NULL, "w", false); + runtest("/dev/null", "w", NULL, "w", true); + runtest("/dev/null", "r+", NULL, "w", true); + runtest("/dev/null", "r", NULL, "a", false); + runtest("/dev/null", "w", NULL, "a", true); + runtest("/dev/null", "r+", NULL, "a", true); + runtest("/dev/null", "r", NULL, "r+", false); + runtest("/dev/null", "w", NULL, "r+", false); + runtest("/dev/null", "r+", NULL, "r+", true); + runtest("/dev/null", "r", NULL, "w+", false); + runtest("/dev/null", "w", NULL, "w+", false); + runtest("/dev/null", "r+", NULL, "w+", true); + runtest("/bin/sh", "r", NULL, "r", true); + runtest("/bin/sh", "r", "/bin/sh", "r", true); + runtest("/bin/sh", "r", "/dev/null", "r", true); + runtest("/bin/sh", "r", "/dev/null", "w", true); + + return 0; +} + +/* vim:ts=8:cin:sw=8 + * */ Copied: stable/10/tools/regression/lib/libc/stdio/test-freopen.t (from r264737, head/tools/regression/lib/libc/stdio/test-freopen.t) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/regression/lib/libc/stdio/test-freopen.t Wed Nov 25 08:19:01 2015 (r291293, copy of r264737, head/tools/regression/lib/libc/stdio/test-freopen.t) @@ -0,0 +1,10 @@ +#!/bin/sh +# $FreeBSD$ + +cd `dirname $0` + +executable=`basename $0 .t` + +make $executable 2>&1 > /dev/null + +exec ./$executable From owner-svn-src-all@freebsd.org Wed Nov 25 08:51:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1DE0A37DE9; Wed, 25 Nov 2015 08:51:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D099121A; Wed, 25 Nov 2015 08:51:44 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAP8phTd014314; Wed, 25 Nov 2015 08:51:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAP8ph5B014312; Wed, 25 Nov 2015 08:51:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511250851.tAP8ph5B014312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 25 Nov 2015 08:51: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: r291294 - stable/10/lib/libc/stdio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 08:51:44 -0000 Author: ngie Date: Wed Nov 25 08:51:43 2015 New Revision: 291294 URL: https://svnweb.freebsd.org/changeset/base/291294 Log: MFC r258245: r258245 (by eadler): Add missing include files for the printf_l and scanf_l man pages. Reported by: swildner@dragonflybsd.org Modified: stable/10/lib/libc/stdio/printf_l.3 stable/10/lib/libc/stdio/scanf_l.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdio/printf_l.3 ============================================================================== --- stable/10/lib/libc/stdio/printf_l.3 Wed Nov 25 08:19:01 2015 (r291293) +++ stable/10/lib/libc/stdio/printf_l.3 Wed Nov 25 08:51:43 2015 (r291294) @@ -43,6 +43,7 @@ .Lb libc .Sh SYNOPSIS .In stdio.h +.In xlocale.h .Ft int .Fn printf_l "locale_t loc" "const char * restrict format" "..." .Ft int Modified: stable/10/lib/libc/stdio/scanf_l.3 ============================================================================== --- stable/10/lib/libc/stdio/scanf_l.3 Wed Nov 25 08:19:01 2015 (r291293) +++ stable/10/lib/libc/stdio/scanf_l.3 Wed Nov 25 08:51:43 2015 (r291294) @@ -39,6 +39,7 @@ .Lb libc .Sh SYNOPSIS .In stdio.h +.In xlocale.h .Ft int .Fn scanf_l "locale_t loc" "const char * restrict format" "..." .Ft int From owner-svn-src-all@freebsd.org Wed Nov 25 08:58:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCC8BA37F68; Wed, 25 Nov 2015 08:58:08 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 857E414C0; Wed, 25 Nov 2015 08:58:08 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAP8w7wT014936; Wed, 25 Nov 2015 08:58:07 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAP8w7gE014935; Wed, 25 Nov 2015 08:58:07 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201511250858.tAP8w7gE014935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Wed, 25 Nov 2015 08:58: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: r291295 - 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 08:58:08 -0000 Author: smh Date: Wed Nov 25 08:58:07 2015 New Revision: 291295 URL: https://svnweb.freebsd.org/changeset/base/291295 Log: MFC r291012: Document loader(8) dumpdev option Sponsored by: Multiplay 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 Wed Nov 25 08:51:43 2015 (r291294) +++ stable/10/sys/boot/common/loader.8 Wed Nov 25 08:58:07 2015 (r291295) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 25, 2015 +.Dd November 18, 2015 .Dt LOADER 8 .Os .Sh NAME @@ -471,6 +471,14 @@ userland output (e.g.\& from .It Va currdev Selects the default device. Syntax for devices is odd. +.It Va dumpdev +Sets the device for kernel dumps. +This can be used to ensure that a device is configured before the corresponding +.Va dumpdev +directive from +.Xr rc.conf 5 +has been processed, allowing kernel panics that happen during the early stages +of boot to be captured. .It Va init_chroot If set to a valid directory in the root file system, it causes .Xr init 8 From owner-svn-src-all@freebsd.org Wed Nov 25 09:12:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C88A3A3547C; Wed, 25 Nov 2015 09:12:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95F501CA3; Wed, 25 Nov 2015 09:12:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAP9CU8K020761; Wed, 25 Nov 2015 09:12:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAP9CUZM020760; Wed, 25 Nov 2015 09:12:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511250912.tAP9CUZM020760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 25 Nov 2015 09:12:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291296 - head/lib/libc/locale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 09:12:31 -0000 Author: ngie Date: Wed Nov 25 09:12:30 2015 New Revision: 291296 URL: https://svnweb.freebsd.org/changeset/base/291296 Log: Link localeconv(3) to localeconv_l(3) MFC after: 3 days Modified: head/lib/libc/locale/Makefile.inc Modified: head/lib/libc/locale/Makefile.inc ============================================================================== --- head/lib/libc/locale/Makefile.inc Wed Nov 25 08:58:07 2015 (r291295) +++ head/lib/libc/locale/Makefile.inc Wed Nov 25 09:12:30 2015 (r291296) @@ -78,6 +78,7 @@ MLINKS+=iswalnum_l.3 iswalpha_l.3 iswaln iswalnum_l.3 iswspecial_l.3 iswalnum_l.3 nextwctype_l.3 \ iswalnum_l.3 towctrans_l.3 iswalnum_l.3 wctrans_l.3 MLINKS+=isxdigit.3 ishexnumber.3 +MLINKS+=localeconv.3 localeconv_l.3 MLINKS+=mbrtowc.3 mbrtoc16.3 mbrtowc.3 mbrtoc32.3 MLINKS+=mbsrtowcs.3 mbsnrtowcs.3 MLINKS+=wcrtomb.3 c16rtomb.3 wcrtomb.3 c32rtomb.3 From owner-svn-src-all@freebsd.org Wed Nov 25 09:19:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2743FA355C2; Wed, 25 Nov 2015 09:19:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E83C61EE1; Wed, 25 Nov 2015 09:19:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAP9JXLi021043; Wed, 25 Nov 2015 09:19:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAP9JW8J021041; Wed, 25 Nov 2015 09:19:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511250919.tAP9JW8J021041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 25 Nov 2015 09:19:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291297 - stable/9/lib/libc/stdio X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 09:19:34 -0000 Author: ngie Date: Wed Nov 25 09:19:32 2015 New Revision: 291297 URL: https://svnweb.freebsd.org/changeset/base/291297 Log: MFstable/10 r291294: MFC r258245: r258245 (by eadler): Add missing include files for the printf_l and scanf_l man pages. Reported by: swildner@dragonflybsd.org Modified: stable/9/lib/libc/stdio/printf_l.3 stable/9/lib/libc/stdio/scanf_l.3 Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/stdio/printf_l.3 ============================================================================== --- stable/9/lib/libc/stdio/printf_l.3 Wed Nov 25 09:12:30 2015 (r291296) +++ stable/9/lib/libc/stdio/printf_l.3 Wed Nov 25 09:19:32 2015 (r291297) @@ -43,6 +43,7 @@ .Lb libc .Sh SYNOPSIS .In stdio.h +.In xlocale.h .Ft int .Fn printf_l "locale_t loc" "const char * restrict format" "..." .Ft int Modified: stable/9/lib/libc/stdio/scanf_l.3 ============================================================================== --- stable/9/lib/libc/stdio/scanf_l.3 Wed Nov 25 09:12:30 2015 (r291296) +++ stable/9/lib/libc/stdio/scanf_l.3 Wed Nov 25 09:19:32 2015 (r291297) @@ -39,6 +39,7 @@ .Lb libc .Sh SYNOPSIS .In stdio.h +.In xlocale.h .Ft int .Fn scanf_l "locale_t loc" "const char * restrict format" "..." .Ft int From owner-svn-src-all@freebsd.org Wed Nov 25 11:20:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CB66A36004; Wed, 25 Nov 2015 11:20:56 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0A1214AF; Wed, 25 Nov 2015 11:20:55 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPBKtrq055239; Wed, 25 Nov 2015 11:20:55 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPBKsLA055238; Wed, 25 Nov 2015 11:20:54 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511251120.tAPBKsLA055238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Wed, 25 Nov 2015 11:20:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291298 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 11:20:56 -0000 Author: ume Date: Wed Nov 25 11:20:54 2015 New Revision: 291298 URL: https://svnweb.freebsd.org/changeset/base/291298 Log: Fix udp entry of `netstat -TW'. Modified: head/usr.bin/netstat/inet.c Modified: head/usr.bin/netstat/inet.c ============================================================================== --- head/usr.bin/netstat/inet.c Wed Nov 25 09:19:32 2015 (r291297) +++ head/usr.bin/netstat/inet.c Wed Nov 25 11:20:54 2015 (r291298) @@ -498,6 +498,8 @@ protopr(u_long off, const char *name, in "{:sent-zero-window/%6u} ", tp->t_sndrexmitpack, tp->t_rcvoopack, tp->t_sndzerowin); + else + xo_emit("{P:/%21s}", ""); } else { xo_emit("{:receive-bytes-waiting/%6u} " "{:send-bytes-waiting/%6u} ", From owner-svn-src-all@freebsd.org Wed Nov 25 11:31:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 027ADA362AB; Wed, 25 Nov 2015 11:31:09 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AADD71AEF; Wed, 25 Nov 2015 11:31:08 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPBV72q058835; Wed, 25 Nov 2015 11:31:07 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPBV7Hc058834; Wed, 25 Nov 2015 11:31:07 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201511251131.tAPBV7Hc058834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 25 Nov 2015 11:31:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291299 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 11:31:09 -0000 Author: ae Date: Wed Nov 25 11:31:07 2015 New Revision: 291299 URL: https://svnweb.freebsd.org/changeset/base/291299 Log: Fix the build. Modified: head/sys/net/if_enc.c Modified: head/sys/net/if_enc.c ============================================================================== --- head/sys/net/if_enc.c Wed Nov 25 11:20:54 2015 (r291298) +++ head/sys/net/if_enc.c Wed Nov 25 11:31:07 2015 (r291299) @@ -30,7 +30,6 @@ #include "opt_inet.h" #include "opt_inet6.h" -#include "opt_enc.h" #include #include From owner-svn-src-all@freebsd.org Wed Nov 25 13:26:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18213A36324; Wed, 25 Nov 2015 13:26:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA22B195E; Wed, 25 Nov 2015 13:26:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPDQhWx093157; Wed, 25 Nov 2015 13:26:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPDQgWH093154; Wed, 25 Nov 2015 13:26:42 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511251326.tAPDQgWH093154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Nov 2015 13:26:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291300 - in head/tools/tools: . indent_wrapper X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 13:26:44 -0000 Author: hselasky Date: Wed Nov 25 13:26:42 2015 New Revision: 291300 URL: https://svnweb.freebsd.org/changeset/base/291300 Log: Add simple indent wrapper tool for style(9) checking GIT/SVN patches. The indent_wrapper tool only accepts full context diffs and works by identifying the surrounding C-block touched by a diff and passing only that to indent for styling. In the end a diff is produced or an external tool like meld can be invoked, to show the styling differences. Added: head/tools/tools/indent_wrapper/ head/tools/tools/indent_wrapper/Makefile (contents, props changed) head/tools/tools/indent_wrapper/indent_wrapper.c (contents, props changed) Modified: head/tools/tools/README Modified: head/tools/tools/README ============================================================================== --- head/tools/tools/README Wed Nov 25 11:31:07 2015 (r291299) +++ head/tools/tools/README Wed Nov 25 13:26:42 2015 (r291300) @@ -33,6 +33,7 @@ hcomp Compress header files by removing html-mv Rename HTML generated filenames to human readable filenames. ifinfo Uses the interface MIB to print out all the information an interface exports in an ugly form. +indent_wrapper Tool for style(9) checking SVN/GIT patches. iso Tool to compare the iso3166 and iso639 files in /usr/share/misc with the data from the master sites. iwi Tools specific to the Intel PRO/Wireless 2200BG/2225BG/2915ABG Added: head/tools/tools/indent_wrapper/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/indent_wrapper/Makefile Wed Nov 25 13:26:42 2015 (r291300) @@ -0,0 +1,9 @@ +# $FreeBSD$ +PREFIX?= /usr/local +LOCALBASE?= /usr/local +BINDIR= ${PREFIX}/sbin +PROG= indent_wrapper +MAN= +SRCS+= indent_wrapper.c + +.include Added: head/tools/tools/indent_wrapper/indent_wrapper.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/indent_wrapper/indent_wrapper.c Wed Nov 25 13:26:42 2015 (r291300) @@ -0,0 +1,744 @@ +/*- + * Copyright (c) 2015 Hans Petter Selasky. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern char **environ; + +static int opt_verbose; +static char *opt_diff_tool; + +#define BLOCK_SIZE 4096 +#define BLOCK_MASK 0x100 +#define BLOCK_ADD 0x200 + +struct block { + TAILQ_ENTRY(block) entry; + uint32_t length; + uint32_t flags; + uint8_t *data; + uint8_t *mask; +}; + +typedef TAILQ_HEAD(, block) block_head_t; + +static void +sigpipe(int sig) +{ +} + +static struct block * +alloc_block(void) +{ + struct block *pb; + size_t size = sizeof(*pb) + (2 * BLOCK_SIZE); + + pb = malloc(size); + if (pb == NULL) + errx(EX_SOFTWARE, "Out of memory"); + memset(pb, 0, size); + pb->data = (void *)(pb + 1); + pb->mask = pb->data + BLOCK_SIZE; + pb->length = BLOCK_SIZE; + return (pb); +} + +static int +write_block(int fd, block_head_t *ph) +{ + struct block *ptr; + + if (fd < 0) + return (-1); + + TAILQ_FOREACH(ptr, ph, entry) { + if (write(fd, ptr->data, ptr->length) != ptr->length) + return (-1); + } + return (0); +} + +static uint16_t +peek_block(block_head_t *pbh, uint64_t off) +{ + struct block *ptr; + + TAILQ_FOREACH(ptr, pbh, entry) { + if (off < ptr->length) + break; + off -= ptr->length; + } + if (ptr == NULL) + return (0); + return (ptr->data[off] | (ptr->mask[off] << 8)); +} + +static void +set_block(block_head_t *pbh, uint64_t off, uint16_t ch) +{ + struct block *ptr; + + TAILQ_FOREACH(ptr, pbh, entry) { + if (off < ptr->length) + break; + off -= ptr->length; + } + if (ptr == NULL) + return; + ptr->data[off] = ch & 0xFF; + ptr->mask[off] = (ch >> 8) & 0xFF; +} + +static uint64_t +size_block(block_head_t *pbh) +{ + struct block *ptr; + uint64_t off = 0; + + TAILQ_FOREACH(ptr, pbh, entry) + off += ptr->length; + return (off); +} + +static int +diff_tool(block_head_t *pa, block_head_t *pb) +{ + char ca[] = {"/tmp/diff.orig.XXXXXX"}; + char cb[] = {"/tmp/diff.styled.XXXXXX"}; + char cc[256]; + uint64_t sa; + uint64_t sb; + uint64_t s; + uint64_t x; + int fa; + int fb; + + sa = size_block(pa); + sb = size_block(pb); + s = (sa > sb) ? sa : sb; + + for (x = 0; x != s; x++) { + char cha = peek_block(pa, x) & 0xFF; + char chb = peek_block(pb, x) & 0xFF; + + if (cha != chb) { + /* false positive */ + if (cha == '\n' && chb == 0 && x == sa - 1) + return (0); + break; + } + } + if (x == s) + return (0); /* identical */ + + fa = mkstemp(ca); + fb = mkstemp(cb); + + if (write_block(fa, pa) < 0 || write_block(fb, pb) < 0) { + close(fa); + close(fb); + unlink(ca); + unlink(cb); + err(EX_SOFTWARE, "Could not write data to temporary files"); + } + close(fa); + close(fb); + + snprintf(cc, sizeof(cc), "%s %s %s", opt_diff_tool, ca, cb); + system(cc); + + unlink(ca); + unlink(cb); + return (-1); +} + +static int +diff_block(block_head_t *pa, block_head_t *pb) +{ + uint64_t sa = size_block(pa); + uint64_t sb = size_block(pb); + uint64_t s; + uint64_t x; + uint64_t y; + uint64_t n; + + s = (sa > sb) ? sa : sb; + + for (y = x = 0; x != s; x++) { + char cha = peek_block(pa, x) & 0xFF; + char chb = peek_block(pb, x) & 0xFF; + + if (cha != chb) { + int nonspace; + + /* false positive */ + if (cha == '\n' && chb == 0 && x == sa - 1) + return (0); + + n = x - y; + printf("Style error:\n"); + nonspace = 0; + for (n = y; n < sa; n++) { + char ch = peek_block(pa, n) & 0xFF; + + if (nonspace && ch == '\n') + break; + printf("%c", ch); + if (!isspace(ch)) + nonspace = 1; + } + printf("\n"); + printf("Style corrected:\n"); + nonspace = 0; + for (n = y; n < sb; n++) { + char ch = peek_block(pb, n) & 0xFF; + + if (nonspace && ch == '\n') + break; + printf("%c", ch); + if (!isspace(ch)) + nonspace = 1; + } + printf("\n"); + for (n = y; n != x; n++) { + if ((peek_block(pa, n) & 0xFF) == '\t') + printf("\t"); + else + printf(" "); + } + printf("^ %sdifference%s\n", + (isspace(cha) || isspace(chb)) ? "whitespace " : "", + (x >= sa || x >= sb) ? " in the end of a block" : ""); + return (1); + } else if (cha == '\n') { + y = x + 1; + } + } + return (0); +} + +static void +free_block(block_head_t *pbh) +{ + struct block *ptr; + + while ((ptr = TAILQ_FIRST(pbh))) { + TAILQ_REMOVE(pbh, ptr, entry); + free(ptr); + } +} + +static void +cmd_popen(char *command, FILE **iop) +{ + char *argv[4]; + int pdes[4]; + int pid; + + if (pipe(pdes) < 0) + goto error; + + if (pipe(pdes + 2) < 0) { + close(pdes[0]); + close(pdes[1]); + goto error; + } + argv[0] = "sh"; + argv[1] = "-c"; + argv[2] = command; + argv[3] = NULL; + + switch ((pid = vfork())) { + case -1: /* Error. */ + close(pdes[0]); + close(pdes[1]); + close(pdes[2]); + close(pdes[3]); + goto error; + case 0: /* Child. */ + dup2(pdes[1], STDOUT_FILENO); + dup2(pdes[2], STDIN_FILENO); + close(pdes[0]); + close(pdes[3]); + execve("/bin/sh", argv, environ); + exit(127); + default: + break; + } + iop[0] = fdopen(pdes[3], "w"); + iop[1] = fdopen(pdes[0], "r"); + close(pdes[1]); + close(pdes[2]); + return; +error: + iop[0] = iop[1] = NULL; +} + +static void +cmd_block_process(block_head_t *pbh_in, block_head_t *pbh_out, char *cmd_str) +{ + FILE *pfd[2]; + struct block *ptr; + + TAILQ_INIT(pbh_out); + + cmd_popen(cmd_str, pfd); + + if (pfd[0] == NULL || pfd[1] == NULL) + errx(EX_SOFTWARE, "Cannot invoke command '%s'", cmd_str); + + if (pbh_in != NULL) { + TAILQ_FOREACH(ptr, pbh_in, entry) { + if (fwrite(ptr->data, 1, ptr->length, pfd[0]) != ptr->length) + err(EX_SOFTWARE, "Cannot write all data to command '%s'", cmd_str); + } + fflush(pfd[0]); + } + fclose(pfd[0]); + + while (1) { + int len; + + ptr = alloc_block(); + len = fread(ptr->data, 1, BLOCK_SIZE, pfd[1]); + if (len <= 0) { + free(ptr); + break; + } + ptr->length = len; + TAILQ_INSERT_TAIL(pbh_out, ptr, entry); + } + fclose(pfd[1]); +} + +static void +usage(void) +{ + fprintf(stderr, + "indent_wrapper [-v] [-d] [-D] [-g ]\n" + "\t" "[-s ] [ -t ] [ -c ]\n" + "\t" "-v Increase verbosity\n" + "\t" "-d Check output from git diff\n" + "\t" "-D Check output from svn diff\n" + "\t" "-g Check output from git hash\n" + "\t" "-s Check output from svn revision\n" + "\t" "-t Launch external diff tool\n" + "\n" + "Examples:\n" + "\t" "indent_wrapper -D\n" + "\t" "indent_wrapper -D -t meld\n"); + exit(EX_SOFTWARE); +} + +int +main(int argc, char **argv) +{ + block_head_t diff_head; + block_head_t diff_a_head; + block_head_t diff_b_head; + block_head_t indent_in_head; + block_head_t indent_out_head; + struct block *p1 = NULL; + struct block *p2 = NULL; + uint64_t size; + uint64_t x; + uint64_t y1 = 0; + uint64_t y2 = 0; + int recurse = 0; + int inside_string = 0; + int escape_char = 0; + int do_parse = 0; + char cmdbuf[256]; + uint16_t ch; + uint16_t chn; + int c; + int retval = 0; + + signal(SIGPIPE, &sigpipe); + + cmdbuf[0] = 0; + + while ((c = getopt(argc, argv, "dDvg:s:c:ht:")) != -1) { + switch (c) { + case 'v': + opt_verbose++; + break; + case 't': + opt_diff_tool = optarg; + break; + case 'g': + snprintf(cmdbuf, sizeof(cmdbuf), "git show -U1000000 %s", optarg); + break; + case 'd': + snprintf(cmdbuf, sizeof(cmdbuf), "git diff -U1000000"); + break; + case 'D': + snprintf(cmdbuf, sizeof(cmdbuf), "svn diff --diff-cmd=diff -x -U1000000"); + break; + case 's': + snprintf(cmdbuf, sizeof(cmdbuf), "svn diff --diff-cmd=diff -x -U1000000 -r %s", optarg); + break; + case 'c': + snprintf(cmdbuf, sizeof(cmdbuf), "%s", optarg); + break; + default: + usage(); + } + } + if (cmdbuf[0] == 0) + usage(); + + cmd_block_process(NULL, &diff_head, cmdbuf); + + TAILQ_INIT(&diff_a_head); + TAILQ_INIT(&diff_b_head); + + size = size_block(&diff_head); + p1 = alloc_block(); + y1 = 0; + p2 = alloc_block(); + y2 = 0; + + for (x = 0; x < size;) { + ch = peek_block(&diff_head, x); + switch (ch & 0xFF) { + case '+': + if (ch == peek_block(&diff_head, x + 1) && + ch == peek_block(&diff_head, x + 2) && + ' ' == (peek_block(&diff_head, x + 3) & 0xFF)) + goto parse_filename; + if (do_parse == 0) + break; + for (x++; x != size; x++) { + ch = peek_block(&diff_head, x); + p1->mask[y1] = BLOCK_ADD >> 8; + p1->data[y1++] = ch; + if (y1 == BLOCK_SIZE) { + TAILQ_INSERT_TAIL(&diff_a_head, p1, entry); + p1 = alloc_block(); + y1 = 0; + } + if ((ch & 0xFF) == '\n') + break; + } + break; + case '-': + if (ch == peek_block(&diff_head, x + 1) && + ch == peek_block(&diff_head, x + 2) && + ' ' == (peek_block(&diff_head, x + 3) & 0xFF)) + goto parse_filename; + if (do_parse == 0) + break; + for (x++; x != size; x++) { + ch = peek_block(&diff_head, x); + p2->data[y2++] = ch; + if (y2 == BLOCK_SIZE) { + TAILQ_INSERT_TAIL(&diff_b_head, p2, entry); + p2 = alloc_block(); + y2 = 0; + } + if ((ch & 0xFF) == '\n') + break; + } + break; + case ' ': + if (do_parse == 0) + break; + for (x++; x != size; x++) { + ch = peek_block(&diff_head, x); + p1->data[y1++] = ch; + if (y1 == BLOCK_SIZE) { + TAILQ_INSERT_TAIL(&diff_a_head, p1, entry); + p1 = alloc_block(); + y1 = 0; + } + p2->data[y2++] = ch; + if (y2 == BLOCK_SIZE) { + TAILQ_INSERT_TAIL(&diff_b_head, p2, entry); + p2 = alloc_block(); + y2 = 0; + } + if ((ch & 0xFF) == '\n') + break; + } + break; + parse_filename: + for (x += 3; x != size; x++) { + ch = peek_block(&diff_head, x); + chn = peek_block(&diff_head, x + 1); + if ((ch & 0xFF) == '.') { + /* only accept .c and .h files */ + do_parse = ((chn & 0xFF) == 'c' || (chn & 0xFF) == 'h'); + } + if ((ch & 0xFF) == '\n') + break; + } + default: + break; + } + /* skip till end of line */ + for (; x < size; x++) { + ch = peek_block(&diff_head, x); + if ((ch & 0xFF) == '\n') { + x++; + break; + } + } + } + p1->length = y1; + p2->length = y2; + TAILQ_INSERT_TAIL(&diff_a_head, p1, entry); + TAILQ_INSERT_TAIL(&diff_b_head, p2, entry); + + /* first pass - verify input */ + size = size_block(&diff_a_head); + for (x = 0; x != size; x++) { + ch = peek_block(&diff_a_head, x) & 0xFF; + if (!(ch & 0x80) && ch != '\t' && ch != '\r' && ch != '\n' && + ch != ' ' && !isprint(ch)) + errx(EX_SOFTWARE, "Non printable characters are not allowed: '%c'", ch); + else if (ch & 0x80) { + set_block(&diff_a_head, x, ch | BLOCK_MASK); + } + } + + /* second pass - identify all comments */ + for (x = 0; x < size; x++) { + ch = peek_block(&diff_a_head, x); + chn = peek_block(&diff_a_head, x + 1); + if ((ch & 0xFF) == '/' && (chn & 0xFF) == '/') { + set_block(&diff_a_head, x, ch | BLOCK_MASK); + set_block(&diff_a_head, x + 1, chn | BLOCK_MASK); + for (x += 2; x < size; x++) { + ch = peek_block(&diff_a_head, x); + if ((ch & 0xFF) == '\n') + break; + set_block(&diff_a_head, x, ch | BLOCK_MASK); + } + } else if ((ch & 0xFF) == '/' && (chn & 0xFF) == '*') { + set_block(&diff_a_head, x, ch | BLOCK_MASK); + set_block(&diff_a_head, x + 1, chn | BLOCK_MASK); + for (x += 2; x < size; x++) { + ch = peek_block(&diff_a_head, x); + chn = peek_block(&diff_a_head, x + 1); + if ((ch & 0xFF) == '*' && (chn & 0xFF) == '/') { + set_block(&diff_a_head, x, ch | BLOCK_MASK); + set_block(&diff_a_head, x + 1, chn | BLOCK_MASK); + x++; + break; + } + set_block(&diff_a_head, x, ch | BLOCK_MASK); + } + } + } + + /* third pass - identify preprocessor tokens and strings */ + for (x = 0; x < size; x++) { + ch = peek_block(&diff_a_head, x); + if (ch & BLOCK_MASK) + continue; + if (inside_string == 0 && (ch & 0xFF) == '#') { + int skip_newline = 0; + + set_block(&diff_a_head, x, ch | BLOCK_MASK); + for (x++; x < size; x++) { + ch = peek_block(&diff_a_head, x); + if ((ch & 0xFF) == '\n') { + if (!skip_newline) + break; + skip_newline = 0; + } + if (ch & BLOCK_MASK) + continue; + if ((ch & 0xFF) == '\\') + skip_newline = 1; + set_block(&diff_a_head, x, ch | BLOCK_MASK); + } + } + if ((ch & 0xFF) == '"' || (ch & 0xFF) == '\'') { + if (inside_string == 0) { + inside_string = (ch & 0xFF); + } else { + if (escape_char == 0 && inside_string == (ch & 0xFF)) + inside_string = 0; + } + escape_char = 0; + set_block(&diff_a_head, x, ch | BLOCK_MASK); + } else if (inside_string != 0) { + if ((ch & 0xFF) == '\\') + escape_char = !escape_char; + else + escape_char = 0; + set_block(&diff_a_head, x, ch | BLOCK_MASK); + } + } + + /* fourth pass - identify function blocks */ + if (opt_verbose > 0) { + chn = peek_block(&diff_a_head, x); + printf("L%02d%c|", recurse, + (chn & BLOCK_ADD) ? '+' : ' '); + } + for (x = 0; x < size; x++) { + ch = peek_block(&diff_a_head, x); + if (opt_verbose > 0) { + printf("%c", ch & 0xFF); + if ((ch & 0xFF) == '\n') { + chn = peek_block(&diff_a_head, x + 1); + printf("L%02d%c|", recurse, + (chn & BLOCK_ADD) ? '+' : ' '); + } + } + if (ch & BLOCK_MASK) + continue; + switch (ch & 0xFF) { + case '{': + case '(': + recurse++; + break; + default: + break; + } + if (recurse != 0) + set_block(&diff_a_head, x, ch | BLOCK_MASK); + switch (ch & 0xFF) { + case '}': + case ')': + recurse--; + break; + default: + break; + } + } + if (opt_verbose > 0) + printf("\n"); + if (recurse != 0) + errx(EX_SOFTWARE, "Unbalanced parenthesis"); + if (inside_string != 0) + errx(EX_SOFTWARE, "String without end"); + + /* fifth pass - on the same line statements */ + for (x = 0; x < size; x++) { + ch = peek_block(&diff_a_head, x); + if (ch & BLOCK_MASK) + continue; + switch (ch & 0xFF) { + case '\n': + break; + default: + set_block(&diff_a_head, x, ch | BLOCK_MASK); + break; + } + } + + /* sixth pass - output relevant blocks to indent */ + for (y1 = x = 0; x < size; x++) { + ch = peek_block(&diff_a_head, x); + if (ch & BLOCK_ADD) { + TAILQ_INIT(&indent_in_head); + + p2 = alloc_block(); + y2 = 0; + for (; y1 < size; y1++) { + ch = peek_block(&diff_a_head, y1); + if (y1 > x && !(ch & (BLOCK_MASK | BLOCK_ADD))) + break; + p2->data[y2++] = ch & 0xFF; + if (y2 == BLOCK_SIZE) { + TAILQ_INSERT_TAIL(&indent_in_head, p2, entry); + p2 = alloc_block(); + y2 = 0; + } + } + if (p2->data[y2] != '\n') + p2->data[y2++] = '\n'; + p2->length = y2; + TAILQ_INSERT_TAIL(&indent_in_head, p2, entry); + + cmd_block_process(&indent_in_head, &indent_out_head, + "indent " + "-Tbool " + "-Tclass " + "-TFILE " + "-TLIST_ENTRY " + "-TLIST_HEAD " + "-TSLIST_ENTRY " + "-TSLIST_HEAD " + "-TSTAILQ_ENTRY " + "-TSTAILQ_HEAD " + "-TTAILQ_ENTRY " + "-TTAILQ_HEAD " + "-T__aligned " + "-T__packed " + "-T__unused " + "-T__used " + "-Tfd_set " + "-Toss_mixerinfo " + "-Tu_char " + "-Tu_int " + "-Tu_long " + "-Tu_short " + "-ta -st -bad -bap -nbbb -nbc -br -nbs " + "-c41 -cd41 -cdb -ce -ci4 -cli0 -d0 -di8 -ndj -ei -nfc1 " + "-nfcb -i8 -ip8 -l79 -lc77 -ldi0 -nlp -npcs -psl -sc " + "-nsob -nv " + " | " + "sed " + "-e 's/_HEAD [(]/_HEAD(/g' " + "-e 's/_ENTRY [(]/_ENTRY(/g' " + "-e 's/\t__aligned/ __aligned/g' " + "-e 's/\t__packed/ __packed/g' " + "-e 's/\t__unused/ __unused/g' " + "-e 's/\t__used/ __used/g' " + "-e 's/^#define /#define\t/g'"); + + if (opt_diff_tool != NULL) { + if (diff_tool(&indent_in_head, &indent_out_head)) + retval = 1; + } else { + if (diff_block(&indent_in_head, &indent_out_head)) + retval = 1; + } + free_block(&indent_in_head); + free_block(&indent_out_head); + x = y1; + } else if (!(ch & BLOCK_MASK)) { + y1 = x + 1; + } + } + return (retval); +} From owner-svn-src-all@freebsd.org Wed Nov 25 14:45:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AC53A375A4; Wed, 25 Nov 2015 14:45:45 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D421C116A; Wed, 25 Nov 2015 14:45:44 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPEjiIf016269; Wed, 25 Nov 2015 14:45:44 GMT (envelope-from fabient@FreeBSD.org) Received: (from fabient@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPEjilx016268; Wed, 25 Nov 2015 14:45:44 GMT (envelope-from fabient@FreeBSD.org) Message-Id: <201511251445.tAPEjilx016268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fabient set sender to fabient@FreeBSD.org using -f From: Fabien Thomas Date: Wed, 25 Nov 2015 14:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291301 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 14:45:45 -0000 Author: fabient Date: Wed Nov 25 14:45:43 2015 New Revision: 291301 URL: https://svnweb.freebsd.org/changeset/base/291301 Log: The r241129 description was wrong that the scenario is possible only for read locks on pcbs. The same race can happen with write lock semantics as well. The race scenario: - Two threads (1 and 2) locate pcb with writer semantics (INPLOOKUP_WLOCKPCB) and do in_pcbref() on it. - 1 and 2 both drop the inp hash lock. - Another thread (3) grabs the inp hash lock. Then it runs in_pcbfree(), which wlocks the pcb. They must happen faster than 1 or 2 come INP_WLOCK()! - 1 and 2 congest in INP_WLOCK(). - 3 does in_pcbremlists(), drops hash lock, and runs in_pcbrele_wlocked(), which doesn't free the pcb due to two references on it. Then it unlocks the pcb. - 1 (or 2) gets wlock on the pcb, runs in_pcbrele_wlocked(), which doesn't report inp as freed, due to 2 (or 1) still helding extra reference on it. The thread tries to do smth with a disconnected pcb and crashes. Submitted by: emeric.poupon@stormshield.eu Reviewed by: gleb@ MFC after: 1 week Sponsored by: Stormshield Tested by: Cassiano Peixoto, Stormshield Modified: head/sys/netinet/in_pcb.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Wed Nov 25 13:26:42 2015 (r291300) +++ head/sys/netinet/in_pcb.c Wed Nov 25 14:45:43 2015 (r291301) @@ -1220,8 +1220,17 @@ in_pcbrele_wlocked(struct inpcb *inp) INP_WLOCK_ASSERT(inp); - if (refcount_release(&inp->inp_refcount) == 0) + if (refcount_release(&inp->inp_refcount) == 0) { + /* + * If the inpcb has been freed, let the caller know, even if + * this isn't the last reference. + */ + if (inp->inp_flags2 & INP_FREED) { + INP_WUNLOCK(inp); + return (1); + } return (0); + } KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); From owner-svn-src-all@freebsd.org Wed Nov 25 14:51:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF7EEA37661; Wed, 25 Nov 2015 14:51:45 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABC88143E; Wed, 25 Nov 2015 14:51:45 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPEpiIU018445; Wed, 25 Nov 2015 14:51:44 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPEpi7K018444; Wed, 25 Nov 2015 14:51:44 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511251451.tAPEpi7K018444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Nov 2015 14:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291302 - head/tools/tools/indent_wrapper X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 14:51:46 -0000 Author: hselasky Date: Wed Nov 25 14:51:44 2015 New Revision: 291302 URL: https://svnweb.freebsd.org/changeset/base/291302 Log: Update usage: - Add missing description of "-c" option. - Add one more usage example. Modified: head/tools/tools/indent_wrapper/indent_wrapper.c Modified: head/tools/tools/indent_wrapper/indent_wrapper.c ============================================================================== --- head/tools/tools/indent_wrapper/indent_wrapper.c Wed Nov 25 14:45:43 2015 (r291301) +++ head/tools/tools/indent_wrapper/indent_wrapper.c Wed Nov 25 14:51:44 2015 (r291302) @@ -354,13 +354,15 @@ usage(void) "\t" "-v Increase verbosity\n" "\t" "-d Check output from git diff\n" "\t" "-D Check output from svn diff\n" + "\t" "-c Set custom command to produce diff\n" "\t" "-g Check output from git hash\n" "\t" "-s Check output from svn revision\n" "\t" "-t Launch external diff tool\n" "\n" "Examples:\n" "\t" "indent_wrapper -D\n" - "\t" "indent_wrapper -D -t meld\n"); + "\t" "indent_wrapper -D -t meld\n" + "\t" "indent_wrapper -D -t \"diff -u\"\n"); exit(EX_SOFTWARE); } From owner-svn-src-all@freebsd.org Wed Nov 25 18:16:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F470A374C7; Wed, 25 Nov 2015 18:16:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CC3F1BE5; Wed, 25 Nov 2015 18:16:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPIGgSt076997; Wed, 25 Nov 2015 18:16:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPIGgdW076996; Wed, 25 Nov 2015 18:16:42 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511251816.tAPIGgdW076996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 25 Nov 2015 18:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291303 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 18:16:43 -0000 Author: adrian Date: Wed Nov 25 18:16:42 2015 New Revision: 291303 URL: https://svnweb.freebsd.org/changeset/base/291303 Log: [net80211] log the A-MPDU setup attempt count as part of debugging. I've seen some cases where we get stuck in a loop constantly trying to negotiate A-MPDU TX which is definitely not supposed to happen. This will let me see if it's something funky with the retry count or not. Modified: head/sys/net80211/ieee80211_ht.c Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Wed Nov 25 14:51:44 2015 (r291302) +++ head/sys/net80211/ieee80211_ht.c Wed Nov 25 18:16:42 2015 (r291303) @@ -2174,9 +2174,9 @@ ieee80211_ampdu_enable(struct ieee80211_ return 0; } IEEE80211_NOTE(vap, IEEE80211_MSG_11N, ni, - "enable AMPDU on tid %d (%s), avgpps %d pkts %d", + "enable AMPDU on tid %d (%s), avgpps %d pkts %d attempt %d", tap->txa_tid, ieee80211_wme_acnames[TID_TO_WME_AC(tap->txa_tid)], - tap->txa_avgpps, tap->txa_pkts); + tap->txa_avgpps, tap->txa_pkts, tap->txa_attempts); return 1; } From owner-svn-src-all@freebsd.org Wed Nov 25 18:24:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D71F1A3764A; Wed, 25 Nov 2015 18:24:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89B691081; Wed, 25 Nov 2015 18:24:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPIOntv079843; Wed, 25 Nov 2015 18:24:49 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPIOnn2079842; Wed, 25 Nov 2015 18:24:49 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511251824.tAPIOnn2079842@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 25 Nov 2015 18:24:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291304 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 18:24:50 -0000 Author: adrian Date: Wed Nov 25 18:24:49 2015 New Revision: 291304 URL: https://svnweb.freebsd.org/changeset/base/291304 Log: [ath] listen to all beacons in IBSS and software beacon miss. I added MYBEACON support a while ago to listen to beacons that are only for your configured BSSID. For AR9380 and later NICs this results in a lot less chip wakeups in station mode as it then only shows you beacons that are destined to you. However in IBSS mode you really do want to hear all beacons so you can do IBSS merges. Oops. So only use MYBEACON for STA + not-scanning, and just use BEACON for the other modes it used to use BEACON for. This doesn't completely fix IBSS merges though - there are still some conditions to chase down and fix. Modified: head/sys/dev/ath/if_ath_rx.c Modified: head/sys/dev/ath/if_ath_rx.c ============================================================================== --- head/sys/dev/ath/if_ath_rx.c Wed Nov 25 18:16:42 2015 (r291303) +++ head/sys/dev/ath/if_ath_rx.c Wed Nov 25 18:24:49 2015 (r291304) @@ -172,9 +172,14 @@ ath_calcrxfilter(struct ath_softc *sc) * * Otherwise we only really need to hear beacons from * our own BSSID. + * + * IBSS? software beacon miss? Just receive all beacons. + * We need to hear beacons/probe requests from everyone so + * we can merge ibss. */ - if (ic->ic_opmode == IEEE80211_M_STA || - ic->ic_opmode == IEEE80211_M_IBSS || sc->sc_swbmiss) { + if (ic->ic_opmode == IEEE80211_M_IBSS || sc->sc_swbmiss) { + rfilt |= HAL_RX_FILTER_BEACON; + } else if (ic->ic_opmode == IEEE80211_M_STA) { if (sc->sc_do_mybeacon && ! sc->sc_scanning) { rfilt |= HAL_RX_FILTER_MYBEACON; } else { /* scanning, non-mybeacon chips */ @@ -431,7 +436,6 @@ ath_recv_mgmt(struct ieee80211_node *ni, sc->sc_syncbeacon = 0; } - /* fall thru... */ case IEEE80211_FC0_SUBTYPE_PROBE_RESP: if (vap->iv_opmode == IEEE80211_M_IBSS && From owner-svn-src-all@freebsd.org Wed Nov 25 18:37:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCD8EA37905; Wed, 25 Nov 2015 18:37:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A54CE178A; Wed, 25 Nov 2015 18:37:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPIbgS3082841; Wed, 25 Nov 2015 18:37:42 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPIbgEc082840; Wed, 25 Nov 2015 18:37:42 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251837.tAPIbgEc082840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 18:37:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291305 - head/usr.sbin/amd/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 18:37:44 -0000 Author: bdrewery Date: Wed Nov 25 18:37:42 2015 New Revision: 291305 URL: https://svnweb.freebsd.org/changeset/base/291305 Log: META MODE: Remove bin/cat.host dependency. This likely slipped in during early testing; local.dirdeps.mk always excludes bin/cat.host now. Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/amd/include/Makefile.depend Modified: head/usr.sbin/amd/include/Makefile.depend ============================================================================== --- head/usr.sbin/amd/include/Makefile.depend Wed Nov 25 18:24:49 2015 (r291304) +++ head/usr.sbin/amd/include/Makefile.depend Wed Nov 25 18:37:42 2015 (r291305) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - bin/cat.host \ .include From owner-svn-src-all@freebsd.org Wed Nov 25 19:10:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 778A2A37E2E; Wed, 25 Nov 2015 19:10:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4056D1576; Wed, 25 Nov 2015 19:10:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJA44e091753; Wed, 25 Nov 2015 19:10:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJA4JT091752; Wed, 25 Nov 2015 19:10:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201511251910.tAPJA4JT091752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 25 Nov 2015 19:10:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291306 - head/release/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:10:05 -0000 Author: gjb Date: Wed Nov 25 19:10:04 2015 New Revision: 291306 URL: https://svnweb.freebsd.org/changeset/base/291306 Log: Fix tmpfs(5) '/tmp' mount point. A stray trailing space snuck in with one of the recent changes, making r290550 and r290573 effectively no-op. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/tools/arm.subr Modified: head/release/tools/arm.subr ============================================================================== --- head/release/tools/arm.subr Wed Nov 25 18:37:42 2015 (r291305) +++ head/release/tools/arm.subr Wed Nov 25 19:10:04 2015 (r291306) @@ -110,7 +110,7 @@ arm_install_base() { >> ${CHROOTDIR}/${DESTDIR}/etc/fstab echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab - echo "tmpfs /tmp tmpfs rw,mode=1777,size=30m 0 0" \ + echo "tmpfs /tmp tmpfs rw,mode=1777,size=30m 0 0" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab local hostname From owner-svn-src-all@freebsd.org Wed Nov 25 19:10:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B92EDA37E6B; Wed, 25 Nov 2015 19:10:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E9FE18CF; Wed, 25 Nov 2015 19:10:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJAdLw091910; Wed, 25 Nov 2015 19:10:39 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJATqw091806; Wed, 25 Nov 2015 19:10:29 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251910.tAPJATqw091806@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:10:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291307 - in head: cddl/lib/libavl cddl/lib/libctf cddl/lib/libdtrace cddl/lib/libnvpair cddl/lib/libumem cddl/lib/libuutil cddl/lib/libzfs cddl/lib/libzfs_core cddl/lib/libzpool gnu/li... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:10:40 -0000 Author: bdrewery Date: Wed Nov 25 19:10:28 2015 New Revision: 291307 URL: https://svnweb.freebsd.org/changeset/base/291307 Log: META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. This both avoids some dependencies on xinstall.host and allows bootstrapping on older releases to work due to lack of at least 'install -l' support. Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/lib/libavl/Makefile.depend head/cddl/lib/libctf/Makefile.depend head/cddl/lib/libdtrace/Makefile.depend head/cddl/lib/libnvpair/Makefile.depend head/cddl/lib/libumem/Makefile.depend head/cddl/lib/libuutil/Makefile.depend head/cddl/lib/libzfs/Makefile.depend head/cddl/lib/libzfs_core/Makefile.depend head/cddl/lib/libzpool/Makefile.depend head/gnu/lib/libdialog/Makefile.depend head/gnu/lib/libgcc/Makefile.depend head/gnu/lib/libgomp/Makefile.depend head/gnu/lib/libregex/Makefile.depend head/gnu/lib/libstdc++/Makefile.depend head/gnu/lib/libsupc++/Makefile.depend head/kerberos5/lib/libasn1/Makefile.depend head/kerberos5/lib/libgssapi_krb5/Makefile.depend head/kerberos5/lib/libgssapi_ntlm/Makefile.depend head/kerberos5/lib/libgssapi_spnego/Makefile.depend head/kerberos5/lib/libhdb/Makefile.depend head/kerberos5/lib/libheimbase/Makefile.depend head/kerberos5/lib/libheimipcc/Makefile.depend head/kerberos5/lib/libheimipcs/Makefile.depend head/kerberos5/lib/libheimntlm/Makefile.depend head/kerberos5/lib/libhx509/Makefile.depend head/kerberos5/lib/libkadm5clnt/Makefile.depend head/kerberos5/lib/libkadm5srv/Makefile.depend head/kerberos5/lib/libkafs5/Makefile.depend head/kerberos5/lib/libkdc/Makefile.depend head/kerberos5/lib/libkrb5/Makefile.depend head/kerberos5/lib/libroken/Makefile.depend head/kerberos5/lib/libwind/Makefile.depend head/lib/atf/libatf-c++/Makefile.depend head/lib/atf/libatf-c/Makefile.depend head/lib/libalias/libalias/Makefile.depend head/lib/libarchive/Makefile.depend head/lib/libauditd/Makefile.depend head/lib/libbegemot/Makefile.depend head/lib/libblocksruntime/Makefile.depend head/lib/libbluetooth/Makefile.depend head/lib/libbsm/Makefile.depend head/lib/libbsnmp/libbsnmp/Makefile.depend head/lib/libbz2/Makefile.depend head/lib/libcalendar/Makefile.depend head/lib/libcam/Makefile.depend head/lib/libcapsicum/Makefile.depend head/lib/libcom_err/Makefile.depend head/lib/libcrypt/Makefile.depend head/lib/libcuse/Makefile.depend head/lib/libcxxrt/Makefile.depend head/lib/libdevinfo/Makefile.depend head/lib/libdevstat/Makefile.depend head/lib/libdpv/Makefile.depend head/lib/libdwarf/Makefile.depend head/lib/libedit/Makefile.depend head/lib/libelf/Makefile.depend head/lib/libexecinfo/Makefile.depend head/lib/libexpat/Makefile.depend head/lib/libfetch/Makefile.depend head/lib/libfigpar/Makefile.depend head/lib/libgeom/Makefile.depend head/lib/libgpio/Makefile.depend head/lib/libgssapi/Makefile.depend head/lib/libiconv_modules/BIG5/Makefile.depend head/lib/libiconv_modules/DECHanyu/Makefile.depend head/lib/libiconv_modules/EUC/Makefile.depend head/lib/libiconv_modules/EUCTW/Makefile.depend head/lib/libiconv_modules/GBK2K/Makefile.depend head/lib/libiconv_modules/HZ/Makefile.depend head/lib/libiconv_modules/ISO2022/Makefile.depend head/lib/libiconv_modules/JOHAB/Makefile.depend head/lib/libiconv_modules/MSKanji/Makefile.depend head/lib/libiconv_modules/UES/Makefile.depend head/lib/libiconv_modules/UTF1632/Makefile.depend head/lib/libiconv_modules/UTF7/Makefile.depend head/lib/libiconv_modules/UTF8/Makefile.depend head/lib/libiconv_modules/VIQR/Makefile.depend head/lib/libiconv_modules/ZW/Makefile.depend head/lib/libiconv_modules/iconv_none/Makefile.depend head/lib/libiconv_modules/iconv_std/Makefile.depend head/lib/libiconv_modules/mapper_646/Makefile.depend head/lib/libiconv_modules/mapper_none/Makefile.depend head/lib/libiconv_modules/mapper_parallel/Makefile.depend head/lib/libiconv_modules/mapper_serial/Makefile.depend head/lib/libiconv_modules/mapper_std/Makefile.depend head/lib/libiconv_modules/mapper_zone/Makefile.depend head/lib/libipsec/Makefile.depend head/lib/libjail/Makefile.depend head/lib/libkiconv/Makefile.depend head/lib/libkvm/Makefile.depend head/lib/libldns/Makefile.depend head/lib/liblzma/Makefile.depend head/lib/libmagic/Makefile.depend head/lib/libmd/Makefile.depend head/lib/libmemstat/Makefile.depend head/lib/libmilter/Makefile.depend head/lib/libmp/Makefile.depend head/lib/libmt/Makefile.depend head/lib/libnetgraph/Makefile.depend head/lib/libngatm/Makefile.depend head/lib/libnv/Makefile.depend head/lib/libopie/Makefile.depend head/lib/libpam/libpam/Makefile.depend head/lib/libpcap/Makefile.depend head/lib/libpmc/Makefile.depend head/lib/libproc/Makefile.depend head/lib/libprocstat/Makefile.depend head/lib/libradius/Makefile.depend head/lib/librpcsec_gss/Makefile.depend head/lib/librpcsvc/Makefile.depend head/lib/librt/Makefile.depend head/lib/librtld_db/Makefile.depend head/lib/libsbuf/Makefile.depend head/lib/libsdp/Makefile.depend head/lib/libsmb/Makefile.depend head/lib/libsqlite3/Makefile.depend head/lib/libstdbuf/Makefile.depend head/lib/libstdthreads/Makefile.depend head/lib/libthr/Makefile.depend head/lib/libthread_db/Makefile.depend head/lib/libucl/Makefile.depend head/lib/libufs/Makefile.depend head/lib/libugidfw/Makefile.depend head/lib/libulog/Makefile.depend head/lib/libunbound/Makefile.depend head/lib/libusb/Makefile.depend head/lib/libusbhid/Makefile.depend head/lib/libutil/Makefile.depend head/lib/libvgl/Makefile.depend head/lib/libvmmapi/Makefile.depend head/lib/libwrap/Makefile.depend head/lib/libxo/Makefile.depend head/lib/libypclnt/Makefile.depend head/lib/libz/Makefile.depend head/lib/msun/Makefile.depend head/lib/ncurses/form/Makefile.depend head/lib/ncurses/formw/Makefile.depend head/lib/ncurses/menu/Makefile.depend head/lib/ncurses/menuw/Makefile.depend head/lib/ncurses/ncurses/Makefile.depend head/lib/ncurses/ncursesw/Makefile.depend head/lib/ncurses/panel/Makefile.depend head/lib/ncurses/panelw/Makefile.depend head/secure/lib/libcrypto/Makefile.depend head/secure/lib/libssh/Makefile.depend head/secure/lib/libssl/Makefile.depend head/share/mk/local.meta.sys.mk head/targets/pseudo/bootstrap-tools/Makefile head/targets/pseudo/stage/Makefile head/usr.sbin/bsnmpd/modules/snmp_atm/Makefile.depend head/usr.sbin/bsnmpd/modules/snmp_bridge/Makefile.depend head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile.depend head/usr.sbin/bsnmpd/modules/snmp_lm75/Makefile.depend head/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile.depend head/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile.depend head/usr.sbin/bsnmpd/modules/snmp_pf/Makefile.depend head/usr.sbin/bsnmpd/modules/snmp_target/Makefile.depend head/usr.sbin/bsnmpd/modules/snmp_usm/Makefile.depend head/usr.sbin/bsnmpd/modules/snmp_vacm/Makefile.depend head/usr.sbin/bsnmpd/modules/snmp_wlan/Makefile.depend head/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile.depend Modified: head/cddl/lib/libavl/Makefile.depend ============================================================================== --- head/cddl/lib/libavl/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/cddl/lib/libavl/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -8,7 +8,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/cddl/lib/libctf/Makefile.depend ============================================================================== --- head/cddl/lib/libctf/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/cddl/lib/libctf/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -11,7 +11,6 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libelf \ lib/libz \ - usr.bin/xinstall.host \ .include Modified: head/cddl/lib/libdtrace/Makefile.depend ============================================================================== --- head/cddl/lib/libdtrace/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/cddl/lib/libdtrace/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -15,7 +15,6 @@ DIRDEPS = \ lib/libproc \ lib/librtld_db \ lib/libthr \ - usr.bin/xinstall.host \ usr.bin/yacc.host \ Modified: head/cddl/lib/libnvpair/Makefile.depend ============================================================================== --- head/cddl/lib/libnvpair/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/cddl/lib/libnvpair/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/msun \ - usr.bin/xinstall.host \ .include Modified: head/cddl/lib/libumem/Makefile.depend ============================================================================== --- head/cddl/lib/libumem/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/cddl/lib/libumem/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -8,7 +8,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/cddl/lib/libuutil/Makefile.depend ============================================================================== --- head/cddl/lib/libuutil/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/cddl/lib/libuutil/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/cddl/lib/libzfs/Makefile.depend ============================================================================== --- head/cddl/lib/libzfs/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/cddl/lib/libzfs/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -20,7 +20,6 @@ DIRDEPS = \ lib/libthr \ lib/libutil \ lib/msun \ - usr.bin/xinstall.host \ .include Modified: head/cddl/lib/libzfs_core/Makefile.depend ============================================================================== --- head/cddl/lib/libzfs_core/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/cddl/lib/libzfs_core/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -11,7 +11,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/msun \ - usr.bin/xinstall.host \ .include Modified: head/cddl/lib/libzpool/Makefile.depend ============================================================================== --- head/cddl/lib/libzpool/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/cddl/lib/libzpool/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -16,7 +16,6 @@ DIRDEPS = \ lib/libthr \ lib/libz \ lib/msun \ - usr.bin/xinstall.host \ .include Modified: head/gnu/lib/libdialog/Makefile.depend ============================================================================== --- head/gnu/lib/libdialog/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/gnu/lib/libdialog/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -11,7 +11,6 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/msun \ lib/ncurses/ncursesw \ - usr.bin/xinstall.host \ .include Modified: head/gnu/lib/libgcc/Makefile.depend ============================================================================== --- head/gnu/lib/libgcc/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/gnu/lib/libgcc/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -7,7 +7,6 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ - usr.bin/xinstall.host \ .include Modified: head/gnu/lib/libgomp/Makefile.depend ============================================================================== --- head/gnu/lib/libgomp/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/gnu/lib/libgomp/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/gnu/lib/libregex/Makefile.depend ============================================================================== --- head/gnu/lib/libregex/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/gnu/lib/libregex/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/gnu/lib/libstdc++/Makefile.depend ============================================================================== --- head/gnu/lib/libstdc++/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/gnu/lib/libstdc++/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/msun \ - usr.bin/xinstall.host \ .include Modified: head/gnu/lib/libsupc++/Makefile.depend ============================================================================== --- head/gnu/lib/libsupc++/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/gnu/lib/libsupc++/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/kerberos5/lib/libasn1/Makefile.depend ============================================================================== --- head/kerberos5/lib/libasn1/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/kerberos5/lib/libasn1/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -12,7 +12,6 @@ DIRDEPS = \ lib/libc \ lib/libcom_err \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/kerberos5/lib/libgssapi_krb5/Makefile.depend ============================================================================== --- head/kerberos5/lib/libgssapi_krb5/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/kerberos5/lib/libgssapi_krb5/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -20,7 +20,6 @@ DIRDEPS = \ lib/libgssapi \ lib/libthr \ secure/lib/libcrypto \ - usr.bin/xinstall.host \ .include Modified: head/kerberos5/lib/libgssapi_ntlm/Makefile.depend ============================================================================== --- head/kerberos5/lib/libgssapi_ntlm/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/kerberos5/lib/libgssapi_ntlm/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -17,7 +17,6 @@ DIRDEPS = \ lib/libgssapi \ lib/libthr \ secure/lib/libcrypto \ - usr.bin/xinstall.host \ .include Modified: head/kerberos5/lib/libgssapi_spnego/Makefile.depend ============================================================================== --- head/kerberos5/lib/libgssapi_spnego/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/kerberos5/lib/libgssapi_spnego/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -15,7 +15,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libgssapi \ - usr.bin/xinstall.host \ .include Modified: head/kerberos5/lib/libhdb/Makefile.depend ============================================================================== --- head/kerberos5/lib/libhdb/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/kerberos5/lib/libhdb/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -20,7 +20,6 @@ DIRDEPS = \ lib/libsqlite3 \ lib/libthr \ secure/lib/libcrypto \ - usr.bin/xinstall.host \ .include Modified: head/kerberos5/lib/libheimbase/Makefile.depend ============================================================================== --- head/kerberos5/lib/libheimbase/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/kerberos5/lib/libheimbase/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libthr \ - usr.bin/xinstall.host \ .include Modified: head/kerberos5/lib/libheimipcc/Makefile.depend ============================================================================== --- head/kerberos5/lib/libheimipcc/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/kerberos5/lib/libheimipcc/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -14,7 +14,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libthr \ - usr.bin/xinstall.host \ .include Modified: head/kerberos5/lib/libheimipcs/Makefile.depend ============================================================================== --- head/kerberos5/lib/libheimipcs/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/kerberos5/lib/libheimipcs/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -15,7 +15,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libthr \ - usr.bin/xinstall.host \ .include Modified: head/kerberos5/lib/libheimntlm/Makefile.depend ============================================================================== --- head/kerberos5/lib/libheimntlm/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/kerberos5/lib/libheimntlm/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -16,7 +16,6 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libthr \ secure/lib/libcrypto \ - usr.bin/xinstall.host \ .include Modified: head/kerberos5/lib/libhx509/Makefile.depend ============================================================================== --- head/kerberos5/lib/libhx509/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/kerberos5/lib/libhx509/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -15,7 +15,6 @@ DIRDEPS = \ lib/libcom_err \ lib/libcompiler_rt \ secure/lib/libcrypto \ - usr.bin/xinstall.host \ usr.bin/yacc.host \ Modified: head/kerberos5/lib/libkadm5clnt/Makefile.depend ============================================================================== --- head/kerberos5/lib/libkadm5clnt/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/kerberos5/lib/libkadm5clnt/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -16,7 +16,6 @@ DIRDEPS = \ lib/libcom_err \ lib/libcompiler_rt \ lib/libthr \ - usr.bin/xinstall.host \ .include Modified: head/kerberos5/lib/libkadm5srv/Makefile.depend ============================================================================== --- head/kerberos5/lib/libkadm5srv/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/kerberos5/lib/libkadm5srv/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -16,7 +16,6 @@ DIRDEPS = \ lib/libcom_err \ lib/libcompiler_rt \ lib/libthr \ - usr.bin/xinstall.host \ .include Modified: head/kerberos5/lib/libkafs5/Makefile.depend ============================================================================== --- head/kerberos5/lib/libkafs5/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/kerberos5/lib/libkafs5/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -15,7 +15,6 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libthr \ secure/lib/libcrypto \ - usr.bin/xinstall.host \ .include Modified: head/kerberos5/lib/libkdc/Makefile.depend ============================================================================== --- head/kerberos5/lib/libkdc/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/kerberos5/lib/libkdc/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -22,7 +22,6 @@ DIRDEPS = \ lib/libthr \ lib/libutil \ secure/lib/libcrypto \ - usr.bin/xinstall.host \ .include Modified: head/kerberos5/lib/libkrb5/Makefile.depend ============================================================================== --- head/kerberos5/lib/libkrb5/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/kerberos5/lib/libkrb5/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -19,7 +19,6 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libcrypt \ secure/lib/libcrypto \ - usr.bin/xinstall.host \ .include Modified: head/kerberos5/lib/libroken/Makefile.depend ============================================================================== --- head/kerberos5/lib/libroken/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/kerberos5/lib/libroken/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -11,7 +11,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libcrypt \ - usr.bin/xinstall.host \ .include Modified: head/kerberos5/lib/libwind/Makefile.depend ============================================================================== --- head/kerberos5/lib/libwind/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/kerberos5/lib/libwind/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -12,7 +12,6 @@ DIRDEPS = \ lib/libc \ lib/libcom_err \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/atf/libatf-c++/Makefile.depend ============================================================================== --- head/lib/atf/libatf-c++/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/atf/libatf-c++/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -13,7 +13,6 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libcxxrt \ lib/msun \ - usr.bin/xinstall.host \ .include Modified: head/lib/atf/libatf-c/Makefile.depend ============================================================================== --- head/lib/atf/libatf-c/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/atf/libatf-c/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libalias/libalias/Makefile.depend ============================================================================== --- head/lib/libalias/libalias/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libalias/libalias/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libarchive/Makefile.depend ============================================================================== --- head/lib/libarchive/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libarchive/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -14,7 +14,6 @@ DIRDEPS = \ lib/liblzma \ lib/libz \ secure/lib/libcrypto \ - usr.bin/xinstall.host \ .include Modified: head/lib/libauditd/Makefile.depend ============================================================================== --- head/lib/libauditd/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libauditd/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libbegemot/Makefile.depend ============================================================================== --- head/lib/libbegemot/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libbegemot/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libblocksruntime/Makefile.depend ============================================================================== --- head/lib/libblocksruntime/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libblocksruntime/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libbluetooth/Makefile.depend ============================================================================== --- head/lib/libbluetooth/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libbluetooth/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libbsm/Makefile.depend ============================================================================== --- head/lib/libbsm/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libbsm/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libbsnmp/libbsnmp/Makefile.depend ============================================================================== --- head/lib/libbsnmp/libbsnmp/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libbsnmp/libbsnmp/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ secure/lib/libcrypto \ - usr.bin/xinstall.host \ .include Modified: head/lib/libbz2/Makefile.depend ============================================================================== --- head/lib/libbz2/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libbz2/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libcalendar/Makefile.depend ============================================================================== --- head/lib/libcalendar/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libcalendar/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -8,7 +8,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libcam/Makefile.depend ============================================================================== --- head/lib/libcam/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libcam/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libsbuf \ - usr.bin/xinstall.host \ .include Modified: head/lib/libcapsicum/Makefile.depend ============================================================================== --- head/lib/libcapsicum/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libcapsicum/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libnv \ - usr.bin/xinstall.host \ .include Modified: head/lib/libcom_err/Makefile.depend ============================================================================== --- head/lib/libcom_err/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libcom_err/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libcrypt/Makefile.depend ============================================================================== --- head/lib/libcrypt/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libcrypt/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libcuse/Makefile.depend ============================================================================== --- head/lib/libcuse/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libcuse/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libthr \ - usr.bin/xinstall.host \ .include Modified: head/lib/libcxxrt/Makefile.depend ============================================================================== --- head/lib/libcxxrt/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libcxxrt/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libdevinfo/Makefile.depend ============================================================================== --- head/lib/libdevinfo/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libdevinfo/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libdevstat/Makefile.depend ============================================================================== --- head/lib/libdevstat/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libdevstat/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libkvm \ - usr.bin/xinstall.host \ .include Modified: head/lib/libdpv/Makefile.depend ============================================================================== --- head/lib/libdpv/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libdpv/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -14,7 +14,6 @@ DIRDEPS = \ lib/libutil \ lib/msun \ lib/ncurses/ncursesw \ - usr.bin/xinstall.host \ .include Modified: head/lib/libdwarf/Makefile.depend ============================================================================== --- head/lib/libdwarf/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libdwarf/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libelf \ - usr.bin/xinstall.host \ .include Modified: head/lib/libedit/Makefile.depend ============================================================================== --- head/lib/libedit/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libedit/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/ncurses/ncursesw \ - usr.bin/xinstall.host \ .include Modified: head/lib/libelf/Makefile.depend ============================================================================== --- head/lib/libelf/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libelf/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libexecinfo/Makefile.depend ============================================================================== --- head/lib/libexecinfo/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libexecinfo/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libelf \ - usr.bin/xinstall.host \ .include Modified: head/lib/libexpat/Makefile.depend ============================================================================== --- head/lib/libexpat/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libexpat/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libfetch/Makefile.depend ============================================================================== --- head/lib/libfetch/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libfetch/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -11,7 +11,6 @@ DIRDEPS = \ lib/libcompiler_rt \ secure/lib/libcrypto \ secure/lib/libssl \ - usr.bin/xinstall.host \ .include Modified: head/lib/libfigpar/Makefile.depend ============================================================================== --- head/lib/libfigpar/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libfigpar/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libgeom/Makefile.depend ============================================================================== --- head/lib/libgeom/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libgeom/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -11,7 +11,6 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libexpat \ lib/libsbuf \ - usr.bin/xinstall.host \ .include Modified: head/lib/libgpio/Makefile.depend ============================================================================== --- head/lib/libgpio/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libgpio/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libgssapi/Makefile.depend ============================================================================== --- head/lib/libgssapi/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libgssapi/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/BIG5/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/BIG5/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/BIG5/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/DECHanyu/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/DECHanyu/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/DECHanyu/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/EUC/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/EUC/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/EUC/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/EUCTW/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/EUCTW/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/EUCTW/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/GBK2K/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/GBK2K/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/GBK2K/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/HZ/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/HZ/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/HZ/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/ISO2022/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/ISO2022/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/ISO2022/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/JOHAB/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/JOHAB/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/JOHAB/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/MSKanji/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/MSKanji/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/MSKanji/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/UES/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/UES/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/UES/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/UTF1632/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/UTF1632/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/UTF1632/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/UTF7/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/UTF7/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/UTF7/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/UTF8/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/UTF8/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/UTF8/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/VIQR/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/VIQR/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/VIQR/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/ZW/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/ZW/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/ZW/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/iconv_none/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/iconv_none/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/iconv_none/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/iconv_std/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/iconv_std/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/iconv_std/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/mapper_646/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/mapper_646/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/mapper_646/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/mapper_none/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/mapper_none/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/mapper_none/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/mapper_parallel/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/mapper_parallel/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/mapper_parallel/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/mapper_serial/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/mapper_serial/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/mapper_serial/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/mapper_std/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/mapper_std/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/mapper_std/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libiconv_modules/mapper_zone/Makefile.depend ============================================================================== --- head/lib/libiconv_modules/mapper_zone/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libiconv_modules/mapper_zone/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libipsec/Makefile.depend ============================================================================== --- head/lib/libipsec/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libipsec/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ usr.bin/yacc.host \ Modified: head/lib/libjail/Makefile.depend ============================================================================== --- head/lib/libjail/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libjail/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libkiconv/Makefile.depend ============================================================================== --- head/lib/libkiconv/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libkiconv/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libkvm/Makefile.depend ============================================================================== --- head/lib/libkvm/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libkvm/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libldns/Makefile.depend ============================================================================== --- head/lib/libldns/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libldns/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -12,7 +12,6 @@ DIRDEPS = \ lib/libcompiler_rt \ secure/lib/libcrypto \ secure/lib/libssl \ - usr.bin/xinstall.host \ .include Modified: head/lib/liblzma/Makefile.depend ============================================================================== --- head/lib/liblzma/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/liblzma/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -11,7 +11,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libthr \ - usr.bin/xinstall.host \ .include Modified: head/lib/libmagic/Makefile.depend ============================================================================== --- head/lib/libmagic/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libmagic/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libz \ - usr.bin/xinstall.host \ .include Modified: head/lib/libmd/Makefile.depend ============================================================================== --- head/lib/libmd/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libmd/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libmemstat/Makefile.depend ============================================================================== --- head/lib/libmemstat/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libmemstat/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libkvm \ - usr.bin/xinstall.host \ .include Modified: head/lib/libmilter/Makefile.depend ============================================================================== --- head/lib/libmilter/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libmilter/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libmp/Makefile.depend ============================================================================== --- head/lib/libmp/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libmp/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ secure/lib/libcrypto \ - usr.bin/xinstall.host \ .include Modified: head/lib/libmt/Makefile.depend ============================================================================== --- head/lib/libmt/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libmt/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -11,7 +11,6 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libexpat \ lib/libsbuf \ - usr.bin/xinstall.host \ .include Modified: head/lib/libnetgraph/Makefile.depend ============================================================================== --- head/lib/libnetgraph/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libnetgraph/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -9,7 +9,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include Modified: head/lib/libngatm/Makefile.depend ============================================================================== --- head/lib/libngatm/Makefile.depend Wed Nov 25 19:10:04 2015 (r291306) +++ head/lib/libngatm/Makefile.depend Wed Nov 25 19:10:28 2015 (r291307) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - usr.bin/xinstall.host \ .include *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Nov 25 19:10:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F37F9A37F4D; Wed, 25 Nov 2015 19:10:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB7221A4D; Wed, 25 Nov 2015 19:10:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJAr5B091961; Wed, 25 Nov 2015 19:10:53 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJAr32091960; Wed, 25 Nov 2015 19:10:53 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251910.tAPJAr32091960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:10:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291308 - head/targets/pseudo/bootstrap-tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:10:55 -0000 Author: bdrewery Date: Wed Nov 25 19:10:53 2015 New Revision: 291308 URL: https://svnweb.freebsd.org/changeset/base/291308 Log: META MODE: Don't override DESTDIR to the default when building the toolchain. For this case, the normal META MODE staging logic should be used. The BSARGS having DESTDIR= is due to Makefile.inc1 overriding DESTDIR to something when appropriate. For the toolchain stage META MODE is in charge of it, not Makefile.inc1. At least include/, if staging it to the host stagedir, was impacted from this. Staging of include.host is not yet done. Sponsored by: EMC / Isilon Storage Division Modified: head/targets/pseudo/bootstrap-tools/Makefile Modified: head/targets/pseudo/bootstrap-tools/Makefile ============================================================================== --- head/targets/pseudo/bootstrap-tools/Makefile Wed Nov 25 19:10:28 2015 (r291307) +++ head/targets/pseudo/bootstrap-tools/Makefile Wed Nov 25 19:10:53 2015 (r291308) @@ -78,4 +78,4 @@ BSTCARGS= \ # finally we build toolchain leveraging the above. bootstrap-toolchain: .MAKE cross-tools - ${BSTCENV} ${MAKE} -C ${.CURDIR:H:H} ${BSTCARGS} toolchain + ${BSTCENV} ${MAKE} -C ${.CURDIR:H:H} ${BSTCARGS:NDESTDIR=} toolchain From owner-svn-src-all@freebsd.org Wed Nov 25 19:10:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8734EA37F68; Wed, 25 Nov 2015 19:10:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53E961A5A; Wed, 25 Nov 2015 19:10:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJAuot092006; Wed, 25 Nov 2015 19:10:56 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJAuGT092005; Wed, 25 Nov 2015 19:10:56 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251910.tAPJAuGT092005@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291309 - head/targets/pseudo/bootstrap-tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:10:57 -0000 Author: bdrewery Date: Wed Nov 25 19:10:56 2015 New Revision: 291309 URL: https://svnweb.freebsd.org/changeset/base/291309 Log: META MODE: Avoid creating TESTS directories for bootstrap. Sponsored by: EMC / Isilon Storage Division Modified: head/targets/pseudo/bootstrap-tools/Makefile Modified: head/targets/pseudo/bootstrap-tools/Makefile ============================================================================== --- head/targets/pseudo/bootstrap-tools/Makefile Wed Nov 25 19:10:53 2015 (r291308) +++ head/targets/pseudo/bootstrap-tools/Makefile Wed Nov 25 19:10:56 2015 (r291309) @@ -42,7 +42,7 @@ BSARGS= DESTDIR= \ MK_LLDB=no MK_TESTS=no \ MK_INCLUDES=yes -DISTRIB_ENV= INSTALL="sh ${SRCTOP}/tools/install.sh" NO_FSCHG=1 +DISTRIB_ENV= INSTALL="sh ${SRCTOP}/tools/install.sh" NO_FSCHG=1 MK_TESTS=no legacy: .MAKE .META mkdir -p ${LEGACY_TOOLS} ${DISTRIB_ENV} ${MAKE} -C ${SRCTOP}/etc distrib-dirs \ From owner-svn-src-all@freebsd.org Wed Nov 25 19:11:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48F9CA37F99; Wed, 25 Nov 2015 19:11:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E48121B34; Wed, 25 Nov 2015 19:11:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJAxMf092054; Wed, 25 Nov 2015 19:10:59 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJAxlu092051; Wed, 25 Nov 2015 19:10:59 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251910.tAPJAxlu092051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:10:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291310 - in head: include sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:11:01 -0000 Author: bdrewery Date: Wed Nov 25 19:10:59 2015 New Revision: 291310 URL: https://svnweb.freebsd.org/changeset/base/291310 Log: Stop building vers.c in include/ and only build the needed osreldate.h. Because of how osreldate.h was being built with newvers.sh, which always spat out a vers.c dependent on SVN or git, the meta mode build was considering osreldate.h to depend on the current git or SVN index. This would lead to entire tree rebuilds when modifying git's index. There's no reason to be generating vers.c here so just skip it. While here, in mk-osreldate.sh rename PARAM_H to proper PARAMFILE (which newvers.sh already has a default for) and remove unneeded export. Sponsored by: EMC / Isilon Storage Division Modified: head/include/Makefile head/include/mk-osreldate.sh head/sys/conf/newvers.sh Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Wed Nov 25 19:10:56 2015 (r291309) +++ head/include/Makefile Wed Nov 25 19:10:59 2015 (r291310) @@ -5,7 +5,7 @@ .include -CLEANFILES= osreldate.h version vers.c +CLEANFILES= osreldate.h version SUBDIR= arpa protocols rpcsvc rpc xlocale SUBDIR_PARALLEL= INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \ @@ -104,12 +104,8 @@ NEWVERS_SH= ${SYSDIR}/conf/newvers.sh PARAM_H= ${SYSDIR}/sys/param.h MK_OSRELDATE_SH= ${.CURDIR}/mk-osreldate.sh -osreldate.h vers.c: ${NEWVERS_SH} ${PARAM_H} ${MK_OSRELDATE_SH} - env ECHO="${ECHO}" \ - MAKE="${MAKE}" \ - NEWVERS_SH=${NEWVERS_SH} \ - PARAM_H=${PARAM_H} \ - SYSDIR=${SYSDIR} \ +osreldate.h: ${NEWVERS_SH} ${PARAM_H} ${MK_OSRELDATE_SH} + env NEWVERS_SH=${NEWVERS_SH} PARAMFILE=${PARAM_H} SYSDIR=${SYSDIR} \ sh ${MK_OSRELDATE_SH} .for i in ${LHDRS} Modified: head/include/mk-osreldate.sh ============================================================================== --- head/include/mk-osreldate.sh Wed Nov 25 19:10:56 2015 (r291309) +++ head/include/mk-osreldate.sh Wed Nov 25 19:10:59 2015 (r291310) @@ -35,8 +35,8 @@ trap "rm -f $tmpfile" EXIT ${ECHO} creating osreldate.h from newvers.sh -export PARAMFILE="${PARAM_H:=$CURDIR/../sys/sys/param.h}" set +e +VARS_ONLY=1 . "${NEWVERS_SH:=$CURDIR/../sys/conf/newvers.sh}" || exit 1 set -e cat > $tmpfile < Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E43AA3709E; Wed, 25 Nov 2015 19:13:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A7C81FEF; Wed, 25 Nov 2015 19:13:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJDTCs094656; Wed, 25 Nov 2015 19:13:29 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJDSaI094647; Wed, 25 Nov 2015 19:13:28 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251913.tAPJDSaI094647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:13:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291311 - in head: share/colldef share/ctypedef share/monetdef share/msgdef share/numericdef share/timedef targets/pseudo/hosttools targets/pseudo/userland/share usr.bin/localedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:13:30 -0000 Author: bdrewery Date: Wed Nov 25 19:13:28 2015 New Revision: 291311 URL: https://svnweb.freebsd.org/changeset/base/291311 Log: META MODE: Fix 'make the-lot' with recent locale changes Sponsored by: EMC / Isilon Storage Division Added: head/share/ctypedef/Makefile.depend - copied, changed from r291310, head/share/colldef/Makefile.depend head/share/monetdef/Makefile.depend - copied, changed from r291310, head/share/colldef/Makefile.depend head/share/msgdef/Makefile.depend - copied, changed from r291310, head/share/colldef/Makefile.depend head/share/numericdef/Makefile.depend - copied, changed from r291310, head/share/colldef/Makefile.depend head/share/timedef/Makefile.depend - copied, changed from r291310, head/share/colldef/Makefile.depend head/usr.bin/localedef/Makefile.depend (contents, props changed) Modified: head/share/colldef/Makefile.depend head/targets/pseudo/hosttools/Makefile.depend head/targets/pseudo/userland/share/Makefile.depend Modified: head/share/colldef/Makefile.depend ============================================================================== --- head/share/colldef/Makefile.depend Wed Nov 25 19:10:59 2015 (r291310) +++ head/share/colldef/Makefile.depend Wed Nov 25 19:13:28 2015 (r291311) @@ -2,6 +2,7 @@ # Autogenerated - do NOT edit! DIRDEPS = \ + usr.bin/localedef.host \ .include Copied and modified: head/share/ctypedef/Makefile.depend (from r291310, head/share/colldef/Makefile.depend) ============================================================================== --- head/share/colldef/Makefile.depend Wed Nov 25 19:10:59 2015 (r291310, copy source) +++ head/share/ctypedef/Makefile.depend Wed Nov 25 19:13:28 2015 (r291311) @@ -2,6 +2,7 @@ # Autogenerated - do NOT edit! DIRDEPS = \ + usr.bin/localedef.host \ .include Copied and modified: head/share/monetdef/Makefile.depend (from r291310, head/share/colldef/Makefile.depend) ============================================================================== Copied and modified: head/share/msgdef/Makefile.depend (from r291310, head/share/colldef/Makefile.depend) ============================================================================== Copied and modified: head/share/numericdef/Makefile.depend (from r291310, head/share/colldef/Makefile.depend) ============================================================================== Copied and modified: head/share/timedef/Makefile.depend (from r291310, head/share/colldef/Makefile.depend) ============================================================================== Modified: head/targets/pseudo/hosttools/Makefile.depend ============================================================================== --- head/targets/pseudo/hosttools/Makefile.depend Wed Nov 25 19:10:59 2015 (r291310) +++ head/targets/pseudo/hosttools/Makefile.depend Wed Nov 25 19:13:28 2015 (r291311) @@ -11,6 +11,7 @@ DIRDEPS = \ usr.bin/clang/clang.host \ usr.bin/clang/tblgen.host \ usr.bin/lex/lib.host \ + usr.bin/localedef.host \ usr.bin/mkcsmapper_static.host \ usr.bin/mkesdb_static.host \ usr.bin/mkuzip.host \ Modified: head/targets/pseudo/userland/share/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/share/Makefile.depend Wed Nov 25 19:10:59 2015 (r291310) +++ head/targets/pseudo/userland/share/Makefile.depend Wed Nov 25 19:13:28 2015 (r291311) @@ -4,6 +4,7 @@ DIRDEPS = \ share/atf \ + share/ctypedef \ share/colldef \ share/dict \ share/doc/IPv6 \ Added: head/usr.bin/localedef/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/localedef/Makefile.depend Wed Nov 25 19:13:28 2015 (r291311) @@ -0,0 +1,39 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + usr.bin/yacc.host \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +charmap.o: parser.h +charmap.po: parser.h +collate.o: parser.h +collate.po: parser.h +ctype.o: parser.h +ctype.po: parser.h +localedef.o: parser.h +localedef.po: parser.h +messages.o: parser.h +messages.po: parser.h +monetary.o: parser.h +monetary.po: parser.h +numeric.o: parser.h +numeric.po: parser.h +parser.o: parser.c +parser.po: parser.c +scanner.o: parser.h +scanner.po: parser.h +time.o: parser.h +time.po: parser.h +.endif From owner-svn-src-all@freebsd.org Wed Nov 25 19:13:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE1B0A370B0; Wed, 25 Nov 2015 19:13:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA9401010; Wed, 25 Nov 2015 19:13:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJDWKK094704; Wed, 25 Nov 2015 19:13:32 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJDWMk094703; Wed, 25 Nov 2015 19:13:32 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251913.tAPJDWMk094703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:13:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291312 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:13:34 -0000 Author: bdrewery Date: Wed Nov 25 19:13:32 2015 New Revision: 291312 URL: https://svnweb.freebsd.org/changeset/base/291312 Log: META MODE: Revert r287879 so that 'make -V' still uses AUTO_OBJ. This has caused much confusion for myself as there are quite a lot of variables that depend on having a proper ${.OBJDIR}. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/sys.mk Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Wed Nov 25 19:13:28 2015 (r291311) +++ head/share/mk/sys.mk Wed Nov 25 19:13:32 2015 (r291312) @@ -51,11 +51,9 @@ __ENV_ONLY_OPTIONS:= \ .endif .if ${MK_AUTO_OBJ} == "yes" # This needs to be done early - before .PATH is computed -# Don't do this if just running 'make -V' (but do when inspecting .OBJDIR) or -# 'make showconfig' (during makeman which enables all options when meta mode -# is not expected) -.if (${.MAKEFLAGS:M-V} == "" || ${.MAKEFLAGS:M.OBJDIR} != "") && \ - !make(showconfig) +# Don't do this for 'make showconfig' as it enables all options where meta mode +# is not expected. +.if !make(showconfig) .sinclude .endif .endif From owner-svn-src-all@freebsd.org Wed Nov 25 19:13:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A25DA370DC; Wed, 25 Nov 2015 19:13:38 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3209116B; Wed, 25 Nov 2015 19:13:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJDaes094752; Wed, 25 Nov 2015 19:13:36 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJDaS0094748; Wed, 25 Nov 2015 19:13:36 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251913.tAPJDaS0094748@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:13:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291313 - in head/lib: libproc librtld_db X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:13:38 -0000 Author: bdrewery Date: Wed Nov 25 19:13:35 2015 New Revision: 291313 URL: https://svnweb.freebsd.org/changeset/base/291313 Log: META MODE: Rework circular dependency guard for librtld_db/libproc. librtld_db only needs libutil.h to build, not the libproc library. So it can safely use its header and allow libproc to depend on librtld_rb to be built first to link. This is required after fixing ld --sysroot in r291226. Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libproc/Makefile head/lib/libproc/Makefile.depend head/lib/librtld_db/Makefile head/lib/librtld_db/Makefile.depend Modified: head/lib/libproc/Makefile ============================================================================== --- head/lib/libproc/Makefile Wed Nov 25 19:13:32 2015 (r291312) +++ head/lib/libproc/Makefile Wed Nov 25 19:13:35 2015 (r291313) @@ -14,9 +14,6 @@ SRCS= proc_bkpt.c \ INCS= libproc.h CFLAGS+= -I${.CURDIR} -# avoid cyclic dependency -CFLAGS+= -I${.CURDIR:H}/librtld_db -GENDIRDEPS_FILTER+= Nlib/librtld_db .if ${MK_CXX} == "no" CFLAGS+= -DNO_CXA_DEMANGLE Modified: head/lib/libproc/Makefile.depend ============================================================================== --- head/lib/libproc/Makefile.depend Wed Nov 25 19:13:32 2015 (r291312) +++ head/lib/libproc/Makefile.depend Wed Nov 25 19:13:35 2015 (r291313) @@ -12,6 +12,7 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libcxxrt \ lib/libelf \ + lib/librtld_db \ lib/libutil \ Modified: head/lib/librtld_db/Makefile ============================================================================== --- head/lib/librtld_db/Makefile Wed Nov 25 19:13:32 2015 (r291312) +++ head/lib/librtld_db/Makefile Wed Nov 25 19:13:35 2015 (r291313) @@ -10,5 +10,7 @@ SRCS= rtld_db.c INCS= rtld_db.h CFLAGS+= -I${.CURDIR} +# Avoid circular dependency, we only need the libproc.h header here. +CFLAGS+= -I${.CURDIR:H}/libproc .include Modified: head/lib/librtld_db/Makefile.depend ============================================================================== --- head/lib/librtld_db/Makefile.depend Wed Nov 25 19:13:32 2015 (r291312) +++ head/lib/librtld_db/Makefile.depend Wed Nov 25 19:13:35 2015 (r291313) @@ -10,7 +10,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libelf \ - lib/libproc \ lib/libutil \ From owner-svn-src-all@freebsd.org Wed Nov 25 19:13:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E43AEA370F0; Wed, 25 Nov 2015 19:13:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F1B11246; Wed, 25 Nov 2015 19:13:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJDdeo094799; Wed, 25 Nov 2015 19:13:39 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJDdAN094798; Wed, 25 Nov 2015 19:13:39 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251913.tAPJDdAN094798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:13:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291314 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:13:41 -0000 Author: bdrewery Date: Wed Nov 25 19:13:39 2015 New Revision: 291314 URL: https://svnweb.freebsd.org/changeset/base/291314 Log: META MODE: Don't truncate DIRDEPS for bootstrapping during gendirdeps. Reviewed by: sjg Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/meta.autodep.mk Modified: head/share/mk/meta.autodep.mk ============================================================================== --- head/share/mk/meta.autodep.mk Wed Nov 25 19:13:35 2015 (r291313) +++ head/share/mk/meta.autodep.mk Wed Nov 25 19:13:39 2015 (r291314) @@ -191,7 +191,7 @@ gendirdeps: ${_DEPENDFILE} # anything which matches ${_OBJROOT}* but not ${_OBJTOP}* # needs to be qualified in DIRDEPS # The pseudo machine "host" is used for HOST_TARGET -DIRDEPS = \ +DIRDEPS += \ ${DPADD:M${_OBJTOP}*:H:C,${_OBJTOP}[^/]*/,,:N.:O:u} \ ${DPADD:M${_OBJROOT}*:N${_OBJTOP}*:H:S,${_OBJROOT},,:C,^([^/]+)/(.*),\2.\1,:S,${HOST_TARGET}$,host,:N.*:O:u} From owner-svn-src-all@freebsd.org Wed Nov 25 19:13:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80230A37132; Wed, 25 Nov 2015 19:13:46 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E4F3142F; Wed, 25 Nov 2015 19:13:46 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJDjKs094890; Wed, 25 Nov 2015 19:13:45 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJDjFm094889; Wed, 25 Nov 2015 19:13:45 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251913.tAPJDjFm094889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:13:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291316 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:13:46 -0000 Author: bdrewery Date: Wed Nov 25 19:13:45 2015 New Revision: 291316 URL: https://svnweb.freebsd.org/changeset/base/291316 Log: META MODE: Don't add staged DPADDs to DIRDEPS when bootstrapping gendirdeps. This was finding libraries that were installed into DESTDIR/usr/lib, where DESTDIR is the stage directory, and then adding in usr/lib to DIRDEPS. Just exclude the STAGE_ROOT if defined. Discussed with: sjg Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/meta.autodep.mk Modified: head/share/mk/meta.autodep.mk ============================================================================== --- head/share/mk/meta.autodep.mk Wed Nov 25 19:13:42 2015 (r291315) +++ head/share/mk/meta.autodep.mk Wed Nov 25 19:13:45 2015 (r291316) @@ -196,7 +196,7 @@ gendirdeps: ${_DEPENDFILE} # The pseudo machine "host" is used for HOST_TARGET DIRDEPS += \ ${DPADD:M${_OBJTOP}*:H:C,${_OBJTOP}[^/]*/,,:N.:O:u} \ - ${DPADD:M${_OBJROOT}*:N${_OBJTOP}*:H:S,${_OBJROOT},,:C,^([^/]+)/(.*),\2.\1,:S,${HOST_TARGET}$,host,:N.*:O:u} + ${DPADD:M${_OBJROOT}*:N${_OBJTOP}*:N${STAGE_ROOT:U${_OBJTOP}}/*:H:S,${_OBJROOT},,:C,^([^/]+)/(.*),\2.\1,:S,${HOST_TARGET}$,host,:N.*:O:u} .endif .endif From owner-svn-src-all@freebsd.org Wed Nov 25 19:13:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E17E7A37105; Wed, 25 Nov 2015 19:13:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71B9A130E; Wed, 25 Nov 2015 19:13:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJDgde094845; Wed, 25 Nov 2015 19:13:42 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJDgoM094844; Wed, 25 Nov 2015 19:13:42 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251913.tAPJDgoM094844@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:13:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291315 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:13:44 -0000 Author: bdrewery Date: Wed Nov 25 19:13:42 2015 New Revision: 291315 URL: https://svnweb.freebsd.org/changeset/base/291315 Log: META MODE: Define variables this file uses that were defined elsewhere. Discussed with: sjg Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/meta.autodep.mk Modified: head/share/mk/meta.autodep.mk ============================================================================== --- head/share/mk/meta.autodep.mk Wed Nov 25 19:13:39 2015 (r291314) +++ head/share/mk/meta.autodep.mk Wed Nov 25 19:13:42 2015 (r291315) @@ -51,6 +51,9 @@ UPDATE_DEPENDFILE = NO .endif _CURDIR ?= ${.CURDIR} +_OBJDIR ?= ${.OBJDIR} +_OBJTOP ?= ${OBJTOP} +_OBJROOT ?= ${OBJROOT:U${_OBJTOP}} _DEPENDFILE := ${_CURDIR}/${.MAKE.DEPENDFILE:T} .if ${.MAKE.LEVEL} == 0 From owner-svn-src-all@freebsd.org Wed Nov 25 19:44:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E9ECA37702; Wed, 25 Nov 2015 19:44:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3323E186F; Wed, 25 Nov 2015 19:44:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJiSBX003809; Wed, 25 Nov 2015 19:44:28 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJiSKV003808; Wed, 25 Nov 2015 19:44:28 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251944.tAPJiSKV003808@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:44:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291317 - head/targets/pseudo/bootstrap-tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:44:29 -0000 Author: bdrewery Date: Wed Nov 25 19:44:28 2015 New Revision: 291317 URL: https://svnweb.freebsd.org/changeset/base/291317 Log: META MODE: Need to include the LEGACY_TOOLS directories into PATH. This is just as Makefile.inc1 does it for these phases. Otherwise some of the build tools are not found and used properly, such as 'make-roken' in the kerberos5 build on older releases. Sponsored by: EMC / Isilon Storage Division Modified: head/targets/pseudo/bootstrap-tools/Makefile Modified: head/targets/pseudo/bootstrap-tools/Makefile ============================================================================== --- head/targets/pseudo/bootstrap-tools/Makefile Wed Nov 25 19:13:45 2015 (r291316) +++ head/targets/pseudo/bootstrap-tools/Makefile Wed Nov 25 19:44:28 2015 (r291317) @@ -21,7 +21,8 @@ BSENV= \ TARGET=${HOST_MACHINE} TARGET_ARCH=${HOST_MACHINE_ARCH} \ WITHOUT_STAGING=1 STAGE_ROOT= BOOTSTRAPPING_TOOLS=1 \ WORLDTMP=${BTOOLSDIR} LEGACY_TOOLS=${LEGACY_TOOLS} \ - INSTALL="sh ${SRCTOP}/tools/install.sh" + INSTALL="sh ${SRCTOP}/tools/install.sh" \ + PATH=${LEGACY_TOOLS}/usr/sbin:${LEGACY_TOOLS}/usr/bin:${LEGACY_TOOLS}/bin:${PATH} .if !defined(OSRELDATE) ord_h= /usr/include/osreldate.h From owner-svn-src-all@freebsd.org Wed Nov 25 19:44:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 312BFA37724; Wed, 25 Nov 2015 19:44:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8B5D18B3; Wed, 25 Nov 2015 19:44:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJiVI9003855; Wed, 25 Nov 2015 19:44:31 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJiVkm003854; Wed, 25 Nov 2015 19:44:31 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251944.tAPJiVkm003854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:44:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291318 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:44:33 -0000 Author: bdrewery Date: Wed Nov 25 19:44:31 2015 New Revision: 291318 URL: https://svnweb.freebsd.org/changeset/base/291318 Log: META MODE: Show PATH on errors. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/local.sys.mk Modified: head/share/mk/local.sys.mk ============================================================================== --- head/share/mk/local.sys.mk Wed Nov 25 19:44:28 2015 (r291317) +++ head/share/mk/local.sys.mk Wed Nov 25 19:44:31 2015 (r291318) @@ -13,6 +13,7 @@ MAKE_PRINT_VAR_ON_ERROR+= \ MAKEOBJDIRPREFIX \ MAKESYSPATH \ MAKE_VERSION\ + PATH \ SRCTOP \ OBJTOP \ ${MAKE_PRINT_VAR_ON_ERROR_XTRAS} From owner-svn-src-all@freebsd.org Wed Nov 25 19:44:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64516A37746; Wed, 25 Nov 2015 19:44:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C1CA19A9; Wed, 25 Nov 2015 19:44:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJiZHH003902; Wed, 25 Nov 2015 19:44:35 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJiZ2E003901; Wed, 25 Nov 2015 19:44:35 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251944.tAPJiZ2E003901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:44:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291319 - head/targets/pseudo/hosttools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:44:36 -0000 Author: bdrewery Date: Wed Nov 25 19:44:34 2015 New Revision: 291319 URL: https://svnweb.freebsd.org/changeset/base/291319 Log: META MODE: Add more hosttools needed pre-universe. Sponsored by: EMC / Isilon Storage Division Modified: head/targets/pseudo/hosttools/Makefile.depend Modified: head/targets/pseudo/hosttools/Makefile.depend ============================================================================== --- head/targets/pseudo/hosttools/Makefile.depend Wed Nov 25 19:44:31 2015 (r291318) +++ head/targets/pseudo/hosttools/Makefile.depend Wed Nov 25 19:44:34 2015 (r291319) @@ -15,7 +15,9 @@ DIRDEPS = \ usr.bin/mkcsmapper_static.host \ usr.bin/mkesdb_static.host \ usr.bin/mkuzip.host \ + usr.bin/yacc.host \ usr.bin/xinstall.host \ + usr.bin/xlint/xlint.host \ usr.sbin/config.host \ From owner-svn-src-all@freebsd.org Wed Nov 25 19:44:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78C8DA3777B; Wed, 25 Nov 2015 19:44:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 416FF1C58; Wed, 25 Nov 2015 19:44:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJikWg003978; Wed, 25 Nov 2015 19:44:46 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJihWu003949; Wed, 25 Nov 2015 19:44:43 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251944.tAPJihWu003949@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:44:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291320 - in head: bin/rmail gnu/lib/libreadline/readline gnu/lib/libstdc++ gnu/lib/libsupc++ gnu/usr.bin/binutils/ld gnu/usr.bin/cc/cc_tools lib/libc++ lib/libc/gdtoa lib/libc/gen lib/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:44:47 -0000 Author: bdrewery Date: Wed Nov 25 19:44:43 2015 New Revision: 291320 URL: https://svnweb.freebsd.org/changeset/base/291320 Log: META MODE: Don't create .meta files when symlinking sources into the obj directory. Tracking these leads to situations where meta mode will consider the file to be out of date if /bin/sh or /bin/ln are newer than the source file. There's no reason for meta mode to do this as make is already handling the rebuild dependency fine. Sponsored by: EMC / Isilon Storage Division Modified: head/bin/rmail/Makefile head/gnu/lib/libreadline/readline/Makefile head/gnu/lib/libstdc++/Makefile head/gnu/lib/libsupc++/Makefile head/gnu/usr.bin/binutils/ld/Makefile head/gnu/usr.bin/cc/cc_tools/Makefile head/lib/libc++/Makefile head/lib/libc/gdtoa/Makefile.inc head/lib/libc/gen/Makefile.inc head/lib/libc/stdlib/jemalloc/Makefile.inc head/lib/libdwarf/Makefile head/lib/libelf/Makefile head/lib/libmilter/Makefile head/lib/libpcap/Makefile head/lib/libsm/Makefile head/lib/libsmdb/Makefile head/lib/libsmutil/Makefile head/libexec/mail.local/Makefile head/libexec/smrsh/Makefile head/share/mk/sys.mk head/sys/boot/i386/boot2/Makefile head/usr.bin/awk/Makefile head/usr.bin/vacation/Makefile head/usr.sbin/acpi/iasl/Makefile head/usr.sbin/editmap/Makefile head/usr.sbin/mailstats/Makefile head/usr.sbin/makemap/Makefile head/usr.sbin/praliases/Makefile head/usr.sbin/sendmail/Makefile Modified: head/bin/rmail/Makefile ============================================================================== --- head/bin/rmail/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/bin/rmail/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -29,7 +29,7 @@ LDFLAGS+=${SENDMAIL_LDFLAGS} # following: # CFLAGS+= -DQUEUE_ONLY -sm_os.h: - ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h +sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} .include Modified: head/gnu/lib/libreadline/readline/Makefile ============================================================================== --- head/gnu/lib/libreadline/readline/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/gnu/lib/libreadline/readline/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -21,7 +21,7 @@ CLEANFILES+= ${INSTALLED_HEADERS} DPSRCS+= ${INSTALLED_HEADERS} .for _h in ${INSTALLED_HEADERS} -${_h}: ${SRCDIR}/${_h} +${_h}: ${SRCDIR}/${_h} .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .endfor Modified: head/gnu/lib/libstdc++/Makefile ============================================================================== --- head/gnu/lib/libstdc++/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/gnu/lib/libstdc++/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -88,7 +88,7 @@ ATOMICITY_H= ${SRCDIR}/config/cpu/generi .endif .endif -atomicity.cc: ${ATOMICITY_H} +atomicity.cc: ${ATOMICITY_H} .NOMETA ln -sf ${.ALLSRC} ${.TARGET} CLEANFILES+= atomicity.cc @@ -599,7 +599,7 @@ unwind.h: ${GCCDIR}/config/arm/unwind-ar unwind.h: ${GCCDIR}/unwind-generic.h .endif -unwind.h: +unwind.h: .NOMETA ln -sf ${.ALLSRC} ${.TARGET} SRCS+= unwind.h @@ -624,7 +624,7 @@ CLEANFILES+= c++config.h VERSION_MAP= libstdc++.map -${VERSION_MAP}: ${SRCDIR}/config/abi/pre/gnu.ver +${VERSION_MAP}: ${SRCDIR}/config/abi/pre/gnu.ver .NOMETA ln -sf ${.ALLSRC} ${.TARGET} CLEANFILES+= ${VERSION_MAP} Modified: head/gnu/lib/libsupc++/Makefile ============================================================================== --- head/gnu/lib/libsupc++/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/gnu/lib/libsupc++/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -38,7 +38,7 @@ unwind.h: ${GCCDIR}/config/arm/unwind-ar unwind.h: ${GCCDIR}/unwind-generic.h .endif -unwind.h: +unwind.h: .NOMETA ln -sf ${.ALLSRC} ${.TARGET} SRCS+= unwind.h Modified: head/gnu/usr.bin/binutils/ld/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/gnu/usr.bin/binutils/ld/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -67,8 +67,8 @@ ldemul-list.h: echo "${EMXFR}" > ${.TARGET} echo "#define EMULATION_LIST ${EMLST} 0" >> ${.TARGET} -stringify.sed: - ln -sf ${SRCDIR}/ld/emultempl/astring.sed ${.TARGET} +stringify.sed: ${SRCDIR}/ld/emultempl/astring.sed .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} GENDIRDEPS_FILTER.host+= Nusr.bin/yacc Modified: head/gnu/usr.bin/cc/cc_tools/Makefile ============================================================================== --- head/gnu/usr.bin/cc/cc_tools/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/gnu/usr.bin/cc/cc_tools/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -346,7 +346,7 @@ gstdint.h: GENSRCS+= gstdint.h # Linked headers -gthr-default.h: ${GCCDIR}/gthr-posix.h +gthr-default.h: ${GCCDIR}/gthr-posix.h .NOMETA ln -sf ${.ALLSRC} ${.TARGET} GENSRCS+= gthr-default.h @@ -357,7 +357,7 @@ unwind.h: ${GCCDIR}/config/arm/unwind-ar unwind.h: ${GCCDIR}/unwind-generic.h .endif -unwind.h: +unwind.h: .NOMETA ln -sf ${.ALLSRC} ${.TARGET} GENSRCS+= unwind.h Modified: head/lib/libc++/Makefile ============================================================================== --- head/lib/libc++/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/lib/libc++/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -52,8 +52,8 @@ CXXRT_SRCS+= libelftc_dem_gnu3.c\ .for _S in ${CXXRT_SRCS} STATICOBJS+= cxxrt_${_S:R}.o -cxxrt_${_S}: - ln -sf ${LIBCXXRTDIR}/${_S} ${.TARGET} +cxxrt_${_S}: ${LIBCXXRTDIR}/${_S} .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} .endfor WARNS= 0 Modified: head/lib/libc/gdtoa/Makefile.inc ============================================================================== --- head/lib/libc/gdtoa/Makefile.inc Wed Nov 25 19:44:34 2015 (r291319) +++ head/lib/libc/gdtoa/Makefile.inc Wed Nov 25 19:44:43 2015 (r291320) @@ -15,6 +15,6 @@ CFLAGS+=-I${LIBC_SRCTOP}/../../contrib/g .for src in ${GDTOASRCS} MISRCS+=gdtoa_${src} CLEANFILES+=gdtoa_${src} -gdtoa_${src}: - ln -sf ${LIBC_SRCTOP}/../../contrib/gdtoa/${src} ${.TARGET} +gdtoa_${src}: ${LIBC_SRCTOP}/../../contrib/gdtoa/${src} .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} .endfor Modified: head/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Wed Nov 25 19:44:34 2015 (r291319) +++ head/lib/libc/gen/Makefile.inc Wed Nov 25 19:44:43 2015 (r291320) @@ -159,8 +159,8 @@ CANCELPOINTS_SRCS=sem.c sem_new.c .for src in ${CANCELPOINTS_SRCS} SRCS+=cancelpoints_${src} CLEANFILES+=cancelpoints_${src} -cancelpoints_${src}: - ln -sf ${LIBC_SRCTOP}/gen/${src} ${.TARGET} +cancelpoints_${src}: ${LIBC_SRCTOP}/gen/${src} .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} .endfor SYM_MAPS+=${LIBC_SRCTOP}/gen/Symbol.map Modified: head/lib/libc/stdlib/jemalloc/Makefile.inc ============================================================================== --- head/lib/libc/stdlib/jemalloc/Makefile.inc Wed Nov 25 19:44:34 2015 (r291319) +++ head/lib/libc/stdlib/jemalloc/Makefile.inc Wed Nov 25 19:44:43 2015 (r291320) @@ -14,14 +14,14 @@ CFLAGS+=-I${LIBC_SRCTOP}/../../contrib/j .for src in ${JEMALLOCSRCS} MISRCS+=jemalloc_${src} CLEANFILES+=jemalloc_${src} -jemalloc_${src}: - ln -sf ${LIBC_SRCTOP}/../../contrib/jemalloc/src/${src} ${.TARGET} +jemalloc_${src}: ${LIBC_SRCTOP}/../../contrib/jemalloc/src/${src} .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} .endfor MAN+=jemalloc.3 CLEANFILES+=jemalloc.3 -jemalloc.3: - ln -sf ${LIBC_SRCTOP}/../../contrib/jemalloc/doc/jemalloc.3 ${.TARGET} +jemalloc.3: ${LIBC_SRCTOP}/../../contrib/jemalloc/doc/jemalloc.3 + ln -sf ${.ALLSRC} ${.TARGET} MLINKS+= \ jemalloc.3 malloc.3 \ Modified: head/lib/libdwarf/Makefile ============================================================================== --- head/lib/libdwarf/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/lib/libdwarf/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -93,9 +93,9 @@ CLEANFILES= ${GENSRCS} CLEANDIRS= sys CFLAGS+= -I. -I${SRCDIR} -I${TOP}/common -I${TOP}/libelf -sys/elf32.h sys/elf64.h sys/elf_common.h: ${.CURDIR}/../../sys/${.TARGET} +sys/elf32.h sys/elf64.h sys/elf_common.h: ${.CURDIR}/../../sys/${.TARGET} .NOMETA mkdir -p ${.OBJDIR}/sys - ln -sf ${.CURDIR}/../../sys/${.TARGET} ${.TARGET} + ln -sf ${.ALLSRC} ${.TARGET} LIBADD+= elf Modified: head/lib/libelf/Makefile ============================================================================== --- head/lib/libelf/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/lib/libelf/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -78,9 +78,9 @@ CLEANFILES= ${GENSRCS} CLEANDIRS= sys CFLAGS+= -I. -I${SRCDIR} -I${TOP}/common -sys/elf32.h sys/elf64.h sys/elf_common.h: ${.CURDIR}/../../sys/${.TARGET} +sys/elf32.h sys/elf64.h sys/elf_common.h: ${.CURDIR}/../../sys/${.TARGET} .NOMETA mkdir -p ${.OBJDIR}/sys - ln -sf ${.CURDIR}/../../sys/${.TARGET} ${.TARGET} + ln -sf ${.ALLSRC} ${.TARGET} SHLIB_MAJOR= 2 Modified: head/lib/libmilter/Makefile ============================================================================== --- head/lib/libmilter/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/lib/libmilter/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -29,7 +29,7 @@ CLEANFILES+=sm_os.h WARNS?= 0 -sm_os.h: - ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h +sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} .include Modified: head/lib/libpcap/Makefile ============================================================================== --- head/lib/libpcap/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/lib/libpcap/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -126,9 +126,8 @@ version.h: ${PCAP_DISTDIR}/VERSION @rm -f $@ sed 's/.*/char pcap_version_string[] = "libpcap version &";/' ${PCAP_DISTDIR}/VERSION > $@ -tokdefs.h: grammar.h - ln -sf grammar.h tokdefs.h - +tokdefs.h: grammar.h .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} # # Magic to convert the man pages to something non Solarish Modified: head/lib/libsm/Makefile ============================================================================== --- head/lib/libsm/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/lib/libsm/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -36,7 +36,7 @@ CLEANFILES+=sm_os.h INTERNALLIB= -sm_os.h: - ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h +sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} .include Modified: head/lib/libsmdb/Makefile ============================================================================== --- head/lib/libsmdb/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/lib/libsmdb/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -19,7 +19,7 @@ CLEANFILES+=sm_os.h INTERNALLIB= -sm_os.h: - ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h +sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} .include Modified: head/lib/libsmutil/Makefile ============================================================================== --- head/lib/libsmutil/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/lib/libsmutil/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -19,7 +19,7 @@ CLEANFILES+=sm_os.h INTERNALLIB= -sm_os.h: - ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h +sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} .include Modified: head/libexec/mail.local/Makefile ============================================================================== --- head/libexec/mail.local/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/libexec/mail.local/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -23,7 +23,7 @@ DPADD+=${SENDMAIL_DPADD} LDADD+=${SENDMAIL_LDADD} LDFLAGS+=${SENDMAIL_LDFLAGS} -sm_os.h: - ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h +sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} .include Modified: head/libexec/smrsh/Makefile ============================================================================== --- head/libexec/smrsh/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/libexec/smrsh/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -22,7 +22,7 @@ DPADD+=${SENDMAIL_DPADD} LDADD+=${SENDMAIL_LDADD} LDFLAGS+=${SENDMAIL_LDFLAGS} -sm_os.h: - ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h +sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} .include Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Wed Nov 25 19:44:34 2015 (r291319) +++ head/share/mk/sys.mk Wed Nov 25 19:44:43 2015 (r291320) @@ -272,7 +272,7 @@ YFLAGS ?= -d # non-Posix rule set -.sh: +.sh: .NOMETA cp -fp ${.IMPSRC} ${.TARGET} chmod a+x ${.TARGET} Modified: head/sys/boot/i386/boot2/Makefile ============================================================================== --- head/sys/boot/i386/boot2/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/sys/boot/i386/boot2/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -107,8 +107,8 @@ boot2.h: boot1.out .if ${MACHINE_CPUARCH} == "amd64" beforedepend boot2.s: machine CLEANFILES+= machine -machine: - ln -sf ${.CURDIR}/../../../i386/include machine +machine: ${.CURDIR}/../../../i386/include .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} .endif .include Modified: head/usr.bin/awk/Makefile ============================================================================== --- head/usr.bin/awk/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/usr.bin/awk/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -17,7 +17,7 @@ MLINKS= awk.1 nawk.1 CLEANFILES= maketab proctab.c ytab.h -ytab.h: awkgram.h +ytab.h: awkgram.h .NOMETA ln -sf ${.ALLSRC} ${.TARGET} proctab.c: maketab Modified: head/usr.bin/vacation/Makefile ============================================================================== --- head/usr.bin/vacation/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/usr.bin/vacation/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -22,7 +22,7 @@ DPADD+=${SENDMAIL_DPADD} LDADD+=${SENDMAIL_LDADD} LDFLAGS+=${SENDMAIL_LDFLAGS} -sm_os.h: - ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h +sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} .include Modified: head/usr.sbin/acpi/iasl/Makefile ============================================================================== --- head/usr.sbin/acpi/iasl/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/usr.sbin/acpi/iasl/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -95,7 +95,7 @@ aslcompiler.y: aslparser.y aslrules.y as aslcompilerparse.c aslcompilerparse.h: aslcompiler.y ${YACC} ${YFLAGS} -pAslCompiler -oaslcompilerparse.c ${.ALLSRC} -aslcompiler.y.h: aslcompilerparse.h +aslcompiler.y.h: aslcompilerparse.h .NOMETA ln -f ${.ALLSRC} ${.TARGET} dtparserlex.c: dtparser.l @@ -105,7 +105,7 @@ dtparserlex.c: dtparser.l dtparserparse.c dtparserparse.h: dtparser.y ${YACC} ${YFLAGS} -pDtParser -odtparserparse.c ${.ALLSRC} -dtparser.y.h: dtparserparse.h +dtparser.y.h: dtparserparse.h .NOMETA ln -f ${.ALLSRC} ${.TARGET} prparserlex.c: prparser.l @@ -115,7 +115,7 @@ prparserlex.c: prparser.l prparserparse.c prparserparse.h: prparser.y ${YACC} ${YFLAGS} -pPrParser -oprparserparse.c ${.ALLSRC} -prparser.y.h: prparserparse.h +prparser.y.h: prparserparse.h .NOMETA ln -f ${.ALLSRC} ${.TARGET} .include Modified: head/usr.sbin/editmap/Makefile ============================================================================== --- head/usr.sbin/editmap/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/usr.sbin/editmap/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -23,7 +23,7 @@ DPADD+=${SENDMAIL_DPADD} LDADD+=${SENDMAIL_LDADD} LDFLAGS+=${SENDMAIL_LDFLAGS} -sm_os.h: - ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h +sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} .include Modified: head/usr.sbin/mailstats/Makefile ============================================================================== --- head/usr.sbin/mailstats/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/usr.sbin/mailstats/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -24,7 +24,7 @@ DPADD+= ${SENDMAIL_DPADD} LDADD+= ${SENDMAIL_LDADD} LDFLAGS+= ${SENDMAIL_LDFLAGS} -sm_os.h: - ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h +sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} .include Modified: head/usr.sbin/makemap/Makefile ============================================================================== --- head/usr.sbin/makemap/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/usr.sbin/makemap/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -24,7 +24,7 @@ DPADD+=${SENDMAIL_DPADD} LDADD+=${SENDMAIL_LDADD} LDFLAGS+=${SENDMAIL_LDFLAGS} -sm_os.h: - ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h +sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} .include Modified: head/usr.sbin/praliases/Makefile ============================================================================== --- head/usr.sbin/praliases/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/usr.sbin/praliases/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -24,7 +24,7 @@ LDFLAGS+=${SENDMAIL_LDFLAGS} DPADD+= ${SENDMAIL_DPADD} LDADD+= ${SENDMAIL_LDADD} -sm_os.h: - ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h +sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} .include Modified: head/usr.sbin/sendmail/Makefile ============================================================================== --- head/usr.sbin/sendmail/Makefile Wed Nov 25 19:44:34 2015 (r291319) +++ head/usr.sbin/sendmail/Makefile Wed Nov 25 19:44:43 2015 (r291320) @@ -62,7 +62,7 @@ DPADD+=${SENDMAIL_DPADD} LDADD+=${SENDMAIL_LDADD} LDFLAGS+=${SENDMAIL_LDFLAGS} -sm_os.h: - ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h +sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA + ln -sf ${.ALLSRC} ${.TARGET} .include From owner-svn-src-all@freebsd.org Wed Nov 25 19:44:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B06FA377B7; Wed, 25 Nov 2015 19:44:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4A981D4D; Wed, 25 Nov 2015 19:44:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJiqW4004037; Wed, 25 Nov 2015 19:44:52 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJipBw004025; Wed, 25 Nov 2015 19:44:51 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251944.tAPJipBw004025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:44:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291321 - in head: lib/libdwarf lib/libelf lib/liblzma lib/libmd share/mk targets/pseudo/bootstrap-tools targets/pseudo/toolchain usr.bin/cxxfilt usr.bin/readelf usr.bin/xinstall X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:44:54 -0000 Author: bdrewery Date: Wed Nov 25 19:44:51 2015 New Revision: 291321 URL: https://svnweb.freebsd.org/changeset/base/291321 Log: META MODE: Fix 'make bootstrap-tools'. The main problem was bitrot after elftoolchain being swapped in for the GNU toolchain. This also reworks how the list of 'host allowed' libraries is determined to only allow INTERNALLIBs, which is needed for libelftc to come in. For usr.bin/readelf use the same hack, as libelf and libdward, to bring in the needed sys/ headers for host builds. This has not yet been a problem due to readelf not being built as a host tool in buildworld. This is possible in the meta build though when building the toolchain. Sponsored by: EMC / Isilon Storage Division Added: head/usr.bin/cxxfilt/Makefile.depend - copied, changed from r291320, head/lib/liblzma/Makefile.depend Modified: head/lib/libdwarf/Makefile head/lib/libelf/Makefile head/lib/liblzma/Makefile.depend head/lib/libmd/Makefile.depend.host head/share/mk/local.dirdeps.mk head/share/mk/local.gendirdeps.mk head/share/mk/src.libnames.mk head/targets/pseudo/bootstrap-tools/Makefile head/targets/pseudo/toolchain/Makefile.depend head/usr.bin/readelf/Makefile head/usr.bin/xinstall/Makefile.depend.host Modified: head/lib/libdwarf/Makefile ============================================================================== --- head/lib/libdwarf/Makefile Wed Nov 25 19:44:43 2015 (r291320) +++ head/lib/libdwarf/Makefile Wed Nov 25 19:44:51 2015 (r291321) @@ -76,7 +76,7 @@ SRCS= \ INCS= dwarf.h libdwarf.h -# +# This same hack is in lib/libelf/Makefile and usr.bin/readelf/Makefile # We need to link against the correct version of these files. One # solution is to include ../../sys in the include path. This causes # problems when a header file in sys depends on a file in another Modified: head/lib/libelf/Makefile ============================================================================== --- head/lib/libelf/Makefile Wed Nov 25 19:44:43 2015 (r291320) +++ head/lib/libelf/Makefile Wed Nov 25 19:44:51 2015 (r291321) @@ -65,7 +65,7 @@ SRCS= elf.c \ INCS= libelf.h gelf.h -# +# This same hack is in lib/libdwarf/Makefile and usr.bin/readelf/Makefile # We need to link against the correct version of these files. One # solution is to include ../../sys in the include path. This causes # problems when a header file in sys depends on a file in another Modified: head/lib/liblzma/Makefile.depend ============================================================================== --- head/lib/liblzma/Makefile.depend Wed Nov 25 19:44:43 2015 (r291320) +++ head/lib/liblzma/Makefile.depend Wed Nov 25 19:44:51 2015 (r291321) @@ -7,7 +7,6 @@ DIRDEPS = \ include \ include/xlocale \ lib/${CSU_DIR} \ - lib/clang/include.host \ lib/libc \ lib/libcompiler_rt \ lib/libthr \ Modified: head/lib/libmd/Makefile.depend.host ============================================================================== --- head/lib/libmd/Makefile.depend.host Wed Nov 25 19:44:43 2015 (r291320) +++ head/lib/libmd/Makefile.depend.host Wed Nov 25 19:44:51 2015 (r291321) @@ -2,9 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/usr.bin/binutils/ld \ - gnu/usr.bin/binutils/nm \ - usr.bin/xinstall \ .include Modified: head/share/mk/local.dirdeps.mk ============================================================================== --- head/share/mk/local.dirdeps.mk Wed Nov 25 19:44:43 2015 (r291320) +++ head/share/mk/local.dirdeps.mk Wed Nov 25 19:44:51 2015 (r291321) @@ -28,15 +28,20 @@ DIRDEPS_FILTER+= N*.host .for m in host common M_dep_qual_fixes += C;($m),[^/.,]*$$;\1; .endfor - #.info M_dep_qual_fixes=${M_dep_qual_fixes} -# we want to supress these dependencies for host tools -# but some libs are sadly needed. -_need_host_libs= \ - lib/libc++ \ - lib/libcxxrt \ - lib/libdwarf \ - lib/libmd \ + +# Cheat for including src.libnames.mk +____: +# Pull in _INTERNALLIBS +.include + +# Host libraries should mostly be excluded from the build so the +# host version in /usr/lib is used. Internal libraries need to be +# allowed to be built though since they are never installed. +_need_host_libs= +.for lib in ${_INTERNALLIBS} +_need_host_libs+= ${LIB${lib:tu}DIR:S,^${ROOTOBJDIR}/,,} +.endfor N_host_libs:= ${cd ${SRCTOP} && echo lib/lib*:L:sh:${_need_host_libs:${M_ListToSkip}}:${M_ListToSkip}} DIRDEPS_FILTER.host = \ Modified: head/share/mk/local.gendirdeps.mk ============================================================================== --- head/share/mk/local.gendirdeps.mk Wed Nov 25 19:44:43 2015 (r291320) +++ head/share/mk/local.gendirdeps.mk Wed Nov 25 19:44:51 2015 (r291321) @@ -14,6 +14,7 @@ GENDIRDEPS_FILTER+= \ Ntargets/pseudo/stage* \ Ntools/* +# Exclude toolchain which is handled special. .if ${RELDIR:Mtargets*} == "" .if ${RELDIR:Nusr.bin/clang/*:Ngnu/usr.bin/cc/*:Nlib/clang*} != "" GENDIRDEPS_FILTER.host+= \ @@ -22,7 +23,17 @@ GENDIRDEPS_FILTER.host+= \ .endif GENDIRDEPS_FILTER+= \ + Nlib/clang/include.host \ + Nusr.bin/addr2line.host \ + Nusr.bin/ar.host \ Nusr.bin/clang/clang.host \ + Nusr.bin/elfcopy.host \ + Nusr.bin/elfdump.host \ + Nusr.bin/nm.host \ + Nusr.bin/readelf.host \ + Nusr.bin/size.host \ + Nusr.bin/strings.host \ + Nusr.bin/strip.host \ Ngnu/usr.bin/cc* \ Ngnu/usr.bin/binutils*.host \ Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Wed Nov 25 19:44:43 2015 (r291320) +++ head/share/mk/src.libnames.mk Wed Nov 25 19:44:51 2015 (r291321) @@ -7,6 +7,9 @@ .error src.libnames.mk cannot be included directly. .endif +.if !target(____) +____: + .include .if ${.OBJDIR:S,${.CURDIR},,} != ${.OBJDIR} @@ -368,3 +371,4 @@ LIBBSNMPTOOLS?= ${LIBBSNMPTOOLSDIR}/libb LIBAMUDIR= ${ROOTOBJDIR}/usr.sbin/amd/libamu LIBAMU?= ${LIBAMUDIR}/libamu/libamu.a +.endif # !target(____) Modified: head/targets/pseudo/bootstrap-tools/Makefile ============================================================================== --- head/targets/pseudo/bootstrap-tools/Makefile Wed Nov 25 19:44:43 2015 (r291320) +++ head/targets/pseudo/bootstrap-tools/Makefile Wed Nov 25 19:44:51 2015 (r291321) @@ -62,7 +62,7 @@ cross-tools build-tools bootstrap-tools: touch $@ # MAKELEVEL=0 so that dirdeps.mk does its thing -# LEGACY_TOOLS lets us use the bootstaped stuff above +# LEGACY_TOOLS lets us use the bootstrapped stuff above # TARGET* is so that MK_CLANG gets set correctly. BSTCENV= \ MAKELEVEL=0 \ Modified: head/targets/pseudo/toolchain/Makefile.depend ============================================================================== --- head/targets/pseudo/toolchain/Makefile.depend Wed Nov 25 19:44:43 2015 (r291320) +++ head/targets/pseudo/toolchain/Makefile.depend Wed Nov 25 19:44:51 2015 (r291321) @@ -5,44 +5,26 @@ .if !defined(MK_CLANG) .include "${SRCTOP}/share/mk/src.opts.mk" .endif -DIRDEPS= -.if ${MK_TOOLCHAIN} == "yes" -DIRDEPS+= \ +DIRDEPS= \ + gnu/usr.bin/binutils/as \ + gnu/usr.bin/binutils/ld \ usr.bin/addr2line \ - usr.bin/cxxflit \ + usr.bin/ar \ + usr.bin/cxxfilt \ usr.bin/elfcopy \ + usr.bin/elfdump \ usr.bin/nm \ usr.bin/readelf \ usr.bin/size \ - usr.bin/strip \ usr.bin/strings \ - -.else -DIRDEPS+= \ - gnu/usr.bin/binutils/addr2line \ - gnu/usr.bin/binutils/nm \ - gnu/usr.bin/binutils/readelf \ - gnu/usr.bin/binutils/size \ - gnu/usr.bin/binutils/strip \ - gnu/usr.bin/binutils/strings \ - -.endif - -DIRDEPS+= \ + usr.bin/strip \ usr.bin/xinstall \ - gnu/usr.bin/binutils/ar \ - gnu/usr.bin/binutils/as \ - gnu/usr.bin/binutils/ld \ - gnu/usr.bin/binutils/objcopy \ - gnu/usr.bin/binutils/objdump \ - gnu/usr.bin/binutils/ranlib \ - -.if ${MK_CLANG} == "yes" +.if ${MK_CLANG_BOOTSTRAP} == "yes" DIRDEPS+= targets/pseudo/clang .endif -.if ${MK_GCC} == "yes" +.if ${MK_GCC_BOOTSTRAP} == "yes" DIRDEPS+= targets/pseudo/gcc .endif Copied and modified: head/usr.bin/cxxfilt/Makefile.depend (from r291320, head/lib/liblzma/Makefile.depend) ============================================================================== --- head/lib/liblzma/Makefile.depend Wed Nov 25 19:44:43 2015 (r291320, copy source) +++ head/usr.bin/cxxfilt/Makefile.depend Wed Nov 25 19:44:51 2015 (r291321) @@ -7,10 +7,10 @@ DIRDEPS = \ include \ include/xlocale \ lib/${CSU_DIR} \ - lib/clang/include.host \ lib/libc \ lib/libcompiler_rt \ - lib/libthr \ + lib/libelf \ + lib/libelftc \ .include Modified: head/usr.bin/readelf/Makefile ============================================================================== --- head/usr.bin/readelf/Makefile Wed Nov 25 19:44:43 2015 (r291320) +++ head/usr.bin/readelf/Makefile Wed Nov 25 19:44:51 2015 (r291321) @@ -6,9 +6,23 @@ READELFDIR= ${ELFTCDIR}/readelf .PATH: ${READELFDIR} PROG= readelf +SRCS= readelf.c LIBADD= dwarf elftc elf CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common +# This same hack is in lib/libelf/Makefile and lib/libdward/Makefile +# We need to link against the correct version of these files. One +# solution is to include ../../sys in the include path. This causes +# problems when a header file in sys depends on a file in another +# part of the tree, e.g. a machine dependent header. +# +SRCS+= sys/elf32.h sys/elf64.h sys/elf_common.h +CLEANDIRS= sys +CFLAGS+= -I. +sys/elf32.h sys/elf64.h sys/elf_common.h: ${SRCTOP}/sys/${.TARGET} .NOMETA + mkdir -p ${.OBJDIR}/sys + ln -sf ${.ALLSRC} ${.TARGET} + .include Modified: head/usr.bin/xinstall/Makefile.depend.host ============================================================================== --- head/usr.bin/xinstall/Makefile.depend.host Wed Nov 25 19:44:43 2015 (r291320) +++ head/usr.bin/xinstall/Makefile.depend.host Wed Nov 25 19:44:51 2015 (r291321) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/usr.bin/binutils/ld \ lib/libmd \ From owner-svn-src-all@freebsd.org Wed Nov 25 19:44:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BCBBA377E2; Wed, 25 Nov 2015 19:44:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3CAC1DF7; Wed, 25 Nov 2015 19:44:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJiuW4004082; Wed, 25 Nov 2015 19:44:56 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJiuug004081; Wed, 25 Nov 2015 19:44:56 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251944.tAPJiuug004081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:44:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291322 - in head: lib/libmd usr.bin/xinstall X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:44:57 -0000 Author: bdrewery Date: Wed Nov 25 19:44:55 2015 New Revision: 291322 URL: https://svnweb.freebsd.org/changeset/base/291322 Log: META MODE: Remove unneeded libmd.host dependency for xinstall.host. This is chasing r291026. Sponsored by: EMC / Isilon Storage Division Deleted: head/lib/libmd/Makefile.depend.host head/usr.bin/xinstall/Makefile.depend.host From owner-svn-src-all@freebsd.org Wed Nov 25 19:45:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D707EA3780B; Wed, 25 Nov 2015 19:45:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 146491E86; Wed, 25 Nov 2015 19:44:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJixWu004129; Wed, 25 Nov 2015 19:44:59 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJixaT004128; Wed, 25 Nov 2015 19:44:59 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251944.tAPJixaT004128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:44:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291323 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:45:00 -0000 Author: bdrewery Date: Wed Nov 25 19:44:58 2015 New Revision: 291323 URL: https://svnweb.freebsd.org/changeset/base/291323 Log: Stop looking up the same id(1) results in sub-makes. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Wed Nov 25 19:44:55 2015 (r291322) +++ head/share/mk/bsd.own.mk Wed Nov 25 19:44:58 2015 (r291323) @@ -133,12 +133,23 @@ CTFCONVERT_CMD= @: .endif .if ${MK_INSTALL_AS_USER} != "no" +.if !defined(_uid) _uid!= id -u +.export _uid +.endif .if ${_uid} != 0 .if !defined(USER) -USER!= id -un +# Avoid exporting USER +.if !defined(_USER) +_USER!= id -un +.export _USER +.endif +USER= ${_USER} .endif +.if !defined(_gid) _gid!= id -g +.export _gid +.endif .for x in BIN CONF DOC DTB INFO KMOD LIB MAN NLS SHARE $xOWN= ${USER} $xGRP= ${_gid} From owner-svn-src-all@freebsd.org Wed Nov 25 19:45:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45F87A37869; Wed, 25 Nov 2015 19:45:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09A871052; Wed, 25 Nov 2015 19:45:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJj55W004229; Wed, 25 Nov 2015 19:45:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJj5nX004228; Wed, 25 Nov 2015 19:45:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251945.tAPJj5nX004228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:45:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291325 - head/lib/libcrypt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:45:06 -0000 Author: bdrewery Date: Wed Nov 25 19:45:04 2015 New Revision: 291325 URL: https://svnweb.freebsd.org/changeset/base/291325 Log: META MODE: Avoid dirdep dependency on lib/libmd. This avoids using the staged headers for sys/crypto/sha2/*.h, such as sha256.h, which added an unneeded pre-build dependency on libmd to libcrypt. This header is an INCS in lib/libmd, but found via .PATH in sys/crypto/sha2. Since the libcrypt build was already using the in-src libmd headers directly, just teach it how to find the sha256.h header as well. Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libcrypt/Makefile Modified: head/lib/libcrypt/Makefile ============================================================================== --- head/lib/libcrypt/Makefile Wed Nov 25 19:45:01 2015 (r291324) +++ head/lib/libcrypt/Makefile Wed Nov 25 19:45:04 2015 (r291325) @@ -17,7 +17,8 @@ SRCS= crypt.c misc.c \ crypt-sha512.c sha512c.c MAN= crypt.3 MLINKS= crypt.3 crypt_get_format.3 crypt.3 crypt_set_format.3 -CFLAGS+= -I${.CURDIR}/../libmd -I${.CURDIR}/../libutil +CFLAGS+= -I${.CURDIR}/../libmd -I${.CURDIR}/../libutil \ + -I${.CURDIR}/../../sys/crypto/sha2 # Pull in the strong crypto, if it is present. .if exists(${.CURDIR}/../../secure/lib/libcrypt) && ${MK_CRYPT} != "no" From owner-svn-src-all@freebsd.org Wed Nov 25 19:45:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5925DA37833; Wed, 25 Nov 2015 19:45:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E97061F7B; Wed, 25 Nov 2015 19:45:02 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJj2S2004182; Wed, 25 Nov 2015 19:45:02 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJj2fR004181; Wed, 25 Nov 2015 19:45:02 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251945.tAPJj2fR004181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:45:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291324 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:45:03 -0000 Author: bdrewery Date: Wed Nov 25 19:45:01 2015 New Revision: 291324 URL: https://svnweb.freebsd.org/changeset/base/291324 Log: META MODE: Fix MACHINE=host builds. We need to not use -nostdinc since it breaks building of clang itself. Use -isystem rather than -I/usr/include and -nostdinc which gets us using the stage include directory before searching the real host headers. This allows removing more of the -I hacks to get host headers since the headers are no longer excluded. The -B seemed unneeded. This fixes building of secure/lib/libcrypto which was looking at the /usr/include/openssl/asn1.h header rather than the staged one. This fixes building of clang which wants to find its own internal headers in the STAGEDIR/usr/lib/clang/* path. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/local.init.mk Modified: head/share/mk/local.init.mk ============================================================================== --- head/share/mk/local.init.mk Wed Nov 25 19:44:58 2015 (r291323) +++ head/share/mk/local.init.mk Wed Nov 25 19:45:01 2015 (r291324) @@ -9,21 +9,20 @@ .endif .endif +# XXX: This should be combined with external compiler support in Makefile.inc1 +# and local.meta.sys.mk (CROSS_TARGET_FLAGS) .if ${MK_SYSROOT} == "yes" && !empty(SYSROOT) && ${MACHINE} != "host" CFLAGS_LAST+= --sysroot=${SYSROOT} CXXFLAGS_LAST+= --sysroot=${SYSROOT} LDADD+= --sysroot=${SYSROOT} .elif ${MK_STAGING} == "yes" -CFLAGS+= -nostdinc -CFLAGS+= -I${STAGE_INCLUDEDIR} +CFLAGS+= -isystem ${STAGE_INCLUDEDIR} +# XXX: May be needed for GCC to build with libc++ rather than libstdc++. See Makefile.inc1 +#CXXFLAGS+= -std=gnu++11 +#LDADD+= -L${STAGE_LIBDIR}/libc++ +#CXXFLAGS+= -I${STAGE_INCLUDEDIR}/usr/include/c++/v1 LDADD+= -L${STAGE_LIBDIR} .endif -.if ${MACHINE} == "host" -# we cheat? -LDADD+= -B/usr/lib -CFLAGS_LAST+= -I/usr/include -CXXFLAGS_LAST+= -I/usr/include -.endif .if ${MACHINE} == "host" .if ${.MAKE.DEPENDFILE:E} != "host" From owner-svn-src-all@freebsd.org Wed Nov 25 19:48:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3A5BA379DA; Wed, 25 Nov 2015 19:48:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B07A91821; Wed, 25 Nov 2015 19:48:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJm90x004358; Wed, 25 Nov 2015 19:48:09 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJm9NS004357; Wed, 25 Nov 2015 19:48:09 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251948.tAPJm9NS004357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:48:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291326 - head/usr.bin/readelf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:48:11 -0000 Author: bdrewery Date: Wed Nov 25 19:48:09 2015 New Revision: 291326 URL: https://svnweb.freebsd.org/changeset/base/291326 Log: Fix spelling error. Modified: head/usr.bin/readelf/Makefile Modified: head/usr.bin/readelf/Makefile ============================================================================== --- head/usr.bin/readelf/Makefile Wed Nov 25 19:45:04 2015 (r291325) +++ head/usr.bin/readelf/Makefile Wed Nov 25 19:48:09 2015 (r291326) @@ -12,7 +12,7 @@ LIBADD= dwarf elftc elf CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common -# This same hack is in lib/libelf/Makefile and lib/libdward/Makefile +# This same hack is in lib/libelf/Makefile and lib/libdwarf/Makefile # We need to link against the correct version of these files. One # solution is to include ../../sys in the include path. This causes # problems when a header file in sys depends on a file in another From owner-svn-src-all@freebsd.org Wed Nov 25 19:49:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF76BA37A8E; Wed, 25 Nov 2015 19:49:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A0131A63; Wed, 25 Nov 2015 19:49:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPJntSL004447; Wed, 25 Nov 2015 19:49:55 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPJnthb004445; Wed, 25 Nov 2015 19:49:55 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511251949.tAPJnthb004445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 19:49:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291327 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 19:49:56 -0000 Author: bdrewery Date: Wed Nov 25 19:49:55 2015 New Revision: 291327 URL: https://svnweb.freebsd.org/changeset/base/291327 Log: Define a LIBDIR for every library that LIBADD provides. This is going to be used to allow DIRDEPS to be bootstrapped off of LIBADD/DPADD. It currently works for internal libraries which have a DIR defined for them but also use the .a library from a src-mapped obj directory. It can also be useful for using -L without a --sysroot per LIBADD to use the OBJDIR version of the libraries. I didn't review every LIBADD, so it is possible this is missing some. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.libnames.mk head/share/mk/src.libnames.mk Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Wed Nov 25 19:48:09 2015 (r291326) +++ head/share/mk/bsd.libnames.mk Wed Nov 25 19:49:55 2015 (r291327) @@ -10,6 +10,8 @@ .sinclude +# Src directory locations are also defined in src.libnames.mk. + LIBCRT0?= ${DESTDIR}${LIBDIR}/crt0.o LIBALIAS?= ${DESTDIR}${LIBDIR}/libalias.a Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Wed Nov 25 19:48:09 2015 (r291326) +++ head/share/mk/src.libnames.mk Wed Nov 25 19:49:55 2015 (r291327) @@ -371,4 +371,67 @@ LIBBSNMPTOOLS?= ${LIBBSNMPTOOLSDIR}/libb LIBAMUDIR= ${ROOTOBJDIR}/usr.sbin/amd/libamu LIBAMU?= ${LIBAMUDIR}/libamu/libamu.a +# Define a directory for each library. This is useful for adding -L in when +# not using a --sysroot or for meta mode bootstrapping when there is no +# Makefile.depend. These are sorted by directory. +LIBAVLDIR= ${ROOTOBJDIR}/cddl/lib/libavl +LIBCTFDIR= ${ROOTOBJDIR}/cddl/lib/libctf +LIBDTRACEDIR= ${ROOTOBJDIR}/cddl/lib/libdtrace +LIBNVPAIRDIR= ${ROOTOBJDIR}/cddl/lib/libnvpair +LIBUMEMDIR= ${ROOTOBJDIR}/cddl/lib/libumem +LIBUUTILDIR= ${ROOTOBJDIR}/cddl/lib/libuutil +LIBZFSDIR= ${ROOTOBJDIR}/cddl/lib/libzfs +LIBZFS_COREDIR= ${ROOTOBJDIR}/cddl/lib/libzfs_core +LIBZPOOLDIR= ${ROOTOBJDIR}/cddl/lib/libzpool +LIBDIALOGDIR= ${ROOTOBJDIR}/gnu/lib/libdialog +LIBGCOVDIR= ${ROOTOBJDIR}/gnu/lib/libgcov +LIBGOMPDIR= ${ROOTOBJDIR}/gnu/lib/libgomp +LIBGNUREGEXDIR= ${ROOTOBJDIR}/gnu/lib/libregex +LIBSSPDIR= ${ROOTOBJDIR}/gnu/lib/libssp +LIBSSP_NONSHAREDDIR= ${ROOTOBJDIR}/gnu/lib/libssp/libssp_nonshared +LIBSUPCPLUSPLUSDIR= ${ROOTOBJDIR}/gnu/lib/libsupc++ +LIBASN1DIR= ${ROOTOBJDIR}/kerberos5/lib/libasn1 +LIBGSSAPI_KRB5DIR= ${ROOTOBJDIR}/kerberos5/lib/libgssapi_krb5 +LIBGSSAPI_NTLMDIR= ${ROOTOBJDIR}/kerberos5/lib/libgssapi_ntlm +LIBGSSAPI_SPNEGODIR= ${ROOTOBJDIR}/kerberos5/lib/libgssapi_spnego +LIBHDBDIR= ${ROOTOBJDIR}/kerberos5/lib/libhdb +LIBHEIMBASEDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimbase +LIBHEIMIPCCDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimipcc +LIBHEIMIPCSDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimipcs +LIBHEIMNTLMDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimntlm +LIBHX509DIR= ${ROOTOBJDIR}/kerberos5/lib/libhx509 +LIBKADM5CLNTDIR= ${ROOTOBJDIR}/kerberos5/lib/libkadm5clnt +LIBKADM5SRVDIR= ${ROOTOBJDIR}/kerberos5/lib/libkadm5srv +LIBKAFS5DIR= ${ROOTOBJDIR}/kerberos5/lib/libkafs5 +LIBKDCDIR= ${ROOTOBJDIR}/kerberos5/lib/libkdc +LIBKRB5DIR= ${ROOTOBJDIR}/kerberos5/lib/libkrb5 +LIBROKENDIR= ${ROOTOBJDIR}/kerberos5/lib/libroken +LIBWINDDIR= ${ROOTOBJDIR}/kerberos5/lib/libwind +LIBALIASDIR= ${ROOTOBJDIR}/lib/libalias/libalias +LIBBLOCKSRUNTIMEDIR= ${ROOTOBJDIR}/lib/libblocksruntime +LIBBSNMPDIR= ${ROOTOBJDIR}/lib/libbsnmp/libbsnmp +LIBBSDXMLDIR= ${ROOTOBJDIR}/lib/libexpat +LIBKVMDIR= ${ROOTOBJDIR}/lib/libkvm +LIBPTHREADDIR= ${ROOTOBJDIR}/lib/libthr +LIBMDIR= ${ROOTOBJDIR}/lib/msun +LIBFORMDIR= ${ROOTOBJDIR}/lib/ncurses/form +LIBFORMLIBWDIR= ${ROOTOBJDIR}/lib/ncurses/formw +LIBMENUDIR= ${ROOTOBJDIR}/lib/ncurses/menu +LIBMENULIBWDIR= ${ROOTOBJDIR}/lib/ncurses/menuw +LIBTERMCAPDIR= ${ROOTOBJDIR}/lib/ncurses/ncurses +LIBTERMCAPWDIR= ${ROOTOBJDIR}/lib/ncurses/ncursesw +LIBPANELDIR= ${ROOTOBJDIR}/lib/ncurses/panel +LIBPANELWDIR= ${ROOTOBJDIR}/lib/ncurses/panelw +LIBCRYPTODIR= ${ROOTOBJDIR}/secure/lib/libcrypto +LIBSSHDIR= ${ROOTOBJDIR}/secure/lib/libssh +LIBSSLDIR= ${ROOTOBJDIR}/secure/lib/libssl +LIBTEKENDIR= ${ROOTOBJDIR}/sys/teken/libteken +LIBEGACYDIR= ${ROOTOBJDIR}/tools/build +LIBLNDIR= ${ROOTOBJDIR}/usr.bin/lex/lib + +# Default other library directories to lib/libNAME. +.for lib in ${_LIBRARIES} +LIB${lib:tu}DIR?= ${ROOTOBJDIR}/lib/lib${lib} +.endfor + .endif # !target(____) From owner-svn-src-all@freebsd.org Wed Nov 25 20:01:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6ED5FA37D84; Wed, 25 Nov 2015 20:01:13 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 198C51009; Wed, 25 Nov 2015 20:01:13 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPK1Cod007432; Wed, 25 Nov 2015 20:01:12 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPK1CGa007431; Wed, 25 Nov 2015 20:01:12 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201511252001.tAPK1CGa007431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Wed, 25 Nov 2015 20:01:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291328 - head/usr.sbin/syslogd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 20:01:13 -0000 Author: lidl Date: Wed Nov 25 20:01:11 2015 New Revision: 291328 URL: https://svnweb.freebsd.org/changeset/base/291328 Log: Have syslogd honor 'mesg' status when logging to users. PR: bin/196742 Submitted by: jef at mail acme com Approved by: rpaulo (mentor) Differential Revision: https://reviews.freebsd.org/D4270 Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Wed Nov 25 19:49:55 2015 (r291327) +++ head/usr.sbin/syslogd/syslogd.c Wed Nov 25 20:01:11 2015 (r291328) @@ -341,6 +341,7 @@ static void printsys(char *); static int p_open(const char *, pid_t *); static void readklog(void); static void reapchild(int); +static const char *ttymsg_check(struct iovec *, int, char *, int); static void usage(void); static int validate(struct sockaddr *, const char *); static void unmapped(struct sockaddr *); @@ -1425,7 +1426,7 @@ wallmsg(struct filed *f, struct iovec *i if (!f->f_un.f_uname[i][0]) break; if (!strcmp(f->f_un.f_uname[i], ut->ut_user)) { - if ((p = ttymsg(iov, iovlen, ut->ut_line, + if ((p = ttymsg_check(iov, iovlen, ut->ut_line, TTYMSGTIME)) != NULL) { errno = 0; /* already in msg */ logerror(p); @@ -1438,6 +1439,29 @@ wallmsg(struct filed *f, struct iovec *i reenter = 0; } +/* + * Wrapper routine for ttymsg() that checks the terminal for messages enabled. + */ +static const char * +ttymsg_check(struct iovec *iov, int iovcnt, char *line, int tmout) +{ + static char device[1024]; + static char errbuf[1024]; + struct stat sb; + + (void) snprintf(device, sizeof(device), "%s%s", _PATH_DEV, line); + + if (stat(device, &sb) < 0) { + (void) snprintf(errbuf, sizeof(errbuf), + "%s: %s", device, strerror(errno)); + return (errbuf); + } + if ((sb.st_mode & S_IWGRP) == 0) + /* Messages disabled. */ + return (NULL); + return ttymsg(iov, iovcnt, line, tmout); +} + static void reapchild(int signo __unused) { From owner-svn-src-all@freebsd.org Wed Nov 25 20:28:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 185B5A37111; Wed, 25 Nov 2015 20:28:26 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id F02A81CAC; Wed, 25 Nov 2015 20:28:25 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id E9FB8152E; Wed, 25 Nov 2015 20:28:25 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 9FC3317C21; Wed, 25 Nov 2015 20:28:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id 4Ajho8mx_I6X; Wed, 25 Nov 2015 20:28:23 +0000 (UTC) Subject: Re: svn commit: r291299 - head/sys/net DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com C89FF17C17 To: "Andrey V. Elsukov" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201511251131.tAPBV7Hc058834@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <565619E9.8010206@FreeBSD.org> Date: Wed, 25 Nov 2015 12:28:25 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201511251131.tAPBV7Hc058834@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hAnTU1qBSvNords2GOufgNKGHk13ClJh9" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 20:28:26 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hAnTU1qBSvNords2GOufgNKGHk13ClJh9 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/25/2015 3:31 AM, Andrey V. Elsukov wrote: > Author: ae > Date: Wed Nov 25 11:31:07 2015 > New Revision: 291299 > URL: https://svnweb.freebsd.org/changeset/base/291299 >=20 > Log: > Fix the build. >=20 > Modified: > head/sys/net/if_enc.c >=20 > Modified: head/sys/net/if_enc.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/net/if_enc.c Wed Nov 25 11:20:54 2015 (r291298) > +++ head/sys/net/if_enc.c Wed Nov 25 11:31:07 2015 (r291299) > @@ -30,7 +30,6 @@ > =20 > #include "opt_inet.h" > #include "opt_inet6.h" > -#include "opt_enc.h" > =20 > #include > #include >=20 Still broken. /builds/FreeBSD_HEAD/sys/net/if_enc.c:104:43: error: use of undeclared identifier 'IPSEC_ENC_BEFORE' static VNET_DEFINE(int, filter_mask_in) =3D IPSEC_ENC_BEFORE; ^ and more --=20 Regards, Bryan Drewery --hAnTU1qBSvNords2GOufgNKGHk13ClJh9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWVhnpAAoJEDXXcbtuRpfPOocH/ivtRleXCTHYGAHUQUD5r4Rl vJZWoBdiEeNRgNxvbYa2Eb4dA5MhXb7YGzee4Ot9OkXSFiWmTh9QxRVlZUaRRrbM 5udgG6ly7084MzbzoYaZzTzRBuffb+1miMJr9y5uOR4ONZug5Q5p6zfiyt7CoAf9 wQgzr2lmMNW9U1zwptePu5HO05Xp/NXrfVv3p37rF/LozRcwPanmO0lovB1vNx3i SkFQWjkZodgFYqjUzBGDu9xMKUjshaAhVcJ7isCUAlbL8HJ61/7na2a4oWtqpbfO u5vOuB+3WTlibmd8xPpuMnMZ5NwuSFeSV5ww7XbNTj1hr3jr7bmxJmj39UrN/1E= =3BRD -----END PGP SIGNATURE----- --hAnTU1qBSvNords2GOufgNKGHk13ClJh9-- From owner-svn-src-all@freebsd.org Wed Nov 25 20:38:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98A01A374AC; Wed, 25 Nov 2015 20:38:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 452511568; Wed, 25 Nov 2015 20:38:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPKc8lc018941; Wed, 25 Nov 2015 20:38:08 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPKc7ec018931; Wed, 25 Nov 2015 20:38:07 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511252038.tAPKc7ec018931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 20:38:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291329 - in head: lib/clang lib/libarchive/tests sbin/ipf/ipf sbin/ipf/ipftest sbin/ipf/ipmon sbin/ipf/ipnat sbin/ipf/ippool usr.bin/cpio/tests usr.bin/tar/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 20:38:09 -0000 Author: bdrewery Date: Wed Nov 25 20:38:07 2015 New Revision: 291329 URL: https://svnweb.freebsd.org/changeset/base/291329 Log: Remove redundant DPSRCS which were already in SRCS. DPSRCS already contains all of SRCS. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/lib/clang/clang.build.mk head/lib/libarchive/tests/Makefile head/sbin/ipf/ipf/Makefile head/sbin/ipf/ipftest/Makefile head/sbin/ipf/ipmon/Makefile head/sbin/ipf/ipnat/Makefile head/sbin/ipf/ippool/Makefile head/usr.bin/cpio/tests/Makefile head/usr.bin/tar/tests/Makefile Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Wed Nov 25 20:01:11 2015 (r291328) +++ head/lib/clang/clang.build.mk Wed Nov 25 20:38:07 2015 (r291329) @@ -256,7 +256,6 @@ Checkers.inc.h: ${CLANG_SRCS}/lib/Static .endif SRCS+= ${TGHDRS:C/$/.inc.h/} -DPSRCS+= ${TGHDRS:C/$/.inc.h/} CLEANFILES+= ${TGHDRS:C/$/.inc.h/} ${TGHDRS:C/$/.inc.d/} # if we are not doing explicit 'make depend', there is Modified: head/lib/libarchive/tests/Makefile ============================================================================== --- head/lib/libarchive/tests/Makefile Wed Nov 25 20:01:11 2015 (r291328) +++ head/lib/libarchive/tests/Makefile Wed Nov 25 20:38:07 2015 (r291329) @@ -244,9 +244,7 @@ BROKEN_TESTS+= test_fuzz_rar SRCS.libarchive_test= \ ${TESTS_SRCS} \ main.c \ - read_open_memory.c - -DPSRCS.libarchive_test= \ + read_open_memory.c \ list.h LIBADD.libarchive_test= archive Modified: head/sbin/ipf/ipf/Makefile ============================================================================== --- head/sbin/ipf/ipf/Makefile Wed Nov 25 20:01:11 2015 (r291328) +++ head/sbin/ipf/ipf/Makefile Wed Nov 25 20:38:07 2015 (r291329) @@ -7,8 +7,6 @@ MLINKS= ipf.5 ipf.conf.5 ipf.5 ipf6.con CFLAGS+= -I. -DIPFILTER_BPF -DHAS_SYS_MD5_H GENHDRS= ipf_l.h ipf_y.h -DPSRCS+= ${GENHDRS} - CLEANFILES+= ${GENHDRS} ipf_y.c ipf_l.c ipf_y.c: ipf_y.y Modified: head/sbin/ipf/ipftest/Makefile ============================================================================== --- head/sbin/ipf/ipftest/Makefile Wed Nov 25 20:01:11 2015 (r291328) +++ head/sbin/ipf/ipftest/Makefile Wed Nov 25 20:38:07 2015 (r291329) @@ -22,7 +22,6 @@ CFLAGS+= -DIPFILTER_LOG -DIPFILTER_COMPI .PATH: ${.CURDIR}/../../../sys/contrib/ipfilter/netinet GENHDRS= ipnat_l.h ipnat_y.h ippool_l.h ippool_y.h ipf_l.h ipf_y.h -DPSRCS+= ${GENHDRS} CLEANFILES+= ${GENHDRS} CLEANFILES+= ipf_y.c ipf_l.c Modified: head/sbin/ipf/ipmon/Makefile ============================================================================== --- head/sbin/ipf/ipmon/Makefile Wed Nov 25 20:01:11 2015 (r291328) +++ head/sbin/ipf/ipmon/Makefile Wed Nov 25 20:38:07 2015 (r291329) @@ -7,8 +7,6 @@ MAN= ipmon.8 CFLAGS+= -DLOGFAC=LOG_LOCAL0 -I. GENHDRS+= ipmon_l.h ipmon_y.h -DPSRCS+= ${GENHDRS} - CLEANFILES+= ${GENHDRS} ipmon_y.c ipmon_l.c ipmon_y.c: ipmon_y.y Modified: head/sbin/ipf/ipnat/Makefile ============================================================================== --- head/sbin/ipf/ipnat/Makefile Wed Nov 25 20:01:11 2015 (r291328) +++ head/sbin/ipf/ipnat/Makefile Wed Nov 25 20:38:07 2015 (r291329) @@ -7,8 +7,6 @@ MLINKS= ipnat.5 ipnat.conf.5 CFLAGS+= -I. GENHDRS= ipnat_l.h ipnat_y.h -DPSRCS+= ${GENHDRS} - CLEANFILES+= ${GENHDRS} ipnat_y.c ipnat_l.c ipnat_y.c: ipnat_y.y Modified: head/sbin/ipf/ippool/Makefile ============================================================================== --- head/sbin/ipf/ippool/Makefile Wed Nov 25 20:01:11 2015 (r291328) +++ head/sbin/ipf/ippool/Makefile Wed Nov 25 20:38:07 2015 (r291329) @@ -6,8 +6,6 @@ MAN= ippool.5 ippool.8 CFLAGS+= -I. GENHDRS= ippool_l.h ippool_y.h -DPSRCS+= ${GENHDRS} - CLEANFILES+= ${GENHDRS} ippool_y.c ippool_l.c ippool_y.c: ippool_y.y Modified: head/usr.bin/cpio/tests/Makefile ============================================================================== --- head/usr.bin/cpio/tests/Makefile Wed Nov 25 20:01:11 2015 (r291328) +++ head/usr.bin/cpio/tests/Makefile Wed Nov 25 20:38:07 2015 (r291329) @@ -75,9 +75,6 @@ SRCS.bsdcpio_test= list.h \ ${TESTS_SRCS} \ main.c -DPSRCS.bsdcpio_test= \ - list.h - .PATH: ${LIBARCHIVEDIR}/test_utils SRCS.bsdcpio_test+= test_utils.c Modified: head/usr.bin/tar/tests/Makefile ============================================================================== --- head/usr.bin/tar/tests/Makefile Wed Nov 25 20:01:11 2015 (r291328) +++ head/usr.bin/tar/tests/Makefile Wed Nov 25 20:38:07 2015 (r291329) @@ -75,8 +75,6 @@ SRCS.bsdtar_test= \ list.h \ main.c -DPSRCS.bsdtar_test+= list.h - .PATH: ${LIBARCHIVEDIR}/test_utils SRCS.bsdtar_test+= test_utils.c From owner-svn-src-all@freebsd.org Wed Nov 25 20:38:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD25BA374F4; Wed, 25 Nov 2015 20:38:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F35217E5; Wed, 25 Nov 2015 20:38:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPKcHfU018994; Wed, 25 Nov 2015 20:38:17 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPKcHQZ018989; Wed, 25 Nov 2015 20:38:17 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511252038.tAPKcHQZ018989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 20:38:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291330 - in head: gnu/lib/libreadline/readline lib/libc/tests/rpc usr.bin/kdump usr.bin/netstat usr.bin/svn/svn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 20:38:18 -0000 Author: bdrewery Date: Wed Nov 25 20:38:17 2015 New Revision: 291330 URL: https://svnweb.freebsd.org/changeset/base/291330 Log: Replace DPSRCS that work fine in SRCS. This is so that 'make depend' is not a required build step in these files. DPSRCS is overall unneeded. DPSRCS already contains SRCS, so anything which can safely be in SRCS should be. DPSRCS is mostly just a way to generate files that should not be linked into the final PROG/LIB. For headers and grammars it is safe for them to be in SRCS since they will be excluded during linking and installation. The only remaining uses of DPSRCS are for generating .c or .o files that must be built before 'make depend' can run 'mkdep' on the SRCS c files list. A semi-proper example is in tests/sys/kern/acct/Makefile where a checked-in .c file has an #include on a generated .c file. The generated .c file should not be linked into the final PROG though since it is #include'd. The more proper way here is just to build/link it in though without DPSRCS. Another example is in sys/modules/linux/Makefile where a shell script runs to parse a DPSRCS .o file that should not be linked into the module. Beyond those, the need for DPSRCS is largely unneeded, redundant, and forces 'make depend' to be ran. Generally, these Makefiles should avoid the need for DPSRCS and define proper dependencies for their files as well. An example of an improper usage and why this matters is in usr.bin/netstat. nl_defs.h was only in DPSRCS and so was not generated during 'make all', but only during 'make depend'. The files including it lacked proper depenencies on it, which forced running 'make depend' to workaround that bug. The 'make depend' target should mostly be used for incremental build help, not to produce a working build. This specific example was broken in the meta build until r287905 since it does not run 'make depend'. The gnu/lib/libreadline/readline case is fine since bsd.lib.mk has 'OBJS: SRCS:M*.h' when there is no .depend file. Sponsored by: EMC / Isilon Storage Division MFC after: 1 week Modified: head/gnu/lib/libreadline/readline/Makefile head/lib/libc/tests/rpc/Makefile head/usr.bin/kdump/Makefile head/usr.bin/netstat/Makefile head/usr.bin/svn/svn/Makefile Modified: head/gnu/lib/libreadline/readline/Makefile ============================================================================== --- head/gnu/lib/libreadline/readline/Makefile Wed Nov 25 20:38:07 2015 (r291329) +++ head/gnu/lib/libreadline/readline/Makefile Wed Nov 25 20:38:17 2015 (r291330) @@ -16,9 +16,8 @@ INSTALLED_HEADERS= readline.h chardefs.h CFLAGS+= -I${.OBJDIR}/.. SRCDIR= ${.CURDIR}/../../../../contrib/libreadline -beforebuild: ${INSTALLED_HEADERS} CLEANFILES+= ${INSTALLED_HEADERS} -DPSRCS+= ${INSTALLED_HEADERS} +SRCS+= ${INSTALLED_HEADERS} .for _h in ${INSTALLED_HEADERS} ${_h}: ${SRCDIR}/${_h} .NOMETA Modified: head/lib/libc/tests/rpc/Makefile ============================================================================== --- head/lib/libc/tests/rpc/Makefile Wed Nov 25 20:38:07 2015 (r291329) +++ head/lib/libc/tests/rpc/Makefile Wed Nov 25 20:38:17 2015 (r291330) @@ -16,7 +16,7 @@ h_testbits_xdr.c: ${RPCSRC} h_testbits.h CLEANFILES+= ${RPCSRC:.x=.h} ${RPCSRC:.x=.c} h_testbits_xdr.c CFLAGS+= -I${.OBJDIR} -DPSRCS+= h_testbits.h +SRCS+= h_testbits.h LDADD+= -lrpcsvc -lutil DPADD+= ${LIBRPCSVC} ${LIBUTIL} Modified: head/usr.bin/kdump/Makefile ============================================================================== --- head/usr.bin/kdump/Makefile Wed Nov 25 20:38:07 2015 (r291329) +++ head/usr.bin/kdump/Makefile Wed Nov 25 20:38:17 2015 (r291330) @@ -6,8 +6,7 @@ .PATH: ${.CURDIR}/../ktrace PROG= kdump -SRCS= kdump_subr.c kdump.c ioctl.c subr.c utrace.c -DPSRCS= kdump_subr.h +SRCS= kdump_subr.c kdump_subr.h kdump.c ioctl.c subr.c utrace.c CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. -I. .if ${MK_CASPER} != "no" Modified: head/usr.bin/netstat/Makefile ============================================================================== --- head/usr.bin/netstat/Makefile Wed Nov 25 20:38:07 2015 (r291329) +++ head/usr.bin/netstat/Makefile Wed Nov 25 20:38:17 2015 (r291330) @@ -6,8 +6,7 @@ PROG= netstat SRCS= if.c inet.c main.c mbuf.c mroute.c netisr.c nl_symbols.c route.c \ unix.c mroute6.c ipsec.c bpf.c pfkey.c sctp.c \ - flowtable.c -DPSRCS= nl_defs.h + flowtable.c nl_defs.h nl_symbols.c: nlist_symbols awk '\ Modified: head/usr.bin/svn/svn/Makefile ============================================================================== --- head/usr.bin/svn/svn/Makefile Wed Nov 25 20:38:07 2015 (r291329) +++ head/usr.bin/svn/svn/Makefile Wed Nov 25 20:38:17 2015 (r291330) @@ -52,7 +52,7 @@ DPADD= ${LIBSVN_CLIENT} ${LIBSVN_WC} ${L CLEANFILES+= svnlite.1 .if(defined(ORGANIZATION) && !empty(ORGANIZATION)) -DPSRCS+= freebsd-organization.h +SRCS+= freebsd-organization.h CLEANFILES+= freebsd-organization.h CFLAGS+= -I. -DHAS_ORGANIZATION_NAME freebsd-organization.h: From owner-svn-src-all@freebsd.org Wed Nov 25 20:38:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC73CA3750F; Wed, 25 Nov 2015 20:38:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9738180F; Wed, 25 Nov 2015 20:38:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPKcKfx019039; Wed, 25 Nov 2015 20:38:20 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPKcK24019038; Wed, 25 Nov 2015 20:38:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511252038.tAPKcK24019038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 20:38:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291331 - head/tests/sys/kern/acct X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 20:38:22 -0000 Author: bdrewery Date: Wed Nov 25 20:38:20 2015 New Revision: 291331 URL: https://svnweb.freebsd.org/changeset/base/291331 Log: Avoid requiring 'make depend' here. Really this should not be a DPSRCS. The acct_test.c should not #include convert.c, but just link it in as a normal SRCS. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tests/sys/kern/acct/Makefile Modified: head/tests/sys/kern/acct/Makefile ============================================================================== --- head/tests/sys/kern/acct/Makefile Wed Nov 25 20:38:17 2015 (r291330) +++ head/tests/sys/kern/acct/Makefile Wed Nov 25 20:38:20 2015 (r291331) @@ -9,6 +9,7 @@ CFLAGS+= -I${.OBJDIR} CLEANFILES+= convert.c convert.c.tmp DPSRCS.acct_test= convert.c +acct_test.o: convert.c convert.c: ${SRCTOP}/sys/kern/kern_acct.c sed -n -e 's/log(/syslog(/g' \ From owner-svn-src-all@freebsd.org Wed Nov 25 20:43:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C024FA3776D; Wed, 25 Nov 2015 20:43:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 884F41E69; Wed, 25 Nov 2015 20:43:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPKhsmk022151; Wed, 25 Nov 2015 20:43:54 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPKhkj6022065; Wed, 25 Nov 2015 20:43:46 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511252043.tAPKhkj6022065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 20:43:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291332 - in head/cddl/usr.sbin/dtrace/tests: . common/aggs common/arithmetic common/arrays common/assocs common/begin common/bitfields common/buffering common/builtinvar common/cg comm... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 20:43:55 -0000 Author: bdrewery Date: Wed Nov 25 20:43:45 2015 New Revision: 291332 URL: https://svnweb.freebsd.org/changeset/base/291332 Log: Rename Makefile.inc1 to dtrace.test.mk to avoid clash with top-level Makefile.inc1. Discussed with: ngie, markj Sponsored by: EMC / Isilon Storage Division Added: head/cddl/usr.sbin/dtrace/tests/dtrace.test.mk - copied, changed from r291331, head/cddl/usr.sbin/dtrace/tests/Makefile.inc1 Deleted: head/cddl/usr.sbin/dtrace/tests/Makefile.inc1 Modified: head/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile head/cddl/usr.sbin/dtrace/tests/common/arithmetic/Makefile head/cddl/usr.sbin/dtrace/tests/common/arrays/Makefile head/cddl/usr.sbin/dtrace/tests/common/assocs/Makefile head/cddl/usr.sbin/dtrace/tests/common/begin/Makefile head/cddl/usr.sbin/dtrace/tests/common/bitfields/Makefile head/cddl/usr.sbin/dtrace/tests/common/buffering/Makefile head/cddl/usr.sbin/dtrace/tests/common/builtinvar/Makefile head/cddl/usr.sbin/dtrace/tests/common/cg/Makefile head/cddl/usr.sbin/dtrace/tests/common/clauses/Makefile head/cddl/usr.sbin/dtrace/tests/common/cpc/Makefile head/cddl/usr.sbin/dtrace/tests/common/decls/Makefile head/cddl/usr.sbin/dtrace/tests/common/docsExamples/Makefile head/cddl/usr.sbin/dtrace/tests/common/drops/Makefile head/cddl/usr.sbin/dtrace/tests/common/dtraceUtil/Makefile head/cddl/usr.sbin/dtrace/tests/common/end/Makefile head/cddl/usr.sbin/dtrace/tests/common/enum/Makefile head/cddl/usr.sbin/dtrace/tests/common/error/Makefile head/cddl/usr.sbin/dtrace/tests/common/exit/Makefile head/cddl/usr.sbin/dtrace/tests/common/fbtprovider/Makefile head/cddl/usr.sbin/dtrace/tests/common/funcs/Makefile head/cddl/usr.sbin/dtrace/tests/common/grammar/Makefile head/cddl/usr.sbin/dtrace/tests/common/include/Makefile head/cddl/usr.sbin/dtrace/tests/common/inline/Makefile head/cddl/usr.sbin/dtrace/tests/common/io/Makefile head/cddl/usr.sbin/dtrace/tests/common/ip/Makefile head/cddl/usr.sbin/dtrace/tests/common/java_api/Makefile head/cddl/usr.sbin/dtrace/tests/common/json/Makefile head/cddl/usr.sbin/dtrace/tests/common/lexer/Makefile head/cddl/usr.sbin/dtrace/tests/common/llquantize/Makefile head/cddl/usr.sbin/dtrace/tests/common/mdb/Makefile head/cddl/usr.sbin/dtrace/tests/common/mib/Makefile head/cddl/usr.sbin/dtrace/tests/common/misc/Makefile head/cddl/usr.sbin/dtrace/tests/common/multiaggs/Makefile head/cddl/usr.sbin/dtrace/tests/common/nfs/Makefile head/cddl/usr.sbin/dtrace/tests/common/offsetof/Makefile head/cddl/usr.sbin/dtrace/tests/common/operators/Makefile head/cddl/usr.sbin/dtrace/tests/common/pid/Makefile head/cddl/usr.sbin/dtrace/tests/common/plockstat/Makefile head/cddl/usr.sbin/dtrace/tests/common/pointers/Makefile head/cddl/usr.sbin/dtrace/tests/common/pragma/Makefile head/cddl/usr.sbin/dtrace/tests/common/predicates/Makefile head/cddl/usr.sbin/dtrace/tests/common/preprocessor/Makefile head/cddl/usr.sbin/dtrace/tests/common/print/Makefile head/cddl/usr.sbin/dtrace/tests/common/printa/Makefile head/cddl/usr.sbin/dtrace/tests/common/printf/Makefile head/cddl/usr.sbin/dtrace/tests/common/privs/Makefile head/cddl/usr.sbin/dtrace/tests/common/probes/Makefile head/cddl/usr.sbin/dtrace/tests/common/proc/Makefile head/cddl/usr.sbin/dtrace/tests/common/profile-n/Makefile head/cddl/usr.sbin/dtrace/tests/common/providers/Makefile head/cddl/usr.sbin/dtrace/tests/common/raise/Makefile head/cddl/usr.sbin/dtrace/tests/common/rates/Makefile head/cddl/usr.sbin/dtrace/tests/common/safety/Makefile head/cddl/usr.sbin/dtrace/tests/common/scalars/Makefile head/cddl/usr.sbin/dtrace/tests/common/sched/Makefile head/cddl/usr.sbin/dtrace/tests/common/scripting/Makefile head/cddl/usr.sbin/dtrace/tests/common/sdt/Makefile head/cddl/usr.sbin/dtrace/tests/common/sizeof/Makefile head/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile head/cddl/usr.sbin/dtrace/tests/common/stability/Makefile head/cddl/usr.sbin/dtrace/tests/common/stack/Makefile head/cddl/usr.sbin/dtrace/tests/common/stackdepth/Makefile head/cddl/usr.sbin/dtrace/tests/common/stop/Makefile head/cddl/usr.sbin/dtrace/tests/common/strlen/Makefile head/cddl/usr.sbin/dtrace/tests/common/strtoll/Makefile head/cddl/usr.sbin/dtrace/tests/common/struct/Makefile head/cddl/usr.sbin/dtrace/tests/common/syscall/Makefile head/cddl/usr.sbin/dtrace/tests/common/sysevent/Makefile head/cddl/usr.sbin/dtrace/tests/common/tick-n/Makefile head/cddl/usr.sbin/dtrace/tests/common/trace/Makefile head/cddl/usr.sbin/dtrace/tests/common/tracemem/Makefile head/cddl/usr.sbin/dtrace/tests/common/translators/Makefile head/cddl/usr.sbin/dtrace/tests/common/typedef/Makefile head/cddl/usr.sbin/dtrace/tests/common/types/Makefile head/cddl/usr.sbin/dtrace/tests/common/uctf/Makefile head/cddl/usr.sbin/dtrace/tests/common/union/Makefile head/cddl/usr.sbin/dtrace/tests/common/usdt/Makefile head/cddl/usr.sbin/dtrace/tests/common/ustack/Makefile head/cddl/usr.sbin/dtrace/tests/common/vars/Makefile head/cddl/usr.sbin/dtrace/tests/common/version/Makefile head/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh Modified: head/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -186,4 +186,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/arithmetic/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/arithmetic/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/arithmetic/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -29,4 +29,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/arrays/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/arrays/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/arrays/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -26,4 +26,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/assocs/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/assocs/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/assocs/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -29,4 +29,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/begin/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/begin/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/begin/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -19,4 +19,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/bitfields/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/bitfields/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/bitfields/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -23,4 +23,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/buffering/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/buffering/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/buffering/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -34,4 +34,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/builtinvar/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/builtinvar/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/builtinvar/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -45,4 +45,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/cg/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/cg/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/cg/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -15,4 +15,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/clauses/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/clauses/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/clauses/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -23,4 +23,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/cpc/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/cpc/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/cpc/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -24,4 +24,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/decls/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/decls/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/decls/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -27,4 +27,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/docsExamples/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/docsExamples/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/docsExamples/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -29,4 +29,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/drops/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/drops/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/drops/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -21,4 +21,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/dtraceUtil/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/dtraceUtil/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/dtraceUtil/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -115,4 +115,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/end/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/end/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/end/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -18,4 +18,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/enum/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/enum/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/enum/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -18,4 +18,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/error/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/error/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/error/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -18,4 +18,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/exit/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/exit/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/exit/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -16,4 +16,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/fbtprovider/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/fbtprovider/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/fbtprovider/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -23,4 +23,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/funcs/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/funcs/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/funcs/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -110,4 +110,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/grammar/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/grammar/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/grammar/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -17,4 +17,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/include/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/include/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/include/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -14,4 +14,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/inline/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/inline/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/inline/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -25,4 +25,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/io/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/io/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/io/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -15,4 +15,4 @@ CFILES= \ tst.fds.c \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/ip/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/ip/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/ip/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -33,4 +33,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/java_api/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/java_api/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/java_api/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -41,4 +41,4 @@ CFILES= \ tst.ProbeData.c \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/json/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/json/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/json/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -20,4 +20,4 @@ CFILES= \ tst.usdt.c \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/lexer/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/lexer/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/lexer/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -27,4 +27,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/llquantize/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/llquantize/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/llquantize/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -47,4 +47,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/mdb/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/mdb/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/mdb/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -14,4 +14,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/mib/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/mib/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/mib/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -16,4 +16,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/misc/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/misc/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/misc/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -27,4 +27,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/multiaggs/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/multiaggs/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/multiaggs/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -31,4 +31,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/nfs/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/nfs/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/nfs/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -16,4 +16,4 @@ CFILES= \ tst.call3.c \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/offsetof/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/offsetof/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/offsetof/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -25,4 +25,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/operators/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/operators/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/operators/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -15,4 +15,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/pid/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/pid/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/pid/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -66,4 +66,4 @@ CFILES= \ tst.weak2.c \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/plockstat/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/plockstat/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/plockstat/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -16,4 +16,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/pointers/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/pointers/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/pointers/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -45,4 +45,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/pragma/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/pragma/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/pragma/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -27,4 +27,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/predicates/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/predicates/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/predicates/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -22,4 +22,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/preprocessor/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/preprocessor/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/preprocessor/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -50,4 +50,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/print/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/print/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/print/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -29,4 +29,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/printa/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/printa/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/printa/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -37,4 +37,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/printf/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/printf/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/printf/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -65,4 +65,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/privs/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/privs/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/privs/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -21,4 +21,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/probes/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/probes/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/probes/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -33,4 +33,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/proc/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/proc/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/proc/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -27,4 +27,4 @@ CFILES= \ LDADD.tst.sigwait.exe+= -lrt DPADD.tst.sigwait.exe+= ${LIBRT} -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/profile-n/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/profile-n/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/profile-n/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -50,4 +50,4 @@ CFILES= \ tst.ufuncsort.c \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/providers/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/providers/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/providers/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -41,4 +41,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/raise/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/raise/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/raise/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -18,4 +18,4 @@ CFILES= \ tst.raise3.c \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/rates/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/rates/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/rates/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -18,4 +18,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/safety/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/safety/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/safety/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -51,4 +51,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/scalars/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/scalars/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/scalars/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -34,4 +34,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/sched/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/sched/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/sched/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -16,4 +16,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/scripting/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/scripting/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/scripting/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -46,4 +46,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/sdt/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/sdt/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/sdt/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -14,4 +14,4 @@ CFILES= \ tst.sdtargs.c \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/sizeof/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/sizeof/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/sizeof/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -28,4 +28,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -72,4 +72,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/stability/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/stability/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/stability/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -14,4 +14,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/stack/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/stack/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/stack/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -19,4 +19,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/stackdepth/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/stackdepth/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/stackdepth/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -14,4 +14,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/stop/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/stop/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/stop/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -16,4 +16,4 @@ CFILES= \ tst.stop2.c \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/strlen/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/strlen/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/strlen/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -14,4 +14,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/strtoll/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/strtoll/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/strtoll/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -17,4 +17,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/struct/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/struct/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/struct/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -28,4 +28,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/syscall/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/syscall/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/syscall/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -15,4 +15,4 @@ CFILES= \ tst.args.c \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/sysevent/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/sysevent/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/sysevent/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -16,4 +16,4 @@ CFILES= \ tst.post_chan.c \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/tick-n/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/tick-n/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/tick-n/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -35,4 +35,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/trace/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/trace/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/trace/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -21,4 +21,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/tracemem/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/tracemem/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/tracemem/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -23,4 +23,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/translators/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/translators/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/translators/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -48,4 +48,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/typedef/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/typedef/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/typedef/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -18,4 +18,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/types/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/types/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/types/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -66,4 +66,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/uctf/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/uctf/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/uctf/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -38,4 +38,4 @@ CFILES= \ WITH_CTF=YES -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/union/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/union/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/union/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -24,4 +24,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/usdt/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/usdt/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/usdt/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -62,4 +62,4 @@ CFILES= \ tst.forker.c \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/ustack/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/ustack/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/ustack/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -17,4 +17,4 @@ CFILES= \ tst.spin.c \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/vars/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/vars/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/vars/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -20,4 +20,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/common/version/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/version/Makefile Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/common/version/Makefile Wed Nov 25 20:43:45 2015 (r291332) @@ -14,4 +14,4 @@ CFILES= \ -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" Copied and modified: head/cddl/usr.sbin/dtrace/tests/dtrace.test.mk (from r291331, head/cddl/usr.sbin/dtrace/tests/Makefile.inc1) ============================================================================== Modified: head/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh Wed Nov 25 20:38:20 2015 (r291331) +++ head/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh Wed Nov 25 20:43:45 2015 (r291332) @@ -63,7 +63,7 @@ CFILES= \\ $tcfiles $special -.include "../../Makefile.inc1" +.include "../../dtrace.test.mk" __EOF__ mv -f $makefile ${ORIGINDIR}/../common/${basedir}/Makefile From owner-svn-src-all@freebsd.org Wed Nov 25 21:04:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 364F2A37D81; Wed, 25 Nov 2015 21:04:45 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2DD71D9B; Wed, 25 Nov 2015 21:04:44 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPL4hx5028214; Wed, 25 Nov 2015 21:04:43 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPL4hGc028204; Wed, 25 Nov 2015 21:04:43 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201511252104.tAPL4hGc028204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 25 Nov 2015 21:04:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r291333 - in vendor-sys/acpica/dist: . generate/unix/acpiexamples generate/unix/acpiexec generate/unix/acpinames generate/unix/acpixtract generate/unix/iasl source/common source/compile... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 21:04:45 -0000 Author: jkim Date: Wed Nov 25 21:04:42 2015 New Revision: 291333 URL: https://svnweb.freebsd.org/changeset/base/291333 Log: Import ACPICA 20151124. Added: vendor-sys/acpica/dist/source/common/acfileio.c (contents, props changed) vendor-sys/acpica/dist/source/common/dmtables.c (contents, props changed) vendor-sys/acpica/dist/source/compiler/dttable1.c (contents, props changed) vendor-sys/acpica/dist/source/compiler/dttable2.c (contents, props changed) vendor-sys/acpica/dist/source/components/executer/extrace.c (contents, props changed) vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.h (contents, props changed) vendor-sys/acpica/dist/source/tools/acpixtract/axutils.c (contents, props changed) Deleted: vendor-sys/acpica/dist/source/components/utilities/utfileio.c Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile vendor-sys/acpica/dist/generate/unix/acpinames/Makefile vendor-sys/acpica/dist/generate/unix/acpixtract/Makefile vendor-sys/acpica/dist/generate/unix/iasl/Makefile vendor-sys/acpica/dist/source/common/acgetline.c vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/adwalk.c vendor-sys/acpica/dist/source/common/ahuuids.c vendor-sys/acpica/dist/source/common/dmextern.c vendor-sys/acpica/dist/source/common/dmrestag.c vendor-sys/acpica/dist/source/common/dmtable.c vendor-sys/acpica/dist/source/common/dmtbdump.c vendor-sys/acpica/dist/source/common/getopt.c vendor-sys/acpica/dist/source/compiler/aslanalyze.c vendor-sys/acpica/dist/source/compiler/aslbtypes.c vendor-sys/acpica/dist/source/compiler/aslcodegen.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslcompiler.l vendor-sys/acpica/dist/source/compiler/aslerror.c vendor-sys/acpica/dist/source/compiler/aslfileio.c vendor-sys/acpica/dist/source/compiler/aslfiles.c vendor-sys/acpica/dist/source/compiler/aslfold.c vendor-sys/acpica/dist/source/compiler/aslhex.c vendor-sys/acpica/dist/source/compiler/asllength.c vendor-sys/acpica/dist/source/compiler/asllisting.c vendor-sys/acpica/dist/source/compiler/asllistsup.c vendor-sys/acpica/dist/source/compiler/aslload.c vendor-sys/acpica/dist/source/compiler/aslmap.c vendor-sys/acpica/dist/source/compiler/aslmapenter.c vendor-sys/acpica/dist/source/compiler/aslmapoutput.c vendor-sys/acpica/dist/source/compiler/aslmessages.c vendor-sys/acpica/dist/source/compiler/aslmessages.h vendor-sys/acpica/dist/source/compiler/aslmethod.c vendor-sys/acpica/dist/source/compiler/aslnamesp.c vendor-sys/acpica/dist/source/compiler/aslopcodes.c vendor-sys/acpica/dist/source/compiler/asloperands.c vendor-sys/acpica/dist/source/compiler/aslopt.c vendor-sys/acpica/dist/source/compiler/asloptions.c vendor-sys/acpica/dist/source/compiler/aslpredef.c vendor-sys/acpica/dist/source/compiler/aslprepkg.c vendor-sys/acpica/dist/source/compiler/aslprune.c vendor-sys/acpica/dist/source/compiler/aslresource.c vendor-sys/acpica/dist/source/compiler/aslrestype1.c vendor-sys/acpica/dist/source/compiler/aslrestype1i.c vendor-sys/acpica/dist/source/compiler/aslrestype2.c vendor-sys/acpica/dist/source/compiler/aslrestype2d.c vendor-sys/acpica/dist/source/compiler/aslrestype2e.c vendor-sys/acpica/dist/source/compiler/aslrestype2q.c vendor-sys/acpica/dist/source/compiler/aslrestype2s.c vendor-sys/acpica/dist/source/compiler/aslrestype2w.c vendor-sys/acpica/dist/source/compiler/aslrules.y vendor-sys/acpica/dist/source/compiler/aslstubs.c vendor-sys/acpica/dist/source/compiler/asltokens.y vendor-sys/acpica/dist/source/compiler/asltransform.c vendor-sys/acpica/dist/source/compiler/asltree.c vendor-sys/acpica/dist/source/compiler/asltypes.h vendor-sys/acpica/dist/source/compiler/asltypes.y vendor-sys/acpica/dist/source/compiler/aslutils.c vendor-sys/acpica/dist/source/compiler/asluuid.c vendor-sys/acpica/dist/source/compiler/aslxref.c vendor-sys/acpica/dist/source/compiler/dtcompile.c vendor-sys/acpica/dist/source/compiler/dtcompiler.h vendor-sys/acpica/dist/source/compiler/dtexpress.c vendor-sys/acpica/dist/source/compiler/dtfield.c vendor-sys/acpica/dist/source/compiler/dtio.c vendor-sys/acpica/dist/source/compiler/dttable.c vendor-sys/acpica/dist/source/compiler/dttemplate.c vendor-sys/acpica/dist/source/compiler/prexpress.c vendor-sys/acpica/dist/source/compiler/prmacros.c vendor-sys/acpica/dist/source/compiler/prscan.c vendor-sys/acpica/dist/source/compiler/prutils.c vendor-sys/acpica/dist/source/components/debugger/dbcmds.c vendor-sys/acpica/dist/source/components/debugger/dbconvert.c vendor-sys/acpica/dist/source/components/debugger/dbdisply.c vendor-sys/acpica/dist/source/components/debugger/dbexec.c vendor-sys/acpica/dist/source/components/debugger/dbfileio.c vendor-sys/acpica/dist/source/components/debugger/dbinput.c vendor-sys/acpica/dist/source/components/debugger/dbmethod.c vendor-sys/acpica/dist/source/components/debugger/dbnames.c vendor-sys/acpica/dist/source/components/debugger/dbobject.c vendor-sys/acpica/dist/source/components/debugger/dbstats.c vendor-sys/acpica/dist/source/components/debugger/dbtest.c vendor-sys/acpica/dist/source/components/debugger/dbutils.c vendor-sys/acpica/dist/source/components/debugger/dbxface.c vendor-sys/acpica/dist/source/components/disassembler/dmbuffer.c vendor-sys/acpica/dist/source/components/disassembler/dmcstyle.c vendor-sys/acpica/dist/source/components/disassembler/dmdeferred.c vendor-sys/acpica/dist/source/components/disassembler/dmnames.c vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c vendor-sys/acpica/dist/source/components/disassembler/dmresrc.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl2.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcs.c vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c vendor-sys/acpica/dist/source/components/dispatcher/dsargs.c vendor-sys/acpica/dist/source/components/dispatcher/dscontrol.c vendor-sys/acpica/dist/source/components/dispatcher/dsdebug.c vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c vendor-sys/acpica/dist/source/components/dispatcher/dsinit.c vendor-sys/acpica/dist/source/components/dispatcher/dsmethod.c vendor-sys/acpica/dist/source/components/dispatcher/dsmthdat.c vendor-sys/acpica/dist/source/components/dispatcher/dsobject.c vendor-sys/acpica/dist/source/components/dispatcher/dsopcode.c vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c vendor-sys/acpica/dist/source/components/dispatcher/dswexec.c vendor-sys/acpica/dist/source/components/dispatcher/dswload.c vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c vendor-sys/acpica/dist/source/components/dispatcher/dswscope.c vendor-sys/acpica/dist/source/components/dispatcher/dswstate.c vendor-sys/acpica/dist/source/components/events/evevent.c vendor-sys/acpica/dist/source/components/events/evglock.c vendor-sys/acpica/dist/source/components/events/evgpe.c vendor-sys/acpica/dist/source/components/events/evgpeblk.c vendor-sys/acpica/dist/source/components/events/evgpeinit.c vendor-sys/acpica/dist/source/components/events/evgpeutil.c vendor-sys/acpica/dist/source/components/events/evhandler.c vendor-sys/acpica/dist/source/components/events/evmisc.c vendor-sys/acpica/dist/source/components/events/evregion.c vendor-sys/acpica/dist/source/components/events/evrgnini.c vendor-sys/acpica/dist/source/components/events/evsci.c vendor-sys/acpica/dist/source/components/events/evxface.c vendor-sys/acpica/dist/source/components/events/evxfevnt.c vendor-sys/acpica/dist/source/components/events/evxfgpe.c vendor-sys/acpica/dist/source/components/events/evxfregn.c vendor-sys/acpica/dist/source/components/executer/exconfig.c vendor-sys/acpica/dist/source/components/executer/exconvrt.c vendor-sys/acpica/dist/source/components/executer/excreate.c vendor-sys/acpica/dist/source/components/executer/exdebug.c vendor-sys/acpica/dist/source/components/executer/exdump.c vendor-sys/acpica/dist/source/components/executer/exfield.c vendor-sys/acpica/dist/source/components/executer/exfldio.c vendor-sys/acpica/dist/source/components/executer/exmisc.c vendor-sys/acpica/dist/source/components/executer/exmutex.c vendor-sys/acpica/dist/source/components/executer/exnames.c vendor-sys/acpica/dist/source/components/executer/exoparg1.c vendor-sys/acpica/dist/source/components/executer/exoparg2.c vendor-sys/acpica/dist/source/components/executer/exoparg3.c vendor-sys/acpica/dist/source/components/executer/exoparg6.c vendor-sys/acpica/dist/source/components/executer/exprep.c vendor-sys/acpica/dist/source/components/executer/exregion.c vendor-sys/acpica/dist/source/components/executer/exresnte.c vendor-sys/acpica/dist/source/components/executer/exresolv.c vendor-sys/acpica/dist/source/components/executer/exresop.c vendor-sys/acpica/dist/source/components/executer/exstore.c vendor-sys/acpica/dist/source/components/executer/exstoren.c vendor-sys/acpica/dist/source/components/executer/exstorob.c vendor-sys/acpica/dist/source/components/executer/exsystem.c vendor-sys/acpica/dist/source/components/executer/exutils.c vendor-sys/acpica/dist/source/components/hardware/hwacpi.c vendor-sys/acpica/dist/source/components/hardware/hwesleep.c vendor-sys/acpica/dist/source/components/hardware/hwgpe.c vendor-sys/acpica/dist/source/components/hardware/hwregs.c vendor-sys/acpica/dist/source/components/hardware/hwsleep.c vendor-sys/acpica/dist/source/components/hardware/hwxface.c vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c vendor-sys/acpica/dist/source/components/namespace/nsaccess.c vendor-sys/acpica/dist/source/components/namespace/nsalloc.c vendor-sys/acpica/dist/source/components/namespace/nsarguments.c vendor-sys/acpica/dist/source/components/namespace/nsconvert.c vendor-sys/acpica/dist/source/components/namespace/nsdump.c vendor-sys/acpica/dist/source/components/namespace/nsdumpdv.c vendor-sys/acpica/dist/source/components/namespace/nseval.c vendor-sys/acpica/dist/source/components/namespace/nsinit.c vendor-sys/acpica/dist/source/components/namespace/nsload.c vendor-sys/acpica/dist/source/components/namespace/nsnames.c vendor-sys/acpica/dist/source/components/namespace/nsobject.c vendor-sys/acpica/dist/source/components/namespace/nsparse.c vendor-sys/acpica/dist/source/components/namespace/nsprepkg.c vendor-sys/acpica/dist/source/components/namespace/nsrepair.c vendor-sys/acpica/dist/source/components/namespace/nsrepair2.c vendor-sys/acpica/dist/source/components/namespace/nssearch.c vendor-sys/acpica/dist/source/components/namespace/nsutils.c vendor-sys/acpica/dist/source/components/namespace/nswalk.c vendor-sys/acpica/dist/source/components/namespace/nsxfeval.c vendor-sys/acpica/dist/source/components/namespace/nsxfname.c vendor-sys/acpica/dist/source/components/namespace/nsxfobj.c vendor-sys/acpica/dist/source/components/parser/psargs.c vendor-sys/acpica/dist/source/components/parser/psloop.c vendor-sys/acpica/dist/source/components/parser/psobject.c vendor-sys/acpica/dist/source/components/parser/psparse.c vendor-sys/acpica/dist/source/components/parser/psscope.c vendor-sys/acpica/dist/source/components/parser/psutils.c vendor-sys/acpica/dist/source/components/parser/pswalk.c vendor-sys/acpica/dist/source/components/parser/psxface.c vendor-sys/acpica/dist/source/components/resources/rsaddr.c vendor-sys/acpica/dist/source/components/resources/rscalc.c vendor-sys/acpica/dist/source/components/resources/rscreate.c vendor-sys/acpica/dist/source/components/resources/rsdump.c vendor-sys/acpica/dist/source/components/resources/rslist.c vendor-sys/acpica/dist/source/components/resources/rsmisc.c vendor-sys/acpica/dist/source/components/resources/rsutils.c vendor-sys/acpica/dist/source/components/resources/rsxface.c vendor-sys/acpica/dist/source/components/tables/tbdata.c vendor-sys/acpica/dist/source/components/tables/tbfadt.c vendor-sys/acpica/dist/source/components/tables/tbfind.c vendor-sys/acpica/dist/source/components/tables/tbinstal.c vendor-sys/acpica/dist/source/components/tables/tbprint.c vendor-sys/acpica/dist/source/components/tables/tbutils.c vendor-sys/acpica/dist/source/components/tables/tbxface.c vendor-sys/acpica/dist/source/components/tables/tbxfload.c vendor-sys/acpica/dist/source/components/tables/tbxfroot.c vendor-sys/acpica/dist/source/components/utilities/utaddress.c vendor-sys/acpica/dist/source/components/utilities/utalloc.c vendor-sys/acpica/dist/source/components/utilities/utcache.c vendor-sys/acpica/dist/source/components/utilities/utcopy.c vendor-sys/acpica/dist/source/components/utilities/utdecode.c vendor-sys/acpica/dist/source/components/utilities/utdelete.c vendor-sys/acpica/dist/source/components/utilities/uterror.c vendor-sys/acpica/dist/source/components/utilities/uteval.c vendor-sys/acpica/dist/source/components/utilities/uthex.c vendor-sys/acpica/dist/source/components/utilities/utids.c vendor-sys/acpica/dist/source/components/utilities/utinit.c vendor-sys/acpica/dist/source/components/utilities/utmath.c vendor-sys/acpica/dist/source/components/utilities/utmisc.c vendor-sys/acpica/dist/source/components/utilities/utmutex.c vendor-sys/acpica/dist/source/components/utilities/utnonansi.c vendor-sys/acpica/dist/source/components/utilities/utobject.c vendor-sys/acpica/dist/source/components/utilities/utosi.c vendor-sys/acpica/dist/source/components/utilities/utownerid.c vendor-sys/acpica/dist/source/components/utilities/utpredef.c vendor-sys/acpica/dist/source/components/utilities/utprint.c vendor-sys/acpica/dist/source/components/utilities/utresrc.c vendor-sys/acpica/dist/source/components/utilities/utstate.c vendor-sys/acpica/dist/source/components/utilities/utstring.c vendor-sys/acpica/dist/source/components/utilities/uttrack.c vendor-sys/acpica/dist/source/components/utilities/utuuid.c vendor-sys/acpica/dist/source/components/utilities/utxface.c vendor-sys/acpica/dist/source/components/utilities/utxferror.c vendor-sys/acpica/dist/source/components/utilities/utxfmutex.c vendor-sys/acpica/dist/source/include/acapps.h vendor-sys/acpica/dist/source/include/acdebug.h vendor-sys/acpica/dist/source/include/acdisasm.h vendor-sys/acpica/dist/source/include/acglobal.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acmacros.h vendor-sys/acpica/dist/source/include/acpiosxf.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/actables.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/acutils.h vendor-sys/acpica/dist/source/include/platform/aclinux.h vendor-sys/acpica/dist/source/include/platform/aclinuxex.h vendor-sys/acpica/dist/source/os_specific/service_layers/oslibcfs.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswindir.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswinxf.c vendor-sys/acpica/dist/source/tools/acpibin/abcompare.c vendor-sys/acpica/dist/source/tools/acpidump/apfiles.c vendor-sys/acpica/dist/source/tools/acpiexec/aecommon.h vendor-sys/acpica/dist/source/tools/acpiexec/aeexec.c vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpiexec/aeregion.c vendor-sys/acpica/dist/source/tools/acpiexec/aetables.c vendor-sys/acpica/dist/source/tools/acpihelp/ahdecode.c vendor-sys/acpica/dist/source/tools/acpinames/acpinames.h vendor-sys/acpica/dist/source/tools/acpinames/anmain.c vendor-sys/acpica/dist/source/tools/acpinames/antables.c vendor-sys/acpica/dist/source/tools/acpisrc/ascase.c vendor-sys/acpica/dist/source/tools/acpisrc/asconvrt.c vendor-sys/acpica/dist/source/tools/acpisrc/asfile.c vendor-sys/acpica/dist/source/tools/acpisrc/asmain.c vendor-sys/acpica/dist/source/tools/acpisrc/asremove.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.c vendor-sys/acpica/dist/source/tools/acpixtract/axmain.c vendor-sys/acpica/dist/source/tools/examples/examples.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Wed Nov 25 20:43:45 2015 (r291332) +++ vendor-sys/acpica/dist/changes.txt Wed Nov 25 21:04:42 2015 (r291333) @@ -1,4 +1,85 @@ ---------------------------------------- +24 November 2015. Summary of changes for version 20151124: + +This release is available at https://acpica.org/downloads + + +1) ACPICA kernel-resident subsystem: + +Fixed a possible regression for a previous update to FADT handling. The +FADT no longer has a fixed table ID, causing some issues with code that +was hardwired to a specific ID. Lv Zheng. + +Fixed a problem where the method auto-serialization could interfere with +the current SyncLevel. This change makes the auto-serialization support +transparent to the SyncLevel support and management. + +Removed support for the _SUB predefined name in AcpiGetObjectInfo. This +interface is intended for early access to the namespace during the +initial namespace device discovery walk. The _SUB method has been seen to +access operation regions in some cases, causing errors because the +operation regions are not fully initialized. + +AML Debugger: Fixed some issues with the terminate/quit/exit commands +that can cause faults. Lv Zheng. + +AML Debugger: Add thread ID support so that single-step mode only applies +to the AML Debugger thread. This prevents runtime errors within some +kernels. Lv Zheng. + +Eliminated extraneous warnings from AcpiGetSleepTypeData. Since the _Sx +methods that are invoked by this interface are optional, removed warnings +emitted for the case where one or more of these methods do not exist. +ACPICA BZ 1208, original change by Prarit Bhargava. + +Made a major pass through the entire ACPICA source code base to +standardize formatting that has diverged a bit over time. There are no +functional changes, but this will of course cause quite a few code +differences from the previous ACPICA release. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 102.0K Code, 28.3K Data, 130.3K Total + Debug Version: 199.6K Code, 81.8K Data, 281.4K Total + Previous Release: + Non-Debug Version: 101.7K Code, 27.9K Data, 129.6K Total + Debug Version: 199.3K Code, 81.4K Data, 280.7K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL/acpiexec/acpixtract/disassembler: Added support to allow multiple +definition blocks within a single ASL file and the resulting AML file. +Support for this type of file was also added to the various tools that +use binary AML files: acpiexec, acpixtract, and the AML disassembler. The +example code below shows two definition blocks within the same file: + + DefinitionBlock ("dsdt.aml", "DSDT", 2, "Intel", "Template", +0x12345678) + { + } + DefinitionBlock ("", "SSDT", 2, "Intel", "Template", 0xABCDEF01) + { + } + +iASL: Enhanced typechecking for the Name() operator. All expressions for +the value of the named object must be reduced/folded to a single constant +at compile time, as per the ACPI specification (the AML definition of +Name()). + +iASL: Fixed some code indentation issues for the -ic and -ia options (C +and assembly headers). Now all emitted code correctly begins in column 1. + +iASL: Added an error message for an attempt to open a Scope() on an +object defined in an SSDT. The DSDT is always loaded into the namespace +first, so any attempt to open a Scope on an SSDT object will fail at +runtime. + +---------------------------------------- 30 September 2015. Summary of changes for version 20150930: 1) ACPICA kernel-resident subsystem: Modified: vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile Wed Nov 25 20:43:45 2015 (r291332) +++ vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile Wed Nov 25 21:04:42 2015 (r291333) @@ -82,6 +82,7 @@ OBJECTS = \ $(OBJDIR)/exstoren.o\ $(OBJDIR)/exstorob.o\ $(OBJDIR)/exsystem.o\ + $(OBJDIR)/extrace.o\ $(OBJDIR)/exutils.o\ $(OBJDIR)/hwpci.o\ $(OBJDIR)/nsaccess.o\ Modified: vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Wed Nov 25 20:43:45 2015 (r291332) +++ vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Wed Nov 25 21:04:42 2015 (r291333) @@ -40,6 +40,7 @@ HEADERS = \ OBJECTS = \ $(OBJDIR)/acgetline.o\ + $(OBJDIR)/acfileio.o\ $(OBJDIR)/aeexec.o\ $(OBJDIR)/aehandlers.o\ $(OBJDIR)/aeinitfile.o\ @@ -127,6 +128,7 @@ OBJECTS = \ $(OBJDIR)/exstoren.o\ $(OBJDIR)/exstorob.o\ $(OBJDIR)/exsystem.o\ + $(OBJDIR)/extrace.o\ $(OBJDIR)/exutils.o\ $(OBJDIR)/getopt.o\ $(OBJDIR)/hwacpi.o\ @@ -207,7 +209,6 @@ OBJECTS = \ $(OBJDIR)/uterror.o\ $(OBJDIR)/uteval.o\ $(OBJDIR)/utexcep.o\ - $(OBJDIR)/utfileio.o\ $(OBJDIR)/utglobal.o\ $(OBJDIR)/uthex.o\ $(OBJDIR)/utids.o\ Modified: vendor-sys/acpica/dist/generate/unix/acpinames/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpinames/Makefile Wed Nov 25 20:43:45 2015 (r291332) +++ vendor-sys/acpica/dist/generate/unix/acpinames/Makefile Wed Nov 25 21:04:42 2015 (r291333) @@ -34,6 +34,7 @@ HEADERS = \ $(wildcard $(ACPINAMES)/*.h) OBJECTS = \ + $(OBJDIR)/acfileio.o\ $(OBJDIR)/anmain.o\ $(OBJDIR)/anstubs.o\ $(OBJDIR)/antables.o\ @@ -103,7 +104,6 @@ OBJECTS = \ $(OBJDIR)/uterror.o\ $(OBJDIR)/uteval.o\ $(OBJDIR)/utexcep.o\ - $(OBJDIR)/utfileio.o\ $(OBJDIR)/utglobal.o\ $(OBJDIR)/uthex.o\ $(OBJDIR)/utids.o\ Modified: vendor-sys/acpica/dist/generate/unix/acpixtract/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpixtract/Makefile Wed Nov 25 20:43:45 2015 (r291332) +++ vendor-sys/acpica/dist/generate/unix/acpixtract/Makefile Wed Nov 25 21:04:42 2015 (r291333) @@ -29,6 +29,7 @@ HEADERS = \ OBJECTS = \ $(OBJDIR)/acpixtract.o\ $(OBJDIR)/axmain.o\ + $(OBJDIR)/axutils.o\ $(OBJDIR)/getopt.o\ $(OBJDIR)/oslibcfs.o\ $(OBJDIR)/osunixxf.o\ Modified: vendor-sys/acpica/dist/generate/unix/iasl/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/iasl/Makefile Wed Nov 25 20:43:45 2015 (r291332) +++ vendor-sys/acpica/dist/generate/unix/iasl/Makefile Wed Nov 25 21:04:42 2015 (r291333) @@ -43,6 +43,7 @@ OBJECTS = \ $(OBJDIR)/dtparserparse.o\ $(OBJDIR)/prparserlex.o\ $(OBJDIR)/prparserparse.o\ + $(OBJDIR)/acfileio.o\ $(OBJDIR)/adfile.o\ $(OBJDIR)/adisasm.o\ $(OBJDIR)/adwalk.o\ @@ -113,6 +114,7 @@ OBJECTS = \ $(OBJDIR)/dmresrcs.o\ $(OBJDIR)/dmrestag.o\ $(OBJDIR)/dmtable.o\ + $(OBJDIR)/dmtables.o\ $(OBJDIR)/dmtbdump.o\ $(OBJDIR)/dmtbinfo.o\ $(OBJDIR)/dmutils.o\ @@ -134,6 +136,8 @@ OBJECTS = \ $(OBJDIR)/dtio.o\ $(OBJDIR)/dtsubtable.o\ $(OBJDIR)/dttable.o\ + $(OBJDIR)/dttable1.o\ + $(OBJDIR)/dttable2.o\ $(OBJDIR)/dttemplate.o\ $(OBJDIR)/dtutils.o\ $(OBJDIR)/exconvrt.o\ @@ -189,6 +193,7 @@ OBJECTS = \ $(OBJDIR)/tbprint.o\ $(OBJDIR)/tbutils.o\ $(OBJDIR)/tbxface.o\ + $(OBJDIR)/tbxfload.o\ $(OBJDIR)/utaddress.o\ $(OBJDIR)/utalloc.o\ $(OBJDIR)/utbuffer.o\ @@ -199,7 +204,6 @@ OBJECTS = \ $(OBJDIR)/utdelete.o\ $(OBJDIR)/uterror.o\ $(OBJDIR)/utexcep.o\ - $(OBJDIR)/utfileio.o\ $(OBJDIR)/utglobal.o\ $(OBJDIR)/uthex.o\ $(OBJDIR)/utinit.o\ Added: vendor-sys/acpica/dist/source/common/acfileio.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/acpica/dist/source/common/acfileio.c Wed Nov 25 21:04:42 2015 (r291333) @@ -0,0 +1,357 @@ +/****************************************************************************** + * + * Module Name: acfileio - Get ACPI tables from file + * + *****************************************************************************/ + +/* + * Copyright (C) 2000 - 2015, Intel Corp. + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + */ + +#include "acpi.h" +#include "accommon.h" +#include "acapps.h" +#include "actables.h" +#include "acutils.h" +#include + +#define _COMPONENT ACPI_UTILITIES + ACPI_MODULE_NAME ("acfileio") + + +/* Local prototypes */ + +static ACPI_STATUS +AcpiAcGetOneTableFromFile ( + char *Filename, + FILE *File, + UINT8 GetOnlyAmlTables, + ACPI_TABLE_HEADER **Table); + +static ACPI_STATUS +AcpiAcCheckTextModeCorruption ( + ACPI_TABLE_HEADER *Table); + + +/******************************************************************************* + * + * FUNCTION: AcpiAcGetAllTablesFromFile + * + * PARAMETERS: Filename - Table filename + * GetOnlyAmlTables - TRUE if the tables must be AML tables + * ReturnListHead - Where table list is returned + * + * RETURN: Status + * + * DESCRIPTION: Get all ACPI tables from within a single file. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiAcGetAllTablesFromFile ( + char *Filename, + UINT8 GetOnlyAmlTables, + ACPI_NEW_TABLE_DESC **ReturnListHead) +{ + ACPI_NEW_TABLE_DESC *ListHead = NULL; + ACPI_NEW_TABLE_DESC *ListTail = NULL; + ACPI_NEW_TABLE_DESC *TableDesc; + FILE *File; + ACPI_TABLE_HEADER *Table = NULL; + UINT32 FileSize; + ACPI_STATUS Status = AE_OK; + + + File = fopen (Filename, "rb"); + if (!File) + { + perror ("Could not open input file"); + if (errno == ENOENT) + { + return (AE_NOT_EXIST); + } + + return (AE_ERROR); + } + + /* Get the file size */ + + FileSize = CmGetFileSize (File); + if (FileSize == ACPI_UINT32_MAX) + { + return (AE_ERROR); + } + + if (FileSize < 4) + { + return (AE_BAD_HEADER); + } + + /* Read all tables within the file */ + + while (ACPI_SUCCESS (Status)) + { + /* Get one entire ACPI table */ + + Status = AcpiAcGetOneTableFromFile ( + Filename, File, GetOnlyAmlTables, &Table); + if (Status == AE_CTRL_TERMINATE) + { + Status = AE_OK; + break; + } + else if (Status == AE_TYPE) + { + continue; + } + else if (ACPI_FAILURE (Status)) + { + return (Status); + } + + /* Allocate and link a table descriptor */ + + TableDesc = AcpiOsAllocate (sizeof (ACPI_NEW_TABLE_DESC)); + TableDesc->Table = Table; + TableDesc->Next = NULL; + + /* Link at the end of the local table list */ + + if (!ListHead) + { + ListHead = TableDesc; + ListTail = TableDesc; + } + else + { + ListTail->Next = TableDesc; + ListTail = TableDesc; + } + } + + /* Add the local table list to the end of the global list */ + + if (*ReturnListHead) + { + ListTail = *ReturnListHead; + while (ListTail->Next) + { + ListTail = ListTail->Next; + } + + ListTail->Next = ListHead; + } + else + { + *ReturnListHead = ListHead; + } + + fclose(File); + return (Status); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiAcGetOneTableFromFile + * + * PARAMETERS: Filename - File where table is located + * File - Open FILE pointer to Filename + * GetOnlyAmlTables - TRUE if the tables must be AML tables. + * ReturnTable - Where a pointer to the table is returned + * + * RETURN: Status + * + * DESCRIPTION: Read the next ACPI table from a file. Implements support + * for multiple tables within a single file. File must already + * be open. + * + * Note: Loading an RSDP is not supported. + * + ******************************************************************************/ + +static ACPI_STATUS +AcpiAcGetOneTableFromFile ( + char *Filename, + FILE *File, + UINT8 GetOnlyAmlTables, + ACPI_TABLE_HEADER **ReturnTable) +{ + ACPI_STATUS Status = AE_OK; + ACPI_TABLE_HEADER TableHeader; + ACPI_TABLE_HEADER *Table; + INT32 Count; + long Position; + + + *ReturnTable = NULL; + + + /* Get just the table header to get signature and length */ + + Position = ftell (File); + Count = fread (&TableHeader, 1, sizeof (ACPI_TABLE_HEADER), File); + if (Count != sizeof (ACPI_TABLE_HEADER)) + { + return (AE_CTRL_TERMINATE); + } + + if (GetOnlyAmlTables) + { + /* Table must be an AML table (DSDT/SSDT) or FADT */ + + if (!ACPI_COMPARE_NAME (TableHeader.Signature, ACPI_SIG_FADT) && + !AcpiUtIsAmlTable (&TableHeader)) + { + fprintf (stderr, + " %s: [%4.4s] is not an AML table - ignoring\n", + Filename, TableHeader.Signature); + + return (AE_TYPE); + } + } + + /* Allocate a buffer for the entire table */ + + Table = AcpiOsAllocate ((size_t) TableHeader.Length); + if (!Table) + { + return (AE_NO_MEMORY); + } + + /* Now read the entire table */ + + fseek (File, Position, SEEK_SET); + + Count = fread (Table, 1, TableHeader.Length, File); + if (Count != (INT32) TableHeader.Length) + { + Status = AE_ERROR; + goto ErrorExit; + } + + /* Validate the checksum (just issue a warning) */ + + Status = AcpiTbVerifyChecksum (Table, TableHeader.Length); + if (ACPI_FAILURE (Status)) + { + Status = AcpiAcCheckTextModeCorruption (Table); + if (ACPI_FAILURE (Status)) + { + goto ErrorExit; + } + } + + fprintf (stderr, + "Loading ACPI table [%4.4s] from file %12s - Length 0x%06X (%u)\n", + TableHeader.Signature, Filename, + TableHeader.Length, TableHeader.Length); + + *ReturnTable = Table; + return (AE_OK); + + +ErrorExit: + AcpiOsFree (Table); + return (Status); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiAcCheckTextModeCorruption + * + * PARAMETERS: Table - Table buffer starting with table header + * + * RETURN: Status + * + * DESCRIPTION: Check table for text mode file corruption where all linefeed + * characters (LF) have been replaced by carriage return linefeed + * pairs (CR/LF). + * + ******************************************************************************/ + +static ACPI_STATUS +AcpiAcCheckTextModeCorruption ( + ACPI_TABLE_HEADER *Table) +{ + UINT32 i; + UINT32 Pairs = 0; + UINT8 *Buffer = ACPI_CAST_PTR (UINT8, Table); + + + /* Scan entire table to determine if each LF has been prefixed with a CR */ + + for (i = 1; i < Table->Length; i++) + { + if (Buffer[i] == 0x0A) + { + if (Buffer[i - 1] != 0x0D) + { + /* The LF does not have a preceding CR, table not corrupted */ + + return (AE_OK); + } + else + { + /* Found a CR/LF pair */ + + Pairs++; + } + + i++; + } + } + + if (!Pairs) + { + return (AE_OK); + } + + /* + * Entire table scanned, each CR is part of a CR/LF pair -- + * meaning that the table was treated as a text file somewhere. + * + * NOTE: We can't "fix" the table, because any existing CR/LF pairs in the + * original table are left untouched by the text conversion process -- + * meaning that we cannot simply replace CR/LF pairs with LFs. + */ + AcpiOsPrintf ("Table has been corrupted by text mode conversion\n"); + AcpiOsPrintf ("All LFs (%u) were changed to CR/LF pairs\n", Pairs); + AcpiOsPrintf ("Table cannot be repaired!\n"); + + return (AE_BAD_VALUE); +} Modified: vendor-sys/acpica/dist/source/common/acgetline.c ============================================================================== --- vendor-sys/acpica/dist/source/common/acgetline.c Wed Nov 25 20:43:45 2015 (r291332) +++ vendor-sys/acpica/dist/source/common/acgetline.c Wed Nov 25 21:04:42 2015 (r291333) @@ -262,6 +262,7 @@ AcpiOsGetLine ( ACPI_BACKUP_CURSOR (i, EndOfLine - CursorPosition + 1); EndOfLine--; + if (CursorPosition > 0) { CursorPosition--; Modified: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Wed Nov 25 20:43:45 2015 (r291332) +++ vendor-sys/acpica/dist/source/common/adisasm.c Wed Nov 25 21:04:42 2015 (r291333) @@ -42,16 +42,14 @@ */ #include "aslcompiler.h" -#include "acparser.h" #include "amlcode.h" #include "acdisasm.h" #include "acdispat.h" #include "acnamesp.h" -#include "actables.h" +#include "acparser.h" #include "acapps.h" #include -#include #define _COMPONENT ACPI_TOOLS @@ -59,17 +57,29 @@ /* Local prototypes */ -static void -AdCreateTableHeader ( +static ACPI_STATUS +AdDoExternalFileList ( + char *Filename); + +static ACPI_STATUS +AdDisassembleOneTable ( + ACPI_TABLE_HEADER *Table, + FILE *File, char *Filename, - ACPI_TABLE_HEADER *Table); + char *DisasmFilename); static ACPI_STATUS -AdStoreTable ( +AdReparseOneTable ( ACPI_TABLE_HEADER *Table, - UINT32 *TableIndex); + FILE *File, + ACPI_OWNER_ID OwnerId); -/* Stubs for ASL compiler */ + +ACPI_TABLE_DESC LocalTables[1]; +ACPI_PARSE_OBJECT *AcpiGbl_ParseOpRoot; + + +/* Stubs for everything except ASL compiler */ #ifndef ACPI_ASL_COMPILER BOOLEAN @@ -77,7 +87,7 @@ AcpiDsIsResultUsed ( ACPI_PARSE_OBJECT *Op, ACPI_WALK_STATE *WalkState) { - return TRUE; + return (TRUE); } ACPI_STATUS @@ -89,52 +99,6 @@ AcpiDsMethodError ( } #endif -ACPI_STATUS -AcpiNsLoadTable ( - UINT32 TableIndex, - ACPI_NAMESPACE_NODE *Node) -{ - return (AE_NOT_IMPLEMENTED); -} - -ACPI_STATUS -AcpiDsRestartControlMethod ( - ACPI_WALK_STATE *WalkState, - ACPI_OPERAND_OBJECT *ReturnDesc) -{ - return (AE_OK); -} - -void -AcpiDsTerminateControlMethod ( - ACPI_OPERAND_OBJECT *MethodDesc, - ACPI_WALK_STATE *WalkState) -{ - return; -} - -ACPI_STATUS -AcpiDsCallControlMethod ( - ACPI_THREAD_STATE *Thread, - ACPI_WALK_STATE *WalkState, - ACPI_PARSE_OBJECT *Op) -{ - return (AE_OK); -} - -ACPI_STATUS -AcpiDsMethodDataInitArgs ( - ACPI_OPERAND_OBJECT **Params, - UINT32 MaxParamCount, - ACPI_WALK_STATE *WalkState) -{ - return (AE_OK); -} - - -static ACPI_TABLE_DESC LocalTables[1]; -static ACPI_PARSE_OBJECT *AcpiGbl_ParseOpRoot; - /******************************************************************************* * @@ -202,7 +166,7 @@ AdInitialize ( * * RETURN: Status * - * DESCRIPTION: Disassemble an entire ACPI table + * DESCRIPTION: Disassembler entry point. Disassemble an entire ACPI table. * *****************************************************************************/ @@ -214,14 +178,10 @@ AdAmlDisassemble ( char **OutFilename) { ACPI_STATUS Status; - ACPI_STATUS GlobalStatus = AE_OK; char *DisasmFilename = NULL; - char *ExternalFilename; - ACPI_EXTERNAL_FILE *ExternalFileList = AcpiGbl_ExternalFileList; FILE *File = NULL; ACPI_TABLE_HEADER *Table = NULL; - ACPI_TABLE_HEADER *ExternalTable; - ACPI_OWNER_ID OwnerId; + ACPI_NEW_TABLE_DESC *ListHead = NULL; /* @@ -230,81 +190,22 @@ AdAmlDisassemble ( */ if (Filename) { - Status = AcpiDbGetTableFromFile (Filename, &Table, FALSE); + /* Get the list of all AML tables in the file */ + + Status = AcpiAcGetAllTablesFromFile (Filename, + ACPI_GET_ALL_TABLES, &ListHead); if (ACPI_FAILURE (Status)) { return (Status); } - /* - * External filenames separated by commas - * Example: iasl -e file1,file2,file3 -d xxx.aml - */ - while (ExternalFileList) - { - ExternalFilename = ExternalFileList->Path; - if (!strcmp (ExternalFilename, Filename)) - { - /* Next external file */ - - ExternalFileList = ExternalFileList->Next; - continue; - } + /* Process any user-specified files for external objects */ - Status = AcpiDbGetTableFromFile (ExternalFilename, &ExternalTable, TRUE); - if (ACPI_FAILURE (Status)) - { - if (Status == AE_TYPE) - { - ExternalFileList = ExternalFileList->Next; - GlobalStatus = AE_TYPE; - Status = AE_OK; - continue; - } - return (Status); - } - - /* Load external table for symbol resolution */ - - if (ExternalTable) - { - Status = AdParseTable (ExternalTable, &OwnerId, TRUE, TRUE); - if (ACPI_FAILURE (Status)) - { - AcpiOsPrintf ("Could not parse external ACPI tables, %s\n", - AcpiFormatException (Status)); - return (Status); - } - - /* - * Load namespace from names created within control methods - * Set owner id of nodes in external table - */ - AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot, - AcpiGbl_RootNode, OwnerId); - AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot); - } - - /* Next external file */ - - ExternalFileList = ExternalFileList->Next; - } - - if (ACPI_FAILURE (GlobalStatus)) - { - return (GlobalStatus); - } - - /* Clear external list generated by Scope in external tables */ - - if (AcpiGbl_ExternalFileList) + Status = AdDoExternalFileList (Filename); + if (ACPI_FAILURE (Status)) { - AcpiDmClearExternalList (); + return (Status); } - - /* Load any externals defined in the optional external ref file */ - - AcpiDmGetExternalsFromFile (); } else { @@ -353,7 +254,8 @@ AdAmlDisassemble ( File = fopen (DisasmFilename, "w+"); if (!File) { - fprintf (stderr, "Could not open output file %s\n", DisasmFilename); + fprintf (stderr, "Could not open output file %s\n", + DisasmFilename); Status = AE_ERROR; goto Cleanup; } @@ -363,190 +265,32 @@ AdAmlDisassemble ( *OutFilename = DisasmFilename; - /* ForceAmlDisassembly means to assume the table contains valid AML */ - - if (!AcpiGbl_ForceAmlDisassembly && !AcpiUtIsAmlTable (Table)) - { - AdDisassemblerHeader (Filename, ACPI_IS_DATA_TABLE); - AcpiOsPrintf (" * ACPI Data Table [%4.4s]\n *\n", - Table->Signature); - AcpiOsPrintf (" * Format: [HexOffset DecimalOffset ByteLength] " - "FieldName : FieldValue\n */\n\n"); - - AcpiDmDumpDataTable (Table); - fprintf (stderr, "Acpi Data Table [%4.4s] decoded\n", - Table->Signature); + /* Disassemble all AML tables within the file */ - if (File) - { - fprintf (stderr, "Formatted output: %s - %u bytes\n", - DisasmFilename, CmGetFileSize (File)); - } - } - else + while (ListHead) { - /* Always parse the tables, only option is what to display */ - - Status = AdParseTable (Table, &OwnerId, TRUE, FALSE); + Status = AdDisassembleOneTable (ListHead->Table, + File, Filename, DisasmFilename); if (ACPI_FAILURE (Status)) { - AcpiOsPrintf ("Could not parse ACPI tables, %s\n", - AcpiFormatException (Status)); - goto Cleanup; - } - - if (AslCompilerdebug) - { - AcpiOsPrintf ("/**** Before second load\n"); - - if (File) - { - NsSetupNamespaceListing (File); - NsDisplayNamespace (); - } - AcpiOsPrintf ("*****/\n"); - } - - /* Load namespace from names created within control methods */ - - AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot, - AcpiGbl_RootNode, OwnerId); - - /* - * Cross reference the namespace here, in order to - * generate External() statements - */ - AcpiDmCrossReferenceNamespace (AcpiGbl_ParseOpRoot, - AcpiGbl_RootNode, OwnerId); - - if (AslCompilerdebug) - { - AcpiDmDumpTree (AcpiGbl_ParseOpRoot); - } - - /* Find possible calls to external control methods */ - - AcpiDmFindOrphanMethods (AcpiGbl_ParseOpRoot); - - /* - * If we found any external control methods, we must reparse - * the entire tree with the new information (namely, the - * number of arguments per method) - */ - if (AcpiDmGetExternalMethodCount ()) - { - fprintf (stderr, - "\nFound %u external control methods, " - "reparsing with new information\n", - AcpiDmGetExternalMethodCount ()); - - /* Reparse, rebuild namespace */ - - AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot); - AcpiGbl_ParseOpRoot = NULL; - AcpiNsDeleteNamespaceSubtree (AcpiGbl_RootNode); - - AcpiGbl_RootNode = NULL; - AcpiGbl_RootNodeStruct.Name.Integer = ACPI_ROOT_NAME; - AcpiGbl_RootNodeStruct.DescriptorType = ACPI_DESC_TYPE_NAMED; - AcpiGbl_RootNodeStruct.Type = ACPI_TYPE_DEVICE; - AcpiGbl_RootNodeStruct.Parent = NULL; - AcpiGbl_RootNodeStruct.Child = NULL; - AcpiGbl_RootNodeStruct.Peer = NULL; - AcpiGbl_RootNodeStruct.Object = NULL; - AcpiGbl_RootNodeStruct.Flags = 0; - - Status = AcpiNsRootInitialize (); - - /* New namespace, add the external definitions first */ - - AcpiDmAddExternalsToNamespace (); - - /* Parse the table again. No need to reload it, however */ - - Status = AdParseTable (Table, NULL, FALSE, FALSE); - if (ACPI_FAILURE (Status)) - { - AcpiOsPrintf ("Could not parse ACPI tables, %s\n", - AcpiFormatException (Status)); - goto Cleanup; - } - - /* Cross reference the namespace again */ - - AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot, - AcpiGbl_RootNode, OwnerId); - - AcpiDmCrossReferenceNamespace (AcpiGbl_ParseOpRoot, - AcpiGbl_RootNode, OwnerId); - - if (AslCompilerdebug) - { - AcpiOsPrintf ("/**** After second load and resource conversion\n"); - if (File) - { - NsSetupNamespaceListing (File); - NsDisplayNamespace (); - } - AcpiOsPrintf ("*****/\n"); - - AcpiDmDumpTree (AcpiGbl_ParseOpRoot); - } + break; } - /* - * Now that the namespace is finalized, we can perform namespace - * transforms. - * - * 1) Convert fixed-offset references to resource descriptors - * to symbolic references (Note: modifies namespace) - */ - AcpiDmConvertResourceIndexes (AcpiGbl_ParseOpRoot, AcpiGbl_RootNode); - - /* Optional displays */ - - if (AcpiGbl_DmOpt_Disasm) - { - /* This is the real disassembly */ - - AdDisplayTables (Filename, Table); - - /* Dump hex table if requested (-vt) */ - - AcpiDmDumpDataTable (Table); - - fprintf (stderr, "Disassembly completed\n"); - if (File) - { - fprintf (stderr, "ASL Output: %s - %u bytes\n", - DisasmFilename, CmGetFileSize (File)); - } - - if (Gbl_MapfileFlag) - { - fprintf (stderr, "%14s %s - %u bytes\n", - Gbl_Files[ASL_FILE_MAP_OUTPUT].ShortDescription, - Gbl_Files[ASL_FILE_MAP_OUTPUT].Filename, - FlGetFileSize (ASL_FILE_MAP_OUTPUT)); - } - } + ListHead = ListHead->Next; } Cleanup: - if (Table && !AcpiGbl_ForceAmlDisassembly &&!AcpiUtIsAmlTable (Table)) +// check! +#if 0 + if (Table && !AcpiGbl_ForceAmlDisassembly && !AcpiUtIsAmlTable (Table)) { ACPI_FREE (Table); } +#endif if (File) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Nov 25 21:05:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56E19A37DEA; Wed, 25 Nov 2015 21:05:25 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A7A51F41; Wed, 25 Nov 2015 21:05:24 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPL5OJg028283; Wed, 25 Nov 2015 21:05:24 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPL5OQu028282; Wed, 25 Nov 2015 21:05:24 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201511252105.tAPL5OQu028282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 25 Nov 2015 21:05:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r291334 - vendor-sys/acpica/20151124 X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 21:05:25 -0000 Author: jkim Date: Wed Nov 25 21:05:23 2015 New Revision: 291334 URL: https://svnweb.freebsd.org/changeset/base/291334 Log: Tag ACPICA 20151124. Added: vendor-sys/acpica/20151124/ - copied from r291333, vendor-sys/acpica/dist/ From owner-svn-src-all@freebsd.org Wed Nov 25 21:16:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79B97A37048; Wed, 25 Nov 2015 21:16:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47E151648; Wed, 25 Nov 2015 21:16:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPLGAVm031240; Wed, 25 Nov 2015 21:16:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPLGA3a031239; Wed, 25 Nov 2015 21:16:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511252116.tAPLGA3a031239@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 25 Nov 2015 21:16:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291335 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 21:16:11 -0000 Author: ngie Date: Wed Nov 25 21:16:10 2015 New Revision: 291335 URL: https://svnweb.freebsd.org/changeset/base/291335 Log: Fix building sys/modules/if_enc by adding missing headers X-MFC with: r291292, r291299 (if that ever happens) Pointyhat to: ae Modified: head/sys/net/if_enc.c Modified: head/sys/net/if_enc.c ============================================================================== --- head/sys/net/if_enc.c Wed Nov 25 21:05:23 2015 (r291334) +++ head/sys/net/if_enc.c Wed Nov 25 21:16:10 2015 (r291335) @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -44,6 +45,7 @@ #include #include +#include #include #include #include From owner-svn-src-all@freebsd.org Wed Nov 25 21:43:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D906A37701; Wed, 25 Nov 2015 21:43:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36CFB1769; Wed, 25 Nov 2015 21:43:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPLh6YV040051; Wed, 25 Nov 2015 21:43:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPLh5Yu040046; Wed, 25 Nov 2015 21:43:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511252143.tAPLh5Yu040046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 25 Nov 2015 21:43:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291336 - stable/10/lib/libc/stdio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 21:43:07 -0000 Author: ngie Date: Wed Nov 25 21:43:05 2015 New Revision: 291336 URL: https://svnweb.freebsd.org/changeset/base/291336 Log: MFC r288006,r288031,r288032,r288033: r288006 (by rodrigc): Add declarations to eliminate -Wmissing-prototypes warnings r288031 (by rodrigc): Remove names from some prototypes r288032 (by rodrigc): Remove names from some prototypes r288033 (by rodrigc): Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. Modified: stable/10/lib/libc/stdio/_flock_stub.c stable/10/lib/libc/stdio/fgetwln.c stable/10/lib/libc/stdio/findfp.c stable/10/lib/libc/stdio/getchar.c stable/10/lib/libc/stdio/vfscanf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdio/_flock_stub.c ============================================================================== --- stable/10/lib/libc/stdio/_flock_stub.c Wed Nov 25 21:16:10 2015 (r291335) +++ stable/10/lib/libc/stdio/_flock_stub.c Wed Nov 25 21:43:05 2015 (r291336) @@ -55,6 +55,9 @@ __weak_reference(_flockfile_debug_stub, __weak_reference(_ftrylockfile, ftrylockfile); __weak_reference(_funlockfile, funlockfile); +void _flockfile_debug_stub(FILE *, char *, int); +int _ftrylockfile(FILE *); + void _flockfile(FILE *fp) { Modified: stable/10/lib/libc/stdio/fgetwln.c ============================================================================== --- stable/10/lib/libc/stdio/fgetwln.c Wed Nov 25 21:16:10 2015 (r291335) +++ stable/10/lib/libc/stdio/fgetwln.c Wed Nov 25 21:43:05 2015 (r291336) @@ -40,6 +40,8 @@ __FBSDID("$FreeBSD$"); #include "local.h" #include "xlocale_private.h" +wchar_t *fgetwln_l(FILE * __restrict, size_t *, locale_t); + wchar_t * fgetwln_l(FILE * __restrict fp, size_t *lenp, locale_t locale) { Modified: stable/10/lib/libc/stdio/findfp.c ============================================================================== --- stable/10/lib/libc/stdio/findfp.c Wed Nov 25 21:16:10 2015 (r291335) +++ stable/10/lib/libc/stdio/findfp.c Wed Nov 25 21:43:05 2015 (r291336) @@ -113,7 +113,7 @@ moreglue(int n) * Find a free FILE for fopen et al. */ FILE * -__sfp() +__sfp(void) { FILE *fp; int n; @@ -165,6 +165,7 @@ found: */ __warn_references(f_prealloc, "warning: this program uses f_prealloc(), which is not recommended."); +void f_prealloc(void); void f_prealloc(void) @@ -196,7 +197,7 @@ f_prealloc(void) * The name `_cleanup' is, alas, fairly well known outside stdio. */ void -_cleanup() +_cleanup(void) { /* (void) _fwalk(fclose); */ (void) _fwalk(__sflush); /* `cheating' */ @@ -206,7 +207,7 @@ _cleanup() * __sinit() is called whenever stdio's internal variables must be set up. */ void -__sinit() +__sinit(void) { /* Make sure we clean up on exit. */ Modified: stable/10/lib/libc/stdio/getchar.c ============================================================================== --- stable/10/lib/libc/stdio/getchar.c Wed Nov 25 21:16:10 2015 (r291335) +++ stable/10/lib/libc/stdio/getchar.c Wed Nov 25 21:43:05 2015 (r291336) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #undef getchar_unlocked int -getchar() +getchar(void) { int retval; FLOCKFILE(stdin); Modified: stable/10/lib/libc/stdio/vfscanf.c ============================================================================== --- stable/10/lib/libc/stdio/vfscanf.c Wed Nov 25 21:16:10 2015 (r291335) +++ stable/10/lib/libc/stdio/vfscanf.c Wed Nov 25 21:43:05 2015 (r291336) @@ -814,9 +814,7 @@ match_failure: * considered part of the scanset. */ static const u_char * -__sccl(tab, fmt) - char *tab; - const u_char *fmt; +__sccl(char *tab, const u_char *fmt) { int c, n, v, i; struct xlocale_collate *table = From owner-svn-src-all@freebsd.org Wed Nov 25 22:07:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4077A37A92; Wed, 25 Nov 2015 22:07:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 855EC1F9C; Wed, 25 Nov 2015 22:07:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPM7IY2045865; Wed, 25 Nov 2015 22:07:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPM7IuG045864; Wed, 25 Nov 2015 22:07:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511252207.tAPM7IuG045864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 25 Nov 2015 22:07:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291337 - head/lib/libc/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 22:07:19 -0000 Author: ngie Date: Wed Nov 25 22:07:18 2015 New Revision: 291337 URL: https://svnweb.freebsd.org/changeset/base/291337 Log: Link fclose(3) to fdclose(3) X-MFC with: r285140 MFC after: 3 weeks (need to evaluate whether or not r285140 can be MFCed) Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/stdio/Makefile.inc Modified: head/lib/libc/stdio/Makefile.inc ============================================================================== --- head/lib/libc/stdio/Makefile.inc Wed Nov 25 21:43:05 2015 (r291336) +++ head/lib/libc/stdio/Makefile.inc Wed Nov 25 22:07:18 2015 (r291337) @@ -42,7 +42,7 @@ MAN+= fclose.3 ferror.3 fflush.3 fgetln. stdio.3 tmpnam.3 \ ungetc.3 ungetwc.3 wprintf.3 wscanf.3 -MLINKS+=fclose.3 fcloseall.3 +MLINKS+=fclose.3 fcloseall.3 fclose.3 fdclose.3 MLINKS+=ferror.3 ferror_unlocked.3 \ ferror.3 clearerr.3 ferror.3 clearerr_unlocked.3 \ ferror.3 feof.3 ferror.3 feof_unlocked.3 \ From owner-svn-src-all@freebsd.org Wed Nov 25 22:23:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92149A37E73; Wed, 25 Nov 2015 22:23:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BAE811AB4; Wed, 25 Nov 2015 22:23:46 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.15.2/8.15.2) with ESMTPS id tAPMNiCZ069211 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 26 Nov 2015 01:23:44 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.15.2/8.15.2/Submit) id tAPMNia9069210; Thu, 26 Nov 2015 01:23:44 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 26 Nov 2015 01:23:44 +0300 From: Gleb Smirnoff To: Fabien Thomas Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291301 - head/sys/netinet Message-ID: <20151125222344.GP44598@FreeBSD.org> References: <201511251445.tAPEjilx016268@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201511251445.tAPEjilx016268@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 22:23:47 -0000 Fabien, On Wed, Nov 25, 2015 at 02:45:44PM +0000, Fabien Thomas wrote: F> Author: fabient F> Date: Wed Nov 25 14:45:43 2015 F> New Revision: 291301 F> URL: https://svnweb.freebsd.org/changeset/base/291301 F> F> Log: F> The r241129 description was wrong that the scenario is possible F> only for read locks on pcbs. The same race can happen with write F> lock semantics as well. F> F> The race scenario: F> F> - Two threads (1 and 2) locate pcb with writer semantics (INPLOOKUP_WLOCKPCB) F> and do in_pcbref() on it. F> - 1 and 2 both drop the inp hash lock. F> - Another thread (3) grabs the inp hash lock. Then it runs in_pcbfree(), F> which wlocks the pcb. They must happen faster than 1 or 2 come INP_WLOCK()! F> - 1 and 2 congest in INP_WLOCK(). F> - 3 does in_pcbremlists(), drops hash lock, and runs in_pcbrele_wlocked(), F> which doesn't free the pcb due to two references on it. F> Then it unlocks the pcb. F> - 1 (or 2) gets wlock on the pcb, runs in_pcbrele_wlocked(), which doesn't F> report inp as freed, due to 2 (or 1) still helding extra reference on it. F> The thread tries to do smth with a disconnected pcb and crashes. F> F> Submitted by: emeric.poupon@stormshield.eu F> Reviewed by: gleb@ Note that gleb@FreeBSD.org and glebius@FreeBSD.org are two different persons. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Wed Nov 25 22:32:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76320A37FD2; Wed, 25 Nov 2015 22:32:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4032E1E7B; Wed, 25 Nov 2015 22:32:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPMWGPk054436; Wed, 25 Nov 2015 22:32:16 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPMWGKs054435; Wed, 25 Nov 2015 22:32:16 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511252232.tAPMWGKs054435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 22:32:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291338 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 22:32:17 -0000 Author: bdrewery Date: Wed Nov 25 22:32:16 2015 New Revision: 291338 URL: https://svnweb.freebsd.org/changeset/base/291338 Log: Fix the "common object" handling to not depend on ".o" if SRCS only contains headers. This resulted in 'don't know how to make .o.' errors after the changes in r289286. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk ============================================================================== --- head/share/mk/bsd.progs.mk Wed Nov 25 22:07:18 2015 (r291337) +++ head/share/mk/bsd.progs.mk Wed Nov 25 22:32:16 2015 (r291338) @@ -102,7 +102,10 @@ _PROGS_ALL_SRCS+= ${s} .endfor .endfor .if !empty(_PROGS_COMMON_SRCS) -_PROGS_COMMON_OBJS= ${_PROGS_COMMON_SRCS:N*.h:R:S/$/.o/g} +_PROGS_COMMON_OBJS= ${_PROGS_COMMON_SRCS:M*.h} +.if !empty(_PROGS_COMMON_SRCS:N*.h) +_PROGS_COMMON_OBJS+= ${_PROGS_COMMON_SRCS:N*.h:R:S/$/.o/g} +.endif ${PROGS}: ${_PROGS_COMMON_OBJS} .endif From owner-svn-src-all@freebsd.org Wed Nov 25 22:33:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94A3DA36035; Wed, 25 Nov 2015 22:33:26 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 620CA100A; Wed, 25 Nov 2015 22:33:26 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPMXPQa054529; Wed, 25 Nov 2015 22:33:25 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPMXP3n054528; Wed, 25 Nov 2015 22:33:25 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511252233.tAPMXP3n054528@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 22:33:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291339 - head/lib/libc/tests/rpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 22:33:26 -0000 Author: bdrewery Date: Wed Nov 25 22:33:25 2015 New Revision: 291339 URL: https://svnweb.freebsd.org/changeset/base/291339 Log: Follow-up r291330: h_testbits.h is only needed by xdr_test. X-MFC-With: r291330 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/tests/rpc/Makefile Modified: head/lib/libc/tests/rpc/Makefile ============================================================================== --- head/lib/libc/tests/rpc/Makefile Wed Nov 25 22:32:16 2015 (r291338) +++ head/lib/libc/tests/rpc/Makefile Wed Nov 25 22:33:25 2015 (r291339) @@ -1,6 +1,7 @@ # $FreeBSD$ -SRCS.xdr_test= ${RPCSRC:.x=_xdr.c} t_xdr.c ${RPCSRC:.x=.h} +SRCS.xdr_test= ${RPCSRC:.x=_xdr.c} t_xdr.c ${RPCSRC:.x=.h} \ + h_testbits.h NETBSD_ATF_TESTS_C= rpc_test NETBSD_ATF_TESTS_C+= xdr_test @@ -16,7 +17,6 @@ h_testbits_xdr.c: ${RPCSRC} h_testbits.h CLEANFILES+= ${RPCSRC:.x=.h} ${RPCSRC:.x=.c} h_testbits_xdr.c CFLAGS+= -I${.OBJDIR} -SRCS+= h_testbits.h LDADD+= -lrpcsvc -lutil DPADD+= ${LIBRPCSVC} ${LIBUTIL} From owner-svn-src-all@freebsd.org Wed Nov 25 22:40:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09F68A36169; Wed, 25 Nov 2015 22:40:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB8B6135A; Wed, 25 Nov 2015 22:40:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPMeEjt054808; Wed, 25 Nov 2015 22:40:14 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPMeEe4054807; Wed, 25 Nov 2015 22:40:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511252240.tAPMeEe4054807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 25 Nov 2015 22:40:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291340 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 22:40:16 -0000 Author: bdrewery Date: Wed Nov 25 22:40:14 2015 New Revision: 291340 URL: https://svnweb.freebsd.org/changeset/base/291340 Log: Follow-up r291338 to handle .d, .y and .l files better as well. X-MFC-With: r291338 MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk ============================================================================== --- head/share/mk/bsd.progs.mk Wed Nov 25 22:33:25 2015 (r291339) +++ head/share/mk/bsd.progs.mk Wed Nov 25 22:40:14 2015 (r291340) @@ -102,9 +102,9 @@ _PROGS_ALL_SRCS+= ${s} .endfor .endfor .if !empty(_PROGS_COMMON_SRCS) -_PROGS_COMMON_OBJS= ${_PROGS_COMMON_SRCS:M*.h} -.if !empty(_PROGS_COMMON_SRCS:N*.h) -_PROGS_COMMON_OBJS+= ${_PROGS_COMMON_SRCS:N*.h:R:S/$/.o/g} +_PROGS_COMMON_OBJS= ${_PROGS_COMMON_SRCS:M*.[dhly]} +.if !empty(_PROGS_COMMON_SRCS:N*.[dhly]) +_PROGS_COMMON_OBJS+= ${_PROGS_COMMON_SRCS:N*.[dhly]:R:S/$/.o/g} .endif ${PROGS}: ${_PROGS_COMMON_OBJS} .endif From owner-svn-src-all@freebsd.org Wed Nov 25 22:59:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0683BA36630; Wed, 25 Nov 2015 22:59:43 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F45C1DE4; Wed, 25 Nov 2015 22:59:42 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAPMxflk060478; Wed, 25 Nov 2015 22:59:41 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAPMxfIq060477; Wed, 25 Nov 2015 22:59:41 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201511252259.tAPMxfIq060477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Wed, 25 Nov 2015 22:59:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291341 - head/share/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 22:59:43 -0000 Author: gnn Date: Wed Nov 25 22:59:41 2015 New Revision: 291341 URL: https://svnweb.freebsd.org/changeset/base/291341 Log: Summary: A simple script to print the return value of any function, with or without wild cards. Added: head/share/dtrace/retval.sh (contents, props changed) Added: head/share/dtrace/retval.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/dtrace/retval.sh Wed Nov 25 22:59:41 2015 (r291341) @@ -0,0 +1,43 @@ +#!/bin/sh +# +# Copyright (c) 2015 George V. Neville-Neil +# 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 AUTHORS 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 AUTHORS 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$ +# +# retval.sh - show the return value of any probe named by the user +# +# USAGE: retval.sh name +# +# The name can be a full function name or a wild card name. The +# caller is responsible for handling the escaping of wild cards. +# +/usr/sbin/dtrace -n ' + +#pragma D option quiet + +:::'$1':return { + printf("%s %d\n", probefunc, arg1); +} +' From owner-svn-src-all@freebsd.org Wed Nov 25 23:19:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25E11A369A1; Wed, 25 Nov 2015 23:19:07 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk0-x236.google.com (mail-qk0-x236.google.com [IPv6:2607:f8b0:400d:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CACB414F4; Wed, 25 Nov 2015 23:19:06 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by qkda6 with SMTP id a6so21720315qkd.3; Wed, 25 Nov 2015 15:19:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=Z+/q4y6wWpZIUJi67yDzmVId31p834d56O9BQ6TqDL8=; b=hgip4m8pSoMvfpRS3JxLtolL7VIsQfjzaGSljWmLP2Hwsefwik3lOBpJOCeVSpRjDc m6KjM4gS2xQc80tfOFNihZybg2xa5S82kWws/WOAsJvMUbwVl5v72h/RgLZMofU3DuEw pcdLevUb+AxTRs8aNsuSzmRy4Yw68UNa6X33XSS7en3bog/wpWNENEXmfeuiBDmJNIT/ LJk+nq4vAumbEum5v9bk9LYGye9tW9onRqqFS4UgE9QUm1oR1RtJpzqygnb7PgEaGESV ZPDTUaTKk8NYWM9oFgf4qCGh7OLOd31t2HNbgkoT5S/an1QDknjdiQsn3ztQYYAnvtM+ MjUQ== X-Received: by 10.55.81.3 with SMTP id f3mr31459816qkb.35.1448493545857; Wed, 25 Nov 2015 15:19:05 -0800 (PST) Received: from wkstn-mjohnston.west.isilon.com (c-67-182-131-225.hsd1.wa.comcast.net. [67.182.131.225]) by smtp.gmail.com with ESMTPSA id j64sm3797093qhc.36.2015.11.25.15.19.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Nov 2015 15:19:05 -0800 (PST) Sender: Mark Johnston Date: Wed, 25 Nov 2015 15:20:41 -0800 From: Mark Johnston To: "George V. Neville-Neil" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291341 - head/share/dtrace Message-ID: <20151125231842.GA67865@wkstn-mjohnston.west.isilon.com> References: <201511252259.tAPMxfIq060477@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201511252259.tAPMxfIq060477@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2015 23:19:07 -0000 On Wed, Nov 25, 2015 at 10:59:41PM +0000, George V. Neville-Neil wrote: > Author: gnn > Date: Wed Nov 25 22:59:41 2015 > New Revision: 291341 > URL: https://svnweb.freebsd.org/changeset/base/291341 > > Log: > Summary: A simple script to print the return value of any function, > with or without wild cards. > > Added: > head/share/dtrace/retval.sh (contents, props changed) > > Added: head/share/dtrace/retval.sh > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/share/dtrace/retval.sh Wed Nov 25 22:59:41 2015 (r291341) > @@ -0,0 +1,43 @@ > +#!/bin/sh > +# > +# Copyright (c) 2015 George V. Neville-Neil > +# 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 AUTHORS 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 AUTHORS 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$ > +# > +# retval.sh - show the return value of any probe named by the user > +# > +# USAGE: retval.sh name > +# > +# The name can be a full function name or a wild card name. The > +# caller is responsible for handling the escaping of wild cards. > +# > +/usr/sbin/dtrace -n ' > + > +#pragma D option quiet > + > +:::'$1':return { > + printf("%s %d\n", probefunc, arg1); > +} > +' This can be done without a shell since D has support for command-line arguments. The following should be equivalent: #!/usr/sbin/dtrace -s #pragma D option quiet fbt::$1:return { printf("%s %d\n", probefunc, arg1); } From owner-svn-src-all@freebsd.org Thu Nov 26 00:26:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37E6BA37854; Thu, 26 Nov 2015 00:26:25 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05AC11FE1; Thu, 26 Nov 2015 00:26:24 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQ0QOPo085921; Thu, 26 Nov 2015 00:26:24 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQ0QOYx085920; Thu, 26 Nov 2015 00:26:24 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201511260026.tAQ0QOYx085920@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Thu, 26 Nov 2015 00:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291342 - head/contrib/bmake X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 00:26:25 -0000 Author: sjg Date: Thu Nov 26 00:26:23 2015 New Revision: 291342 URL: https://svnweb.freebsd.org/changeset/base/291342 Log: ParseTrackInput: do not access beyond end of buffer. Reviewed by: dim Modified: head/contrib/bmake/parse.c Modified: head/contrib/bmake/parse.c ============================================================================== --- head/contrib/bmake/parse.c Wed Nov 25 22:59:41 2015 (r291341) +++ head/contrib/bmake/parse.c Thu Nov 26 00:26:23 2015 (r291342) @@ -2390,15 +2390,19 @@ static void ParseTrackInput(const char *name) { char *old; + char *ep; char *fp = NULL; size_t name_len = strlen(name); old = Var_Value(MAKE_MAKEFILES, VAR_GLOBAL, &fp); if (old) { + ep = old + strlen(old) - name_len; /* does it contain name? */ for (; old != NULL; old = strchr(old, ' ')) { if (*old == ' ') old++; + if (old >= ep) + break; /* cannot contain name */ if (memcmp(old, name, name_len) == 0 && (old[name_len] == 0 || old[name_len] == ' ')) goto cleanup; From owner-svn-src-all@freebsd.org Thu Nov 26 00:48:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F02FA37DB2; Thu, 26 Nov 2015 00:48:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A0361B7D; Thu, 26 Nov 2015 00:48:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQ0m95R091756; Thu, 26 Nov 2015 00:48:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQ0m9OI091755; Thu, 26 Nov 2015 00:48:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511260048.tAQ0m9OI091755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 26 Nov 2015 00:48: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: r291343 - stable/10/lib/libc/tests/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 00:48:10 -0000 Author: ngie Date: Thu Nov 26 00:48:09 2015 New Revision: 291343 URL: https://svnweb.freebsd.org/changeset/base/291343 Log: Fix bad MFC (r291175) Replace SRCTOP with the relevant path via .CURDIR Pointyhat to: ngie Sponsored by: EMC / Isilon Storage Division Modified: stable/10/lib/libc/tests/net/Makefile Modified: stable/10/lib/libc/tests/net/Makefile ============================================================================== --- stable/10/lib/libc/tests/net/Makefile Thu Nov 26 00:26:23 2015 (r291342) +++ stable/10/lib/libc/tests/net/Makefile Thu Nov 26 00:48:09 2015 (r291343) @@ -29,7 +29,7 @@ DPADD.h_nsd_recurse+= ${LIBPTHREAD} LDADD.h_nsd_recurse+= -lpthread CLEANFILES+= aton_ether_subr.c -aton_ether_subr.c: gen_ether_subr ${SRCTOP}/sys/net/if_ethersubr.c +aton_ether_subr.c: gen_ether_subr ${.CURDIR:H:H:H:H}/sys/net/if_ethersubr.c ${HOST_SH} ${.ALLSRC} ${.TARGET} .include "../Makefile.netbsd-tests" From owner-svn-src-all@freebsd.org Thu Nov 26 00:53:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7403AA37F0D; Thu, 26 Nov 2015 00:53:41 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1967E1EB7; Thu, 26 Nov 2015 00:53:41 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQ0reFG094564; Thu, 26 Nov 2015 00:53:40 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQ0reXZ094563; Thu, 26 Nov 2015 00:53:40 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201511260053.tAQ0reXZ094563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Thu, 26 Nov 2015 00:53:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291344 - head/share/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 00:53:41 -0000 Author: gnn Date: Thu Nov 26 00:53:39 2015 New Revision: 291344 URL: https://svnweb.freebsd.org/changeset/base/291344 Log: Replace the retval.sh shell script with a native DTrace script. Suggested by: markj Added: head/share/dtrace/retval (contents, props changed) Deleted: head/share/dtrace/retval.sh Added: head/share/dtrace/retval ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/dtrace/retval Thu Nov 26 00:53:39 2015 (r291344) @@ -0,0 +1,42 @@ +#!/usr/sbin/dtrace -s +/*- + * Copyright (c) 2015 George V. Neville-Neil + * 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 AUTHORS 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 AUTHORS 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$ + * + * retval - show the return value of any probe named by the user + * + * USAGE: retval name + * + * The name can be a full function name or a wild card name. The + * caller is responsible for handling the escaping of wild cards. + */ + +#pragma D option quiet + +fbt::$1:return { + printf("%s %d\n", probefunc, arg1); +} + From owner-svn-src-all@freebsd.org Thu Nov 26 00:54:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B02CA37F5E; Thu, 26 Nov 2015 00:54:21 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: from smtp.hungerhost.com (smtp.hungerhost.com [216.38.51.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 317B91025; Thu, 26 Nov 2015 00:54:20 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: from pool-108-54-164-204.nycmny.fios.verizon.net ([108.54.164.204]:50429 helo=[192.168.1.6]) by vps.hungerhost.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.86) (envelope-from ) id 1a1kpH-0007zN-7i; Wed, 25 Nov 2015 19:54:19 -0500 From: "George Neville-Neil" To: "Mark Johnston" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291341 - head/share/dtrace Date: Wed, 25 Nov 2015 19:54:18 -0500 Message-ID: <9DC14292-288A-4BD0-910B-7363AE63BA15@freebsd.org> In-Reply-To: <20151125231842.GA67865@wkstn-mjohnston.west.isilon.com> References: <201511252259.tAPMxfIq060477@repo.freebsd.org> <20151125231842.GA67865@wkstn-mjohnston.west.isilon.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Content-Transfer-Encoding: quoted-printable X-Mailer: MailMate (1.9.3r5184) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - freebsd.org X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com X-Authenticated-Sender: vps.hungerhost.com: gnn@neville-neil.com X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 00:54:21 -0000 On 25 Nov 2015, at 18:20, Mark Johnston wrote: > On Wed, Nov 25, 2015 at 10:59:41PM +0000, George V. Neville-Neil = > wrote: >> Author: gnn >> Date: Wed Nov 25 22:59:41 2015 >> New Revision: 291341 >> URL: https://svnweb.freebsd.org/changeset/base/291341 >> >> Log: >> Summary: A simple script to print the return value of any function, >> with or without wild cards. >> >> Added: >> head/share/dtrace/retval.sh (contents, props changed) >> >> Added: head/share/dtrace/retval.sh >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/share/dtrace/retval.sh Wed Nov 25 22:59:41 2015 (r291341) >> @@ -0,0 +1,43 @@ >> +#!/bin/sh >> +# >> +# Copyright (c) 2015 George V. Neville-Neil >> +# 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 AUTHORS 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 AUTHORS 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$ >> +# >> +# retval.sh - show the return value of any probe named by the user >> +# >> +# USAGE: retval.sh name >> +# >> +# The name can be a full function name or a wild card name. The >> +# caller is responsible for handling the escaping of wild cards. >> +# >> +/usr/sbin/dtrace -n ' >> + >> +#pragma D option quiet >> + >> +:::'$1':return { >> + printf("%s %d\n", probefunc, arg1); >> +} >> +' > > This can be done without a shell since D has support for command-line > arguments. The following should be equivalent: > > #!/usr/sbin/dtrace -s > > #pragma D option quiet > > fbt::$1:return > { > printf("%s %d\n", probefunc, arg1); > } Done. Although if we ever want to expand this script it'll have to move = back to shell. DTrace has very poor options handling overall. Best, George From owner-svn-src-all@freebsd.org Thu Nov 26 00:56:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8C7DA37FC1; Thu, 26 Nov 2015 00:56:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4DA211CE; Thu, 26 Nov 2015 00:56:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQ0u7mD094719; Thu, 26 Nov 2015 00:56:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQ0u7JY094718; Thu, 26 Nov 2015 00:56:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511260056.tAQ0u7JY094718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 26 Nov 2015 00:56: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: r291345 - stable/10/lib/libc/tests/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 00:56:09 -0000 Author: ngie Date: Thu Nov 26 00:56:07 2015 New Revision: 291345 URL: https://svnweb.freebsd.org/changeset/base/291345 Log: MFC r291172: Use __MAKE_SHELL instead of HOST_SHELL when generating aton_ether_subr.c (HOST_SHELL is used in NetBSD) This fixes permission denied issues when gen_ether_subr is not executable Reported by: José Pérez Suggested by: bdrewery, sjg Modified: stable/10/lib/libc/tests/net/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/net/Makefile ============================================================================== --- stable/10/lib/libc/tests/net/Makefile Thu Nov 26 00:53:39 2015 (r291344) +++ stable/10/lib/libc/tests/net/Makefile Thu Nov 26 00:56:07 2015 (r291345) @@ -30,7 +30,7 @@ LDADD.h_nsd_recurse+= -lpthread CLEANFILES+= aton_ether_subr.c aton_ether_subr.c: gen_ether_subr ${.CURDIR:H:H:H:H}/sys/net/if_ethersubr.c - ${HOST_SH} ${.ALLSRC} ${.TARGET} + ${__MAKE_SHELL} ${.ALLSRC} ${.TARGET} .include "../Makefile.netbsd-tests" From owner-svn-src-all@freebsd.org Thu Nov 26 01:14:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB1C2A35750; Thu, 26 Nov 2015 01:14:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E2091AF0; Thu, 26 Nov 2015 01:14:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQ1EWJU002587; Thu, 26 Nov 2015 01:14:32 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQ1ERjr002537; Thu, 26 Nov 2015 01:14:27 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511260114.tAQ1ERjr002537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 26 Nov 2015 01:14:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291347 - in head: libexec/hyperv share/dtrace share/examples share/examples/smbfs share/examples/smbfs/print share/keys/pkg/trusted share/mk share/security share/vt/keymaps usr.sbin/bs... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 01:14:34 -0000 Author: bdrewery Date: Thu Nov 26 01:14:27 2015 New Revision: 291347 URL: https://svnweb.freebsd.org/changeset/base/291347 Log: META MODE: These need object directories to handle staging. Sponsored by: EMC / Isilon Storage Division Modified: head/libexec/hyperv/Makefile head/share/dtrace/Makefile head/share/examples/Makefile head/share/examples/smbfs/Makefile head/share/examples/smbfs/print/Makefile head/share/keys/pkg/trusted/Makefile head/share/mk/Makefile head/share/security/Makefile head/share/vt/keymaps/Makefile head/usr.sbin/bsdconfig/console/Makefile head/usr.sbin/bsdconfig/console/include/Makefile head/usr.sbin/bsdconfig/diskmgmt/Makefile head/usr.sbin/bsdconfig/diskmgmt/include/Makefile head/usr.sbin/bsdconfig/docsinstall/Makefile head/usr.sbin/bsdconfig/docsinstall/include/Makefile head/usr.sbin/bsdconfig/dot/Makefile head/usr.sbin/bsdconfig/dot/include/Makefile head/usr.sbin/bsdconfig/examples/Makefile head/usr.sbin/bsdconfig/include/Makefile head/usr.sbin/bsdconfig/includes/Makefile head/usr.sbin/bsdconfig/includes/include/Makefile head/usr.sbin/bsdconfig/mouse/Makefile head/usr.sbin/bsdconfig/mouse/include/Makefile head/usr.sbin/bsdconfig/networking/Makefile head/usr.sbin/bsdconfig/networking/include/Makefile head/usr.sbin/bsdconfig/networking/share/Makefile head/usr.sbin/bsdconfig/packages/Makefile head/usr.sbin/bsdconfig/packages/include/Makefile head/usr.sbin/bsdconfig/password/Makefile head/usr.sbin/bsdconfig/password/include/Makefile head/usr.sbin/bsdconfig/password/share/Makefile head/usr.sbin/bsdconfig/security/Makefile head/usr.sbin/bsdconfig/security/include/Makefile head/usr.sbin/bsdconfig/share/Makefile head/usr.sbin/bsdconfig/share/media/Makefile head/usr.sbin/bsdconfig/share/packages/Makefile head/usr.sbin/bsdconfig/startup/Makefile head/usr.sbin/bsdconfig/startup/include/Makefile head/usr.sbin/bsdconfig/startup/share/Makefile head/usr.sbin/bsdconfig/timezone/Makefile head/usr.sbin/bsdconfig/timezone/include/Makefile head/usr.sbin/bsdconfig/timezone/share/Makefile head/usr.sbin/bsdconfig/ttys/Makefile head/usr.sbin/bsdconfig/ttys/include/Makefile head/usr.sbin/bsdconfig/usermgmt/Makefile head/usr.sbin/bsdconfig/usermgmt/include/Makefile head/usr.sbin/bsdconfig/usermgmt/share/Makefile Modified: head/libexec/hyperv/Makefile ============================================================================== --- head/libexec/hyperv/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/libexec/hyperv/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -5,6 +5,5 @@ BINDIR= /usr/libexec/hyperv SCRIPTS= hv_set_ifconfig hv_get_dns_info hv_get_dhcp_info -NO_OBJ= .include Modified: head/share/dtrace/Makefile ============================================================================== --- head/share/dtrace/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/share/dtrace/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -26,6 +26,4 @@ SCRIPTS= blocking \ SCRIPTSDIR= ${SHAREDIR}/dtrace -NO_OBJ= - .include Modified: head/share/examples/Makefile ============================================================================== --- head/share/examples/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/share/examples/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -187,8 +187,6 @@ XFILES= BSD_daemon/FreeBSD.pfa \ BINDIR= ${SHAREDIR}/examples -NO_OBJ= - .if ${MK_HAST} != "no" LDIRS+= hast XFILES+= hast/ucarp.sh \ Modified: head/share/examples/smbfs/Makefile ============================================================================== --- head/share/examples/smbfs/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/share/examples/smbfs/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,6 +1,5 @@ # $FreeBSD$ -NO_OBJ= FILESDIR= ${SHAREDIR}/examples/smbfs FILES= dot.nsmbrc Modified: head/share/examples/smbfs/print/Makefile ============================================================================== --- head/share/examples/smbfs/print/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/share/examples/smbfs/print/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,6 +1,5 @@ # $FreeBSD$ -NO_OBJ= FILESDIR= ${SHAREDIR}/examples/smbfs/print FILES= lj6l ljspool printcap.sample tolj Modified: head/share/keys/pkg/trusted/Makefile ============================================================================== --- head/share/keys/pkg/trusted/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/share/keys/pkg/trusted/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILES= pkg.freebsd.org.2013102301 FILESDIR= ${SHAREDIR}/keys/pkg/trusted Modified: head/share/mk/Makefile ============================================================================== --- head/share/mk/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/share/mk/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -58,7 +58,6 @@ FILES= \ sys.dependfile.mk \ version_gen.awk -NO_OBJ= FILESDIR= ${BINDIR}/mk .if ${MK_TESTS} != "no" Modified: head/share/security/Makefile ============================================================================== --- head/share/security/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/share/security/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,6 @@ # $FreeBSD$ FILES= lomac-policy.contexts -NO_OBJ= FILESDIR= ${BINDIR}/security .include "${.CURDIR}/../Makefile.inc" Modified: head/share/vt/keymaps/Makefile ============================================================================== --- head/share/vt/keymaps/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/share/vt/keymaps/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -88,6 +88,4 @@ FILES= INDEX.keymaps \ FILESDIR= ${SHAREDIR}/vt/keymaps -NO_OBJ= - .include Modified: head/usr.sbin/bsdconfig/console/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/console/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/console/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - SUBDIR= include FILESDIR= ${LIBEXECDIR}/bsdconfig/080.console Modified: head/usr.sbin/bsdconfig/console/include/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/console/include/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/console/include/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${LIBEXECDIR}/bsdconfig/080.console/include FILES= messages.subr Modified: head/usr.sbin/bsdconfig/diskmgmt/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/diskmgmt/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/diskmgmt/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - SUBDIR= include FILESDIR= ${LIBEXECDIR}/bsdconfig/050.diskmgmt Modified: head/usr.sbin/bsdconfig/diskmgmt/include/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/diskmgmt/include/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/diskmgmt/include/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${LIBEXECDIR}/bsdconfig/050.diskmgmt/include FILES= messages.subr Modified: head/usr.sbin/bsdconfig/docsinstall/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/docsinstall/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/docsinstall/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - SUBDIR= include FILESDIR= ${LIBEXECDIR}/bsdconfig/020.docsinstall Modified: head/usr.sbin/bsdconfig/docsinstall/include/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/docsinstall/include/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/docsinstall/include/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${LIBEXECDIR}/bsdconfig/020.docsinstall/include FILES= messages.subr Modified: head/usr.sbin/bsdconfig/dot/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/dot/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/dot/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - SUBDIR= include FILESDIR= ${LIBEXECDIR}/bsdconfig/dot Modified: head/usr.sbin/bsdconfig/dot/include/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/dot/include/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/dot/include/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${LIBEXECDIR}/bsdconfig/dot/include FILES= messages.subr Modified: head/usr.sbin/bsdconfig/examples/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/examples/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/examples/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${SHAREDIR}/examples/bsdconfig FILES= add_some_packages.sh browse_packages_http.sh bsdconfigrc Modified: head/usr.sbin/bsdconfig/include/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/include/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/include/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${LIBEXECDIR}/bsdconfig/include FILES= bsdconfig.hlp media.hlp messages.subr network_device.hlp \ options.hlp tcp.hlp usage.hlp Modified: head/usr.sbin/bsdconfig/includes/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/includes/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/includes/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - SUBDIR= include FILESDIR= ${LIBEXECDIR}/bsdconfig/includes Modified: head/usr.sbin/bsdconfig/includes/include/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/includes/include/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/includes/include/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${LIBEXECDIR}/bsdconfig/includes/include FILES= messages.subr Modified: head/usr.sbin/bsdconfig/mouse/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/mouse/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/mouse/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - SUBDIR= include FILESDIR= ${LIBEXECDIR}/bsdconfig/110.mouse Modified: head/usr.sbin/bsdconfig/mouse/include/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/mouse/include/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/mouse/include/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${LIBEXECDIR}/bsdconfig/110.mouse/include FILES= messages.subr Modified: head/usr.sbin/bsdconfig/networking/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/networking/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/networking/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - SUBDIR= include share FILESDIR= ${LIBEXECDIR}/bsdconfig/120.networking Modified: head/usr.sbin/bsdconfig/networking/include/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/networking/include/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/networking/include/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${LIBEXECDIR}/bsdconfig/120.networking/include FILES= messages.subr Modified: head/usr.sbin/bsdconfig/networking/share/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/networking/share/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${SHAREDIR}/bsdconfig/networking FILES= common.subr device.subr hostname.subr ipaddr.subr media.subr \ netmask.subr resolv.subr routing.subr services.subr Modified: head/usr.sbin/bsdconfig/packages/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/packages/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/packages/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - SUBDIR= include FILESDIR= ${LIBEXECDIR}/bsdconfig/030.packages Modified: head/usr.sbin/bsdconfig/packages/include/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/packages/include/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/packages/include/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${LIBEXECDIR}/bsdconfig/030.packages/include FILES= messages.subr Modified: head/usr.sbin/bsdconfig/password/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/password/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/password/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - SUBDIR= include share FILESDIR= ${LIBEXECDIR}/bsdconfig/040.password Modified: head/usr.sbin/bsdconfig/password/include/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/password/include/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/password/include/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${LIBEXECDIR}/bsdconfig/040.password/include FILES= messages.subr Modified: head/usr.sbin/bsdconfig/password/share/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/password/share/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/password/share/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${SHAREDIR}/bsdconfig/password FILES= password.subr Modified: head/usr.sbin/bsdconfig/security/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/security/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/security/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - SUBDIR= include FILESDIR= ${LIBEXECDIR}/bsdconfig/130.security Modified: head/usr.sbin/bsdconfig/security/include/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/security/include/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/security/include/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${LIBEXECDIR}/bsdconfig/130.security/include FILES= messages.subr securelevel.hlp Modified: head/usr.sbin/bsdconfig/share/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/share/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/share/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - SUBDIR= media packages FILESDIR= ${SHAREDIR}/bsdconfig Modified: head/usr.sbin/bsdconfig/share/media/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/share/media/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/share/media/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${SHAREDIR}/bsdconfig/media FILES= any.subr cdrom.subr common.subr directory.subr dos.subr \ floppy.subr ftp.subr http.subr httpproxy.subr network.subr \ Modified: head/usr.sbin/bsdconfig/share/packages/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/share/packages/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/share/packages/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${SHAREDIR}/bsdconfig/packages FILES= categories.subr index.subr musthavepkg.subr packages.subr Modified: head/usr.sbin/bsdconfig/startup/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/startup/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/startup/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - SUBDIR= include share FILESDIR= ${LIBEXECDIR}/bsdconfig/140.startup Modified: head/usr.sbin/bsdconfig/startup/include/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/startup/include/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/startup/include/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${LIBEXECDIR}/bsdconfig/140.startup/include FILES= messages.subr Modified: head/usr.sbin/bsdconfig/startup/share/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/startup/share/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/startup/share/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${SHAREDIR}/bsdconfig/startup FILES= rcconf.subr rcedit.subr rcvar.subr Modified: head/usr.sbin/bsdconfig/timezone/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/timezone/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/timezone/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - SUBDIR= include share FILESDIR= ${LIBEXECDIR}/bsdconfig/090.timezone Modified: head/usr.sbin/bsdconfig/timezone/include/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/timezone/include/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/timezone/include/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${LIBEXECDIR}/bsdconfig/090.timezone/include FILES= messages.subr Modified: head/usr.sbin/bsdconfig/timezone/share/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/timezone/share/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/timezone/share/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${SHAREDIR}/bsdconfig/timezone FILES= continents.subr countries.subr iso3166.subr menus.subr \ zones.subr Modified: head/usr.sbin/bsdconfig/ttys/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/ttys/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/ttys/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - SUBDIR= include FILESDIR= ${LIBEXECDIR}/bsdconfig/150.ttys Modified: head/usr.sbin/bsdconfig/ttys/include/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/ttys/include/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/ttys/include/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${LIBEXECDIR}/bsdconfig/150.ttys/include FILES= messages.subr Modified: head/usr.sbin/bsdconfig/usermgmt/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/usermgmt/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - SUBDIR= include share FILESDIR= ${LIBEXECDIR}/bsdconfig/070.usermgmt Modified: head/usr.sbin/bsdconfig/usermgmt/include/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/include/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/usermgmt/include/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${LIBEXECDIR}/bsdconfig/070.usermgmt/include FILES= messages.subr usermgmt.hlp Modified: head/usr.sbin/bsdconfig/usermgmt/share/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/share/Makefile Thu Nov 26 01:05:54 2015 (r291346) +++ head/usr.sbin/bsdconfig/usermgmt/share/Makefile Thu Nov 26 01:14:27 2015 (r291347) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${SHAREDIR}/bsdconfig/usermgmt FILES= group.subr group_input.subr user.subr user_input.subr From owner-svn-src-all@freebsd.org Thu Nov 26 01:14:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FBF1A3579C; Thu, 26 Nov 2015 01:14:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E17A1C59; Thu, 26 Nov 2015 01:14:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQ1EgMR002655; Thu, 26 Nov 2015 01:14:42 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQ1Eexi002634; Thu, 26 Nov 2015 01:14:40 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511260114.tAQ1Eexi002634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 26 Nov 2015 01:14:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291348 - in head: gnu/usr.bin/cc/cc1 gnu/usr.bin/cc/cc1plus lib/libwrap libexec/hyperv libexec/rtld-elf libexec/tcpd usr.bin/makewhatis usr.bin/vgrind usr.bin/xlint/lint1 usr.bin/xlint... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 01:14:43 -0000 Author: bdrewery Date: Thu Nov 26 01:14:40 2015 New Revision: 291348 URL: https://svnweb.freebsd.org/changeset/base/291348 Log: Use LIBEXECDIR for /usr/libexec. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/gnu/usr.bin/cc/cc1/Makefile head/gnu/usr.bin/cc/cc1plus/Makefile head/lib/libwrap/Makefile head/libexec/hyperv/Makefile head/libexec/rtld-elf/Makefile head/libexec/tcpd/Makefile head/usr.bin/makewhatis/Makefile head/usr.bin/vgrind/Makefile head/usr.bin/xlint/lint1/Makefile head/usr.bin/xlint/lint2/Makefile head/usr.sbin/bsdinstall/distextract/Makefile head/usr.sbin/bsdinstall/distfetch/Makefile head/usr.sbin/bsdinstall/partedit/Makefile head/usr.sbin/bsdinstall/scripts/Makefile head/usr.sbin/lpr/filters/Makefile head/usr.sbin/rpc.yppasswdd/Makefile head/usr.sbin/sendmail/Makefile head/usr.sbin/tcpdchk/Makefile head/usr.sbin/tcpdmatch/Makefile Modified: head/gnu/usr.bin/cc/cc1/Makefile ============================================================================== --- head/gnu/usr.bin/cc/cc1/Makefile Thu Nov 26 01:14:27 2015 (r291347) +++ head/gnu/usr.bin/cc/cc1/Makefile Thu Nov 26 01:14:40 2015 (r291348) @@ -9,7 +9,7 @@ MAN= PROG= cc1 SRCS= main.c c-parser.c c-lang.c -BINDIR= /usr/libexec +BINDIR= ${LIBEXECDIR} .if ${MK_SHARED_TOOLCHAIN} == "no" NO_SHARED?=yes .endif Modified: head/gnu/usr.bin/cc/cc1plus/Makefile ============================================================================== --- head/gnu/usr.bin/cc/cc1plus/Makefile Thu Nov 26 01:14:27 2015 (r291347) +++ head/gnu/usr.bin/cc/cc1plus/Makefile Thu Nov 26 01:14:40 2015 (r291348) @@ -15,7 +15,7 @@ SRCS+= main.c cp-lang.c c-opts.c call.c search.c semantics.c tree.c typeck.c typeck2.c optimize.c \ cp-objcp-common.c cp-gimplify.c tree-mudflap.c -BINDIR= /usr/libexec +BINDIR= ${LIBEXECDIR} .if ${MK_SHARED_TOOLCHAIN} == "no" NO_SHARED?=yes .endif Modified: head/lib/libwrap/Makefile ============================================================================== --- head/lib/libwrap/Makefile Thu Nov 26 01:14:27 2015 (r291347) +++ head/lib/libwrap/Makefile Thu Nov 26 01:14:40 2015 (r291348) @@ -17,7 +17,7 @@ MLINKS= hosts_access.3 hosts_ctl.3 \ .PATH: ${.CURDIR}/../../contrib/tcp_wrappers CFLAGS+=-DFACILITY=LOG_AUTH -DHOSTS_ACCESS -DNETGROUP -DDAEMON_UMASK=022 \ - -DREAL_DAEMON_DIR=\"/usr/libexec\" -DPROCESS_OPTIONS \ + -DREAL_DAEMON_DIR=\"${LIBEXECDIR}\" -DPROCESS_OPTIONS \ -DSEVERITY=LOG_INFO -DRFC931_TIMEOUT=10 \ -DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\" \ -DSYS_ERRLIST_DEFINED -DALWAYS_HOSTNAME -DUSE_STRSEP -DPROCESS_OPTIONS Modified: head/libexec/hyperv/Makefile ============================================================================== --- head/libexec/hyperv/Makefile Thu Nov 26 01:14:27 2015 (r291347) +++ head/libexec/hyperv/Makefile Thu Nov 26 01:14:40 2015 (r291348) @@ -2,7 +2,7 @@ .PATH: ${.CURDIR}/../../contrib/hyperv/tools/scripts -BINDIR= /usr/libexec/hyperv +BINDIR= ${LIBEXECDIR}/hyperv SCRIPTS= hv_set_ifconfig hv_get_dns_info hv_get_dhcp_info Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Thu Nov 26 01:14:27 2015 (r291347) +++ head/libexec/rtld-elf/Makefile Thu Nov 26 01:14:40 2015 (r291348) @@ -32,7 +32,7 @@ WARNS?= 2 INSTALLFLAGS= -C -b PRECIOUSPROG= BINDIR= /libexec -SYMLINKS= ${BINDIR}/${PROG} /usr/libexec/${PROG} +SYMLINKS= ${BINDIR}/${PROG} ${LIBEXECDIR}/${PROG} MLINKS= rtld.1 ld-elf.so.1.1 \ rtld.1 ld.so.1 Modified: head/libexec/tcpd/Makefile ============================================================================== --- head/libexec/tcpd/Makefile Thu Nov 26 01:14:27 2015 (r291347) +++ head/libexec/tcpd/Makefile Thu Nov 26 01:14:40 2015 (r291348) @@ -7,7 +7,7 @@ PROG= tcpd MAN= tcpd.8 CSTD?= c89 -CFLAGS+=-DREAL_DAEMON_DIR=\"/usr/libexec\" \ +CFLAGS+=-DREAL_DAEMON_DIR=\"${LIBEXECDIR}\" \ -DSEVERITY=LOG_INFO -DRFC931_TIMEOUT=10 \ -DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\" \ -DFACILITY=LOG_DAEMON Modified: head/usr.bin/makewhatis/Makefile ============================================================================== --- head/usr.bin/makewhatis/Makefile Thu Nov 26 01:14:27 2015 (r291347) +++ head/usr.bin/makewhatis/Makefile Thu Nov 26 01:14:40 2015 (r291348) @@ -4,7 +4,7 @@ PROG= makewhatis LIBADD= z SCRIPTS= makewhatis.local.sh MAN= makewhatis.1 makewhatis.local.8 -SCRIPTSDIR= /usr/libexec +SCRIPTSDIR= ${LIBEXECDIR} LINKS= ${SCRIPTSDIR}/makewhatis.local ${SCRIPTSDIR}/catman.local MLINKS= makewhatis.local.8 catman.local.8 Modified: head/usr.bin/vgrind/Makefile ============================================================================== --- head/usr.bin/vgrind/Makefile Thu Nov 26 01:14:27 2015 (r291347) +++ head/usr.bin/vgrind/Makefile Thu Nov 26 01:14:40 2015 (r291348) @@ -13,7 +13,7 @@ MAN= vgrind.1 vgrindefs.5 WARNS?= 3 -BINDIR= /usr/libexec +BINDIR= ${LIBEXECDIR} SCRIPTSDIR=/usr/bin CLEANFILES= vgrindefs.src.db Modified: head/usr.bin/xlint/lint1/Makefile ============================================================================== --- head/usr.bin/xlint/lint1/Makefile Thu Nov 26 01:14:27 2015 (r291347) +++ head/usr.bin/xlint/lint1/Makefile Thu Nov 26 01:14:40 2015 (r291348) @@ -11,7 +11,7 @@ LIBADD= l m CFLAGS+= -I. -I${.CURDIR} LINTFLAGS=-aehpz -BINDIR= /usr/libexec +BINDIR= ${LIBEXECDIR} .PATH: ${.CURDIR}/../common Modified: head/usr.bin/xlint/lint2/Makefile ============================================================================== --- head/usr.bin/xlint/lint2/Makefile Thu Nov 26 01:14:27 2015 (r291347) +++ head/usr.bin/xlint/lint2/Makefile Thu Nov 26 01:14:40 2015 (r291348) @@ -9,6 +9,6 @@ MAN= CFLAGS+=-I${.CURDIR}/../lint1 LINTFLAGS=-abehrz -BINDIR= /usr/libexec +BINDIR= ${LIBEXECDIR} .include Modified: head/usr.sbin/bsdinstall/distextract/Makefile ============================================================================== --- head/usr.sbin/bsdinstall/distextract/Makefile Thu Nov 26 01:14:27 2015 (r291347) +++ head/usr.sbin/bsdinstall/distextract/Makefile Thu Nov 26 01:14:40 2015 (r291348) @@ -1,6 +1,6 @@ # $FreeBSD$ -BINDIR= /usr/libexec/bsdinstall +BINDIR= ${LIBEXECDIR}/bsdinstall PROG= distextract LIBADD= archive dpv figpar ncursesw dialog m Modified: head/usr.sbin/bsdinstall/distfetch/Makefile ============================================================================== --- head/usr.sbin/bsdinstall/distfetch/Makefile Thu Nov 26 01:14:27 2015 (r291347) +++ head/usr.sbin/bsdinstall/distfetch/Makefile Thu Nov 26 01:14:40 2015 (r291348) @@ -1,6 +1,6 @@ # $FreeBSD$ -BINDIR= /usr/libexec/bsdinstall +BINDIR= ${LIBEXECDIR}/bsdinstall PROG= distfetch LIBADD= fetch ncursesw dialog m Modified: head/usr.sbin/bsdinstall/partedit/Makefile ============================================================================== --- head/usr.sbin/bsdinstall/partedit/Makefile Thu Nov 26 01:14:27 2015 (r291347) +++ head/usr.sbin/bsdinstall/partedit/Makefile Thu Nov 26 01:14:40 2015 (r291348) @@ -1,6 +1,6 @@ # $FreeBSD$ -BINDIR= /usr/libexec/bsdinstall +BINDIR= ${LIBEXECDIR}/bsdinstall PROG= partedit LINKS= ${BINDIR}/partedit ${BINDIR}/autopart \ ${BINDIR}/partedit ${BINDIR}/scriptedpart Modified: head/usr.sbin/bsdinstall/scripts/Makefile ============================================================================== --- head/usr.sbin/bsdinstall/scripts/Makefile Thu Nov 26 01:14:27 2015 (r291347) +++ head/usr.sbin/bsdinstall/scripts/Makefile Thu Nov 26 01:14:40 2015 (r291348) @@ -3,7 +3,7 @@ SCRIPTS= auto adduser checksum config docsinstall entropy hostname jail \ keymap mirrorselect mount netconfig netconfig_ipv4 netconfig_ipv6 \ rootpass script services time umount wlanconfig zfsboot -BINDIR= /usr/libexec/bsdinstall +BINDIR= ${LIBEXECDIR}/bsdinstall MAN= Modified: head/usr.sbin/lpr/filters/Makefile ============================================================================== --- head/usr.sbin/lpr/filters/Makefile Thu Nov 26 01:14:27 2015 (r291347) +++ head/usr.sbin/lpr/filters/Makefile Thu Nov 26 01:14:40 2015 (r291348) @@ -1,7 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ -BINDIR= /usr/libexec/lpr +BINDIR= ${LIBEXECDIR}/lpr PROG= lpf MAN= Modified: head/usr.sbin/rpc.yppasswdd/Makefile ============================================================================== --- head/usr.sbin/rpc.yppasswdd/Makefile Thu Nov 26 01:14:27 2015 (r291347) +++ head/usr.sbin/rpc.yppasswdd/Makefile Thu Nov 26 01:14:40 2015 (r291348) @@ -7,7 +7,7 @@ RPCDIR= ${DESTDIR}/usr/include/rpcsvc PROG= rpc.yppasswdd SCRIPTS=yppwupdate -SCRIPTSDIR= /usr/libexec +SCRIPTSDIR= ${LIBEXECDIR} MAN= rpc.yppasswdd.8 SRCS= util.c yp_access.c yp_dblookup.c yp_dbwrite.c \ yp_error.c yppasswdd_main.c yppasswdd_server.c ypxfr_misc.c ${GENSRCS} Modified: head/usr.sbin/sendmail/Makefile ============================================================================== --- head/usr.sbin/sendmail/Makefile Thu Nov 26 01:14:27 2015 (r291347) +++ head/usr.sbin/sendmail/Makefile Thu Nov 26 01:14:40 2015 (r291348) @@ -7,7 +7,7 @@ SENDMAIL_DIR=${.CURDIR}/../../contrib/se SMDIR= ${SENDMAIL_DIR}/src .PATH: ${SMDIR} -BINDIR= /usr/libexec/sendmail +BINDIR= ${LIBEXECDIR}/sendmail PROG= sendmail MAN= mailq.1 newaliases.1 aliases.5 sendmail.8 Modified: head/usr.sbin/tcpdchk/Makefile ============================================================================== --- head/usr.sbin/tcpdchk/Makefile Thu Nov 26 01:14:27 2015 (r291347) +++ head/usr.sbin/tcpdchk/Makefile Thu Nov 26 01:14:40 2015 (r291348) @@ -8,7 +8,7 @@ PROG= tcpdchk MAN= tcpdchk.8 SRCS= tcpdchk.c fakelog.c inetcf.c scaffold.c -CFLAGS+=-DREAL_DAEMON_DIR=\"/usr/libexec\" \ +CFLAGS+=-DREAL_DAEMON_DIR=\"${LIBEXECDIR}\" \ -DSEVERITY=LOG_INFO -DRFC931_TIMEOUT=10 -DPROCESS_OPTIONS \ -DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\" .if ${MK_INET6_SUPPORT} != "no" Modified: head/usr.sbin/tcpdmatch/Makefile ============================================================================== --- head/usr.sbin/tcpdmatch/Makefile Thu Nov 26 01:14:27 2015 (r291347) +++ head/usr.sbin/tcpdmatch/Makefile Thu Nov 26 01:14:40 2015 (r291348) @@ -8,7 +8,7 @@ PROG= tcpdmatch MAN= tcpdmatch.8 SRCS= tcpdmatch.c fakelog.c inetcf.c scaffold.c -CFLAGS+=-DREAL_DAEMON_DIR=\"/usr/libexec\" \ +CFLAGS+=-DREAL_DAEMON_DIR=\"${LIBEXECDIR}\" \ -DSEVERITY=LOG_INFO -DRFC931_TIMEOUT=10 .if ${MK_INET6_SUPPORT} != "no" CFLAGS+=-DINET6 From owner-svn-src-all@freebsd.org Thu Nov 26 01:47:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1F65A35EA5; Thu, 26 Nov 2015 01:47:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6C20176D; Thu, 26 Nov 2015 01:47:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQ1luJl011336; Thu, 26 Nov 2015 01:47:56 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQ1luhH011332; Thu, 26 Nov 2015 01:47:56 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511260147.tAQ1luhH011332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 26 Nov 2015 01:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291349 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 01:47:58 -0000 Author: bdrewery Date: Thu Nov 26 01:47:56 2015 New Revision: 291349 URL: https://svnweb.freebsd.org/changeset/base/291349 Log: Standardize on OBJTOP in and outside of META MODE. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.obj.mk head/share/mk/local.dirdeps.mk head/share/mk/netbsd-tests.test.mk head/share/mk/src.libnames.mk Modified: head/share/mk/bsd.obj.mk ============================================================================== --- head/share/mk/bsd.obj.mk Thu Nov 26 01:14:40 2015 (r291348) +++ head/share/mk/bsd.obj.mk Thu Nov 26 01:47:56 2015 (r291349) @@ -55,10 +55,13 @@ CANONICALOBJDIR= ${.OBJDIR} CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} .elif defined(MAKEOBJDIR) && ${MAKEOBJDIR:M/*} != "" CANONICALOBJDIR:=${MAKEOBJDIR} +OBJTOP?= ${MAKEOBJDIR} .else CANONICALOBJDIR:=/usr/obj${.CURDIR} .endif +OBJTOP?= ${.OBJDIR:S,${.CURDIR},,}${SRCTOP} + # # Warn of unorthodox object directory. # Modified: head/share/mk/local.dirdeps.mk ============================================================================== --- head/share/mk/local.dirdeps.mk Thu Nov 26 01:14:40 2015 (r291348) +++ head/share/mk/local.dirdeps.mk Thu Nov 26 01:47:56 2015 (r291349) @@ -40,7 +40,7 @@ ____: # allowed to be built though since they are never installed. _need_host_libs= .for lib in ${_INTERNALLIBS} -_need_host_libs+= ${LIB${lib:tu}DIR:S,^${ROOTOBJDIR}/,,} +_need_host_libs+= ${LIB${lib:tu}DIR:S,^${OBJTOP}/,,} .endfor N_host_libs:= ${cd ${SRCTOP} && echo lib/lib*:L:sh:${_need_host_libs:${M_ListToSkip}}:${M_ListToSkip}} Modified: head/share/mk/netbsd-tests.test.mk ============================================================================== --- head/share/mk/netbsd-tests.test.mk Thu Nov 26 01:14:40 2015 (r291348) +++ head/share/mk/netbsd-tests.test.mk Thu Nov 26 01:47:56 2015 (r291349) @@ -3,8 +3,6 @@ .if !target(__netbsd_tests.test.mk__) __netbsd_tests.test.mk__: -OBJTOP?= ${.OBJDIR:S/${RELDIR}//} - TESTSRC?= ${SRCTOP}/contrib/netbsd-tests/${RELDIR:H} .if !exists(${TESTSRC}/) Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Thu Nov 26 01:14:40 2015 (r291348) +++ head/share/mk/src.libnames.mk Thu Nov 26 01:47:56 2015 (r291349) @@ -12,12 +12,6 @@ ____: .include -.if ${.OBJDIR:S,${.CURDIR},,} != ${.OBJDIR} -ROOTOBJDIR= ${.OBJDIR:S,${.CURDIR},,}${SRCTOP} -.elif defined(OBJTOP) && ${.OBJDIR:M${OBJTOP}*} != "" -ROOTOBJDIR= ${OBJTOP} -.endif - _PRIVATELIBS= \ atf_c \ atf_cxx \ @@ -311,127 +305,127 @@ LDADD+= ${LDADD_${_l}} .error Missing ${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/DPADD_/} variable add "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//}" to _LIBRARIES, _INTERNALLIBS, or _PRIVATELIBS and define "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/LIB/:tu}". .endif -LIBELFTCDIR= ${ROOTOBJDIR}/lib/libelftc +LIBELFTCDIR= ${OBJTOP}/lib/libelftc LIBELFTC?= ${LIBELFTCDIR}/libelftc.a -LIBREADLINEDIR= ${ROOTOBJDIR}/gnu/lib/libreadline/readline +LIBREADLINEDIR= ${OBJTOP}/gnu/lib/libreadline/readline LIBREADLINE?= ${LIBREADLINEDIR}/libreadline.a -LIBOPENBSDDIR= ${ROOTOBJDIR}/lib/libopenbsd +LIBOPENBSDDIR= ${OBJTOP}/lib/libopenbsd LIBOPENBSD?= ${LIBOPENBSDDIR}/libopenbsd.a -LIBSMDIR= ${ROOTOBJDIR}/lib/libsm +LIBSMDIR= ${OBJTOP}/lib/libsm LIBSM?= ${LIBSMDIR}/libsm.a -LIBSMDBDIR= ${ROOTOBJDIR}/lib/libsmdb +LIBSMDBDIR= ${OBJTOP}/lib/libsmdb LIBSMDB?= ${LIBSMDBDIR}/libsmdb.a -LIBSMUTILDIR= ${ROOTOBJDIR}/lib/libsmutil +LIBSMUTILDIR= ${OBJTOP}/lib/libsmutil LIBSMUTIL?= ${LIBSMDBDIR}/libsmutil.a -LIBNETBSDDIR?= ${ROOTOBJDIR}/lib/libnetbsd +LIBNETBSDDIR?= ${OBJTOP}/lib/libnetbsd LIBNETBSD?= ${LIBNETBSDDIR}/libnetbsd.a -LIBVERSDIR?= ${ROOTOBJDIR}/kerberos5/lib/libvers +LIBVERSDIR?= ${OBJTOP}/kerberos5/lib/libvers LIBVERS?= ${LIBVERSDIR}/libvers.a -LIBSLDIR= ${ROOTOBJDIR}/kerberos5/lib/libsl +LIBSLDIR= ${OBJTOP}/kerberos5/lib/libsl LIBSL?= ${LIBSLDIR}/libsl.a -LIBIPFDIR= ${ROOTOBJDIR}/sbin/ipf/libipf +LIBIPFDIR= ${OBJTOP}/sbin/ipf/libipf LIBIPF?= ${LIBIPFDIR}/libipf.a -LIBTELNETDIR= ${ROOTOBJDIR}/lib/libtelnet +LIBTELNETDIR= ${OBJTOP}/lib/libtelnet LIBTELNET?= ${LIBTELNETDIR}/libtelnet.a -LIBCRONDIR= ${ROOTOBJDIR}/usr.sbin/cron/lib +LIBCRONDIR= ${OBJTOP}/usr.sbin/cron/lib LIBCRON?= ${LIBCRONDIR}/libcron.a -LIBNTPDIR= ${ROOTOBJDIR}/usr.sbin/ntp/libntp +LIBNTPDIR= ${OBJTOP}/usr.sbin/ntp/libntp LIBNTP?= ${LIBNTPDIR}/libntp.a -LIBNTPEVENTDIR= ${ROOTOBJDIR}/usr.sbin/ntp/libntpevent +LIBNTPEVENTDIR= ${OBJTOP}/usr.sbin/ntp/libntpevent LIBNTPEVENT?= ${LIBNTPEVENTDIR}/libntpevent.a -LIBOPTSDIR= ${ROOTOBJDIR}/usr.sbin/ntp/libopts +LIBOPTSDIR= ${OBJTOP}/usr.sbin/ntp/libopts LIBOTPS?= ${LIBOPTSDIR}/libopts.a -LIBPARSEDIR= ${ROOTOBJDIR}/usr.sbin/ntp/libparse +LIBPARSEDIR= ${OBJTOP}/usr.sbin/ntp/libparse LIBPARSE?= ${LIBPARSEDIR}/libparse.a -LIBLPRDIR= ${ROOTOBJDIR}/usr.sbin/lpr/common_source +LIBLPRDIR= ${OBJTOP}/usr.sbin/lpr/common_source LIBLPR?= ${LIBOPTSDIR}/liblpr.a -LIBFIFOLOGDIR= ${ROOTOBJDIR}/usr.sbin/fifolog/lib +LIBFIFOLOGDIR= ${OBJTOP}/usr.sbin/fifolog/lib LIBFIFOLOG?= ${LIBOPTSDIR}/libfifolog.a -LIBBSNMPTOOLSDIR= ${ROOTOBJDIR}/usr.sbin/bsnmpd/tools/libbsnmptools +LIBBSNMPTOOLSDIR= ${OBJTOP}/usr.sbin/bsnmpd/tools/libbsnmptools LIBBSNMPTOOLS?= ${LIBBSNMPTOOLSDIR}/libbsnmptools.a -LIBAMUDIR= ${ROOTOBJDIR}/usr.sbin/amd/libamu +LIBAMUDIR= ${OBJTOP}/usr.sbin/amd/libamu LIBAMU?= ${LIBAMUDIR}/libamu/libamu.a # Define a directory for each library. This is useful for adding -L in when # not using a --sysroot or for meta mode bootstrapping when there is no # Makefile.depend. These are sorted by directory. -LIBAVLDIR= ${ROOTOBJDIR}/cddl/lib/libavl -LIBCTFDIR= ${ROOTOBJDIR}/cddl/lib/libctf -LIBDTRACEDIR= ${ROOTOBJDIR}/cddl/lib/libdtrace -LIBNVPAIRDIR= ${ROOTOBJDIR}/cddl/lib/libnvpair -LIBUMEMDIR= ${ROOTOBJDIR}/cddl/lib/libumem -LIBUUTILDIR= ${ROOTOBJDIR}/cddl/lib/libuutil -LIBZFSDIR= ${ROOTOBJDIR}/cddl/lib/libzfs -LIBZFS_COREDIR= ${ROOTOBJDIR}/cddl/lib/libzfs_core -LIBZPOOLDIR= ${ROOTOBJDIR}/cddl/lib/libzpool -LIBDIALOGDIR= ${ROOTOBJDIR}/gnu/lib/libdialog -LIBGCOVDIR= ${ROOTOBJDIR}/gnu/lib/libgcov -LIBGOMPDIR= ${ROOTOBJDIR}/gnu/lib/libgomp -LIBGNUREGEXDIR= ${ROOTOBJDIR}/gnu/lib/libregex -LIBSSPDIR= ${ROOTOBJDIR}/gnu/lib/libssp -LIBSSP_NONSHAREDDIR= ${ROOTOBJDIR}/gnu/lib/libssp/libssp_nonshared -LIBSUPCPLUSPLUSDIR= ${ROOTOBJDIR}/gnu/lib/libsupc++ -LIBASN1DIR= ${ROOTOBJDIR}/kerberos5/lib/libasn1 -LIBGSSAPI_KRB5DIR= ${ROOTOBJDIR}/kerberos5/lib/libgssapi_krb5 -LIBGSSAPI_NTLMDIR= ${ROOTOBJDIR}/kerberos5/lib/libgssapi_ntlm -LIBGSSAPI_SPNEGODIR= ${ROOTOBJDIR}/kerberos5/lib/libgssapi_spnego -LIBHDBDIR= ${ROOTOBJDIR}/kerberos5/lib/libhdb -LIBHEIMBASEDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimbase -LIBHEIMIPCCDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimipcc -LIBHEIMIPCSDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimipcs -LIBHEIMNTLMDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimntlm -LIBHX509DIR= ${ROOTOBJDIR}/kerberos5/lib/libhx509 -LIBKADM5CLNTDIR= ${ROOTOBJDIR}/kerberos5/lib/libkadm5clnt -LIBKADM5SRVDIR= ${ROOTOBJDIR}/kerberos5/lib/libkadm5srv -LIBKAFS5DIR= ${ROOTOBJDIR}/kerberos5/lib/libkafs5 -LIBKDCDIR= ${ROOTOBJDIR}/kerberos5/lib/libkdc -LIBKRB5DIR= ${ROOTOBJDIR}/kerberos5/lib/libkrb5 -LIBROKENDIR= ${ROOTOBJDIR}/kerberos5/lib/libroken -LIBWINDDIR= ${ROOTOBJDIR}/kerberos5/lib/libwind -LIBALIASDIR= ${ROOTOBJDIR}/lib/libalias/libalias -LIBBLOCKSRUNTIMEDIR= ${ROOTOBJDIR}/lib/libblocksruntime -LIBBSNMPDIR= ${ROOTOBJDIR}/lib/libbsnmp/libbsnmp -LIBBSDXMLDIR= ${ROOTOBJDIR}/lib/libexpat -LIBKVMDIR= ${ROOTOBJDIR}/lib/libkvm -LIBPTHREADDIR= ${ROOTOBJDIR}/lib/libthr -LIBMDIR= ${ROOTOBJDIR}/lib/msun -LIBFORMDIR= ${ROOTOBJDIR}/lib/ncurses/form -LIBFORMLIBWDIR= ${ROOTOBJDIR}/lib/ncurses/formw -LIBMENUDIR= ${ROOTOBJDIR}/lib/ncurses/menu -LIBMENULIBWDIR= ${ROOTOBJDIR}/lib/ncurses/menuw -LIBTERMCAPDIR= ${ROOTOBJDIR}/lib/ncurses/ncurses -LIBTERMCAPWDIR= ${ROOTOBJDIR}/lib/ncurses/ncursesw -LIBPANELDIR= ${ROOTOBJDIR}/lib/ncurses/panel -LIBPANELWDIR= ${ROOTOBJDIR}/lib/ncurses/panelw -LIBCRYPTODIR= ${ROOTOBJDIR}/secure/lib/libcrypto -LIBSSHDIR= ${ROOTOBJDIR}/secure/lib/libssh -LIBSSLDIR= ${ROOTOBJDIR}/secure/lib/libssl -LIBTEKENDIR= ${ROOTOBJDIR}/sys/teken/libteken -LIBEGACYDIR= ${ROOTOBJDIR}/tools/build -LIBLNDIR= ${ROOTOBJDIR}/usr.bin/lex/lib +LIBAVLDIR= ${OBJTOP}/cddl/lib/libavl +LIBCTFDIR= ${OBJTOP}/cddl/lib/libctf +LIBDTRACEDIR= ${OBJTOP}/cddl/lib/libdtrace +LIBNVPAIRDIR= ${OBJTOP}/cddl/lib/libnvpair +LIBUMEMDIR= ${OBJTOP}/cddl/lib/libumem +LIBUUTILDIR= ${OBJTOP}/cddl/lib/libuutil +LIBZFSDIR= ${OBJTOP}/cddl/lib/libzfs +LIBZFS_COREDIR= ${OBJTOP}/cddl/lib/libzfs_core +LIBZPOOLDIR= ${OBJTOP}/cddl/lib/libzpool +LIBDIALOGDIR= ${OBJTOP}/gnu/lib/libdialog +LIBGCOVDIR= ${OBJTOP}/gnu/lib/libgcov +LIBGOMPDIR= ${OBJTOP}/gnu/lib/libgomp +LIBGNUREGEXDIR= ${OBJTOP}/gnu/lib/libregex +LIBSSPDIR= ${OBJTOP}/gnu/lib/libssp +LIBSSP_NONSHAREDDIR= ${OBJTOP}/gnu/lib/libssp/libssp_nonshared +LIBSUPCPLUSPLUSDIR= ${OBJTOP}/gnu/lib/libsupc++ +LIBASN1DIR= ${OBJTOP}/kerberos5/lib/libasn1 +LIBGSSAPI_KRB5DIR= ${OBJTOP}/kerberos5/lib/libgssapi_krb5 +LIBGSSAPI_NTLMDIR= ${OBJTOP}/kerberos5/lib/libgssapi_ntlm +LIBGSSAPI_SPNEGODIR= ${OBJTOP}/kerberos5/lib/libgssapi_spnego +LIBHDBDIR= ${OBJTOP}/kerberos5/lib/libhdb +LIBHEIMBASEDIR= ${OBJTOP}/kerberos5/lib/libheimbase +LIBHEIMIPCCDIR= ${OBJTOP}/kerberos5/lib/libheimipcc +LIBHEIMIPCSDIR= ${OBJTOP}/kerberos5/lib/libheimipcs +LIBHEIMNTLMDIR= ${OBJTOP}/kerberos5/lib/libheimntlm +LIBHX509DIR= ${OBJTOP}/kerberos5/lib/libhx509 +LIBKADM5CLNTDIR= ${OBJTOP}/kerberos5/lib/libkadm5clnt +LIBKADM5SRVDIR= ${OBJTOP}/kerberos5/lib/libkadm5srv +LIBKAFS5DIR= ${OBJTOP}/kerberos5/lib/libkafs5 +LIBKDCDIR= ${OBJTOP}/kerberos5/lib/libkdc +LIBKRB5DIR= ${OBJTOP}/kerberos5/lib/libkrb5 +LIBROKENDIR= ${OBJTOP}/kerberos5/lib/libroken +LIBWINDDIR= ${OBJTOP}/kerberos5/lib/libwind +LIBALIASDIR= ${OBJTOP}/lib/libalias/libalias +LIBBLOCKSRUNTIMEDIR= ${OBJTOP}/lib/libblocksruntime +LIBBSNMPDIR= ${OBJTOP}/lib/libbsnmp/libbsnmp +LIBBSDXMLDIR= ${OBJTOP}/lib/libexpat +LIBKVMDIR= ${OBJTOP}/lib/libkvm +LIBPTHREADDIR= ${OBJTOP}/lib/libthr +LIBMDIR= ${OBJTOP}/lib/msun +LIBFORMDIR= ${OBJTOP}/lib/ncurses/form +LIBFORMLIBWDIR= ${OBJTOP}/lib/ncurses/formw +LIBMENUDIR= ${OBJTOP}/lib/ncurses/menu +LIBMENULIBWDIR= ${OBJTOP}/lib/ncurses/menuw +LIBTERMCAPDIR= ${OBJTOP}/lib/ncurses/ncurses +LIBTERMCAPWDIR= ${OBJTOP}/lib/ncurses/ncursesw +LIBPANELDIR= ${OBJTOP}/lib/ncurses/panel +LIBPANELWDIR= ${OBJTOP}/lib/ncurses/panelw +LIBCRYPTODIR= ${OBJTOP}/secure/lib/libcrypto +LIBSSHDIR= ${OBJTOP}/secure/lib/libssh +LIBSSLDIR= ${OBJTOP}/secure/lib/libssl +LIBTEKENDIR= ${OBJTOP}/sys/teken/libteken +LIBEGACYDIR= ${OBJTOP}/tools/build +LIBLNDIR= ${OBJTOP}/usr.bin/lex/lib # Default other library directories to lib/libNAME. .for lib in ${_LIBRARIES} -LIB${lib:tu}DIR?= ${ROOTOBJDIR}/lib/lib${lib} +LIB${lib:tu}DIR?= ${OBJTOP}/lib/lib${lib} .endfor .endif # !target(____) From owner-svn-src-all@freebsd.org Thu Nov 26 01:51:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96D89A35F58; Thu, 26 Nov 2015 01:51:18 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 88A8A1A23; Thu, 26 Nov 2015 01:51:18 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 8708F1071; Thu, 26 Nov 2015 01:51:18 +0000 (UTC) Date: Thu, 26 Nov 2015 01:51:18 +0000 From: Alexey Dokuchaev To: "George V. Neville-Neil" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291344 - head/share/dtrace Message-ID: <20151126015118.GA54260@FreeBSD.org> References: <201511260053.tAQ0reXZ094563@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201511260053.tAQ0reXZ094563@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 01:51:18 -0000 On Thu, Nov 26, 2015 at 12:53:40AM +0000, George V. Neville-Neil wrote: > New Revision: 291344 > URL: https://svnweb.freebsd.org/changeset/base/291344 > > Log: > Replace the retval.sh shell script with a native DTrace script. > > Suggested by: markj > > Added: > head/share/dtrace/retval (contents, props changed) > Deleted: > head/share/dtrace/retval.sh I think it should've been repomoved (that'd also allow to see the diff between two implementations easily), but I think everyone by now had noticed that svn's "cope" and "move" commands are often ignored by our dear developers. :-( I don't have an explanation to this phenomenon. ./danfe From owner-svn-src-all@freebsd.org Thu Nov 26 01:54:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F1E5A360E2; Thu, 26 Nov 2015 01:54:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CB461C6C; Thu, 26 Nov 2015 01:54:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQ1s9dH014023; Thu, 26 Nov 2015 01:54:09 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQ1s9wR014022; Thu, 26 Nov 2015 01:54:09 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511260154.tAQ1s9wR014022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 26 Nov 2015 01:54:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291350 - head/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 01:54:10 -0000 Author: bdrewery Date: Thu Nov 26 01:54:09 2015 New Revision: 291350 URL: https://svnweb.freebsd.org/changeset/base/291350 Log: Always build libevent, which fixes the build for usr.sbin/ypldap after r291230. The dependency for ypldap is only with WITH_NIS, but libevent is small enough to not warrant the extra logic and maintenance cost here so just always build it. Sponsored by: EMC / Isilon Storage Division Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Thu Nov 26 01:47:56 2015 (r291349) +++ head/lib/Makefile Thu Nov 26 01:54:09 2015 (r291350) @@ -48,7 +48,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libdwarf \ libedit \ ${_libelftc} \ - ${_libevent} \ + libevent \ libexecinfo \ libexpat \ libfetch \ @@ -240,10 +240,6 @@ _libnetgraph= libnetgraph _libypclnt= libypclnt .endif -.if ${MK_PF} != "no" -_libevent= libevent -.endif - .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" _libsmb= libsmb _libvgl= libvgl From owner-svn-src-all@freebsd.org Thu Nov 26 01:54:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E865CA3615C; Thu, 26 Nov 2015 01:54:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8AF61DD1; Thu, 26 Nov 2015 01:54:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQ1swmx014093; Thu, 26 Nov 2015 01:54:58 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQ1swWi014092; Thu, 26 Nov 2015 01:54:58 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511260154.tAQ1swWi014092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 26 Nov 2015 01:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291351 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 01:55:00 -0000 Author: adrian Date: Thu Nov 26 01:54:58 2015 New Revision: 291351 URL: https://svnweb.freebsd.org/changeset/base/291351 Log: [net80211] decode WPA cipher config '0' as "clear cipher config". wpa_supplicant actually calls the wpa ioctl with cipher 0 as part of the teardown process and this returns an ioctl error. It's required as part of the (hopefully!) upcoming encrypted IBSS support which does indeed do the above as part of interface setup and then exits ungracefully when it gets an ioctl error. (I'll fix wpa_supplicant in a later commit as part of other work.) Modified: head/sys/net80211/ieee80211_ioctl.c Modified: head/sys/net80211/ieee80211_ioctl.c ============================================================================== --- head/sys/net80211/ieee80211_ioctl.c Thu Nov 26 01:54:09 2015 (r291350) +++ head/sys/net80211/ieee80211_ioctl.c Thu Nov 26 01:54:58 2015 (r291351) @@ -2807,6 +2807,9 @@ ieee80211_ioctl_set80211(struct ieee8021 /* XXX verify ciphers available */ flags = vap->iv_flags & ~IEEE80211_F_WPA; switch (ireq->i_val) { + case 0: + /* wpa_supplicant calls this to clear the WPA config */ + break; case 1: if (!(vap->iv_caps & IEEE80211_C_WPA1)) return EOPNOTSUPP; From owner-svn-src-all@freebsd.org Thu Nov 26 01:58:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D64DBA361D4; Thu, 26 Nov 2015 01:58:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FC391F69; Thu, 26 Nov 2015 01:58:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQ1woFL014275; Thu, 26 Nov 2015 01:58:50 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQ1woSo014274; Thu, 26 Nov 2015 01:58:50 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511260158.tAQ1woSo014274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 26 Nov 2015 01:58:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291352 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 01:58:51 -0000 Author: adrian Date: Thu Nov 26 01:58:50 2015 New Revision: 291352 URL: https://svnweb.freebsd.org/changeset/base/291352 Log: [ifconfig] handle IBSS mediatype correctly. Right now net80211 is configured as type IBSS but then treats it as mediatype ADHOC. This doesn't change that; it just correctly handles being given a mediatype of IBSS. Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Thu Nov 26 01:54:58 2015 (r291351) +++ head/sbin/ifconfig/ifieee80211.c Thu Nov 26 01:58:50 2015 (r291352) @@ -4085,6 +4085,8 @@ get80211opmode(int s) } if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP) return IEEE80211_M_HOSTAP; + if (ifmr.ifm_current & IFM_IEEE80211_IBSS) + return IEEE80211_M_IBSS; if (ifmr.ifm_current & IFM_IEEE80211_MONITOR) return IEEE80211_M_MONITOR; if (ifmr.ifm_current & IFM_IEEE80211_MBSS) From owner-svn-src-all@freebsd.org Thu Nov 26 02:00:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71892A3624C; Thu, 26 Nov 2015 02:00:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F30E113A; Thu, 26 Nov 2015 02:00:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQ20bii014405; Thu, 26 Nov 2015 02:00:37 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQ20bXu014404; Thu, 26 Nov 2015 02:00:37 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511260200.tAQ20bXu014404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 26 Nov 2015 02:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291353 - head/contrib/wpa/src/drivers X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 02:00:38 -0000 Author: adrian Date: Thu Nov 26 02:00:37 2015 New Revision: 291353 URL: https://svnweb.freebsd.org/changeset/base/291353 Log: [wpa] handle IBSS mediatype. same as the previous commit to ifconfig - handle a mediatype of IBSS without failing/complaining. Internally inside wpa_s things treat IBSS/ADHOC as equivalent. Modified: head/contrib/wpa/src/drivers/driver_bsd.c Modified: head/contrib/wpa/src/drivers/driver_bsd.c ============================================================================== --- head/contrib/wpa/src/drivers/driver_bsd.c Thu Nov 26 01:58:50 2015 (r291352) +++ head/contrib/wpa/src/drivers/driver_bsd.c Thu Nov 26 02:00:37 2015 (r291353) @@ -1497,6 +1497,8 @@ get80211opmode(struct bsd_driver_data *d } if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP) return IEEE80211_M_HOSTAP; + if (ifmr.ifm_current & IFM_IEEE80211_IBSS) + return IEEE80211_M_IBSS; if (ifmr.ifm_current & IFM_IEEE80211_MONITOR) return IEEE80211_M_MONITOR; #ifdef IEEE80211_M_MBSS From owner-svn-src-all@freebsd.org Thu Nov 26 02:24:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 867C1A36816; Thu, 26 Nov 2015 02:24:47 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31A051D61; Thu, 26 Nov 2015 02:24:47 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQ2OkNW023026; Thu, 26 Nov 2015 02:24:46 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQ2Ok8T023023; Thu, 26 Nov 2015 02:24:46 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201511260224.tAQ2Ok8T023023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Thu, 26 Nov 2015 02:24: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: r291355 - in stable/10/sys: netinet netipsec X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 02:24:47 -0000 Author: gnn Date: Thu Nov 26 02:24:45 2015 New Revision: 291355 URL: https://svnweb.freebsd.org/changeset/base/291355 Log: MFC 290028: Turning on IPSEC used to introduce a slight amount of performance degradation (7%) for host host TCP connections over 10Gbps links, even when there were no secuirty policies in place. There is no change in performance on 1Gbps network links. Testing GENERIC vs. GENERIC-NOIPSEC vs. GENERIC with this change shows that the new code removes any overhead introduced by having IPSEC always in the kernel. Differential Revision: D3993 Sponsored by: Rubicon Communications (Netgate) Modified: stable/10/sys/netinet/ip_ipsec.c stable/10/sys/netinet/tcp_subr.c stable/10/sys/netipsec/ipsec.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/ip_ipsec.c ============================================================================== --- stable/10/sys/netinet/ip_ipsec.c Thu Nov 26 02:16:25 2015 (r291354) +++ stable/10/sys/netinet/ip_ipsec.c Thu Nov 26 02:24:45 2015 (r291355) @@ -230,6 +230,10 @@ ip_ipsec_output(struct mbuf **m, struct struct secpolicy *sp = NULL; struct tdb_ident *tdbi; struct m_tag *mtag; + + if (!key_havesp(IPSEC_DIR_OUTBOUND)) + return 0; + /* * Check the security policy (SP) for the packet and, if * required, do IPsec-related processing. There are two Modified: stable/10/sys/netinet/tcp_subr.c ============================================================================== --- stable/10/sys/netinet/tcp_subr.c Thu Nov 26 02:16:25 2015 (r291354) +++ stable/10/sys/netinet/tcp_subr.c Thu Nov 26 02:24:45 2015 (r291355) @@ -1947,7 +1947,8 @@ ipsec_hdrsiz_tcp(struct tcpcb *tp) #endif struct tcphdr *th; - if ((tp == NULL) || ((inp = tp->t_inpcb) == NULL)) + if ((tp == NULL) || ((inp = tp->t_inpcb) == NULL) || + (!key_havesp(IPSEC_DIR_OUTBOUND))) return (0); m = m_gethdr(M_NOWAIT, MT_DATA); if (!m) Modified: stable/10/sys/netipsec/ipsec.c ============================================================================== --- stable/10/sys/netipsec/ipsec.c Thu Nov 26 02:16:25 2015 (r291354) +++ stable/10/sys/netipsec/ipsec.c Thu Nov 26 02:24:45 2015 (r291355) @@ -1273,6 +1273,9 @@ ipsec46_in_reject(struct mbuf *m, struct int error; int result; + if (!key_havesp(IPSEC_DIR_INBOUND)) + return 0; + IPSEC_ASSERT(m != NULL, ("null mbuf")); /* @@ -1405,6 +1408,9 @@ ipsec_hdrsiz(struct mbuf *m, u_int dir, int error; size_t size; + if (!key_havesp(dir)) + return 0; + IPSEC_ASSERT(m != NULL, ("null mbuf")); /* Get SP for this packet. From owner-svn-src-all@freebsd.org Thu Nov 26 07:03:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC5BEA38352; Thu, 26 Nov 2015 07:03:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 777221AC5; Thu, 26 Nov 2015 07:03:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQ73QK9003159; Thu, 26 Nov 2015 07:03:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQ73QYO003157; Thu, 26 Nov 2015 07:03:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511260703.tAQ73QYO003157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 26 Nov 2015 07:03:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291358 - in head/tools/regression/lib/libc: nss resolv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 07:03:27 -0000 Author: ngie Date: Thu Nov 26 07:03:26 2015 New Revision: 291358 URL: https://svnweb.freebsd.org/changeset/base/291358 Log: Remove cnftp.bjpu.edu.cn (it no longer resolves) Add localhost to resolv/mach for parity with nss/mach MFC after: 3 days Modified: head/tools/regression/lib/libc/nss/mach head/tools/regression/lib/libc/resolv/mach Modified: head/tools/regression/lib/libc/nss/mach ============================================================================== --- head/tools/regression/lib/libc/nss/mach Thu Nov 26 06:57:10 2015 (r291357) +++ head/tools/regression/lib/libc/nss/mach Thu Nov 26 07:03:26 2015 (r291358) @@ -11,7 +11,6 @@ antioche.antioche.eu.org boulder.tele.dk centaurus.4web.cz chur.math.ntnu.no -cnftp.bjpu.edu.cn console.netbsd.org cvs.fi.netbsd.org cvs.mikrolahti.fi Modified: head/tools/regression/lib/libc/resolv/mach ============================================================================== --- head/tools/regression/lib/libc/resolv/mach Thu Nov 26 06:57:10 2015 (r291357) +++ head/tools/regression/lib/libc/resolv/mach Thu Nov 26 07:03:26 2015 (r291358) @@ -1,3 +1,5 @@ +# $FreeBSD$ +localhost above.warped.net anoncvs.cirr.com anoncvs.isc.netbsd.org @@ -9,7 +11,6 @@ antioche.antioche.eu.org boulder.tele.dk centaurus.4web.cz chur.math.ntnu.no -cnftp.bjpu.edu.cn console.netbsd.org cvs.fi.netbsd.org cvs.mikrolahti.fi From owner-svn-src-all@freebsd.org Thu Nov 26 07:04:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0BEFA38407; Thu, 26 Nov 2015 07:04:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 699071C6D; Thu, 26 Nov 2015 07:04:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQ73xMa003220; Thu, 26 Nov 2015 07:03:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQ73xI2003219; Thu, 26 Nov 2015 07:03:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511260703.tAQ73xI2003219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 26 Nov 2015 07:03:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291359 - head/tools/regression/lib/libc/resolv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 07:04:00 -0000 Author: ngie Date: Thu Nov 26 07:03:59 2015 New Revision: 291359 URL: https://svnweb.freebsd.org/changeset/base/291359 Log: Skip over lines that start with # (comments) MFC after: 3 days Modified: head/tools/regression/lib/libc/resolv/resolv.c Modified: head/tools/regression/lib/libc/resolv/resolv.c ============================================================================== --- head/tools/regression/lib/libc/resolv/resolv.c Thu Nov 26 07:03:26 2015 (r291358) +++ head/tools/regression/lib/libc/resolv/resolv.c Thu Nov 26 07:03:59 2015 (r291359) @@ -87,6 +87,8 @@ load(const char *fname) if ((fp = fopen(fname, "r")) == NULL) err(1, "Cannot open `%s'", fname); while ((line = fgetln(fp, &len)) != NULL) { + if (line[0] == '#') + continue; char c = line[len]; char *ptr; line[len] = '\0'; From owner-svn-src-all@freebsd.org Thu Nov 26 07:58:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4750A3800B; Thu, 26 Nov 2015 07:58:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A235A135E; Thu, 26 Nov 2015 07:58:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQ7wMAo017610; Thu, 26 Nov 2015 07:58:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQ7wMZX017609; Thu, 26 Nov 2015 07:58:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511260758.tAQ7wMZX017609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 26 Nov 2015 07:58:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291362 - head/tools/regression/lib/libc/resolv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 07:58:23 -0000 Author: ngie Date: Thu Nov 26 07:58:22 2015 New Revision: 291362 URL: https://svnweb.freebsd.org/changeset/base/291362 Log: r291359 was incorrect. Skip over tokens that start with `#' as fgetln can return more than one '\n' delimited line in a buffer Handle empty lines too, just in case MFC after: 3 days X-MFC with: r291359 Modified: head/tools/regression/lib/libc/resolv/resolv.c Modified: head/tools/regression/lib/libc/resolv/resolv.c ============================================================================== --- head/tools/regression/lib/libc/resolv/resolv.c Thu Nov 26 07:55:20 2015 (r291361) +++ head/tools/regression/lib/libc/resolv/resolv.c Thu Nov 26 07:58:22 2015 (r291362) @@ -87,13 +87,14 @@ load(const char *fname) if ((fp = fopen(fname, "r")) == NULL) err(1, "Cannot open `%s'", fname); while ((line = fgetln(fp, &len)) != NULL) { - if (line[0] == '#') - continue; char c = line[len]; char *ptr; line[len] = '\0'; - for (ptr = strtok(line, WS); ptr; ptr = strtok(NULL, WS)) + for (ptr = strtok(line, WS); ptr; ptr = strtok(NULL, WS)) { + if (ptr == '\0' || ptr[0] == '#') + continue; sl_add(hosts, strdup(ptr)); + } line[len] = c; } From owner-svn-src-all@freebsd.org Thu Nov 26 08:34:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24AC2A379CC; Thu, 26 Nov 2015 08:34:39 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from work.netasq.com (gwlille.netasq.com [91.212.116.1]) by mx1.freebsd.org (Postfix) with ESMTP id E03F31C13; Thu, 26 Nov 2015 08:34:38 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from work.netasq.com (localhost [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id 8C03B5861803; Thu, 26 Nov 2015 09:32:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id 7ED905861509; Thu, 26 Nov 2015 09:32:42 +0100 (CET) Received: from work.netasq.com ([127.0.0.1]) by localhost (work.netasq.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id RmMx-XQcDcY8; Thu, 26 Nov 2015 09:32:42 +0100 (CET) Received: from [10.2.1.1] (gateway.netasq.com [91.212.116.2]) by work.netasq.com (Postfix) with ESMTPSA id 655F6586146D; Thu, 26 Nov 2015 09:32:42 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Subject: Re: svn commit: r291301 - head/sys/netinet From: Fabien Thomas In-Reply-To: <20151125222344.GP44598@FreeBSD.org> Date: Thu, 26 Nov 2015 09:34:33 +0100 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <7D46085E-6782-4A42-9FB0-1C41885F6DB2@freebsd.org> References: <201511251445.tAPEjilx016268@repo.freebsd.org> <20151125222344.GP44598@FreeBSD.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.3096.5) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 08:34:39 -0000 Hi Gleb, >=20 > Note that gleb@FreeBSD.org and glebius@FreeBSD.org are two different = persons. >=20 Sorry for the mistake. Fabien From owner-svn-src-all@freebsd.org Thu Nov 26 08:58:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58A0EA394D6; Thu, 26 Nov 2015 08:58:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 251AB10B6; Thu, 26 Nov 2015 08:58:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQ8wElG034806; Thu, 26 Nov 2015 08:58:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQ8wEdj034802; Thu, 26 Nov 2015 08:58:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511260858.tAQ8wEdj034802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 26 Nov 2015 08:58:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291363 - head/tools/regression/lib/libc/nss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 08:58:15 -0000 Author: ngie Date: Thu Nov 26 08:58:13 2015 New Revision: 291363 URL: https://svnweb.freebsd.org/changeset/base/291363 Log: Clean up trailing whitespace MFC after: 1 week Modified: head/tools/regression/lib/libc/nss/test-getaddr.c head/tools/regression/lib/libc/nss/test-getgr.c head/tools/regression/lib/libc/nss/test-gethostby.c head/tools/regression/lib/libc/nss/test-getproto.c head/tools/regression/lib/libc/nss/test-getpw.c head/tools/regression/lib/libc/nss/test-getrpc.c head/tools/regression/lib/libc/nss/test-getserv.c head/tools/regression/lib/libc/nss/test-getusershell.c head/tools/regression/lib/libc/nss/testutil.h Modified: head/tools/regression/lib/libc/nss/test-getaddr.c ============================================================================== --- head/tools/regression/lib/libc/nss/test-getaddr.c Thu Nov 26 07:58:22 2015 (r291362) +++ head/tools/regression/lib/libc/nss/test-getaddr.c Thu Nov 26 08:58:13 2015 (r291363) @@ -67,22 +67,22 @@ IMPLEMENT_TEST_DATA(addrinfo) IMPLEMENT_TEST_FILE_SNAPSHOT(addrinfo) IMPLEMENT_2PASS_TEST(addrinfo) -static void +static void clone_addrinfo(struct addrinfo *dest, struct addrinfo const *src) { assert(dest != NULL); assert(src != NULL); - + memcpy(dest, src, sizeof(struct addrinfo)); if (src->ai_canonname != NULL) dest->ai_canonname = strdup(src->ai_canonname); - + if (src->ai_addr != NULL) { dest->ai_addr = (struct sockaddr *)malloc(src->ai_addrlen); assert(dest->ai_addr != NULL); memcpy(dest->ai_addr, src->ai_addr, src->ai_addrlen); } - + if (src->ai_next != NULL) { dest->ai_next = (struct addrinfo *)malloc( sizeof(struct addrinfo)); @@ -96,7 +96,7 @@ compare_addrinfo_(struct addrinfo *ai1, { if ((ai1 == NULL) || (ai2 == NULL)) return (-1); - + if ((ai1->ai_flags != ai2->ai_flags) || (ai1->ai_family != ai2->ai_family) || (ai1->ai_socktype != ai2->ai_socktype) || @@ -107,11 +107,11 @@ compare_addrinfo_(struct addrinfo *ai1, (((ai1->ai_canonname == NULL) || (ai2->ai_canonname == NULL)) && (ai1->ai_canonname != ai2->ai_canonname))) return (-1); - - if ((ai1->ai_canonname != NULL) && + + if ((ai1->ai_canonname != NULL) && (strcmp(ai1->ai_canonname, ai2->ai_canonname) != 0)) return (-1); - + if ((ai1->ai_addr != NULL) && (memcmp(ai1->ai_addr, ai2->ai_addr, ai1->ai_addrlen) != 0)) return (-1); @@ -122,17 +122,17 @@ compare_addrinfo_(struct addrinfo *ai1, return (compare_addrinfo_(ai1->ai_next, ai2->ai_next)); } -static int +static int compare_addrinfo(struct addrinfo *ai1, struct addrinfo *ai2, void *mdata) { int rv; - + if (debug) { printf("testing equality of 2 addrinfo structures\n"); } rv = compare_addrinfo_(ai1, ai2); - + if (debug) { if (rv == 0) printf("equal\n"); @@ -142,16 +142,16 @@ compare_addrinfo(struct addrinfo *ai1, s printf("not equal\n"); } } - + return (rv); } -void +void free_addrinfo(struct addrinfo *ai) { if (ai == NULL) return; - + free(ai->ai_addr); free(ai->ai_canonname); free_addrinfo(ai->ai_next); @@ -159,9 +159,9 @@ free_addrinfo(struct addrinfo *ai) void sdump_addrinfo(struct addrinfo *ai, char *buffer, size_t buflen) -{ +{ int written, i; - + written = snprintf(buffer, buflen, "%d %d %d %d %d ", ai->ai_flags, ai->ai_family, ai->ai_socktype, ai->ai_protocol, ai->ai_addrlen); @@ -169,14 +169,14 @@ sdump_addrinfo(struct addrinfo *ai, char if (written > buflen) return; buflen -= written; - + written = snprintf(buffer, buflen, "%s ", ai->ai_canonname == NULL ? "(null)" : ai->ai_canonname); buffer += written; if (written > buflen) return; buflen -= written; - + if (ai->ai_addr == NULL) { written = snprintf(buffer, buflen, "(null)"); buffer += written; @@ -185,26 +185,26 @@ sdump_addrinfo(struct addrinfo *ai, char buflen -= written; } else { for (i = 0; i < ai->ai_addrlen; ++i ) { - written = snprintf(buffer, buflen, + written = snprintf(buffer, buflen, i + 1 != ai->ai_addrlen ? "%d." : "%d", ((unsigned char *)ai->ai_addr)[i]); buffer += written; if (written > buflen) return; buflen -= written; - + if (buflen == 0) return; - } + } } - + if (ai->ai_next != NULL) { written = snprintf(buffer, buflen, ":"); buffer += written; if (written > buflen) return; buflen -= written; - + sdump_addrinfo(ai->ai_next, buffer, buflen); } } @@ -224,12 +224,12 @@ static int addrinfo_read_snapshot_addr(char *addr, unsigned char *result, size_t len) { char *s, *ps, *ts; - + ps = addr; while ( (s = strsep(&ps, ".")) != NULL) { if (len == 0) return (-1); - + *result = (unsigned char)strtol(s, &ts, 10); ++result; if (*ts != '\0') @@ -265,7 +265,7 @@ addrinfo_read_snapshot_ai(struct addrinf goto fin; break; case 4: - ai->ai_addrlen = (socklen_t)strtol(s, &ts, 10); + ai->ai_addrlen = (socklen_t)strtol(s, &ts, 10); if (*ts != '\0') goto fin; break; @@ -274,7 +274,7 @@ addrinfo_read_snapshot_ai(struct addrinf ai->ai_canonname = strdup(s); assert(ai->ai_canonname != NULL); } - break; + break; case 6: if (strcmp(s, "(null)") != 0) { ai->ai_addr = (struct sockaddr *)malloc( @@ -284,7 +284,7 @@ addrinfo_read_snapshot_ai(struct addrinf rv = addrinfo_read_snapshot_addr(s, (unsigned char *)ai->ai_addr, ai->ai_addrlen); - + if (rv != 0) goto fin; } @@ -294,18 +294,18 @@ addrinfo_read_snapshot_ai(struct addrinf rv = -1; goto fin; }; - + ++i; } fin: - if ((i != 7) || (rv != 0)) { + if ((i != 7) || (rv != 0)) { free_addrinfo(ai); memset(ai, 0, sizeof(struct addrinfo)); return (-1); } - - return (0); + + return (0); } static int @@ -317,33 +317,33 @@ addrinfo_read_snapshot_func(struct addri if (debug) printf("1 line read from snapshot:\n%s\n", line); - + rv = 0; i = 0; ps = line; - + s = strsep(&ps, ":"); if (s == NULL) return (-1); - + rv = addrinfo_read_snapshot_ai(ai, s); if (rv != 0) return (-1); - + ai2 = ai; while ( (s = strsep(&ps, ":")) != NULL) { ai2->ai_next = (struct addrinfo *)malloc( sizeof(struct addrinfo)); assert(ai2->ai_next != NULL); memset(ai2->ai_next, 0, sizeof(struct addrinfo)); - + rv = addrinfo_read_snapshot_ai(ai2->ai_next, s); if (rv != 0) { - free_addrinfo(ai); + free_addrinfo(ai); return (-1); } - ai2 = ai2->ai_next; + ai2 = ai2->ai_next; } return (0); @@ -356,36 +356,36 @@ addrinfo_test_correctness(struct addrinf printf("testing correctness with the following data:\n"); dump_addrinfo(ai); } - + if (ai == NULL) goto errfin; - + if (!((ai->ai_family >= 0) && (ai->ai_family < AF_MAX))) goto errfin; - + if ((ai->ai_socktype != 0) && (ai->ai_socktype != SOCK_STREAM) && (ai->ai_socktype != SOCK_DGRAM) && (ai->ai_socktype != SOCK_RAW)) goto errfin; - + if ((ai->ai_protocol != 0) && (ai->ai_protocol != IPPROTO_UDP) && (ai->ai_protocol != IPPROTO_TCP)) goto errfin; - + if ((ai->ai_flags & ~(AI_CANONNAME | AI_NUMERICHOST | AI_PASSIVE)) != 0) goto errfin; - if ((ai->ai_addrlen != ai->ai_addr->sa_len) || + if ((ai->ai_addrlen != ai->ai_addr->sa_len) || (ai->ai_family != ai->ai_addr->sa_family)) goto errfin; - + if (debug) printf("correct\n"); - - return (0); + + return (0); errfin: if (debug) printf("incorrect\n"); - + return (-1); } @@ -393,27 +393,27 @@ static int addrinfo_read_hostlist_func(struct addrinfo *ai, char *line) { struct addrinfo *result; - int rv; - + int rv; + if (debug) printf("resolving %s: ", line); rv = getaddrinfo(line, NULL, &hints, &result); if (rv == 0) { if (debug) printf("found\n"); - + rv = addrinfo_test_correctness(result, NULL); if (rv != 0) { freeaddrinfo(result); return (rv); } - + clone_addrinfo(ai, result); freeaddrinfo(result); } else { if (debug) printf("not found\n"); - + memset(ai, 0, sizeof(struct addrinfo)); } return (0); @@ -435,10 +435,10 @@ main(int argc, char **argv) char *snapshot_file, *hostlist_file; int rv; int c; - + if (argc < 2) usage(); - + snapshot_file = NULL; hostlist_file = NULL; memset(&hints, 0, sizeof(struct addrinfo)); @@ -465,38 +465,38 @@ main(int argc, char **argv) default: usage(); } - + TEST_DATA_INIT(addrinfo, &td, clone_addrinfo, free_addrinfo); TEST_DATA_INIT(addrinfo, &td_snap, clone_addrinfo, free_addrinfo); - + if (hostlist_file == NULL) usage(); - + if (access(hostlist_file, R_OK) != 0) { if (debug) printf("can't access the hostlist file %s\n", hostlist_file); - + usage(); } - + if (debug) printf("building host lists from %s\n", hostlist_file); - + rv = TEST_SNAPSHOT_FILE_READ(addrinfo, hostlist_file, &td, addrinfo_read_hostlist_func); if (rv != 0) goto fin; - + if (snapshot_file != NULL) { - if (access(snapshot_file, W_OK | R_OK) != 0) { + if (access(snapshot_file, W_OK | R_OK) != 0) { if (errno == ENOENT) method = TEST_BUILD_SNAPSHOT; else { if (debug) printf("can't access the snapshot file %s\n", snapshot_file); - + rv = -1; goto fin; } @@ -510,7 +510,7 @@ main(int argc, char **argv) } } } - + switch (method) { case TEST_GETADDRINFO: if (snapshot_file != NULL) @@ -519,7 +519,7 @@ main(int argc, char **argv) break; case TEST_BUILD_SNAPSHOT: if (snapshot_file != NULL) { - rv = TEST_SNAPSHOT_FILE_WRITE(addrinfo, snapshot_file, &td, + rv = TEST_SNAPSHOT_FILE_WRITE(addrinfo, snapshot_file, &td, sdump_addrinfo); } break; Modified: head/tools/regression/lib/libc/nss/test-getgr.c ============================================================================== --- head/tools/regression/lib/libc/nss/test-getgr.c Thu Nov 26 07:58:22 2015 (r291362) +++ head/tools/regression/lib/libc/nss/test-getgr.c Thu Nov 26 08:58:13 2015 (r291363) @@ -63,14 +63,14 @@ static void free_group(struct group *); static void sdump_group(struct group *, char *, size_t); static int group_read_snapshot_func(struct group *, char *); -static int group_check_ambiguity(struct group_test_data *, +static int group_check_ambiguity(struct group_test_data *, struct group *); static int group_fill_test_data(struct group_test_data *); static int group_test_correctness(struct group *, void *); static int group_test_getgrnam(struct group *, void *); static int group_test_getgrgid(struct group *, void *); static int group_test_getgrent(struct group *, void *); - + static void usage(void) __attribute__((__noreturn__)); IMPLEMENT_TEST_DATA(group) @@ -83,33 +83,33 @@ clone_group(struct group *dest, struct g { assert(dest != NULL); assert(src != NULL); - + char **cp; int members_num; - + memset(dest, 0, sizeof(struct group)); - + if (src->gr_name != NULL) { dest->gr_name = strdup(src->gr_name); assert(dest->gr_name != NULL); } - + if (src->gr_passwd != NULL) { dest->gr_passwd = strdup(src->gr_passwd); assert(dest->gr_passwd != NULL); } dest->gr_gid = src->gr_gid; - + if (src->gr_mem != NULL) { members_num = 0; for (cp = src->gr_mem; *cp; ++cp) ++members_num; - + dest->gr_mem = (char **)malloc( (members_num + 1) * (sizeof(char *))); assert(dest->gr_mem != NULL); memset(dest->gr_mem, 0, (members_num+1) * (sizeof(char *))); - + for (cp = src->gr_mem; *cp; ++cp) { dest->gr_mem[cp - src->gr_mem] = strdup(*cp); assert(dest->gr_mem[cp - src->gr_mem] != NULL); @@ -117,52 +117,52 @@ clone_group(struct group *dest, struct g } } -static void +static void free_group(struct group *grp) { char **cp; - + assert(grp != NULL); - + free(grp->gr_name); free(grp->gr_passwd); - + for (cp = grp->gr_mem; *cp; ++cp) free(*cp); free(grp->gr_mem); } -static int +static int compare_group(struct group *grp1, struct group *grp2, void *mdata) { char **c1, **c2; - + if (grp1 == grp2) return (0); - + if ((grp1 == NULL) || (grp2 == NULL)) goto errfin; - + if ((strcmp(grp1->gr_name, grp2->gr_name) != 0) || (strcmp(grp1->gr_passwd, grp2->gr_passwd) != 0) || (grp1->gr_gid != grp2->gr_gid)) goto errfin; - + c1 = grp1->gr_mem; c2 = grp2->gr_mem; - + if ((grp1->gr_mem == NULL) || (grp2->gr_mem == NULL)) goto errfin; - + for (;*c1 && *c2; ++c1, ++c2) if (strcmp(*c1, *c2) != 0) goto errfin; - + if ((*c1 != '\0') || (*c2 != '\0')) goto errfin; - + return 0; - + errfin: if ((debug) && (mdata == NULL)) { printf("following structures are not equal:\n"); @@ -178,14 +178,14 @@ sdump_group(struct group *grp, char *buf { char **cp; int written; - + written = snprintf(buffer, buflen, "%s %s %d", - grp->gr_name, grp->gr_passwd, grp->gr_gid); + grp->gr_name, grp->gr_passwd, grp->gr_gid); buffer += written; if (written > buflen) return; buflen -= written; - + if (grp->gr_mem != NULL) { if (*(grp->gr_mem) != '\0') { for (cp = grp->gr_mem; *cp; ++cp) { @@ -194,9 +194,9 @@ sdump_group(struct group *grp, char *buf if (written > buflen) return; buflen -= written; - + if (buflen == 0) - return; + return; } } else snprintf(buffer, buflen, " nomem"); @@ -213,7 +213,7 @@ group_read_snapshot_func(struct group *g if (debug) printf("1 line read from snapshot:\n%s\n", line); - + i = 0; sl = NULL; ps = line; @@ -243,10 +243,10 @@ group_read_snapshot_func(struct group *g if (sl == NULL) { if (strcmp(s, "(null)") == 0) return (0); - + sl = sl_init(); assert(sl != NULL); - + if (strcmp(s, "nomem") != 0) { ts = strdup(s); assert(ts != NULL); @@ -257,7 +257,7 @@ group_read_snapshot_func(struct group *g assert(ts != NULL); sl_add(sl, ts); } - break; + break; }; ++i; } @@ -268,16 +268,16 @@ group_read_snapshot_func(struct group *g memset(grp, 0, sizeof(struct group)); return (-1); } - + sl_add(sl, NULL); grp->gr_mem = sl->sl_str; /* NOTE: is it a dirty hack or not? */ - free(sl); + free(sl); return (0); } -static void +static void dump_group(struct group *result) { if (result != NULL) { @@ -292,7 +292,7 @@ static int group_fill_test_data(struct group_test_data *td) { struct group *grp; - + setgroupent(1); while ((grp = getgrent()) != NULL) { if (group_test_correctness(grp, NULL) == 0) @@ -301,7 +301,7 @@ group_fill_test_data(struct group_test_d return (-1); } endgrent(); - + return (0); } @@ -312,37 +312,37 @@ group_test_correctness(struct group *grp printf("testing correctness with the following data:\n"); dump_group(grp); } - + if (grp == NULL) goto errfin; - + if (grp->gr_name == NULL) goto errfin; - + if (grp->gr_passwd == NULL) goto errfin; - + if (grp->gr_mem == NULL) goto errfin; - + if (debug) printf("correct\n"); - - return (0); + + return (0); errfin: if (debug) printf("incorrect\n"); - + return (-1); } /* group_check_ambiguity() is needed here because when doing the getgrent() - * calls sequence, records from different nsswitch sources can be different, + * calls sequence, records from different nsswitch sources can be different, * though having the same pw_name/pw_uid */ static int group_check_ambiguity(struct group_test_data *td, struct group *pwd) { - + return (TEST_DATA_FIND(group, td, pwd, compare_group, NULL) != NULL ? 0 : -1); } @@ -351,7 +351,7 @@ static int group_test_getgrnam(struct group *grp_model, void *mdata) { struct group *grp; - + if (debug) { printf("testing getgrnam() with the following data:\n"); dump_group(grp_model); @@ -360,20 +360,20 @@ group_test_getgrnam(struct group *grp_mo grp = getgrnam(grp_model->gr_name); if (group_test_correctness(grp, NULL) != 0) goto errfin; - + if ((compare_group(grp, grp_model, NULL) != 0) && - (group_check_ambiguity((struct group_test_data *)mdata, grp) + (group_check_ambiguity((struct group_test_data *)mdata, grp) !=0)) goto errfin; - + if (debug) printf("ok\n"); return (0); - + errfin: if (debug) printf("not ok\n"); - + return (-1); } @@ -381,14 +381,14 @@ static int group_test_getgrgid(struct group *grp_model, void *mdata) { struct group *grp; - + if (debug) { printf("testing getgrgid() with the following data...\n"); dump_group(grp_model); - } - + } + grp = getgrgid(grp_model->gr_gid); - if ((group_test_correctness(grp, NULL) != 0) || + if ((group_test_correctness(grp, NULL) != 0) || ((compare_group(grp, grp_model, NULL) != 0) && (group_check_ambiguity((struct group_test_data *)mdata, grp) != 0))) { @@ -402,7 +402,7 @@ group_test_getgrgid(struct group *grp_mo } } -static int +static int group_test_getgrent(struct group *grp, void *mdata) { /* Only correctness can be checked when doing 1-pass test for @@ -426,10 +426,10 @@ main(int argc, char **argv) char *snapshot_file; int rv; int c; - + if (argc < 2) usage(); - + snapshot_file = NULL; while ((c = getopt(argc, argv, "nge2ds:")) != -1) switch (c) { @@ -454,18 +454,18 @@ main(int argc, char **argv) default: usage(); } - + TEST_DATA_INIT(group, &td, clone_group, free_group); TEST_DATA_INIT(group, &td_snap, clone_group, free_group); if (snapshot_file != NULL) { - if (access(snapshot_file, W_OK | R_OK) != 0) { + if (access(snapshot_file, W_OK | R_OK) != 0) { if (errno == ENOENT) method = TEST_BUILD_SNAPSHOT; else { if (debug) printf("can't access the file %s\n", snapshot_file); - + rv = -1; goto fin; } @@ -474,12 +474,12 @@ main(int argc, char **argv) rv = 0; goto fin; } - + TEST_SNAPSHOT_FILE_READ(group, snapshot_file, &td_snap, group_read_snapshot_func); } } - + rv = group_fill_test_data(&td); if (rv == -1) return (-1); @@ -489,7 +489,7 @@ main(int argc, char **argv) rv = DO_1PASS_TEST(group, &td, group_test_getgrnam, (void *)&td); else - rv = DO_1PASS_TEST(group, &td_snap, + rv = DO_1PASS_TEST(group, &td_snap, group_test_getgrnam, (void *)&td_snap); break; case TEST_GETGRGID: @@ -497,7 +497,7 @@ main(int argc, char **argv) rv = DO_1PASS_TEST(group, &td, group_test_getgrgid, (void *)&td); else - rv = DO_1PASS_TEST(group, &td_snap, + rv = DO_1PASS_TEST(group, &td_snap, group_test_getgrgid, (void *)&td_snap); break; case TEST_GETGRENT: @@ -510,7 +510,7 @@ main(int argc, char **argv) break; case TEST_GETGRENT_2PASS: TEST_DATA_INIT(group, &td_2pass, clone_group, free_group); - rv = group_fill_test_data(&td_2pass); + rv = group_fill_test_data(&td_2pass); if (rv != -1) rv = DO_2PASS_TEST(group, &td, &td_2pass, compare_group, NULL); @@ -518,7 +518,7 @@ main(int argc, char **argv) break; case TEST_BUILD_SNAPSHOT: if (snapshot_file != NULL) - rv = TEST_SNAPSHOT_FILE_WRITE(group, snapshot_file, &td, + rv = TEST_SNAPSHOT_FILE_WRITE(group, snapshot_file, &td, sdump_group); break; default: @@ -529,6 +529,6 @@ main(int argc, char **argv) fin: TEST_DATA_DESTROY(group, &td_snap); TEST_DATA_DESTROY(group, &td); - free(snapshot_file); + free(snapshot_file); return (rv); } Modified: head/tools/regression/lib/libc/nss/test-gethostby.c ============================================================================== --- head/tools/regression/lib/libc/nss/test-gethostby.c Thu Nov 26 07:58:22 2015 (r291362) +++ head/tools/regression/lib/libc/nss/test-gethostby.c Thu Nov 26 08:58:13 2015 (r291363) @@ -90,7 +90,7 @@ static int hostent_test_correctness(stru static int hostent_test_gethostbyaddr(struct hostent *, void *); static int hostent_test_getaddrinfo_eq(struct hostent *, void *); static int hostent_test_getnameinfo_eq(struct hostent *, void *); - + static void usage(void) __attribute__((__noreturn__)); IMPLEMENT_TEST_DATA(hostent) @@ -103,7 +103,7 @@ __gethostbyname2(const char *name, int a { struct hostent *he; int error; - + if (use_ipnode_functions == 0) he = gethostbyname2(name, af); else { @@ -112,7 +112,7 @@ __gethostbyname2(const char *name, int a if (he == NULL) errno = error; } - + return (he); } @@ -121,7 +121,7 @@ __gethostbyaddr(const void *addr, sockle { struct hostent *he; int error; - + if (use_ipnode_functions == 0) he = gethostbyaddr(addr, len, af); else { @@ -130,8 +130,8 @@ __gethostbyaddr(const void *addr, sockle if (he == NULL) errno = error; } - - return (he); + + return (he); } static void @@ -147,44 +147,44 @@ clone_hostent(struct hostent *dest, stru { assert(dest != NULL); assert(src != NULL); - + char **cp; int aliases_num; int addrs_num; size_t offset; - + memset(dest, 0, sizeof(struct hostent)); - + if (src->h_name != NULL) { dest->h_name = strdup(src->h_name); assert(dest->h_name != NULL); } - + dest->h_addrtype = src->h_addrtype; dest->h_length = src->h_length; - + if (src->h_aliases != NULL) { aliases_num = 0; for (cp = src->h_aliases; *cp; ++cp) ++aliases_num; - + dest->h_aliases = (char **)malloc((aliases_num + 1) * (sizeof(char *))); assert(dest->h_aliases != NULL); memset(dest->h_aliases, 0, (aliases_num + 1) * (sizeof(char *))); - + for (cp = src->h_aliases; *cp; ++cp) { dest->h_aliases[cp - src->h_aliases] = strdup(*cp); assert(dest->h_aliases[cp - src->h_aliases] != NULL); } } - + if (src->h_addr_list != NULL) { addrs_num = 0; for (cp = src->h_addr_list; *cp; ++cp) ++addrs_num; - + dest->h_addr_list = (char **)malloc((addrs_num + 1) * (sizeof(char *))); assert(dest->h_addr_list != NULL); @@ -193,7 +193,7 @@ clone_hostent(struct hostent *dest, stru for (cp = src->h_addr_list; *cp; ++cp) { offset = cp - src->h_addr_list; - dest->h_addr_list[offset] = + dest->h_addr_list[offset] = (char *)malloc(src->h_length); assert(dest->h_addr_list[offset] != NULL); memcpy(dest->h_addr_list[offset], @@ -202,15 +202,15 @@ clone_hostent(struct hostent *dest, stru } } -static void +static void free_hostent(struct hostent *ht) { char **cp; - + assert(ht != NULL); - + free(ht->h_name); - + if (ht->h_aliases != NULL) { for (cp = ht->h_aliases; *cp; ++cp) free(*cp); @@ -224,33 +224,33 @@ free_hostent(struct hostent *ht) } } -static int +static int compare_hostent(struct hostent *ht1, struct hostent *ht2, void *mdata) { char **c1, **c2, **ct, **cb; int b; - + if (ht1 == ht2) return 0; - + if ((ht1 == NULL) || (ht2 == NULL)) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Nov 26 09:25:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F272A398C6; Thu, 26 Nov 2015 09:25:22 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CAED13D8; Thu, 26 Nov 2015 09:25:21 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQ9PLAx043344; Thu, 26 Nov 2015 09:25:21 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQ9PLSf043343; Thu, 26 Nov 2015 09:25:21 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201511260925.tAQ9PLSf043343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 26 Nov 2015 09:25:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291364 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 09:25:22 -0000 Author: tuexen Date: Thu Nov 26 09:25:20 2015 New Revision: 291364 URL: https://svnweb.freebsd.org/changeset/base/291364 Log: When receiving an SCTP/UDP packet and the interface performed the UDP checksum computation and signals that it was OK, clear this bit when passing the packet to SCTP. Since the bits indicating a valid UDP checksum and a valid SCTP checksum are the same, the SCTP stack would assume that also an SCTP checksum check has been performed. MFC after: 1 week Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Thu Nov 26 08:58:13 2015 (r291363) +++ head/sys/netinet/sctputil.c Thu Nov 26 09:25:20 2015 (r291364) @@ -6957,6 +6957,18 @@ sctp_recv_udp_tunneled_packet(struct mbu for (last = m; last->m_next; last = last->m_next); last->m_next = sp; m->m_pkthdr.len += sp->m_pkthdr.len; + /* + * The CSUM_DATA_VALID flags indicates that the HW checked the UDP + * checksum and it was valid. Since CSUM_DATA_VALID == + * CSUM_SCTP_VALID this would imply that the HW also verified the + * SCTP checksum. Therefore, clear the bit. + */ + SCTPDBG(SCTP_DEBUG_CRCOFFLOAD, + "sctp_recv_udp_tunneled_packet(): Packet of length %d received on %s with csum_flags 0x%b.\n", + m->m_pkthdr.len, + if_name(m->m_pkthdr.rcvif), + (int)m->m_pkthdr.csum_flags, CSUM_BITS); + m->m_pkthdr.csum_flags &= ~CSUM_DATA_VALID; iph = mtod(m, struct ip *); switch (iph->ip_v) { #ifdef INET From owner-svn-src-all@freebsd.org Thu Nov 26 13:05:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFBCCA364D9; Thu, 26 Nov 2015 13:04:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 869C01F55; Thu, 26 Nov 2015 13:04:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQD4w9S012748; Thu, 26 Nov 2015 13:04:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQD4wqI012741; Thu, 26 Nov 2015 13:04:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511261304.tAQD4wqI012741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 26 Nov 2015 13:04:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291365 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 13:05:00 -0000 Author: mav Date: Thu Nov 26 13:04:58 2015 New Revision: 291365 URL: https://svnweb.freebsd.org/changeset/base/291365 Log: One more round of port scanner rewrite. - Make scan aborted by event restart immediately and infinitely. - Improve handling of some loop events from firmware. - Remove loop down timer, adding its functionality to scanner thread. - Some more unification and simplification. Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h head/sys/dev/isp/isp_library.c head/sys/dev/isp/isp_pci.c head/sys/dev/isp/ispvar.h Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Thu Nov 26 09:25:20 2015 (r291364) +++ head/sys/dev/isp/isp.c Thu Nov 26 13:04:58 2015 (r291365) @@ -2810,6 +2810,8 @@ isp_fclink_test(ispsoftc_t *isp, int cha fcp = FCPARAM(isp, chan); + if (fcp->isp_loopstate < LOOP_HAVE_LINK) + return (-1); if (fcp->isp_loopstate >= LOOP_LTEST_DONE) return (0); @@ -2825,15 +2827,13 @@ isp_fclink_test(ispsoftc_t *isp, int cha if (fcp->isp_fwstate == FW_READY) { break; } + if (fcp->isp_loopstate < LOOP_TESTING_LINK) + goto abort; GET_NANOTIME(&hrb); if ((NANOTIME_SUB(&hrb, &hra) / 1000 + 1000 >= usdelay)) break; ISP_SLEEP(isp, 1000); } - - /* - * If we haven't gone to 'ready' state, return. - */ if (fcp->isp_fwstate != FW_READY) { isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Firmware is not ready (%s)", @@ -2938,6 +2938,12 @@ not_on_fabric: } } + if (fcp->isp_loopstate < LOOP_TESTING_LINK) { +abort: + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d FC link test aborted", chan); + return (1); + } fcp->isp_loopstate = LOOP_LTEST_DONE; isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGCONFIG, "Chan %d WWPN %016jx WWNN %016jx", @@ -2968,12 +2974,10 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) fcportdb_t *lp; uint16_t dbidx; - if (fcp->isp_loopstate < LOOP_FSCAN_DONE) { + if (fcp->isp_loopstate < LOOP_FSCAN_DONE) return (-1); - } - if (fcp->isp_loopstate > LOOP_SYNCING_PDB) { + if (fcp->isp_loopstate >= LOOP_READY) return (0); - } isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC PDB sync", chan); @@ -3025,12 +3029,12 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) } } - /* - * If we get here, we've for sure seen not only a valid loop - * but know what is or isn't on it, so mark this for usage - * in isp_start. - */ - fcp->loop_seen_once = 1; + if (fcp->isp_loopstate < LOOP_SYNCING_PDB) { + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d FC PDB sync aborted", chan); + return (1); + } + fcp->isp_loopstate = LOOP_READY; isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC PDB sync done", chan); return (0); @@ -3154,12 +3158,11 @@ isp_scan_loop(ispsoftc_t *isp, int chan) uint16_t handles[LOCAL_LOOP_LIM]; uint16_t handle; - if (fcp->isp_loopstate < LOOP_LTEST_DONE) { + if (fcp->isp_loopstate < LOOP_LTEST_DONE) return (-1); - } - if (fcp->isp_loopstate > LOOP_SCANNING_LOOP) { + if (fcp->isp_loopstate >= LOOP_LSCAN_DONE) return (0); - } + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC loop scan", chan); fcp->isp_loopstate = LOOP_SCANNING_LOOP; if (TOPO_IS_FABRIC(fcp->isp_topo)) { @@ -3214,8 +3217,8 @@ isp_scan_loop(ispsoftc_t *isp, int chan) if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) { abort: isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d FC loop scan done (abort)", chan); - return (-1); + "Chan %d FC loop scan aborted", chan); + return (1); } if (node_wwn == INI_NONE) { continue; @@ -3424,12 +3427,11 @@ isp_scan_fabric(ispsoftc_t *isp, int cha int portidx, portlim, r; sns_gid_ft_rsp_t *rs0, *rs1; - if (fcp->isp_loopstate < LOOP_LSCAN_DONE) { + if (fcp->isp_loopstate < LOOP_LSCAN_DONE) return (-1); - } - if (fcp->isp_loopstate > LOOP_SCANNING_FABRIC) { + if (fcp->isp_loopstate >= LOOP_FSCAN_DONE) return (0); - } + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC fabric scan", chan); fcp->isp_loopstate = LOOP_SCANNING_FABRIC; if (!TOPO_IS_FABRIC(fcp->isp_topo)) { @@ -3450,8 +3452,8 @@ fail: abort: FC_SCRATCH_RELEASE(isp, chan); isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d FC fabric scan done (abort)", chan); - return (-1); + "Chan %d FC fabric scan aborted", chan); + return (1); } /* @@ -3478,11 +3480,11 @@ abort: if (r > 0) { fcp->isp_loopstate = LOOP_FSCAN_DONE; FC_SCRATCH_RELEASE(isp, chan); - return (0); + return (-1); } else if (r < 0) { fcp->isp_loopstate = LOOP_LTEST_DONE; /* try again */ FC_SCRATCH_RELEASE(isp, chan); - return (0); + return (-1); } MEMORYBARRIER(isp, SYNC_SFORCPU, IGPOFF, GIDLEN, chan); @@ -3504,7 +3506,7 @@ abort: rs1->snscb_cthdr.ct_explanation); FC_SCRATCH_RELEASE(isp, chan); fcp->isp_loopstate = LOOP_FSCAN_DONE; - return (0); + return (-1); } /* Check our buffer was big enough to get the full list. */ @@ -5657,11 +5659,10 @@ isp_parse_async_fc(ispsoftc_t *isp, uint fcp = FCPARAM(isp, chan); int topo = fcp->isp_topo; - if (fcp->role == ISP_ROLE_NONE) { + if (fcp->role == ISP_ROLE_NONE) continue; - } - - fcp->isp_loopstate = LOOP_NIL; + if (fcp->isp_loopstate > LOOP_HAVE_LINK) + fcp->isp_loopstate = LOOP_HAVE_LINK; ISP_SET_SENDMARKER(isp, chan, 1); isp_async(isp, ISPASYNC_LIP, chan); #ifdef ISP_TARGET_MODE @@ -5714,6 +5715,9 @@ isp_parse_async_fc(ispsoftc_t *isp, uint fcp = FCPARAM(isp, chan); if (fcp->role == ISP_ROLE_NONE) continue; + fcp->isp_linkstate = 1; + if (fcp->isp_loopstate < LOOP_HAVE_LINK) + fcp->isp_loopstate = LOOP_HAVE_LINK; ISP_SET_SENDMARKER(isp, chan, 1); isp_async(isp, ISPASYNC_LOOP_UP, chan); #ifdef ISP_TARGET_MODE @@ -5734,6 +5738,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint if (fcp->role == ISP_ROLE_NONE) continue; ISP_SET_SENDMARKER(isp, chan, 1); + fcp->isp_linkstate = 0; fcp->isp_loopstate = LOOP_NIL; isp_async(isp, ISPASYNC_LOOP_DOWN, chan); #ifdef ISP_TARGET_MODE @@ -5754,7 +5759,8 @@ isp_parse_async_fc(ispsoftc_t *isp, uint if (fcp->role == ISP_ROLE_NONE) continue; ISP_SET_SENDMARKER(isp, chan, 1); - fcp->isp_loopstate = LOOP_NIL; + if (fcp->isp_loopstate > LOOP_HAVE_LINK) + fcp->isp_loopstate = LOOP_HAVE_LINK; isp_async(isp, ISPASYNC_LOOP_RESET, chan); #ifdef ISP_TARGET_MODE if (isp_target_async(isp, chan, mbox)) { @@ -5797,6 +5803,8 @@ isp_parse_async_fc(ispsoftc_t *isp, uint continue; if (fcp->isp_loopstate > LOOP_LTEST_DONE) fcp->isp_loopstate = LOOP_LTEST_DONE; + else if (fcp->isp_loopstate < LOOP_HAVE_LINK) + fcp->isp_loopstate = LOOP_HAVE_LINK; isp_async(isp, ISPASYNC_CHANGE_NOTIFY, chan, ISPASYNC_CHANGE_PDB, nphdl, nlstate, reason); } @@ -5820,6 +5828,8 @@ isp_parse_async_fc(ispsoftc_t *isp, uint break; if (fcp->isp_loopstate > LOOP_LTEST_DONE) fcp->isp_loopstate = LOOP_LTEST_DONE; + else if (fcp->isp_loopstate < LOOP_HAVE_LINK) + fcp->isp_loopstate = LOOP_HAVE_LINK; isp_async(isp, ISPASYNC_CHANGE_NOTIFY, chan, ISPASYNC_CHANGE_SNS, portid); break; @@ -5867,7 +5877,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint break; } ISP_SET_SENDMARKER(isp, chan, 1); - FCPARAM(isp, chan)->isp_loopstate = LOOP_NIL; + FCPARAM(isp, chan)->isp_loopstate = LOOP_HAVE_LINK; isp_async(isp, ISPASYNC_CHANGE_NOTIFY, chan, ISPASYNC_CHANGE_OTHER); break; case ASYNC_P2P_INIT_ERR: @@ -5939,16 +5949,29 @@ isp_handle_other_response(ispsoftc_t *is if (fcp->role == ISP_ROLE_NONE) continue; c = (chan == 0) ? 127 : (chan - 1); - if (rid.ridacq_map[c / 16] & (1 << (c % 16))) { - fcp->isp_loopstate = LOOP_NIL; + if (rid.ridacq_map[c / 16] & (1 << (c % 16)) || + chan == 0) { + fcp->isp_loopstate = LOOP_HAVE_LINK; isp_async(isp, ISPASYNC_CHANGE_NOTIFY, chan, ISPASYNC_CHANGE_OTHER); + } else { + fcp->isp_loopstate = LOOP_NIL; + isp_async(isp, ISPASYNC_LOOP_DOWN, + chan); } } } else { - FCPARAM(isp, rid.ridacq_vp_index)->isp_loopstate = LOOP_NIL; - isp_async(isp, ISPASYNC_CHANGE_NOTIFY, - rid.ridacq_vp_index, ISPASYNC_CHANGE_OTHER); + fcparam *fcp = FCPARAM(isp, rid.ridacq_vp_index); + if (rid.ridacq_vp_status == RIDACQ_STS_COMPLETE || + rid.ridacq_vp_status == RIDACQ_STS_CHANGED) { + fcp->isp_loopstate = LOOP_HAVE_LINK; + isp_async(isp, ISPASYNC_CHANGE_NOTIFY, + rid.ridacq_vp_index, ISPASYNC_CHANGE_OTHER); + } else { + fcp->isp_loopstate = LOOP_NIL; + isp_async(isp, ISPASYNC_LOOP_DOWN, + rid.ridacq_vp_index); + } } return (1); case RQSTYPE_ATIO: Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Thu Nov 26 09:25:20 2015 (r291364) +++ head/sys/dev/isp/isp_freebsd.c Thu Nov 26 13:04:58 2015 (r291365) @@ -50,13 +50,13 @@ __FBSDID("$FreeBSD$"); MODULE_VERSION(isp, 1); MODULE_DEPEND(isp, cam, 1, 1, 1); int isp_announced = 0; -int isp_fabric_hysteresis = 5; int isp_loop_down_limit = 60; /* default loop down limit */ int isp_quickboot_time = 7; /* don't wait more than N secs for loop up */ int isp_gone_device_time = 30; /* grace time before reporting device lost */ static const char prom3[] = "Chan %d [%u] PortID 0x%06x Departed because of %s"; -static void isp_freeze_loopdown(ispsoftc_t *, int, char *); +static void isp_freeze_loopdown(ispsoftc_t *, int); +static void isp_loop_changed(ispsoftc_t *isp, int chan); static d_ioctl_t ispioctl; static void isp_intr_enable(void *); static void isp_cam_async(void *, uint32_t, struct cam_path *, void *); @@ -168,25 +168,13 @@ isp_attach_chan(ispsoftc_t *isp, struct fc->isp = isp; fc->ready = 1; - callout_init_mtx(&fc->ldt, &isp->isp_osinfo.lock, 0); callout_init_mtx(&fc->gdt, &isp->isp_osinfo.lock, 0); - TASK_INIT(&fc->ltask, 1, isp_ldt_task, fc); TASK_INIT(&fc->gtask, 1, isp_gdt_task, fc); - - /* - * We start by being "loop down" if we have an initiator role - */ - if (fcp->role & ISP_ROLE_INITIATOR) { - isp_freeze_loopdown(isp, chan, "isp_attach"); - callout_reset(&fc->ldt, isp_quickboot_time * hz, isp_ldt, fc); - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Starting Initial Loop Down Timer @ %lu", (unsigned long) time_uptime); - } + isp_loop_changed(isp, chan); ISP_UNLOCK(isp); if (THREAD_CREATE(isp_kthread, fc, &fc->kproc, 0, 0, "%s: fc_thrd%d", device_get_nameunit(isp->isp_osinfo.dev), chan)) { xpt_free_path(fc->path); ISP_LOCK(isp); - if (callout_active(&fc->ldt)) - callout_stop(&fc->ldt); xpt_bus_deregister(cam_sim_path(fc->sim)); ISP_UNLOCK(isp); cam_sim_free(fc->sim, FALSE); @@ -377,13 +365,13 @@ isp_detach(ispsoftc_t *isp) } static void -isp_freeze_loopdown(ispsoftc_t *isp, int chan, char *msg) +isp_freeze_loopdown(ispsoftc_t *isp, int chan) { if (IS_FC(isp)) { struct isp_fc *fc = ISP_FC_PC(isp, chan); if (fc->simqfrozen == 0) { isp_prt(isp, ISP_LOGDEBUG0, - "Chan %d %s -- freeze simq (loopdown)", chan, msg); + "Chan %d Freeze simq (loopdown)", chan); fc->simqfrozen = SIMQFRZ_LOOPDOWN; #if __FreeBSD_version >= 1000039 xpt_hold_boot(); @@ -391,7 +379,7 @@ isp_freeze_loopdown(ispsoftc_t *isp, int xpt_freeze_simq(fc->sim, 1); } else { isp_prt(isp, ISP_LOGDEBUG0, - "Chan %d %s -- mark frozen (loopdown)", chan, msg); + "Chan %d Mark simq frozen (loopdown)", chan); fc->simqfrozen |= SIMQFRZ_LOOPDOWN; } } @@ -405,7 +393,8 @@ isp_unfreeze_loopdown(ispsoftc_t *isp, i int wasfrozen = fc->simqfrozen & SIMQFRZ_LOOPDOWN; fc->simqfrozen &= ~SIMQFRZ_LOOPDOWN; if (wasfrozen && fc->simqfrozen == 0) { - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "%s: Chan %d releasing simq", __func__, chan); + isp_prt(isp, ISP_LOGDEBUG0, + "Chan %d Release simq", chan); xpt_release_simq(fc->sim, 1); #if __FreeBSD_version >= 1000039 xpt_release_boot(); @@ -481,7 +470,7 @@ ispioctl(struct cdev *dev, u_long c, cad break; } ISP_LOCK(isp); - if (isp_fc_runstate(isp, chan, 5 * 1000000)) { + if (isp_fc_runstate(isp, chan, 5 * 1000000) != LOOP_READY) { retval = EIO; } else { retval = 0; @@ -3270,41 +3259,59 @@ isp_gdt_task(void *arg, int pending) } /* - * Loop Down Timer Function- when loop goes down, a timer is started and - * and after it expires we come here and take all probational devices that - * the OS knows about and the tell the OS that they've gone away. - * + * When loop goes down we remember the time and freeze CAM command queue. + * During some time period we are trying to reprobe the loop. But if we + * fail, we tell the OS that devices have gone away and drop the freeze. + * * We don't clear the devices out of our port database because, when loop * come back up, we have to do some actual cleanup with the chip at that * point (implicit PLOGO, e.g., to get the chip's port database state right). */ static void -isp_ldt(void *arg) +isp_loop_changed(ispsoftc_t *isp, int chan) { - struct isp_fc *fc = arg; - taskqueue_enqueue(taskqueue_thread, &fc->ltask); + fcparam *fcp = FCPARAM(isp, chan); + struct isp_fc *fc = ISP_FC_PC(isp, chan); + + if (fc->loop_down_time) + return; + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Chan %d Loop changed", chan); + if (fcp->role & ISP_ROLE_INITIATOR) + isp_freeze_loopdown(isp, chan); + fc->loop_dead = 0; + fc->loop_down_time = time_uptime; + wakeup(fc); } static void -isp_ldt_task(void *arg, int pending) +isp_loop_up(ispsoftc_t *isp, int chan) { - struct isp_fc *fc = arg; - ispsoftc_t *isp = fc->isp; - int chan = fc - isp->isp_osinfo.pc.fc; + struct isp_fc *fc = ISP_FC_PC(isp, chan); + + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Chan %d Loop is up", chan); + fc->loop_seen_once = 1; + fc->loop_dead = 0; + fc->loop_down_time = 0; + isp_unfreeze_loopdown(isp, chan); +} + +static void +isp_loop_dead(ispsoftc_t *isp, int chan) +{ + fcparam *fcp = FCPARAM(isp, chan); + struct isp_fc *fc = ISP_FC_PC(isp, chan); fcportdb_t *lp; struct ac_contract ac; struct ac_device_changed *adc; int dbidx, i; - ISP_LOCK(isp); - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Chan %d Loop Down Timer expired @ %lu", chan, (unsigned long) time_uptime); - callout_deactivate(&fc->ldt); + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Chan %d Loop is dead", chan); /* * Notify to the OS all targets who we now consider have departed. */ for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) { - lp = &FCPARAM(isp, chan)->portdb[dbidx]; + lp = &fcp->portdb[dbidx]; if (lp->state == FC_PORTDB_STATE_NIL) continue; @@ -3347,14 +3354,8 @@ isp_ldt_task(void *arg, int pending) } isp_unfreeze_loopdown(isp, chan); - /* - * The loop down timer has expired. Wake up the kthread - * to notice that fact (or make it false). - */ fc->loop_dead = 1; - fc->loop_down_time = fc->loop_down_limit+1; - wakeup(fc); - ISP_UNLOCK(isp); + fc->loop_down_time = 0; } static void @@ -3363,15 +3364,18 @@ isp_kthread(void *arg) struct isp_fc *fc = arg; ispsoftc_t *isp = fc->isp; int chan = fc - isp->isp_osinfo.pc.fc; - int slp = 0; + int slp = 0, d; + int lb, lim; mtx_lock(&isp->isp_osinfo.lock); while (isp->isp_osinfo.is_exiting == 0) { - int lb, lim; - - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "%s: Chan %d checking FC state", __func__, chan); + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, + "Chan %d Checking FC state", chan); lb = isp_fc_runstate(isp, chan, 250000); + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, + "Chan %d FC got to %s state", chan, + isp_fc_loop_statename(lb)); /* * Our action is different based upon whether we're supporting @@ -3381,87 +3385,44 @@ isp_kthread(void *arg) * * If not, we simply just wait for loop to come up. */ - if (lb && (FCPARAM(isp, chan)->role & ISP_ROLE_INITIATOR)) { - /* - * Increment loop down time by the last sleep interval - */ - fc->loop_down_time += slp; - - if (lb < 0) { - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "%s: Chan %d FC loop not up (down count %d)", __func__, chan, fc->loop_down_time); - } else { - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "%s: Chan %d FC got to %d (down count %d)", __func__, chan, lb, fc->loop_down_time); - } - + if (lb == LOOP_READY || lb < 0) { + slp = 0; + } else { /* * If we've never seen loop up and we've waited longer * than quickboot time, or we've seen loop up but we've * waited longer than loop_down_limit, give up and go * to sleep until loop comes up. */ - if (FCPARAM(isp, chan)->loop_seen_once == 0) { + if (fc->loop_seen_once == 0) lim = isp_quickboot_time; - } else { + else lim = fc->loop_down_limit; - } - if (fc->loop_down_time >= lim) { - isp_freeze_loopdown(isp, chan, "loop limit hit"); + d = time_uptime - fc->loop_down_time; + if (d >= lim) slp = 0; - } else if (fc->loop_down_time < 10) { + else if (d < 10) slp = 1; - } else if (fc->loop_down_time < 30) { + else if (d < 30) slp = 5; - } else if (fc->loop_down_time < 60) { + else if (d < 60) slp = 10; - } else if (fc->loop_down_time < 120) { + else if (d < 120) slp = 20; - } else { - slp = 30; - } - - } else if (lb) { - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "%s: Chan %d FC Loop Down", __func__, chan); - fc->loop_down_time += slp; - if (fc->loop_down_time > 300) - slp = 0; else - slp = 60; - } else { - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "%s: Chan %d FC state OK", __func__, chan); - fc->loop_down_time = 0; - slp = 0; + slp = 30; } - - /* - * If this is past the first loop up or the loop is dead and if we'd frozen the simq, unfreeze it - * now so that CAM can start sending us commands. - * - * If the FC state isn't okay yet, they'll hit that in isp_start which will freeze the queue again - * or kill the commands, as appropriate. - */ - - if (FCPARAM(isp, chan)->loop_seen_once || fc->loop_dead) { - isp_unfreeze_loopdown(isp, chan); + if (slp == 0) { + if (lb == LOOP_READY) + isp_loop_up(isp, chan); + else + isp_loop_dead(isp, chan); } - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "%s: Chan %d sleep time %d", __func__, chan, slp); - + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, + "Chan %d sleep for %d seconds", chan, slp); msleep(fc, &isp->isp_osinfo.lock, PRIBIO, "ispf", slp * hz); - - /* - * If slp is zero, we're waking up for the first time after - * things have been okay. In this case, we set a deferral state - * for all commands and delay hysteresis seconds before starting - * the FC state evaluation. This gives the loop/fabric a chance - * to settle. - */ - if (slp == 0 && fc->hysteresis) { - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "%s: Chan %d sleep hysteresis ticks %d", __func__, chan, fc->hysteresis * hz); - mtx_unlock(&isp->isp_osinfo.lock); - pause("ispt", fc->hysteresis * hz); - mtx_lock(&isp->isp_osinfo.lock); - } } fc->num_threads -= 1; mtx_unlock(&isp->isp_osinfo.lock); @@ -3471,7 +3432,7 @@ isp_kthread(void *arg) static void isp_action(struct cam_sim *sim, union ccb *ccb) { - int bus, tgt, ts, error, lim; + int bus, tgt, ts, error; ispsoftc_t *isp; struct ccb_trans_settings *cts; @@ -3535,26 +3496,13 @@ isp_action(struct cam_sim *sim, union cc break; case CMD_RQLATER: /* - * We get this result for FC devices if the loop state isn't ready yet - * or if the device in question has gone zombie on us. - * - * If we've never seen Loop UP at all, we requeue this request and wait - * for the initial loop up delay to expire. + * We get this result if the loop isn't ready + * or if the device in question has gone zombie. */ - lim = ISP_FC_PC(isp, bus)->loop_down_limit; - if (FCPARAM(isp, bus)->loop_seen_once == 0 || ISP_FC_PC(isp, bus)->loop_down_time >= lim) { - if (FCPARAM(isp, bus)->loop_seen_once == 0) { - isp_prt(isp, ISP_LOGDEBUG0, - "%d.%jx loop not seen yet @ %lu", - XS_TGT(ccb), (uintmax_t)XS_LUN(ccb), - (unsigned long) time_uptime); - } else { - isp_prt(isp, ISP_LOGDEBUG0, - "%d.%jx downtime (%d) > lim (%d)", - XS_TGT(ccb), (uintmax_t)XS_LUN(ccb), - ISP_FC_PC(isp, bus)->loop_down_time, - lim); - } + if (ISP_FC_PC(isp, bus)->loop_dead) { + isp_prt(isp, ISP_LOGDEBUG0, + "%d.%jx loop is dead", + XS_TGT(ccb), (uintmax_t)XS_LUN(ccb)); ccb->ccb_h.status = CAM_SEL_TIMEOUT; isp_done((struct ccb_scsiio *) ccb); break; @@ -4260,49 +4208,20 @@ isp_async(ispsoftc_t *isp, ispasync_t cm msg = "LOOP Reset"; /* FALLTHROUGH */ case ISPASYNC_LOOP_DOWN: - { if (msg == NULL) msg = "LOOP Down"; va_start(ap, cmd); bus = va_arg(ap, int); va_end(ap); - - FCPARAM(isp, bus)->isp_linkstate = 0; - - fc = ISP_FC_PC(isp, bus); - if (cmd == ISPASYNC_LOOP_DOWN && fc->ready) { - /* - * We don't do any simq freezing if we are only in target mode - */ - if (FCPARAM(isp, bus)->role & ISP_ROLE_INITIATOR) { - if (fc->path) { - isp_freeze_loopdown(isp, bus, msg); - } - } - if (!callout_active(&fc->ldt)) { - callout_reset(&fc->ldt, fc->loop_down_limit * hz, isp_ldt, fc); - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Starting Loop Down Timer @ %lu", (unsigned long) time_uptime); - } - } isp_fcp_reset_crn(isp, bus, /*tgt*/0, /*tgt_set*/ 0); - - isp_prt(isp, ISP_LOGINFO, "Chan %d: %s", bus, msg); + isp_loop_changed(isp, bus); + isp_prt(isp, ISP_LOGINFO, "Chan %d %s", bus, msg); break; - } case ISPASYNC_LOOP_UP: va_start(ap, cmd); bus = va_arg(ap, int); va_end(ap); - fc = ISP_FC_PC(isp, bus); - /* - * Now we just note that Loop has come up. We don't - * actually do anything because we're waiting for a - * Change Notify before activating the FC cleanup - * thread to look at the state of the loop again. - */ - FCPARAM(isp, bus)->isp_linkstate = 1; - fc->loop_dead = 0; - fc->loop_down_time = 0; + isp_loop_changed(isp, bus); isp_prt(isp, ISP_LOGINFO, "Chan %d Loop UP", bus); break; case ISPASYNC_DEV_ARRIVED: @@ -4435,18 +4354,7 @@ changed: msg = "Other Change Notify"; isp_prt(isp, ISP_LOGINFO, "Chan %d %s", bus, msg); } - - /* - * If the loop down timer is running, cancel it. - */ - if (fc->ready && callout_active(&fc->ldt)) { - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Stopping Loop Down Timer @ %lu", (unsigned long) time_uptime); - callout_stop(&fc->ldt); - } - if (FCPARAM(isp, bus)->role & ISP_ROLE_INITIATOR) { - isp_freeze_loopdown(isp, bus, msg); - } - wakeup(fc); + isp_loop_changed(isp, bus); break; } #ifdef ISP_TARGET_MODE Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Thu Nov 26 09:25:20 2015 (r291364) +++ head/sys/dev/isp/isp_freebsd.h Thu Nov 26 13:04:58 2015 (r291365) @@ -228,9 +228,9 @@ struct isp_fc { bus_dmamap_t tdmap; uint64_t def_wwpn; uint64_t def_wwnn; - uint32_t loop_down_time; - uint32_t loop_down_limit; - uint32_t gone_device_time; + time_t loop_down_time; + int loop_down_limit; + int gone_device_time; /* * Per target/lun info- just to keep a per-ITL nexus crn count */ @@ -239,15 +239,13 @@ struct isp_fc { uint32_t simqfrozen : 3, default_id : 8, - hysteresis : 8, def_role : 2, /* default role */ gdt_running : 1, loop_dead : 1, + loop_seen_once : 1, fcbsy : 1, ready : 1; - struct callout ldt; /* loop down timer */ struct callout gdt; /* gone device timer */ - struct task ltask; struct task gtask; #ifdef ISP_TARGET_MODE struct tslist lun_hash[LUN_HASH_SIZE]; @@ -698,7 +696,6 @@ extern uint64_t isp_default_wwn(ispsoftc * driver global data */ extern int isp_announced; -extern int isp_fabric_hysteresis; extern int isp_loop_down_limit; extern int isp_gone_device_time; extern int isp_quickboot_time; Modified: head/sys/dev/isp/isp_library.c ============================================================================== --- head/sys/dev/isp/isp_library.c Thu Nov 26 09:25:20 2015 (r291364) +++ head/sys/dev/isp/isp_library.c Thu Nov 26 13:04:58 2015 (r291365) @@ -394,33 +394,31 @@ isp_print_bytes(ispsoftc_t *isp, const c int isp_fc_runstate(ispsoftc_t *isp, int chan, int tval) { - fcparam *fcp; + fcparam *fcp = FCPARAM(isp, chan); + int res; - fcp = FCPARAM(isp, chan); - if (fcp->role == ISP_ROLE_NONE) { - return (0); - } - if (isp_control(isp, ISPCTL_FCLINK_TEST, chan, tval) != 0) { - isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: linktest failed for channel %d", chan); +again: + if (fcp->role == ISP_ROLE_NONE) return (-1); - } - if (isp_control(isp, ISPCTL_SCAN_LOOP, chan) != 0) { - isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: scan loop failed on channel %d", chan); - return (LOOP_LTEST_DONE); - } - if (isp_control(isp, ISPCTL_SCAN_FABRIC, chan) != 0) { - isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: scan fabric failed on channel %d", chan); - return (LOOP_LSCAN_DONE); - } - if (isp_control(isp, ISPCTL_PDB_SYNC, chan) != 0) { - isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: pdb_sync failed on channel %d", chan); - return (LOOP_FSCAN_DONE); - } - if (fcp->isp_loopstate != LOOP_READY) { - isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: not ready again on channel %d", chan); - return (-1); - } - return (0); + res = isp_control(isp, ISPCTL_FCLINK_TEST, chan, tval); + if (res > 0) + goto again; + if (res < 0) + return (fcp->isp_loopstate); + res = isp_control(isp, ISPCTL_SCAN_LOOP, chan); + if (res > 0) + goto again; + if (res < 0) + return (fcp->isp_loopstate); + res = isp_control(isp, ISPCTL_SCAN_FABRIC, chan); + if (res > 0) + goto again; + if (res < 0) + return (fcp->isp_loopstate); + res = isp_control(isp, ISPCTL_PDB_SYNC, chan); + if (res > 0) + goto again; + return (fcp->isp_loopstate); } /* @@ -545,6 +543,7 @@ isp_fc_loop_statename(int state) { switch (state) { case LOOP_NIL: return "NIL"; + case LOOP_HAVE_LINK: return "Have Link"; case LOOP_TESTING_LINK: return "Testing Link"; case LOOP_LTEST_DONE: return "Link Test Done"; case LOOP_SCANNING_LOOP: return "Scanning Loop"; Modified: head/sys/dev/isp/isp_pci.c ============================================================================== --- head/sys/dev/isp/isp_pci.c Thu Nov 26 09:25:20 2015 (r291364) +++ head/sys/dev/isp/isp_pci.c Thu Nov 26 13:04:58 2015 (r291365) @@ -638,16 +638,6 @@ isp_get_specific_options(device_t dev, i } } - tval = 0; - snprintf(name, sizeof(name), "%shysteresis", prefix); - (void) resource_int_value(device_get_name(dev), device_get_unit(dev), - "name", &tval); - if (tval >= 0 && tval < 256) { - ISP_FC_PC(isp, chan)->hysteresis = tval; - } else { - ISP_FC_PC(isp, chan)->hysteresis = isp_fabric_hysteresis; - } - tval = -1; snprintf(name, sizeof(name), "%sloop_down_limit", prefix); (void) resource_int_value(device_get_name(dev), device_get_unit(dev), Modified: head/sys/dev/isp/ispvar.h ============================================================================== --- head/sys/dev/isp/ispvar.h Thu Nov 26 09:25:20 2015 (r291364) +++ head/sys/dev/isp/ispvar.h Thu Nov 26 13:04:58 2015 (r291365) @@ -438,10 +438,9 @@ typedef struct { int isp_loopstate; /* Loop State */ int isp_topo; /* Connection Type */ - uint32_t : 3, + uint32_t : 4, fctape_enabled : 1, sendmarker : 1, - loop_seen_once : 1, role : 2, isp_portid : 24; /* S_ID */ @@ -490,14 +489,15 @@ typedef struct { #define FW_NON_PART 7 #define LOOP_NIL 0 -#define LOOP_TESTING_LINK 1 -#define LOOP_LTEST_DONE 2 -#define LOOP_SCANNING_LOOP 3 -#define LOOP_LSCAN_DONE 4 -#define LOOP_SCANNING_FABRIC 5 -#define LOOP_FSCAN_DONE 6 -#define LOOP_SYNCING_PDB 7 -#define LOOP_READY 8 +#define LOOP_HAVE_LINK 1 +#define LOOP_TESTING_LINK 2 +#define LOOP_LTEST_DONE 3 +#define LOOP_SCANNING_LOOP 4 +#define LOOP_LSCAN_DONE 5 +#define LOOP_SCANNING_FABRIC 6 +#define LOOP_FSCAN_DONE 7 +#define LOOP_SYNCING_PDB 8 +#define LOOP_READY 9 #define TOPO_NL_PORT 0 #define TOPO_FL_PORT 1 From owner-svn-src-all@freebsd.org Thu Nov 26 17:26:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0693FA3AE2D; Thu, 26 Nov 2015 17:26:30 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAFD515FB; Thu, 26 Nov 2015 17:26:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQHQSGO089531; Thu, 26 Nov 2015 17:26:28 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQHQSbT089530; Thu, 26 Nov 2015 17:26:28 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511261726.tAQHQSbT089530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 26 Nov 2015 17:26:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291366 - head/contrib/wpa/src/drivers X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 17:26:30 -0000 Author: adrian Date: Thu Nov 26 17:26:28 2015 New Revision: 291366 URL: https://svnweb.freebsd.org/changeset/base/291366 Log: [wpa] bring up interface in ap_mode=2 This is required for WPA-NONE operation. PR: bin/203086 Submitted by: avos@ Modified: head/contrib/wpa/src/drivers/driver_bsd.c Modified: head/contrib/wpa/src/drivers/driver_bsd.c ============================================================================== --- head/contrib/wpa/src/drivers/driver_bsd.c Thu Nov 26 13:04:58 2015 (r291365) +++ head/contrib/wpa/src/drivers/driver_bsd.c Thu Nov 26 17:26:28 2015 (r291366) @@ -1102,6 +1102,13 @@ wpa_driver_bsd_associate(void *priv, str params->wpa_ie[0] == WLAN_EID_RSN ? 2 : 1) < 0) return -1; + /* + * NB: interface must be marked UP for association + * or scanning (ap_scan=2) + */ + if (bsd_ctrl_iface(drv, 1) < 0) + return -1; + os_memset(&mlme, 0, sizeof(mlme)); mlme.im_op = IEEE80211_MLME_ASSOC; if (params->ssid != NULL) From owner-svn-src-all@freebsd.org Thu Nov 26 17:26:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2220DA3AE83; Thu, 26 Nov 2015 17:26:54 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F24B81894; Thu, 26 Nov 2015 17:26:53 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQHQrCi089601; Thu, 26 Nov 2015 17:26:53 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQHQqS7089596; Thu, 26 Nov 2015 17:26:52 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201511261726.tAQHQqS7089596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 26 Nov 2015 17:26:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291367 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 17:26:54 -0000 Author: ian Date: Thu Nov 26 17:26:52 2015 New Revision: 291367 URL: https://svnweb.freebsd.org/changeset/base/291367 Log: Rename sysctl node hw.imx6 to hw.imx. Move its definition to imx_machdep.c so that code shared between imx5 and imx6 can work with OIDs under that node. Add last_reset_status (integer) and last_reset_reason (string) OIDs that provide info about the last chip reset (power-on, software reset, watchdog timeout). Modified: head/sys/arm/freescale/imx/imx6_anatop.c head/sys/arm/freescale/imx/imx6_machdep.c head/sys/arm/freescale/imx/imx_machdep.c head/sys/arm/freescale/imx/imx_machdep.h head/sys/arm/freescale/imx/imx_wdogreg.h Modified: head/sys/arm/freescale/imx/imx6_anatop.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_anatop.c Thu Nov 26 17:26:28 2015 (r291366) +++ head/sys/arm/freescale/imx/imx6_anatop.c Thu Nov 26 17:26:52 2015 (r291367) @@ -72,11 +72,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include -static SYSCTL_NODE(_hw, OID_AUTO, imx6, CTLFLAG_RW, NULL, "i.MX6 container"); - static struct resource_spec imx6_anatop_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { SYS_RES_IRQ, 0, RF_ACTIVE }, @@ -395,23 +394,23 @@ cpufreq_initialize(struct imx6_anatop_so uint32_t cfg3speed; struct oppt * op; - SYSCTL_ADD_INT(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx6), + SYSCTL_ADD_INT(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx), OID_AUTO, "cpu_mhz", CTLFLAG_RD, &sc->cpu_curmhz, 0, "CPU frequency"); - SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx6), + SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx), OID_AUTO, "cpu_minmhz", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH, sc, 0, cpufreq_sysctl_minmhz, "IU", "Minimum CPU frequency"); - SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx6), + SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx), OID_AUTO, "cpu_maxmhz", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH, sc, 0, cpufreq_sysctl_maxmhz, "IU", "Maximum CPU frequency"); - SYSCTL_ADD_INT(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx6), + SYSCTL_ADD_INT(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx), OID_AUTO, "cpu_maxmhz_hw", CTLFLAG_RD, &sc->cpu_maxmhz_hw, 0, "Maximum CPU frequency allowed by hardware"); - SYSCTL_ADD_INT(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx6), + SYSCTL_ADD_INT(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx), OID_AUTO, "cpu_overclock_enable", CTLFLAG_RWTUN, &sc->cpu_overclock_enable, 0, "Allow setting CPU frequency higher than cpu_maxmhz_hw"); @@ -626,10 +625,10 @@ initialize_tempmon(struct imx6_anatop_so callout_reset_sbt(&sc->temp_throttle_callout, sc->temp_throttle_delay, 0, tempmon_throttle_check, sc, 0); - SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx6), + SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx), OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, sc, 0, temp_sysctl_handler, "IK", "Current die temperature"); - SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx6), + SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_imx), OID_AUTO, "throttle_temperature", CTLTYPE_INT | CTLFLAG_RW, sc, 0, temp_throttle_sysctl_handler, "IK", "Throttle CPU when exceeding this temperature"); Modified: head/sys/arm/freescale/imx/imx6_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_machdep.c Thu Nov 26 17:26:28 2015 (r291366) +++ head/sys/arm/freescale/imx/imx6_machdep.c Thu Nov 26 17:26:52 2015 (r291367) @@ -104,7 +104,6 @@ imx6_lastaddr(platform_t plat) static int imx6_attach(platform_t plat) { - /* Inform the MPCore timer driver that its clock is variable. */ arm_tmr_change_frequency(ARM_TMR_FREQUENCY_VARIES); @@ -114,6 +113,9 @@ imx6_attach(platform_t plat) static void imx6_late_init(platform_t plat) { + const uint32_t IMX6_WDOG_SR_PHYS = 0x020bc004; + + imx_wdog_init_last_reset(IMX6_WDOG_SR_PHYS); /* Cache the gpio1 node handle for imx6_decode_fdt() workaround code. */ gpio1_node = OF_node_from_xref( Modified: head/sys/arm/freescale/imx/imx_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx_machdep.c Thu Nov 26 17:26:28 2015 (r291366) +++ head/sys/arm/freescale/imx/imx_machdep.c Thu Nov 26 17:26:52 2015 (r291367) @@ -45,6 +45,15 @@ __FBSDID("$FreeBSD$"); #include #include +SYSCTL_NODE(_hw, OID_AUTO, imx, CTLFLAG_RW, NULL, "i.MX container"); + +static int last_reset_status; +SYSCTL_UINT(_hw_imx, OID_AUTO, last_reset_status, CTLFLAG_RD, + &last_reset_status, 0, "Last reset status register"); + +SYSCTL_STRING(_hw_imx, OID_AUTO, last_reset_reason, CTLFLAG_RD, + "unknown", 0, "Last reset reason"); + struct arm32_dma_range * bus_dma_get_range(void) { @@ -85,6 +94,23 @@ imx_wdog_cpu_reset(vm_offset_t wdcr_phys continue; } +void +imx_wdog_init_last_reset(vm_offset_t wdsr_phys) +{ + volatile uint16_t * psr; + + if ((psr = arm_devmap_ptov(wdsr_phys, sizeof(*psr))) == NULL) + return; + last_reset_status = *psr; + if (last_reset_status & WDOG_RSR_SFTW) { + sysctl___hw_imx_last_reset_reason.oid_arg1 = "SoftwareReset"; + } else if (last_reset_status & WDOG_RSR_TOUT) { + sysctl___hw_imx_last_reset_reason.oid_arg1 = "WatchdogTimeout"; + } else if (last_reset_status & WDOG_RSR_POR) { + sysctl___hw_imx_last_reset_reason.oid_arg1 = "PowerOnReset"; + } +} + u_int imx_soc_family(void) { Modified: head/sys/arm/freescale/imx/imx_machdep.h ============================================================================== --- head/sys/arm/freescale/imx/imx_machdep.h Thu Nov 26 17:26:28 2015 (r291366) +++ head/sys/arm/freescale/imx/imx_machdep.h Thu Nov 26 17:26:52 2015 (r291367) @@ -30,10 +30,14 @@ #define IMX_MACHDEP_H #include +#include + +SYSCTL_DECL(_hw_imx); /* Common functions, implemented in imx_machdep.c. */ void imx_wdog_cpu_reset(vm_offset_t _wdcr_phys) __attribute__((__noreturn__)); +void imx_wdog_init_last_reset(vm_offset_t _wdsr_phys); /* From here down, routines are implemented in imxNN_machdep.c. */ Modified: head/sys/arm/freescale/imx/imx_wdogreg.h ============================================================================== --- head/sys/arm/freescale/imx/imx_wdogreg.h Thu Nov 26 17:26:28 2015 (r291366) +++ head/sys/arm/freescale/imx/imx_wdogreg.h Thu Nov 26 17:26:52 2015 (r291367) @@ -47,6 +47,7 @@ #define WDOG_SR_STEP2 0xaaaa #define WDOG_RSR_REG 0x04 /* Reset Status Register */ +#define WDOG_RSR_POR (1 << 4) /* Due to Power-On Reset */ #define WDOG_RSR_TOUT (1 << 1) /* Due WDog timeout reset */ #define WDOG_RSR_SFTW (1 << 0) /* Due Soft reset */ From owner-svn-src-all@freebsd.org Thu Nov 26 17:28:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4E2FA3AED4; Thu, 26 Nov 2015 17:28:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 701541A13; Thu, 26 Nov 2015 17:28:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQHSeHf089704; Thu, 26 Nov 2015 17:28:40 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQHSePw089703; Thu, 26 Nov 2015 17:28:40 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511261728.tAQHSePw089703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 26 Nov 2015 17:28:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291368 - head/contrib/wpa/src/drivers X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 17:28:41 -0000 Author: adrian Date: Thu Nov 26 17:28:40 2015 New Revision: 291368 URL: https://svnweb.freebsd.org/changeset/base/291368 Log: [wpa] use IFM_IEEE80211_ADHOC for now on FreeBSD for IBSS operation. PR: bin/203086 Submitted by: avos Modified: head/contrib/wpa/src/drivers/driver_bsd.c Modified: head/contrib/wpa/src/drivers/driver_bsd.c ============================================================================== --- head/contrib/wpa/src/drivers/driver_bsd.c Thu Nov 26 17:26:52 2015 (r291367) +++ head/contrib/wpa/src/drivers/driver_bsd.c Thu Nov 26 17:28:40 2015 (r291368) @@ -1055,7 +1055,14 @@ wpa_driver_bsd_associate(void *priv, str mode = 0 /* STA */; break; case IEEE80211_MODE_IBSS: + /* + * Ref bin/203086 - FreeBSD's net80211 currently uses + * IFM_IEEE80211_ADHOC. + */ +#if 0 mode = IFM_IEEE80211_IBSS; +#endif + mode = IFM_IEEE80211_ADHOC; break; case IEEE80211_MODE_AP: mode = IFM_IEEE80211_HOSTAP; From owner-svn-src-all@freebsd.org Thu Nov 26 18:56:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BED18A3AB2B; Thu, 26 Nov 2015 18:56:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8AA121B13; Thu, 26 Nov 2015 18:56:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQIuLIq015172; Thu, 26 Nov 2015 18:56:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQIuL2x015171; Thu, 26 Nov 2015 18:56:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511261856.tAQIuL2x015171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 26 Nov 2015 18:56:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291369 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 18:56:22 -0000 Author: mav Date: Thu Nov 26 18:56:21 2015 New Revision: 291369 URL: https://svnweb.freebsd.org/changeset/base/291369 Log: Remove residual functions declaration left after r291365. Modified: head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Thu Nov 26 17:28:40 2015 (r291368) +++ head/sys/dev/isp/isp_freebsd.c Thu Nov 26 18:56:21 2015 (r291369) @@ -64,8 +64,6 @@ static void isp_poll(struct cam_sim *); static timeout_t isp_watchdog; static timeout_t isp_gdt; static task_fn_t isp_gdt_task; -static timeout_t isp_ldt; -static task_fn_t isp_ldt_task; static void isp_kthread(void *); static void isp_action(struct cam_sim *, union ccb *); static int isp_timer_count; From owner-svn-src-all@freebsd.org Thu Nov 26 19:12:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBEC8A3AD9C; Thu, 26 Nov 2015 19:12:19 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89C801233; Thu, 26 Nov 2015 19:12:19 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQJCIl7020859; Thu, 26 Nov 2015 19:12:18 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQJCIgU020858; Thu, 26 Nov 2015 19:12:18 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201511261912.tAQJCIgU020858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Thu, 26 Nov 2015 19:12:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291370 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 19:12:19 -0000 Author: alc Date: Thu Nov 26 19:12:18 2015 New Revision: 291370 URL: https://svnweb.freebsd.org/changeset/base/291370 Log: Correct an error in vm_reserv_reclaim_contig(). In the highly unusual case that the reservation contained "low", the starting position in the popmap for the free page search was incorrectly calculated. The most likely (and visible) symptom of this error was the assertion failure, "vm_reserv_reclaim_contig: pa is too low". Modified: head/sys/vm/vm_reserv.c Modified: head/sys/vm/vm_reserv.c ============================================================================== --- head/sys/vm/vm_reserv.c Thu Nov 26 18:56:21 2015 (r291369) +++ head/sys/vm/vm_reserv.c Thu Nov 26 19:12:18 2015 (r291370) @@ -971,7 +971,7 @@ vm_reserv_reclaim_contig(u_long npages, { vm_paddr_t pa, size; vm_reserv_t rv; - int hi, i, lo, next_free; + int hi, i, lo, low_index, next_free; mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); if (npages > VM_LEVEL_0_NPAGES - 1) @@ -990,8 +990,9 @@ vm_reserv_reclaim_contig(u_long npages, } if (pa < low) { /* Start the search for free pages at "low". */ - i = (low - pa) / NBPOPMAP; - hi = (low - pa) % NBPOPMAP; + low_index = (low + PAGE_MASK - pa) >> PAGE_SHIFT; + i = low_index / NBPOPMAP; + hi = low_index % NBPOPMAP; } else i = hi = 0; do { From owner-svn-src-all@freebsd.org Thu Nov 26 19:39:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A125CA37258; Thu, 26 Nov 2015 19:39:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AAB61BD6; Thu, 26 Nov 2015 19:39:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQJdFUw026948; Thu, 26 Nov 2015 19:39:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQJdFt0026947; Thu, 26 Nov 2015 19:39:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201511261939.tAQJdFt0026947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 26 Nov 2015 19:39:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291371 - head/lib/libkvm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 19:39:16 -0000 Author: jhb Date: Thu Nov 26 19:39:15 2015 New Revision: 291371 URL: https://svnweb.freebsd.org/changeset/base/291371 Log: Remove kvm_sparc.c. This is for 32-bit sparc support and was imported from 4.4BSD. It has never been used by FreeBSD. Deleted: head/lib/libkvm/kvm_sparc.c From owner-svn-src-all@freebsd.org Thu Nov 26 19:42:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C972A373BA; Thu, 26 Nov 2015 19:42:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEDA91ECE; Thu, 26 Nov 2015 19:42:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQJgB87029640; Thu, 26 Nov 2015 19:42:11 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQJgAJd029629; Thu, 26 Nov 2015 19:42:10 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201511261942.tAQJgAJd029629@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 26 Nov 2015 19:42:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291372 - head/lib/libkvm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 19:42:12 -0000 Author: jhb Date: Thu Nov 26 19:42:10 2015 New Revision: 291372 URL: https://svnweb.freebsd.org/changeset/base/291372 Log: Remove trailing whitespace. Modified: head/lib/libkvm/kvm.c head/lib/libkvm/kvm_file.c head/lib/libkvm/kvm_getswapinfo.c head/lib/libkvm/kvm_i386.c head/lib/libkvm/kvm_minidump_aarch64.c head/lib/libkvm/kvm_minidump_amd64.c head/lib/libkvm/kvm_minidump_i386.c head/lib/libkvm/kvm_minidump_mips.c head/lib/libkvm/kvm_pcpu.c head/lib/libkvm/kvm_proc.c Modified: head/lib/libkvm/kvm.c ============================================================================== --- head/lib/libkvm/kvm.c Thu Nov 26 19:39:15 2015 (r291371) +++ head/lib/libkvm/kvm.c Thu Nov 26 19:42:10 2015 (r291372) @@ -91,7 +91,7 @@ kvm_fdnlist(int fd, struct nlist *list) ps_err_e pserr; int nfail; - nfail = 0; + nfail = 0; while (list->n_name != NULL && list->n_name[0] != '\0') { list->n_other = 0; list->n_desc = 0; Modified: head/lib/libkvm/kvm_file.c ============================================================================== --- head/lib/libkvm/kvm_file.c Thu Nov 26 19:39:15 2015 (r291371) +++ head/lib/libkvm/kvm_file.c Thu Nov 26 19:42:10 2015 (r291372) @@ -150,7 +150,7 @@ kvm_deadfiles(kvm_t *kd, int op __unused fail: free(ofiles); return (0); - + } char * Modified: head/lib/libkvm/kvm_getswapinfo.c ============================================================================== --- head/lib/libkvm/kvm_getswapinfo.c Thu Nov 26 19:39:15 2015 (r291371) +++ head/lib/libkvm/kvm_getswapinfo.c Thu Nov 26 19:42:10 2015 (r291372) @@ -10,7 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * THIS SOFTWARE IS PROVIDED BY 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 @@ -77,7 +77,7 @@ static int getsysctl(kvm_t *, const cha _kvm_err(kd, kd->program, "cannot read %s", msg); \ return (-1); \ } - + #define GETSWDEVNAME(dev, str, flags) \ if (dev == NODEV) { \ strlcpy(str, "[NFS swap]", sizeof(str)); \ @@ -231,7 +231,7 @@ nlist_init(kvm_t *kd) _kvm_err(kd, kd->program, "unable to find swtailq"); return (0); } - + if (kvm_swap_nl[NL_DMMAX].n_value == 0) { _kvm_err(kd, kd->program, "unable to find dmmax"); return (0); Modified: head/lib/libkvm/kvm_i386.c ============================================================================== --- head/lib/libkvm/kvm_i386.c Thu Nov 26 19:39:15 2015 (r291371) +++ head/lib/libkvm/kvm_i386.c Thu Nov 26 19:42:10 2015 (r291372) @@ -269,7 +269,7 @@ _kvm_vatop(kvm_t *kd, u_long va, off_t * if (PTD == 0) { s = _kvm_pa2off(kd, va, pa); if (s == 0) { - _kvm_err(kd, kd->program, + _kvm_err(kd, kd->program, "_kvm_vatop: bootstrap data not in dump"); goto invalid; } else @@ -365,7 +365,7 @@ _kvm_vatop_pae(kvm_t *kd, u_long va, off if (PTD == 0) { s = _kvm_pa2off(kd, va, pa); if (s == 0) { - _kvm_err(kd, kd->program, + _kvm_err(kd, kd->program, "_kvm_vatop_pae: bootstrap data not in dump"); goto invalid; } else Modified: head/lib/libkvm/kvm_minidump_aarch64.c ============================================================================== --- head/lib/libkvm/kvm_minidump_aarch64.c Thu Nov 26 19:39:15 2015 (r291371) +++ head/lib/libkvm/kvm_minidump_aarch64.c Thu Nov 26 19:42:10 2015 (r291372) @@ -29,7 +29,7 @@ __FBSDID("$FreeBSD$"); /* - * ARM64 (AArch64) machine dependent routines for kvm and minidumps. + * ARM64 (AArch64) machine dependent routines for kvm and minidumps. */ #include Modified: head/lib/libkvm/kvm_minidump_amd64.c ============================================================================== --- head/lib/libkvm/kvm_minidump_amd64.c Thu Nov 26 19:39:15 2015 (r291371) +++ head/lib/libkvm/kvm_minidump_amd64.c Thu Nov 26 19:42:10 2015 (r291372) @@ -27,7 +27,7 @@ __FBSDID("$FreeBSD$"); /* - * AMD64 machine dependent routines for kvm and minidumps. + * AMD64 machine dependent routines for kvm and minidumps. */ #include Modified: head/lib/libkvm/kvm_minidump_i386.c ============================================================================== --- head/lib/libkvm/kvm_minidump_i386.c Thu Nov 26 19:39:15 2015 (r291371) +++ head/lib/libkvm/kvm_minidump_i386.c Thu Nov 26 19:42:10 2015 (r291372) @@ -27,7 +27,7 @@ __FBSDID("$FreeBSD$"); /* - * AMD64 machine dependent routines for kvm and minidumps. + * AMD64 machine dependent routines for kvm and minidumps. */ #include @@ -286,6 +286,6 @@ _kvm_minidump_kvatop(kvm_t *kd, u_long v } if (kd->vmst->hdr.paemode) return (_kvm_minidump_vatop_pae(kd, va, pa)); - else + else return (_kvm_minidump_vatop(kd, va, pa)); } Modified: head/lib/libkvm/kvm_minidump_mips.c ============================================================================== --- head/lib/libkvm/kvm_minidump_mips.c Thu Nov 26 19:39:15 2015 (r291371) +++ head/lib/libkvm/kvm_minidump_mips.c Thu Nov 26 19:42:10 2015 (r291372) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Oleksandr Tymoshenko + * Copyright (c) 2010 Oleksandr Tymoshenko * Copyright (c) 2008 Semihalf, Grzegorz Bernacki * Copyright (c) 2006 Peter Wemm * Modified: head/lib/libkvm/kvm_pcpu.c ============================================================================== --- head/lib/libkvm/kvm_pcpu.c Thu Nov 26 19:39:15 2015 (r291371) +++ head/lib/libkvm/kvm_pcpu.c Thu Nov 26 19:42:10 2015 (r291372) @@ -60,7 +60,7 @@ static struct nlist kvm_pcpu_nl[] = { /* * Kernel per-CPU data state. We cache this stuff on the first - * access. + * access. * * XXXRW: Possibly, this (and kvmpcpu_nl) should be per-kvm_t, in case the * consumer has multiple handles in flight to differently configured Modified: head/lib/libkvm/kvm_proc.c ============================================================================== --- head/lib/libkvm/kvm_proc.c Thu Nov 26 19:39:15 2015 (r291371) +++ head/lib/libkvm/kvm_proc.c Thu Nov 26 19:42:10 2015 (r291372) @@ -269,7 +269,7 @@ kvm_proclist(kvm_t *kd, int what, int ar return (-1); } kp->ki_ppid = pproc.p_pid; - } else + } else kp->ki_ppid = 0; if (proc.p_pgrp == NULL) goto nopgrp; @@ -345,7 +345,7 @@ nopgrp: * this field. */ #define pmap_resident_count(pm) ((pm)->pm_stats.resident_count) - kp->ki_rssize = pmap_resident_count(&vmspace.vm_pmap); + kp->ki_rssize = pmap_resident_count(&vmspace.vm_pmap); kp->ki_swrss = vmspace.vm_swrss; kp->ki_tsize = vmspace.vm_tsize; kp->ki_dsize = vmspace.vm_dsize; @@ -400,12 +400,12 @@ nopgrp: kp->ki_sflag = 0; kp->ki_nice = proc.p_nice; kp->ki_traceflag = proc.p_traceflag; - if (proc.p_state == PRS_NORMAL) { + if (proc.p_state == PRS_NORMAL) { if (TD_ON_RUNQ(&mtd) || TD_CAN_RUN(&mtd) || TD_IS_RUNNING(&mtd)) { kp->ki_stat = SRUN; - } else if (mtd.td_state == + } else if (mtd.td_state == TDS_INHIBITED) { if (P_SHOULDSTOP(&proc)) { kp->ki_stat = SSTOP; From owner-svn-src-all@freebsd.org Thu Nov 26 21:05:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25F96A3A02E; Thu, 26 Nov 2015 21:05:57 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E20871A97; Thu, 26 Nov 2015 21:05:56 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQL5tkl052759; Thu, 26 Nov 2015 21:05:55 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQL5ts0052758; Thu, 26 Nov 2015 21:05:55 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201511262105.tAQL5ts0052758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 26 Nov 2015 21:05:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291373 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 21:05:57 -0000 Author: emaste Date: Thu Nov 26 21:05:55 2015 New Revision: 291373 URL: https://svnweb.freebsd.org/changeset/base/291373 Log: Correct arm64 gic_v3 sizeof argument No functional change as 'struct resource *' and 'struct resource **' have the same size, but the former is the proper type. PR: 204768 Submitted by: David Binderman Modified: head/sys/arm64/arm64/gic_v3.c Modified: head/sys/arm64/arm64/gic_v3.c ============================================================================== --- head/sys/arm64/arm64/gic_v3.c Thu Nov 26 19:42:10 2015 (r291372) +++ head/sys/arm64/arm64/gic_v3.c Thu Nov 26 21:05:55 2015 (r291373) @@ -155,7 +155,7 @@ gic_v3_attach(device_t dev) * One entry for Distributor and all remaining for Re-Distributor. */ sc->gic_res = malloc( - sizeof(sc->gic_res) * (sc->gic_redists.nregions + 1), + sizeof(*sc->gic_res) * (sc->gic_redists.nregions + 1), M_GIC_V3, M_WAITOK); /* Now allocate corresponding resources */ From owner-svn-src-all@freebsd.org Thu Nov 26 21:35:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B50AA3A9A8; Thu, 26 Nov 2015 21:35:52 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0CF01F34; Thu, 26 Nov 2015 21:35:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQLZoDa061298; Thu, 26 Nov 2015 21:35:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQLZolO061293; Thu, 26 Nov 2015 21:35:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201511262135.tAQLZolO061293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 26 Nov 2015 21:35:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291374 - in head/sys: amd64/conf i386/conf pc98/conf powerpc/conf sparc64/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 21:35:52 -0000 Author: emaste Date: Thu Nov 26 21:35:50 2015 New Revision: 291374 URL: https://svnweb.freebsd.org/changeset/base/291374 Log: Fix whitespace on addition of IPSEC option Modified: head/sys/amd64/conf/GENERIC head/sys/i386/conf/GENERIC head/sys/pc98/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/sparc64/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Thu Nov 26 21:05:55 2015 (r291373) +++ head/sys/amd64/conf/GENERIC Thu Nov 26 21:35:50 2015 (r291374) @@ -28,7 +28,7 @@ options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -options IPSEC # IP (v4/v6) security +options IPSEC # IP (v4/v6) security options TCP_OFFLOAD # TCP offload options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Thu Nov 26 21:05:55 2015 (r291373) +++ head/sys/i386/conf/GENERIC Thu Nov 26 21:35:50 2015 (r291374) @@ -30,7 +30,7 @@ options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -options IPSEC # IP (v4/v6) security +options IPSEC # IP (v4/v6) security options TCP_OFFLOAD # TCP offload options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Thu Nov 26 21:05:55 2015 (r291373) +++ head/sys/pc98/conf/GENERIC Thu Nov 26 21:35:50 2015 (r291374) @@ -29,7 +29,7 @@ options SCHED_4BSD # 4BSD scheduler #options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -options IPSEC # IP (v4/v6) security +options IPSEC # IP (v4/v6) security options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Thu Nov 26 21:05:55 2015 (r291373) +++ head/sys/powerpc/conf/GENERIC Thu Nov 26 21:35:50 2015 (r291374) @@ -37,7 +37,7 @@ options SCHED_ULE #ULE scheduler options PREEMPTION #Enable kernel thread preemption options INET #InterNETworking options INET6 #IPv6 communications protocols -options IPSEC # IP (v4/v6) security +options IPSEC # IP (v4/v6) security options SCTP #Stream Control Transmission Protocol options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Thu Nov 26 21:05:55 2015 (r291373) +++ head/sys/sparc64/conf/GENERIC Thu Nov 26 21:35:50 2015 (r291374) @@ -30,7 +30,7 @@ options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -options IPSEC # IP (v4/v6) security +options IPSEC # IP (v4/v6) security options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support From owner-svn-src-all@freebsd.org Thu Nov 26 23:05:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93899A3A710; Thu, 26 Nov 2015 23:05:41 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C56C1CDB; Thu, 26 Nov 2015 23:05:41 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQN5eJI087110; Thu, 26 Nov 2015 23:05:40 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQN5eTX087109; Thu, 26 Nov 2015 23:05:40 GMT (envelope-from des@FreeBSD.org) Message-Id: <201511262305.tAQN5eTX087109@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Thu, 26 Nov 2015 23:05:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291375 - head/crypto/openssh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 23:05:41 -0000 Author: des Date: Thu Nov 26 23:05:40 2015 New Revision: 291375 URL: https://svnweb.freebsd.org/changeset/base/291375 Log: r291198 inadvertantly reverted a local patch for the default location of ssh-askpass and xauth, breaking X11 forwarding. Modified: head/crypto/openssh/pathnames.h Modified: head/crypto/openssh/pathnames.h ============================================================================== --- head/crypto/openssh/pathnames.h Thu Nov 26 21:35:50 2015 (r291374) +++ head/crypto/openssh/pathnames.h Thu Nov 26 23:05:40 2015 (r291375) @@ -1,4 +1,5 @@ /* $OpenBSD: pathnames.h,v 1.24 2013/12/06 13:39:49 markus Exp $ */ +/* $FreeBSD$ */ /* * Author: Tatu Ylonen @@ -121,7 +122,7 @@ * Default location of askpass */ #ifndef _PATH_SSH_ASKPASS_DEFAULT -#define _PATH_SSH_ASKPASS_DEFAULT "/usr/X11R6/bin/ssh-askpass" +#define _PATH_SSH_ASKPASS_DEFAULT "/usr/local/bin/ssh-askpass" #endif /* Location of ssh-keysign for hostbased authentication */ @@ -136,7 +137,7 @@ /* xauth for X11 forwarding */ #ifndef _PATH_XAUTH -#define _PATH_XAUTH "/usr/X11R6/bin/xauth" +#define _PATH_XAUTH "/usr/local/bin/xauth" #endif /* UNIX domain socket for X11 server; displaynum will replace %u */ From owner-svn-src-all@freebsd.org Thu Nov 26 23:12:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8405A3A880; Thu, 26 Nov 2015 23:12:42 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A91C71074; Thu, 26 Nov 2015 23:12:42 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAQNCf2k089954; Thu, 26 Nov 2015 23:12:41 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAQNCf3f089953; Thu, 26 Nov 2015 23:12:41 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201511262312.tAQNCf3f089953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 26 Nov 2015 23:12:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291376 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2015 23:12:43 -0000 Author: tuexen Date: Thu Nov 26 23:12:41 2015 New Revision: 291376 URL: https://svnweb.freebsd.org/changeset/base/291376 Log: When the sending of an SCTP outgoing stream reset request fails, don't report it to the user since all stream have been marked as pending. MFC after: 1 week Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Thu Nov 26 23:05:40 2015 (r291375) +++ head/sys/netinet/sctp_usrreq.c Thu Nov 26 23:12:41 2015 (r291376) @@ -4651,11 +4651,20 @@ sctp_setopt(struct socket *so, int optna error = sctp_send_str_reset_req(stcb, strrst->srs_number_streams, strrst->srs_stream_list, send_in, 0, 0, 0, 0, 0); - } else + } else { error = sctp_send_stream_reset_out_if_possible(stcb, SCTP_SO_LOCKED); - if (!error) + } + if (error == 0) { sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_STRRST_REQ, SCTP_SO_LOCKED); - + } else { + /* + * For outgoing streams don't report any + * problems in sending the request to the + * application. XXX: Double check resetting + * incoming streams. + */ + error = 0; + } SCTP_TCB_UNLOCK(stcb); break; } From owner-svn-src-all@freebsd.org Fri Nov 27 00:04:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51104A39196; Fri, 27 Nov 2015 00:04:41 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F34C11FF9; Fri, 27 Nov 2015 00:04:40 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAR04ejw004312; Fri, 27 Nov 2015 00:04:40 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAR04euc004311; Fri, 27 Nov 2015 00:04:40 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201511270004.tAR04euc004311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 27 Nov 2015 00:04:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291377 - head/usr.sbin/kbdmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 00:04:41 -0000 Author: emaste Date: Fri Nov 27 00:04:39 2015 New Revision: 291377 URL: https://svnweb.freebsd.org/changeset/base/291377 Log: vidfont: with vt(4) omit size from vidcontrol -f When using syscons, vidfont extracts the font size from the filename passes it to vidcontrol -f. In vt(4) mode the size argument is not required, and some of the fonts in /usr/share/vt/fonts do not have the size in the filename, which caused vidfont to fail. Thus, just omit the size argument in vt(4) mode. MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/kbdmap/kbdmap.c Modified: head/usr.sbin/kbdmap/kbdmap.c ============================================================================== --- head/usr.sbin/kbdmap/kbdmap.c Thu Nov 26 23:12:41 2015 (r291376) +++ head/usr.sbin/kbdmap/kbdmap.c Fri Nov 27 00:04:39 2015 (r291377) @@ -57,6 +57,7 @@ static const char *dir; static const char *menu = ""; static int x11; +static int using_vt; static int show; static int verbose; static int print; @@ -150,7 +151,7 @@ add_keymap(const char *desc, int mark, c * Return 0 if syscons is in use (to select legacy defaults). */ static int -check_newcons(void) +check_vt(void) { size_t len; char term[3]; @@ -159,7 +160,7 @@ check_newcons(void) if (sysctlbyname("kern.vty", &term, &len, NULL, 0) != 0 || strcmp(term, "vt") != 0) return 0; - return -1; + return 1; } /* @@ -256,7 +257,7 @@ get_font(void) static void vidcontrol(const char *fnt) { - char *tmp, *p, *q; + char *tmp, *p, *q, *cmd; char ch; int i; @@ -264,6 +265,13 @@ vidcontrol(const char *fnt) if (x11) return; + if (using_vt) { + asprintf(&cmd, "vidcontrol -f %s", fnt); + system(cmd); + free(cmd); + return; + } + tmp = strdup(fnt); /* Extract font size */ @@ -281,7 +289,6 @@ vidcontrol(const char *fnt) if (sscanf(p, "%dx%d%c", &i, &i, &ch) != 2) fprintf(stderr, "Which font size? %s\n", fnt); else { - char *cmd; asprintf(&cmd, "vidcontrol -f %s %s", p, fnt); if (verbose) fprintf(stderr, "%s\n", cmd); @@ -832,7 +839,8 @@ main(int argc, char **argv) sleep(2); } - if (check_newcons() == 0) { + using_vt = check_vt(); + if (using_vt == 0) { keymapdir = DEFAULT_SC_KEYMAP_DIR; fontdir = DEFAULT_SC_FONT_DIR; font_default = DEFAULT_SC_FONT; From owner-svn-src-all@freebsd.org Fri Nov 27 01:03:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B661A39BEA; Fri, 27 Nov 2015 01:03:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66248125C; Fri, 27 Nov 2015 01:03:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAR13hrx021352; Fri, 27 Nov 2015 01:03:43 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAR13hjY021351; Fri, 27 Nov 2015 01:03:43 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511270103.tAR13hjY021351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 27 Nov 2015 01:03: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: r291378 - stable/10/sys/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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 01:03:44 -0000 Author: kib Date: Fri Nov 27 01:03:43 2015 New Revision: 291378 URL: https://svnweb.freebsd.org/changeset/base/291378 Log: MFC r291266: Correct the number of DTLB entries reported for the CPUID Leaf 2 descriptor 0x6c. Modified: stable/10/sys/x86/x86/identcpu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/x86/identcpu.c ============================================================================== --- stable/10/sys/x86/x86/identcpu.c Fri Nov 27 00:04:39 2015 (r291377) +++ stable/10/sys/x86/x86/identcpu.c Fri Nov 27 01:03:43 2015 (r291378) @@ -1894,7 +1894,7 @@ print_INTEL_TLB(u_int data) printf("DTLB: 4KByte pages, 8-way set associative, 256 entries\n"); break; case 0x6c: - printf("DTLB: 2M/4M pages, 8-way set associative, 126 entries\n"); + printf("DTLB: 2M/4M pages, 8-way set associative, 128 entries\n"); break; case 0x6d: printf("DTLB: 1 GByte pages, fully associative, 16 entries\n"); From owner-svn-src-all@freebsd.org Fri Nov 27 01:16:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4AB0A39E6D; Fri, 27 Nov 2015 01:16:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BE0A18B3; Fri, 27 Nov 2015 01:16:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAR1GZuV024259; Fri, 27 Nov 2015 01:16:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAR1GZi9024258; Fri, 27 Nov 2015 01:16:35 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511270116.tAR1GZi9024258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 27 Nov 2015 01:16:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291379 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 01:16:36 -0000 Author: kib Date: Fri Nov 27 01:16:35 2015 New Revision: 291379 URL: https://svnweb.freebsd.org/changeset/base/291379 Log: Move the comment about resident pages preventing vnode from leaving active list, into the header comment for vdrop(), which is the function that decides whether to leave the vnode on the list. Note that dirty page write-out in vinactive() is asynchronous. Discussed with: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Nov 27 01:03:43 2015 (r291378) +++ head/sys/kern/vfs_subr.c Fri Nov 27 01:16:35 2015 (r291379) @@ -2618,6 +2618,10 @@ _vhold(struct vnode *vp, bool locked) * Drop the hold count of the vnode. If this is the last reference to * the vnode we place it on the free list unless it has been vgone'd * (marked VI_DOOMED) in which case we will free it. + * + * Because the vnode vm object keeps a hold reference on the vnode if + * there is at least one resident non-cached page, the vnode cannot + * leave the active list without the page cleanup done. */ void _vdrop(struct vnode *vp, bool locked) @@ -2744,11 +2748,13 @@ vinactive(struct vnode *vp, struct threa VI_UNLOCK(vp); /* * Before moving off the active list, we must be sure that any - * modified pages are on the vnode's dirty list since these will - * no longer be checked once the vnode is on the inactive list. - * Because the vnode vm object keeps a hold reference on the vnode - * if there is at least one resident non-cached page, the vnode - * cannot leave the active list without the page cleanup done. + * modified pages are converted into the vnode's dirty + * buffers, since these will no longer be checked once the + * vnode is on the inactive list. + * + * The write-out of the dirty pages is asynchronous. At the + * point that VOP_INACTIVE() is called, there could still be + * pending I/O and dirty pages in the object. */ obj = vp->v_object; if (obj != NULL && (obj->flags & OBJ_MIGHTBEDIRTY) != 0) { From owner-svn-src-all@freebsd.org Fri Nov 27 01:45:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BB79A3A524; Fri, 27 Nov 2015 01:45:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2039614B7; Fri, 27 Nov 2015 01:45:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAR1jfn7032911; Fri, 27 Nov 2015 01:45:41 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAR1jfFd032909; Fri, 27 Nov 2015 01:45:41 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511270145.tAR1jfFd032909@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 27 Nov 2015 01:45:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291380 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 01:45:42 -0000 Author: kib Date: Fri Nov 27 01:45:40 2015 New Revision: 291380 URL: https://svnweb.freebsd.org/changeset/base/291380 Log: Remove VI_AGE vnode iflag, it is unused. Noted by: bde Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/vfs_subr.c head/sys/sys/vnode.h Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Nov 27 01:16:35 2015 (r291379) +++ head/sys/kern/vfs_subr.c Fri Nov 27 01:45:40 2015 (r291380) @@ -2601,7 +2601,7 @@ _vhold(struct vnode *vp, bool locked) mtx_lock(&vnode_free_list_mtx); TAILQ_REMOVE(&vnode_free_list, vp, v_actfreelist); freevnodes--; - vp->v_iflag &= ~(VI_FREE|VI_AGE); + vp->v_iflag &= ~VI_FREE; KASSERT((vp->v_iflag & VI_ACTIVE) == 0, ("Activating already active vnode")); vp->v_iflag |= VI_ACTIVE; @@ -2670,16 +2670,9 @@ _vdrop(struct vnode *vp, bool locked) v_actfreelist); mp->mnt_activevnodelistsize--; } - /* XXX V*AGE hasn't been set since 1997. */ - if (vp->v_iflag & VI_AGE) { - TAILQ_INSERT_HEAD(&vnode_free_list, vp, - v_actfreelist); - } else { - TAILQ_INSERT_TAIL(&vnode_free_list, vp, - v_actfreelist); - } + TAILQ_INSERT_TAIL(&vnode_free_list, vp, + v_actfreelist); freevnodes++; - vp->v_iflag &= ~VI_AGE; vp->v_iflag |= VI_FREE; mtx_unlock(&vnode_free_list_mtx); } else { @@ -3190,8 +3183,6 @@ vn_printf(struct vnode *vp, const char * } if (vp->v_iflag & VI_MOUNT) strlcat(buf, "|VI_MOUNT", sizeof(buf)); - if (vp->v_iflag & VI_AGE) - strlcat(buf, "|VI_AGE", sizeof(buf)); if (vp->v_iflag & VI_DOOMED) strlcat(buf, "|VI_DOOMED", sizeof(buf)); if (vp->v_iflag & VI_FREE) @@ -3202,7 +3193,7 @@ vn_printf(struct vnode *vp, const char * strlcat(buf, "|VI_DOINGINACT", sizeof(buf)); if (vp->v_iflag & VI_OWEINACT) strlcat(buf, "|VI_OWEINACT", sizeof(buf)); - flags = vp->v_iflag & ~(VI_MOUNT | VI_AGE | VI_DOOMED | VI_FREE | + flags = vp->v_iflag & ~(VI_MOUNT | VI_DOOMED | VI_FREE | VI_ACTIVE | VI_DOINGINACT | VI_OWEINACT); if (flags != 0) { snprintf(buf2, sizeof(buf2), "|VI(0x%lx)", flags); Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Fri Nov 27 01:16:35 2015 (r291379) +++ head/sys/sys/vnode.h Fri Nov 27 01:45:40 2015 (r291380) @@ -234,7 +234,6 @@ struct xvnode { * are required for writing but the status may be checked with either. */ #define VI_MOUNT 0x0020 /* Mount in progress */ -#define VI_AGE 0x0040 /* Insert vnode at head of free list */ #define VI_DOOMED 0x0080 /* This vnode is being recycled */ #define VI_FREE 0x0100 /* This vnode is on the freelist */ #define VI_ACTIVE 0x0200 /* This vnode is on the active list */ From owner-svn-src-all@freebsd.org Fri Nov 27 03:48:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E34A2A364BB; Fri, 27 Nov 2015 03:48:03 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFD3310B1; Fri, 27 Nov 2015 03:48:03 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAR3m2bm068570; Fri, 27 Nov 2015 03:48:02 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAR3m2k5068569; Fri, 27 Nov 2015 03:48:02 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511270348.tAR3m2k5068569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Fri, 27 Nov 2015 03:48: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: r291381 - stable/10/usr.bin/netstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 03:48:04 -0000 Author: ume Date: Fri Nov 27 03:48:02 2015 New Revision: 291381 URL: https://svnweb.freebsd.org/changeset/base/291381 Log: MFC r291097: Don't truncate an interface name when -W option is specified. Modified: stable/10/usr.bin/netstat/route.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/netstat/route.c ============================================================================== --- stable/10/usr.bin/netstat/route.c Fri Nov 27 01:45:40 2015 (r291380) +++ stable/10/usr.bin/netstat/route.c Fri Nov 27 03:48:02 2015 (r291381) @@ -664,7 +664,10 @@ p_rtentry_sysctl(struct rt_msghdr *rtm) strlcpy(prettyname, "---", sizeof(prettyname)); } - printf("%*.*s", wid_if, wid_if, prettyname); + if (Wflag) + printf("%*s", wid_if, prettyname); + else + printf("%*.*s", wid_if, wid_if, prettyname); if (rtm->rtm_rmx.rmx_expire) { time_t expire_time; From owner-svn-src-all@freebsd.org Fri Nov 27 09:21:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2645DA36EFA; Fri, 27 Nov 2015 09:21:04 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-qk0-x231.google.com (mail-qk0-x231.google.com [IPv6:2607:f8b0:400d:c09::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D5F671A95; Fri, 27 Nov 2015 09:21:03 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by qkda6 with SMTP id a6so34383183qkd.3; Fri, 27 Nov 2015 01:21:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=1LvRa+xzNxplrkbjnuPl4BLPCEnZ1WPMVbydZSNoD1U=; b=0npoGGVQI0mlZXv5VaOC2thtZSLRRal5hnBTpfSCitsOAKk6aseRpQz87ERqJPmxrz 9Dm8t38HBV93Lzv/HkP0skP/otZTBANmkNp2gji4nD9qP1WVfqDAI/HECqA2OU+5XbeC gkJPQ/dlWb7c/qyCy2Ckibs1tKknrMjquTx0Q4QfbFDgyRDgwpg/kSH64zU0/jVrK0UI nt7KPj03n94hcaFIOJ2ksg2ULzDvkjfmMBg344QVwethFI2IPH8h1Vu7dyLguffUdriC VRIIm2RpEBSaGZ+WWVgJRu4mvlqe9DVQ2aSI4K/Jb0sR7R6MIszEk/Bldux4JnWPx8/V rUAA== X-Received: by 10.55.71.199 with SMTP id u190mr48817760qka.3.1448616063049; Fri, 27 Nov 2015 01:21:03 -0800 (PST) Received: from mbp.home (179-125-135-253.desktop.com.br. [179.125.135.253]) by smtp.gmail.com with ESMTPSA id a15sm8967347qge.18.2015.11.27.01.21.01 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 Nov 2015 01:21:02 -0800 (PST) Sender: Renato Botelho Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Subject: Re: svn commit: r291355 - in stable/10/sys: netinet netipsec From: Renato Botelho In-Reply-To: <201511260224.tAQ2Ok8T023023@repo.freebsd.org> Date: Fri, 27 Nov 2015 07:20:59 -0200 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <37232D6B-AEC9-4271-8DB7-0606C298B25F@FreeBSD.org> References: <201511260224.tAQ2Ok8T023023@repo.freebsd.org> To: "George V. Neville-Neil" X-Mailer: Apple Mail (2.3096.5) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 09:21:04 -0000 > On Nov 26, 2015, at 00:24, George V. Neville-Neil = wrote: >=20 > Author: gnn > Date: Thu Nov 26 02:24:45 2015 > New Revision: 291355 > URL: https://svnweb.freebsd.org/changeset/base/291355 >=20 > Log: > MFC 290028: > Turning on IPSEC used to introduce a slight amount of performance > degradation (7%) for host host TCP connections over 10Gbps links, > even when there were no secuirty policies in place. There is no > change in performance on 1Gbps network links. Testing GENERIC vs. > GENERIC-NOIPSEC vs. GENERIC with this change shows that the new > code removes any overhead introduced by having IPSEC always in the > kernel. >=20 > Differential Revision: D3993 > Sponsored by: Rubicon Communications (Netgate) >=20 > Modified: > stable/10/sys/netinet/ip_ipsec.c > stable/10/sys/netinet/tcp_subr.c > stable/10/sys/netipsec/ipsec.c > Directory Properties: > stable/10/ (props changed) >=20 > Modified: stable/10/sys/netinet/ip_ipsec.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/10/sys/netinet/ip_ipsec.c Thu Nov 26 02:16:25 2015 = (r291354) > +++ stable/10/sys/netinet/ip_ipsec.c Thu Nov 26 02:24:45 2015 = (r291355) > @@ -230,6 +230,10 @@ ip_ipsec_output(struct mbuf **m, struct=20 > struct secpolicy *sp =3D NULL; > struct tdb_ident *tdbi; > struct m_tag *mtag; > + > + if (!key_havesp(IPSEC_DIR_OUTBOUND)) > + return 0; > + > /* > * Check the security policy (SP) for the packet and, if > * required, do IPsec-related processing. There are two >=20 > Modified: stable/10/sys/netinet/tcp_subr.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/10/sys/netinet/tcp_subr.c Thu Nov 26 02:16:25 2015 = (r291354) > +++ stable/10/sys/netinet/tcp_subr.c Thu Nov 26 02:24:45 2015 = (r291355) > @@ -1947,7 +1947,8 @@ ipsec_hdrsiz_tcp(struct tcpcb *tp) > #endif > struct tcphdr *th; >=20 > - if ((tp =3D=3D NULL) || ((inp =3D tp->t_inpcb) =3D=3D NULL)) > + if ((tp =3D=3D NULL) || ((inp =3D tp->t_inpcb) =3D=3D NULL) || > + (!key_havesp(IPSEC_DIR_OUTBOUND))) Looks like style is broken here ^ -- Renato Botelho From owner-svn-src-all@freebsd.org Fri Nov 27 14:20:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81629A39C12; Fri, 27 Nov 2015 14:20:33 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 494141304; Fri, 27 Nov 2015 14:20:33 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAREKW2k050500; Fri, 27 Nov 2015 14:20:32 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAREKWrY050499; Fri, 27 Nov 2015 14:20:32 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201511271420.tAREKWrY050499@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 27 Nov 2015 14:20:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291382 - head/sbin/newfs_msdos X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 14:20:33 -0000 Author: emaste Date: Fri Nov 27 14:20:32 2015 New Revision: 291382 URL: https://svnweb.freebsd.org/changeset/base/291382 Log: mkfs_msdos: sync with NetBSD Add a sanity test and clean up whitespace. Obtained from: NetBSD Modified: head/sbin/newfs_msdos/mkfs_msdos.c Modified: head/sbin/newfs_msdos/mkfs_msdos.c ============================================================================== --- head/sbin/newfs_msdos/mkfs_msdos.c Fri Nov 27 03:48:02 2015 (r291381) +++ head/sbin/newfs_msdos/mkfs_msdos.c Fri Nov 27 14:20:32 2015 (r291382) @@ -223,8 +223,8 @@ static void mklabel(u_int8_t *, const ch static int oklabel(const char *); static void setstr(u_int8_t *, const char *, size_t); -int mkfs_msdos(const char *fname, const char *dtype, - const struct msdos_options *op) +int +mkfs_msdos(const char *fname, const char *dtype, const struct msdos_options *op) { char buf[MAXPATHLEN]; struct sigaction si_sa; @@ -245,6 +245,10 @@ int mkfs_msdos(const char *fname, const int fd, fd1; struct msdos_options o = *op; + if (o.block_size && o.sectors_per_cluster) { + warnx("Cannot specify both block size and sectors per cluster"); + return -1; + } if (o.OEM_string && strlen(o.OEM_string) > 8) { warnx("%s: bad OEM string", o.OEM_string); return -1; @@ -304,7 +308,8 @@ int mkfs_msdos(const char *fname, const bpb.bpbHugeSectors = o.size; if (o.hidden_sectors_set) bpb.bpbHiddenSecs = o.hidden_sectors; - if (!(o.floppy || (o.drive_heads && o.sectors_per_track && o.bytes_per_sector && o.size && o.hidden_sectors_set))) { + if (!(o.floppy || (o.drive_heads && o.sectors_per_track && + o.bytes_per_sector && o.size && o.hidden_sectors_set))) { off_t delta; getdiskinfo(fd, fname, dtype, o.hidden_sectors_set, &bpb); bpb.bpbHugeSectors -= (o.offset / bpb.bpbBytesPerSec); From owner-svn-src-all@freebsd.org Fri Nov 27 14:29:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46C85A39E32; Fri, 27 Nov 2015 14:29:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16369188E; Fri, 27 Nov 2015 14:29:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARET4Y2052741; Fri, 27 Nov 2015 14:29:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARET4v4052740; Fri, 27 Nov 2015 14:29:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511271429.tARET4v4052740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Nov 2015 14:29:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291383 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 14:29:05 -0000 Author: mav Date: Fri Nov 27 14:29:04 2015 New Revision: 291383 URL: https://svnweb.freebsd.org/changeset/base/291383 Log: Fix panic when trying to sort unsupported command in OOA queue. Handle unsupported commands as not conflicting/blocking. Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Fri Nov 27 14:20:32 2015 (r291382) +++ head/sys/cam/ctl/ctl.c Fri Nov 27 14:29:04 2015 (r291383) @@ -11091,6 +11091,8 @@ ctl_check_for_blockage(struct ctl_lun *l __func__, pending_entry->seridx, pending_io->scsiio.cdb[0], pending_io->scsiio.cdb[1], pending_io)); ooa_entry = ctl_get_cmd_entry(&ooa_io->scsiio, NULL); + if (ooa_entry->seridx == CTL_SERIDX_INVLD) + return (CTL_ACTION_PASS); /* Unsupported command in OOA queue */ KASSERT(ooa_entry->seridx < CTL_SERIDX_COUNT, ("%s: Invalid seridx %d for ooa CDB %02x %02x @ %p", __func__, ooa_entry->seridx, ooa_io->scsiio.cdb[0], From owner-svn-src-all@freebsd.org Fri Nov 27 14:38:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47691A3A0F0; Fri, 27 Nov 2015 14:38:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 148FD1D32; Fri, 27 Nov 2015 14:38:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAREcbtj055647; Fri, 27 Nov 2015 14:38:37 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAREcb7Y055646; Fri, 27 Nov 2015 14:38:37 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511271438.tAREcb7Y055646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Nov 2015 14:38: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: r291384 - stable/10/sys/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 14:38:38 -0000 Author: mav Date: Fri Nov 27 14:38:36 2015 New Revision: 291384 URL: https://svnweb.freebsd.org/changeset/base/291384 Log: MFC r291061: Improve locking of sg_threadcount. Modified: stable/10/sys/rpc/svc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/rpc/svc.c ============================================================================== --- stable/10/sys/rpc/svc.c Fri Nov 27 14:29:04 2015 (r291383) +++ stable/10/sys/rpc/svc.c Fri Nov 27 14:38:36 2015 (r291384) @@ -1303,7 +1303,9 @@ svc_new_thread(SVCGROUP *grp) SVCPOOL *pool = grp->sg_pool; struct thread *td; + mtx_lock(&grp->sg_lock); grp->sg_threadcount++; + mtx_unlock(&grp->sg_lock); kthread_add(svc_thread_start, grp, pool->sp_proc, &td, 0, 0, "%s: service", pool->sp_name); } @@ -1336,12 +1338,12 @@ svc_run(SVCPOOL *pool) } /* Starting threads */ + pool->sp_groups[0].sg_threadcount++; for (g = 0; g < pool->sp_groupcount; g++) { grp = &pool->sp_groups[g]; for (i = ((g == 0) ? 1 : 0); i < grp->sg_minthreads; i++) svc_new_thread(grp); } - pool->sp_groups[0].sg_threadcount++; svc_run_internal(&pool->sp_groups[0], TRUE); /* Waiting for threads to stop. */ From owner-svn-src-all@freebsd.org Fri Nov 27 14:40:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3588A3A178; Fri, 27 Nov 2015 14:40:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A77C81EA7; Fri, 27 Nov 2015 14:40:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAREeLhw055775; Fri, 27 Nov 2015 14:40:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAREeL6M055774; Fri, 27 Nov 2015 14:40:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201511271440.tAREeL6M055774@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 27 Nov 2015 14:40:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291385 - head/sbin/newfs_msdos X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 14:40:23 -0000 Author: emaste Date: Fri Nov 27 14:40:21 2015 New Revision: 291385 URL: https://svnweb.freebsd.org/changeset/base/291385 Log: Use netbsd usage() implementation in newfs_msdos In r289629 newfs_msdos option descriptions are available in mkfs_msdos.h. Obtained from: NetBSD Modified: head/sbin/newfs_msdos/newfs_msdos.c Modified: head/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- head/sbin/newfs_msdos/newfs_msdos.c Fri Nov 27 14:38:36 2015 (r291384) +++ head/sbin/newfs_msdos/newfs_msdos.c Fri Nov 27 14:40:21 2015 (r291385) @@ -235,31 +235,18 @@ argtooff(const char *arg, const char *ms static void usage(void) { - fprintf(stderr, - "usage: newfs_msdos [ -options ] special [disktype]\n" - "where the options are:\n" - "\t-@ create file system at specified offset\n" - "\t-B get bootstrap from file\n" - "\t-C create image file with specified size\n" - "\t-F FAT type (12, 16, or 32)\n" - "\t-I volume ID\n" - "\t-L volume label\n" - "\t-N don't create file system: just print out parameters\n" - "\t-O OEM string\n" - "\t-S bytes/sector\n" - "\t-a sectors/FAT\n" - "\t-b block size\n" - "\t-c sectors/cluster\n" - "\t-e root directory entries\n" - "\t-f standard format\n" - "\t-h drive heads\n" - "\t-i file system info sector\n" - "\t-k backup boot sector\n" - "\t-m media descriptor\n" - "\t-n number of FATs\n" - "\t-o hidden sectors\n" - "\t-r reserved sectors\n" - "\t-s file system size (sectors)\n" - "\t-u sectors/track\n"); - exit(1); + fprintf(stderr, + "usage: %s [ -options ] special [disktype]\n", getprogname()); + fprintf(stderr, "where the options are:\n"); +static struct { + char o; + const char *h; +} opts[] = { +#define AOPT(_opt, _type, _name, _min, _desc) { _opt, _desc }, +ALLOPTS +#undef AOPT + }; + for (size_t i = 0; i < nitems(opts); i++) + fprintf(stderr, "\t-%c %s\n", opts[i].o, opts[i].h); + exit(1); } From owner-svn-src-all@freebsd.org Fri Nov 27 14:41:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09A64A3A1CD; Fri, 27 Nov 2015 14:41:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C71DC1051; Fri, 27 Nov 2015 14:41:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAREexY2055837; Fri, 27 Nov 2015 14:40:59 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAREexvh055836; Fri, 27 Nov 2015 14:40:59 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511271440.tAREexvh055836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Nov 2015 14:40:59 +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: r291386 - stable/9/sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 14:41:01 -0000 Author: mav Date: Fri Nov 27 14:40:59 2015 New Revision: 291386 URL: https://svnweb.freebsd.org/changeset/base/291386 Log: MFC r291061: Improve locking of sg_threadcount. Modified: stable/9/sys/rpc/svc.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/rpc/svc.c ============================================================================== --- stable/9/sys/rpc/svc.c Fri Nov 27 14:40:21 2015 (r291385) +++ stable/9/sys/rpc/svc.c Fri Nov 27 14:40:59 2015 (r291386) @@ -1292,7 +1292,9 @@ svc_new_thread(SVCGROUP *grp) SVCPOOL *pool = grp->sg_pool; struct thread *td; + mtx_lock(&grp->sg_lock); grp->sg_threadcount++; + mtx_unlock(&grp->sg_lock); kthread_add(svc_thread_start, grp, pool->sp_proc, &td, 0, 0, "%s: service", pool->sp_name); } @@ -1325,12 +1327,12 @@ svc_run(SVCPOOL *pool) } /* Starting threads */ + pool->sp_groups[0].sg_threadcount++; for (g = 0; g < pool->sp_groupcount; g++) { grp = &pool->sp_groups[g]; for (i = ((g == 0) ? 1 : 0); i < grp->sg_minthreads; i++) svc_new_thread(grp); } - pool->sp_groups[0].sg_threadcount++; svc_run_internal(&pool->sp_groups[0], TRUE); /* Waiting for threads to stop. */ From owner-svn-src-all@freebsd.org Fri Nov 27 15:19:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 026A6A3ABC5; Fri, 27 Nov 2015 15:19:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B39331372; Fri, 27 Nov 2015 15:19:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARFJaAo067327; Fri, 27 Nov 2015 15:19:36 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARFJafn067322; Fri, 27 Nov 2015 15:19:36 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511271519.tARFJafn067322@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Nov 2015 15:19: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: r291387 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 15:19:38 -0000 Author: mav Date: Fri Nov 27 15:19:36 2015 New Revision: 291387 URL: https://svnweb.freebsd.org/changeset/base/291387 Log: MFC r290615: Introduce portal group options in ctl.conf. While CTL has concept of port options, used at least for iSCSI ports now, before this change it was impossible to set them manually. There still no user-configurable port options now, but I am planning to change that. Modified: stable/10/usr.sbin/ctld/ctl.conf.5 stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/ctld.h stable/10/usr.sbin/ctld/kernel.c stable/10/usr.sbin/ctld/parse.y Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- stable/10/usr.sbin/ctld/ctl.conf.5 Fri Nov 27 14:40:59 2015 (r291386) +++ stable/10/usr.sbin/ctld/ctl.conf.5 Fri Nov 27 15:19:36 2015 (r291387) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 27, 2015 +.Dd November 9, 2015 .Dt CTL.CONF 5 .Os .Sh NAME @@ -229,7 +229,9 @@ An IPv4 or IPv6 address and port to list .\".It Ic listen-iser Ar address .\"An IPv4 or IPv6 address and port to listen on for incoming connections .\"using iSER (iSCSI over RDMA) protocol. -.It Ic redirect Aq Ar address +.It Ic option Ar name Ar value +The CTL-specific port options passed to the kernel. +.It Ic redirect Ar address IPv4 or IPv6 address to redirect initiators to. When configured, all initiators attempting to connect to portal belonging to this Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Fri Nov 27 14:40:59 2015 (r291386) +++ stable/10/usr.sbin/ctld/ctld.c Fri Nov 27 15:19:36 2015 (r291387) @@ -615,6 +615,7 @@ portal_group_new(struct conf *conf, cons if (pg == NULL) log_err(1, "calloc"); pg->pg_name = checked_strdup(name); + TAILQ_INIT(&pg->pg_options); TAILQ_INIT(&pg->pg_portals); TAILQ_INIT(&pg->pg_ports); pg->pg_conf = conf; @@ -629,6 +630,7 @@ portal_group_delete(struct portal_group { struct portal *portal, *tmp; struct port *port, *tport; + struct option *o, *otmp; TAILQ_FOREACH_SAFE(port, &pg->pg_ports, p_pgs, tport) port_delete(port); @@ -636,6 +638,8 @@ portal_group_delete(struct portal_group TAILQ_FOREACH_SAFE(portal, &pg->pg_portals, p_next, tmp) portal_delete(portal); + TAILQ_FOREACH_SAFE(o, &pg->pg_options, o_next, otmp) + option_delete(&pg->pg_options, o); free(pg->pg_name); free(pg->pg_redirection); free(pg); @@ -1389,7 +1393,7 @@ void lun_delete(struct lun *lun) { struct target *targ; - struct lun_option *lo, *tmp; + struct option *o, *tmp; int i; TAILQ_FOREACH(targ, &lun->l_conf->conf_targets, t_next) { @@ -1400,8 +1404,8 @@ lun_delete(struct lun *lun) } TAILQ_REMOVE(&lun->l_conf->conf_luns, lun, l_next); - TAILQ_FOREACH_SAFE(lo, &lun->l_options, lo_next, tmp) - lun_option_delete(lo); + TAILQ_FOREACH_SAFE(o, &lun->l_options, o_next, tmp) + option_delete(&lun->l_options, o); free(lun->l_name); free(lun->l_backend); free(lun->l_device_id); @@ -1487,59 +1491,56 @@ lun_set_ctl_lun(struct lun *lun, uint32_ lun->l_ctl_lun = value; } -struct lun_option * -lun_option_new(struct lun *lun, const char *name, const char *value) +struct option * +option_new(struct options *options, const char *name, const char *value) { - struct lun_option *lo; + struct option *o; - lo = lun_option_find(lun, name); - if (lo != NULL) { - log_warnx("duplicated lun option \"%s\" for lun \"%s\"", - name, lun->l_name); + o = option_find(options, name); + if (o != NULL) { + log_warnx("duplicated option \"%s\"", name); return (NULL); } - lo = calloc(1, sizeof(*lo)); - if (lo == NULL) + o = calloc(1, sizeof(*o)); + if (o == NULL) log_err(1, "calloc"); - lo->lo_name = checked_strdup(name); - lo->lo_value = checked_strdup(value); - lo->lo_lun = lun; - TAILQ_INSERT_TAIL(&lun->l_options, lo, lo_next); + o->o_name = checked_strdup(name); + o->o_value = checked_strdup(value); + TAILQ_INSERT_TAIL(options, o, o_next); - return (lo); + return (o); } void -lun_option_delete(struct lun_option *lo) +option_delete(struct options *options, struct option *o) { - TAILQ_REMOVE(&lo->lo_lun->l_options, lo, lo_next); - - free(lo->lo_name); - free(lo->lo_value); - free(lo); + TAILQ_REMOVE(options, o, o_next); + free(o->o_name); + free(o->o_value); + free(o); } -struct lun_option * -lun_option_find(const struct lun *lun, const char *name) +struct option * +option_find(const struct options *options, const char *name) { - struct lun_option *lo; + struct option *o; - TAILQ_FOREACH(lo, &lun->l_options, lo_next) { - if (strcmp(lo->lo_name, name) == 0) - return (lo); + TAILQ_FOREACH(o, options, o_next) { + if (strcmp(o->o_name, name) == 0) + return (o); } return (NULL); } void -lun_option_set(struct lun_option *lo, const char *value) +option_set(struct option *o, const char *value) { - free(lo->lo_value); - lo->lo_value = checked_strdup(value); + free(o->o_value); + o->o_value = checked_strdup(value); } static struct connection * @@ -1578,7 +1579,7 @@ conf_print(struct conf *conf) struct portal *portal; struct target *targ; struct lun *lun; - struct lun_option *lo; + struct option *o; TAILQ_FOREACH(ag, &conf->conf_auth_groups, ag_next) { fprintf(stderr, "auth-group %s {\n", ag->ag_name); @@ -1603,9 +1604,9 @@ conf_print(struct conf *conf) TAILQ_FOREACH(lun, &conf->conf_luns, l_next) { fprintf(stderr, "\tlun %s {\n", lun->l_name); fprintf(stderr, "\t\tpath %s\n", lun->l_path); - TAILQ_FOREACH(lo, &lun->l_options, lo_next) + TAILQ_FOREACH(o, &lun->l_options, o_next) fprintf(stderr, "\t\toption %s %s\n", - lo->lo_name, lo->lo_value); + lo->o_name, lo->o_value); fprintf(stderr, "\t}\n"); } TAILQ_FOREACH(targ, &conf->conf_targets, t_next) { Modified: stable/10/usr.sbin/ctld/ctld.h ============================================================================== --- stable/10/usr.sbin/ctld/ctld.h Fri Nov 27 14:40:59 2015 (r291386) +++ stable/10/usr.sbin/ctld/ctld.h Fri Nov 27 15:19:36 2015 (r291387) @@ -105,6 +105,8 @@ struct portal { int p_socket; }; +TAILQ_HEAD(options, option); + #define PG_FILTER_UNKNOWN 0 #define PG_FILTER_NONE 1 #define PG_FILTER_PORTAL 2 @@ -114,6 +116,7 @@ struct portal { struct portal_group { TAILQ_ENTRY(portal_group) pg_next; struct conf *pg_conf; + struct options pg_options; char *pg_name; struct auth_group *pg_discovery_auth_group; int pg_discovery_filter; @@ -151,17 +154,16 @@ struct port { uint32_t p_ctl_port; }; -struct lun_option { - TAILQ_ENTRY(lun_option) lo_next; - struct lun *lo_lun; - char *lo_name; - char *lo_value; +struct option { + TAILQ_ENTRY(option) o_next; + char *o_name; + char *o_value; }; struct lun { TAILQ_ENTRY(lun) l_next; struct conf *l_conf; - TAILQ_HEAD(, lun_option) l_options; + struct options l_options; char *l_name; char *l_backend; uint8_t l_device_type; @@ -382,13 +384,11 @@ void lun_set_serial(struct lun *lun, c void lun_set_size(struct lun *lun, size_t value); void lun_set_ctl_lun(struct lun *lun, uint32_t value); -struct lun_option *lun_option_new(struct lun *lun, +struct option *option_new(struct options *os, const char *name, const char *value); -void lun_option_delete(struct lun_option *clo); -struct lun_option *lun_option_find(const struct lun *lun, - const char *name); -void lun_option_set(struct lun_option *clo, - const char *value); +void option_delete(struct options *os, struct option *co); +struct option *option_find(const struct options *os, const char *name); +void option_set(struct option *o, const char *value); void kernel_init(void); int kernel_lun_add(struct lun *lun); Modified: stable/10/usr.sbin/ctld/kernel.c ============================================================================== --- stable/10/usr.sbin/ctld/kernel.c Fri Nov 27 14:40:59 2015 (r291386) +++ stable/10/usr.sbin/ctld/kernel.c Fri Nov 27 15:19:36 2015 (r291387) @@ -396,7 +396,7 @@ conf_new_from_kernel(void) struct pport *pp; struct port *cp; struct lun *cl; - struct lun_option *lo; + struct option *o; struct ctl_lun_list list; struct cctl_devlist_data devlist; struct cctl_lun *lun; @@ -626,8 +626,8 @@ retry_port: lun_set_path(cl, nv->value); continue; } - lo = lun_option_new(cl, nv->name, nv->value); - if (lo == NULL) + o = option_new(&cl->l_options, nv->name, nv->value); + if (o == NULL) log_warnx("unable to add CTL lun option %s " "for CTL lun %ju \"%s\"", nv->name, (uintmax_t) lun->lun_id, @@ -652,7 +652,7 @@ str_arg(struct ctl_be_arg *arg, const ch int kernel_lun_add(struct lun *lun) { - struct lun_option *lo; + struct option *o; struct ctl_lun_req req; int error, i, num_options; @@ -687,31 +687,31 @@ kernel_lun_add(struct lun *lun) } if (lun->l_path != NULL) { - lo = lun_option_find(lun, "file"); - if (lo != NULL) { - lun_option_set(lo, lun->l_path); + o = option_find(&lun->l_options, "file"); + if (o != NULL) { + option_set(o, lun->l_path); } else { - lo = lun_option_new(lun, "file", lun->l_path); - assert(lo != NULL); + o = option_new(&lun->l_options, "file", lun->l_path); + assert(o != NULL); } } - lo = lun_option_find(lun, "ctld_name"); - if (lo != NULL) { - lun_option_set(lo, lun->l_name); + o = option_find(&lun->l_options, "ctld_name"); + if (o != NULL) { + option_set(o, lun->l_name); } else { - lo = lun_option_new(lun, "ctld_name", lun->l_name); - assert(lo != NULL); + o = option_new(&lun->l_options, "ctld_name", lun->l_name); + assert(o != NULL); } - lo = lun_option_find(lun, "scsiname"); - if (lo == NULL && lun->l_scsiname != NULL) { - lo = lun_option_new(lun, "scsiname", lun->l_scsiname); - assert(lo != NULL); + o = option_find(&lun->l_options, "scsiname"); + if (o == NULL && lun->l_scsiname != NULL) { + o = option_new(&lun->l_options, "scsiname", lun->l_scsiname); + assert(o != NULL); } num_options = 0; - TAILQ_FOREACH(lo, &lun->l_options, lo_next) + TAILQ_FOREACH(o, &lun->l_options, o_next) num_options++; req.num_be_args = num_options; @@ -724,8 +724,8 @@ kernel_lun_add(struct lun *lun) } i = 0; - TAILQ_FOREACH(lo, &lun->l_options, lo_next) { - str_arg(&req.be_args[i], lo->lo_name, lo->lo_value); + TAILQ_FOREACH(o, &lun->l_options, o_next) { + str_arg(&req.be_args[i], o->o_name, o->o_value); i++; } assert(i == num_options); @@ -760,7 +760,7 @@ kernel_lun_add(struct lun *lun) int kernel_lun_modify(struct lun *lun) { - struct lun_option *lo; + struct option *o; struct ctl_lun_req req; int error, i, num_options; @@ -773,7 +773,7 @@ kernel_lun_modify(struct lun *lun) req.reqdata.modify.lun_size_bytes = lun->l_size; num_options = 0; - TAILQ_FOREACH(lo, &lun->l_options, lo_next) + TAILQ_FOREACH(o, &lun->l_options, o_next) num_options++; req.num_be_args = num_options; @@ -786,8 +786,8 @@ kernel_lun_modify(struct lun *lun) } i = 0; - TAILQ_FOREACH(lo, &lun->l_options, lo_next) { - str_arg(&req.be_args[i], lo->lo_name, lo->lo_value); + TAILQ_FOREACH(o, &lun->l_options, o_next) { + str_arg(&req.be_args[i], o->o_name, o->o_value); i++; } assert(i == num_options); @@ -907,6 +907,7 @@ kernel_handoff(struct connection *conn) int kernel_port_add(struct port *port) { + struct option *o; struct ctl_port_entry entry; struct ctl_req req; struct ctl_lun_map lm; @@ -921,6 +922,8 @@ kernel_port_add(struct port *port) strlcpy(req.driver, "iscsi", sizeof(req.driver)); req.reqtype = CTL_REQ_CREATE; req.num_args = 5; + TAILQ_FOREACH(o, &pg->pg_options, o_next) + req.num_args++; req.args = malloc(req.num_args * sizeof(*req.args)); if (req.args == NULL) log_err(1, "malloc"); @@ -936,6 +939,8 @@ kernel_port_add(struct port *port) if (targ->t_alias) str_arg(&req.args[n++], "cfiscsi_target_alias", targ->t_alias); str_arg(&req.args[n++], "ctld_portal_group_name", pg->pg_name); + TAILQ_FOREACH(o, &pg->pg_options, o_next) + str_arg(&req.args[n++], o->o_name, o->o_value); req.num_args = n; error = ioctl(ctl_fd, CTL_PORT_REQ, &req); free(req.args); Modified: stable/10/usr.sbin/ctld/parse.y ============================================================================== --- stable/10/usr.sbin/ctld/parse.y Fri Nov 27 14:40:59 2015 (r291386) +++ stable/10/usr.sbin/ctld/parse.y Fri Nov 27 15:19:36 2015 (r291387) @@ -344,6 +344,8 @@ portal_group_entry: | portal_group_listen_iser | + portal_group_option + | portal_group_redirect | portal_group_tag @@ -409,6 +411,18 @@ portal_group_listen_iser: LISTEN_ISER ST } ; +portal_group_option: OPTION STR STR + { + struct option *o; + + o = option_new(&portal_group->pg_options, $2, $3); + free($2); + free($3); + if (o == NULL) + return (1); + } + ; + portal_group_redirect: REDIRECT STR { int error; @@ -950,12 +964,12 @@ lun_ctl_lun: CTL_LUN STR lun_option: OPTION STR STR { - struct lun_option *clo; + struct option *o; - clo = lun_option_new(lun, $2, $3); + o = option_new(&lun->l_options, $2, $3); free($2); free($3); - if (clo == NULL) + if (o == NULL) return (1); } ; From owner-svn-src-all@freebsd.org Fri Nov 27 15:26:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CE83A3AD59; Fri, 27 Nov 2015 15:26:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66B8618B1; Fri, 27 Nov 2015 15:26:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARFQJus070085; Fri, 27 Nov 2015 15:26:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARFQJGE070081; Fri, 27 Nov 2015 15:26:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511271526.tARFQJGE070081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Nov 2015 15:26: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: r291388 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 15:26:20 -0000 Author: mav Date: Fri Nov 27 15:26:19 2015 New Revision: 291388 URL: https://svnweb.freebsd.org/changeset/base/291388 Log: MFC r290670: Modify target port groups logic in CTL. - Introduce "ha_shared" port option, which being set to "on" moves the port into separate port group, shared between HA nodes. This allows to better handle cases when iSCSI portals are bound to CARP address that can dynamically move between nodes. Some initiators (at least VMware) don't detect that after iSCSI reconnect they've attached to different SCSI port from different port group, that totally breakes ALUA status parsing. In theory, I believe, it should be enough to have different iSCSI portal group tags on different nodes to make initiators detect this condition, but it seems like VMware ignores those values, and even full LUN retaste forced by UA does not help. - Make CTL report up to three port groups: 1 -- non-HA mode or ports with "ha_shared" option set, 2 -- HA node 1, 3 -- HA node 2. - Report Transitioning state for all port groups when HA interlink is connected, but neither of nodes is primary for the LUN. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_frontend.c stable/10/sys/cam/ctl/ctl_frontend.h stable/10/sys/cam/ctl/ctl_private.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Fri Nov 27 15:19:36 2015 (r291387) +++ stable/10/sys/cam/ctl/ctl.c Fri Nov 27 15:26:19 2015 (r291388) @@ -1821,13 +1821,13 @@ ctl_init(void) SYSCTL_ADD_INT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, "ha_id", CTLFLAG_RDTUN, &softc->ha_id, 0, "HA head ID (0 - no HA)"); - if (softc->ha_id == 0 || softc->ha_id > NUM_TARGET_PORT_GROUPS) { + if (softc->ha_id == 0 || softc->ha_id > NUM_HA_SHELVES) { softc->flags |= CTL_FLAG_ACTIVE_SHELF; softc->is_single = 1; softc->port_cnt = CTL_MAX_PORTS; softc->port_min = 0; } else { - softc->port_cnt = CTL_MAX_PORTS / NUM_TARGET_PORT_GROUPS; + softc->port_cnt = CTL_MAX_PORTS / NUM_HA_SHELVES; softc->port_min = (softc->ha_id - 1) * softc->port_cnt; } softc->port_max = softc->port_min + softc->port_cnt; @@ -7139,8 +7139,8 @@ ctl_report_tagret_port_groups(struct ctl { struct scsi_maintenance_in *cdb; int retval; - int alloc_len, ext, total_len = 0, g, pc, pg, gs, os; - int num_target_port_groups, num_target_ports; + int alloc_len, ext, total_len = 0, g, pc, pg, ts, os; + int num_ha_groups, num_target_ports, shared_group; struct ctl_lun *lun; struct ctl_softc *softc; struct ctl_port *port; @@ -7174,11 +7174,8 @@ ctl_report_tagret_port_groups(struct ctl return(retval); } - if (softc->is_single) - num_target_port_groups = 1; - else - num_target_port_groups = NUM_TARGET_PORT_GROUPS; num_target_ports = 0; + shared_group = (softc->is_single != 0); mtx_lock(&softc->ctl_lock); STAILQ_FOREACH(port, &softc->port_list, links) { if ((port->status & CTL_PORT_STATUS_ONLINE) == 0) @@ -7186,15 +7183,18 @@ ctl_report_tagret_port_groups(struct ctl if (ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS) continue; num_target_ports++; + if (port->status & CTL_PORT_STATUS_HA_SHARED) + shared_group = 1; } mtx_unlock(&softc->ctl_lock); + num_ha_groups = (softc->is_single) ? 0 : NUM_HA_SHELVES; if (ext) total_len = sizeof(struct scsi_target_group_data_extended); else total_len = sizeof(struct scsi_target_group_data); total_len += sizeof(struct scsi_target_port_group_descriptor) * - num_target_port_groups + + (shared_group + num_ha_groups) + sizeof(struct scsi_target_port_descriptor) * num_target_ports; alloc_len = scsi_4btoul(cdb->length); @@ -7231,24 +7231,62 @@ ctl_report_tagret_port_groups(struct ctl mtx_lock(&softc->ctl_lock); pg = softc->port_min / softc->port_cnt; - if (softc->ha_link == CTL_HA_LINK_OFFLINE) - gs = TPG_ASYMMETRIC_ACCESS_UNAVAILABLE; - else if (softc->ha_link == CTL_HA_LINK_UNKNOWN) - gs = TPG_ASYMMETRIC_ACCESS_TRANSITIONING; - else if (softc->ha_mode == CTL_HA_MODE_ACT_STBY) - gs = TPG_ASYMMETRIC_ACCESS_STANDBY; - else - gs = TPG_ASYMMETRIC_ACCESS_NONOPTIMIZED; - if (lun->flags & CTL_LUN_PRIMARY_SC) { - os = gs; - gs = TPG_ASYMMETRIC_ACCESS_OPTIMIZED; - } else - os = TPG_ASYMMETRIC_ACCESS_OPTIMIZED; - for (g = 0; g < num_target_port_groups; g++) { - tpg_desc->pref_state = (g == pg) ? gs : os; + if (lun->flags & (CTL_LUN_PRIMARY_SC | CTL_LUN_PEER_SC_PRIMARY)) { + /* Some shelf is known to be primary. */ + if (softc->ha_link == CTL_HA_LINK_OFFLINE) + os = TPG_ASYMMETRIC_ACCESS_UNAVAILABLE; + else if (softc->ha_link == CTL_HA_LINK_UNKNOWN) + os = TPG_ASYMMETRIC_ACCESS_TRANSITIONING; + else if (softc->ha_mode == CTL_HA_MODE_ACT_STBY) + os = TPG_ASYMMETRIC_ACCESS_STANDBY; + else + os = TPG_ASYMMETRIC_ACCESS_NONOPTIMIZED; + if (lun->flags & CTL_LUN_PRIMARY_SC) { + ts = TPG_ASYMMETRIC_ACCESS_OPTIMIZED; + } else { + ts = os; + os = TPG_ASYMMETRIC_ACCESS_OPTIMIZED; + } + } else { + /* No known primary shelf. */ + if (softc->ha_link == CTL_HA_LINK_OFFLINE) { + ts = TPG_ASYMMETRIC_ACCESS_UNAVAILABLE; + os = TPG_ASYMMETRIC_ACCESS_OPTIMIZED; + } else if (softc->ha_link == CTL_HA_LINK_UNKNOWN) { + ts = TPG_ASYMMETRIC_ACCESS_TRANSITIONING; + os = TPG_ASYMMETRIC_ACCESS_OPTIMIZED; + } else { + ts = os = TPG_ASYMMETRIC_ACCESS_TRANSITIONING; + } + } + if (shared_group) { + tpg_desc->pref_state = ts; tpg_desc->support = TPG_AO_SUP | TPG_AN_SUP | TPG_S_SUP | TPG_U_SUP | TPG_T_SUP; - scsi_ulto2b(g + 1, tpg_desc->target_port_group); + scsi_ulto2b(1, tpg_desc->target_port_group); + tpg_desc->status = TPG_IMPLICIT; + pc = 0; + STAILQ_FOREACH(port, &softc->port_list, links) { + if ((port->status & CTL_PORT_STATUS_ONLINE) == 0) + continue; + if (!softc->is_single && + (port->status & CTL_PORT_STATUS_HA_SHARED) == 0) + continue; + if (ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS) + continue; + scsi_ulto2b(port->targ_port, tpg_desc->descriptors[pc]. + relative_target_port_identifier); + pc++; + } + tpg_desc->target_port_count = pc; + tpg_desc = (struct scsi_target_port_group_descriptor *) + &tpg_desc->descriptors[pc]; + } + for (g = 0; g < num_ha_groups; g++) { + tpg_desc->pref_state = (g == pg) ? ts : os; + tpg_desc->support = TPG_AO_SUP | TPG_AN_SUP | TPG_S_SUP | + TPG_U_SUP | TPG_T_SUP; + scsi_ulto2b(2 + g, tpg_desc->target_port_group); tpg_desc->status = TPG_IMPLICIT; pc = 0; STAILQ_FOREACH(port, &softc->port_list, links) { @@ -7257,6 +7295,8 @@ ctl_report_tagret_port_groups(struct ctl continue; if ((port->status & CTL_PORT_STATUS_ONLINE) == 0) continue; + if (port->status & CTL_PORT_STATUS_HA_SHARED) + continue; if (ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS) continue; scsi_ulto2b(port->targ_port, tpg_desc->descriptors[pc]. @@ -9628,7 +9668,7 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio struct ctl_softc *softc; struct ctl_lun *lun; struct ctl_port *port; - int data_len; + int data_len, g; uint8_t proto; softc = control_softc; @@ -9722,8 +9762,11 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | SVPD_ID_TYPE_TPORTGRP; desc->length = 4; - scsi_ulto2b(ctsio->io_hdr.nexus.targ_port / softc->port_cnt + 1, - &desc->identifier[2]); + if (softc->is_single || port->status & CTL_PORT_STATUS_HA_SHARED) + g = 1; + else + g = 2 + ctsio->io_hdr.nexus.targ_port / softc->port_cnt; + scsi_ulto2b(g, &desc->identifier[2]); desc = (struct scsi_vpd_id_descriptor *)(&desc->identifier[0] + sizeof(struct scsi_vpd_id_trgt_port_grp_id)); Modified: stable/10/sys/cam/ctl/ctl_frontend.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.c Fri Nov 27 15:19:36 2015 (r291387) +++ stable/10/sys/cam/ctl/ctl_frontend.c Fri Nov 27 15:26:19 2015 (r291388) @@ -310,6 +310,7 @@ ctl_port_online(struct ctl_port *port) { struct ctl_softc *softc = port->ctl_softc; struct ctl_lun *lun; + const char *value; uint32_t l; if (port->lun_enable != NULL) { @@ -328,6 +329,13 @@ ctl_port_online(struct ctl_port *port) if (port->port_online != NULL) port->port_online(port->onoff_arg); mtx_lock(&softc->ctl_lock); + if (softc->is_single == 0) { + value = ctl_get_opt(&port->options, "ha_shared"); + if (value != NULL && strcmp(value, "on") == 0) + port->status |= CTL_PORT_STATUS_HA_SHARED; + else + port->status &= ~CTL_PORT_STATUS_HA_SHARED; + } port->status |= CTL_PORT_STATUS_ONLINE; STAILQ_FOREACH(lun, &softc->lun_list, links) { if (ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS) Modified: stable/10/sys/cam/ctl/ctl_frontend.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend.h Fri Nov 27 15:19:36 2015 (r291387) +++ stable/10/sys/cam/ctl/ctl_frontend.h Fri Nov 27 15:26:19 2015 (r291388) @@ -41,7 +41,8 @@ typedef enum { CTL_PORT_STATUS_NONE = 0x00, - CTL_PORT_STATUS_ONLINE = 0x01 + CTL_PORT_STATUS_ONLINE = 0x01, + CTL_PORT_STATUS_HA_SHARED = 0x02 } ctl_port_status; typedef int (*fe_init_t)(void); Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Fri Nov 27 15:19:36 2015 (r291387) +++ stable/10/sys/cam/ctl/ctl_private.h Fri Nov 27 15:26:19 2015 (r291388) @@ -356,10 +356,7 @@ struct ctl_devid { uint8_t data[]; }; -/* - * For report target port groups. - */ -#define NUM_TARGET_PORT_GROUPS 2 +#define NUM_HA_SHELVES 2 #define CTL_WRITE_BUFFER_SIZE 262144 From owner-svn-src-all@freebsd.org Fri Nov 27 15:27:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 087AFA3AE44; Fri, 27 Nov 2015 15:27:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4CD81AC6; Fri, 27 Nov 2015 15:27:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARFRhvD070181; Fri, 27 Nov 2015 15:27:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARFRhWK070180; Fri, 27 Nov 2015 15:27:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511271527.tARFRhWK070180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Nov 2015 15:27: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: r291389 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 15:27:45 -0000 Author: mav Date: Fri Nov 27 15:27:43 2015 New Revision: 291389 URL: https://svnweb.freebsd.org/changeset/base/291389 Log: MFC r290820: Add NULL check to make Coverity happy. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Fri Nov 27 15:26:19 2015 (r291388) +++ stable/10/sys/cam/ctl/ctl.c Fri Nov 27 15:27:43 2015 (r291389) @@ -9762,7 +9762,8 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | SVPD_ID_TYPE_TPORTGRP; desc->length = 4; - if (softc->is_single || port->status & CTL_PORT_STATUS_HA_SHARED) + if (softc->is_single || + (port && port->status & CTL_PORT_STATUS_HA_SHARED)) g = 1; else g = 2 + ctsio->io_hdr.nexus.targ_port / softc->port_cnt; From owner-svn-src-all@freebsd.org Fri Nov 27 15:50:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B60CA394AD; Fri, 27 Nov 2015 15:50:18 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43AB51504; Fri, 27 Nov 2015 15:50:18 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARFoHa2075933; Fri, 27 Nov 2015 15:50:17 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARFoHtW075932; Fri, 27 Nov 2015 15:50:17 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201511271550.tARFoHtW075932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Fri, 27 Nov 2015 15:50:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291390 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 15:50:18 -0000 Author: arybchik Date: Fri Nov 27 15:50:17 2015 New Revision: 291390 URL: https://svnweb.freebsd.org/changeset/base/291390 Log: sfxge: cleanup: error probe correction Submitted by: Richard Houldsworth Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/common/hunt_mac.c Modified: head/sys/dev/sfxge/common/hunt_mac.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_mac.c Fri Nov 27 15:27:43 2015 (r291389) +++ head/sys/dev/sfxge/common/hunt_mac.c Fri Nov 27 15:50:17 2015 (r291390) @@ -351,7 +351,7 @@ hunt_mac_loopback_set( return (0); fail1: - EFSYS_PROBE(fail2); + EFSYS_PROBE1(fail1, int, rc); epp->ep_loopback_type = old_loopback_type; epp->ep_loopback_link_mode = old_loopback_link_mode; From owner-svn-src-all@freebsd.org Fri Nov 27 15:54:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEC76A396F2; Fri, 27 Nov 2015 15:54:37 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DD091ABE; Fri, 27 Nov 2015 15:54:37 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARFsaDn078643; Fri, 27 Nov 2015 15:54:36 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARFsaEY078642; Fri, 27 Nov 2015 15:54:36 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201511271554.tARFsaEY078642@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Fri, 27 Nov 2015 15:54:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291391 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 15:54:37 -0000 Author: arybchik Date: Fri Nov 27 15:54:36 2015 New Revision: 291391 URL: https://svnweb.freebsd.org/changeset/base/291391 Log: sfxge: do not use unnamed union in siena_mc_combo_rom_hdr_t GCC 4.2.1 used on FreeBSD 8 and 9 branches does not like unnamed union member in the structure. It is not strictly required in head, but nice to have to minimize difference with out-of-tree driver. Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/common/siena_flash.h Modified: head/sys/dev/sfxge/common/siena_flash.h ============================================================================== --- head/sys/dev/sfxge/common/siena_flash.h Fri Nov 27 15:50:17 2015 (r291390) +++ head/sys/dev/sfxge/common/siena_flash.h Fri Nov 27 15:54:36 2015 (r291391) @@ -193,7 +193,7 @@ typedef struct siena_mc_combo_rom_hdr_s efx_byte_t infoblk_len;/* length of space reserved for one infoblk structure */ efx_byte_t reserved[7];/* (set to 0) */ } v2; - }; + } data; } siena_mc_combo_rom_hdr_t; #pragma pack() From owner-svn-src-all@freebsd.org Fri Nov 27 15:58:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CC73A3983C; Fri, 27 Nov 2015 15:58:53 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C1421D8C; Fri, 27 Nov 2015 15:58:53 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARFwq1s078832; Fri, 27 Nov 2015 15:58:52 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARFwqP2078831; Fri, 27 Nov 2015 15:58:52 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201511271558.tARFwqP2078831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Fri, 27 Nov 2015 15:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291392 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 15:58:53 -0000 Author: arybchik Date: Fri Nov 27 15:58:52 2015 New Revision: 291392 URL: https://svnweb.freebsd.org/changeset/base/291392 Log: sfxge: cleanup: fix prefast annotation Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/common/hunt_nic.c Modified: head/sys/dev/sfxge/common/hunt_nic.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_nic.c Fri Nov 27 15:54:36 2015 (r291391) +++ head/sys/dev/sfxge/common/hunt_nic.c Fri Nov 27 15:58:52 2015 (r291392) @@ -601,7 +601,7 @@ fail1: static __checkReturn int efx_mcdi_free_piobuf( __in efx_nic_t *enp, - __out efx_piobuf_handle_t handle) + __in efx_piobuf_handle_t handle) { efx_mcdi_req_t req; uint8_t payload[MAX(MC_CMD_FREE_PIOBUF_IN_LEN, From owner-svn-src-all@freebsd.org Fri Nov 27 16:03:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30155A39A5D; Fri, 27 Nov 2015 16:03:53 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F03E2119E; Fri, 27 Nov 2015 16:03:52 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARG3qhf081596; Fri, 27 Nov 2015 16:03:52 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARG3qTU081595; Fri, 27 Nov 2015 16:03:52 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201511271603.tARG3qTU081595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Fri, 27 Nov 2015 16:03:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291393 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 16:03:53 -0000 Author: arybchik Date: Fri Nov 27 16:03:51 2015 New Revision: 291393 URL: https://svnweb.freebsd.org/changeset/base/291393 Log: sfxge: infer external port numbering for Pavia Adjust external port mapping table to distinguish Pavia from Monza. Now the presence of any 40G mode implies at least 2 outputs per external port. So Pavia 4x10G ports are now mapped to 1,2,3,4; Monza 4x10G ports map to 1,1,2,2 as before. Submitted by: Richard Houldsworth Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/common/hunt_nic.c Modified: head/sys/dev/sfxge/common/hunt_nic.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_nic.c Fri Nov 27 15:58:52 2015 (r291392) +++ head/sys/dev/sfxge/common/hunt_nic.c Fri Nov 27 16:03:51 2015 (r291393) @@ -948,19 +948,27 @@ static struct { { EFX_FAMILY_HUNTINGTON, (1 << TLV_PORT_MODE_10G) | - (1 << TLV_PORT_MODE_40G) | (1 << TLV_PORT_MODE_10G_10G) | - (1 << TLV_PORT_MODE_40G_40G), + (1 << TLV_PORT_MODE_10G_10G_10G_10G), 1 }, /* Supported modes requiring 2 outputs per port */ { EFX_FAMILY_HUNTINGTON, - (1 << TLV_PORT_MODE_10G_10G_10G_10G) | + (1 << TLV_PORT_MODE_40G) | + (1 << TLV_PORT_MODE_40G_40G) | (1 << TLV_PORT_MODE_40G_10G_10G) | (1 << TLV_PORT_MODE_10G_10G_40G), 2 } + /* + * NOTE: Medford modes will require 4 outputs per port: + * TLV_PORT_MODE_10G_10G_10G_10G_Q + * TLV_PORT_MODE_10G_10G_10G_10G_Q2 + * The Q2 mode routes outputs to external port 2. Support for this + * will require a new field specifying the number to add after + * scaling by stride. This is fixed at 1 currently. + */ }; static __checkReturn int From owner-svn-src-all@freebsd.org Fri Nov 27 16:07:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 527D5A39B85; Fri, 27 Nov 2015 16:07:21 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1ECB5139C; Fri, 27 Nov 2015 16:07:21 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARG7Koc081748; Fri, 27 Nov 2015 16:07:20 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARG7K6t081747; Fri, 27 Nov 2015 16:07:20 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201511271607.tARG7K6t081747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Fri, 27 Nov 2015 16:07:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291394 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 16:07:21 -0000 Author: arybchik Date: Fri Nov 27 16:07:20 2015 New Revision: 291394 URL: https://svnweb.freebsd.org/changeset/base/291394 Log: sfxge: unlink PIO buffers from VIs in WC mapping in hunt_nic_fini() PIO is not yet supported in the FreeBSD driver. Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/common/hunt_nic.c Modified: head/sys/dev/sfxge/common/hunt_nic.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_nic.c Fri Nov 27 16:03:51 2015 (r291393) +++ head/sys/dev/sfxge/common/hunt_nic.c Fri Nov 27 16:07:20 2015 (r291394) @@ -1709,10 +1709,22 @@ fail1: hunt_nic_fini( __in efx_nic_t *enp) { + uint32_t i; + int rc; + (void) efx_mcdi_vadaptor_free(enp, enp->en_vport_id); enp->en_vport_id = 0; - /* FIXME: do we need to unlink piobufs ? */ + /* Unlink piobufs from extra VIs in WC mapping */ + if (enp->en_u.hunt.enu_piobuf_count > 0) { + for (i = 0; i < enp->en_u.hunt.enu_piobuf_count; i++) { + rc = efx_mcdi_unlink_piobuf(enp, + enp->en_u.hunt.enu_pio_write_vi_base + i); + if (rc != 0) + break; + } + } + hunt_nic_free_piobufs(enp); (void) efx_mcdi_free_vis(enp); From owner-svn-src-all@freebsd.org Fri Nov 27 16:16:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE07BA39E8F; Fri, 27 Nov 2015 16:16:47 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CFF51AC9; Fri, 27 Nov 2015 16:16:47 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARGGkZO084662; Fri, 27 Nov 2015 16:16:46 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARGGjl9084651; Fri, 27 Nov 2015 16:16:45 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201511271616.tARGGjl9084651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Fri, 27 Nov 2015 16:16:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291395 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 16:16:47 -0000 Author: arybchik Date: Fri Nov 27 16:16:45 2015 New Revision: 291395 URL: https://svnweb.freebsd.org/changeset/base/291395 Log: sfxge: cleanup: fix prefast annotations for stats buffers Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/common/efx.h head/sys/dev/sfxge/common/efx_mon.c head/sys/dev/sfxge/common/efx_phy.c head/sys/dev/sfxge/common/hunt_impl.h head/sys/dev/sfxge/common/hunt_mac.c head/sys/dev/sfxge/common/hunt_phy.c head/sys/dev/sfxge/common/mcdi_mon.c head/sys/dev/sfxge/common/mcdi_mon.h head/sys/dev/sfxge/common/siena_impl.h head/sys/dev/sfxge/common/siena_mac.c head/sys/dev/sfxge/common/siena_phy.c Modified: head/sys/dev/sfxge/common/efx.h ============================================================================== --- head/sys/dev/sfxge/common/efx.h Fri Nov 27 16:07:20 2015 (r291394) +++ head/sys/dev/sfxge/common/efx.h Fri Nov 27 16:16:45 2015 (r291395) @@ -688,7 +688,7 @@ extern __checkReturn int efx_mon_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_MON_NSTATS) efx_mon_stat_value_t *values); + __inout_ecount(EFX_MON_NSTATS) efx_mon_stat_value_t *values); #endif /* EFSYS_OPT_MON_STATS */ @@ -946,7 +946,7 @@ extern __checkReturn int efx_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_PHY_NSTATS) uint32_t *stat); + __inout_ecount(EFX_PHY_NSTATS) uint32_t *stat); #endif /* EFSYS_OPT_PHY_STATS */ Modified: head/sys/dev/sfxge/common/efx_mon.c ============================================================================== --- head/sys/dev/sfxge/common/efx_mon.c Fri Nov 27 16:07:20 2015 (r291394) +++ head/sys/dev/sfxge/common/efx_mon.c Fri Nov 27 16:16:45 2015 (r291395) @@ -307,7 +307,7 @@ efx_mon_stat_name( efx_mon_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_MON_NSTATS) efx_mon_stat_value_t *values) + __inout_ecount(EFX_MON_NSTATS) efx_mon_stat_value_t *values) { efx_mon_t *emp = &(enp->en_mon); efx_mon_ops_t *emop = emp->em_emop; Modified: head/sys/dev/sfxge/common/efx_phy.c ============================================================================== --- head/sys/dev/sfxge/common/efx_phy.c Fri Nov 27 16:07:20 2015 (r291394) +++ head/sys/dev/sfxge/common/efx_phy.c Fri Nov 27 16:16:45 2015 (r291395) @@ -631,7 +631,7 @@ efx_phy_stat_name( efx_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_PHY_NSTATS) uint32_t *stat) + __inout_ecount(EFX_PHY_NSTATS) uint32_t *stat) { efx_port_t *epp = &(enp->en_port); efx_phy_ops_t *epop = epp->ep_epop; Modified: head/sys/dev/sfxge/common/hunt_impl.h ============================================================================== --- head/sys/dev/sfxge/common/hunt_impl.h Fri Nov 27 16:07:20 2015 (r291394) +++ head/sys/dev/sfxge/common/hunt_impl.h Fri Nov 27 16:16:45 2015 (r291395) @@ -236,7 +236,7 @@ extern __checkReturn int hunt_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, + __inout_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, __out_opt uint32_t *generationp); #endif /* EFSYS_OPT_MAC_STATS */ @@ -485,7 +485,7 @@ extern __checkReturn int hunt_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_PHY_NSTATS) uint32_t *stat); + __inout_ecount(EFX_PHY_NSTATS) uint32_t *stat); #endif /* EFSYS_OPT_PHY_STATS */ Modified: head/sys/dev/sfxge/common/hunt_mac.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_mac.c Fri Nov 27 16:07:20 2015 (r291394) +++ head/sys/dev/sfxge/common/hunt_mac.c Fri Nov 27 16:16:45 2015 (r291395) @@ -371,7 +371,7 @@ fail1: hunt_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, + __inout_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, __out_opt uint32_t *generationp) { efx_qword_t value; Modified: head/sys/dev/sfxge/common/hunt_phy.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_phy.c Fri Nov 27 16:07:20 2015 (r291394) +++ head/sys/dev/sfxge/common/hunt_phy.c Fri Nov 27 16:16:45 2015 (r291395) @@ -495,7 +495,7 @@ hunt_phy_oui_get( hunt_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_PHY_NSTATS) uint32_t *stat) + __inout_ecount(EFX_PHY_NSTATS) uint32_t *stat) { /* TBD: no stats support in firmware yet */ _NOTE(ARGUNUSED(enp, esmp)) Modified: head/sys/dev/sfxge/common/mcdi_mon.c ============================================================================== --- head/sys/dev/sfxge/common/mcdi_mon.c Fri Nov 27 16:07:20 2015 (r291394) +++ head/sys/dev/sfxge/common/mcdi_mon.c Fri Nov 27 16:16:45 2015 (r291395) @@ -162,7 +162,7 @@ mcdi_mon_decode_stats( __in size_t sensor_mask_size, __in_opt efsys_mem_t *esmp, __out_ecount_opt(sensor_mask_size) uint32_t *stat_maskp, - __out_ecount_opt(EFX_MON_NSTATS) efx_mon_stat_value_t *stat) + __inout_ecount_opt(EFX_MON_NSTATS) efx_mon_stat_value_t *stat) { efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); uint16_t port_mask; @@ -435,7 +435,7 @@ fail1: mcdi_mon_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_MON_NSTATS) efx_mon_stat_value_t *values) + __inout_ecount(EFX_MON_NSTATS) efx_mon_stat_value_t *values) { efx_nic_cfg_t *encp = &(enp->en_nic_cfg); uint32_t size = encp->enc_mon_stat_dma_buf_size; Modified: head/sys/dev/sfxge/common/mcdi_mon.h ============================================================================== --- head/sys/dev/sfxge/common/mcdi_mon.h Fri Nov 27 16:07:20 2015 (r291394) +++ head/sys/dev/sfxge/common/mcdi_mon.h Fri Nov 27 16:16:45 2015 (r291395) @@ -63,7 +63,7 @@ extern __checkReturn int mcdi_mon_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_MON_NSTATS) efx_mon_stat_value_t *values); + __inout_ecount(EFX_MON_NSTATS) efx_mon_stat_value_t *values); #endif /* EFSYS_OPT_MON_STATS */ Modified: head/sys/dev/sfxge/common/siena_impl.h ============================================================================== --- head/sys/dev/sfxge/common/siena_impl.h Fri Nov 27 16:07:20 2015 (r291394) +++ head/sys/dev/sfxge/common/siena_impl.h Fri Nov 27 16:16:45 2015 (r291395) @@ -472,7 +472,7 @@ extern __checkReturn int siena_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, + __inout_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, __out_opt uint32_t *generationp); #endif /* EFSYS_OPT_MAC_STATS */ Modified: head/sys/dev/sfxge/common/siena_mac.c ============================================================================== --- head/sys/dev/sfxge/common/siena_mac.c Fri Nov 27 16:07:20 2015 (r291394) +++ head/sys/dev/sfxge/common/siena_mac.c Fri Nov 27 16:16:45 2015 (r291395) @@ -234,7 +234,7 @@ fail1: siena_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, + __inout_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, __out_opt uint32_t *generationp) { efx_qword_t value; Modified: head/sys/dev/sfxge/common/siena_phy.c ============================================================================== --- head/sys/dev/sfxge/common/siena_phy.c Fri Nov 27 16:07:20 2015 (r291394) +++ head/sys/dev/sfxge/common/siena_phy.c Fri Nov 27 16:16:45 2015 (r291395) @@ -466,7 +466,7 @@ siena_phy_decode_stats( __in uint32_t vmask, __in_opt efsys_mem_t *esmp, __out_opt uint64_t *smaskp, - __out_ecount_opt(EFX_PHY_NSTATS) uint32_t *stat) + __inout_ecount_opt(EFX_PHY_NSTATS) uint32_t *stat) { uint64_t smask = 0; @@ -550,7 +550,7 @@ siena_phy_decode_stats( siena_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_PHY_NSTATS) uint32_t *stat) + __inout_ecount(EFX_PHY_NSTATS) uint32_t *stat) { efx_nic_cfg_t *encp = &(enp->en_nic_cfg); uint32_t vmask = encp->enc_mcdi_phy_stat_mask; From owner-svn-src-all@freebsd.org Fri Nov 27 16:19:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFBB7A39F4F; Fri, 27 Nov 2015 16:19:00 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACD341D4D; Fri, 27 Nov 2015 16:19:00 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARGIxOj084770; Fri, 27 Nov 2015 16:18:59 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARGIxSk084769; Fri, 27 Nov 2015 16:18:59 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201511271618.tARGIxSk084769@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Fri, 27 Nov 2015 16:18:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291396 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 16:19:01 -0000 Author: arybchik Date: Fri Nov 27 16:18:59 2015 New Revision: 291396 URL: https://svnweb.freebsd.org/changeset/base/291396 Log: sfxge: fix prefast warning in falconsiena_tx_qcreate Keep prefast happy by returning the initial queue index from falconsiena_tx_qcreate(). No change in behaviour, as etxo_qcreate already zeros *addedp before the call. Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/common/efx_tx.c Modified: head/sys/dev/sfxge/common/efx_tx.c ============================================================================== --- head/sys/dev/sfxge/common/efx_tx.c Fri Nov 27 16:16:45 2015 (r291395) +++ head/sys/dev/sfxge/common/efx_tx.c Fri Nov 27 16:18:59 2015 (r291396) @@ -909,6 +909,8 @@ falconsiena_tx_qcreate( } /* Set up the new descriptor queue */ + *addedp = 0; + EFX_POPULATE_OWORD_6(oword, FRF_AZ_TX_DESCQ_BUF_BASE_ID, id, FRF_AZ_TX_DESCQ_EVQ_ID, eep->ee_index, From owner-svn-src-all@freebsd.org Fri Nov 27 16:21:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E30FA3A0A7; Fri, 27 Nov 2015 16:21:16 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2493F1F30; Fri, 27 Nov 2015 16:21:16 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARGLFJp084904; Fri, 27 Nov 2015 16:21:15 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARGLEEh084898; Fri, 27 Nov 2015 16:21:14 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201511271621.tARGLEEh084898@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Fri, 27 Nov 2015 16:21:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291397 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 16:21:16 -0000 Author: arybchik Date: Fri Nov 27 16:21:14 2015 New Revision: 291397 URL: https://svnweb.freebsd.org/changeset/base/291397 Log: sfxge: cleanup: fix prefast annotations on mac stats updates Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/common/efx.h head/sys/dev/sfxge/common/efx_mac.c head/sys/dev/sfxge/common/hunt_impl.h head/sys/dev/sfxge/common/hunt_mac.c head/sys/dev/sfxge/common/siena_impl.h head/sys/dev/sfxge/common/siena_mac.c Modified: head/sys/dev/sfxge/common/efx.h ============================================================================== --- head/sys/dev/sfxge/common/efx.h Fri Nov 27 16:18:59 2015 (r291396) +++ head/sys/dev/sfxge/common/efx.h Fri Nov 27 16:21:14 2015 (r291397) @@ -553,7 +553,7 @@ efx_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, __inout_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, - __out_opt uint32_t *generationp); + __inout_opt uint32_t *generationp); #endif /* EFSYS_OPT_MAC_STATS */ Modified: head/sys/dev/sfxge/common/efx_mac.c ============================================================================== --- head/sys/dev/sfxge/common/efx_mac.c Fri Nov 27 16:18:59 2015 (r291396) +++ head/sys/dev/sfxge/common/efx_mac.c Fri Nov 27 16:21:14 2015 (r291397) @@ -804,7 +804,7 @@ efx_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, __inout_ecount(EFX_MAC_NSTATS) efsys_stat_t *essp, - __out_opt uint32_t *generationp) + __inout_opt uint32_t *generationp) { efx_port_t *epp = &(enp->en_port); efx_mac_ops_t *emop = epp->ep_emop; Modified: head/sys/dev/sfxge/common/hunt_impl.h ============================================================================== --- head/sys/dev/sfxge/common/hunt_impl.h Fri Nov 27 16:18:59 2015 (r291396) +++ head/sys/dev/sfxge/common/hunt_impl.h Fri Nov 27 16:21:14 2015 (r291397) @@ -237,7 +237,7 @@ hunt_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, __inout_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, - __out_opt uint32_t *generationp); + __inout_opt uint32_t *generationp); #endif /* EFSYS_OPT_MAC_STATS */ Modified: head/sys/dev/sfxge/common/hunt_mac.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_mac.c Fri Nov 27 16:18:59 2015 (r291396) +++ head/sys/dev/sfxge/common/hunt_mac.c Fri Nov 27 16:21:14 2015 (r291397) @@ -372,7 +372,7 @@ hunt_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, __inout_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, - __out_opt uint32_t *generationp) + __inout_opt uint32_t *generationp) { efx_qword_t value; efx_qword_t generation_start; Modified: head/sys/dev/sfxge/common/siena_impl.h ============================================================================== --- head/sys/dev/sfxge/common/siena_impl.h Fri Nov 27 16:18:59 2015 (r291396) +++ head/sys/dev/sfxge/common/siena_impl.h Fri Nov 27 16:21:14 2015 (r291397) @@ -473,7 +473,7 @@ siena_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, __inout_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, - __out_opt uint32_t *generationp); + __inout_opt uint32_t *generationp); #endif /* EFSYS_OPT_MAC_STATS */ Modified: head/sys/dev/sfxge/common/siena_mac.c ============================================================================== --- head/sys/dev/sfxge/common/siena_mac.c Fri Nov 27 16:18:59 2015 (r291396) +++ head/sys/dev/sfxge/common/siena_mac.c Fri Nov 27 16:21:14 2015 (r291397) @@ -235,7 +235,7 @@ siena_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, __inout_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, - __out_opt uint32_t *generationp) + __inout_opt uint32_t *generationp) { efx_qword_t value; efx_qword_t generation_start; From owner-svn-src-all@freebsd.org Fri Nov 27 16:23:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1166A3A149; Fri, 27 Nov 2015 16:23:28 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9DDE612EC; Fri, 27 Nov 2015 16:23:28 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARGNRbZ087575; Fri, 27 Nov 2015 16:23:27 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARGNRCE087574; Fri, 27 Nov 2015 16:23:27 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201511271623.tARGNRCE087574@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Fri, 27 Nov 2015 16:23:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291398 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 16:23:28 -0000 Author: arybchik Date: Fri Nov 27 16:23:27 2015 New Revision: 291398 URL: https://svnweb.freebsd.org/changeset/base/291398 Log: sfxge: cleanup: report error on failure path in efx_vpd_hunk_verify If the VPD is corrupt and contains an 'RV' keyword before the END tag, then this function could return without setting the return code to report the error. Found by prefast. Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/common/efx_vpd.c Modified: head/sys/dev/sfxge/common/efx_vpd.c ============================================================================== --- head/sys/dev/sfxge/common/efx_vpd.c Fri Nov 27 16:21:14 2015 (r291397) +++ head/sys/dev/sfxge/common/efx_vpd.c Fri Nov 27 16:23:27 2015 (r291398) @@ -545,8 +545,10 @@ efx_vpd_hunk_verify( for (pos = 0; pos != taglen; pos += 3 + keylen) { /* RV keyword must be the last in the block */ - if (cksummed) + if (cksummed) { + rc = EFAULT; goto fail2; + } if ((rc = efx_vpd_next_keyword(data + offset, taglen, pos, &keyword, &keylen)) != 0) From owner-svn-src-all@freebsd.org Fri Nov 27 18:13:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 172F9A3A510; Fri, 27 Nov 2015 18:13:30 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D78BB1EE3; Fri, 27 Nov 2015 18:13:29 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARIDSXs018779; Fri, 27 Nov 2015 18:13:28 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARIDSUR018778; Fri, 27 Nov 2015 18:13:28 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201511271813.tARIDSUR018778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Fri, 27 Nov 2015 18:13:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291399 - head/sys/boot/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 18:13:30 -0000 Author: zbb Date: Fri Nov 27 18:13:28 2015 New Revision: 291399 URL: https://svnweb.freebsd.org/changeset/base/291399 Log: Use properly aligned buffer in usb_alloc The PA adress must be gathered from an aligned VA, not the RAW pointer to the memory space. Reviewed by: hselasky Submitted by: Wojciech Macek Obtained from: Semihalf Sponsored by: Juniper Networks Inc. Differential Revision: https://reviews.freebsd.org/D4140 Modified: head/sys/boot/usb/usb_busdma_loader.c Modified: head/sys/boot/usb/usb_busdma_loader.c ============================================================================== --- head/sys/boot/usb/usb_busdma_loader.c Fri Nov 27 16:23:27 2015 (r291398) +++ head/sys/boot/usb/usb_busdma_loader.c Fri Nov 27 18:13:28 2015 (r291399) @@ -233,7 +233,7 @@ usb_pc_alloc_mem(struct usb_page_cache * pc->ismultiseg = (align == 1); /* compute physical address */ - usb_pc_common_mem_cb(pc, ptr, size); + usb_pc_common_mem_cb(pc, pc->buffer, size); usb_pc_cpu_flush(pc); return (0); From owner-svn-src-all@freebsd.org Fri Nov 27 18:14:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34996A3A59D; Fri, 27 Nov 2015 18:14:47 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F26511177; Fri, 27 Nov 2015 18:14:46 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARIEkeh018861; Fri, 27 Nov 2015 18:14:46 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARIEjjb018859; Fri, 27 Nov 2015 18:14:45 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201511271814.tARIEjjb018859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Fri, 27 Nov 2015 18:14:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291400 - head/sys/boot/kshim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 18:14:47 -0000 Author: zbb Date: Fri Nov 27 18:14:45 2015 New Revision: 291400 URL: https://svnweb.freebsd.org/changeset/base/291400 Log: Implement missing bus_space_subregion in kshim Add missing function, used by exynos5_ehci driver. Reviewed by: hselasky Submitted by: Wojciech Macek Obtained from: Semihalf Sponsored by: Juniper Networks Inc. Differential Revision: https://reviews.freebsd.org/D4141 Modified: head/sys/boot/kshim/bsd_busspace.c head/sys/boot/kshim/bsd_kernel.h Modified: head/sys/boot/kshim/bsd_busspace.c ============================================================================== --- head/sys/boot/kshim/bsd_busspace.c Fri Nov 27 18:13:28 2015 (r291399) +++ head/sys/boot/kshim/bsd_busspace.c Fri Nov 27 18:14:45 2015 (r291400) @@ -37,6 +37,15 @@ struct burst { uint32_t dw7; }; +int +bus_space_subregion(bus_space_tag_t t, bus_space_handle_t bsh, + bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp) +{ + + *nbshp = bsh + offset; + return (0); +} + void bus_space_read_multi_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t offset, uint8_t *datap, bus_size_t count) Modified: head/sys/boot/kshim/bsd_kernel.h ============================================================================== --- head/sys/boot/kshim/bsd_kernel.h Fri Nov 27 18:13:28 2015 (r291399) +++ head/sys/boot/kshim/bsd_kernel.h Fri Nov 27 18:14:45 2015 (r291400) @@ -397,6 +397,8 @@ int bus_generic_shutdown(device_t dev); int bus_generic_suspend(device_t dev); int bus_generic_print_child(device_t dev, device_t child); void bus_generic_driver_added(device_t dev, driver_t *driver); +int bus_space_subregion(bus_space_tag_t t, bus_space_handle_t bsh, + bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp); /* BUS SPACE API */ From owner-svn-src-all@freebsd.org Fri Nov 27 18:16:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5DF5A3A652; Fri, 27 Nov 2015 18:16:11 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F494132C; Fri, 27 Nov 2015 18:16:11 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARIGApb018953; Fri, 27 Nov 2015 18:16:10 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARIGAO3018952; Fri, 27 Nov 2015 18:16:10 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201511271816.tARIGAO3018952@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Fri, 27 Nov 2015 18:16:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291401 - head/sys/boot/usb/storage X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 18:16:11 -0000 Author: zbb Date: Fri Nov 27 18:16:10 2015 New Revision: 291401 URL: https://svnweb.freebsd.org/changeset/base/291401 Log: Do not zero memory in umass_detach The detach function is called very often, for example from get_capacity function. We don't want to loose any pointers here, so disable detaching for umass driver. Submitted by: Wojciech Macek Obtained from: Semihalf Sponsored by: Juniper Networks Inc. Differential Revision: https://reviews.freebsd.org/D4141 Modified: head/sys/boot/usb/storage/umass_common.c Modified: head/sys/boot/usb/storage/umass_common.c ============================================================================== --- head/sys/boot/usb/storage/umass_common.c Fri Nov 27 18:14:45 2015 (r291400) +++ head/sys/boot/usb/storage/umass_common.c Fri Nov 27 18:16:10 2015 (r291401) @@ -82,6 +82,9 @@ umass_attach(device_t dev) static int umass_detach(device_t dev) { + +#ifdef USB_DEBUG memset(&umass_uaa, 0, sizeof(umass_uaa)); +#endif return (0); } From owner-svn-src-all@freebsd.org Fri Nov 27 18:17:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C1C3A3A6FD; Fri, 27 Nov 2015 18:17:55 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC6191532; Fri, 27 Nov 2015 18:17:54 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARIHsii019053; Fri, 27 Nov 2015 18:17:54 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARIHrfj019050; Fri, 27 Nov 2015 18:17:53 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201511271817.tARIHrfj019050@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Fri, 27 Nov 2015 18:17:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291402 - in head/sys/boot: common usb/storage X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 18:17:55 -0000 Author: zbb Date: Fri Nov 27 18:17:53 2015 New Revision: 291402 URL: https://svnweb.freebsd.org/changeset/base/291402 Log: Implement simple ops for umass_disk The initial IOCTL implementation supports reading disk physical geometry. Two additional functions were added. They allow reading/writing raw data to the disk (default partition). Submitted by: Wojciech Macek Obtained from: Semihalf Sponsored by: Juniper Networks Inc. Differential Revision: https://reviews.freebsd.org/D4143 Modified: head/sys/boot/common/disk.c head/sys/boot/common/disk.h head/sys/boot/usb/storage/umass_loader.c Modified: head/sys/boot/common/disk.c ============================================================================== --- head/sys/boot/common/disk.c Fri Nov 27 18:16:10 2015 (r291401) +++ head/sys/boot/common/disk.c Fri Nov 27 18:17:53 2015 (r291402) @@ -233,6 +233,42 @@ disk_print(struct disk_devdesc *dev, cha } int +disk_read(struct disk_devdesc *dev, void *buf, off_t offset, u_int blocks) +{ + struct open_disk *od; + int ret; + + od = (struct open_disk *)dev->d_opendata; + ret = dev->d_dev->dv_strategy(dev, F_READ, dev->d_offset + offset, + blocks * od->sectorsize, buf, NULL); + + return (ret); +} + +int +disk_write(struct disk_devdesc *dev, void *buf, off_t offset, u_int blocks) +{ + struct open_disk *od; + int ret; + + od = (struct open_disk *)dev->d_opendata; + ret = dev->d_dev->dv_strategy(dev, F_WRITE, dev->d_offset + offset, + blocks * od->sectorsize, buf, NULL); + + return (ret); +} + +int +disk_ioctl(struct disk_devdesc *dev, u_long cmd, void *buf) +{ + + if (dev->d_dev->dv_ioctl) + return ((*dev->d_dev->dv_ioctl)(dev->d_opendata, cmd, buf)); + + return (ENXIO); +} + +int disk_open(struct disk_devdesc *dev, off_t mediasize, u_int sectorsize, u_int flags) { Modified: head/sys/boot/common/disk.h ============================================================================== --- head/sys/boot/common/disk.h Fri Nov 27 18:16:10 2015 (r291401) +++ head/sys/boot/common/disk.h Fri Nov 27 18:17:53 2015 (r291402) @@ -89,6 +89,11 @@ struct disk_devdesc off_t d_offset; }; +enum disk_ioctl { + IOCTL_GET_BLOCKS, + IOCTL_GET_BLOCK_SIZE +}; + /* * Parse disk metadata and initialise dev->d_offset. */ @@ -97,6 +102,11 @@ extern int disk_open(struct disk_devdesc #define DISK_F_NOCACHE 0x0001 /* Do not use metadata caching */ extern int disk_close(struct disk_devdesc *dev); extern void disk_cleanup(const struct devsw *d_dev); +extern int disk_ioctl(struct disk_devdesc *dev, u_long cmd, void *buf); +extern int disk_read(struct disk_devdesc *dev, void *buf, off_t offset, + u_int blocks); +extern int disk_write(struct disk_devdesc *dev, void *buf, off_t offset, + u_int blocks); /* * Print information about slices on a disk. Modified: head/sys/boot/usb/storage/umass_loader.c ============================================================================== --- head/sys/boot/usb/storage/umass_loader.c Fri Nov 27 18:16:10 2015 (r291401) +++ head/sys/boot/usb/storage/umass_loader.c Fri Nov 27 18:17:53 2015 (r291402) @@ -47,6 +47,7 @@ static int umass_disk_init(void); static int umass_disk_open(struct open_file *,...); static int umass_disk_close(struct open_file *); static void umass_disk_cleanup(void); +static int umass_disk_ioctl(struct open_file *, u_long, void *); static int umass_disk_strategy(void *, int, daddr_t, size_t, char *, size_t *); static void umass_disk_print(int); @@ -57,7 +58,7 @@ struct devsw umass_disk = { .dv_strategy = umass_disk_strategy, .dv_open = umass_disk_open, .dv_close = umass_disk_close, - .dv_ioctl = noioctl, + .dv_ioctl = umass_disk_ioctl, .dv_print = umass_disk_print, .dv_cleanup = umass_disk_cleanup, }; @@ -136,6 +137,30 @@ umass_disk_open(struct open_file *f,...) } static int +umass_disk_ioctl(struct open_file *f __unused, u_long cmd, void *buf) +{ + uint32_t nblock; + uint32_t blocksize; + + switch (cmd) { + case IOCTL_GET_BLOCK_SIZE: + case IOCTL_GET_BLOCKS: + if (usb_msc_read_capacity(umass_uaa.device, 0, + &nblock, &blocksize) != 0) + return (EINVAL); + + if (cmd == IOCTL_GET_BLOCKS) + *(uint32_t*)buf = nblock; + else + *(uint32_t*)buf = blocksize; + + return (0); + default: + return (ENXIO); + } +} + +static int umass_disk_close(struct open_file *f) { struct disk_devdesc *dev; From owner-svn-src-all@freebsd.org Fri Nov 27 18:19:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D0ACA3A75D; Fri, 27 Nov 2015 18:19:13 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD51817DB; Fri, 27 Nov 2015 18:19:12 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARIJBNT019143; Fri, 27 Nov 2015 18:19:11 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARIJB9e019142; Fri, 27 Nov 2015 18:19:11 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201511271819.tARIJB9e019142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Fri, 27 Nov 2015 18:19:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291403 - head/sys/boot/kshim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 18:19:13 -0000 Author: zbb Date: Fri Nov 27 18:19:11 2015 New Revision: 291403 URL: https://svnweb.freebsd.org/changeset/base/291403 Log: Run callouts during infinite waiting inside cv_wait During cv_wait we may be waiting for an event triggered by callout. Run callbacks here to avoid code blocking. Reviewed by: hselasky Submitted by: Wojciech Macek Obtained from: Semihalf Sponsored by: Juniper Networks Inc. Differential Revision: https://reviews.freebsd.org/D4144 Modified: head/sys/boot/kshim/bsd_kernel.c Modified: head/sys/boot/kshim/bsd_kernel.c ============================================================================== --- head/sys/boot/kshim/bsd_kernel.c Fri Nov 27 18:17:53 2015 (r291402) +++ head/sys/boot/kshim/bsd_kernel.c Fri Nov 27 18:19:11 2015 (r291403) @@ -138,6 +138,7 @@ cv_timedwait(struct cv *cv, struct mtx * { int start = ticks; int delta; + int time = 0; if (cv->sleeping) return (EWOULDBLOCK); /* not allowed */ @@ -154,6 +155,14 @@ cv_timedwait(struct cv *cv, struct mtx * usb_idle(); + if (++time >= (1000000 / hz)) { + time = 0; + callout_process(1); + } + + /* Sleep for 1 us */ + delay(1); + mtx_lock(mtx); } From owner-svn-src-all@freebsd.org Fri Nov 27 18:20:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B82CAA3A7C6; Fri, 27 Nov 2015 18:20:22 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 880CF1954; Fri, 27 Nov 2015 18:20:22 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARIKLYg019236; Fri, 27 Nov 2015 18:20:21 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARIKL16019235; Fri, 27 Nov 2015 18:20:21 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201511271820.tARIKL16019235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Fri, 27 Nov 2015 18:20:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291404 - head/sys/boot/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 18:20:22 -0000 Author: zbb Date: Fri Nov 27 18:20:21 2015 New Revision: 291404 URL: https://svnweb.freebsd.org/changeset/base/291404 Log: Increase malloc area in loader/usb Previous value was not enough on Arndale platform. Reviewed by: hselasky Submitted by: Wojciech Macek Obtained from: Semihalf Sponsored by: Juniper Networks Inc. Differential Revision: https://reviews.freebsd.org/D4145 Modified: head/sys/boot/usb/usbcore.mk Modified: head/sys/boot/usb/usbcore.mk ============================================================================== --- head/sys/boot/usb/usbcore.mk Fri Nov 27 18:19:11 2015 (r291403) +++ head/sys/boot/usb/usbcore.mk Fri Nov 27 18:20:21 2015 (r291404) @@ -44,8 +44,11 @@ S=${USBCOREDIR}/../.. ${S}/dev/usb/template .undef S +USB_POOL_SIZE?= 131072 + CFLAGS+= -DUSB_MSCTEST_BULK_SIZE=65536 -CFLAGS+= -DUSB_POOL_SIZE=131072 +CFLAGS+= -DUSB_POOL_SIZE=${USB_POOL_SIZE} + # # BUSDMA implementation From owner-svn-src-all@freebsd.org Fri Nov 27 18:22:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE216A3A968; Fri, 27 Nov 2015 18:22:06 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B56401C78; Fri, 27 Nov 2015 18:22:06 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARIM51V021896; Fri, 27 Nov 2015 18:22:05 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARIM57Q021889; Fri, 27 Nov 2015 18:22:05 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201511271822.tARIM57Q021889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Fri, 27 Nov 2015 18:22:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291405 - in head/sys: arm/samsung/exynos boot/kshim boot/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 18:22:07 -0000 Author: zbb Date: Fri Nov 27 18:22:04 2015 New Revision: 291405 URL: https://svnweb.freebsd.org/changeset/base/291405 Log: Add support for exynos5_ehci in loader Create new driver which initializes Arndale PHY and calls ehci_init Reviewed by: hselasky Submitted by: Wojciech Macek Obtained from: Semihalf Sponsored by: Juniper Networks Inc. Differential Revision: https://reviews.freebsd.org/D4192 Modified: head/sys/arm/samsung/exynos/exynos5_combiner.c head/sys/arm/samsung/exynos/exynos5_ehci.c head/sys/arm/samsung/exynos/exynos5_pad.c head/sys/boot/kshim/bsd_global.h head/sys/boot/kshim/bsd_kernel.c head/sys/boot/kshim/bsd_kernel.h head/sys/boot/usb/usbcore.mk Modified: head/sys/arm/samsung/exynos/exynos5_combiner.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_combiner.c Fri Nov 27 18:20:21 2015 (r291404) +++ head/sys/arm/samsung/exynos/exynos5_combiner.c Fri Nov 27 18:22:04 2015 (r291405) @@ -28,7 +28,9 @@ * Samsung Exynos 5 Interrupt Combiner * Chapter 7, Exynos 5 Dual User's Manual Public Rev 1.00 */ - +#ifdef USB_GLOBAL_INCLUDE_FILE +#include USB_GLOBAL_INCLUDE_FILE +#else #include __FBSDID("$FreeBSD$"); @@ -50,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#endif #include #include Modified: head/sys/arm/samsung/exynos/exynos5_ehci.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_ehci.c Fri Nov 27 18:20:21 2015 (r291404) +++ head/sys/arm/samsung/exynos/exynos5_ehci.c Fri Nov 27 18:22:04 2015 (r291405) @@ -24,6 +24,9 @@ * SUCH DAMAGE. */ +#ifdef USB_GLOBAL_INCLUDE_FILE +#include USB_GLOBAL_INCLUDE_FILE +#else #include __FBSDID("$FreeBSD$"); @@ -59,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include "gpio_if.h" #include "opt_platform.h" +#endif /* GPIO control */ #define GPIO_OUTPUT 1 Modified: head/sys/arm/samsung/exynos/exynos5_pad.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_pad.c Fri Nov 27 18:20:21 2015 (r291404) +++ head/sys/arm/samsung/exynos/exynos5_pad.c Fri Nov 27 18:22:04 2015 (r291405) @@ -28,7 +28,9 @@ * Samsung Exynos 5 Pad Control * Chapter 4, Exynos 5 Dual User's Manual Public Rev 1.00 */ - +#ifdef USB_GLOBAL_INCLUDE_FILE +#include USB_GLOBAL_INCLUDE_FILE +#else #include __FBSDID("$FreeBSD$"); @@ -55,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include "gpio_if.h" +#endif #include #include Modified: head/sys/boot/kshim/bsd_global.h ============================================================================== --- head/sys/boot/kshim/bsd_global.h Fri Nov 27 18:20:21 2015 (r291404) +++ head/sys/boot/kshim/bsd_global.h Fri Nov 27 18:22:04 2015 (r291405) @@ -29,6 +29,8 @@ #include +#include + #define USB_DEBUG_VAR usb_debug #include #include @@ -59,6 +61,8 @@ #include #include #include +#include +#include extern struct usb_process usb_process[USB_PROC_MAX]; Modified: head/sys/boot/kshim/bsd_kernel.c ============================================================================== --- head/sys/boot/kshim/bsd_kernel.c Fri Nov 27 18:20:21 2015 (r291404) +++ head/sys/boot/kshim/bsd_kernel.c Fri Nov 27 18:22:04 2015 (r291405) @@ -35,6 +35,10 @@ static device_t usb_pci_root; *------------------------------------------------------------------------*/ struct mtx Giant; +int (*bus_alloc_resource_any_cb)(struct resource *res, device_t dev, + int type, int *rid, unsigned int flags); +int (*ofw_bus_status_ok_cb)(device_t dev); +int (*ofw_bus_is_compatible_cb)(device_t dev, char *name); static void mtx_system_init(void *arg) @@ -43,6 +47,146 @@ mtx_system_init(void *arg) } SYSINIT(mtx_system_init, SI_SUB_LOCK, SI_ORDER_MIDDLE, mtx_system_init, NULL); +struct resource * +bus_alloc_resource_any(device_t dev, int type, int *rid, unsigned int flags) +{ + struct resource *res; + int ret = EINVAL; + + res = malloc(sizeof(*res), XXX, XXX); + if (res == NULL) + return (NULL); + + res->__r_i = malloc(sizeof(struct resource_i), XXX, XXX); + if (res->__r_i == NULL) { + free(res, XXX); + return (NULL); + } + + if (bus_alloc_resource_any_cb != NULL) + ret = (*bus_alloc_resource_any_cb)(res, dev, type, rid, flags); + if (ret == 0) + return (res); + + free(res->__r_i, XXX); + free(res, XXX); + return (NULL); +} + +int +bus_alloc_resources(device_t dev, struct resource_spec *rs, + struct resource **res) +{ + int i; + + for (i = 0; rs[i].type != -1; i++) + res[i] = NULL; + for (i = 0; rs[i].type != -1; i++) { + res[i] = bus_alloc_resource_any(dev, + rs[i].type, &rs[i].rid, rs[i].flags); + if (res[i] == NULL && !(rs[i].flags & RF_OPTIONAL)) { + bus_release_resources(dev, rs, res); + return (ENXIO); + } + } + return (0); +} + +void +bus_release_resources(device_t dev, const struct resource_spec *rs, + struct resource **res) +{ + int i; + + for (i = 0; rs[i].type != -1; i++) + if (res[i] != NULL) { + bus_release_resource( + dev, rs[i].type, rs[i].rid, res[i]); + res[i] = NULL; + } +} + +int +bus_setup_intr(device_t dev, struct resource *r, int flags, + driver_filter_t filter, driver_intr_t handler, void *arg, void **cookiep) +{ + + dev->dev_irq_filter = filter; + dev->dev_irq_fn = handler; + dev->dev_irq_arg = arg; + + return (0); +} + +int +bus_teardown_intr(device_t dev, struct resource *r, void *cookie) +{ + + dev->dev_irq_filter = NULL; + dev->dev_irq_fn = NULL; + dev->dev_irq_arg = NULL; + + return (0); +} + +int +bus_release_resource(device_t dev, int type, int rid, struct resource *r) +{ + /* Resource releasing is not supported */ + return (EINVAL); +} + +int +bus_generic_attach(device_t dev) +{ + device_t child; + + TAILQ_FOREACH(child, &dev->dev_children, dev_link) { + device_probe_and_attach(child); + } + + return (0); +} + +bus_space_tag_t +rman_get_bustag(struct resource *r) +{ + + return (r->r_bustag); +} + +bus_space_handle_t +rman_get_bushandle(struct resource *r) +{ + + return (r->r_bushandle); +} + +u_long +rman_get_size(struct resource *r) +{ + + return (r->__r_i->r_end - r->__r_i->r_start + 1); +} + +int +ofw_bus_status_okay(device_t dev) +{ + if (ofw_bus_status_ok_cb == NULL) + return (0); + + return ((*ofw_bus_status_ok_cb)(dev)); +} + +int +ofw_bus_is_compatible(device_t dev, char *name) +{ + if (ofw_bus_is_compatible_cb == NULL) + return (0); + + return ((*ofw_bus_is_compatible_cb)(dev, name)); +} + void mtx_init(struct mtx *mtx, const char *name, const char *type, int opt) { @@ -873,7 +1017,7 @@ devclass_find(const char *classname) const struct module_data *mod; TAILQ_FOREACH(mod, &module_head, entry) { - if (devclass_equal(mod->mod_name, classname)) + if (devclass_equal(mod->driver->name, classname)) return (mod->devclass_pp[0]); } return (NULL); Modified: head/sys/boot/kshim/bsd_kernel.h ============================================================================== --- head/sys/boot/kshim/bsd_kernel.h Fri Nov 27 18:20:21 2015 (r291404) +++ head/sys/boot/kshim/bsd_kernel.h Fri Nov 27 18:22:04 2015 (r291405) @@ -109,6 +109,7 @@ SYSINIT_ENTRY(uniq##_entry, "sysuninit", #define WITNESS_WARN(...) #define cold 0 #define BUS_PROBE_GENERIC 0 +#define BUS_PROBE_DEFAULT (-20) #define CALLOUT_RETURNUNLOCKED 0x1 #undef ffs #define ffs(x) __builtin_ffs(x) @@ -138,6 +139,10 @@ SYSINIT_ENTRY(uniq##_entry, "sysuninit", (((usb_handle_request_t *)(device_get_method(dev, "usb_handle_request")))(dev,## __VA_ARGS__)) #define USB_TAKE_CONTROLLER(dev, ...) \ (((usb_take_controller_t *)(device_get_method(dev, "usb_take_controller")))(dev,## __VA_ARGS__)) +#define GPIO_PIN_SET(dev, ...) \ + (((gpio_pin_set_t *)(device_get_method(dev, "gpio_pin_set")))(dev,## __VA_ARGS__)) +#define GPIO_PIN_SETFLAGS(dev, ...) \ + (((gpio_pin_setflags_t *)(device_get_method(dev, "gpio_pin_setflags")))(dev,## __VA_ARGS__)) enum { SI_SUB_DUMMY = 0x0000000, @@ -302,6 +307,8 @@ typedef int device_resume_t (device_t de typedef int device_shutdown_t (device_t dev); typedef int device_probe_t (device_t dev); typedef int device_suspend_t (device_t dev); +typedef int gpio_pin_set_t (device_t dev, uint32_t, unsigned int); +typedef int gpio_pin_setflags_t (device_t dev, uint32_t, uint32_t); typedef int bus_child_location_str_t (device_t parent, device_t child, char *buf, size_t buflen); typedef int bus_child_pnpinfo_str_t (device_t parent, device_t child, char *buf, size_t buflen); @@ -498,4 +505,78 @@ struct selinfo { extern const void *sysinit_data[]; extern const void *sysuninit_data[]; +/* Resources */ + +enum intr_type { + INTR_TYPE_TTY = 1, + INTR_TYPE_BIO = 2, + INTR_TYPE_NET = 4, + INTR_TYPE_CAM = 8, + INTR_TYPE_MISC = 16, + INTR_TYPE_CLK = 32, + INTR_TYPE_AV = 64, + INTR_EXCL = 256, /* exclusive interrupt */ + INTR_MPSAFE = 512, /* this interrupt is SMP safe */ + INTR_ENTROPY = 1024, /* this interrupt provides entropy */ + INTR_MD1 = 4096, /* flag reserved for MD use */ + INTR_MD2 = 8192, /* flag reserved for MD use */ + INTR_MD3 = 16384, /* flag reserved for MD use */ + INTR_MD4 = 32768 /* flag reserved for MD use */ +}; + +struct resource_i { + u_long r_start; /* index of the first entry in this resource */ + u_long r_end; /* index of the last entry (inclusive) */ +}; + +struct resource { + struct resource_i *__r_i; + bus_space_tag_t r_bustag; /* bus_space tag */ + bus_space_handle_t r_bushandle; /* bus_space handle */ +}; + +struct resource_spec { + int type; + int rid; + int flags; +}; + +#define SYS_RES_IRQ 1 /* interrupt lines */ +#define SYS_RES_DRQ 2 /* isa dma lines */ +#define SYS_RES_MEMORY 3 /* i/o memory */ +#define SYS_RES_IOPORT 4 /* i/o ports */ + +#define RF_ALLOCATED 0x0001 /* resource has been reserved */ +#define RF_ACTIVE 0x0002 /* resource allocation has been activated */ +#define RF_SHAREABLE 0x0004 /* resource permits contemporaneous sharing */ +#define RF_SPARE1 0x0008 +#define RF_SPARE2 0x0010 +#define RF_FIRSTSHARE 0x0020 /* first in sharing list */ +#define RF_PREFETCHABLE 0x0040 /* resource is prefetchable */ +#define RF_OPTIONAL 0x0080 /* for bus_alloc_resources() */ + +int bus_alloc_resources(device_t, struct resource_spec *, struct resource **); +int bus_release_resource(device_t, int, int, struct resource *); +void bus_release_resources(device_t, const struct resource_spec *, + struct resource **); +struct resource *bus_alloc_resource_any(device_t, int, int *, unsigned int); +int bus_generic_attach(device_t); +bus_space_tag_t rman_get_bustag(struct resource *); +bus_space_handle_t rman_get_bushandle(struct resource *); +u_long rman_get_size(struct resource *); +int bus_setup_intr(device_t, struct resource *, int, driver_filter_t, + driver_intr_t, void *, void **); +int bus_teardown_intr(device_t, struct resource *, void *); +int ofw_bus_status_okay(device_t); +int ofw_bus_is_compatible(device_t, char *); + +extern int (*bus_alloc_resource_any_cb)(struct resource *res, device_t dev, + int type, int *rid, unsigned int flags); +extern int (*ofw_bus_status_ok_cb)(device_t dev); +extern int (*ofw_bus_is_compatible_cb)(device_t dev, char *name); + +#ifndef strlcpy +#define strlcpy(d,s,n) snprintf((d),(n),"%s",(s)) +#endif + #endif /* _BSD_KERNEL_H_ */ Modified: head/sys/boot/usb/usbcore.mk ============================================================================== --- head/sys/boot/usb/usbcore.mk Fri Nov 27 18:20:21 2015 (r291404) +++ head/sys/boot/usb/usbcore.mk Fri Nov 27 18:22:04 2015 (r291405) @@ -34,6 +34,12 @@ USBCOREDIR:= ${.PARSEDIR} S=${USBCOREDIR}/../.. +MACHDEP_DIRS= + +.if defined(HAVE_EXYNOS_EHCI) +MACHDEP_DIRS+= ${S}/arm/samsung/exynos +.endif + .PATH: \ ${USBCOREDIR} \ ${USBCOREDIR}/storage \ @@ -41,7 +47,8 @@ S=${USBCOREDIR}/../.. ${S}/dev/usb/controller \ ${S}/dev/usb/serial \ ${S}/dev/usb/storage \ - ${S}/dev/usb/template + ${S}/dev/usb/template \ + ${MACHDEP_DIRS} .undef S USB_POOL_SIZE?= 131072 @@ -91,6 +98,14 @@ CFLAGS += -DUSB_PCI_PROBE_LIST="\"ehci\" KSRCS+= ehci.c .endif +.if defined(HAVE_EXYNOS_EHCI) +CFLAGS += -DUSB_PCI_PROBE_LIST="\"combiner\", \"pad\", \"ehci\"" +KSRCS+= ehci.c +KSRCS+= exynos5_combiner.c +KSRCS+= exynos5_pad.c +KSRCS+= exynos5_ehci.c +.endif + .if defined(HAVE_OHCI) CFLAGS += -DUSB_PCI_PROBE_LIST="\"ohci\"" KSRCS+= ohci.c From owner-svn-src-all@freebsd.org Fri Nov 27 18:58:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95B6AA3AFBE; Fri, 27 Nov 2015 18:58:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 364DF1CA2; Fri, 27 Nov 2015 18:58:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARIwRFK030617; Fri, 27 Nov 2015 18:58:27 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARIwQOt030605; Fri, 27 Nov 2015 18:58:26 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201511271858.tARIwQOt030605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 27 Nov 2015 18:58:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291406 - in head: . gnu/usr.bin/gdb/kgdb lib/libkvm rescue/rescue share/mk sys/sparc64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 18:58:28 -0000 Author: jhb Date: Fri Nov 27 18:58:26 2015 New Revision: 291406 URL: https://svnweb.freebsd.org/changeset/base/291406 Log: Add support to libkvm for reading vmcores from other architectures. - Add a kvaddr_type to represent kernel virtual addresses instead of unsigned long. - Add a struct kvm_nlist which is a stripped down version of struct nlist that uses kvaddr_t for n_value. - Add a kvm_native() routine that returns true if an open kvm descriptor is for a native kernel and memory image. - Add a kvm_open2() function similar to kvm_openfiles(). It drops the unused 'swapfile' argument and adds a new function pointer argument for a symbol resolving function. Native kernels still use _fdnlist() from libc to resolve symbols if a resolver function is not supplied, but cross kernels require a resolver. - Add a kvm_nlist2() function similar to kvm_nlist() except that it uses struct kvm_nlist instead of struct nlist. - Add a kvm_read2() function similar to kvm_read() except that it uses kvaddr_t instead of unsigned long for the kernel virtual address. - Add a new kvm_arch switch of routines needed by a vmcore backend. Each backend is responsible for implementing kvm_read2() for a given vmcore format. - Use libelf to read headers from ELF kernels and cores (except for powerpc cores). - Add internal helper routines for the common page offset hash table used by the minidump backends. - Port all of the existing kvm backends to implement a kvm_arch switch and to be cross-friendly by using private constants instead of ones that vary by platform (e.g. PAGE_SIZE). Static assertions are present when a given backend is compiled natively to ensure the private constants match the real ones. - Enable all of the existing vmcore backends on all platforms. This means that libkvm on any platform should be able to perform KVA translation and read data from a vmcore of any platform. Tested on: amd64, i386, sparc64 (marius) Differential Revision: https://reviews.freebsd.org/D3341 Added: head/lib/libkvm/kvm_aarch64.h (contents, props changed) head/lib/libkvm/kvm_amd64.h (contents, props changed) head/lib/libkvm/kvm_arm.h (contents, props changed) head/lib/libkvm/kvm_i386.h (contents, props changed) head/lib/libkvm/kvm_mips.h (contents, props changed) head/lib/libkvm/kvm_native.3 (contents, props changed) head/lib/libkvm/kvm_sparc64.h (contents, props changed) Deleted: head/lib/libkvm/kvm_aarch64.c head/lib/libkvm/kvm_mips.c Modified: head/Makefile.inc1 head/gnu/usr.bin/gdb/kgdb/Makefile head/gnu/usr.bin/gdb/kgdb/main.c head/gnu/usr.bin/gdb/kgdb/trgt.c head/lib/libkvm/Makefile head/lib/libkvm/Makefile.depend head/lib/libkvm/kvm.3 head/lib/libkvm/kvm.c head/lib/libkvm/kvm.h head/lib/libkvm/kvm_amd64.c head/lib/libkvm/kvm_arm.c head/lib/libkvm/kvm_cptime.c head/lib/libkvm/kvm_getloadavg.c head/lib/libkvm/kvm_getswapinfo.c head/lib/libkvm/kvm_i386.c head/lib/libkvm/kvm_minidump_aarch64.c head/lib/libkvm/kvm_minidump_amd64.c head/lib/libkvm/kvm_minidump_arm.c head/lib/libkvm/kvm_minidump_i386.c head/lib/libkvm/kvm_minidump_mips.c head/lib/libkvm/kvm_nlist.3 head/lib/libkvm/kvm_open.3 head/lib/libkvm/kvm_pcpu.c head/lib/libkvm/kvm_powerpc.c head/lib/libkvm/kvm_powerpc64.c head/lib/libkvm/kvm_private.h head/lib/libkvm/kvm_proc.c head/lib/libkvm/kvm_read.3 head/lib/libkvm/kvm_sparc64.c head/lib/libkvm/kvm_vnet.c head/rescue/rescue/Makefile head/share/mk/src.libnames.mk head/sys/sparc64/include/kerneldump.h Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Nov 27 18:22:04 2015 (r291405) +++ head/Makefile.inc1 Fri Nov 27 18:58:26 2015 (r291406) @@ -1819,6 +1819,7 @@ _prebuild_libs+= lib/libc++ .endif lib/libgeom__L: lib/libexpat__L +lib/libkvm__L: lib/libelf__L .if ${MK_LIBTHR} != "no" _lib_libthr= lib/libthr Modified: head/gnu/usr.bin/gdb/kgdb/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/kgdb/Makefile Fri Nov 27 18:22:04 2015 (r291405) +++ head/gnu/usr.bin/gdb/kgdb/Makefile Fri Nov 27 18:58:26 2015 (r291406) @@ -9,11 +9,7 @@ BULIBS= ${OBJ_BU}/libbfd/libbfd.a ${OBJ_ GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a DPADD= ${GDBLIBS} ${BULIBS} ${LIBKVM} -LDADD= ${GDBLIBS} ${BULIBS} -lkvm${GDB_SUFFIX} +LDADD= ${GDBLIBS} ${BULIBS} -lkvm LIBADD+= m readline ncursesw gnuregex -.if defined(GDB_CROSS_DEBUGGER) -CFLAGS+= -Wl,-export-dynamic -.endif - .include Modified: head/gnu/usr.bin/gdb/kgdb/main.c ============================================================================== --- head/gnu/usr.bin/gdb/kgdb/main.c Fri Nov 27 18:22:04 2015 (r291405) +++ head/gnu/usr.bin/gdb/kgdb/main.c Fri Nov 27 18:58:26 2015 (r291406) @@ -41,9 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef CROSS_DEBUGGER -#include -#endif #include #include #include @@ -81,24 +78,6 @@ static struct ui_file *parse_gdberr; static void (*kgdb_new_objfile_chain)(struct objfile * objfile); -#ifdef CROSS_DEBUGGER -ps_err_e -ps_pglobal_lookup(struct ps_prochandle *ph, const char *obj, const char *name, - psaddr_t *sym_addr) -{ - struct minimal_symbol *ms; - CORE_ADDR addr; - - ms = lookup_minimal_symbol (name, NULL, NULL); - if (ms == NULL) - return PS_NOSYM; - - addr = SYMBOL_VALUE_ADDRESS (ms); - store_typed_address(sym_addr, builtin_type_void_data_ptr, addr); - return PS_OK; -} -#endif - static void usage(void) { Modified: head/gnu/usr.bin/gdb/kgdb/trgt.c ============================================================================== --- head/gnu/usr.bin/gdb/kgdb/trgt.c Fri Nov 27 18:22:04 2015 (r291405) +++ head/gnu/usr.bin/gdb/kgdb/trgt.c Fri Nov 27 18:58:26 2015 (r291406) @@ -78,6 +78,19 @@ static char kvm_err[_POSIX2_LINE_MAX]; #define KERNOFF (kgdb_kernbase ()) #define PINKERNEL(x) ((x) >= KERNOFF) +static int +kgdb_resolve_symbol(const char *name, kvaddr_t *kva) +{ + struct minimal_symbol *ms; + + ms = lookup_minimal_symbol (name, NULL, NULL); + if (ms == NULL) + return (1); + + *kva = SYMBOL_VALUE_ADDRESS (ms); + return (0);; +} + static CORE_ADDR kgdb_kernbase (void) { @@ -120,8 +133,8 @@ kgdb_trgt_open(char *filename, int from_ old_chain = make_cleanup (xfree, filename); - nkvm = kvm_openfiles(bfd_get_filename(exec_bfd), filename, NULL, - write_files ? O_RDWR : O_RDONLY, kvm_err); + nkvm = kvm_open2(bfd_get_filename(exec_bfd), filename, + write_files ? O_RDWR : O_RDONLY, kvm_err, kgdb_resolve_symbol); if (nkvm == NULL) error ("Failed to open vmcore: %s", kvm_err); @@ -254,7 +267,7 @@ kgdb_trgt_xfer_memory(CORE_ADDR memaddr, if (len == 0) return (0); if (!write) - return (kvm_read(kvm, memaddr, myaddr, len)); + return (kvm_read2(kvm, memaddr, myaddr, len)); else return (kvm_write(kvm, memaddr, myaddr, len)); } Modified: head/lib/libkvm/Makefile ============================================================================== --- head/lib/libkvm/Makefile Fri Nov 27 18:22:04 2015 (r291405) +++ head/lib/libkvm/Makefile Fri Nov 27 18:58:26 2015 (r291406) @@ -1,50 +1,38 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 # $FreeBSD$ -.if defined(TARGET_ARCH) && !defined(COMPAT_32BIT) -KVM_XARCH=${TARGET_ARCH} -KVM_XCPUARCH=${KVM_XARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/} -.else -KVM_XARCH=${MACHINE_ARCH} -KVM_XCPUARCH=${MACHINE_CPUARCH} -.endif - -.if ${KVM_XARCH} != ${MACHINE_ARCH} -LIB= kvm-${KVM_XARCH} -CFLAGS+=-DCROSS_LIBKVM -.else LIB= kvm -.endif SHLIBDIR?= /lib SHLIB_MAJOR= 6 CFLAGS+=-DLIBC_SCCS -I${.CURDIR} -.if exists(${.CURDIR}/kvm_${KVM_XARCH}.c) -KVM_ARCH=${KVM_XARCH} -.else -KVM_ARCH=${KVM_XCPUARCH} -.endif - WARNS?= 3 -SRCS= kvm.c kvm_${KVM_ARCH}.c kvm_cptime.c kvm_file.c kvm_getloadavg.c \ - kvm_getswapinfo.c kvm_pcpu.c kvm_proc.c kvm_vnet.c -.if exists(${.CURDIR}/kvm_minidump_${KVM_ARCH}.c) -SRCS+= kvm_minidump_${KVM_ARCH}.c -.endif +SRCS= kvm.c kvm_cptime.c kvm_file.c kvm_getloadavg.c \ + kvm_getswapinfo.c kvm_pcpu.c kvm_proc.c kvm_vnet.c \ + kvm_minidump_aarch64.c \ + kvm_amd64.c kvm_minidump_amd64.c \ + kvm_arm.c kvm_minidump_arm.c \ + kvm_i386.c kvm_minidump_i386.c \ + kvm_minidump_mips.c \ + kvm_powerpc.c kvm_powerpc64.c \ + kvm_sparc64.c INCS= kvm.h +LIBADD= elf + MAN= kvm.3 kvm_getcptime.3 kvm_geterr.3 kvm_getfiles.3 kvm_getloadavg.3 \ - kvm_getpcpu.3 kvm_getprocs.3 kvm_getswapinfo.3 kvm_nlist.3 kvm_open.3 \ - kvm_read.3 + kvm_getpcpu.3 kvm_getprocs.3 kvm_getswapinfo.3 kvm_native.3 \ + kvm_nlist.3 kvm_open.3 kvm_read.3 MLINKS+=kvm_getpcpu.3 kvm_getmaxcpu.3 \ kvm_getpcpu.3 kvm_dpcpu_setcpu.3 \ kvm_getpcpu.3 kvm_read_zpcpu.3 \ kvm_getpcpu.3 kvm_counter_u64_fetch.3 MLINKS+=kvm_getprocs.3 kvm_getargv.3 kvm_getprocs.3 kvm_getenvv.3 -MLINKS+=kvm_open.3 kvm_close.3 kvm_open.3 kvm_openfiles.3 -MLINKS+=kvm_read.3 kvm_write.3 +MLINKS+=kvm_nlist.3 kvm_nlist2.3 +MLINKS+=kvm_open.3 kvm_close.3 kvm_open.3 kvm_open2.3 kvm_open.3 kvm_openfiles.3 +MLINKS+=kvm_read.3 kvm_read2.3 kvm_read.3 kvm_write.3 .include Modified: head/lib/libkvm/Makefile.depend ============================================================================== --- head/lib/libkvm/Makefile.depend Fri Nov 27 18:22:04 2015 (r291405) +++ head/lib/libkvm/Makefile.depend Fri Nov 27 18:58:26 2015 (r291406) @@ -9,6 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ .include Modified: head/lib/libkvm/kvm.3 ============================================================================== --- head/lib/libkvm/kvm.3 Fri Nov 27 18:22:04 2015 (r291405) +++ head/lib/libkvm/kvm.3 Fri Nov 27 18:58:26 2015 (r291406) @@ -32,7 +32,7 @@ .\" @(#)kvm.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 25, 2010 +.Dd November 27, 2015 .Dt KVM 3 .Os .Sh NAME @@ -101,6 +101,44 @@ routine, to return (not print out) the error message corresponding to the most recent error condition on the given descriptor. +.Sh CROSS DEBUGGING +The +.Nm +library supports inspection of crash dumps from non-native kernels. +Only a limited subset of the kvm interface is supported for these dumps. +To inspect a crash dump of a non-native kernel, +the caller must provide a +.Fa resolver +function when opening a descriptor via +.Fn kvm_open2 . +In addition, +the kvm interface defines an integer type +.Pq Vt kvaddr_t +that is large enough to hold all valid addresses of all supported +architectures. +The interface also defines a new namelist structure type +.Pq Vt "struct kvm_nlist" +for use with +.Fn kvm_nlist2 . +To avoid address truncation issues, +the caller should use +.Fn kvm_nlist2 +and +.Fn kvm_read2 +in place of +.Fn kvm_nlist +and +.Fn kvm_read , +respectively. +Finally, only a limited subset of operations are supported for non-native +crash dumps: +.Fn kvm_close , +.Fn kvm_geterr +.Fn kvm_open2 , +.Fn kvm_native , +.Fn kvm_nlist2 , +and +.Fn kvm_read2 . .Sh SEE ALSO .Xr kvm_close 3 , .Xr kvm_getargv 3 , @@ -110,10 +148,14 @@ given descriptor. .Xr kvm_getloadavg 3 , .Xr kvm_getprocs 3 , .Xr kvm_getswapinfo 3 , +.Xr kvm_native 3 , .Xr kvm_nlist 3 , +.Xr kvm_nlist2 3 , .Xr kvm_open 3 , +.Xr kvm_open2 3 , .Xr kvm_openfiles 3 , .Xr kvm_read 3 , +.Xr kvm_read2 3 , .Xr kvm_write 3 , .Xr sysctl 3 , .Xr kmem 4 , Modified: head/lib/libkvm/kvm.c ============================================================================== --- head/lib/libkvm/kvm.c Fri Nov 27 18:22:04 2015 (r291405) +++ head/lib/libkvm/kvm.c Fri Nov 27 18:58:26 2015 (r291406) @@ -41,62 +41,63 @@ static char sccsid[] = "@(#)kvm.c 8.2 (B #endif /* LIBC_SCCS and not lint */ #include +#include #define _WANT_VNET #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 "kvm_private.h" -#ifndef CROSS_LIBKVM +SET_DECLARE(kvm_arch, struct kvm_arch); /* from src/lib/libc/gen/nlist.c */ int __fdnlist(int, struct nlist *); -#define kvm_fdnlist __fdnlist - -#else - -#include - static int -kvm_fdnlist(int fd, struct nlist *list) +kvm_fdnlist(kvm_t *kd, struct kvm_nlist *list) { - psaddr_t addr; - ps_err_e pserr; - int nfail; + kvaddr_t addr; + int error, nfail; + + if (kd->resolve_symbol == NULL) { + struct nlist *nl; + int count, i; + + for (count = 0; list[count].n_name != NULL && + list[count].n_name[0] != '\0'; count++) + ; + nl = calloc(count + 1, sizeof(*nl)); + for (i = 0; i < count; i++) + nl[i].n_name = list[i].n_name; + nfail = __fdnlist(kd->nlfd, nl); + for (i = 0; i < count; i++) { + list[i].n_type = nl[i].n_type; + list[i].n_value = nl[i].n_value; + } + free(nl); + return (nfail); + } nfail = 0; while (list->n_name != NULL && list->n_name[0] != '\0') { - list->n_other = 0; - list->n_desc = 0; - pserr = ps_pglobal_lookup(NULL, NULL, list->n_name, &addr); - if (pserr != PS_OK) { + error = kd->resolve_symbol(list->n_name, &addr); + if (error != 0) { nfail++; list->n_value = 0; list->n_type = 0; @@ -109,8 +110,6 @@ kvm_fdnlist(int fd, struct nlist *list) return (nfail); } -#endif /* CROSS_LIBKVM */ - char * kvm_geterr(kvm_t *kd) { @@ -175,9 +174,206 @@ _kvm_malloc(kvm_t *kd, size_t n) return (p); } +static int +_kvm_read_kernel_ehdr(kvm_t *kd) +{ + Elf *elf; + + if (elf_version(EV_CURRENT) == EV_NONE) { + _kvm_err(kd, kd->program, "Unsupported libelf"); + return (-1); + } + elf = elf_begin(kd->nlfd, ELF_C_READ, NULL); + if (elf == NULL) { + _kvm_err(kd, kd->program, "%s", elf_errmsg(0)); + return (-1); + } + if (elf_kind(elf) != ELF_K_ELF) { + _kvm_err(kd, kd->program, "kernel is not an ELF file"); + return (-1); + } + if (gelf_getehdr(elf, &kd->nlehdr) == NULL) { + _kvm_err(kd, kd->program, "%s", elf_errmsg(0)); + elf_end(elf); + return (-1); + } + elf_end(elf); + + switch (kd->nlehdr.e_ident[EI_DATA]) { + case ELFDATA2LSB: + case ELFDATA2MSB: + return (0); + default: + _kvm_err(kd, kd->program, + "unsupported ELF data encoding for kernel"); + return (-1); + } +} + +int +_kvm_probe_elf_kernel(kvm_t *kd, int class, int machine) +{ + + return (kd->nlehdr.e_ident[EI_CLASS] == class && + kd->nlehdr.e_type == ET_EXEC && + kd->nlehdr.e_machine == machine); +} + +int +_kvm_is_minidump(kvm_t *kd) +{ + char minihdr[8]; + + if (kd->rawdump) + return (0); + if (pread(kd->pmfd, &minihdr, 8, 0) == 8 && + memcmp(&minihdr, "minidump", 8) == 0) + return (1); + return (0); +} + +/* + * The powerpc backend has a hack to strip a leading kerneldump + * header from the core before treating it as an ELF header. + * + * We can add that here if we can get a change to libelf to support + * an inital offset into the file. Alternatively we could patch + * savecore to extract cores from a regular file instead. + */ +int +_kvm_read_core_phdrs(kvm_t *kd, size_t *phnump, GElf_Phdr **phdrp) +{ + GElf_Ehdr ehdr; + GElf_Phdr *phdr; + Elf *elf; + size_t i, phnum; + + elf = elf_begin(kd->pmfd, ELF_C_READ, NULL); + if (elf == NULL) { + _kvm_err(kd, kd->program, "%s", elf_errmsg(0)); + return (-1); + } + if (elf_kind(elf) != ELF_K_ELF) { + _kvm_err(kd, kd->program, "invalid core"); + goto bad; + } + if (gelf_getclass(elf) != kd->nlehdr.e_ident[EI_CLASS]) { + _kvm_err(kd, kd->program, "invalid core"); + goto bad; + } + if (gelf_getehdr(elf, &ehdr) == NULL) { + _kvm_err(kd, kd->program, "%s", elf_errmsg(0)); + goto bad; + } + if (ehdr.e_type != ET_CORE) { + _kvm_err(kd, kd->program, "invalid core"); + goto bad; + } + if (ehdr.e_machine != kd->nlehdr.e_machine) { + _kvm_err(kd, kd->program, "invalid core"); + goto bad; + } + + if (elf_getphdrnum(elf, &phnum) == -1) { + _kvm_err(kd, kd->program, "%s", elf_errmsg(0)); + goto bad; + } + + phdr = calloc(phnum, sizeof(*phdr)); + if (phdr == NULL) { + _kvm_err(kd, kd->program, "failed to allocate phdrs"); + goto bad; + } + + for (i = 0; i < phnum; i++) { + if (gelf_getphdr(elf, i, &phdr[i]) == NULL) { + _kvm_err(kd, kd->program, "%s", elf_errmsg(0)); + goto bad; + } + } + elf_end(elf); + *phnump = phnum; + *phdrp = phdr; + return (0); + +bad: + elf_end(elf); + return (-1); +} + +static void +_kvm_hpt_insert(struct hpt *hpt, uint64_t pa, off_t off) +{ + struct hpte *hpte; + uint32_t fnv = FNV1_32_INIT; + + fnv = fnv_32_buf(&pa, sizeof(pa), fnv); + fnv &= (HPT_SIZE - 1); + hpte = malloc(sizeof(*hpte)); + hpte->pa = pa; + hpte->off = off; + hpte->next = hpt->hpt_head[fnv]; + hpt->hpt_head[fnv] = hpte; +} + +void +_kvm_hpt_init(kvm_t *kd, struct hpt *hpt, void *base, size_t len, off_t off, + int page_size, int word_size) +{ + uint64_t bits, idx, pa; + uint64_t *base64; + uint32_t *base32; + + base64 = base; + base32 = base; + for (idx = 0; idx < len / word_size; idx++) { + if (word_size == sizeof(uint64_t)) + bits = _kvm64toh(kd, base64[idx]); + else + bits = _kvm32toh(kd, base32[idx]); + pa = idx * word_size * NBBY * page_size; + for (; bits != 0; bits >>= 1, pa += page_size) { + if ((bits & 1) == 0) + continue; + _kvm_hpt_insert(hpt, pa, off); + off += page_size; + } + } +} + +off_t +_kvm_hpt_find(struct hpt *hpt, uint64_t pa) +{ + struct hpte *hpte; + uint32_t fnv = FNV1_32_INIT; + + fnv = fnv_32_buf(&pa, sizeof(pa), fnv); + fnv &= (HPT_SIZE - 1); + for (hpte = hpt->hpt_head[fnv]; hpte != NULL; hpte = hpte->next) { + if (pa == hpte->pa) + return (hpte->off); + } + return (-1); +} + +void +_kvm_hpt_free(struct hpt *hpt) +{ + struct hpte *hpte, *next; + int i; + + for (i = 0; i < HPT_SIZE; i++) { + for (hpte = hpt->hpt_head[i]; hpte != NULL; hpte = next) { + next = hpte->next; + free(hpte); + } + } +} + static kvm_t * _kvm_open(kvm_t *kd, const char *uf, const char *mf, int flag, char *errout) { + struct kvm_arch **parch; struct stat st; kd->vmfd = -1; @@ -235,16 +431,40 @@ _kvm_open(kvm_t *kd, const char *uf, con } /* * This is a crash dump. - * Initialize the virtual address translation machinery, - * but first setup the namelist fd. + * Open the namelist fd and determine the architecture. */ if ((kd->nlfd = open(uf, O_RDONLY | O_CLOEXEC, 0)) < 0) { _kvm_syserr(kd, kd->program, "%s", uf); goto failed; } + if (_kvm_read_kernel_ehdr(kd) < 0) + goto failed; if (strncmp(mf, _PATH_FWMEM, strlen(_PATH_FWMEM)) == 0) kd->rawdump = 1; - if (_kvm_initvtop(kd) < 0) + SET_FOREACH(parch, kvm_arch) { + if ((*parch)->ka_probe(kd)) { + kd->arch = *parch; + break; + } + } + if (kd->arch == NULL) { + _kvm_err(kd, kd->program, "unsupported architecture"); + goto failed; + } + + /* + * Non-native kernels require a symbol resolver. + */ + if (!kd->arch->ka_native(kd) && kd->resolve_symbol == NULL) { + _kvm_err(kd, kd->program, + "non-native kernel requires a symbol resolver"); + goto failed; + } + + /* + * Initialize the virtual address translation machinery. + */ + if (kd->arch->ka_initvtop(kd) < 0) goto failed; return (kd); failed: @@ -267,7 +487,6 @@ kvm_openfiles(const char *uf, const char (void)strlcpy(errout, strerror(errno), _POSIX2_LINE_MAX); return (0); } - kd->program = 0; return (_kvm_open(kd, uf, mf, flag, errout)); } @@ -287,19 +506,33 @@ kvm_open(const char *uf, const char *mf, return (_kvm_open(kd, uf, mf, flag, NULL)); } +kvm_t * +kvm_open2(const char *uf, const char *mf, int flag, char *errout, + int (*resolver)(const char *, kvaddr_t *)) +{ + kvm_t *kd; + + if ((kd = calloc(1, sizeof(*kd))) == NULL) { + (void)strlcpy(errout, strerror(errno), _POSIX2_LINE_MAX); + return (0); + } + kd->resolve_symbol = resolver; + return (_kvm_open(kd, uf, mf, flag, errout)); +} + int kvm_close(kvm_t *kd) { int error = 0; + if (kd->vmst != NULL) + kd->arch->ka_freevtop(kd); if (kd->pmfd >= 0) error |= close(kd->pmfd); if (kd->vmfd >= 0) error |= close(kd->vmfd); if (kd->nlfd >= 0) error |= close(kd->nlfd); - if (kd->vmst) - _kvm_freevtop(kd); if (kd->procbase != 0) free((void *)kd->procbase); if (kd->argbuf != 0) @@ -318,10 +551,10 @@ kvm_close(kvm_t *kd) * symbol names, try again, and merge back what we could resolve. */ static int -kvm_fdnlist_prefix(kvm_t *kd, struct nlist *nl, int missing, const char *prefix, - uintptr_t (*validate_fn)(kvm_t *, uintptr_t)) +kvm_fdnlist_prefix(kvm_t *kd, struct kvm_nlist *nl, int missing, + const char *prefix, kvaddr_t (*validate_fn)(kvm_t *, kvaddr_t)) { - struct nlist *n, *np, *p; + struct kvm_nlist *n, *np, *p; char *cp, *ce; const char *ccp; size_t len; @@ -337,14 +570,14 @@ kvm_fdnlist_prefix(kvm_t *kd, struct nli for (p = nl; p->n_name && p->n_name[0]; ++p) { if (p->n_type != N_UNDF) continue; - len += sizeof(struct nlist) + strlen(prefix) + + len += sizeof(struct kvm_nlist) + strlen(prefix) + 2 * (strlen(p->n_name) + 1); unresolved++; } if (unresolved == 0) return (unresolved); /* Add space for the terminating nlist entry. */ - len += sizeof(struct nlist); + len += sizeof(struct kvm_nlist); unresolved++; /* Alloc one chunk for (nlist, [names]) and setup pointers. */ @@ -353,7 +586,7 @@ kvm_fdnlist_prefix(kvm_t *kd, struct nli if (n == NULL) return (missing); cp = ce = (char *)np; - cp += unresolved * sizeof(struct nlist); + cp += unresolved * sizeof(struct kvm_nlist); ce += len; /* Generate shortened nlist with special prefix. */ @@ -361,7 +594,7 @@ kvm_fdnlist_prefix(kvm_t *kd, struct nli for (p = nl; p->n_name && p->n_name[0]; ++p) { if (p->n_type != N_UNDF) continue; - bcopy(p, np, sizeof(struct nlist)); + *np = *p; /* Save the new\0orig. name so we can later match it again. */ slen = snprintf(cp, ce - cp, "%s%s%c%s", prefix, (prefix[0] != '\0' && p->n_name[0] == '_') ? @@ -376,7 +609,7 @@ kvm_fdnlist_prefix(kvm_t *kd, struct nli /* Do lookup on the reduced list. */ np = n; - unresolved = kvm_fdnlist(kd->nlfd, np); + unresolved = kvm_fdnlist(kd, np); /* Check if we could resolve further symbols and update the list. */ if (unresolved >= 0 && unresolved < missing) { @@ -398,8 +631,6 @@ kvm_fdnlist_prefix(kvm_t *kd, struct nli continue; /* Update nlist with new, translated results. */ p->n_type = np->n_type; - p->n_other = np->n_other; - p->n_desc = np->n_desc; if (validate_fn) p->n_value = (*validate_fn)(kd, np->n_value); else @@ -418,9 +649,9 @@ kvm_fdnlist_prefix(kvm_t *kd, struct nli } int -_kvm_nlist(kvm_t *kd, struct nlist *nl, int initialize) +_kvm_nlist(kvm_t *kd, struct kvm_nlist *nl, int initialize) { - struct nlist *p; + struct kvm_nlist *p; int nvalid; struct kld_sym_lookup lookup; int error; @@ -433,7 +664,7 @@ _kvm_nlist(kvm_t *kd, struct nlist *nl, * slow library call. */ if (!ISALIVE(kd)) { - error = kvm_fdnlist(kd->nlfd, nl); + error = kvm_fdnlist(kd, nl); if (error <= 0) /* Hard error or success. */ return (error); @@ -475,8 +706,6 @@ again: if (kldsym(0, KLDSYM_LOOKUP, &lookup) != -1) { p->n_type = N_TEXT; - p->n_other = 0; - p->n_desc = 0; if (_kvm_vnet_initialized(kd, initialize) && strcmp(prefix, VNET_SYMPREFIX) == 0) p->n_value = @@ -519,7 +748,7 @@ again: } int -kvm_nlist(kvm_t *kd, struct nlist *nl) +kvm_nlist2(kvm_t *kd, struct kvm_nlist *nl) { /* @@ -529,9 +758,49 @@ kvm_nlist(kvm_t *kd, struct nlist *nl) return (_kvm_nlist(kd, nl, 1)); } +int +kvm_nlist(kvm_t *kd, struct nlist *nl) +{ + struct kvm_nlist *kl; + int count, i, nfail; + + /* + * Avoid reporting truncated addresses by failing for non-native + * cores. + */ + if (!kvm_native(kd)) { + _kvm_err(kd, kd->program, "kvm_nlist of non-native vmcore"); + return (-1); + } + + for (count = 0; nl[count].n_name != NULL && nl[count].n_name[0] != '\0'; + count++) + ; + if (count == 0) + return (0); + kl = calloc(count + 1, sizeof(*kl)); + for (i = 0; i < count; i++) + kl[i].n_name = nl[i].n_name; + nfail = kvm_nlist2(kd, kl); + for (i = 0; i < count; i++) { + nl[i].n_type = kl[i].n_type; + nl[i].n_other = 0; + nl[i].n_desc = 0; + nl[i].n_value = kl[i].n_value; + } + return (nfail); +} + ssize_t kvm_read(kvm_t *kd, u_long kva, void *buf, size_t len) { + + return (kvm_read2(kd, kva, buf, len)); +} + +ssize_t +kvm_read2(kvm_t *kd, kvaddr_t kva, void *buf, size_t len) +{ int cc; ssize_t cr; off_t pa; @@ -544,7 +813,8 @@ kvm_read(kvm_t *kd, u_long kva, void *bu */ errno = 0; if (lseek(kd->vmfd, (off_t)kva, 0) == -1 && errno != 0) { - _kvm_err(kd, 0, "invalid address (%lx)", kva); + _kvm_err(kd, 0, "invalid address (0x%jx)", + (uintmax_t)kva); return (-1); } cr = read(kd->vmfd, buf, len); @@ -558,7 +828,7 @@ kvm_read(kvm_t *kd, u_long kva, void *bu cp = buf; while (len > 0) { - cc = _kvm_kvatop(kd, kva, &pa); + cc = kd->arch->ka_kvatop(kd, kva, &pa); if (cc == 0) return (-1); if (cc > (ssize_t)len) @@ -574,7 +844,7 @@ kvm_read(kvm_t *kd, u_long kva, void *bu break; } /* - * If kvm_kvatop returns a bogus value or our core file is + * If ka_kvatop returns a bogus value or our core file is * truncated, we might wind up seeking beyond the end of the * core file in which case the read will return 0 (EOF). */ @@ -616,3 +886,12 @@ kvm_write(kvm_t *kd, u_long kva, const v } /* NOTREACHED */ } + +int +kvm_native(kvm_t *kd) +{ + + if (ISALIVE(kd)) + return (1); + return (kd->arch->ka_native(kd)); +} Modified: head/lib/libkvm/kvm.h ============================================================================== --- head/lib/libkvm/kvm.h Fri Nov 27 18:22:04 2015 (r291405) +++ head/lib/libkvm/kvm.h Fri Nov 27 18:58:26 2015 (r291406) @@ -51,6 +51,14 @@ typedef __ssize_t ssize_t; #define _SSIZE_T_DECLARED #endif +typedef uint64_t kvaddr_t; /* An address in a target image. */ + +struct kvm_nlist { + const char *n_name; + unsigned char n_type; + kvaddr_t n_value; +}; + typedef struct __kvm kvm_t; struct kinfo_proc; @@ -83,13 +91,19 @@ uint64_t kvm_counter_u64_fetch(kvm_t *, struct kinfo_proc * kvm_getprocs(kvm_t *, int, int, int *); int kvm_getswapinfo(kvm_t *, struct kvm_swap *, int, int); +int kvm_native(kvm_t *); int kvm_nlist(kvm_t *, struct nlist *); +int kvm_nlist2(kvm_t *, struct kvm_nlist *); kvm_t *kvm_open (const char *, const char *, const char *, int, const char *); kvm_t *kvm_openfiles (const char *, const char *, const char *, int, char *); +kvm_t *kvm_open2 + (const char *, const char *, int, char *, + int (*)(const char *, kvaddr_t *)); ssize_t kvm_read(kvm_t *, unsigned long, void *, size_t); ssize_t kvm_read_zpcpu(kvm_t *, unsigned long, void *, size_t, int); +ssize_t kvm_read2(kvm_t *, kvaddr_t, void *, size_t); ssize_t kvm_write(kvm_t *, unsigned long, const void *, size_t); __END_DECLS Added: head/lib/libkvm/kvm_aarch64.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libkvm/kvm_aarch64.h Fri Nov 27 18:58:26 2015 (r291406) @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 2015 John H. Baldwin + * 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 __KVM_AARCH64_H__ +#define __KVM_AARCH64_H__ + +#ifdef __aarch64__ +#include +#endif + +typedef uint64_t aarch64_physaddr_t; +typedef uint64_t aarch64_pte_t; + +#define AARCH64_PAGE_SHIFT 12 +#define AARCH64_PAGE_SIZE (1 << AARCH64_PAGE_SHIFT) +#define AARCH64_PAGE_MASK (AARCH64_PAGE_SIZE - 1) + +#define AARCH64_ATTR_MASK 0xfff0000000000fff + +#define AARCH64_ATTR_DESCR_MASK 3 + +#define AARCH64_L3_SHIFT 12 +#define AARCH64_L3_PAGE 0x3 + +#ifdef __aarch64__ +_Static_assert(PAGE_SHIFT == AARCH64_PAGE_SHIFT, "PAGE_SHIFT mismatch"); +_Static_assert(PAGE_SIZE == AARCH64_PAGE_SIZE, "PAGE_SIZE mismatch"); +_Static_assert(PAGE_MASK == AARCH64_PAGE_MASK, "PAGE_MASK mismatch"); +_Static_assert(ATTR_MASK == AARCH64_ATTR_MASK, "ATTR_MASK mismatch"); +_Static_assert(ATTR_DESCR_MASK == AARCH64_ATTR_DESCR_MASK, + "ATTR_DESCR_MASK mismatch"); +_Static_assert(L3_SHIFT == AARCH64_L3_SHIFT, "L3_SHIFT mismatch"); +_Static_assert(L3_PAGE == AARCH64_L3_PAGE, "L3_PAGE mismatch"); +#endif + +#endif /* !__KVM_AARCH64_H__ */ Modified: head/lib/libkvm/kvm_amd64.c ============================================================================== --- head/lib/libkvm/kvm_amd64.c Fri Nov 27 18:22:04 2015 (r291405) +++ head/lib/libkvm/kvm_amd64.c Fri Nov 27 18:58:26 2015 (r291406) @@ -46,117 +46,76 @@ static char sccsid[] = "@(#)kvm_hp300.c */ #include -#include -#include -#include -#include +#include +#include #include #include #include -#include #include -#include -#include - -#include - #include #include "kvm_private.h" +#include "kvm_amd64.h" -#ifndef btop -#define btop(x) (amd64_btop(x)) -#define ptob(x) (amd64_ptob(x)) -#endif - -/* minidump must be the first item! */ struct vmstate { - int minidump; /* 1 = minidump mode */ - void *mmapbase; - size_t mmapsize; - pml4_entry_t *PML4; + size_t phnum; + GElf_Phdr *phdr; + amd64_pml4e_t *PML4; }; /* - * Map the ELF headers into the process' address space. We do this in two - * steps: first the ELF header itself and using that information the whole - * set of headers. - */ -static int -_kvm_maphdrs(kvm_t *kd, size_t sz) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Nov 27 19:04:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19D5BA3A185; Fri, 27 Nov 2015 19:04:01 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD22310AE; Fri, 27 Nov 2015 19:04:00 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARJ3xFV033409; Fri, 27 Nov 2015 19:03:59 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARJ3xFa033408; Fri, 27 Nov 2015 19:03:59 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201511271903.tARJ3xFa033408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Fri, 27 Nov 2015 19:03:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291407 - head/sys/ddb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 19:04:01 -0000 Author: zbb Date: Fri Nov 27 19:03:59 2015 New Revision: 291407 URL: https://svnweb.freebsd.org/changeset/base/291407 Log: Add helper to catch single step debug event and distinguish it from bkpt Some architectures (including ARMv6/v7) do not have separate single step events and cannot see difference between breakpoint and single step. Add db_pc_is_singlestep() to avoid skipping instruction we stepped on to trigger debug event. This commit does not change the existing functionality but adds possibility to implement custom db_pc_is_singlestep(). Reviewed by: imp Submitted by: Zbigniew Bodek Obtained from: Semihalf Sponsored by: Juniper Networks Inc. Differential Revision: https://reviews.freebsd.org/D4036 Modified: head/sys/ddb/db_run.c Modified: head/sys/ddb/db_run.c ============================================================================== --- head/sys/ddb/db_run.c Fri Nov 27 18:58:26 2015 (r291406) +++ head/sys/ddb/db_run.c Fri Nov 27 19:03:59 2015 (r291407) @@ -65,16 +65,28 @@ int db_inst_count; int db_load_count; int db_store_count; +#ifdef SOFTWARE_SSTEP +db_breakpoint_t db_not_taken_bkpt = 0; +db_breakpoint_t db_taken_bkpt = 0; +#endif + #ifndef db_set_single_step void db_set_single_step(void); #endif #ifndef db_clear_single_step void db_clear_single_step(void); #endif - +#ifndef db_pc_is_singlestep +static bool +db_pc_is_singlestep(db_addr_t pc) +{ #ifdef SOFTWARE_SSTEP -db_breakpoint_t db_not_taken_bkpt = 0; -db_breakpoint_t db_taken_bkpt = 0; + if ((db_not_taken_bkpt != 0 && pc == db_not_taken_bkpt->address) + || (db_taken_bkpt != 0 && pc == db_taken_bkpt->address)) + return (true); +#endif + return (false); +} #endif bool @@ -84,11 +96,9 @@ db_stop_at_pc(bool *is_breakpoint) db_breakpoint_t bkpt; pc = PC_REGS(); -#ifdef SOFTWARE_SSTEP - if ((db_not_taken_bkpt != 0 && pc == db_not_taken_bkpt->address) - || (db_taken_bkpt != 0 && pc == db_taken_bkpt->address)) + + if (db_pc_is_singlestep(pc)) *is_breakpoint = false; -#endif db_clear_single_step(); db_clear_breakpoints(); From owner-svn-src-all@freebsd.org Fri Nov 27 19:43:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5E64A3AA23; Fri, 27 Nov 2015 19:43:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 672B312F1; Fri, 27 Nov 2015 19:43:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARJhabL045125; Fri, 27 Nov 2015 19:43:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARJhaoo045124; Fri, 27 Nov 2015 19:43:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511271943.tARJhaoo045124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 27 Nov 2015 19:43:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291408 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 19:43:37 -0000 Author: kib Date: Fri Nov 27 19:43:36 2015 New Revision: 291408 URL: https://svnweb.freebsd.org/changeset/base/291408 Log: In vm_pageout_grow_cache(), do not re-try the inactive queue when active queue scan initiated write. Re-trying from the inactive queue when doing active scan makes the loop never end if number of domains is greater than 1 and inactive or active scan cannot reach the target. Reported and tested by: Andrew Gallatin Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Fri Nov 27 19:03:59 2015 (r291407) +++ head/sys/vm/vm_pageout.c Fri Nov 27 19:43:36 2015 (r291408) @@ -729,32 +729,33 @@ vm_pageout_grow_cache(int tries, vm_padd * the specified address range, as indicated by segments * constituting the domain. */ -again: +again_inact: if (inactl < inactmax) { if (vm_phys_domain_intersects(vm_dom[dom].vmd_segs, low, high) && vm_pageout_launder(&vm_dom[dom].vmd_pagequeues[PQ_INACTIVE], tries, low, high)) { inactl++; - goto again; + goto again_inact; } if (++dom == vm_ndomains) dom = 0; if (dom != initial_dom) - goto again; + goto again_inact; } +again_act: if (actl < actmax) { if (vm_phys_domain_intersects(vm_dom[dom].vmd_segs, low, high) && vm_pageout_launder(&vm_dom[dom].vmd_pagequeues[PQ_ACTIVE], tries, low, high)) { actl++; - goto again; + goto again_act; } if (++dom == vm_ndomains) dom = 0; if (dom != initial_dom) - goto again; + goto again_act; } } From owner-svn-src-all@freebsd.org Fri Nov 27 20:12:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40ECAA3AF50; Fri, 27 Nov 2015 20:12:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A5061F24; Fri, 27 Nov 2015 20:12:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 916D4B923; Fri, 27 Nov 2015 15:12:15 -0500 (EST) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291406 - in head: . gnu/usr.bin/gdb/kgdb lib/libkvm rescue/rescue share/mk sys/sparc64/include Date: Fri, 27 Nov 2015 11:04:23 -0800 Message-ID: <2898094.TQmcuznC5g@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201511271858.tARIwQOt030605@repo.freebsd.org> References: <201511271858.tARIwQOt030605@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 27 Nov 2015 15:12:15 -0500 (EST) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 20:12:18 -0000 On Friday, November 27, 2015 06:58:26 PM John Baldwin wrote: > Author: jhb > Date: Fri Nov 27 18:58:26 2015 > New Revision: 291406 > URL: https://svnweb.freebsd.org/changeset/base/291406 > > Log: > Add support to libkvm for reading vmcores from other architectures. > - Add a kvaddr_type to represent kernel virtual addresses instead of > unsigned long. > - Add a struct kvm_nlist which is a stripped down version of struct nlist > that uses kvaddr_t for n_value. > - Add a kvm_native() routine that returns true if an open kvm descriptor > is for a native kernel and memory image. > - Add a kvm_open2() function similar to kvm_openfiles(). It drops the > unused 'swapfile' argument and adds a new function pointer argument for > a symbol resolving function. Native kernels still use _fdnlist() from > libc to resolve symbols if a resolver function is not supplied, but cross > kernels require a resolver. > - Add a kvm_nlist2() function similar to kvm_nlist() except that it uses > struct kvm_nlist instead of struct nlist. > - Add a kvm_read2() function similar to kvm_read() except that it uses > kvaddr_t instead of unsigned long for the kernel virtual address. > - Add a new kvm_arch switch of routines needed by a vmcore backend. > Each backend is responsible for implementing kvm_read2() for a given > vmcore format. > - Use libelf to read headers from ELF kernels and cores (except for > powerpc cores). > - Add internal helper routines for the common page offset hash table used > by the minidump backends. > - Port all of the existing kvm backends to implement a kvm_arch switch and > to be cross-friendly by using private constants instead of ones that > vary by platform (e.g. PAGE_SIZE). Static assertions are present when > a given backend is compiled natively to ensure the private constants > match the real ones. > - Enable all of the existing vmcore backends on all platforms. This means > that libkvm on any platform should be able to perform KVA translation > and read data from a vmcore of any platform. > > Tested on: amd64, i386, sparc64 (marius) > Differential Revision: https://reviews.freebsd.org/D3341 emaste@ reviewed some pieces of this but not all I believe. I have not fully tested the in-tree cross-kgdb support though I believe it should build in the new world order without requiring one to build a cross libkvm. That is, you should just need to build the cross-debugger now using the stock libkvm. The kgdb patches in devel/gdb in ports already support this new interface, though it is only enabled at compile time if compiled on a world with the new libkvm. Currently the amd64 and i386 backends in kgdb in ports support cross-vmcore debugging, so you should be able to debug an amd64 or i386 vmcore on any platform where devel/gdb runs. As more platforms are added to devel/gdb they should all support cross-debugging (so, for example, once arm is added to devel/gdb and the kgdb bits in devel/gdb, one would be able to debug an arm vmcore on an amd64 host). Another fun trick would be to add some build glue to make libkvm buildable on other OS's (e.g. on OS X) so that gdb (or lldb) could be built on OS X and use the portable libkvm to debug a kernel vmcore from a non-FreeBSD host. -- John Baldwin From owner-svn-src-all@freebsd.org Fri Nov 27 21:27:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE405A3AEAF; Fri, 27 Nov 2015 21:27:40 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B6011F25; Fri, 27 Nov 2015 21:27:40 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARLRdY6074125; Fri, 27 Nov 2015 21:27:39 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARLRdgH074124; Fri, 27 Nov 2015 21:27:39 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201511272127.tARLRdgH074124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 27 Nov 2015 21:27:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291409 - head/usr.sbin/kbdmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 21:27:40 -0000 Author: emaste Date: Fri Nov 27 21:27:39 2015 New Revision: 291409 URL: https://svnweb.freebsd.org/changeset/base/291409 Log: kbdmap: include filename when reporting fopen() failure Previously only one of two cases reported the file name. Use the same error string in both cases. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/kbdmap/kbdmap.c Modified: head/usr.sbin/kbdmap/kbdmap.c ============================================================================== --- head/usr.sbin/kbdmap/kbdmap.c Fri Nov 27 19:43:36 2015 (r291408) +++ head/usr.sbin/kbdmap/kbdmap.c Fri Nov 27 21:27:39 2015 (r291409) @@ -692,7 +692,7 @@ menu_read(void) fclose(fp); } else - printf("Could not open file\n"); + fprintf(stderr, "Could not open %s for reading\n", filename); if (show) { qsort(lang_list->sl_str, lang_list->sl_cur, sizeof(char*), From owner-svn-src-all@freebsd.org Fri Nov 27 22:11:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C93D7A3A79B; Fri, 27 Nov 2015 22:11:47 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73984151A; Fri, 27 Nov 2015 22:11:47 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARMBkvH088014; Fri, 27 Nov 2015 22:11:46 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARMBkgv088013; Fri, 27 Nov 2015 22:11:46 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201511272211.tARMBkgv088013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 27 Nov 2015 22:11:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291410 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 22:11:47 -0000 Author: tuexen Date: Fri Nov 27 22:11:46 2015 New Revision: 291410 URL: https://svnweb.freebsd.org/changeset/base/291410 Log: Take also the send queue and sent queue into account when triggering the sending of outgoing stream reset requests. MFC after: 3 days Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Fri Nov 27 21:27:39 2015 (r291409) +++ head/sys/netinet/sctp_output.c Fri Nov 27 22:11:46 2015 (r291410) @@ -7169,7 +7169,8 @@ one_more_time: } atomic_subtract_int(&asoc->stream_queue_cnt, 1); TAILQ_REMOVE(&strq->outqueue, sp, next); - if (strq->state == SCTP_STREAM_RESET_PENDING && + if ((strq->state == SCTP_STREAM_RESET_PENDING) && + (strq->chunks_on_queues == 0) && TAILQ_EMPTY(&strq->outqueue)) { stcb->asoc.trigger_reset = 1; } @@ -7571,7 +7572,8 @@ dont_do_it: send_lock_up = 1; } TAILQ_REMOVE(&strq->outqueue, sp, next); - if (strq->state == SCTP_STREAM_RESET_PENDING && + if ((strq->state == SCTP_STREAM_RESET_PENDING) && + (strq->chunks_on_queues == 0) && TAILQ_EMPTY(&strq->outqueue)) { stcb->asoc.trigger_reset = 1; } @@ -11561,7 +11563,8 @@ sctp_add_stream_reset_out(struct sctp_tc /* now how long will this param be? */ for (i = 0; i < stcb->asoc.streamoutcnt; i++) { if ((stcb->asoc.strmout[i].state == SCTP_STREAM_RESET_PENDING) && - (TAILQ_EMPTY(&stcb->asoc.strmout[i].outqueue))) { + (stcb->asoc.strmout[i].chunks_on_queues == 0) && + TAILQ_EMPTY(&stcb->asoc.strmout[i].outqueue)) { number_entries++; } } @@ -11584,7 +11587,8 @@ sctp_add_stream_reset_out(struct sctp_tc if (number_entries) { for (i = 0; i < stcb->asoc.streamoutcnt; i++) { if ((stcb->asoc.strmout[i].state == SCTP_STREAM_RESET_PENDING) && - (TAILQ_EMPTY(&stcb->asoc.strmout[i].outqueue))) { + (stcb->asoc.strmout[i].chunks_on_queues == 0) && + TAILQ_EMPTY(&stcb->asoc.strmout[i].outqueue)) { req_out->list_of_streams[at] = htons(i); at++; stcb->asoc.strmout[i].state = SCTP_STREAM_RESET_IN_FLIGHT; From owner-svn-src-all@freebsd.org Fri Nov 27 22:33:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9CD8A3AC6F; Fri, 27 Nov 2015 22:33:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80F621D60; Fri, 27 Nov 2015 22:33:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARMXewe094446; Fri, 27 Nov 2015 22:33:40 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARMXehm094445; Fri, 27 Nov 2015 22:33:40 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511272233.tARMXehm094445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 27 Nov 2015 22:33:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291411 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 22:33:41 -0000 Author: adrian Date: Fri Nov 27 22:33:40 2015 New Revision: 291411 URL: https://svnweb.freebsd.org/changeset/base/291411 Log: [ath] conditionally print out the rate series information if ATH_DEBUG_XMIT is set. Modified: head/sys/dev/ath/if_ath_tx_ht.c Modified: head/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_ht.c Fri Nov 27 22:11:46 2015 (r291410) +++ head/sys/dev/ath/if_ath_tx_ht.c Fri Nov 27 22:33:40 2015 (r291411) @@ -585,7 +585,7 @@ ath_rateseries_setup(struct ath_softc *s } } -#if 0 +#if 1 static void ath_rateseries_print(struct ath_softc *sc, HAL_11N_RATE_SERIES *series) { @@ -627,8 +627,9 @@ ath_buf_set_rate(struct ath_softc *sc, s ath_rateseries_setup(sc, ni, bf, series); -#if 0 - ath_rateseries_print(sc, series); +#if 1 + if (sc->sc_debug & ATH_DEBUG_XMIT) + ath_rateseries_print(sc, series); #endif /* Set rate scenario */ From owner-svn-src-all@freebsd.org Sat Nov 28 00:14:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9C97A3AFA9; Sat, 28 Nov 2015 00:14:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77C331233; Sat, 28 Nov 2015 00:14:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAS0EbnE023461; Sat, 28 Nov 2015 00:14:37 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAS0EbJF023460; Sat, 28 Nov 2015 00:14:37 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511280014.tAS0EbJF023460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 28 Nov 2015 00:14:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291412 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2015 00:14:38 -0000 Author: adrian Date: Sat Nov 28 00:14:37 2015 New Revision: 291412 URL: https://svnweb.freebsd.org/changeset/base/291412 Log: wrap in ATH_DEBUG. Thanks sparc64 build! Modified: head/sys/dev/ath/if_ath_tx_ht.c Modified: head/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_ht.c Fri Nov 27 22:33:40 2015 (r291411) +++ head/sys/dev/ath/if_ath_tx_ht.c Sat Nov 28 00:14:37 2015 (r291412) @@ -585,7 +585,7 @@ ath_rateseries_setup(struct ath_softc *s } } -#if 1 +#ifdef ATH_DEBUG static void ath_rateseries_print(struct ath_softc *sc, HAL_11N_RATE_SERIES *series) { @@ -627,7 +627,7 @@ ath_buf_set_rate(struct ath_softc *sc, s ath_rateseries_setup(sc, ni, bf, series); -#if 1 +#ifdef ATH_DEBUG if (sc->sc_debug & ATH_DEBUG_XMIT) ath_rateseries_print(sc, series); #endif From owner-svn-src-all@freebsd.org Sat Nov 28 00:27:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECDE3A3627E; Sat, 28 Nov 2015 00:27:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B644018FE; Sat, 28 Nov 2015 00:27:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAS0RG6l026562; Sat, 28 Nov 2015 00:27:16 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAS0RGtW026560; Sat, 28 Nov 2015 00:27:16 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511280027.tAS0RGtW026560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 28 Nov 2015 00:27:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291413 - head/sys/dev/ath/ath_hal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2015 00:27:18 -0000 Author: adrian Date: Sat Nov 28 00:27:16 2015 New Revision: 291413 URL: https://svnweb.freebsd.org/changeset/base/291413 Log: * Add device string for QCA955x (scorpion); * Add device ID and device string for QCA953x (honeybee). Modified: head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ah_devid.h Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Sat Nov 28 00:14:37 2015 (r291412) +++ head/sys/dev/ath/ath_hal/ah.c Sat Nov 28 00:27:16 2015 (r291413) @@ -145,6 +145,12 @@ ath_hal_mac_name(struct ath_hal *ah) case AR_SREV_VERSION_QCA9565: /* XXX should say QCA, not AR */ return "9565"; + case AR9300_DEVID_QCA955X: + /* XXX should say QCA, not AR */ + return "9550"; + case AR9300_DEVID_QCA953X: + /* XXX should say QCA, not AR */ + return "9530"; } return "????"; } Modified: head/sys/dev/ath/ath_hal/ah_devid.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_devid.h Sat Nov 28 00:14:37 2015 (r291412) +++ head/sys/dev/ath/ath_hal/ah_devid.h Sat Nov 28 00:27:16 2015 (r291413) @@ -94,6 +94,7 @@ #define AR9300_DEVID_QCA9565 0x0036 #define AR9300_DEVID_AR1111_PCIE 0x0037 #define AR9300_DEVID_QCA955X 0x0039 +#define AR9300_DEVID_QCA953X 0x003d /* Honey Bee */ #define AR_SUBVENDOR_ID_NOG 0x0e11 /* No 11G subvendor ID */ #define AR_SUBVENDOR_ID_NEW_A 0x7065 /* Update device to new RD */ From owner-svn-src-all@freebsd.org Sat Nov 28 00:41:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEC55A365E0; Sat, 28 Nov 2015 00:41:38 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD6B31FC1; Sat, 28 Nov 2015 00:41:38 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAS0fbnF030129; Sat, 28 Nov 2015 00:41:37 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAS0fbIe030128; Sat, 28 Nov 2015 00:41:37 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511280041.tAS0fbIe030128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Sat, 28 Nov 2015 00:41:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291414 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2015 00:41:39 -0000 Author: ume Date: Sat Nov 28 00:41:37 2015 New Revision: 291414 URL: https://svnweb.freebsd.org/changeset/base/291414 Log: Fix breakage by recent collation change. LC_ALL has to be exported. Modified: head/tools/build/options/makeman Modified: head/tools/build/options/makeman ============================================================================== --- head/tools/build/options/makeman Sat Nov 28 00:27:16 2015 (r291413) +++ head/tools/build/options/makeman Sat Nov 28 00:41:37 2015 (r291414) @@ -3,7 +3,7 @@ # This file is in the public domain. set -o errexit -LC_ALL=C +export LC_ALL=C ident='$FreeBSD$' From owner-svn-src-all@freebsd.org Sat Nov 28 00:55:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AD55A36811; Sat, 28 Nov 2015 00:55:51 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE07D14B0; Sat, 28 Nov 2015 00:55:50 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAS0tn3x035102; Sat, 28 Nov 2015 00:55:49 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAS0tnPI035101; Sat, 28 Nov 2015 00:55:49 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201511280055.tAS0tnPI035101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Sat, 28 Nov 2015 00:55:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291415 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2015 00:55:51 -0000 Author: ume Date: Sat Nov 28 00:55:49 2015 New Revision: 291415 URL: https://svnweb.freebsd.org/changeset/base/291415 Log: Regen src.conf.5 for recent option changes. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sat Nov 28 00:41:37 2015 (r291414) +++ head/share/man/man5/src.conf.5 Sat Nov 28 00:55:49 2015 (r291415) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: head/tools/build/options/makeman 290435 2015-11-06 05:28:08Z bdrewery +.\" from FreeBSD: head/tools/build/options/makeman 291414 2015-11-28 00:41:37Z ume .\" $FreeBSD$ -.Dd November 13, 2015 +.Dd November 28, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -515,6 +515,10 @@ When set, the following options are also (unless .Va WITHOUT_AUTO_OBJ is set explicitly) +.It Va WITH_META_MODE +(unless +.Va WITHOUT_META_MODE +is set explicitly) .It Va WITH_STAGING (unless .Va WITHOUT_STAGING @@ -1104,16 +1108,6 @@ Enable building openldap support for ker .It Va WITHOUT_OPENSSH .\" from FreeBSD: head/tools/build/options/WITHOUT_OPENSSH 156932 2006-03-21 07:50:50Z ru Set to not build OpenSSH. -.It Va WITH_OPENSSH_NONE_CIPHER -.\" from FreeBSD: head/tools/build/options/WITH_OPENSSH_NONE_CIPHER 245527 2013-01-17 01:51:04Z bz -Set to include the "None" cipher support in OpenSSH and its libraries. -Additional adjustments may need to be done to system configuration -files, such as -.Xr sshd_config 5 , -to enable this cipher. -Please see -.Pa /usr/src/crypto/openssh/README.hpn -for full details. .It Va WITHOUT_OPENSSL .\" from FreeBSD: head/tools/build/options/WITHOUT_OPENSSL 156932 2006-03-21 07:50:50Z ru Set to not build OpenSSL. From owner-svn-src-all@freebsd.org Sat Nov 28 01:09:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B254A369F1; Sat, 28 Nov 2015 01:09:32 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8BDF19DB; Sat, 28 Nov 2015 01:09:31 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAS19UUV038123; Sat, 28 Nov 2015 01:09:30 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAS19Ue0038122; Sat, 28 Nov 2015 01:09:30 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511280109.tAS19Ue0038122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 28 Nov 2015 01:09:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291416 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2015 01:09:32 -0000 Author: adrian Date: Sat Nov 28 01:09:30 2015 New Revision: 291416 URL: https://svnweb.freebsd.org/changeset/base/291416 Log: Add AR9530 (honeybee) config option. Modified: head/sys/conf/options Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sat Nov 28 00:55:49 2015 (r291415) +++ head/sys/conf/options Sat Nov 28 01:09:30 2015 (r291416) @@ -818,6 +818,7 @@ AH_SUPPORT_AR9130 opt_ah.h # This is required for AR933x SoC support AH_SUPPORT_AR9330 opt_ah.h AH_SUPPORT_AR9340 opt_ah.h +AH_SUPPORT_QCA9530 opt_ah.h AH_SUPPORT_QCA9550 opt_ah.h AH_DEBUG opt_ah.h From owner-svn-src-all@freebsd.org Sat Nov 28 02:17:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33DB5A3B6FB; Sat, 28 Nov 2015 02:17:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB159119C; Sat, 28 Nov 2015 02:17:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAS2H5oJ058618; Sat, 28 Nov 2015 02:17:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAS2H5g9058617; Sat, 28 Nov 2015 02:17:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201511280217.tAS2H5g9058617@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 28 Nov 2015 02:17:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291417 - stable/10/release/tools X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2015 02:17:06 -0000 Author: gjb Date: Sat Nov 28 02:17:04 2015 New Revision: 291417 URL: https://svnweb.freebsd.org/changeset/base/291417 Log: MFC r291306: Fix tmpfs(5) '/tmp' mount point. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/tools/arm.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/release/tools/arm.subr ============================================================================== --- stable/10/release/tools/arm.subr Sat Nov 28 01:09:30 2015 (r291416) +++ stable/10/release/tools/arm.subr Sat Nov 28 02:17:04 2015 (r291417) @@ -110,7 +110,7 @@ arm_install_base() { >> ${CHROOTDIR}/${DESTDIR}/etc/fstab echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab - echo "tmpfs /tmp tmpfs rw,mode=1777,size=30m 0 0" \ + echo "tmpfs /tmp tmpfs rw,mode=1777,size=30m 0 0" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab local hostname From owner-svn-src-all@freebsd.org Sat Nov 28 06:50:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61DACA3BB2F; Sat, 28 Nov 2015 06:50:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FF491C6B; Sat, 28 Nov 2015 06:50:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAS6oAEB041336; Sat, 28 Nov 2015 06:50:10 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAS6oAZw041334; Sat, 28 Nov 2015 06:50:10 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511280650.tAS6oAZw041334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 28 Nov 2015 06:50:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291418 - in head/sys/dev/ath/ath_hal: . ar9003 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2015 06:50:11 -0000 Author: adrian Date: Sat Nov 28 06:50:09 2015 New Revision: 291418 URL: https://svnweb.freebsd.org/changeset/base/291418 Log: [ath_hal] use the correct revision information for QCA953x. This probe/attaches correctly in my local branch and now displays a useful message: ath0: at mem 0x18100000-0x1811ffff irq 0 on nexus0 ... ath0: AR9530 mac 1280.0 RF5110 phy 0.0 Modified: head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ar9003/ar9300_devid.h Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Sat Nov 28 02:17:04 2015 (r291417) +++ head/sys/dev/ath/ath_hal/ah.c Sat Nov 28 06:50:09 2015 (r291418) @@ -145,10 +145,7 @@ ath_hal_mac_name(struct ath_hal *ah) case AR_SREV_VERSION_QCA9565: /* XXX should say QCA, not AR */ return "9565"; - case AR9300_DEVID_QCA955X: - /* XXX should say QCA, not AR */ - return "9550"; - case AR9300_DEVID_QCA953X: + case AR_SREV_VERSION_QCA9530: /* XXX should say QCA, not AR */ return "9530"; } Modified: head/sys/dev/ath/ath_hal/ar9003/ar9300_devid.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar9003/ar9300_devid.h Sat Nov 28 02:17:04 2015 (r291417) +++ head/sys/dev/ath/ath_hal/ar9003/ar9300_devid.h Sat Nov 28 06:50:09 2015 (r291418) @@ -54,6 +54,7 @@ #define AR_SREV_VERSION_AR9340 0x300 #define AR_SREV_VERSION_QCA9550 0x400 #define AR_SREV_VERSION_AR9485 0x240 +#define AR_SREV_VERSION_QCA9530 0x500 #define AR_SREV_REVISION_AR9380_10 0 /* AR9380 1.0 */ #define AR_SREV_REVISION_AR9380_20 2 /* AR9380 2.0/2.1 */ From owner-svn-src-all@freebsd.org Sat Nov 28 08:31:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03752A3B98D; Sat, 28 Nov 2015 08:31:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0E4319EC; Sat, 28 Nov 2015 08:31:33 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAS8VWTf069735; Sat, 28 Nov 2015 08:31:32 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAS8VWin069732; Sat, 28 Nov 2015 08:31:32 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511280831.tAS8VWin069732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 28 Nov 2015 08:31:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291419 - in head/sys: i386/conf modules pc98/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2015 08:31:34 -0000 Author: kib Date: Sat Nov 28 08:31:32 2015 New Revision: 291419 URL: https://svnweb.freebsd.org/changeset/base/291419 Log: Disconnect iBCS2 emulator from the build. The ibcs2 option, the build glue and the sources are not removed for now. Discussed with: emaste Sponsored by: The FreeBSD Foundation Modified: head/sys/i386/conf/NOTES head/sys/modules/Makefile head/sys/pc98/conf/NOTES Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Sat Nov 28 06:50:09 2015 (r291418) +++ head/sys/i386/conf/NOTES Sat Nov 28 08:31:32 2015 (r291419) @@ -989,7 +989,7 @@ options NKPT=31 # ABI Emulation # Enable iBCS2 runtime support for SCO and ISC binaries -options IBCS2 +#options IBCS2 # Emulate spx device for client side of SVR3 local X interface options SPX_HACK Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sat Nov 28 06:50:09 2015 (r291418) +++ head/sys/modules/Makefile Sat Nov 28 08:31:32 2015 (r291419) @@ -682,7 +682,7 @@ _cp= cp _elink= elink _glxiic= glxiic _glxsb= glxsb -_ibcs2= ibcs2 +#_ibcs2= ibcs2 _ie= ie _mse= mse _ncr= ncr Modified: head/sys/pc98/conf/NOTES ============================================================================== --- head/sys/pc98/conf/NOTES Sat Nov 28 06:50:09 2015 (r291418) +++ head/sys/pc98/conf/NOTES Sat Nov 28 08:31:32 2015 (r291419) @@ -506,7 +506,7 @@ options KVA_PAGES=260 # ABI Emulation # Enable iBCS2 runtime support for SCO and ISC binaries -options IBCS2 +#options IBCS2 # Emulate spx device for client side of SVR3 local X interface options SPX_HACK From owner-svn-src-all@freebsd.org Sat Nov 28 08:42:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 693A4A3BBA7; Sat, 28 Nov 2015 08:42:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBB1F1F7B; Sat, 28 Nov 2015 08:42:18 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id tAS8gDRA050942 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 28 Nov 2015 10:42:14 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua tAS8gDRA050942 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id tAS8gDSW050941; Sat, 28 Nov 2015 10:42:13 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 28 Nov 2015 10:42:13 +0200 From: Konstantin Belousov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: [kostikbel@gmail.com: Re: svn commit: r291419 - in head/sys: i386/conf modules pc98/conf] Message-ID: <20151128084213.GL3448@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2015 08:42:19 -0000 [Resend to include all relevant addresses] ----- Forwarded message from Konstantin Belousov ----- Date: Sat, 28 Nov 2015 10:34:01 +0200 From: Konstantin Belousov To: svn-src-head@freebsd.org Subject: Re: svn commit: r291419 - in head/sys: i386/conf modules pc98/conf On Sat, Nov 28, 2015 at 08:31:32AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Sat Nov 28 08:31:32 2015 > New Revision: 291419 > URL: https://svnweb.freebsd.org/changeset/base/291419 > > Log: > Disconnect iBCS2 emulator from the build. The ibcs2 option, the build > glue and the sources are not removed for now. > > Discussed with: emaste > Sponsored by: The FreeBSD Foundation By the next commit, the iBCS2 build would be broken. I kept the build glue and iBCS2 option in the conf/ to not make large churn if the build is going to be restored. If somebody has option IBCS2 in the kernel config, it has to be removed. I have pending patches which both restore the iBCS2 emulator build and fix issues with the signal frame layout for the SCO binaries. These patches are not committable right now for non-technical reasons. Either the reasons will be cleared, which would allow the commit and re-connection of the iBCS2 to the build, or the emulator will be removed from the tree since the code cannot be maintained. From owner-svn-src-all@freebsd.org Sat Nov 28 08:49:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A93B9A3BC48; Sat, 28 Nov 2015 08:49:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EF341185; Sat, 28 Nov 2015 08:49:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAS8n9gZ076496; Sat, 28 Nov 2015 08:49:09 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAS8n7oK076476; Sat, 28 Nov 2015 08:49:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511280849.tAS8n7oK076476@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 28 Nov 2015 08:49:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291420 - in head/sys: amd64/amd64 amd64/linux amd64/linux32 arm/arm arm64/arm64 compat/ia32 compat/svr4 i386/i386 i386/linux kern mips/mips powerpc/powerpc sparc64/sparc64 sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2015 08:49:10 -0000 Author: kib Date: Sat Nov 28 08:49:07 2015 New Revision: 291420 URL: https://svnweb.freebsd.org/changeset/base/291420 Log: Remove sv_prepsyscall, sv_sigsize and sv_sigtbl members of the struct sysent. sv_prepsyscall is unused. sv_sigsize and sv_sigtbl translate signal number from the FreeBSD namespace into the ABI domain. It is only utilized on i386 for iBCS2 binaries. The issue with this approach is that signals for iBCS2 were delivered with the FreeBSD signal frame layout, which does not follow iBCS2. The same note is true for any other potential user if sv_sigtbl. In other words, if ABI needs signal number translation, it really needs custom sv_sendsig method instead. Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/amd64/elf_machdep.c head/sys/amd64/linux/linux_sysvec.c head/sys/amd64/linux32/linux32_sysvec.c head/sys/arm/arm/elf_machdep.c head/sys/arm64/arm64/elf_machdep.c head/sys/compat/ia32/ia32_sysvec.c head/sys/compat/svr4/svr4_sysvec.c head/sys/i386/i386/elf_machdep.c head/sys/i386/i386/machdep.c head/sys/i386/linux/linux_sysvec.c head/sys/kern/imgact_aout.c head/sys/kern/init_main.c head/sys/mips/mips/elf_machdep.c head/sys/mips/mips/freebsd32_machdep.c head/sys/powerpc/powerpc/elf32_machdep.c head/sys/powerpc/powerpc/elf64_machdep.c head/sys/sparc64/sparc64/elf_machdep.c head/sys/sys/sysent.h Modified: head/sys/amd64/amd64/elf_machdep.c ============================================================================== --- head/sys/amd64/amd64/elf_machdep.c Sat Nov 28 08:31:32 2015 (r291419) +++ head/sys/amd64/amd64/elf_machdep.c Sat Nov 28 08:49:07 2015 (r291420) @@ -51,8 +51,6 @@ struct sysentvec elf64_freebsd_sysvec = .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, .sv_mask = 0, - .sv_sigsize = 0, - .sv_sigtbl = NULL, .sv_errsize = 0, .sv_errtbl = NULL, .sv_transtrap = NULL, @@ -60,7 +58,6 @@ struct sysentvec elf64_freebsd_sysvec = .sv_sendsig = sendsig, .sv_sigcode = sigcode, .sv_szsigcode = &szsigcode, - .sv_prepsyscall = NULL, .sv_name = "FreeBSD ELF64", .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, Modified: head/sys/amd64/linux/linux_sysvec.c ============================================================================== --- head/sys/amd64/linux/linux_sysvec.c Sat Nov 28 08:31:32 2015 (r291419) +++ head/sys/amd64/linux/linux_sysvec.c Sat Nov 28 08:49:07 2015 (r291420) @@ -750,8 +750,6 @@ struct sysentvec elf_linux_sysvec = { .sv_size = LINUX_SYS_MAXSYSCALL, .sv_table = linux_sysent, .sv_mask = 0, - .sv_sigsize = 0, - .sv_sigtbl = NULL, .sv_errsize = ELAST + 1, .sv_errtbl = bsd_to_linux_errno, .sv_transtrap = translate_traps, @@ -759,7 +757,6 @@ struct sysentvec elf_linux_sysvec = { .sv_sendsig = linux_rt_sendsig, .sv_sigcode = &_binary_linux_locore_o_start, .sv_szsigcode = &linux_szsigcode, - .sv_prepsyscall = NULL, .sv_name = "Linux ELF64", .sv_coredump = elf64_coredump, .sv_imgact_try = exec_linux_imgact_try, Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Sat Nov 28 08:31:32 2015 (r291419) +++ head/sys/amd64/linux32/linux32_sysvec.c Sat Nov 28 08:49:07 2015 (r291420) @@ -1011,8 +1011,6 @@ struct sysentvec elf_linux_sysvec = { .sv_size = LINUX32_SYS_MAXSYSCALL, .sv_table = linux32_sysent, .sv_mask = 0, - .sv_sigsize = 0, - .sv_sigtbl = NULL, .sv_errsize = ELAST + 1, .sv_errtbl = bsd_to_linux_errno, .sv_transtrap = translate_traps, @@ -1020,7 +1018,6 @@ struct sysentvec elf_linux_sysvec = { .sv_sendsig = linux_sendsig, .sv_sigcode = &_binary_linux32_locore_o_start, .sv_szsigcode = &linux_szsigcode, - .sv_prepsyscall = NULL, .sv_name = "Linux ELF32", .sv_coredump = elf32_coredump, .sv_imgact_try = exec_linux_imgact_try, Modified: head/sys/arm/arm/elf_machdep.c ============================================================================== --- head/sys/arm/arm/elf_machdep.c Sat Nov 28 08:31:32 2015 (r291419) +++ head/sys/arm/arm/elf_machdep.c Sat Nov 28 08:49:07 2015 (r291420) @@ -52,8 +52,6 @@ struct sysentvec elf32_freebsd_sysvec = .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, .sv_mask = 0, - .sv_sigsize = 0, - .sv_sigtbl = NULL, .sv_errsize = 0, .sv_errtbl = NULL, .sv_transtrap = NULL, @@ -61,7 +59,6 @@ struct sysentvec elf32_freebsd_sysvec = .sv_sendsig = sendsig, .sv_sigcode = sigcode, .sv_szsigcode = &szsigcode, - .sv_prepsyscall = NULL, .sv_name = "FreeBSD ELF32", .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, Modified: head/sys/arm64/arm64/elf_machdep.c ============================================================================== --- head/sys/arm64/arm64/elf_machdep.c Sat Nov 28 08:31:32 2015 (r291419) +++ head/sys/arm64/arm64/elf_machdep.c Sat Nov 28 08:49:07 2015 (r291420) @@ -59,8 +59,6 @@ static struct sysentvec elf64_freebsd_sy .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, .sv_mask = 0, - .sv_sigsize = 0, - .sv_sigtbl = NULL, .sv_errsize = 0, .sv_errtbl = NULL, .sv_transtrap = NULL, @@ -68,7 +66,6 @@ static struct sysentvec elf64_freebsd_sy .sv_sendsig = sendsig, .sv_sigcode = sigcode, .sv_szsigcode = &szsigcode, - .sv_prepsyscall = NULL, .sv_name = "FreeBSD ELF64", .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, Modified: head/sys/compat/ia32/ia32_sysvec.c ============================================================================== --- head/sys/compat/ia32/ia32_sysvec.c Sat Nov 28 08:31:32 2015 (r291419) +++ head/sys/compat/ia32/ia32_sysvec.c Sat Nov 28 08:49:07 2015 (r291420) @@ -99,8 +99,6 @@ struct sysentvec ia32_freebsd_sysvec = { .sv_size = FREEBSD32_SYS_MAXSYSCALL, .sv_table = freebsd32_sysent, .sv_mask = 0, - .sv_sigsize = 0, - .sv_sigtbl = NULL, .sv_errsize = 0, .sv_errtbl = NULL, .sv_transtrap = NULL, @@ -108,7 +106,6 @@ struct sysentvec ia32_freebsd_sysvec = { .sv_sendsig = ia32_sendsig, .sv_sigcode = ia32_sigcode, .sv_szsigcode = &sz_ia32_sigcode, - .sv_prepsyscall = NULL, .sv_name = "FreeBSD ELF32", .sv_coredump = elf32_coredump, .sv_imgact_try = NULL, Modified: head/sys/compat/svr4/svr4_sysvec.c ============================================================================== --- head/sys/compat/svr4/svr4_sysvec.c Sat Nov 28 08:31:32 2015 (r291419) +++ head/sys/compat/svr4/svr4_sysvec.c Sat Nov 28 08:49:07 2015 (r291420) @@ -167,8 +167,6 @@ struct sysentvec svr4_sysvec = { .sv_size = SVR4_SYS_MAXSYSCALL, .sv_table = svr4_sysent, .sv_mask = 0xff, - .sv_sigsize = 0, - .sv_sigtbl = NULL, .sv_errsize = ELAST, /* ELAST */ .sv_errtbl = bsd_to_svr4_errno, .sv_transtrap = NULL, @@ -176,7 +174,6 @@ struct sysentvec svr4_sysvec = { .sv_sendsig = svr4_sendsig, .sv_sigcode = svr4_sigcode, .sv_szsigcode = &svr4_szsigcode, - .sv_prepsyscall = NULL, .sv_name = "SVR4", .sv_coredump = elf32_coredump, .sv_imgact_try = NULL, Modified: head/sys/i386/i386/elf_machdep.c ============================================================================== --- head/sys/i386/i386/elf_machdep.c Sat Nov 28 08:31:32 2015 (r291419) +++ head/sys/i386/i386/elf_machdep.c Sat Nov 28 08:49:07 2015 (r291420) @@ -57,8 +57,6 @@ struct sysentvec elf32_freebsd_sysvec = .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, .sv_mask = 0, - .sv_sigsize = 0, - .sv_sigtbl = NULL, .sv_errsize = 0, .sv_errtbl = NULL, .sv_transtrap = NULL, @@ -66,7 +64,6 @@ struct sysentvec elf32_freebsd_sysvec = .sv_sendsig = sendsig, .sv_sigcode = sigcode, .sv_szsigcode = &szsigcode, - .sv_prepsyscall = NULL, .sv_name = "FreeBSD ELF32", .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Sat Nov 28 08:31:32 2015 (r291419) +++ head/sys/i386/i386/machdep.c Sat Nov 28 08:49:07 2015 (r291420) @@ -691,10 +691,6 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, /* Align to 16 bytes. */ sfp = (struct sigframe *)((unsigned int)sp & ~0xF); - /* Translate the signal if appropriate. */ - if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize) - sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)]; - /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_ucontext = (register_t)&sfp->sf_uc; Modified: head/sys/i386/linux/linux_sysvec.c ============================================================================== --- head/sys/i386/linux/linux_sysvec.c Sat Nov 28 08:31:32 2015 (r291419) +++ head/sys/i386/linux/linux_sysvec.c Sat Nov 28 08:49:07 2015 (r291420) @@ -956,8 +956,6 @@ struct sysentvec linux_sysvec = { .sv_size = LINUX_SYS_MAXSYSCALL, .sv_table = linux_sysent, .sv_mask = 0, - .sv_sigsize = 0, - .sv_sigtbl = NULL, .sv_errsize = ELAST + 1, .sv_errtbl = bsd_to_linux_errno, .sv_transtrap = translate_traps, @@ -965,7 +963,6 @@ struct sysentvec linux_sysvec = { .sv_sendsig = linux_sendsig, .sv_sigcode = &_binary_linux_locore_o_start, .sv_szsigcode = &linux_szsigcode, - .sv_prepsyscall = NULL, .sv_name = "Linux a.out", .sv_coredump = NULL, .sv_imgact_try = exec_linux_imgact_try, @@ -995,8 +992,6 @@ struct sysentvec elf_linux_sysvec = { .sv_size = LINUX_SYS_MAXSYSCALL, .sv_table = linux_sysent, .sv_mask = 0, - .sv_sigsize = 0, - .sv_sigtbl = NULL, .sv_errsize = ELAST + 1, .sv_errtbl = bsd_to_linux_errno, .sv_transtrap = translate_traps, @@ -1004,7 +999,6 @@ struct sysentvec elf_linux_sysvec = { .sv_sendsig = linux_sendsig, .sv_sigcode = &_binary_linux_locore_o_start, .sv_szsigcode = &linux_szsigcode, - .sv_prepsyscall = NULL, .sv_name = "Linux ELF", .sv_coredump = elf32_coredump, .sv_imgact_try = exec_linux_imgact_try, Modified: head/sys/kern/imgact_aout.c ============================================================================== --- head/sys/kern/imgact_aout.c Sat Nov 28 08:31:32 2015 (r291419) +++ head/sys/kern/imgact_aout.c Sat Nov 28 08:49:07 2015 (r291420) @@ -70,8 +70,6 @@ struct sysentvec aout_sysvec = { .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, .sv_mask = 0, - .sv_sigsize = 0, - .sv_sigtbl = NULL, .sv_errsize = 0, .sv_errtbl = NULL, .sv_transtrap = NULL, @@ -79,7 +77,6 @@ struct sysentvec aout_sysvec = { .sv_sendsig = sendsig, .sv_sigcode = sigcode, .sv_szsigcode = &szsigcode, - .sv_prepsyscall = NULL, .sv_name = "FreeBSD a.out", .sv_coredump = NULL, .sv_imgact_try = NULL, @@ -116,8 +113,6 @@ struct sysentvec aout_sysvec = { .sv_size = FREEBSD32_SYS_MAXSYSCALL, .sv_table = freebsd32_sysent, .sv_mask = 0, - .sv_sigsize = 0, - .sv_sigtbl = NULL, .sv_errsize = 0, .sv_errtbl = NULL, .sv_transtrap = NULL, @@ -125,7 +120,6 @@ struct sysentvec aout_sysvec = { .sv_sendsig = ia32_sendsig, .sv_sigcode = ia32_sigcode, .sv_szsigcode = &sz_ia32_sigcode, - .sv_prepsyscall = NULL, .sv_name = "FreeBSD a.out", .sv_coredump = NULL, .sv_imgact_try = NULL, Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Sat Nov 28 08:31:32 2015 (r291419) +++ head/sys/kern/init_main.c Sat Nov 28 08:49:07 2015 (r291420) @@ -387,8 +387,6 @@ struct sysentvec null_sysvec = { .sv_size = 0, .sv_table = NULL, .sv_mask = 0, - .sv_sigsize = 0, - .sv_sigtbl = NULL, .sv_errsize = 0, .sv_errtbl = NULL, .sv_transtrap = NULL, @@ -396,7 +394,6 @@ struct sysentvec null_sysvec = { .sv_sendsig = NULL, .sv_sigcode = NULL, .sv_szsigcode = NULL, - .sv_prepsyscall = NULL, .sv_name = "null", .sv_coredump = NULL, .sv_imgact_try = NULL, Modified: head/sys/mips/mips/elf_machdep.c ============================================================================== --- head/sys/mips/mips/elf_machdep.c Sat Nov 28 08:31:32 2015 (r291419) +++ head/sys/mips/mips/elf_machdep.c Sat Nov 28 08:49:07 2015 (r291420) @@ -54,8 +54,6 @@ struct sysentvec elf64_freebsd_sysvec = .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, .sv_mask = 0, - .sv_sigsize = 0, - .sv_sigtbl = NULL, .sv_errsize = 0, .sv_errtbl = NULL, .sv_transtrap = NULL, @@ -63,7 +61,6 @@ struct sysentvec elf64_freebsd_sysvec = .sv_sendsig = sendsig, .sv_sigcode = sigcode, .sv_szsigcode = &szsigcode, - .sv_prepsyscall = NULL, .sv_name = "FreeBSD ELF64", .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, @@ -111,8 +108,6 @@ struct sysentvec elf32_freebsd_sysvec = .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, .sv_mask = 0, - .sv_sigsize = 0, - .sv_sigtbl = NULL, .sv_errsize = 0, .sv_errtbl = NULL, .sv_transtrap = NULL, @@ -120,7 +115,6 @@ struct sysentvec elf32_freebsd_sysvec = .sv_sendsig = sendsig, .sv_sigcode = sigcode, .sv_szsigcode = &szsigcode, - .sv_prepsyscall = NULL, .sv_name = "FreeBSD ELF32", .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, Modified: head/sys/mips/mips/freebsd32_machdep.c ============================================================================== --- head/sys/mips/mips/freebsd32_machdep.c Sat Nov 28 08:31:32 2015 (r291419) +++ head/sys/mips/mips/freebsd32_machdep.c Sat Nov 28 08:49:07 2015 (r291420) @@ -77,8 +77,6 @@ struct sysentvec elf32_freebsd_sysvec = .sv_size = SYS_MAXSYSCALL, .sv_table = freebsd32_sysent, .sv_mask = 0, - .sv_sigsize = 0, - .sv_sigtbl = NULL, .sv_errsize = 0, .sv_errtbl = NULL, .sv_transtrap = NULL, @@ -86,7 +84,6 @@ struct sysentvec elf32_freebsd_sysvec = .sv_sendsig = freebsd32_sendsig, .sv_sigcode = sigcode32, .sv_szsigcode = &szsigcode32, - .sv_prepsyscall = NULL, .sv_name = "FreeBSD ELF32", .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, Modified: head/sys/powerpc/powerpc/elf32_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/elf32_machdep.c Sat Nov 28 08:31:32 2015 (r291419) +++ head/sys/powerpc/powerpc/elf32_machdep.c Sat Nov 28 08:49:07 2015 (r291420) @@ -68,8 +68,6 @@ struct sysentvec elf32_freebsd_sysvec = .sv_table = sysent, #endif .sv_mask = 0, - .sv_sigsize = 0, - .sv_sigtbl = NULL, .sv_errsize = 0, .sv_errtbl = NULL, .sv_transtrap = NULL, @@ -77,7 +75,6 @@ struct sysentvec elf32_freebsd_sysvec = .sv_sendsig = sendsig, .sv_sigcode = sigcode32, .sv_szsigcode = &szsigcode32, - .sv_prepsyscall = NULL, .sv_name = "FreeBSD ELF32", .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, Modified: head/sys/powerpc/powerpc/elf64_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/elf64_machdep.c Sat Nov 28 08:31:32 2015 (r291419) +++ head/sys/powerpc/powerpc/elf64_machdep.c Sat Nov 28 08:49:07 2015 (r291420) @@ -56,8 +56,6 @@ struct sysentvec elf64_freebsd_sysvec_v1 .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, .sv_mask = 0, - .sv_sigsize = 0, - .sv_sigtbl = NULL, .sv_errsize = 0, .sv_errtbl = NULL, .sv_transtrap = NULL, @@ -65,7 +63,6 @@ struct sysentvec elf64_freebsd_sysvec_v1 .sv_sendsig = sendsig, .sv_sigcode = sigcode64, .sv_szsigcode = &szsigcode64, - .sv_prepsyscall = NULL, .sv_name = "FreeBSD ELF64", .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, @@ -95,8 +92,6 @@ struct sysentvec elf64_freebsd_sysvec_v2 .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, .sv_mask = 0, - .sv_sigsize = 0, - .sv_sigtbl = NULL, .sv_errsize = 0, .sv_errtbl = NULL, .sv_transtrap = NULL, @@ -104,7 +99,6 @@ struct sysentvec elf64_freebsd_sysvec_v2 .sv_sendsig = sendsig, .sv_sigcode = sigcode64_elfv2, .sv_szsigcode = &szsigcode64_elfv2, - .sv_prepsyscall = NULL, .sv_name = "FreeBSD ELF64 V2", .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, Modified: head/sys/sparc64/sparc64/elf_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/elf_machdep.c Sat Nov 28 08:31:32 2015 (r291419) +++ head/sys/sparc64/sparc64/elf_machdep.c Sat Nov 28 08:49:07 2015 (r291420) @@ -58,8 +58,6 @@ static struct sysentvec elf64_freebsd_sy .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, .sv_mask = 0, - .sv_sigsize = 0, - .sv_sigtbl = NULL, .sv_errsize = 0, .sv_errtbl = NULL, .sv_transtrap = NULL, @@ -67,7 +65,6 @@ static struct sysentvec elf64_freebsd_sy .sv_sendsig = sendsig, .sv_sigcode = NULL, .sv_szsigcode = NULL, - .sv_prepsyscall = NULL, .sv_name = "FreeBSD ELF64", .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, Modified: head/sys/sys/sysent.h ============================================================================== --- head/sys/sys/sysent.h Sat Nov 28 08:31:32 2015 (r291419) +++ head/sys/sys/sysent.h Sat Nov 28 08:49:07 2015 (r291420) @@ -92,8 +92,6 @@ struct sysentvec { int sv_size; /* number of entries */ struct sysent *sv_table; /* pointer to sysent */ u_int sv_mask; /* optional mask to index */ - int sv_sigsize; /* size of signal translation table */ - int *sv_sigtbl; /* signal translation table */ int sv_errsize; /* size of errno translation table */ int *sv_errtbl; /* errno translation table */ int (*sv_transtrap)(int, int); @@ -104,8 +102,6 @@ struct sysentvec { /* send signal */ char *sv_sigcode; /* start of sigtramp code */ int *sv_szsigcode; /* size of sigtramp code */ - void (*sv_prepsyscall)(struct trapframe *, int *, u_int *, - caddr_t *); char *sv_name; /* name of binary type */ int (*sv_coredump)(struct thread *, struct vnode *, off_t, int); /* function to dump core, or NULL */ From owner-svn-src-all@freebsd.org Sat Nov 28 12:09:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF0A5A3AB11; Sat, 28 Nov 2015 12:09:37 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A635017C4; Sat, 28 Nov 2015 12:09:37 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tASC9aAi043067; Sat, 28 Nov 2015 12:09:36 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tASC9aeR043066; Sat, 28 Nov 2015 12:09:36 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201511281209.tASC9aeR043066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sat, 28 Nov 2015 12:09:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291424 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2015 12:09:38 -0000 Author: mmel Date: Sat Nov 28 12:09:36 2015 New Revision: 291424 URL: https://svnweb.freebsd.org/changeset/base/291424 Log: ARM: Cumulative fixes for GIC - fix detection of interrupt root controller - allow (but warn) unsupported configuration bits - dont send EOI for spurious interrupts - print more informations for spurious interrupts - use device_printf() where appropriate Reviewed by: ian (earlier version) Approved by: kib (mentor) Modified: head/sys/arm/arm/gic.c Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Sat Nov 28 09:50:52 2015 (r291423) +++ head/sys/arm/arm/gic.c Sat Nov 28 12:09:36 2015 (r291424) @@ -68,6 +68,8 @@ __FBSDID("$FreeBSD$"); #include "pic_if.h" #endif +#define GIC_DEBUG_SPURIOUS + /* We are using GICv2 register naming */ /* Distributor Registers */ @@ -135,6 +137,9 @@ struct arm_gic_softc { uint8_t ver; struct mtx mutex; uint32_t nirqs; +#ifdef GIC_DEBUG_SPURIOUS + uint32_t last_irq[MAXCPU]; +#endif }; static struct resource_spec arm_gic_spec[] = { @@ -287,7 +292,7 @@ arm_gic_init_secondary(device_t dev) } #endif /* ARM_INTRNG */ #endif /* SMP */ - + #ifndef ARM_INTRNG int gic_decode_fdt(phandle_t iparent, pcell_t *intr, int *interrupt, @@ -335,11 +340,10 @@ gic_decode_fdt(phandle_t iparent, pcell_ */ if (fdt32_to_cpu(intr[2]) & 0x0a) { printf("unsupported trigger/polarity configuration " - "0x%2x\n", fdt32_to_cpu(intr[2]) & 0x0f); - return (ENOTSUP); + "0x%02x\n", fdt32_to_cpu(intr[2]) & 0x0f); } *pol = INTR_POLARITY_CONFORM; - if (fdt32_to_cpu(intr[2]) & 0x01) + if (fdt32_to_cpu(intr[2]) & 0x03) *trig = INTR_TRIGGER_EDGE; else *trig = INTR_TRIGGER_LEVEL; @@ -367,6 +371,7 @@ arm_gic_attach(device_t dev) int i; uint32_t icciidr; #ifdef ARM_INTRNG + phandle_t pxref; intptr_t xref = gic_xref(dev); #endif @@ -456,7 +461,9 @@ arm_gic_attach(device_t dev) goto cleanup; } - if (sc->gic_res[2] == NULL) { + i = OF_getencprop(ofw_bus_get_node(dev), "interrupt-parent", + &pxref, sizeof(pxref)); + if (i > 0 && xref == pxref) { if (arm_pic_claim_root(dev, xref, arm_gic_intr, sc, GIC_LAST_SGI - GIC_FIRST_SGI + 1) != 0) { device_printf(dev, "could not set PIC as a root\n"); @@ -472,6 +479,7 @@ arm_gic_attach(device_t dev) } } + OF_device_register_xref(xref, dev); return (0); cleanup: @@ -516,8 +524,11 @@ arm_gic_intr(void *arg) */ if (irq >= sc->nirqs) { - device_printf(sc->gic_dev, "Spurious interrupt detected\n"); - gic_c_write_4(sc, GICC_EOIR, irq_active_reg); +#ifdef GIC_DEBUG_SPURIOUS + device_printf(sc->gic_dev, + "Spurious interrupt detected: last irq: %d on CPU%d\n", + sc->last_irq[PCPU_GET(cpuid)], PCPU_GET(cpuid)); +#endif return (FILTER_HANDLED); } @@ -542,12 +553,16 @@ dispatch_irq: arm_ipi_dispatch(isrc, tf); goto next_irq; #else - printf("SGI %u on UP system detected\n", irq - GIC_FIRST_SGI); + device_printf(sc->gic_dev, "SGI %u on UP system detected\n", + irq - GIC_FIRST_SGI); gic_c_write_4(sc, GICC_EOIR, irq_active_reg); goto next_irq; #endif } +#ifdef GIC_DEBUG_SPURIOUS + sc->last_irq[PCPU_GET(cpuid)] = irq; +#endif if (isrc->isrc_trig == INTR_TRIGGER_EDGE) gic_c_write_4(sc, GICC_EOIR, irq_active_reg); @@ -729,12 +744,12 @@ gic_map_fdt(struct arm_gic_softc *sc, st */ tripol = isrc->isrc_cells[2]; if (tripol & 0x0a) { - printf("unsupported trigger/polarity configuration " - "0x%2x\n", tripol & 0x0f); - return (ENOTSUP); + device_printf(sc->gic_dev, + "unsupported trigger/polarity configuration " + "0x%02x\n", tripol & 0x0f); } pol = INTR_POLARITY_CONFORM; - if (tripol & 0x01) + if (tripol & 0x03) trig = INTR_TRIGGER_EDGE; else trig = INTR_TRIGGER_LEVEL; @@ -911,7 +926,8 @@ arm_gic_next_irq(struct arm_gic_softc *s if (active_irq == 0x3FF) { if (last_irq == -1) - printf("Spurious interrupt detected\n"); + device_printf(sc->gic_dev, + "Spurious interrupt detected\n"); return -1; } From owner-svn-src-all@freebsd.org Sat Nov 28 12:11:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85B22A3AC66; Sat, 28 Nov 2015 12:11:46 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36DA41AB6; Sat, 28 Nov 2015 12:11:46 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tASCBjbH043379; Sat, 28 Nov 2015 12:11:45 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tASCBjs3043376; Sat, 28 Nov 2015 12:11:45 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201511281211.tASCBjs3043376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sat, 28 Nov 2015 12:11:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291425 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2015 12:11:46 -0000 Author: mmel Date: Sat Nov 28 12:11:44 2015 New Revision: 291425 URL: https://svnweb.freebsd.org/changeset/base/291425 Log: ARM: Add support for new KRAIT 300 CPU revision. Approved by: kib (mentor) Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/identcpu.c head/sys/arm/include/armreg.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Sat Nov 28 12:09:36 2015 (r291424) +++ head/sys/arm/arm/cpufunc.c Sat Nov 28 12:11:44 2015 (r291425) @@ -910,7 +910,8 @@ set_cpufuncs() cputype == CPU_ID_CORTEXA15R1 || cputype == CPU_ID_CORTEXA15R2 || cputype == CPU_ID_CORTEXA15R3 || - cputype == CPU_ID_KRAIT ) { + cputype == CPU_ID_KRAIT300R0 || + cputype == CPU_ID_KRAIT300R1 ) { cpufuncs = cortexa_cpufuncs; cpu_reset_needs_v4_MMU_disable = 1; /* V4 or higher */ get_cachetype_cp15(); Modified: head/sys/arm/arm/identcpu.c ============================================================================== --- head/sys/arm/arm/identcpu.c Sat Nov 28 12:09:36 2015 (r291424) +++ head/sys/arm/arm/identcpu.c Sat Nov 28 12:11:44 2015 (r291425) @@ -197,7 +197,9 @@ const struct cpuidtab cpuids[] = { generic_steppings }, { CPU_ID_CORTEXA15R3, CPU_CLASS_CORTEXA, "Cortex A15-r3", generic_steppings }, - { CPU_ID_KRAIT, CPU_CLASS_KRAIT, "Krait", + { CPU_ID_KRAIT300R0, CPU_CLASS_KRAIT, "Krait 300-r0", + generic_steppings }, + { CPU_ID_KRAIT300R1, CPU_CLASS_KRAIT, "Krait 300-r1", generic_steppings }, { CPU_ID_80200, CPU_CLASS_XSCALE, "i80200", Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Sat Nov 28 12:09:36 2015 (r291424) +++ head/sys/arm/include/armreg.h Sat Nov 28 12:11:44 2015 (r291425) @@ -139,7 +139,9 @@ #define CPU_ID_CORTEXA15R1 0x411fc0f0 #define CPU_ID_CORTEXA15R2 0x412fc0f0 #define CPU_ID_CORTEXA15R3 0x413fc0f0 -#define CPU_ID_KRAIT 0x510f06f0 /* Snapdragon S4 Pro/APQ8064 */ +#define CPU_ID_KRAIT300R0 0x510f06f0 /* Snapdragon S4 Pro/APQ8064 */ +#define CPU_ID_KRAIT300R1 0x511f06f0 + #define CPU_ID_TI925T 0x54029250 #define CPU_ID_MV88FR131 0x56251310 /* Marvell Feroceon 88FR131 Core */ #define CPU_ID_MV88FR331 0x56153310 /* Marvell Feroceon 88FR331 Core */ From owner-svn-src-all@freebsd.org Sat Nov 28 12:12:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7367BA3ACC4; Sat, 28 Nov 2015 12:12:30 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29DCA1C8E; Sat, 28 Nov 2015 12:12:30 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tASCCToU046040; Sat, 28 Nov 2015 12:12:29 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tASCCTnr046037; Sat, 28 Nov 2015 12:12:29 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201511281212.tASCCTnr046037@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sat, 28 Nov 2015 12:12:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291426 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2015 12:12:30 -0000 Author: mmel Date: Sat Nov 28 12:12:28 2015 New Revision: 291426 URL: https://svnweb.freebsd.org/changeset/base/291426 Log: ARM: Implement atomic_swap_int(9). It's used in DRM2 code. Approved by: kib (mentor) Modified: head/sys/arm/include/atomic-v4.h head/sys/arm/include/atomic-v6.h head/sys/arm/include/atomic.h Modified: head/sys/arm/include/atomic-v4.h ============================================================================== --- head/sys/arm/include/atomic-v4.h Sat Nov 28 12:11:44 2015 (r291425) +++ head/sys/arm/include/atomic-v4.h Sat Nov 28 12:12:28 2015 (r291426) @@ -363,6 +363,13 @@ atomic_readandclear_32(volatile u_int32_ return (__swp(0, p)); } +static __inline uint32_t +atomic_swap_32(volatile u_int32_t *p, u_int32_t v) +{ + + return (__swp(v, p)); +} + #define atomic_cmpset_rel_32 atomic_cmpset_32 #define atomic_cmpset_acq_32 atomic_cmpset_32 #define atomic_set_rel_32 atomic_set_32 Modified: head/sys/arm/include/atomic-v6.h ============================================================================== --- head/sys/arm/include/atomic-v6.h Sat Nov 28 12:11:44 2015 (r291425) +++ head/sys/arm/include/atomic-v6.h Sat Nov 28 12:12:28 2015 (r291426) @@ -641,6 +641,25 @@ atomic_testandset_64(volatile uint64_t * return (atomic_testandset_32(p32, v)); } +static __inline uint32_t +atomic_swap_32(volatile uint32_t *p, uint32_t v) +{ + uint32_t ret, exflag; + + __asm __volatile( + "1: ldrex %[ret], [%[ptr]] \n" + " strex %[exf], %[val], [%[ptr]] \n" + " teq %[exf], #0 \n" + " it ne \n" + " bne 1b \n" + : [ret] "=r" (ret), + [exf] "=&r" (exflag) + : [val] "r" (v), + [ptr] "r" (p) + : "cc", "memory"); + return (ret); +} + #undef ATOMIC_ACQ_REL #undef ATOMIC_ACQ_REL_LONG Modified: head/sys/arm/include/atomic.h ============================================================================== --- head/sys/arm/include/atomic.h Sat Nov 28 12:11:44 2015 (r291425) +++ head/sys/arm/include/atomic.h Sat Nov 28 12:12:28 2015 (r291426) @@ -109,5 +109,6 @@ atomic_store_long(volatile u_long *dst, #define atomic_readandclear_int atomic_readandclear_32 #define atomic_load_acq_int atomic_load_acq_32 #define atomic_store_rel_int atomic_store_rel_32 +#define atomic_swap_int atomic_swap_32 #endif /* _MACHINE_ATOMIC_H_ */ From owner-svn-src-all@freebsd.org Sat Nov 28 14:30:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91F17A3B63C; Sat, 28 Nov 2015 14:30:43 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B22D10FB; Sat, 28 Nov 2015 14:30:43 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tASEUgVn086523; Sat, 28 Nov 2015 14:30:42 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tASEUgsf086522; Sat, 28 Nov 2015 14:30:42 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201511281430.tASEUgsf086522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sat, 28 Nov 2015 14:30:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291427 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2015 14:30:43 -0000 Author: mmel Date: Sat Nov 28 14:30:42 2015 New Revision: 291427 URL: https://svnweb.freebsd.org/changeset/base/291427 Log: AHCI: Use bus_dmamap_sync(9) when accessing DMA buffers. Reviewed by: mav Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D4240 Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Sat Nov 28 12:12:28 2015 (r291426) +++ head/sys/dev/ahci/ahci.c Sat Nov 28 14:30:42 2015 (r291427) @@ -1606,10 +1606,15 @@ ahci_execute_transaction(struct ahci_slo if ((ch->quirks & AHCI_Q_NOBSYRES) == 0 && (ch->quirks & AHCI_Q_ATI_PMP_BUG) == 0 && softreset == 2 && et == AHCI_ERR_NONE) { - while ((val = fis[2]) & ATA_S_BUSY) { - DELAY(10); - if (count++ >= timeout) + for ( ; count < timeout; count++) { + bus_dmamap_sync(ch->dma.rfis_tag, + ch->dma.rfis_map, BUS_DMASYNC_POSTREAD); + val = fis[2]; + bus_dmamap_sync(ch->dma.rfis_tag, + ch->dma.rfis_map, BUS_DMASYNC_PREREAD); + if ((val & ATA_S_BUSY) == 0) break; + DELAY(10); } } From owner-svn-src-all@freebsd.org Sat Nov 28 15:22:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43E66A3A198; Sat, 28 Nov 2015 15:22:47 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 208161A9D; Sat, 28 Nov 2015 15:22:47 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tASFMk5S001831; Sat, 28 Nov 2015 15:22:46 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tASFMkrH001830; Sat, 28 Nov 2015 15:22:46 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201511281522.tASFMkrH001830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= Date: Sat, 28 Nov 2015 15:22:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291428 - head/sys/dev/drm2/i915 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2015 15:22:47 -0000 Author: dumbbell Date: Sat Nov 28 15:22:46 2015 New Revision: 291428 URL: https://svnweb.freebsd.org/changeset/base/291428 Log: drm/i915: Reduce diff with Linux 3.8 There is no functional change. The goal is to ease the future update to Linux 3.8's i915 driver. MFC after: 2 months Modified: head/sys/dev/drm2/i915/i915_debug.c Modified: head/sys/dev/drm2/i915/i915_debug.c ============================================================================== --- head/sys/dev/drm2/i915/i915_debug.c Sat Nov 28 14:30:42 2015 (r291427) +++ head/sys/dev/drm2/i915/i915_debug.c Sat Nov 28 15:22:46 2015 (r291428) @@ -294,14 +294,11 @@ static int i915_gem_gtt_info(struct drm_ static int i915_gem_pageflip_info(struct drm_device *dev, struct sbuf *m, void *data) { struct intel_crtc *crtc; - struct drm_i915_gem_object *obj; - struct intel_unpin_work *work; - char pipe; - char plane; list_for_each_entry(crtc, &dev->mode_config.crtc_list, base.head) { - pipe = pipe_name(crtc->pipe); - plane = plane_name(crtc->plane); + const char pipe = pipe_name(crtc->pipe); + const char plane = plane_name(crtc->plane); + struct intel_unpin_work *work; mtx_lock(&dev->event_lock); work = crtc->unpin_work; @@ -323,12 +320,12 @@ static int i915_gem_pageflip_info(struct sbuf_printf(m, "%d prepares\n", work->pending); if (work->old_fb_obj) { - obj = work->old_fb_obj; + struct drm_i915_gem_object *obj = work->old_fb_obj; if (obj) sbuf_printf(m, "Old framebuffer gtt_offset 0x%08x\n", obj->gtt_offset); } if (work->pending_flip_obj) { - obj = work->pending_flip_obj; + struct drm_i915_gem_object *obj = work->pending_flip_obj; if (obj) sbuf_printf(m, "New framebuffer gtt_offset 0x%08x\n", obj->gtt_offset); } @@ -390,7 +387,8 @@ static int i915_gem_request_info(struct return 0; } -static void i915_ring_seqno_info(struct sbuf *m, struct intel_ring_buffer *ring) +static void i915_ring_seqno_info(struct sbuf *m, + struct intel_ring_buffer *ring) { if (ring->get_seqno) { sbuf_printf(m, "Current sequence (%s): %d\n", @@ -496,9 +494,9 @@ static int i915_interrupt_info(struct dr atomic_read(&dev_priv->irq_received)); for (i = 0; i < I915_NUM_RINGS; i++) { if (IS_GEN6(dev) || IS_GEN7(dev)) { - sbuf_printf(m, "Graphics Interrupt mask (%s): %08x\n", - dev_priv->rings[i].name, - I915_READ_IMR(&dev_priv->rings[i])); + sbuf_printf(m, + "Graphics Interrupt mask (%s): %08x\n", + dev_priv->rings[i].name, I915_READ_IMR(&dev_priv->rings[i])); } i915_ring_seqno_info(m, &dev_priv->rings[i]); } @@ -678,8 +676,6 @@ static int i915_error_state(struct drm_d return 0; } - error = dev_priv->first_error; - sbuf_printf(m, "Time: %jd s %jd us\n", (intmax_t)error->time.tv_sec, (intmax_t)error->time.tv_usec); sbuf_printf(m, "PCI ID: 0x%04x\n", dev->pci_device); @@ -767,7 +763,7 @@ static int i915_error_state(struct drm_d } static int -i915_error_state_w(struct drm_device *dev, const char *str, void *unused) +i915_error_state_write(struct drm_device *dev, const char *str, void *unused) { drm_i915_private_t *dev_priv = dev->dev_private; struct drm_i915_error_state *error; @@ -782,8 +778,7 @@ i915_error_state_w(struct drm_device *de return (0); } -static int -i915_rstdby_delays(struct drm_device *dev, struct sbuf *m, void *unused) +static int i915_rstdby_delays(struct drm_device *dev, struct sbuf *m, void *unused) { drm_i915_private_t *dev_priv = dev->dev_private; u16 crstanddelay; @@ -795,8 +790,7 @@ i915_rstdby_delays(struct drm_device *de DRM_UNLOCK(dev); - sbuf_printf(m, "w/ctx: %d, w/o ctx: %d\n", - (crstanddelay >> 8) & 0x3f, (crstanddelay & 0x3f)); + sbuf_printf(m, "w/ctx: %d, w/o ctx: %d\n", (crstanddelay >> 8) & 0x3f, (crstanddelay & 0x3f)); return 0; } @@ -928,8 +922,7 @@ static int i915_inttoext_table(struct dr static int ironlake_drpc_info(struct drm_device *dev, struct sbuf *m) { drm_i915_private_t *dev_priv = dev->dev_private; - u32 rgvmodectl; - u32 rstdbyctl; + u32 rgvmodectl, rstdbyctl; u16 crstandvid; if (sx_xlock_sig(&dev->dev_struct_lock)) @@ -1309,10 +1302,9 @@ static int i915_context_status(struct dr static int i915_gen6_forcewake_count_info(struct drm_device *dev, struct sbuf *m, void *data) { - struct drm_i915_private *dev_priv; + struct drm_i915_private *dev_priv = dev->dev_private; unsigned forcewake_count; - dev_priv = dev->dev_private; mtx_lock(&dev_priv->gt_lock); forcewake_count = dev_priv->forcewake_count; mtx_unlock(&dev_priv->gt_lock); @@ -1349,12 +1341,11 @@ static const char *swizzle_string(unsign static int i915_swizzle_info(struct drm_device *dev, struct sbuf *m, void *data) { - struct drm_i915_private *dev_priv; + struct drm_i915_private *dev_priv = dev->dev_private; int ret; - dev_priv = dev->dev_private; ret = sx_xlock_sig(&dev->dev_struct_lock); - if (ret != 0) + if (ret) return -EINTR; sbuf_printf(m, "bit6 swizzle for X-tiling = %s\n", @@ -1390,14 +1381,13 @@ static int i915_swizzle_info(struct drm_ static int i915_ppgtt_info(struct drm_device *dev, struct sbuf *m, void *data) { - struct drm_i915_private *dev_priv; + struct drm_i915_private *dev_priv = dev->dev_private; struct intel_ring_buffer *ring; int i, ret; - dev_priv = dev->dev_private; ret = sx_xlock_sig(&dev->dev_struct_lock); - if (ret != 0) + if (ret) return -EINTR; if (INTEL_INFO(dev)->gen == 6) sbuf_printf(m, "GFX_MODE: 0x%08x\n", I915_READ(GFX_MODE)); @@ -1426,18 +1416,17 @@ static int i915_ppgtt_info(struct drm_de static int i915_dpio_info(struct drm_device *dev, struct sbuf *m, void *data) { - struct drm_i915_private *dev_priv; + struct drm_i915_private *dev_priv = dev->dev_private; int ret; + if (!IS_VALLEYVIEW(dev)) { sbuf_printf(m, "unsupported\n"); return 0; } - dev_priv = dev->dev_private; - ret = sx_xlock_sig(&dev->mode_config.mutex); - if (ret != 0) + if (ret) return -EINTR; sbuf_printf(m, "DPIO_CTL: 0x%08x\n", I915_READ(DPIO_CTL)); @@ -1473,12 +1462,10 @@ static int i915_dpio_info(struct drm_dev static int i915_debug_set_wedged(SYSCTL_HANDLER_ARGS) { - struct drm_device *dev; - drm_i915_private_t *dev_priv; + struct drm_device *dev = arg1; + drm_i915_private_t *dev_priv = dev->dev_private; int error, wedged; - dev = arg1; - dev_priv = dev->dev_private; if (dev_priv == NULL) return (EBUSY); wedged = dev_priv->mm.wedged; @@ -1493,12 +1480,10 @@ i915_debug_set_wedged(SYSCTL_HANDLER_ARG static int i915_max_freq(SYSCTL_HANDLER_ARGS) { - struct drm_device *dev; - drm_i915_private_t *dev_priv; + struct drm_device *dev = arg1; + drm_i915_private_t *dev_priv = dev->dev_private; int error, max_freq; - dev = arg1; - dev_priv = dev->dev_private; if (dev_priv == NULL) return (EBUSY); max_freq = dev_priv->max_delay * 50; @@ -1517,12 +1502,10 @@ i915_max_freq(SYSCTL_HANDLER_ARGS) static int i915_cache_sharing(SYSCTL_HANDLER_ARGS) { - struct drm_device *dev; - drm_i915_private_t *dev_priv; + struct drm_device *dev = arg1; + drm_i915_private_t *dev_priv = dev->dev_private; int error, snpcr, cache_sharing; - dev = arg1; - dev_priv = dev->dev_private; if (dev_priv == NULL) return (EBUSY); DRM_LOCK(dev); @@ -1549,12 +1532,10 @@ i915_cache_sharing(SYSCTL_HANDLER_ARGS) static int i915_stop_rings(SYSCTL_HANDLER_ARGS) { - struct drm_device *dev; - drm_i915_private_t *dev_priv; + struct drm_device *dev = arg1; + drm_i915_private_t *dev_priv = dev->dev_private; int error, val; - dev = arg1; - dev_priv = dev->dev_private; if (dev_priv == NULL) return (EBUSY); DRM_LOCK(dev); @@ -1582,12 +1563,9 @@ static struct i915_info_sysctl_list { {"i915_gem_objects", i915_gem_object_info, NULL, 0}, {"i915_gem_gtt", i915_gem_gtt_info, NULL, 0}, {"i915_gem_pinned", i915_gem_gtt_info, NULL, 0, (void *)PINNED_LIST}, - {"i915_gem_active", i915_gem_object_list_info, NULL, 0, - (void *)ACTIVE_LIST}, - {"i915_gem_flushing", i915_gem_object_list_info, NULL, 0, - (void *)FLUSHING_LIST}, - {"i915_gem_inactive", i915_gem_object_list_info, NULL, 0, - (void *)INACTIVE_LIST}, + {"i915_gem_active", i915_gem_object_list_info, NULL, 0, (void *)ACTIVE_LIST}, + {"i915_gem_flushing", i915_gem_object_list_info, NULL, 0, (void *)FLUSHING_LIST}, + {"i915_gem_inactive", i915_gem_object_list_info, NULL, 0, (void *)INACTIVE_LIST}, {"i915_gem_pageflip", i915_gem_pageflip_info, NULL, 0}, {"i915_gem_request", i915_gem_request_info, NULL, 0}, {"i915_gem_seqno", i915_gem_seqno_info, NULL, 0}, @@ -1596,7 +1574,7 @@ static struct i915_info_sysctl_list { {"i915_gem_hws", i915_hws_info, NULL, 0, (void *)RCS}, {"i915_gem_hws_blt", i915_hws_info, NULL, 0, (void *)BCS}, {"i915_gem_hws_bsd", i915_hws_info, NULL, 0, (void *)VCS}, - {"i915_error_state", i915_error_state, i915_error_state_w, 0}, + {"i915_error_state", i915_error_state, i915_error_state_write, 0}, {"i915_rstdby_delays", i915_rstdby_delays, NULL, 0}, {"i915_cur_delayinfo", i915_cur_delayinfo, NULL, 0}, {"i915_delayfreq_table", i915_delayfreq_table, NULL, 0}, From owner-svn-src-all@freebsd.org Sat Nov 28 17:26:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 446B6A3BA60; Sat, 28 Nov 2015 17:26:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FEFE1620; Sat, 28 Nov 2015 17:26:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tASHQlc7037586; Sat, 28 Nov 2015 17:26:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tASHQkZZ037582; Sat, 28 Nov 2015 17:26:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511281726.tASHQkZZ037582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 28 Nov 2015 17:26:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291429 - in stable/10: share/examples/ses/srcs 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2015 17:26:48 -0000 Author: mav Date: Sat Nov 28 17:26:46 2015 New Revision: 291429 URL: https://svnweb.freebsd.org/changeset/base/291429 Log: MFC r291126: Add API to obtain primary enclosure name and ID for /dev/sesX devices. sesX device number may change between reboots, so to properly identify the instance we need more data. Name and ID reported here may mach ones reported by SCSI device, but that is not really required by specs. Sponsored by: iXsystems, Inc. Modified: stable/10/share/examples/ses/srcs/getencstat.c stable/10/sys/cam/scsi/scsi_enc.c stable/10/sys/cam/scsi/scsi_enc.h stable/10/sys/cam/scsi/scsi_enc_ses.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/examples/ses/srcs/getencstat.c ============================================================================== --- stable/10/share/examples/ses/srcs/getencstat.c Sat Nov 28 15:22:46 2015 (r291428) +++ stable/10/share/examples/ses/srcs/getencstat.c Sat Nov 28 17:26:46 2015 (r291429) @@ -48,12 +48,14 @@ int main(int a, char **v) { + encioc_string_t stri; encioc_element_t *objp; encioc_elm_status_t ob; encioc_elm_desc_t objd; encioc_elm_devnames_t objdn; int fd, nobj, f, i, verbose, quiet, errors; u_char estat; + char str[32]; if (a < 2) { fprintf(stderr, "usage: %s [ -v ] device [ device ... ]\n", *v); @@ -78,6 +80,16 @@ main(int a, char **v) perror(*v); continue; } + if (verbose > 1) { + stri.bufsiz = sizeof(str); + stri.buf = &str[0]; + if (ioctl(fd, ENCIOC_GETENCNAME, (caddr_t) &stri) == 0) + printf("%s: Enclosure Name: %s\n", *v, stri.buf); + stri.bufsiz = sizeof(str); + stri.buf = &str[0]; + if (ioctl(fd, ENCIOC_GETENCID, (caddr_t) &stri) == 0) + printf("%s: Enclosure ID: %s\n", *v, stri.buf); + } if (ioctl(fd, ENCIOC_GETNELM, (caddr_t) &nobj) < 0) { perror("ENCIOC_GETNELM"); (void) close(fd); Modified: stable/10/sys/cam/scsi/scsi_enc.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_enc.c Sat Nov 28 15:22:46 2015 (r291428) +++ stable/10/sys/cam/scsi/scsi_enc.c Sat Nov 28 17:26:46 2015 (r291429) @@ -407,6 +407,8 @@ enc_ioctl(struct cdev *dev, u_long cmd, case ENCIOC_GETELMSTAT: case ENCIOC_GETELMDESC: case ENCIOC_GETELMDEVNAMES: + case ENCIOC_GETENCNAME: + case ENCIOC_GETENCID: break; default: if ((flag & FWRITE) == 0) { @@ -461,6 +463,8 @@ enc_ioctl(struct cdev *dev, u_long cmd, case ENCIOC_GETSTRING: case ENCIOC_SETSTRING: + case ENCIOC_GETENCNAME: + case ENCIOC_GETENCID: if (enc->enc_vec.handle_string == NULL) { error = EINVAL; break; Modified: stable/10/sys/cam/scsi/scsi_enc.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_enc.h Sat Nov 28 15:22:46 2015 (r291428) +++ stable/10/sys/cam/scsi/scsi_enc.h Sat Nov 28 17:26:46 2015 (r291429) @@ -46,6 +46,8 @@ #define ENCIOC_GETELMDEVNAMES _IO(ENCIOC, 10) #define ENCIOC_GETSTRING _IO(ENCIOC, 11) #define ENCIOC_SETSTRING _IO(ENCIOC, 12) +#define ENCIOC_GETENCNAME _IO(ENCIOC, 13) +#define ENCIOC_GETENCID _IO(ENCIOC, 14) /* * Platform Independent Definitions for enclosure devices. Modified: stable/10/sys/cam/scsi/scsi_enc_ses.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_enc_ses.c Sat Nov 28 15:22:46 2015 (r291428) +++ stable/10/sys/cam/scsi/scsi_enc_ses.c Sat Nov 28 17:26:46 2015 (r291429) @@ -345,8 +345,9 @@ typedef struct ses_cache { const struct ses_cfg_page *cfg_page; /* References into the config page. */ + int ses_nsubencs; const struct ses_enc_desc * const *subencs; - uint8_t ses_ntypes; + int ses_ntypes; const ses_type_t *ses_types; /* Source for all the status pointers */ @@ -1383,11 +1384,12 @@ ses_process_config(enc_softc_t *enc, str * The cast here is not required in C++ but C99 is not so * sophisticated (see C99 6.5.16.1(1)). */ + ses_cache->ses_nsubencs = ses_cfg_page_get_num_subenc(cfg_page); ses_cache->subencs = subencs; buf_subenc = cfg_page->subencs; cur_subenc = subencs; - last_subenc = &subencs[ses_cfg_page_get_num_subenc(cfg_page) - 1]; + last_subenc = &subencs[ses_cache->ses_nsubencs - 1]; ntype = 0; while (cur_subenc <= last_subenc) { @@ -1421,6 +1423,7 @@ ses_process_config(enc_softc_t *enc, str * Type data is const after construction (i.e. when accessed via * our cache object. */ + ses_cache->ses_ntypes = ntype; ses_cache->ses_types = ses_types; cur_buf_type = (const struct ses_elm_type_desc *) @@ -1457,7 +1460,6 @@ ses_process_config(enc_softc_t *enc, str err = ENOMEM; goto out; } - ses_cache->ses_ntypes = (uint8_t)ntype; enc_cache->nelms = nelm; ses_iter_init(enc, enc_cache, &iter); @@ -2712,9 +2714,22 @@ ses_get_elm_devnames(enc_softc_t *enc, e static int ses_handle_string(enc_softc_t *enc, encioc_string_t *sstr, int ioc) { + ses_softc_t *ses; + enc_cache_t *enc_cache; + ses_cache_t *ses_cache; + const struct ses_enc_desc *enc_desc; int amt, payload, ret; char cdb[6]; + char str[32]; + char vendor[9]; + char product[17]; + char rev[5]; uint8_t *buf; + size_t size, rsize; + + ses = enc->enc_private; + enc_cache = &enc->enc_daemon_cache; + ses_cache = enc_cache->private; /* Implement SES2r20 6.1.6 */ if (sstr->bufsiz > 0xffff) @@ -2739,6 +2754,40 @@ ses_handle_string(enc_softc_t *enc, enci amt = payload; ses_page_cdb(cdb, payload, SesStringIn, CAM_DIR_IN); buf = sstr->buf; + } else if (ioc == ENCIOC_GETENCNAME) { + if (ses_cache->ses_nsubencs < 1) + return (ENODEV); + enc_desc = ses_cache->subencs[0]; + cam_strvis(vendor, enc_desc->vendor_id, + sizeof(enc_desc->vendor_id), sizeof(vendor)); + cam_strvis(product, enc_desc->product_id, + sizeof(enc_desc->product_id), sizeof(product)); + cam_strvis(rev, enc_desc->product_rev, + sizeof(enc_desc->product_rev), sizeof(rev)); + rsize = snprintf(str, sizeof(str), "%s %s %s", + vendor, product, rev) + 1; + if (rsize > sizeof(str)) + rsize = sizeof(str); + copyout(&rsize, &sstr->bufsiz, sizeof(rsize)); + size = rsize; + if (size > sstr->bufsiz) + size = sstr->bufsiz; + copyout(str, sstr->buf, size); + return (size == rsize ? 0 : ENOMEM); + } else if (ioc == ENCIOC_GETENCID) { + if (ses_cache->ses_nsubencs < 1) + return (ENODEV); + enc_desc = ses_cache->subencs[0]; + rsize = snprintf(str, sizeof(str), "%16jx", + scsi_8btou64(enc_desc->logical_id)) + 1; + if (rsize > sizeof(str)) + rsize = sizeof(str); + copyout(&rsize, &sstr->bufsiz, sizeof(rsize)); + size = rsize; + if (size > sstr->bufsiz) + size = sstr->bufsiz; + copyout(str, sstr->buf, size); + return (size == rsize ? 0 : ENOMEM); } else return EINVAL; From owner-svn-src-all@freebsd.org Sat Nov 28 17:37:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C1BEA3BD4B; Sat, 28 Nov 2015 17:37:42 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34AD81DA6; Sat, 28 Nov 2015 17:37:42 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tASHbfJ0040965; Sat, 28 Nov 2015 17:37:41 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tASHbftg040964; Sat, 28 Nov 2015 17:37:41 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201511281737.tASHbftg040964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= Date: Sat, 28 Nov 2015 17:37:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291430 - head/sys/dev/drm2/i915 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2015 17:37:42 -0000 Author: dumbbell Date: Sat Nov 28 17:37:41 2015 New Revision: 291430 URL: https://svnweb.freebsd.org/changeset/base/291430 Log: drm/i915: Further reduce the diff in i915_dma.c MFC after: 2 months Modified: head/sys/dev/drm2/i915/i915_dma.c Modified: head/sys/dev/drm2/i915/i915_dma.c ============================================================================== --- head/sys/dev/drm2/i915/i915_dma.c Sat Nov 28 17:26:46 2015 (r291429) +++ head/sys/dev/drm2/i915/i915_dma.c Sat Nov 28 17:37:41 2015 (r291430) @@ -542,8 +542,7 @@ static int i915_dispatch_batchbuffer(str return ret; if (INTEL_INFO(dev)->gen >= 4) { - OUT_RING(MI_BATCH_BUFFER_START | (2 << 6) | - MI_BATCH_NON_SECURE_I965); + OUT_RING(MI_BATCH_BUFFER_START | (2 << 6) | MI_BATCH_NON_SECURE_I965); OUT_RING(batch->start); } else { OUT_RING(MI_BATCH_BUFFER_START | (2 << 6)); @@ -724,7 +723,8 @@ int i915_cmdbuffer(struct drm_device *de cliprects = malloc(cmdbuf->num_cliprects * sizeof(struct drm_clip_rect), DRM_MEM_DMA, M_WAITOK | M_ZERO); ret = -copyin(cmdbuf->cliprects, cliprects, - cmdbuf->num_cliprects * sizeof(struct drm_clip_rect)); + cmdbuf->num_cliprects * + sizeof(struct drm_clip_rect)); if (ret != 0) goto fail_clip_free; } @@ -1325,7 +1325,7 @@ void i915_master_destroy(struct drm_devi */ int i915_driver_load(struct drm_device *dev, unsigned long flags) { - struct drm_i915_private *dev_priv = dev->dev_private; + struct drm_i915_private *dev_priv; const struct intel_device_info *info; unsigned long base, size; int ret = 0, mmio_bar; From owner-svn-src-all@freebsd.org Sat Nov 28 17:38:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD3DAA3BD99; Sat, 28 Nov 2015 17:38:28 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 894B71F11; Sat, 28 Nov 2015 17:38:28 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tASHcRxG041034; Sat, 28 Nov 2015 17:38:27 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tASHcRFG041033; Sat, 28 Nov 2015 17:38:27 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201511281738.tASHcRFG041033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= Date: Sat, 28 Nov 2015 17:38:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291431 - head/sys/dev/drm2/i915 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2015 17:38:28 -0000 Author: dumbbell Date: Sat Nov 28 17:38:27 2015 New Revision: 291431 URL: https://svnweb.freebsd.org/changeset/base/291431 Log: drm/i915: Reduce diff with Linux 3.8 There is no functional change. The goal is to ease the future update to Linux 3.8's i915 driver. MFC after: 2 months Modified: head/sys/dev/drm2/i915/i915_drm.h Modified: head/sys/dev/drm2/i915/i915_drm.h ============================================================================== --- head/sys/dev/drm2/i915/i915_drm.h Sat Nov 28 17:37:41 2015 (r291430) +++ head/sys/dev/drm2/i915/i915_drm.h Sat Nov 28 17:38:27 2015 (r291431) @@ -133,10 +133,10 @@ typedef struct _drm_i915_sarea { * over the lifetime of the client, though it doesn't in our current * implementation. */ - unsigned int front_bo_handle; - unsigned int back_bo_handle; - unsigned int third_bo_handle; - unsigned int depth_bo_handle; + __u32 front_bo_handle; + __u32 back_bo_handle; + __u32 third_bo_handle; + __u32 depth_bo_handle; } drm_i915_sarea_t; /* due to userspace building against these headers we need some compat here */ @@ -421,7 +421,7 @@ typedef struct drm_i915_mmio { } drm_i915_mmio_t; typedef struct drm_i915_hws_addr { - uint64_t addr; + __u64 addr; } drm_i915_hws_addr_t; /* @@ -461,12 +461,12 @@ struct drm_i915_gem_init { * Beginning offset in the GTT to be managed by the DRM memory * manager. */ - uint64_t gtt_start; + __u64 gtt_start; /** * Ending offset in the GTT to be managed by the DRM memory * manager. */ - uint64_t gtt_end; + __u64 gtt_end; }; struct drm_i915_gem_create { @@ -475,82 +475,82 @@ struct drm_i915_gem_create { * * The (page-aligned) allocated size for the object will be returned. */ - uint64_t size; + __u64 size; /** * Returned handle for the object. * * Object handles are nonzero. */ - uint32_t handle; - uint32_t pad; + __u32 handle; + __u32 pad; }; struct drm_i915_gem_pread { /** Handle for the object being read. */ - uint32_t handle; - uint32_t pad; + __u32 handle; + __u32 pad; /** Offset into the object to read from */ - uint64_t offset; + __u64 offset; /** Length of data to read */ - uint64_t size; + __u64 size; /** Pointer to write the data into. */ - uint64_t data_ptr; /* void *, but pointers are not 32/64 compatible */ + __u64 data_ptr; /* void *, but pointers are not 32/64 compatible */ }; struct drm_i915_gem_pwrite { /** Handle for the object being written to. */ - uint32_t handle; - uint32_t pad; + __u32 handle; + __u32 pad; /** Offset into the object to write to */ - uint64_t offset; + __u64 offset; /** Length of data to write */ - uint64_t size; + __u64 size; /** Pointer to read the data from. */ - uint64_t data_ptr; /* void *, but pointers are not 32/64 compatible */ + __u64 data_ptr; /* void *, but pointers are not 32/64 compatible */ }; struct drm_i915_gem_mmap { /** Handle for the object being mapped. */ - uint32_t handle; - uint32_t pad; + __u32 handle; + __u32 pad; /** Offset in the object to map. */ - uint64_t offset; + __u64 offset; /** * Length of data to map. * * The value will be page-aligned. */ - uint64_t size; + __u64 size; /** Returned pointer the data was mapped at */ - uint64_t addr_ptr; /* void *, but pointers are not 32/64 compatible */ + __u64 addr_ptr; /* void *, but pointers are not 32/64 compatible */ }; struct drm_i915_gem_mmap_gtt { /** Handle for the object being mapped. */ - uint32_t handle; - uint32_t pad; + __u32 handle; + __u32 pad; /** * Fake offset to use for subsequent mmap call * * This is a fixed-size type for 32/64 compatibility. */ - uint64_t offset; + __u64 offset; }; struct drm_i915_gem_set_domain { /** Handle for the object */ - uint32_t handle; + __u32 handle; /** New read domains */ - uint32_t read_domains; + __u32 read_domains; /** New write domain */ - uint32_t write_domain; + __u32 write_domain; }; struct drm_i915_gem_sw_finish { /** Handle for the object */ - uint32_t handle; + __u32 handle; }; struct drm_i915_gem_relocation_entry { @@ -562,16 +562,16 @@ struct drm_i915_gem_relocation_entry { * a relocation list for state buffers and not re-write it per * exec using the buffer. */ - uint32_t target_handle; + __u32 target_handle; /** * Value to be added to the offset of the target buffer to make up * the relocation entry. */ - uint32_t delta; + __u32 delta; /** Offset in the buffer the relocation entry will be written into */ - uint64_t offset; + __u64 offset; /** * Offset value of the target buffer that the relocation entry was last @@ -581,12 +581,12 @@ struct drm_i915_gem_relocation_entry { * and writing the relocation. This value is written back out by * the execbuffer ioctl when the relocation is written. */ - uint64_t presumed_offset; + __u64 presumed_offset; /** * Target memory domains read by this operation. */ - uint32_t read_domains; + __u32 read_domains; /** * Target memory domains written by this operation. @@ -595,7 +595,7 @@ struct drm_i915_gem_relocation_entry { * execbuffer operation, so that where there are conflicts, * the application will get -EINVAL back. */ - uint32_t write_domain; + __u32 write_domain; }; /** @{ @@ -626,24 +626,24 @@ struct drm_i915_gem_exec_object { * User's handle for a buffer to be bound into the GTT for this * operation. */ - uint32_t handle; + __u32 handle; /** Number of relocations to be performed on this buffer */ - uint32_t relocation_count; + __u32 relocation_count; /** * Pointer to array of struct drm_i915_gem_relocation_entry containing * the relocations to be performed in this buffer. */ - uint64_t relocs_ptr; + __u64 relocs_ptr; /** Required alignment in graphics aperture */ - uint64_t alignment; + __u64 alignment; /** * Returned value of the updated offset of the object, for future * presumed_offset writes. */ - uint64_t offset; + __u64 offset; }; struct drm_i915_gem_execbuffer { @@ -657,17 +657,17 @@ struct drm_i915_gem_execbuffer { * a buffer is performing refer to buffers that have already appeared * in the validate list. */ - uint64_t buffers_ptr; - uint32_t buffer_count; + __u64 buffers_ptr; + __u32 buffer_count; /** Offset in the batchbuffer to start execution from. */ - uint32_t batch_start_offset; + __u32 batch_start_offset; /** Bytes used in batchbuffer from batch_start_offset */ - uint32_t batch_len; - uint32_t DR1; - uint32_t DR4; - uint32_t num_cliprects; - uint64_t cliprects_ptr; /* struct drm_clip_rect *cliprects */ + __u32 batch_len; + __u32 DR1; + __u32 DR4; + __u32 num_cliprects; + __u64 cliprects_ptr; /* struct drm_clip_rect *cliprects */ }; struct drm_i915_gem_exec_object2 { @@ -675,47 +675,47 @@ struct drm_i915_gem_exec_object2 { * User's handle for a buffer to be bound into the GTT for this * operation. */ - uint32_t handle; + __u32 handle; /** Number of relocations to be performed on this buffer */ - uint32_t relocation_count; + __u32 relocation_count; /** * Pointer to array of struct drm_i915_gem_relocation_entry containing * the relocations to be performed in this buffer. */ - uint64_t relocs_ptr; + __u64 relocs_ptr; /** Required alignment in graphics aperture */ - uint64_t alignment; + __u64 alignment; /** * Returned value of the updated offset of the object, for future * presumed_offset writes. */ - uint64_t offset; + __u64 offset; #define EXEC_OBJECT_NEEDS_FENCE (1<<0) - uint64_t flags; - uint64_t rsvd1; /* now used for context info */ - uint64_t rsvd2; + __u64 flags; + __u64 rsvd1; /* now used for context info */ + __u64 rsvd2; }; struct drm_i915_gem_execbuffer2 { /** * List of gem_exec_object2 structs */ - uint64_t buffers_ptr; - uint32_t buffer_count; + __u64 buffers_ptr; + __u32 buffer_count; /** Offset in the batchbuffer to start execution from. */ - uint32_t batch_start_offset; + __u32 batch_start_offset; /** Bytes used in batchbuffer from batch_start_offset */ - uint32_t batch_len; - uint32_t DR1; - uint32_t DR4; - uint32_t num_cliprects; + __u32 batch_len; + __u32 DR1; + __u32 DR4; + __u32 num_cliprects; /** This is a struct drm_clip_rect *cliprects */ - uint64_t cliprects_ptr; + __u64 cliprects_ptr; #define I915_EXEC_RING_MASK (7<<0) #define I915_EXEC_DEFAULT (0<<0) #define I915_EXEC_RENDER (1<<0) @@ -732,9 +732,9 @@ struct drm_i915_gem_execbuffer2 { #define I915_EXEC_CONSTANTS_REL_GENERAL (0<<6) /* default */ #define I915_EXEC_CONSTANTS_ABSOLUTE (1<<6) #define I915_EXEC_CONSTANTS_REL_SURFACE (2<<6) /* gen4/5 only */ - uint64_t flags; - uint64_t rsvd1; - uint64_t rsvd2; + __u64 flags; + __u64 rsvd1; + __u64 rsvd2; }; /** Resets the SO write offset registers for transform feedback on gen7. */ @@ -748,28 +748,28 @@ struct drm_i915_gem_execbuffer2 { struct drm_i915_gem_pin { /** Handle of the buffer to be pinned. */ - uint32_t handle; - uint32_t pad; + __u32 handle; + __u32 pad; /** alignment required within the aperture */ - uint64_t alignment; + __u64 alignment; /** Returned GTT offset of the buffer. */ - uint64_t offset; + __u64 offset; }; struct drm_i915_gem_unpin { /** Handle of the buffer to be unpinned. */ - uint32_t handle; - uint32_t pad; + __u32 handle; + __u32 pad; }; struct drm_i915_gem_busy { /** Handle of the buffer to check for busy */ - uint32_t handle; + __u32 handle; /** Return busy status (1 if busy, 0 if idle) */ - uint32_t busy; + __u32 busy; }; #define I915_TILING_NONE 0 @@ -789,7 +789,7 @@ struct drm_i915_gem_busy { struct drm_i915_gem_set_tiling { /** Handle of the buffer to have its tiling state updated */ - uint32_t handle; + __u32 handle; /** * Tiling mode for the object (I915_TILING_NONE, I915_TILING_X, @@ -803,55 +803,55 @@ struct drm_i915_gem_set_tiling { * * Buffer contents become undefined when changing tiling_mode. */ - uint32_t tiling_mode; + __u32 tiling_mode; /** * Stride in bytes for the object when in I915_TILING_X or * I915_TILING_Y. */ - uint32_t stride; + __u32 stride; /** * Returned address bit 6 swizzling required for CPU access through * mmap mapping. */ - uint32_t swizzle_mode; + __u32 swizzle_mode; }; struct drm_i915_gem_get_tiling { /** Handle of the buffer to get tiling state for. */ - uint32_t handle; + __u32 handle; /** * Current tiling mode for the object (I915_TILING_NONE, I915_TILING_X, * I915_TILING_Y). */ - uint32_t tiling_mode; + __u32 tiling_mode; /** * Returned address bit 6 swizzling required for CPU access through * mmap mapping. */ - uint32_t swizzle_mode; + __u32 swizzle_mode; }; struct drm_i915_gem_get_aperture { /** Total size of the aperture used by i915_gem_execbuffer, in bytes */ - uint64_t aper_size; + __u64 aper_size; /** * Available space in the aperture used by i915_gem_execbuffer, in * bytes */ - uint64_t aper_available_size; + __u64 aper_available_size; }; struct drm_i915_get_pipe_from_crtc_id { - /** ID of CRTC being requested **/ - uint32_t crtc_id; + /** ID of CRTC being requested **/ + __u32 crtc_id; - /** pipe of requested CRTC **/ - uint32_t pipe; + /** pipe of requested CRTC **/ + __u32 pipe; }; #define I915_MADV_WILLNEED 0 @@ -860,15 +860,15 @@ struct drm_i915_get_pipe_from_crtc_id { struct drm_i915_gem_madvise { /** Handle of the buffer to change the backing store advice */ - uint32_t handle; + __u32 handle; /* Advice: either the buffer will be needed again in the near future, * or wont be and could be discarded under memory pressure. */ - uint32_t madv; + __u32 madv; /** Whether the backing store still exists. */ - uint32_t retained; + __u32 retained; }; #define I915_OVERLAY_TYPE_MASK 0xff @@ -896,44 +896,44 @@ struct drm_i915_gem_madvise { struct drm_intel_overlay_put_image { /* various flags and src format description */ - uint32_t flags; + __u32 flags; /* source picture description */ - uint32_t bo_handle; + __u32 bo_handle; /* stride values and offsets are in bytes, buffer relative */ - uint16_t stride_Y; /* stride for packed formats */ - uint16_t stride_UV; - uint32_t offset_Y; /* offset for packet formats */ - uint32_t offset_U; - uint32_t offset_V; + __u16 stride_Y; /* stride for packed formats */ + __u16 stride_UV; + __u32 offset_Y; /* offset for packet formats */ + __u32 offset_U; + __u32 offset_V; /* in pixels */ - uint16_t src_width; - uint16_t src_height; + __u16 src_width; + __u16 src_height; /* to compensate the scaling factors for partially covered surfaces */ - uint16_t src_scan_width; - uint16_t src_scan_height; + __u16 src_scan_width; + __u16 src_scan_height; /* output crtc description */ - uint32_t crtc_id; - uint16_t dst_x; - uint16_t dst_y; - uint16_t dst_width; - uint16_t dst_height; + __u32 crtc_id; + __u16 dst_x; + __u16 dst_y; + __u16 dst_width; + __u16 dst_height; }; /* flags */ #define I915_OVERLAY_UPDATE_ATTRS (1<<0) #define I915_OVERLAY_UPDATE_GAMMA (1<<1) struct drm_intel_overlay_attrs { - uint32_t flags; - uint32_t color_key; - int32_t brightness; - uint32_t contrast; - uint32_t saturation; - uint32_t gamma0; - uint32_t gamma1; - uint32_t gamma2; - uint32_t gamma3; - uint32_t gamma4; - uint32_t gamma5; + __u32 flags; + __u32 color_key; + __s32 brightness; + __u32 contrast; + __u32 saturation; + __u32 gamma0; + __u32 gamma1; + __u32 gamma2; + __u32 gamma3; + __u32 gamma4; + __u32 gamma5; }; /* @@ -961,22 +961,22 @@ struct drm_intel_overlay_attrs { #define I915_SET_COLORKEY_DESTINATION (1<<1) #define I915_SET_COLORKEY_SOURCE (1<<2) struct drm_intel_sprite_colorkey { - uint32_t plane_id; - uint32_t min_value; - uint32_t channel_mask; - uint32_t max_value; - uint32_t flags; + __u32 plane_id; + __u32 min_value; + __u32 channel_mask; + __u32 max_value; + __u32 flags; }; struct drm_i915_gem_context_create { /* output: id of new context*/ - uint32_t ctx_id; - uint32_t pad; + __u32 ctx_id; + __u32 pad; }; struct drm_i915_gem_context_destroy { - uint32_t ctx_id; - uint32_t pad; + __u32 ctx_id; + __u32 pad; }; #endif /* _I915_DRM_H_ */