From owner-svn-src-all@freebsd.org Sun Oct 18 00:59: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 C7AB1A17D82; Sun, 18 Oct 2015 00:59:29 +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 773E8C64; Sun, 18 Oct 2015 00:59: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 t9I0xSaM053945; Sun, 18 Oct 2015 00:59:28 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I0xSrJ053943; Sun, 18 Oct 2015 00:59:28 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510180059.t9I0xSrJ053943@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 18 Oct 2015 00:59:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289476 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 00:59:30 -0000 Author: adrian Date: Sun Oct 18 00:59:28 2015 New Revision: 289476 URL: https://svnweb.freebsd.org/changeset/base/289476 Log: if_arge: fix up TX workaround; add TX/RX requirements for busdma; add stats The early ethernet MACs (I think AR71xx and AR913x) require that both TX and RX require 4-byte alignment for all packets. The later MACs have started relaxing the requirements. For now, the 1-byte TX and 1-byte RX alignment requirements are only for the QCA955x SoCs. I'll add in the relaxed requirements as I review the datasheets and do testing. * Add a hardware flags field and 1-byte / 4-byte TX/RX alignment. * .. defaulting to 4-byte TX and 4-byte RX alignment. * Only enforce the TX alignment fixup if the hardware requires a 4-byte TX alignment. This avoids a call to m_defrag(). * Add counters for various situations for further debugging. * Set the 1-byte and 4-byte busdma alignment requirement when the tag is created. This improves the straight bridging performance from 130mbit/sec to 180mbit/sec, purely by removing the need for TX path bounce buffers. The main performance issue is the RX alignment requirement and any RX bounce buffering that's occuring. (In a local test, removing the RX fixup path and just aligning buffers raises the performance to above 400mbit/sec. In theory it's a no-op for SoCs before the QCA955x. Tested: * QCA9558 SoC in AP135 board, using software bridging between arge0/arge1. Modified: head/sys/mips/atheros/if_arge.c head/sys/mips/atheros/if_argevar.h Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Sat Oct 17 22:41:30 2015 (r289475) +++ head/sys/mips/atheros/if_arge.c Sun Oct 18 00:59:28 2015 (r289476) @@ -298,6 +298,29 @@ arge_attach_sysctl(device_t dev) "tx_pkts_unaligned", CTLFLAG_RW, &sc->stats.tx_pkts_unaligned, 0, "number of TX unaligned packets"); + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "tx_pkts_unaligned_start", CTLFLAG_RW, &sc->stats.tx_pkts_unaligned_start, + 0, "number of TX unaligned packets (start)"); + + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "tx_pkts_unaligned_len", CTLFLAG_RW, &sc->stats.tx_pkts_unaligned_len, + 0, "number of TX unaligned packets (len)"); + + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "tx_pkts_nosegs", CTLFLAG_RW, &sc->stats.tx_pkts_nosegs, + 0, "number of TX packets fail with no ring slots avail"); + + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "intr_stray_filter", CTLFLAG_RW, &sc->stats.intr_stray, + 0, "number of stray interrupts (filter)"); + + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "intr_stray_intr", CTLFLAG_RW, &sc->stats.intr_stray2, + 0, "number of stray interrupts (intr)"); + + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "intr_ok", CTLFLAG_RW, &sc->stats.intr_ok, + 0, "number of OK interrupts"); #ifdef ARGE_DEBUG SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "tx_prod", CTLFLAG_RW, &sc->arge_cdata.arge_tx_prod, 0, ""); @@ -627,6 +650,22 @@ arge_attach(device_t dev) } /* + * Hardware workarounds. + */ + switch (ar71xx_soc) { + case AR71XX_SOC_QCA9556: + case AR71XX_SOC_QCA9558: + /* Arbitrary alignment */ + sc->arge_hw_flags |= ARGE_HW_FLG_TX_DESC_ALIGN_1BYTE; + sc->arge_hw_flags |= ARGE_HW_FLG_RX_DESC_ALIGN_1BYTE; + break; + default: + sc->arge_hw_flags |= ARGE_HW_FLG_TX_DESC_ALIGN_4BYTE; + sc->arge_hw_flags |= ARGE_HW_FLG_RX_DESC_ALIGN_4BYTE; + break; + } + + /* * Some units (eg the TP-Link WR-1043ND) do not have a convenient * EEPROM location to read the ethernet MAC address from. * OpenWRT simply snaffles it from a fixed location. @@ -825,6 +864,9 @@ arge_attach(device_t dev) ARGE_WRITE(sc, AR71XX_MAC_FIFO_CFG0, FIFO_CFG0_ALL << FIFO_CFG0_ENABLE_SHIFT); + /* + * SoC specific bits. + */ switch (ar71xx_soc) { case AR71XX_SOC_AR7240: case AR71XX_SOC_AR7241: @@ -1351,24 +1393,35 @@ arge_init_locked(struct arge_softc *sc) * Return whether the mbuf chain is correctly aligned * for the arge TX engine. * - * The TX engine requires each fragment to be aligned to a - * 4 byte boundary and the size of each fragment except - * the last to be a multiple of 4 bytes. + * All the MACs have a length requirement: any non-final + * fragment (ie, descriptor with MORE bit set) needs to have + * a length divisible by 4. * - * XXX TODO: I believe this is only a bug on the AR71xx and - * AR913x MACs. The later MACs (AR724x and later) does not - * need this workaround. + * The AR71xx, AR913x require the start address also be + * DWORD aligned. The later MACs don't. */ static int -arge_mbuf_chain_is_tx_aligned(struct mbuf *m0) +arge_mbuf_chain_is_tx_aligned(struct arge_softc *sc, struct mbuf *m0) { struct mbuf *m; for (m = m0; m != NULL; m = m->m_next) { - if((mtod(m, intptr_t) & 3) != 0) + /* + * Only do this for chips that require it. + */ + if ((sc->arge_hw_flags & ARGE_HW_FLG_TX_DESC_ALIGN_4BYTE) && + (mtod(m, intptr_t) & 3) != 0) { + sc->stats.tx_pkts_unaligned_start++; return 0; - if ((m->m_next != NULL) && ((m->m_len & 0x03) != 0)) + } + + /* + * All chips have this requirement for length. + */ + if ((m->m_next != NULL) && ((m->m_len & 0x03) != 0)) { + sc->stats.tx_pkts_unaligned_len++; return 0; + } } return 1; } @@ -1389,15 +1442,10 @@ arge_encap(struct arge_softc *sc, struct ARGE_LOCK_ASSERT(sc); /* - * Fix mbuf chain, all fragments should be 4 bytes aligned and - * even 4 bytes - * - * XXX TODO: I believe this is only a bug on the AR71xx and - * AR913x MACs. The later MACs (AR724x and later) does not - * need this workaround. + * Fix mbuf chain based on hardware alignment constraints. */ m = *m_head; - if (! arge_mbuf_chain_is_tx_aligned(m)) { + if (! arge_mbuf_chain_is_tx_aligned(sc, m)) { sc->stats.tx_pkts_unaligned++; m = m_defrag(*m_head, M_NOWAIT); if (m == NULL) { @@ -1427,6 +1475,7 @@ arge_encap(struct arge_softc *sc, struct /* Check number of available descriptors. */ if (sc->arge_cdata.arge_tx_cnt + nsegs >= (ARGE_TX_RING_COUNT - 1)) { bus_dmamap_unload(sc->arge_cdata.arge_tx_tag, txd->tx_dmamap); + sc->stats.tx_pkts_nosegs++; return (ENOBUFS); } @@ -1444,7 +1493,9 @@ arge_encap(struct arge_softc *sc, struct desc = &sc->arge_rdata.arge_tx_ring[prod]; desc->packet_ctrl = ARGE_DMASIZE(txsegs[i].ds_len); - if (txsegs[i].ds_addr & 3) + /* XXX Note: only relevant for older MACs; but check length! */ + if ((sc->arge_hw_flags & ARGE_HW_FLG_TX_DESC_ALIGN_4BYTE) && + (txsegs[i].ds_addr & 3)) panic("TX packet address unaligned\n"); desc->packet_addr = txsegs[i].ds_addr; @@ -1715,6 +1766,16 @@ arge_dma_alloc(struct arge_softc *sc) struct arge_txdesc *txd; struct arge_rxdesc *rxd; int error, i; + int arge_tx_align, arge_rx_align; + + /* Assume 4 byte alignment by default */ + arge_tx_align = 4; + arge_rx_align = 4; + + if (sc->arge_hw_flags & ARGE_HW_FLG_TX_DESC_ALIGN_1BYTE) + arge_tx_align = 1; + if (sc->arge_hw_flags & ARGE_HW_FLG_RX_DESC_ALIGN_1BYTE) + arge_rx_align = 1; /* Create parent DMA tag. */ error = bus_dma_tag_create( @@ -1775,7 +1836,7 @@ arge_dma_alloc(struct arge_softc *sc) /* Create tag for Tx buffers. */ error = bus_dma_tag_create( sc->arge_cdata.arge_parent_tag, /* parent */ - sizeof(uint32_t), 0, /* alignment, boundary */ + arge_tx_align, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ @@ -1793,7 +1854,7 @@ arge_dma_alloc(struct arge_softc *sc) /* Create tag for Rx buffers. */ error = bus_dma_tag_create( sc->arge_cdata.arge_parent_tag, /* parent */ - ARGE_RX_ALIGN, 0, /* alignment, boundary */ + arge_rx_align, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ @@ -2108,6 +2169,11 @@ arge_newbuf(struct arge_softc *sc, int i if (m == NULL) return (ENOBUFS); m->m_len = m->m_pkthdr.len = MCLBYTES; + + /* + * Add extra space to "adjust" (copy) the packet back to be aligned + * for purposes of IPv4/IPv6 header contents. + */ m_adj(m, sizeof(uint64_t)); if (bus_dmamap_load_mbuf_sg(sc->arge_cdata.arge_rx_tag, @@ -2126,7 +2192,8 @@ arge_newbuf(struct arge_softc *sc, int i sc->arge_cdata.arge_rx_sparemap = map; rxd->rx_m = m; desc = rxd->desc; - if (segs[0].ds_addr & 3) + if ((sc->arge_hw_flags & ARGE_HW_FLG_RX_DESC_ALIGN_4BYTE) && + segs[0].ds_addr & 3) panic("RX packet address unaligned"); desc->packet_addr = segs[0].ds_addr; desc->packet_ctrl = ARGE_DESC_EMPTY | ARGE_DMASIZE(segs[0].ds_len); @@ -2331,10 +2398,12 @@ arge_intr_filter(void *arg) if (status & DMA_INTR_ALL) { sc->arge_intr_status |= status; ARGE_WRITE(sc, AR71XX_DMA_INTR, 0); + sc->stats.intr_ok++; return (FILTER_SCHEDULE_THREAD); } sc->arge_intr_status = 0; + sc->stats.intr_stray++; return (FILTER_STRAY); } @@ -2355,8 +2424,10 @@ arge_intr(void *arg) /* * Is it our interrupt at all? */ - if (status == 0) + if (status == 0) { + sc->stats.intr_stray2++; return; + } if (status & DMA_INTR_RX_BUS_ERROR) { ARGE_WRITE(sc, AR71XX_DMA_RX_STATUS, DMA_RX_STATUS_BUS_ERROR); Modified: head/sys/mips/atheros/if_argevar.h ============================================================================== --- head/sys/mips/atheros/if_argevar.h Sat Oct 17 22:41:30 2015 (r289475) +++ head/sys/mips/atheros/if_argevar.h Sun Oct 18 00:59:28 2015 (r289476) @@ -37,7 +37,10 @@ #define ARGE_TX_DMA_SIZE ARGE_TX_RING_COUNT * sizeof(struct arge_desc) #define ARGE_MAXFRAGS 8 #define ARGE_RING_ALIGN sizeof(struct arge_desc) -#define ARGE_RX_ALIGN sizeof(uint32_t) +#define ARGE_RX_ALIGN_4BYTE sizeof(uint32_t) +#define ARGE_RX_ALIGN_1BYTE sizeof(char) +#define ARGE_TX_ALIGN_4BYTE sizeof(uint32_t) +#define ARGE_TX_ALIGN_1BYTE sizeof(char) #define ARGE_MAXFRAGS 8 #define ARGE_TX_RING_ADDR(sc, i) \ ((sc)->arge_rdata.arge_tx_ring_paddr + sizeof(struct arge_desc) * (i)) @@ -149,6 +152,22 @@ struct arge_pll_data { uint32_t pll_1000; }; +/* + * Hardware specific behaviours. + */ + +/* + * Older chips support 4 byte only transmit and receive + * addresses. + * + * Later chips support arbitrary TX and later later, + * arbitrary RX addresses. + */ +#define ARGE_HW_FLG_TX_DESC_ALIGN_4BYTE 0x00000001 +#define ARGE_HW_FLG_RX_DESC_ALIGN_4BYTE 0x00000002 +#define ARGE_HW_FLG_TX_DESC_ALIGN_1BYTE 0x00000004 +#define ARGE_HW_FLG_RX_DESC_ALIGN_1BYTE 0x00000008 + struct arge_softc { struct ifnet *arge_ifp; /* interface info */ device_t arge_dev; @@ -180,13 +199,20 @@ struct arge_softc { uint32_t arge_intr_status; int arge_mac_unit; int arge_if_flags; + uint32_t arge_hw_flags; uint32_t arge_debug; uint32_t arge_mdiofreq; struct { uint32_t tx_pkts_unaligned; + uint32_t tx_pkts_unaligned_start; + uint32_t tx_pkts_unaligned_len; + uint32_t tx_pkts_nosegs; uint32_t tx_pkts_aligned; uint32_t rx_overflow; uint32_t tx_underflow; + uint32_t intr_stray; + uint32_t intr_stray2; + uint32_t intr_ok; } stats; }; From owner-svn-src-all@freebsd.org Sun Oct 18 01:03: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 13688A17EE7; Sun, 18 Oct 2015 01:03:45 +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 CB496FD0; Sun, 18 Oct 2015 01:03:44 +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 t9I13hSd056672; Sun, 18 Oct 2015 01:03:43 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I13h0w056671; Sun, 18 Oct 2015 01:03:43 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510180103.t9I13h0w056671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 18 Oct 2015 01:03:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289477 - head/sys/arm/mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 01:03:45 -0000 Author: ian Date: Sun Oct 18 01:03:43 2015 New Revision: 289477 URL: https://svnweb.freebsd.org/changeset/base/289477 Log: Fix a strange macro re-definition compile error. If the VM_MAXUSER_ADDRESS value is defined as a config option the definition is emitted into opt_global.h which is force-included into everything. In addition, the symbol is emitted by the genassym mechanism, but that by its nature reduces the value to a 0xnnnnnnnn number. When compiling a .S file you end up with two different definitions of the macro (they evaluate to the same number, but the text is different, upsetting the compiler). Nothing has changed about this code for a while but the compile error is new, so this must be fallout from the clang 3.7 update or something. Modified: head/sys/arm/mv/std-pj4b.mv Modified: head/sys/arm/mv/std-pj4b.mv ============================================================================== --- head/sys/arm/mv/std-pj4b.mv Sun Oct 18 00:59:28 2015 (r289476) +++ head/sys/arm/mv/std-pj4b.mv Sun Oct 18 01:03:43 2015 (r289477) @@ -5,4 +5,8 @@ cpu CPU_MV_PJ4B machine arm armv6 makeoptions CONF_CFLAGS="-march=armv7a" -options VM_MAXUSER_ADDRESS="(KERNBASE-(1024*1024*1024))" +# This was originally defined as "(KERNBASE-(1024*1024*1024))" but that +# (in opt_global.h) clashed with the value emitted by genassym which +# reduces the original macro text to its numeric value. The only way +# to avoid that is to define it here as the numeric value genassym emits. +options VM_MAXUSER_ADDRESS="0x80000000" From owner-svn-src-all@freebsd.org Sun Oct 18 02:00: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 9ED17A109FC; Sun, 18 Oct 2015 02:00:25 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) by mx1.freebsd.org (Postfix) with ESMTP id 4C5CB664; Sun, 18 Oct 2015 02:00:24 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id ndGoZFeumT2vondGpZcPpt; Sat, 17 Oct 2015 20:00:24 -0600 X-Authority-Analysis: v=2.1 cv=NrEbCZpJ c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=BWvPGDcYAAAA:8 a=VxmjJ2MpAAAA:8 a=kj9zAlcOel0A:10 a=5lJygRwiOn0A:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=7Qk2ozbKAAAA:8 a=PYnjg3YJAAAA:8 a=qyDxTJV7AAAA:8 a=85N1-lAfAAAA:8 a=zNd2u4x_AAAA:8 a=j4nzMFrpAAAA:8 a=LXAkBHwNKlrvpHAmy1AA:9 a=p1sdcP6kqR4I5I3S:21 a=MWrKzmkL3O-0r47v:21 a=jxAiteTpt7Uo66uM:21 a=CjuIK1q_8ugA:10 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 4EAD99FDD; Sat, 17 Oct 2015 19:00:22 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id t9I20KLI062531; Sat, 17 Oct 2015 19:00:20 -0700 (PDT) (envelope-from Cy.Schubert@komquats.com) Message-Id: <201510180200.t9I20KLI062531@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: Warner Losh cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, David Malone , Ollivier Robert , Xin Li Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp In-Reply-To: Message from Warner Losh of "Sat, 17 Oct 2015 13:19:44 -0600." <8154492E-C29E-41B1-A13B-34E33586DEC6@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 17 Oct 2015 19:00:20 -0700 X-CMAE-Envelope: MS4wfJj8dMMkX+NzFAMaWo5f3YmOCMnUBcgYD35YiqnMnOPRGZGlKpimKgpdteyz5kIQHpypT7OLalUdy46fA01JChtCne0CjNbkFiowdx5cAUifzOUQfT0KqTOyFmE1iXlL7I7/f+9PXnry67sutXv5mrko/Muk7zGxyKfqnD8AJUV8iJnBr4k7PeUYR4hB5ezNGsoIVqxgKEA6FZNRqEYtazKdlDq8+VaVD9UNlat8adS2KRmFTEgjojA7gw1YhBbvDvc4YzQFNwHam4CsrzexO+ZX0pHjzUQqii0lcLkxE+8B7qx/koKTYDXtumu6SUcxg7tpBx25ftdetUNWfPNP0BhZDMkhnBUpGFnSKGmVHL//V1pDO0zz6ratcEA1x6t4FieASMbxM2GgvugmIRESOXxsixky9ZHk9kCjdMYA7WYu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 02:00:25 -0000 Agreed, this would be best. There was a suggestion a GSoC person could do it (though I'm willing to roll up my sleeves if necessary). -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. In message <8154492E-C29E-41B1-A13B-34E33586DEC6@bsdimp.com>, Warner Losh write s: > > > --Apple-Mail=_60572A67-97E7-4200-AEF6-88DC6354712B > Content-Transfer-Encoding: quoted-printable > Content-Type: text/plain; > charset=utf-8 > > Until the next leap second=E2=80=A6. It would be better to just > always try to grab the latest one=E2=80=A6 Can we put something > in periodic to do that so users that have releases > that are older than 6 months aren=E2=80=99t screwed? > > Warner > > > On Oct 16, 2015, at 8:04 AM, Cy Schubert wrote: > >=20 > > Author: cy > > Date: Fri Oct 16 14:04:16 2015 > > New Revision: 289421 > > URL: https://svnweb.freebsd.org/changeset/base/289421 > >=20 > > Log: > > Add default leap-seconds file. This should help ntp networks get the > > leap second date correct > >=20 > > Updates to the file can be obtained from ftp://time.nist.gov/pub/ or > > ftp://tycho.usno.navy.mil/pub/ntp/. > >=20 > > Suggested by: dwmalone > > Reviewed by: roberto, dwmalone, delphij > > Approved by: roberto > > MFC after: 1 week > >=20 > > Added: > > head/etc/ntp/ > > head/etc/ntp/Makefile (contents, props changed) > > head/etc/ntp/leap-seconds (contents, props changed) > > Modified: > > head/etc/Makefile > > head/etc/mtree/BSD.var.dist > > head/etc/ntp.conf > >=20 > > Modified: head/etc/Makefile > > = > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D > > --- head/etc/Makefile Fri Oct 16 12:53:22 2015 (r289420) > > +++ head/etc/Makefile Fri Oct 16 14:04:16 2015 (r289421) > > @@ -240,6 +240,9 @@ distribution: > > ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install > > ${_+_}cd ${.CURDIR}/devd; ${MAKE} install > > ${_+_}cd ${.CURDIR}/gss; ${MAKE} install > > +.if ${MK_NTP} !=3D "no" > > + ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install > > +.endif > > ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install > > .if ${MK_PKGBOOTSTRAP} !=3D "no" > > ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install > >=20 > > Modified: head/etc/mtree/BSD.var.dist > > = > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=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/etc/mtree/BSD.var.dist Fri Oct 16 12:53:22 2015 = > (r289420) > > +++ head/etc/mtree/BSD.var.dist Fri Oct 16 14:04:16 2015 = > (r289421) > > @@ -46,6 +46,8 @@ > > .. > > ipf mode=3D0700 > > .. > > + ntp mode=3D0700 > > + .. > > pkg > > .. > > ports > >=20 > > Modified: head/etc/ntp.conf > > = > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=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/etc/ntp.conf Fri Oct 16 12:53:22 2015 (r289420) > > +++ head/etc/ntp.conf Fri Oct 16 14:04:16 2015 (r289421) > > @@ -77,3 +77,8 @@ restrict 127.127.1.0 > > # > > #server 127.127.1.0 > > #fudge 127.127.1.0 stratum 10 > > + > > +# See = > http://support.ntp.org/bin/view/Support/ConfiguringNTP#Section_6.14. > > +# for documentation regarding leapfile. Updates to the file can be = > obtained > > +# from ftp://time.nist.gov/pub/ or = > ftp://tycho.usno.navy.mil/pub/ntp/. > > +leapfile "/etc/ntp/leap-seconds" > >=20 > > Added: head/etc/ntp/Makefile > > = > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/etc/ntp/Makefile Fri Oct 16 14:04:16 2015 = > (r289421) > > @@ -0,0 +1,10 @@ > > +# $FreeBSD$ > > + > > +NO_OBJ=3D > > + > > +FILES=3D leap-seconds > > + > > +FILESDIR=3D /etc/ntp > > +FILESMODE=3D 644 > > + > > +.include > >=20 > > Added: head/etc/ntp/leap-seconds > > = > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=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/etc/ntp/leap-seconds Fri Oct 16 14:04:16 2015 = > (r289421) > > @@ -0,0 +1,119 @@ > > +# > > +# $FreeBSD$ > > +# > > +# ATOMIC TIME. > > +# The Coordinated Universal Time (UTC) is the reference time scale = > derived > > +# from The "Temps Atomique International" (TAI) calculated by the = > Bureau > > +# International des Poids et Mesures (BIPM) using a worldwide = > network of atomic > > +# clocks. UTC differs from TAI by an integer number of seconds; it = > is the basis > > +# of all activities in the world. > > +# > > +# > > +# ASTRONOMICAL TIME (UT1) is the time scale based on the rate of = > rotation of the earth. > > +# It is now mainly derived from Very Long Baseline Interferometry = > (VLBI). The various > > +# irregular fluctuations progressively detected in the rotation = > rate of the Earth lead > > +# in 1972 to the replacement of UT1 by UTC as the reference time = > scale. > > +# > > +# > > +# LEAP SECOND > > +# Atomic clocks are more stable than the rate of the earth = > rotatiob since the later > > +# undergoes a full range of geophysical perturbations at various = > time scales (lunisolar > > +# and core-mantle torques,atmospheric and oceanic effetcs, ...) > > +# Leap seconds are needed to keep the two time scales in = > agreement, i.e. UT1-UTC smaller > > +# than 0.9 second. So, when necessary a "leap second" is = > introduced in UTC. > > +# Since the adoption of this system in 1972 it has been necessary = > to add 26 seconds to UTC, > > +# firstly due to the initial choice of the value of the second = > (1/86400 mean solar day of > > +# the year 1820) and secondly to the general slowing down of the = > Earth's rotation. It is > > +# theorically possible to have a negative leap second (a second = > removed from UTC), but so far, > > +# all leap seconds have been positive (a second has been added to = > UTC). Based on what we know about the earth's rotation, > > +# it is unlikely that we will ever have a negative leap second. > > +# > > +# > > +# HISTORY > > +# The first leap second was added on June 30, 1972. Until 2000, it = > was necessary in average to add a leap second at a rate > > +# of 1 to 2 years. Since 2000, due to the fact that the earth rate = > of rotation is accelerating, leap seconds are introduced > > +# with an average frequency of 3 to 4 years. > > +# > > +# > > +# RESPONSABILITY OF THE DECISION TO INTRODUCE A LEAP SECOND IN UTC > > +# The decision to introduce a leap second in UTC is the = > responsibility of the Earth Orientation Center of > > +# the International Earth Rotation and reference System Service = > (IERS). This center is located at Paris > > +# Observatory. According to international agreements, leap second = > date have to occur at fixed date : > > +# first preference is given to the end of December and June, and = > second preference at the end of March > > +# and September. Since the system was introduced in 1972, only = > dates in June and December were used. > > +# > > +# Questions or comments to: > > +# Daniel Gambis, daniel.gambis@obspm.fr > > +# Christian Bizouard: christian.bizouard@obspm.fr > > +# Earth orientation Center of the IERS > > +# Paris Observatory, France > > +# > > +# > > +# > > +# VALIDITY OF THE FILE > > +# It is important to express the validity of the file. These next = > two dates are > > +# given in units of seconds since 1900.0. > > +# > > +# 1) Last update of the file. > > +# > > +# Updated through IERS Bulletin C = > (ftp://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat) > > +# > > +# The following line shows the last update of this file in NTP = > timestamp: > > +# > > +#$ 3645216000 > > +# > > +# 2) Expiration date of the file given on a semi-annual basis: = > last June or last December > > +# > > +# File expires on 28 December 2015 > > +# > > +# Expire date in NTP timestamp: > > +# > > +#@ 3660249600 > > +# > > +# > > +# LIST OF LEAP SECONDS > > +# NTP timestamp (X parameter) is the number of seconds since = > 1900.0 > > +# > > +# MJD: The Modified Julian Day number. MJD =3D X/86400 + 15020 > > +# > > +# DTAI: The difference DTAI=3D TAI-UTC in units of seconds > > +# It is the quantity to add to UTC to get the time in TAI > > +# > > +# Day Month Year : epoch in clear > > +# > > +#NTP Time DTAI Day Month Year > > +# > > +2272060800 10 # 1 Jan 1972 > > +2287785600 11 # 1 Jul 1972 > > +2303683200 12 # 1 Jan 1973 > > +2335219200 13 # 1 Jan 1974 > > +2366755200 14 # 1 Jan 1975 > > +2398291200 15 # 1 Jan 1976 > > +2429913600 16 # 1 Jan 1977 > > +2461449600 17 # 1 Jan 1978 > > +2492985600 18 # 1 Jan 1979 > > +2524521600 19 # 1 Jan 1980 > > +2571782400 20 # 1 Jul 1981 > > +2603318400 21 # 1 Jul 1982 > > +2634854400 22 # 1 Jul 1983 > > +2698012800 23 # 1 Jul 1985 > > +2776982400 24 # 1 Jan 1988 > > +2840140800 25 # 1 Jan 1990 > > +2871676800 26 # 1 Jan 1991 > > +2918937600 27 # 1 Jul 1992 > > +2950473600 28 # 1 Jul 1993 > > +2982009600 29 # 1 Jul 1994 > > +3029443200 30 # 1 Jan 1996 > > +3076704000 31 # 1 Jul 1997 > > +3124137600 32 # 1 Jan 1999 > > +3345062400 33 # 1 Jan 2006 > > +3439756800 34 # 1 Jan 2009 > > +3550089600 35 # 1 Jul 2012 > > +3644697600 36 # 1 Jul 2015 > > +# > > +# In order to verify the integrity of this file, a hash code > > +# has been generated. For more information how to use > > +# this hash code, please consult the README file under the > > +# 'sha' repertory. > > +# > > +#h 620ba8af 37900668 95ac09ba d77640f9 6fd75493 > >=20 > > > --Apple-Mail=_60572A67-97E7-4200-AEF6-88DC6354712B > Content-Transfer-Encoding: 7bit > Content-Disposition: attachment; > filename=signature.asc > Content-Type: application/pgp-signature; > name=signature.asc > Content-Description: Message signed with OpenPGP using GPGMail > > -----BEGIN PGP SIGNATURE----- > Comment: GPGTools - https://gpgtools.org > > iQIcBAEBCgAGBQJWIp9QAAoJEGwc0Sh9sBEA8GMP/RxMSBQvI0BKgbMfYZh7+x2w > gGPNOl5FrDjv6R1QxM2alDe3sEZmhNsZ5o0Ekso4kA/uzz5hF9eElp2EA0wn2DMa > 1IWJKbLUwLsKvN5bC2cMVmzlklqknm9R7EVyRwPB1Q9jgN8cQV4q01tN96XzbCmQ > 1M2Tg8CccnpI9hpdOLjpZQB72kr+rTUm9YrIuiP+nq62NjP4u4UyquKOeUfyyZP1 > WnpDNHNknvzlhCnXiexFHUtueL0bAjnSs0F9C7k661xtdt43q/zp0VWkTUeib8/y > o64PLOmq3dRK+PLDwRLY94OSpe5QqDivyR4H0BAbKbV97GjC/9byhJenR2J+5GUC > 2w54ddlW6rr7rE5kZYd8E5DSoMlmunpm1rMbEwHLHtRXxorZxDUMvj779VS4rj2b > MDxVngI/H0/o3inpSZjsqyLqNut8h204r64m2W5MWTMUJ5z1Evb/Uj6Gewfu3rk2 > kALtxq32we0Edt8VjYUAOOG/ZjTUWdBY0DPsDBeqjeYqkTNP7Ebgj0z0P69UYRsu > XBuMd7ONzSDSAGYXHbyBa2eLhPxDpInBPZ/R4agybBQIJ1qKv6PtV0VH8VGYzADm > DhrVGOsSc/yyou+YX7EzTT4F0S1gjPEgO4wopmZdOUFaNBzE8n8UVxTmT4jMlrTH > SchUp801COK+osnNyG4c > =3+ya > -----END PGP SIGNATURE----- > > --Apple-Mail=_60572A67-97E7-4200-AEF6-88DC6354712B-- > From owner-svn-src-all@freebsd.org Sun Oct 18 02:00: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 B1AEAA109FE; Sun, 18 Oct 2015 02:00:25 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) by mx1.freebsd.org (Postfix) with ESMTP id 4C63D665; Sun, 18 Oct 2015 02:00:24 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id ndGhZFeszT2vondGiZcPdQ; Sat, 17 Oct 2015 20:00:18 -0600 X-Authority-Analysis: v=2.1 cv=NrEbCZpJ c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=BWvPGDcYAAAA:8 a=VxmjJ2MpAAAA:8 a=8nJEP1OIZ-IA:10 a=5lJygRwiOn0A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=PYnjg3YJAAAA:8 a=qyDxTJV7AAAA:8 a=85N1-lAfAAAA:8 a=zNd2u4x_AAAA:8 a=5s6zO-qXuAxs_aenfAQA:9 a=VMSVR0KU_jCSt9j8:21 a=GIVkr1912MZHXu0C:21 a=hXHcXI2ZBuaQ5wAm:21 a=wPNLvfGTeEIA:10 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 053C39FDD; Sat, 17 Oct 2015 19:00:14 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id t9I20EOP061734; Sat, 17 Oct 2015 19:00:14 -0700 (PDT) (envelope-from Cy.Schubert@komquats.com) Message-Id: <201510180200.t9I20EOP061734@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: Ian Lepore cc: Warner Losh , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp In-Reply-To: Message from Ian Lepore of "Sat, 17 Oct 2015 13:25:56 -0600." <1445109956.71631.44.camel@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Sat, 17 Oct 2015 19:00:14 -0700 X-CMAE-Envelope: MS4wfF1/ro5ZvBdOsWGHUyXv4Ooa3aip5ab3fnvcAlguPBvMWWrj4Q13pFsN01eA1KKZsJyTSh1/+6MmXNGe0HzX3rwuaOdTz2VsyfHR5Qt8enF6Y33hrP0cRqfMHYaQT+L2jqzsVFyFXDYv+zMMrAw3VeJQhvzTIpDlEsjqExfYygL+pWI37AekLYDNj1wV2YBuzmnodp83sscRndP+FOVIeMnTLngX5apCX4yOYiXotP5pVuh8CgWOHecBj3pxYangc7unDnGzGGKYZwKDyLpPeypi1k2LqBZtYsUfR2zNNXp4hGbSyi1HntKx1WsWFxLRxS0RZZSFlqTn+kFMNffCEi0= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 02:00:25 -0000 In message <1445109956.71631.44.camel@freebsd.org>, Ian Lepore writes: > On Sat, 2015-10-17 at 13:19 -0600, Warner Losh wrote: > > Until the next leap second…. It would be better to just > > always try to grab the latest one… Can we put something > > in periodic to do that so users that have releases > > that are older than 6 months aren’t screwed? > > > > Warner > > > > I think writing a leapfeatcher task for periodic daily|weekly would > make a nice junior-hacker task. It would be nice if it only hit the > network when expiration of the installed file is imminent (like within > a month), and only if both ntp and the leapfile feature are enabled and > stuff like that. It should probably have a configurable list of URLs t > o fetch from. Enablement through and rc.conf option possibly? Not that this is an elegant solution though. -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. > > -- Ian > > > > On Oct 16, 2015, at 8:04 AM, Cy Schubert wrote: > > > > > > Author: cy > > > Date: Fri Oct 16 14:04:16 2015 > > > New Revision: 289421 > > > URL: https://svnweb.freebsd.org/changeset/base/289421 > > > > > > Log: > > > Add default leap-seconds file. This should help ntp networks get > > > the > > > leap second date correct > > > > > > Updates to the file can be obtained from ftp://time.nist.gov/pub/ > > > or > > > ftp://tycho.usno.navy.mil/pub/ntp/. > > > > > > Suggested by: dwmalone > > > Reviewed by: roberto, dwmalone, delphij > > > Approved by: roberto > > > MFC after: 1 week > > > > > > Added: > > > head/etc/ntp/ > > > head/etc/ntp/Makefile (contents, props changed) > > > head/etc/ntp/leap-seconds (contents, props changed) > > > Modified: > > > head/etc/Makefile > > > head/etc/mtree/BSD.var.dist > > > head/etc/ntp.conf > > > > > > Modified: head/etc/Makefile > > > =================================================================== > > > =========== > > > --- head/etc/Makefile Fri Oct 16 12:53:22 2015 (r2894 > > > 20) > > > +++ head/etc/Makefile Fri Oct 16 14:04:16 2015 (r2894 > > > 21) > > > @@ -240,6 +240,9 @@ distribution: > > > ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install > > > ${_+_}cd ${.CURDIR}/devd; ${MAKE} install > > > ${_+_}cd ${.CURDIR}/gss; ${MAKE} install > > > +.if ${MK_NTP} != "no" > > > + ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install > > > +.endif > > > ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install > > > .if ${MK_PKGBOOTSTRAP} != "no" > > > ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install > > > > > > Modified: head/etc/mtree/BSD.var.dist > > > =================================================================== > > > =========== > > > --- head/etc/mtree/BSD.var.dist Fri Oct 16 12:53:22 2015 > > > (r289420) > > > +++ head/etc/mtree/BSD.var.dist Fri Oct 16 14:04:16 2015 > > > (r289421) > > > @@ -46,6 +46,8 @@ > > > .. > > > ipf mode=0700 > > > .. > > > + ntp mode=0700 > > > + .. > > > pkg > > > .. > > > ports > > > > > > Modified: head/etc/ntp.conf > > > =================================================================== > > > =========== > > > --- head/etc/ntp.conf Fri Oct 16 12:53:22 2015 (r2894 > > > 20) > > > +++ head/etc/ntp.conf Fri Oct 16 14:04:16 2015 (r2894 > > > 21) > > > @@ -77,3 +77,8 @@ restrict 127.127.1.0 > > > # > > > #server 127.127.1.0 > > > #fudge 127.127.1.0 stratum 10 > > > + > > > +# See > > > http://support.ntp.org/bin/view/Support/ConfiguringNTP#Section_6.14 > > > . > > > +# for documentation regarding leapfile. Updates to the file can be > > > obtained > > > +# from ftp://time.nist.gov/pub/ or > > > ftp://tycho.usno.navy.mil/pub/ntp/. > > > +leapfile "/etc/ntp/leap-seconds" > > > > > > Added: head/etc/ntp/Makefile > > > =================================================================== > > > =========== > > > --- /dev/null 00:00:00 1970 (empty, because file is > > > newly added) > > > +++ head/etc/ntp/Makefile Fri Oct 16 14:04:16 2015 (r > > > 289421) > > > @@ -0,0 +1,10 @@ > > > +# $FreeBSD$ > > > + > > > +NO_OBJ= > > > + > > > +FILES= leap-seconds > > > + > > > +FILESDIR= /etc/ntp > > > +FILESMODE= 644 > > > + > > > +.include > > > > > > Added: head/etc/ntp/leap-seconds > > > =================================================================== > > > =========== > > > --- /dev/null 00:00:00 1970 (empty, because file is > > > newly added) > > > +++ head/etc/ntp/leap-seconds Fri Oct 16 14:04:16 2015 > > > (r289421) > > > @@ -0,0 +1,119 @@ > > > +# > > > +# $FreeBSD$ > > > +# > > > +# ATOMIC TIME. > > > +# The Coordinated Universal Time (UTC) is the reference > > > time scale derived > > > +# from The "Temps Atomique International" (TAI) calculated > > > by the Bureau > > > +# International des Poids et Mesures (BIPM) using a > > > worldwide network of atomic > > > +# clocks. UTC differs from TAI by an integer number of > > > seconds; it is the basis > > > +# of all activities in the world. > > > +# > > > +# > > > +# ASTRONOMICAL TIME (UT1) is the time scale based on the > > > rate of rotation of the earth. > > > +# It is now mainly derived from Very Long Baseline > > > Interferometry (VLBI). The various > > > +# irregular fluctuations progressively detected in the > > > rotation rate of the Earth lead > > > +# in 1972 to the replacement of UT1 by UTC as the reference > > > time scale. > > > +# > > > +# > > > +# LEAP SECOND > > > +# Atomic clocks are more stable than the rate of the earth > > > rotatiob since the later > > > +# undergoes a full range of geophysical perturbations at > > > various time scales (lunisolar > > > +# and core-mantle torques,atmospheric and oceanic effetcs, > > > ...) > > > +# Leap seconds are needed to keep the two time scales in > > > agreement, i.e. UT1-UTC smaller > > > +# than 0.9 second. So, when necessary a "leap second" is > > > introduced in UTC. > > > +# Since the adoption of this system in 1972 it has been > > > necessary to add 26 seconds to UTC, > > > +# firstly due to the initial choice of the value of the > > > second (1/86400 mean solar day of > > > +# the year 1820) and secondly to the general slowing down > > > of the Earth's rotation. It is > > > +# theorically possible to have a negative leap second (a > > > second removed from UTC), but so far, > > > +# all leap seconds have been positive (a second has been > > > added to UTC). Based on what we know about the earth's rotation, > > > +# it is unlikely that we will ever have a negative leap > > > second. > > > +# > > > +# > > > +# HISTORY > > > +# The first leap second was added on June 30, 1972. Until > > > 2000, it was necessary in average to add a leap second at a rate > > > +# of 1 to 2 years. Since 2000, due to the fact that the > > > earth rate of rotation is accelerating, leap seconds are introduced > > > +# with an average frequency of 3 to 4 years. > > > +# > > > +# > > > +# RESPONSABILITY OF THE DECISION TO INTRODUCE A LEAP SECOND > > > IN UTC > > > +# The decision to introduce a leap second in UTC is the > > > responsibility of the Earth Orientation Center of > > > +# the International Earth Rotation and reference System > > > Service (IERS). This center is located at Paris > > > +# Observatory. According to international agreements, leap > > > second date have to occur at fixed date : > > > +# first preference is given to the end of December and > > > June, and second preference at the end of March > > > +# and September. Since the system was introduced in 1972, > > > only dates in June and December were used. > > > +# > > > +# Questions or comments to: > > > +# Daniel Gambis, daniel.gambis@obspm.fr > > > +# Christian Bizouard: > > > christian.bizouard@obspm.fr > > > +# Earth orientation Center of the IERS > > > +# Paris Observatory, France > > > +# > > > +# > > > +# > > > +# VALIDITY OF THE FILE > > > +# It is important to express the validity of the file. > > > These next two dates are > > > +# given in units of seconds since 1900.0. > > > +# > > > +# 1) Last update of the file. > > > +# > > > +# Updated through IERS Bulletin C ( > > > ftp://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat) > > > +# > > > +# The following line shows the last update of this file in > > > NTP timestamp: > > > +# > > > +#$ 3645216000 > > > +# > > > +# 2) Expiration date of the file given on a semi-annual > > > basis: last June or last December > > > +# > > > +# File expires on 28 December 2015 > > > +# > > > +# Expire date in NTP timestamp: > > > +# > > > +#@ 3660249600 > > > +# > > > +# > > > +# LIST OF LEAP SECONDS > > > +# NTP timestamp (X parameter) is the number of seconds > > > since 1900.0 > > > +# > > > +# MJD: The Modified Julian Day number. MJD = X/86400 + > > > 15020 > > > +# > > > +# DTAI: The difference DTAI= TAI-UTC in units of seconds > > > +# It is the quantity to add to UTC to get the time in TAI > > > +# > > > +# Day Month Year : epoch in clear > > > +# > > > +#NTP Time DTAI Day Month Year > > > +# > > > +2272060800 10 # 1 Jan 1972 > > > +2287785600 11 # 1 Jul 1972 > > > +2303683200 12 # 1 Jan 1973 > > > +2335219200 13 # 1 Jan 1974 > > > +2366755200 14 # 1 Jan 1975 > > > +2398291200 15 # 1 Jan 1976 > > > +2429913600 16 # 1 Jan 1977 > > > +2461449600 17 # 1 Jan 1978 > > > +2492985600 18 # 1 Jan 1979 > > > +2524521600 19 # 1 Jan 1980 > > > +2571782400 20 # 1 Jul 1981 > > > +2603318400 21 # 1 Jul 1982 > > > +2634854400 22 # 1 Jul 1983 > > > +2698012800 23 # 1 Jul 1985 > > > +2776982400 24 # 1 Jan 1988 > > > +2840140800 25 # 1 Jan 1990 > > > +2871676800 26 # 1 Jan 1991 > > > +2918937600 27 # 1 Jul 1992 > > > +2950473600 28 # 1 Jul 1993 > > > +2982009600 29 # 1 Jul 1994 > > > +3029443200 30 # 1 Jan 1996 > > > +3076704000 31 # 1 Jul 1997 > > > +3124137600 32 # 1 Jan 1999 > > > +3345062400 33 # 1 Jan 2006 > > > +3439756800 34 # 1 Jan 2009 > > > +3550089600 35 # 1 Jul 2012 > > > +3644697600 36 # 1 Jul 2015 > > > +# > > > +# In order to verify the integrity of this file, a hash > > > code > > > +# has been generated. For more information how to use > > > +# this hash code, please consult the README file under the > > > +# 'sha' repertory. > > > +# > > > +#h 620ba8af 37900668 95ac09ba d77640f9 6fd75493 > > > > > > From owner-svn-src-all@freebsd.org Sun Oct 18 02:00: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 A61C2A109FD; Sun, 18 Oct 2015 02:00:25 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) by mx1.freebsd.org (Postfix) with ESMTP id 4C68D666; Sun, 18 Oct 2015 02:00:24 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id ndGiZFetKT2vondGjZcPgL; Sat, 17 Oct 2015 20:00:18 -0600 X-Authority-Analysis: v=2.1 cv=NrEbCZpJ c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=BWvPGDcYAAAA:8 a=VxmjJ2MpAAAA:8 a=kj9zAlcOel0A:10 a=5lJygRwiOn0A:10 a=7Qk2ozbKAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=_9h_t3xh06Rghkjd1bkA:9 a=CjuIK1q_8ugA:10 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id AF862A06E; Sat, 17 Oct 2015 19:00:16 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id t9I20G3g061874; Sat, 17 Oct 2015 19:00:16 -0700 (PDT) (envelope-from Cy.Schubert@komquats.com) Message-Id: <201510180200.t9I20G3g061874@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: Warner Losh cc: David Malone , Ian Lepore , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp In-Reply-To: Message from Warner Losh of "Sat, 17 Oct 2015 17:44:35 -0600." <00150EF2-0020-42E5-A1E5-324A23975577@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 17 Oct 2015 19:00:16 -0700 X-CMAE-Envelope: MS4wfF1/ro5ZvBdOsWGHUyXv4Ooa3aip5ab3fnvcAlguPBvMWWrj4Q13pFsN01eA1KKZsJyTSh1/+6MmXNGe0HzX3rwuaOdTz2VsyfHR5Qt8enF6Y33hrP0cRqfMHYaQT+L2jpGS8dF9R1XkKUk6rIyqNf0E/u3kEQhEliwByROY2v4sxcYHDQ8bvtsz1cpFjDZYp98Bnc9toRyU0+S/FtKYBDcjPgyfbIHCbyJsepv2yBRbT8Tl8hPrySEO2pMT3ql/hV4lDfUJAQlGZhDRMhmma26hJt8qSWV1tV6AiFHNHUVCEZbQMy4ZRu7BiW9+lj7KI9b/iETQ2hl0EqshiPxYgJQBq/ce1GLSFNni01fPOLwe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 02:00:25 -0000 In message <00150EF2-0020-42E5-A1E5-324A23975577@bsdimp.com>, Warner Losh writes: > > On Oct 17, 2015, at 3:20 PM, David Malone = > wrote: > >=20 > > On Sat, Oct 17, 2015 at 12:25:50PM -0600, Ian Lepore wrote: > >> If the leapseconds file is present, the leap bits for reference > >> clocks and downstratum servers are ignored. > >>=20 > >> I can't determine from casual code examination (and I don't have time > >> to experiment now) whether that is true even if the file is expired. > >=20 > > The way the code seems to work is: > >=20 > > 1) Take a vote from your peers on if there is an upcoming > > leap second. Refclocks can outvote other peers. (This is > > in ntp_proto.c:clock_update() - search for leap_vote_ins). > > Assuming no bugs, yes. And assuming your peers are sending > the correct information. History with ntpd and ntp serves well > illustrates that these assumptions are violated often. > > > 2) If one seems to be pending, try to insert it into an > > in-memory table for the end of the month. > > NTP only recognizes June and December as valid leap insertion > points. This is likely safe for the foreseeable future though, even > though the official standard allows leap seconds to be the end of > any month. Too many things assume you only have leap seconds > at these times for IERS to issue one that isn=E2=80=99t at the end of = > December > or June until earth rotation forces their hand sometime around the > end of this century (give or take a few decades). > > > 3) If you find that you loaded a table and the leapsecond > > you are trying to insert is within the valid range of the > > table, return an error. (This is in ntp_leapsec.c:leapsec_add()) > >=20 > > So, I think the change should be safe, if the comments match the code. > > That=E2=80=99s a big if. Both Ian and I have witnessed the carnage of = > incorrect > leap seconds first hand and so are somewhat touchy on the subject. It > is a place where getting the canonical information is 1000x better than > relying on code to implement things that can=E2=80=99t go wrong. Because = > they > often do. Way way too often. When you have leap second info, always > always always try extra hard to make sure it is as up to date as you > can get it. Any =E2=80=9Cshort cut=E2=80=9D here is asking for trouble, = > even if you think > you can prove that no such trouble is possible. Would an rc.conf option to use an alternate ntp.conf be of help? Having said that (and shooting down my own idea), it does seem a bit messy and rather inelegant though. -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Sun Oct 18 03:09: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 98ED5A108B1; Sun, 18 Oct 2015 03:09:04 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6385BBA6; Sun, 18 Oct 2015 03:09:04 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9I393LN091884; Sun, 18 Oct 2015 03:09:03 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I393Bd091883; Sun, 18 Oct 2015 03:09:03 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201510180309.t9I393Bd091883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 18 Oct 2015 03:09:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289480 - head/sys/contrib/ipfilter/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: Sun, 18 Oct 2015 03:09:04 -0000 Author: cy Date: Sun Oct 18 03:09:03 2015 New Revision: 289480 URL: https://svnweb.freebsd.org/changeset/base/289480 Log: Really fix ipfilter bug 3600459. Obtained from: ipfilter cvs repo r1.48.2.25, r1.72 and NetBSD repo r1.4 MFC after: 3 days Modified: head/sys/contrib/ipfilter/netinet/ip_state.c Modified: head/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_state.c Sun Oct 18 01:30:23 2015 (r289479) +++ head/sys/contrib/ipfilter/netinet/ip_state.c Sun Oct 18 03:09:03 2015 (r289480) @@ -3650,7 +3650,6 @@ ipf_state_del(softc, is, why) if (is->is_ref > 0) { int refs; - is->is_ref--; refs = is->is_ref; MUTEX_EXIT(&is->is_lock); if (!orphan) @@ -3667,7 +3666,7 @@ ipf_state_del(softc, is, why) } } - is->is_ref = 0; + ASSERT(is->is_ref == 0); MUTEX_EXIT(&is->is_lock); if (is->is_tqehead[0] != NULL) { From owner-svn-src-all@freebsd.org Sun Oct 18 04:07: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 3BBBBA0F6FA; Sun, 18 Oct 2015 04:07: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 08FE6B1F; Sun, 18 Oct 2015 04:07: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 t9I47fI6009247; Sun, 18 Oct 2015 04:07:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I47f97009246; Sun, 18 Oct 2015 04:07:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510180407.t9I47f97009246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 18 Oct 2015 04:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289481 - 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: Sun, 18 Oct 2015 04:07:42 -0000 Author: ngie Date: Sun Oct 18 04:07:40 2015 New Revision: 289481 URL: https://svnweb.freebsd.org/changeset/base/289481 Log: Only enable -fstack-protector-strong on gcc 4.9+ and default to -fstack-protector when -fstack-protector-strong is not available, like it was implicitly before r288669 As noted by antoine@, devel/gcc (which is 4.8.5) lacks -fstack-protector-strong support, whereas 4.8.4i (devel/gcc48) has the support. Until a version is available which has -fstack-protector-strong support, be conservative and only enable support with 4.9+. Reviewed by: pfg X-MFC with: r288669, r289465 Differential Revision: https://reviews.freebsd.org/D3924 Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Sun Oct 18 03:09:03 2015 (r289480) +++ head/share/mk/bsd.sys.mk Sun Oct 18 04:07:40 2015 (r289481) @@ -150,11 +150,13 @@ CXXFLAGS.clang+= -Wno-c++11-extensions ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" .if (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30500) || \ (${COMPILER_TYPE} == "gcc" && \ - (${COMPILER_VERSION} == 40201 || ${COMPILER_VERSION} >= 40800)) + (${COMPILER_VERSION} == 40201 || ${COMPILER_VERSION} >= 40900)) # Don't use -Wstack-protector as it breaks world with -Werror. SSP_CFLAGS?= -fstack-protector-strong -CFLAGS+= ${SSP_CFLAGS} +.else +SSP_CFLAGS?= -fstack-protector .endif +CFLAGS+= ${SSP_CFLAGS} .endif # SSP && !ARM && !MIPS # Allow user-specified additional warning flags, plus compiler specific flag overrides. From owner-svn-src-all@freebsd.org Sun Oct 18 04:50: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 81458A0FFB2; Sun, 18 Oct 2015 04:50:52 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4722CCA9; Sun, 18 Oct 2015 04:50:52 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9I4opaa020812; Sun, 18 Oct 2015 04:50:51 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I4opQ5020811; Sun, 18 Oct 2015 04:50:51 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201510180450.t9I4opQ5020811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 18 Oct 2015 04:50:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289482 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 04:50:52 -0000 Author: sbruno Date: Sun Oct 18 04:50:51 2015 New Revision: 289482 URL: https://svnweb.freebsd.org/changeset/base/289482 Log: Correctly use the default values for location of MAC addrs of arge0, arge1, ath0. woo! Reviewed by: adrian Modified: head/sys/mips/conf/TP-MR3020.hints Modified: head/sys/mips/conf/TP-MR3020.hints ============================================================================== --- head/sys/mips/conf/TP-MR3020.hints Sun Oct 18 04:07:40 2015 (r289481) +++ head/sys/mips/conf/TP-MR3020.hints Sun Oct 18 04:50:51 2015 (r289482) @@ -26,18 +26,18 @@ hint.arswitch.0.is_gmii=1 # arge1 <-> sw # arge0 - MII, autoneg, phy(4) hint.arge.0.phymask=0x10 # PHY4 hint.arge.0.mdio=mdioproxy1 # .. off of the switch mdiobus +hint.arge.0.eeprommac=0x1fff0000 # arge1 - GMII, 1000/full hint.arge.1.phymask=0x0 # No directly mapped PHYs hint.arge.1.media=1000 hint.arge.1.fduplex=1 +hint.arge.1.eeprommac=0x1fff0006 # Where the ART is - last 64k in the flash # 0x9fff1000 ? -hint.ath.0.eepromaddr=0x1fff1000 +hint.ath.0.eepromaddr=0x1fff0000 hint.ath.0.eepromsize=16384 - -hint.ar71xx.0.eeprom_mac_addr=0x1f01fc00 # The board 4MiB flash layout in uboot env: # From owner-svn-src-all@freebsd.org Sun Oct 18 05:50: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 614D4A186B6; Sun, 18 Oct 2015 05:50: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 13506147F; Sun, 18 Oct 2015 05:50: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 t9I5nxXL038082; Sun, 18 Oct 2015 05:49:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I5nw5r038077; Sun, 18 Oct 2015 05:49:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510180549.t9I5nw5r038077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 18 Oct 2015 05:49:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289487 - in head: bin/dd bin/dd/tests contrib/netbsd-tests/bin/dd etc/mtree X-SVN-Group: head MIME-Version: 1.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, 18 Oct 2015 05:50:00 -0000 Author: ngie Date: Sun Oct 18 05:49:58 2015 New Revision: 289487 URL: https://svnweb.freebsd.org/changeset/base/289487 Log: Integrate contrib/netbsd-tests/bin/dd into the FreeBSD test suite as bin/dd/tests Ensure fdescfs is mounted on /dev/fd/ for the length testcase as it's used in validating the characters read from /dev/zero MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Added: head/bin/dd/tests/ - copied from r289485, user/ngie/more-tests2/bin/dd/tests/ Modified: head/bin/dd/Makefile head/bin/dd/tests/Makefile head/contrib/netbsd-tests/bin/dd/t_dd.sh head/etc/mtree/BSD.tests.dist Directory Properties: head/ (props changed) Modified: head/bin/dd/Makefile ============================================================================== --- head/bin/dd/Makefile Sun Oct 18 05:36:05 2015 (r289486) +++ head/bin/dd/Makefile Sun Oct 18 05:49:58 2015 (r289487) @@ -1,6 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD$ +.include + PROG= dd SRCS= args.c conv.c conv_tab.c dd.c misc.c position.c @@ -24,4 +26,8 @@ test: ${PROG} gen .endfor @rm -f gen +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: head/bin/dd/tests/Makefile ============================================================================== --- user/ngie/more-tests2/bin/dd/tests/Makefile Sun Oct 18 05:29:49 2015 (r289485) +++ head/bin/dd/tests/Makefile Sun Oct 18 05:49:58 2015 (r289487) @@ -1,6 +1,6 @@ # $FreeBSD$ -NETBSD_ATF_TESTS_SH= dd +NETBSD_ATF_TESTS_SH= dd_test .include Modified: head/contrib/netbsd-tests/bin/dd/t_dd.sh ============================================================================== --- head/contrib/netbsd-tests/bin/dd/t_dd.sh Sun Oct 18 05:36:05 2015 (r289486) +++ head/contrib/netbsd-tests/bin/dd/t_dd.sh Sun Oct 18 05:49:58 2015 (r289487) @@ -44,6 +44,12 @@ length_head() { "the one expected to fail. (NetBSD PR bin/8521)" } length_body() { + # Begin FreeBSD + if ! df /dev/fd | grep -q '^fdescfs'; then + atf_skip "fdescfs is not mounted on /dev/fd" + fi + # End FreeBSD + test_dd_length 512 \ "dd if=/dev/zero of=/dev/fd/5 count=1 5>&1 >/dev/null 2>/dev/null" test_dd_length 512 \ Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Sun Oct 18 05:36:05 2015 (r289486) +++ head/etc/mtree/BSD.tests.dist Sun Oct 18 05:49:58 2015 (r289487) @@ -12,6 +12,8 @@ .. date .. + dd + .. expr .. ls From owner-svn-src-all@freebsd.org Sun Oct 18 05:51: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 3DC7BA187B1; Sun, 18 Oct 2015 05:51:46 +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 05B9918B5; Sun, 18 Oct 2015 05:51: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 t9I5pj56038797; Sun, 18 Oct 2015 05:51:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I5pj8j038796; Sun, 18 Oct 2015 05:51:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510180551.t9I5pj8j038796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 18 Oct 2015 05:51:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289488 - head/bin/test/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: Sun, 18 Oct 2015 05:51:46 -0000 Author: ngie Date: Sun Oct 18 05:51:44 2015 New Revision: 289488 URL: https://svnweb.freebsd.org/changeset/base/289488 Log: Clean up trailing whitespace MFC after: 3 days Modified: head/bin/test/tests/legacy_test.sh Modified: head/bin/test/tests/legacy_test.sh ============================================================================== --- head/bin/test/tests/legacy_test.sh Sun Oct 18 05:49:58 2015 (r289487) +++ head/bin/test/tests/legacy_test.sh Sun Oct 18 05:51:44 2015 (r289488) @@ -2,7 +2,7 @@ #- # Copyright (c) June 1996 Wolfram Schneider . Berlin. -# All rights reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -31,7 +31,7 @@ # $FreeBSD$ # force a specified test program, e.g. `env test=/bin/test sh regress.sh' -: ${test=test} +: ${test=test} t () { @@ -54,13 +54,13 @@ t () count=0 echo "1..130" -t 0 'b = b' -t 0 'b == b' -t 1 'b != b' -t 0 '\( b = b \)' -t 0 '\( b == b \)' -t 1 '! \( b = b \)' -t 1 '! \( b == b \)' +t 0 'b = b' +t 0 'b == b' +t 1 'b != b' +t 0 '\( b = b \)' +t 0 '\( b == b \)' +t 1 '! \( b = b \)' +t 1 '! \( b == b \)' t 1 '! -f /etc/passwd' t 0 '-h = -h' From owner-svn-src-all@freebsd.org Sun Oct 18 06:53: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 70614A18E88; Sun, 18 Oct 2015 06:53: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 367B1D3F; Sun, 18 Oct 2015 06:53:32 +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 t9I6rVKN058209; Sun, 18 Oct 2015 06:53:31 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I6rVdH058208; Sun, 18 Oct 2015 06:53:31 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510180653.t9I6rVdH058208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 06:53: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: r289489 - 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: Sun, 18 Oct 2015 06:53:32 -0000 Author: mav Date: Sun Oct 18 06:53:31 2015 New Revision: 289489 URL: https://svnweb.freebsd.org/changeset/base/289489 Log: MFC r289136: Remove lock upgrade attempt from ctl_be_block_open_file(). I am not sure what for it was done. Now open routine should automatically fall back to read-only if open for writing is impossible. In such case attempt to upgrade to write sounds strange. Modified: stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Sun Oct 18 05:51:44 2015 (r289488) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Sun Oct 18 06:53:31 2015 (r289489) @@ -1843,21 +1843,6 @@ ctl_be_block_open_file(struct ctl_be_blo return (error); } - /* - * Verify that we have the ability to upgrade to exclusive - * access on this file so we can trap errors at open instead - * of reporting them during first access. - */ - if (VOP_ISLOCKED(be_lun->vn) != LK_EXCLUSIVE) { - vn_lock(be_lun->vn, LK_UPGRADE | LK_RETRY); - if (be_lun->vn->v_iflag & VI_DOOMED) { - error = EBADF; - snprintf(req->error_str, sizeof(req->error_str), - "error locking file %s", be_lun->dev_path); - return (error); - } - } - file_data->cred = crhold(curthread->td_ucred); if (params->lun_size_bytes != 0) be_lun->size_bytes = params->lun_size_bytes; From owner-svn-src-all@freebsd.org Sun Oct 18 07:19: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 1AF46A18214; Sun, 18 Oct 2015 07:19:51 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [IPv6:2001:770:10:300::86e2:510b]) by mx1.freebsd.org (Postfix) with ESMTP id 0D8D16E9; Sun, 18 Oct 2015 07:19:49 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (localhost [127.0.0.1]) by salmon.maths.tcd.ie (Postfix) with ESMTP id EEE931591E5; Sun, 18 Oct 2015 08:19:40 +0100 (IST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=maths.tcd.ie; h= user-agent:in-reply-to:content-disposition:content-type :content-type:mime-version:references:message-id:subject:subject :from:from:date:date:received:received:received; s=20150418; t= 1445152775; x=1446967176; bh=YZf6/QWxAnMmf3JWNQn3XJAjvMc5sbwCask ljYm5Vd8=; b=u+sYxrY4SQ+2ZQ4GYp6mf/SUqhGy/j5H6FEtg5HVkld9ZFyDqbh fhN6Z8CZn6uQqR+BoV7J6df5aF7w/XrJ6QfAHQJeWRyZ/YEjVC8/EJxA8yKS0ho9 Zf4fxQFihgTAMegKLFORyHuxpPSuEMCBjstrRkkLwirM848/ffSlEUFg= X-Virus-Scanned: amavisd-new at maths.tcd.ie Received: from salmon.maths.tcd.ie ([127.0.0.1]) by salmon.maths.tcd.ie (salmon.maths.tcd.ie [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YQAvwxGhuuc1; Sun, 18 Oct 2015 08:19:35 +0100 (IST) Received: from walton.maths.tcd.ie (walton.maths.tcd.ie [IPv6:2001:770:10:300::86e2:510a]) by salmon.maths.tcd.ie (Postfix) with ESMTP id 01F151591E1; Sun, 18 Oct 2015 08:19:35 +0100 (IST) Received: by walton.maths.tcd.ie (Postfix, from userid 238) id AF6CC730AA; Sun, 18 Oct 2015 08:19:34 +0100 (IST) Date: Sun, 18 Oct 2015 08:19:34 +0100 From: David Malone To: Warner Losh Cc: Ian Lepore , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp Message-ID: <20151018071934.GA95077@walton.maths.tcd.ie> References: <201510161404.t9GE4GqM046436@repo.freebsd.org> <1445106350.71631.36.camel@freebsd.org> <20151017212033.GA43955@walton.maths.tcd.ie> <00150EF2-0020-42E5-A1E5-324A23975577@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00150EF2-0020-42E5-A1E5-324A23975577@bsdimp.com> 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: Sun, 18 Oct 2015 07:19:51 -0000 Hi Warner, I was trying to check Ian's specific concern, that a valid source of leap seconds might be ignored if a expired leapseconds file was present. It seems that this is not the case, at lease based on my reading of the code and comments. I included the references to the code, so others could check if they wanted. I actually suggested configuring the leapseconds file by default to try and improve the vagueries of accepting advertised leap seconds that you mentioned. > NTP only recognizes June and December as valid leap insertion > points. Interestingly, this code seems to be gone from ntp_loopfilter.c and based on a quick look through the rest of the code, I can't see a similar general check. Some of the refclocks do retain this condition, but the general code path doesn't seem to. Possibly we should take this up with the NTP guys as a check worth retaining? David. From owner-svn-src-all@freebsd.org Sun Oct 18 07:26: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 E44DEA183BC; Sun, 18 Oct 2015 07:26:12 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [IPv6:2001:770:10:300::86e2:510b]) by mx1.freebsd.org (Postfix) with ESMTP id 94C97C0D; Sun, 18 Oct 2015 07:26:12 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (localhost [127.0.0.1]) by salmon.maths.tcd.ie (Postfix) with ESMTP id 9B7B31591E5; Sun, 18 Oct 2015 08:26:11 +0100 (IST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=maths.tcd.ie; h= user-agent:in-reply-to:content-transfer-encoding :content-disposition:content-type:content-type:mime-version :references:message-id:subject:subject:from:from:date:date :received:received:received; s=20150418; t=1445153165; x= 1446967566; bh=Vu1Qlda7JxP1m4kNqFd8QjFjJtN89hERSLZSgqriy4A=; b=u uZIk9PDnTvJIs5S+ZgOJ3TBCClwScotUEN8ZxbTZP5dxNCnh8x5dYfVARvKmSlh0 tYxe0nglDXe4tJFcyPOLBb4M8zIP3i+L2GucePkL1dtvKZXlkq4QaHZwG+i8IQMZ Ixzer+QZvXJW3DNA0Cwgn4Hr2FkGCSOCs/kPGfvOn8= X-Virus-Scanned: amavisd-new at maths.tcd.ie Received: from salmon.maths.tcd.ie ([127.0.0.1]) by salmon.maths.tcd.ie (salmon.maths.tcd.ie [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GoD9cSFJ1aF6; Sun, 18 Oct 2015 08:26:05 +0100 (IST) Received: from walton.maths.tcd.ie (walton.maths.tcd.ie [134.226.81.10]) by salmon.maths.tcd.ie (Postfix) with ESMTP id 95E801591E1; Sun, 18 Oct 2015 08:26:05 +0100 (IST) Received: by walton.maths.tcd.ie (Postfix, from userid 238) id 18B20730AA; Sun, 18 Oct 2015 08:26:04 +0100 (IST) Date: Sun, 18 Oct 2015 08:26:04 +0100 From: David Malone To: Warner Losh Cc: Ian Lepore , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp Message-ID: <20151018072604.GB95077@walton.maths.tcd.ie> References: <201510161404.t9GE4GqM046436@repo.freebsd.org> <8154492E-C29E-41B1-A13B-34E33586DEC6@bsdimp.com> <1445109956.71631.44.camel@freebsd.org> <95712496-46C7-4F1F-B267-F25E4924E3B4@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <95712496-46C7-4F1F-B267-F25E4924E3B4@bsdimp.com> 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: Sun, 18 Oct 2015 07:26:13 -0000 On Sat, Oct 17, 2015 at 05:48:19PM -0600, Warner Losh wrote: > It should be very easy to try to fetch it once a day in June and December > until you succeed from each of the URLs in a list, with the default > list being the two canonical (for the US at least) sources. Shouldn’t > be more than a dozen lines in a periodic script. We probably also want to avoid trying to fetch an update at the same moment from a bunch of time synchronised machines. A random sleep might be enough, but we should be careful about setting automatic updates that fetch things from infrastructure other than our own. David. From owner-svn-src-all@freebsd.org Sun Oct 18 07:30: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 16C43A18497; Sun, 18 Oct 2015 07:30:52 +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 E4EACE0A; Sun, 18 Oct 2015 07:30:51 +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 t9I7UpmU067070; Sun, 18 Oct 2015 07:30:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I7Uoro067061; Sun, 18 Oct 2015 07:30:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510180730.t9I7Uoro067061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 18 Oct 2015 07:30:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289490 - in head: bin/ps lib/libxo lib/libxo/tests lib/libxo/tests/encoder sbin/savecore share/mk usr.bin/iscsictl usr.bin/wc usr.bin/xo X-SVN-Group: head MIME-Version: 1.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, 18 Oct 2015 07:30:52 -0000 Author: ngie Date: Sun Oct 18 07:30:50 2015 New Revision: 289490 URL: https://svnweb.freebsd.org/changeset/base/289490 Log: Make libxo depend on libutil because it uses humanize_number after r287111 Remove overlinking in lib/libxo/tests, sbin/savecore, and usr.bin/{iscsictl,wc,xo} PR: 203673 Sponsored by: EMC / Isilon Storage Division Modified: head/bin/ps/Makefile head/lib/libxo/Makefile head/lib/libxo/tests/Makefile head/lib/libxo/tests/encoder/Makefile head/sbin/savecore/Makefile head/share/mk/src.libnames.mk head/usr.bin/iscsictl/Makefile head/usr.bin/wc/Makefile head/usr.bin/xo/Makefile Directory Properties: head/ (props changed) head/sbin/ (props changed) head/share/ (props changed) Modified: head/bin/ps/Makefile ============================================================================== --- head/bin/ps/Makefile Sun Oct 18 06:53:31 2015 (r289489) +++ head/bin/ps/Makefile Sun Oct 18 07:30:50 2015 (r289490) @@ -11,6 +11,6 @@ SRCS= fmt.c keyword.c nlist.c print.c ps # on large systems. # CFLAGS+=-DLAZY_PS -LIBADD= m kvm jail xo util +LIBADD= m kvm jail xo .include Modified: head/lib/libxo/Makefile ============================================================================== --- head/lib/libxo/Makefile Sun Oct 18 06:53:31 2015 (r289489) +++ head/lib/libxo/Makefile Sun Oct 18 07:30:50 2015 (r289490) @@ -19,6 +19,8 @@ CFLAGS+=-DXO_ENCODERDIR=\"/usr/lib/libxo INCS= xo.h xo_encoder.h INCSDIR=${INCLUDEDIR}/libxo +LIBADD= util + WARNS?= 5 MAN+= libxo.3 Modified: head/lib/libxo/tests/Makefile ============================================================================== --- head/lib/libxo/tests/Makefile Sun Oct 18 06:53:31 2015 (r289489) +++ head/lib/libxo/tests/Makefile Sun Oct 18 07:30:50 2015 (r289490) @@ -242,8 +242,7 @@ PROGS+= test_11 CFLAGS+= -I${LIBXOSRC}/libxo -DPADD= ${LIBXO} ${LIBUTIL} -LDADD= -lxo -lutil +LIBADD= xo SUBDIR+= encoder Modified: head/lib/libxo/tests/encoder/Makefile ============================================================================== --- head/lib/libxo/tests/encoder/Makefile Sun Oct 18 06:53:31 2015 (r289489) +++ head/lib/libxo/tests/encoder/Makefile Sun Oct 18 07:30:50 2015 (r289490) @@ -14,7 +14,6 @@ SRCS= enc_test.c CFLAGS+= -I${LIBXOSRC}/libxo -DPADD+= ${LIBXO} -LDADD+= -lxo +LIBADD= xo .include Modified: head/sbin/savecore/Makefile ============================================================================== --- head/sbin/savecore/Makefile Sun Oct 18 06:53:31 2015 (r289489) +++ head/sbin/savecore/Makefile Sun Oct 18 07:30:50 2015 (r289490) @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= savecore -LIBADD= z xo util +LIBADD= z xo MAN= savecore.8 .include Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Sun Oct 18 06:53:31 2015 (r289489) +++ head/share/mk/src.libnames.mk Sun Oct 18 07:30:50 2015 (r289490) @@ -239,6 +239,7 @@ _DP_vmmapi= util _DP_ctf= z _DP_proc= rtld_db util _DP_dtrace= rtld_db pthread +_DP_xo= util # Define spacial cases LDADD_supcplusplus= -lsupc++ Modified: head/usr.bin/iscsictl/Makefile ============================================================================== --- head/usr.bin/iscsictl/Makefile Sun Oct 18 06:53:31 2015 (r289489) +++ head/usr.bin/iscsictl/Makefile Sun Oct 18 07:30:50 2015 (r289490) @@ -6,7 +6,7 @@ CFLAGS+= -I${.CURDIR} CFLAGS+= -I${.CURDIR}/../../sys/dev/iscsi MAN= iscsi.conf.5 iscsictl.8 -LIBADD= xo util +LIBADD= xo YFLAGS+= -v LFLAGS+= -i Modified: head/usr.bin/wc/Makefile ============================================================================== --- head/usr.bin/wc/Makefile Sun Oct 18 06:53:31 2015 (r289489) +++ head/usr.bin/wc/Makefile Sun Oct 18 07:30:50 2015 (r289490) @@ -2,6 +2,6 @@ # $FreeBSD$ PROG= wc -LIBADD= xo util +LIBADD= xo .include Modified: head/usr.bin/xo/Makefile ============================================================================== --- head/usr.bin/xo/Makefile Sun Oct 18 06:53:31 2015 (r289489) +++ head/usr.bin/xo/Makefile Sun Oct 18 07:30:50 2015 (r289490) @@ -12,7 +12,7 @@ MAN= xo.1 # XXX For xoversion.h CFLAGS+=-I${LIBXOSRC}/libxo -LIBADD= xo util +LIBADD= xo .if ${MK_TESTS} != "no" SUBDIR+= tests From owner-svn-src-all@freebsd.org Sun Oct 18 08:08: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 8ED02A18C3B; Sun, 18 Oct 2015 08:08:38 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52E66E92; Sun, 18 Oct 2015 08:08:38 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9I88bHL078514; Sun, 18 Oct 2015 08:08:37 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I88b2B078513; Sun, 18 Oct 2015 08:08:37 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201510180808.t9I88b2B078513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Sun, 18 Oct 2015 08:08:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289492 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 08:08:38 -0000 Author: jmg Date: Sun Oct 18 08:08:37 2015 New Revision: 289492 URL: https://svnweb.freebsd.org/changeset/base/289492 Log: page sized is not spelled 4096 on all arches... Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Sun Oct 18 07:33:44 2015 (r289491) +++ head/sys/sys/mbuf.h Sun Oct 18 08:08:37 2015 (r289492) @@ -344,7 +344,7 @@ struct mbuf { */ #define EXT_CLUSTER 1 /* mbuf cluster */ #define EXT_SFBUF 2 /* sendfile(2)'s sf_bufs */ -#define EXT_JUMBOP 3 /* jumbo cluster 4096 bytes */ +#define EXT_JUMBOP 3 /* jumbo cluster page sized */ #define EXT_JUMBO9 4 /* jumbo cluster 9216 bytes */ #define EXT_JUMBO16 5 /* jumbo cluster 16184 bytes */ #define EXT_PACKET 6 /* mbuf+cluster from packet zone */ From owner-svn-src-all@freebsd.org Sun Oct 18 08:12: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 850CCA18D13; Sun, 18 Oct 2015 08:12:07 +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 4774C1B9; Sun, 18 Oct 2015 08:12:07 +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 t9I8C6aP080394; Sun, 18 Oct 2015 08:12:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I8C535080389; Sun, 18 Oct 2015 08:12:05 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510180812.t9I8C535080389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 08:12:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289493 - in vendor/illumos/dist: cmd/zfs lib/libzfs/common man/man1m X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 08:12:07 -0000 Author: mav Date: Sun Oct 18 08:12:05 2015 New Revision: 289493 URL: https://svnweb.freebsd.org/changeset/base/289493 Log: 5745 zfs set allows only one dataset property to be set at a time Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Matthew Ahrens Reviewed by: Bayard Bell Reviewed by: Richard PALO Reviewed by: Steven Hartland Approved by: Rich Lowe Author: Chris Williamson illumos/illumos-gate@30925561c223021e91d15899cbe75f80e54d8889 Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c vendor/illumos/dist/lib/libzfs/common/libzfs.h vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c vendor/illumos/dist/lib/libzfs/common/libzfs_util.c vendor/illumos/dist/man/man1m/zfs.1m Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c ============================================================================== --- vendor/illumos/dist/cmd/zfs/zfs_main.c Sun Oct 18 08:08:37 2015 (r289492) +++ vendor/illumos/dist/cmd/zfs/zfs_main.c Sun Oct 18 08:12:05 2015 (r289493) @@ -265,7 +265,7 @@ get_usage(zfs_help_t idx) "\n" "\tsend [-nvPe] -t \n")); case HELP_SET: - return (gettext("\tset " + return (gettext("\tset ... " " ...\n")); case HELP_SHARE: return (gettext("\tshare <-a | filesystem>\n")); @@ -480,15 +480,18 @@ usage(boolean_t requested) exit(requested ? 0 : 2); } +/* + * Take a property=value argument string and add it to the given nvlist. + * Modifies the argument inplace. + */ static int -parseprop(nvlist_t *props) +parseprop(nvlist_t *props, char *propname) { - char *propname = optarg; char *propval, *strval; if ((propval = strchr(propname, '=')) == NULL) { (void) fprintf(stderr, gettext("missing " - "'=' for -o option\n")); + "'=' for property=value argument\n")); return (-1); } *propval = '\0'; @@ -604,7 +607,7 @@ zfs_do_clone(int argc, char **argv) while ((c = getopt(argc, argv, "o:p")) != -1) { switch (c) { case 'o': - if (parseprop(props)) + if (parseprop(props, optarg) != 0) return (1); break; case 'p': @@ -751,7 +754,7 @@ zfs_do_create(int argc, char **argv) nomem(); break; case 'o': - if (parseprop(props)) + if (parseprop(props, optarg)) goto error; break; case 's': @@ -3444,21 +3447,17 @@ out: } /* - * zfs set property=value { fs | snap | vol } ... + * zfs set property=value ... { fs | snap | vol } ... * - * Sets the given property for all datasets specified on the command line. + * Sets the given properties for all datasets specified on the command line. */ -typedef struct set_cbdata { - char *cb_propname; - char *cb_value; -} set_cbdata_t; static int set_callback(zfs_handle_t *zhp, void *data) { - set_cbdata_t *cbp = data; + nvlist_t *props = data; - if (zfs_prop_set(zhp, cbp->cb_propname, cbp->cb_value) != 0) { + if (zfs_prop_set_list(zhp, props) != 0) { switch (libzfs_errno(g_zfs)) { case EZFS_MOUNTFAILED: (void) fprintf(stderr, gettext("property may be set " @@ -3477,7 +3476,8 @@ set_callback(zfs_handle_t *zhp, void *da static int zfs_do_set(int argc, char **argv) { - set_cbdata_t cb; + nvlist_t *props = NULL; + int ds_start = -1; /* argv idx of first dataset arg */ int ret = 0; /* check for options */ @@ -3489,36 +3489,51 @@ zfs_do_set(int argc, char **argv) /* check number of arguments */ if (argc < 2) { - (void) fprintf(stderr, gettext("missing property=value " - "argument\n")); + (void) fprintf(stderr, gettext("missing arguments\n")); usage(B_FALSE); } if (argc < 3) { - (void) fprintf(stderr, gettext("missing dataset name\n")); + if (strchr(argv[1], '=') == NULL) { + (void) fprintf(stderr, gettext("missing property=value " + "argument(s)\n")); + } else { + (void) fprintf(stderr, gettext("missing dataset " + "name(s)\n")); + } usage(B_FALSE); } - /* validate property=value argument */ - cb.cb_propname = argv[1]; - if (((cb.cb_value = strchr(cb.cb_propname, '=')) == NULL) || - (cb.cb_value[1] == '\0')) { - (void) fprintf(stderr, gettext("missing value in " - "property=value argument\n")); + /* validate argument order: prop=val args followed by dataset args */ + for (int i = 1; i < argc; i++) { + if (strchr(argv[i], '=') != NULL) { + if (ds_start > 0) { + /* out-of-order prop=val argument */ + (void) fprintf(stderr, gettext("invalid " + "argument order\n"), i); + usage(B_FALSE); + } + } else if (ds_start < 0) { + ds_start = i; + } + } + if (ds_start < 0) { + (void) fprintf(stderr, gettext("missing dataset name(s)\n")); usage(B_FALSE); } - *cb.cb_value = '\0'; - cb.cb_value++; - - if (*cb.cb_propname == '\0') { - (void) fprintf(stderr, - gettext("missing property in property=value argument\n")); - usage(B_FALSE); + /* Populate a list of property settings */ + if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0) + nomem(); + for (int i = 1; i < ds_start; i++) { + if ((ret = parseprop(props, argv[i])) != 0) + goto error; } - ret = zfs_for_each(argc - 2, argv + 2, NULL, - ZFS_TYPE_DATASET, NULL, NULL, 0, set_callback, &cb); + ret = zfs_for_each(argc - ds_start, argv + ds_start, 0, + ZFS_TYPE_DATASET, NULL, NULL, 0, set_callback, props); +error: + nvlist_free(props); return (ret); } @@ -3578,7 +3593,7 @@ zfs_do_snapshot(int argc, char **argv) while ((c = getopt(argc, argv, "ro:")) != -1) { switch (c) { case 'o': - if (parseprop(props)) + if (parseprop(props, optarg)) return (1); break; case 'r': Modified: vendor/illumos/dist/lib/libzfs/common/libzfs.h ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs.h Sun Oct 18 08:08:37 2015 (r289492) +++ vendor/illumos/dist/lib/libzfs/common/libzfs.h Sun Oct 18 08:12:05 2015 (r289493) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright 2013 Nexenta Systems, Inc. All rights reserved. @@ -425,6 +425,7 @@ extern nvlist_t *zfs_valid_proplist(libz extern const char *zfs_prop_to_name(zfs_prop_t); extern int zfs_prop_set(zfs_handle_t *, const char *, const char *); +extern int zfs_prop_set_list(zfs_handle_t *, nvlist_t *); extern int zfs_prop_get(zfs_handle_t *, zfs_prop_t, char *, size_t, zprop_source_t *, char *, size_t, boolean_t); extern int zfs_prop_get_recvd(zfs_handle_t *, const char *, char *, size_t, Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Sun Oct 18 08:08:37 2015 (r289492) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Sun Oct 18 08:12:05 2015 (r289493) @@ -1499,15 +1499,10 @@ zfs_setprop_error(libzfs_handle_t *hdl, int zfs_prop_set(zfs_handle_t *zhp, const char *propname, const char *propval) { - zfs_cmd_t zc = { 0 }; int ret = -1; - prop_changelist_t *cl = NULL; char errbuf[1024]; libzfs_handle_t *hdl = zhp->zfs_hdl; - nvlist_t *nvl = NULL, *realprops; - zfs_prop_t prop; - boolean_t do_prefix = B_TRUE; - int added_resv; + nvlist_t *nvl = NULL; (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "cannot set property for '%s'"), @@ -1519,65 +1514,133 @@ zfs_prop_set(zfs_handle_t *zhp, const ch goto error; } - if ((realprops = zfs_valid_proplist(hdl, zhp->zfs_type, nvl, - zfs_prop_get_int(zhp, ZFS_PROP_ZONED), zhp, errbuf)) == NULL) - goto error; + ret = zfs_prop_set_list(zhp, nvl); +error: nvlist_free(nvl); - nvl = realprops; + return (ret); +} - prop = zfs_name_to_prop(propname); - if (prop == ZFS_PROP_VOLSIZE) { - if ((added_resv = zfs_add_synthetic_resv(zhp, nvl)) == -1) - goto error; - } - if ((cl = changelist_gather(zhp, prop, 0, 0)) == NULL) - goto error; +/* + * Given an nvlist of property names and values, set the properties for the + * given dataset. + */ +int +zfs_prop_set_list(zfs_handle_t *zhp, nvlist_t *props) +{ + zfs_cmd_t zc = { 0 }; + int ret = -1; + prop_changelist_t **cls = NULL; + int cl_idx; + char errbuf[1024]; + libzfs_handle_t *hdl = zhp->zfs_hdl; + nvlist_t *nvl; + int nvl_len; + int added_resv; - if (prop == ZFS_PROP_MOUNTPOINT && changelist_haszonedchild(cl)) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "child dataset with inherited mountpoint is used " - "in a non-global zone")); - ret = zfs_error(hdl, EZFS_ZONED, errbuf); + (void) snprintf(errbuf, sizeof (errbuf), + dgettext(TEXT_DOMAIN, "cannot set property for '%s'"), + zhp->zfs_name); + + if ((nvl = zfs_valid_proplist(hdl, zhp->zfs_type, props, + zfs_prop_get_int(zhp, ZFS_PROP_ZONED), zhp, errbuf)) == NULL) goto error; - } /* - * We don't want to unmount & remount the dataset when changing - * its canmount property to 'on' or 'noauto'. We only use - * the changelist logic to unmount when setting canmount=off. - */ - if (prop == ZFS_PROP_CANMOUNT) { - uint64_t idx; - int err = zprop_string_to_index(prop, propval, &idx, - ZFS_TYPE_DATASET); - if (err == 0 && idx != ZFS_CANMOUNT_OFF) - do_prefix = B_FALSE; + * We have to check for any extra properties which need to be added + * before computing the length of the nvlist. + */ + for (nvpair_t *elem = nvlist_next_nvpair(nvl, NULL); + elem != NULL; + elem = nvlist_next_nvpair(nvl, elem)) { + if (zfs_name_to_prop(nvpair_name(elem)) == ZFS_PROP_VOLSIZE && + (added_resv = zfs_add_synthetic_resv(zhp, nvl)) == -1) { + goto error; + } } - - if (do_prefix && (ret = changelist_prefix(cl)) != 0) + /* + * Check how many properties we're setting and allocate an array to + * store changelist pointers for postfix(). + */ + nvl_len = 0; + for (nvpair_t *elem = nvlist_next_nvpair(nvl, NULL); + elem != NULL; + elem = nvlist_next_nvpair(nvl, elem)) + nvl_len++; + if ((cls = calloc(nvl_len, sizeof (prop_changelist_t *))) == NULL) goto error; + cl_idx = 0; + for (nvpair_t *elem = nvlist_next_nvpair(nvl, NULL); + elem != NULL; + elem = nvlist_next_nvpair(nvl, elem)) { + + zfs_prop_t prop = zfs_name_to_prop(nvpair_name(elem)); + + assert(cl_idx < nvl_len); + /* + * We don't want to unmount & remount the dataset when changing + * its canmount property to 'on' or 'noauto'. We only use + * the changelist logic to unmount when setting canmount=off. + */ + if (!(prop == ZFS_PROP_CANMOUNT && + fnvpair_value_uint64(elem) != ZFS_CANMOUNT_OFF)) { + cls[cl_idx] = changelist_gather(zhp, prop, 0, 0); + if (cls[cl_idx] == NULL) + goto error; + } + + if (prop == ZFS_PROP_MOUNTPOINT && + changelist_haszonedchild(cls[cl_idx])) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "child dataset with inherited mountpoint is used " + "in a non-global zone")); + ret = zfs_error(hdl, EZFS_ZONED, errbuf); + goto error; + } + + if (cls[cl_idx] != NULL && + (ret = changelist_prefix(cls[cl_idx])) != 0) + goto error; + + cl_idx++; + } + assert(cl_idx == nvl_len); + /* - * Execute the corresponding ioctl() to set this property. + * Execute the corresponding ioctl() to set this list of properties. */ (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name)); - if (zcmd_write_src_nvlist(hdl, &zc, nvl) != 0) + if ((ret = zcmd_write_src_nvlist(hdl, &zc, nvl)) != 0 || + (ret = zcmd_alloc_dst_nvlist(hdl, &zc, 0)) != 0) goto error; ret = zfs_ioctl(hdl, ZFS_IOC_SET_PROP, &zc); if (ret != 0) { - zfs_setprop_error(hdl, prop, errno, errbuf); + /* Get the list of unset properties back and report them. */ + nvlist_t *errorprops = NULL; + if (zcmd_read_dst_nvlist(hdl, &zc, &errorprops) != 0) + goto error; + for (nvpair_t *elem = nvlist_next_nvpair(nvl, NULL); + elem != NULL; + elem = nvlist_next_nvpair(nvl, elem)) { + zfs_prop_t prop = zfs_name_to_prop(nvpair_name(elem)); + zfs_setprop_error(hdl, prop, errno, errbuf); + } + nvlist_free(errorprops); + if (added_resv && errno == ENOSPC) { /* clean up the volsize property we tried to set */ uint64_t old_volsize = zfs_prop_get_int(zhp, ZFS_PROP_VOLSIZE); nvlist_free(nvl); + nvl = NULL; zcmd_free_nvlists(&zc); + if (nvlist_alloc(&nvl, NV_UNIQUE_NAME, 0) != 0) goto error; if (nvlist_add_uint64(nvl, @@ -1589,8 +1652,13 @@ zfs_prop_set(zfs_handle_t *zhp, const ch (void) zfs_ioctl(hdl, ZFS_IOC_SET_PROP, &zc); } } else { - if (do_prefix) - ret = changelist_postfix(cl); + for (cl_idx = 0; cl_idx < nvl_len; cl_idx++) { + if (cls[cl_idx] != NULL) { + int clp_err = changelist_postfix(cls[cl_idx]); + if (clp_err != 0) + ret = clp_err; + } + } /* * Refresh the statistics so the new property value @@ -1603,8 +1671,13 @@ zfs_prop_set(zfs_handle_t *zhp, const ch error: nvlist_free(nvl); zcmd_free_nvlists(&zc); - if (cl) - changelist_free(cl); + if (cls != NULL) { + for (cl_idx = 0; cl_idx < nvl_len; cl_idx++) { + if (cls[cl_idx] != NULL) + changelist_free(cls[cl_idx]); + } + free(cls); + } return (ret); } @@ -4110,7 +4183,7 @@ zfs_smb_acl_mgmt(libzfs_handle_t *hdl, c if (cmd == ZFS_SMB_ACL_RENAME) { if (nvlist_alloc(&nvlist, NV_UNIQUE_NAME, 0) != 0) { (void) no_memory(hdl); - return (NULL); + return (0); } } Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_util.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_util.c Sun Oct 18 08:08:37 2015 (r289492) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_util.c Sun Oct 18 08:12:05 2015 (r289493) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. - * Copyright (c) 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. */ /* @@ -739,8 +739,9 @@ zcmd_alloc_dst_nvlist(libzfs_handle_t *h if (len == 0) len = 16 * 1024; zc->zc_nvlist_dst_size = len; - if ((zc->zc_nvlist_dst = (uint64_t)(uintptr_t) - zfs_alloc(hdl, zc->zc_nvlist_dst_size)) == NULL) + zc->zc_nvlist_dst = + (uint64_t)(uintptr_t)zfs_alloc(hdl, zc->zc_nvlist_dst_size); + if (zc->zc_nvlist_dst == 0) return (-1); return (0); @@ -755,9 +756,9 @@ int zcmd_expand_dst_nvlist(libzfs_handle_t *hdl, zfs_cmd_t *zc) { free((void *)(uintptr_t)zc->zc_nvlist_dst); - if ((zc->zc_nvlist_dst = (uint64_t)(uintptr_t) - zfs_alloc(hdl, zc->zc_nvlist_dst_size)) - == NULL) + zc->zc_nvlist_dst = + (uint64_t)(uintptr_t)zfs_alloc(hdl, zc->zc_nvlist_dst_size); + if (zc->zc_nvlist_dst == 0) return (-1); return (0); @@ -772,6 +773,9 @@ zcmd_free_nvlists(zfs_cmd_t *zc) free((void *)(uintptr_t)zc->zc_nvlist_conf); free((void *)(uintptr_t)zc->zc_nvlist_src); free((void *)(uintptr_t)zc->zc_nvlist_dst); + zc->zc_nvlist_conf = NULL; + zc->zc_nvlist_src = NULL; + zc->zc_nvlist_dst = NULL; } static int Modified: vendor/illumos/dist/man/man1m/zfs.1m ============================================================================== --- vendor/illumos/dist/man/man1m/zfs.1m Sun Oct 18 08:08:37 2015 (r289492) +++ vendor/illumos/dist/man/man1m/zfs.1m Sun Oct 18 08:12:05 2015 (r289493) @@ -22,7 +22,7 @@ .\" .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright 2011 Joshua M. Clulow -.\" Copyright (c) 2014 by Delphix. All rights reserved. +.\" Copyright (c) 2011, 2014 by Delphix. All rights reserved. .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. .\" Copyright (c) 2014, Joyent, Inc. All rights reserved. .\" Copyright (c) 2014 by Adam Stevko. All rights reserved. @@ -107,7 +107,7 @@ zfs \- configures ZFS file systems .LP .nf -\fBzfs\fR \fBset\fR \fIproperty\fR=\fIvalue\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR... +\fBzfs\fR \fBset\fR \fIproperty\fR=\fIvalue\fR... \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR... .fi .LP @@ -2385,19 +2385,19 @@ For example, specifying \fB-t snapshot\f .sp .ne 2 .na -\fB\fBzfs set\fR \fIproperty\fR=\fIvalue\fR +\fB\fBzfs set\fR \fIproperty\fR=\fIvalue\fR[ \fIproperty\fR=\fIvalue\fR]... \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR...\fR .ad .sp .6 .RS 4n -Sets the property to the given value for each dataset. Only some properties can -be edited. See the "Properties" section for more information on what properties -can be set and acceptable values. Numeric values can be specified as exact -values, or in a human-readable form with a suffix of \fBB\fR, \fBK\fR, \fBM\fR, -\fBG\fR, \fBT\fR, \fBP\fR, \fBE\fR, \fBZ\fR (for bytes, kilobytes, megabytes, -gigabytes, terabytes, petabytes, exabytes, or zettabytes, respectively). User -properties can be set on snapshots. For more information, see the "User -Properties" section. +Sets the property or list of properties to the given value(s) for each dataset. +Only some properties can be edited. See the "Properties" section for more +information on what properties can be set and acceptable values. Numeric values +can be specified as exact values, or in a human-readable form with a suffix of +\fBB\fR, \fBK\fR, \fBM\fR, \fBG\fR, \fBT\fR, \fBP\fR, \fBE\fR, \fBZ\fR (for +bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes, or +zettabytes, respectively). User properties can be set on snapshots. For more +information, see the "User Properties" section. .RE .sp From owner-svn-src-all@freebsd.org Sun Oct 18 08:13: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 DBAFDA18D58; Sun, 18 Oct 2015 08:13:52 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96D2636F; Sun, 18 Oct 2015 08:13:52 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9I8DpcP080509; Sun, 18 Oct 2015 08:13:51 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I8DpuX080506; Sun, 18 Oct 2015 08:13:51 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201510180813.t9I8DpuX080506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Sun, 18 Oct 2015 08:13:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289494 - head/sys/dev/pci X-SVN-Group: head MIME-Version: 1.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, 18 Oct 2015 08:13:53 -0000 Author: jmg Date: Sun Oct 18 08:13:51 2015 New Revision: 289494 URL: https://svnweb.freebsd.org/changeset/base/289494 Log: drop a bunch of white space at end of lines and end of files... -x -wb apparently doesn't hide end of file white space changes.. This is to reduce the amount of diff for my PCIe HP changes.. Modified: head/sys/dev/pci/pci.c head/sys/dev/pci/pci_pci.c head/sys/dev/pci/pcib_if.m Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Sun Oct 18 08:12:05 2015 (r289493) +++ head/sys/dev/pci/pci.c Sun Oct 18 08:13:51 2015 (r289494) @@ -535,7 +535,7 @@ pci_romsize(uint64_t testval) } return (ln2size); } - + /* return log2 of address range supported by map register */ static int @@ -1706,7 +1706,7 @@ pci_remap_msix_method(device_t dev, devi free(used, M_DEVBUF); return (EINVAL); } - + /* Make sure none of the resources are allocated. */ for (i = 0; i < msix->msix_table_len; i++) { if (msix->msix_table[i].mte_vector == 0) @@ -2003,7 +2003,7 @@ pci_remap_intr_method(device_t bus, devi struct msix_table_entry *mte; struct msix_vector *mv; uint64_t addr; - uint32_t data; + uint32_t data; int error, i, j; /* @@ -4830,7 +4830,7 @@ pci_deactivate_resource(device_t dev, de if (error) return (error); - /* Disable decoding for device ROMs. */ + /* Disable decoding for device ROMs. */ if (device_get_parent(child) == dev) { dinfo = device_get_ivars(child); if (type == SYS_RES_MEMORY && PCIR_IS_BIOS(&dinfo->cfg, rid)) Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Sun Oct 18 08:12:05 2015 (r289493) +++ head/sys/dev/pci/pci_pci.c Sun Oct 18 08:13:51 2015 (r289494) @@ -57,7 +57,7 @@ static int pcib_resume(device_t dev); static int pcib_power_for_sleep(device_t pcib, device_t dev, int *pstate); static uint16_t pcib_ari_get_rid(device_t pcib, device_t dev); -static uint32_t pcib_read_config(device_t dev, u_int b, u_int s, +static uint32_t pcib_read_config(device_t dev, u_int b, u_int s, u_int f, u_int reg, int width); static void pcib_write_config(device_t dev, u_int b, u_int s, u_int f, u_int reg, uint32_t val, int width); @@ -266,7 +266,7 @@ pcib_add_window_resources(struct pcib_wi free(w->res, M_DEVBUF); w->res = newarray; w->count += count; - + for (i = 0; i < count; i++) { error = rman_manage_region(&w->rman, rman_get_start(res[i]), rman_get_end(res[i])); @@ -783,7 +783,7 @@ pcib_get_mem_decode(struct pcib_softc *s sc->pmembase = PCI_PPBMEMBASE(0, pmemlow); pmemlow = pci_read_config(dev, PCIR_PMLIMITL_1, 2); - if ((pmemlow & PCIM_BRPM_MASK) == PCIM_BRPM_64) + if ((pmemlow & PCIM_BRPM_MASK) == PCIM_BRPM_64) sc->pmemlimit = PCI_PPBMEMLIMIT( pci_read_config(dev, PCIR_PMLIMITH_1, 4), pmemlow); else @@ -1126,7 +1126,7 @@ int pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) { struct pcib_softc *sc = device_get_softc(dev); - + switch (which) { case PCIB_IVAR_DOMAIN: *result = sc->domain; @@ -1243,9 +1243,9 @@ pcib_alloc_new_window(struct pcib_softc return (0); } } - return (ENOSPC); + return (ENOSPC); } - + wmask = (1ul << w->step) - 1; if (RF_ALIGNMENT(flags) < w->step) { flags &= ~RF_ALIGNMENT_MASK; @@ -1337,7 +1337,7 @@ pcib_expand_window(struct pcib_softc *sc KASSERT(w->base == rman_get_start(res), ("existing resource mismatch")); force_64k_base = 0; - } + } error = bus_adjust_resource(sc->dev, type, res, force_64k_base ? rman_get_start(res) : base, limit); @@ -1657,7 +1657,7 @@ pcib_release_resource(device_t dev, devi * is set up to, or capable of handling them. */ struct resource * -pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, +pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { struct pcib_softc *sc = device_get_softc(dev); @@ -1928,7 +1928,7 @@ pcib_route_interrupt(device_t pcib, devi int parent_intpin; int intnum; - /* + /* * * The PCI standard defines a swizzle of the child-side device/intpin to * the parent-side intpin as follows. @@ -2116,4 +2116,3 @@ pcib_try_enable_ari(device_t pcib, devic return (0); } - Modified: head/sys/dev/pci/pcib_if.m ============================================================================== --- head/sys/dev/pci/pcib_if.m Sun Oct 18 08:12:05 2015 (r289493) +++ head/sys/dev/pci/pcib_if.m Sun Oct 18 08:13:51 2015 (r289494) @@ -97,7 +97,7 @@ METHOD void write_config { }; # -# Route an interrupt. Returns a value suitable for stuffing into +# Route an interrupt. Returns a value suitable for stuffing into # a device's interrupt register. # METHOD int route_interrupt { @@ -206,4 +206,3 @@ METHOD void decode_rid { int *slot; int *func; } DEFAULT pcib_decode_rid; - From owner-svn-src-all@freebsd.org Sun Oct 18 09:33: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 1765FA16001; Sun, 18 Oct 2015 09:33:30 +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 B9ACA1C04; Sun, 18 Oct 2015 09:33:29 +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 t9I9XS8Z004708; Sun, 18 Oct 2015 09:33:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9I9XSCX004707; Sun, 18 Oct 2015 09:33:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510180933.t9I9XSCX004707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 18 Oct 2015 09:33:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289496 - 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, 18 Oct 2015 09:33:30 -0000 Author: kib Date: Sun Oct 18 09:33:28 2015 New Revision: 289496 URL: https://svnweb.freebsd.org/changeset/base/289496 Log: Only marker is guaranteed to be present on the queue after the relock in vm_pageout_fallback_object_lock() and vm_pageout_page_lock(). The check for the m->queue == queue assumes that the page does belong to a queue. Modify the 'unchanged' calculation bu dereferencing the marker tailq pointers, which is known to belong to the queue. Since for a page m linked to the queue, m->queue must be equal to the queue index, assert this instead of checking. In collaboration with: alc Sponsored by: The FreeBSD Foundation (kib) MFC after: 2 weeks Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sun Oct 18 09:02:17 2015 (r289495) +++ head/sys/vm/vm_pageout.c Sun Oct 18 09:33:28 2015 (r289496) @@ -292,11 +292,21 @@ vm_pageout_fallback_object_lock(vm_page_ vm_page_lock(m); vm_pagequeue_lock(pq); - /* Page queue might have changed. */ + /* + * The page's object might have changed, and/or the page might + * have moved from its original position in the queue. If the + * page's object has changed, then the caller should abandon + * processing the page because the wrong object lock was + * acquired. Use the marker's plinks.q, not the page's, to + * determine if the page has been moved. The state of the + * page's plinks.q can be indeterminate; whereas, the marker's + * plinks.q must be valid. + */ *next = TAILQ_NEXT(&marker, plinks.q); - unchanged = (m->queue == queue && - m->object == object && - &marker == TAILQ_NEXT(m, plinks.q)); + unchanged = m->object == object && + m == TAILQ_PREV(&marker, pglist, plinks.q); + KASSERT(!unchanged || m->queue == queue, + ("page %p queue %d %d", m, queue, m->queue)); TAILQ_REMOVE(&pq->pq_pl, &marker, plinks.q); return (unchanged); } @@ -333,7 +343,9 @@ vm_pageout_page_lock(vm_page_t m, vm_pag /* Page queue might have changed. */ *next = TAILQ_NEXT(&marker, plinks.q); - unchanged = (m->queue == queue && &marker == TAILQ_NEXT(m, plinks.q)); + unchanged = m == TAILQ_PREV(&marker, pglist, plinks.q); + KASSERT(!unchanged || m->queue == queue, + ("page %p queue %d %d", m, queue, m->queue)); TAILQ_REMOVE(&pq->pq_pl, &marker, plinks.q); return (unchanged); } From owner-svn-src-all@freebsd.org Sun Oct 18 09:46: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 E28D7A16330; Sun, 18 Oct 2015 09:46:08 +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 5CABDD2; Sun, 18 Oct 2015 09:46:08 +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 t9I9k2rk089809 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 18 Oct 2015 12:46:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua t9I9k2rk089809 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id t9I9k2Yp089802; Sun, 18 Oct 2015 12:46:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 18 Oct 2015 12:46:02 +0300 From: Konstantin Belousov To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289477 - head/sys/arm/mv Message-ID: <20151018094602.GF2257@kib.kiev.ua> References: <201510180103.t9I13h0w056671@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201510180103.t9I13h0w056671@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: Sun, 18 Oct 2015 09:46:09 -0000 On Sun, Oct 18, 2015 at 01:03:43AM +0000, Ian Lepore wrote: > Author: ian > Date: Sun Oct 18 01:03:43 2015 > New Revision: 289477 > URL: https://svnweb.freebsd.org/changeset/base/289477 > > Log: > Fix a strange macro re-definition compile error. If the VM_MAXUSER_ADDRESS > value is defined as a config option the definition is emitted into > opt_global.h which is force-included into everything. In addition, the > symbol is emitted by the genassym mechanism, but that by its nature reduces > the value to a 0xnnnnnnnn number. When compiling a .S file you end up > with two different definitions of the macro (they evaluate to the same > number, but the text is different, upsetting the compiler). > > Nothing has changed about this code for a while but the compile error is > new, so this must be fallout from the clang 3.7 update or something. > > Modified: > head/sys/arm/mv/std-pj4b.mv > > Modified: head/sys/arm/mv/std-pj4b.mv > ============================================================================== > --- head/sys/arm/mv/std-pj4b.mv Sun Oct 18 00:59:28 2015 (r289476) > +++ head/sys/arm/mv/std-pj4b.mv Sun Oct 18 01:03:43 2015 (r289477) > @@ -5,4 +5,8 @@ cpu CPU_MV_PJ4B > machine arm armv6 > makeoptions CONF_CFLAGS="-march=armv7a" > > -options VM_MAXUSER_ADDRESS="(KERNBASE-(1024*1024*1024))" > +# This was originally defined as "(KERNBASE-(1024*1024*1024))" but that > +# (in opt_global.h) clashed with the value emitted by genassym which > +# reduces the original macro text to its numeric value. The only way > +# to avoid that is to define it here as the numeric value genassym emits. > +options VM_MAXUSER_ADDRESS="0x80000000" Genassym started to generate VM_MAXUSER_ADDRESS after r289372. Strange that I did not saw the error. Why does marvell need this override ? From owner-svn-src-all@freebsd.org Sun Oct 18 11:21: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 26B1CA18AE6; Sun, 18 Oct 2015 11:21: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 E2210BC6; Sun, 18 Oct 2015 11:21:09 +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 t9IBL9oF035431; Sun, 18 Oct 2015 11:21:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IBL8Gi035425; Sun, 18 Oct 2015 11:21:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181121.t9IBL8Gi035425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 11:21:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289497 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 11:21:10 -0000 Author: mav Date: Sun Oct 18 11:21:08 2015 New Revision: 289497 URL: https://svnweb.freebsd.org/changeset/base/289497 Log: MFV r289493: 5745 zfs set allows only one dataset property to be set at a time Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Matthew Ahrens Reviewed by: Bayard Bell Reviewed by: Richard PALO Reviewed by: Steven Hartland Approved by: Rich Lowe Author: Chris Williamson illumos/illumos-gate@30925561c223021e91d15899cbe75f80e54d8889 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Oct 18 09:33:28 2015 (r289496) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Oct 18 11:21:08 2015 (r289497) @@ -18,7 +18,7 @@ .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved. -.\" Copyright (c) 2014 by Delphix. All rights reserved. +.\" Copyright (c) 2011, 2014 by Delphix. All rights reserved. .\" Copyright (c) 2011, Pawel Jakub Dawidek .\" Copyright (c) 2012, Glen Barber .\" Copyright (c) 2012, Bryan Drewery @@ -117,7 +117,7 @@ .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Nm .Cm set -.Ar property Ns = Ns Ar value +.Ar property Ns = Ns Ar value Oc ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Nm .Cm get @@ -2121,14 +2121,14 @@ option, but sorts by property in descend .It Xo .Nm .Cm set -.Ar property Ns = Ns Ar value +.Ar property Ns = Ns Ar value Oc ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Xc .Pp -Sets the property to the given value for each dataset. Only some properties can -be edited. See the "Properties" section for more information on what properties -can be set and acceptable values. Numeric values can be specified as exact -values, or in a human-readable form with a suffix of +Sets the property or list of properties to the given value(s) for each dataset. +Only some properties can be edited. See the "Properties" section for more +information on what properties can be set and acceptable values. Numeric values +can be specified as exact values, or in a human-readable form with a suffix of .Sy B , K , M , G , T , P , E , Z (for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes, or zettabytes, respectively). User properties can be set on snapshots. For more Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sun Oct 18 09:33:28 2015 (r289496) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sun Oct 18 11:21:08 2015 (r289497) @@ -283,7 +283,7 @@ get_usage(zfs_help_t idx) "\n" "\tsend [-nvPe] -t \n")); case HELP_SET: - return (gettext("\tset " + return (gettext("\tset ... " " ...\n")); case HELP_SHARE: return (gettext("\tshare <-a | filesystem>\n")); @@ -498,6 +498,10 @@ usage(boolean_t requested) exit(requested ? 0 : 2); } +/* + * Take a property=value argument string and add it to the given nvlist. + * Modifies the argument inplace. + */ static int parseprop(nvlist_t *props, char *propname) { @@ -505,7 +509,7 @@ parseprop(nvlist_t *props, char *propnam if ((propval = strchr(propname, '=')) == NULL) { (void) fprintf(stderr, gettext("missing " - "'=' for -o option\n")); + "'=' for property=value argument\n")); return (-1); } *propval = '\0'; @@ -632,7 +636,7 @@ zfs_do_clone(int argc, char **argv) while ((c = getopt(argc, argv, "o:p")) != -1) { switch (c) { case 'o': - if (parseprop(props, optarg)) + if (parseprop(props, optarg) != 0) return (1); break; case 'p': @@ -3532,21 +3536,17 @@ out: } /* - * zfs set property=value { fs | snap | vol } ... + * zfs set property=value ... { fs | snap | vol } ... * - * Sets the given property for all datasets specified on the command line. + * Sets the given properties for all datasets specified on the command line. */ -typedef struct set_cbdata { - char *cb_propname; - char *cb_value; -} set_cbdata_t; static int set_callback(zfs_handle_t *zhp, void *data) { - set_cbdata_t *cbp = data; + nvlist_t *props = data; - if (zfs_prop_set(zhp, cbp->cb_propname, cbp->cb_value) != 0) { + if (zfs_prop_set_list(zhp, props) != 0) { switch (libzfs_errno(g_zfs)) { case EZFS_MOUNTFAILED: (void) fprintf(stderr, gettext("property may be set " @@ -3565,7 +3565,8 @@ set_callback(zfs_handle_t *zhp, void *da static int zfs_do_set(int argc, char **argv) { - set_cbdata_t cb; + nvlist_t *props = NULL; + int ds_start = -1; /* argv idx of first dataset arg */ int ret = 0; /* check for options */ @@ -3577,36 +3578,51 @@ zfs_do_set(int argc, char **argv) /* check number of arguments */ if (argc < 2) { - (void) fprintf(stderr, gettext("missing property=value " - "argument\n")); + (void) fprintf(stderr, gettext("missing arguments\n")); usage(B_FALSE); } if (argc < 3) { - (void) fprintf(stderr, gettext("missing dataset name\n")); + if (strchr(argv[1], '=') == NULL) { + (void) fprintf(stderr, gettext("missing property=value " + "argument(s)\n")); + } else { + (void) fprintf(stderr, gettext("missing dataset " + "name(s)\n")); + } usage(B_FALSE); } - /* validate property=value argument */ - cb.cb_propname = argv[1]; - if (((cb.cb_value = strchr(cb.cb_propname, '=')) == NULL) || - (cb.cb_value[1] == '\0')) { - (void) fprintf(stderr, gettext("missing value in " - "property=value argument\n")); + /* validate argument order: prop=val args followed by dataset args */ + for (int i = 1; i < argc; i++) { + if (strchr(argv[i], '=') != NULL) { + if (ds_start > 0) { + /* out-of-order prop=val argument */ + (void) fprintf(stderr, gettext("invalid " + "argument order\n"), i); + usage(B_FALSE); + } + } else if (ds_start < 0) { + ds_start = i; + } + } + if (ds_start < 0) { + (void) fprintf(stderr, gettext("missing dataset name(s)\n")); usage(B_FALSE); } - *cb.cb_value = '\0'; - cb.cb_value++; - - if (*cb.cb_propname == '\0') { - (void) fprintf(stderr, - gettext("missing property in property=value argument\n")); - usage(B_FALSE); + /* Populate a list of property settings */ + if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0) + nomem(); + for (int i = 1; i < ds_start; i++) { + if ((ret = parseprop(props, argv[i])) != 0) + goto error; } - ret = zfs_for_each(argc - 2, argv + 2, 0, - ZFS_TYPE_DATASET, NULL, NULL, 0, set_callback, &cb); + ret = zfs_for_each(argc - ds_start, argv + ds_start, 0, + ZFS_TYPE_DATASET, NULL, NULL, 0, set_callback, props); +error: + nvlist_free(props); return (ret); } Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Sun Oct 18 09:33:28 2015 (r289496) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Sun Oct 18 11:21:08 2015 (r289497) @@ -23,7 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 Pawel Jakub Dawidek . * All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2012 Martin Matuska . All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. @@ -430,6 +430,7 @@ extern nvlist_t *zfs_valid_proplist(libz extern const char *zfs_prop_to_name(zfs_prop_t); extern int zfs_prop_set(zfs_handle_t *, const char *, const char *); +extern int zfs_prop_set_list(zfs_handle_t *, nvlist_t *); extern int zfs_prop_get(zfs_handle_t *, zfs_prop_t, char *, size_t, zprop_source_t *, char *, size_t, boolean_t); extern int zfs_prop_get_recvd(zfs_handle_t *, const char *, char *, size_t, Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Sun Oct 18 09:33:28 2015 (r289496) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Sun Oct 18 11:21:08 2015 (r289497) @@ -1534,15 +1534,10 @@ zfs_setprop_error(libzfs_handle_t *hdl, int zfs_prop_set(zfs_handle_t *zhp, const char *propname, const char *propval) { - zfs_cmd_t zc = { 0 }; int ret = -1; - prop_changelist_t *cl = NULL; char errbuf[1024]; libzfs_handle_t *hdl = zhp->zfs_hdl; - nvlist_t *nvl = NULL, *realprops; - zfs_prop_t prop; - boolean_t do_prefix = B_TRUE; - int added_resv; + nvlist_t *nvl = NULL; (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "cannot set property for '%s'"), @@ -1554,79 +1549,148 @@ zfs_prop_set(zfs_handle_t *zhp, const ch goto error; } - if ((realprops = zfs_valid_proplist(hdl, zhp->zfs_type, nvl, - zfs_prop_get_int(zhp, ZFS_PROP_ZONED), zhp, errbuf)) == NULL) - goto error; + ret = zfs_prop_set_list(zhp, nvl); +error: nvlist_free(nvl); - nvl = realprops; + return (ret); +} - prop = zfs_name_to_prop(propname); - /* We don't support those properties on FreeBSD. */ - switch (prop) { - case ZFS_PROP_DEVICES: - case ZFS_PROP_ISCSIOPTIONS: - case ZFS_PROP_XATTR: - case ZFS_PROP_VSCAN: - case ZFS_PROP_NBMAND: - case ZFS_PROP_MLSLABEL: - (void) snprintf(errbuf, sizeof (errbuf), - "property '%s' not supported on FreeBSD", propname); - ret = zfs_error(hdl, EZFS_PERM, errbuf); - goto error; - } - if (prop == ZFS_PROP_VOLSIZE) { - if ((added_resv = zfs_add_synthetic_resv(zhp, nvl)) == -1) - goto error; - } +/* + * Given an nvlist of property names and values, set the properties for the + * given dataset. + */ +int +zfs_prop_set_list(zfs_handle_t *zhp, nvlist_t *props) +{ + zfs_cmd_t zc = { 0 }; + int ret = -1; + prop_changelist_t **cls = NULL; + int cl_idx; + char errbuf[1024]; + libzfs_handle_t *hdl = zhp->zfs_hdl; + nvlist_t *nvl; + int nvl_len; + int added_resv; - if ((cl = changelist_gather(zhp, prop, 0, 0)) == NULL) - goto error; + (void) snprintf(errbuf, sizeof (errbuf), + dgettext(TEXT_DOMAIN, "cannot set property for '%s'"), + zhp->zfs_name); - if (prop == ZFS_PROP_MOUNTPOINT && changelist_haszonedchild(cl)) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "child dataset with inherited mountpoint is used " - "in a non-global zone")); - ret = zfs_error(hdl, EZFS_ZONED, errbuf); + if ((nvl = zfs_valid_proplist(hdl, zhp->zfs_type, props, + zfs_prop_get_int(zhp, ZFS_PROP_ZONED), zhp, errbuf)) == NULL) goto error; - } /* - * We don't want to unmount & remount the dataset when changing - * its canmount property to 'on' or 'noauto'. We only use - * the changelist logic to unmount when setting canmount=off. - */ - if (prop == ZFS_PROP_CANMOUNT) { - uint64_t idx; - int err = zprop_string_to_index(prop, propval, &idx, - ZFS_TYPE_DATASET); - if (err == 0 && idx != ZFS_CANMOUNT_OFF) - do_prefix = B_FALSE; + * We have to check for any extra properties which need to be added + * before computing the length of the nvlist. + */ + for (nvpair_t *elem = nvlist_next_nvpair(nvl, NULL); + elem != NULL; + elem = nvlist_next_nvpair(nvl, elem)) { + if (zfs_name_to_prop(nvpair_name(elem)) == ZFS_PROP_VOLSIZE && + (added_resv = zfs_add_synthetic_resv(zhp, nvl)) == -1) { + goto error; + } } - - if (do_prefix && (ret = changelist_prefix(cl)) != 0) + /* + * Check how many properties we're setting and allocate an array to + * store changelist pointers for postfix(). + */ + nvl_len = 0; + for (nvpair_t *elem = nvlist_next_nvpair(nvl, NULL); + elem != NULL; + elem = nvlist_next_nvpair(nvl, elem)) + nvl_len++; + if ((cls = calloc(nvl_len, sizeof (prop_changelist_t *))) == NULL) goto error; + cl_idx = 0; + for (nvpair_t *elem = nvlist_next_nvpair(nvl, NULL); + elem != NULL; + elem = nvlist_next_nvpair(nvl, elem)) { + + zfs_prop_t prop = zfs_name_to_prop(nvpair_name(elem)); + + assert(cl_idx < nvl_len); + /* + * We don't want to unmount & remount the dataset when changing + * its canmount property to 'on' or 'noauto'. We only use + * the changelist logic to unmount when setting canmount=off. + */ + if (!(prop == ZFS_PROP_CANMOUNT && + fnvpair_value_uint64(elem) != ZFS_CANMOUNT_OFF)) { + cls[cl_idx] = changelist_gather(zhp, prop, 0, 0); + if (cls[cl_idx] == NULL) + goto error; + } + + if (prop == ZFS_PROP_MOUNTPOINT && + changelist_haszonedchild(cls[cl_idx])) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "child dataset with inherited mountpoint is used " + "in a non-global zone")); + ret = zfs_error(hdl, EZFS_ZONED, errbuf); + goto error; + } + + /* We don't support those properties on FreeBSD. */ + switch (prop) { + case ZFS_PROP_DEVICES: + case ZFS_PROP_ISCSIOPTIONS: + case ZFS_PROP_XATTR: + case ZFS_PROP_VSCAN: + case ZFS_PROP_NBMAND: + case ZFS_PROP_MLSLABEL: + (void) snprintf(errbuf, sizeof (errbuf), + "property '%s' not supported on FreeBSD", + nvpair_name(elem)); + ret = zfs_error(hdl, EZFS_PERM, errbuf); + goto error; + } + + if (cls[cl_idx] != NULL && + (ret = changelist_prefix(cls[cl_idx])) != 0) + goto error; + + cl_idx++; + } + assert(cl_idx == nvl_len); + /* - * Execute the corresponding ioctl() to set this property. + * Execute the corresponding ioctl() to set this list of properties. */ (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name)); - if (zcmd_write_src_nvlist(hdl, &zc, nvl) != 0) + if ((ret = zcmd_write_src_nvlist(hdl, &zc, nvl)) != 0 || + (ret = zcmd_alloc_dst_nvlist(hdl, &zc, 0)) != 0) goto error; ret = zfs_ioctl(hdl, ZFS_IOC_SET_PROP, &zc); if (ret != 0) { - zfs_setprop_error(hdl, prop, errno, errbuf); + /* Get the list of unset properties back and report them. */ + nvlist_t *errorprops = NULL; + if (zcmd_read_dst_nvlist(hdl, &zc, &errorprops) != 0) + goto error; + for (nvpair_t *elem = nvlist_next_nvpair(nvl, NULL); + elem != NULL; + elem = nvlist_next_nvpair(nvl, elem)) { + zfs_prop_t prop = zfs_name_to_prop(nvpair_name(elem)); + zfs_setprop_error(hdl, prop, errno, errbuf); + } + nvlist_free(errorprops); + if (added_resv && errno == ENOSPC) { /* clean up the volsize property we tried to set */ uint64_t old_volsize = zfs_prop_get_int(zhp, ZFS_PROP_VOLSIZE); nvlist_free(nvl); + nvl = NULL; zcmd_free_nvlists(&zc); + if (nvlist_alloc(&nvl, NV_UNIQUE_NAME, 0) != 0) goto error; if (nvlist_add_uint64(nvl, @@ -1638,8 +1702,13 @@ zfs_prop_set(zfs_handle_t *zhp, const ch (void) zfs_ioctl(hdl, ZFS_IOC_SET_PROP, &zc); } } else { - if (do_prefix) - ret = changelist_postfix(cl); + for (cl_idx = 0; cl_idx < nvl_len; cl_idx++) { + if (cls[cl_idx] != NULL) { + int clp_err = changelist_postfix(cls[cl_idx]); + if (clp_err != 0) + ret = clp_err; + } + } /* * Refresh the statistics so the new property value @@ -1652,8 +1721,13 @@ zfs_prop_set(zfs_handle_t *zhp, const ch error: nvlist_free(nvl); zcmd_free_nvlists(&zc); - if (cl) - changelist_free(cl); + if (cls != NULL) { + for (cl_idx = 0; cl_idx < nvl_len; cl_idx++) { + if (cls[cl_idx] != NULL) + changelist_free(cls[cl_idx]); + } + free(cls); + } return (ret); } @@ -4203,7 +4277,7 @@ zfs_smb_acl_mgmt(libzfs_handle_t *hdl, c if (cmd == ZFS_SMB_ACL_RENAME) { if (nvlist_alloc(&nvlist, NV_UNIQUE_NAME, 0) != 0) { (void) no_memory(hdl); - return (NULL); + return (0); } } Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Sun Oct 18 09:33:28 2015 (r289496) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Sun Oct 18 11:21:08 2015 (r289497) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. */ /* @@ -782,8 +782,9 @@ zcmd_alloc_dst_nvlist(libzfs_handle_t *h if (len == 0) len = 16 * 1024; zc->zc_nvlist_dst_size = len; - if ((zc->zc_nvlist_dst = (uint64_t)(uintptr_t) - zfs_alloc(hdl, zc->zc_nvlist_dst_size)) == 0) + zc->zc_nvlist_dst = + (uint64_t)(uintptr_t)zfs_alloc(hdl, zc->zc_nvlist_dst_size); + if (zc->zc_nvlist_dst == 0) return (-1); return (0); @@ -798,9 +799,9 @@ int zcmd_expand_dst_nvlist(libzfs_handle_t *hdl, zfs_cmd_t *zc) { free((void *)(uintptr_t)zc->zc_nvlist_dst); - if ((zc->zc_nvlist_dst = (uint64_t)(uintptr_t) - zfs_alloc(hdl, zc->zc_nvlist_dst_size)) - == 0) + zc->zc_nvlist_dst = + (uint64_t)(uintptr_t)zfs_alloc(hdl, zc->zc_nvlist_dst_size); + if (zc->zc_nvlist_dst == 0) return (-1); return (0); @@ -815,6 +816,9 @@ zcmd_free_nvlists(zfs_cmd_t *zc) free((void *)(uintptr_t)zc->zc_nvlist_conf); free((void *)(uintptr_t)zc->zc_nvlist_src); free((void *)(uintptr_t)zc->zc_nvlist_dst); + zc->zc_nvlist_conf = NULL; + zc->zc_nvlist_src = NULL; + zc->zc_nvlist_dst = NULL; } static int From owner-svn-src-all@freebsd.org Sun Oct 18 11:24: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 79EC8A18BE7; Sun, 18 Oct 2015 11:24:00 +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 38981EC4; Sun, 18 Oct 2015 11:24: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 t9IBNxWe037487; Sun, 18 Oct 2015 11:23:59 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IBNxoS037483; Sun, 18 Oct 2015 11:23:59 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181123.t9IBNxoS037483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 11:23:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289498 - in vendor/illumos/dist: cmd/zfs lib/libzfs/common X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 11:24:00 -0000 Author: mav Date: Sun Oct 18 11:23:58 2015 New Revision: 289498 URL: https://svnweb.freebsd.org/changeset/base/289498 Log: 6298 zfs_create_008_neg and zpool_create_023_neg need to be updated for large block support Reviewed by: Matthew Ahrens Reviewed by: John Kennedy Approved by: Robert Mustacchi Author: Joe Stein illumos/illumos-gate@e9316f7696401f3e5e263a5939031cb8d5641a88 Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c vendor/illumos/dist/lib/libzfs/common/libzfs.h vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c ============================================================================== --- vendor/illumos/dist/cmd/zfs/zfs_main.c Sun Oct 18 11:21:08 2015 (r289497) +++ vendor/illumos/dist/cmd/zfs/zfs_main.c Sun Oct 18 11:23:58 2015 (r289498) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright 2012 Milan Jurik. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. @@ -809,7 +809,6 @@ zfs_do_create(int argc, char **argv) goto error; spa_version = zpool_get_prop_int(zpool_handle, ZPOOL_PROP_VERSION, NULL); - zpool_close(zpool_handle); if (spa_version >= SPA_VERSION_REFRESERVATION) resv_prop = ZFS_PROP_REFRESERVATION; else @@ -818,8 +817,11 @@ zfs_do_create(int argc, char **argv) (void) snprintf(msg, sizeof (msg), gettext("cannot create '%s'"), argv[0]); if (props && (real_props = zfs_valid_proplist(g_zfs, type, - props, 0, NULL, msg)) == NULL) + props, 0, NULL, zpool_handle, msg)) == NULL) { + zpool_close(zpool_handle); goto error; + } + zpool_close(zpool_handle); volsize = zvol_volsize_to_reservation(volsize, real_props); nvlist_free(real_props); Modified: vendor/illumos/dist/lib/libzfs/common/libzfs.h ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs.h Sun Oct 18 11:21:08 2015 (r289497) +++ vendor/illumos/dist/lib/libzfs/common/libzfs.h Sun Oct 18 11:23:58 2015 (r289498) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. * Copyright 2013 Nexenta Systems, Inc. All rights reserved. @@ -421,7 +421,7 @@ extern const char *zfs_prop_column_name( extern boolean_t zfs_prop_align_right(zfs_prop_t); extern nvlist_t *zfs_valid_proplist(libzfs_handle_t *, zfs_type_t, - nvlist_t *, uint64_t, zfs_handle_t *, const char *); + nvlist_t *, uint64_t, zfs_handle_t *, zpool_handle_t *, const char *); extern const char *zfs_prop_to_name(zfs_prop_t); extern int zfs_prop_set(zfs_handle_t *, const char *, const char *); Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Sun Oct 18 11:21:08 2015 (r289497) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Sun Oct 18 11:23:58 2015 (r289498) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2012 DEY Storage Systems, Inc. All rights reserved. * Copyright (c) 2013 Martin Matuska. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. @@ -858,7 +858,8 @@ zfs_which_resv_prop(zfs_handle_t *zhp, z */ nvlist_t * zfs_valid_proplist(libzfs_handle_t *hdl, zfs_type_t type, nvlist_t *nvl, - uint64_t zoned, zfs_handle_t *zhp, const char *errbuf) + uint64_t zoned, zfs_handle_t *zhp, zpool_handle_t *zpool_hdl, + const char *errbuf) { nvpair_t *elem; uint64_t intval; @@ -1052,8 +1053,8 @@ zfs_valid_proplist(libzfs_handle_t *hdl, case ZFS_PROP_RECORDSIZE: { int maxbs = SPA_MAXBLOCKSIZE; - if (zhp != NULL) { - maxbs = zpool_get_prop_int(zhp->zpool_hdl, + if (zpool_hdl != NULL) { + maxbs = zpool_get_prop_int(zpool_hdl, ZPOOL_PROP_MAXBLOCKSIZE, NULL); } /* @@ -1545,7 +1546,8 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvl zhp->zfs_name); if ((nvl = zfs_valid_proplist(hdl, zhp->zfs_type, props, - zfs_prop_get_int(zhp, ZFS_PROP_ZONED), zhp, errbuf)) == NULL) + zfs_prop_get_int(zhp, ZFS_PROP_ZONED), zhp, zhp->zpool_hdl, + errbuf)) == NULL) goto error; /* @@ -3181,9 +3183,23 @@ zfs_create(libzfs_handle_t *hdl, const c else ost = DMU_OST_ZFS; + /* open zpool handle for prop validation */ + char pool_path[MAXNAMELEN]; + (void) strlcpy(pool_path, path, sizeof (pool_path)); + + /* truncate pool_path at first slash */ + char *p = strchr(pool_path, '/'); + if (p != NULL) + *p = '\0'; + + zpool_handle_t *zpool_handle = zpool_open(hdl, pool_path); + if (props && (props = zfs_valid_proplist(hdl, type, props, - zoned, NULL, errbuf)) == 0) + zoned, NULL, zpool_handle, errbuf)) == 0) { + zpool_close(zpool_handle); return (-1); + } + zpool_close(zpool_handle); if (type == ZFS_TYPE_VOLUME) { /* @@ -3251,13 +3267,6 @@ zfs_create(libzfs_handle_t *hdl, const c "parent '%s' is not a filesystem"), parent); return (zfs_error(hdl, EZFS_BADTYPE, errbuf)); - case EDOM: - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "volume block size must be power of 2 from " - "512B to 128KB")); - - return (zfs_error(hdl, EZFS_BADPROP, errbuf)); - case ENOTSUP: zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "pool must be upgraded to set this " @@ -3452,7 +3461,7 @@ zfs_clone(zfs_handle_t *zhp, const char type = ZFS_TYPE_FILESYSTEM; } if ((props = zfs_valid_proplist(hdl, type, props, zoned, - zhp, errbuf)) == NULL) + zhp, zhp->zpool_hdl, errbuf)) == NULL) return (-1); } @@ -3596,11 +3605,23 @@ zfs_snapshot_nvl(libzfs_handle_t *hdl, n } } + /* + * get pool handle for prop validation. assumes all snaps are in the + * same pool, as does lzc_snapshot (below). + */ + char pool[MAXNAMELEN]; + elem = nvlist_next_nvpair(snaps, NULL); + (void) strlcpy(pool, nvpair_name(elem), sizeof (pool)); + pool[strcspn(pool, "/@")] = '\0'; + zpool_handle_t *zpool_hdl = zpool_open(hdl, pool); + if (props != NULL && (props = zfs_valid_proplist(hdl, ZFS_TYPE_SNAPSHOT, - props, B_FALSE, NULL, errbuf)) == NULL) { + props, B_FALSE, NULL, zpool_hdl, errbuf)) == NULL) { + zpool_close(zpool_hdl); return (-1); } + zpool_close(zpool_hdl); ret = lzc_snapshot(snaps, props, &errors); Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Sun Oct 18 11:21:08 2015 (r289497) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Sun Oct 18 11:23:58 2015 (r289498) @@ -1131,8 +1131,8 @@ zpool_create(libzfs_handle_t *hdl, const zfs_prop_to_name(ZFS_PROP_ZONED), &zonestr) == 0) && strcmp(zonestr, "on") == 0); - if ((zc_fsprops = zfs_valid_proplist(hdl, - ZFS_TYPE_FILESYSTEM, fsprops, zoned, NULL, msg)) == NULL) { + if ((zc_fsprops = zfs_valid_proplist(hdl, ZFS_TYPE_FILESYSTEM, + fsprops, zoned, NULL, NULL, msg)) == NULL) { goto create_failed; } if (!zc_props && @@ -1168,6 +1168,21 @@ zpool_create(libzfs_handle_t *hdl, const "one or more vdevs refer to the same device")); return (zfs_error(hdl, EZFS_BADDEV, msg)); + case ERANGE: + /* + * This happens if the record size is smaller or larger + * than the allowed size range, or not a power of 2. + * + * NOTE: although zfs_valid_proplist is called earlier, + * this case may have slipped through since the + * pool does not exist yet and it is therefore + * impossible to read properties e.g. max blocksize + * from the pool. + */ + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "record size invalid")); + return (zfs_error(hdl, EZFS_BADPROP, msg)); + case EOVERFLOW: /* * This occurs when one of the devices is below From owner-svn-src-all@freebsd.org Sun Oct 18 11:36: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 43816A18EB4; Sun, 18 Oct 2015 11:36: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 173A9365; Sun, 18 Oct 2015 11:36: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 t9IBai5t040499; Sun, 18 Oct 2015 11:36:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IBaheE040497; Sun, 18 Oct 2015 11:36:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181136.t9IBaheE040497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 11:36:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289499 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 11:36:45 -0000 Author: mav Date: Sun Oct 18 11:36:43 2015 New Revision: 289499 URL: https://svnweb.freebsd.org/changeset/base/289499 Log: MFV r247180: Update vendor/illumos/dist and vendor-sys/illumos/dist to illumos-gate 13967:92bec6d87f59 Illumos ZFS issues: 3557 dumpvp_size is not updated correctly when a dump zvol's size is changed 3558 setting the volsize on a dump device does not return back ENOSPC 3559 setting a volsize larger than the space available sometimes succeeds Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sun Oct 18 11:23:58 2015 (r289498) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sun Oct 18 11:36:43 2015 (r289499) @@ -845,10 +845,12 @@ zfs_do_create(int argc, char **argv) if (type == ZFS_TYPE_VOLUME && !noreserve) { zpool_handle_t *zpool_handle; + nvlist_t *real_props; uint64_t spa_version; char *p; zfs_prop_t resv_prop; char *strval; + char msg[1024]; if (p = strchr(argv[0], '/')) *p = '\0'; @@ -864,7 +866,15 @@ zfs_do_create(int argc, char **argv) resv_prop = ZFS_PROP_REFRESERVATION; else resv_prop = ZFS_PROP_RESERVATION; - volsize = zvol_volsize_to_reservation(volsize, props); + + (void) snprintf(msg, sizeof (msg), + gettext("cannot create '%s'"), argv[0]); + if (props && (real_props = zfs_valid_proplist(g_zfs, type, + props, 0, NULL, msg)) == NULL) + goto error; + + volsize = zvol_volsize_to_reservation(volsize, real_props); + nvlist_free(real_props); if (nvlist_lookup_string(props, zfs_prop_to_name(resv_prop), &strval) != 0) { Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Sun Oct 18 11:23:58 2015 (r289498) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Sun Oct 18 11:36:43 2015 (r289499) @@ -1403,6 +1403,7 @@ zfs_add_synthetic_resv(zfs_handle_t *zhp uint64_t old_reservation; uint64_t new_reservation; zfs_prop_t resv_prop; + nvlist_t *props; /* * If this is an existing volume, and someone is setting the volsize, @@ -1412,16 +1413,25 @@ zfs_add_synthetic_resv(zfs_handle_t *zhp if (zfs_which_resv_prop(zhp, &resv_prop) < 0) return (-1); old_reservation = zfs_prop_get_int(zhp, resv_prop); - if ((zvol_volsize_to_reservation(old_volsize, zhp->zfs_props) != - old_reservation) || nvlist_lookup_uint64(nvl, - zfs_prop_to_name(resv_prop), &new_reservation) != ENOENT) { + + props = fnvlist_alloc(); + fnvlist_add_uint64(props, zfs_prop_to_name(ZFS_PROP_VOLBLOCKSIZE), + zfs_prop_get_int(zhp, ZFS_PROP_VOLBLOCKSIZE)); + + if ((zvol_volsize_to_reservation(old_volsize, props) != + old_reservation) || nvlist_exists(nvl, + zfs_prop_to_name(resv_prop))) { + fnvlist_free(props); return (0); } if (nvlist_lookup_uint64(nvl, zfs_prop_to_name(ZFS_PROP_VOLSIZE), - &new_volsize) != 0) + &new_volsize) != 0) { + fnvlist_free(props); return (-1); - new_reservation = zvol_volsize_to_reservation(new_volsize, - zhp->zfs_props); + } + new_reservation = zvol_volsize_to_reservation(new_volsize, props); + fnvlist_free(props); + if (nvlist_add_uint64(nvl, zfs_prop_to_name(resv_prop), new_reservation) != 0) { (void) no_memory(zhp->zfs_hdl); From owner-svn-src-all@freebsd.org Sun Oct 18 11: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 5076AA11154; Sun, 18 Oct 2015 11:44:33 +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 286B6AF7; Sun, 18 Oct 2015 11:44:33 +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 t9IBiWbF043355; Sun, 18 Oct 2015 11:44:32 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IBiVhW043350; Sun, 18 Oct 2015 11:44:31 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181144.t9IBiVhW043350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 11:44:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289500 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 11:44:33 -0000 Author: mav Date: Sun Oct 18 11:44:31 2015 New Revision: 289500 URL: https://svnweb.freebsd.org/changeset/base/289500 Log: MFC r289498: 6298 zfs_create_008_neg and zpool_create_023_neg need to be updated for large block support. Reviewed by: Matthew Ahrens Reviewed by: John Kennedy Approved by: Robert Mustacchi Author: Joe Stein illumos/illumos-gate@e9316f7696401f3e5e263a5939031cb8d5641a88 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sun Oct 18 11:36:43 2015 (r289499) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sun Oct 18 11:44:31 2015 (r289500) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright 2012 Milan Jurik. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2011-2012 Pawel Jakub Dawidek . @@ -861,7 +861,6 @@ zfs_do_create(int argc, char **argv) goto error; spa_version = zpool_get_prop_int(zpool_handle, ZPOOL_PROP_VERSION, NULL); - zpool_close(zpool_handle); if (spa_version >= SPA_VERSION_REFRESERVATION) resv_prop = ZFS_PROP_REFRESERVATION; else @@ -870,8 +869,11 @@ zfs_do_create(int argc, char **argv) (void) snprintf(msg, sizeof (msg), gettext("cannot create '%s'"), argv[0]); if (props && (real_props = zfs_valid_proplist(g_zfs, type, - props, 0, NULL, msg)) == NULL) + props, 0, NULL, zpool_handle, msg)) == NULL) { + zpool_close(zpool_handle); goto error; + } + zpool_close(zpool_handle); volsize = zvol_volsize_to_reservation(volsize, real_props); nvlist_free(real_props); Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Sun Oct 18 11:36:43 2015 (r289499) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Sun Oct 18 11:44:31 2015 (r289500) @@ -23,7 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 Pawel Jakub Dawidek . * All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2012 Martin Matuska . All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. @@ -426,7 +426,7 @@ extern const char *zfs_prop_column_name( extern boolean_t zfs_prop_align_right(zfs_prop_t); extern nvlist_t *zfs_valid_proplist(libzfs_handle_t *, zfs_type_t, - nvlist_t *, uint64_t, zfs_handle_t *, const char *); + nvlist_t *, uint64_t, zfs_handle_t *, zpool_handle_t *, const char *); extern const char *zfs_prop_to_name(zfs_prop_t); extern int zfs_prop_set(zfs_handle_t *, const char *, const char *); Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Sun Oct 18 11:36:43 2015 (r289499) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Sun Oct 18 11:44:31 2015 (r289500) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2012 DEY Storage Systems, Inc. All rights reserved. * Copyright (c) 2011-2012 Pawel Jakub Dawidek . * All rights reserved. @@ -890,7 +890,8 @@ zfs_which_resv_prop(zfs_handle_t *zhp, z */ nvlist_t * zfs_valid_proplist(libzfs_handle_t *hdl, zfs_type_t type, nvlist_t *nvl, - uint64_t zoned, zfs_handle_t *zhp, const char *errbuf) + uint64_t zoned, zfs_handle_t *zhp, zpool_handle_t *zpool_hdl, + const char *errbuf) { nvpair_t *elem; uint64_t intval; @@ -1084,8 +1085,8 @@ zfs_valid_proplist(libzfs_handle_t *hdl, case ZFS_PROP_RECORDSIZE: { int maxbs = SPA_MAXBLOCKSIZE; - if (zhp != NULL) { - maxbs = zpool_get_prop_int(zhp->zpool_hdl, + if (zpool_hdl != NULL) { + maxbs = zpool_get_prop_int(zpool_hdl, ZPOOL_PROP_MAXBLOCKSIZE, NULL); } /* @@ -1590,7 +1591,8 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvl zhp->zfs_name); if ((nvl = zfs_valid_proplist(hdl, zhp->zfs_type, props, - zfs_prop_get_int(zhp, ZFS_PROP_ZONED), zhp, errbuf)) == NULL) + zfs_prop_get_int(zhp, ZFS_PROP_ZONED), zhp, zhp->zpool_hdl, + errbuf)) == NULL) goto error; /* @@ -3254,9 +3256,23 @@ zfs_create(libzfs_handle_t *hdl, const c else ost = DMU_OST_ZFS; + /* open zpool handle for prop validation */ + char pool_path[MAXNAMELEN]; + (void) strlcpy(pool_path, path, sizeof (pool_path)); + + /* truncate pool_path at first slash */ + char *p = strchr(pool_path, '/'); + if (p != NULL) + *p = '\0'; + + zpool_handle_t *zpool_handle = zpool_open(hdl, pool_path); + if (props && (props = zfs_valid_proplist(hdl, type, props, - zoned, NULL, errbuf)) == 0) + zoned, NULL, zpool_handle, errbuf)) == 0) { + zpool_close(zpool_handle); return (-1); + } + zpool_close(zpool_handle); if (type == ZFS_TYPE_VOLUME) { /* @@ -3324,13 +3340,6 @@ zfs_create(libzfs_handle_t *hdl, const c "parent '%s' is not a filesystem"), parent); return (zfs_error(hdl, EZFS_BADTYPE, errbuf)); - case EDOM: - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "volume block size must be power of 2 from " - "512B to 128KB")); - - return (zfs_error(hdl, EZFS_BADPROP, errbuf)); - case ENOTSUP: zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "pool must be upgraded to set this " @@ -3525,7 +3534,7 @@ zfs_clone(zfs_handle_t *zhp, const char type = ZFS_TYPE_FILESYSTEM; } if ((props = zfs_valid_proplist(hdl, type, props, zoned, - zhp, errbuf)) == NULL) + zhp, zhp->zpool_hdl, errbuf)) == NULL) return (-1); } @@ -3669,11 +3678,23 @@ zfs_snapshot_nvl(libzfs_handle_t *hdl, n } } + /* + * get pool handle for prop validation. assumes all snaps are in the + * same pool, as does lzc_snapshot (below). + */ + char pool[MAXNAMELEN]; + elem = nvlist_next_nvpair(snaps, NULL); + (void) strlcpy(pool, nvpair_name(elem), sizeof (pool)); + pool[strcspn(pool, "/@")] = '\0'; + zpool_handle_t *zpool_hdl = zpool_open(hdl, pool); + if (props != NULL && (props = zfs_valid_proplist(hdl, ZFS_TYPE_SNAPSHOT, - props, B_FALSE, NULL, errbuf)) == NULL) { + props, B_FALSE, NULL, zpool_hdl, errbuf)) == NULL) { + zpool_close(zpool_hdl); return (-1); } + zpool_close(zpool_hdl); ret = lzc_snapshot(snaps, props, &errors); Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sun Oct 18 11:36:43 2015 (r289499) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sun Oct 18 11:44:31 2015 (r289500) @@ -1164,8 +1164,8 @@ zpool_create(libzfs_handle_t *hdl, const zfs_prop_to_name(ZFS_PROP_ZONED), &zonestr) == 0) && strcmp(zonestr, "on") == 0); - if ((zc_fsprops = zfs_valid_proplist(hdl, - ZFS_TYPE_FILESYSTEM, fsprops, zoned, NULL, msg)) == NULL) { + if ((zc_fsprops = zfs_valid_proplist(hdl, ZFS_TYPE_FILESYSTEM, + fsprops, zoned, NULL, NULL, msg)) == NULL) { goto create_failed; } if (!zc_props && @@ -1201,6 +1201,21 @@ zpool_create(libzfs_handle_t *hdl, const "one or more vdevs refer to the same device")); return (zfs_error(hdl, EZFS_BADDEV, msg)); + case ERANGE: + /* + * This happens if the record size is smaller or larger + * than the allowed size range, or not a power of 2. + * + * NOTE: although zfs_valid_proplist is called earlier, + * this case may have slipped through since the + * pool does not exist yet and it is therefore + * impossible to read properties e.g. max blocksize + * from the pool. + */ + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "record size invalid")); + return (zfs_error(hdl, EZFS_BADPROP, msg)); + case EOVERFLOW: /* * This occurs when one of the devices is below From owner-svn-src-all@freebsd.org Sun Oct 18 12:26: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 D89B5A10287; Sun, 18 Oct 2015 12:26:26 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 861531C6F; Sun, 18 Oct 2015 12:26:26 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9ICQPtC055011; Sun, 18 Oct 2015 12:26:25 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ICQPC6055010; Sun, 18 Oct 2015 12:26:25 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201510181226.t9ICQPC6055010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 18 Oct 2015 12:26:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289501 - 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: Sun, 18 Oct 2015 12:26:26 -0000 Author: melifaro Date: Sun Oct 18 12:26:25 2015 New Revision: 289501 URL: https://svnweb.freebsd.org/changeset/base/289501 Log: Fix deletion of ifaddr lle entries when deleting prefix from interface in down state. Regression appeared in r287789, where the "prefix has no corresponding installed route" case was forgotten. Additionally, lltable_delete_addr() was called with incorrect byte order (default is network for lltable code). While here, improve comments on given cases and byte order. PR: 203573 Submitted by: phk Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Sun Oct 18 11:44:31 2015 (r289500) +++ head/sys/netinet/in.c Sun Oct 18 12:26:25 2015 (r289501) @@ -734,14 +734,10 @@ in_scrubprefixlle(struct in_ifaddr *ia, struct sockaddr *saddr, *smask; struct ifnet *ifp; - /* - * remove all L2 entries on the given prefix - */ saddr = (struct sockaddr *)&addr; bzero(&addr, sizeof(addr)); addr.sin_len = sizeof(addr); addr.sin_family = AF_INET; - addr.sin_addr.s_addr = ntohl(ia->ia_addr.sin_addr.s_addr); smask = (struct sockaddr *)&mask; bzero(&mask, sizeof(mask)); mask.sin_len = sizeof(mask); @@ -749,10 +745,21 @@ in_scrubprefixlle(struct in_ifaddr *ia, mask.sin_addr.s_addr = ia->ia_subnetmask; ifp = ia->ia_ifp; - if (all) + if (all) { + + /* + * Remove all L2 entries matching given prefix. + * Convert address to host representation to avoid + * doing this on every callback. ia_subnetmask is already + * stored in host representation. + */ + addr.sin_addr.s_addr = ntohl(ia->ia_addr.sin_addr.s_addr); lltable_prefix_free(AF_INET, saddr, smask, flags); - else + } else { + /* Remove interface address only */ + addr.sin_addr.s_addr = ia->ia_addr.sin_addr.s_addr; lltable_delete_addr(LLTABLE(ifp), LLE_IFADDR, saddr); + } } /* @@ -808,6 +815,14 @@ in_scrubprefix(struct in_ifaddr *target, fibnum = V_rt_add_addr_allfibs ? RT_ALL_FIBS : target->ia_ifp->if_fib; rt_addrmsg(RTM_DELETE, &target->ia_ifa, fibnum); + + /* + * Removing address from !IFF_UP interface or + * prefix which exists on other interface (along with route). + * No entries should exist here except target addr. + * Given that, delete this entry only. + */ + in_scrubprefixlle(target, 0, flags); return (0); } From owner-svn-src-all@freebsd.org Sun Oct 18 13:23: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 884A9A16077; Sun, 18 Oct 2015 13:23:22 +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 564F27CC; Sun, 18 Oct 2015 13:23:22 +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 t9IDNLds072594; Sun, 18 Oct 2015 13:23:21 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IDNLCt072593; Sun, 18 Oct 2015 13:23:21 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201510181323.t9IDNLCt072593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 18 Oct 2015 13:23:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289502 - 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: Sun, 18 Oct 2015 13:23:22 -0000 Author: andrew Date: Sun Oct 18 13:23:21 2015 New Revision: 289502 URL: https://svnweb.freebsd.org/changeset/base/289502 Log: Correctly align the stack. The early csu assumed we passed the aux vector in through the stack pointer, however this may have been misaligned causing some userland applications to crash. A workaround was committed in r284707 where userland would check if the aux vector was passed using the old or new ABI and adjust the stack if needed. As 4 months have passed it is time to move to the new ABI, with the expectation the compat code in csu and the runtime linker to be removed in the future. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/machdep.c Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Sun Oct 18 12:26:25 2015 (r289501) +++ head/sys/arm64/arm64/machdep.c Sun Oct 18 13:23:21 2015 (r289502) @@ -251,7 +251,13 @@ exec_setregs(struct thread *td, struct i memset(tf, 0, sizeof(struct trapframe)); - tf->tf_sp = stack; + /* + * We need to set x0 for init as it doesn't call + * cpu_set_syscall_retval to copy the value. We also + * need to set td_retval for the cases where we do. + */ + tf->tf_x[0] = td->td_retval[0] = stack; + tf->tf_sp = STACKALIGN(stack); tf->tf_lr = imgp->entry_addr; tf->tf_elr = imgp->entry_addr; } From owner-svn-src-all@freebsd.org Sun Oct 18 13:52: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 7CA89A168C3; Sun, 18 Oct 2015 13:52:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 441811393; Sun, 18 Oct 2015 13:52:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IDqrdE081434; Sun, 18 Oct 2015 13:52:53 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IDqrf2081433; Sun, 18 Oct 2015 13:52:53 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181352.t9IDqrf2081433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 13:52:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289503 - stable/10/sys/compat/linprocfs 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: Sun, 18 Oct 2015 13:52:54 -0000 Author: trasz Date: Sun Oct 18 13:52:53 2015 New Revision: 289503 URL: https://svnweb.freebsd.org/changeset/base/289503 Log: MFC r280981: Remove unused code. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/compat/linprocfs/linprocfs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linprocfs/linprocfs.c ============================================================================== --- stable/10/sys/compat/linprocfs/linprocfs.c Sun Oct 18 13:23:21 2015 (r289502) +++ stable/10/sys/compat/linprocfs/linprocfs.c Sun Oct 18 13:52:53 2015 (r289503) @@ -393,7 +393,6 @@ linprocfs_domtab(PFS_FILL_ARGS) /* * Filler function for proc/partitions - * */ static int linprocfs_dopartitions(PFS_FILL_ARGS) @@ -401,27 +400,9 @@ linprocfs_dopartitions(PFS_FILL_ARGS) struct g_class *cp; struct g_geom *gp; struct g_provider *pp; - struct nameidata nd; - const char *lep; - char *dlep, *flep; - size_t lep_len; - int error; int major, minor; - /* resolve symlinks etc. in the emulation tree prefix */ - NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path, td); - flep = NULL; - error = namei(&nd); - lep = linux_emul_path; - if (error == 0) { - if (vn_fullpath(td, nd.ni_vp, &dlep, &flep) == 0) - lep = dlep; - vrele(nd.ni_vp); - } - lep_len = strlen(lep); - g_topology_lock(); - error = 0; sbuf_printf(sb, "major minor #blocks name rio rmerge rsect " "ruse wio wmerge wsect wuse running use aveq\n"); @@ -447,8 +428,7 @@ linprocfs_dopartitions(PFS_FILL_ARGS) } g_topology_unlock(); - free(flep, M_TEMP); - return (error); + return (0); } From owner-svn-src-all@freebsd.org Sun Oct 18 13:58: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 9749DA16AD6; Sun, 18 Oct 2015 13:58:18 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 485801845; Sun, 18 Oct 2015 13:58:18 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IDwHD9081680; Sun, 18 Oct 2015 13:58:17 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IDwHME081679; Sun, 18 Oct 2015 13:58:17 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181358.t9IDwHME081679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 13:58:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289504 - stable/10/sys/compat/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 13:58:18 -0000 Author: trasz Date: Sun Oct 18 13:58:17 2015 New Revision: 289504 URL: https://svnweb.freebsd.org/changeset/base/289504 Log: MFC r281689: Remove unused code from linux_mount(), and make it possible to mount any kind of filesystem instead of harcoded three. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/compat/linux/linux_file.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_file.c ============================================================================== --- stable/10/sys/compat/linux/linux_file.c Sun Oct 18 13:52:53 2015 (r289503) +++ stable/10/sys/compat/linux/linux_file.c Sun Oct 18 13:58:17 2015 (r289504) @@ -55,10 +55,6 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#include - #ifdef COMPAT_LINUX32 #include #include @@ -1072,12 +1068,10 @@ linux_pwrite(td, uap) int linux_mount(struct thread *td, struct linux_mount_args *args) { - struct ufs_args ufs; char fstypename[MFSNAMELEN]; char mntonname[MNAMELEN], mntfromname[MNAMELEN]; int error; int fsflags; - void *fsdata; error = copyinstr(args->filesystemtype, fstypename, MFSNAMELEN - 1, NULL); @@ -1098,20 +1092,10 @@ linux_mount(struct thread *td, struct li if (strcmp(fstypename, "ext2") == 0) { strcpy(fstypename, "ext2fs"); - fsdata = &ufs; - ufs.fspec = mntfromname; -#define DEFAULT_ROOTID -2 - ufs.export.ex_root = DEFAULT_ROOTID; - ufs.export.ex_flags = - args->rwflag & LINUX_MS_RDONLY ? MNT_EXRDONLY : 0; } else if (strcmp(fstypename, "proc") == 0) { strcpy(fstypename, "linprocfs"); - fsdata = NULL; } else if (strcmp(fstypename, "vfat") == 0) { strcpy(fstypename, "msdosfs"); - fsdata = NULL; - } else { - return (ENODEV); } fsflags = 0; @@ -1131,19 +1115,11 @@ linux_mount(struct thread *td, struct li fsflags |= MNT_UPDATE; } - if (strcmp(fstypename, "linprocfs") == 0) { - error = kernel_vmount(fsflags, - "fstype", fstypename, - "fspath", mntonname, - NULL); - } else if (strcmp(fstypename, "msdosfs") == 0) { - error = kernel_vmount(fsflags, - "fstype", fstypename, - "fspath", mntonname, - "from", mntfromname, - NULL); - } else - error = EOPNOTSUPP; + error = kernel_vmount(fsflags, + "fstype", fstypename, + "fspath", mntonname, + "from", mntfromname, + NULL); return (error); } From owner-svn-src-all@freebsd.org Sun Oct 18 14:01: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 0BA7EA16BCF; Sun, 18 Oct 2015 14:01:22 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC6151A61; Sun, 18 Oct 2015 14:01:21 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IE1KsJ084379; Sun, 18 Oct 2015 14:01:20 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IE1KAu084378; Sun, 18 Oct 2015 14:01:20 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181401.t9IE1KAu084378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:01: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: r289505 - stable/10/sys/compat/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 14:01:22 -0000 Author: trasz Date: Sun Oct 18 14:01:20 2015 New Revision: 289505 URL: https://svnweb.freebsd.org/changeset/base/289505 Log: MFC r281726: Optimize the O_NOCTTY handling hack in linux_common_open(). MFC r281728: Add back fdrop() missed in r281726. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/compat/linux/linux_file.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_file.c ============================================================================== --- stable/10/sys/compat/linux/linux_file.c Sun Oct 18 13:58:17 2015 (r289504) +++ stable/10/sys/compat/linux/linux_file.c Sun Oct 18 14:01:20 2015 (r289505) @@ -132,39 +132,39 @@ linux_common_open(struct thread *td, int /* XXX LINUX_O_NOATIME: unable to be easily implemented. */ error = kern_openat(td, dirfd, path, UIO_SYSSPACE, bsd_flags, mode); + if (error != 0) + goto done; - if (!error) { - fd = td->td_retval[0]; - /* - * XXX In between kern_open() and fget(), another process - * having the same filedesc could use that fd without - * checking below. - */ - error = fget(td, fd, cap_rights_init(&rights, CAP_IOCTL), &fp); - if (!error) { - sx_slock(&proctree_lock); - PROC_LOCK(p); - if (!(bsd_flags & O_NOCTTY) && - SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) { - PROC_UNLOCK(p); - sx_unlock(&proctree_lock); - /* XXXPJD: Verify if TIOCSCTTY is allowed. */ - if (fp->f_type == DTYPE_VNODE) - (void) fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0, - td->td_ucred, td); - } else { - PROC_UNLOCK(p); - sx_sunlock(&proctree_lock); - } + if (bsd_flags & O_NOCTTY) + goto done; + + /* + * XXX In between kern_open() and fget(), another process + * having the same filedesc could use that fd without + * checking below. + */ + fd = td->td_retval[0]; + if (fget(td, fd, cap_rights_init(&rights, CAP_IOCTL), &fp) == 0) { + if (fp->f_type != DTYPE_VNODE) { fdrop(fp, td); - /* - * XXX as above, fdrop()/kern_close() pair is racy. - */ - if (error) - kern_close(td, fd); + goto done; + } + sx_slock(&proctree_lock); + PROC_LOCK(p); + if (SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) { + PROC_UNLOCK(p); + sx_sunlock(&proctree_lock); + /* XXXPJD: Verify if TIOCSCTTY is allowed. */ + (void) fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0, + td->td_ucred, td); + } else { + PROC_UNLOCK(p); + sx_sunlock(&proctree_lock); } + fdrop(fp, td); } +done: #ifdef DEBUG if (ldebug(open)) printf(LMSG("open returns error %d"), error); From owner-svn-src-all@freebsd.org Sun Oct 18 14:16: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 BE37DA16FC9; Sun, 18 Oct 2015 14:16:02 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84599C5; Sun, 18 Oct 2015 14:16:02 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEG1gI087447; Sun, 18 Oct 2015 14:16:01 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEG1uf087446; Sun, 18 Oct 2015 14:16:01 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181416.t9IEG1uf087446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:16: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: r289506 - stable/10/sbin/init 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: Sun, 18 Oct 2015 14:16:02 -0000 Author: trasz Date: Sun Oct 18 14:16:01 2015 New Revision: 289506 URL: https://svnweb.freebsd.org/changeset/base/289506 Log: MFC r285847: Add missing SIGUSR1 description. Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/init/init.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/init/init.8 ============================================================================== --- stable/10/sbin/init/init.8 Sun Oct 18 14:01:20 2015 (r289505) +++ stable/10/sbin/init/init.8 Sun Oct 18 14:16:01 2015 (r289506) @@ -31,7 +31,7 @@ .\" @(#)init.8 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd March 14, 2012 +.Dd July 24, 2015 .Dt INIT 8 .Os .Sh NAME @@ -284,6 +284,7 @@ will signal the original as follows: .Bl -column Run-level SIGTERM .It Sy "Run-level Signal Action" +.It Cm 0 Ta Dv SIGUSR1 Ta "Halt" .It Cm 0 Ta Dv SIGUSR2 Ta "Halt and turn the power off" .It Cm 1 Ta Dv SIGTERM Ta "Go to single-user mode" .It Cm 6 Ta Dv SIGINT Ta "Reboot the machine" From owner-svn-src-all@freebsd.org Sun Oct 18 14:17: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 7731BA18059; Sun, 18 Oct 2015 14:17:31 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EA3221B; Sun, 18 Oct 2015 14:17:31 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEHUMA087545; Sun, 18 Oct 2015 14:17:30 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEHUJL087544; Sun, 18 Oct 2015 14:17:30 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181417.t9IEHUJL087544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:17: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: r289507 - 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: Sun, 18 Oct 2015 14:17:31 -0000 Author: trasz Date: Sun Oct 18 14:17:30 2015 New Revision: 289507 URL: https://svnweb.freebsd.org/changeset/base/289507 Log: MFC r285870: Document md_root in loader(8). The md(4) manual page mentions it, but it's hard to find and easy to miss. Sponsored by: The FreeBSD Foundation 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 Sun Oct 18 14:16:01 2015 (r289506) +++ stable/10/sys/boot/common/loader.8 Sun Oct 18 14:17:30 2015 (r289507) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 22, 2014 +.Dd July 25, 2015 .Dt LOADER 8 .Os .Sh NAME @@ -207,12 +207,18 @@ returns an error itself (see .Op Fl t Ar type .Ar file Cm ... .Xc -Loads a kernel, kernel loadable module (kld), or file of opaque -contents tagged as being of the type +Loads a kernel, kernel loadable module (kld), disk image, +or file of opaque contents tagged as being of the type .Ar type . Kernel and modules can be either in a.out or ELF format. Any arguments passed after the name of the file to be loaded will be passed as arguments to that file. +Use the +.Li md_image +type to make the kernel create a file-backed +.Xr md 4 +disk. +This is useful for booting from a temporary rootfs. Currently, argument passing does not work for the kernel. .Pp .It Ic load_geli Xo From owner-svn-src-all@freebsd.org Sun Oct 18 14:20: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 0CDA2A180D8; Sun, 18 Oct 2015 14:20:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA2133BB; Sun, 18 Oct 2015 14:20:12 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEKBkP087705; Sun, 18 Oct 2015 14:20:11 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEKBLA087704; Sun, 18 Oct 2015 14:20:11 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181420.t9IEKBLA087704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:20:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289508 - stable/10/sys/boot/forth X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 14:20:13 -0000 Author: trasz Date: Sun Oct 18 14:20:11 2015 New Revision: 289508 URL: https://svnweb.freebsd.org/changeset/base/289508 Log: MFC r285881: Add md_root example to defaults/loader.conf. Note that this doesn't quite work yet - the preloaded image gets loaded twice for some reason. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/boot/forth/loader.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/forth/loader.conf ============================================================================== --- stable/10/sys/boot/forth/loader.conf Sun Oct 18 14:17:30 2015 (r289507) +++ stable/10/sys/boot/forth/loader.conf Sun Oct 18 14:20:11 2015 (r289508) @@ -50,6 +50,16 @@ entropy_cache_type="/boot/entropy" ############################################################## +### Initial memory disk settings ########################### +############################################################## + +#initmd_load="YES" # The "initmd" prefix is arbitrary. +#initmd_type="md_image" # Create md(4) disk at boot. +#initmd_name="/boot/root.img" # Path to a file containing the image. +#rootdev="ufs:/dev/md0" # Set the root filesystem to md(4) device. + + +############################################################## ### Loader settings ######################################## ############################################################## From owner-svn-src-all@freebsd.org Sun Oct 18 14:25: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 7F7E9A182DB; Sun, 18 Oct 2015 14:25:06 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C98DA4C; Sun, 18 Oct 2015 14:25:06 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEP5iS090433; Sun, 18 Oct 2015 14:25:05 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEP5gX090432; Sun, 18 Oct 2015 14:25:05 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181425.t9IEP5gX090432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:25: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: r289509 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 14:25:06 -0000 Author: trasz Date: Sun Oct 18 14:25:04 2015 New Revision: 289509 URL: https://svnweb.freebsd.org/changeset/base/289509 Log: MFC r286226: Rework the way iSCSI initiator handles system shutdown. This fixes hangs on shutdown with LUNs with mounted filesystems over a disconnected iSCSI session. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Sun Oct 18 14:20:11 2015 (r289508) +++ stable/10/sys/dev/iscsi/iscsi.c Sun Oct 18 14:25:04 2015 (r289509) @@ -2324,11 +2324,23 @@ iscsi_shutdown(struct iscsi_softc *sc) { struct iscsi_session *is; - ISCSI_DEBUG("removing all sessions due to shutdown"); + /* + * Trying to reconnect during system shutdown would lead to hang. + */ + fail_on_disconnection = 1; + /* + * If we have any sessions waiting for reconnection, request + * maintenance thread to fail them immediately instead of waiting + * for reconnect timeout. + */ sx_slock(&sc->sc_lock); - TAILQ_FOREACH(is, &sc->sc_sessions, is_next) - iscsi_session_terminate(is); + TAILQ_FOREACH(is, &sc->sc_sessions, is_next) { + ISCSI_SESSION_LOCK(is); + if (is->is_waiting_for_iscsid) + iscsi_session_reconnect(is); + ISCSI_SESSION_UNLOCK(is); + } sx_sunlock(&sc->sc_lock); } @@ -2354,12 +2366,7 @@ iscsi_load(void) } sc->sc_cdev->si_drv1 = sc; - /* - * Note that this needs to get run before dashutdown(). Otherwise, - * when rebooting with iSCSI session with outstanding requests, - * but disconnected, dashutdown() will hang on cam_periph_runccb(). - */ - sc->sc_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_post_sync, + sc->sc_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_pre_sync, iscsi_shutdown, sc, SHUTDOWN_PRI_FIRST); return (0); @@ -2377,7 +2384,7 @@ iscsi_unload(void) } if (sc->sc_shutdown_eh != NULL) - EVENTHANDLER_DEREGISTER(shutdown_post_sync, sc->sc_shutdown_eh); + EVENTHANDLER_DEREGISTER(shutdown_pre_sync, sc->sc_shutdown_eh); sx_slock(&sc->sc_lock); TAILQ_FOREACH_SAFE(is, &sc->sc_sessions, is_next, tmp) From owner-svn-src-all@freebsd.org Sun Oct 18 14:31: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 050C8A184F8; Sun, 18 Oct 2015 14:31:56 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3E82D8A; Sun, 18 Oct 2015 14:31:55 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEVsXo093222; Sun, 18 Oct 2015 14:31:54 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEVs98093221; Sun, 18 Oct 2015 14:31:54 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181431.t9IEVs98093221@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:31: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: r289510 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 14:31:56 -0000 Author: trasz Date: Sun Oct 18 14:31:54 2015 New Revision: 289510 URL: https://svnweb.freebsd.org/changeset/base/289510 Log: MFC r286281: Mark vgonel() as static. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/kern/vfs_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_subr.c ============================================================================== --- stable/10/sys/kern/vfs_subr.c Sun Oct 18 14:25:04 2015 (r289509) +++ stable/10/sys/kern/vfs_subr.c Sun Oct 18 14:31:54 2015 (r289510) @@ -2802,7 +2802,7 @@ unlock: /* * vgone, with the vp interlock held. */ -void +static void vgonel(struct vnode *vp) { struct thread *td; From owner-svn-src-all@freebsd.org Sun Oct 18 14:34: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 1A343A18563; Sun, 18 Oct 2015 14:34:15 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D40A5FF2; Sun, 18 Oct 2015 14:34:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEYDng093388; Sun, 18 Oct 2015 14:34:13 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEYDvd093387; Sun, 18 Oct 2015 14:34:13 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181434.t9IEYDvd093387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:34: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: r289511 - stable/10/sys/geom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 14:34:15 -0000 Author: trasz Date: Sun Oct 18 14:34:13 2015 New Revision: 289511 URL: https://svnweb.freebsd.org/changeset/base/289511 Log: MFC r286237: Fix panic that would happen on forcibly unmounting devfs (note that as it is now, devfs ignores MNT_FORCE anyway, so it needs to be modified to trigger the panic) with consumers still opened. Note that this still results in a leak of r/w/e counters. It seems to be harmless, though. If anyone knows a better way to approach this - please tell. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/geom/geom_dev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/geom_dev.c ============================================================================== --- stable/10/sys/geom/geom_dev.c Sun Oct 18 14:31:54 2015 (r289510) +++ stable/10/sys/geom/geom_dev.c Sun Oct 18 14:34:13 2015 (r289511) @@ -399,6 +399,20 @@ g_dev_close(struct cdev *dev, int flags, #else e = 0; #endif + + /* + * The vgonel(9) - caused by eg. forced unmount of devfs - calls + * VOP_CLOSE(9) on devfs vnode without any FREAD or FWRITE flags, + * which would result in zero deltas, which in turn would cause + * panic in g_access(9). + * + * Note that we cannot zero the counters (ie. do "r = cp->acr" + * etc) instead, because the consumer might be opened in another + * devfs instance. + */ + if (r + w + e == 0) + return (EINVAL); + sc = cp->private; mtx_lock(&sc->sc_mtx); sc->sc_open += r + w + e; From owner-svn-src-all@freebsd.org Sun Oct 18 14:36: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 4368EA185FC; Sun, 18 Oct 2015 14:36:06 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DB701B6; Sun, 18 Oct 2015 14:36:05 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEa5c2093518; Sun, 18 Oct 2015 14:36:05 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEa5Lf093517; Sun, 18 Oct 2015 14:36:05 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181436.t9IEa5Lf093517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:36: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: r289512 - stable/10/sys/geom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 14:36:06 -0000 Author: trasz Date: Sun Oct 18 14:36:04 2015 New Revision: 289512 URL: https://svnweb.freebsd.org/changeset/base/289512 Log: MFC r286283: Fix panic triggered by code like this: open("/dev/md0", O_EXEC); Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/geom/geom_dev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/geom_dev.c ============================================================================== --- stable/10/sys/geom/geom_dev.c Sun Oct 18 14:34:13 2015 (r289511) +++ stable/10/sys/geom/geom_dev.c Sun Oct 18 14:36:04 2015 (r289512) @@ -356,6 +356,13 @@ g_dev_open(struct cdev *dev, int flags, #else e = 0; #endif + + /* + * This happens on attempt to open a device node with O_EXEC. + */ + if (r + w + e == 0) + return (EINVAL); + if (w) { /* * When running in very secure mode, do not allow From owner-svn-src-all@freebsd.org Sun Oct 18 14:41: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 68946A1870E; Sun, 18 Oct 2015 14:41:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 158B57BB; Sun, 18 Oct 2015 14:41:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEfdoL096274; Sun, 18 Oct 2015 14:41:39 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEfcnH096271; Sun, 18 Oct 2015 14:41:38 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181441.t9IEfcnH096271@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:41: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: r289513 - in stable/10/sys: fs/devfs 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: Sun, 18 Oct 2015 14:41:40 -0000 Author: trasz Date: Sun Oct 18 14:41:38 2015 New Revision: 289513 URL: https://svnweb.freebsd.org/changeset/base/289513 Log: MFC r287033: After r286237 it should be fine to call vgone(9) on a busy GEOM vnode; remove KASSERT that would prevent forced devfs unmount from working. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/devfs/devfs_vnops.c stable/10/sys/kern/vfs_subr.c stable/10/sys/sys/vnode.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/devfs/devfs_vnops.c ============================================================================== --- stable/10/sys/fs/devfs/devfs_vnops.c Sun Oct 18 14:36:04 2015 (r289512) +++ stable/10/sys/fs/devfs/devfs_vnops.c Sun Oct 18 14:41:38 2015 (r289513) @@ -64,6 +64,7 @@ #include static struct vop_vector devfs_vnodeops; +static struct vop_vector devfs_specops; static struct fileops devfs_ops_f; #include @@ -1763,7 +1764,7 @@ static struct vop_vector devfs_vnodeops .vop_vptocnp = devfs_vptocnp, }; -struct vop_vector devfs_specops = { +static struct vop_vector devfs_specops = { .vop_default = &default_vnodeops, .vop_access = devfs_access, Modified: stable/10/sys/kern/vfs_subr.c ============================================================================== --- stable/10/sys/kern/vfs_subr.c Sun Oct 18 14:36:04 2015 (r289512) +++ stable/10/sys/kern/vfs_subr.c Sun Oct 18 14:41:38 2015 (r289513) @@ -2661,10 +2661,6 @@ loop: * If FORCECLOSE is set, forcibly close the vnode. */ if (vp->v_usecount == 0 || (flags & FORCECLOSE)) { - VNASSERT(vp->v_usecount == 0 || - vp->v_op != &devfs_specops || - (vp->v_type != VCHR && vp->v_type != VBLK), vp, - ("device VNODE %p is FORCECLOSED", vp)); vgonel(vp); } else { busy++; Modified: stable/10/sys/sys/vnode.h ============================================================================== --- stable/10/sys/sys/vnode.h Sun Oct 18 14:36:04 2015 (r289512) +++ stable/10/sys/sys/vnode.h Sun Oct 18 14:41:38 2015 (r289513) @@ -822,7 +822,6 @@ void vnode_destroy_vobject(struct vnode extern struct vop_vector fifo_specops; extern struct vop_vector dead_vnodeops; extern struct vop_vector default_vnodeops; -extern struct vop_vector devfs_specops; #define VOP_PANIC ((void*)(uintptr_t)vop_panic) #define VOP_NULL ((void*)(uintptr_t)vop_null) From owner-svn-src-all@freebsd.org Sun Oct 18 14:46: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 90ADBA188E4; Sun, 18 Oct 2015 14:46:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4149F9C3; Sun, 18 Oct 2015 14:46:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEkC6o096504; Sun, 18 Oct 2015 14:46:12 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEkCRS096503; Sun, 18 Oct 2015 14:46:12 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181446.t9IEkCRS096503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:46:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289514 - stable/10/sbin/mdconfig 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: Sun, 18 Oct 2015 14:46:13 -0000 Author: trasz Date: Sun Oct 18 14:46:12 2015 New Revision: 289514 URL: https://svnweb.freebsd.org/changeset/base/289514 Log: MFC r257165 (by jmg@): Document that -a will output the device name when -u is not specified.. when -u is specified it is not... update the docs to say that you can use full device names w/ -u, and update the examples... Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/mdconfig/mdconfig.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mdconfig/mdconfig.8 ============================================================================== --- stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:41:38 2015 (r289513) +++ stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:46:12 2015 (r289514) @@ -89,6 +89,9 @@ Options indicate an action to be perform Attach a memory disk. This will configure and attach a memory disk with the parameters specified and attach it to the system. +If the +.Fl u Ar unit +option is not provided, the newly created device name will be printed on stdout. .It Fl d Detach a memory disk from the system and release all resources. .It Fl r @@ -209,9 +212,12 @@ that might adversely affect the system. Enable/disable readonly mode. .El .It Fl u Ar unit -Request a specific unit number for the +Request a specific unit number or device name for the .Xr md 4 device instead of automatic allocation. +If a device name is specified, it must be start with +.Dq md +followed by the unit number. .El .Pp The last form, @@ -237,19 +243,19 @@ with .Pa /tmp/boot.flp as backing storage: .Pp -.Dl mdconfig -a -t vnode -f /tmp/boot.flp -u 4 +.Dl mdconfig -a -t vnode -f /tmp/boot.flp -u md4 .Pp Detach and free all resources used by .Pa /dev/md4 : .Pp -.Dl mdconfig -d -u 4 +.Dl mdconfig -d -u md4 .Pp Create a 128MByte swap backed disk, initialize an .Xr ffs 7 file system on it, and mount it on .Pa /tmp : .Bd -literal -offset indent -mdconfig -a -t swap -s 128M -u 10 +mdconfig -a -t swap -s 128M -u md10 newfs -U /dev/md10 mount /dev/md10 /tmp chmod 1777 /tmp @@ -263,7 +269,7 @@ are implied .Pc : .Bd -literal -offset indent dd if=/dev/zero of=somebackingfile bs=1k count=5k -mdconfig -f somebackingfile -u 0 +mdconfig -f somebackingfile -u md0 bsdlabel -w md0 auto newfs md0c mount /dev/md0c /mnt @@ -290,7 +296,7 @@ is used to skip over the header informat .Pa md1.nop to the start of the filesystem in the image. .Bd -literal -offset indent -mdconfig -f diskimage.img -u 1 +mdconfig -f diskimage.img -u md1 gnop create -o 512K md1 mount /dev/md1.nop /mnt .Ed From owner-svn-src-all@freebsd.org Sun Oct 18 14:47: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 25839A1893A; Sun, 18 Oct 2015 14:47:21 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2A3AB0D; Sun, 18 Oct 2015 14:47:20 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IElJGh096598; Sun, 18 Oct 2015 14:47:19 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IElJ7Q096597; Sun, 18 Oct 2015 14:47:19 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181447.t9IElJ7Q096597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:47: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: r289515 - stable/10/sbin/mdconfig 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: Sun, 18 Oct 2015 14:47:21 -0000 Author: trasz Date: Sun Oct 18 14:47:19 2015 New Revision: 289515 URL: https://svnweb.freebsd.org/changeset/base/289515 Log: MFC r257182 (by jmg@): bump date forgotten in r257165 Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/mdconfig/mdconfig.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mdconfig/mdconfig.8 ============================================================================== --- stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:46:12 2015 (r289514) +++ stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:47:19 2015 (r289515) @@ -41,7 +41,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 20, 2013 +.Dd October 26, 2013 .Dt MDCONFIG 8 .Os .Sh NAME From owner-svn-src-all@freebsd.org Sun Oct 18 14:52: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 71BFBA18AF5; Sun, 18 Oct 2015 14:52:33 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32372F98; Sun, 18 Oct 2015 14:52:33 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEqWkU099333; Sun, 18 Oct 2015 14:52:32 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEqVh9099329; Sun, 18 Oct 2015 14:52:31 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181452.t9IEqVh9099329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:52:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289516 - in stable/10: sbin/mdconfig sys/dev/md 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: Sun, 18 Oct 2015 14:52:33 -0000 Author: trasz Date: Sun Oct 18 14:52:31 2015 New Revision: 289516 URL: https://svnweb.freebsd.org/changeset/base/289516 Log: MFC r258909: Tweak mdconfig(8) manual page, in particular revise the EXAMPLES section. This removes stuff that doesn't really belong there, and simplifies examples for the basic operations. Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/mdconfig/mdconfig.8 stable/10/sbin/mdconfig/mdconfig.c stable/10/sys/dev/md/md.c stable/10/sys/sys/mdioctl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mdconfig/mdconfig.8 ============================================================================== --- stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:47:19 2015 (r289515) +++ stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:52:31 2015 (r289516) @@ -41,7 +41,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 26, 2013 +.Dd November 30, 2013 .Dt MDCONFIG 8 .Os .Sh NAME @@ -122,6 +122,8 @@ Using backing is generally preferred instead of using .Cm malloc backing. +.It Cm null +Bitsink; all writes do nothing, all reads return zeroes. .El .It Fl f Ar file Filename to use for the vnode type memory disk. Modified: stable/10/sbin/mdconfig/mdconfig.c ============================================================================== --- stable/10/sbin/mdconfig/mdconfig.c Sun Oct 18 14:47:19 2015 (r289515) +++ stable/10/sbin/mdconfig/mdconfig.c Sun Oct 18 14:52:31 2015 (r289516) @@ -155,6 +155,9 @@ main(int argc, char **argv) } else if (!strcmp(optarg, "swap")) { mdio.md_type = MD_SWAP; mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS; + } else if (!strcmp(optarg, "null")) { + mdio.md_type = MD_NULL; + mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS; } else errx(1, "unknown type: %s", optarg); break; @@ -287,9 +290,10 @@ main(int argc, char **argv) } } - if ((mdio.md_type == MD_MALLOC || mdio.md_type == MD_SWAP) && - sflag == NULL) - errx(1, "must specify -s for -t malloc or -t swap"); + if ((mdio.md_type == MD_MALLOC || mdio.md_type == MD_SWAP || + mdio.md_type == MD_NULL) && sflag == NULL) + errx(1, "must specify -s for -t malloc, -t swap, " + "or -t null"); if (mdio.md_type == MD_VNODE && mdio.md_file[0] == '\0') errx(1, "must specify -f for -t vnode"); } else { Modified: stable/10/sys/dev/md/md.c ============================================================================== --- stable/10/sys/dev/md/md.c Sun Oct 18 14:47:19 2015 (r289515) +++ stable/10/sys/dev/md/md.c Sun Oct 18 14:52:31 2015 (r289516) @@ -911,6 +911,22 @@ mdstart_swap(struct md_s *sc, struct bio return (rv != VM_PAGER_ERROR ? 0 : ENOSPC); } +static int +mdstart_null(struct md_s *sc, struct bio *bp) +{ + + switch (bp->bio_cmd) { + case BIO_READ: + bzero(bp->bio_data, bp->bio_length); + cpu_flush_dcache(bp->bio_data, bp->bio_length); + break; + case BIO_WRITE: + break; + } + bp->bio_resid = 0; + return (0); +} + static void md_kthread(void *arg) { @@ -1030,6 +1046,7 @@ mdinit(struct md_s *sc) pp->flags |= G_PF_ACCEPT_UNMAPPED; break; case MD_PRELOAD: + case MD_NULL: break; } sc->gp = gp; @@ -1248,6 +1265,7 @@ mdresize(struct md_s *sc, struct md_ioct switch (sc->type) { case MD_VNODE: + case MD_NULL: break; case MD_SWAP: if (mdio->md_mediasize <= 0 || @@ -1342,6 +1360,19 @@ mdcreate_swap(struct md_s *sc, struct md return (error); } +static int +mdcreate_null(struct md_s *sc, struct md_ioctl *mdio, struct thread *td) +{ + + /* + * Range check. Disallow negative sizes or any size less then the + * size of a page. Then round to a page. + */ + if (sc->mediasize <= 0 || (sc->mediasize % PAGE_SIZE) != 0) + return (EDOM); + + return (0); +} static int xmdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) @@ -1374,6 +1405,7 @@ xmdctlioctl(struct cdev *dev, u_long cmd case MD_PRELOAD: case MD_VNODE: case MD_SWAP: + case MD_NULL: break; default: return (EINVAL); @@ -1419,6 +1451,10 @@ xmdctlioctl(struct cdev *dev, u_long cmd sc->start = mdstart_swap; error = mdcreate_swap(sc, mdio, td); break; + case MD_NULL: + sc->start = mdstart_null; + error = mdcreate_null(sc, mdio, td); + break; } if (error != 0) { mddestroy(sc, td); @@ -1589,6 +1625,9 @@ g_md_dumpconf(struct sbuf *sb, const cha case MD_SWAP: type = "swap"; break; + case MD_NULL: + type = "null"; + break; default: type = "unknown"; break; Modified: stable/10/sys/sys/mdioctl.h ============================================================================== --- stable/10/sys/sys/mdioctl.h Sun Oct 18 14:47:19 2015 (r289515) +++ stable/10/sys/sys/mdioctl.h Sun Oct 18 14:52:31 2015 (r289516) @@ -43,7 +43,7 @@ #ifndef _SYS_MDIOCTL_H_ #define _SYS_MDIOCTL_H_ -enum md_types {MD_MALLOC, MD_PRELOAD, MD_VNODE, MD_SWAP}; +enum md_types {MD_MALLOC, MD_PRELOAD, MD_VNODE, MD_SWAP, MD_NULL}; /* * Ioctl definitions for memory disk pseudo-device. From owner-svn-src-all@freebsd.org Sun Oct 18 14:55: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 B58FAA18B89; Sun, 18 Oct 2015 14:55:10 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90D6C1AA; Sun, 18 Oct 2015 14:55:10 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEt9eW099498; Sun, 18 Oct 2015 14:55:09 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEt9ZH099497; Sun, 18 Oct 2015 14:55:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181455.t9IEt9ZH099497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:55:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289517 - stable/10/sbin/mdconfig 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: Sun, 18 Oct 2015 14:55:10 -0000 Author: trasz Date: Sun Oct 18 14:55:09 2015 New Revision: 289517 URL: https://svnweb.freebsd.org/changeset/base/289517 Log: MFC r286360: Tweak mdconfig(8) manual page, in particular revise the EXAMPLES section. This removes stuff that doesn't really belong there, and simplifies examples for the basic operations. MFC r286361: Whoops, wrong flag. Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/mdconfig/mdconfig.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mdconfig/mdconfig.8 ============================================================================== --- stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:52:31 2015 (r289516) +++ stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:55:09 2015 (r289517) @@ -41,12 +41,12 @@ .\" .\" $FreeBSD$ .\" -.Dd November 30, 2013 +.Dd August 6, 2015 .Dt MDCONFIG 8 .Os .Sh NAME .Nm mdconfig -.Nd configure and enable memory disks +.Nd create and control memory disks .Sh SYNOPSIS .Nm .Fl a @@ -79,7 +79,7 @@ .Sh DESCRIPTION The .Nm -utility configures and enables +utility creates and controls .Xr md 4 devices. .Pp @@ -107,7 +107,7 @@ If the .Fl o Cm reserve option is not set, creating and filling a large malloc-backed memory disk is a very easy way to -panic a system. +panic the system. .It Cm vnode A file specified with .Fl f Ar file @@ -168,7 +168,9 @@ or .Cm t which denotes byte, kilobyte, megabyte, gigabyte and terabyte respectively. -The +When used without the +.Fl r +option, the .Fl a and .Fl t Ar swap @@ -210,6 +212,11 @@ Enable/disable compression features to r .It Oo Cm no Oc Ns Cm force Disable/enable extra sanity checks to prevent the user from doing something that might adversely affect the system. +This can be used with the +.Fl d +flag to forcibly destroy an +.Xr md 4 +disk that is still in use. .It Oo Cm no Oc Ns Cm readonly Enable/disable readonly mode. .El @@ -231,66 +238,58 @@ is provided for convenience as an abbrev .Fl t Ar vnode .Fl f Ar file . .Sh EXAMPLES -Create a 4 megabyte -.Xr malloc 9 -backed memory disk. -The name of the allocated unit will be printed on stdout, such as -.Dq Li md3 : -.Pp -.Dl mdconfig -a -t malloc -s 4m -.Pp -Create a disk named -.Pa /dev/md4 -with +Create a disk with .Pa /tmp/boot.flp -as backing storage: +as backing storage. +The name of the allocated unit will be printed on stdout, such as +.Dq Li md0 : +.Bd -literal -offset indent +mdconfig /tmp/boot.flp +.Ed .Pp -.Dl mdconfig -a -t vnode -f /tmp/boot.flp -u md4 +Create a 1 gigabyte swap backed memory disk named +.Dq Li md3 : +.Bd -literal -offset indent +mdconfig -s 1g -u md3 +.Ed .Pp Detach and free all resources used by -.Pa /dev/md4 : +.Pa /dev/md3 : +.Bd -literal -offset indent +mdconfig -du md3 +.Ed +.Pp +Show detailed information on current memory disks: +.Bd -literal -offset indent +mdconfig -lv +.Ed .Pp -.Dl mdconfig -d -u md4 +Resize the +.Dq Li md3 +memory disk to 2 gigabytes: +.Bd -literal -offset indent +mdconfig -rs 2g -u md3 +.Ed .Pp -Create a 128MByte swap backed disk, initialize an +Create a 1 gigabyte swap backed disk, initialize an .Xr ffs 7 file system on it, and mount it on .Pa /tmp : .Bd -literal -offset indent -mdconfig -a -t swap -s 128M -u md10 +mdconfig -s 1g -u md10 newfs -U /dev/md10 mount /dev/md10 /tmp chmod 1777 /tmp .Ed .Pp -Create a 5MB file-backed disk -.Po Fl a -and -.Fl t Ar vnode -are implied -.Pc : -.Bd -literal -offset indent -dd if=/dev/zero of=somebackingfile bs=1k count=5k -mdconfig -f somebackingfile -u md0 -bsdlabel -w md0 auto -newfs md0c -mount /dev/md0c /mnt -.Ed -.Pp -Create an -.Xr md 4 -device out of an ISO 9660 CD image file -.Po Fl a -and -.Fl t Ar vnode -are implied -.Pc , using the first available +Create a memory disk out of an ISO 9660 CD image file, +using the first available .Xr md 4 -device, and then mount the new memory disk: +device, and then mount it: .Bd -literal -offset indent mount -t cd9660 /dev/`mdconfig -f cdimage.iso` /mnt -.Pp .Ed +.Pp Create a file-backed device from a hard disk image that begins with 512K of raw header information. .Xr gnop 8 @@ -298,7 +297,7 @@ is used to skip over the header informat .Pa md1.nop to the start of the filesystem in the image. .Bd -literal -offset indent -mdconfig -f diskimage.img -u md1 +mdconfig -u md1 -f diskimage.img gnop create -o 512K md1 mount /dev/md1.nop /mnt .Ed From owner-svn-src-all@freebsd.org Sun Oct 18 14: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 DE110A18C47; Sun, 18 Oct 2015 14:57:43 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7BC237C; Sun, 18 Oct 2015 14:57:43 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IEvgMR099625; Sun, 18 Oct 2015 14:57:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IEvgdC099624; Sun, 18 Oct 2015 14:57:42 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181457.t9IEvgdC099624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:57: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: r289518 - stable/10/sbin/mount_unionfs 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: Sun, 18 Oct 2015 14:57:44 -0000 Author: trasz Date: Sun Oct 18 14:57:42 2015 New Revision: 289518 URL: https://svnweb.freebsd.org/changeset/base/289518 Log: MFC 287397: Fix markup. Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/mount_unionfs/mount_unionfs.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount_unionfs/mount_unionfs.8 ============================================================================== --- stable/10/sbin/mount_unionfs/mount_unionfs.8 Sun Oct 18 14:55:09 2015 (r289517) +++ stable/10/sbin/mount_unionfs/mount_unionfs.8 Sun Oct 18 14:57:42 2015 (r289518) @@ -83,7 +83,7 @@ becomes the upper layer. However, .Ar uniondir remains the mount point. -.It Sm Cm copymode No = Cm traditional | transparent | masquerade Sm +.It Cm copymode No = Cm traditional | transparent | masquerade Specifies the way to create a file or a directory in the upper layer automatically when needed. The @@ -98,7 +98,7 @@ For behavior of the mode, see .Sx MASQUERADE MODE below. -.It Sm Cm whiteout No = Cm always | whenneeded Sm +.It Cm whiteout No = Cm always | whenneeded Specifies whether whiteouts should always be made in the upper layer when removing a file or directory or only when it already exists in the lower layer. From owner-svn-src-all@freebsd.org Sun Oct 18 14:59: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 C170CA18CC0; Sun, 18 Oct 2015 14:59:39 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A4B9796; Sun, 18 Oct 2015 14:59:39 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IExcIS099746; Sun, 18 Oct 2015 14:59:38 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IExcqg099743; Sun, 18 Oct 2015 14:59:38 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181459.t9IExcqg099743@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 14:59:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289519 - stable/10/etc/rc.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 14:59:39 -0000 Author: trasz Date: Sun Oct 18 14:59:38 2015 New Revision: 289519 URL: https://svnweb.freebsd.org/changeset/base/289519 Log: MFC r287951: The "automount" rc script should depend on "automountd", not the other way around. Sponsored by: The FreeBSD Foundation Modified: stable/10/etc/rc.d/automount stable/10/etc/rc.d/automountd stable/10/etc/rc.d/autounmountd Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/automount ============================================================================== --- stable/10/etc/rc.d/automount Sun Oct 18 14:57:42 2015 (r289518) +++ stable/10/etc/rc.d/automount Sun Oct 18 14:59:38 2015 (r289519) @@ -4,7 +4,7 @@ # # PROVIDE: automount -# REQUIRE: nfsclient +# REQUIRE: nfsclient automountd # KEYWORD: nojail shutdown . /etc/rc.subr Modified: stable/10/etc/rc.d/automountd ============================================================================== --- stable/10/etc/rc.d/automountd Sun Oct 18 14:57:42 2015 (r289518) +++ stable/10/etc/rc.d/automountd Sun Oct 18 14:59:38 2015 (r289519) @@ -4,7 +4,7 @@ # # PROVIDE: automountd -# REQUIRE: automount +# REQUIRE: DAEMON # KEYWORD: nojail . /etc/rc.subr Modified: stable/10/etc/rc.d/autounmountd ============================================================================== --- stable/10/etc/rc.d/autounmountd Sun Oct 18 14:57:42 2015 (r289518) +++ stable/10/etc/rc.d/autounmountd Sun Oct 18 14:59:38 2015 (r289519) @@ -4,7 +4,7 @@ # # PROVIDE: autounmountd -# REQUIRE: nfsclient +# REQUIRE: DAEMON # KEYWORD: nojail . /etc/rc.subr From owner-svn-src-all@freebsd.org Sun Oct 18 15:02: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 30E1EA18E17; Sun, 18 Oct 2015 15:02:09 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 090CBA8A; Sun, 18 Oct 2015 15:02:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IF28YD001954; Sun, 18 Oct 2015 15:02:08 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IF27E1001950; Sun, 18 Oct 2015 15:02:07 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181502.t9IF27E1001950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 15:02: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: r289520 - in stable/10: sbin/geom/class/nop sys/geom/nop 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: Sun, 18 Oct 2015 15:02:09 -0000 Author: trasz Date: Sun Oct 18 15:02:07 2015 New Revision: 289520 URL: https://svnweb.freebsd.org/changeset/base/289520 Log: MFC r287827: Add a way to specify stripesize and stripeoffset to gnop(8). This makes it possible to "simulate" 4K media, to eg test alignment handling. Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/geom/class/nop/geom_nop.c stable/10/sbin/geom/class/nop/gnop.8 stable/10/sys/geom/nop/g_nop.c stable/10/sys/geom/nop/g_nop.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/geom/class/nop/geom_nop.c ============================================================================== --- stable/10/sbin/geom/class/nop/geom_nop.c Sun Oct 18 14:59:38 2015 (r289519) +++ stable/10/sbin/geom/class/nop/geom_nop.c Sun Oct 18 15:02:07 2015 (r289520) @@ -43,14 +43,16 @@ struct g_command class_commands[] = { { { 'e', "error", "-1", G_TYPE_NUMBER }, { 'o', "offset", "0", G_TYPE_NUMBER }, + { 'p', "stripesize", "0", G_TYPE_NUMBER }, + { 'P', "stripeoffset", "0", G_TYPE_NUMBER }, { 'r', "rfailprob", "-1", G_TYPE_NUMBER }, { 's', "size", "0", G_TYPE_NUMBER }, { 'S', "secsize", "0", G_TYPE_NUMBER }, { 'w', "wfailprob", "-1", G_TYPE_NUMBER }, G_OPT_SENTINEL }, - "[-v] [-e error] [-o offset] [-r rfailprob] [-s size] " - "[-S secsize] [-w wfailprob] dev ..." + "[-v] [-e error] [-o offset] [-p stripesize] [-P stripeoffset] " + "[-r rfailprob] [-s size] [-S secsize] [-w wfailprob] dev ..." }, { "configure", G_FLAG_VERBOSE, NULL, { Modified: stable/10/sbin/geom/class/nop/gnop.8 ============================================================================== --- stable/10/sbin/geom/class/nop/gnop.8 Sun Oct 18 14:59:38 2015 (r289519) +++ stable/10/sbin/geom/class/nop/gnop.8 Sun Oct 18 15:02:07 2015 (r289520) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 14, 2013 +.Dd September 15, 2015 .Dt GNOP 8 .Os .Sh NAME @@ -36,6 +36,8 @@ .Op Fl v .Op Fl e Ar error .Op Fl o Ar offset +.Op Fl p Ar stripesize +.Op Fl P Ar stripeoffset .Op Fl r Ar rfailprob .Op Fl s Ar size .Op Fl S Ar secsize @@ -115,6 +117,10 @@ Specifies the error number to return on Force the removal of the specified provider. .It Fl o Ar offset Where to begin on the original provider. +.It Fl p Ar stripesize +Value of the stripesize property of the transparent provider. +.It Fl P Ar stripeoffset +Value of the stripeoffset property of the transparent provider. .It Fl r Ar rfailprob Specifies read failure probability in percent. .It Fl s Ar size Modified: stable/10/sys/geom/nop/g_nop.c ============================================================================== --- stable/10/sys/geom/nop/g_nop.c Sun Oct 18 14:59:38 2015 (r289519) +++ stable/10/sys/geom/nop/g_nop.c Sun Oct 18 15:02:07 2015 (r289520) @@ -162,7 +162,7 @@ g_nop_access(struct g_provider *pp, int static int g_nop_create(struct gctl_req *req, struct g_class *mp, struct g_provider *pp, int ioerror, u_int rfailprob, u_int wfailprob, off_t offset, off_t size, - u_int secsize) + u_int secsize, u_int stripesize, u_int stripeoffset) { struct g_nop_softc *sc; struct g_geom *gp; @@ -208,6 +208,18 @@ g_nop_create(struct gctl_req *req, struc return (EINVAL); } size -= size % secsize; + if ((stripesize % pp->sectorsize) != 0) { + gctl_error(req, "Invalid stripesize for provider %s.", pp->name); + return (EINVAL); + } + if ((stripeoffset % pp->sectorsize) != 0) { + gctl_error(req, "Invalid stripeoffset for provider %s.", pp->name); + return (EINVAL); + } + if (stripesize != 0 && stripeoffset >= stripesize) { + gctl_error(req, "stripeoffset is too big."); + return (EINVAL); + } snprintf(name, sizeof(name), "%s%s", pp->name, G_NOP_SUFFIX); LIST_FOREACH(gp, &mp->geom, geom) { if (strcmp(gp->name, name) == 0) { @@ -219,6 +231,8 @@ g_nop_create(struct gctl_req *req, struc sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO); sc->sc_offset = offset; sc->sc_explicitsize = explicitsize; + sc->sc_stripesize = stripesize; + sc->sc_stripeoffset = stripeoffset; sc->sc_error = ioerror; sc->sc_rfailprob = rfailprob; sc->sc_wfailprob = wfailprob; @@ -238,6 +252,8 @@ g_nop_create(struct gctl_req *req, struc newpp->flags |= G_PF_DIRECT_SEND | G_PF_DIRECT_RECEIVE; newpp->mediasize = size; newpp->sectorsize = secsize; + newpp->stripesize = stripesize; + newpp->stripeoffset = stripeoffset; cp = g_new_consumer(gp); cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE; @@ -304,7 +320,8 @@ static void g_nop_ctl_create(struct gctl_req *req, struct g_class *mp) { struct g_provider *pp; - intmax_t *error, *rfailprob, *wfailprob, *offset, *secsize, *size; + intmax_t *error, *rfailprob, *wfailprob, *offset, *secsize, *size, + *stripesize, *stripeoffset; const char *name; char param[16]; int i, *nargs; @@ -370,6 +387,24 @@ g_nop_ctl_create(struct gctl_req *req, s gctl_error(req, "Invalid '%s' argument", "secsize"); return; } + stripesize = gctl_get_paraml(req, "stripesize", sizeof(*stripesize)); + if (stripesize == NULL) { + gctl_error(req, "No '%s' argument", "stripesize"); + return; + } + if (*stripesize < 0) { + gctl_error(req, "Invalid '%s' argument", "stripesize"); + return; + } + stripeoffset = gctl_get_paraml(req, "stripeoffset", sizeof(*stripeoffset)); + if (stripeoffset == NULL) { + gctl_error(req, "No '%s' argument", "stripeoffset"); + return; + } + if (*stripeoffset < 0) { + gctl_error(req, "Invalid '%s' argument", "stripeoffset"); + return; + } for (i = 0; i < *nargs; i++) { snprintf(param, sizeof(param), "arg%d", i); @@ -390,7 +425,8 @@ g_nop_ctl_create(struct gctl_req *req, s *error == -1 ? EIO : (int)*error, *rfailprob == -1 ? 0 : (u_int)*rfailprob, *wfailprob == -1 ? 0 : (u_int)*wfailprob, - (off_t)*offset, (off_t)*size, (u_int)*secsize) != 0) { + (off_t)*offset, (off_t)*size, (u_int)*secsize, + (u_int)*stripesize, (u_int)*stripeoffset) != 0) { return; } } Modified: stable/10/sys/geom/nop/g_nop.h ============================================================================== --- stable/10/sys/geom/nop/g_nop.h Sun Oct 18 14:59:38 2015 (r289519) +++ stable/10/sys/geom/nop/g_nop.h Sun Oct 18 15:02:07 2015 (r289520) @@ -59,6 +59,8 @@ struct g_nop_softc { int sc_error; off_t sc_offset; off_t sc_explicitsize; + off_t sc_stripesize; + off_t sc_stripeoffset; u_int sc_rfailprob; u_int sc_wfailprob; uintmax_t sc_reads; From owner-svn-src-all@freebsd.org Sun Oct 18 15:03: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 8AE6BA18EA9; Sun, 18 Oct 2015 15:03:48 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5303FCD9; Sun, 18 Oct 2015 15:03:48 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IF3l2Y002664; Sun, 18 Oct 2015 15:03:47 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IF3lTW002663; Sun, 18 Oct 2015 15:03:47 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181503.t9IF3lTW002663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 15:03: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: r289521 - stable/10/usr.bin/rctl 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: Sun, 18 Oct 2015 15:03:48 -0000 Author: trasz Date: Sun Oct 18 15:03:47 2015 New Revision: 289521 URL: https://svnweb.freebsd.org/changeset/base/289521 Log: MFC r287785: Make it clear that 'swapuse' is swap reservation and not actual swap usage. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/rctl/rctl.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/rctl/rctl.8 ============================================================================== --- stable/10/usr.bin/rctl/rctl.8 Sun Oct 18 15:02:07 2015 (r289520) +++ stable/10/usr.bin/rctl/rctl.8 Sun Oct 18 15:03:47 2015 (r289521) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 11, 2014 +.Dd September 14, 2015 .Dt RCTL 8 .Os .Sh NAME @@ -193,7 +193,7 @@ resource would be .It Sy openfiles Ta "file descriptor table size" .It Sy vmemoryuse Ta "address space limit, in bytes" .It Sy pseudoterminals Ta "number of PTYs" -.It Sy swapuse Ta "swap usage, in bytes" +.It Sy swapuse Ta "swap space that may be reserved or used, in bytes" .It Sy nthr Ta "number of threads" .It Sy msgqqueued Ta "number of queued SysV messages" .It Sy msgqsize Ta "SysV message queue size, in bytes" From owner-svn-src-all@freebsd.org Sun Oct 18 16:19: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 542E8A18BE4 for ; Sun, 18 Oct 2015 16:19:42 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 347D1833 for ; Sun, 18 Oct 2015 16:19:41 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Sun, 18 Oct 2015 16:19:52 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t9IGJd4w008353; Sun, 18 Oct 2015 10:19:39 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1445185179.71631.50.camel@freebsd.org> Subject: Re: svn commit: r289477 - head/sys/arm/mv From: Ian Lepore To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 18 Oct 2015 10:19:39 -0600 In-Reply-To: <20151018094602.GF2257@kib.kiev.ua> References: <201510180103.t9I13h0w056671@repo.freebsd.org> <20151018094602.GF2257@kib.kiev.ua> 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: Sun, 18 Oct 2015 16:19:42 -0000 On Sun, 2015-10-18 at 12:46 +0300, Konstantin Belousov wrote: > On Sun, Oct 18, 2015 at 01:03:43AM +0000, Ian Lepore wrote: > > Author: ian > > Date: Sun Oct 18 01:03:43 2015 > > New Revision: 289477 > > URL: https://svnweb.freebsd.org/changeset/base/289477 > > > > Log: > > Fix a strange macro re-definition compile error. If the > > VM_MAXUSER_ADDRESS > > value is defined as a config option the definition is emitted > > into > > opt_global.h which is force-included into everything. In > > addition, the > > symbol is emitted by the genassym mechanism, but that by its > > nature reduces > > the value to a 0xnnnnnnnn number. When compiling a .S file you > > end up > > with two different definitions of the macro (they evaluate to the > > same > > number, but the text is different, upsetting the compiler). > > > > Nothing has changed about this code for a while but the compile > > error is > > new, so this must be fallout from the clang 3.7 update or > > something. > > > > Modified: > > head/sys/arm/mv/std-pj4b.mv > > > > Modified: head/sys/arm/mv/std-pj4b.mv > > =================================================================== > > =========== > > --- head/sys/arm/mv/std-pj4b.mv Sun Oct 18 00:59:28 2015 > > (r289476) > > +++ head/sys/arm/mv/std-pj4b.mv Sun Oct 18 01:03:43 2015 > > (r289477) > > @@ -5,4 +5,8 @@ cpu CPU_MV_PJ4B > > machine arm armv6 > > makeoptions CONF_CFLAGS="-march=armv7a" > > > > -options VM_MAXUSER_ADDRESS="(KERNBASE > > -(1024*1024*1024))" > > +# This was originally defined as "(KERNBASE-(1024*1024*1024))" but > > that > > +# (in opt_global.h) clashed with the value emitted by genassym > > which > > +# reduces the original macro text to its numeric value. The only > > way > > +# to avoid that is to define it here as the numeric value genassym > > emits. > > +options VM_MAXUSER_ADDRESS="0x80000000" > > Genassym started to generate VM_MAXUSER_ADDRESS after r289372. > Strange that I did not saw the error. > > Why does marvell need this override ? > That is a very good question, to which I found no answer in the svn history... this value was in the file from day one and the commit message just says it was obtained from Marvell and Semihalf. There's other strange stuff in the arm/mv hierarchy that nobody (except maybe marvell and semihalf) knows why it's different. I finally bought myself an ARMADAXP-based system (which this config is for) about six months ago, but I literally haven't had a chance to take it out of the box since it arrived. ::sigh:: -- Ian From owner-svn-src-all@freebsd.org Sun Oct 18 16:54: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 8C547A18498; Sun, 18 Oct 2015 16:54:36 +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 4E115ACF; Sun, 18 Oct 2015 16:54:36 +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 t9IGsZZC034701; Sun, 18 Oct 2015 16:54:35 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IGsYqa034689; Sun, 18 Oct 2015 16:54:34 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510181654.t9IGsYqa034689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 18 Oct 2015 16:54:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289522 - in head/sys/arm: allwinner/a20 altera/socfpga amlogic/aml8726 annapurna/alpine arm freescale/imx include qemu rockchip samsung/exynos ti/omap4 xilinx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 16:54:36 -0000 Author: ian Date: Sun Oct 18 16:54:34 2015 New Revision: 289522 URL: https://svnweb.freebsd.org/changeset/base/289522 Log: Rename arm_init_secondary_ic() -> arm_pic_init_secondary(). The latter is the name the function will have when the new ARM_INTRNG code is integrated, and doing this rename first will make it easier to toggle the new interrupt handling code on/off with a config option for debugging. Modified: head/sys/arm/allwinner/a20/a20_mp.c head/sys/arm/altera/socfpga/socfpga_mp.c head/sys/arm/amlogic/aml8726/aml8726_mp.c head/sys/arm/annapurna/alpine/alpine_machdep_mp.c head/sys/arm/arm/gic.c head/sys/arm/freescale/imx/imx6_mp.c head/sys/arm/include/intr.h head/sys/arm/qemu/virt_mp.c head/sys/arm/rockchip/rk30xx_mp.c head/sys/arm/samsung/exynos/exynos5_mp.c head/sys/arm/ti/omap4/omap4_mp.c head/sys/arm/xilinx/zy7_mp.c Modified: head/sys/arm/allwinner/a20/a20_mp.c ============================================================================== --- head/sys/arm/allwinner/a20/a20_mp.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/allwinner/a20/a20_mp.c Sun Oct 18 16:54:34 2015 (r289522) @@ -61,7 +61,7 @@ void platform_mp_init_secondary(void) { - arm_init_secondary_ic(); + arm_pic_init_secondary(); } void Modified: head/sys/arm/altera/socfpga/socfpga_mp.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_mp.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/altera/socfpga/socfpga_mp.c Sun Oct 18 16:54:34 2015 (r289522) @@ -87,7 +87,7 @@ void platform_mp_init_secondary(void) { - arm_init_secondary_ic(); + arm_pic_init_secondary(); } void Modified: head/sys/arm/amlogic/aml8726/aml8726_mp.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_mp.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/amlogic/aml8726/aml8726_mp.c Sun Oct 18 16:54:34 2015 (r289522) @@ -351,7 +351,7 @@ platform_mp_init_secondary(void) * each AP. */ - arm_init_secondary_ic(); + arm_pic_init_secondary(); } Modified: head/sys/arm/annapurna/alpine/alpine_machdep_mp.c ============================================================================== --- head/sys/arm/annapurna/alpine/alpine_machdep_mp.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/annapurna/alpine/alpine_machdep_mp.c Sun Oct 18 16:54:34 2015 (r289522) @@ -122,7 +122,7 @@ void platform_mp_init_secondary(void) { - arm_init_secondary_ic(); + arm_pic_init_secondary(); } void Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/arm/gic.c Sun Oct 18 16:54:34 2015 (r289522) @@ -492,7 +492,7 @@ arm_get_next_irq(int last_irq) } void -arm_init_secondary_ic(void) +arm_pic_init_secondary(void) { arm_gic_init_secondary(arm_gic_sc->gic_dev); Modified: head/sys/arm/freescale/imx/imx6_mp.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_mp.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/freescale/imx/imx6_mp.c Sun Oct 18 16:54:34 2015 (r289522) @@ -69,7 +69,7 @@ void platform_mp_init_secondary(void) { - arm_init_secondary_ic(); + arm_pic_init_secondary(); } void Modified: head/sys/arm/include/intr.h ============================================================================== --- head/sys/arm/include/intr.h Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/include/intr.h Sun Oct 18 16:54:34 2015 (r289522) @@ -85,7 +85,7 @@ extern int (*arm_config_irq)(int irq, en void arm_irq_memory_barrier(uintptr_t); -void arm_init_secondary_ic(void); +void arm_pic_init_secondary(void); int gic_decode_fdt(uint32_t iparentnode, uint32_t *intrcells, int *interrupt, int *trig, int *pol); Modified: head/sys/arm/qemu/virt_mp.c ============================================================================== --- head/sys/arm/qemu/virt_mp.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/qemu/virt_mp.c Sun Oct 18 16:54:34 2015 (r289522) @@ -108,7 +108,7 @@ void platform_mp_init_secondary(void) { - arm_init_secondary_ic(); + arm_pic_init_secondary(); } void Modified: head/sys/arm/rockchip/rk30xx_mp.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_mp.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/rockchip/rk30xx_mp.c Sun Oct 18 16:54:34 2015 (r289522) @@ -82,7 +82,7 @@ void platform_mp_init_secondary(void) { - arm_init_secondary_ic(); + arm_pic_init_secondary(); } void Modified: head/sys/arm/samsung/exynos/exynos5_mp.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_mp.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/samsung/exynos/exynos5_mp.c Sun Oct 18 16:54:34 2015 (r289522) @@ -73,7 +73,7 @@ void platform_mp_init_secondary(void) { - arm_init_secondary_ic(); + arm_pic_init_secondary(); } void Modified: head/sys/arm/ti/omap4/omap4_mp.c ============================================================================== --- head/sys/arm/ti/omap4/omap4_mp.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/ti/omap4/omap4_mp.c Sun Oct 18 16:54:34 2015 (r289522) @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); void platform_mp_init_secondary(void) { - arm_init_secondary_ic(); + arm_pic_init_secondary(); } void Modified: head/sys/arm/xilinx/zy7_mp.c ============================================================================== --- head/sys/arm/xilinx/zy7_mp.c Sun Oct 18 15:03:47 2015 (r289521) +++ head/sys/arm/xilinx/zy7_mp.c Sun Oct 18 16:54:34 2015 (r289522) @@ -49,7 +49,7 @@ void platform_mp_init_secondary(void) { - arm_init_secondary_ic(); + arm_pic_init_secondary(); } void From owner-svn-src-all@freebsd.org Sun Oct 18 17: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 E0A00A18A5F; Sun, 18 Oct 2015 17:13:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA5211361; Sun, 18 Oct 2015 17:13:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IHDfAl040461; Sun, 18 Oct 2015 17:13:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IHDfO7040460; Sun, 18 Oct 2015 17:13:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201510181713.t9IHDfO7040460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 18 Oct 2015 17:13:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289523 - head/contrib/llvm/tools/clang/lib/Driver X-SVN-Group: head MIME-Version: 1.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, 18 Oct 2015 17:13:43 -0000 Author: dim Date: Sun Oct 18 17:13:41 2015 New Revision: 289523 URL: https://svnweb.freebsd.org/changeset/base/289523 Log: Pull in r248379 from upstream clang trunk (by Jörg Sonnenberger): Refactor library decision for -fopenmp support from Darwin into a function for sharing with other platforms. Pull in r248424 from upstream clang trunk (by Jörg Sonnenberger): Push OpenMP linker flags after linker input on Darwin. Don't add any libraries if -nostdlib is specified. Test. Pull in r248426 from upstream clang trunk (by Jörg Sonnenberger): Support linking against OpenMP runtime on NetBSD. Pull in r250657 from upstream clang trunk (by Dimitry Andric): Support linking against OpenMP runtime on FreeBSD. Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Sun Oct 18 16:54:34 2015 (r289522) +++ head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Sun Oct 18 17:13:41 2015 (r289523) @@ -2460,6 +2460,28 @@ static OpenMPRuntimeKind getOpenMPRuntim return RT; } +static void addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, + const ArgList &Args) { + if (!Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ, + options::OPT_fno_openmp, false)) + return; + + switch (getOpenMPRuntime(TC, Args)) { + case OMPRT_OMP: + CmdArgs.push_back("-lomp"); + break; + case OMPRT_GOMP: + CmdArgs.push_back("-lgomp"); + break; + case OMPRT_IOMP5: + CmdArgs.push_back("-liomp5"); + break; + case OMPRT_Unknown: + // Already diagnosed. + break; + } +} + static void addSanitizerRuntime(const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs, StringRef Sanitizer, bool IsShared) { @@ -6527,24 +6549,6 @@ void darwin::Linker::ConstructJob(Compil Args.AddAllArgs(CmdArgs, options::OPT_L); - if (Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ, - options::OPT_fno_openmp, false)) { - switch (getOpenMPRuntime(getToolChain(), Args)) { - case OMPRT_OMP: - CmdArgs.push_back("-lomp"); - break; - case OMPRT_GOMP: - CmdArgs.push_back("-lgomp"); - break; - case OMPRT_IOMP5: - CmdArgs.push_back("-liomp5"); - break; - case OMPRT_Unknown: - // Already diagnosed. - break; - } - } - AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs); // Build the input file for -filelist (list of linker input files) in case we // need it later @@ -6563,6 +6567,10 @@ void darwin::Linker::ConstructJob(Compil InputFileList.push_back(II.getFilename()); } + if (!Args.hasArg(options::OPT_nostdlib) && + !Args.hasArg(options::OPT_nodefaultlibs)) + addOpenMPRuntime(CmdArgs, getToolChain(), Args); + if (isObjCRuntimeLinked(Args) && !Args.hasArg(options::OPT_nostdlib) && !Args.hasArg(options::OPT_nodefaultlibs)) { // We use arclite library for both ARC and subscripting support. @@ -7358,6 +7366,7 @@ void freebsd::Linker::ConstructJob(Compi if (!Args.hasArg(options::OPT_nostdlib) && !Args.hasArg(options::OPT_nodefaultlibs)) { + addOpenMPRuntime(CmdArgs, ToolChain, Args); if (D.CCCIsCXX()) { ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); if (Args.hasArg(options::OPT_pg)) @@ -7673,6 +7682,7 @@ void netbsd::Linker::ConstructJob(Compil if (!Args.hasArg(options::OPT_nostdlib) && !Args.hasArg(options::OPT_nodefaultlibs)) { + addOpenMPRuntime(CmdArgs, getToolChain(), Args); if (D.CCCIsCXX()) { getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); CmdArgs.push_back("-lm"); From owner-svn-src-all@freebsd.org Sun Oct 18 17:14: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 7FC5EA18AA2; Sun, 18 Oct 2015 17:14:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 540B01516; Sun, 18 Oct 2015 17:14:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IHEjUk040540; Sun, 18 Oct 2015 17:14:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IHEjM1040539; Sun, 18 Oct 2015 17:14:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201510181714.t9IHEjM1040539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 18 Oct 2015 17:14:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289524 - head/contrib/llvm/patches X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 17:14:46 -0000 Author: dim Date: Sun Oct 18 17:14:45 2015 New Revision: 289524 URL: https://svnweb.freebsd.org/changeset/base/289524 Log: Add clang patch corresponding to r289523. Added: head/contrib/llvm/patches/patch-09-clang-r250657-openmp.diff Added: head/contrib/llvm/patches/patch-09-clang-r250657-openmp.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-09-clang-r250657-openmp.diff Sun Oct 18 17:14:45 2015 (r289524) @@ -0,0 +1,182 @@ +Pull in r248379 from upstream clang trunk (by Jörg Sonnenberger): + + Refactor library decision for -fopenmp support from Darwin into a + function for sharing with other platforms. + +Pull in r248424 from upstream clang trunk (by Jörg Sonnenberger): + + Push OpenMP linker flags after linker input on Darwin. Don't add any + libraries if -nostdlib is specified. Test. + +Pull in r248426 from upstream clang trunk (by Jörg Sonnenberger): + + Support linking against OpenMP runtime on NetBSD. + +Pull in r250657 from upstream clang trunk (by Dimitry Andric): + + Support linking against OpenMP runtime on FreeBSD. + +Introduced here: http://svnweb.freebsd.org/changeset/base/289523 + +Index: tools/clang/lib/Driver/Tools.cpp +=================================================================== +--- tools/clang/lib/Driver/Tools.cpp ++++ tools/clang/lib/Driver/Tools.cpp +@@ -2460,6 +2460,28 @@ static OpenMPRuntimeKind getOpenMPRuntime(const To + return RT; + } + ++static void addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC, ++ const ArgList &Args) { ++ if (!Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ, ++ options::OPT_fno_openmp, false)) ++ return; ++ ++ switch (getOpenMPRuntime(TC, Args)) { ++ case OMPRT_OMP: ++ CmdArgs.push_back("-lomp"); ++ break; ++ case OMPRT_GOMP: ++ CmdArgs.push_back("-lgomp"); ++ break; ++ case OMPRT_IOMP5: ++ CmdArgs.push_back("-liomp5"); ++ break; ++ case OMPRT_Unknown: ++ // Already diagnosed. ++ break; ++ } ++} ++ + static void addSanitizerRuntime(const ToolChain &TC, const ArgList &Args, + ArgStringList &CmdArgs, StringRef Sanitizer, + bool IsShared) { +@@ -6527,24 +6549,6 @@ void darwin::Linker::ConstructJob(Compilation &C, + + Args.AddAllArgs(CmdArgs, options::OPT_L); + +- if (Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ, +- options::OPT_fno_openmp, false)) { +- switch (getOpenMPRuntime(getToolChain(), Args)) { +- case OMPRT_OMP: +- CmdArgs.push_back("-lomp"); +- break; +- case OMPRT_GOMP: +- CmdArgs.push_back("-lgomp"); +- break; +- case OMPRT_IOMP5: +- CmdArgs.push_back("-liomp5"); +- break; +- case OMPRT_Unknown: +- // Already diagnosed. +- break; +- } +- } +- + AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs); + // Build the input file for -filelist (list of linker input files) in case we + // need it later +@@ -6563,6 +6567,10 @@ void darwin::Linker::ConstructJob(Compilation &C, + InputFileList.push_back(II.getFilename()); + } + ++ if (!Args.hasArg(options::OPT_nostdlib) && ++ !Args.hasArg(options::OPT_nodefaultlibs)) ++ addOpenMPRuntime(CmdArgs, getToolChain(), Args); ++ + if (isObjCRuntimeLinked(Args) && !Args.hasArg(options::OPT_nostdlib) && + !Args.hasArg(options::OPT_nodefaultlibs)) { + // We use arclite library for both ARC and subscripting support. +@@ -7358,6 +7366,7 @@ void freebsd::Linker::ConstructJob(Compilation &C, + + if (!Args.hasArg(options::OPT_nostdlib) && + !Args.hasArg(options::OPT_nodefaultlibs)) { ++ addOpenMPRuntime(CmdArgs, ToolChain, Args); + if (D.CCCIsCXX()) { + ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); + if (Args.hasArg(options::OPT_pg)) +@@ -7673,6 +7682,7 @@ void netbsd::Linker::ConstructJob(Compilation &C, + + if (!Args.hasArg(options::OPT_nostdlib) && + !Args.hasArg(options::OPT_nodefaultlibs)) { ++ addOpenMPRuntime(CmdArgs, getToolChain(), Args); + if (D.CCCIsCXX()) { + getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); + CmdArgs.push_back("-lm"); +Index: tools/clang/test/Driver/fopenmp.c +=================================================================== +--- tools/clang/test/Driver/fopenmp.c ++++ tools/clang/test/Driver/fopenmp.c +@@ -1,6 +1,15 @@ + // RUN: %clang -target x86_64-linux-gnu -fopenmp=libomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP + // RUN: %clang -target x86_64-linux-gnu -fopenmp=libgomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-NO-OPENMP + // RUN: %clang -target x86_64-linux-gnu -fopenmp=libiomp5 -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP ++// RUN: %clang -target x86_64-apple-darwin -fopenmp=libomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP ++// RUN: %clang -target x86_64-apple-darwin -fopenmp=libgomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-NO-OPENMP ++// RUN: %clang -target x86_64-apple-darwin -fopenmp=libiomp5 -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP ++// RUN: %clang -target x86_64-freebsd -fopenmp=libomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP ++// RUN: %clang -target x86_64-freebsd -fopenmp=libgomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-NO-OPENMP ++// RUN: %clang -target x86_64-freebsd -fopenmp=libiomp5 -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP ++// RUN: %clang -target x86_64-netbsd -fopenmp=libomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP ++// RUN: %clang -target x86_64-netbsd -fopenmp=libgomp -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-NO-OPENMP ++// RUN: %clang -target x86_64-netbsd -fopenmp=libiomp5 -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CC1-OPENMP + // + // CHECK-CC1-OPENMP: "-cc1" + // CHECK-CC1-OPENMP: "-fopenmp" +@@ -12,6 +21,30 @@ + // RUN: %clang -target x86_64-linux-gnu -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-GOMP + // RUN: %clang -target x86_64-linux-gnu -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-IOMP5 + // ++// RUN: %clang -nostdlib -target x86_64-linux-gnu -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-OMP ++// RUN: %clang -nostdlib -target x86_64-linux-gnu -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-GOMP ++// RUN: %clang -nostdlib -target x86_64-linux-gnu -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-IOMP5 ++// ++// RUN: %clang -target x86_64-darwin -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-OMP ++// RUN: %clang -target x86_64-darwin -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-GOMP ++// RUN: %clang -target x86_64-darwin -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-IOMP5 ++// ++// RUN: %clang -nostdlib -target x86_64-darwin -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-OMP ++// RUN: %clang -nostdlib -target x86_64-darwin -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-GOMP ++// RUN: %clang -nostdlib -target x86_64-darwin -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-IOMP5 ++// ++// RUN: %clang -target x86_64-netbsd -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-OMP ++// RUN: %clang -target x86_64-netbsd -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-GOMP ++// RUN: %clang -target x86_64-netbsd -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-IOMP5 ++// ++// RUN: %clang -nostdlib -target x86_64-freebsd -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-OMP ++// RUN: %clang -nostdlib -target x86_64-freebsd -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-GOMP ++// RUN: %clang -nostdlib -target x86_64-freebsd -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-IOMP5 ++// ++// RUN: %clang -nostdlib -target x86_64-netbsd -fopenmp=libomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-OMP ++// RUN: %clang -nostdlib -target x86_64-netbsd -fopenmp=libgomp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-GOMP ++// RUN: %clang -nostdlib -target x86_64-netbsd -fopenmp=libiomp5 %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-IOMP5 ++// + // CHECK-LD-OMP: "{{.*}}ld{{(.exe)?}}" + // CHECK-LD-OMP: "-lomp" + // +@@ -21,6 +54,15 @@ + // CHECK-LD-IOMP5: "{{.*}}ld{{(.exe)?}}" + // CHECK-LD-IOMP5: "-liomp5" + // ++// CHECK-NO-OMP: "{{.*}}ld{{(.exe)?}}" ++// CHECK-NO-OMP-NOT: "-lomp" ++// ++// CHECK-NO-GOMP: "{{.*}}ld{{(.exe)?}}" ++// CHECK-NO-GOMP-NOT: "-lgomp" ++// ++// CHECK-NO-IOMP5: "{{.*}}ld{{(.exe)?}}" ++// CHECK-NO-IOMP5-NOT: "-liomp5" ++// + // We'd like to check that the default is sane, but until we have the ability + // to *always* semantically analyze OpenMP without always generating runtime + // calls (in the event of an unsupported runtime), we don't have a good way to +@@ -28,6 +70,9 @@ + // OpenMP runtime. + // + // RUN: %clang -target x86_64-linux-gnu -fopenmp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-ANY ++// RUN: %clang -target x86_64-darwin -fopenmp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-ANY ++// RUN: %clang -target x86_64-freebsd -fopenmp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-ANY ++// RUN: %clang -target x86_64-netbsd -fopenmp %s -o %t -### 2>&1 | FileCheck %s --check-prefix=CHECK-LD-ANY + // + // CHECK-LD-ANY: "{{.*}}ld{{(.exe)?}}" + // CHECK-LD-ANY: "-l{{(omp|gomp|iomp5)}}" From owner-svn-src-all@freebsd.org Sun Oct 18 17:18: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 6A8B8A18B39; Sun, 18 Oct 2015 17:18:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3045E17F6; Sun, 18 Oct 2015 17:18:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IHIKRh040716; Sun, 18 Oct 2015 17:18:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IHIK8Q040714; Sun, 18 Oct 2015 17:18:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201510181718.t9IHIK8Q040714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 18 Oct 2015 17:18:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289525 - in head/lib/clang/include: clang/Config llvm/Config X-SVN-Group: head MIME-Version: 1.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, 18 Oct 2015 17:18:21 -0000 Author: dim Date: Sun Oct 18 17:18:19 2015 New Revision: 289525 URL: https://svnweb.freebsd.org/changeset/base/289525 Log: Switch the default OpenMP runtime for clang to libomp (from the LLVM project), as libgomp is not supported anyway. You can use the devel/llvm-devel port to install a recent copy of the OpenMP runtime. Modified: head/lib/clang/include/clang/Config/config.h head/lib/clang/include/llvm/Config/config.h Modified: head/lib/clang/include/clang/Config/config.h ============================================================================== --- head/lib/clang/include/clang/Config/config.h Sun Oct 18 17:14:45 2015 (r289524) +++ head/lib/clang/include/clang/Config/config.h Sun Oct 18 17:18:19 2015 (r289525) @@ -11,7 +11,7 @@ #define BUG_REPORT_URL "https://bugs.freebsd.org/submit/" /* Default OpenMP runtime used by -fopenmp. */ -#define CLANG_DEFAULT_OPENMP_RUNTIME "libgomp" +#define CLANG_DEFAULT_OPENMP_RUNTIME "libomp" /* Multilib suffix for libdir. */ #define CLANG_LIBDIR_SUFFIX "" Modified: head/lib/clang/include/llvm/Config/config.h ============================================================================== --- head/lib/clang/include/llvm/Config/config.h Sun Oct 18 17:14:45 2015 (r289524) +++ head/lib/clang/include/llvm/Config/config.h Sun Oct 18 17:18:19 2015 (r289525) @@ -15,7 +15,7 @@ #define BUG_REPORT_URL "https://bugs.freebsd.org/submit/" /* Default OpenMP runtime used by -fopenmp. */ -#define CLANG_DEFAULT_OPENMP_RUNTIME "libgomp" +#define CLANG_DEFAULT_OPENMP_RUNTIME "libomp" /* Define if we have libxml2 */ /* #undef CLANG_HAVE_LIBXML */ From owner-svn-src-all@freebsd.org Sun Oct 18 17: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 CD36F9D140F; Sun, 18 Oct 2015 17:57:43 +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 9055691B; Sun, 18 Oct 2015 17:57:43 +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 t9IHvgEJ052292; Sun, 18 Oct 2015 17:57:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IHvgww052291; Sun, 18 Oct 2015 17:57:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181757.t9IHvgww052291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 17:57:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289526 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor/illumos/dist/lib/libzfs/common 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: Sun, 18 Oct 2015 17:57:43 -0000 Author: mav Date: Sun Oct 18 17:57:42 2015 New Revision: 289526 URL: https://svnweb.freebsd.org/changeset/base/289526 Log: 5561 support root pools on EFI/GPT partitioned disks 5125 update zpool/libzfs to manage bootable whole disk pools (EFI/GPT labeled disks) Reviewed by: Jean McCormack Reviewed by: Josef 'Jeff' Sipek Approved by: Dan McDonald Author: Hans Rosenfeld illumos/illumos-gate@1a902ef8628b0dffd6df5442354ab59bb8530962 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Changes in other areas also in this revision: Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Sun Oct 18 17:18:19 2015 (r289525) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Sun Oct 18 17:57:42 2015 (r289526) @@ -3245,8 +3245,6 @@ vdev_is_bootable(vdev_t *vd) strcmp(vdev_type, VDEV_TYPE_MISSING) == 0) { return (B_FALSE); } - } else if (vd->vdev_wholedisk == 1) { - return (B_FALSE); } for (int c = 0; c < vd->vdev_children; c++) { From owner-svn-src-all@freebsd.org Sun Oct 18 17:57: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 0E2E19D1412; Sun, 18 Oct 2015 17:57:44 +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 BD35491C; Sun, 18 Oct 2015 17:57:43 +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 t9IHvgVH052298; Sun, 18 Oct 2015 17:57:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IHvg70052297; Sun, 18 Oct 2015 17:57:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181757.t9IHvg70052297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 17:57:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289526 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor/illumos/dist/lib/libzfs/common X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 17:57:44 -0000 Author: mav Date: Sun Oct 18 17:57:42 2015 New Revision: 289526 URL: https://svnweb.freebsd.org/changeset/base/289526 Log: 5561 support root pools on EFI/GPT partitioned disks 5125 update zpool/libzfs to manage bootable whole disk pools (EFI/GPT labeled disks) Reviewed by: Jean McCormack Reviewed by: Josef 'Jeff' Sipek Approved by: Dan McDonald Author: Hans Rosenfeld illumos/illumos-gate@1a902ef8628b0dffd6df5442354ab59bb8530962 Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Sun Oct 18 17:18:19 2015 (r289525) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Sun Oct 18 17:57:42 2015 (r289526) @@ -373,27 +373,6 @@ bootfs_name_valid(const char *pool, char return (B_FALSE); } -/* - * Inspect the configuration to determine if any of the devices contain - * an EFI label. - */ -static boolean_t -pool_uses_efi(nvlist_t *config) -{ - nvlist_t **child; - uint_t c, children; - - if (nvlist_lookup_nvlist_array(config, ZPOOL_CONFIG_CHILDREN, - &child, &children) != 0) - return (read_efi_label(config, NULL) >= 0); - - for (c = 0; c < children; c++) { - if (pool_uses_efi(child[c])) - return (B_TRUE); - } - return (B_FALSE); -} - boolean_t zpool_is_bootable(zpool_handle_t *zhp) { @@ -422,7 +401,6 @@ zpool_valid_proplist(libzfs_handle_t *hd char *slash, *check; struct stat64 statbuf; zpool_handle_t *zhp; - nvlist_t *nvroot; if (nvlist_alloc(&retprops, NV_UNIQUE_NAME, 0) != 0) { (void) no_memory(hdl); @@ -541,21 +519,6 @@ zpool_valid_proplist(libzfs_handle_t *hd (void) zfs_error(hdl, EZFS_OPENFAILED, errbuf); goto error; } - verify(nvlist_lookup_nvlist(zpool_get_config(zhp, NULL), - ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0); - - /* - * bootfs property cannot be set on a disk which has - * been EFI labeled. - */ - if (pool_uses_efi(nvroot)) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "property '%s' not supported on " - "EFI labeled devices"), propname); - (void) zfs_error(hdl, EZFS_POOL_NOTSUP, errbuf); - zpool_close(zhp); - goto error; - } zpool_close(zhp); break; @@ -1293,25 +1256,6 @@ zpool_add(zpool_handle_t *zhp, nvlist_t return (zfs_error(hdl, EZFS_BADVERSION, msg)); } - if (zpool_is_bootable(zhp) && nvlist_lookup_nvlist_array(nvroot, - ZPOOL_CONFIG_SPARES, &spares, &nspares) == 0) { - uint64_t s; - - for (s = 0; s < nspares; s++) { - char *path; - - if (nvlist_lookup_string(spares[s], ZPOOL_CONFIG_PATH, - &path) == 0 && pool_uses_efi(spares[s])) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "device '%s' contains an EFI label and " - "cannot be used on root pools."), - zpool_vdev_name(hdl, NULL, spares[s], - B_FALSE)); - return (zfs_error(hdl, EZFS_POOL_NOTSUP, msg)); - } - } - } - if (zpool_get_prop_int(zhp, ZPOOL_PROP_VERSION, NULL) < SPA_VERSION_L2CACHE && nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_L2CACHE, @@ -2326,11 +2270,9 @@ zpool_get_config_physpath(nvlist_t *conf return (EZFS_INVALCONFIG); /* - * root pool can not have EFI labeled disks and can only have - * a single top-level vdev. + * root pool can only have a single top-level vdev. */ - if (strcmp(type, VDEV_TYPE_ROOT) != 0 || count != 1 || - pool_uses_efi(vdev_root)) + if (strcmp(type, VDEV_TYPE_ROOT) != 0 || count != 1) return (EZFS_POOL_INVALARG); (void) vdev_get_physpaths(child[0], physpath, phypath_size, &rsz, @@ -2632,16 +2574,6 @@ zpool_vdev_attach(zpool_handle_t *zhp, (void) snprintf(msg, sizeof (msg), dgettext(TEXT_DOMAIN, "cannot attach %s to %s"), new_disk, old_disk); - /* - * If this is a root pool, make sure that we're not attaching an - * EFI labeled device. - */ - if (rootpool && pool_uses_efi(nvroot)) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "EFI labeled devices are not supported on root pools.")); - return (zfs_error(hdl, EZFS_POOL_NOTSUP, msg)); - } - (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); if ((tgt = zpool_find_vdev(zhp, old_disk, &avail_spare, &l2cache, &islog)) == 0) @@ -3917,13 +3849,6 @@ zpool_label_disk(libzfs_handle_t *hdl, z if (zhp) { nvlist_t *nvroot; - if (zpool_is_bootable(zhp)) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "EFI labeled devices are not supported on root " - "pools.")); - return (zfs_error(hdl, EZFS_POOL_NOTSUP, errbuf)); - } - verify(nvlist_lookup_nvlist(zhp->zpool_config, ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0); From owner-svn-src-all@freebsd.org Sun Oct 18 18:08: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 4F9D59D1676; Sun, 18 Oct 2015 18:08:35 +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 05F36DDD; Sun, 18 Oct 2015 18:08:34 +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 t9II8YJ9055123; Sun, 18 Oct 2015 18:08:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9II8X3G055121; Sun, 18 Oct 2015 18:08:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181808.t9II8X3G055121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 18:08:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289527 - in head: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 18:08:35 -0000 Author: mav Date: Sun Oct 18 18:08:33 2015 New Revision: 289527 URL: https://svnweb.freebsd.org/changeset/base/289527 Log: MFV r289526: 5561 support root pools on EFI/GPT partitioned disks 5125 update zpool/libzfs to manage bootable whole disk pools (EFI/GPT labeled disks) Reviewed by: Jean McCormack Reviewed by: Josef 'Jeff' Sipek Approved by: Dan McDonald Author: Hans Rosenfeld illumos/illumos-gate@1a902ef8628b0dffd6df5442354ab59bb8530962 This is NOP changes for FreeBSD. Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sun Oct 18 17:57:42 2015 (r289526) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sun Oct 18 18:08:33 2015 (r289527) @@ -402,29 +402,6 @@ bootfs_name_valid(const char *pool, char return (B_FALSE); } -/* - * Inspect the configuration to determine if any of the devices contain - * an EFI label. - */ -static boolean_t -pool_uses_efi(nvlist_t *config) -{ -#ifdef illumos - nvlist_t **child; - uint_t c, children; - - if (nvlist_lookup_nvlist_array(config, ZPOOL_CONFIG_CHILDREN, - &child, &children) != 0) - return (read_efi_label(config, NULL) >= 0); - - for (c = 0; c < children; c++) { - if (pool_uses_efi(child[c])) - return (B_TRUE); - } -#endif /* illumos */ - return (B_FALSE); -} - boolean_t zpool_is_bootable(zpool_handle_t *zhp) { @@ -453,7 +430,6 @@ zpool_valid_proplist(libzfs_handle_t *hd char *slash, *check; struct stat64 statbuf; zpool_handle_t *zhp; - nvlist_t *nvroot; if (nvlist_alloc(&retprops, NV_UNIQUE_NAME, 0) != 0) { (void) no_memory(hdl); @@ -572,23 +548,6 @@ zpool_valid_proplist(libzfs_handle_t *hd (void) zfs_error(hdl, EZFS_OPENFAILED, errbuf); goto error; } - verify(nvlist_lookup_nvlist(zpool_get_config(zhp, NULL), - ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0); - -#ifdef illumos - /* - * bootfs property cannot be set on a disk which has - * been EFI labeled. - */ - if (pool_uses_efi(nvroot)) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "property '%s' not supported on " - "EFI labeled devices"), propname); - (void) zfs_error(hdl, EZFS_POOL_NOTSUP, errbuf); - zpool_close(zhp); - goto error; - } -#endif /* illumos */ zpool_close(zhp); break; @@ -1326,25 +1285,6 @@ zpool_add(zpool_handle_t *zhp, nvlist_t return (zfs_error(hdl, EZFS_BADVERSION, msg)); } - if (zpool_is_bootable(zhp) && nvlist_lookup_nvlist_array(nvroot, - ZPOOL_CONFIG_SPARES, &spares, &nspares) == 0) { - uint64_t s; - - for (s = 0; s < nspares; s++) { - char *path; - - if (nvlist_lookup_string(spares[s], ZPOOL_CONFIG_PATH, - &path) == 0 && pool_uses_efi(spares[s])) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "device '%s' contains an EFI label and " - "cannot be used on root pools."), - zpool_vdev_name(hdl, NULL, spares[s], - B_FALSE)); - return (zfs_error(hdl, EZFS_POOL_NOTSUP, msg)); - } - } - } - if (zpool_get_prop_int(zhp, ZPOOL_PROP_VERSION, NULL) < SPA_VERSION_L2CACHE && nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_L2CACHE, @@ -2365,11 +2305,9 @@ zpool_get_config_physpath(nvlist_t *conf return (EZFS_INVALCONFIG); /* - * root pool can not have EFI labeled disks and can only have - * a single top-level vdev. + * root pool can only have a single top-level vdev. */ - if (strcmp(type, VDEV_TYPE_ROOT) != 0 || count != 1 || - pool_uses_efi(vdev_root)) + if (strcmp(type, VDEV_TYPE_ROOT) != 0 || count != 1) return (EZFS_POOL_INVALARG); (void) vdev_get_physpaths(child[0], physpath, phypath_size, &rsz, @@ -2673,16 +2611,6 @@ zpool_vdev_attach(zpool_handle_t *zhp, (void) snprintf(msg, sizeof (msg), dgettext(TEXT_DOMAIN, "cannot attach %s to %s"), new_disk, old_disk); - /* - * If this is a root pool, make sure that we're not attaching an - * EFI labeled device. - */ - if (rootpool && pool_uses_efi(nvroot)) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "EFI labeled devices are not supported on root pools.")); - return (zfs_error(hdl, EZFS_POOL_NOTSUP, msg)); - } - (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); if ((tgt = zpool_find_vdev(zhp, old_disk, &avail_spare, &l2cache, &islog)) == 0) @@ -3996,13 +3924,6 @@ zpool_label_disk(libzfs_handle_t *hdl, z if (zhp) { nvlist_t *nvroot; - if (zpool_is_bootable(zhp)) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "EFI labeled devices are not supported on root " - "pools.")); - return (zfs_error(hdl, EZFS_POOL_NOTSUP, errbuf)); - } - verify(nvlist_lookup_nvlist(zhp->zpool_config, ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Sun Oct 18 17:57:42 2015 (r289526) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Sun Oct 18 18:08:33 2015 (r289527) @@ -3412,8 +3412,6 @@ vdev_is_bootable(vdev_t *vd) strcmp(vdev_type, VDEV_TYPE_MISSING) == 0) { return (B_FALSE); } - } else if (vd->vdev_wholedisk == 1) { - return (B_FALSE); } for (int c = 0; c < vd->vdev_children; c++) { From owner-svn-src-all@freebsd.org Sun Oct 18 18:25: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 5E9CD9D1A8E; Sun, 18 Oct 2015 18:25:02 +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 05F3A7D8; Sun, 18 Oct 2015 18:25:01 +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 t9IIP1nf060756; Sun, 18 Oct 2015 18:25:01 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IIP1bD060755; Sun, 18 Oct 2015 18:25:01 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181825.t9IIP1bD060755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 18:25:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289528 - head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 18:25:02 -0000 Author: mav Date: Sun Oct 18 18:25:00 2015 New Revision: 289528 URL: https://svnweb.freebsd.org/changeset/base/289528 Log: Reduce diff from upstream. Should be no functional change. Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sun Oct 18 18:08:33 2015 (r289527) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sun Oct 18 18:25:00 2015 (r289528) @@ -3729,17 +3729,18 @@ zpool_history_unpack(char *buf, uint64_t int zpool_get_history(zpool_handle_t *zhp, nvlist_t **nvhisp) { - char *buf = NULL; - uint64_t bufsize = HIS_BUF_LEN_DEF; + char *buf; + uint64_t buflen = HIS_BUF_LEN_DEF; uint64_t off = 0; nvlist_t **records = NULL; uint_t numrecords = 0; int err, i; - if ((buf = malloc(bufsize)) == NULL) + buf = malloc(buflen); + if (buf == NULL) return (ENOMEM); do { - uint64_t bytes_read = bufsize; + uint64_t bytes_read = buflen; uint64_t leftover; if ((err = get_history(zhp, buf, &off, &bytes_read)) != 0) @@ -3753,18 +3754,16 @@ zpool_get_history(zpool_handle_t *zhp, n &leftover, &records, &numrecords)) != 0) break; off -= leftover; - - /* - * If the history block is too big, double the buffer - * size and try again. - */ if (leftover == bytes_read) { + /* + * no progress made, because buffer is not big enough + * to hold this record; resize and retry. + */ + buflen *= 2; free(buf); buf = NULL; - - bufsize <<= 1; - if ((bufsize >= HIS_BUF_LEN_MAX) || - ((buf = malloc(bufsize)) == NULL)) { + if ((buflen >= HIS_BUF_LEN_MAX) || + ((buf = malloc(buflen)) == NULL)) { err = ENOMEM; break; } @@ -3772,6 +3771,7 @@ zpool_get_history(zpool_handle_t *zhp, n /* CONSTCOND */ } while (1); + free(buf); if (!err) { From owner-svn-src-all@freebsd.org Sun Oct 18 18: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 F05719D1B61; Sun, 18 Oct 2015 18:26:20 +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 B1EF098B; Sun, 18 Oct 2015 18:26:20 +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 t9IIQJQ1060844; Sun, 18 Oct 2015 18:26:19 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IIQJrA060841; Sun, 18 Oct 2015 18:26:19 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510181826.t9IIQJrA060841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 18 Oct 2015 18:26:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289529 - in head/sys: arm/arm arm/include conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 18:26:21 -0000 Author: ian Date: Sun Oct 18 18:26:19 2015 New Revision: 289529 URL: https://svnweb.freebsd.org/changeset/base/289529 Log: Import ARM_INTRNG, the "next generation" interrupt architecture for arm and armv6 architecures. The primary enhancement over the old design is support for hierarchical interrupt controllers (such as a gpio driver which can receive interrupts from a root PIC and act as a PIC itself for clients interested in handling a change of gpio pin state as an interrupt). The new code also provides an infrastructure for mapping interrupts described in metadata in the form of a "controller reference plus interrupt number" tuple into the simple "0-n" flat numeric space understood by rman and the bus resource mechanisms. Use of the new code is enabled by setting the ARM_INTRNG option, and by making a few simple changes to the platform's support code. In addition each existing PIC driver needs changes to be ready for INTRNG; this commit contains the changes for the arm/gic driver, which most armv6 SoCs use, but it does not enable the new code yet on any platform. This project has been many years in the making, starting as a GSoC project by Jakub Klama (jceel@) in 2012. That didn't get committed right away and the source base evolved out from under it to some degree. In 2014 I rebased the diffs to then -current and did some enhancements in the area of mapping interrupt numbers and storing associated fdt data, then the project went cold again for a while. Eventually Svata Kraus took that work in progress and did another big round of work on it, removing most of the remaining rough edges. Finally I took that and made one more pass through it, mostly disabling the "INTR_SOLO" feature for now, pending further design discussions on how to most efficiently dispatch a pending interrupt through more than one layer of PIC. The current code with the INTR_SOLO feature disabled uses approximate 100 extra cpu cycles for each cascaded PIC the interrupt has to be passed to, so what's left to do is about efficiency, not correct operation. Differential Revision: https://reviews.freebsd.org/D2047 Added: head/sys/arm/arm/intrng.c (contents, props changed) head/sys/arm/arm/pic_if.m (contents, props changed) Modified: head/sys/arm/arm/gic.c head/sys/arm/arm/mp_machdep.c head/sys/arm/arm/nexus.c head/sys/arm/include/fdt.h head/sys/arm/include/intr.h head/sys/arm/include/smp.h head/sys/conf/files.arm head/sys/conf/options.arm Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Sun Oct 18 18:25:00 2015 (r289528) +++ head/sys/arm/arm/gic.c Sun Oct 18 18:26:19 2015 (r289529) @@ -34,18 +34,25 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_platform.h" + #include #include #include #include #include #include +#include #include #include #include #include #include #include +#include +#ifdef ARM_INTRNG +#include +#endif #include #include #include @@ -55,6 +62,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef ARM_INTRNG +#include "pic_if.h" +#endif + /* We are using GICv2 register naming */ /* Distributor Registers */ @@ -83,8 +94,8 @@ __FBSDID("$FreeBSD$"); #define GICC_ABPR 0x001C /* v1 ICCABPR */ #define GICC_IIDR 0x00FC /* v1 ICCIIDR*/ -#define GIC_FIRST_IPI 0 /* Irqs 0-15 are SGIs/IPIs. */ -#define GIC_LAST_IPI 15 +#define GIC_FIRST_SGI 0 /* Irqs 0-15 are SGIs/IPIs. */ +#define GIC_LAST_SGI 15 #define GIC_FIRST_PPI 16 /* Irqs 16-31 are private (per */ #define GIC_LAST_PPI 31 /* core) peripheral interrupts. */ #define GIC_FIRST_SPI 32 /* Irqs 32+ are shared peripherals. */ @@ -102,8 +113,18 @@ __FBSDID("$FreeBSD$"); #define GIC_DEFAULT_ICFGR_INIT 0x00000000 #endif +#ifdef ARM_INTRNG +static u_int gic_irq_cpu; +static int arm_gic_intr(void *); +static int arm_gic_bind(device_t dev, struct arm_irqsrc *isrc); +#endif + struct arm_gic_softc { device_t gic_dev; +#ifdef ARM_INTRNG + void * gic_intrhand; + struct arm_irqsrc ** gic_irqs; +#endif struct resource * gic_res[3]; bus_space_tag_t gic_c_bst; bus_space_tag_t gic_d_bst; @@ -117,10 +138,13 @@ struct arm_gic_softc { static struct resource_spec arm_gic_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, /* Distributor registers */ { SYS_RES_MEMORY, 1, RF_ACTIVE }, /* CPU Interrupt Intf. registers */ +#ifdef ARM_INTRNG + { SYS_RES_IRQ, 0, RF_ACTIVE | RF_OPTIONAL }, /* Parent interrupt */ +#endif { -1, 0 } }; -static struct arm_gic_softc *arm_gic_sc = NULL; +static struct arm_gic_softc *gic_sc = NULL; #define gic_c_read_4(_sc, _reg) \ bus_space_read_4((_sc)->gic_c_bst, (_sc)->gic_c_bsh, (_reg)) @@ -128,12 +152,16 @@ static struct arm_gic_softc *arm_gic_sc bus_space_write_4((_sc)->gic_c_bst, (_sc)->gic_c_bsh, (_reg), (_val)) #define gic_d_read_4(_sc, _reg) \ bus_space_read_4((_sc)->gic_d_bst, (_sc)->gic_d_bsh, (_reg)) +#define gic_d_write_1(_sc, _reg, _val) \ + bus_space_write_1((_sc)->gic_d_bst, (_sc)->gic_d_bsh, (_reg), (_val)) #define gic_d_write_4(_sc, _reg, _val) \ bus_space_write_4((_sc)->gic_d_bst, (_sc)->gic_d_bsh, (_reg), (_val)) +#ifndef ARM_INTRNG static int gic_config_irq(int irq, enum intr_trigger trig, enum intr_polarity pol); static void gic_post_filter(void *); +#endif static struct ofw_compat_data compat_data[] = { {"arm,gic", true}, /* Non-standard, used in FreeBSD dts. */ @@ -159,6 +187,72 @@ arm_gic_probe(device_t dev) return (BUS_PROBE_DEFAULT); } +#ifdef ARM_INTRNG +static inline void +gic_irq_unmask(struct arm_gic_softc *sc, u_int irq) +{ + + gic_d_write_4(sc, GICD_ISENABLER(irq >> 5), (1UL << (irq & 0x1F))); +} + +static inline void +gic_irq_mask(struct arm_gic_softc *sc, u_int irq) +{ + + gic_d_write_4(sc, GICD_ICENABLER(irq >> 5), (1UL << (irq & 0x1F))); +} +#endif + +#ifdef SMP +#ifdef ARM_INTRNG +static void +arm_gic_init_secondary(device_t dev) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + struct arm_irqsrc *isrc; + u_int irq; + + for (irq = 0; irq < sc->nirqs; irq += 4) + gic_d_write_4(sc, GICD_IPRIORITYR(irq >> 2), 0); + + /* Set all the interrupts to be in Group 0 (secure) */ + for (irq = 0; irq < sc->nirqs; irq += 32) { + gic_d_write_4(sc, GICD_IGROUPR(irq >> 5), 0); + } + + /* Enable CPU interface */ + gic_c_write_4(sc, GICC_CTLR, 1); + + /* Set priority mask register. */ + gic_c_write_4(sc, GICC_PMR, 0xff); + + /* Enable interrupt distribution */ + gic_d_write_4(sc, GICD_CTLR, 0x01); + + /* Unmask attached SGI interrupts. */ + for (irq = GIC_FIRST_SGI; irq <= GIC_LAST_SGI; irq++) { + isrc = sc->gic_irqs[irq]; + if (isrc != NULL && isrc->isrc_handlers != 0) { + CPU_SET(PCPU_GET(cpuid), &isrc->isrc_cpu); + gic_irq_unmask(sc, irq); + } + } + + /* Unmask attached PPI interrupts. */ + for (irq = GIC_FIRST_PPI; irq <= GIC_LAST_PPI; irq++) { + isrc = sc->gic_irqs[irq]; + if (isrc == NULL || isrc->isrc_handlers == 0) + continue; + if (isrc->isrc_flags & ARM_ISRCF_BOUND) { + if (CPU_ISSET(PCPU_GET(cpuid), &isrc->isrc_cpu)) + gic_irq_unmask(sc, irq); + } else { + CPU_SET(PCPU_GET(cpuid), &isrc->isrc_cpu); + gic_irq_unmask(sc, irq); + } + } +} +#else static void arm_gic_init_secondary(device_t dev) { @@ -189,7 +283,10 @@ arm_gic_init_secondary(device_t dev) gic_d_write_4(sc, GICD_ISENABLER(29 >> 5), (1UL << (29 & 0x1F))); gic_d_write_4(sc, GICD_ISENABLER(30 >> 5), (1UL << (30 & 0x1F))); } - +#endif /* ARM_INTRNG */ +#endif /* SMP */ + +#ifndef ARM_INTRNG int gic_decode_fdt(uint32_t iparent, uint32_t *intr, int *interrupt, int *trig, int *pol) @@ -234,6 +331,19 @@ gic_decode_fdt(uint32_t iparent, uint32_ } return (0); } +#endif + +#ifdef ARM_INTRNG +static inline intptr_t +gic_xref(device_t dev) +{ +#ifdef FDT + return (OF_xref_from_node(ofw_bus_get_node(dev))); +#else + return (0); +#endif +} +#endif static int arm_gic_attach(device_t dev) @@ -241,8 +351,11 @@ arm_gic_attach(device_t dev) struct arm_gic_softc *sc; int i; uint32_t icciidr; +#ifdef ARM_INTRNG + intptr_t xref = gic_xref(dev); +#endif - if (arm_gic_sc) + if (gic_sc) return (ENXIO); sc = device_get_softc(dev); @@ -253,7 +366,7 @@ arm_gic_attach(device_t dev) } sc->gic_dev = dev; - arm_gic_sc = sc; + gic_sc = sc; /* Initialize mutex */ mtx_init(&sc->mutex, "GIC lock", "", MTX_SPIN); @@ -273,9 +386,14 @@ arm_gic_attach(device_t dev) sc->nirqs = gic_d_read_4(sc, GICD_TYPER); sc->nirqs = 32 * ((sc->nirqs & 0x1f) + 1); +#ifdef ARM_INTRNG + sc->gic_irqs = malloc(sc->nirqs * sizeof (*sc->gic_irqs), M_DEVBUF, + M_WAITOK | M_ZERO); +#else /* Set up function pointers */ arm_post_filter = gic_post_filter; arm_config_irq = gic_config_irq; +#endif icciidr = gic_c_read_4(sc, GICC_IIDR); device_printf(dev,"pn 0x%x, arch 0x%x, rev 0x%x, implementer 0x%x irqs %u\n", @@ -311,11 +429,456 @@ arm_gic_attach(device_t dev) /* Enable interrupt distribution */ gic_d_write_4(sc, GICD_CTLR, 0x01); +#ifndef ARM_INTRNG + return (0); +#else + /* + * Now, when everything is initialized, it's right time to + * register interrupt controller to interrupt framefork. + */ + if (arm_pic_register(dev, xref) != 0) { + device_printf(dev, "could not register PIC\n"); + goto cleanup; + } + + if (sc->gic_res[2] == NULL) { + 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"); + arm_pic_unregister(dev, xref); + goto cleanup; + } + } else { + if (bus_setup_intr(dev, sc->gic_res[2], INTR_TYPE_CLK, + arm_gic_intr, NULL, sc, &sc->gic_intrhand)) { + device_printf(dev, "could not setup irq handler\n"); + arm_pic_unregister(dev, xref); + goto cleanup; + } + } + + return (0); + +cleanup: + /* + * XXX - not implemented arm_gic_detach() should be called ! + */ + if (sc->gic_irqs != NULL) + free(sc->gic_irqs, M_DEVBUF); + bus_release_resources(dev, arm_gic_spec, sc->gic_res); + return(ENXIO); +#endif +} + +#ifdef ARM_INTRNG +static int +arm_gic_intr(void *arg) +{ + struct arm_gic_softc *sc = arg; + struct arm_irqsrc *isrc; + uint32_t irq_active_reg, irq; + struct trapframe *tf; + + irq_active_reg = gic_c_read_4(sc, GICC_IAR); + irq = irq_active_reg & 0x3FF; + + /* + * 1. We do EOI here because recent read value from active interrupt + * register must be used for it. Another approach is to save this + * value into associated interrupt source. + * 2. EOI must be done on same CPU where interrupt has fired. Thus + * we must ensure that interrupted thread does not migrate to + * another CPU. + * 3. EOI cannot be delayed by any preemption which could happen on + * critical_exit() used in MI intr code, when interrupt thread is + * scheduled. See next point. + * 4. IPI_RENDEZVOUS assumes that no preemption is permitted during + * an action and any use of critical_exit() could break this + * assumption. See comments within smp_rendezvous_action(). + * 5. We always return FILTER_HANDLED as this is an interrupt + * controller dispatch function. Otherwise, in cascaded interrupt + * case, the whole interrupt subtree would be masked. + */ + + if (irq >= sc->nirqs) { + device_printf(sc->gic_dev, "Spurious interrupt detected\n"); + gic_c_write_4(sc, GICC_EOIR, irq_active_reg); + return (FILTER_HANDLED); + } + + tf = curthread->td_intr_frame; +dispatch_irq: + isrc = sc->gic_irqs[irq]; + if (isrc == NULL) { + device_printf(sc->gic_dev, "Stray interrupt %u detected\n", irq); + gic_irq_mask(sc, irq); + gic_c_write_4(sc, GICC_EOIR, irq_active_reg); + goto next_irq; + } + + /* + * Note that GIC_FIRST_SGI is zero and is not used in 'if' statement + * as compiler complains that comparing u_int >= 0 is always true. + */ + if (irq <= GIC_LAST_SGI) { +#ifdef SMP + /* Call EOI for all IPI before dispatch. */ + gic_c_write_4(sc, GICC_EOIR, irq_active_reg); + arm_ipi_dispatch(isrc, tf); + goto next_irq; +#else + printf("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 + } + + if (isrc->isrc_trig == INTR_TRIGGER_EDGE) + gic_c_write_4(sc, GICC_EOIR, irq_active_reg); + + arm_irq_dispatch(isrc, tf); + +next_irq: +// arm_irq_memory_barrier(irq); /* XXX */ +// irq_active_reg = gic_c_read_4(sc, GICC_IAR); +// irq = irq_active_reg & 0x3FF; + if (0 && irq < sc->nirqs) + goto dispatch_irq; + + return (FILTER_HANDLED); +} + +static int +gic_attach_isrc(struct arm_gic_softc *sc, struct arm_irqsrc *isrc, u_int irq) +{ + const char *name; + + /* + * 1. The link between ISRC and controller must be set atomically. + * 2. Just do things only once in rare case when consumers + * of shared interrupt came here at the same moment. + */ + mtx_lock_spin(&sc->mutex); + if (sc->gic_irqs[irq] != NULL) { + mtx_unlock_spin(&sc->mutex); + return (sc->gic_irqs[irq] == isrc ? 0 : EEXIST); + } + sc->gic_irqs[irq] = isrc; + isrc->isrc_data = irq; + mtx_unlock_spin(&sc->mutex); + + name = device_get_nameunit(sc->gic_dev); + if (irq <= GIC_LAST_SGI) + arm_irq_set_name(isrc, "%s,i%u", name, irq - GIC_FIRST_SGI); + else if (irq <= GIC_LAST_PPI) + arm_irq_set_name(isrc, "%s,p%u", name, irq - GIC_FIRST_PPI); + else + arm_irq_set_name(isrc, "%s,s%u", name, irq - GIC_FIRST_SPI); + return (0); +} + +static int +gic_detach_isrc(struct arm_gic_softc *sc, struct arm_irqsrc *isrc, u_int irq) +{ + + mtx_lock_spin(&sc->mutex); + if (sc->gic_irqs[irq] != isrc) { + mtx_unlock_spin(&sc->mutex); + return (sc->gic_irqs[irq] == NULL ? 0 : EINVAL); + } + sc->gic_irqs[irq] = NULL; + isrc->isrc_data = 0; + mtx_unlock_spin(&sc->mutex); + + arm_irq_set_name(isrc, ""); + return (0); +} + +static void +gic_config(struct arm_gic_softc *sc, u_int irq, enum intr_trigger trig, + enum intr_polarity pol) +{ + uint32_t reg; + uint32_t mask; + + if (irq < GIC_FIRST_SPI) + return; + + mtx_lock_spin(&sc->mutex); + + reg = gic_d_read_4(sc, GICD_ICFGR(irq >> 4)); + mask = (reg >> 2*(irq % 16)) & 0x3; + + if (pol == INTR_POLARITY_LOW) { + mask &= ~GICD_ICFGR_POL_MASK; + mask |= GICD_ICFGR_POL_LOW; + } else if (pol == INTR_POLARITY_HIGH) { + mask &= ~GICD_ICFGR_POL_MASK; + mask |= GICD_ICFGR_POL_HIGH; + } + + if (trig == INTR_TRIGGER_LEVEL) { + mask &= ~GICD_ICFGR_TRIG_MASK; + mask |= GICD_ICFGR_TRIG_LVL; + } else if (trig == INTR_TRIGGER_EDGE) { + mask &= ~GICD_ICFGR_TRIG_MASK; + mask |= GICD_ICFGR_TRIG_EDGE; + } + + /* Set mask */ + reg = reg & ~(0x3 << 2*(irq % 16)); + reg = reg | (mask << 2*(irq % 16)); + gic_d_write_4(sc, GICD_ICFGR(irq >> 4), reg); + + mtx_unlock_spin(&sc->mutex); +} +static int +gic_bind(struct arm_gic_softc *sc, u_int irq, cpuset_t *cpus) +{ + uint32_t cpu, end, mask; + + end = min(mp_ncpus, 8); + for (cpu = end; cpu < MAXCPU; cpu++) + if (CPU_ISSET(cpu, cpus)) + return (EINVAL); + + for (mask = 0, cpu = 0; cpu < end; cpu++) + if (CPU_ISSET(cpu, cpus)) + mask |= 1 << cpu; + + gic_d_write_1(sc, GICD_ITARGETSR(0) + irq, mask); return (0); } static int +gic_irq_from_nspc(struct arm_gic_softc *sc, u_int type, u_int num, u_int *irqp) +{ + + switch (type) { + case ARM_IRQ_NSPC_PLAIN: + *irqp = num; + return (*irqp < sc->nirqs ? 0 : EINVAL); + + case ARM_IRQ_NSPC_IRQ: + *irqp = num + GIC_FIRST_PPI; + return (*irqp < sc->nirqs ? 0 : EINVAL); + + case ARM_IRQ_NSPC_IPI: + *irqp = num + GIC_FIRST_SGI; + return (*irqp < GIC_LAST_SGI ? 0 : EINVAL); + + default: + return (EINVAL); + } +} + +static int +gic_map_nspc(struct arm_gic_softc *sc, struct arm_irqsrc *isrc, u_int *irqp) +{ + int error; + + error = gic_irq_from_nspc(sc, isrc->isrc_nspc_type, isrc->isrc_nspc_num, + irqp); + if (error != 0) + return (error); + return (gic_attach_isrc(sc, isrc, *irqp)); +} + +#ifdef FDT +static int +gic_map_fdt(struct arm_gic_softc *sc, struct arm_irqsrc *isrc, u_int *irqp) +{ + u_int irq, tripol; + enum intr_trigger trig; + enum intr_polarity pol; + int error; + + if (isrc->isrc_ncells == 1) { + irq = isrc->isrc_cells[0]; + pol = INTR_POLARITY_CONFORM; + trig = INTR_TRIGGER_CONFORM; + } else if (isrc->isrc_ncells == 3) { + if (isrc->isrc_cells[0] == 0) + irq = isrc->isrc_cells[1] + GIC_FIRST_SPI; + else + irq = isrc->isrc_cells[1] + GIC_FIRST_PPI; + + /* + * In intr[2], bits[3:0] are trigger type and level flags. + * 1 = low-to-high edge triggered + * 2 = high-to-low edge triggered + * 4 = active high level-sensitive + * 8 = active low level-sensitive + * The hardware only supports active-high-level or rising-edge. + */ + tripol = isrc->isrc_cells[2]; + if (tripol & 0x0a) { + printf("unsupported trigger/polarity configuration " + "0x%2x\n", tripol & 0x0f); + return (ENOTSUP); + } + pol = INTR_POLARITY_CONFORM; + if (tripol & 0x01) + trig = INTR_TRIGGER_EDGE; + else + trig = INTR_TRIGGER_LEVEL; + } else + return (EINVAL); + + if (irq >= sc->nirqs) + return (EINVAL); + + error = gic_attach_isrc(sc, isrc, irq); + if (error != 0) + return (error); + + isrc->isrc_nspc_type = ARM_IRQ_NSPC_PLAIN; + isrc->isrc_nspc_num = irq; + isrc->isrc_trig = trig; + isrc->isrc_pol = pol; + + *irqp = irq; + return (0); +} +#endif + +static int +arm_gic_register(device_t dev, struct arm_irqsrc *isrc, boolean_t *is_percpu) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + u_int irq; + int error; + + if (isrc->isrc_type == ARM_ISRCT_NAMESPACE) + error = gic_map_nspc(sc, isrc, &irq); +#ifdef FDT + else if (isrc->isrc_type == ARM_ISRCT_FDT) + error = gic_map_fdt(sc, isrc, &irq); +#endif + else + return (EINVAL); + + if (error == 0) + *is_percpu = irq < GIC_FIRST_SPI ? TRUE : FALSE; + return (error); +} + +static void +arm_gic_enable_intr(device_t dev, struct arm_irqsrc *isrc) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + u_int irq = isrc->isrc_data; + + if (isrc->isrc_trig == INTR_TRIGGER_CONFORM) + isrc->isrc_trig = INTR_TRIGGER_LEVEL; + + /* + * XXX - In case that per CPU interrupt is going to be enabled in time + * when SMP is already started, we need some IPI call which + * enables it on others CPUs. Further, it's more complicated as + * pic_enable_source() and pic_disable_source() should act on + * per CPU basis only. Thus, it should be solved here somehow. + */ + if (isrc->isrc_flags & ARM_ISRCF_PERCPU) + CPU_SET(PCPU_GET(cpuid), &isrc->isrc_cpu); + + gic_config(sc, irq, isrc->isrc_trig, isrc->isrc_pol); + arm_gic_bind(dev, isrc); +} + +static void +arm_gic_enable_source(device_t dev, struct arm_irqsrc *isrc) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + u_int irq = isrc->isrc_data; + + arm_irq_memory_barrier(irq); + gic_irq_unmask(sc, irq); +} + +static void +arm_gic_disable_source(device_t dev, struct arm_irqsrc *isrc) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + u_int irq = isrc->isrc_data; + + gic_irq_mask(sc, irq); +} + +static int +arm_gic_unregister(device_t dev, struct arm_irqsrc *isrc) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + u_int irq = isrc->isrc_data; + + return (gic_detach_isrc(sc, isrc, irq)); +} + +static void +arm_gic_pre_ithread(device_t dev, struct arm_irqsrc *isrc) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + + arm_gic_disable_source(dev, isrc); + gic_c_write_4(sc, GICC_EOIR, isrc->isrc_data); +} + +static void +arm_gic_post_ithread(device_t dev, struct arm_irqsrc *isrc) +{ + + arm_irq_memory_barrier(0); + arm_gic_enable_source(dev, isrc); +} + +static void +arm_gic_post_filter(device_t dev, struct arm_irqsrc *isrc) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + + /* EOI for edge-triggered done earlier. */ + if (isrc->isrc_trig == INTR_TRIGGER_EDGE) + return; + + arm_irq_memory_barrier(0); + gic_c_write_4(sc, GICC_EOIR, isrc->isrc_data); +} + +#ifdef SMP +static int +arm_gic_bind(device_t dev, struct arm_irqsrc *isrc) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + uint32_t irq = isrc->isrc_data; + + if (irq < GIC_FIRST_SPI) + return (EINVAL); + + if (CPU_EMPTY(&isrc->isrc_cpu)) { + gic_irq_cpu = arm_irq_next_cpu(gic_irq_cpu, &all_cpus); + CPU_SETOF(gic_irq_cpu, &isrc->isrc_cpu); + } + return (gic_bind(sc, irq, &isrc->isrc_cpu)); +} + +static void +arm_gic_ipi_send(device_t dev, struct arm_irqsrc *isrc, cpuset_t cpus) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + uint32_t irq, val = 0, i; + + irq = isrc->isrc_data; + + for (i = 0; i < MAXCPU; i++) + if (CPU_ISSET(i, &cpus)) + val |= 1 << (16 + i); + + gic_d_write_4(sc, GICD_SGIR(0), val | irq); +} +#endif +#else +static int arm_gic_next_irq(struct arm_gic_softc *sc, int last_irq) { uint32_t active_irq; @@ -327,7 +890,7 @@ arm_gic_next_irq(struct arm_gic_softc *s * bits (ie CPU number), not just the IRQ number, and we do not * have this information later. */ - if ((active_irq & 0x3ff) <= GIC_LAST_IPI) + if ((active_irq & 0x3ff) <= GIC_LAST_SGI) gic_c_write_4(sc, GICC_EOIR, active_irq); active_irq &= 0x3FF; @@ -400,7 +963,7 @@ arm_gic_mask(device_t dev, int irq) struct arm_gic_softc *sc = device_get_softc(dev); gic_d_write_4(sc, GICD_ICENABLER(irq >> 5), (1UL << (irq & 0x1F))); - gic_c_write_4(sc, GICC_EOIR, irq); + gic_c_write_4(sc, GICC_EOIR, irq); /* XXX - not allowed */ } static void @@ -408,7 +971,7 @@ arm_gic_unmask(device_t dev, int irq) { struct arm_gic_softc *sc = device_get_softc(dev); - if (irq > GIC_LAST_IPI) + if (irq > GIC_LAST_SGI) arm_irq_memory_barrier(irq); gic_d_write_4(sc, GICD_ISENABLER(irq >> 5), (1UL << (irq & 0x1F))); @@ -455,10 +1018,10 @@ arm_gic_ipi_clear(device_t dev, int ipi) static void gic_post_filter(void *arg) { - struct arm_gic_softc *sc = arm_gic_sc; + struct arm_gic_softc *sc = gic_sc; uintptr_t irq = (uintptr_t) arg; - if (irq > GIC_LAST_IPI) + if (irq > GIC_LAST_SGI) arm_irq_memory_barrier(irq); gic_c_write_4(sc, GICC_EOIR, irq); } @@ -467,64 +1030,81 @@ static int gic_config_irq(int irq, enum intr_trigger trig, enum intr_polarity pol) { - return (arm_gic_config(arm_gic_sc->gic_dev, irq, trig, pol)); + return (arm_gic_config(gic_sc->gic_dev, irq, trig, pol)); } void arm_mask_irq(uintptr_t nb) { - arm_gic_mask(arm_gic_sc->gic_dev, nb); + arm_gic_mask(gic_sc->gic_dev, nb); } void arm_unmask_irq(uintptr_t nb) { - arm_gic_unmask(arm_gic_sc->gic_dev, nb); + arm_gic_unmask(gic_sc->gic_dev, nb); } int arm_get_next_irq(int last_irq) { - return (arm_gic_next_irq(arm_gic_sc, last_irq)); + return (arm_gic_next_irq(gic_sc, last_irq)); } +#ifdef SMP void arm_pic_init_secondary(void) { - arm_gic_init_secondary(arm_gic_sc->gic_dev); + arm_gic_init_secondary(gic_sc->gic_dev); } -#ifdef SMP void pic_ipi_send(cpuset_t cpus, u_int ipi) { - arm_gic_ipi_send(arm_gic_sc->gic_dev, cpus, ipi); + arm_gic_ipi_send(gic_sc->gic_dev, cpus, ipi); } int pic_ipi_read(int i) { - return (arm_gic_ipi_read(arm_gic_sc->gic_dev, i)); + return (arm_gic_ipi_read(gic_sc->gic_dev, i)); } void pic_ipi_clear(int ipi) { - arm_gic_ipi_clear(arm_gic_sc->gic_dev, ipi); + arm_gic_ipi_clear(gic_sc->gic_dev, ipi); } #endif +#endif /* ARM_INTRNG */ static device_method_t arm_gic_methods[] = { /* Device interface */ DEVMETHOD(device_probe, arm_gic_probe), DEVMETHOD(device_attach, arm_gic_attach), +#ifdef ARM_INTRNG + /* Interrupt controller interface */ + DEVMETHOD(pic_disable_source, arm_gic_disable_source), + DEVMETHOD(pic_enable_intr, arm_gic_enable_intr), + DEVMETHOD(pic_enable_source, arm_gic_enable_source), + DEVMETHOD(pic_post_filter, arm_gic_post_filter), + DEVMETHOD(pic_post_ithread, arm_gic_post_ithread), + DEVMETHOD(pic_pre_ithread, arm_gic_pre_ithread), + DEVMETHOD(pic_register, arm_gic_register), + DEVMETHOD(pic_unregister, arm_gic_unregister), +#ifdef SMP + DEVMETHOD(pic_bind, arm_gic_bind), + DEVMETHOD(pic_init_secondary, arm_gic_init_secondary), + DEVMETHOD(pic_ipi_send, arm_gic_ipi_send), +#endif +#endif { 0, 0 } }; Added: head/sys/arm/arm/intrng.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/arm/intrng.c Sun Oct 18 18:26:19 2015 (r289529) @@ -0,0 +1,1458 @@ +/*- + * Copyright (c) 2012-2014 Jakub Wojciech Klama . + * Copyright (c) 2015 Svatopluk Kraus + * Copyright (c) 2015 Michal Meloun + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * ARM Interrupt Framework + * + * TODO: - to support IPI (PPI) enabling on other CPUs if already started + * - to complete things for removable PICs + */ + +#include "opt_ddb.h" +#include "opt_platform.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#ifdef DDB +#include +#endif + +#include "pic_if.h" + +#define INTRNAME_LEN (2*MAXCOMLEN + 1) + +#ifdef DEBUG +#define debugf(fmt, args...) do { printf("%s(): ", __func__); \ + printf(fmt,##args); } while (0) +#else +#define debugf(fmt, args...) +#endif + +MALLOC_DECLARE(M_INTRNG); +MALLOC_DEFINE(M_INTRNG, "intrng", "ARM interrupt handling"); + +/* Main ARM interrupt handler called from assembler -> 'hidden' for C code. */ +void arm_irq_handler(struct trapframe *tf); + +/* Root interrupt controller stuff. */ +static struct arm_irqsrc *irq_root_isrc; +static device_t irq_root_dev; +static arm_irq_filter_t *irq_root_filter; +static void *irq_root_arg; +static u_int irq_root_ipicount; + +/* Interrupt controller definition. */ +struct arm_pic { + SLIST_ENTRY(arm_pic) pic_next; + intptr_t pic_xref; /* hardware identification */ + device_t pic_dev; +}; + +static struct mtx pic_list_lock; +static SLIST_HEAD(, arm_pic) pic_list; + +static struct arm_pic *pic_lookup(device_t dev, intptr_t xref); + +/* Interrupt source definition. */ +static struct mtx isrc_table_lock; +static struct arm_irqsrc *irq_sources[NIRQ]; +u_int irq_next_free; + +#define IRQ_INVALID nitems(irq_sources) + +#ifdef SMP +static boolean_t irq_assign_cpu = FALSE; + +static struct arm_irqsrc ipi_sources[ARM_IPI_COUNT]; +static u_int ipi_next_num; +#endif + +/* + * - 2 counters for each I/O interrupt. + * - MAXCPU counters for each IPI counters for SMP. + */ +#ifdef SMP +#define INTRCNT_COUNT (NIRQ * 2 + ARM_IPI_COUNT * MAXCPU) +#else +#define INTRCNT_COUNT (NIRQ * 2) +#endif + +/* Data for MI statistics reporting. */ +u_long intrcnt[INTRCNT_COUNT]; +char intrnames[INTRCNT_COUNT * INTRNAME_LEN]; +size_t sintrcnt = sizeof(intrcnt); +size_t sintrnames = sizeof(intrnames); +static u_int intrcnt_index; + +/* + * Interrupt framework initialization routine. + */ +static void +arm_irq_init(void *dummy __unused) +{ + + SLIST_INIT(&pic_list); + mtx_init(&pic_list_lock, "arm pic list", NULL, MTX_DEF); + mtx_init(&isrc_table_lock, "arm isrc table", NULL, MTX_DEF); +} +SYSINIT(arm_irq_init, SI_SUB_INTR, SI_ORDER_FIRST, arm_irq_init, NULL); + +static void +intrcnt_setname(const char *name, int index) +{ + + snprintf(intrnames + INTRNAME_LEN * index, INTRNAME_LEN, "%-*s", + INTRNAME_LEN - 1, name); +} + +/* + * Update name for interrupt source with interrupt event. + */ +static void +intrcnt_updatename(struct arm_irqsrc *isrc) +{ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Oct 18 18:30: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 114D09D1C6F; Sun, 18 Oct 2015 18:30:49 +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 CF49BC38; Sun, 18 Oct 2015 18:30: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 t9IIUldF061039; Sun, 18 Oct 2015 18:30:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IIUlH6061038; Sun, 18 Oct 2015 18:30:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181830.t9IIUlH6061038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 18:30:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289530 - vendor/illumos/dist/lib/libzfs/common X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 18:30:49 -0000 Author: mav Date: Sun Oct 18 18:30:47 2015 New Revision: 289530 URL: https://svnweb.freebsd.org/changeset/base/289530 Log: 5847 libzfs_diff should check zfs_prop_get() return Reviewed by: Matthew Ahrens Reviewed by: Albert Lee Approved by: Dan McDonald Author: Alexander Eremin illumos/illumos-gate@8430278980a48338e04c7dd52b495b7f1551367a Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_diff.c Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_diff.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_diff.c Sun Oct 18 18:26:19 2015 (r289529) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_diff.c Sun Oct 18 18:30:47 2015 (r289530) @@ -21,6 +21,7 @@ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ /* @@ -616,9 +617,12 @@ get_snapshot_names(differ_info_t *di, co zhp = zfs_open(hdl, di->ds, ZFS_TYPE_FILESYSTEM); while (zhp != NULL) { - (void) zfs_prop_get(zhp, ZFS_PROP_ORIGIN, - origin, sizeof (origin), &src, NULL, 0, B_FALSE); - + if (zfs_prop_get(zhp, ZFS_PROP_ORIGIN, origin, + sizeof (origin), &src, NULL, 0, B_FALSE) != 0) { + (void) zfs_close(zhp); + zhp = NULL; + break; + } if (strncmp(origin, fromsnap, fsnlen) == 0) break; From owner-svn-src-all@freebsd.org Sun Oct 18 18:32: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 8AA279D1E02; Sun, 18 Oct 2015 18:32:23 +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 50DF6FF3; Sun, 18 Oct 2015 18:32:23 +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 t9IIWMVX063801; Sun, 18 Oct 2015 18:32:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IIWMWM063800; Sun, 18 Oct 2015 18:32:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181832.t9IIWMWM063800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 18:32:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289531 - head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 18:32:23 -0000 Author: mav Date: Sun Oct 18 18:32:22 2015 New Revision: 289531 URL: https://svnweb.freebsd.org/changeset/base/289531 Log: MFV r289530: 5847 libzfs_diff should check zfs_prop_get() return Reviewed by: Matthew Ahrens Reviewed by: Albert Lee Approved by: Dan McDonald Author: Alexander Eremin illumos/illumos-gate@8430278980a48338e04c7dd52b495b7f1551367a Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Sun Oct 18 18:30:47 2015 (r289530) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c Sun Oct 18 18:32:22 2015 (r289531) @@ -21,6 +21,7 @@ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ /* @@ -624,9 +625,12 @@ get_snapshot_names(differ_info_t *di, co zhp = zfs_open(hdl, di->ds, ZFS_TYPE_FILESYSTEM); while (zhp != NULL) { - (void) zfs_prop_get(zhp, ZFS_PROP_ORIGIN, - origin, sizeof (origin), &src, NULL, 0, B_FALSE); - + if (zfs_prop_get(zhp, ZFS_PROP_ORIGIN, origin, + sizeof (origin), &src, NULL, 0, B_FALSE) != 0) { + (void) zfs_close(zhp); + zhp = NULL; + break; + } if (strncmp(origin, fromsnap, fsnlen) == 0) break; From owner-svn-src-all@freebsd.org Sun Oct 18 18:37: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 579B29D1F8C; Sun, 18 Oct 2015 18:37:53 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C6A0512A1; Sun, 18 Oct 2015 18:37:52 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t9IIbpxn082550 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 Oct 2015 11:37:51 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t9IIbpKm082549; Sun, 18 Oct 2015 11:37:51 -0700 (PDT) (envelope-from jmg) Date: Sun, 18 Oct 2015 11:37:51 -0700 From: John-Mark Gurney To: Edward Tomasz Napierala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r289516 - in stable/10: sbin/mdconfig sys/dev/md sys/sys Message-ID: <20151018183751.GB65715@funkthat.com> References: <201510181452.t9IEqVh9099329@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201510181452.t9IEqVh9099329@repo.freebsd.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Sun, 18 Oct 2015 11:37:51 -0700 (PDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 18:37:53 -0000 Edward Tomasz Napierala wrote this message on Sun, Oct 18, 2015 at 14:52 +0000: > Author: trasz > Date: Sun Oct 18 14:52:31 2015 > New Revision: 289516 > URL: https://svnweb.freebsd.org/changeset/base/289516 > > Log: > MFC r258909: The following description doesn't match what r258909 says: https://svnweb.freebsd.org/base?view=revision&revision=r258909 wrong commit or wrong message? > Tweak mdconfig(8) manual page, in particular revise the EXAMPLES > section. This removes stuff that doesn't really belong there, > and simplifies examples for the basic operations. > > Sponsored by: The FreeBSD Foundation > > Modified: > stable/10/sbin/mdconfig/mdconfig.8 > stable/10/sbin/mdconfig/mdconfig.c > stable/10/sys/dev/md/md.c > stable/10/sys/sys/mdioctl.h > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/sbin/mdconfig/mdconfig.8 > ============================================================================== > --- stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:47:19 2015 (r289515) > +++ stable/10/sbin/mdconfig/mdconfig.8 Sun Oct 18 14:52:31 2015 (r289516) > @@ -41,7 +41,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd October 26, 2013 > +.Dd November 30, 2013 > .Dt MDCONFIG 8 > .Os > .Sh NAME > @@ -122,6 +122,8 @@ Using > backing is generally preferred instead of using > .Cm malloc > backing. > +.It Cm null > +Bitsink; all writes do nothing, all reads return zeroes. > .El > .It Fl f Ar file > Filename to use for the vnode type memory disk. > > Modified: stable/10/sbin/mdconfig/mdconfig.c > ============================================================================== > --- stable/10/sbin/mdconfig/mdconfig.c Sun Oct 18 14:47:19 2015 (r289515) > +++ stable/10/sbin/mdconfig/mdconfig.c Sun Oct 18 14:52:31 2015 (r289516) > @@ -155,6 +155,9 @@ main(int argc, char **argv) > } else if (!strcmp(optarg, "swap")) { > mdio.md_type = MD_SWAP; > mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS; > + } else if (!strcmp(optarg, "null")) { > + mdio.md_type = MD_NULL; > + mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS; > } else > errx(1, "unknown type: %s", optarg); > break; > @@ -287,9 +290,10 @@ main(int argc, char **argv) > } > } > > - if ((mdio.md_type == MD_MALLOC || mdio.md_type == MD_SWAP) && > - sflag == NULL) > - errx(1, "must specify -s for -t malloc or -t swap"); > + if ((mdio.md_type == MD_MALLOC || mdio.md_type == MD_SWAP || > + mdio.md_type == MD_NULL) && sflag == NULL) > + errx(1, "must specify -s for -t malloc, -t swap, " > + "or -t null"); > if (mdio.md_type == MD_VNODE && mdio.md_file[0] == '\0') > errx(1, "must specify -f for -t vnode"); > } else { > > Modified: stable/10/sys/dev/md/md.c > ============================================================================== > --- stable/10/sys/dev/md/md.c Sun Oct 18 14:47:19 2015 (r289515) > +++ stable/10/sys/dev/md/md.c Sun Oct 18 14:52:31 2015 (r289516) > @@ -911,6 +911,22 @@ mdstart_swap(struct md_s *sc, struct bio > return (rv != VM_PAGER_ERROR ? 0 : ENOSPC); > } > > +static int > +mdstart_null(struct md_s *sc, struct bio *bp) > +{ > + > + switch (bp->bio_cmd) { > + case BIO_READ: > + bzero(bp->bio_data, bp->bio_length); > + cpu_flush_dcache(bp->bio_data, bp->bio_length); > + break; > + case BIO_WRITE: > + break; > + } > + bp->bio_resid = 0; > + return (0); > +} > + > static void > md_kthread(void *arg) > { > @@ -1030,6 +1046,7 @@ mdinit(struct md_s *sc) > pp->flags |= G_PF_ACCEPT_UNMAPPED; > break; > case MD_PRELOAD: > + case MD_NULL: > break; > } > sc->gp = gp; > @@ -1248,6 +1265,7 @@ mdresize(struct md_s *sc, struct md_ioct > > switch (sc->type) { > case MD_VNODE: > + case MD_NULL: > break; > case MD_SWAP: > if (mdio->md_mediasize <= 0 || > @@ -1342,6 +1360,19 @@ mdcreate_swap(struct md_s *sc, struct md > return (error); > } > > +static int > +mdcreate_null(struct md_s *sc, struct md_ioctl *mdio, struct thread *td) > +{ > + > + /* > + * Range check. Disallow negative sizes or any size less then the > + * size of a page. Then round to a page. > + */ > + if (sc->mediasize <= 0 || (sc->mediasize % PAGE_SIZE) != 0) > + return (EDOM); > + > + return (0); > +} > > static int > xmdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) > @@ -1374,6 +1405,7 @@ xmdctlioctl(struct cdev *dev, u_long cmd > case MD_PRELOAD: > case MD_VNODE: > case MD_SWAP: > + case MD_NULL: > break; > default: > return (EINVAL); > @@ -1419,6 +1451,10 @@ xmdctlioctl(struct cdev *dev, u_long cmd > sc->start = mdstart_swap; > error = mdcreate_swap(sc, mdio, td); > break; > + case MD_NULL: > + sc->start = mdstart_null; > + error = mdcreate_null(sc, mdio, td); > + break; > } > if (error != 0) { > mddestroy(sc, td); > @@ -1589,6 +1625,9 @@ g_md_dumpconf(struct sbuf *sb, const cha > case MD_SWAP: > type = "swap"; > break; > + case MD_NULL: > + type = "null"; > + break; > default: > type = "unknown"; > break; > > Modified: stable/10/sys/sys/mdioctl.h > ============================================================================== > --- stable/10/sys/sys/mdioctl.h Sun Oct 18 14:47:19 2015 (r289515) > +++ stable/10/sys/sys/mdioctl.h Sun Oct 18 14:52:31 2015 (r289516) > @@ -43,7 +43,7 @@ > #ifndef _SYS_MDIOCTL_H_ > #define _SYS_MDIOCTL_H_ > > -enum md_types {MD_MALLOC, MD_PRELOAD, MD_VNODE, MD_SWAP}; > +enum md_types {MD_MALLOC, MD_PRELOAD, MD_VNODE, MD_SWAP, MD_NULL}; > > /* > * Ioctl definitions for memory disk pseudo-device. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@freebsd.org Sun Oct 18 18:39: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 78522A18026; Sun, 18 Oct 2015 18:39:18 +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 42F72144B; Sun, 18 Oct 2015 18:39:18 +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 t9IIdHgu064078; Sun, 18 Oct 2015 18:39:17 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IIdHOJ064075; Sun, 18 Oct 2015 18:39:17 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510181839.t9IIdHOJ064075@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 18 Oct 2015 18:39:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289532 - in head/sys/arm: conf ti ti/omap4 X-SVN-Group: head MIME-Version: 1.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, 18 Oct 2015 18:39:18 -0000 Author: ian Date: Sun Oct 18 18:39:16 2015 New Revision: 289532 URL: https://svnweb.freebsd.org/changeset/base/289532 Log: Enable ARM_INTRNG on the pandaboard platform. Differential Revision: https://reviews.freebsd.org/D2048 Modified: head/sys/arm/conf/PANDABOARD head/sys/arm/ti/omap4/std.omap4 head/sys/arm/ti/ti_common.c Modified: head/sys/arm/conf/PANDABOARD ============================================================================== --- head/sys/arm/conf/PANDABOARD Sun Oct 18 18:32:22 2015 (r289531) +++ head/sys/arm/conf/PANDABOARD Sun Oct 18 18:39:16 2015 (r289532) @@ -30,6 +30,8 @@ hints "PANDABOARD.hints" include "std.armv6" include "../ti/omap4/pandaboard/std.pandaboard" +options ARM_INTRNG # new interrupt framework + options HZ=100 options SCHED_ULE # ULE scheduler options PLATFORM Modified: head/sys/arm/ti/omap4/std.omap4 ============================================================================== --- head/sys/arm/ti/omap4/std.omap4 Sun Oct 18 18:32:22 2015 (r289531) +++ head/sys/arm/ti/omap4/std.omap4 Sun Oct 18 18:39:16 2015 (r289532) @@ -17,7 +17,3 @@ makeoptions KERNVIRTADDR=0xc0200000 options SOC_OMAP4 options ARM_L2_PIPT - -options IPI_IRQ_START=0 -options IPI_IRQ_END=15 - Modified: head/sys/arm/ti/ti_common.c ============================================================================== --- head/sys/arm/ti/ti_common.c Sun Oct 18 18:32:22 2015 (r289531) +++ head/sys/arm/ti/ti_common.c Sun Oct 18 18:39:16 2015 (r289532) @@ -70,7 +70,7 @@ fdt_aintc_decode_ic(phandle_t node, pcel #endif fdt_pic_decode_t fdt_pic_table[] = { -#ifdef SOC_OMAP4 +#if defined(SOC_OMAP4) && !defined(ARM_INTRNG) &gic_decode_fdt, #endif #ifdef SOC_TI_AM335X From owner-svn-src-all@freebsd.org Sun Oct 18 18:40: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 7136EA1808F; Sun, 18 Oct 2015 18:40:12 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39B5B1617; Sun, 18 Oct 2015 18:40:12 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IIeBqL064164; Sun, 18 Oct 2015 18:40:11 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IIeBkN064163; Sun, 18 Oct 2015 18:40:11 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201510181840.t9IIeBkN064163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 18 Oct 2015 18:40:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289533 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 18:40:12 -0000 Author: sbruno Date: Sun Oct 18 18:40:11 2015 New Revision: 289533 URL: https://svnweb.freebsd.org/changeset/base/289533 Log: Add VM_KMEM_SIZE_SCALE=1 as these systems are going to have super small amount of RAM, e.g. 16M or 32M Reviewed by: adrian Modified: head/sys/mips/conf/AR933X_BASE Modified: head/sys/mips/conf/AR933X_BASE ============================================================================== --- head/sys/mips/conf/AR933X_BASE Sun Oct 18 18:39:16 2015 (r289532) +++ head/sys/mips/conf/AR933X_BASE Sun Oct 18 18:40:11 2015 (r289533) @@ -40,6 +40,9 @@ options SCSI_NO_OP_STRINGS # .. And no sysctl strings options NO_SYSCTL_DESCR +# For small memory footprints +options VM_KMEM_SIZE_SCALE=1 + # Limit IO size options NBUF=128 From owner-svn-src-all@freebsd.org Sun Oct 18 18:41: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 557C5A18132; Sun, 18 Oct 2015 18:41:32 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2091019D7; Sun, 18 Oct 2015 18:41:32 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IIfV5H066047; Sun, 18 Oct 2015 18:41:31 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IIfVoT066046; Sun, 18 Oct 2015 18:41:31 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201510181841.t9IIfVoT066046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 18 Oct 2015 18:41:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289534 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 18:41:32 -0000 Author: sbruno Date: Sun Oct 18 18:41:30 2015 New Revision: 289534 URL: https://svnweb.freebsd.org/changeset/base/289534 Log: Remove geom_uncompress from TP-MR3020 config. Its now using root on USB and there's no need for it now. Modified: head/sys/mips/conf/TP-MR3020 Modified: head/sys/mips/conf/TP-MR3020 ============================================================================== --- head/sys/mips/conf/TP-MR3020 Sun Oct 18 18:40:11 2015 (r289533) +++ head/sys/mips/conf/TP-MR3020 Sun Oct 18 18:41:30 2015 (r289534) @@ -44,9 +44,6 @@ device arswitch # redboot stuff. options AR71XX_ENV_UBOOT -# uzip - to boot natively from flash -device geom_uncompress - # Used for the static uboot partition map device geom_map From owner-svn-src-all@freebsd.org Sun Oct 18 18:56: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 F047CA18450; Sun, 18 Oct 2015 18:56:49 +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 A98811ED8; Sun, 18 Oct 2015 18:56:49 +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 t9IIum3S069706; Sun, 18 Oct 2015 18:56:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IIumk0069705; Sun, 18 Oct 2015 18:56:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181856.t9IIumk0069705@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 18:56:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289535 - vendor/illumos/dist/cmd/zpool X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 18:56:50 -0000 Author: mav Date: Sun Oct 18 18:56:48 2015 New Revision: 289535 URL: https://svnweb.freebsd.org/changeset/base/289535 Log: 5767 fix several problems with zfs test suite Reviewed by: Matthew Ahrens Reviewed by: Christopher Siden Approved by: Gordon Ross Author: John Wren Kennedy illumos/illumos-gate@52244c0958bdf281ca42932b449f644b4decfdc2 Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c ============================================================================== --- vendor/illumos/dist/cmd/zpool/zpool_main.c Sun Oct 18 18:41:30 2015 (r289534) +++ vendor/illumos/dist/cmd/zpool/zpool_main.c Sun Oct 18 18:56:48 2015 (r289535) @@ -2794,6 +2794,9 @@ print_list_stats(zpool_handle_t *zhp, co uint_t c, children; char *vname; boolean_t scripted = cb->cb_scripted; + uint64_t islog = B_FALSE; + boolean_t haslog = B_FALSE; + char *dashes = "%-*s - - - - - -\n"; verify(nvlist_lookup_uint64_array(nv, ZPOOL_CONFIG_VDEV_STATS, (uint64_t **)&vs, &c) == 0); @@ -2844,24 +2847,47 @@ print_list_stats(zpool_handle_t *zhp, co ZPOOL_CONFIG_IS_HOLE, &ishole) == 0 && ishole) continue; + if (nvlist_lookup_uint64(child[c], + ZPOOL_CONFIG_IS_LOG, &islog) == 0 && islog) { + haslog = B_TRUE; + continue; + } + vname = zpool_vdev_name(g_zfs, zhp, child[c], B_FALSE); print_list_stats(zhp, vname, child[c], cb, depth + 2); free(vname); } - /* - * Include level 2 ARC devices in iostat output - */ + if (haslog == B_TRUE) { + /* LINTED E_SEC_PRINTF_VAR_FMT */ + (void) printf(dashes, cb->cb_namewidth, "log"); + for (c = 0; c < children; c++) { + if (nvlist_lookup_uint64(child[c], ZPOOL_CONFIG_IS_LOG, + &islog) != 0 || !islog) + continue; + vname = zpool_vdev_name(g_zfs, zhp, child[c], B_FALSE); + print_list_stats(zhp, vname, child[c], cb, depth + 2); + free(vname); + } + } + if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_L2CACHE, - &child, &children) != 0) - return; + &child, &children) == 0 && children > 0) { + /* LINTED E_SEC_PRINTF_VAR_FMT */ + (void) printf(dashes, cb->cb_namewidth, "cache"); + for (c = 0; c < children; c++) { + vname = zpool_vdev_name(g_zfs, zhp, child[c], B_FALSE); + print_list_stats(zhp, vname, child[c], cb, depth + 2); + free(vname); + } + } - if (children > 0) { - (void) printf("%-*s - - - - - " - "-\n", cb->cb_namewidth, "cache"); + if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_SPARES, &child, + &children) == 0 && children > 0) { + /* LINTED E_SEC_PRINTF_VAR_FMT */ + (void) printf(dashes, cb->cb_namewidth, "spare"); for (c = 0; c < children; c++) { - vname = zpool_vdev_name(g_zfs, zhp, child[c], - B_FALSE); + vname = zpool_vdev_name(g_zfs, zhp, child[c], B_FALSE); print_list_stats(zhp, vname, child[c], cb, depth + 2); free(vname); } From owner-svn-src-all@freebsd.org Sun Oct 18 19: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 BDF15A186A1; Sun, 18 Oct 2015 19:05:57 +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 99CAC6A2; Sun, 18 Oct 2015 19:05:57 +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 t9IJ5ueb072466; Sun, 18 Oct 2015 19:05:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IJ5uEI072465; Sun, 18 Oct 2015 19:05:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510181905.t9IJ5uEI072465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 18 Oct 2015 19:05:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289536 - head/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: head MIME-Version: 1.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, 18 Oct 2015 19:05:57 -0000 Author: mav Date: Sun Oct 18 19:05:56 2015 New Revision: 289536 URL: https://svnweb.freebsd.org/changeset/base/289536 Log: MFV r289535: 5767 fix several problems with zfs test suite Reviewed by: Matthew Ahrens Reviewed by: Christopher Siden Approved by: Gordon Ross Author: John Wren Kennedy illumos/illumos-gate@52244c0958bdf281ca42932b449f644b4decfdc2 In fact, only unrelated part of that commit is applicable: 8. zpool list -v doesn't print spares It also doesn't correctly identify log devices. Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun Oct 18 18:56:48 2015 (r289535) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun Oct 18 19:05:56 2015 (r289536) @@ -2940,6 +2940,9 @@ print_list_stats(zpool_handle_t *zhp, co uint_t c, children; char *vname; boolean_t scripted = cb->cb_scripted; + uint64_t islog = B_FALSE; + boolean_t haslog = B_FALSE; + char *dashes = "%-*s - - - - - -\n"; verify(nvlist_lookup_uint64_array(nv, ZPOOL_CONFIG_VDEV_STATS, (uint64_t **)&vs, &c) == 0); @@ -2990,24 +2993,47 @@ print_list_stats(zpool_handle_t *zhp, co ZPOOL_CONFIG_IS_HOLE, &ishole) == 0 && ishole) continue; + if (nvlist_lookup_uint64(child[c], + ZPOOL_CONFIG_IS_LOG, &islog) == 0 && islog) { + haslog = B_TRUE; + continue; + } + vname = zpool_vdev_name(g_zfs, zhp, child[c], B_FALSE); print_list_stats(zhp, vname, child[c], cb, depth + 2); free(vname); } - /* - * Include level 2 ARC devices in iostat output - */ + if (haslog == B_TRUE) { + /* LINTED E_SEC_PRINTF_VAR_FMT */ + (void) printf(dashes, cb->cb_namewidth, "log"); + for (c = 0; c < children; c++) { + if (nvlist_lookup_uint64(child[c], ZPOOL_CONFIG_IS_LOG, + &islog) != 0 || !islog) + continue; + vname = zpool_vdev_name(g_zfs, zhp, child[c], B_FALSE); + print_list_stats(zhp, vname, child[c], cb, depth + 2); + free(vname); + } + } + if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_L2CACHE, - &child, &children) != 0) - return; + &child, &children) == 0 && children > 0) { + /* LINTED E_SEC_PRINTF_VAR_FMT */ + (void) printf(dashes, cb->cb_namewidth, "cache"); + for (c = 0; c < children; c++) { + vname = zpool_vdev_name(g_zfs, zhp, child[c], B_FALSE); + print_list_stats(zhp, vname, child[c], cb, depth + 2); + free(vname); + } + } - if (children > 0) { - (void) printf("%-*s - - - - - " - "-\n", cb->cb_namewidth, "cache"); + if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_SPARES, &child, + &children) == 0 && children > 0) { + /* LINTED E_SEC_PRINTF_VAR_FMT */ + (void) printf(dashes, cb->cb_namewidth, "spare"); for (c = 0; c < children; c++) { - vname = zpool_vdev_name(g_zfs, zhp, child[c], - B_FALSE); + vname = zpool_vdev_name(g_zfs, zhp, child[c], B_FALSE); print_list_stats(zhp, vname, child[c], cb, depth + 2); free(vname); } From owner-svn-src-all@freebsd.org Sun Oct 18 19:54: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 728EDA1811C; Sun, 18 Oct 2015 19:54:12 +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 3D7B2C2D; Sun, 18 Oct 2015 19:54:12 +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 t9IJsBI2086920; Sun, 18 Oct 2015 19:54:11 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IJsBKJ086917; Sun, 18 Oct 2015 19:54:11 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510181954.t9IJsBKJ086917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 18 Oct 2015 19:54:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289537 - in head/sys/arm: conf 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: Sun, 18 Oct 2015 19:54:12 -0000 Author: ian Date: Sun Oct 18 19:54:11 2015 New Revision: 289537 URL: https://svnweb.freebsd.org/changeset/base/289537 Log: Enable ARM_INTRNG on IMX6 platforms, and make the imx_gpio driver an interrupt controller. The latter is required for INTRNG, because of the hardware erratum workaround installed by the linux folks into the imx6 FDT data, which remaps an ethernet interrupt to the gpio device. In the non-INTRNG world we intercept the call to map the interrupt and map it back to the ethernet hardware (because we don't need linux's workaround), but in the INTRNG world we lose the hookpoint where that remapping was happening, but we gain the ability to work the way linux does by having the gpio driver dispatch the interrupt. Modified: head/sys/arm/conf/IMX6 head/sys/arm/freescale/imx/imx6_machdep.c head/sys/arm/freescale/imx/imx_gpio.c Modified: head/sys/arm/conf/IMX6 ============================================================================== --- head/sys/arm/conf/IMX6 Sun Oct 18 19:05:56 2015 (r289536) +++ head/sys/arm/conf/IMX6 Sun Oct 18 19:54:11 2015 (r289537) @@ -22,6 +22,8 @@ ident IMX6 include "std.armv6" include "../freescale/imx/std.imx6" +options ARM_INTRNG + options SOC_IMX6 options HZ=500 # Scheduling quantum is 2 milliseconds. Modified: head/sys/arm/freescale/imx/imx6_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_machdep.c Sun Oct 18 19:05:56 2015 (r289536) +++ head/sys/arm/freescale/imx/imx6_machdep.c Sun Oct 18 19:54:11 2015 (r289537) @@ -58,6 +58,7 @@ struct fdt_fixup_entry fdt_fixup_table[] static uint32_t gpio1_node; +#ifndef ARM_INTRNG /* * Work around the linux workaround for imx6 erratum 006687, in which some * ethernet interrupts don't go to the GPC and thus won't wake the system from @@ -91,6 +92,7 @@ fdt_pic_decode_t fdt_pic_table[] = { &imx6_decode_fdt, NULL }; +#endif static vm_offset_t imx6_lastaddr(platform_t plat) Modified: head/sys/arm/freescale/imx/imx_gpio.c ============================================================================== --- head/sys/arm/freescale/imx/imx_gpio.c Sun Oct 18 19:05:56 2015 (r289536) +++ head/sys/arm/freescale/imx/imx_gpio.c Sun Oct 18 19:54:11 2015 (r289537) @@ -34,6 +34,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_platform.h" + #include #include #include @@ -44,8 +46,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include @@ -56,13 +60,9 @@ __FBSDID("$FreeBSD$"); #include "gpio_if.h" -#define GPIO_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) -#define GPIO_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define GPIO_LOCK_INIT(_sc) mtx_init(&_sc->sc_mtx, \ - device_get_nameunit(_sc->sc_dev), "imx_gpio", MTX_DEF) -#define GPIO_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); -#define GPIO_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); -#define GPIO_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); +#ifdef ARM_INTRNG +#include "pic_if.h" +#endif #define WRITE4(_sc, _r, _v) \ bus_space_write_4((_sc)->sc_iot, (_sc)->sc_ioh, (_r), (_v)) @@ -95,13 +95,13 @@ struct imx51_gpio_softc { device_t dev; device_t sc_busdev; struct mtx sc_mtx; - struct resource *sc_res[11]; /* 1 x mem, 2 x IRQ, 8 x IRQ */ - void *gpio_ih[11]; /* 1 ptr is not a big waste */ - int sc_l_irq; /* Last irq resource */ + struct resource *sc_res[3]; /* 1 x mem, 2 x IRQ */ + void *gpio_ih[2]; bus_space_tag_t sc_iot; bus_space_handle_t sc_ioh; int gpio_npins; struct gpio_pin gpio_pins[NGPIO]; + struct arm_irqsrc *gpio_pic_irqsrc[NGPIO]; }; static struct ofw_compat_data compat_data[] = { @@ -118,18 +118,6 @@ static struct resource_spec imx_gpio_spe { -1, 0 } }; -static struct resource_spec imx_gpio0irq_spec[] = { - { SYS_RES_IRQ, 2, RF_ACTIVE }, - { SYS_RES_IRQ, 3, RF_ACTIVE }, - { SYS_RES_IRQ, 4, RF_ACTIVE }, - { SYS_RES_IRQ, 5, RF_ACTIVE }, - { SYS_RES_IRQ, 6, RF_ACTIVE }, - { SYS_RES_IRQ, 7, RF_ACTIVE }, - { SYS_RES_IRQ, 8, RF_ACTIVE }, - { SYS_RES_IRQ, 9, RF_ACTIVE }, - { -1, 0 } -}; - /* * Helpers */ @@ -142,7 +130,6 @@ static void imx51_gpio_pin_configure(str static int imx51_gpio_probe(device_t); static int imx51_gpio_attach(device_t); static int imx51_gpio_detach(device_t); -static int imx51_gpio_intr(void *); /* * GPIO interface @@ -157,12 +144,258 @@ static int imx51_gpio_pin_set(device_t, static int imx51_gpio_pin_get(device_t, uint32_t, unsigned int *); static int imx51_gpio_pin_toggle(device_t, uint32_t pin); +#ifdef ARM_INTRNG +/* + * this is teardown_intr + */ +static void +gpio_pic_disable_intr(device_t dev, struct arm_irqsrc *isrc) +{ + struct imx51_gpio_softc *sc; + u_int irq; + + sc = device_get_softc(dev); + irq = isrc->isrc_data; + + // XXX Not sure this is necessary + mtx_lock_spin(&sc->sc_mtx); + CLEAR4(sc, IMX_GPIO_IMR_REG, (1U << irq)); + WRITE4(sc, IMX_GPIO_ISR_REG, (1U << irq)); + mtx_unlock_spin(&sc->sc_mtx); +} + +/* + * this is mask_intr + */ +static void +gpio_pic_disable_source(device_t dev, struct arm_irqsrc *isrc) +{ + struct imx51_gpio_softc *sc; + + sc = device_get_softc(dev); + + mtx_lock_spin(&sc->sc_mtx); + CLEAR4(sc, IMX_GPIO_IMR_REG, (1U << isrc->isrc_data)); + mtx_unlock_spin(&sc->sc_mtx); +} + +/* + * this is setup_intr + */ +static void +gpio_pic_enable_intr(device_t dev, struct arm_irqsrc *isrc) +{ + struct imx51_gpio_softc *sc; + int icfg; + u_int irq, reg, shift, wrk; + + sc = device_get_softc(dev); + + if (isrc->isrc_trig == INTR_TRIGGER_LEVEL) { + if (isrc->isrc_pol == INTR_POLARITY_LOW) + icfg = GPIO_ICR_COND_LOW; + else + icfg = GPIO_ICR_COND_HIGH; + } else { + if (isrc->isrc_pol == INTR_POLARITY_HIGH) + icfg = GPIO_ICR_COND_FALL; + else + icfg = GPIO_ICR_COND_RISE; + } + + irq = isrc->isrc_data; + if (irq < 16) { + reg = IMX_GPIO_ICR1_REG; + shift = 2 * irq; + } else { + reg = IMX_GPIO_ICR2_REG; + shift = 2 * (irq - 16); + } + + mtx_lock_spin(&sc->sc_mtx); + CLEAR4(sc, IMX_GPIO_IMR_REG, (1U << irq)); + WRITE4(sc, IMX_GPIO_ISR_REG, (1U << irq)); + wrk = READ4(sc, reg); + wrk &= ~(0x03 << shift); + wrk |= icfg << shift; + WRITE4(sc, reg, wrk); + mtx_unlock_spin(&sc->sc_mtx); +} + +/* + * this is unmask_intr + */ +static void +gpio_pic_enable_source(device_t dev, struct arm_irqsrc *isrc) +{ + struct imx51_gpio_softc *sc; + + sc = device_get_softc(dev); + + mtx_lock_spin(&sc->sc_mtx); + SET4(sc, IMX_GPIO_IMR_REG, (1U << isrc->isrc_data)); + mtx_unlock_spin(&sc->sc_mtx); +} + +static void +gpio_pic_post_filter(device_t dev, struct arm_irqsrc *isrc) +{ + struct imx51_gpio_softc *sc; + + sc = device_get_softc(dev); + + arm_irq_memory_barrier(0); + /* EOI. W1C reg so no r-m-w, no locking needed. */ + WRITE4(sc, IMX_GPIO_ISR_REG, (1U << isrc->isrc_data)); +} + +static void +gpio_pic_post_ithread(device_t dev, struct arm_irqsrc *isrc) +{ + + arm_irq_memory_barrier(0); + gpio_pic_enable_source(dev, isrc); +} + +static void +gpio_pic_pre_ithread(device_t dev, struct arm_irqsrc *isrc) +{ + + gpio_pic_disable_source(dev, isrc); +} + +/* + * intrng calls this to make a new isrc known to us. + */ +static int +gpio_pic_register(device_t dev, struct arm_irqsrc *isrc, boolean_t *is_percpu) +{ + struct imx51_gpio_softc *sc; + u_int irq, tripol; + + sc = device_get_softc(dev); + + /* + * From devicetree/bindings/gpio/fsl-imx-gpio.txt: + * #interrupt-cells: 2. The first cell is the GPIO number. The second + * cell bits[3:0] is used to specify trigger type and level flags: + * 1 = low-to-high edge triggered. + * 2 = high-to-low edge triggered. + * 4 = active high level-sensitive. + * 8 = active low level-sensitive. + * We can do any single one of these modes, but nothing in combo. + */ + + if (isrc->isrc_ncells != 2) { + device_printf(sc->dev, "Invalid #interrupt-cells"); + return (EINVAL); + } + + irq = isrc->isrc_cells[0]; + tripol = isrc->isrc_cells[1]; + if (irq >= sc->gpio_npins) { + device_printf(sc->dev, "Invalid interrupt number %d", irq); + return (EINVAL); + } + switch (tripol) + { + case 1: + isrc->isrc_trig = INTR_TRIGGER_EDGE; + isrc->isrc_pol = INTR_POLARITY_HIGH; + break; + case 2: + isrc->isrc_trig = INTR_TRIGGER_EDGE; + isrc->isrc_pol = INTR_POLARITY_LOW; + break; + case 4: + isrc->isrc_trig = INTR_TRIGGER_LEVEL; + isrc->isrc_pol = INTR_POLARITY_HIGH; + break; + case 8: + isrc->isrc_trig = INTR_TRIGGER_LEVEL; + isrc->isrc_pol = INTR_POLARITY_LOW; + break; + default: + device_printf(sc->dev, "unsupported trigger/polarity 0x%2x\n", + tripol); + return (ENOTSUP); + } + isrc->isrc_nspc_type = ARM_IRQ_NSPC_PLAIN; + isrc->isrc_nspc_num = irq; + + /* + * 1. The link between ISRC and controller must be set atomically. + * 2. Just do things only once in rare case when consumers + * of shared interrupt came here at the same moment. + */ + mtx_lock_spin(&sc->sc_mtx); + if (sc->gpio_pic_irqsrc[irq] != NULL) { + mtx_unlock_spin(&sc->sc_mtx); + return (sc->gpio_pic_irqsrc[irq] == isrc ? 0 : EEXIST); + } + sc->gpio_pic_irqsrc[irq] = isrc; + isrc->isrc_data = irq; + mtx_unlock_spin(&sc->sc_mtx); + + arm_irq_set_name(isrc, "%s,%u", device_get_nameunit(sc->dev), irq); + return (0); +} + +static int +gpio_pic_unregister(device_t dev, struct arm_irqsrc *isrc) +{ + struct imx51_gpio_softc *sc; + u_int irq; + + sc = device_get_softc(dev); + + mtx_lock_spin(&sc->sc_mtx); + irq = isrc->isrc_data; + if (sc->gpio_pic_irqsrc[irq] != isrc) { + mtx_unlock_spin(&sc->sc_mtx); + return (sc->gpio_pic_irqsrc[irq] == NULL ? 0 : EINVAL); + } + sc->gpio_pic_irqsrc[irq] = NULL; + isrc->isrc_data = 0; + mtx_unlock_spin(&sc->sc_mtx); + + arm_irq_set_name(isrc, ""); + return (0); +} + +static int +gpio_pic_filter(void *arg) +{ + struct imx51_gpio_softc *sc; + uint32_t i, interrupts; + + sc = arg; + mtx_lock_spin(&sc->sc_mtx); + interrupts = READ4(sc, IMX_GPIO_ISR_REG) & READ4(sc, IMX_GPIO_IMR_REG); + mtx_unlock_spin(&sc->sc_mtx); + + for (i = 0; interrupts != 0; i++, interrupts >>= 1) { + if ((interrupts & 0x1) == 0) + continue; + if (sc->gpio_pic_irqsrc[i]) + arm_irq_dispatch(sc->gpio_pic_irqsrc[i], curthread->td_intr_frame); + else + device_printf(sc->dev, "spurious interrupt %d\n", i); + } + + return (FILTER_HANDLED); +} +#endif + +/* + * + */ static void imx51_gpio_pin_configure(struct imx51_gpio_softc *sc, struct gpio_pin *pin, unsigned int flags) { - GPIO_LOCK(sc); + mtx_lock_spin(&sc->sc_mtx); /* * Manage input/output @@ -171,15 +404,15 @@ imx51_gpio_pin_configure(struct imx51_gp pin->gp_flags &= ~(GPIO_PIN_INPUT|GPIO_PIN_OUTPUT); if (flags & GPIO_PIN_OUTPUT) { pin->gp_flags |= GPIO_PIN_OUTPUT; - SET4(sc, IMX_GPIO_OE_REG, (1 << pin->gp_pin)); + SET4(sc, IMX_GPIO_OE_REG, (1U << pin->gp_pin)); } else { pin->gp_flags |= GPIO_PIN_INPUT; - CLEAR4(sc, IMX_GPIO_OE_REG, (1 << pin->gp_pin)); + CLEAR4(sc, IMX_GPIO_OE_REG, (1U << pin->gp_pin)); } } - GPIO_UNLOCK(sc); + mtx_unlock_spin(&sc->sc_mtx); } static device_t @@ -195,8 +428,11 @@ imx51_gpio_get_bus(device_t dev) static int imx51_gpio_pin_max(device_t dev, int *maxpin) { + struct imx51_gpio_softc *sc; + + sc = device_get_softc(dev); + *maxpin = sc->gpio_npins - 1; - *maxpin = NGPIO - 1; return (0); } @@ -215,9 +451,9 @@ imx51_gpio_pin_getcaps(device_t dev, uin if (i >= sc->gpio_npins) return (EINVAL); - GPIO_LOCK(sc); + mtx_lock_spin(&sc->sc_mtx); *caps = sc->gpio_pins[i].gp_caps; - GPIO_UNLOCK(sc); + mtx_unlock_spin(&sc->sc_mtx); return (0); } @@ -237,9 +473,9 @@ imx51_gpio_pin_getflags(device_t dev, ui if (i >= sc->gpio_npins) return (EINVAL); - GPIO_LOCK(sc); + mtx_lock_spin(&sc->sc_mtx); *flags = sc->gpio_pins[i].gp_flags; - GPIO_UNLOCK(sc); + mtx_unlock_spin(&sc->sc_mtx); return (0); } @@ -259,9 +495,9 @@ imx51_gpio_pin_getname(device_t dev, uin if (i >= sc->gpio_npins) return (EINVAL); - GPIO_LOCK(sc); + mtx_lock_spin(&sc->sc_mtx); memcpy(name, sc->gpio_pins[i].gp_name, GPIOMAXNAME); - GPIO_UNLOCK(sc); + mtx_unlock_spin(&sc->sc_mtx); return (0); } @@ -301,12 +537,12 @@ imx51_gpio_pin_set(device_t dev, uint32_ if (i >= sc->gpio_npins) return (EINVAL); - GPIO_LOCK(sc); + mtx_lock_spin(&sc->sc_mtx); if (value) - SET4(sc, IMX_GPIO_DR_REG, (1 << i)); + SET4(sc, IMX_GPIO_DR_REG, (1U << i)); else - CLEAR4(sc, IMX_GPIO_DR_REG, (1 << i)); - GPIO_UNLOCK(sc); + CLEAR4(sc, IMX_GPIO_DR_REG, (1U << i)); + mtx_unlock_spin(&sc->sc_mtx); return (0); } @@ -326,9 +562,9 @@ imx51_gpio_pin_get(device_t dev, uint32_ if (i >= sc->gpio_npins) return (EINVAL); - GPIO_LOCK(sc); + mtx_lock_spin(&sc->sc_mtx); *val = (READ4(sc, IMX_GPIO_DR_REG) >> i) & 1; - GPIO_UNLOCK(sc); + mtx_unlock_spin(&sc->sc_mtx); return (0); } @@ -348,35 +584,15 @@ imx51_gpio_pin_toggle(device_t dev, uint if (i >= sc->gpio_npins) return (EINVAL); - GPIO_LOCK(sc); + mtx_lock_spin(&sc->sc_mtx); WRITE4(sc, IMX_GPIO_DR_REG, - (READ4(sc, IMX_GPIO_DR_REG) ^ (1 << i))); - GPIO_UNLOCK(sc); + (READ4(sc, IMX_GPIO_DR_REG) ^ (1U << i))); + mtx_unlock_spin(&sc->sc_mtx); return (0); } static int -imx51_gpio_intr(void *arg) -{ - struct imx51_gpio_softc *sc; - uint32_t input, value; - - sc = arg; - input = READ4(sc, IMX_GPIO_ISR_REG); - value = input & READ4(sc, IMX_GPIO_IMR_REG); - WRITE4(sc, IMX_GPIO_ISR_REG, input); - - if (!value) - goto intr_done; - - /* TODO: interrupt handling */ - -intr_done: - return (FILTER_HANDLED); -} - -static int imx51_gpio_probe(device_t dev) { @@ -395,10 +611,13 @@ static int imx51_gpio_attach(device_t dev) { struct imx51_gpio_softc *sc; - int i, irq; + int i, irq, unit; sc = device_get_softc(dev); - mtx_init(&sc->sc_mtx, device_get_nameunit(dev), NULL, MTX_DEF); + sc->dev = dev; + sc->gpio_npins = NGPIO; + + mtx_init(&sc->sc_mtx, device_get_nameunit(sc->dev), NULL, MTX_SPIN); if (bus_alloc_resources(dev, imx_gpio_spec, sc->sc_res)) { device_printf(dev, "could not allocate resources\n"); @@ -407,40 +626,40 @@ imx51_gpio_attach(device_t dev) return (ENXIO); } - sc->dev = dev; - sc->gpio_npins = NGPIO; - sc->sc_l_irq = 2; sc->sc_iot = rman_get_bustag(sc->sc_res[0]); sc->sc_ioh = rman_get_bushandle(sc->sc_res[0]); - - if (bus_alloc_resources(dev, imx_gpio0irq_spec, &sc->sc_res[3]) == 0) { - /* - * First GPIO unit able to serve +8 interrupts for 8 first - * pins. - */ - sc->sc_l_irq = 10; - } - - for (irq = 1; irq <= sc->sc_l_irq; irq ++) { - if ((bus_setup_intr(dev, sc->sc_res[irq], INTR_TYPE_MISC, - imx51_gpio_intr, NULL, sc, &sc->gpio_ih[irq]))) { + /* + * Mask off all interrupts in hardware, then set up interrupt handling. + */ + WRITE4(sc, IMX_GPIO_IMR_REG, 0); + for (irq = 0; irq < 2; irq++) { +#ifdef ARM_INTRNG + if ((bus_setup_intr(dev, sc->sc_res[1 + irq], INTR_TYPE_CLK, + gpio_pic_filter, NULL, sc, &sc->gpio_ih[irq]))) { device_printf(dev, "WARNING: unable to register interrupt handler\n"); imx51_gpio_detach(dev); return (ENXIO); } +#endif } + unit = device_get_unit(dev); for (i = 0; i < sc->gpio_npins; i++) { sc->gpio_pins[i].gp_pin = i; sc->gpio_pins[i].gp_caps = DEFAULT_CAPS; sc->gpio_pins[i].gp_flags = - (READ4(sc, IMX_GPIO_OE_REG) & (1 << i)) ? GPIO_PIN_OUTPUT: + (READ4(sc, IMX_GPIO_OE_REG) & (1U << i)) ? GPIO_PIN_OUTPUT : GPIO_PIN_INPUT; snprintf(sc->gpio_pins[i].gp_name, GPIOMAXNAME, - "imx_gpio%d.%d", device_get_unit(dev), i); + "imx_gpio%d.%d", unit, i); } + +#ifdef ARM_INTRNG + arm_pic_register(dev, OF_xref_from_node(ofw_bus_get_node(dev))); +#endif sc->sc_busdev = gpiobus_attach_bus(dev); + if (sc->sc_busdev == NULL) { imx51_gpio_detach(dev); return (ENXIO); @@ -457,14 +676,11 @@ imx51_gpio_detach(device_t dev) sc = device_get_softc(dev); - KASSERT(mtx_initialized(&sc->sc_mtx), ("gpio mutex not initialized")); - gpiobus_detach_bus(dev); - for (irq = 1; irq <= sc->sc_l_irq; irq ++) { + for (irq = 1; irq <= 2; irq++) { if (sc->gpio_ih[irq]) bus_teardown_intr(dev, sc->sc_res[irq], sc->gpio_ih[irq]); } - bus_release_resources(dev, imx_gpio0irq_spec, &sc->sc_res[3]); bus_release_resources(dev, imx_gpio_spec, sc->sc_res); mtx_destroy(&sc->sc_mtx); @@ -476,6 +692,19 @@ static device_method_t imx51_gpio_method DEVMETHOD(device_attach, imx51_gpio_attach), DEVMETHOD(device_detach, imx51_gpio_detach), +#ifdef ARM_INTRNG + /* Interrupt controller interface */ + DEVMETHOD(pic_disable_intr, gpio_pic_disable_intr), + DEVMETHOD(pic_disable_source, gpio_pic_disable_source), + DEVMETHOD(pic_enable_intr, gpio_pic_enable_intr), + DEVMETHOD(pic_enable_source, gpio_pic_enable_source), + DEVMETHOD(pic_post_filter, gpio_pic_post_filter), + DEVMETHOD(pic_post_ithread, gpio_pic_post_ithread), + DEVMETHOD(pic_pre_ithread, gpio_pic_pre_ithread), + DEVMETHOD(pic_register, gpio_pic_register), + DEVMETHOD(pic_unregister, gpio_pic_unregister), +#endif + /* GPIO protocol */ DEVMETHOD(gpio_get_bus, imx51_gpio_get_bus), DEVMETHOD(gpio_pin_max, imx51_gpio_pin_max), From owner-svn-src-all@freebsd.org Sun Oct 18 20:19: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 490D1A184B2; Sun, 18 Oct 2015 20:19:46 +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 08EC81257; Sun, 18 Oct 2015 20:19:45 +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 t9IKJjWL092729; Sun, 18 Oct 2015 20:19:45 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IKJiDU092726; Sun, 18 Oct 2015 20:19:44 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510182019.t9IKJiDU092726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 18 Oct 2015 20:19:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289538 - 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: Sun, 18 Oct 2015 20:19:46 -0000 Author: cem Date: Sun Oct 18 20:19:44 2015 New Revision: 289538 URL: https://svnweb.freebsd.org/changeset/base/289538 Log: NTB: Rename some constants to match Linux No functional change. Obtained from: Linux (part of e26a5843) (Dual BSD/GPL driver) 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 head/sys/dev/ntb/ntb_hw/ntb_regs.h Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Sun Oct 18 19:54:11 2015 (r289537) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Sun Oct 18 20:19:44 2015 (r289538) @@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$"); #define NTB_MAX_BARS 4 #define NTB_MW_TO_BAR(mw) ((mw) + 1) -#define MAX_MSIX_INTERRUPTS MAX(XEON_MAX_DB_BITS, SOC_MAX_DB_BITS) +#define MAX_MSIX_INTERRUPTS MAX(XEON_DB_COUNT, SOC_DB_COUNT) #define NTB_HB_TIMEOUT 1 /* second */ #define SOC_LINK_RECOVERY_TIME 500 @@ -246,18 +246,18 @@ static struct ntb_hw_info pci_ids[] = { /* XXX: PS/SS IDs left out until they are supported. */ { 0x37258086, "JSF Xeon C35xx/C55xx Non-Transparent Bridge B2B", - NTB_XEON, NTB_REGS_THRU_MW | NTB_B2BDOORBELL_BIT14 }, + NTB_XEON, NTB_SDOORBELL_LOCKUP | NTB_B2BDOORBELL_BIT14 }, { 0x3C0D8086, "SNB Xeon E5/Core i7 Non-Transparent Bridge B2B", - NTB_XEON, NTB_REGS_THRU_MW | NTB_B2BDOORBELL_BIT14 }, + NTB_XEON, NTB_SDOORBELL_LOCKUP | NTB_B2BDOORBELL_BIT14 }, { 0x0E0D8086, "IVT Xeon E5 V2 Non-Transparent Bridge B2B", NTB_XEON, - NTB_REGS_THRU_MW | NTB_B2BDOORBELL_BIT14 | NTB_SB01BASE_LOCKUP - | NTB_BAR_SIZE_4K }, + NTB_SDOORBELL_LOCKUP | NTB_B2BDOORBELL_BIT14 | + NTB_SB01BASE_LOCKUP | NTB_BAR_SIZE_4K }, { 0x2F0D8086, "HSX Xeon E5 V3 Non-Transparent Bridge B2B", NTB_XEON, - NTB_REGS_THRU_MW | NTB_B2BDOORBELL_BIT14 | NTB_SB01BASE_LOCKUP - }, + NTB_SDOORBELL_LOCKUP | NTB_B2BDOORBELL_BIT14 | + NTB_SB01BASE_LOCKUP }, { 0x6F0D8086, "BDX Xeon E5 V4 Non-Transparent Bridge B2B", NTB_XEON, - NTB_REGS_THRU_MW | NTB_B2BDOORBELL_BIT14 | NTB_SB01BASE_LOCKUP - }, + NTB_SDOORBELL_LOCKUP | NTB_B2BDOORBELL_BIT14 | + NTB_SB01BASE_LOCKUP }, { 0x00000000, NULL, NTB_SOC, 0 } }; @@ -390,7 +390,7 @@ ntb_map_pci_bars(struct ntb_softc *ntb) return (rc); ntb->bar_info[NTB_B2B_BAR_2].pci_resource_id = PCIR_BAR(4); - if (HAS_FEATURE(NTB_REGS_THRU_MW) && !HAS_FEATURE(NTB_SPLIT_BAR)) + if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP) && !HAS_FEATURE(NTB_SPLIT_BAR)) rc = map_pci_bar(ntb, map_mmr_bar, &ntb->bar_info[NTB_B2B_BAR_2]); else @@ -400,7 +400,7 @@ ntb_map_pci_bars(struct ntb_softc *ntb) return (rc); ntb->bar_info[NTB_B2B_BAR_3].pci_resource_id = PCIR_BAR(5); - if (HAS_FEATURE(NTB_REGS_THRU_MW)) + if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) rc = map_pci_bar(ntb, map_mmr_bar, &ntb->bar_info[NTB_B2B_BAR_3]); else @@ -650,7 +650,7 @@ ntb_setup_interrupts(struct ntb_softc *n */ mask = 0; if (ntb->type == NTB_XEON) - mask = (1 << XEON_LINK_DB); + mask = (1 << XEON_DB_LINK); db_iowrite(ntb, ntb->reg_ofs.ldb_mask, ~mask); num_vectors = desired_vectors = MIN(pci_msix_count(ntb->device), @@ -852,7 +852,7 @@ handle_xeon_event_irq(void *arg) device_printf(ntb->device, "Error determining link status\n"); /* bit 15 is always the link bit */ - db_iowrite(ntb, ntb->reg_ofs.ldb, 1 << XEON_LINK_DB); + db_iowrite(ntb, ntb->reg_ofs.ldb, 1 << XEON_DB_LINK); } static void @@ -864,9 +864,9 @@ ntb_handle_legacy_interrupt(void *arg) ldb = db_ioread(ntb, ntb->reg_ofs.ldb); - if (ntb->type == NTB_XEON && (ldb & XEON_DB_HW_LINK) != 0) { + if (ntb->type == NTB_XEON && (ldb & XEON_DB_LINK_BIT) != 0) { handle_xeon_event_irq(ntb); - ldb &= ~XEON_DB_HW_LINK; + ldb &= ~XEON_DB_LINK_BIT; } while (ldb != 0) { @@ -1014,21 +1014,21 @@ ntb_setup_xeon(struct ntb_softc *ntb) case NTB_CONN_B2B: /* * reg_ofs.rdb and reg_ofs.spad_remote are effectively ignored - * with the NTB_REGS_THRU_MW errata mode enabled. (See + * with the NTB_SDOORBELL_LOCKUP errata mode enabled. (See * ntb_ring_doorbell() and ntb_read/write_remote_spad().) */ ntb->reg_ofs.rdb = XEON_B2B_DOORBELL_OFFSET; ntb->reg_ofs.spad_remote = XEON_B2B_SPAD_OFFSET; - ntb->limits.max_spads = XEON_MAX_SPADS; + ntb->limits.max_spads = XEON_SPAD_COUNT; break; case NTB_CONN_RP: /* - * Every Xeon today needs NTB_REGS_THRU_MW, so punt on RP for + * Every Xeon today needs NTB_SDOORBELL_LOCKUP, so punt on RP for * now. */ - KASSERT(HAS_FEATURE(NTB_REGS_THRU_MW), + KASSERT(HAS_FEATURE(NTB_SDOORBELL_LOCKUP), ("Xeon without MW errata unimplemented")); device_printf(ntb->device, "NTB-RP disabled to due hardware errata.\n"); @@ -1053,7 +1053,7 @@ ntb_setup_xeon(struct ntb_softc *ntb) * This should already be the case based on the driver defaults, but * write the limit registers first just in case. */ - if (HAS_FEATURE(NTB_REGS_THRU_MW)) { + if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) { /* * Set the Limit register to 4k, the minimum size, to prevent * an illegal access. @@ -1076,9 +1076,9 @@ ntb_setup_xeon(struct ntb_softc *ntb) ntb->reg_ofs.lnk_stat = XEON_LINK_STATUS_OFFSET; ntb->reg_ofs.spci_cmd = XEON_PCICMD_OFFSET; - ntb->limits.max_db_bits = XEON_MAX_DB_BITS; - ntb->limits.msix_cnt = XEON_MSIX_CNT; - ntb->bits_per_vector = XEON_DB_BITS_PER_VEC; + ntb->limits.max_db_bits = XEON_DB_COUNT; + ntb->limits.msix_cnt = XEON_DB_MSIX_VECTOR_COUNT; + ntb->bits_per_vector = XEON_DB_MSIX_VECTOR_SHIFT; /* * HW Errata on bit 14 of b2bdoorbell register. Writes will not be @@ -1089,9 +1089,9 @@ ntb_setup_xeon(struct ntb_softc *ntb) * anyway. Nor for non-B2B connection types. */ if (HAS_FEATURE(NTB_B2BDOORBELL_BIT14) && - !HAS_FEATURE(NTB_REGS_THRU_MW) && + !HAS_FEATURE(NTB_SDOORBELL_LOCKUP) && ntb->conn_type == NTB_CONN_B2B) - ntb->limits.max_db_bits = XEON_MAX_DB_BITS - 1; + ntb->limits.max_db_bits = XEON_DB_COUNT - 1; configure_xeon_secondary_side_bars(ntb); @@ -1128,10 +1128,10 @@ ntb_setup_soc(struct ntb_softc *ntb) ntb->reg_ofs.spad_remote = SOC_B2B_SPAD_OFFSET; ntb->reg_ofs.spci_cmd = SOC_PCICMD_OFFSET; - ntb->limits.max_spads = SOC_MAX_SPADS; - ntb->limits.max_db_bits = SOC_MAX_DB_BITS; - ntb->limits.msix_cnt = SOC_MSIX_CNT; - ntb->bits_per_vector = SOC_DB_BITS_PER_VEC; + ntb->limits.max_spads = SOC_SPAD_COUNT; + ntb->limits.max_db_bits = SOC_DB_COUNT; + ntb->limits.msix_cnt = SOC_DB_MSIX_VECTOR_COUNT; + ntb->bits_per_vector = SOC_DB_MSIX_VECTOR_SHIFT; /* * FIXME - MSI-X bug on early SOC HW, remove once internal issue is @@ -1155,15 +1155,17 @@ configure_soc_secondary_side_bars(struct { if (ntb->dev_type == NTB_DEV_USD) { - ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, MBAR23_DSD_ADDR); - ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, MBAR4_DSD_ADDR); - ntb_reg_write(8, SOC_MBAR23_OFFSET, MBAR23_USD_ADDR); - ntb_reg_write(8, SOC_MBAR45_OFFSET, MBAR4_USD_ADDR); + ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, + XEON_B2B_BAR2_DSD_ADDR); + ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, XEON_B2B_BAR4_DSD_ADDR); + ntb_reg_write(8, SOC_MBAR23_OFFSET, XEON_B2B_BAR2_USD_ADDR); + ntb_reg_write(8, SOC_MBAR45_OFFSET, XEON_B2B_BAR4_USD_ADDR); } else { - ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, MBAR23_USD_ADDR); - ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, MBAR4_USD_ADDR); - ntb_reg_write(8, SOC_MBAR23_OFFSET, MBAR23_DSD_ADDR); - ntb_reg_write(8, SOC_MBAR45_OFFSET, MBAR4_DSD_ADDR); + ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, + XEON_B2B_BAR2_USD_ADDR); + ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, XEON_B2B_BAR4_USD_ADDR); + ntb_reg_write(8, SOC_MBAR23_OFFSET, XEON_B2B_BAR2_DSD_ADDR); + ntb_reg_write(8, SOC_MBAR45_OFFSET, XEON_B2B_BAR4_DSD_ADDR); } } @@ -1172,68 +1174,77 @@ configure_xeon_secondary_side_bars(struc { if (ntb->dev_type == NTB_DEV_USD) { - ntb_reg_write(8, XEON_PBAR2XLAT_OFFSET, MBAR23_DSD_ADDR); - if (HAS_FEATURE(NTB_REGS_THRU_MW)) + ntb_reg_write(8, XEON_PBAR2XLAT_OFFSET, + XEON_B2B_BAR2_DSD_ADDR); + if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, - MBAR01_DSD_ADDR); + XEON_B2B_BAR0_DSD_ADDR); else { if (HAS_FEATURE(NTB_SPLIT_BAR)) { ntb_reg_write(4, XEON_PBAR4XLAT_OFFSET, - MBAR4_DSD_ADDR); + XEON_B2B_BAR4_DSD_ADDR); ntb_reg_write(4, XEON_PBAR5XLAT_OFFSET, - MBAR5_DSD_ADDR); + XEON_B2B_BAR5_DSD_ADDR); } else ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, - MBAR4_DSD_ADDR); + XEON_B2B_BAR4_DSD_ADDR); /* * B2B_XLAT_OFFSET is a 64-bit register but can only be * written 32 bits at a time. */ ntb_reg_write(4, XEON_B2B_XLAT_OFFSETL, - MBAR01_DSD_ADDR & 0xffffffff); + XEON_B2B_BAR0_DSD_ADDR & 0xffffffff); ntb_reg_write(4, XEON_B2B_XLAT_OFFSETU, - MBAR01_DSD_ADDR >> 32); + XEON_B2B_BAR0_DSD_ADDR >> 32); } - ntb_reg_write(8, XEON_SBAR0BASE_OFFSET, MBAR01_USD_ADDR); - ntb_reg_write(8, XEON_SBAR2BASE_OFFSET, MBAR23_USD_ADDR); + ntb_reg_write(8, XEON_SBAR0BASE_OFFSET, + XEON_B2B_BAR0_USD_ADDR); + ntb_reg_write(8, XEON_SBAR2BASE_OFFSET, + XEON_B2B_BAR2_USD_ADDR); if (HAS_FEATURE(NTB_SPLIT_BAR)) { - ntb_reg_write(4, XEON_SBAR4BASE_OFFSET, MBAR4_USD_ADDR); - ntb_reg_write(4, XEON_SBAR5BASE_OFFSET, MBAR5_USD_ADDR); + ntb_reg_write(4, XEON_SBAR4BASE_OFFSET, + XEON_B2B_BAR4_USD_ADDR); + ntb_reg_write(4, XEON_SBAR5BASE_OFFSET, + XEON_B2B_BAR5_USD_ADDR); } else - ntb_reg_write(8, XEON_SBAR4BASE_OFFSET, MBAR4_USD_ADDR); + ntb_reg_write(8, XEON_SBAR4BASE_OFFSET, + XEON_B2B_BAR4_USD_ADDR); } else { - ntb_reg_write(8, XEON_PBAR2XLAT_OFFSET, MBAR23_USD_ADDR); - if (HAS_FEATURE(NTB_REGS_THRU_MW)) + ntb_reg_write(8, XEON_PBAR2XLAT_OFFSET, + XEON_B2B_BAR2_USD_ADDR); + if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, - MBAR01_USD_ADDR); + XEON_B2B_BAR0_USD_ADDR); else { if (HAS_FEATURE(NTB_SPLIT_BAR)) { ntb_reg_write(4, XEON_PBAR4XLAT_OFFSET, - MBAR4_USD_ADDR); + XEON_B2B_BAR4_USD_ADDR); ntb_reg_write(4, XEON_PBAR5XLAT_OFFSET, - MBAR5_USD_ADDR); + XEON_B2B_BAR5_USD_ADDR); } else ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, - MBAR4_USD_ADDR); + XEON_B2B_BAR4_USD_ADDR); /* * B2B_XLAT_OFFSET is a 64-bit register but can only be * written 32 bits at a time. */ ntb_reg_write(4, XEON_B2B_XLAT_OFFSETL, - MBAR01_USD_ADDR & 0xffffffff); + XEON_B2B_BAR0_USD_ADDR & 0xffffffff); ntb_reg_write(4, XEON_B2B_XLAT_OFFSETU, - MBAR01_USD_ADDR >> 32); + XEON_B2B_BAR0_USD_ADDR >> 32); } - ntb_reg_write(8, XEON_SBAR0BASE_OFFSET, MBAR01_DSD_ADDR); - ntb_reg_write(8, XEON_SBAR2BASE_OFFSET, MBAR23_DSD_ADDR); + ntb_reg_write(8, XEON_SBAR0BASE_OFFSET, + XEON_B2B_BAR0_DSD_ADDR); + ntb_reg_write(8, XEON_SBAR2BASE_OFFSET, + XEON_B2B_BAR2_DSD_ADDR); if (HAS_FEATURE(NTB_SPLIT_BAR)) { ntb_reg_write(4, XEON_SBAR4BASE_OFFSET, - MBAR4_DSD_ADDR); + XEON_B2B_BAR4_DSD_ADDR); ntb_reg_write(4, XEON_SBAR5BASE_OFFSET, - MBAR5_DSD_ADDR); + XEON_B2B_BAR5_DSD_ADDR); } else ntb_reg_write(8, XEON_SBAR4BASE_OFFSET, - MBAR4_DSD_ADDR); + XEON_B2B_BAR4_DSD_ADDR); } } @@ -1718,7 +1729,7 @@ ntb_write_remote_spad(struct ntb_softc * if (idx >= ntb->limits.max_spads) return (EINVAL); - if (HAS_FEATURE(NTB_REGS_THRU_MW)) + if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) ntb_mw_write(4, XEON_SHADOW_SPAD_OFFSET + idx * 4, val); else ntb_reg_write(4, ntb->reg_ofs.spad_remote + idx * 4, val); @@ -1744,7 +1755,7 @@ ntb_read_remote_spad(struct ntb_softc *n if (idx >= ntb->limits.max_spads) return (EINVAL); - if (HAS_FEATURE(NTB_REGS_THRU_MW)) + if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) *val = ntb_mw_read(4, XEON_SHADOW_SPAD_OFFSET + idx * 4); else *val = ntb_reg_read(4, ntb->reg_ofs.spad_remote + idx * 4); @@ -1853,7 +1864,7 @@ ntb_ring_doorbell(struct ntb_softc *ntb, bit = ((1 << ntb->bits_per_vector) - 1) << (db * ntb->bits_per_vector); - if (HAS_FEATURE(NTB_REGS_THRU_MW)) { + if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) { ntb_mw_write(2, XEON_SHADOW_PDOORBELL_OFFSET, bit); return; } Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.h Sun Oct 18 19:54:11 2015 (r289537) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.h Sun Oct 18 20:19:44 2015 (r289538) @@ -80,8 +80,7 @@ device_t ntb_get_device(struct ntb_softc /* Hardware owns the low 32 bits of features. */ #define NTB_BAR_SIZE_4K (1 << 0) -/* REGS_THRU_MW is the equivalent of Linux's NTB_HWERR_SDOORBELL_LOCKUP */ -#define NTB_REGS_THRU_MW (1 << 1) +#define NTB_SDOORBELL_LOCKUP (1 << 1) #define NTB_SB01BASE_LOCKUP (1 << 2) #define NTB_B2BDOORBELL_BIT14 (1 << 3) /* Software/configuration owns the top 32 bits. */ Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_regs.h Sun Oct 18 19:54:11 2015 (r289537) +++ head/sys/dev/ntb/ntb_hw/ntb_regs.h Sun Oct 18 20:19:44 2015 (r289538) @@ -33,17 +33,15 @@ #define NTB_LINK_SPEED_MASK 0x000f #define NTB_LINK_WIDTH_MASK 0x03f0 -#define XEON_MSIX_CNT 4 #define XEON_SNB_MAX_MW 2 #define XEON_HSXSPLIT_MAX_MW 3 -#define XEON_MAX_SPADS 16 -#define XEON_MAX_COMPAT_SPADS 16 /* Reserve the uppermost bit for link interrupt */ -#define XEON_MAX_DB_BITS 15 -#define XEON_LINK_DB 15 -#define XEON_DB_BITS_PER_VEC 5 - -#define XEON_DB_HW_LINK 0x8000 +#define XEON_DB_COUNT 15 +#define XEON_DB_LINK 15 +#define XEON_DB_MSIX_VECTOR_COUNT 4 +#define XEON_DB_MSIX_VECTOR_SHIFT 5 +#define XEON_DB_LINK_BIT (1 << XEON_DB_LINK) +#define XEON_SPAD_COUNT 16 #define XEON_PCICMD_OFFSET 0x0504 #define XEON_DEVCTRL_OFFSET 0x0598 @@ -81,11 +79,11 @@ #define XEON_B2B_XLAT_OFFSETL 0x0144 #define XEON_B2B_XLAT_OFFSETU 0x0148 -#define SOC_MSIX_CNT 34 #define SOC_MAX_MW 2 -#define SOC_MAX_SPADS 16 -#define SOC_MAX_DB_BITS 34 -#define SOC_DB_BITS_PER_VEC 1 +#define SOC_DB_COUNT 34 +#define SOC_DB_MSIX_VECTOR_COUNT 34 +#define SOC_DB_MSIX_VECTOR_SHIFT 1 +#define SOC_SPAD_COUNT 16 #define SOC_PCICMD_OFFSET 0xb004 #define SOC_MBAR23_OFFSET 0xb018 @@ -152,14 +150,14 @@ #define NTB_DEV_USD 0 /* All addresses are in low 32-bit space so 32-bit BARs can function */ -#define MBAR01_USD_ADDR 0x2100000cull -#define MBAR23_USD_ADDR 0x4100000cull -#define MBAR4_USD_ADDR 0x8100000cull -#define MBAR5_USD_ADDR 0xa100000cull -#define MBAR01_DSD_ADDR 0x2000000cull -#define MBAR23_DSD_ADDR 0x4000000cull -#define MBAR4_DSD_ADDR 0x8000000cull -#define MBAR5_DSD_ADDR 0xa000000cull +#define XEON_B2B_BAR0_USD_ADDR 0x2100000cull +#define XEON_B2B_BAR2_USD_ADDR 0x4100000cull +#define XEON_B2B_BAR4_USD_ADDR 0x8100000cull +#define XEON_B2B_BAR5_USD_ADDR 0xa100000cull +#define XEON_B2B_BAR0_DSD_ADDR 0x2000000cull +#define XEON_B2B_BAR2_DSD_ADDR 0x4000000cull +#define XEON_B2B_BAR4_DSD_ADDR 0x8000000cull +#define XEON_B2B_BAR5_DSD_ADDR 0xa000000cull /* XEON Shadowed MMIO Space */ #define XEON_SHADOW_PDOORBELL_OFFSET 0x60 From owner-svn-src-all@freebsd.org Sun Oct 18 20:19: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 4CE6BA184D3; Sun, 18 Oct 2015 20:19:55 +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 13364137C; Sun, 18 Oct 2015 20:19:54 +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 t9IKJsXn092783; Sun, 18 Oct 2015 20:19:54 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IKJrVs092779; Sun, 18 Oct 2015 20:19:53 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510182019.t9IKJrVs092779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 18 Oct 2015 20:19:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289539 - in head/sys/dev/ntb: if_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: Sun, 18 Oct 2015 20:19:55 -0000 Author: cem Date: Sun Oct 18 20:19:53 2015 New Revision: 289539 URL: https://svnweb.freebsd.org/changeset/base/289539 Log: NTB: Rename some variables/functions to match Linux No functional change. Still part of the huge e26a5843 rewrite. I'm trying to make it less of a complete rewrite in the FreeBSD version of the driver. Still, it helps if our names match Linux. Obtained from: Linux (e26a5843) (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_hw.h head/sys/dev/ntb/ntb_hw/ntb_regs.h Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 18 20:19:44 2015 (r289538) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 18 20:19:53 2015 (r289539) @@ -220,7 +220,7 @@ enum { IF_NTB_MAX_SPAD, }; -#define QP_TO_MW(ntb, qp) ((qp) % ntb_get_max_mw(ntb)) +#define QP_TO_MW(ntb, qp) ((qp) % ntb_mw_count(ntb)) #define NTB_QP_DEF_NUM_ENTRIES 100 #define NTB_LINK_DOWN_TIMEOUT 10 @@ -493,7 +493,7 @@ ntb_transport_init(struct ntb_softc *ntb int rc, i; if (max_num_clients == 0) - nt->max_qps = MIN(ntb_get_max_cbs(ntb), ntb_get_max_mw(ntb)); + nt->max_qps = MIN(ntb_get_max_cbs(ntb), ntb_mw_count(ntb)); else nt->max_qps = MIN(ntb_get_max_cbs(ntb), max_num_clients); @@ -562,7 +562,7 @@ ntb_transport_init_queue(struct ntb_netd unsigned int num_qps_mw, tx_size; uint8_t mw_num, mw_max; - mw_max = ntb_get_max_mw(nt->ntb); + mw_max = ntb_mw_count(nt->ntb); mw_num = QP_TO_MW(nt->ntb, qp_num); qp = &nt->qps[qp_num]; @@ -1055,7 +1055,7 @@ ntb_transport_link_work(void *arg) uint32_t val, i, num_mw; int rc; - num_mw = ntb_get_max_mw(ntb); + num_mw = ntb_mw_count(ntb); /* send the local info, in the opposite order of the way we read it */ for (i = 0; i < num_mw; i++) { @@ -1214,7 +1214,7 @@ ntb_transport_setup_qp_mw(struct ntb_net uint8_t mw_num, mw_max; unsigned int i; - mw_max = ntb_get_max_mw(nt->ntb); + mw_max = ntb_mw_count(nt->ntb); mw_num = QP_TO_MW(nt->ntb, qp_num); if (nt->max_qps % mw_max && mw_num + 1 < nt->max_qps / mw_max) Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Sun Oct 18 20:19:44 2015 (r289538) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Sun Oct 18 20:19:53 2015 (r289539) @@ -59,17 +59,10 @@ __FBSDID("$FreeBSD$"); * be picked up and redistributed in Linux with a dual GPL/BSD license. */ -#define NTB_CONFIG_BAR 0 -#define NTB_B2B_BAR_1 1 -#define NTB_B2B_BAR_2 2 -#define NTB_B2B_BAR_3 3 -#define NTB_MAX_BARS 4 -#define NTB_MW_TO_BAR(mw) ((mw) + 1) - #define MAX_MSIX_INTERRUPTS MAX(XEON_DB_COUNT, SOC_DB_COUNT) -#define NTB_HB_TIMEOUT 1 /* second */ -#define SOC_LINK_RECOVERY_TIME 500 +#define NTB_HB_TIMEOUT 1 /* second */ +#define SOC_LINK_RECOVERY_TIME 500 /* ms */ #define DEVICE2SOFTC(dev) ((struct ntb_softc *) device_get_softc(dev)) @@ -78,6 +71,14 @@ enum ntb_device_type { NTB_SOC }; +enum ntb_bar { + NTB_CONFIG_BAR = 0, + NTB_B2B_BAR_1, + NTB_B2B_BAR_2, + NTB_B2B_BAR_3, + NTB_MAX_BARS +}; + /* Device features and workarounds */ #define HAS_FEATURE(feature) \ ((ntb->features & (feature)) != 0) @@ -132,12 +133,6 @@ struct ntb_softc { uint8_t max_cbs; struct { - uint8_t max_mw; - uint8_t max_spads; - uint8_t max_db_bits; - uint8_t msix_cnt; - } limits; - struct { uint32_t ldb; uint32_t ldb_mask; uint32_t rdb; @@ -153,10 +148,15 @@ struct ntb_softc { uint32_t ppd; uint8_t conn_type; uint8_t dev_type; - uint8_t bits_per_vector; uint8_t link_status; uint8_t link_width; uint8_t link_speed; + + uint8_t mw_count; + uint8_t spad_count; + uint8_t db_count; + uint8_t db_vec_count; + uint8_t db_vec_shift; }; #ifdef __i386__ @@ -189,9 +189,9 @@ bus_space_write_8(bus_space_tag_t tag, b #define ntb_reg_write(SIZE, offset, val) \ ntb_bar_write(SIZE, NTB_CONFIG_BAR, offset, val) #define ntb_mw_read(SIZE, offset) \ - ntb_bar_read(SIZE, NTB_MW_TO_BAR(ntb->limits.max_mw), offset) + ntb_bar_read(SIZE, ntb_mw_to_bar(ntb, ntb->mw_count), offset) #define ntb_mw_write(SIZE, offset, val) \ - ntb_bar_write(SIZE, NTB_MW_TO_BAR(ntb->limits.max_mw), \ + ntb_bar_write(SIZE, ntb_mw_to_bar(ntb, ntb->mw_count), \ offset, val) typedef int (*bar_map_strategy)(struct ntb_softc *ntb, @@ -200,6 +200,7 @@ typedef int (*bar_map_strategy)(struct n static int ntb_probe(device_t device); static int ntb_attach(device_t device); static int ntb_detach(device_t device); +static inline enum ntb_bar ntb_mw_to_bar(struct ntb_softc *, unsigned mw); static int ntb_map_pci_bars(struct ntb_softc *ntb); static int map_pci_bar(struct ntb_softc *ntb, bar_map_strategy strategy, struct ntb_pci_bar_info *bar); @@ -218,10 +219,10 @@ static void handle_xeon_irq(void *arg); static void handle_xeon_event_irq(void *arg); static void ntb_handle_legacy_interrupt(void *arg); static void ntb_irq_work(void *arg); -static uint64_t db_ioread(struct ntb_softc *, uint32_t regoff); -static void db_iowrite(struct ntb_softc *, uint32_t regoff, uint64_t val); -static void mask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx); -static void unmask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx); +static inline uint64_t ntb_db_read(struct ntb_softc *, uint64_t regoff); +static inline void ntb_db_write(struct ntb_softc *, uint64_t regoff, uint64_t val); +static inline void mask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx); +static inline void unmask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx); static int ntb_create_callbacks(struct ntb_softc *ntb, uint32_t num_vectors); static void ntb_free_callbacks(struct ntb_softc *ntb); static struct ntb_hw_info *ntb_get_device_info(uint32_t device_id); @@ -373,6 +374,16 @@ ntb_detach(device_t device) return (0); } +static inline enum ntb_bar +ntb_mw_to_bar(struct ntb_softc *ntb, unsigned mw) +{ + + KASSERT(mw < ntb->mw_count, ("%s: mw:%u > count:%u", __func__, mw, + (unsigned)ntb->mw_count)); + + return (NTB_B2B_BAR_1 + mw); +} + static int ntb_map_pci_bars(struct ntb_softc *ntb) { @@ -651,10 +662,10 @@ ntb_setup_interrupts(struct ntb_softc *n mask = 0; if (ntb->type == NTB_XEON) mask = (1 << XEON_DB_LINK); - db_iowrite(ntb, ntb->reg_ofs.ldb_mask, ~mask); + ntb_db_write(ntb, ntb->reg_ofs.ldb_mask, ~mask); num_vectors = desired_vectors = MIN(pci_msix_count(ntb->device), - ntb->limits.max_db_bits); + ntb->db_count); if (desired_vectors >= 1) { rc = pci_alloc_msix(ntb->device, &num_vectors); @@ -675,35 +686,37 @@ ntb_setup_interrupts(struct ntb_softc *n } else num_vectors = 1; - /* - * If allocating MSI-X interrupts succeeds, limit callbacks to the - * number of MSI-X slots available. - */ - ntb_create_callbacks(ntb, num_vectors); - - if (ntb->type == NTB_XEON) - rc = ntb_setup_xeon_msix(ntb, num_vectors); - else - rc = ntb_setup_soc_msix(ntb, num_vectors); - if (rc != 0) { - device_printf(ntb->device, - "Error allocating MSI-X interrupts: %d\n", rc); - + if (ntb->type == NTB_XEON && num_vectors < ntb->db_vec_count) { /* * If allocating MSI-X interrupts failed and we're forced to * use legacy INTx anyway, the only limit on individual * callbacks is the number of doorbell bits. - * - * CEM: This seems odd to me but matches the behavior of the - * Linux driver ca. September 2013 */ + ntb->db_vec_count = 1; + ntb->db_vec_shift = ntb->db_count; + ntb_create_callbacks(ntb, ntb->db_count); + rc = ntb_setup_legacy_interrupt(ntb); + } else { + ntb_create_callbacks(ntb, num_vectors); + if (ntb->type == NTB_XEON) + rc = ntb_setup_xeon_msix(ntb, num_vectors); + else + rc = ntb_setup_soc_msix(ntb, num_vectors); + if (rc == 0 && ntb->type == NTB_XEON) { + /* + * Prevent consumers from registering callbacks on the link event irq + * slot, from which they will never be called back. + */ + ntb->db_cb[num_vectors - 1].reserved = true; + ntb->max_cbs--; + } + } + if (rc != 0) { + device_printf(ntb->device, + "Error allocating interrupts: %d\n", rc); ntb_free_callbacks(ntb); - ntb_create_callbacks(ntb, ntb->limits.max_db_bits); } - if (ntb->type == NTB_XEON && rc == ENOSPC) - rc = ntb_setup_legacy_interrupt(ntb); - return (rc); } @@ -759,8 +772,8 @@ ntb_teardown_interrupts(struct ntb_softc * Doorbell register and mask are 64-bit on SoC, 16-bit on Xeon. Abstract it * out to make code clearer. */ -static uint64_t -db_ioread(struct ntb_softc *ntb, uint32_t regoff) +static inline uint64_t +ntb_db_read(struct ntb_softc *ntb, uint64_t regoff) { if (ntb->type == NTB_SOC) @@ -771,8 +784,8 @@ db_ioread(struct ntb_softc *ntb, uint32_ return (ntb_reg_read(2, regoff)); } -static void -db_iowrite(struct ntb_softc *ntb, uint32_t regoff, uint64_t val) +static inline void +ntb_db_write(struct ntb_softc *ntb, uint64_t regoff, uint64_t val) { if (ntb->type == NTB_SOC) { @@ -789,9 +802,9 @@ mask_ldb_interrupt(struct ntb_softc *ntb { uint64_t mask; - mask = db_ioread(ntb, ntb->reg_ofs.ldb_mask); - mask |= 1 << (idx * ntb->bits_per_vector); - db_iowrite(ntb, ntb->reg_ofs.ldb_mask, mask); + mask = ntb_db_read(ntb, ntb->reg_ofs.ldb_mask); + mask |= 1 << (idx * ntb->db_vec_shift); + ntb_db_write(ntb, ntb->reg_ofs.ldb_mask, mask); } static void @@ -799,9 +812,9 @@ unmask_ldb_interrupt(struct ntb_softc *n { uint64_t mask; - mask = db_ioread(ntb, ntb->reg_ofs.ldb_mask); - mask &= ~(1 << (idx * ntb->bits_per_vector)); - db_iowrite(ntb, ntb->reg_ofs.ldb_mask, mask); + mask = ntb_db_read(ntb, ntb->reg_ofs.ldb_mask); + mask &= ~(1 << (idx * ntb->db_vec_shift)); + ntb_db_write(ntb, ntb->reg_ofs.ldb_mask, mask); } static void @@ -810,7 +823,7 @@ handle_soc_irq(void *arg) struct ntb_db_cb *db_cb = arg; struct ntb_softc *ntb = db_cb->ntb; - db_iowrite(ntb, ntb->reg_ofs.ldb, (uint64_t) 1 << db_cb->db_num); + ntb_db_write(ntb, ntb->reg_ofs.ldb, (uint64_t) 1 << db_cb->db_num); if (db_cb->callback != NULL) { mask_ldb_interrupt(ntb, db_cb->db_num); @@ -830,9 +843,9 @@ handle_xeon_irq(void *arg) * vectors, with the 4th having a single bit for link * interrupts. */ - db_iowrite(ntb, ntb->reg_ofs.ldb, - ((1 << ntb->bits_per_vector) - 1) << - (db_cb->db_num * ntb->bits_per_vector)); + ntb_db_write(ntb, ntb->reg_ofs.ldb, + ((1 << ntb->db_vec_shift) - 1) << + (db_cb->db_num * ntb->db_vec_shift)); if (db_cb->callback != NULL) { mask_ldb_interrupt(ntb, db_cb->db_num); @@ -852,7 +865,7 @@ handle_xeon_event_irq(void *arg) device_printf(ntb->device, "Error determining link status\n"); /* bit 15 is always the link bit */ - db_iowrite(ntb, ntb->reg_ofs.ldb, 1 << XEON_DB_LINK); + ntb_db_write(ntb, ntb->reg_ofs.ldb, 1 << XEON_DB_LINK); } static void @@ -862,7 +875,7 @@ ntb_handle_legacy_interrupt(void *arg) unsigned int i; uint64_t ldb; - ldb = db_ioread(ntb, ntb->reg_ofs.ldb); + ldb = ntb_db_read(ntb, ntb->reg_ofs.ldb); if (ntb->type == NTB_XEON && (ldb & XEON_DB_LINK_BIT) != 0) { handle_xeon_event_irq(ntb); @@ -900,10 +913,14 @@ ntb_free_callbacks(struct ntb_softc *ntb { uint8_t i; + if (ntb->db_cb == NULL) + return; + for (i = 0; i < ntb->max_cbs; i++) ntb_unregister_db_callback(ntb, i); free(ntb->db_cb, M_NTB); + ntb->db_cb = NULL; ntb->max_cbs = 0; } @@ -932,14 +949,14 @@ ntb_detect_max_mw(struct ntb_softc *ntb) { if (ntb->type == NTB_SOC) { - ntb->limits.max_mw = SOC_MAX_MW; + ntb->mw_count = SOC_MW_COUNT; return; } if (HAS_FEATURE(NTB_SPLIT_BAR)) - ntb->limits.max_mw = XEON_HSXSPLIT_MAX_MW; + ntb->mw_count = XEON_HSX_SPLIT_MW_COUNT; else - ntb->limits.max_mw = XEON_SNB_MAX_MW; + ntb->mw_count = XEON_SNB_MW_COUNT; } static int @@ -1020,7 +1037,7 @@ ntb_setup_xeon(struct ntb_softc *ntb) ntb->reg_ofs.rdb = XEON_B2B_DOORBELL_OFFSET; ntb->reg_ofs.spad_remote = XEON_B2B_SPAD_OFFSET; - ntb->limits.max_spads = XEON_SPAD_COUNT; + ntb->spad_count = XEON_SPAD_COUNT; break; case NTB_CONN_RP: @@ -1063,7 +1080,7 @@ ntb_setup_xeon(struct ntb_softc *ntb) ntb_reg_write(8, XEON_PBAR4LMT_OFFSET, ntb_get_mw_size(ntb, 1) + 0x1000); /* Reserve the last MW for mapping remote spad */ - ntb->limits.max_mw--; + ntb->mw_count--; } else /* * Disable the limit register, just in case it is set to @@ -1076,9 +1093,9 @@ ntb_setup_xeon(struct ntb_softc *ntb) ntb->reg_ofs.lnk_stat = XEON_LINK_STATUS_OFFSET; ntb->reg_ofs.spci_cmd = XEON_PCICMD_OFFSET; - ntb->limits.max_db_bits = XEON_DB_COUNT; - ntb->limits.msix_cnt = XEON_DB_MSIX_VECTOR_COUNT; - ntb->bits_per_vector = XEON_DB_MSIX_VECTOR_SHIFT; + ntb->db_count = XEON_DB_COUNT; + ntb->db_vec_count = XEON_DB_MSIX_VECTOR_COUNT; + ntb->db_vec_shift = XEON_DB_MSIX_VECTOR_SHIFT; /* * HW Errata on bit 14 of b2bdoorbell register. Writes will not be @@ -1091,7 +1108,7 @@ ntb_setup_xeon(struct ntb_softc *ntb) if (HAS_FEATURE(NTB_B2BDOORBELL_BIT14) && !HAS_FEATURE(NTB_SDOORBELL_LOCKUP) && ntb->conn_type == NTB_CONN_B2B) - ntb->limits.max_db_bits = XEON_DB_COUNT - 1; + ntb->db_count = XEON_DB_COUNT - 1; configure_xeon_secondary_side_bars(ntb); @@ -1128,10 +1145,10 @@ ntb_setup_soc(struct ntb_softc *ntb) ntb->reg_ofs.spad_remote = SOC_B2B_SPAD_OFFSET; ntb->reg_ofs.spci_cmd = SOC_PCICMD_OFFSET; - ntb->limits.max_spads = SOC_SPAD_COUNT; - ntb->limits.max_db_bits = SOC_DB_COUNT; - ntb->limits.msix_cnt = SOC_DB_MSIX_VECTOR_COUNT; - ntb->bits_per_vector = SOC_DB_MSIX_VECTOR_SHIFT; + ntb->spad_count = SOC_SPAD_COUNT; + ntb->db_count = SOC_DB_COUNT; + ntb->db_vec_count = SOC_DB_MSIX_VECTOR_COUNT; + ntb->db_vec_shift = SOC_DB_MSIX_VECTOR_SHIFT; /* * FIXME - MSI-X bug on early SOC HW, remove once internal issue is @@ -1648,7 +1665,7 @@ uint8_t ntb_get_max_spads(struct ntb_softc *ntb) { - return (ntb->limits.max_spads); + return (ntb->spad_count); } uint8_t @@ -1659,10 +1676,10 @@ ntb_get_max_cbs(struct ntb_softc *ntb) } uint8_t -ntb_get_max_mw(struct ntb_softc *ntb) +ntb_mw_count(struct ntb_softc *ntb) { - return (ntb->limits.max_mw); + return (ntb->mw_count); } /** @@ -1680,7 +1697,7 @@ int ntb_write_local_spad(struct ntb_softc *ntb, unsigned int idx, uint32_t val) { - if (idx >= ntb->limits.max_spads) + if (idx >= ntb->spad_count) return (EINVAL); ntb_reg_write(4, ntb->reg_ofs.spad_local + idx * 4, val); @@ -1703,7 +1720,7 @@ int ntb_read_local_spad(struct ntb_softc *ntb, unsigned int idx, uint32_t *val) { - if (idx >= ntb->limits.max_spads) + if (idx >= ntb->spad_count) return (EINVAL); *val = ntb_reg_read(4, ntb->reg_ofs.spad_local + idx * 4); @@ -1726,7 +1743,7 @@ int ntb_write_remote_spad(struct ntb_softc *ntb, unsigned int idx, uint32_t val) { - if (idx >= ntb->limits.max_spads) + if (idx >= ntb->spad_count) return (EINVAL); if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) @@ -1752,7 +1769,7 @@ int ntb_read_remote_spad(struct ntb_softc *ntb, unsigned int idx, uint32_t *val) { - if (idx >= ntb->limits.max_spads) + if (idx >= ntb->spad_count) return (EINVAL); if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) @@ -1777,20 +1794,20 @@ void * ntb_get_mw_vbase(struct ntb_softc *ntb, unsigned int mw) { - if (mw >= ntb_get_max_mw(ntb)) + if (mw >= ntb_mw_count(ntb)) return (NULL); - return (ntb->bar_info[NTB_MW_TO_BAR(mw)].vbase); + return (ntb->bar_info[ntb_mw_to_bar(ntb, mw)].vbase); } vm_paddr_t ntb_get_mw_pbase(struct ntb_softc *ntb, unsigned int mw) { - if (mw >= ntb_get_max_mw(ntb)) + if (mw >= ntb_mw_count(ntb)) return (0); - return (ntb->bar_info[NTB_MW_TO_BAR(mw)].pbase); + return (ntb->bar_info[ntb_mw_to_bar(ntb, mw)].pbase); } /** @@ -1806,10 +1823,10 @@ u_long ntb_get_mw_size(struct ntb_softc *ntb, unsigned int mw) { - if (mw >= ntb_get_max_mw(ntb)) + if (mw >= ntb_mw_count(ntb)) return (0); - return (ntb->bar_info[NTB_MW_TO_BAR(mw)].size); + return (ntb->bar_info[ntb_mw_to_bar(ntb, mw)].size); } /** @@ -1826,10 +1843,10 @@ void ntb_set_mw_addr(struct ntb_softc *ntb, unsigned int mw, uint64_t addr) { - if (mw >= ntb_get_max_mw(ntb)) + if (mw >= ntb_mw_count(ntb)) return; - switch (NTB_MW_TO_BAR(mw)) { + switch (ntb_mw_to_bar(ntb, mw)) { case NTB_B2B_BAR_1: ntb_reg_write(8, ntb->reg_ofs.bar2_xlat, addr); break; @@ -1842,6 +1859,9 @@ ntb_set_mw_addr(struct ntb_softc *ntb, u case NTB_B2B_BAR_3: ntb_reg_write(4, ntb->reg_ofs.bar5_xlat, addr); break; + default: + KASSERT(false, ("invalid BAR")); + break; } } @@ -1861,15 +1881,15 @@ ntb_ring_doorbell(struct ntb_softc *ntb, if (ntb->type == NTB_SOC) bit = 1 << db; else - bit = ((1 << ntb->bits_per_vector) - 1) << - (db * ntb->bits_per_vector); + bit = ((1 << ntb->db_vec_shift) - 1) << + (db * ntb->db_vec_shift); if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) { ntb_mw_write(2, XEON_SHADOW_PDOORBELL_OFFSET, bit); return; } - db_iowrite(ntb, ntb->reg_ofs.rdb, bit); + ntb_db_write(ntb, ntb->reg_ofs.rdb, bit); } /** Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.h Sun Oct 18 20:19:44 2015 (r289538) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.h Sun Oct 18 20:19:53 2015 (r289539) @@ -62,7 +62,7 @@ struct ntb_softc *ntb_register_transport void *transport); void ntb_unregister_transport(struct ntb_softc *ntb); uint8_t ntb_get_max_cbs(struct ntb_softc *ntb); -uint8_t ntb_get_max_mw(struct ntb_softc *ntb); +uint8_t ntb_mw_count(struct ntb_softc *ntb); uint8_t ntb_get_max_spads(struct ntb_softc *ntb); int ntb_write_local_spad(struct ntb_softc *ntb, unsigned int idx, uint32_t val); int ntb_read_local_spad(struct ntb_softc *ntb, unsigned int idx, uint32_t *val); Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_regs.h Sun Oct 18 20:19:44 2015 (r289538) +++ head/sys/dev/ntb/ntb_hw/ntb_regs.h Sun Oct 18 20:19:53 2015 (r289539) @@ -33,8 +33,8 @@ #define NTB_LINK_SPEED_MASK 0x000f #define NTB_LINK_WIDTH_MASK 0x03f0 -#define XEON_SNB_MAX_MW 2 -#define XEON_HSXSPLIT_MAX_MW 3 +#define XEON_SNB_MW_COUNT 2 +#define XEON_HSX_SPLIT_MW_COUNT 3 /* Reserve the uppermost bit for link interrupt */ #define XEON_DB_COUNT 15 #define XEON_DB_LINK 15 @@ -79,7 +79,7 @@ #define XEON_B2B_XLAT_OFFSETL 0x0144 #define XEON_B2B_XLAT_OFFSETU 0x0148 -#define SOC_MAX_MW 2 +#define SOC_MW_COUNT 2 #define SOC_DB_COUNT 34 #define SOC_DB_MSIX_VECTOR_COUNT 34 #define SOC_DB_MSIX_VECTOR_SHIFT 1 From owner-svn-src-all@freebsd.org Sun Oct 18 20:20: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 1E71BA1850B; Sun, 18 Oct 2015 20:20:04 +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 D17F2151F; Sun, 18 Oct 2015 20:20:03 +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 t9IKK2XF092850; Sun, 18 Oct 2015 20:20:02 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IKK2ia092849; Sun, 18 Oct 2015 20:20:02 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510182020.t9IKK2ia092849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 18 Oct 2015 20:20:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289540 - 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: Sun, 18 Oct 2015 20:20:04 -0000 Author: cem Date: Sun Oct 18 20:20:02 2015 New Revision: 289540 URL: https://svnweb.freebsd.org/changeset/base/289540 Log: NTB: Simplify interrupt handling by merging SoC/Xeon Some interrupt-related function names changed to match Linux. No functional change. Still part of the huge e26a5843 rewrite in Linux. Obtained from: Linux (e26a5843) (Dual BSD/GPL driver) 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 Sun Oct 18 20:19:53 2015 (r289539) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Sun Oct 18 20:20:02 2015 (r289540) @@ -209,14 +209,12 @@ static int map_memory_window_bar(struct struct ntb_pci_bar_info *bar); static void ntb_unmap_pci_bar(struct ntb_softc *ntb); static int ntb_remap_msix(device_t, uint32_t desired, uint32_t avail); -static int ntb_setup_interrupts(struct ntb_softc *ntb); +static int ntb_init_isr(struct ntb_softc *ntb); static int ntb_setup_legacy_interrupt(struct ntb_softc *ntb); -static int ntb_setup_xeon_msix(struct ntb_softc *ntb, uint32_t num_vectors); -static int ntb_setup_soc_msix(struct ntb_softc *ntb, uint32_t num_vectors); +static int ntb_setup_msix(struct ntb_softc *ntb, uint32_t num_vectors); static void ntb_teardown_interrupts(struct ntb_softc *ntb); -static void handle_soc_irq(void *arg); -static void handle_xeon_irq(void *arg); -static void handle_xeon_event_irq(void *arg); +static inline uint64_t ntb_vec_mask(struct ntb_softc *, uint64_t db_vector); +static void handle_irq(void *arg); static void ntb_handle_legacy_interrupt(void *arg); static void ntb_irq_work(void *arg); static inline uint64_t ntb_db_read(struct ntb_softc *, uint64_t regoff); @@ -340,7 +338,7 @@ ntb_attach(device_t device) error = ntb_setup_xeon(ntb); if (error) goto out; - error = ntb_setup_interrupts(ntb); + error = ntb_init_isr(ntb); if (error) goto out; @@ -526,55 +524,7 @@ ntb_unmap_pci_bar(struct ntb_softc *ntb) } static int -ntb_setup_xeon_msix(struct ntb_softc *ntb, uint32_t num_vectors) -{ - void (*interrupt_handler)(void *); - void *int_arg; - uint32_t i; - int rc; - - if (num_vectors < 4) - return (ENOSPC); - - for (i = 0; i < num_vectors; i++) { - ntb->int_info[i].rid = i + 1; - ntb->int_info[i].res = bus_alloc_resource_any(ntb->device, - SYS_RES_IRQ, &ntb->int_info[i].rid, RF_ACTIVE); - if (ntb->int_info[i].res == NULL) { - device_printf(ntb->device, - "bus_alloc_resource failed\n"); - return (ENOMEM); - } - ntb->int_info[i].tag = NULL; - ntb->allocated_interrupts++; - if (i == num_vectors - 1) { - interrupt_handler = handle_xeon_event_irq; - int_arg = ntb; - } else { - interrupt_handler = handle_xeon_irq; - int_arg = &ntb->db_cb[i]; - } - rc = bus_setup_intr(ntb->device, ntb->int_info[i].res, - INTR_MPSAFE | INTR_TYPE_MISC, NULL, interrupt_handler, - int_arg, &ntb->int_info[i].tag); - if (rc != 0) { - device_printf(ntb->device, - "bus_setup_intr failed\n"); - return (ENXIO); - } - } - - /* - * Prevent consumers from registering callbacks on the link event irq - * slot, from which they will never be called back. - */ - ntb->db_cb[num_vectors - 1].reserved = true; - ntb->max_cbs--; - return (0); -} - -static int -ntb_setup_soc_msix(struct ntb_softc *ntb, uint32_t num_vectors) +ntb_setup_msix(struct ntb_softc *ntb, uint32_t num_vectors) { uint32_t i; int rc; @@ -591,7 +541,7 @@ ntb_setup_soc_msix(struct ntb_softc *ntb ntb->int_info[i].tag = NULL; ntb->allocated_interrupts++; rc = bus_setup_intr(ntb->device, ntb->int_info[i].res, - INTR_MPSAFE | INTR_TYPE_MISC, NULL, handle_soc_irq, + INTR_MPSAFE | INTR_TYPE_MISC, NULL, handle_irq, &ntb->db_cb[i], &ntb->int_info[i].tag); if (rc != 0) { device_printf(ntb->device, "bus_setup_intr failed\n"); @@ -647,7 +597,7 @@ ntb_remap_msix(device_t dev, uint32_t de } static int -ntb_setup_interrupts(struct ntb_softc *ntb) +ntb_init_isr(struct ntb_softc *ntb) { uint32_t desired_vectors, num_vectors; uint64_t mask; @@ -698,10 +648,7 @@ ntb_setup_interrupts(struct ntb_softc *n rc = ntb_setup_legacy_interrupt(ntb); } else { ntb_create_callbacks(ntb, num_vectors); - if (ntb->type == NTB_XEON) - rc = ntb_setup_xeon_msix(ntb, num_vectors); - else - rc = ntb_setup_soc_msix(ntb, num_vectors); + rc = ntb_setup_msix(ntb, num_vectors); if (rc == 0 && ntb->type == NTB_XEON) { /* * Prevent consumers from registering callbacks on the link event irq @@ -807,7 +754,7 @@ mask_ldb_interrupt(struct ntb_softc *ntb ntb_db_write(ntb, ntb->reg_ofs.ldb_mask, mask); } -static void +static inline void unmask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx) { uint64_t mask; @@ -817,55 +764,42 @@ unmask_ldb_interrupt(struct ntb_softc *n ntb_db_write(ntb, ntb->reg_ofs.ldb_mask, mask); } -static void -handle_soc_irq(void *arg) +static inline uint64_t +ntb_vec_mask(struct ntb_softc *ntb, uint64_t db_vector) { - struct ntb_db_cb *db_cb = arg; - struct ntb_softc *ntb = db_cb->ntb; - - ntb_db_write(ntb, ntb->reg_ofs.ldb, (uint64_t) 1 << db_cb->db_num); + uint64_t shift, mask; - if (db_cb->callback != NULL) { - mask_ldb_interrupt(ntb, db_cb->db_num); - callout_reset(&db_cb->irq_work, 0, ntb_irq_work, db_cb); - } + shift = ntb->db_vec_shift; + mask = (1ull << shift) - 1; + return (mask << (shift * db_vector)); } static void -handle_xeon_irq(void *arg) +handle_irq(void *arg) { struct ntb_db_cb *db_cb = arg; struct ntb_softc *ntb = db_cb->ntb; + uint64_t vec_mask; + int rc; - /* - * On Xeon, there are 16 bits in the interrupt register - * but only 4 vectors. So, 5 bits are assigned to the first 3 - * vectors, with the 4th having a single bit for link - * interrupts. - */ - ntb_db_write(ntb, ntb->reg_ofs.ldb, - ((1 << ntb->db_vec_shift) - 1) << - (db_cb->db_num * ntb->db_vec_shift)); + vec_mask = ntb_vec_mask(ntb, db_cb->db_num); + + if (ntb->type == NTB_XEON && (vec_mask & XEON_DB_LINK_BIT) != 0) { + rc = ntb_check_link_status(ntb); + if (rc != 0) + device_printf(ntb->device, + "Error determining link status\n"); + } if (db_cb->callback != NULL) { + KASSERT(!db_cb->reserved, ("user callback on link event cb")); mask_ldb_interrupt(ntb, db_cb->db_num); - callout_reset(&db_cb->irq_work, 0, ntb_irq_work, db_cb); } -} -/* Since we do not have a HW doorbell in SOC, this is only used in JF/JT */ -static void -handle_xeon_event_irq(void *arg) -{ - struct ntb_softc *ntb = arg; - int rc; + ntb_db_write(ntb, ntb->reg_ofs.ldb, vec_mask); - rc = ntb_check_link_status(ntb); - if (rc != 0) - device_printf(ntb->device, "Error determining link status\n"); - - /* bit 15 is always the link bit */ - ntb_db_write(ntb, ntb->reg_ofs.ldb, 1 << XEON_DB_LINK); + if (db_cb->callback != NULL) + callout_reset(&db_cb->irq_work, 0, ntb_irq_work, db_cb); } static void @@ -876,19 +810,10 @@ ntb_handle_legacy_interrupt(void *arg) uint64_t ldb; ldb = ntb_db_read(ntb, ntb->reg_ofs.ldb); - - if (ntb->type == NTB_XEON && (ldb & XEON_DB_LINK_BIT) != 0) { - handle_xeon_event_irq(ntb); - ldb &= ~XEON_DB_LINK_BIT; - } - while (ldb != 0) { i = ffs(ldb); ldb &= ldb - 1; - if (ntb->type == NTB_SOC) - handle_soc_irq(&ntb->db_cb[i]); - else - handle_xeon_irq(&ntb->db_cb[i]); + handle_irq(&ntb->db_cb[i]); } } From owner-svn-src-all@freebsd.org Sun Oct 18 20:20: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 C2480A18550; Sun, 18 Oct 2015 20:20:12 +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 933C417A8; Sun, 18 Oct 2015 20:20:12 +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 t9IKKBZ6092898; Sun, 18 Oct 2015 20:20:11 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IKKBC8092897; Sun, 18 Oct 2015 20:20:11 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510182020.t9IKKBC8092897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 18 Oct 2015 20:20:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289541 - 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: Sun, 18 Oct 2015 20:20:13 -0000 Author: cem Date: Sun Oct 18 20:20:11 2015 New Revision: 289541 URL: https://svnweb.freebsd.org/changeset/base/289541 Log: NTB: Simplify ntb_map_pci_bars Skip using a function pointer for shared error logging. 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 Sun Oct 18 20:20:02 2015 (r289540) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Sun Oct 18 20:20:11 2015 (r289541) @@ -194,16 +194,12 @@ bus_space_write_8(bus_space_tag_t tag, b ntb_bar_write(SIZE, ntb_mw_to_bar(ntb, ntb->mw_count), \ offset, val) -typedef int (*bar_map_strategy)(struct ntb_softc *ntb, - struct ntb_pci_bar_info *bar); - static int ntb_probe(device_t device); static int ntb_attach(device_t device); static int ntb_detach(device_t device); static inline enum ntb_bar ntb_mw_to_bar(struct ntb_softc *, unsigned mw); static int ntb_map_pci_bars(struct ntb_softc *ntb); -static int map_pci_bar(struct ntb_softc *ntb, bar_map_strategy strategy, - struct ntb_pci_bar_info *bar); +static void print_map_success(struct ntb_softc *, struct ntb_pci_bar_info *); static int map_mmr_bar(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar); static int map_memory_window_bar(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar); @@ -388,53 +384,44 @@ ntb_map_pci_bars(struct ntb_softc *ntb) int rc; ntb->bar_info[NTB_CONFIG_BAR].pci_resource_id = PCIR_BAR(0); - rc = map_pci_bar(ntb, map_mmr_bar, &ntb->bar_info[NTB_CONFIG_BAR]); + rc = map_mmr_bar(ntb, &ntb->bar_info[NTB_CONFIG_BAR]); if (rc != 0) - return (rc); + goto out; ntb->bar_info[NTB_B2B_BAR_1].pci_resource_id = PCIR_BAR(2); - rc = map_pci_bar(ntb, map_memory_window_bar, - &ntb->bar_info[NTB_B2B_BAR_1]); + rc = map_memory_window_bar(ntb, &ntb->bar_info[NTB_B2B_BAR_1]); if (rc != 0) - return (rc); + goto out; ntb->bar_info[NTB_B2B_BAR_2].pci_resource_id = PCIR_BAR(4); if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP) && !HAS_FEATURE(NTB_SPLIT_BAR)) - rc = map_pci_bar(ntb, map_mmr_bar, - &ntb->bar_info[NTB_B2B_BAR_2]); + rc = map_mmr_bar(ntb, &ntb->bar_info[NTB_B2B_BAR_2]); else - rc = map_pci_bar(ntb, map_memory_window_bar, - &ntb->bar_info[NTB_B2B_BAR_2]); + rc = map_memory_window_bar(ntb, &ntb->bar_info[NTB_B2B_BAR_2]); if (!HAS_FEATURE(NTB_SPLIT_BAR)) - return (rc); + goto out; ntb->bar_info[NTB_B2B_BAR_3].pci_resource_id = PCIR_BAR(5); if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) - rc = map_pci_bar(ntb, map_mmr_bar, - &ntb->bar_info[NTB_B2B_BAR_3]); + rc = map_mmr_bar(ntb, &ntb->bar_info[NTB_B2B_BAR_3]); else - rc = map_pci_bar(ntb, map_memory_window_bar, - &ntb->bar_info[NTB_B2B_BAR_3]); - return (rc); -} + rc = map_memory_window_bar(ntb, &ntb->bar_info[NTB_B2B_BAR_3]); -static int -map_pci_bar(struct ntb_softc *ntb, bar_map_strategy strategy, - struct ntb_pci_bar_info *bar) -{ - int rc; - - rc = strategy(ntb, bar); +out: if (rc != 0) device_printf(ntb->device, "unable to allocate pci resource\n"); - else - device_printf(ntb->device, - "Bar size = %lx, v %p, p %p\n", - bar->size, bar->vbase, (void *)(bar->pbase)); return (rc); } +static void +print_map_success(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar) +{ + + device_printf(ntb->device, "Bar size = %lx, v %p, p %p\n", + bar->size, bar->vbase, (void *)(bar->pbase)); +} + static int map_mmr_bar(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar) { @@ -445,6 +432,7 @@ map_mmr_bar(struct ntb_softc *ntb, struc return (ENXIO); save_bar_parameters(bar); + print_map_success(ntb, bar); return (0); } @@ -505,6 +493,7 @@ map_memory_window_bar(struct ntb_softc * "unable to mark bar as WRITE_COMBINING\n"); return (rc); } + print_map_success(ntb, bar); return (0); } From owner-svn-src-all@freebsd.org Sun Oct 18 20: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 6BD18A1859F; Sun, 18 Oct 2015 20:20:22 +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 05FEF1929; Sun, 18 Oct 2015 20:20:21 +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 t9IKKLbn092947; Sun, 18 Oct 2015 20:20:21 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IKKLdU092945; Sun, 18 Oct 2015 20:20:21 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510182020.t9IKKLdU092945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 18 Oct 2015 20:20:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289542 - 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: Sun, 18 Oct 2015 20:20:22 -0000 Author: cem Date: Sun Oct 18 20:20:20 2015 New Revision: 289542 URL: https://svnweb.freebsd.org/changeset/base/289542 Log: NTB: "Split ntb_hw_intel and ntb_transport drivers" This Linux commit was more or less a rewrite. Unfortunately, the commit log does not give a lot of context for the rewrite. I have tried to faithfully follow the changes made upstream, including matching function names where possible, while churning the FreeBSD driver as little as possible. This is the bulk of the rewrite. There are two groups of changes to follow in separate commits: fleshing out the rest of the changes to xeon_setup_b2b_mw(), and some changes to if_ntb. Yes, this is a big patch (3 files changed, 416 insertions(+), 237 deletions(-)), but the Linux patch was 13 files changed, 2,589 additions(+) and 2,195 deletions(-). Original Linux commit log: Change ntb_hw_intel to use the new NTB hardware abstraction layer. Split ntb_transport into its own driver. Change it to use the new NTB hardware abstraction layer. Authored by: Allen Hubbe Obtained from: Linux (e26a5843) (Dual BSD/GPL driver) 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 head/sys/dev/ntb/ntb_hw/ntb_regs.h Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Sun Oct 18 20:20:11 2015 (r289541) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Sun Oct 18 20:20:20 2015 (r289542) @@ -1,5 +1,6 @@ /*- * Copyright (C) 2013 Intel Corporation + * Copyright (C) 2015 EMC Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -115,6 +116,33 @@ struct ntb_db_cb { bool reserved; }; +struct ntb_reg { + uint32_t ntb_ctl; + uint32_t lnk_sta; + uint8_t db_size; + unsigned mw_bar[NTB_MAX_BARS]; +}; + +struct ntb_alt_reg { + uint32_t db_bell; + uint32_t db_mask; + uint32_t spad; +}; + +struct ntb_xlat_reg { + uint64_t bar0_base; + uint64_t bar2_xlat; + uint64_t bar2_limit; +}; + +struct ntb_b2b_addr { + uint64_t bar0_addr; + uint64_t bar2_addr64; + uint64_t bar4_addr64; + uint64_t bar4_addr32; + uint64_t bar5_addr32; +}; + struct ntb_softc { device_t device; enum ntb_device_type type; @@ -135,14 +163,9 @@ struct ntb_softc { struct { uint32_t ldb; uint32_t ldb_mask; - uint32_t rdb; - uint32_t bar2_xlat; uint32_t bar4_xlat; uint32_t bar5_xlat; - uint32_t spad_remote; uint32_t spad_local; - uint32_t lnk_cntl; - uint32_t lnk_stat; uint32_t spci_cmd; } reg_ofs; uint32_t ppd; @@ -152,11 +175,36 @@ struct ntb_softc { uint8_t link_width; uint8_t link_speed; + /* Offset of peer bar0 in B2B BAR */ + uint64_t b2b_off; + /* Memory window used to access peer bar0 */ + uint8_t b2b_mw_idx; + uint8_t mw_count; uint8_t spad_count; uint8_t db_count; uint8_t db_vec_count; uint8_t db_vec_shift; + + /* Protects local DB mask and (h). */ +#define HW_LOCK(sc) mtx_lock_spin(&(sc)->db_mask_lock) +#define HW_UNLOCK(sc) mtx_unlock_spin(&(sc)->db_mask_lock) +#define HW_ASSERT(sc,f) mtx_assert(&(sc)->db_mask_lock, (f)) + struct mtx db_mask_lock; + + uint32_t ntb_ctl; /* (h) - SOC only */ + uint32_t lnk_sta; /* (h) - SOC only */ + + uint64_t db_valid_mask; + uint64_t db_link_mask; + uint64_t db_mask; /* (h) */ + + int last_ts; /* ticks @ last irq */ + + const struct ntb_reg *reg; + const struct ntb_alt_reg *self_reg; + const struct ntb_alt_reg *peer_reg; + const struct ntb_xlat_reg *xlat_reg; }; #ifdef __i386__ @@ -189,9 +237,9 @@ bus_space_write_8(bus_space_tag_t tag, b #define ntb_reg_write(SIZE, offset, val) \ ntb_bar_write(SIZE, NTB_CONFIG_BAR, offset, val) #define ntb_mw_read(SIZE, offset) \ - ntb_bar_read(SIZE, ntb_mw_to_bar(ntb, ntb->mw_count), offset) + ntb_bar_read(SIZE, ntb_mw_to_bar(ntb, ntb->b2b_mw_idx), offset) #define ntb_mw_write(SIZE, offset, val) \ - ntb_bar_write(SIZE, ntb_mw_to_bar(ntb, ntb->mw_count), \ + ntb_bar_write(SIZE, ntb_mw_to_bar(ntb, ntb->b2b_mw_idx), \ offset, val) static int ntb_probe(device_t device); @@ -217,23 +265,27 @@ static inline uint64_t ntb_db_read(struc static inline void ntb_db_write(struct ntb_softc *, uint64_t regoff, uint64_t val); static inline void mask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx); static inline void unmask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx); +static inline void ntb_db_set_mask(struct ntb_softc *, uint64_t bits); +static inline void ntb_db_clear_mask(struct ntb_softc *, uint64_t bits); static int ntb_create_callbacks(struct ntb_softc *ntb, uint32_t num_vectors); static void ntb_free_callbacks(struct ntb_softc *ntb); static struct ntb_hw_info *ntb_get_device_info(uint32_t device_id); static void ntb_detect_max_mw(struct ntb_softc *ntb); static int ntb_detect_xeon(struct ntb_softc *ntb); static int ntb_detect_soc(struct ntb_softc *ntb); -static int ntb_setup_xeon(struct ntb_softc *ntb); -static int ntb_setup_soc(struct ntb_softc *ntb); +static int ntb_xeon_init_dev(struct ntb_softc *ntb); +static int ntb_soc_init_dev(struct ntb_softc *ntb); static void ntb_teardown_xeon(struct ntb_softc *ntb); static void configure_soc_secondary_side_bars(struct ntb_softc *ntb); static void configure_xeon_secondary_side_bars(struct ntb_softc *ntb); -static void ntb_handle_heartbeat(void *arg); +static int xeon_setup_b2b_mw(struct ntb_softc *, + const struct ntb_b2b_addr *addr, const struct ntb_b2b_addr *peer_addr); +static void soc_link_hb(void *arg); static void ntb_handle_link_event(struct ntb_softc *ntb, int link_state); -static void ntb_hw_link_down(struct ntb_softc *ntb); -static void ntb_hw_link_up(struct ntb_softc *ntb); +static void ntb_link_disable(struct ntb_softc *ntb); +static void ntb_link_enable(struct ntb_softc *ntb); static void recover_soc_link(void *arg); -static int ntb_check_link_status(struct ntb_softc *ntb); +static int ntb_poll_link(struct ntb_softc *ntb); static void save_bar_parameters(struct ntb_pci_bar_info *bar); static struct ntb_hw_info pci_ids[] = { @@ -257,6 +309,61 @@ static struct ntb_hw_info pci_ids[] = { { 0x00000000, NULL, NTB_SOC, 0 } }; +static const struct ntb_reg soc_reg = { + .ntb_ctl = SOC_NTBCNTL_OFFSET, + .lnk_sta = SOC_LINK_STATUS_OFFSET, + .db_size = sizeof(uint64_t), + .mw_bar = { NTB_B2B_BAR_1, NTB_B2B_BAR_2 }, +}; + +static const struct ntb_alt_reg soc_b2b_reg = { + .db_bell = SOC_B2B_DOORBELL_OFFSET, + .spad = SOC_B2B_SPAD_OFFSET, +}; + +static const struct ntb_xlat_reg soc_sec_xlat = { +#if 0 + /* "FIXME" says the Linux driver. */ + .bar0_base = SOC_SBAR0BASE_OFFSET, + .bar2_limit = SOC_SBAR2LMT_OFFSET, +#endif + .bar2_xlat = SOC_SBAR2XLAT_OFFSET, +}; + +static const struct ntb_reg xeon_reg = { + .ntb_ctl = XEON_NTBCNTL_OFFSET, + .lnk_sta = XEON_LINK_STATUS_OFFSET, + .db_size = sizeof(uint16_t), + .mw_bar = { NTB_B2B_BAR_1, NTB_B2B_BAR_2, NTB_B2B_BAR_3 }, +}; + +static const struct ntb_alt_reg xeon_b2b_reg = { + .db_bell = XEON_B2B_DOORBELL_OFFSET, + .spad = XEON_B2B_SPAD_OFFSET, +}; + +static const struct ntb_xlat_reg xeon_sec_xlat = { + .bar0_base = XEON_SBAR0BASE_OFFSET, + .bar2_limit = XEON_SBAR2LMT_OFFSET, + .bar2_xlat = XEON_SBAR2XLAT_OFFSET, +}; + +static const struct ntb_b2b_addr xeon_b2b_usd_addr = { + .bar0_addr = XEON_B2B_BAR0_USD_ADDR, + .bar2_addr64 = XEON_B2B_BAR2_USD_ADDR64, + .bar4_addr64 = XEON_B2B_BAR4_USD_ADDR64, + .bar4_addr32 = XEON_B2B_BAR4_USD_ADDR32, + .bar5_addr32 = XEON_B2B_BAR5_USD_ADDR32, +}; + +static const struct ntb_b2b_addr xeon_b2b_dsd_addr = { + .bar0_addr = XEON_B2B_BAR0_DSD_ADDR, + .bar2_addr64 = XEON_B2B_BAR2_DSD_ADDR64, + .bar4_addr64 = XEON_B2B_BAR4_DSD_ADDR64, + .bar4_addr32 = XEON_B2B_BAR4_DSD_ADDR32, + .bar5_addr32 = XEON_B2B_BAR5_DSD_ADDR32, +}; + /* * OS <-> Driver interface structures */ @@ -311,10 +418,12 @@ ntb_attach(device_t device) ntb->device = device; ntb->type = p->type; ntb->features = p->features; + ntb->b2b_mw_idx = UINT8_MAX; /* Heartbeat timer for NTB_SOC since there is no link interrupt */ callout_init(&ntb->heartbeat_timer, 1); callout_init(&ntb->lr_timer, 1); + mtx_init(&ntb->db_mask_lock, "ntb hw bits", NULL, MTX_SPIN); if (ntb->type == NTB_SOC) error = ntb_detect_soc(ntb); @@ -329,9 +438,9 @@ ntb_attach(device_t device) if (error) goto out; if (ntb->type == NTB_SOC) - error = ntb_setup_soc(ntb); + error = ntb_soc_init_dev(ntb); else - error = ntb_setup_xeon(ntb); + error = ntb_xeon_init_dev(ntb); if (error) goto out; error = ntb_init_isr(ntb); @@ -352,12 +461,16 @@ ntb_detach(device_t device) struct ntb_softc *ntb; ntb = DEVICE2SOFTC(device); + + ntb_db_set_mask(ntb, ntb->db_valid_mask); callout_drain(&ntb->heartbeat_timer); callout_drain(&ntb->lr_timer); if (ntb->type == NTB_XEON) ntb_teardown_xeon(ntb); ntb_teardown_interrupts(ntb); + mtx_destroy(&ntb->db_mask_lock); + /* * Redetect total MWs so we unmap properly -- in case we lowered the * maximum to work around Xeon errata. @@ -368,14 +481,17 @@ ntb_detach(device_t device) return (0); } +/* + * Driver internal routines + */ static inline enum ntb_bar ntb_mw_to_bar(struct ntb_softc *ntb, unsigned mw) { - KASSERT(mw < ntb->mw_count, ("%s: mw:%u > count:%u", __func__, mw, - (unsigned)ntb->mw_count)); + KASSERT(mw < ntb->mw_count || (mw != UINT8_MAX && mw == ntb->b2b_mw_idx), + ("%s: mw:%u > count:%u", __func__, mw, (unsigned)ntb->mw_count)); - return (NTB_B2B_BAR_1 + mw); + return (ntb->reg->mw_bar[mw]); } static int @@ -593,15 +709,16 @@ ntb_init_isr(struct ntb_softc *ntb) int rc; ntb->allocated_interrupts = 0; + ntb->last_ts = ticks; /* * On SOC, disable all interrupts. On XEON, disable all but Link * Interrupt. The rest will be unmasked as callbacks are registered. */ - mask = 0; + mask = ntb->db_valid_mask; if (ntb->type == NTB_XEON) - mask = (1 << XEON_DB_LINK); - ntb_db_write(ntb, ntb->reg_ofs.ldb_mask, ~mask); + mask &= ~ntb->db_link_mask; + ntb_db_set_mask(ntb, mask); num_vectors = desired_vectors = MIN(pci_msix_count(ntb->device), ntb->db_count); @@ -724,6 +841,14 @@ static inline void ntb_db_write(struct ntb_softc *ntb, uint64_t regoff, uint64_t val) { + KASSERT((val & ~ntb->db_valid_mask) == 0, + ("%s: Invalid bits 0x%jx (valid: 0x%jx)", __func__, + (uintmax_t)(val & ~ntb->db_valid_mask), + (uintmax_t)ntb->db_valid_mask)); + + if (regoff == ntb->reg_ofs.ldb_mask) + HW_ASSERT(ntb, MA_OWNED); + if (ntb->type == NTB_SOC) { ntb_reg_write(8, regoff, val); return; @@ -733,14 +858,38 @@ ntb_db_write(struct ntb_softc *ntb, uint ntb_reg_write(2, regoff, (uint16_t)val); } -static void +static inline void +ntb_db_set_mask(struct ntb_softc *ntb, uint64_t bits) +{ + + HW_LOCK(ntb); + ntb->db_mask |= bits; + ntb_db_write(ntb, ntb->reg_ofs.ldb_mask, ntb->db_mask); + HW_UNLOCK(ntb); +} + +static inline void +ntb_db_clear_mask(struct ntb_softc *ntb, uint64_t bits) +{ + + KASSERT((bits & ~ntb->db_valid_mask) == 0, + ("%s: Invalid bits 0x%jx (valid: 0x%jx)", __func__, + (uintmax_t)(bits & ~ntb->db_valid_mask), + (uintmax_t)ntb->db_valid_mask)); + + HW_LOCK(ntb); + ntb->db_mask &= ~bits; + ntb_db_write(ntb, ntb->reg_ofs.ldb_mask, ntb->db_mask); + HW_UNLOCK(ntb); +} + +static inline void mask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx) { uint64_t mask; - mask = ntb_db_read(ntb, ntb->reg_ofs.ldb_mask); - mask |= 1 << (idx * ntb->db_vec_shift); - ntb_db_write(ntb, ntb->reg_ofs.ldb_mask, mask); + mask = 1ull << (idx * ntb->db_vec_shift); + ntb_db_set_mask(ntb, mask); } static inline void @@ -748,9 +897,8 @@ unmask_ldb_interrupt(struct ntb_softc *n { uint64_t mask; - mask = ntb_db_read(ntb, ntb->reg_ofs.ldb_mask); - mask &= ~(1 << (idx * ntb->db_vec_shift)); - ntb_db_write(ntb, ntb->reg_ofs.ldb_mask, mask); + mask = 1ull << (idx * ntb->db_vec_shift); + ntb_db_clear_mask(ntb, mask); } static inline uint64_t @@ -771,10 +919,11 @@ handle_irq(void *arg) uint64_t vec_mask; int rc; + ntb->last_ts = ticks; vec_mask = ntb_vec_mask(ntb, db_cb->db_num); - if (ntb->type == NTB_XEON && (vec_mask & XEON_DB_LINK_BIT) != 0) { - rc = ntb_check_link_status(ntb); + if ((vec_mask & ntb->db_link_mask) != 0) { + rc = ntb_poll_link(ntb); if (rc != 0) device_printf(ntb->device, "Error determining link status\n"); @@ -855,7 +1004,7 @@ static void ntb_teardown_xeon(struct ntb_softc *ntb) { - ntb_hw_link_down(ntb); + ntb_link_disable(ntb); } static void @@ -889,6 +1038,10 @@ ntb_detect_xeon(struct ntb_softc *ntb) if ((ppd & XEON_PPD_SPLIT_BAR) != 0) ntb->features |= NTB_SPLIT_BAR; + /* SB01BASE_LOCKUP errata is a superset of SDOORBELL errata */ + if (HAS_FEATURE(NTB_SB01BASE_LOCKUP)) + ntb->features |= NTB_SDOORBELL_LOCKUP; + conn_type = ppd & XEON_PPD_CONN_TYPE; switch (conn_type) { case NTB_CONN_B2B: @@ -930,48 +1083,34 @@ ntb_detect_soc(struct ntb_softc *ntb) } static int -ntb_setup_xeon(struct ntb_softc *ntb) +ntb_xeon_init_dev(struct ntb_softc *ntb) { + int rc; ntb->reg_ofs.ldb = XEON_PDOORBELL_OFFSET; ntb->reg_ofs.ldb_mask = XEON_PDBMSK_OFFSET; ntb->reg_ofs.spad_local = XEON_SPAD_OFFSET; - ntb->reg_ofs.bar2_xlat = XEON_SBAR2XLAT_OFFSET; ntb->reg_ofs.bar4_xlat = XEON_SBAR4XLAT_OFFSET; if (HAS_FEATURE(NTB_SPLIT_BAR)) ntb->reg_ofs.bar5_xlat = XEON_SBAR5XLAT_OFFSET; + ntb->reg_ofs.spci_cmd = XEON_PCICMD_OFFSET; - switch (ntb->conn_type) { - case NTB_CONN_B2B: - /* - * reg_ofs.rdb and reg_ofs.spad_remote are effectively ignored - * with the NTB_SDOORBELL_LOCKUP errata mode enabled. (See - * ntb_ring_doorbell() and ntb_read/write_remote_spad().) - */ - ntb->reg_ofs.rdb = XEON_B2B_DOORBELL_OFFSET; - ntb->reg_ofs.spad_remote = XEON_B2B_SPAD_OFFSET; - - ntb->spad_count = XEON_SPAD_COUNT; - break; - - case NTB_CONN_RP: - /* - * Every Xeon today needs NTB_SDOORBELL_LOCKUP, so punt on RP for - * now. - */ - KASSERT(HAS_FEATURE(NTB_SDOORBELL_LOCKUP), - ("Xeon without MW errata unimplemented")); - device_printf(ntb->device, - "NTB-RP disabled to due hardware errata.\n"); - return (ENXIO); + ntb->spad_count = XEON_SPAD_COUNT; + ntb->db_count = XEON_DB_COUNT; + ntb->db_link_mask = XEON_DB_LINK_BIT; + ntb->db_vec_count = XEON_DB_MSIX_VECTOR_COUNT; + ntb->db_vec_shift = XEON_DB_MSIX_VECTOR_SHIFT; - case NTB_CONN_TRANSPARENT: - default: + if (ntb->conn_type != NTB_CONN_B2B) { device_printf(ntb->device, "Connection type %d not supported\n", ntb->conn_type); return (ENXIO); } + ntb->reg = &xeon_reg; + ntb->peer_reg = &xeon_b2b_reg; + ntb->xlat_reg = &xeon_sec_xlat; + /* * There is a Xeon hardware errata related to writes to SDOORBELL or * B2BDOORBELL in conjunction with inbound access to NTB MMIO space, @@ -985,17 +1124,21 @@ ntb_setup_xeon(struct ntb_softc *ntb) * write the limit registers first just in case. */ if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) { + /* Reserve the last MW for mapping remote spad */ + ntb->b2b_mw_idx = ntb->mw_count - 1; + ntb->mw_count--; /* * Set the Limit register to 4k, the minimum size, to prevent * an illegal access. - * - * XXX: Should this be PBAR5LMT / get_mw_size(, max_mw - 1)? */ - ntb_reg_write(8, XEON_PBAR4LMT_OFFSET, - ntb_get_mw_size(ntb, 1) + 0x1000); - /* Reserve the last MW for mapping remote spad */ - ntb->mw_count--; - } else + if (HAS_FEATURE(NTB_SPLIT_BAR)) { + ntb_reg_write(4, XEON_PBAR4LMT_OFFSET, 0); + ntb_reg_write(4, XEON_PBAR5LMT_OFFSET, + ntb_get_mw_size(ntb, ntb->b2b_mw_idx) + 0x1000); + } else + ntb_reg_write(8, XEON_PBAR4LMT_OFFSET, + ntb_get_mw_size(ntb, ntb->b2b_mw_idx) + 0x1000); + } else { /* * Disable the limit register, just in case it is set to * something silly. A 64-bit write will also clear PBAR5LMT in @@ -1003,66 +1146,61 @@ ntb_setup_xeon(struct ntb_softc *ntb) */ ntb_reg_write(8, XEON_PBAR4LMT_OFFSET, 0); - ntb->reg_ofs.lnk_cntl = XEON_NTBCNTL_OFFSET; - ntb->reg_ofs.lnk_stat = XEON_LINK_STATUS_OFFSET; - ntb->reg_ofs.spci_cmd = XEON_PCICMD_OFFSET; - - ntb->db_count = XEON_DB_COUNT; - ntb->db_vec_count = XEON_DB_MSIX_VECTOR_COUNT; - ntb->db_vec_shift = XEON_DB_MSIX_VECTOR_SHIFT; + /* + * HW Errata on bit 14 of b2bdoorbell register. Writes will not be + * mirrored to the remote system. Shrink the number of bits by one, + * since bit 14 is the last bit. + * + * On REGS_THRU_MW errata mode, we don't use the b2bdoorbell register + * anyway. Nor for non-B2B connection types. + */ + if (HAS_FEATURE(NTB_B2BDOORBELL_BIT14)) + ntb->db_count = XEON_DB_COUNT - 1; + } - /* - * HW Errata on bit 14 of b2bdoorbell register. Writes will not be - * mirrored to the remote system. Shrink the number of bits by one, - * since bit 14 is the last bit. - * - * On REGS_THRU_MW errata mode, we don't use the b2bdoorbell register - * anyway. Nor for non-B2B connection types. - */ - if (HAS_FEATURE(NTB_B2BDOORBELL_BIT14) && - !HAS_FEATURE(NTB_SDOORBELL_LOCKUP) && - ntb->conn_type == NTB_CONN_B2B) - ntb->db_count = XEON_DB_COUNT - 1; + ntb->db_valid_mask = (1ull << ntb->db_count) - 1; - configure_xeon_secondary_side_bars(ntb); + if (ntb->dev_type == NTB_DEV_USD) + rc = xeon_setup_b2b_mw(ntb, &xeon_b2b_dsd_addr, + &xeon_b2b_usd_addr); + else + rc = xeon_setup_b2b_mw(ntb, &xeon_b2b_usd_addr, + &xeon_b2b_dsd_addr); + if (rc != 0) + return (rc); /* Enable Bus Master and Memory Space on the secondary side */ - if (ntb->conn_type == NTB_CONN_B2B) - ntb_reg_write(2, ntb->reg_ofs.spci_cmd, - PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); + ntb_reg_write(2, ntb->reg_ofs.spci_cmd, + PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); /* Enable link training */ - ntb_hw_link_up(ntb); + ntb_link_enable(ntb); return (0); } static int -ntb_setup_soc(struct ntb_softc *ntb) +ntb_soc_init_dev(struct ntb_softc *ntb) { KASSERT(ntb->conn_type == NTB_CONN_B2B, ("Unsupported NTB configuration (%d)\n", ntb->conn_type)); - /* Initiate PCI-E link training */ - pci_write_config(ntb->device, NTB_PPD_OFFSET, - ntb->ppd | SOC_PPD_INIT_LINK, 4); - ntb->reg_ofs.ldb = SOC_PDOORBELL_OFFSET; ntb->reg_ofs.ldb_mask = SOC_PDBMSK_OFFSET; - ntb->reg_ofs.rdb = SOC_B2B_DOORBELL_OFFSET; - ntb->reg_ofs.bar2_xlat = SOC_SBAR2XLAT_OFFSET; ntb->reg_ofs.bar4_xlat = SOC_SBAR4XLAT_OFFSET; - ntb->reg_ofs.lnk_cntl = SOC_NTBCNTL_OFFSET; - ntb->reg_ofs.lnk_stat = SOC_LINK_STATUS_OFFSET; ntb->reg_ofs.spad_local = SOC_SPAD_OFFSET; - ntb->reg_ofs.spad_remote = SOC_B2B_SPAD_OFFSET; ntb->reg_ofs.spci_cmd = SOC_PCICMD_OFFSET; - ntb->spad_count = SOC_SPAD_COUNT; + ntb->spad_count = SOC_SPAD_COUNT; ntb->db_count = SOC_DB_COUNT; ntb->db_vec_count = SOC_DB_MSIX_VECTOR_COUNT; ntb->db_vec_shift = SOC_DB_MSIX_VECTOR_SHIFT; + ntb->db_valid_mask = (1ull << ntb->db_count) - 1; + + ntb->reg = &soc_reg; + ntb->peer_reg = &soc_b2b_reg; + ntb->xlat_reg = &soc_sec_xlat; /* * FIXME - MSI-X bug on early SOC HW, remove once internal issue is @@ -1076,118 +1214,95 @@ ntb_setup_soc(struct ntb_softc *ntb) ntb_reg_write(2, ntb->reg_ofs.spci_cmd, PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); - callout_reset(&ntb->heartbeat_timer, 0, ntb_handle_heartbeat, ntb); + /* Initiate PCI-E link training */ + ntb_link_enable(ntb); + + callout_reset(&ntb->heartbeat_timer, 0, soc_link_hb, ntb); return (0); } +/* XXX: Linux driver doesn't seem to do any of this for SoC. */ static void configure_soc_secondary_side_bars(struct ntb_softc *ntb) { if (ntb->dev_type == NTB_DEV_USD) { ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, - XEON_B2B_BAR2_DSD_ADDR); - ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, XEON_B2B_BAR4_DSD_ADDR); - ntb_reg_write(8, SOC_MBAR23_OFFSET, XEON_B2B_BAR2_USD_ADDR); - ntb_reg_write(8, SOC_MBAR45_OFFSET, XEON_B2B_BAR4_USD_ADDR); + XEON_B2B_BAR2_DSD_ADDR64); + ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, + XEON_B2B_BAR4_DSD_ADDR64); + ntb_reg_write(8, SOC_MBAR23_OFFSET, XEON_B2B_BAR2_USD_ADDR64); + ntb_reg_write(8, SOC_MBAR45_OFFSET, XEON_B2B_BAR4_USD_ADDR64); } else { ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, - XEON_B2B_BAR2_USD_ADDR); - ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, XEON_B2B_BAR4_USD_ADDR); - ntb_reg_write(8, SOC_MBAR23_OFFSET, XEON_B2B_BAR2_DSD_ADDR); - ntb_reg_write(8, SOC_MBAR45_OFFSET, XEON_B2B_BAR4_DSD_ADDR); + XEON_B2B_BAR2_USD_ADDR64); + ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, + XEON_B2B_BAR4_USD_ADDR64); + ntb_reg_write(8, SOC_MBAR23_OFFSET, XEON_B2B_BAR2_DSD_ADDR64); + ntb_reg_write(8, SOC_MBAR45_OFFSET, XEON_B2B_BAR4_DSD_ADDR64); } } -static void -configure_xeon_secondary_side_bars(struct ntb_softc *ntb) +static int +xeon_setup_b2b_mw(struct ntb_softc *ntb, const struct ntb_b2b_addr *addr, + const struct ntb_b2b_addr *peer_addr) { - if (ntb->dev_type == NTB_DEV_USD) { - ntb_reg_write(8, XEON_PBAR2XLAT_OFFSET, - XEON_B2B_BAR2_DSD_ADDR); - if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) - ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, - XEON_B2B_BAR0_DSD_ADDR); - else { - if (HAS_FEATURE(NTB_SPLIT_BAR)) { - ntb_reg_write(4, XEON_PBAR4XLAT_OFFSET, - XEON_B2B_BAR4_DSD_ADDR); - ntb_reg_write(4, XEON_PBAR5XLAT_OFFSET, - XEON_B2B_BAR5_DSD_ADDR); - } else - ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, - XEON_B2B_BAR4_DSD_ADDR); - /* - * B2B_XLAT_OFFSET is a 64-bit register but can only be - * written 32 bits at a time. - */ - ntb_reg_write(4, XEON_B2B_XLAT_OFFSETL, - XEON_B2B_BAR0_DSD_ADDR & 0xffffffff); - ntb_reg_write(4, XEON_B2B_XLAT_OFFSETU, - XEON_B2B_BAR0_DSD_ADDR >> 32); - } - ntb_reg_write(8, XEON_SBAR0BASE_OFFSET, - XEON_B2B_BAR0_USD_ADDR); - ntb_reg_write(8, XEON_SBAR2BASE_OFFSET, - XEON_B2B_BAR2_USD_ADDR); + /* Local addresses */ + ntb_reg_write(8, XEON_PBAR2XLAT_OFFSET, addr->bar2_addr64); + if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) + ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, addr->bar0_addr); + else { if (HAS_FEATURE(NTB_SPLIT_BAR)) { - ntb_reg_write(4, XEON_SBAR4BASE_OFFSET, - XEON_B2B_BAR4_USD_ADDR); - ntb_reg_write(4, XEON_SBAR5BASE_OFFSET, - XEON_B2B_BAR5_USD_ADDR); + ntb_reg_write(4, XEON_PBAR4XLAT_OFFSET, + addr->bar4_addr32); + ntb_reg_write(4, XEON_PBAR5XLAT_OFFSET, + addr->bar5_addr32); } else - ntb_reg_write(8, XEON_SBAR4BASE_OFFSET, - XEON_B2B_BAR4_USD_ADDR); - } else { - ntb_reg_write(8, XEON_PBAR2XLAT_OFFSET, - XEON_B2B_BAR2_USD_ADDR); - if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, - XEON_B2B_BAR0_USD_ADDR); - else { - if (HAS_FEATURE(NTB_SPLIT_BAR)) { - ntb_reg_write(4, XEON_PBAR4XLAT_OFFSET, - XEON_B2B_BAR4_USD_ADDR); - ntb_reg_write(4, XEON_PBAR5XLAT_OFFSET, - XEON_B2B_BAR5_USD_ADDR); - } else - ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, - XEON_B2B_BAR4_USD_ADDR); - /* - * B2B_XLAT_OFFSET is a 64-bit register but can only be - * written 32 bits at a time. - */ - ntb_reg_write(4, XEON_B2B_XLAT_OFFSETL, - XEON_B2B_BAR0_USD_ADDR & 0xffffffff); - ntb_reg_write(4, XEON_B2B_XLAT_OFFSETU, - XEON_B2B_BAR0_USD_ADDR >> 32); - } - ntb_reg_write(8, XEON_SBAR0BASE_OFFSET, - XEON_B2B_BAR0_DSD_ADDR); - ntb_reg_write(8, XEON_SBAR2BASE_OFFSET, - XEON_B2B_BAR2_DSD_ADDR); - if (HAS_FEATURE(NTB_SPLIT_BAR)) { - ntb_reg_write(4, XEON_SBAR4BASE_OFFSET, - XEON_B2B_BAR4_DSD_ADDR); - ntb_reg_write(4, XEON_SBAR5BASE_OFFSET, - XEON_B2B_BAR5_DSD_ADDR); - } else - ntb_reg_write(8, XEON_SBAR4BASE_OFFSET, - XEON_B2B_BAR4_DSD_ADDR); + addr->bar4_addr64); + /* + * B2B_XLAT_OFFSET is a 64-bit register but can only be + * written 32 bits at a time. + */ + ntb_reg_write(4, XEON_B2B_XLAT_OFFSETL, + addr->bar0_addr & 0xffffffff); + ntb_reg_write(4, XEON_B2B_XLAT_OFFSETU, addr->bar0_addr >> 32); } + + /* Peer addresses */ + ntb_reg_write(8, XEON_SBAR0BASE_OFFSET, peer_addr->bar0_addr); + ntb_reg_write(8, XEON_SBAR2BASE_OFFSET, peer_addr->bar2_addr64); + if (HAS_FEATURE(NTB_SPLIT_BAR)) { + ntb_reg_write(4, XEON_SBAR4BASE_OFFSET, + peer_addr->bar4_addr32); + ntb_reg_write(4, XEON_SBAR5BASE_OFFSET, + peer_addr->bar5_addr32); + } else + ntb_reg_write(8, XEON_SBAR4BASE_OFFSET, + peer_addr->bar4_addr64); + return (0); } /* SOC does not have link status interrupt, poll on that platform */ static void -ntb_handle_heartbeat(void *arg) +soc_link_hb(void *arg) { struct ntb_softc *ntb = arg; uint32_t status32; int rc; - rc = ntb_check_link_status(ntb); + /* + * Delay polling the link status if an interrupt was received, unless + * the cached link status says the link is down. + */ + if ((long)ticks - ((long)ntb->last_ts + NTB_HB_TIMEOUT * hz) < 0 && + (ntb->ntb_ctl & SOC_CNTL_LINK_DOWN) == 0) + goto out; + + + rc = ntb_poll_link(ntb); if (rc != 0) device_printf(ntb->device, "Error determining link status\n"); @@ -1202,8 +1317,9 @@ ntb_handle_heartbeat(void *arg) } } - callout_reset(&ntb->heartbeat_timer, NTB_HB_TIMEOUT * hz, - ntb_handle_heartbeat, ntb); +out: + callout_reset(&ntb->heartbeat_timer, NTB_HB_TIMEOUT * hz, soc_link_hb, + ntb); } static void @@ -1261,7 +1377,7 @@ ntb_handle_link_event(struct ntb_softc * if (ntb->type == NTB_SOC || ntb->conn_type == NTB_CONN_TRANSPARENT) - status = ntb_reg_read(2, ntb->reg_ofs.lnk_stat); + status = ntb_reg_read(2, ntb->reg->lnk_sta); else status = pci_read_config(ntb->device, XEON_LINK_STATUS_OFFSET, 2); @@ -1270,7 +1386,7 @@ ntb_handle_link_event(struct ntb_softc * device_printf(ntb->device, "Link Width %d, Link Speed %d\n", ntb->link_width, ntb->link_speed); callout_reset(&ntb->heartbeat_timer, NTB_HB_TIMEOUT * hz, - ntb_handle_heartbeat, ntb); + soc_link_hb, ntb); } else { device_printf(ntb->device, "Link Down\n"); ntb->link_status = NTB_LINK_DOWN; @@ -1284,26 +1400,32 @@ ntb_handle_link_event(struct ntb_softc * } static void -ntb_hw_link_up(struct ntb_softc *ntb) +ntb_link_enable(struct ntb_softc *ntb) { uint32_t cntl; + if (ntb->type == NTB_SOC) { + pci_write_config(ntb->device, NTB_PPD_OFFSET, + ntb->ppd | SOC_PPD_INIT_LINK, 4); + return; + } + if (ntb->conn_type == NTB_CONN_TRANSPARENT) { ntb_handle_link_event(ntb, NTB_LINK_UP); return; } - cntl = ntb_reg_read(4, ntb->reg_ofs.lnk_cntl); + cntl = ntb_reg_read(4, ntb->reg->ntb_ctl); cntl &= ~(NTB_CNTL_LINK_DISABLE | NTB_CNTL_CFG_LOCK); cntl |= NTB_CNTL_P2S_BAR23_SNOOP | NTB_CNTL_S2P_BAR23_SNOOP; cntl |= NTB_CNTL_P2S_BAR4_SNOOP | NTB_CNTL_S2P_BAR4_SNOOP; if (HAS_FEATURE(NTB_SPLIT_BAR)) cntl |= NTB_CNTL_P2S_BAR5_SNOOP | NTB_CNTL_S2P_BAR5_SNOOP; - ntb_reg_write(4, ntb->reg_ofs.lnk_cntl, cntl); + ntb_reg_write(4, ntb->reg->ntb_ctl, cntl); } static void -ntb_hw_link_down(struct ntb_softc *ntb) +ntb_link_disable(struct ntb_softc *ntb) { uint32_t cntl; @@ -1312,13 +1434,13 @@ ntb_hw_link_down(struct ntb_softc *ntb) return; } - cntl = ntb_reg_read(4, ntb->reg_ofs.lnk_cntl); + cntl = ntb_reg_read(4, ntb->reg->ntb_ctl); cntl &= ~(NTB_CNTL_P2S_BAR23_SNOOP | NTB_CNTL_S2P_BAR23_SNOOP); cntl &= ~(NTB_CNTL_P2S_BAR4_SNOOP | NTB_CNTL_S2P_BAR4_SNOOP); if (HAS_FEATURE(NTB_SPLIT_BAR)) cntl &= ~(NTB_CNTL_P2S_BAR5_SNOOP | NTB_CNTL_S2P_BAR5_SNOOP); cntl |= NTB_CNTL_LINK_DISABLE | NTB_CNTL_CFG_LOCK; - ntb_reg_write(4, ntb->reg_ofs.lnk_cntl, cntl); + ntb_reg_write(4, ntb->reg->ntb_ctl, cntl); } static void @@ -1327,7 +1449,6 @@ recover_soc_link(void *arg) struct ntb_softc *ntb = arg; uint8_t speed, width; uint32_t status32; - uint16_t status16; soc_perform_link_restart(ntb); @@ -1348,19 +1469,19 @@ recover_soc_link(void *arg) if ((status32 & SOC_IBIST_ERR_OFLOW) != 0) goto retry; - status32 = ntb_reg_read(4, ntb->reg_ofs.lnk_cntl); + status32 = ntb_reg_read(4, ntb->reg->ntb_ctl); if ((status32 & SOC_CNTL_LINK_DOWN) != 0) goto out; - status16 = ntb_reg_read(2, ntb->reg_ofs.lnk_stat); - width = (status16 & NTB_LINK_WIDTH_MASK) >> 4; - speed = (status16 & NTB_LINK_SPEED_MASK); + status32 = ntb_reg_read(4, ntb->reg->lnk_sta); + width = (status32 & NTB_LINK_WIDTH_MASK) >> 4; + speed = (status32 & NTB_LINK_SPEED_MASK); if (ntb->link_width != width || ntb->link_speed != speed) goto retry; out: - callout_reset(&ntb->heartbeat_timer, NTB_HB_TIMEOUT * hz, - ntb_handle_heartbeat, ntb); + callout_reset(&ntb->heartbeat_timer, NTB_HB_TIMEOUT * hz, soc_link_hb, + ntb); return; retry: @@ -1369,21 +1490,32 @@ retry: } static int -ntb_check_link_status(struct ntb_softc *ntb) +ntb_poll_link(struct ntb_softc *ntb) { int link_state; uint32_t ntb_cntl; uint16_t status; if (ntb->type == NTB_SOC) { - ntb_cntl = ntb_reg_read(4, ntb->reg_ofs.lnk_cntl); + HW_LOCK(ntb); + ntb_cntl = ntb_reg_read(4, ntb->reg->ntb_ctl); + if (ntb_cntl == ntb->ntb_ctl) { + HW_UNLOCK(ntb); + return (0); + } + ntb->ntb_ctl = ntb_cntl; + ntb->lnk_sta = ntb_reg_read(4, ntb->reg->lnk_sta); + HW_UNLOCK(ntb); + if ((ntb_cntl & SOC_CNTL_LINK_DOWN) != 0) link_state = NTB_LINK_DOWN; else link_state = NTB_LINK_UP; } else { - status = pci_read_config(ntb->device, XEON_LINK_STATUS_OFFSET, - 2); + status = pci_read_config(ntb->device, ntb->reg->lnk_sta, 2); + if (status == ntb->lnk_sta) + return (0); + ntb->lnk_sta = status; if ((status & NTB_LINK_STATUS_ACTIVE) != 0) link_state = NTB_LINK_UP; @@ -1392,10 +1524,32 @@ ntb_check_link_status(struct ntb_softc * } ntb_handle_link_event(ntb, link_state); - return (0); } +static void +ntb_irq_work(void *arg) +{ + struct ntb_db_cb *db_cb = arg; + struct ntb_softc *ntb; + int rc; + + rc = db_cb->callback(db_cb->data, db_cb->db_num); + /* Poll if forward progress was made. */ + if (rc != 0) { + callout_reset(&db_cb->irq_work, 0, ntb_irq_work, db_cb); + return; + } + + /* Unmask interrupt if no progress was made. */ + ntb = db_cb->ntb; + unmask_ldb_interrupt(ntb, db_cb->db_num); +} + +/* + * Public API to the rest of the OS + */ + /** * ntb_register_event_callback() - register event callback * @ntb: pointer to ntb_softc instance @@ -1431,25 +1585,6 @@ ntb_unregister_event_callback(struct ntb ntb->event_cb = NULL; } -static void -ntb_irq_work(void *arg) -{ - struct ntb_db_cb *db_cb = arg; - struct ntb_softc *ntb; - int rc; - - rc = db_cb->callback(db_cb->data, db_cb->db_num); - /* Poll if forward progress was made. */ - if (rc != 0) { - callout_reset(&db_cb->irq_work, 0, ntb_irq_work, db_cb); - return; - } - - /* Unmask interrupt if no progress was made. */ - ntb = db_cb->ntb; - unmask_ldb_interrupt(ntb, db_cb->db_num); -} - /** * ntb_register_db_callback() - register a callback for doorbell interrupt * @ntb: pointer to ntb_softc instance @@ -1663,7 +1798,7 @@ ntb_write_remote_spad(struct ntb_softc * if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) ntb_mw_write(4, XEON_SHADOW_SPAD_OFFSET + idx * 4, val); else - ntb_reg_write(4, ntb->reg_ofs.spad_remote + idx * 4, val); + ntb_reg_write(4, ntb->peer_reg->spad + idx * 4, val); return (0); } @@ -1689,7 +1824,7 @@ ntb_read_remote_spad(struct ntb_softc *n if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) *val = ntb_mw_read(4, XEON_SHADOW_SPAD_OFFSET + idx * 4); else - *val = ntb_reg_read(4, ntb->reg_ofs.spad_remote + idx * 4); + *val = ntb_reg_read(4, ntb->peer_reg->spad + idx * 4); return (0); } @@ -1714,7 +1849,7 @@ ntb_get_mw_vbase(struct ntb_softc *ntb, return (ntb->bar_info[ntb_mw_to_bar(ntb, mw)].vbase); } -vm_paddr_t +bus_addr_t ntb_get_mw_pbase(struct ntb_softc *ntb, unsigned int mw) { @@ -1762,7 +1897,7 @@ ntb_set_mw_addr(struct ntb_softc *ntb, u switch (ntb_mw_to_bar(ntb, mw)) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Oct 18 20:20: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 19128A185D5; Sun, 18 Oct 2015 20:20:31 +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 D6B391A6F; Sun, 18 Oct 2015 20:20:30 +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 t9IKKTMu092996; Sun, 18 Oct 2015 20:20:29 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IKKTMs092994; Sun, 18 Oct 2015 20:20:29 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510182020.t9IKKTMs092994@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 18 Oct 2015 20:20:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289543 - 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: Sun, 18 Oct 2015 20:20:31 -0000 Author: cem Date: Sun Oct 18 20:20:29 2015 New Revision: 289543 URL: https://svnweb.freebsd.org/changeset/base/289543 Log: NTB: Flesh out the rest of the xeon_setup_b2b_mw changes Move all Xeon secondary register setup to the setup_b2b_mw routine. We use subroutines to make it a bit less wordy than the Linux version. Adds a new tunable, 'hw.ntb.b2b_mw_share'. By default, it is off (zero). If both sides enable it (any non-zero value), the NTB driver attempts to use only half of a memory window for remote register MMIO access. This is still part of the large Linux rewrite (e26a5843). Authored by: Allen Hubbe Obtained from: Linux (e26a5843) (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_regs.h Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Sun Oct 18 20:20:20 2015 (r289542) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Sun Oct 18 20:20:29 2015 (r289543) @@ -99,6 +99,13 @@ struct ntb_pci_bar_info { vm_paddr_t pbase; void *vbase; u_long size; + + /* Configuration register offsets */ + uint32_t psz_off; + uint32_t ssz_off; + uint32_t sbarbase_off; + uint32_t sbarlmt_off; + uint32_t pbarxlat_off; }; struct ntb_int_info { @@ -178,6 +185,7 @@ struct ntb_softc { /* Offset of peer bar0 in B2B BAR */ uint64_t b2b_off; /* Memory window used to access peer bar0 */ +#define B2B_MW_DISABLED UINT8_MAX uint8_t b2b_mw_idx; uint8_t mw_count; @@ -277,7 +285,12 @@ static int ntb_xeon_init_dev(struct ntb_ static int ntb_soc_init_dev(struct ntb_softc *ntb); static void ntb_teardown_xeon(struct ntb_softc *ntb); static void configure_soc_secondary_side_bars(struct ntb_softc *ntb); -static void configure_xeon_secondary_side_bars(struct ntb_softc *ntb); +static void xeon_reset_sbar_size(struct ntb_softc *, enum ntb_bar idx, + enum ntb_bar regbar); +static void xeon_set_sbar_base_and_limit(struct ntb_softc *, + uint64_t base_addr, enum ntb_bar idx, enum ntb_bar regbar); +static void xeon_set_pbar_xlat(struct ntb_softc *, uint64_t base_addr, + enum ntb_bar idx); static int xeon_setup_b2b_mw(struct ntb_softc *, const struct ntb_b2b_addr *addr, const struct ntb_b2b_addr *peer_addr); static void soc_link_hb(void *arg); @@ -418,7 +431,7 @@ ntb_attach(device_t device) ntb->device = device; ntb->type = p->type; ntb->features = p->features; - ntb->b2b_mw_idx = UINT8_MAX; + ntb->b2b_mw_idx = B2B_MW_DISABLED; /* Heartbeat timer for NTB_SOC since there is no link interrupt */ callout_init(&ntb->heartbeat_timer, 1); @@ -488,7 +501,8 @@ static inline enum ntb_bar ntb_mw_to_bar(struct ntb_softc *ntb, unsigned mw) { - KASSERT(mw < ntb->mw_count || (mw != UINT8_MAX && mw == ntb->b2b_mw_idx), + KASSERT(mw < ntb->mw_count || + (mw != B2B_MW_DISABLED && mw == ntb->b2b_mw_idx), ("%s: mw:%u > count:%u", __func__, mw, (unsigned)ntb->mw_count)); return (ntb->reg->mw_bar[mw]); @@ -508,12 +522,24 @@ ntb_map_pci_bars(struct ntb_softc *ntb) rc = map_memory_window_bar(ntb, &ntb->bar_info[NTB_B2B_BAR_1]); if (rc != 0) goto out; + ntb->bar_info[NTB_B2B_BAR_1].psz_off = XEON_PBAR23SZ_OFFSET; + ntb->bar_info[NTB_B2B_BAR_1].ssz_off = XEON_SBAR23SZ_OFFSET; + ntb->bar_info[NTB_B2B_BAR_1].sbarbase_off = XEON_SBAR2BASE_OFFSET; + ntb->bar_info[NTB_B2B_BAR_1].sbarlmt_off = XEON_SBAR2LMT_OFFSET; + 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]); + 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].sbarbase_off = XEON_SBAR4BASE_OFFSET; + ntb->bar_info[NTB_B2B_BAR_2].sbarlmt_off = XEON_SBAR4LMT_OFFSET; + ntb->bar_info[NTB_B2B_BAR_2].pbarxlat_off = XEON_PBAR4XLAT_OFFSET; + if (!HAS_FEATURE(NTB_SPLIT_BAR)) goto out; @@ -522,6 +548,11 @@ ntb_map_pci_bars(struct ntb_softc *ntb) 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]); + 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].sbarbase_off = XEON_SBAR5BASE_OFFSET; + ntb->bar_info[NTB_B2B_BAR_3].sbarlmt_off = XEON_SBAR5LMT_OFFSET; + ntb->bar_info[NTB_B2B_BAR_3].pbarxlat_off = XEON_PBAR5XLAT_OFFSET; out: if (rc != 0) @@ -1117,35 +1148,11 @@ ntb_xeon_init_dev(struct ntb_softc *ntb) * which may hang the system. To workaround this use the second memory * window to access the interrupt and scratch pad registers on the * remote system. - * - * There is another HW errata on the limit registers -- they can only - * be written when the base register is (?)4GB aligned and < 32-bit. - * This should already be the case based on the driver defaults, but - * write the limit registers first just in case. */ - if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) { - /* Reserve the last MW for mapping remote spad */ + if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) + /* Use the last MW for mapping remote spad */ ntb->b2b_mw_idx = ntb->mw_count - 1; - ntb->mw_count--; - /* - * Set the Limit register to 4k, the minimum size, to prevent - * an illegal access. - */ - if (HAS_FEATURE(NTB_SPLIT_BAR)) { - ntb_reg_write(4, XEON_PBAR4LMT_OFFSET, 0); - ntb_reg_write(4, XEON_PBAR5LMT_OFFSET, - ntb_get_mw_size(ntb, ntb->b2b_mw_idx) + 0x1000); - } else - ntb_reg_write(8, XEON_PBAR4LMT_OFFSET, - ntb_get_mw_size(ntb, ntb->b2b_mw_idx) + 0x1000); - } else { - /* - * Disable the limit register, just in case it is set to - * something silly. A 64-bit write will also clear PBAR5LMT in - * split-bar mode, and this is desired. - */ - ntb_reg_write(8, XEON_PBAR4LMT_OFFSET, 0); - + 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, @@ -1154,9 +1161,7 @@ ntb_xeon_init_dev(struct ntb_softc *ntb) * On REGS_THRU_MW errata mode, we don't use the b2bdoorbell register * anyway. Nor for non-B2B connection types. */ - if (HAS_FEATURE(NTB_B2BDOORBELL_BIT14)) - ntb->db_count = XEON_DB_COUNT - 1; - } + ntb->db_count = XEON_DB_COUNT - 1; ntb->db_valid_mask = (1ull << ntb->db_count) - 1; @@ -1244,44 +1249,198 @@ configure_soc_secondary_side_bars(struct } } + +/* + * When working around Xeon SDOORBELL errata by remapping remote registers in a + * MW, limit the B2B MW to half a MW. By sharing a MW, half the shared MW + * remains for use by a higher layer. + * + * Will only be used if working around SDOORBELL errata and the BIOS-configured + * MW size is sufficiently large. + */ +static unsigned int ntb_b2b_mw_share; +SYSCTL_UINT(_hw_ntb, OID_AUTO, b2b_mw_share, CTLFLAG_RDTUN, &ntb_b2b_mw_share, + 0, "If enabled (non-zero), prefer to share half of the B2B peer register " + "MW with higher level consumers. Both sides of the NTB MUST set the same " + "value here."); + +static void +xeon_reset_sbar_size(struct ntb_softc *ntb, enum ntb_bar idx, + enum ntb_bar regbar) +{ + struct ntb_pci_bar_info *bar; + uint8_t bar_sz; + + if (!HAS_FEATURE(NTB_SPLIT_BAR) && idx >= NTB_B2B_BAR_3) + return; + + bar = &ntb->bar_info[idx]; + bar_sz = pci_read_config(ntb->device, bar->psz_off, 1); + if (idx == regbar) { + if (ntb->b2b_off != 0) + bar_sz--; + else + bar_sz = 0; + } + pci_write_config(ntb->device, bar->ssz_off, bar_sz, 1); + bar_sz = pci_read_config(ntb->device, bar->ssz_off, 1); + (void)bar_sz; +} + +static void +xeon_set_sbar_base_and_limit(struct ntb_softc *ntb, uint64_t base_addr, + enum ntb_bar idx, enum ntb_bar regbar) +{ + struct ntb_pci_bar_info *bar; + vm_paddr_t bar_addr; + + bar = &ntb->bar_info[idx]; + bar_addr = base_addr + ((idx == regbar) ? ntb->b2b_off : 0); + + if (HAS_FEATURE(NTB_SPLIT_BAR) && idx >= NTB_B2B_BAR_2) { + ntb_reg_write(4, bar->sbarbase_off, bar_addr); + ntb_reg_write(4, bar->sbarlmt_off, bar_addr); + bar_addr = ntb_reg_read(4, bar->sbarbase_off); + (void)bar_addr; + bar_addr = ntb_reg_read(4, bar->sbarlmt_off); + } else { + ntb_reg_write(8, bar->sbarbase_off, bar_addr); + ntb_reg_write(8, bar->sbarlmt_off, bar_addr); + bar_addr = ntb_reg_read(8, bar->sbarbase_off); + (void)bar_addr; + bar_addr = ntb_reg_read(8, bar->sbarlmt_off); + } + (void)bar_addr; +} + +static void +xeon_set_pbar_xlat(struct ntb_softc *ntb, uint64_t base_addr, enum ntb_bar idx) +{ + struct ntb_pci_bar_info *bar; + + bar = &ntb->bar_info[idx]; + if (HAS_FEATURE(NTB_SPLIT_BAR) && idx >= NTB_B2B_BAR_2) { + ntb_reg_write(4, bar->pbarxlat_off, base_addr); + base_addr = ntb_reg_read(4, bar->pbarxlat_off); + } else { + ntb_reg_write(8, bar->pbarxlat_off, base_addr); + base_addr = ntb_reg_read(8, bar->pbarxlat_off); + } + (void)base_addr; +} + static int xeon_setup_b2b_mw(struct ntb_softc *ntb, const struct ntb_b2b_addr *addr, const struct ntb_b2b_addr *peer_addr) { - - /* Local addresses */ - ntb_reg_write(8, XEON_PBAR2XLAT_OFFSET, addr->bar2_addr64); - if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) - ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, addr->bar0_addr); - else { - if (HAS_FEATURE(NTB_SPLIT_BAR)) { - ntb_reg_write(4, XEON_PBAR4XLAT_OFFSET, - addr->bar4_addr32); - ntb_reg_write(4, XEON_PBAR5XLAT_OFFSET, - addr->bar5_addr32); - } else - ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, - addr->bar4_addr64); - /* - * B2B_XLAT_OFFSET is a 64-bit register but can only be - * written 32 bits at a time. - */ - ntb_reg_write(4, XEON_B2B_XLAT_OFFSETL, - addr->bar0_addr & 0xffffffff); - ntb_reg_write(4, XEON_B2B_XLAT_OFFSETU, addr->bar0_addr >> 32); + struct ntb_pci_bar_info *b2b_bar; + vm_size_t bar_size; + uint64_t bar_addr; + enum ntb_bar b2b_bar_num, i; + + if (ntb->b2b_mw_idx == B2B_MW_DISABLED) { + b2b_bar = NULL; + b2b_bar_num = NTB_CONFIG_BAR; + ntb->b2b_off = 0; + } else { + b2b_bar_num = ntb_mw_to_bar(ntb, ntb->b2b_mw_idx); + KASSERT(b2b_bar_num > 0 && b2b_bar_num < NTB_MAX_BARS, + ("invalid b2b mw bar")); + + b2b_bar = &ntb->bar_info[b2b_bar_num]; + bar_size = b2b_bar->size; + + if (ntb_b2b_mw_share != 0 && + (bar_size >> 1) >= XEON_B2B_MIN_SIZE) + 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"); + return (EIO); + } } - /* Peer addresses */ - ntb_reg_write(8, XEON_SBAR0BASE_OFFSET, peer_addr->bar0_addr); - ntb_reg_write(8, XEON_SBAR2BASE_OFFSET, peer_addr->bar2_addr64); + /* + * Reset the secondary bar sizes to match the primary bar sizes. + * (Except, disable or halve the size of the B2B secondary bar.) + */ + for (i = NTB_B2B_BAR_1; i < NTB_MAX_BARS; i++) + xeon_reset_sbar_size(ntb, i, b2b_bar_num); + + bar_addr = 0; + if (b2b_bar_num == NTB_CONFIG_BAR) + bar_addr = addr->bar0_addr; + else if (b2b_bar_num == NTB_B2B_BAR_1) + bar_addr = addr->bar2_addr64; + else if (b2b_bar_num == NTB_B2B_BAR_2 && !HAS_FEATURE(NTB_SPLIT_BAR)) + bar_addr = addr->bar4_addr64; + else if (b2b_bar_num == NTB_B2B_BAR_2) + bar_addr = addr->bar4_addr32; + else if (b2b_bar_num == NTB_B2B_BAR_3) + bar_addr = addr->bar5_addr32; + else + KASSERT(false, ("invalid bar")); + + ntb_reg_write(8, XEON_SBAR0BASE_OFFSET, bar_addr); + + /* + * Other SBARs are normally hit by the PBAR xlat, except for the b2b + * register BAR. The B2B BAR is either disabled above or configured + * half-size. It starts at PBAR xlat + offset. + * + * Also set up incoming BAR limits == base (zero length window). + */ + xeon_set_sbar_base_and_limit(ntb, addr->bar2_addr64, NTB_B2B_BAR_1, + b2b_bar_num); + if (HAS_FEATURE(NTB_SPLIT_BAR)) { + xeon_set_sbar_base_and_limit(ntb, addr->bar4_addr32, + NTB_B2B_BAR_2, b2b_bar_num); + xeon_set_sbar_base_and_limit(ntb, addr->bar5_addr32, + NTB_B2B_BAR_3, b2b_bar_num); + } else + xeon_set_sbar_base_and_limit(ntb, addr->bar4_addr64, + NTB_B2B_BAR_2, b2b_bar_num); + + /* Zero incoming translation addrs */ + ntb_reg_write(8, XEON_SBAR2XLAT_OFFSET, 0); + ntb_reg_write(8, XEON_SBAR4XLAT_OFFSET, 0); + + /* Zero outgoing translation limits (whole bar size windows) */ + ntb_reg_write(8, XEON_PBAR2LMT_OFFSET, 0); + ntb_reg_write(8, XEON_PBAR4LMT_OFFSET, 0); + + /* Set outgoing translation offsets */ + xeon_set_pbar_xlat(ntb, peer_addr->bar2_addr64, NTB_B2B_BAR_1); if (HAS_FEATURE(NTB_SPLIT_BAR)) { - ntb_reg_write(4, XEON_SBAR4BASE_OFFSET, - peer_addr->bar4_addr32); - ntb_reg_write(4, XEON_SBAR5BASE_OFFSET, - peer_addr->bar5_addr32); + xeon_set_pbar_xlat(ntb, peer_addr->bar4_addr32, NTB_B2B_BAR_2); + xeon_set_pbar_xlat(ntb, peer_addr->bar5_addr32, NTB_B2B_BAR_3); } else - ntb_reg_write(8, XEON_SBAR4BASE_OFFSET, - peer_addr->bar4_addr64); + xeon_set_pbar_xlat(ntb, peer_addr->bar4_addr64, NTB_B2B_BAR_2); + + /* Set the translation offset for B2B registers */ + bar_addr = 0; + if (b2b_bar_num == NTB_CONFIG_BAR) + bar_addr = peer_addr->bar0_addr; + else if (b2b_bar_num == NTB_B2B_BAR_1) + bar_addr = peer_addr->bar2_addr64; + else if (b2b_bar_num == NTB_B2B_BAR_2 && !HAS_FEATURE(NTB_SPLIT_BAR)) + bar_addr = peer_addr->bar4_addr64; + else if (b2b_bar_num == NTB_B2B_BAR_2) + bar_addr = peer_addr->bar4_addr32; + else if (b2b_bar_num == NTB_B2B_BAR_3) + bar_addr = peer_addr->bar5_addr32; + else + KASSERT(false, ("invalid bar")); + + /* + * B2B_XLAT_OFFSET is a 64-bit register but can only be written 32 bits + * at a time. + */ + ntb_reg_write(4, XEON_B2B_XLAT_OFFSETL, bar_addr & 0xffffffff); + ntb_reg_write(4, XEON_B2B_XLAT_OFFSETU, bar_addr >> 32); return (0); } @@ -1966,7 +2125,8 @@ ntb_get_peer_db_addr(struct ntb_softc *n 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 != UINT8_MAX, ("invalid b2b idx")); + KASSERT(ntb->b2b_mw_idx != B2B_MW_DISABLED, + ("invalid b2b idx")); bar = &ntb->bar_info[ntb_mw_to_bar(ntb, ntb->b2b_mw_idx)]; regoff = XEON_SHADOW_PDOORBELL_OFFSET; Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_regs.h Sun Oct 18 20:20:20 2015 (r289542) +++ head/sys/dev/ntb/ntb_hw/ntb_regs.h Sun Oct 18 20:20:29 2015 (r289543) @@ -135,6 +135,11 @@ #define XEON_PBAR23SZ_OFFSET 0x00d0 #define XEON_PBAR45SZ_OFFSET 0x00d1 +#define XEON_PBAR4SZ_OFFSET 0x00d1 +#define XEON_PBAR5SZ_OFFSET 0x00d5 +#define XEON_SBAR23SZ_OFFSET 0x00d2 +#define XEON_SBAR4SZ_OFFSET 0x00d3 +#define XEON_SBAR5SZ_OFFSET 0x00d6 #define NTB_PPD_OFFSET 0x00d4 #define XEON_PPD_CONN_TYPE 0x0003 #define XEON_PPD_DEV_TYPE 0x0010 From owner-svn-src-all@freebsd.org Sun Oct 18 20:20: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 C4543A1860D; Sun, 18 Oct 2015 20:20:39 +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 9C4F91BF5; Sun, 18 Oct 2015 20:20:39 +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 t9IKKc17093044; Sun, 18 Oct 2015 20:20:38 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IKKcrb093043; Sun, 18 Oct 2015 20:20:38 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510182020.t9IKKcrb093043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 18 Oct 2015 20:20:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289544 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.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, 18 Oct 2015 20:20:40 -0000 Author: cem Date: Sun Oct 18 20:20:38 2015 New Revision: 289544 URL: https://svnweb.freebsd.org/changeset/base/289544 Log: if_ntb: Replace handmade bitset macros with sys/bitset.h No functional change. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 18 20:20:29 2015 (r289543) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 18 20:20:38 2015 (r289544) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -42,14 +43,17 @@ __FBSDID("$FreeBSD$"); #include #include #include + #include #include #include #include #include #include + #include #include + #include #include #include @@ -67,10 +71,12 @@ __FBSDID("$FreeBSD$"); * be picked up and redistributed in Linux with a dual GPL/BSD license. */ -/* TODO: These functions should really be part of the kernel */ -#define test_bit(pos, bitmap_addr) (*(bitmap_addr) & 1UL << (pos)) -#define set_bit(pos, bitmap_addr) *(bitmap_addr) |= 1UL << (pos) -#define clear_bit(pos, bitmap_addr) *(bitmap_addr) &= ~(1UL << (pos)) +#define QP_SETSIZE 64 +BITSET_DEFINE(_qpset, QP_SETSIZE); +#define test_bit(pos, addr) BIT_ISSET(QP_SETSIZE, (pos), (addr)) +#define set_bit(pos, addr) BIT_SET(QP_SETSIZE, (pos), (addr)) +#define clear_bit(pos, addr) BIT_CLR(QP_SETSIZE, (pos), (addr)) +#define ffs_bit(addr) BIT_FFS(QP_SETSIZE, (addr)) #define KTR_NTB KTR_SPARE3 @@ -176,9 +182,9 @@ struct ntb_netdev { struct ifnet *ifp; struct ntb_transport_mw mw[NTB_MAX_NUM_MW]; struct ntb_transport_qp *qps; - uint64_t max_qps; - uint64_t qp_bitmap; - bool transport_link; + struct _qpset qp_bitmap; + uint8_t max_qps; + enum ntb_link_event transport_link; struct callout link_work; struct ntb_transport_qp *qp; uint64_t bufsize; @@ -490,7 +496,8 @@ static int ntb_transport_init(struct ntb_softc *ntb) { struct ntb_netdev *nt = &net_softc; - int rc, i; + int rc; + uint8_t i; if (max_num_clients == 0) nt->max_qps = MIN(ntb_get_max_cbs(ntb), ntb_mw_count(ntb)); @@ -504,10 +511,12 @@ ntb_transport_init(struct ntb_softc *ntb nt->qps = malloc(nt->max_qps * sizeof(struct ntb_transport_qp), M_NTB_IF, M_WAITOK|M_ZERO); - nt->qp_bitmap = ((uint64_t) 1 << nt->max_qps) - 1; + KASSERT(nt->max_qps <= QP_SETSIZE, ("invalid max_qps")); - for (i = 0; i < nt->max_qps; i++) + for (i = 0; i < nt->max_qps; i++) { + set_bit(i, &nt->qp_bitmap); ntb_transport_init_queue(nt, i); + } callout_init(&nt->link_work, 0); @@ -535,7 +544,7 @@ ntb_transport_free(void *transport) { struct ntb_netdev *nt = transport; struct ntb_softc *ntb = nt->ntb; - int i; + uint8_t i; ntb_transport_link_cleanup(nt); @@ -656,7 +665,7 @@ ntb_transport_create_queue(void *data, s if (nt == NULL) goto err; - free_queue = ffs(nt->qp_bitmap); + free_queue = ffs_bit(&nt->qp_bitmap); if (free_queue == 0) goto err; @@ -1284,7 +1293,7 @@ ntb_qp_link_work(void *arg) static void ntb_transport_link_cleanup(struct ntb_netdev *nt) { - int i; + uint8_t i; /* Pass along the info to any clients */ for (i = 0; i < nt->max_qps; i++) From owner-svn-src-all@freebsd.org Sun Oct 18 20:20: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 C8D5AA18685; Sun, 18 Oct 2015 20:20:49 +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 92E311E1F; Sun, 18 Oct 2015 20:20:49 +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 t9IKKm2u093097; Sun, 18 Oct 2015 20:20:48 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IKKmKX093094; Sun, 18 Oct 2015 20:20:48 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510182020.t9IKKmKX093094@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 18 Oct 2015 20:20:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289545 - in head/sys/dev/ntb: if_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: Sun, 18 Oct 2015 20:20:49 -0000 Author: cem Date: Sun Oct 18 20:20:48 2015 New Revision: 289545 URL: https://svnweb.freebsd.org/changeset/base/289545 Log: if_ntb: Rename things to match Linux driver No functional change. Part of the huge rewrite (e26a5843). Obtained from: Linux (e26a5843) (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_hw.h Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 18 20:20:38 2015 (r289544) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 18 20:20:48 2015 (r289545) @@ -1,5 +1,6 @@ /*- * Copyright (C) 2013 Intel Corporation + * Copyright (C) 2015 EMC Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -110,13 +111,13 @@ struct ntb_rx_info { }; struct ntb_transport_qp { - struct ntb_netdev *transport; + struct ntb_transport_ctx *transport; struct ntb_softc *ntb; void *cb_data; bool client_ready; - bool qp_link; + bool link_is_up; uint8_t qp_num; /* Only 64 QPs are allowed. 0-63 */ struct ntb_rx_info *rx_info; @@ -172,19 +173,20 @@ struct ntb_queue_handlers { struct ntb_transport_mw { - size_t size; + size_t xlat_size; void *virt_addr; vm_paddr_t dma_addr; }; -struct ntb_netdev { +struct ntb_transport_ctx { struct ntb_softc *ntb; struct ifnet *ifp; - struct ntb_transport_mw mw[NTB_MAX_NUM_MW]; - struct ntb_transport_qp *qps; + struct ntb_transport_mw mw_vec[NTB_MAX_NUM_MW]; + struct ntb_transport_qp *qp_vec; struct _qpset qp_bitmap; - uint8_t max_qps; - enum ntb_link_event transport_link; + unsigned mw_count; + unsigned qp_count; + enum ntb_link_event link_is_up; struct callout link_work; struct ntb_transport_qp *qp; uint64_t bufsize; @@ -193,7 +195,7 @@ struct ntb_netdev { struct mtx rx_lock; }; -static struct ntb_netdev net_softc; +static struct ntb_transport_ctx net_softc; enum { IF_NTB_DESC_DONE_FLAG = 1 << 0, @@ -226,7 +228,7 @@ enum { IF_NTB_MAX_SPAD, }; -#define QP_TO_MW(ntb, qp) ((qp) % ntb_mw_count(ntb)) +#define QP_TO_MW(nt, qp) ((qp) % nt->mw_count) #define NTB_QP_DEF_NUM_ENTRIES 100 #define NTB_LINK_DOWN_TIMEOUT 10 @@ -243,7 +245,7 @@ static void ntb_net_rx_handler(struct nt static void ntb_net_event_handler(void *data, enum ntb_link_event status); static int ntb_transport_init(struct ntb_softc *ntb); static void ntb_transport_free(void *transport); -static void ntb_transport_init_queue(struct ntb_netdev *nt, +static void ntb_transport_init_queue(struct ntb_transport_ctx *nt, unsigned int qp_num); static void ntb_transport_free_queue(struct ntb_transport_qp *qp); static struct ntb_transport_qp * ntb_transport_create_queue(void *data, @@ -264,12 +266,12 @@ static void ntb_rx_copy_task(struct ntb_ static void ntb_rx_completion_task(void *arg, int pending); static void ntb_transport_event_callback(void *data, enum ntb_hw_event event); static void ntb_transport_link_work(void *arg); -static int ntb_set_mw(struct ntb_netdev *nt, int num_mw, unsigned int size); -static void ntb_free_mw(struct ntb_netdev *nt, int num_mw); -static void ntb_transport_setup_qp_mw(struct ntb_netdev *nt, +static int ntb_set_mw(struct ntb_transport_ctx *, int num_mw, unsigned size); +static void ntb_free_mw(struct ntb_transport_ctx *nt, int num_mw); +static void ntb_transport_setup_qp_mw(struct ntb_transport_ctx *nt, unsigned int qp_num); static void ntb_qp_link_work(void *arg); -static void ntb_transport_link_cleanup(struct ntb_netdev *nt); +static void ntb_transport_link_cleanup(struct ntb_transport_ctx *nt); static void ntb_qp_link_down(struct ntb_transport_qp *qp); static void ntb_qp_link_cleanup(struct ntb_transport_qp *qp); static void ntb_transport_link_down(struct ntb_transport_qp *qp); @@ -380,7 +382,7 @@ ntb_teardown_interface(void) static void ntb_net_init(void *arg) { - struct ntb_netdev *ntb_softc = arg; + struct ntb_transport_ctx *ntb_softc = arg; struct ifnet *ifp = ntb_softc->ifp; ifp->if_drv_flags |= IFF_DRV_RUNNING; @@ -392,7 +394,7 @@ ntb_net_init(void *arg) static int ntb_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { - struct ntb_netdev *nt = ifp->if_softc; + struct ntb_transport_ctx *nt = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; int error = 0; @@ -421,7 +423,7 @@ static void ntb_start(struct ifnet *ifp) { struct mbuf *m_head; - struct ntb_netdev *nt = ifp->if_softc; + struct ntb_transport_ctx *nt = ifp->if_softc; int rc; mtx_lock(&nt->tx_lock); @@ -495,37 +497,37 @@ ntb_net_event_handler(void *data, enum n static int ntb_transport_init(struct ntb_softc *ntb) { - struct ntb_netdev *nt = &net_softc; + struct ntb_transport_ctx *nt = &net_softc; int rc; uint8_t i; + nt->mw_count = ntb_mw_count(ntb); if (max_num_clients == 0) - nt->max_qps = MIN(ntb_get_max_cbs(ntb), ntb_mw_count(ntb)); + nt->qp_count = MIN(ntb_get_max_cbs(ntb), ntb_mw_count(ntb)); else - nt->max_qps = MIN(ntb_get_max_cbs(ntb), max_num_clients); + nt->qp_count = MIN(ntb_get_max_cbs(ntb), max_num_clients); ntb_register_transport(ntb, nt); mtx_init(&nt->tx_lock, "ntb transport tx", NULL, MTX_DEF); mtx_init(&nt->rx_lock, "ntb transport rx", NULL, MTX_DEF); - nt->qps = malloc(nt->max_qps * sizeof(struct ntb_transport_qp), - M_NTB_IF, M_WAITOK|M_ZERO); + nt->qp_vec = malloc(nt->qp_count * sizeof(*nt->qp_vec), M_NTB_IF, + M_WAITOK | M_ZERO); - KASSERT(nt->max_qps <= QP_SETSIZE, ("invalid max_qps")); + KASSERT(nt->qp_count <= QP_SETSIZE, ("invalid qp_count")); - for (i = 0; i < nt->max_qps; i++) { + for (i = 0; i < nt->qp_count; i++) { set_bit(i, &nt->qp_bitmap); ntb_transport_init_queue(nt, i); } callout_init(&nt->link_work, 0); - rc = ntb_register_event_callback(ntb, - ntb_transport_event_callback); + rc = ntb_register_event_callback(ntb, ntb_transport_event_callback); if (rc != 0) goto err; - if (ntb_query_link_status(ntb)) { + if (ntb_link_is_up(ntb)) { if (bootverbose) device_printf(ntb_get_device(ntb), "link up\n"); callout_reset(&nt->link_work, 0, ntb_transport_link_work, nt); @@ -534,7 +536,7 @@ ntb_transport_init(struct ntb_softc *ntb return (0); err: - free(nt->qps, M_NTB_IF); + free(nt->qp_vec, M_NTB_IF); ntb_unregister_transport(ntb); return (rc); } @@ -542,7 +544,7 @@ err: static void ntb_transport_free(void *transport) { - struct ntb_netdev *nt = transport; + struct ntb_transport_ctx *nt = transport; struct ntb_softc *ntb = nt->ntb; uint8_t i; @@ -551,46 +553,46 @@ ntb_transport_free(void *transport) callout_drain(&nt->link_work); /* verify that all the qps are freed */ - for (i = 0; i < nt->max_qps; i++) + for (i = 0; i < nt->qp_count; i++) if (!test_bit(i, &nt->qp_bitmap)) - ntb_transport_free_queue(&nt->qps[i]); + ntb_transport_free_queue(&nt->qp_vec[i]); ntb_unregister_event_callback(ntb); for (i = 0; i < NTB_MAX_NUM_MW; i++) ntb_free_mw(nt, i); - free(nt->qps, M_NTB_IF); + free(nt->qp_vec, M_NTB_IF); ntb_unregister_transport(ntb); } static void -ntb_transport_init_queue(struct ntb_netdev *nt, unsigned int qp_num) +ntb_transport_init_queue(struct ntb_transport_ctx *nt, unsigned int qp_num) { struct ntb_transport_qp *qp; unsigned int num_qps_mw, tx_size; - uint8_t mw_num, mw_max; + uint8_t mw_num, mw_count; - mw_max = ntb_mw_count(nt->ntb); - mw_num = QP_TO_MW(nt->ntb, qp_num); + mw_count = ntb_mw_count(nt->ntb); + mw_num = QP_TO_MW(nt, qp_num); - qp = &nt->qps[qp_num]; + qp = &nt->qp_vec[qp_num]; qp->qp_num = qp_num; qp->transport = nt; qp->ntb = nt->ntb; - qp->qp_link = NTB_LINK_DOWN; - qp->client_ready = NTB_LINK_DOWN; + qp->link_is_up = false; + qp->client_ready = false; qp->event_handler = NULL; - if (nt->max_qps % mw_max && mw_num + 1 < nt->max_qps / mw_max) - num_qps_mw = nt->max_qps / mw_max + 1; + if (nt->qp_count % mw_count && mw_num + 1 < nt->qp_count / mw_count) + num_qps_mw = nt->qp_count / mw_count + 1; else - num_qps_mw = nt->max_qps / mw_max; + num_qps_mw = nt->qp_count / mw_count; - tx_size = (unsigned int) ntb_get_mw_size(qp->ntb, mw_num) / num_qps_mw; + tx_size = ntb_get_mw_size(qp->ntb, mw_num) / num_qps_mw; qp->rx_info = (struct ntb_rx_info *) ((char *)ntb_get_mw_vbase(qp->ntb, mw_num) + - (qp_num / mw_max * tx_size)); + (qp_num / mw_count * tx_size)); tx_size -= sizeof(struct ntb_rx_info); qp->tx_mw = qp->rx_info + 1; @@ -657,7 +659,7 @@ ntb_transport_create_queue(void *data, s { struct ntb_queue_entry *entry; struct ntb_transport_qp *qp; - struct ntb_netdev *nt; + struct ntb_transport_ctx *nt; unsigned int free_queue; int rc, i; @@ -674,7 +676,7 @@ ntb_transport_create_queue(void *data, s clear_bit(free_queue, &nt->qp_bitmap); - qp = &nt->qps[free_queue]; + qp = &nt->qp_vec[free_queue]; qp->cb_data = data; qp->rx_handler = handlers->rx_handler; qp->tx_handler = handlers->tx_handler; @@ -725,11 +727,11 @@ ntb_transport_link_up(struct ntb_transpo if (qp == NULL) return; - qp->client_ready = NTB_LINK_UP; + qp->client_ready = true; if (bootverbose) device_printf(ntb_get_device(qp->ntb), "qp client ready\n"); - if (qp->transport->transport_link == NTB_LINK_UP) + if (qp->transport->link_is_up) callout_reset(&qp->link_work, 0, ntb_qp_link_work, qp); } @@ -757,7 +759,7 @@ ntb_transport_tx_enqueue(struct ntb_tran struct ntb_queue_entry *entry; int rc; - if (qp == NULL || qp->qp_link != NTB_LINK_UP || len == 0) { + if (qp == NULL || !qp->link_is_up || len == 0) { CTR0(KTR_NTB, "TX: link not up"); return (EINVAL); } @@ -839,7 +841,7 @@ ntb_tx_copy_task(struct ntb_transport_qp /* TODO: replace with bus_space_write */ hdr->flags = entry->flags | IF_NTB_DESC_DONE_FLAG; - ntb_ring_doorbell(qp->ntb, qp->qp_num); + ntb_peer_db_set(qp->ntb, 1ull << qp->qp_num); /* * The entry length can only be zero if the packet is intended to be a @@ -1013,7 +1015,7 @@ ntb_rx_completion_task(void *arg, int pe while ((entry = ntb_list_rm(&qp->ntb_rx_free_q_lock, &qp->rx_free_q))) { m = entry->buf; CTR2(KTR_NTB, "RX: completing entry %p, mbuf %p", entry, m); - if (qp->rx_handler && qp->client_ready == NTB_LINK_UP) + if (qp->rx_handler && qp->client_ready) qp->rx_handler(qp, qp->cb_data, m, entry->len); entry->buf = NULL; @@ -1035,7 +1037,7 @@ ntb_rx_completion_task(void *arg, int pe static void ntb_transport_event_callback(void *data, enum ntb_hw_event event) { - struct ntb_netdev *nt = data; + struct ntb_transport_ctx *nt = data; switch (event) { case NTB_EVENT_HW_LINK_UP: @@ -1057,7 +1059,7 @@ ntb_transport_event_callback(void *data, static void ntb_transport_link_work(void *arg) { - struct ntb_netdev *nt = arg; + struct ntb_transport_ctx *nt = arg; struct ntb_softc *ntb = nt->ntb; struct ntb_transport_qp *qp; uint64_t val64; @@ -1068,45 +1070,45 @@ ntb_transport_link_work(void *arg) /* send the local info, in the opposite order of the way we read it */ for (i = 0; i < num_mw; i++) { - rc = ntb_write_remote_spad(ntb, IF_NTB_MW0_SZ_HIGH + (i * 2), + rc = ntb_peer_spad_write(ntb, IF_NTB_MW0_SZ_HIGH + (i * 2), (uint64_t)ntb_get_mw_size(ntb, i) >> 32); if (rc != 0) goto out; - rc = ntb_write_remote_spad(ntb, IF_NTB_MW0_SZ_LOW + (i * 2), + rc = ntb_peer_spad_write(ntb, IF_NTB_MW0_SZ_LOW + (i * 2), (uint32_t)ntb_get_mw_size(ntb, i)); if (rc != 0) goto out; } - rc = ntb_write_remote_spad(ntb, IF_NTB_NUM_MWS, num_mw); + rc = ntb_peer_spad_write(ntb, IF_NTB_NUM_MWS, num_mw); if (rc != 0) goto out; - rc = ntb_write_remote_spad(ntb, IF_NTB_NUM_QPS, nt->max_qps); + rc = ntb_peer_spad_write(ntb, IF_NTB_NUM_QPS, nt->qp_count); if (rc != 0) goto out; - rc = ntb_write_remote_spad(ntb, IF_NTB_VERSION, NTB_TRANSPORT_VERSION); + rc = ntb_peer_spad_write(ntb, IF_NTB_VERSION, NTB_TRANSPORT_VERSION); if (rc != 0) goto out; /* Query the remote side for its info */ - rc = ntb_read_local_spad(ntb, IF_NTB_VERSION, &val); + rc = ntb_spad_read(ntb, IF_NTB_VERSION, &val); if (rc != 0) goto out; if (val != NTB_TRANSPORT_VERSION) goto out; - rc = ntb_read_local_spad(ntb, IF_NTB_NUM_QPS, &val); + rc = ntb_spad_read(ntb, IF_NTB_NUM_QPS, &val); if (rc != 0) goto out; - if (val != nt->max_qps) + if (val != nt->qp_count) goto out; - rc = ntb_read_local_spad(ntb, IF_NTB_NUM_MWS, &val); + rc = ntb_spad_read(ntb, IF_NTB_NUM_MWS, &val); if (rc != 0) goto out; @@ -1114,14 +1116,14 @@ ntb_transport_link_work(void *arg) goto out; for (i = 0; i < num_mw; i++) { - rc = ntb_read_local_spad(ntb, IF_NTB_MW0_SZ_HIGH + (i * 2), + rc = ntb_spad_read(ntb, IF_NTB_MW0_SZ_HIGH + (i * 2), &val); if (rc != 0) goto free_mws; val64 = (uint64_t)val << 32; - rc = ntb_read_local_spad(ntb, IF_NTB_MW0_SZ_LOW + (i * 2), + rc = ntb_spad_read(ntb, IF_NTB_MW0_SZ_LOW + (i * 2), &val); if (rc != 0) goto free_mws; @@ -1133,16 +1135,16 @@ ntb_transport_link_work(void *arg) goto free_mws; } - nt->transport_link = NTB_LINK_UP; + nt->link_is_up = true; if (bootverbose) device_printf(ntb_get_device(ntb), "transport link up\n"); - for (i = 0; i < nt->max_qps; i++) { - qp = &nt->qps[i]; + for (i = 0; i < nt->qp_count; i++) { + qp = &nt->qp_vec[i]; ntb_transport_setup_qp_mw(nt, i); - if (qp->client_ready == NTB_LINK_UP) + if (qp->client_ready) callout_reset(&qp->link_work, 0, ntb_qp_link_work, qp); } @@ -1152,32 +1154,32 @@ free_mws: for (i = 0; i < NTB_MAX_NUM_MW; i++) ntb_free_mw(nt, i); out: - if (ntb_query_link_status(ntb)) + if (ntb_link_is_up(ntb)) callout_reset(&nt->link_work, NTB_LINK_DOWN_TIMEOUT * hz / 1000, ntb_transport_link_work, nt); } static int -ntb_set_mw(struct ntb_netdev *nt, int num_mw, unsigned int size) +ntb_set_mw(struct ntb_transport_ctx *nt, int num_mw, unsigned int size) { - struct ntb_transport_mw *mw = &nt->mw[num_mw]; + struct ntb_transport_mw *mw = &nt->mw_vec[num_mw]; /* No need to re-setup */ - if (mw->size == size) + if (mw->xlat_size == size) return (0); - if (mw->size != 0) + if (mw->xlat_size != 0) ntb_free_mw(nt, num_mw); /* Alloc memory for receiving data. Must be 4k aligned */ - mw->size = size; + mw->xlat_size = size; - mw->virt_addr = contigmalloc(mw->size, M_NTB_IF, M_ZERO, 0, - BUS_SPACE_MAXADDR, mw->size, 0); + mw->virt_addr = contigmalloc(mw->xlat_size, M_NTB_IF, M_ZERO, 0, + BUS_SPACE_MAXADDR, mw->xlat_size, 0); if (mw->virt_addr == NULL) { - mw->size = 0; + mw->xlat_size = 0; printf("ntb: Unable to allocate MW buffer of size %zu\n", - mw->size); + mw->xlat_size); return (ENOMEM); } /* TODO: replace with bus_space_* functions */ @@ -1203,37 +1205,37 @@ ntb_set_mw(struct ntb_netdev *nt, int nu } static void -ntb_free_mw(struct ntb_netdev *nt, int num_mw) +ntb_free_mw(struct ntb_transport_ctx *nt, int num_mw) { - struct ntb_transport_mw *mw = &nt->mw[num_mw]; + struct ntb_transport_mw *mw = &nt->mw_vec[num_mw]; if (mw->virt_addr == NULL) return; - contigfree(mw->virt_addr, mw->size, M_NTB_IF); + contigfree(mw->virt_addr, mw->xlat_size, M_NTB_IF); mw->virt_addr = NULL; } static void -ntb_transport_setup_qp_mw(struct ntb_netdev *nt, unsigned int qp_num) +ntb_transport_setup_qp_mw(struct ntb_transport_ctx *nt, unsigned int qp_num) { - struct ntb_transport_qp *qp = &nt->qps[qp_num]; + struct ntb_transport_qp *qp = &nt->qp_vec[qp_num]; void *offset; unsigned int rx_size, num_qps_mw; - uint8_t mw_num, mw_max; + uint8_t mw_num, mw_count; unsigned int i; - mw_max = ntb_mw_count(nt->ntb); - mw_num = QP_TO_MW(nt->ntb, qp_num); + mw_count = ntb_mw_count(nt->ntb); + mw_num = QP_TO_MW(nt, qp_num); - if (nt->max_qps % mw_max && mw_num + 1 < nt->max_qps / mw_max) - num_qps_mw = nt->max_qps / mw_max + 1; + if (nt->qp_count % mw_count && mw_num + 1 < nt->qp_count / mw_count) + num_qps_mw = nt->qp_count / mw_count + 1; else - num_qps_mw = nt->max_qps / mw_max; + num_qps_mw = nt->qp_count / mw_count; - rx_size = (unsigned int) nt->mw[mw_num].size / num_qps_mw; - qp->remote_rx_info = (void *)((uint8_t *)nt->mw[mw_num].virt_addr + - (qp_num / mw_max * rx_size)); + rx_size = nt->mw_vec[mw_num].xlat_size / num_qps_mw; + qp->remote_rx_info = (void *)((uint8_t *)nt->mw_vec[mw_num].virt_addr + + (qp_num / mw_count * rx_size)); rx_size -= sizeof(struct ntb_rx_info); qp->rx_buff = qp->remote_rx_info + 1; @@ -1263,27 +1265,27 @@ ntb_qp_link_work(void *arg) { struct ntb_transport_qp *qp = arg; struct ntb_softc *ntb = qp->ntb; - struct ntb_netdev *nt = qp->transport; + struct ntb_transport_ctx *nt = qp->transport; int rc, val; - rc = ntb_read_remote_spad(ntb, IF_NTB_QP_LINKS, &val); + rc = ntb_peer_spad_read(ntb, IF_NTB_QP_LINKS, &val); if (rc != 0) return; - rc = ntb_write_remote_spad(ntb, IF_NTB_QP_LINKS, val | 1 << qp->qp_num); + rc = ntb_peer_spad_write(ntb, IF_NTB_QP_LINKS, val | 1 << qp->qp_num); /* query remote spad for qp ready bits */ - rc = ntb_read_local_spad(ntb, IF_NTB_QP_LINKS, &val); + rc = ntb_spad_read(ntb, IF_NTB_QP_LINKS, &val); /* See if the remote side is up */ if ((1 << qp->qp_num & val) != 0) { - qp->qp_link = NTB_LINK_UP; + qp->link_is_up = true; if (qp->event_handler != NULL) qp->event_handler(qp->cb_data, NTB_LINK_UP); if (bootverbose) device_printf(ntb_get_device(ntb), "qp link up\n"); - } else if (nt->transport_link == NTB_LINK_UP) { + } else if (nt->link_is_up) { callout_reset(&qp->link_work, NTB_LINK_DOWN_TIMEOUT * hz / 1000, ntb_qp_link_work, qp); } @@ -1291,19 +1293,19 @@ ntb_qp_link_work(void *arg) /* Link down event*/ static void -ntb_transport_link_cleanup(struct ntb_netdev *nt) +ntb_transport_link_cleanup(struct ntb_transport_ctx *nt) { uint8_t i; /* Pass along the info to any clients */ - for (i = 0; i < nt->max_qps; i++) + for (i = 0; i < nt->qp_count; i++) if (!test_bit(i, &nt->qp_bitmap)) - ntb_qp_link_down(&nt->qps[i]); + ntb_qp_link_down(&nt->qp_vec[i]); - if (nt->transport_link == NTB_LINK_DOWN) + if (!nt->link_is_up) callout_drain(&nt->link_work); else - nt->transport_link = NTB_LINK_DOWN; + nt->link_is_up = false; /* * The scratchpad registers keep the values if the remote side @@ -1311,7 +1313,7 @@ ntb_transport_link_cleanup(struct ntb_ne * time they are accessed */ for (i = 0; i < IF_NTB_MAX_SPAD; i++) - ntb_write_local_spad(nt->ntb, i, 0); + ntb_spad_write(nt->ntb, i, 0); } @@ -1325,9 +1327,9 @@ ntb_qp_link_down(struct ntb_transport_qp static void ntb_qp_link_cleanup(struct ntb_transport_qp *qp) { - struct ntb_netdev *nt = qp->transport; + struct ntb_transport_ctx *nt = qp->transport; - if (qp->qp_link == NTB_LINK_DOWN) { + if (!qp->link_is_up) { callout_drain(&qp->link_work); return; } @@ -1335,9 +1337,9 @@ ntb_qp_link_cleanup(struct ntb_transport if (qp->event_handler != NULL) qp->event_handler(qp->cb_data, NTB_LINK_DOWN); - qp->qp_link = NTB_LINK_DOWN; + qp->link_is_up = false; - if (nt->transport_link == NTB_LINK_UP) + if (nt->link_is_up) callout_reset(&qp->link_work, NTB_LINK_DOWN_TIMEOUT * hz / 1000, ntb_qp_link_work, qp); } @@ -1359,16 +1361,16 @@ ntb_transport_link_down(struct ntb_trans if (qp == NULL) return; - qp->client_ready = NTB_LINK_DOWN; + qp->client_ready = false; - rc = ntb_read_remote_spad(qp->ntb, IF_NTB_QP_LINKS, &val); + rc = ntb_peer_spad_read(qp->ntb, IF_NTB_QP_LINKS, &val); if (rc != 0) return; - rc = ntb_write_remote_spad(qp->ntb, IF_NTB_QP_LINKS, + rc = ntb_peer_spad_write(qp->ntb, IF_NTB_QP_LINKS, val & ~(1 << qp->qp_num)); - if (qp->qp_link == NTB_LINK_UP) + if (qp->link_is_up) ntb_send_link_down(qp); else callout_drain(&qp->link_work); @@ -1381,10 +1383,10 @@ ntb_send_link_down(struct ntb_transport_ struct ntb_queue_entry *entry; int i, rc; - if (qp->qp_link == NTB_LINK_DOWN) + if (!qp->link_is_up) return; - qp->qp_link = NTB_LINK_DOWN; + qp->link_is_up = false; for (i = 0; i < NTB_LINK_DOWN_TIMEOUT; i++) { entry = ntb_list_rm(&qp->ntb_tx_free_q_lock, &qp->tx_free_q); Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Sun Oct 18 20:20:38 2015 (r289544) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Sun Oct 18 20:20:48 2015 (r289545) @@ -1891,7 +1891,7 @@ ntb_mw_count(struct ntb_softc *ntb) } /** - * ntb_write_local_spad() - write to the secondary scratchpad register + * ntb_spad_write() - write to the secondary scratchpad register * @ntb: pointer to ntb_softc instance * @idx: index to the scratchpad register, 0 based * @val: the data value to put into the register @@ -1902,7 +1902,7 @@ ntb_mw_count(struct ntb_softc *ntb) * RETURNS: An appropriate ERRNO error value on error, or zero for success. */ int -ntb_write_local_spad(struct ntb_softc *ntb, unsigned int idx, uint32_t val) +ntb_spad_write(struct ntb_softc *ntb, unsigned int idx, uint32_t val) { if (idx >= ntb->spad_count) @@ -1914,7 +1914,7 @@ ntb_write_local_spad(struct ntb_softc *n } /** - * ntb_read_local_spad() - read from the primary scratchpad register + * ntb_spad_read() - read from the primary scratchpad register * @ntb: pointer to ntb_softc instance * @idx: index to scratchpad register, 0 based * @val: pointer to 32bit integer for storing the register value @@ -1925,7 +1925,7 @@ ntb_write_local_spad(struct ntb_softc *n * RETURNS: An appropriate ERRNO error value on error, or zero for success. */ int -ntb_read_local_spad(struct ntb_softc *ntb, unsigned int idx, uint32_t *val) +ntb_spad_read(struct ntb_softc *ntb, unsigned int idx, uint32_t *val) { if (idx >= ntb->spad_count) @@ -1937,7 +1937,7 @@ ntb_read_local_spad(struct ntb_softc *nt } /** - * ntb_write_remote_spad() - write to the secondary scratchpad register + * ntb_peer_spad_write() - write to the secondary scratchpad register * @ntb: pointer to ntb_softc instance * @idx: index to the scratchpad register, 0 based * @val: the data value to put into the register @@ -1948,7 +1948,7 @@ ntb_read_local_spad(struct ntb_softc *nt * RETURNS: An appropriate ERRNO error value on error, or zero for success. */ int -ntb_write_remote_spad(struct ntb_softc *ntb, unsigned int idx, uint32_t val) +ntb_peer_spad_write(struct ntb_softc *ntb, unsigned int idx, uint32_t val) { if (idx >= ntb->spad_count) @@ -1963,7 +1963,7 @@ ntb_write_remote_spad(struct ntb_softc * } /** - * ntb_read_remote_spad() - read from the primary scratchpad register + * ntb_peer_spad_read() - read from the primary scratchpad register * @ntb: pointer to ntb_softc instance * @idx: index to scratchpad register, 0 based * @val: pointer to 32bit integer for storing the register value @@ -1974,7 +1974,7 @@ ntb_write_remote_spad(struct ntb_softc * * RETURNS: An appropriate ERRNO error value on error, or zero for success. */ int -ntb_read_remote_spad(struct ntb_softc *ntb, unsigned int idx, uint32_t *val) +ntb_peer_spad_read(struct ntb_softc *ntb, unsigned int idx, uint32_t *val) { if (idx >= ntb->spad_count) @@ -2074,23 +2074,16 @@ ntb_set_mw_addr(struct ntb_softc *ntb, u } /** - * ntb_ring_doorbell() - Set the doorbell on the secondary/external side + * ntb_peer_db_set() - Set the doorbell on the secondary/external side * @ntb: pointer to ntb_softc instance - * @db: doorbell to ring + * @bit: doorbell bits to ring * * This function allows triggering of a doorbell on the secondary/external * side that will initiate an interrupt on the remote host */ void -ntb_ring_doorbell(struct ntb_softc *ntb, unsigned int db) +ntb_peer_db_set(struct ntb_softc *ntb, uint64_t bit) { - uint64_t bit; - - if (ntb->type == NTB_SOC) - bit = 1 << db; - else - bit = ((1 << ntb->db_vec_shift) - 1) << - (db * ntb->db_vec_shift); if (HAS_FEATURE(NTB_SDOORBELL_LOCKUP)) { ntb_mw_write(2, XEON_SHADOW_PDOORBELL_OFFSET, bit); @@ -2139,7 +2132,7 @@ ntb_get_peer_db_addr(struct ntb_softc *n } /** - * ntb_query_link_status() - return the hardware link status + * ntb_link_is_up() - return the hardware link status * @ndev: pointer to ntb_device instance * * Returns true if the hardware is connected to the remote system @@ -2147,7 +2140,7 @@ ntb_get_peer_db_addr(struct ntb_softc *n * RETURNS: true or false based on the hardware link state */ bool -ntb_query_link_status(struct ntb_softc *ntb) +ntb_link_is_up(struct ntb_softc *ntb) { return (ntb->link_status == NTB_LINK_UP); Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.h Sun Oct 18 20:20:38 2015 (r289544) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.h Sun Oct 18 20:20:48 2015 (r289545) @@ -65,19 +65,19 @@ void ntb_unregister_transport(struct ntb uint8_t ntb_get_max_cbs(struct ntb_softc *ntb); uint8_t ntb_mw_count(struct ntb_softc *ntb); uint8_t ntb_get_max_spads(struct ntb_softc *ntb); -int ntb_write_local_spad(struct ntb_softc *ntb, unsigned int idx, uint32_t val); -int ntb_read_local_spad(struct ntb_softc *ntb, unsigned int idx, uint32_t *val); -int ntb_write_remote_spad(struct ntb_softc *ntb, unsigned int idx, +int ntb_spad_write(struct ntb_softc *ntb, unsigned int idx, uint32_t val); +int ntb_spad_read(struct ntb_softc *ntb, unsigned int idx, uint32_t *val); +int ntb_peer_spad_write(struct ntb_softc *ntb, unsigned int idx, uint32_t val); -int ntb_read_remote_spad(struct ntb_softc *ntb, unsigned int idx, +int ntb_peer_spad_read(struct ntb_softc *ntb, unsigned int idx, uint32_t *val); void *ntb_get_mw_vbase(struct ntb_softc *ntb, unsigned int mw); bus_addr_t ntb_get_mw_pbase(struct ntb_softc *ntb, unsigned int mw); u_long ntb_get_mw_size(struct ntb_softc *ntb, unsigned int mw); void ntb_set_mw_addr(struct ntb_softc *ntb, unsigned int mw, uint64_t addr); -void ntb_ring_doorbell(struct ntb_softc *ntb, unsigned int db); +void ntb_peer_db_set(struct ntb_softc *ntb, uint64_t bit); bus_addr_t ntb_get_peer_db_addr(struct ntb_softc *ntb, vm_size_t *sz_out); -bool ntb_query_link_status(struct ntb_softc *ntb); +bool ntb_link_is_up(struct ntb_softc *ntb); device_t ntb_get_device(struct ntb_softc *ntb); /* Hardware owns the low 32 bits of features. */ From owner-svn-src-all@freebsd.org Sun Oct 18 20:20: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 EB13DA187C1; Sun, 18 Oct 2015 20:20:58 +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 7A9A01F5A; Sun, 18 Oct 2015 20:20:58 +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 t9IKKvYl093146; Sun, 18 Oct 2015 20:20:57 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IKKvjR093144; Sun, 18 Oct 2015 20:20:57 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510182020.t9IKKvjR093144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sun, 18 Oct 2015 20:20:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289546 - in head/sys/dev/ntb: if_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: Sun, 18 Oct 2015 20:20:59 -0000 Author: cem Date: Sun Oct 18 20:20:57 2015 New Revision: 289546 URL: https://svnweb.freebsd.org/changeset/base/289546 Log: if_ntb: MFV e26a5843: Move MW/DB management to if_ntb This is the last e26a5843 patch. The general thrust of the rewrite was to move more responsibility for Memory Window and Doorbell interrupt management from the ntb_hw driver to if_ntb. A number of APIs have been added, removed, or replaced. The old DB callback mechanism has been excised. Instead, callers (if_ntb) are responsible for configuring MWs and handling their interrupts more directly. This adds a tunable, hw.ntb.max_mw_size, allowing users to limit the size of memory windows used by if_ntb (identical to the Linux modparam of the same name). Despite attempts to keep mechanical name changes to separate commits, some have snuck in here. At least the driver should be much more similar to the latest Linux one now -- making porting fixes easier. Authored by: Allen Hubbe Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_hw.h head/sys/dev/ntb/ntb_hw/ntb_regs.h Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 18 20:20:48 2015 (r289545) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Sun Oct 18 20:20:57 2015 (r289546) @@ -81,12 +81,22 @@ BITSET_DEFINE(_qpset, QP_SETSIZE); #define KTR_NTB KTR_SPARE3 -#define NTB_TRANSPORT_VERSION 3 +#define NTB_TRANSPORT_VERSION 4 #define NTB_RX_MAX_PKTS 64 #define NTB_RXQ_SIZE 300 +enum ntb_link_event { + NTB_LINK_DOWN = 0, + NTB_LINK_UP, +}; + static unsigned int transport_mtu = 0x4000 + ETHER_HDR_LEN + ETHER_CRC_LEN; +static uint64_t max_mw_size; +SYSCTL_UQUAD(_hw_ntb, OID_AUTO, max_mw_size, CTLFLAG_RDTUN, &max_mw_size, 0, + "If enabled (non-zero), limit the size of large memory windows. " + "Both sides of the NTB MUST set the same value here."); + static unsigned int max_num_clients; SYSCTL_UINT(_hw_ntb, OID_AUTO, max_num_clients, CTLFLAG_RDTUN, &max_num_clients, 0, "Maximum number of NTB transport clients. " @@ -99,11 +109,15 @@ struct ntb_queue_entry { /* ntb_queue list reference */ STAILQ_ENTRY(ntb_queue_entry) entry; - /* info on data to be transfered */ + /* info on data to be transferred */ void *cb_data; void *buf; - uint64_t len; - uint64_t flags; + unsigned len; + unsigned flags; + + struct ntb_transport_qp *qp; + struct ntb_payload_header *x_hdr; + unsigned index; }; struct ntb_rx_info { @@ -128,6 +142,7 @@ struct ntb_transport_qp { struct ntb_queue_list tx_free_q; struct mtx ntb_tx_free_q_lock; void *tx_mw; + bus_addr_t tx_mw_phys; uint64_t tx_index; uint64_t tx_max_entry; uint64_t tx_max_frame; @@ -139,6 +154,7 @@ struct ntb_transport_qp { struct mtx ntb_rx_pend_q_lock; struct mtx ntb_rx_free_q_lock; struct task rx_completion_task; + struct task rxc_db_work; void *rx_buff; uint64_t rx_index; uint64_t rx_max_entry; @@ -171,11 +187,18 @@ struct ntb_queue_handlers { void (*event_handler)(void *data, enum ntb_link_event status); }; - struct ntb_transport_mw { + vm_paddr_t phys_addr; + size_t phys_size; + size_t xlat_align; + size_t xlat_align_size; + /* Tx buff is off vbase / phys_addr */ + void *vbase; size_t xlat_size; + size_t buff_size; + /* Rx buff is off virt_addr / dma_addr */ void *virt_addr; - vm_paddr_t dma_addr; + bus_addr_t dma_addr; }; struct ntb_transport_ctx { @@ -184,15 +207,18 @@ struct ntb_transport_ctx { struct ntb_transport_mw mw_vec[NTB_MAX_NUM_MW]; struct ntb_transport_qp *qp_vec; struct _qpset qp_bitmap; + struct _qpset qp_bitmap_free; unsigned mw_count; unsigned qp_count; enum ntb_link_event link_is_up; struct callout link_work; - struct ntb_transport_qp *qp; uint64_t bufsize; u_char eaddr[ETHER_ADDR_LEN]; struct mtx tx_lock; struct mtx rx_lock; + + /* The hardcoded single queuepair in ntb_setup_interface() */ + struct ntb_transport_qp *qp; }; static struct ntb_transport_ctx net_softc; @@ -244,31 +270,32 @@ static void ntb_net_rx_handler(struct nt void *data, int len); static void ntb_net_event_handler(void *data, enum ntb_link_event status); static int ntb_transport_init(struct ntb_softc *ntb); -static void ntb_transport_free(void *transport); +static void ntb_transport_free(struct ntb_transport_ctx *); static void ntb_transport_init_queue(struct ntb_transport_ctx *nt, unsigned int qp_num); static void ntb_transport_free_queue(struct ntb_transport_qp *qp); -static struct ntb_transport_qp * ntb_transport_create_queue(void *data, +static struct ntb_transport_qp *ntb_transport_create_queue(void *data, struct ntb_softc *pdev, const struct ntb_queue_handlers *handlers); static void ntb_transport_link_up(struct ntb_transport_qp *qp); static int ntb_transport_tx_enqueue(struct ntb_transport_qp *qp, void *cb, void *data, unsigned int len); static int ntb_process_tx(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry); -static void ntb_tx_copy_task(struct ntb_transport_qp *qp, +static void ntb_memcpy_tx(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry, void *offset); static void ntb_qp_full(void *arg); -static int ntb_transport_rxc_db(void *arg, int dummy); +static void ntb_transport_rxc_db(void *arg, int pending); static void ntb_rx_pendq_full(void *arg); static int ntb_process_rxc(struct ntb_transport_qp *qp); static void ntb_rx_copy_task(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry, void *offset); -static void ntb_rx_completion_task(void *arg, int pending); -static void ntb_transport_event_callback(void *data, enum ntb_hw_event event); +static void ntb_complete_rxc(void *arg, int pending); +static void ntb_transport_doorbell_callback(void *data, int vector); +static void ntb_transport_event_callback(void *data); static void ntb_transport_link_work(void *arg); static int ntb_set_mw(struct ntb_transport_ctx *, int num_mw, unsigned size); static void ntb_free_mw(struct ntb_transport_ctx *nt, int num_mw); -static void ntb_transport_setup_qp_mw(struct ntb_transport_ctx *nt, +static int ntb_transport_setup_qp_mw(struct ntb_transport_ctx *nt, unsigned int qp_num); static void ntb_qp_link_work(void *arg); static void ntb_transport_link_cleanup(struct ntb_transport_ctx *nt); @@ -283,6 +310,11 @@ static struct ntb_queue_entry *ntb_list_ static void create_random_local_eui48(u_char *eaddr); static unsigned int ntb_transport_max_size(struct ntb_transport_qp *qp); +static const struct ntb_ctx_ops ntb_transport_ops = { + .link_event = ntb_transport_event_callback, + .db_event = ntb_transport_doorbell_callback, +}; + MALLOC_DEFINE(M_NTB_IF, "if_ntb", "ntb network driver"); /* Module setup and teardown */ @@ -320,6 +352,7 @@ ntb_setup_interface(void) struct ifnet *ifp; struct ntb_queue_handlers handlers = { ntb_net_rx_handler, ntb_net_tx_handler, ntb_net_event_handler }; + int rc; net_softc.ntb = devclass_get_softc(devclass_find("ntb_hw"), 0); if (net_softc.ntb == NULL) { @@ -327,11 +360,16 @@ ntb_setup_interface(void) return (ENXIO); } - ntb_transport_init(net_softc.ntb); + rc = ntb_transport_init(net_softc.ntb); + if (rc != 0) { + printf("ntb: Cannot init transport: %d\n", rc); + return (rc); + } ifp = net_softc.ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { - printf("ntb: cannot allocate ifnet structure\n"); + ntb_transport_free(&net_softc); + printf("ntb: Cannot allocate ifnet structure\n"); return (ENOMEM); } @@ -498,83 +536,107 @@ static int ntb_transport_init(struct ntb_softc *ntb) { struct ntb_transport_ctx *nt = &net_softc; + struct ntb_transport_mw *mw; + uint64_t qp_bitmap; int rc; - uint8_t i; + unsigned i; nt->mw_count = ntb_mw_count(ntb); - if (max_num_clients == 0) - nt->qp_count = MIN(ntb_get_max_cbs(ntb), ntb_mw_count(ntb)); - else - nt->qp_count = MIN(ntb_get_max_cbs(ntb), max_num_clients); + for (i = 0; i < nt->mw_count; i++) { + mw = &nt->mw_vec[i]; + + rc = ntb_mw_get_range(ntb, i, &mw->phys_addr, &mw->vbase, + &mw->phys_size, &mw->xlat_align, &mw->xlat_align_size); + if (rc != 0) + goto err; + + mw->buff_size = 0; + mw->xlat_size = 0; + mw->virt_addr = 0; + mw->dma_addr = 0; + } + + qp_bitmap = ntb_db_valid_mask(ntb); + nt->qp_count = flsll(qp_bitmap); + KASSERT(nt->qp_count != 0, ("bogus db bitmap")); + nt->qp_count -= 1; + + if (max_num_clients != 0 && max_num_clients < nt->qp_count) + nt->qp_count = max_num_clients; + else if (nt->mw_count < nt->qp_count) + nt->qp_count = nt->mw_count; + KASSERT(nt->qp_count <= QP_SETSIZE, ("invalid qp_count")); - ntb_register_transport(ntb, nt); mtx_init(&nt->tx_lock, "ntb transport tx", NULL, MTX_DEF); mtx_init(&nt->rx_lock, "ntb transport rx", NULL, MTX_DEF); nt->qp_vec = malloc(nt->qp_count * sizeof(*nt->qp_vec), M_NTB_IF, M_WAITOK | M_ZERO); - KASSERT(nt->qp_count <= QP_SETSIZE, ("invalid qp_count")); - for (i = 0; i < nt->qp_count; i++) { set_bit(i, &nt->qp_bitmap); + set_bit(i, &nt->qp_bitmap_free); ntb_transport_init_queue(nt, i); } callout_init(&nt->link_work, 0); - rc = ntb_register_event_callback(ntb, ntb_transport_event_callback); + rc = ntb_set_ctx(ntb, nt, &ntb_transport_ops); if (rc != 0) goto err; - if (ntb_link_is_up(ntb)) { - if (bootverbose) - device_printf(ntb_get_device(ntb), "link up\n"); - callout_reset(&nt->link_work, 0, ntb_transport_link_work, nt); - } - + nt->link_is_up = false; + ntb_link_enable(ntb, NTB_SPEED_AUTO, NTB_WIDTH_AUTO); + ntb_link_event(ntb); return (0); err: free(nt->qp_vec, M_NTB_IF); - ntb_unregister_transport(ntb); + nt->qp_vec = NULL; return (rc); } static void -ntb_transport_free(void *transport) +ntb_transport_free(struct ntb_transport_ctx *nt) { - struct ntb_transport_ctx *nt = transport; struct ntb_softc *ntb = nt->ntb; + struct _qpset qp_bitmap_alloc; uint8_t i; ntb_transport_link_cleanup(nt); callout_drain(&nt->link_work); - /* verify that all the qps are freed */ + BIT_COPY(QP_SETSIZE, &nt->qp_bitmap, &qp_bitmap_alloc); + BIT_NAND(QP_SETSIZE, &qp_bitmap_alloc, &nt->qp_bitmap_free); + + /* Verify that all the QPs are freed */ for (i = 0; i < nt->qp_count; i++) - if (!test_bit(i, &nt->qp_bitmap)) + if (test_bit(i, &qp_bitmap_alloc)) ntb_transport_free_queue(&nt->qp_vec[i]); - ntb_unregister_event_callback(ntb); + ntb_link_disable(ntb); + ntb_clear_ctx(ntb); - for (i = 0; i < NTB_MAX_NUM_MW; i++) + for (i = 0; i < nt->mw_count; i++) ntb_free_mw(nt, i); free(nt->qp_vec, M_NTB_IF); - ntb_unregister_transport(ntb); } static void ntb_transport_init_queue(struct ntb_transport_ctx *nt, unsigned int qp_num) { + struct ntb_transport_mw *mw; struct ntb_transport_qp *qp; - unsigned int num_qps_mw, tx_size; - uint8_t mw_num, mw_count; + vm_paddr_t mw_base; + uint64_t mw_size, qp_offset; + size_t tx_size; + unsigned num_qps_mw, mw_num, mw_count; - mw_count = ntb_mw_count(nt->ntb); + mw_count = nt->mw_count; mw_num = QP_TO_MW(nt, qp_num); + mw = &nt->mw_vec[mw_num]; qp = &nt->qp_vec[qp_num]; qp->qp_num = qp_num; @@ -589,13 +651,22 @@ ntb_transport_init_queue(struct ntb_tran else num_qps_mw = nt->qp_count / mw_count; - tx_size = ntb_get_mw_size(qp->ntb, mw_num) / num_qps_mw; - qp->rx_info = (struct ntb_rx_info *) - ((char *)ntb_get_mw_vbase(qp->ntb, mw_num) + - (qp_num / mw_count * tx_size)); + mw_base = mw->phys_addr; + mw_size = mw->phys_size; + + tx_size = mw_size / num_qps_mw; + qp_offset = tx_size * qp_num / mw_count; + + qp->tx_mw = (char *)mw->vbase + qp_offset; + KASSERT(qp->tx_mw != NULL, ("uh oh?")); + + /* XXX Assumes that a vm_paddr_t is equivalent to bus_addr_t */ + qp->tx_mw_phys = mw_base + qp_offset; + KASSERT(qp->tx_mw_phys != 0, ("uh oh?")); + tx_size -= sizeof(struct ntb_rx_info); + qp->rx_info = (void *)((char *)qp->tx_mw + tx_size); - qp->tx_mw = qp->rx_info + 1; /* Due to house-keeping, there must be at least 2 buffs */ qp->tx_max_frame = min(transport_mtu + sizeof(struct ntb_payload_header), tx_size / 2); @@ -608,7 +679,8 @@ ntb_transport_init_queue(struct ntb_tran mtx_init(&qp->ntb_rx_pend_q_lock, "ntb rx pend q", NULL, MTX_SPIN); mtx_init(&qp->ntb_rx_free_q_lock, "ntb rx free q", NULL, MTX_SPIN); mtx_init(&qp->ntb_tx_free_q_lock, "ntb tx free q", NULL, MTX_SPIN); - TASK_INIT(&qp->rx_completion_task, 0, ntb_rx_completion_task, qp); + TASK_INIT(&qp->rx_completion_task, 0, ntb_complete_rxc, qp); + TASK_INIT(&qp->rxc_db_work, 0, ntb_transport_rxc_db, qp); STAILQ_INIT(&qp->rx_pend_q); STAILQ_INIT(&qp->rx_free_q); @@ -625,7 +697,14 @@ ntb_transport_free_queue(struct ntb_tran callout_drain(&qp->link_work); - ntb_unregister_db_callback(qp->ntb, qp->qp_num); + ntb_db_set_mask(qp->ntb, 1ull << qp->qp_num); + taskqueue_drain(taskqueue_swi, &qp->rxc_db_work); + taskqueue_drain(taskqueue_swi, &qp->rx_completion_task); + + qp->cb_data = NULL; + qp->rx_handler = NULL; + qp->tx_handler = NULL; + qp->event_handler = NULL; while ((entry = ntb_list_rm(&qp->ntb_rx_free_q_lock, &qp->rx_free_q))) free(entry, M_NTB_IF); @@ -636,7 +715,7 @@ ntb_transport_free_queue(struct ntb_tran while ((entry = ntb_list_rm(&qp->ntb_tx_free_q_lock, &qp->tx_free_q))) free(entry, M_NTB_IF); - set_bit(qp->qp_num, &qp->transport->qp_bitmap); + set_bit(qp->qp_num, &qp->transport->qp_bitmap_free); } /** @@ -654,37 +733,34 @@ ntb_transport_free_queue(struct ntb_tran * RETURNS: pointer to newly created ntb_queue, NULL on error. */ static struct ntb_transport_qp * -ntb_transport_create_queue(void *data, struct ntb_softc *pdev, +ntb_transport_create_queue(void *data, struct ntb_softc *ntb, const struct ntb_queue_handlers *handlers) { struct ntb_queue_entry *entry; struct ntb_transport_qp *qp; struct ntb_transport_ctx *nt; unsigned int free_queue; - int rc, i; + int i; - nt = ntb_find_transport(pdev); - if (nt == NULL) - goto err; + nt = ntb_get_ctx(ntb, NULL); + KASSERT(nt != NULL, ("bogus")); free_queue = ffs_bit(&nt->qp_bitmap); if (free_queue == 0) - goto err; + return (NULL); /* decrement free_queue to make it zero based */ free_queue--; - clear_bit(free_queue, &nt->qp_bitmap); - qp = &nt->qp_vec[free_queue]; + clear_bit(1ull << qp->qp_num, &nt->qp_bitmap_free); qp->cb_data = data; qp->rx_handler = handlers->rx_handler; qp->tx_handler = handlers->tx_handler; qp->event_handler = handlers->event_handler; for (i = 0; i < NTB_QP_DEF_NUM_ENTRIES; i++) { - entry = malloc(sizeof(struct ntb_queue_entry), M_NTB_IF, - M_WAITOK|M_ZERO); + entry = malloc(sizeof(*entry), M_NTB_IF, M_WAITOK | M_ZERO); entry->cb_data = nt->ifp; entry->buf = NULL; entry->len = transport_mtu; @@ -692,26 +768,13 @@ ntb_transport_create_queue(void *data, s } for (i = 0; i < NTB_QP_DEF_NUM_ENTRIES; i++) { - entry = malloc(sizeof(struct ntb_queue_entry), M_NTB_IF, - M_WAITOK|M_ZERO); + entry = malloc(sizeof(*entry), M_NTB_IF, M_WAITOK | M_ZERO); ntb_list_add(&qp->ntb_tx_free_q_lock, entry, &qp->tx_free_q); } - rc = ntb_register_db_callback(qp->ntb, free_queue, qp, - ntb_transport_rxc_db); - if (rc != 0) - goto err1; - + ntb_db_clear(ntb, 1ull << qp->qp_num); + ntb_db_clear_mask(ntb, 1ull << qp->qp_num); return (qp); - -err1: - while ((entry = ntb_list_rm(&qp->ntb_tx_free_q_lock, &qp->tx_free_q))) - free(entry, M_NTB_IF); - while ((entry = ntb_list_rm(&qp->ntb_rx_free_q_lock, &qp->rx_free_q))) - free(entry, M_NTB_IF); - set_bit(free_queue, &nt->qp_bitmap); -err: - return (NULL); } /** @@ -813,7 +876,7 @@ ntb_process_tx(struct ntb_transport_qp * return (0); } CTR2(KTR_NTB, "TX: copying entry %p to offset %p", entry, offset); - ntb_tx_copy_task(qp, entry, offset); + ntb_memcpy_tx(qp, entry, offset); qp->tx_index++; qp->tx_index %= qp->tx_max_entry; @@ -824,20 +887,31 @@ ntb_process_tx(struct ntb_transport_qp * } static void -ntb_tx_copy_task(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry, +ntb_memcpy_tx(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry, void *offset) { struct ntb_payload_header *hdr; - CTR2(KTR_NTB, "TX: copying %d bytes to offset %p", entry->len, offset); - if (entry->buf != NULL) - m_copydata((struct mbuf *)entry->buf, 0, entry->len, offset); - + /* This piece is from Linux' ntb_async_tx() */ hdr = (struct ntb_payload_header *)((char *)offset + qp->tx_max_frame - sizeof(struct ntb_payload_header)); + entry->x_hdr = hdr; hdr->len = entry->len; /* TODO: replace with bus_space_write */ hdr->ver = qp->tx_pkts; /* TODO: replace with bus_space_write */ - wmb(); + + /* This piece is ntb_memcpy_tx() */ + CTR2(KTR_NTB, "TX: copying %d bytes to offset %p", entry->len, offset); + if (entry->buf != NULL) { + m_copydata((struct mbuf *)entry->buf, 0, entry->len, offset); + + /* + * Ensure that the data is fully copied before setting the + * flags + */ + wmb(); + } + + /* The rest is ntb_tx_copy_callback() */ /* TODO: replace with bus_space_write */ hdr->flags = entry->flags | IF_NTB_DESC_DONE_FLAG; @@ -879,8 +953,8 @@ ntb_rx_pendq_full(void *arg) ntb_transport_rxc_db(arg, 0); } -static int -ntb_transport_rxc_db(void *arg, int dummy __unused) +static void +ntb_transport_rxc_db(void *arg, int pending __unused) { struct ntb_transport_qp *qp = arg; uint64_t i; @@ -890,9 +964,9 @@ ntb_transport_rxc_db(void *arg, int dumm * Limit the number of packets processed in a single interrupt to * provide fairness to others */ - mtx_lock(&qp->transport->rx_lock); CTR0(KTR_NTB, "RX: transport_rx"); - for (i = 0; i < MIN(qp->rx_max_entry, INT_MAX); i++) { + mtx_lock(&qp->transport->rx_lock); + for (i = 0; i < qp->rx_max_entry; i++) { rc = ntb_process_rxc(qp); if (rc != 0) { CTR0(KTR_NTB, "RX: process_rxc failed"); @@ -901,7 +975,20 @@ ntb_transport_rxc_db(void *arg, int dumm } mtx_unlock(&qp->transport->rx_lock); - return ((int)i); + if (i == qp->rx_max_entry) + taskqueue_enqueue(taskqueue_swi, &qp->rxc_db_work); + else if ((ntb_db_read(qp->ntb) & (1ull << qp->qp_num)) != 0) { + /* If db is set, clear it and read it back to commit clear. */ + ntb_db_clear(qp->ntb, 1ull << qp->qp_num); + (void)ntb_db_read(qp->ntb); + + /* + * An interrupt may have arrived between finishing + * ntb_process_rxc and clearing the doorbell bit: there might + * be some more work to do. + */ + taskqueue_enqueue(taskqueue_swi, &qp->rxc_db_work); + } } static int @@ -918,66 +1005,61 @@ ntb_process_rxc(struct ntb_transport_qp sizeof(struct ntb_payload_header)); CTR1(KTR_NTB, "RX: process_rxc rx_index = %u", qp->rx_index); - entry = ntb_list_rm(&qp->ntb_rx_pend_q_lock, &qp->rx_pend_q); - if (entry == NULL) { - qp->rx_err_no_buf++; - CTR0(KTR_NTB, "RX: No entries in rx_pend_q"); - return (ENOMEM); - } - callout_stop(&qp->rx_full); - CTR1(KTR_NTB, "RX: rx entry %p from rx_pend_q", entry); - if ((hdr->flags & IF_NTB_DESC_DONE_FLAG) == 0) { - CTR1(KTR_NTB, - "RX: hdr not done. Returning entry %p to rx_pend_q", entry); - ntb_list_add(&qp->ntb_rx_pend_q_lock, entry, &qp->rx_pend_q); + CTR0(KTR_NTB, "RX: hdr not done"); qp->rx_ring_empty++; return (EAGAIN); } - if (hdr->ver != (uint32_t) qp->rx_pkts) { - CTR3(KTR_NTB,"RX: ver != rx_pkts (%x != %lx). " - "Returning entry %p to rx_pend_q", hdr->ver, qp->rx_pkts, - entry); - ntb_list_add(&qp->ntb_rx_pend_q_lock, entry, &qp->rx_pend_q); + if ((hdr->flags & IF_NTB_LINK_DOWN_FLAG) != 0) { + CTR0(KTR_NTB, "RX: link down"); + ntb_qp_link_down(qp); + hdr->flags = 0; + return (EAGAIN); + } + + if (hdr->ver != (uint32_t)qp->rx_pkts) { + CTR2(KTR_NTB,"RX: ver != rx_pkts (%x != %lx). " + "Returning entry %p to rx_pend_q", hdr->ver, qp->rx_pkts); qp->rx_err_ver++; return (EIO); } - if ((hdr->flags & IF_NTB_LINK_DOWN_FLAG) != 0) { - ntb_qp_link_down(qp); - CTR1(KTR_NTB, - "RX: link down. adding entry %p back to rx_pend_q", entry); - ntb_list_add(&qp->ntb_rx_pend_q_lock, entry, &qp->rx_pend_q); - goto out; + entry = ntb_list_rm(&qp->ntb_rx_pend_q_lock, &qp->rx_pend_q); + if (entry == NULL) { + qp->rx_err_no_buf++; + CTR0(KTR_NTB, "RX: No entries in rx_pend_q"); + return (EAGAIN); } + callout_stop(&qp->rx_full); + CTR1(KTR_NTB, "RX: rx entry %p from rx_pend_q", entry); - if (hdr->len <= entry->len) { - entry->len = hdr->len; - ntb_rx_copy_task(qp, entry, offset); - } else { - CTR1(KTR_NTB, - "RX: len too long. Returning entry %p to rx_pend_q", entry); - ntb_list_add(&qp->ntb_rx_pend_q_lock, entry, &qp->rx_pend_q); + entry->x_hdr = hdr; + entry->index = qp->rx_index; + if (hdr->len > entry->len) { + CTR2(KTR_NTB, "RX: len too long. Wanted %ju got %ju", + (uintmax_t)hdr->len, (uintmax_t)entry->len); qp->rx_err_oflow++; - } - qp->rx_bytes += hdr->len; - qp->rx_pkts++; - CTR1(KTR_NTB, "RX: received %ld rx_pkts", qp->rx_pkts); + entry->len = -EIO; + entry->flags |= IF_NTB_DESC_DONE_FLAG; + ntb_list_add(&qp->ntb_rx_free_q_lock, entry, &qp->rx_free_q); + taskqueue_enqueue(taskqueue_swi, &qp->rx_completion_task); + } else { + qp->rx_bytes += hdr->len; + qp->rx_pkts++; -out: - /* Ensure that the data is globally visible before clearing the flag */ - wmb(); - hdr->flags = 0; - /* TODO: replace with bus_space_write */ - qp->rx_info->entry = qp->rx_index; + CTR1(KTR_NTB, "RX: received %ld rx_pkts", qp->rx_pkts); + + entry->len = hdr->len; + + ntb_rx_copy_task(qp, entry, offset); + } qp->rx_index++; qp->rx_index %= qp->rx_max_entry; - return (0); } @@ -995,6 +1077,12 @@ ntb_rx_copy_task(struct ntb_transport_qp entry->buf = (void *)m; + /* Ensure that the data is globally visible before clearing the flag */ + wmb(); + entry->x_hdr->flags = 0; + /* TODO: replace with bus_space_write */ + qp->rx_info->entry = qp->rx_index; + CTR2(KTR_NTB, "RX: copied entry %p to mbuf %p. Adding entry to rx_free_q", entry, m); @@ -1004,7 +1092,7 @@ ntb_rx_copy_task(struct ntb_transport_qp } static void -ntb_rx_completion_task(void *arg, int pending) +ntb_complete_rxc(void *arg, int pending) { struct ntb_transport_qp *qp = arg; struct mbuf *m; @@ -1033,25 +1121,52 @@ ntb_rx_completion_task(void *arg, int pe } } +static void +ntb_transport_doorbell_callback(void *data, int vector) +{ + struct ntb_transport_ctx *nt = data; + struct ntb_transport_qp *qp; + struct _qpset db_bits; + uint64_t vec_mask; + unsigned qp_num; + + BIT_COPY(QP_SETSIZE, &nt->qp_bitmap, &db_bits); + BIT_NAND(QP_SETSIZE, &db_bits, &nt->qp_bitmap_free); + + vec_mask = ntb_db_vector_mask(nt->ntb, vector); + while (vec_mask != 0) { + qp_num = ffsl(vec_mask); + /* i386 doesn't have ffsll(), fake it */ + if (qp_num == 0) { + qp_num = ffsl(vec_mask >> 32); + KASSERT(qp_num != 0, ("ffs")); + qp_num += 32; + } + qp_num--; + + if (test_bit(qp_num, &db_bits)) { + qp = &nt->qp_vec[qp_num]; + taskqueue_enqueue(taskqueue_swi, &qp->rxc_db_work); + } + + vec_mask &= ~(1ull << qp_num); + } +} + /* Link Event handler */ static void -ntb_transport_event_callback(void *data, enum ntb_hw_event event) +ntb_transport_event_callback(void *data) { struct ntb_transport_ctx *nt = data; - switch (event) { - case NTB_EVENT_HW_LINK_UP: + if (ntb_link_is_up(nt->ntb, NULL, NULL)) { if (bootverbose) device_printf(ntb_get_device(nt->ntb), "HW link up\n"); callout_reset(&nt->link_work, 0, ntb_transport_link_work, nt); - break; - case NTB_EVENT_HW_LINK_DOWN: + } else { if (bootverbose) device_printf(ntb_get_device(nt->ntb), "HW link down\n"); ntb_transport_link_cleanup(nt); - break; - default: - panic("ntb: Unknown NTB event"); } } @@ -1062,72 +1177,48 @@ ntb_transport_link_work(void *arg) struct ntb_transport_ctx *nt = arg; struct ntb_softc *ntb = nt->ntb; struct ntb_transport_qp *qp; - uint64_t val64; - uint32_t val, i, num_mw; + uint64_t val64, size; + uint32_t val; + unsigned i; int rc; - num_mw = ntb_mw_count(ntb); - /* send the local info, in the opposite order of the way we read it */ - for (i = 0; i < num_mw; i++) { - rc = ntb_peer_spad_write(ntb, IF_NTB_MW0_SZ_HIGH + (i * 2), - (uint64_t)ntb_get_mw_size(ntb, i) >> 32); - if (rc != 0) - goto out; + for (i = 0; i < nt->mw_count; i++) { + size = nt->mw_vec[i].phys_size; - rc = ntb_peer_spad_write(ntb, IF_NTB_MW0_SZ_LOW + (i * 2), - (uint32_t)ntb_get_mw_size(ntb, i)); - if (rc != 0) - goto out; + if (max_mw_size != 0 && size > max_mw_size) + size = max_mw_size; + + ntb_peer_spad_write(ntb, IF_NTB_MW0_SZ_HIGH + (i * 2), + size >> 32); + ntb_peer_spad_write(ntb, IF_NTB_MW0_SZ_LOW + (i * 2), size); } - rc = ntb_peer_spad_write(ntb, IF_NTB_NUM_MWS, num_mw); - if (rc != 0) - goto out; + ntb_peer_spad_write(ntb, IF_NTB_NUM_MWS, nt->mw_count); - rc = ntb_peer_spad_write(ntb, IF_NTB_NUM_QPS, nt->qp_count); - if (rc != 0) - goto out; + ntb_peer_spad_write(ntb, IF_NTB_NUM_QPS, nt->qp_count); - rc = ntb_peer_spad_write(ntb, IF_NTB_VERSION, NTB_TRANSPORT_VERSION); - if (rc != 0) - goto out; + ntb_peer_spad_write(ntb, IF_NTB_VERSION, NTB_TRANSPORT_VERSION); /* Query the remote side for its info */ - rc = ntb_spad_read(ntb, IF_NTB_VERSION, &val); - if (rc != 0) - goto out; - + val = 0; + ntb_spad_read(ntb, IF_NTB_VERSION, &val); if (val != NTB_TRANSPORT_VERSION) goto out; - rc = ntb_spad_read(ntb, IF_NTB_NUM_QPS, &val); - if (rc != 0) - goto out; - + ntb_spad_read(ntb, IF_NTB_NUM_QPS, &val); if (val != nt->qp_count) goto out; - rc = ntb_spad_read(ntb, IF_NTB_NUM_MWS, &val); - if (rc != 0) - goto out; - - if (val != num_mw) + ntb_spad_read(ntb, IF_NTB_NUM_MWS, &val); + if (val != nt->mw_count) goto out; - for (i = 0; i < num_mw; i++) { - rc = ntb_spad_read(ntb, IF_NTB_MW0_SZ_HIGH + (i * 2), - &val); - if (rc != 0) - goto free_mws; - + for (i = 0; i < nt->mw_count; i++) { + ntb_spad_read(ntb, IF_NTB_MW0_SZ_HIGH + (i * 2), &val); val64 = (uint64_t)val << 32; - rc = ntb_spad_read(ntb, IF_NTB_MW0_SZ_LOW + (i * 2), - &val); - if (rc != 0) - goto free_mws; - + ntb_spad_read(ntb, IF_NTB_MW0_SZ_LOW + (i * 2), &val); val64 |= val; rc = ntb_set_mw(nt, i, val64); @@ -1151,33 +1242,40 @@ ntb_transport_link_work(void *arg) return; free_mws: - for (i = 0; i < NTB_MAX_NUM_MW; i++) + for (i = 0; i < nt->mw_count; i++) ntb_free_mw(nt, i); out: - if (ntb_link_is_up(ntb)) + if (ntb_link_is_up(ntb, NULL, NULL)) callout_reset(&nt->link_work, NTB_LINK_DOWN_TIMEOUT * hz / 1000, ntb_transport_link_work, nt); } static int -ntb_set_mw(struct ntb_transport_ctx *nt, int num_mw, unsigned int size) +ntb_set_mw(struct ntb_transport_ctx *nt, int num_mw, unsigned size) { struct ntb_transport_mw *mw = &nt->mw_vec[num_mw]; + unsigned xlat_size, buff_size; + int rc; + + xlat_size = roundup(size, mw->xlat_align_size); + buff_size = roundup(size, mw->xlat_align); /* No need to re-setup */ - if (mw->xlat_size == size) + if (mw->xlat_size == xlat_size) return (0); - if (mw->xlat_size != 0) + if (mw->buff_size != 0) ntb_free_mw(nt, num_mw); - /* Alloc memory for receiving data. Must be 4k aligned */ - mw->xlat_size = size; + /* Alloc memory for receiving data. Must be aligned */ + mw->xlat_size = xlat_size; + mw->buff_size = buff_size; - mw->virt_addr = contigmalloc(mw->xlat_size, M_NTB_IF, M_ZERO, 0, - BUS_SPACE_MAXADDR, mw->xlat_size, 0); + mw->virt_addr = contigmalloc(mw->buff_size, M_NTB_IF, M_ZERO, 0, + BUS_SPACE_MAXADDR, mw->xlat_align, 0); if (mw->virt_addr == NULL) { mw->xlat_size = 0; + mw->buff_size = 0; printf("ntb: Unable to allocate MW buffer of size %zu\n", mw->xlat_size); return (ENOMEM); @@ -1190,7 +1288,7 @@ ntb_set_mw(struct ntb_transport_ctx *nt, * requested. XXX: This may not be needed -- brought in for parity * with the Linux driver. */ - if (mw->dma_addr % size != 0) { + if (mw->dma_addr % mw->xlat_align != 0) { device_printf(ntb_get_device(nt->ntb), "DMA memory 0x%jx not aligned to BAR size 0x%x\n", (uintmax_t)mw->dma_addr, size); @@ -1199,7 +1297,13 @@ ntb_set_mw(struct ntb_transport_ctx *nt, } /* Notify HW the memory location of the receive buffer */ - ntb_set_mw_addr(nt->ntb, num_mw, mw->dma_addr); + rc = ntb_mw_set_trans(nt->ntb, num_mw, mw->dma_addr, mw->xlat_size); + if (rc) { + device_printf(ntb_get_device(nt->ntb), + "Unable to set mw%d translation", num_mw); + ntb_free_mw(nt, num_mw); + return (rc); + } return (0); } @@ -1212,33 +1316,41 @@ ntb_free_mw(struct ntb_transport_ctx *nt if (mw->virt_addr == NULL) return; + ntb_mw_clear_trans(nt->ntb, num_mw); contigfree(mw->virt_addr, mw->xlat_size, M_NTB_IF); + mw->xlat_size = 0; + mw->buff_size = 0; mw->virt_addr = NULL; } -static void +static int ntb_transport_setup_qp_mw(struct ntb_transport_ctx *nt, unsigned int qp_num) { struct ntb_transport_qp *qp = &nt->qp_vec[qp_num]; + struct ntb_transport_mw *mw; void *offset; - unsigned int rx_size, num_qps_mw; - uint8_t mw_num, mw_count; - unsigned int i; + uint64_t i; + size_t rx_size; + unsigned num_qps_mw, mw_num, mw_count; - mw_count = ntb_mw_count(nt->ntb); + mw_count = nt->mw_count; mw_num = QP_TO_MW(nt, qp_num); + mw = &nt->mw_vec[mw_num]; + + if (mw->virt_addr == NULL) + return (ENOMEM); if (nt->qp_count % mw_count && mw_num + 1 < nt->qp_count / mw_count) num_qps_mw = nt->qp_count / mw_count + 1; else num_qps_mw = nt->qp_count / mw_count; - rx_size = nt->mw_vec[mw_num].xlat_size / num_qps_mw; - qp->remote_rx_info = (void *)((uint8_t *)nt->mw_vec[mw_num].virt_addr + - (qp_num / mw_count * rx_size)); + rx_size = mw->xlat_size / num_qps_mw; + qp->rx_buff = (char *)mw->virt_addr + rx_size * qp_num / mw_count; rx_size -= sizeof(struct ntb_rx_info); - qp->rx_buff = qp->remote_rx_info + 1; + qp->remote_rx_info = (void*)((char *)qp->rx_buff + rx_size); + /* Due to house-keeping, there must be at least 2 buffs */ qp->rx_max_frame = min(transport_mtu + sizeof(struct ntb_payload_header), rx_size / 2); @@ -1247,7 +1359,7 @@ ntb_transport_setup_qp_mw(struct ntb_tra qp->remote_rx_info->entry = qp->rx_max_entry - 1; - /* setup the hdr offsets with 0's */ + /* Set up the hdr offsets with 0s */ for (i = 0; i < qp->rx_max_entry; i++) { offset = (void *)((uint8_t *)qp->rx_buff + qp->rx_max_frame * (i + 1) - @@ -1258,6 +1370,8 @@ ntb_transport_setup_qp_mw(struct ntb_tra qp->rx_pkts = 0; qp->tx_pkts = 0; qp->tx_index = 0; + + return (0); } static void @@ -1266,46 +1380,51 @@ ntb_qp_link_work(void *arg) struct ntb_transport_qp *qp = arg; struct ntb_softc *ntb = qp->ntb; struct ntb_transport_ctx *nt = qp->transport; - int rc, val; - + int val; - rc = ntb_peer_spad_read(ntb, IF_NTB_QP_LINKS, &val); - if (rc != 0) - return; + ntb_spad_read(ntb, IF_NTB_QP_LINKS, &val); - rc = ntb_peer_spad_write(ntb, IF_NTB_QP_LINKS, val | 1 << qp->qp_num); + ntb_peer_spad_write(ntb, IF_NTB_QP_LINKS, val | (1ull << qp->qp_num)); /* query remote spad for qp ready bits */ - rc = ntb_spad_read(ntb, IF_NTB_QP_LINKS, &val); + ntb_peer_spad_read(ntb, IF_NTB_QP_LINKS, &val); /* See if the remote side is up */ - if ((1 << qp->qp_num & val) != 0) { + if ((val & (1ull << qp->qp_num)) != 0) { + if (bootverbose) + device_printf(ntb_get_device(ntb), "qp link up\n"); qp->link_is_up = true; + if (qp->event_handler != NULL) qp->event_handler(qp->cb_data, NTB_LINK_UP); - if (bootverbose) - device_printf(ntb_get_device(ntb), "qp link up\n"); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Oct 18 20:32: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 C2A9EA18C04; Sun, 18 Oct 2015 20:32:38 +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 8D5C5A30; Sun, 18 Oct 2015 20:32:38 +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 t9IKWbqC098602; Sun, 18 Oct 2015 20:32:37 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IKWbhE098600; Sun, 18 Oct 2015 20:32:37 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510182032.t9IKWbhE098600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 18 Oct 2015 20:32:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289547 - in head/sys/arm: annapurna/alpine qemu X-SVN-Group: head MIME-Version: 1.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, 18 Oct 2015 20:32:38 -0000 Author: ian Date: Sun Oct 18 20:32:37 2015 New Revision: 289547 URL: https://svnweb.freebsd.org/changeset/base/289547 Log: Include "opt_platform.h" early so that the FDT option is visible as needed. Modified: head/sys/arm/annapurna/alpine/common.c head/sys/arm/qemu/virt_common.c Modified: head/sys/arm/annapurna/alpine/common.c ============================================================================== --- head/sys/arm/annapurna/alpine/common.c Sun Oct 18 20:20:57 2015 (r289546) +++ head/sys/arm/annapurna/alpine/common.c Sun Oct 18 20:32:37 2015 (r289547) @@ -29,6 +29,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_platform.h" + #include #include #include Modified: head/sys/arm/qemu/virt_common.c ============================================================================== --- head/sys/arm/qemu/virt_common.c Sun Oct 18 20:20:57 2015 (r289546) +++ head/sys/arm/qemu/virt_common.c Sun Oct 18 20:32:37 2015 (r289547) @@ -28,6 +28,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_platform.h" + #include #include From owner-svn-src-all@freebsd.org Sun Oct 18 20:37: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 B9E61A18CD0; Sun, 18 Oct 2015 20:37:11 +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 63848BB9; Sun, 18 Oct 2015 20:37:11 +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 t9IKbAUA098805; Sun, 18 Oct 2015 20:37:10 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IKbATM098803; Sun, 18 Oct 2015 20:37:10 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510182037.t9IKbATM098803@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 18 Oct 2015 20:37:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289548 - 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: Sun, 18 Oct 2015 20:37:11 -0000 Author: ian Date: Sun Oct 18 20:37:10 2015 New Revision: 289548 URL: https://svnweb.freebsd.org/changeset/base/289548 Log: Only decode fdt data which belongs to the GIC controller. The interrupts-extended property is a list of controller-specific interrupt tuples for more than one controller. The decode routine of every PIC gets called in the pre-INTRNG code (nexus doesn't know which device instance belongs to which fdt node), so the GIC code has to check each FDT node it is asked to decode to ensure it is the owner. Because in the pre-INTRNG world there can only be one instance of a GIC, it's safe to cache the results of a positive lookup in a static variable to avoid the expensive lookups on subsequent calls. Submitted by: Svatopluk Kraus Differential Revision: https://reviews.freebsd.org/D2345 Modified: head/sys/arm/arm/gic.c head/sys/arm/include/intr.h Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Sun Oct 18 20:32:37 2015 (r289547) +++ head/sys/arm/arm/gic.c Sun Oct 18 20:37:10 2015 (r289548) @@ -36,6 +36,8 @@ __FBSDID("$FreeBSD$"); #include "opt_platform.h" +#include "opt_platform.h" + #include #include #include @@ -288,10 +290,23 @@ arm_gic_init_secondary(device_t dev) #ifndef ARM_INTRNG int -gic_decode_fdt(uint32_t iparent, uint32_t *intr, int *interrupt, +gic_decode_fdt(phandle_t iparent, pcell_t *intr, int *interrupt, int *trig, int *pol) { static u_int num_intr_cells; + static phandle_t self; + struct ofw_compat_data *ocd; + + if (self == 0) { + for (ocd = compat_data; ocd->ocd_str != NULL; ocd++) { + if (fdt_is_compatible(iparent, ocd->ocd_str)) { + self = iparent; + break; + } + } + } + if (self != iparent) + return (ENXIO); if (num_intr_cells == 0) { if (OF_searchencprop(OF_node_from_xref(iparent), Modified: head/sys/arm/include/intr.h ============================================================================== --- head/sys/arm/include/intr.h Sun Oct 18 20:32:37 2015 (r289547) +++ head/sys/arm/include/intr.h Sun Oct 18 20:37:10 2015 (r289548) @@ -179,10 +179,9 @@ extern int (*arm_config_irq)(int irq, en enum intr_polarity pol); void arm_pic_init_secondary(void); -int gic_decode_fdt(uint32_t iparentnode, uint32_t *intrcells, int *interrupt, - int *trig, int *pol); #ifdef FDT +int gic_decode_fdt(phandle_t, pcell_t *, int *, int *, int *); int arm_fdt_map_irq(phandle_t, pcell_t *, int); #endif From owner-svn-src-all@freebsd.org Sun Oct 18 20:48: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 ABF84A18EC9; Sun, 18 Oct 2015 20:48:20 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::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 3E34B6D; Sun, 18 Oct 2015 20:48:20 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by wicll6 with SMTP id ll6so70753462wic.0; Sun, 18 Oct 2015 13:48:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=chGGhF7C4NgLdbMyeTsEba/fnkfJooeVyy5X+AhEqOo=; b=GD05DJ67gvvOVOSwOhf/MBZLeXnN6rnazMpIcNBgWSf1SHUGzJOyhoFGCVVYfJsgY/ J5XmemhFrlnNEZ16DjnpiuKoCNTYny2PdYAhRxqsKkjd+pJwx0fuZIjPJVCMrRYwkdYn 9MMIW82DLWVIswC0MtaKYGI708l6wANvTh34awRjhnU/OXxn1mTOS8g0VNgKncw4tCno ohda+W7wnXg+DMlkqYF9CTwwhAZjmEPO47BCBrUn/450ZSR+FvvIXUaqNg9zNyHMaj3M fY3pSVZnVMO/YixhfKWrh1dhYr+TzZeNy1cYtUGK2A8FQ9H8HY1ZcJla46PM8GA/0DJ1 GYsA== X-Received: by 10.194.235.39 with SMTP id uj7mr32500115wjc.115.1445201298247; Sun, 18 Oct 2015 13:48:18 -0700 (PDT) Received: from brick.home (adjc3.neoplus.adsl.tpnet.pl. [79.184.210.3]) by smtp.gmail.com with ESMTPSA id r9sm35943718wjz.35.2015.10.18.13.48.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Oct 2015 13:48:17 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Sun, 18 Oct 2015 22:48:14 +0200 From: Edward Tomasz Napierala To: John-Mark Gurney Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r289516 - in stable/10: sbin/mdconfig sys/dev/md sys/sys Message-ID: <20151018204814.GA7903@brick.home> Mail-Followup-To: John-Mark Gurney , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org References: <201510181452.t9IEqVh9099329@repo.freebsd.org> <20151018183751.GB65715@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151018183751.GB65715@funkthat.com> 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: Sun, 18 Oct 2015 20:48:20 -0000 On 1018T1137, John-Mark Gurney wrote: > Edward Tomasz Napierala wrote this message on Sun, Oct 18, 2015 at 14:52 +0000: > > Author: trasz > > Date: Sun Oct 18 14:52:31 2015 > > New Revision: 289516 > > URL: https://svnweb.freebsd.org/changeset/base/289516 > > > > Log: > > MFC r258909: > > The following description doesn't match what r258909 says: > https://svnweb.freebsd.org/base?view=revision&revision=r258909 > > wrong commit or wrong message? Sorry for that, it's a copy/paste error. The right one should read: Add "null" backend to mdconfig(8). This does exactly what the name suggests, and is somewhat useful for benchmarking. From owner-svn-src-all@freebsd.org Sun Oct 18 21:38: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 AE535A18DC9; Sun, 18 Oct 2015 21:38:26 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64D98E99; Sun, 18 Oct 2015 21:38:26 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9ILcPdE017293; Sun, 18 Oct 2015 21:38:25 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ILcPrs017288; Sun, 18 Oct 2015 21:38:25 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201510182138.t9ILcPrs017288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sun, 18 Oct 2015 21:38:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289549 - in head: contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/s... X-SVN-Group: head MIME-Version: 1.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, 18 Oct 2015 21:38:26 -0000 Author: rpaulo Date: Sun Oct 18 21:38:25 2015 New Revision: 289549 URL: https://svnweb.freebsd.org/changeset/base/289549 Log: Update hostapd/wpa_supplicant to version 2.5. Tested by several people on current@/wireless@. Relnotes: yes Added: head/contrib/wpa/patches/openssl-0.9.8zf-tls-extensions.patch - copied unchanged from r289285, vendor/wpa/dist/patches/openssl-0.9.8zf-tls-extensions.patch head/contrib/wpa/src/crypto/sha384-prf.c - copied unchanged from r289285, vendor/wpa/dist/src/crypto/sha384-prf.c head/contrib/wpa/src/fst/ - copied from r289285, vendor/wpa/dist/src/fst/ head/contrib/wpa/wpa_supplicant/eapol_test.py - copied unchanged from r289285, vendor/wpa/dist/wpa_supplicant/eapol_test.py head/contrib/wpa/wpa_supplicant/p2p_supplicant_sd.c - copied unchanged from r289285, vendor/wpa/dist/wpa_supplicant/p2p_supplicant_sd.c Deleted: head/contrib/wpa/src/crypto/crypto_cryptoapi.c head/contrib/wpa/src/crypto/tls_schannel.c Modified: head/contrib/wpa/hostapd/ChangeLog head/contrib/wpa/hostapd/config_file.c head/contrib/wpa/hostapd/config_file.h head/contrib/wpa/hostapd/ctrl_iface.c head/contrib/wpa/hostapd/defconfig head/contrib/wpa/hostapd/hlr_auc_gw.c head/contrib/wpa/hostapd/hlr_auc_gw.milenage_db head/contrib/wpa/hostapd/hostapd.conf head/contrib/wpa/hostapd/hostapd_cli.c head/contrib/wpa/hostapd/main.c head/contrib/wpa/hs20/client/Makefile head/contrib/wpa/hs20/client/osu_client.c head/contrib/wpa/hs20/client/spp_client.c head/contrib/wpa/src/ap/accounting.c head/contrib/wpa/src/ap/acs.c head/contrib/wpa/src/ap/ap_config.c head/contrib/wpa/src/ap/ap_config.h head/contrib/wpa/src/ap/ap_drv_ops.c head/contrib/wpa/src/ap/ap_drv_ops.h head/contrib/wpa/src/ap/ap_list.c head/contrib/wpa/src/ap/ap_list.h head/contrib/wpa/src/ap/authsrv.c head/contrib/wpa/src/ap/beacon.c head/contrib/wpa/src/ap/beacon.h head/contrib/wpa/src/ap/ctrl_iface_ap.c head/contrib/wpa/src/ap/dfs.c head/contrib/wpa/src/ap/drv_callbacks.c head/contrib/wpa/src/ap/eap_user_db.c head/contrib/wpa/src/ap/hostapd.c head/contrib/wpa/src/ap/hostapd.h head/contrib/wpa/src/ap/hw_features.c head/contrib/wpa/src/ap/hw_features.h head/contrib/wpa/src/ap/ieee802_11.c head/contrib/wpa/src/ap/ieee802_11.h head/contrib/wpa/src/ap/ieee802_11_auth.c head/contrib/wpa/src/ap/ieee802_11_auth.h head/contrib/wpa/src/ap/ieee802_11_ht.c head/contrib/wpa/src/ap/ieee802_11_vht.c head/contrib/wpa/src/ap/ieee802_1x.c head/contrib/wpa/src/ap/ieee802_1x.h head/contrib/wpa/src/ap/ndisc_snoop.c head/contrib/wpa/src/ap/sta_info.c head/contrib/wpa/src/ap/sta_info.h head/contrib/wpa/src/ap/utils.c head/contrib/wpa/src/ap/vlan_init.c head/contrib/wpa/src/ap/vlan_init.h head/contrib/wpa/src/ap/vlan_util.c head/contrib/wpa/src/ap/wmm.c head/contrib/wpa/src/ap/wpa_auth.c head/contrib/wpa/src/ap/wpa_auth.h head/contrib/wpa/src/ap/wpa_auth_ft.c head/contrib/wpa/src/ap/wpa_auth_glue.c head/contrib/wpa/src/ap/wpa_auth_i.h head/contrib/wpa/src/ap/wpa_auth_ie.c head/contrib/wpa/src/ap/wps_hostapd.c head/contrib/wpa/src/ap/x_snoop.c head/contrib/wpa/src/common/common_module_tests.c head/contrib/wpa/src/common/defs.h head/contrib/wpa/src/common/hw_features_common.c head/contrib/wpa/src/common/hw_features_common.h head/contrib/wpa/src/common/ieee802_11_common.c head/contrib/wpa/src/common/ieee802_11_common.h head/contrib/wpa/src/common/ieee802_11_defs.h head/contrib/wpa/src/common/privsep_commands.h head/contrib/wpa/src/common/qca-vendor.h head/contrib/wpa/src/common/sae.c head/contrib/wpa/src/common/sae.h head/contrib/wpa/src/common/version.h head/contrib/wpa/src/common/wpa_common.c head/contrib/wpa/src/common/wpa_common.h head/contrib/wpa/src/common/wpa_ctrl.c head/contrib/wpa/src/common/wpa_ctrl.h head/contrib/wpa/src/crypto/crypto.h head/contrib/wpa/src/crypto/crypto_module_tests.c head/contrib/wpa/src/crypto/crypto_openssl.c head/contrib/wpa/src/crypto/dh_groups.c head/contrib/wpa/src/crypto/fips_prf_openssl.c head/contrib/wpa/src/crypto/ms_funcs.c head/contrib/wpa/src/crypto/ms_funcs.h head/contrib/wpa/src/crypto/random.c head/contrib/wpa/src/crypto/sha1-tlsprf.c head/contrib/wpa/src/crypto/sha1-tprf.c head/contrib/wpa/src/crypto/sha256-kdf.c head/contrib/wpa/src/crypto/sha384.h head/contrib/wpa/src/crypto/tls.h head/contrib/wpa/src/crypto/tls_gnutls.c head/contrib/wpa/src/crypto/tls_internal.c head/contrib/wpa/src/crypto/tls_none.c head/contrib/wpa/src/crypto/tls_openssl.c head/contrib/wpa/src/drivers/driver.h head/contrib/wpa/src/drivers/driver_bsd.c head/contrib/wpa/src/drivers/driver_ndis.c head/contrib/wpa/src/drivers/driver_nl80211.h head/contrib/wpa/src/drivers/driver_nl80211_android.c head/contrib/wpa/src/drivers/driver_nl80211_capa.c head/contrib/wpa/src/drivers/driver_nl80211_event.c head/contrib/wpa/src/drivers/driver_nl80211_scan.c head/contrib/wpa/src/drivers/driver_privsep.c head/contrib/wpa/src/drivers/drivers.c head/contrib/wpa/src/eap_common/eap_common.c head/contrib/wpa/src/eap_common/eap_fast_common.c head/contrib/wpa/src/eap_common/eap_pwd_common.c head/contrib/wpa/src/eap_common/eap_pwd_common.h head/contrib/wpa/src/eap_common/eap_sake_common.c head/contrib/wpa/src/eap_common/ikev2_common.c head/contrib/wpa/src/eap_peer/eap.c head/contrib/wpa/src/eap_peer/eap.h head/contrib/wpa/src/eap_peer/eap_aka.c head/contrib/wpa/src/eap_peer/eap_eke.c head/contrib/wpa/src/eap_peer/eap_fast.c head/contrib/wpa/src/eap_peer/eap_gpsk.c head/contrib/wpa/src/eap_peer/eap_i.h head/contrib/wpa/src/eap_peer/eap_mschapv2.c head/contrib/wpa/src/eap_peer/eap_pax.c head/contrib/wpa/src/eap_peer/eap_peap.c head/contrib/wpa/src/eap_peer/eap_pwd.c head/contrib/wpa/src/eap_peer/eap_sake.c head/contrib/wpa/src/eap_peer/eap_sim.c head/contrib/wpa/src/eap_peer/eap_tls.c head/contrib/wpa/src/eap_peer/eap_tls_common.c head/contrib/wpa/src/eap_peer/eap_tls_common.h head/contrib/wpa/src/eap_peer/eap_ttls.c head/contrib/wpa/src/eap_peer/eap_wsc.c head/contrib/wpa/src/eap_server/eap.h head/contrib/wpa/src/eap_server/eap_i.h head/contrib/wpa/src/eap_server/eap_server.c head/contrib/wpa/src/eap_server/eap_server_eke.c head/contrib/wpa/src/eap_server/eap_server_fast.c head/contrib/wpa/src/eap_server/eap_server_mschapv2.c head/contrib/wpa/src/eap_server/eap_server_peap.c head/contrib/wpa/src/eap_server/eap_server_pwd.c head/contrib/wpa/src/eap_server/eap_server_tls.c head/contrib/wpa/src/eap_server/eap_server_tls_common.c head/contrib/wpa/src/eap_server/eap_server_ttls.c head/contrib/wpa/src/eap_server/eap_tls_common.h head/contrib/wpa/src/eapol_auth/eapol_auth_sm.c head/contrib/wpa/src/eapol_auth/eapol_auth_sm.h head/contrib/wpa/src/eapol_supp/eapol_supp_sm.c head/contrib/wpa/src/p2p/p2p.c head/contrib/wpa/src/p2p/p2p.h head/contrib/wpa/src/p2p/p2p_build.c head/contrib/wpa/src/p2p/p2p_dev_disc.c head/contrib/wpa/src/p2p/p2p_go_neg.c head/contrib/wpa/src/p2p/p2p_group.c head/contrib/wpa/src/p2p/p2p_i.h head/contrib/wpa/src/p2p/p2p_invitation.c head/contrib/wpa/src/p2p/p2p_parse.c head/contrib/wpa/src/p2p/p2p_pd.c head/contrib/wpa/src/p2p/p2p_utils.c head/contrib/wpa/src/radius/radius.c head/contrib/wpa/src/radius/radius_das.c head/contrib/wpa/src/radius/radius_server.c head/contrib/wpa/src/radius/radius_server.h head/contrib/wpa/src/rsn_supp/tdls.c head/contrib/wpa/src/rsn_supp/wpa.c head/contrib/wpa/src/rsn_supp/wpa_ft.c head/contrib/wpa/src/rsn_supp/wpa_ie.c head/contrib/wpa/src/rsn_supp/wpa_ie.h head/contrib/wpa/src/tls/libtommath.c head/contrib/wpa/src/tls/tlsv1_client.c head/contrib/wpa/src/tls/tlsv1_client.h head/contrib/wpa/src/tls/tlsv1_server.c head/contrib/wpa/src/tls/tlsv1_server.h head/contrib/wpa/src/tls/x509v3.c head/contrib/wpa/src/utils/browser-wpadebug.c head/contrib/wpa/src/utils/common.c head/contrib/wpa/src/utils/common.h head/contrib/wpa/src/utils/eloop.c head/contrib/wpa/src/utils/http_curl.c head/contrib/wpa/src/utils/includes.h head/contrib/wpa/src/utils/os.h head/contrib/wpa/src/utils/os_internal.c head/contrib/wpa/src/utils/os_none.c head/contrib/wpa/src/utils/os_unix.c head/contrib/wpa/src/utils/os_win32.c head/contrib/wpa/src/utils/radiotap.c head/contrib/wpa/src/utils/utils_module_tests.c head/contrib/wpa/src/utils/wpa_debug.c head/contrib/wpa/src/utils/wpa_debug.h head/contrib/wpa/src/utils/wpabuf.c head/contrib/wpa/src/wps/http_client.c head/contrib/wpa/src/wps/http_server.c head/contrib/wpa/src/wps/httpread.c head/contrib/wpa/src/wps/ndef.c head/contrib/wpa/src/wps/wps.c head/contrib/wpa/src/wps/wps.h head/contrib/wpa/src/wps/wps_attr_parse.c head/contrib/wpa/src/wps/wps_attr_parse.h head/contrib/wpa/src/wps/wps_common.c head/contrib/wpa/src/wps/wps_defs.h head/contrib/wpa/src/wps/wps_enrollee.c head/contrib/wpa/src/wps/wps_er.c head/contrib/wpa/src/wps/wps_er_ssdp.c head/contrib/wpa/src/wps/wps_module_tests.c head/contrib/wpa/src/wps/wps_registrar.c head/contrib/wpa/src/wps/wps_upnp.c head/contrib/wpa/src/wps/wps_upnp_ap.c head/contrib/wpa/src/wps/wps_upnp_event.c head/contrib/wpa/src/wps/wps_upnp_ssdp.c head/contrib/wpa/src/wps/wps_upnp_web.c head/contrib/wpa/src/wps/wps_validate.c head/contrib/wpa/wpa_supplicant/ChangeLog head/contrib/wpa/wpa_supplicant/ap.c head/contrib/wpa/wpa_supplicant/ap.h head/contrib/wpa/wpa_supplicant/bss.c head/contrib/wpa/wpa_supplicant/bss.h head/contrib/wpa/wpa_supplicant/config.c head/contrib/wpa/wpa_supplicant/config.h head/contrib/wpa/wpa_supplicant/config_file.c head/contrib/wpa/wpa_supplicant/config_ssid.h head/contrib/wpa/wpa_supplicant/ctrl_iface.c head/contrib/wpa/wpa_supplicant/ctrl_iface_named_pipe.c head/contrib/wpa/wpa_supplicant/ctrl_iface_udp.c head/contrib/wpa/wpa_supplicant/ctrl_iface_unix.c head/contrib/wpa/wpa_supplicant/dbus/dbus_new.c head/contrib/wpa/wpa_supplicant/dbus/dbus_new.h head/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers.c head/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers.h head/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers_p2p.c head/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers_p2p.h head/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers_wps.c head/contrib/wpa/wpa_supplicant/dbus/dbus_new_helpers.c head/contrib/wpa/wpa_supplicant/dbus/dbus_new_introspect.c head/contrib/wpa/wpa_supplicant/dbus/dbus_old.c head/contrib/wpa/wpa_supplicant/dbus/dbus_old_handlers.c head/contrib/wpa/wpa_supplicant/defconfig head/contrib/wpa/wpa_supplicant/driver_i.h head/contrib/wpa/wpa_supplicant/eapol_test.c head/contrib/wpa/wpa_supplicant/events.c head/contrib/wpa/wpa_supplicant/hs20_supplicant.c head/contrib/wpa/wpa_supplicant/ibss_rsn.c head/contrib/wpa/wpa_supplicant/interworking.c head/contrib/wpa/wpa_supplicant/main.c head/contrib/wpa/wpa_supplicant/mesh.c head/contrib/wpa/wpa_supplicant/mesh_mpm.c head/contrib/wpa/wpa_supplicant/mesh_rsn.c head/contrib/wpa/wpa_supplicant/notify.c head/contrib/wpa/wpa_supplicant/notify.h head/contrib/wpa/wpa_supplicant/p2p_supplicant.c head/contrib/wpa/wpa_supplicant/p2p_supplicant.h head/contrib/wpa/wpa_supplicant/preauth_test.c head/contrib/wpa/wpa_supplicant/scan.c head/contrib/wpa/wpa_supplicant/sme.c head/contrib/wpa/wpa_supplicant/wpa_cli.c head/contrib/wpa/wpa_supplicant/wpa_priv.c head/contrib/wpa/wpa_supplicant/wpa_supplicant.c head/contrib/wpa/wpa_supplicant/wpa_supplicant.conf head/contrib/wpa/wpa_supplicant/wpa_supplicant_i.h head/contrib/wpa/wpa_supplicant/wpas_glue.c head/contrib/wpa/wpa_supplicant/wpas_glue.h head/contrib/wpa/wpa_supplicant/wps_supplicant.c head/contrib/wpa/wpa_supplicant/wps_supplicant.h head/usr.sbin/wpa/Makefile.crypto head/usr.sbin/wpa/hostapd/Makefile head/usr.sbin/wpa/wpa_supplicant/Makefile Directory Properties: head/contrib/wpa/ (props changed) Modified: head/contrib/wpa/hostapd/ChangeLog ============================================================================== --- head/contrib/wpa/hostapd/ChangeLog Sun Oct 18 20:37:10 2015 (r289548) +++ head/contrib/wpa/hostapd/ChangeLog Sun Oct 18 21:38:25 2015 (r289549) @@ -1,5 +1,41 @@ ChangeLog for hostapd +2015-09-27 - v2.5 + * fixed WPS UPnP vulnerability with HTTP chunked transfer encoding + [http://w1.fi/security/2015-2/] (CVE-2015-4141) + * fixed WMM Action frame parser + [http://w1.fi/security/2015-3/] (CVE-2015-4142) + * fixed EAP-pwd server missing payload length validation + [http://w1.fi/security/2015-4/] + (CVE-2015-4143, CVE-2015-4144, CVE-2015-4145) + * fixed validation of WPS and P2P NFC NDEF record payload length + [http://w1.fi/security/2015-5/] + * nl80211: + - fixed vendor command handling to check OUI properly + * fixed hlr_auc_gw build with OpenSSL + * hlr_auc_gw: allow Milenage RES length to be reduced + * disable HT for a station that does not support WMM/QoS + * added support for hashed password (NtHash) in EAP-pwd server + * fixed and extended dynamic VLAN cases + * added EAP-EKE server support for deriving Session-Id + * set Acct-Session-Id to a random value to make it more likely to be + unique even if the device does not have a proper clock + * added more 2.4 GHz channels for 20/40 MHz HT co-ex scan + * modified SAE routines to be more robust and PWE generation to be + stronger against timing attacks + * added support for Brainpool Elliptic Curves with SAE + * increases maximum value accepted for cwmin/cwmax + * added support for CCMP-256 and GCMP-256 as group ciphers with FT + * added Fast Session Transfer (FST) module + * removed optional fields from RSNE when using FT with PMF + (workaround for interoperability issues with iOS 8.4) + * added EAP server support for TLS session resumption + * fixed key derivation for Suite B 192-bit AKM (this breaks + compatibility with the earlier version) + * added mechanism to track unconnected stations and do minimal band + steering + * number of small fixes + 2015-03-15 - v2.4 * allow OpenSSL cipher configuration to be set for internal EAP server (openssl_ciphers parameter) Modified: head/contrib/wpa/hostapd/config_file.c ============================================================================== --- head/contrib/wpa/hostapd/config_file.c Sun Oct 18 20:37:10 2015 (r289548) +++ head/contrib/wpa/hostapd/config_file.c Sun Oct 18 21:38:25 2015 (r289549) @@ -222,9 +222,15 @@ static int hostapd_config_read_eap_user( return 0; if (os_strncmp(fname, "sqlite:", 7) == 0) { +#ifdef CONFIG_SQLITE os_free(conf->eap_user_sqlite); conf->eap_user_sqlite = os_strdup(fname + 7); return 0; +#else /* CONFIG_SQLITE */ + wpa_printf(MSG_ERROR, + "EAP user file in SQLite DB, but CONFIG_SQLITE was not enabled in the build."); + return -1; +#endif /* CONFIG_SQLITE */ } f = fopen(fname, "r"); @@ -775,6 +781,24 @@ static int hostapd_config_read_wep(struc } +static int hostapd_parse_chanlist(struct hostapd_config *conf, char *val) +{ + char *pos; + + /* for backwards compatibility, translate ' ' in conf str to ',' */ + pos = val; + while (pos) { + pos = os_strchr(pos, ' '); + if (pos) + *pos++ = ','; + } + if (freq_range_list_parse(&conf->acs_ch_list, val)) + return -1; + + return 0; +} + + static int hostapd_parse_intlist(int **int_list, char *val) { int *list; @@ -875,7 +899,9 @@ static int hostapd_config_read_int10(con static int valid_cw(int cw) { return (cw == 1 || cw == 3 || cw == 7 || cw == 15 || cw == 31 || - cw == 63 || cw == 127 || cw == 255 || cw == 511 || cw == 1023); + cw == 63 || cw == 127 || cw == 255 || cw == 511 || cw == 1023 || + cw == 2047 || cw == 4095 || cw == 8191 || cw == 16383 || + cw == 32767); } @@ -886,11 +912,11 @@ enum { IEEE80211_TX_QUEUE_DATA3 = 3 /* used for EDCA AC_BK data */ }; -static int hostapd_config_tx_queue(struct hostapd_config *conf, char *name, - char *val) +static int hostapd_config_tx_queue(struct hostapd_config *conf, + const char *name, const char *val) { int num; - char *pos; + const char *pos; struct hostapd_tx_queue_params *queue; /* skip 'tx_queue_' prefix */ @@ -1134,13 +1160,23 @@ static int hostapd_config_vht_capab(stru if (os_strstr(capab, "[BF-ANTENNA-2]") && (conf->vht_capab & VHT_CAP_SU_BEAMFORMEE_CAPABLE)) conf->vht_capab |= (1 << VHT_CAP_BEAMFORMEE_STS_OFFSET); + if (os_strstr(capab, "[BF-ANTENNA-3]") && + (conf->vht_capab & VHT_CAP_SU_BEAMFORMEE_CAPABLE)) + conf->vht_capab |= (2 << VHT_CAP_BEAMFORMEE_STS_OFFSET); + if (os_strstr(capab, "[BF-ANTENNA-4]") && + (conf->vht_capab & VHT_CAP_SU_BEAMFORMEE_CAPABLE)) + conf->vht_capab |= (3 << VHT_CAP_BEAMFORMEE_STS_OFFSET); if (os_strstr(capab, "[SOUNDING-DIMENSION-2]") && (conf->vht_capab & VHT_CAP_SU_BEAMFORMER_CAPABLE)) conf->vht_capab |= (1 << VHT_CAP_SOUNDING_DIMENSION_OFFSET); + if (os_strstr(capab, "[SOUNDING-DIMENSION-3]") && + (conf->vht_capab & VHT_CAP_SU_BEAMFORMER_CAPABLE)) + conf->vht_capab |= (2 << VHT_CAP_SOUNDING_DIMENSION_OFFSET); + if (os_strstr(capab, "[SOUNDING-DIMENSION-4]") && + (conf->vht_capab & VHT_CAP_SU_BEAMFORMER_CAPABLE)) + conf->vht_capab |= (3 << VHT_CAP_SOUNDING_DIMENSION_OFFSET); if (os_strstr(capab, "[MU-BEAMFORMER]")) conf->vht_capab |= VHT_CAP_MU_BEAMFORMER_CAPABLE; - if (os_strstr(capab, "[MU-BEAMFORMEE]")) - conf->vht_capab |= VHT_CAP_MU_BEAMFORMEE_CAPABLE; if (os_strstr(capab, "[VHT-TXOP-PS]")) conf->vht_capab |= VHT_CAP_VHT_TXOP_PS; if (os_strstr(capab, "[HTC-VHT]")) @@ -1699,7 +1735,7 @@ static int hs20_parse_osu_ssid(struct ho char *str; str = wpa_config_parse_string(pos, &slen); - if (str == NULL || slen < 1 || slen > HOSTAPD_MAX_SSID_LEN) { + if (str == NULL || slen < 1 || slen > SSID_MAX_LEN) { wpa_printf(MSG_ERROR, "Line %d: Invalid SSID '%s'", line, pos); os_free(str); return -1; @@ -1900,7 +1936,7 @@ fail: static int hostapd_config_fill(struct hostapd_config *conf, struct hostapd_bss_config *bss, - char *buf, char *pos, int line) + const char *buf, char *pos, int line) { if (os_strcmp(buf, "interface") == 0) { os_strlcpy(conf->bss[0]->iface, pos, @@ -1946,7 +1982,7 @@ static int hostapd_config_fill(struct ho line); } else if (os_strcmp(buf, "ssid") == 0) { bss->ssid.ssid_len = os_strlen(pos); - if (bss->ssid.ssid_len > HOSTAPD_MAX_SSID_LEN || + if (bss->ssid.ssid_len > SSID_MAX_LEN || bss->ssid.ssid_len < 1) { wpa_printf(MSG_ERROR, "Line %d: invalid SSID '%s'", line, pos); @@ -1957,7 +1993,7 @@ static int hostapd_config_fill(struct ho } else if (os_strcmp(buf, "ssid2") == 0) { size_t slen; char *str = wpa_config_parse_string(pos, &slen); - if (str == NULL || slen < 1 || slen > HOSTAPD_MAX_SSID_LEN) { + if (str == NULL || slen < 1 || slen > SSID_MAX_LEN) { wpa_printf(MSG_ERROR, "Line %d: invalid SSID '%s'", line, pos); os_free(str); @@ -2043,6 +2079,8 @@ static int hostapd_config_fill(struct ho bss->private_key_passwd = os_strdup(pos); } else if (os_strcmp(buf, "check_crl") == 0) { bss->check_crl = atoi(pos); + } else if (os_strcmp(buf, "tls_session_lifetime") == 0) { + bss->tls_session_lifetime = atoi(pos); } else if (os_strcmp(buf, "ocsp_stapling_response") == 0) { os_free(bss->ocsp_stapling_response); bss->ocsp_stapling_response = os_strdup(pos); @@ -2515,13 +2553,17 @@ static int hostapd_config_fill(struct ho conf->hw_mode = HOSTAPD_MODE_IEEE80211G; else if (os_strcmp(pos, "ad") == 0) conf->hw_mode = HOSTAPD_MODE_IEEE80211AD; + else if (os_strcmp(pos, "any") == 0) + conf->hw_mode = HOSTAPD_MODE_IEEE80211ANY; else { wpa_printf(MSG_ERROR, "Line %d: unknown hw_mode '%s'", line, pos); return 1; } } else if (os_strcmp(buf, "wps_rf_bands") == 0) { - if (os_strcmp(pos, "a") == 0) + if (os_strcmp(pos, "ad") == 0) + bss->wps_rf_bands = WPS_RF_60GHZ; + else if (os_strcmp(pos, "a") == 0) bss->wps_rf_bands = WPS_RF_50GHZ; else if (os_strcmp(pos, "g") == 0 || os_strcmp(pos, "b") == 0) @@ -2542,12 +2584,15 @@ static int hostapd_config_fill(struct ho line); return 1; #else /* CONFIG_ACS */ + conf->acs = 1; conf->channel = 0; #endif /* CONFIG_ACS */ - } else + } else { conf->channel = atoi(pos); + conf->acs = conf->channel == 0; + } } else if (os_strcmp(buf, "chanlist") == 0) { - if (hostapd_parse_intlist(&conf->chanlist, pos)) { + if (hostapd_parse_chanlist(conf, pos)) { wpa_printf(MSG_ERROR, "Line %d: invalid channel list", line); return 1; @@ -2810,7 +2855,7 @@ static int hostapd_config_fill(struct ho os_free(bss->wps_pin_requests); bss->wps_pin_requests = os_strdup(pos); } else if (os_strcmp(buf, "device_name") == 0) { - if (os_strlen(pos) > 32) { + if (os_strlen(pos) > WPS_DEV_NAME_MAX_LEN) { wpa_printf(MSG_ERROR, "Line %d: Too long " "device_name", line); return 1; @@ -3111,6 +3156,8 @@ static int hostapd_config_fill(struct ho bss->disable_dgaf = atoi(pos); } else if (os_strcmp(buf, "proxy_arp") == 0) { bss->proxy_arp = atoi(pos); + } else if (os_strcmp(buf, "na_mcast_to_ucast") == 0) { + bss->na_mcast_to_ucast = atoi(pos); } else if (os_strcmp(buf, "osen") == 0) { bss->osen = atoi(pos); } else if (os_strcmp(buf, "anqp_domain_id") == 0) { @@ -3223,6 +3270,24 @@ static int hostapd_config_fill(struct ho bss->bss_load_test_set = 1; } else if (os_strcmp(buf, "radio_measurements") == 0) { bss->radio_measurements = atoi(pos); + } else if (os_strcmp(buf, "own_ie_override") == 0) { + struct wpabuf *tmp; + size_t len = os_strlen(pos) / 2; + + tmp = wpabuf_alloc(len); + if (!tmp) + return 1; + + if (hexstr2bin(pos, wpabuf_put(tmp, len), len)) { + wpabuf_free(tmp); + wpa_printf(MSG_ERROR, + "Line %d: Invalid own_ie_override '%s'", + line, pos); + return 1; + } + + wpabuf_free(bss->own_ie_override); + bss->own_ie_override = tmp; #endif /* CONFIG_TESTING_OPTIONS */ } else if (os_strcmp(buf, "vendor_elements") == 0) { struct wpabuf *elems; @@ -3276,6 +3341,74 @@ static int hostapd_config_fill(struct ho } else if (os_strcmp(buf, "wowlan_triggers") == 0) { os_free(bss->wowlan_triggers); bss->wowlan_triggers = os_strdup(pos); +#ifdef CONFIG_FST + } else if (os_strcmp(buf, "fst_group_id") == 0) { + size_t len = os_strlen(pos); + + if (!len || len >= sizeof(conf->fst_cfg.group_id)) { + wpa_printf(MSG_ERROR, + "Line %d: Invalid fst_group_id value '%s'", + line, pos); + return 1; + } + + if (conf->fst_cfg.group_id[0]) { + wpa_printf(MSG_ERROR, + "Line %d: Duplicate fst_group value '%s'", + line, pos); + return 1; + } + + os_strlcpy(conf->fst_cfg.group_id, pos, + sizeof(conf->fst_cfg.group_id)); + } else if (os_strcmp(buf, "fst_priority") == 0) { + char *endp; + long int val; + + if (!*pos) { + wpa_printf(MSG_ERROR, + "Line %d: fst_priority value not supplied (expected 1..%u)", + line, FST_MAX_PRIO_VALUE); + return -1; + } + + val = strtol(pos, &endp, 0); + if (*endp || val < 1 || val > FST_MAX_PRIO_VALUE) { + wpa_printf(MSG_ERROR, + "Line %d: Invalid fst_priority %ld (%s) (expected 1..%u)", + line, val, pos, FST_MAX_PRIO_VALUE); + return 1; + } + conf->fst_cfg.priority = (u8) val; + } else if (os_strcmp(buf, "fst_llt") == 0) { + char *endp; + long int val; + + if (!*pos) { + wpa_printf(MSG_ERROR, + "Line %d: fst_llt value not supplied (expected 1..%u)", + line, FST_MAX_LLT_MS); + return -1; + } + val = strtol(pos, &endp, 0); + if (*endp || val < 1 || val > FST_MAX_LLT_MS) { + wpa_printf(MSG_ERROR, + "Line %d: Invalid fst_llt %ld (%s) (expected 1..%u)", + line, val, pos, FST_MAX_LLT_MS); + return 1; + } + conf->fst_cfg.llt = (u32) val; +#endif /* CONFIG_FST */ + } else if (os_strcmp(buf, "track_sta_max_num") == 0) { + conf->track_sta_max_num = atoi(pos); + } else if (os_strcmp(buf, "track_sta_max_age") == 0) { + conf->track_sta_max_age = atoi(pos); + } else if (os_strcmp(buf, "no_probe_resp_if_seen_on") == 0) { + os_free(bss->no_probe_resp_if_seen_on); + bss->no_probe_resp_if_seen_on = os_strdup(pos); + } else if (os_strcmp(buf, "no_auth_if_seen_on") == 0) { + os_free(bss->no_auth_if_seen_on); + bss->no_auth_if_seen_on = os_strdup(pos); } else { wpa_printf(MSG_ERROR, "Line %d: unknown configuration item '%s'", @@ -3378,7 +3511,8 @@ struct hostapd_config * hostapd_config_r int hostapd_set_iface(struct hostapd_config *conf, - struct hostapd_bss_config *bss, char *field, char *value) + struct hostapd_bss_config *bss, const char *field, + char *value) { int errors; size_t i; Modified: head/contrib/wpa/hostapd/config_file.h ============================================================================== --- head/contrib/wpa/hostapd/config_file.h Sun Oct 18 20:37:10 2015 (r289548) +++ head/contrib/wpa/hostapd/config_file.h Sun Oct 18 21:38:25 2015 (r289549) @@ -11,7 +11,7 @@ struct hostapd_config * hostapd_config_read(const char *fname); int hostapd_set_iface(struct hostapd_config *conf, - struct hostapd_bss_config *bss, char *field, + struct hostapd_bss_config *bss, const char *field, char *value); #endif /* CONFIG_FILE_H */ Modified: head/contrib/wpa/hostapd/ctrl_iface.c ============================================================================== --- head/contrib/wpa/hostapd/ctrl_iface.c Sun Oct 18 20:37:10 2015 (r289548) +++ head/contrib/wpa/hostapd/ctrl_iface.c Sun Oct 18 21:38:25 2015 (r289549) @@ -25,6 +25,7 @@ #include "common/ieee802_11_defs.h" #include "crypto/tls.h" #include "drivers/driver.h" +#include "eapol_auth/eapol_auth_sm.h" #include "radius/radius_client.h" #include "radius/radius_server.h" #include "l2_packet/l2_packet.h" @@ -43,10 +44,13 @@ #include "ap/beacon.h" #include "wps/wps_defs.h" #include "wps/wps.h" +#include "fst/fst_ctrl_iface.h" #include "config_file.h" #include "ctrl_iface.h" +#define HOSTAPD_CLI_DUP_VALUE_MAX_LEN 256 + struct wpa_ctrl_dst { struct wpa_ctrl_dst *next; struct sockaddr_un addr; @@ -57,6 +61,7 @@ struct wpa_ctrl_dst { static void hostapd_ctrl_iface_send(struct hostapd_data *hapd, int level, + enum wpa_msg_type type, const char *buf, size_t len); @@ -1055,6 +1060,97 @@ static int hostapd_ctrl_iface_bss_tm_req #endif /* CONFIG_WNM */ +static int hostapd_ctrl_iface_get_key_mgmt(struct hostapd_data *hapd, + char *buf, size_t buflen) +{ + int ret = 0; + char *pos, *end; + + pos = buf; + end = buf + buflen; + + WPA_ASSERT(hapd->conf->wpa_key_mgmt); + + if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK) { + ret = os_snprintf(pos, end - pos, "WPA-PSK "); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } + if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X) { + ret = os_snprintf(pos, end - pos, "WPA-EAP "); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } +#ifdef CONFIG_IEEE80211R + if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_FT_PSK) { + ret = os_snprintf(pos, end - pos, "FT-PSK "); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } + if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_FT_IEEE8021X) { + ret = os_snprintf(pos, end - pos, "FT-EAP "); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } +#ifdef CONFIG_SAE + if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_FT_SAE) { + ret = os_snprintf(pos, end - pos, "FT-SAE "); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } +#endif /* CONFIG_SAE */ +#endif /* CONFIG_IEEE80211R */ +#ifdef CONFIG_IEEE80211W + if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK_SHA256) { + ret = os_snprintf(pos, end - pos, "WPA-PSK-SHA256 "); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } + if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X_SHA256) { + ret = os_snprintf(pos, end - pos, "WPA-EAP-SHA256 "); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } +#endif /* CONFIG_IEEE80211W */ +#ifdef CONFIG_SAE + if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_SAE) { + ret = os_snprintf(pos, end - pos, "SAE "); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } +#endif /* CONFIG_SAE */ + if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X_SUITE_B) { + ret = os_snprintf(pos, end - pos, "WPA-EAP-SUITE-B "); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } + if (hapd->conf->wpa_key_mgmt & + WPA_KEY_MGMT_IEEE8021X_SUITE_B_192) { + ret = os_snprintf(pos, end - pos, + "WPA-EAP-SUITE-B-192 "); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } + + if (pos > buf && *(pos - 1) == ' ') { + *(pos - 1) = '\0'; + pos--; + } + + return pos - buf; +} + + static int hostapd_ctrl_iface_get_config(struct hostapd_data *hapd, char *buf, size_t buflen) { @@ -1104,82 +1200,20 @@ static int hostapd_ctrl_iface_get_config } #endif /* CONFIG_WPS */ + if (hapd->conf->wpa) { + ret = os_snprintf(pos, end - pos, "wpa=%d\n", hapd->conf->wpa); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } + if (hapd->conf->wpa && hapd->conf->wpa_key_mgmt) { ret = os_snprintf(pos, end - pos, "key_mgmt="); if (os_snprintf_error(end - pos, ret)) return pos - buf; pos += ret; - if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK) { - ret = os_snprintf(pos, end - pos, "WPA-PSK "); - if (os_snprintf_error(end - pos, ret)) - return pos - buf; - pos += ret; - } - if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X) { - ret = os_snprintf(pos, end - pos, "WPA-EAP "); - if (os_snprintf_error(end - pos, ret)) - return pos - buf; - pos += ret; - } -#ifdef CONFIG_IEEE80211R - if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_FT_PSK) { - ret = os_snprintf(pos, end - pos, "FT-PSK "); - if (os_snprintf_error(end - pos, ret)) - return pos - buf; - pos += ret; - } - if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_FT_IEEE8021X) { - ret = os_snprintf(pos, end - pos, "FT-EAP "); - if (os_snprintf_error(end - pos, ret)) - return pos - buf; - pos += ret; - } -#ifdef CONFIG_SAE - if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_FT_SAE) { - ret = os_snprintf(pos, end - pos, "FT-SAE "); - if (os_snprintf_error(end - pos, ret)) - return pos - buf; - pos += ret; - } -#endif /* CONFIG_SAE */ -#endif /* CONFIG_IEEE80211R */ -#ifdef CONFIG_IEEE80211W - if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK_SHA256) { - ret = os_snprintf(pos, end - pos, "WPA-PSK-SHA256 "); - if (os_snprintf_error(end - pos, ret)) - return pos - buf; - pos += ret; - } - if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X_SHA256) { - ret = os_snprintf(pos, end - pos, "WPA-EAP-SHA256 "); - if (os_snprintf_error(end - pos, ret)) - return pos - buf; - pos += ret; - } -#endif /* CONFIG_IEEE80211W */ -#ifdef CONFIG_SAE - if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_SAE) { - ret = os_snprintf(pos, end - pos, "SAE "); - if (os_snprintf_error(end - pos, ret)) - return pos - buf; - pos += ret; - } -#endif /* CONFIG_SAE */ - if (hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X_SUITE_B) { - ret = os_snprintf(pos, end - pos, "WPA-EAP-SUITE-B "); - if (os_snprintf_error(end - pos, ret)) - return pos - buf; - pos += ret; - } - if (hapd->conf->wpa_key_mgmt & - WPA_KEY_MGMT_IEEE8021X_SUITE_B_192) { - ret = os_snprintf(pos, end - pos, - "WPA-EAP-SUITE-B-192 "); - if (os_snprintf_error(end - pos, ret)) - return pos - buf; - pos += ret; - } + pos += hostapd_ctrl_iface_get_key_mgmt(hapd, pos, end - pos); ret = os_snprintf(pos, end - pos, "\n"); if (os_snprintf_error(end - pos, ret)) @@ -1528,7 +1562,7 @@ void hostapd_data_test_rx(void *ctx, con { struct hostapd_data *hapd = ctx; const struct ether_header *eth; - const struct iphdr *ip; + struct iphdr ip; const u8 *pos; unsigned int i; @@ -1536,14 +1570,14 @@ void hostapd_data_test_rx(void *ctx, con return; eth = (const struct ether_header *) buf; - ip = (const struct iphdr *) (eth + 1); - pos = (const u8 *) (ip + 1); + os_memcpy(&ip, eth + 1, sizeof(ip)); + pos = &buf[sizeof(*eth) + sizeof(ip)]; - if (ip->ihl != 5 || ip->version != 4 || - ntohs(ip->tot_len) != HWSIM_IP_LEN) + if (ip.ihl != 5 || ip.version != 4 || + ntohs(ip.tot_len) != HWSIM_IP_LEN) return; - for (i = 0; i < HWSIM_IP_LEN - sizeof(*ip); i++) { + for (i = 0; i < HWSIM_IP_LEN - sizeof(ip); i++) { if (*pos != (u8) i) return; pos++; @@ -1599,7 +1633,7 @@ static int hostapd_ctrl_iface_data_test_ int used; long int val; u8 tos; - u8 buf[HWSIM_PACKETLEN]; + u8 buf[2 + HWSIM_PACKETLEN]; struct ether_header *eth; struct iphdr *ip; u8 *dpos; @@ -1627,7 +1661,7 @@ static int hostapd_ctrl_iface_data_test_ return -1; tos = val; - eth = (struct ether_header *) buf; + eth = (struct ether_header *) &buf[2]; os_memcpy(eth->ether_dhost, dst, ETH_ALEN); os_memcpy(eth->ether_shost, src, ETH_ALEN); eth->ether_type = htons(ETHERTYPE_IP); @@ -1639,14 +1673,14 @@ static int hostapd_ctrl_iface_data_test_ ip->tos = tos; ip->tot_len = htons(HWSIM_IP_LEN); ip->protocol = 1; - ip->saddr = htonl(192 << 24 | 168 << 16 | 1 << 8 | 1); - ip->daddr = htonl(192 << 24 | 168 << 16 | 1 << 8 | 2); + ip->saddr = htonl(192U << 24 | 168 << 16 | 1 << 8 | 1); + ip->daddr = htonl(192U << 24 | 168 << 16 | 1 << 8 | 2); ip->check = ipv4_hdr_checksum(ip, sizeof(*ip)); dpos = (u8 *) (ip + 1); for (i = 0; i < HWSIM_IP_LEN - sizeof(*ip); i++) *dpos++ = i; - if (l2_packet_send(hapd->l2_test, dst, ETHERTYPE_IP, buf, + if (l2_packet_send(hapd->l2_test, dst, ETHERTYPE_IP, &buf[2], HWSIM_PACKETLEN) < 0) return -1; @@ -1746,6 +1780,45 @@ static int hostapd_ctrl_get_alloc_fail(s #endif /* WPA_TRACE_BFD */ } + +static int hostapd_ctrl_test_fail(struct hostapd_data *hapd, char *cmd) +{ +#ifdef WPA_TRACE_BFD + extern char wpa_trace_test_fail_func[256]; + extern unsigned int wpa_trace_test_fail_after; + char *pos; + + wpa_trace_test_fail_after = atoi(cmd); + pos = os_strchr(cmd, ':'); + if (pos) { + pos++; + os_strlcpy(wpa_trace_test_fail_func, pos, + sizeof(wpa_trace_test_fail_func)); + } else { + wpa_trace_test_fail_after = 0; + } + + return 0; +#else /* WPA_TRACE_BFD */ + return -1; +#endif /* WPA_TRACE_BFD */ +} + + +static int hostapd_ctrl_get_fail(struct hostapd_data *hapd, + char *buf, size_t buflen) +{ +#ifdef WPA_TRACE_BFD + extern char wpa_trace_test_fail_func[256]; + extern unsigned int wpa_trace_test_fail_after; + + return os_snprintf(buf, buflen, "%u:%s", wpa_trace_test_fail_after, + wpa_trace_test_fail_func); +#else /* WPA_TRACE_BFD */ + return -1; +#endif /* WPA_TRACE_BFD */ +} + #endif /* CONFIG_TESTING_OPTIONS */ @@ -1847,41 +1920,134 @@ static int hostapd_ctrl_iface_vendor(str } -static void hostapd_ctrl_iface_receive(int sock, void *eloop_ctx, - void *sock_ctx) +static int hostapd_ctrl_iface_eapol_reauth(struct hostapd_data *hapd, + const char *cmd) { - struct hostapd_data *hapd = eloop_ctx; - char buf[4096]; - int res; - struct sockaddr_un from; - socklen_t fromlen = sizeof(from); - char *reply; - const int reply_size = 4096; - int reply_len; - int level = MSG_DEBUG; + u8 addr[ETH_ALEN]; + struct sta_info *sta; - res = recvfrom(sock, buf, sizeof(buf) - 1, 0, - (struct sockaddr *) &from, &fromlen); - if (res < 0) { - wpa_printf(MSG_ERROR, "recvfrom(ctrl_iface): %s", - strerror(errno)); - return; + if (hwaddr_aton(cmd, addr)) + return -1; + + sta = ap_get_sta(hapd, addr); + if (!sta || !sta->eapol_sm) + return -1; + + eapol_auth_reauthenticate(sta->eapol_sm); + return 0; +} + + +static int hostapd_ctrl_iface_eapol_set(struct hostapd_data *hapd, char *cmd) +{ + u8 addr[ETH_ALEN]; + struct sta_info *sta; + char *pos = cmd, *param; + + if (hwaddr_aton(pos, addr) || pos[17] != ' ') + return -1; + pos += 18; + param = pos; + pos = os_strchr(pos, ' '); + if (!pos) + return -1; + *pos++ = '\0'; + + sta = ap_get_sta(hapd, addr); + if (!sta || !sta->eapol_sm) + return -1; + + return eapol_auth_set_conf(sta->eapol_sm, param, pos); +} + + +static int hostapd_ctrl_iface_log_level(struct hostapd_data *hapd, char *cmd, + char *buf, size_t buflen) +{ + char *pos, *end, *stamp; + int ret; + + /* cmd: "LOG_LEVEL []" */ + if (*cmd == '\0') { + pos = buf; + end = buf + buflen; + ret = os_snprintf(pos, end - pos, "Current level: %s\n" + "Timestamp: %d\n", + debug_level_str(wpa_debug_level), + wpa_debug_timestamp); + if (os_snprintf_error(end - pos, ret)) + ret = 0; + + return ret; } - buf[res] = '\0'; - if (os_strcmp(buf, "PING") == 0) - level = MSG_EXCESSIVE; - wpa_hexdump_ascii(level, "RX ctrl_iface", (u8 *) buf, res); - reply = os_malloc(reply_size); - if (reply == NULL) { - if (sendto(sock, "FAIL\n", 5, 0, (struct sockaddr *) &from, - fromlen) < 0) { - wpa_printf(MSG_DEBUG, "CTRL: sendto failed: %s", - strerror(errno)); + while (*cmd == ' ') + cmd++; + + stamp = os_strchr(cmd, ' '); + if (stamp) { + *stamp++ = '\0'; + while (*stamp == ' ') { + stamp++; } - return; } + if (os_strlen(cmd)) { + int level = str_to_debug_level(cmd); + if (level < 0) + return -1; + wpa_debug_level = level; + } + + if (stamp && os_strlen(stamp)) + wpa_debug_timestamp = atoi(stamp); + + os_memcpy(buf, "OK\n", 3); + return 3; +} + + +#ifdef NEED_AP_MLME +static int hostapd_ctrl_iface_track_sta_list(struct hostapd_data *hapd, + char *buf, size_t buflen) +{ + struct hostapd_iface *iface = hapd->iface; + char *pos, *end; + struct hostapd_sta_info *info; + struct os_reltime now; + + sta_track_expire(iface, 0); + + pos = buf; + end = buf + buflen; + + os_get_reltime(&now); + dl_list_for_each_reverse(info, &iface->sta_seen, + struct hostapd_sta_info, list) { + struct os_reltime age; + int ret; + + os_reltime_sub(&now, &info->last_seen, &age); + ret = os_snprintf(pos, end - pos, MACSTR " %u\n", + MAC2STR(info->addr), (unsigned int) age.sec); + if (os_snprintf_error(end - pos, ret)) + break; + pos += ret; + } + + return pos - buf; +} +#endif /* NEED_AP_MLME */ + + +static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd, + char *buf, char *reply, + int reply_size, + struct sockaddr_un *from, + socklen_t fromlen) +{ + int reply_len, res; + os_memcpy(reply, "OK\n", 3); reply_len = 3; @@ -1938,13 +2104,13 @@ static void hostapd_ctrl_iface_receive(i reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply, reply_size); } else if (os_strcmp(buf, "ATTACH") == 0) { - if (hostapd_ctrl_iface_attach(hapd, &from, fromlen)) + if (hostapd_ctrl_iface_attach(hapd, from, fromlen)) reply_len = -1; } else if (os_strcmp(buf, "DETACH") == 0) { - if (hostapd_ctrl_iface_detach(hapd, &from, fromlen)) + if (hostapd_ctrl_iface_detach(hapd, from, fromlen)) reply_len = -1; } else if (os_strncmp(buf, "LEVEL ", 6) == 0) { - if (hostapd_ctrl_iface_level(hapd, &from, fromlen, + if (hostapd_ctrl_iface_level(hapd, from, fromlen, buf + 6)) reply_len = -1; } else if (os_strncmp(buf, "NEW_STA ", 8) == 0) { @@ -2079,6 +2245,11 @@ static void hostapd_ctrl_iface_receive(i } else if (os_strcmp(buf, "GET_ALLOC_FAIL") == 0) { reply_len = hostapd_ctrl_get_alloc_fail(hapd, reply, reply_size); + } else if (os_strncmp(buf, "TEST_FAIL ", 10) == 0) { + if (hostapd_ctrl_test_fail(hapd, buf + 10) < 0) + reply_len = -1; + } else if (os_strcmp(buf, "GET_FAIL") == 0) { + reply_len = hostapd_ctrl_get_fail(hapd, reply, reply_size); #endif /* CONFIG_TESTING_OPTIONS */ } else if (os_strncmp(buf, "CHAN_SWITCH ", 12) == 0) { if (hostapd_ctrl_iface_chan_switch(hapd->iface, buf + 12)) @@ -2091,6 +2262,20 @@ static void hostapd_ctrl_iface_receive(i #ifdef RADIUS_SERVER radius_server_erp_flush(hapd->radius_srv); #endif /* RADIUS_SERVER */ + } else if (os_strncmp(buf, "EAPOL_REAUTH ", 13) == 0) { + if (hostapd_ctrl_iface_eapol_reauth(hapd, buf + 13)) + reply_len = -1; + } else if (os_strncmp(buf, "EAPOL_SET ", 10) == 0) { + if (hostapd_ctrl_iface_eapol_set(hapd, buf + 10)) + reply_len = -1; + } else if (os_strncmp(buf, "LOG_LEVEL", 9) == 0) { + reply_len = hostapd_ctrl_iface_log_level( + hapd, buf + 9, reply, reply_size); +#ifdef NEED_AP_MLME + } else if (os_strcmp(buf, "TRACK_STA_LIST") == 0) { + reply_len = hostapd_ctrl_iface_track_sta_list( + hapd, reply, reply_size); +#endif /* NEED_AP_MLME */ } else { os_memcpy(reply, "UNKNOWN COMMAND\n", 16); reply_len = 16; @@ -2100,6 +2285,50 @@ static void hostapd_ctrl_iface_receive(i os_memcpy(reply, "FAIL\n", 5); reply_len = 5; } + + return reply_len; +} + + +static void hostapd_ctrl_iface_receive(int sock, void *eloop_ctx, + void *sock_ctx) +{ + struct hostapd_data *hapd = eloop_ctx; + char buf[4096]; + int res; + struct sockaddr_un from; + socklen_t fromlen = sizeof(from); + char *reply; + const int reply_size = 4096; + int reply_len; + int level = MSG_DEBUG; + + res = recvfrom(sock, buf, sizeof(buf) - 1, 0, + (struct sockaddr *) &from, &fromlen); + if (res < 0) { + wpa_printf(MSG_ERROR, "recvfrom(ctrl_iface): %s", + strerror(errno)); + return; + } + buf[res] = '\0'; + if (os_strcmp(buf, "PING") == 0) + level = MSG_EXCESSIVE; + wpa_hexdump_ascii(level, "RX ctrl_iface", (u8 *) buf, res); + + reply = os_malloc(reply_size); + if (reply == NULL) { + if (sendto(sock, "FAIL\n", 5, 0, (struct sockaddr *) &from, + fromlen) < 0) { + wpa_printf(MSG_DEBUG, "CTRL: sendto failed: %s", + strerror(errno)); + } + return; + } + + reply_len = hostapd_ctrl_iface_receive_process(hapd, buf, + reply, reply_size, + &from, fromlen); + if (sendto(sock, reply, reply_len, 0, (struct sockaddr *) &from, fromlen) < 0) { wpa_printf(MSG_DEBUG, "CTRL: sendto failed: %s", @@ -2130,13 +2359,14 @@ static char * hostapd_ctrl_iface_path(st } -static void hostapd_ctrl_iface_msg_cb(void *ctx, int level, int global, +static void hostapd_ctrl_iface_msg_cb(void *ctx, int level, + enum wpa_msg_type type, const char *txt, size_t len) { struct hostapd_data *hapd = ctx; if (hapd == NULL) return; - hostapd_ctrl_iface_send(hapd, level, txt, len); + hostapd_ctrl_iface_send(hapd, level, type, txt, len); } @@ -2359,6 +2589,58 @@ static int hostapd_ctrl_iface_remove(str } +static int hostapd_global_ctrl_iface_attach(struct hapd_interfaces *interfaces, + struct sockaddr_un *from, + socklen_t fromlen) +{ + struct wpa_ctrl_dst *dst; + + dst = os_zalloc(sizeof(*dst)); + if (dst == NULL) + return -1; + os_memcpy(&dst->addr, from, sizeof(struct sockaddr_un)); + dst->addrlen = fromlen; + dst->debug_level = MSG_INFO; + dst->next = interfaces->global_ctrl_dst; + interfaces->global_ctrl_dst = dst; + wpa_hexdump(MSG_DEBUG, "CTRL_IFACE monitor attached (global)", + from->sun_path, + fromlen - offsetof(struct sockaddr_un, sun_path)); + return 0; +} + + +static int hostapd_global_ctrl_iface_detach(struct hapd_interfaces *interfaces, + struct sockaddr_un *from, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Oct 18 21: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 6A411A18E09; Sun, 18 Oct 2015 21:39:16 +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 32B3EFE3; Sun, 18 Oct 2015 21:39:16 +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 t9ILdFVq017367; Sun, 18 Oct 2015 21:39:15 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ILdF6f017364; Sun, 18 Oct 2015 21:39:15 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201510182139.t9ILdF6f017364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Sun, 18 Oct 2015 21:39:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289550 - head/sys/dev/vnic X-SVN-Group: head MIME-Version: 1.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, 18 Oct 2015 21:39:16 -0000 Author: zbb Date: Sun Oct 18 21:39:15 2015 New Revision: 289550 URL: https://svnweb.freebsd.org/changeset/base/289550 Log: Raw import of ThunderX VNIC networking driver components This import brings following components of the Linux driver: - Thunder BGX (programmable MAC) - Physical Function driver - Virtual Function driver - Headers Revision: 1.0 Obtained from: Cavium License information: Cavium provided these files under BSD license Added: head/sys/dev/vnic/ head/sys/dev/vnic/nic.h (contents, props changed) head/sys/dev/vnic/nic_main.c (contents, props changed) head/sys/dev/vnic/nic_reg.h (contents, props changed) head/sys/dev/vnic/nicvf_main.c (contents, props changed) head/sys/dev/vnic/nicvf_queues.c (contents, props changed) head/sys/dev/vnic/nicvf_queues.h (contents, props changed) head/sys/dev/vnic/q_struct.h (contents, props changed) head/sys/dev/vnic/thunder_bgx.c (contents, props changed) head/sys/dev/vnic/thunder_bgx.h (contents, props changed) Added: head/sys/dev/vnic/nic.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/vnic/nic.h Sun Oct 18 21:39:15 2015 (r289550) @@ -0,0 +1,539 @@ +/* + * Copyright (C) 2015 Cavium Inc. + * 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 NIC_H +#define NIC_H + +#include +#include +#include +#include "thunder_bgx.h" + +/* PCI device IDs */ +#define PCI_DEVICE_ID_THUNDER_NIC_PF 0xA01E +#define PCI_DEVICE_ID_THUNDER_PASS1_NIC_VF 0x0011 +#define PCI_DEVICE_ID_THUNDER_NIC_VF 0xA034 +#define PCI_DEVICE_ID_THUNDER_BGX 0xA026 + +/* PCI BAR nos */ +#define PCI_CFG_REG_BAR_NUM 0 +#define PCI_MSIX_REG_BAR_NUM 4 + +/* NIC SRIOV VF count */ +#define MAX_NUM_VFS_SUPPORTED 128 +#define DEFAULT_NUM_VF_ENABLED 8 + +#define NIC_TNS_BYPASS_MODE 0 +#define NIC_TNS_MODE 1 + +/* NIC priv flags */ +#define NIC_SRIOV_ENABLED BIT(0) +#define NIC_TNS_ENABLED BIT(1) + +/* VNIC HW optimiation features */ +#define VNIC_RSS_SUPPORT +#define VNIC_MULTI_QSET_SUPPORT + +/* Min/Max packet size */ +#define NIC_HW_MIN_FRS 64 +#define NIC_HW_MAX_FRS 9200 /* 9216 max packet including FCS */ + +/* Max pkinds */ +#define NIC_MAX_PKIND 16 + +/* Rx Channels */ +/* Receive channel configuration in TNS bypass mode + * Below is configuration in TNS bypass mode + * BGX0-LMAC0-CHAN0 - VNIC CHAN0 + * BGX0-LMAC1-CHAN0 - VNIC CHAN16 + * ... + * BGX1-LMAC0-CHAN0 - VNIC CHAN128 + * ... + * BGX1-LMAC3-CHAN0 - VNIC CHAN174 + */ +#define NIC_INTF_COUNT 2 /* Interfaces btw VNIC and TNS/BGX */ +#define NIC_CHANS_PER_INF 128 +#define NIC_MAX_CHANS (NIC_INTF_COUNT * NIC_CHANS_PER_INF) +#define NIC_CPI_COUNT 2048 /* No of channel parse indices */ + +/* TNS bypass mode: 1-1 mapping between VNIC and BGX:LMAC */ +#define NIC_MAX_BGX MAX_BGX_PER_CN88XX +#define NIC_CPI_PER_BGX (NIC_CPI_COUNT / NIC_MAX_BGX) +#define NIC_MAX_CPI_PER_LMAC 64 /* Max when CPI_ALG is IP diffserv */ +#define NIC_RSSI_PER_BGX (NIC_RSSI_COUNT / NIC_MAX_BGX) + +/* Tx scheduling */ +#define NIC_MAX_TL4 1024 +#define NIC_MAX_TL4_SHAPERS 256 /* 1 shaper for 4 TL4s */ +#define NIC_MAX_TL3 256 +#define NIC_MAX_TL3_SHAPERS 64 /* 1 shaper for 4 TL3s */ +#define NIC_MAX_TL2 64 +#define NIC_MAX_TL2_SHAPERS 2 /* 1 shaper for 32 TL2s */ +#define NIC_MAX_TL1 2 + +/* TNS bypass mode */ +#define NIC_TL2_PER_BGX 32 +#define NIC_TL4_PER_BGX (NIC_MAX_TL4 / NIC_MAX_BGX) +#define NIC_TL4_PER_LMAC (NIC_MAX_TL4 / NIC_CHANS_PER_INF) + +/* NIC VF Interrupts */ +#define NICVF_INTR_CQ 0 +#define NICVF_INTR_SQ 1 +#define NICVF_INTR_RBDR 2 +#define NICVF_INTR_PKT_DROP 3 +#define NICVF_INTR_TCP_TIMER 4 +#define NICVF_INTR_MBOX 5 +#define NICVF_INTR_QS_ERR 6 + +#define NICVF_INTR_CQ_SHIFT 0 +#define NICVF_INTR_SQ_SHIFT 8 +#define NICVF_INTR_RBDR_SHIFT 16 +#define NICVF_INTR_PKT_DROP_SHIFT 20 +#define NICVF_INTR_TCP_TIMER_SHIFT 21 +#define NICVF_INTR_MBOX_SHIFT 22 +#define NICVF_INTR_QS_ERR_SHIFT 23 + +#define NICVF_INTR_CQ_MASK (0xFF << NICVF_INTR_CQ_SHIFT) +#define NICVF_INTR_SQ_MASK (0xFF << NICVF_INTR_SQ_SHIFT) +#define NICVF_INTR_RBDR_MASK (0x03 << NICVF_INTR_RBDR_SHIFT) +#define NICVF_INTR_PKT_DROP_MASK BIT(NICVF_INTR_PKT_DROP_SHIFT) +#define NICVF_INTR_TCP_TIMER_MASK BIT(NICVF_INTR_TCP_TIMER_SHIFT) +#define NICVF_INTR_MBOX_MASK BIT(NICVF_INTR_MBOX_SHIFT) +#define NICVF_INTR_QS_ERR_MASK BIT(NICVF_INTR_QS_ERR_SHIFT) + +/* MSI-X interrupts */ +#define NIC_PF_MSIX_VECTORS 10 +#define NIC_VF_MSIX_VECTORS 20 + +#define NIC_PF_INTR_ID_ECC0_SBE 0 +#define NIC_PF_INTR_ID_ECC0_DBE 1 +#define NIC_PF_INTR_ID_ECC1_SBE 2 +#define NIC_PF_INTR_ID_ECC1_DBE 3 +#define NIC_PF_INTR_ID_ECC2_SBE 4 +#define NIC_PF_INTR_ID_ECC2_DBE 5 +#define NIC_PF_INTR_ID_ECC3_SBE 6 +#define NIC_PF_INTR_ID_ECC3_DBE 7 +#define NIC_PF_INTR_ID_MBOX0 8 +#define NIC_PF_INTR_ID_MBOX1 9 + +/* Global timer for CQ timer thresh interrupts + * Calculated for SCLK of 700Mhz + * value written should be a 1/16th of what is expected + * + * 1 tick per 0.05usec = value of 2.2 + * This 10% would be covered in CQ timer thresh value + */ +#define NICPF_CLK_PER_INT_TICK 2 + +/* Time to wait before we decide that a SQ is stuck. + * + * Since both pkt rx and tx notifications are done with same CQ, + * when packets are being received at very high rate (eg: L2 forwarding) + * then freeing transmitted skbs will be delayed and watchdog + * will kick in, resetting interface. Hence keeping this value high. + */ +#define NICVF_TX_TIMEOUT (50 * HZ) + +struct nicvf_cq_poll { + struct nicvf *nicvf; + u8 cq_idx; /* Completion queue index */ + struct napi_struct napi; +}; + +#define NIC_RSSI_COUNT 4096 /* Total no of RSS indices */ +#define NIC_MAX_RSS_HASH_BITS 8 +#define NIC_MAX_RSS_IDR_TBL_SIZE (1 << NIC_MAX_RSS_HASH_BITS) +#define RSS_HASH_KEY_SIZE 5 /* 320 bit key */ + +#ifdef VNIC_RSS_SUPPORT +struct nicvf_rss_info { + bool enable; +#define RSS_L2_EXTENDED_HASH_ENA BIT(0) +#define RSS_IP_HASH_ENA BIT(1) +#define RSS_TCP_HASH_ENA BIT(2) +#define RSS_TCP_SYN_DIS BIT(3) +#define RSS_UDP_HASH_ENA BIT(4) +#define RSS_L4_EXTENDED_HASH_ENA BIT(5) +#define RSS_ROCE_ENA BIT(6) +#define RSS_L3_BI_DIRECTION_ENA BIT(7) +#define RSS_L4_BI_DIRECTION_ENA BIT(8) + u64 cfg; + u8 hash_bits; + u16 rss_size; + u8 ind_tbl[NIC_MAX_RSS_IDR_TBL_SIZE]; + u64 key[RSS_HASH_KEY_SIZE]; +} ____cacheline_aligned_in_smp; +#endif + +enum rx_stats_reg_offset { + RX_OCTS = 0x0, + RX_UCAST = 0x1, + RX_BCAST = 0x2, + RX_MCAST = 0x3, + RX_RED = 0x4, + RX_RED_OCTS = 0x5, + RX_ORUN = 0x6, + RX_ORUN_OCTS = 0x7, + RX_FCS = 0x8, + RX_L2ERR = 0x9, + RX_DRP_BCAST = 0xa, + RX_DRP_MCAST = 0xb, + RX_DRP_L3BCAST = 0xc, + RX_DRP_L3MCAST = 0xd, + RX_STATS_ENUM_LAST, +}; + +enum tx_stats_reg_offset { + TX_OCTS = 0x0, + TX_UCAST = 0x1, + TX_BCAST = 0x2, + TX_MCAST = 0x3, + TX_DROP = 0x4, + TX_STATS_ENUM_LAST, +}; + +struct nicvf_hw_stats { + u64 rx_bytes; + u64 rx_ucast_frames; + u64 rx_bcast_frames; + u64 rx_mcast_frames; + u64 rx_fcs_errors; + u64 rx_l2_errors; + u64 rx_drop_red; + u64 rx_drop_red_bytes; + u64 rx_drop_overrun; + u64 rx_drop_overrun_bytes; + u64 rx_drop_bcast; + u64 rx_drop_mcast; + u64 rx_drop_l3_bcast; + u64 rx_drop_l3_mcast; + u64 rx_bgx_truncated_pkts; + u64 rx_jabber_errs; + u64 rx_fcs_errs; + u64 rx_bgx_errs; + u64 rx_prel2_errs; + u64 rx_l2_hdr_malformed; + u64 rx_oversize; + u64 rx_undersize; + u64 rx_l2_len_mismatch; + u64 rx_l2_pclp; + u64 rx_ip_ver_errs; + u64 rx_ip_csum_errs; + u64 rx_ip_hdr_malformed; + u64 rx_ip_payload_malformed; + u64 rx_ip_ttl_errs; + u64 rx_l3_pclp; + u64 rx_l4_malformed; + u64 rx_l4_csum_errs; + u64 rx_udp_len_errs; + u64 rx_l4_port_errs; + u64 rx_tcp_flag_errs; + u64 rx_tcp_offset_errs; + u64 rx_l4_pclp; + u64 rx_truncated_pkts; + + u64 tx_bytes_ok; + u64 tx_ucast_frames_ok; + u64 tx_bcast_frames_ok; + u64 tx_mcast_frames_ok; + u64 tx_drops; +}; + +struct nicvf_drv_stats { + /* Rx */ + u64 rx_frames_ok; + u64 rx_frames_64; + u64 rx_frames_127; + u64 rx_frames_255; + u64 rx_frames_511; + u64 rx_frames_1023; + u64 rx_frames_1518; + u64 rx_frames_jumbo; + u64 rx_drops; + + /* Tx */ + u64 tx_frames_ok; + u64 tx_drops; + u64 tx_tso; + u64 txq_stop; + u64 txq_wake; +}; + +struct nicvf { + struct nicvf *pnicvf; + struct net_device *netdev; + struct pci_dev *pdev; + u8 vf_id; + u8 node; + bool tns_mode:1; + bool sqs_mode:1; + bool loopback_supported:1; + u16 mtu; + struct queue_set *qs; +#ifdef VNIC_MULTI_QSET_SUPPORT +#define MAX_SQS_PER_VF_SINGLE_NODE 5 +#define MAX_SQS_PER_VF 11 + u8 sqs_id; + u8 sqs_count; /* Secondary Qset count */ + struct nicvf *snicvf[MAX_SQS_PER_VF]; +#endif + u8 rx_queues; + u8 tx_queues; + u8 max_queues; + void __iomem *reg_base; + bool link_up; + u8 duplex; + u32 speed; + struct page *rb_page; + u32 rb_page_offset; + bool rb_alloc_fail; + bool rb_work_scheduled; + struct delayed_work rbdr_work; + struct tasklet_struct rbdr_task; + struct tasklet_struct qs_err_task; + struct tasklet_struct cq_task; + struct nicvf_cq_poll *napi[8]; +#ifdef VNIC_RSS_SUPPORT + struct nicvf_rss_info rss_info; +#endif + u8 cpi_alg; + /* Interrupt coalescing settings */ + u32 cq_coalesce_usecs; + + u32 msg_enable; + struct nicvf_hw_stats hw_stats; + struct nicvf_drv_stats drv_stats; + struct bgx_stats bgx_stats; + struct work_struct reset_task; + + /* MSI-X */ + bool msix_enabled; + u8 num_vec; + struct msix_entry msix_entries[NIC_VF_MSIX_VECTORS]; + char irq_name[NIC_VF_MSIX_VECTORS][20]; + bool irq_allocated[NIC_VF_MSIX_VECTORS]; + + /* VF <-> PF mailbox communication */ + bool pf_acked; + bool pf_nacked; +} ____cacheline_aligned_in_smp; + +/* PF <--> VF Mailbox communication + * Eight 64bit registers are shared between PF and VF. + * Separate set for each VF. + * Writing '1' into last register mbx7 means end of message. + */ + +/* PF <--> VF mailbox communication */ +#define NIC_PF_VF_MAILBOX_SIZE 2 +#define NIC_MBOX_MSG_TIMEOUT 2000 /* ms */ + +/* Mailbox message types */ +#define NIC_MBOX_MSG_READY 0x01 /* Is PF ready to rcv msgs */ +#define NIC_MBOX_MSG_ACK 0x02 /* ACK the message received */ +#define NIC_MBOX_MSG_NACK 0x03 /* NACK the message received */ +#define NIC_MBOX_MSG_QS_CFG 0x04 /* Configure Qset */ +#define NIC_MBOX_MSG_RQ_CFG 0x05 /* Configure receive queue */ +#define NIC_MBOX_MSG_SQ_CFG 0x06 /* Configure Send queue */ +#define NIC_MBOX_MSG_RQ_DROP_CFG 0x07 /* Configure receive queue */ +#define NIC_MBOX_MSG_SET_MAC 0x08 /* Add MAC ID to DMAC filter */ +#define NIC_MBOX_MSG_SET_MAX_FRS 0x09 /* Set max frame size */ +#define NIC_MBOX_MSG_CPI_CFG 0x0A /* Config CPI, RSSI */ +#define NIC_MBOX_MSG_RSS_SIZE 0x0B /* Get RSS indir_tbl size */ +#define NIC_MBOX_MSG_RSS_CFG 0x0C /* Config RSS table */ +#define NIC_MBOX_MSG_RSS_CFG_CONT 0x0D /* RSS config continuation */ +#define NIC_MBOX_MSG_RQ_BP_CFG 0x0E /* RQ backpressure config */ +#define NIC_MBOX_MSG_RQ_SW_SYNC 0x0F /* Flush inflight pkts to RQ */ +#define NIC_MBOX_MSG_BGX_STATS 0x10 /* Get stats from BGX */ +#define NIC_MBOX_MSG_BGX_LINK_CHANGE 0x11 /* BGX:LMAC link status */ +#define NIC_MBOX_MSG_ALLOC_SQS 0x12 /* Allocate secondary Qset */ +#define NIC_MBOX_MSG_NICVF_PTR 0x13 /* Send nicvf ptr to PF */ +#define NIC_MBOX_MSG_PNICVF_PTR 0x14 /* Get primary qset nicvf ptr */ +#define NIC_MBOX_MSG_SNICVF_PTR 0x15 /* Send sqet nicvf ptr to PVF */ +#define NIC_MBOX_MSG_LOOPBACK 0x16 /* Set interface in loopback */ +#define NIC_MBOX_MSG_CFG_DONE 0xF0 /* VF configuration done */ +#define NIC_MBOX_MSG_SHUTDOWN 0xF1 /* VF is being shutdown */ + +struct nic_cfg_msg { + u8 msg; + u8 vf_id; + u8 node_id; + bool tns_mode:1; + bool sqs_mode:1; + bool loopback_supported:1; + u8 mac_addr[ETH_ALEN]; +}; + +/* Qset configuration */ +struct qs_cfg_msg { + u8 msg; + u8 num; + u8 sqs_count; + u64 cfg; +}; + +/* Receive queue configuration */ +struct rq_cfg_msg { + u8 msg; + u8 qs_num; + u8 rq_num; + u64 cfg; +}; + +/* Send queue configuration */ +struct sq_cfg_msg { + u8 msg; + u8 qs_num; + u8 sq_num; + bool sqs_mode; + u64 cfg; +}; + +/* Set VF's MAC address */ +struct set_mac_msg { + u8 msg; + u8 vf_id; + u8 mac_addr[ETH_ALEN]; +}; + +/* Set Maximum frame size */ +struct set_frs_msg { + u8 msg; + u8 vf_id; + u16 max_frs; +}; + +/* Set CPI algorithm type */ +struct cpi_cfg_msg { + u8 msg; + u8 vf_id; + u8 rq_cnt; + u8 cpi_alg; +}; + +/* Get RSS table size */ +struct rss_sz_msg { + u8 msg; + u8 vf_id; + u16 ind_tbl_size; +}; + +/* Set RSS configuration */ +struct rss_cfg_msg { + u8 msg; + u8 vf_id; + u8 hash_bits; + u8 tbl_len; + u8 tbl_offset; +#define RSS_IND_TBL_LEN_PER_MBX_MSG 8 + u8 ind_tbl[RSS_IND_TBL_LEN_PER_MBX_MSG]; +}; + +struct bgx_stats_msg { + u8 msg; + u8 vf_id; + u8 rx; + u8 idx; + u64 stats; +}; + +/* Physical interface link status */ +struct bgx_link_status { + u8 msg; + u8 link_up; + u8 duplex; + u32 speed; +}; + +#ifdef VNIC_MULTI_QSET_SUPPORT +/* Get Extra Qset IDs */ +struct sqs_alloc { + u8 msg; + u8 vf_id; + u8 qs_count; +}; + +struct nicvf_ptr { + u8 msg; + u8 vf_id; + bool sqs_mode; + u8 sqs_id; + u64 nicvf; +}; +#endif + +/* Set interface in loopback mode */ +struct set_loopback { + u8 msg; + u8 vf_id; + bool enable; +}; + +/* 128 bit shared memory between PF and each VF */ +union nic_mbx { + struct { u8 msg; } msg; + struct nic_cfg_msg nic_cfg; + struct qs_cfg_msg qs; + struct rq_cfg_msg rq; + struct sq_cfg_msg sq; + struct set_mac_msg mac; + struct set_frs_msg frs; + struct cpi_cfg_msg cpi_cfg; + struct rss_sz_msg rss_size; + struct rss_cfg_msg rss_cfg; + struct bgx_stats_msg bgx_stats; + struct bgx_link_status link_status; +#ifdef VNIC_MULTI_QSET_SUPPORT + struct sqs_alloc sqs_alloc; + struct nicvf_ptr nicvf; +#endif + struct set_loopback lbk; +}; + +#define NIC_NODE_ID_MASK 0x03 +#define NIC_NODE_ID_SHIFT 44 + +static inline int nic_get_node_id(struct pci_dev *pdev) +{ + u64 addr = pci_resource_start(pdev, PCI_CFG_REG_BAR_NUM); + return ((addr >> NIC_NODE_ID_SHIFT) & NIC_NODE_ID_MASK); +} + +int nicvf_set_real_num_queues(struct net_device *netdev, + int tx_queues, int rx_queues); +int nicvf_open(struct net_device *netdev); +int nicvf_stop(struct net_device *netdev); +int nicvf_send_msg_to_pf(struct nicvf *vf, union nic_mbx *mbx); +void nicvf_config_rss(struct nicvf *nic); +void nicvf_set_rss_key(struct nicvf *nic); +void nicvf_set_ethtool_ops(struct net_device *netdev); +void nicvf_update_stats(struct nicvf *nic); +void nicvf_update_lmac_stats(struct nicvf *nic); + +#endif /* NIC_H */ Added: head/sys/dev/vnic/nic_main.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/vnic/nic_main.c Sun Oct 18 21:39:15 2015 (r289550) @@ -0,0 +1,1192 @@ +/* + * Copyright (C) 2015 Cavium Inc. + * 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 "nic_reg.h" +#include "nic.h" +#include "q_struct.h" +#include "thunder_bgx.h" + +#define DRV_NAME "thunder-nic" +#define DRV_VERSION "1.0" + +struct nicpf { + struct pci_dev *pdev; + u8 rev_id; + u8 node; + unsigned int flags; + u8 num_vf_en; /* No of VF enabled */ + bool vf_enabled[MAX_NUM_VFS_SUPPORTED]; + void __iomem *reg_base; /* Register start address */ +#ifdef VNIC_MULTI_QSET_SUPPORT + u8 num_sqs_en; /* Secondary qsets enabled */ + u64 nicvf[MAX_NUM_VFS_SUPPORTED]; + u8 vf_sqs[MAX_NUM_VFS_SUPPORTED][MAX_SQS_PER_VF]; + u8 pqs_vf[MAX_NUM_VFS_SUPPORTED]; + bool sqs_used[MAX_NUM_VFS_SUPPORTED]; +#endif + struct pkind_cfg pkind; +#define NIC_SET_VF_LMAC_MAP(bgx, lmac) (((bgx & 0xF) << 4) | (lmac & 0xF)) +#define NIC_GET_BGX_FROM_VF_LMAC_MAP(map) ((map >> 4) & 0xF) +#define NIC_GET_LMAC_FROM_VF_LMAC_MAP(map) (map & 0xF) + u8 vf_lmac_map[MAX_LMAC]; + struct delayed_work dwork; + struct workqueue_struct *check_link; + u8 link[MAX_LMAC]; + u8 duplex[MAX_LMAC]; + u32 speed[MAX_LMAC]; + u16 cpi_base[MAX_NUM_VFS_SUPPORTED]; + u16 rss_ind_tbl_size; + bool mbx_lock[MAX_NUM_VFS_SUPPORTED]; + + /* MSI-X */ + bool msix_enabled; + u8 num_vec; + struct msix_entry msix_entries[NIC_PF_MSIX_VECTORS]; + bool irq_allocated[NIC_PF_MSIX_VECTORS]; +}; + +/* Supported devices */ +static const struct pci_device_id nic_id_table[] = { + { PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, PCI_DEVICE_ID_THUNDER_NIC_PF) }, + { 0, } /* end of table */ +}; + +MODULE_AUTHOR("Sunil Goutham"); +MODULE_DESCRIPTION("Cavium Thunder NIC Physical Function Driver"); +MODULE_VERSION(DRV_VERSION); +MODULE_DEVICE_TABLE(pci, nic_id_table); + +/* The Cavium ThunderX network controller can *only* be found in SoCs + * containing the ThunderX ARM64 CPU implementation. All accesses to the device + * registers on this platform are implicitly strongly ordered with respect + * to memory accesses. So writeq_relaxed() and readq_relaxed() are safe to use + * with no memory barriers in this driver. The readq()/writeq() functions add + * explicit ordering operation which in this case are redundant, and only + * add overhead. + */ + +/* Register read/write APIs */ +static void nic_reg_write(struct nicpf *nic, u64 offset, u64 val) +{ + writeq_relaxed(val, nic->reg_base + offset); +} + +static u64 nic_reg_read(struct nicpf *nic, u64 offset) +{ + return readq_relaxed(nic->reg_base + offset); +} + +/* PF -> VF mailbox communication APIs */ +static void nic_enable_mbx_intr(struct nicpf *nic) +{ + /* Enable mailbox interrupt for all 128 VFs */ + nic_reg_write(nic, NIC_PF_MAILBOX_ENA_W1S, ~0ull); + nic_reg_write(nic, NIC_PF_MAILBOX_ENA_W1S + sizeof(u64), ~0ull); +} + +static void nic_clear_mbx_intr(struct nicpf *nic, int vf, int mbx_reg) +{ + nic_reg_write(nic, NIC_PF_MAILBOX_INT + (mbx_reg << 3), BIT_ULL(vf)); +} + +static u64 nic_get_mbx_addr(int vf) +{ + return NIC_PF_VF_0_127_MAILBOX_0_1 + (vf << NIC_VF_NUM_SHIFT); +} + +/* Send a mailbox message to VF + * @vf: vf to which this message to be sent + * @mbx: Message to be sent + */ +static void nic_send_msg_to_vf(struct nicpf *nic, int vf, union nic_mbx *mbx) +{ + void __iomem *mbx_addr = nic->reg_base + nic_get_mbx_addr(vf); + u64 *msg = (u64 *)mbx; + + /* In first revision HW, mbox interrupt is triggerred + * when PF writes to MBOX(1), in next revisions when + * PF writes to MBOX(0) + */ + if (nic->rev_id == 0) { + /* see the comment for nic_reg_write()/nic_reg_read() + * functions above + */ + writeq_relaxed(msg[0], mbx_addr); + writeq_relaxed(msg[1], mbx_addr + 8); + } else { + writeq_relaxed(msg[1], mbx_addr + 8); + writeq_relaxed(msg[0], mbx_addr); + } +} + +/* Responds to VF's READY message with VF's + * ID, node, MAC address e.t.c + * @vf: VF which sent READY message + */ +static void nic_mbx_send_ready(struct nicpf *nic, int vf) +{ + union nic_mbx mbx = {}; + int bgx_idx, lmac; + const char *mac; + + mbx.nic_cfg.msg = NIC_MBOX_MSG_READY; + mbx.nic_cfg.vf_id = vf; + + if (nic->flags & NIC_TNS_ENABLED) + mbx.nic_cfg.tns_mode = NIC_TNS_MODE; + else + mbx.nic_cfg.tns_mode = NIC_TNS_BYPASS_MODE; + + if (vf < MAX_LMAC) { + bgx_idx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]); + lmac = NIC_GET_LMAC_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]); + + mac = bgx_get_lmac_mac(nic->node, bgx_idx, lmac); + if (mac) + ether_addr_copy((u8 *)&mbx.nic_cfg.mac_addr, mac); + } +#ifdef VNIC_MULTI_QSET_SUPPORT + mbx.nic_cfg.sqs_mode = (vf >= nic->num_vf_en) ? true : false; +#endif + mbx.nic_cfg.node_id = nic->node; + + mbx.nic_cfg.loopback_supported = vf < MAX_LMAC; + + nic_send_msg_to_vf(nic, vf, &mbx); +} + +/* ACKs VF's mailbox message + * @vf: VF to which ACK to be sent + */ +static void nic_mbx_send_ack(struct nicpf *nic, int vf) +{ + union nic_mbx mbx = {}; + + mbx.msg.msg = NIC_MBOX_MSG_ACK; + nic_send_msg_to_vf(nic, vf, &mbx); +} + +/* NACKs VF's mailbox message that PF is not able to + * complete the action + * @vf: VF to which ACK to be sent + */ +static void nic_mbx_send_nack(struct nicpf *nic, int vf) +{ + union nic_mbx mbx = {}; + + mbx.msg.msg = NIC_MBOX_MSG_NACK; + nic_send_msg_to_vf(nic, vf, &mbx); +} + +/* Flush all in flight receive packets to memory and + * bring down an active RQ + */ +static int nic_rcv_queue_sw_sync(struct nicpf *nic) +{ + u16 timeout = ~0x00; + + nic_reg_write(nic, NIC_PF_SW_SYNC_RX, 0x01); + /* Wait till sync cycle is finished */ + while (timeout) { + if (nic_reg_read(nic, NIC_PF_SW_SYNC_RX_DONE) & 0x1) + break; + timeout--; + } + nic_reg_write(nic, NIC_PF_SW_SYNC_RX, 0x00); + if (!timeout) { + dev_err(&nic->pdev->dev, "Receive queue software sync failed"); + return 1; + } + return 0; +} + +/* Get BGX Rx/Tx stats and respond to VF's request */ +static void nic_get_bgx_stats(struct nicpf *nic, struct bgx_stats_msg *bgx) +{ + int bgx_idx, lmac; + union nic_mbx mbx = {}; + + bgx_idx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[bgx->vf_id]); + lmac = NIC_GET_LMAC_FROM_VF_LMAC_MAP(nic->vf_lmac_map[bgx->vf_id]); + + mbx.bgx_stats.msg = NIC_MBOX_MSG_BGX_STATS; + mbx.bgx_stats.vf_id = bgx->vf_id; + mbx.bgx_stats.rx = bgx->rx; + mbx.bgx_stats.idx = bgx->idx; + if (bgx->rx) + mbx.bgx_stats.stats = bgx_get_rx_stats(nic->node, bgx_idx, + lmac, bgx->idx); + else + mbx.bgx_stats.stats = bgx_get_tx_stats(nic->node, bgx_idx, + lmac, bgx->idx); + nic_send_msg_to_vf(nic, bgx->vf_id, &mbx); +} + +/* Update hardware min/max frame size */ +static int nic_update_hw_frs(struct nicpf *nic, int new_frs, int vf) +{ + if ((new_frs > NIC_HW_MAX_FRS) || (new_frs < NIC_HW_MIN_FRS)) { + dev_err(&nic->pdev->dev, + "Invalid MTU setting from VF%d rejected, should be between %d and %d\n", + vf, NIC_HW_MIN_FRS, NIC_HW_MAX_FRS); + return 1; + } + new_frs += ETH_HLEN; + if (new_frs <= nic->pkind.maxlen) + return 0; + + nic->pkind.maxlen = new_frs; + nic_reg_write(nic, NIC_PF_PKIND_0_15_CFG, *(u64 *)&nic->pkind); + return 0; +} + +/* Set minimum transmit packet size */ +static void nic_set_tx_pkt_pad(struct nicpf *nic, int size) +{ + int lmac; + u64 lmac_cfg; + + /* Max value that can be set is 60 */ + if (size > 60) + size = 60; + + for (lmac = 0; lmac < (MAX_BGX_PER_CN88XX * MAX_LMAC_PER_BGX); lmac++) { + lmac_cfg = nic_reg_read(nic, NIC_PF_LMAC_0_7_CFG | (lmac << 3)); + lmac_cfg &= ~(0xF << 2); + lmac_cfg |= ((size / 4) << 2); + nic_reg_write(nic, NIC_PF_LMAC_0_7_CFG | (lmac << 3), lmac_cfg); + } +} + +/* Function to check number of LMACs present and set VF::LMAC mapping. + * Mapping will be used while initializing channels. + */ +static void nic_set_lmac_vf_mapping(struct nicpf *nic) +{ + unsigned bgx_map = bgx_get_map(nic->node); + int bgx, next_bgx_lmac = 0; + int lmac, lmac_cnt = 0; + u64 lmac_credit; + + nic->num_vf_en = 0; + if (nic->flags & NIC_TNS_ENABLED) { + nic->num_vf_en = DEFAULT_NUM_VF_ENABLED; + return; + } + + for (bgx = 0; bgx < NIC_MAX_BGX; bgx++) { + if (!(bgx_map & (1 << bgx))) + continue; + lmac_cnt = bgx_get_lmac_count(nic->node, bgx); + for (lmac = 0; lmac < lmac_cnt; lmac++) + nic->vf_lmac_map[next_bgx_lmac++] = + NIC_SET_VF_LMAC_MAP(bgx, lmac); + nic->num_vf_en += lmac_cnt; + + /* Program LMAC credits */ + lmac_credit = (1ull << 1); /* channel credit enable */ + lmac_credit |= (0x1ff << 2); /* Max outstanding pkt count */ + /* 48KB BGX Tx buffer size, each unit is of size 16bytes */ + lmac_credit |= (((((48 * 1024) / lmac_cnt) - + NIC_HW_MAX_FRS) / 16) << 12); + lmac = bgx * MAX_LMAC_PER_BGX; + for (; lmac < lmac_cnt + (bgx * MAX_LMAC_PER_BGX); lmac++) + nic_reg_write(nic, + NIC_PF_LMAC_0_7_CREDIT + (lmac * 8), + lmac_credit); + } +} + +#define TNS_PORT0_BLOCK 6 +#define TNS_PORT1_BLOCK 7 +#define BGX0_BLOCK 8 +#define BGX1_BLOCK 9 + +static void nic_init_hw(struct nicpf *nic) +{ + int i; + + /* Reset NIC, in case the driver is repeatedly inserted and removed */ + nic_reg_write(nic, NIC_PF_SOFT_RESET, 1); + + /* Enable NIC HW block */ + nic_reg_write(nic, NIC_PF_CFG, 0x3); + + /* Enable backpressure */ + nic_reg_write(nic, NIC_PF_BP_CFG, (1ULL << 6) | 0x03); + + if (nic->flags & NIC_TNS_ENABLED) { + nic_reg_write(nic, NIC_PF_INTF_0_1_SEND_CFG, + (NIC_TNS_MODE << 7) | TNS_PORT0_BLOCK); + nic_reg_write(nic, NIC_PF_INTF_0_1_SEND_CFG | (1 << 8), + (NIC_TNS_MODE << 7) | TNS_PORT1_BLOCK); + nic_reg_write(nic, NIC_PF_INTF_0_1_BP_CFG, + (1ULL << 63) | TNS_PORT0_BLOCK); + nic_reg_write(nic, NIC_PF_INTF_0_1_BP_CFG + (1 << 8), + (1ULL << 63) | TNS_PORT1_BLOCK); + + } else { + /* Disable TNS mode on both interfaces */ + nic_reg_write(nic, NIC_PF_INTF_0_1_SEND_CFG, + (NIC_TNS_BYPASS_MODE << 7) | BGX0_BLOCK); + nic_reg_write(nic, NIC_PF_INTF_0_1_SEND_CFG | (1 << 8), + (NIC_TNS_BYPASS_MODE << 7) | BGX1_BLOCK); + nic_reg_write(nic, NIC_PF_INTF_0_1_BP_CFG, + (1ULL << 63) | BGX0_BLOCK); + nic_reg_write(nic, NIC_PF_INTF_0_1_BP_CFG + (1 << 8), + (1ULL << 63) | BGX1_BLOCK); + } + + /* PKIND configuration */ + nic->pkind.minlen = 0; + nic->pkind.maxlen = NIC_HW_MAX_FRS + ETH_HLEN; + nic->pkind.lenerr_en = 1; + nic->pkind.rx_hdr = 0; + nic->pkind.hdr_sl = 0; + + for (i = 0; i < NIC_MAX_PKIND; i++) + nic_reg_write(nic, NIC_PF_PKIND_0_15_CFG | (i << 3), + *(u64 *)&nic->pkind); + + nic_set_tx_pkt_pad(nic, NIC_HW_MIN_FRS); + + /* Timer config */ + nic_reg_write(nic, NIC_PF_INTR_TIMER_CFG, NICPF_CLK_PER_INT_TICK); + + /* Enable VLAN ethertype matching and stripping */ + nic_reg_write(nic, NIC_PF_RX_ETYPE_0_7, + (2 << 19) | (ETYPE_ALG_VLAN_STRIP << 16) | ETH_P_8021Q); +} + +/* Channel parse index configuration */ +static void nic_config_cpi(struct nicpf *nic, struct cpi_cfg_msg *cfg) +{ + u32 vnic, bgx, lmac, chan; + u32 padd, cpi_count = 0; + u64 cpi_base, cpi, rssi_base, rssi; + u8 qset, rq_idx = 0; + + vnic = cfg->vf_id; + bgx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vnic]); + lmac = NIC_GET_LMAC_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vnic]); + + chan = (lmac * MAX_BGX_CHANS_PER_LMAC) + (bgx * NIC_CHANS_PER_INF); + cpi_base = (lmac * NIC_MAX_CPI_PER_LMAC) + (bgx * NIC_CPI_PER_BGX); + rssi_base = (lmac * nic->rss_ind_tbl_size) + (bgx * NIC_RSSI_PER_BGX); + + /* Rx channel configuration */ + nic_reg_write(nic, NIC_PF_CHAN_0_255_RX_BP_CFG | (chan << 3), + (1ull << 63) | (vnic << 0)); + nic_reg_write(nic, NIC_PF_CHAN_0_255_RX_CFG | (chan << 3), + ((u64)cfg->cpi_alg << 62) | (cpi_base << 48)); + + if (cfg->cpi_alg == CPI_ALG_NONE) + cpi_count = 1; + else if (cfg->cpi_alg == CPI_ALG_VLAN) /* 3 bits of PCP */ + cpi_count = 8; + else if (cfg->cpi_alg == CPI_ALG_VLAN16) /* 3 bits PCP + DEI */ + cpi_count = 16; + else if (cfg->cpi_alg == CPI_ALG_DIFF) /* 6bits DSCP */ + cpi_count = NIC_MAX_CPI_PER_LMAC; + + /* RSS Qset, Qidx mapping */ + qset = cfg->vf_id; + rssi = rssi_base; + for (; rssi < (rssi_base + cfg->rq_cnt); rssi++) { + nic_reg_write(nic, NIC_PF_RSSI_0_4097_RQ | (rssi << 3), + (qset << 3) | rq_idx); + rq_idx++; + } + + rssi = 0; + cpi = cpi_base; + for (; cpi < (cpi_base + cpi_count); cpi++) { + /* Determine port to channel adder */ + if (cfg->cpi_alg != CPI_ALG_DIFF) + padd = cpi % cpi_count; + else + padd = cpi % 8; /* 3 bits CS out of 6bits DSCP */ + + /* Leave RSS_SIZE as '0' to disable RSS */ + nic_reg_write(nic, NIC_PF_CPI_0_2047_CFG | (cpi << 3), + (vnic << 24) | (padd << 16) | (rssi_base + rssi)); + + if ((rssi + 1) >= cfg->rq_cnt) + continue; + + if (cfg->cpi_alg == CPI_ALG_VLAN) + rssi++; + else if (cfg->cpi_alg == CPI_ALG_VLAN16) + rssi = ((cpi - cpi_base) & 0xe) >> 1; + else if (cfg->cpi_alg == CPI_ALG_DIFF) + rssi = ((cpi - cpi_base) & 0x38) >> 3; + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Oct 18 22:03: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 DCB7DA183B9; Sun, 18 Oct 2015 22:02:59 +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 A4EB1BF2; Sun, 18 Oct 2015 22:02:59 +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 t9IM2wlZ025865; Sun, 18 Oct 2015 22:02:58 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IM2wL0025859; Sun, 18 Oct 2015 22:02:58 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201510182202.t9IM2wL0025859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Sun, 18 Oct 2015 22:02:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289551 - in head/sys: conf dev/vnic X-SVN-Group: head MIME-Version: 1.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, 18 Oct 2015 22:03:00 -0000 Author: zbb Date: Sun Oct 18 22:02:58 2015 New Revision: 289551 URL: https://svnweb.freebsd.org/changeset/base/289551 Log: Introduce initial support for Cavium's ThunderX networking interface - The driver consists of three main componens: PF, VF, BGX - Requires appropriate entries in DTS and MDIO driver - Supports only FDT configuration - Multiple Tx queues and single Rx queue supported - No RSS, HW checksum and TSO support - No more than 8 queues per-IF (only one Queue Set per IF) - HW statistics enabled - Works in all available MAC modes (1,10,20,40G) - Style converted to BSD according to style(9) - The code brings lmac_if interface used by the BGX driver to update its logical MACs state. Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Added: head/sys/dev/vnic/lmac_if.m (contents, props changed) head/sys/dev/vnic/thunder_bgx_fdt.c (contents, props changed) head/sys/dev/vnic/thunder_bgx_var.h (contents, props changed) Modified: head/sys/conf/files.arm64 head/sys/dev/vnic/nic.h head/sys/dev/vnic/nic_main.c head/sys/dev/vnic/nic_reg.h head/sys/dev/vnic/nicvf_main.c head/sys/dev/vnic/nicvf_queues.c head/sys/dev/vnic/nicvf_queues.h head/sys/dev/vnic/q_struct.h head/sys/dev/vnic/thunder_bgx.c head/sys/dev/vnic/thunder_bgx.h Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Sun Oct 18 21:39:15 2015 (r289550) +++ head/sys/conf/files.arm64 Sun Oct 18 22:02:58 2015 (r289551) @@ -68,6 +68,12 @@ dev/psci/psci_arm64.S optional psci dev/uart/uart_cpu_fdt.c optional uart fdt dev/uart/uart_dev_pl011.c optional uart pl011 dev/usb/controller/dwc_otg_hisi.c optional dwcotg soc_hisi_hi6220 +dev/vnic/nic_main.c optional vnic pci +dev/vnic/nicvf_main.c optional vnic pci pci_iov +dev/vnic/nicvf_queues.c optional vnic pci pci_iov +dev/vnic/thunder_bgx_fdt.c optional vnic fdt +dev/vnic/thunder_bgx.c optional vnic pci +dev/vnic/lmac_if.m optional vnic kern/kern_clocksource.c standard kern/subr_dummy_vdso_tc.c standard libkern/bcmp.c standard Added: head/sys/dev/vnic/lmac_if.m ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/vnic/lmac_if.m Sun Oct 18 22:02:58 2015 (r289551) @@ -0,0 +1,102 @@ +#- +# Copyright (c) 2015 The FreeBSD Foundation +# All rights reserved. +# +# This software was developed by Semihalf under +# the sponsorship of the FreeBSD Foundation. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +# LMAC (BGX controller) interface description +# + +INTERFACE lmac; + +CODE { + static int null_lmac_media_status(device_t dev, int lmacid, int *link, + int *duplex, int *speed) + { + return (ENXIO); + } + + static int null_lmac_media_change(device_t dev, int lmacid, int link, + int duplex, int speed) + { + return (ENXIO); + } + + static int null_lmac_phy_connect(device_t dev, int lmacid, int phy) + { + return (ENXIO); + } + + static int null_lmac_phy_disconnect(device_t dev, int lmacid, int phy) + { + return (ENXIO); + } +}; + +# Get link status +# +# 0 : Success +# +METHOD int media_status { + device_t dev; + int lmacid; + int * link; + int * duplex; + int * speed; +} DEFAULT null_lmac_media_status; + +# Change link status +# +# 0 : Success +# +METHOD int media_change { + device_t dev; + int lmacid; + int link; + int duplex; + int speed; +} DEFAULT null_lmac_media_change; + +# Connect PHY +# +# 0 : Success +# +METHOD int phy_connect { + device_t dev; + int lmacid; + int phy; +} DEFAULT null_lmac_phy_connect; + +# Disconnect PHY +# +# 0 : Success +# +METHOD int phy_disconnect { + device_t dev; + int lmacid; + int phy; +} DEFAULT null_lmac_phy_disconnect; Modified: head/sys/dev/vnic/nic.h ============================================================================== --- head/sys/dev/vnic/nic.h Sun Oct 18 21:39:15 2015 (r289550) +++ head/sys/dev/vnic/nic.h Sun Oct 18 22:02:58 2015 (r289551) @@ -30,11 +30,8 @@ #ifndef NIC_H #define NIC_H -#include -#include -#include -#include "thunder_bgx.h" - +/* PCI vendor ID */ +#define PCI_VENDOR_ID_CAVIUM 0x177D /* PCI device IDs */ #define PCI_DEVICE_ID_THUNDER_NIC_PF 0xA01E #define PCI_DEVICE_ID_THUNDER_PASS1_NIC_VF 0x0011 @@ -53,12 +50,15 @@ #define NIC_TNS_MODE 1 /* NIC priv flags */ -#define NIC_SRIOV_ENABLED BIT(0) -#define NIC_TNS_ENABLED BIT(1) +#define NIC_SRIOV_ENABLED (1 << 0) +#define NIC_TNS_ENABLED (1 << 1) +/* ARM64TODO */ +#if 0 /* VNIC HW optimiation features */ #define VNIC_RSS_SUPPORT #define VNIC_MULTI_QSET_SUPPORT +#endif /* Min/Max packet size */ #define NIC_HW_MIN_FRS 64 @@ -67,7 +67,8 @@ /* Max pkinds */ #define NIC_MAX_PKIND 16 -/* Rx Channels */ +/* + * Rx Channels */ /* Receive channel configuration in TNS bypass mode * Below is configuration in TNS bypass mode * BGX0-LMAC0-CHAN0 - VNIC CHAN0 @@ -83,7 +84,7 @@ #define NIC_CPI_COUNT 2048 /* No of channel parse indices */ /* TNS bypass mode: 1-1 mapping between VNIC and BGX:LMAC */ -#define NIC_MAX_BGX MAX_BGX_PER_CN88XX +#define NIC_MAX_BGX MAX_BGX_PER_CN88XX #define NIC_CPI_PER_BGX (NIC_CPI_COUNT / NIC_MAX_BGX) #define NIC_MAX_CPI_PER_LMAC 64 /* Max when CPI_ALG is IP diffserv */ #define NIC_RSSI_PER_BGX (NIC_RSSI_COUNT / NIC_MAX_BGX) @@ -122,27 +123,33 @@ #define NICVF_INTR_CQ_MASK (0xFF << NICVF_INTR_CQ_SHIFT) #define NICVF_INTR_SQ_MASK (0xFF << NICVF_INTR_SQ_SHIFT) #define NICVF_INTR_RBDR_MASK (0x03 << NICVF_INTR_RBDR_SHIFT) -#define NICVF_INTR_PKT_DROP_MASK BIT(NICVF_INTR_PKT_DROP_SHIFT) -#define NICVF_INTR_TCP_TIMER_MASK BIT(NICVF_INTR_TCP_TIMER_SHIFT) -#define NICVF_INTR_MBOX_MASK BIT(NICVF_INTR_MBOX_SHIFT) -#define NICVF_INTR_QS_ERR_MASK BIT(NICVF_INTR_QS_ERR_SHIFT) +#define NICVF_INTR_PKT_DROP_MASK (1 << NICVF_INTR_PKT_DROP_SHIFT) +#define NICVF_INTR_TCP_TIMER_MASK (1 << NICVF_INTR_TCP_TIMER_SHIFT) +#define NICVF_INTR_MBOX_MASK (1 << NICVF_INTR_MBOX_SHIFT) +#define NICVF_INTR_QS_ERR_MASK (1 << NICVF_INTR_QS_ERR_SHIFT) /* MSI-X interrupts */ #define NIC_PF_MSIX_VECTORS 10 #define NIC_VF_MSIX_VECTORS 20 -#define NIC_PF_INTR_ID_ECC0_SBE 0 -#define NIC_PF_INTR_ID_ECC0_DBE 1 -#define NIC_PF_INTR_ID_ECC1_SBE 2 -#define NIC_PF_INTR_ID_ECC1_DBE 3 -#define NIC_PF_INTR_ID_ECC2_SBE 4 -#define NIC_PF_INTR_ID_ECC2_DBE 5 -#define NIC_PF_INTR_ID_ECC3_SBE 6 -#define NIC_PF_INTR_ID_ECC3_DBE 7 -#define NIC_PF_INTR_ID_MBOX0 8 -#define NIC_PF_INTR_ID_MBOX1 9 +#define NIC_PF_INTR_ID_ECC0_SBE 0 +#define NIC_PF_INTR_ID_ECC0_DBE 1 +#define NIC_PF_INTR_ID_ECC1_SBE 2 +#define NIC_PF_INTR_ID_ECC1_DBE 3 +#define NIC_PF_INTR_ID_ECC2_SBE 4 +#define NIC_PF_INTR_ID_ECC2_DBE 5 +#define NIC_PF_INTR_ID_ECC3_SBE 6 +#define NIC_PF_INTR_ID_ECC3_DBE 7 +#define NIC_PF_INTR_ID_MBOX0 8 +#define NIC_PF_INTR_ID_MBOX1 9 + +struct msix_entry { + struct resource * irq_res; + void * handle; +}; -/* Global timer for CQ timer thresh interrupts +/* + * Global timer for CQ timer thresh interrupts * Calculated for SCLK of 700Mhz * value written should be a 1/16th of what is expected * @@ -151,7 +158,8 @@ */ #define NICPF_CLK_PER_INT_TICK 2 -/* Time to wait before we decide that a SQ is stuck. +/* + * Time to wait before we decide that a SQ is stuck. * * Since both pkt rx and tx notifications are done with same CQ, * when packets are being received at very high rate (eg: L2 forwarding) @@ -160,36 +168,10 @@ */ #define NICVF_TX_TIMEOUT (50 * HZ) -struct nicvf_cq_poll { - struct nicvf *nicvf; - u8 cq_idx; /* Completion queue index */ - struct napi_struct napi; -}; - #define NIC_RSSI_COUNT 4096 /* Total no of RSS indices */ -#define NIC_MAX_RSS_HASH_BITS 8 -#define NIC_MAX_RSS_IDR_TBL_SIZE (1 << NIC_MAX_RSS_HASH_BITS) -#define RSS_HASH_KEY_SIZE 5 /* 320 bit key */ - -#ifdef VNIC_RSS_SUPPORT -struct nicvf_rss_info { - bool enable; -#define RSS_L2_EXTENDED_HASH_ENA BIT(0) -#define RSS_IP_HASH_ENA BIT(1) -#define RSS_TCP_HASH_ENA BIT(2) -#define RSS_TCP_SYN_DIS BIT(3) -#define RSS_UDP_HASH_ENA BIT(4) -#define RSS_L4_EXTENDED_HASH_ENA BIT(5) -#define RSS_ROCE_ENA BIT(6) -#define RSS_L3_BI_DIRECTION_ENA BIT(7) -#define RSS_L4_BI_DIRECTION_ENA BIT(8) - u64 cfg; - u8 hash_bits; - u16 rss_size; - u8 ind_tbl[NIC_MAX_RSS_IDR_TBL_SIZE]; - u64 key[RSS_HASH_KEY_SIZE]; -} ____cacheline_aligned_in_smp; -#endif +#define NIC_MAX_RSS_HASH_BITS 8 +#define NIC_MAX_RSS_IDR_TBL_SIZE (1 << NIC_MAX_RSS_HASH_BITS) +#define RSS_HASH_KEY_SIZE 5 /* 320 bit key */ enum rx_stats_reg_offset { RX_OCTS = 0x0, @@ -219,132 +201,124 @@ enum tx_stats_reg_offset { }; struct nicvf_hw_stats { - u64 rx_bytes; - u64 rx_ucast_frames; - u64 rx_bcast_frames; - u64 rx_mcast_frames; - u64 rx_fcs_errors; - u64 rx_l2_errors; - u64 rx_drop_red; - u64 rx_drop_red_bytes; - u64 rx_drop_overrun; - u64 rx_drop_overrun_bytes; - u64 rx_drop_bcast; - u64 rx_drop_mcast; - u64 rx_drop_l3_bcast; - u64 rx_drop_l3_mcast; - u64 rx_bgx_truncated_pkts; - u64 rx_jabber_errs; - u64 rx_fcs_errs; - u64 rx_bgx_errs; - u64 rx_prel2_errs; - u64 rx_l2_hdr_malformed; - u64 rx_oversize; - u64 rx_undersize; - u64 rx_l2_len_mismatch; - u64 rx_l2_pclp; - u64 rx_ip_ver_errs; - u64 rx_ip_csum_errs; - u64 rx_ip_hdr_malformed; - u64 rx_ip_payload_malformed; - u64 rx_ip_ttl_errs; - u64 rx_l3_pclp; - u64 rx_l4_malformed; - u64 rx_l4_csum_errs; - u64 rx_udp_len_errs; - u64 rx_l4_port_errs; - u64 rx_tcp_flag_errs; - u64 rx_tcp_offset_errs; - u64 rx_l4_pclp; - u64 rx_truncated_pkts; - - u64 tx_bytes_ok; - u64 tx_ucast_frames_ok; - u64 tx_bcast_frames_ok; - u64 tx_mcast_frames_ok; - u64 tx_drops; + uint64_t rx_bytes; + uint64_t rx_ucast_frames; + uint64_t rx_bcast_frames; + uint64_t rx_mcast_frames; + uint64_t rx_fcs_errors; + uint64_t rx_l2_errors; + uint64_t rx_drop_red; + uint64_t rx_drop_red_bytes; + uint64_t rx_drop_overrun; + uint64_t rx_drop_overrun_bytes; + uint64_t rx_drop_bcast; + uint64_t rx_drop_mcast; + uint64_t rx_drop_l3_bcast; + uint64_t rx_drop_l3_mcast; + uint64_t rx_bgx_truncated_pkts; + uint64_t rx_jabber_errs; + uint64_t rx_fcs_errs; + uint64_t rx_bgx_errs; + uint64_t rx_prel2_errs; + uint64_t rx_l2_hdr_malformed; + uint64_t rx_oversize; + uint64_t rx_undersize; + uint64_t rx_l2_len_mismatch; + uint64_t rx_l2_pclp; + uint64_t rx_ip_ver_errs; + uint64_t rx_ip_csum_errs; + uint64_t rx_ip_hdr_malformed; + uint64_t rx_ip_payload_malformed; + uint64_t rx_ip_ttl_errs; + uint64_t rx_l3_pclp; + uint64_t rx_l4_malformed; + uint64_t rx_l4_csum_errs; + uint64_t rx_udp_len_errs; + uint64_t rx_l4_port_errs; + uint64_t rx_tcp_flag_errs; + uint64_t rx_tcp_offset_errs; + uint64_t rx_l4_pclp; + uint64_t rx_truncated_pkts; + + uint64_t tx_bytes_ok; + uint64_t tx_ucast_frames_ok; + uint64_t tx_bcast_frames_ok; + uint64_t tx_mcast_frames_ok; + uint64_t tx_drops; }; struct nicvf_drv_stats { /* Rx */ - u64 rx_frames_ok; - u64 rx_frames_64; - u64 rx_frames_127; - u64 rx_frames_255; - u64 rx_frames_511; - u64 rx_frames_1023; - u64 rx_frames_1518; - u64 rx_frames_jumbo; - u64 rx_drops; + uint64_t rx_frames_ok; + uint64_t rx_frames_64; + uint64_t rx_frames_127; + uint64_t rx_frames_255; + uint64_t rx_frames_511; + uint64_t rx_frames_1023; + uint64_t rx_frames_1518; + uint64_t rx_frames_jumbo; + uint64_t rx_drops; /* Tx */ - u64 tx_frames_ok; - u64 tx_drops; - u64 tx_tso; - u64 txq_stop; - u64 txq_wake; + uint64_t tx_frames_ok; + uint64_t tx_drops; + uint64_t tx_tso; + uint64_t txq_stop; + uint64_t txq_wake; }; struct nicvf { struct nicvf *pnicvf; - struct net_device *netdev; - struct pci_dev *pdev; - u8 vf_id; - u8 node; - bool tns_mode:1; - bool sqs_mode:1; + device_t dev; + + struct ifnet * ifp; + struct sx core_sx; + struct ifmedia if_media; + uint32_t if_flags; + + uint8_t hwaddr[ETHER_ADDR_LEN]; + uint8_t vf_id; + uint8_t node; + boolean_t tns_mode:1; + boolean_t sqs_mode:1; bool loopback_supported:1; - u16 mtu; + uint16_t mtu; struct queue_set *qs; -#ifdef VNIC_MULTI_QSET_SUPPORT -#define MAX_SQS_PER_VF_SINGLE_NODE 5 -#define MAX_SQS_PER_VF 11 - u8 sqs_id; - u8 sqs_count; /* Secondary Qset count */ - struct nicvf *snicvf[MAX_SQS_PER_VF]; -#endif - u8 rx_queues; - u8 tx_queues; - u8 max_queues; - void __iomem *reg_base; - bool link_up; - u8 duplex; - u32 speed; - struct page *rb_page; - u32 rb_page_offset; - bool rb_alloc_fail; - bool rb_work_scheduled; - struct delayed_work rbdr_work; - struct tasklet_struct rbdr_task; - struct tasklet_struct qs_err_task; - struct tasklet_struct cq_task; - struct nicvf_cq_poll *napi[8]; -#ifdef VNIC_RSS_SUPPORT - struct nicvf_rss_info rss_info; -#endif - u8 cpi_alg; + uint8_t rx_queues; + uint8_t tx_queues; + uint8_t max_queues; + struct resource *reg_base; + boolean_t link_up; + uint8_t duplex; + uint32_t speed; + uint8_t cpi_alg; /* Interrupt coalescing settings */ - u32 cq_coalesce_usecs; + uint32_t cq_coalesce_usecs; - u32 msg_enable; - struct nicvf_hw_stats hw_stats; - struct nicvf_drv_stats drv_stats; + uint32_t msg_enable; + struct nicvf_hw_stats hw_stats; + struct nicvf_drv_stats drv_stats; struct bgx_stats bgx_stats; - struct work_struct reset_task; + + /* Interface statistics */ + struct callout stats_callout; + struct mtx stats_mtx; /* MSI-X */ - bool msix_enabled; - u8 num_vec; + boolean_t msix_enabled; + uint8_t num_vec; struct msix_entry msix_entries[NIC_VF_MSIX_VECTORS]; + struct resource * msix_table_res; char irq_name[NIC_VF_MSIX_VECTORS][20]; - bool irq_allocated[NIC_VF_MSIX_VECTORS]; + boolean_t irq_allocated[NIC_VF_MSIX_VECTORS]; /* VF <-> PF mailbox communication */ - bool pf_acked; - bool pf_nacked; -} ____cacheline_aligned_in_smp; + boolean_t pf_acked; + boolean_t pf_nacked; +} __aligned(CACHE_LINE_SIZE); -/* PF <--> VF Mailbox communication +/* + * PF <--> VF Mailbox communication * Eight 64bit registers are shared between PF and VF. * Separate set for each VF. * Writing '1' into last register mbx7 means end of message. @@ -381,123 +355,108 @@ struct nicvf { #define NIC_MBOX_MSG_SHUTDOWN 0xF1 /* VF is being shutdown */ struct nic_cfg_msg { - u8 msg; - u8 vf_id; - u8 node_id; - bool tns_mode:1; - bool sqs_mode:1; - bool loopback_supported:1; - u8 mac_addr[ETH_ALEN]; + uint8_t msg; + uint8_t vf_id; + uint8_t node_id; + boolean_t tns_mode:1; + boolean_t sqs_mode:1; + boolean_t loopback_supported:1; + uint8_t mac_addr[ETHER_ADDR_LEN]; }; /* Qset configuration */ struct qs_cfg_msg { - u8 msg; - u8 num; - u8 sqs_count; - u64 cfg; + uint8_t msg; + uint8_t num; + uint8_t sqs_count; + uint64_t cfg; }; /* Receive queue configuration */ struct rq_cfg_msg { - u8 msg; - u8 qs_num; - u8 rq_num; - u64 cfg; + uint8_t msg; + uint8_t qs_num; + uint8_t rq_num; + uint64_t cfg; }; /* Send queue configuration */ struct sq_cfg_msg { - u8 msg; - u8 qs_num; - u8 sq_num; - bool sqs_mode; - u64 cfg; + uint8_t msg; + uint8_t qs_num; + uint8_t sq_num; + boolean_t sqs_mode; + uint64_t cfg; }; /* Set VF's MAC address */ struct set_mac_msg { - u8 msg; - u8 vf_id; - u8 mac_addr[ETH_ALEN]; + uint8_t msg; + uint8_t vf_id; + uint8_t mac_addr[ETHER_ADDR_LEN]; }; /* Set Maximum frame size */ struct set_frs_msg { - u8 msg; - u8 vf_id; - u16 max_frs; + uint8_t msg; + uint8_t vf_id; + uint16_t max_frs; }; /* Set CPI algorithm type */ struct cpi_cfg_msg { - u8 msg; - u8 vf_id; - u8 rq_cnt; - u8 cpi_alg; + uint8_t msg; + uint8_t vf_id; + uint8_t rq_cnt; + uint8_t cpi_alg; }; /* Get RSS table size */ struct rss_sz_msg { - u8 msg; - u8 vf_id; - u16 ind_tbl_size; + uint8_t msg; + uint8_t vf_id; + uint16_t ind_tbl_size; }; /* Set RSS configuration */ struct rss_cfg_msg { - u8 msg; - u8 vf_id; - u8 hash_bits; - u8 tbl_len; - u8 tbl_offset; -#define RSS_IND_TBL_LEN_PER_MBX_MSG 8 - u8 ind_tbl[RSS_IND_TBL_LEN_PER_MBX_MSG]; + uint8_t msg; + uint8_t vf_id; + uint8_t hash_bits; + uint8_t tbl_len; + uint8_t tbl_offset; +#define RSS_IND_TBL_LEN_PER_MBX_MSG 8 + uint8_t ind_tbl[RSS_IND_TBL_LEN_PER_MBX_MSG]; }; struct bgx_stats_msg { - u8 msg; - u8 vf_id; - u8 rx; - u8 idx; - u64 stats; + uint8_t msg; + uint8_t vf_id; + uint8_t rx; + uint8_t idx; + uint64_t stats; }; /* Physical interface link status */ struct bgx_link_status { - u8 msg; - u8 link_up; - u8 duplex; - u32 speed; -}; - -#ifdef VNIC_MULTI_QSET_SUPPORT -/* Get Extra Qset IDs */ -struct sqs_alloc { - u8 msg; - u8 vf_id; - u8 qs_count; -}; - -struct nicvf_ptr { - u8 msg; - u8 vf_id; - bool sqs_mode; - u8 sqs_id; - u64 nicvf; + uint8_t msg; + uint8_t link_up; + uint8_t duplex; + uint32_t speed; }; -#endif /* Set interface in loopback mode */ struct set_loopback { - u8 msg; - u8 vf_id; - bool enable; + uint8_t msg; + uint8_t vf_id; + boolean_t enable; }; /* 128 bit shared memory between PF and each VF */ union nic_mbx { - struct { u8 msg; } msg; + struct { + uint8_t msg; + } msg; struct nic_cfg_msg nic_cfg; struct qs_cfg_msg qs; struct rq_cfg_msg rq; @@ -507,33 +466,23 @@ union nic_mbx { struct cpi_cfg_msg cpi_cfg; struct rss_sz_msg rss_size; struct rss_cfg_msg rss_cfg; - struct bgx_stats_msg bgx_stats; - struct bgx_link_status link_status; -#ifdef VNIC_MULTI_QSET_SUPPORT - struct sqs_alloc sqs_alloc; - struct nicvf_ptr nicvf; -#endif + struct bgx_stats_msg bgx_stats; + struct bgx_link_status link_status; struct set_loopback lbk; }; -#define NIC_NODE_ID_MASK 0x03 -#define NIC_NODE_ID_SHIFT 44 +#define NIC_NODE_ID_MASK 0x03 +#define NIC_NODE_ID_SHIFT 44 -static inline int nic_get_node_id(struct pci_dev *pdev) +static __inline int +nic_get_node_id(struct resource *res) { - u64 addr = pci_resource_start(pdev, PCI_CFG_REG_BAR_NUM); + pci_addr_t addr; + + addr = rman_get_start(res); return ((addr >> NIC_NODE_ID_SHIFT) & NIC_NODE_ID_MASK); } -int nicvf_set_real_num_queues(struct net_device *netdev, - int tx_queues, int rx_queues); -int nicvf_open(struct net_device *netdev); -int nicvf_stop(struct net_device *netdev); int nicvf_send_msg_to_pf(struct nicvf *vf, union nic_mbx *mbx); -void nicvf_config_rss(struct nicvf *nic); -void nicvf_set_rss_key(struct nicvf *nic); -void nicvf_set_ethtool_ops(struct net_device *netdev); -void nicvf_update_stats(struct nicvf *nic); -void nicvf_update_lmac_stats(struct nicvf *nic); #endif /* NIC_H */ Modified: head/sys/dev/vnic/nic_main.c ============================================================================== --- head/sys/dev/vnic/nic_main.c Sun Oct 18 21:39:15 2015 (r289550) +++ head/sys/dev/vnic/nic_main.c Sun Oct 18 22:02:58 2015 (r289551) @@ -27,135 +27,411 @@ * */ -#include -#include -#include -#include -#include +#include +__FBSDID("$FreeBSD$"); +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#ifdef PCI_IOV +#include +#include +#endif + +#include "thunder_bgx.h" #include "nic_reg.h" #include "nic.h" #include "q_struct.h" -#include "thunder_bgx.h" -#define DRV_NAME "thunder-nic" -#define DRV_VERSION "1.0" +#define VNIC_PF_DEVSTR "Cavium Thunder NIC Physical Function Driver" + +#define VNIC_PF_REG_RID PCIR_BAR(PCI_CFG_REG_BAR_NUM) + +#define NIC_SET_VF_LMAC_MAP(bgx, lmac) ((((bgx) & 0xF) << 4) | ((lmac) & 0xF)) +#define NIC_GET_BGX_FROM_VF_LMAC_MAP(map) (((map) >> 4) & 0xF) +#define NIC_GET_LMAC_FROM_VF_LMAC_MAP(map) ((map) & 0xF) + +/* Structure to be used by the SR-IOV for VF configuration schemas */ +struct nicvf_info { + boolean_t vf_enabled; + int vf_flags; +}; struct nicpf { - struct pci_dev *pdev; - u8 rev_id; - u8 node; - unsigned int flags; - u8 num_vf_en; /* No of VF enabled */ - bool vf_enabled[MAX_NUM_VFS_SUPPORTED]; - void __iomem *reg_base; /* Register start address */ -#ifdef VNIC_MULTI_QSET_SUPPORT - u8 num_sqs_en; /* Secondary qsets enabled */ - u64 nicvf[MAX_NUM_VFS_SUPPORTED]; - u8 vf_sqs[MAX_NUM_VFS_SUPPORTED][MAX_SQS_PER_VF]; - u8 pqs_vf[MAX_NUM_VFS_SUPPORTED]; - bool sqs_used[MAX_NUM_VFS_SUPPORTED]; -#endif + device_t dev; + uint8_t rev_id; + uint8_t node; + u_int flags; + uint8_t num_vf_en; /* No of VF enabled */ + struct nicvf_info vf_info[MAX_NUM_VFS_SUPPORTED]; + struct resource * reg_base; /* Register start address */ struct pkind_cfg pkind; -#define NIC_SET_VF_LMAC_MAP(bgx, lmac) (((bgx & 0xF) << 4) | (lmac & 0xF)) -#define NIC_GET_BGX_FROM_VF_LMAC_MAP(map) ((map >> 4) & 0xF) -#define NIC_GET_LMAC_FROM_VF_LMAC_MAP(map) (map & 0xF) - u8 vf_lmac_map[MAX_LMAC]; - struct delayed_work dwork; - struct workqueue_struct *check_link; - u8 link[MAX_LMAC]; - u8 duplex[MAX_LMAC]; - u32 speed[MAX_LMAC]; - u16 cpi_base[MAX_NUM_VFS_SUPPORTED]; - u16 rss_ind_tbl_size; - bool mbx_lock[MAX_NUM_VFS_SUPPORTED]; + uint8_t vf_lmac_map[MAX_LMAC]; + boolean_t mbx_lock[MAX_NUM_VFS_SUPPORTED]; + + struct callout check_link; + struct mtx check_link_mtx; + + uint8_t link[MAX_LMAC]; + uint8_t duplex[MAX_LMAC]; + uint32_t speed[MAX_LMAC]; + uint16_t cpi_base[MAX_NUM_VFS_SUPPORTED]; + uint16_t rss_ind_tbl_size; /* MSI-X */ - bool msix_enabled; - u8 num_vec; + boolean_t msix_enabled; + uint8_t num_vec; struct msix_entry msix_entries[NIC_PF_MSIX_VECTORS]; - bool irq_allocated[NIC_PF_MSIX_VECTORS]; + struct resource * msix_table_res; }; -/* Supported devices */ -static const struct pci_device_id nic_id_table[] = { - { PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, PCI_DEVICE_ID_THUNDER_NIC_PF) }, - { 0, } /* end of table */ +static int nicpf_probe(device_t); +static int nicpf_attach(device_t); +static int nicpf_detach(device_t); + +#ifdef PCI_IOV +static int nicpf_iov_init(device_t, uint16_t, const nvlist_t *); +static void nicpf_iov_uninit(device_t); +static int nicpf_iov_addr_vf(device_t, uint16_t, const nvlist_t *); +#endif + +static device_method_t nicpf_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, nicpf_probe), + DEVMETHOD(device_attach, nicpf_attach), + DEVMETHOD(device_detach, nicpf_detach), + /* PCI SR-IOV interface */ +#ifdef PCI_IOV + DEVMETHOD(pci_iov_init, nicpf_iov_init), + DEVMETHOD(pci_iov_uninit, nicpf_iov_uninit), + DEVMETHOD(pci_iov_add_vf, nicpf_iov_addr_vf), +#endif + DEVMETHOD_END, }; -MODULE_AUTHOR("Sunil Goutham"); -MODULE_DESCRIPTION("Cavium Thunder NIC Physical Function Driver"); -MODULE_VERSION(DRV_VERSION); -MODULE_DEVICE_TABLE(pci, nic_id_table); - -/* The Cavium ThunderX network controller can *only* be found in SoCs - * containing the ThunderX ARM64 CPU implementation. All accesses to the device - * registers on this platform are implicitly strongly ordered with respect - * to memory accesses. So writeq_relaxed() and readq_relaxed() are safe to use - * with no memory barriers in this driver. The readq()/writeq() functions add - * explicit ordering operation which in this case are redundant, and only - * add overhead. +static driver_t nicpf_driver = { + "vnicpf", + nicpf_methods, + sizeof(struct nicpf), +}; + +static devclass_t nicpf_devclass; + +DRIVER_MODULE(nicpf, pci, nicpf_driver, nicpf_devclass, 0, 0); +MODULE_DEPEND(nicpf, pci, 1, 1, 1); +MODULE_DEPEND(nicpf, ether, 1, 1, 1); +MODULE_DEPEND(nicpf, thunder_bgx, 1, 1, 1); + +static int nicpf_alloc_res(struct nicpf *); +static void nicpf_free_res(struct nicpf *); +static void nic_set_lmac_vf_mapping(struct nicpf *); +static void nic_init_hw(struct nicpf *); +static int nic_sriov_init(device_t, struct nicpf *); +static void nic_poll_for_link(void *); +static int nic_register_interrupts(struct nicpf *); +static void nic_unregister_interrupts(struct nicpf *); + +/* + * Device interface + */ +static int +nicpf_probe(device_t dev) +{ + uint16_t vendor_id; + uint16_t device_id; + + vendor_id = pci_get_vendor(dev); + device_id = pci_get_device(dev); + + if (vendor_id == PCI_VENDOR_ID_CAVIUM && + device_id == PCI_DEVICE_ID_THUNDER_NIC_PF) { + device_set_desc(dev, VNIC_PF_DEVSTR); + return (BUS_PROBE_DEFAULT); + } + + return (ENXIO); +} + +static int +nicpf_attach(device_t dev) +{ + struct nicpf *nic; + int err; + + nic = device_get_softc(dev); + nic->dev = dev; + + /* Enable bus mastering */ + pci_enable_busmaster(dev); + + /* Allocate PCI resources */ + err = nicpf_alloc_res(nic); + if (err != 0) { + device_printf(dev, "Could not allocate PCI resources\n"); + return (err); + } + + nic->node = nic_get_node_id(nic->reg_base); + nic->rev_id = pci_read_config(dev, PCIR_REVID, 1); + + /* Enable Traffic Network Switch (TNS) bypass mode by default */ + nic->flags &= ~NIC_TNS_ENABLED; + nic_set_lmac_vf_mapping(nic); + + /* Initialize hardware */ + nic_init_hw(nic); + + /* Set RSS TBL size for each VF */ + nic->rss_ind_tbl_size = NIC_MAX_RSS_IDR_TBL_SIZE; + + /* Setup interrupts */ + err = nic_register_interrupts(nic); + if (err != 0) + goto err_free_res; + + /* Configure SRIOV */ + err = nic_sriov_init(dev, nic); + if (err != 0) + goto err_free_intr; + + if (nic->flags & NIC_TNS_ENABLED) + return (0); + + mtx_init(&nic->check_link_mtx, "VNIC PF link poll", NULL, MTX_DEF); + /* Register physical link status poll callout */ + callout_init_mtx(&nic->check_link, &nic->check_link_mtx, 0); + mtx_lock(&nic->check_link_mtx); + nic_poll_for_link(nic); + mtx_unlock(&nic->check_link_mtx); + + return (0); + +err_free_intr: + nic_unregister_interrupts(nic); +err_free_res: + nicpf_free_res(nic); + pci_disable_busmaster(dev); + + return (err); +} + +static int +nicpf_detach(device_t dev) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Oct 18 22:10: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 2795DA184DE; Sun, 18 Oct 2015 22:10:10 +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 E5394E1D; Sun, 18 Oct 2015 22:10:09 +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 t9IMA9Jk026200; Sun, 18 Oct 2015 22:10:09 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IMA8aL026196; Sun, 18 Oct 2015 22:10:08 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201510182210.t9IMA8aL026196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Sun, 18 Oct 2015 22:10:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289552 - in head/sys: conf dev/vnic X-SVN-Group: head MIME-Version: 1.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, 18 Oct 2015 22:10:10 -0000 Author: zbb Date: Sun Oct 18 22:10:08 2015 New Revision: 289552 URL: https://svnweb.freebsd.org/changeset/base/289552 Log: Introduce driver for Cavium's ThunderX MDIO This commit adds support for MDIO present in the ThunderX SoC. From the FDT point of view it is compatible with "octeon-3860-mdio" however only C22 mode is used. The code also implements lmac_if interface functions. Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Added: head/sys/dev/vnic/thunder_mdio.c (contents, props changed) head/sys/dev/vnic/thunder_mdio_fdt.c (contents, props changed) head/sys/dev/vnic/thunder_mdio_var.h (contents, props changed) Modified: head/sys/conf/files.arm64 Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Sun Oct 18 22:02:58 2015 (r289551) +++ head/sys/conf/files.arm64 Sun Oct 18 22:10:08 2015 (r289552) @@ -73,6 +73,8 @@ dev/vnic/nicvf_main.c optional vnic pci dev/vnic/nicvf_queues.c optional vnic pci pci_iov dev/vnic/thunder_bgx_fdt.c optional vnic fdt dev/vnic/thunder_bgx.c optional vnic pci +dev/vnic/thunder_mdio_fdt.c optional vnic fdt +dev/vnic/thunder_mdio.c optional vnic dev/vnic/lmac_if.m optional vnic kern/kern_clocksource.c standard kern/subr_dummy_vdso_tc.c standard Added: head/sys/dev/vnic/thunder_mdio.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/vnic/thunder_mdio.c Sun Oct 18 22:10:08 2015 (r289552) @@ -0,0 +1,512 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under + * the sponsorship of the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include "thunder_mdio_var.h" + +#include "lmac_if.h" +#include "miibus_if.h" + +#define REG_BASE_RID 0 + +#define SMI_CMD 0x00 +#define SMI_CMD_PHY_REG_ADR_SHIFT (0) +#define SMI_CMD_PHY_REG_ADR_MASK (0x1FUL << SMI_CMD_PHY_REG_ADR_SHIFT) +#define SMI_CMD_PHY_ADR_SHIFT (8) +#define SMI_CMD_PHY_ADR_MASK (0x1FUL << SMI_CMD_PHY_ADR_SHIFT) +#define SMI_CMD_PHY_OP_MASK (0x3UL << 16) +#define SMI_CMD_PHY_OP_C22_READ (0x1UL << 16) +#define SMI_CMD_PHY_OP_C22_WRITE (0x0UL << 16) +#define SMI_CMD_PHY_OP_C45_READ (0x3UL << 16) +#define SMI_CMD_PHY_OP_C45_WRITE (0x1UL << 16) +#define SMI_CMD_PHY_OP_C45_ADDR (0x0UL << 16) + +#define SMI_WR_DAT 0x08 +#define SMI_WR_DAT_PENDING (1UL << 17) +#define SMI_WR_DAT_VAL (1UL << 16) +#define SMI_WR_DAT_DAT_MASK (0xFFFFUL << 0) + +#define SMI_RD_DAT 0x10 +#define SMI_RD_DAT_PENDING (1UL << 17) +#define SMI_RD_DAT_VAL (1UL << 16) +#define SMI_RD_DAT_DAT_MASK (0xFFFFUL << 0) + +#define SMI_CLK 0x18 +#define SMI_CLK_PREAMBLE (1UL << 12) +#define SMI_CLK_MODE (1UL << 24) + +#define SMI_EN 0x20 +#define SMI_EN_EN (1UL << 0) /* Enabele interface */ + +#define SMI_DRV_CTL 0x28 + +static int thunder_mdio_detach(device_t); + +static int thunder_mdio_read(device_t, int, int); +static int thunder_mdio_write(device_t, int, int, int); + +static int thunder_ifmedia_change_stub(struct ifnet *); +static void thunder_ifmedia_status_stub(struct ifnet *, struct ifmediareq *); + +static int thunder_mdio_media_status(device_t, int, int *, int *, int *); +static int thunder_mdio_media_change(device_t, int, int, int, int); +static int thunder_mdio_phy_connect(device_t, int, int); +static int thunder_mdio_phy_disconnect(device_t, int, int); + +static device_method_t thunder_mdio_methods[] = { + /* Device interface */ + DEVMETHOD(device_detach, thunder_mdio_detach), + /* LMAC interface */ + DEVMETHOD(lmac_media_status, thunder_mdio_media_status), + DEVMETHOD(lmac_media_change, thunder_mdio_media_change), + DEVMETHOD(lmac_phy_connect, thunder_mdio_phy_connect), + DEVMETHOD(lmac_phy_disconnect, thunder_mdio_phy_disconnect), + /* MII interface */ + DEVMETHOD(miibus_readreg, thunder_mdio_read), + DEVMETHOD(miibus_writereg, thunder_mdio_write), + + /* End */ + DEVMETHOD_END +}; + +DEFINE_CLASS_0(thunder_mdio, thunder_mdio_driver, thunder_mdio_methods, + sizeof(struct thunder_mdio_softc)); + +DRIVER_MODULE(miibus, thunder_mdio, miibus_driver, miibus_devclass, 0, 0); +MODULE_DEPEND(thunder_mdio, ether, 1, 1, 1); +MODULE_DEPEND(thunder_mdio, miibus, 1, 1, 1); + +MALLOC_DEFINE(M_THUNDER_MDIO, "ThunderX MDIO", + "Cavium ThunderX MDIO dynamic memory"); + +#define MDIO_LOCK_INIT(sc, name) \ + mtx_init(&(sc)->mtx, name, NULL, MTX_DEF) + +#define MDIO_LOCK_DESTROY(sc) \ + mtx_destroy(&(sc)->mtx) + +#define MDIO_LOCK(sc) mtx_lock(&(sc)->mtx) +#define MDIO_UNLOCK(sc) mtx_unlock(&(sc)->mtx) + +#define MDIO_LOCK_ASSERT(sc) \ + mtx_assert(&(sc)->mtx, MA_OWNED) + + +#define mdio_reg_read(sc, reg) \ + bus_read_8((sc)->reg_base, (reg)) + +#define mdio_reg_write(sc, reg, val) \ + bus_write_8((sc)->reg_base, (reg), (val)) + +int +thunder_mdio_attach(device_t dev) +{ + struct thunder_mdio_softc *sc; + int rid; + + sc = device_get_softc(dev); + sc->dev = dev; + + /* Allocate memory resources */ + rid = REG_BASE_RID; + sc->reg_base = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->reg_base == NULL) { + device_printf(dev, "Could not allocate memory\n"); + return (ENXIO); + } + + TAILQ_INIT(&sc->phy_desc_head); + MDIO_LOCK_INIT(sc, "ThunderX MDIO lock"); + + /* Enable SMI/MDIO interface */ + mdio_reg_write(sc, SMI_EN, SMI_EN_EN); + + return (0); +} + +static int +thunder_mdio_detach(device_t dev) +{ + struct thunder_mdio_softc *sc; + + sc = device_get_softc(dev); + + if (sc->reg_base != NULL) { + bus_release_resource(dev, SYS_RES_MEMORY, REG_BASE_RID, + sc->reg_base); + } + + return (0); +} + +static __inline void +thunder_mdio_set_mode(struct thunder_mdio_softc *sc, + enum thunder_mdio_mode mode) +{ + uint64_t smi_clk; + + if (sc->mode == mode) + return; + + /* Set mode, IEEE CLAUSE 22 or IEEE CAUSE 45 */ + smi_clk = mdio_reg_read(sc, SMI_CLK); + if (mode == MODE_IEEE_C22) + smi_clk &= ~SMI_CLK_MODE; + else + smi_clk |= SMI_CLK_MODE; + /* Enable sending 32 bit preable on SMI transactions */ + smi_clk |= SMI_CLK_PREAMBLE; + /* Saved setings */ + mdio_reg_write(sc, SMI_CLK, smi_clk); + sc->mode = mode; +} + +static int +thunder_mdio_c45_addr(struct thunder_mdio_softc *sc, int phy, int reg) +{ + uint64_t smi_cmd, smi_wr_dat; + ssize_t timeout; + + thunder_mdio_set_mode(sc, MODE_IEEE_C45); + + /* Prepare data for transmission */ + mdio_reg_write(sc, SMI_WR_DAT, reg & SMI_WR_DAT_DAT_MASK); + /* + * Assemble command + */ + smi_cmd = 0; + /* Set opcode */ + smi_cmd |= SMI_CMD_PHY_OP_C45_WRITE; + + /* Set PHY address */ + smi_cmd |= ((phy << SMI_CMD_PHY_ADR_SHIFT) & SMI_CMD_PHY_ADR_MASK); + /* Set PHY register offset */ + smi_cmd |= ((reg << SMI_CMD_PHY_REG_ADR_SHIFT) & + SMI_CMD_PHY_REG_ADR_MASK); + + mdio_reg_write(sc, SMI_CMD, smi_cmd); + for (timeout = 1000; timeout > 0; timeout--) { + smi_wr_dat = mdio_reg_read(sc, SMI_WR_DAT); + if (smi_wr_dat & SMI_WR_DAT_PENDING) + DELAY(1000); + else + break; + } + + if (timeout <= 0) + return (EIO); + else { + /* Return 0 on success */ + return (0); + } +} + +static int +thunder_mdio_read(device_t dev, int phy, int reg) +{ + struct thunder_mdio_softc *sc; + uint64_t smi_cmd, smi_rd_dat; + ssize_t timeout; + int err; + + sc = device_get_softc(dev); + + /* XXX Always C22 - for <= 1Gbps only */ + thunder_mdio_set_mode(sc, MODE_IEEE_C22); + + /* + * Assemble command + */ + smi_cmd = 0; + /* Set opcode */ + if (sc->mode == MODE_IEEE_C22) + smi_cmd |= SMI_CMD_PHY_OP_C22_READ; + else { + smi_cmd |= SMI_CMD_PHY_OP_C45_READ; + err = thunder_mdio_c45_addr(sc, phy, reg); + if (err != 0) + return (err); + + reg = (reg >> 16) & 0x1F; + } + + /* Set PHY address */ + smi_cmd |= ((phy << SMI_CMD_PHY_ADR_SHIFT) & SMI_CMD_PHY_ADR_MASK); + /* Set PHY register offset */ + smi_cmd |= ((reg << SMI_CMD_PHY_REG_ADR_SHIFT) & + SMI_CMD_PHY_REG_ADR_MASK); + + mdio_reg_write(sc, SMI_CMD, smi_cmd); + for (timeout = 1000; timeout > 0; timeout--) { + smi_rd_dat = mdio_reg_read(sc, SMI_RD_DAT); + if (smi_rd_dat & SMI_RD_DAT_PENDING) + DELAY(1000); + else + break; + } + + if (smi_rd_dat & SMI_RD_DAT_VAL) + return (smi_rd_dat & SMI_RD_DAT_DAT_MASK); + else { + /* Return 0 on error */ + return (0); + } +} + +static int +thunder_mdio_write(device_t dev, int phy, int reg, int data) +{ + struct thunder_mdio_softc *sc; + uint64_t smi_cmd, smi_wr_dat; + ssize_t timeout; + + sc = device_get_softc(dev); + + /* XXX Always C22 - for <= 1Gbps only */ + thunder_mdio_set_mode(sc, MODE_IEEE_C22); + + /* Prepare data for transmission */ + mdio_reg_write(sc, SMI_WR_DAT, data & SMI_WR_DAT_DAT_MASK); + /* + * Assemble command + */ + smi_cmd = 0; + /* Set opcode */ + if (sc->mode == MODE_IEEE_C22) + smi_cmd |= SMI_CMD_PHY_OP_C22_WRITE; + else + smi_cmd |= SMI_CMD_PHY_OP_C45_WRITE; + + /* Set PHY address */ + smi_cmd |= ((phy << SMI_CMD_PHY_ADR_SHIFT) & SMI_CMD_PHY_ADR_MASK); + /* Set PHY register offset */ + smi_cmd |= ((reg << SMI_CMD_PHY_REG_ADR_SHIFT) & + SMI_CMD_PHY_REG_ADR_MASK); + + mdio_reg_write(sc, SMI_CMD, smi_cmd); + for (timeout = 1000; timeout > 0; timeout--) { + smi_wr_dat = mdio_reg_read(sc, SMI_WR_DAT); + if (smi_wr_dat & SMI_WR_DAT_PENDING) + DELAY(1000); + else + break; + } + + if (timeout <= 0) + return (EIO); + else { + /* Return 0 on success */ + return (0); + } +} + +static int +thunder_ifmedia_change_stub(struct ifnet *ifp __unused) +{ + /* Will never be called by if_media */ + return (0); +} + +static void +thunder_ifmedia_status_stub(struct ifnet *ifp __unused, struct ifmediareq + *ifmr __unused) +{ + /* Will never be called by if_media */ +} + +static __inline struct phy_desc * +get_phy_desc(struct thunder_mdio_softc *sc, int lmacid) +{ + struct phy_desc *pd = NULL; + + MDIO_LOCK_ASSERT(sc); + TAILQ_FOREACH(pd, &sc->phy_desc_head, phy_desc_list) { + if (pd->lmacid == lmacid) + break; + } + + return (pd); +} +static int +thunder_mdio_media_status(device_t dev, int lmacid, int *link, int *duplex, + int *speed) +{ + struct thunder_mdio_softc *sc; + struct mii_data *mii_sc; + struct phy_desc *pd; + + sc = device_get_softc(dev); + + MDIO_LOCK(sc); + pd = get_phy_desc(sc, lmacid); + if (pd == NULL) { + /* Panic when invariants are enabled, fail otherwise. */ + KASSERT(0, ("%s: no PHY descriptor for LMAC%d", + __func__, lmacid)); + MDIO_UNLOCK(sc); + return (ENXIO); + } + mii_sc = device_get_softc(pd->miibus); + + mii_tick(mii_sc); + if ((mii_sc->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == + (IFM_ACTIVE | IFM_AVALID)) { + /* Link is up */ + *link = 1; + } else + *link = 0; + + switch (IFM_SUBTYPE(mii_sc->mii_media_active)) { + case IFM_10_T: + *speed = 10; + break; + case IFM_100_TX: + *speed = 100; + break; + case IFM_1000_T: + *speed = 1000; + break; + default: + /* IFM_NONE */ + *speed = 0; + } + + if ((IFM_OPTIONS(mii_sc->mii_media_active) & IFM_FDX) != 0) + *duplex = 1; + else + *duplex = 0; + + MDIO_UNLOCK(sc); + + return (0); +} + +static int +thunder_mdio_media_change(device_t dev, int lmacid, int link, int duplex, + int speed) +{ + + return (EIO); +} + +static int +thunder_mdio_phy_connect(device_t dev, int lmacid, int phy) +{ + struct thunder_mdio_softc *sc; + struct phy_desc *pd; + int err; + + sc = device_get_softc(dev); + + MDIO_LOCK(sc); + pd = get_phy_desc(sc, lmacid); + MDIO_UNLOCK(sc); + if (pd == NULL) { + pd = malloc(sizeof(*pd), M_THUNDER_MDIO, (M_NOWAIT | M_ZERO)); + if (pd == NULL) + return (ENOMEM); + pd->ifp = if_alloc(IFT_ETHER); + if (pd->ifp == NULL) { + free(pd, M_THUNDER_MDIO); + return (ENOMEM); + } + pd->lmacid = lmacid; + } + + err = mii_attach(dev, &pd->miibus, pd->ifp, + thunder_ifmedia_change_stub, thunder_ifmedia_status_stub, + BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); + + if (err != 0) { + device_printf(dev, "Could not attach PHY%d\n", phy); + if_free(pd->ifp); + free(pd, M_THUNDER_MDIO); + return (ENXIO); + } + + MDIO_LOCK(sc); + TAILQ_INSERT_TAIL(&sc->phy_desc_head, pd, phy_desc_list); + MDIO_UNLOCK(sc); + + return (0); +} + +static int +thunder_mdio_phy_disconnect(device_t dev, int lmacid, int phy) +{ + struct thunder_mdio_softc *sc; + struct phy_desc *pd; + + sc = device_get_softc(dev); + MDIO_LOCK(sc); + + pd = get_phy_desc(sc, lmacid); + if (pd == NULL) { + MDIO_UNLOCK(sc); + return (EINVAL); + } + + /* Remove this PHY descriptor from the list */ + TAILQ_REMOVE(&sc->phy_desc_head, pd, phy_desc_list); + + /* Detach miibus */ + bus_generic_detach(dev); + device_delete_child(dev, pd->miibus); + /* Free fake ifnet */ + if_free(pd->ifp); + /* Free memory under phy descriptor */ + free(pd, M_THUNDER_MDIO); + MDIO_UNLOCK(sc); + + return (0); +} Added: head/sys/dev/vnic/thunder_mdio_fdt.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/vnic/thunder_mdio_fdt.c Sun Oct 18 22:10:08 2015 (r289552) @@ -0,0 +1,95 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under + * the sponsorship of the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include + +#include "thunder_mdio_var.h" + +static int thunder_mdio_fdt_probe(device_t); +static int thunder_mdio_fdt_attach(device_t); + +static device_method_t thunder_mdio_fdt_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, thunder_mdio_fdt_probe), + DEVMETHOD(device_attach, thunder_mdio_fdt_attach), + + /* End */ + DEVMETHOD_END +}; + +DEFINE_CLASS_1(thunder_mdio, thunder_mdio_fdt_driver, thunder_mdio_fdt_methods, + sizeof(struct thunder_mdio_softc), thunder_mdio_driver); + +static devclass_t thunder_mdio_fdt_devclass; + +DRIVER_MODULE(thunder_mdio, ofwbus, thunder_mdio_fdt_driver, + thunder_mdio_fdt_devclass, 0, 0); + +static int +thunder_mdio_fdt_probe(device_t dev) +{ + + if (ofw_bus_is_compatible(dev, "cavium,octeon-3860-mdio")) { + device_set_desc(dev, THUNDER_MDIO_DEVSTR); + return (BUS_PROBE_DEFAULT); + } + + return (ENXIO); +} + +static int +thunder_mdio_fdt_attach(device_t dev) +{ + phandle_t node; + int ret; + + /* Call core attach */ + ret = thunder_mdio_attach(dev); + if (ret != 0) + return (ret); + /* + * Register device to this node/xref. + * Thanks to that we will be able to retrieve device_t structure + * while holding only node reference acquired from FDT. + */ + node = ofw_bus_get_node(dev); + OF_device_register_xref(OF_xref_from_node(node), dev); + + return (0); +} Added: head/sys/dev/vnic/thunder_mdio_var.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/vnic/thunder_mdio_var.h Sun Oct 18 22:10:08 2015 (r289552) @@ -0,0 +1,63 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under + * the sponsorship of the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + * + */ + +#ifndef __THUNDER_MDIO_VAR_H__ +#define __THUNDER_MDIO_VAR_H__ + +#define THUNDER_MDIO_DEVSTR "Cavium ThunderX SMI/MDIO driver" +DECLARE_CLASS(thunder_mdio_driver); + +enum thunder_mdio_mode { + MODE_NONE = 0, + MODE_IEEE_C22, + MODE_IEEE_C45 +}; + +struct phy_desc { + device_t miibus; /* One miibus per LMAC */ + struct ifnet * ifp; /* Fake ifp to satisfy miibus */ + int lmacid; /* ID number of LMAC connected */ + TAILQ_ENTRY(phy_desc) phy_desc_list; +}; + +struct thunder_mdio_softc { + device_t dev; + struct mtx mtx; + struct resource * reg_base; + + enum thunder_mdio_mode mode; + + TAILQ_HEAD(,phy_desc) phy_desc_head; +}; + +int thunder_mdio_attach(device_t); +#endif From owner-svn-src-all@freebsd.org Sun Oct 18 22:13: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 EE430A1869B; Sun, 18 Oct 2015 22:13: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 B842320C; Sun, 18 Oct 2015 22:13: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 t9IMDL5v028760; Sun, 18 Oct 2015 22:13:21 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IMDLvl028759; Sun, 18 Oct 2015 22:13:21 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201510182213.t9IMDLvl028759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Sun, 18 Oct 2015 22:13:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289553 - head/sys/arm64/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: Sun, 18 Oct 2015 22:13:23 -0000 Author: zbb Date: Sun Oct 18 22:13:21 2015 New Revision: 289553 URL: https://svnweb.freebsd.org/changeset/base/289553 Log: Add ThunderX VNIC to arm64/GENERIC kernel Add vnic to enabled networking cards and enable SR-IOV by the way. Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/conf/GENERIC Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Sun Oct 18 22:10:08 2015 (r289552) +++ head/sys/arm64/conf/GENERIC Sun Oct 18 22:13:21 2015 (r289553) @@ -94,9 +94,11 @@ device virtio_blk device vtnet # Bus drivers +options PCI_IOV device pci # Ethernet NICs +device vnic # Cavium ThunderX NIC device em # Intel PRO/1000 Gigabit Ethernet Family device mii device miibus # MII bus support From owner-svn-src-all@freebsd.org Sun Oct 18 22:14: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 146F8A18705; Sun, 18 Oct 2015 22:14:20 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id D7A043B2; Sun, 18 Oct 2015 22:14:19 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from bender.Home (bcdccf38.skybroadband.com [188.220.207.56]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id C856BD7E1C; Sun, 18 Oct 2015 22:13:48 +0000 (UTC) Date: Sun, 18 Oct 2015 23:13:47 +0100 From: Andrew Turner To: Zbigniew Bodek Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289550 - head/sys/dev/vnic Message-ID: <20151018231347.1188d061@bender.Home> In-Reply-To: <201510182139.t9ILdF6f017364@repo.freebsd.org> References: <201510182139.t9ILdF6f017364@repo.freebsd.org> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; amd64-portbld-freebsd10.1) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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: Sun, 18 Oct 2015 22:14:20 -0000 On Sun, 18 Oct 2015 21:39:15 +0000 (UTC) Zbigniew Bodek wrote: > Author: zbb > Date: Sun Oct 18 21:39:15 2015 > New Revision: 289550 > URL: https://svnweb.freebsd.org/changeset/base/289550 > > Log: > Raw import of ThunderX VNIC networking driver components > > This import brings following components of the Linux driver: > - Thunder BGX (programmable MAC) > - Physical Function driver > - Virtual Function driver > - Headers > > Revision: 1.0 > Obtained from: Cavium > License information: Cavium provided these files under BSD license This seems to be vendor code, why was it not imported into vendor-sys first? Andrew From owner-svn-src-all@freebsd.org Sun Oct 18 23:58: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 558B3A18F56; Sun, 18 Oct 2015 23:58:07 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D581EAA; Sun, 18 Oct 2015 23:58:07 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9INw6JJ057564; Sun, 18 Oct 2015 23:58:06 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9INw65m057563; Sun, 18 Oct 2015 23:58:06 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201510182358.t9INw65m057563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 18 Oct 2015 23:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289554 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 18 Oct 2015 23:58:07 -0000 Author: gonzo Date: Sun Oct 18 23:58:05 2015 New Revision: 289554 URL: https://svnweb.freebsd.org/changeset/base/289554 Log: Enable gpiobacklight in BEAGLEBONE config to support LCD capes by 4DSYSTEMS out of box Modified: head/sys/arm/conf/BEAGLEBONE Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Sun Oct 18 22:13:21 2015 (r289553) +++ head/sys/arm/conf/BEAGLEBONE Sun Oct 18 23:58:05 2015 (r289554) @@ -85,6 +85,7 @@ device random # Entropy device # GPIO device gpio device gpioled +device gpiobacklight # ADC support device ti_adc From owner-svn-src-all@freebsd.org Mon Oct 19 00:36: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 0AD36A18839; Mon, 19 Oct 2015 00:36:56 +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 D8AB0E56; Mon, 19 Oct 2015 00:36:55 +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 t9J0asnq068997; Mon, 19 Oct 2015 00:36:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9J0asVV068993; Mon, 19 Oct 2015 00:36:54 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510190036.t9J0asVV068993@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 19 Oct 2015 00:36:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289555 - stable/10/release 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, 19 Oct 2015 00:36:56 -0000 Author: gjb Date: Mon Oct 19 00:36:54 2015 New Revision: 289555 URL: https://svnweb.freebsd.org/changeset/base/289555 Log: MFC r289337: Deprecate MD5 checksum generation in favor of SHA512. This was discussed during the 10.2-RELEASE cycle, however since we were nearing the end of the cycle, we decided to defer this change until after 10.2-RELEASE. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile stable/10/release/Makefile.mirrors stable/10/release/Makefile.vm stable/10/release/release.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Sun Oct 18 23:58:05 2015 (r289554) +++ stable/10/release/Makefile Mon Oct 19 00:36:54 2015 (r289555) @@ -335,7 +335,7 @@ release-install: ${XZCMD} -k ${DESTDIR}/${OSRELEASE}-${I} . endif .endfor + cd ${DESTDIR} && sha512 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA512 cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 - cd ${DESTDIR} && md5 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.MD5 .include "${.CURDIR}/Makefile.vm" Modified: stable/10/release/Makefile.mirrors ============================================================================== --- stable/10/release/Makefile.mirrors Sun Oct 18 23:58:05 2015 (r289554) +++ stable/10/release/Makefile.mirrors Mon Oct 19 00:36:54 2015 (r289555) @@ -76,7 +76,7 @@ VM_DIR= ${TLD}/VM-IMAGES/${REVISION}-$ .endif CLEANFILES+= ${STAGE_TARGETS} -CHECKSUM_FILES?= SHA256 MD5 +CHECKSUM_FILES?= SHA512 SHA256 SNAP_SUFFIX!= echo ${_SNAP_SUFFIX:S,^-,,1} | tr -d ' ' ISO_DIR= ${TLD}/${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION} FTP_DIR= ${TLD}/${TARGET}/${TARGET_ARCH}/${REVISION}-${BRANCH} Modified: stable/10/release/Makefile.vm ============================================================================== --- stable/10/release/Makefile.vm Sun Oct 18 23:58:05 2015 (r289554) +++ stable/10/release/Makefile.vm Mon Oct 19 00:36:54 2015 (r289555) @@ -68,10 +68,10 @@ cw${_CW:tl}-install: mkdir -p ${DESTDIR}/${_CW:tl} cp -p ${${_CW}IMAGE} \ ${DESTDIR}/${_CW:tl}/${${_CW}_DISK} + cd ${DESTDIR}/${_CW:tl} && sha512 ${${_CW}_DISK}* > \ + ${DESTDIR}/${_CW:tl}/CHECKSUM.SHA512 cd ${DESTDIR}/${_CW:tl} && sha256 ${${_CW}_DISK}* > \ ${DESTDIR}/${_CW:tl}/CHECKSUM.SHA256 - cd ${DESTDIR}/${_CW:tl} && md5 ${${_CW}_DISK}* > \ - ${DESTDIR}/${_CW:tl}/CHECKSUM.MD5 cw${_CW:tl}-package: @# Special target to handle packaging cloud images in the formats @@ -140,10 +140,10 @@ vm-install: ${XZCMD} ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} . endfor . endif + cd ${DESTDIR}/vmimages && sha512 ${OSRELEASE}* > \ + ${DESTDIR}/vmimages/CHECKSUM.SHA512 cd ${DESTDIR}/vmimages && sha256 ${OSRELEASE}* > \ ${DESTDIR}/vmimages/CHECKSUM.SHA256 - cd ${DESTDIR}/vmimages && md5 ${OSRELEASE}* > \ - ${DESTDIR}/vmimages/CHECKSUM.MD5 .endif vm-release: Modified: stable/10/release/release.sh ============================================================================== --- stable/10/release/release.sh Sun Oct 18 23:58:05 2015 (r289554) +++ stable/10/release/release.sh Mon Oct 19 00:36:54 2015 (r289555) @@ -362,10 +362,10 @@ chroot_arm_armv6_build_release() { chroot ${CHROOTDIR} cp -p ${OBJDIR}/${OSRELEASE}-${KERNEL}.img \ /R/${OSRELEASE}-${KERNEL}.img chroot ${CHROOTDIR} xz -T ${XZ_THREADS} /R/${OSRELEASE}-${KERNEL}.img + cd ${CHROOTDIR}/R && sha512 ${OSRELEASE}* \ + > CHECKSUM.SHA512 cd ${CHROOTDIR}/R && sha256 ${OSRELEASE}* \ > CHECKSUM.SHA256 - cd ${CHROOTDIR}/R && md5 ${OSRELEASE}* \ - > CHECKSUM.MD5 return 0 } # chroot_arm_armv6_build_release() From owner-svn-src-all@freebsd.org Mon Oct 19 01:14: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 8153AA18101; Mon, 19 Oct 2015 01:14:27 +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 355C61BE9; Mon, 19 Oct 2015 01:14:27 +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 t9J1EQHO080081; Mon, 19 Oct 2015 01:14:26 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9J1EQOg080080; Mon, 19 Oct 2015 01:14:26 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510190114.t9J1EQOg080080@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 19 Oct 2015 01:14:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289556 - head/sys/dev/otus X-SVN-Group: head MIME-Version: 1.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, 19 Oct 2015 01:14:27 -0000 Author: adrian Date: Mon Oct 19 01:14:26 2015 New Revision: 289556 URL: https://svnweb.freebsd.org/changeset/base/289556 Log: otus(4) - add initial monitor mode; use lowest rate for EAPOL The monitor mode stuff is from the openbsd driver, but it doesn't 100% work. It doesn't seem to get all frames for all BSSes. However, it's enough to at start debugging things. That 0xffffffff write is /I think/ the RX filter, but I am still not 100% sure about it all. Then, whilst here, use the lowest rate for EAPOL frames. This is just generally a good thing to do. Modified: head/sys/dev/otus/if_otus.c Modified: head/sys/dev/otus/if_otus.c ============================================================================== --- head/sys/dev/otus/if_otus.c Mon Oct 19 00:36:54 2015 (r289555) +++ head/sys/dev/otus/if_otus.c Mon Oct 19 01:14:26 2015 (r289556) @@ -759,6 +759,7 @@ otus_attachhook(struct otus_softc *sc) IEEE80211_C_WME | /* WME/QoS */ IEEE80211_C_SHSLOT | /* Short slot time supported. */ IEEE80211_C_FF | /* Atheros fast-frames supported. */ + IEEE80211_C_MONITOR | IEEE80211_C_WPA; /* WPA/RSN. */ /* XXX TODO: 11n */ @@ -2229,6 +2230,9 @@ otus_tx(struct otus_softc *sc, struct ie (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) != IEEE80211_FC0_TYPE_DATA) { /* Get lowest rate */ rate = otus_rate_to_hw_rate(sc, 0); + } else if (m->m_flags & M_EAPOL) { + /* Get lowest rate */ + rate = otus_rate_to_hw_rate(sc, 0); } else { (void) ieee80211_ratectl_rate(ni, NULL, 0); rate = otus_rate_to_hw_rate(sc, ni->ni_txrate); @@ -3094,13 +3098,22 @@ otus_init(struct otus_softc *sc) } #endif - /* Expect STA operation */ - otus_write(sc, 0x1c3700, 0x0f000002); - otus_write(sc, 0x1c3c40, 0x1); + switch (ic->ic_opmode) { + case IEEE80211_M_STA: + otus_write(sc, 0x1c3700, 0x0f000002); + otus_write(sc, 0x1c3c40, 0x1); + break; + case IEEE80211_M_MONITOR: + otus_write(sc, 0x1c368c, 0xffffffff); + break; + default: + break; + } /* XXX ic_opmode? */ otus_write(sc, AR_MAC_REG_SNIFFER, (ic->ic_opmode == IEEE80211_M_MONITOR) ? 0x2000001 : 0x2000000); + (void)otus_write_barrier(sc); sc->bb_reset = 1; /* Force cold reset. */ From owner-svn-src-all@freebsd.org Mon Oct 19 01:21: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 C0AF7A18231; Mon, 19 Oct 2015 01:21: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 71F241F06; Mon, 19 Oct 2015 01:21:30 +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 t9J1LTQK080352; Mon, 19 Oct 2015 01:21:29 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9J1LTZ2080351; Mon, 19 Oct 2015 01:21:29 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510190121.t9J1LTZ2080351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 19 Oct 2015 01:21:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289557 - head/sys/dev/otus X-SVN-Group: head MIME-Version: 1.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, 19 Oct 2015 01:21:30 -0000 Author: adrian Date: Mon Oct 19 01:21:29 2015 New Revision: 289557 URL: https://svnweb.freebsd.org/changeset/base/289557 Log: otus(4) - use the local node alloc function so there's space for statistics. * Use the correct malloc type for node allocation - M_80211_NODE - so the default node free method in net80211 will work correctly. * Fix otus_node_alloc() to suit FreeBSD's net80211. * .. and actually call otus_node_alloc() so there's space for the per-node tx statistics. Otherwise, well, it will be scribbling over random memory. Tested: * AR9170, STA mode Modified: head/sys/dev/otus/if_otus.c Modified: head/sys/dev/otus/if_otus.c ============================================================================== --- head/sys/dev/otus/if_otus.c Mon Oct 19 01:14:26 2015 (r289556) +++ head/sys/dev/otus/if_otus.c Mon Oct 19 01:21:29 2015 (r289557) @@ -164,7 +164,8 @@ int otus_cmd(struct otus_softc *, uint8 void *, int); void otus_write(struct otus_softc *, uint32_t, uint32_t); int otus_write_barrier(struct otus_softc *); -struct ieee80211_node *otus_node_alloc(struct ieee80211com *); +static struct ieee80211_node *otus_node_alloc(struct ieee80211vap *vap, + const uint8_t mac[IEEE80211_ADDR_LEN]); int otus_media_change(struct ifnet *); int otus_read_eeprom(struct otus_softc *); void otus_newassoc(struct ieee80211_node *, int); @@ -814,6 +815,7 @@ otus_attachhook(struct otus_softc *sc) ic->ic_ampdu_enable = otus_ampdu_enable; ic->ic_wme.wme_update = otus_wme_update; ic->ic_newassoc = otus_newassoc; + ic->ic_node_alloc = otus_node_alloc; #ifdef notyet ic->ic_set_key = otus_set_key; @@ -1387,10 +1389,12 @@ otus_write_barrier(struct otus_softc *sc return error; } -struct ieee80211_node * -otus_node_alloc(struct ieee80211com *ic) +static struct ieee80211_node * +otus_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN]) { - return malloc(sizeof (struct otus_node), M_DEVBUF, M_NOWAIT | M_ZERO); + + return malloc(sizeof (struct otus_node), M_80211_NODE, + M_NOWAIT | M_ZERO); } #if 0 From owner-svn-src-all@freebsd.org Mon Oct 19 07:21: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 30B5BA106D3; Mon, 19 Oct 2015 07:21:59 +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 F267B8ED; Mon, 19 Oct 2015 07:21:58 +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 t9J7LwOr088222; Mon, 19 Oct 2015 07:21:58 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9J7LwYD088221; Mon, 19 Oct 2015 07:21:58 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510190721.t9J7LwYD088221@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Oct 2015 07:21:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289560 - 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, 19 Oct 2015 07:21:59 -0000 Author: hselasky Date: Mon Oct 19 07:21:57 2015 New Revision: 289560 URL: https://svnweb.freebsd.org/changeset/base/289560 Log: Add quirk for USB 3.0 PCI device. Submitted by: philipp.maechler@mamo.li PR: 203650 MFC after: 1 week Modified: head/sys/dev/usb/controller/xhci_pci.c Modified: head/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/xhci_pci.c Mon Oct 19 04:39:27 2015 (r289559) +++ head/sys/dev/usb/controller/xhci_pci.c Mon Oct 19 07:21:57 2015 (r289560) @@ -115,6 +115,8 @@ xhci_pci_match(device_t self) return ("Intel Lynx Point USB 3.0 controller"); case 0x8cb18086: return ("Intel Wildcat Point USB 3.0 controller"); + case 0x9cb18086: + return ("Broadwell Integrated PCH-LP chipset USB 3.0 controller"); case 0xa01b177d: return ("Cavium ThunderX USB 3.0 controller"); @@ -216,6 +218,7 @@ xhci_pci_attach(device_t self) case 0x1e318086: /* Panther Point */ case 0x8c318086: /* Lynx Point */ case 0x8cb18086: /* Wildcat Point */ + case 0x9cb18086: /* Broadwell Mobile Integrated */ /* * On Intel chipsets, reroute ports from EHCI to XHCI * controller and use a different IMOD value. From owner-svn-src-all@freebsd.org Mon Oct 19 08:16: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 0C84EA18B06; Mon, 19 Oct 2015 08:16:50 +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 C0F44A75; Mon, 19 Oct 2015 08:16:49 +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 t9J8GmLp004002; Mon, 19 Oct 2015 08:16:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9J8GmrV003997; Mon, 19 Oct 2015 08:16:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510190816.t9J8GmrV003997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 19 Oct 2015 08:16:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289561 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/zpool vendor/illumos/dist/li... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 08:16:50 -0000 Author: mav Date: Mon Oct 19 08:16:46 2015 New Revision: 289561 URL: https://svnweb.freebsd.org/changeset/base/289561 Log: 6328 Fix cstyle errors in zfs codebase Reviewed by: Matthew Ahrens Reviewed by: Alex Reece Reviewed by: Richard Elling Reviewed by: Jorgen Lundman Approved by: Robert Mustacchi Author: Paul Dagnelie illumos/illumos-gate@9a686fbc186e8e2a64e9a5094d44c7d6fa0ea167 Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c vendor/illumos/dist/lib/libzfs/common/libzfs_iter.c vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c vendor/illumos/dist/lib/libzfs/common/libzfs_util.c vendor/illumos/dist/lib/libzpool/common/kernel.c Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/space_reftree.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zrlock.h vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_label.c vendor-sys/illumos/dist/uts/common/fs/zfs/zap_leaf.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfeature.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_dir.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_log.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_replay.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio_checksum.c vendor-sys/illumos/dist/uts/common/fs/zfs/zrlock.c Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c ============================================================================== --- vendor/illumos/dist/cmd/zpool/zpool_main.c Mon Oct 19 07:21:57 2015 (r289560) +++ vendor/illumos/dist/cmd/zpool/zpool_main.c Mon Oct 19 08:16:46 2015 (r289561) @@ -192,7 +192,8 @@ static boolean_t log_history = B_TRUE; static uint_t timestamp_fmt = NODATE; static const char * -get_usage(zpool_help_t idx) { +get_usage(zpool_help_t idx) +{ switch (idx) { case HELP_ADD: return (gettext("\tadd [-fn] ...\n")); Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_iter.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_iter.c Mon Oct 19 07:21:57 2015 (r289560) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_iter.c Mon Oct 19 08:16:46 2015 (r289561) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2015 by Delphix. All rights reserved. * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ @@ -308,7 +308,8 @@ typedef struct { } snapspec_arg_t; static int -snapspec_cb(zfs_handle_t *zhp, void *arg) { +snapspec_cb(zfs_handle_t *zhp, void *arg) +{ snapspec_arg_t *ssa = arg; char *shortsnapname; int err = 0; Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Mon Oct 19 07:21:57 2015 (r289560) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Mon Oct 19 08:16:46 2015 (r289561) @@ -22,7 +22,7 @@ /* * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -1855,7 +1855,8 @@ zpool_scan(zpool_handle_t *zhp, pool_sca * and the like. */ static int -ctd_check_path(char *str) { +ctd_check_path(char *str) +{ /* * If it starts with a slash, check the last component. */ Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_util.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_util.c Mon Oct 19 07:21:57 2015 (r289560) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_util.c Mon Oct 19 08:16:46 2015 (r289561) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. */ /* @@ -1518,7 +1518,8 @@ zprop_iter(zprop_func func, void *cb, bo * and bs are undefined. */ int -zfs_get_hole_count(const char *path, uint64_t *count, uint64_t *bs) { +zfs_get_hole_count(const char *path, uint64_t *count, uint64_t *bs) +{ int fd, err; struct stat64 ss; uint64_t fill; Modified: vendor/illumos/dist/lib/libzpool/common/kernel.c ============================================================================== --- vendor/illumos/dist/lib/libzpool/common/kernel.c Mon Oct 19 07:21:57 2015 (r289560) +++ vendor/illumos/dist/lib/libzpool/common/kernel.c Mon Oct 19 08:16:46 2015 (r289561) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -500,7 +500,7 @@ vn_openat(char *path, int x1, int flags, /*ARGSUSED*/ int vn_rdwr(int uio, vnode_t *vp, void *addr, ssize_t len, offset_t offset, - int x1, int x2, rlim64_t x3, void *x4, ssize_t *residp) + int x1, int x2, rlim64_t x3, void *x4, ssize_t *residp) { ssize_t iolen, split; From owner-svn-src-all@freebsd.org Mon Oct 19 08:16: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 5A190A18B02; Mon, 19 Oct 2015 08:16:49 +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 22914A74; Mon, 19 Oct 2015 08:16:49 +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 t9J8GmmJ003992; Mon, 19 Oct 2015 08:16:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9J8GkT5003976; Mon, 19 Oct 2015 08:16:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510190816.t9J8GkT5003976@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 19 Oct 2015 08:16:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289561 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/zpool vendor/illumos/dist/li... 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: Mon, 19 Oct 2015 08:16:49 -0000 Author: mav Date: Mon Oct 19 08:16:46 2015 New Revision: 289561 URL: https://svnweb.freebsd.org/changeset/base/289561 Log: 6328 Fix cstyle errors in zfs codebase Reviewed by: Matthew Ahrens Reviewed by: Alex Reece Reviewed by: Richard Elling Reviewed by: Jorgen Lundman Approved by: Robert Mustacchi Author: Paul Dagnelie illumos/illumos-gate@9a686fbc186e8e2a64e9a5094d44c7d6fa0ea167 Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/space_reftree.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zrlock.h vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_label.c vendor-sys/illumos/dist/uts/common/fs/zfs/zap_leaf.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfeature.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_dir.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_log.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_replay.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio_checksum.c vendor-sys/illumos/dist/uts/common/fs/zfs/zrlock.c Changes in other areas also in this revision: Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c vendor/illumos/dist/lib/libzfs/common/libzfs_iter.c vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c vendor/illumos/dist/lib/libzfs/common/libzfs_util.c vendor/illumos/dist/lib/libzpool/common/kernel.c Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.c ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zfeature_common.c Mon Oct 19 07:21:57 2015 (r289560) +++ vendor-sys/illumos/dist/common/zfs/zfeature_common.c Mon Oct 19 08:16:46 2015 (r289561) @@ -118,7 +118,8 @@ zfeature_lookup_name(const char *name, s } boolean_t -zfeature_depends_on(spa_feature_t fid, spa_feature_t check) { +zfeature_depends_on(spa_feature_t fid, spa_feature_t check) +{ zfeature_info_t *feature = &spa_feature_table[fid]; for (int i = 0; feature->fi_depends[i] != SPA_FEATURE_NONE; i++) { Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Mon Oct 19 07:21:57 2015 (r289560) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c Mon Oct 19 08:16:46 2015 (r289561) @@ -1670,7 +1670,7 @@ dmu_sync(zio_t *pio, uint64_t txg, dmu_s int dmu_object_set_blocksize(objset_t *os, uint64_t object, uint64_t size, int ibs, - dmu_tx_t *tx) + dmu_tx_t *tx) { dnode_t *dn; int err; @@ -1685,7 +1685,7 @@ dmu_object_set_blocksize(objset_t *os, u void dmu_object_set_checksum(objset_t *os, uint64_t object, uint8_t checksum, - dmu_tx_t *tx) + dmu_tx_t *tx) { dnode_t *dn; @@ -1705,7 +1705,7 @@ dmu_object_set_checksum(objset_t *os, ui void dmu_object_set_compress(objset_t *os, uint64_t object, uint8_t compress, - dmu_tx_t *tx) + dmu_tx_t *tx) { dnode_t *dn; @@ -1873,7 +1873,8 @@ dmu_offset_next(objset_t *os, uint64_t o * ID and wait for that to be synced. */ int -dmu_object_wait_synced(objset_t *os, uint64_t object) { +dmu_object_wait_synced(objset_t *os, uint64_t object) +{ dnode_t *dn; int error, i; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Mon Oct 19 07:21:57 2015 (r289560) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Mon Oct 19 08:16:46 2015 (r289561) @@ -3449,7 +3449,7 @@ dsl_dataset_space_wouldfree(dsl_dataset_ */ boolean_t dsl_dataset_is_before(dsl_dataset_t *later, dsl_dataset_t *earlier, - uint64_t earlier_txg) + uint64_t earlier_txg) { dsl_pool_t *dp = later->ds_dir->dd_pool; int error; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/space_reftree.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/space_reftree.c Mon Oct 19 07:21:57 2015 (r289560) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/space_reftree.c Mon Oct 19 08:16:46 2015 (r289561) @@ -23,7 +23,7 @@ * Use is subject to license terms. */ /* - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2015 by Delphix. All rights reserved. */ #include @@ -103,7 +103,7 @@ space_reftree_add_node(avl_tree_t *t, ui void space_reftree_add_seg(avl_tree_t *t, uint64_t start, uint64_t end, - int64_t refcnt) + int64_t refcnt) { space_reftree_add_node(t, start, refcnt); space_reftree_add_node(t, end, -refcnt); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zrlock.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zrlock.h Mon Oct 19 07:21:57 2015 (r289560) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zrlock.h Mon Oct 19 08:16:46 2015 (r289561) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015 by Delphix. All rights reserved. */ #ifndef _SYS_ZRLOCK_H @@ -44,12 +45,8 @@ typedef struct zrlock { extern void zrl_init(zrlock_t *); extern void zrl_destroy(zrlock_t *); -#ifdef ZFS_DEBUG -#define zrl_add(_z) zrl_add_debug((_z), __func__) -extern void zrl_add_debug(zrlock_t *, const char *); -#else -extern void zrl_add(zrlock_t *); -#endif +#define zrl_add(_z) zrl_add_impl((_z), __func__) +extern void zrl_add_impl(zrlock_t *, const char *); extern void zrl_remove(zrlock_t *); extern int zrl_tryenter(zrlock_t *); extern void zrl_exit(zrlock_t *); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_label.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_label.c Mon Oct 19 07:21:57 2015 (r289560) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_label.c Mon Oct 19 08:16:46 2015 (r289561) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. */ /* @@ -179,7 +179,7 @@ vdev_label_number(uint64_t psize, uint64 static void vdev_label_read(zio_t *zio, vdev_t *vd, int l, void *buf, uint64_t offset, - uint64_t size, zio_done_func_t *done, void *private, int flags) + uint64_t size, zio_done_func_t *done, void *private, int flags) { ASSERT(spa_config_held(zio->io_spa, SCL_STATE_ALL, RW_WRITER) == SCL_STATE_ALL); @@ -193,7 +193,7 @@ vdev_label_read(zio_t *zio, vdev_t *vd, static void vdev_label_write(zio_t *zio, vdev_t *vd, int l, void *buf, uint64_t offset, - uint64_t size, zio_done_func_t *done, void *private, int flags) + uint64_t size, zio_done_func_t *done, void *private, int flags) { ASSERT(spa_config_held(zio->io_spa, SCL_ALL, RW_WRITER) == SCL_ALL || (spa_config_held(zio->io_spa, SCL_CONFIG | SCL_STATE, RW_READER) == Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zap_leaf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zap_leaf.c Mon Oct 19 07:21:57 2015 (r289560) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zap_leaf.c Mon Oct 19 08:16:46 2015 (r289561) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013, 2014 by Delphix. All rights reserved. + * Copyright (c) 2013, 2015 by Delphix. All rights reserved. */ /* @@ -535,7 +535,7 @@ zap_entry_read_name(zap_t *zap, const za int zap_entry_update(zap_entry_handle_t *zeh, - uint8_t integer_size, uint64_t num_integers, const void *buf) + uint8_t integer_size, uint64_t num_integers, const void *buf) { int delta_chunks; zap_leaf_t *l = zeh->zeh_leaf; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfeature.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfeature.c Mon Oct 19 07:21:57 2015 (r289560) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfeature.c Mon Oct 19 08:16:46 2015 (r289561) @@ -269,7 +269,8 @@ feature_get_refcount_from_disk(spa_t *sp static int -feature_get_enabled_txg(spa_t *spa, zfeature_info_t *feature, uint64_t *res) { +feature_get_enabled_txg(spa_t *spa, zfeature_info_t *feature, uint64_t *res) +{ uint64_t enabled_txg_obj = spa->spa_feat_enabled_txg_obj; ASSERT(zfeature_depends_on(feature->fi_feature, @@ -489,7 +490,8 @@ spa_feature_is_active(spa_t *spa, spa_fe * Returns B_FALSE otherwise (i.e. if the feature is not enabled). */ boolean_t -spa_feature_enabled_txg(spa_t *spa, spa_feature_t fid, uint64_t *txg) { +spa_feature_enabled_txg(spa_t *spa, spa_feature_t fid, uint64_t *txg) +{ int err; ASSERT(VALID_FEATURE_FID(fid)); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_dir.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_dir.c Mon Oct 19 07:21:57 2015 (r289560) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_dir.c Mon Oct 19 08:16:46 2015 (r289561) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013, 2014 by Delphix. All rights reserved. + * Copyright (c) 2013, 2015 by Delphix. All rights reserved. */ #include @@ -801,7 +801,7 @@ zfs_dropname(zfs_dirlock_t *dl, znode_t */ int zfs_link_destroy(zfs_dirlock_t *dl, znode_t *zp, dmu_tx_t *tx, int flag, - boolean_t *unlinkedp) + boolean_t *unlinkedp) { znode_t *dzp = dl->dl_dzp; zfsvfs_t *zfsvfs = dzp->z_zfsvfs; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Mon Oct 19 07:21:57 2015 (r289560) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Mon Oct 19 08:16:46 2015 (r289561) @@ -5544,7 +5544,7 @@ zfs_ioctl_register_dataset_read(zfs_ioc_ static void zfs_ioctl_register_dataset_modify(zfs_ioc_t ioc, zfs_ioc_legacy_func_t *func, - zfs_secpolicy_func_t *secpolicy) + zfs_secpolicy_func_t *secpolicy) { zfs_ioctl_register_legacy(ioc, func, secpolicy, DATASET_NAME, B_TRUE, POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_log.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_log.c Mon Oct 19 07:21:57 2015 (r289560) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_log.c Mon Oct 19 08:16:46 2015 (r289561) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015 by Delphix. All rights reserved. */ #include @@ -343,7 +344,7 @@ zfs_log_create(zilog_t *zilog, dmu_tx_t */ void zfs_log_remove(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype, - znode_t *dzp, char *name, uint64_t foid) + znode_t *dzp, char *name, uint64_t foid) { itx_t *itx; lr_remove_t *lr; @@ -367,7 +368,7 @@ zfs_log_remove(zilog_t *zilog, dmu_tx_t */ void zfs_log_link(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype, - znode_t *dzp, znode_t *zp, char *name) + znode_t *dzp, znode_t *zp, char *name) { itx_t *itx; lr_link_t *lr; @@ -422,7 +423,7 @@ zfs_log_symlink(zilog_t *zilog, dmu_tx_t */ void zfs_log_rename(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype, - znode_t *sdzp, char *sname, znode_t *tdzp, char *dname, znode_t *szp) + znode_t *sdzp, char *sname, znode_t *tdzp, char *dname, znode_t *szp) { itx_t *itx; lr_rename_t *lr; @@ -450,7 +451,7 @@ ssize_t zfs_immediate_write_sz = 32768; void zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype, - znode_t *zp, offset_t off, ssize_t resid, int ioflag) + znode_t *zp, offset_t off, ssize_t resid, int ioflag) { itx_wr_state_t write_state; boolean_t slogging; @@ -527,7 +528,7 @@ zfs_log_write(zilog_t *zilog, dmu_tx_t * */ void zfs_log_truncate(zilog_t *zilog, dmu_tx_t *tx, int txtype, - znode_t *zp, uint64_t off, uint64_t len) + znode_t *zp, uint64_t off, uint64_t len) { itx_t *itx; lr_truncate_t *lr; @@ -550,7 +551,7 @@ zfs_log_truncate(zilog_t *zilog, dmu_tx_ */ void zfs_log_setattr(zilog_t *zilog, dmu_tx_t *tx, int txtype, - znode_t *zp, vattr_t *vap, uint_t mask_applied, zfs_fuid_info_t *fuidp) + znode_t *zp, vattr_t *vap, uint_t mask_applied, zfs_fuid_info_t *fuidp) { itx_t *itx; lr_setattr_t *lr; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_replay.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_replay.c Mon Oct 19 07:21:57 2015 (r289560) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_replay.c Mon Oct 19 08:16:46 2015 (r289561) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2015 by Delphix. All rights reserved. */ #include @@ -55,7 +55,7 @@ static void zfs_init_vattr(vattr_t *vap, uint64_t mask, uint64_t mode, - uint64_t uid, uint64_t gid, uint64_t rdev, uint64_t nodeid) + uint64_t uid, uint64_t gid, uint64_t rdev, uint64_t nodeid) { bzero(vap, sizeof (*vap)); vap->va_mask = (uint_t)mask; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c Mon Oct 19 07:21:57 2015 (r289560) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c Mon Oct 19 08:16:46 2015 (r289561) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ @@ -4137,7 +4137,7 @@ top: /* ARGSUSED */ static int zfs_null_putapage(vnode_t *vp, page_t *pp, u_offset_t *offp, - size_t *lenp, int flags, cred_t *cr) + size_t *lenp, int flags, cred_t *cr) { pvn_write_done(pp, B_INVAL|B_FORCE|B_ERROR); return (0); @@ -4163,7 +4163,7 @@ zfs_null_putapage(vnode_t *vp, page_t *p /* ARGSUSED */ static int zfs_putapage(vnode_t *vp, page_t *pp, u_offset_t *offp, - size_t *lenp, int flags, cred_t *cr) + size_t *lenp, int flags, cred_t *cr) { znode_t *zp = VTOZ(vp); zfsvfs_t *zfsvfs = zp->z_zfsvfs; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Mon Oct 19 07:21:57 2015 (r289560) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Mon Oct 19 08:16:46 2015 (r289561) @@ -267,7 +267,7 @@ zio_data_buf_free(void *buf, size_t size */ static void zio_push_transform(zio_t *zio, void *data, uint64_t size, uint64_t bufsize, - zio_transform_func_t *transform) + zio_transform_func_t *transform) { zio_transform_t *zt = kmem_alloc(sizeof (zio_transform_t), KM_SLEEP); @@ -994,8 +994,8 @@ zio_vdev_child_io(zio_t *pio, blkptr_t * zio_t * zio_vdev_delegated_io(vdev_t *vd, uint64_t offset, void *data, uint64_t size, - int type, zio_priority_t priority, enum zio_flag flags, - zio_done_func_t *done, void *private) + int type, zio_priority_t priority, enum zio_flag flags, + zio_done_func_t *done, void *private) { zio_t *zio; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zio_checksum.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zio_checksum.c Mon Oct 19 07:21:57 2015 (r289560) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zio_checksum.c Mon Oct 19 08:16:46 2015 (r289561) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2015 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright 2013 Saso Kiselkov. All rights reserved. */ @@ -245,7 +245,7 @@ zio_checksum_template_init(enum zio_chec */ void zio_checksum_compute(zio_t *zio, enum zio_checksum checksum, - void *data, uint64_t size) + void *data, uint64_t size) { blkptr_t *bp = zio->io_bp; uint64_t offset = zio->io_offset; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zrlock.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zrlock.c Mon Oct 19 07:21:57 2015 (r289560) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zrlock.c Mon Oct 19 08:16:46 2015 (r289561) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2014 by Delphix. All rights reserved. + * Copyright (c) 2014, 2015 by Delphix. All rights reserved. */ /* @@ -69,11 +69,7 @@ zrl_destroy(zrlock_t *zrl) } void -#ifdef ZFS_DEBUG -zrl_add_debug(zrlock_t *zrl, const char *zc) -#else -zrl_add(zrlock_t *zrl) -#endif +zrl_add_impl(zrlock_t *zrl, const char *zc) { uint32_t n = (uint32_t)zrl->zr_refcount; From owner-svn-src-all@freebsd.org Mon Oct 19 08:25: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 D365DA18EA1; Mon, 19 Oct 2015 08:25:40 +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 94F5512DB; Mon, 19 Oct 2015 08:25:40 +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 t9J8Pdgo007399; Mon, 19 Oct 2015 08:25:39 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9J8PbkP007378; Mon, 19 Oct 2015 08:25:37 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510190825.t9J8PbkP007378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 19 Oct 2015 08:25:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289562 - in head: cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/lib/libzpool/common sys/cddl/contrib/opensolaris/common/zfs 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, 19 Oct 2015 08:25:41 -0000 Author: mav Date: Mon Oct 19 08:25:37 2015 New Revision: 289562 URL: https://svnweb.freebsd.org/changeset/base/289562 Log: MFV r289561: 6328 Fix cstyle errors in zfs codebase Reviewed by: Matthew Ahrens Reviewed by: Alex Reece Reviewed by: Richard Elling Reviewed by: Jorgen Lundman Approved by: Robert Mustacchi Author: Paul Dagnelie illumos/illumos-gate@9a686fbc186e8e2a64e9a5094d44c7d6fa0ea167 Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_reftree.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zrlock.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zrlock.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Oct 19 08:16:46 2015 (r289561) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Oct 19 08:25:37 2015 (r289562) @@ -199,7 +199,8 @@ static boolean_t log_history = B_TRUE; static uint_t timestamp_fmt = NODATE; static const char * -get_usage(zpool_help_t idx) { +get_usage(zpool_help_t idx) +{ switch (idx) { case HELP_ADD: return (gettext("\tadd [-fn] ...\n")); Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c Mon Oct 19 08:16:46 2015 (r289561) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c Mon Oct 19 08:25:37 2015 (r289562) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2015 by Delphix. All rights reserved. * Copyright (c) 2012 Pawel Jakub Dawidek . * All rights reserved. * Copyright 2014 Nexenta Systems, Inc. All rights reserved. @@ -315,7 +315,8 @@ typedef struct { } snapspec_arg_t; static int -snapspec_cb(zfs_handle_t *zhp, void *arg) { +snapspec_cb(zfs_handle_t *zhp, void *arg) +{ snapspec_arg_t *ssa = arg; char *shortsnapname; int err = 0; Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Mon Oct 19 08:16:46 2015 (r289561) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Mon Oct 19 08:25:37 2015 (r289562) @@ -22,7 +22,7 @@ /* * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -1885,7 +1885,8 @@ zpool_scan(zpool_handle_t *zhp, pool_sca * and the like. */ static int -ctd_check_path(char *str) { +ctd_check_path(char *str) +{ /* * If it starts with a slash, check the last component. */ Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Mon Oct 19 08:16:46 2015 (r289561) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Mon Oct 19 08:25:37 2015 (r289562) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. */ /* Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Mon Oct 19 08:16:46 2015 (r289561) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Mon Oct 19 08:25:37 2015 (r289562) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -523,7 +523,7 @@ vn_openat(char *path, int x1, int flags, /*ARGSUSED*/ int vn_rdwr(int uio, vnode_t *vp, void *addr, ssize_t len, offset_t offset, - int x1, int x2, rlim64_t x3, void *x4, ssize_t *residp) + int x1, int x2, rlim64_t x3, void *x4, ssize_t *residp) { ssize_t iolen, split; Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Mon Oct 19 08:16:46 2015 (r289561) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c Mon Oct 19 08:25:37 2015 (r289562) @@ -117,7 +117,8 @@ zfeature_lookup_name(const char *name, s } boolean_t -zfeature_depends_on(spa_feature_t fid, spa_feature_t check) { +zfeature_depends_on(spa_feature_t fid, spa_feature_t check) +{ zfeature_info_t *feature = &spa_feature_table[fid]; for (int i = 0; feature->fi_depends[i] != SPA_FEATURE_NONE; i++) { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Mon Oct 19 08:16:46 2015 (r289561) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Mon Oct 19 08:25:37 2015 (r289562) @@ -1739,7 +1739,7 @@ dmu_sync(zio_t *pio, uint64_t txg, dmu_s int dmu_object_set_blocksize(objset_t *os, uint64_t object, uint64_t size, int ibs, - dmu_tx_t *tx) + dmu_tx_t *tx) { dnode_t *dn; int err; @@ -1754,7 +1754,7 @@ dmu_object_set_blocksize(objset_t *os, u void dmu_object_set_checksum(objset_t *os, uint64_t object, uint8_t checksum, - dmu_tx_t *tx) + dmu_tx_t *tx) { dnode_t *dn; @@ -1774,7 +1774,7 @@ dmu_object_set_checksum(objset_t *os, ui void dmu_object_set_compress(objset_t *os, uint64_t object, uint8_t compress, - dmu_tx_t *tx) + dmu_tx_t *tx) { dnode_t *dn; @@ -1944,7 +1944,8 @@ dmu_offset_next(objset_t *os, uint64_t o * ID and wait for that to be synced. */ int -dmu_object_wait_synced(objset_t *os, uint64_t object) { +dmu_object_wait_synced(objset_t *os, uint64_t object) +{ dnode_t *dn; int error, i; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Mon Oct 19 08:16:46 2015 (r289561) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Mon Oct 19 08:25:37 2015 (r289562) @@ -3558,7 +3558,7 @@ dsl_dataset_space_wouldfree(dsl_dataset_ */ boolean_t dsl_dataset_is_before(dsl_dataset_t *later, dsl_dataset_t *earlier, - uint64_t earlier_txg) + uint64_t earlier_txg) { dsl_pool_t *dp = later->ds_dir->dd_pool; int error; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_reftree.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_reftree.c Mon Oct 19 08:16:46 2015 (r289561) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_reftree.c Mon Oct 19 08:25:37 2015 (r289562) @@ -23,7 +23,7 @@ * Use is subject to license terms. */ /* - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2015 by Delphix. All rights reserved. */ #include @@ -103,7 +103,7 @@ space_reftree_add_node(avl_tree_t *t, ui void space_reftree_add_seg(avl_tree_t *t, uint64_t start, uint64_t end, - int64_t refcnt) + int64_t refcnt) { space_reftree_add_node(t, start, refcnt); space_reftree_add_node(t, end, -refcnt); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zrlock.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zrlock.h Mon Oct 19 08:16:46 2015 (r289561) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zrlock.h Mon Oct 19 08:25:37 2015 (r289562) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015 by Delphix. All rights reserved. */ #ifndef _SYS_ZRLOCK_H @@ -44,12 +45,8 @@ typedef struct zrlock { extern void zrl_init(zrlock_t *); extern void zrl_destroy(zrlock_t *); -#ifdef ZFS_DEBUG -#define zrl_add(_z) zrl_add_debug((_z), __func__) -extern void zrl_add_debug(zrlock_t *, const char *); -#else -extern void zrl_add(zrlock_t *); -#endif +#define zrl_add(_z) zrl_add_impl((_z), __func__) +extern void zrl_add_impl(zrlock_t *, const char *); extern void zrl_remove(zrlock_t *); extern int zrl_tryenter(zrlock_t *); extern void zrl_exit(zrlock_t *); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Mon Oct 19 08:16:46 2015 (r289561) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Mon Oct 19 08:25:37 2015 (r289562) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. */ /* @@ -185,7 +185,7 @@ vdev_label_number(uint64_t psize, uint64 static void vdev_label_read(zio_t *zio, vdev_t *vd, int l, void *buf, uint64_t offset, - uint64_t size, zio_done_func_t *done, void *private, int flags) + uint64_t size, zio_done_func_t *done, void *private, int flags) { ASSERT(spa_config_held(zio->io_spa, SCL_STATE_ALL, RW_WRITER) == SCL_STATE_ALL); @@ -199,7 +199,7 @@ vdev_label_read(zio_t *zio, vdev_t *vd, static void vdev_label_write(zio_t *zio, vdev_t *vd, int l, void *buf, uint64_t offset, - uint64_t size, zio_done_func_t *done, void *private, int flags) + uint64_t size, zio_done_func_t *done, void *private, int flags) { ASSERT(spa_config_held(zio->io_spa, SCL_ALL, RW_WRITER) == SCL_ALL || (spa_config_held(zio->io_spa, SCL_CONFIG | SCL_STATE, RW_READER) == Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c Mon Oct 19 08:16:46 2015 (r289561) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c Mon Oct 19 08:25:37 2015 (r289562) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013, 2014 by Delphix. All rights reserved. + * Copyright (c) 2013, 2015 by Delphix. All rights reserved. */ /* @@ -535,7 +535,7 @@ zap_entry_read_name(zap_t *zap, const za int zap_entry_update(zap_entry_handle_t *zeh, - uint8_t integer_size, uint64_t num_integers, const void *buf) + uint8_t integer_size, uint64_t num_integers, const void *buf) { int delta_chunks; zap_leaf_t *l = zeh->zeh_leaf; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c Mon Oct 19 08:16:46 2015 (r289561) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c Mon Oct 19 08:25:37 2015 (r289562) @@ -269,7 +269,8 @@ feature_get_refcount_from_disk(spa_t *sp static int -feature_get_enabled_txg(spa_t *spa, zfeature_info_t *feature, uint64_t *res) { +feature_get_enabled_txg(spa_t *spa, zfeature_info_t *feature, uint64_t *res) +{ uint64_t enabled_txg_obj = spa->spa_feat_enabled_txg_obj; ASSERT(zfeature_depends_on(feature->fi_feature, @@ -493,7 +494,8 @@ spa_feature_is_active(spa_t *spa, spa_fe * Returns B_FALSE otherwise (i.e. if the feature is not enabled). */ boolean_t -spa_feature_enabled_txg(spa_t *spa, spa_feature_t fid, uint64_t *txg) { +spa_feature_enabled_txg(spa_t *spa, spa_feature_t fid, uint64_t *txg) +{ int err; ASSERT(VALID_FEATURE_FID(fid)); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Mon Oct 19 08:16:46 2015 (r289561) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Mon Oct 19 08:25:37 2015 (r289562) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013, 2014 by Delphix. All rights reserved. + * Copyright (c) 2013, 2015 by Delphix. All rights reserved. */ #include @@ -806,7 +806,7 @@ zfs_dropname(zfs_dirlock_t *dl, znode_t */ int zfs_link_destroy(zfs_dirlock_t *dl, znode_t *zp, dmu_tx_t *tx, int flag, - boolean_t *unlinkedp) + boolean_t *unlinkedp) { znode_t *dzp = dl->dl_dzp; zfsvfs_t *zfsvfs = dzp->z_zfsvfs; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Oct 19 08:16:46 2015 (r289561) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Oct 19 08:25:37 2015 (r289562) @@ -5708,7 +5708,7 @@ zfs_ioctl_register_dataset_read(zfs_ioc_ static void zfs_ioctl_register_dataset_modify(zfs_ioc_t ioc, zfs_ioc_legacy_func_t *func, - zfs_secpolicy_func_t *secpolicy) + zfs_secpolicy_func_t *secpolicy) { zfs_ioctl_register_legacy(ioc, func, secpolicy, DATASET_NAME, B_TRUE, POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c Mon Oct 19 08:16:46 2015 (r289561) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c Mon Oct 19 08:25:37 2015 (r289562) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015 by Delphix. All rights reserved. */ #include @@ -348,7 +349,7 @@ zfs_log_create(zilog_t *zilog, dmu_tx_t */ void zfs_log_remove(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype, - znode_t *dzp, char *name, uint64_t foid) + znode_t *dzp, char *name, uint64_t foid) { itx_t *itx; lr_remove_t *lr; @@ -372,7 +373,7 @@ zfs_log_remove(zilog_t *zilog, dmu_tx_t */ void zfs_log_link(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype, - znode_t *dzp, znode_t *zp, char *name) + znode_t *dzp, znode_t *zp, char *name) { itx_t *itx; lr_link_t *lr; @@ -427,7 +428,7 @@ zfs_log_symlink(zilog_t *zilog, dmu_tx_t */ void zfs_log_rename(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype, - znode_t *sdzp, char *sname, znode_t *tdzp, char *dname, znode_t *szp) + znode_t *sdzp, char *sname, znode_t *tdzp, char *dname, znode_t *szp) { itx_t *itx; lr_rename_t *lr; @@ -455,7 +456,7 @@ ssize_t zfs_immediate_write_sz = 32768; void zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype, - znode_t *zp, offset_t off, ssize_t resid, int ioflag) + znode_t *zp, offset_t off, ssize_t resid, int ioflag) { itx_wr_state_t write_state; boolean_t slogging; @@ -532,7 +533,7 @@ zfs_log_write(zilog_t *zilog, dmu_tx_t * */ void zfs_log_truncate(zilog_t *zilog, dmu_tx_t *tx, int txtype, - znode_t *zp, uint64_t off, uint64_t len) + znode_t *zp, uint64_t off, uint64_t len) { itx_t *itx; lr_truncate_t *lr; @@ -555,7 +556,7 @@ zfs_log_truncate(zilog_t *zilog, dmu_tx_ */ void zfs_log_setattr(zilog_t *zilog, dmu_tx_t *tx, int txtype, - znode_t *zp, vattr_t *vap, uint_t mask_applied, zfs_fuid_info_t *fuidp) + znode_t *zp, vattr_t *vap, uint_t mask_applied, zfs_fuid_info_t *fuidp) { itx_t *itx; lr_setattr_t *lr; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c Mon Oct 19 08:16:46 2015 (r289561) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c Mon Oct 19 08:25:37 2015 (r289562) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2015 by Delphix. All rights reserved. */ #include @@ -54,7 +54,7 @@ static void zfs_init_vattr(vattr_t *vap, uint64_t mask, uint64_t mode, - uint64_t uid, uint64_t gid, uint64_t rdev, uint64_t nodeid) + uint64_t uid, uint64_t gid, uint64_t rdev, uint64_t nodeid) { VATTR_NULL(vap); vap->va_mask = (uint_t)mask; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Oct 19 08:16:46 2015 (r289561) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Oct 19 08:25:37 2015 (r289562) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ @@ -4520,7 +4520,7 @@ top: /* ARGSUSED */ static int zfs_null_putapage(vnode_t *vp, page_t *pp, u_offset_t *offp, - size_t *lenp, int flags, cred_t *cr) + size_t *lenp, int flags, cred_t *cr) { pvn_write_done(pp, B_INVAL|B_FORCE|B_ERROR); return (0); @@ -4546,7 +4546,7 @@ zfs_null_putapage(vnode_t *vp, page_t *p /* ARGSUSED */ static int zfs_putapage(vnode_t *vp, page_t *pp, u_offset_t *offp, - size_t *lenp, int flags, cred_t *cr) + size_t *lenp, int flags, cred_t *cr) { znode_t *zp = VTOZ(vp); zfsvfs_t *zfsvfs = zp->z_zfsvfs; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Mon Oct 19 08:16:46 2015 (r289561) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Mon Oct 19 08:25:37 2015 (r289562) @@ -328,7 +328,7 @@ zio_data_buf_free(void *buf, size_t size */ static void zio_push_transform(zio_t *zio, void *data, uint64_t size, uint64_t bufsize, - zio_transform_func_t *transform) + zio_transform_func_t *transform) { zio_transform_t *zt = kmem_alloc(sizeof (zio_transform_t), KM_SLEEP); @@ -1066,8 +1066,8 @@ zio_vdev_child_io(zio_t *pio, blkptr_t * zio_t * zio_vdev_delegated_io(vdev_t *vd, uint64_t offset, void *data, uint64_t size, - int type, zio_priority_t priority, enum zio_flag flags, - zio_done_func_t *done, void *private) + int type, zio_priority_t priority, enum zio_flag flags, + zio_done_func_t *done, void *private) { zio_t *zio; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c Mon Oct 19 08:16:46 2015 (r289561) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c Mon Oct 19 08:25:37 2015 (r289562) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2015 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright 2013 Saso Kiselkov. All rights reserved. */ @@ -249,7 +249,7 @@ zio_checksum_template_init(enum zio_chec */ void zio_checksum_compute(zio_t *zio, enum zio_checksum checksum, - void *data, uint64_t size) + void *data, uint64_t size) { blkptr_t *bp = zio->io_bp; uint64_t offset = zio->io_offset; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zrlock.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zrlock.c Mon Oct 19 08:16:46 2015 (r289561) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zrlock.c Mon Oct 19 08:25:37 2015 (r289562) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2014 by Delphix. All rights reserved. + * Copyright (c) 2014, 2015 by Delphix. All rights reserved. */ /* @@ -69,11 +69,7 @@ zrl_destroy(zrlock_t *zrl) } void -#ifdef ZFS_DEBUG -zrl_add_debug(zrlock_t *zrl, const char *zc) -#else -zrl_add(zrlock_t *zrl) -#endif +zrl_add_impl(zrlock_t *zrl, const char *zc) { uint32_t n = (uint32_t)zrl->zr_refcount; From owner-svn-src-all@freebsd.org Mon Oct 19 09:39: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 B73FEA18CF1; Mon, 19 Oct 2015 09:39:26 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-qk0-x234.google.com (mail-qk0-x234.google.com [IPv6:2607:f8b0:400d:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 651D2D5A; Mon, 19 Oct 2015 09:39:26 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by qkfm62 with SMTP id m62so78868171qkf.1; Mon, 19 Oct 2015 02:39:25 -0700 (PDT) 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=lrGhP9EGFeaDqmCEcpZ6+fYU0NI89+/pWNXPmz/zSwc=; b=QcOuwEZtVebp4mDbRmdzKgMjMxCFoUUcntDTE1hPhk7Yg8NxoICxT11j97bCBuK4ni dim30oMRyzMS7VGXcjOAr8ErIqDIRUksq53tYcfqbkZsw6ruN+pYXqj9ctH5XhaOLoZJ +iJhBZ1S2FQvb7oiFILQvxMvMiovujBROBkSYkHHNXjpxQIJgPyMqDhSn+ligfPt3LIM 3ACW+uWl7XLIBYn9cZOqMFnywqM1zl2HVafg/l4cWM2szX+/WWt2lQl5jFIYij9bMBCv zehayODTyosK6LIAZd5hdUwc+RhUeK7TzqmudVLY+k/nrcs5tePH0ybDHvw/ax4lUwPt 023Q== X-Received: by 10.55.192.81 with SMTP id o78mr34309002qki.97.1445247565590; Mon, 19 Oct 2015 02:39:25 -0700 (PDT) Received: from mbp.home ([177.131.93.52]) by smtp.gmail.com with ESMTPSA id s87sm13987721qkl.5.2015.10.19.02.39.23 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 19 Oct 2015 02:39:24 -0700 (PDT) Sender: Renato Botelho Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3094\)) Subject: Re: svn commit: r289549 - in head: contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers contrib/wpa/s... From: Renato Botelho In-Reply-To: <201510182138.t9ILcPrs017288@repo.freebsd.org> Date: Mon, 19 Oct 2015 07:39:20 -0200 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <201510182138.t9ILcPrs017288@repo.freebsd.org> To: Rui Paulo X-Mailer: Apple Mail (2.3094) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 09:39:26 -0000 > On Oct 18, 2015, at 19:38, Rui Paulo wrote: > > Author: rpaulo > Date: Sun Oct 18 21:38:25 2015 > New Revision: 289549 > URL: https://svnweb.freebsd.org/changeset/base/289549 > > Log: > Update hostapd/wpa_supplicant to version 2.5. > > Tested by several people on current@/wireless@. > > Relnotes: yes Thanks Rui! Do you plan to MFC these changes to stable/10? -- Renato Botelho From owner-svn-src-all@freebsd.org Mon Oct 19 10:49: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 71026A19ECE; Mon, 19 Oct 2015 10:49: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 329EB1309; Mon, 19 Oct 2015 10:49: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 t9JAnGwm049171; Mon, 19 Oct 2015 10:49:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JAnGh3049170; Mon, 19 Oct 2015 10:49:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510191049.t9JAnGh3049170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Oct 2015 10:49:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289563 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 10:49:17 -0000 Author: hselasky Date: Mon Oct 19 10:49:15 2015 New Revision: 289563 URL: https://svnweb.freebsd.org/changeset/base/289563 Log: Merge LinuxKPI changes from DragonflyBSD: - Some minor whitespace fixes. - Added support for two new Linux functions. Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/workqueue.h Modified: head/sys/ofed/include/linux/workqueue.h ============================================================================== --- head/sys/ofed/include/linux/workqueue.h Mon Oct 19 08:25:37 2015 (r289562) +++ head/sys/ofed/include/linux/workqueue.h Mon Oct 19 10:49:15 2015 (r289563) @@ -91,11 +91,11 @@ do { \ #define flush_scheduled_work() flush_taskqueue(taskqueue_thread) -static inline int queue_work (struct workqueue_struct *q, struct work_struct *work) +static inline int queue_work(struct workqueue_struct *q, struct work_struct *work) { (work)->taskqueue = (q)->taskqueue; /* Return opposite val to align with Linux logic */ - return !taskqueue_enqueue((q)->taskqueue, &(work)->work_task); + return !taskqueue_enqueue((q)->taskqueue, &(work)->work_task); } static inline void @@ -151,6 +151,12 @@ _create_workqueue_common(char *name, int #define create_workqueue(name) \ _create_workqueue_common(name, MAXCPU) +#define alloc_ordered_workqueue(name, flags) \ + _create_workqueue_common(name, 1) + +#define alloc_workqueue(name, flags, max_active) \ + _create_workqueue_common(name, max_active) + static inline void destroy_workqueue(struct workqueue_struct *wq) { From owner-svn-src-all@freebsd.org Mon Oct 19 10:54: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 9B948A18199; Mon, 19 Oct 2015 10:54:25 +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 69DDC1A89; Mon, 19 Oct 2015 10:54:25 +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 t9JAsOn1051897; Mon, 19 Oct 2015 10:54:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JAsOBT051896; Mon, 19 Oct 2015 10:54:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510191054.t9JAsOBT051896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Oct 2015 10:54:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289564 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 10:54:25 -0000 Author: hselasky Date: Mon Oct 19 10:54:24 2015 New Revision: 289564 URL: https://svnweb.freebsd.org/changeset/base/289564 Log: Merge LinuxKPI changes from DragonflyBSD: - Added support for multiple new Linux functions. - Properly implement DEFINE_WAIT() and init_waitqueue_head() macros. - Removed FreeBSD specific __wait_queue_head structure definition. Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/wait.h Modified: head/sys/ofed/include/linux/wait.h ============================================================================== --- head/sys/ofed/include/linux/wait.h Mon Oct 19 10:49:15 2015 (r289563) +++ head/sys/ofed/include/linux/wait.h Mon Oct 19 10:54:24 2015 (r289564) @@ -39,15 +39,18 @@ #include #include -struct __wait_queue_head { +typedef struct { +} wait_queue_t; + +typedef struct { unsigned int wchan; -}; -typedef struct __wait_queue_head wait_queue_head_t; +} wait_queue_head_t; -#define init_waitqueue_head(x) +#define init_waitqueue_head(x) \ + do { } while (0) static inline void -__wake_up(struct __wait_queue_head *q, int all) +__wake_up(wait_queue_head_t *q, int all) { int wakeup_swapper; void *c; @@ -108,6 +111,23 @@ do { \ -_error; \ }) -#define DEFINE_WAIT(x) +static inline int +waitqueue_active(wait_queue_head_t *q) +{ + return 0; /* XXX: not really implemented */ +} + +#define DEFINE_WAIT(name) \ + wait_queue_t name = {} + +static inline void +prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state) +{ +} + +static inline void +finish_wait(wait_queue_head_t *q, wait_queue_t *wait) +{ +} #endif /* _LINUX_WAIT_H_ */ From owner-svn-src-all@freebsd.org Mon Oct 19 10:56: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 B81ABA18253; Mon, 19 Oct 2015 10:56: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 794401CC0; Mon, 19 Oct 2015 10:56: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 t9JAuWvR052022; Mon, 19 Oct 2015 10:56:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JAuWhF052021; Mon, 19 Oct 2015 10:56:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510191056.t9JAuWhF052021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Oct 2015 10:56:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289565 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 10:56:33 -0000 Author: hselasky Date: Mon Oct 19 10:56:32 2015 New Revision: 289565 URL: https://svnweb.freebsd.org/changeset/base/289565 Log: Merge LinuxKPI changes from DragonflyBSD: - Implement pagefault_disable() and pagefault_enable(). Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/uaccess.h Modified: head/sys/ofed/include/linux/uaccess.h ============================================================================== --- head/sys/ofed/include/linux/uaccess.h Mon Oct 19 10:54:24 2015 (r289564) +++ head/sys/ofed/include/linux/uaccess.h Mon Oct 19 10:56:32 2015 (r289565) @@ -2,7 +2,8 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. + * Copyright (c) 2015 François Tigeot * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,4 +33,14 @@ #define get_user(_x, _p) -copyin((_p), &(_x), sizeof(*(_p))) #define put_user(_x, _p) -copyout(&(_x), (_p), sizeof(*(_p))) +static inline void pagefault_disable(void) +{ + curthread_pflags_set(TDP_NOFAULTING | TDP_RESETSPUR); +} + +static inline void pagefault_enable(void) +{ + curthread_pflags_restore(~(TDP_NOFAULTING | TDP_RESETSPUR)); +} + #endif /* _LINUX_UACCESS_H_ */ From owner-svn-src-all@freebsd.org Mon Oct 19 10:57: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 87648A18311; Mon, 19 Oct 2015 10:57: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 51B151E97; Mon, 19 Oct 2015 10:57: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 t9JAvuns052106; Mon, 19 Oct 2015 10:57:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JAvunk052105; Mon, 19 Oct 2015 10:57:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510191057.t9JAvunk052105@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Oct 2015 10:57:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289566 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 10:57:57 -0000 Author: hselasky Date: Mon Oct 19 10:57:56 2015 New Revision: 289566 URL: https://svnweb.freebsd.org/changeset/base/289566 Log: Merge LinuxKPI changes from DragonflyBSD: - Implement schedule_timeout(). Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/sched.h Modified: head/sys/ofed/include/linux/sched.h ============================================================================== --- head/sys/ofed/include/linux/sched.h Mon Oct 19 10:56:32 2015 (r289565) +++ head/sys/ofed/include/linux/sched.h Mon Oct 19 10:57:56 2015 (r289566) @@ -107,4 +107,15 @@ do { \ #define sched_yield() sched_relinquish(curthread) +static inline long +schedule_timeout(signed long timeout) +{ + if (timeout < 0) + return 0; + + pause("lstim", timeout); + + return 0; +} + #endif /* _LINUX_SCHED_H_ */ From owner-svn-src-all@freebsd.org Mon Oct 19 11:09: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 428C5A18725; Mon, 19 Oct 2015 11:09:53 +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 19BF8990; Mon, 19 Oct 2015 11:09:53 +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 t9JB9qEs055284; Mon, 19 Oct 2015 11:09:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JB9qIb055283; Mon, 19 Oct 2015 11:09:52 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510191109.t9JB9qIb055283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Oct 2015 11:09:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289567 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 11:09:53 -0000 Author: hselasky Date: Mon Oct 19 11:09:51 2015 New Revision: 289567 URL: https://svnweb.freebsd.org/changeset/base/289567 Log: Merge LinuxKPI changes from DragonflyBSD: - Avoid using PAGE_MASK, because Linux defines it differently. Use (PAGE_SIZE - 1) instead. - Add support for for_each_sg_page() and sg_page_iter_dma_address(). Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/scatterlist.h Modified: head/sys/ofed/include/linux/scatterlist.h ============================================================================== --- head/sys/ofed/include/linux/scatterlist.h Mon Oct 19 10:57:56 2015 (r289566) +++ head/sys/ofed/include/linux/scatterlist.h Mon Oct 19 11:09:51 2015 (r289567) @@ -3,6 +3,7 @@ * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2015 Matthew Dillon * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -64,6 +65,12 @@ struct sg_table { unsigned int orig_nents; /* original size of list */ }; +struct sg_page_iter { + struct scatterlist *sg; + unsigned int sg_pgoffset; /* page index */ + unsigned int maxents; +}; + /* * Maximum number of entries that will be allocated in one piece, if * a list larger than this is required then chaining will be utilized. @@ -93,7 +100,7 @@ static inline void sg_set_buf(struct scatterlist *sg, const void *buf, unsigned int buflen) { sg_set_page(sg, virt_to_page(buf), buflen, - ((uintptr_t)buf) & ~PAGE_MASK); + ((uintptr_t)buf) & (PAGE_SIZE - 1)); } static inline void @@ -326,6 +333,66 @@ sg_alloc_table(struct sg_table *table, u return ret; } +/* + * Iterate pages in sg list. + */ +static inline void +_sg_iter_next(struct sg_page_iter *iter) +{ + struct scatterlist *sg; + unsigned int pgcount; + + sg = iter->sg; + pgcount = (sg->offset + sg->length + PAGE_SIZE - 1) >> PAGE_SHIFT; + + ++iter->sg_pgoffset; + while (iter->sg_pgoffset >= pgcount) { + iter->sg_pgoffset -= pgcount; + sg = sg_next(sg); + --iter->maxents; + if (sg == NULL || iter->maxents == 0) + break; + pgcount = (sg->offset + sg->length + PAGE_SIZE - 1) >> PAGE_SHIFT; + } + iter->sg = sg; +} + +/* + * NOTE: pgoffset is really a page index, not a byte offset. + */ +static inline void +_sg_iter_init(struct scatterlist *sgl, struct sg_page_iter *iter, + unsigned int nents, unsigned long pgoffset) +{ + if (nents) { + /* + * Nominal case. Note subtract 1 from starting page index + * for initial _sg_iter_next() call. + */ + iter->sg = sgl; + iter->sg_pgoffset = pgoffset - 1; + iter->maxents = nents; + _sg_iter_next(iter); + } else { + /* + * Degenerate case + */ + iter->sg = NULL; + iter->sg_pgoffset = 0; + iter->maxents = 0; + } +} + +static inline dma_addr_t +sg_page_iter_dma_address(struct sg_page_iter *spi) +{ + return spi->sg->address + (spi->sg_pgoffset << PAGE_SHIFT); +} + +#define for_each_sg_page(sgl, iter, nents, pgoffset) \ + for (_sg_iter_init(sgl, iter, nents, pgoffset); \ + (iter)->sg; _sg_iter_next(iter)) + #define for_each_sg(sglist, sg, sgmax, _itr) \ for (_itr = 0, sg = (sglist); _itr < (sgmax); _itr++, sg = sg_next(sg)) From owner-svn-src-all@freebsd.org Mon Oct 19 11:11: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 909E9A1881E; Mon, 19 Oct 2015 11:11: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 6A438D32; Mon, 19 Oct 2015 11:11: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 t9JBBFeU057474; Mon, 19 Oct 2015 11:11:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JBBF4v057473; Mon, 19 Oct 2015 11:11:15 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510191111.t9JBBF4v057473@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Oct 2015 11:11:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289568 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 11:11:16 -0000 Author: hselasky Date: Mon Oct 19 11:11:15 2015 New Revision: 289568 URL: https://svnweb.freebsd.org/changeset/base/289568 Log: Merge LinuxKPI changes from DragonflyBSD: - Whitespace fixes. Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/moduleparam.h Modified: head/sys/ofed/include/linux/moduleparam.h ============================================================================== --- head/sys/ofed/include/linux/moduleparam.h Mon Oct 19 11:09:51 2015 (r289567) +++ head/sys/ofed/include/linux/moduleparam.h Mon Oct 19 11:11:15 2015 (r289568) @@ -48,7 +48,7 @@ struct kernel_param { u16 flags; param_set_fn set; param_get_fn get; - union { + union { void *arg; struct kparam_string *str; struct kparam_array *arr; @@ -83,8 +83,8 @@ param_sysinit(struct kernel_param *param SYSINIT(name##_param_sysinit, SI_SUB_DRIVERS, SI_ORDER_FIRST, \ param_sysinit, &__param_##name); -#define module_param_string(name, string, len, perm) - +#define module_param_string(name, string, len, perm) + #define module_param_named(name, var, type, mode) \ module_param_call(name, param_set_##type, param_get_##type, &var, mode) @@ -118,7 +118,7 @@ param_set_short(const char *val, struct return 0; } -static inline int +static inline int param_get_short(char *buffer, struct kernel_param *kp) { @@ -126,14 +126,14 @@ param_get_short(char *buffer, struct ker } -static inline int +static inline int param_set_ushort(const char *val, struct kernel_param *kp) { return 0; } -static inline int +static inline int param_get_ushort(char *buffer, struct kernel_param *kp) { @@ -141,14 +141,14 @@ param_get_ushort(char *buffer, struct ke } -static inline int +static inline int param_set_int(const char *val, struct kernel_param *kp) { return 0; } -static inline int +static inline int param_get_int(char *buffer, struct kernel_param *kp) { @@ -156,14 +156,14 @@ param_get_int(char *buffer, struct kerne } -static inline int +static inline int param_set_uint(const char *val, struct kernel_param *kp) { return 0; } -static inline int +static inline int param_get_uint(char *buffer, struct kernel_param *kp) { @@ -171,14 +171,14 @@ param_get_uint(char *buffer, struct kern } -static inline int +static inline int param_set_long(const char *val, struct kernel_param *kp) { return 0; } -static inline int +static inline int param_get_long(char *buffer, struct kernel_param *kp) { @@ -186,14 +186,14 @@ param_get_long(char *buffer, struct kern } -static inline int +static inline int param_set_ulong(const char *val, struct kernel_param *kp) { return 0; } -static inline int +static inline int param_get_ulong(char *buffer, struct kernel_param *kp) { @@ -201,14 +201,14 @@ param_get_ulong(char *buffer, struct ker } -static inline int +static inline int param_set_charp(const char *val, struct kernel_param *kp) { return 0; } -static inline int +static inline int param_get_charp(char *buffer, struct kernel_param *kp) { @@ -216,14 +216,14 @@ param_get_charp(char *buffer, struct ker } -static inline int +static inline int param_set_bool(const char *val, struct kernel_param *kp) { return 0; } -static inline int +static inline int param_get_bool(char *buffer, struct kernel_param *kp) { From owner-svn-src-all@freebsd.org Mon Oct 19 11:16: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 69AADA18BE8; Mon, 19 Oct 2015 11:16: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 42C8310E5; Mon, 19 Oct 2015 11:16:39 +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 t9JBGcbj058405; Mon, 19 Oct 2015 11:16:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JBGcwT058404; Mon, 19 Oct 2015 11:16:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510191116.t9JBGcwT058404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Oct 2015 11:16:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289569 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 11:16:39 -0000 Author: hselasky Date: Mon Oct 19 11:16:38 2015 New Revision: 289569 URL: https://svnweb.freebsd.org/changeset/base/289569 Log: Merge LinuxKPI changes from DragonflyBSD: - Reimplement math64 header file to distinguish more from Linux. Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/math64.h Modified: head/sys/ofed/include/linux/math64.h ============================================================================== --- head/sys/ofed/include/linux/math64.h Mon Oct 19 11:11:15 2015 (r289568) +++ head/sys/ofed/include/linux/math64.h Mon Oct 19 11:16:38 2015 (r289569) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2014 Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2014-2015 Mellanox Technologies, Ltd. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,108 +26,29 @@ */ #ifndef _LINUX_MATH64_H -#define _LINUX_MATH64_H +#define _LINUX_MATH64_H -#include -#include +#include -#if BITS_PER_LONG == 64 - -# define do_div(n, base) ({ \ - uint32_t __base = (base); \ - uint32_t __rem; \ - __rem = ((uint64_t)(n)) % __base; \ - (n) = ((uint64_t)(n)) / __base; \ - __rem; \ +#define do_div(n, base) ({ \ + uint32_t __base = (base); \ + uint32_t __rem; \ + __rem = ((uint64_t)(n)) % __base; \ + (n) = ((uint64_t)(n)) / __base; \ + __rem; \ }) -/** -* div_u64_rem - unsigned 64bit divide with 32bit divisor with remainder -* -* This is commonly provided by 32bit archs to provide an optimized 64bit -* divide. -*/ -static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) +static inline uint64_t +div_u64_rem(uint64_t dividend, uint32_t divisor, uint32_t *remainder) { - *remainder = dividend % divisor; - return dividend / divisor; + *remainder = dividend % divisor; + return (dividend / divisor); } - -#elif BITS_PER_LONG == 32 - -static uint32_t __div64_32(uint64_t *n, uint32_t base) -{ - uint64_t rem = *n; - uint64_t b = base; - uint64_t res, d = 1; - uint32_t high = rem >> 32; - - /* Reduce the thing a bit first */ - res = 0; - if (high >= base) { - high /= base; - res = (uint64_t) high << 32; - rem -= (uint64_t) (high*base) << 32; - } - - while ((int64_t)b > 0 && b < rem) { - b = b+b; - d = d+d; - } - - do { - if (rem >= b) { - rem -= b; - res += d; - } - b >>= 1; - d >>= 1; - } while (d); - - *n = res; - return rem; -} - -# define do_div(n, base) ({ \ - uint32_t __base = (base); \ - uint32_t __rem; \ - (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \ - if (likely(((n) >> 32) == 0)) { \ - __rem = (uint32_t)(n) % __base; \ - (n) = (uint32_t)(n) / __base; \ - } else \ - __rem = __div64_32(&(n), __base); \ - __rem; \ -}) - -#ifndef div_u64_rem -static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) -{ - *remainder = do_div(dividend, divisor); - return dividend; -} -#endif - - -#endif /* BITS_PER_LONG */ - - - -/** - ** div_u64 - unsigned 64bit divide with 32bit divisor - ** - ** This is the most common 64bit divide and should be used if possible, - ** as many 32bit archs can optimize this variant better than a full 64bit - ** divide. - * */ -#ifndef div_u64 - -static inline u64 div_u64(u64 dividend, u32 divisor) +static inline uint64_t +div_u64(uint64_t dividend, uint32_t divisor) { - u32 remainder; - return div_u64_rem(dividend, divisor, &remainder); + return (dividend / divisor); } -#endif -#endif /* _LINUX_MATH64_H */ +#endif /* _LINUX_MATH64_H */ From owner-svn-src-all@freebsd.org Mon Oct 19 11:17: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 9AD19A18C65; Mon, 19 Oct 2015 11:17:56 +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 478971278; Mon, 19 Oct 2015 11:17:56 +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 t9JBHsHY058491; Mon, 19 Oct 2015 11:17:54 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JBHs58058485; Mon, 19 Oct 2015 11:17:54 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201510191117.t9JBHs58058485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 19 Oct 2015 11:17:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289570 - 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: Mon, 19 Oct 2015 11:17:56 -0000 Author: tuexen Date: Mon Oct 19 11:17:54 2015 New Revision: 289570 URL: https://svnweb.freebsd.org/changeset/base/289570 Log: Use __func__ instead of __FUNCTION__. This allows to compile the userland stack without errors using gcc5. Thanks to saghul for makeing me aware and providing the patch. MFC after: 1 week Modified: head/sys/netinet/sctp_auth.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_auth.c ============================================================================== --- head/sys/netinet/sctp_auth.c Mon Oct 19 11:16:38 2015 (r289569) +++ head/sys/netinet/sctp_auth.c Mon Oct 19 11:17:54 2015 (r289570) @@ -558,7 +558,7 @@ sctp_auth_key_acquire(struct sctp_tcb *s atomic_add_int(&skey->refcount, 1); SCTPDBG(SCTP_DEBUG_AUTH2, "%s: stcb %p key %u refcount acquire to %d\n", - __FUNCTION__, (void *)stcb, key_id, skey->refcount); + __func__, (void *)stcb, key_id, skey->refcount); } } @@ -578,7 +578,7 @@ sctp_auth_key_release(struct sctp_tcb *s if (skey) { SCTPDBG(SCTP_DEBUG_AUTH2, "%s: stcb %p key %u refcount release to %d\n", - __FUNCTION__, (void *)stcb, key_id, skey->refcount); + __func__, (void *)stcb, key_id, skey->refcount); /* see if a notification should be generated */ if ((skey->refcount <= 2) && (skey->deactivated)) { @@ -587,7 +587,7 @@ sctp_auth_key_release(struct sctp_tcb *s key_id, 0, so_locked); SCTPDBG(SCTP_DEBUG_AUTH2, "%s: stcb %p key %u no longer used, %d\n", - __FUNCTION__, (void *)stcb, key_id, skey->refcount); + __func__, (void *)stcb, key_id, skey->refcount); } sctp_free_sharedkey(skey); } Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Mon Oct 19 11:16:38 2015 (r289569) +++ head/sys/netinet/sctp_input.c Mon Oct 19 11:17:54 2015 (r289570) @@ -4625,7 +4625,7 @@ __attribute__((noinline)) } } if (stcb == NULL) { - snprintf(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __FUNCTION__); + snprintf(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); /* no association, so it's out of the blue... */ @@ -4669,7 +4669,7 @@ __attribute__((noinline)) if (locked_tcb) { SCTP_TCB_UNLOCK(locked_tcb); } - snprintf(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __FUNCTION__); + snprintf(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); sctp_handle_ootb(m, iphlen, *offset, src, dst, @@ -5821,7 +5821,7 @@ sctp_common_input_processing(struct mbuf */ SCTP_TCB_UNLOCK(stcb); stcb = NULL; - snprintf(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __FUNCTION__); + snprintf(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); sctp_handle_ootb(m, iphlen, offset, src, dst, sh, inp, op_err, @@ -5873,7 +5873,7 @@ sctp_common_input_processing(struct mbuf } if (stcb == NULL) { /* out of the blue DATA chunk */ - snprintf(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __FUNCTION__); + snprintf(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); sctp_handle_ootb(m, iphlen, offset, src, dst, sh, inp, op_err, @@ -5945,7 +5945,7 @@ sctp_common_input_processing(struct mbuf /* * We consider OOTB any data sent during asoc setup. */ - snprintf(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __FUNCTION__); + snprintf(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); sctp_handle_ootb(m, iphlen, offset, src, dst, sh, inp, op_err, Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Mon Oct 19 11:16:38 2015 (r289569) +++ head/sys/netinet/sctp_output.c Mon Oct 19 11:17:54 2015 (r289570) @@ -2417,7 +2417,7 @@ sctp_is_addr_restricted(struct sctp_tcb LIST_FOREACH(laddr, &stcb->asoc.sctp_restricted_addrs, sctp_nxt_addr) { if (laddr->ifa == NULL) { SCTPDBG(SCTP_DEBUG_OUTPUT1, "%s: NULL ifa\n", - __FUNCTION__); + __func__); continue; } if (laddr->ifa == ifa) { @@ -2439,7 +2439,7 @@ sctp_is_addr_in_ep(struct sctp_inpcb *in LIST_FOREACH(laddr, &inp->sctp_addr_list, sctp_nxt_addr) { if (laddr->ifa == NULL) { SCTPDBG(SCTP_DEBUG_OUTPUT1, "%s: NULL ifa\n", - __FUNCTION__); + __func__); continue; } if ((laddr->ifa == ifa) && laddr->action == 0) @@ -5524,7 +5524,7 @@ do_a_abort: if (op_err == NULL) { char msg[SCTP_DIAG_INFO_LEN]; - snprintf(msg, sizeof(msg), "%s:%d at %s", __FILE__, __LINE__, __FUNCTION__); + snprintf(msg, sizeof(msg), "%s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); } @@ -6687,7 +6687,7 @@ sctp_sendall_iterator(struct sctp_inpcb abort_anyway: snprintf(msg, sizeof(msg), - "%s:%d at %s", __FILE__, __LINE__, __FUNCTION__); + "%s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); atomic_add_int(&stcb->asoc.refcnt, 1); @@ -13387,7 +13387,7 @@ dataless_eof: free_cnt_applied = 0; } snprintf(msg, sizeof(msg), - "%s:%d at %s", __FILE__, __LINE__, __FUNCTION__); + "%s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); sctp_abort_an_association(stcb->sctp_ep, stcb, Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Mon Oct 19 11:16:38 2015 (r289569) +++ head/sys/netinet/sctp_pcb.c Mon Oct 19 11:17:54 2015 (r289570) @@ -1115,7 +1115,7 @@ sctp_tcb_special_locate(struct sctp_inpc LIST_FOREACH(laddr, &inp->sctp_addr_list, sctp_nxt_addr) { if (laddr->ifa == NULL) { - SCTPDBG(SCTP_DEBUG_PCB1, "%s: NULL ifa\n", __FUNCTION__); + SCTPDBG(SCTP_DEBUG_PCB1, "%s: NULL ifa\n", __func__); continue; } if (laddr->ifa->localifa_flags & SCTP_BEING_DELETED) { @@ -1773,7 +1773,7 @@ sctp_endpoint_probe(struct sockaddr *nam LIST_FOREACH(laddr, &inp->sctp_addr_list, sctp_nxt_addr) { if (laddr->ifa == NULL) { SCTPDBG(SCTP_DEBUG_PCB1, "%s: NULL ifa\n", - __FUNCTION__); + __func__); continue; } SCTPDBG(SCTP_DEBUG_PCB1, "Ok laddr->ifa:%p is possible, ", @@ -2343,7 +2343,7 @@ sctp_findassociation_ep_asconf(struct mb &parm_buf, sizeof(struct sctp_paramhdr)); if (phdr == NULL) { SCTPDBG(SCTP_DEBUG_INPUT3, "%s: failed to get asconf lookup addr\n", - __FUNCTION__); + __func__); return NULL; } ptype = (int)((uint32_t) ntohs(phdr->param_type)); @@ -2363,7 +2363,7 @@ sctp_findassociation_ep_asconf(struct mb &p6_buf.ph, sizeof(*p6)); if (p6 == NULL) { SCTPDBG(SCTP_DEBUG_INPUT3, "%s: failed to get asconf v6 lookup addr\n", - __FUNCTION__); + __func__); return (NULL); } sin6 = &remote_store.sin6; @@ -2390,7 +2390,7 @@ sctp_findassociation_ep_asconf(struct mb &p4_buf.ph, sizeof(*p4)); if (p4 == NULL) { SCTPDBG(SCTP_DEBUG_INPUT3, "%s: failed to get asconf v4 lookup addr\n", - __FUNCTION__); + __func__); return (NULL); } sin = &remote_store.sin; @@ -5300,7 +5300,7 @@ sctp_update_ep_vflag(struct sctp_inpcb * LIST_FOREACH(laddr, &inp->sctp_addr_list, sctp_nxt_addr) { if (laddr->ifa == NULL) { SCTPDBG(SCTP_DEBUG_PCB1, "%s: NULL ifa\n", - __FUNCTION__); + __func__); continue; } if (laddr->ifa->localifa_flags & SCTP_BEING_DELETED) { @@ -6258,7 +6258,7 @@ sctp_load_addresses_from_init(struct sct * abort this guy */ snprintf(msg, sizeof(msg), - "%s:%d at %s", __FILE__, __LINE__, __FUNCTION__); + "%s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); sctp_abort_an_association(stcb_tmp->sctp_ep, @@ -6357,7 +6357,7 @@ sctp_load_addresses_from_init(struct sct * abort this guy */ snprintf(msg, sizeof(msg), - "%s:%d at %s", __FILE__, __LINE__, __FUNCTION__); + "%s:%d at %s", __FILE__, __LINE__, __func__); op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); sctp_abort_an_association(stcb_tmp->sctp_ep, Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Mon Oct 19 11:16:38 2015 (r289569) +++ head/sys/netinet/sctp_usrreq.c Mon Oct 19 11:17:54 2015 (r289570) @@ -5815,7 +5815,7 @@ sctp_setopt(struct socket *so, int optna LIST_FOREACH(laddr, &inp->sctp_addr_list, sctp_nxt_addr) { if (laddr->ifa == NULL) { SCTPDBG(SCTP_DEBUG_OUTPUT1, "%s: NULL ifa\n", - __FUNCTION__); + __func__); continue; } if (laddr->ifa == ifa) { Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Mon Oct 19 11:16:38 2015 (r289569) +++ head/sys/netinet/sctputil.c Mon Oct 19 11:17:54 2015 (r289570) @@ -2183,13 +2183,13 @@ sctp_timer_start(int t_type, struct sctp break; default: SCTPDBG(SCTP_DEBUG_TIMER1, "%s: Unknown timer type %d\n", - __FUNCTION__, t_type); + __func__, t_type); return; break; } if ((to_ticks <= 0) || (tmr == NULL)) { SCTPDBG(SCTP_DEBUG_TIMER1, "%s: %d:software error to_ticks:%d tmr:%p not set ??\n", - __FUNCTION__, t_type, to_ticks, (void *)tmr); + __func__, t_type, to_ticks, (void *)tmr); return; } if (SCTP_OS_TIMER_PENDING(&tmr->timer)) { @@ -2345,7 +2345,7 @@ sctp_timer_stop(int t_type, struct sctp_ break; default: SCTPDBG(SCTP_DEBUG_TIMER1, "%s: Unknown timer type %d\n", - __FUNCTION__, t_type); + __func__, t_type); break; } if (tmr == NULL) { @@ -3777,7 +3777,7 @@ sctp_ulp_notify(uint32_t notification, s break; default: SCTPDBG(SCTP_DEBUG_UTIL1, "%s: unknown notification %xh (%u)\n", - __FUNCTION__, notification, notification); + __func__, notification, notification); break; } /* end switch */ } From owner-svn-src-all@freebsd.org Mon Oct 19 11:29: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 4FE36A19175; Mon, 19 Oct 2015 11:29:52 +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 1A2E41A8E; Mon, 19 Oct 2015 11:29:52 +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 t9JBTpiR061442; Mon, 19 Oct 2015 11:29:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JBTpJW061441; Mon, 19 Oct 2015 11:29:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510191129.t9JBTpJW061441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Oct 2015 11:29:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289571 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 11:29:52 -0000 Author: hselasky Date: Mon Oct 19 11:29:50 2015 New Revision: 289571 URL: https://svnweb.freebsd.org/changeset/base/289571 Log: Fix compile warning. Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/dma-mapping.h Modified: head/sys/ofed/include/linux/dma-mapping.h ============================================================================== --- head/sys/ofed/include/linux/dma-mapping.h Mon Oct 19 11:17:54 2015 (r289570) +++ head/sys/ofed/include/linux/dma-mapping.h Mon Oct 19 11:29:50 2015 (r289571) @@ -87,7 +87,7 @@ struct dma_map_ops { int is_phys; }; -#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL << (n)) - 1)) +#define DMA_BIT_MASK(n) ((2ULL << ((n) - 1)) - 1ULL) static inline int dma_supported(struct device *dev, u64 mask) From owner-svn-src-all@freebsd.org Mon Oct 19 11:46: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 5BF34A19588; Mon, 19 Oct 2015 11:46:50 +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 2067C31B; Mon, 19 Oct 2015 11:46:50 +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 t9JBknt9067097; Mon, 19 Oct 2015 11:46:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JBkncS067094; Mon, 19 Oct 2015 11:46:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510191146.t9JBkncS067094@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Oct 2015 11:46:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289572 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 11:46:50 -0000 Author: hselasky Date: Mon Oct 19 11:46:48 2015 New Revision: 289572 URL: https://svnweb.freebsd.org/changeset/base/289572 Log: Merge LinuxKPI changes from DragonflyBSD: - Reimplement ktime header file to distinguish more from Linux. - Add new time header file to handle time related Linux functions. Sponsored by: Mellanox Technologies Added: head/sys/ofed/include/linux/time.h (contents, props changed) Modified: head/sys/ofed/include/linux/jiffies.h head/sys/ofed/include/linux/ktime.h Modified: head/sys/ofed/include/linux/jiffies.h ============================================================================== --- head/sys/ofed/include/linux/jiffies.h Mon Oct 19 11:29:50 2015 (r289571) +++ head/sys/ofed/include/linux/jiffies.h Mon Oct 19 11:46:48 2015 (r289572) @@ -31,9 +31,11 @@ #include #include +#include #include #include +#include static inline int msecs_to_jiffies(int msec) @@ -46,13 +48,49 @@ msecs_to_jiffies(int msec) } #define jiffies ticks +#define jiffies_64 ticks #define jiffies_to_msecs(x) (((int64_t)(x)) * 1000 / hz) +#define MAX_JIFFY_OFFSET ((INT_MAX >> 1) - 1) + #define time_after(a, b) ((int)((b) - (a)) < 0) #define time_before(a, b) time_after(b,a) #define time_after_eq(a, b) ((int)((a) - (b)) >= 0) #define time_before_eq(a, b) time_after_eq(b, a) +#define time_in_range(a,b,c) \ + (time_after_eq(a,b) && time_before_eq(a,c)) #define HZ hz +static inline int +timespec_to_jiffies(const struct timespec *ts) +{ + u64 result; + + result = ((u64)hz * ts->tv_sec) + + (((u64)hz * ts->tv_nsec + NSEC_PER_SEC - 1) / NSEC_PER_SEC); + if (result > MAX_JIFFY_OFFSET) + result = MAX_JIFFY_OFFSET; + + return ((int)result); +} + +static inline int +usecs_to_jiffies(const unsigned int u) +{ + u64 result; + + result = ((u64)u * hz + 1000000 - 1) / 1000000; + if (result > MAX_JIFFY_OFFSET) + result = MAX_JIFFY_OFFSET; + + return ((int)result); +} + +static inline u64 +get_jiffies_64(void) +{ + return ((u64)(unsigned)ticks); +} + #endif /* _LINUX_JIFFIES_H_ */ Modified: head/sys/ofed/include/linux/ktime.h ============================================================================== --- head/sys/ofed/include/linux/ktime.h Mon Oct 19 11:29:50 2015 (r289571) +++ head/sys/ofed/include/linux/ktime.h Mon Oct 19 11:46:48 2015 (r289572) @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2014-2015 Mellanox Technologies, Ltd. + * Copyright (c) 2015 François Tigeot * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,274 +28,107 @@ #ifndef _LINUX_KTIME_H #define _LINUX_KTIME_H -#include #include +#include #include +#define ktime_get_ts(x) getnanouptime(x) -/* Get the monotonic time in timespec format: */ -#define ktime_get_ts getnanouptime - -#define NSEC_PER_USEC 1000L -#define NSEC_PER_SEC 1000000000L - -/* - * ktime_t: - * - * On 64-bit CPUs a single 64-bit variable is used to store the hrtimers - * internal representation of time values in scalar nanoseconds. The - * design plays out best on 64-bit CPUs, where most conversions are - * NOPs and most arithmetic ktime_t operations are plain arithmetic - * operations. - * - * On 32-bit CPUs an optimized representation of the timespec structure - * is used to avoid expensive conversions from and to timespecs. The - * endian-aware order of the tv struct members is chosen to allow - * mathematical operations on the tv64 member of the union too, which - * for certain operations produces better code. - * - * For architectures with efficient support for 64/32-bit conversions the - * plain scalar nanosecond based representation can be selected by the - * config switch CONFIG_KTIME_SCALAR. - */ +/* time values in nanoseconds */ union ktime { - s64 tv64; -#if BITS_PER_LONG != 64 && !defined(CONFIG_KTIME_SCALAR) - struct { -# ifdef __BIG_ENDIAN - s32 sec, nsec; -# else - s32 nsec, sec; -# endif - } tv; -#endif + int64_t tv64; }; -typedef union ktime ktime_t; /* Kill this */ +typedef union ktime ktime_t; #define KTIME_MAX ((s64)~((u64)1 << 63)) #define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) -/* - * ktime_t definitions when using the 64-bit scalar representation: - */ - -#if (BITS_PER_LONG == 64) || defined(CONFIG_KTIME_SCALAR) - -/** - * ktime_set - Set a ktime_t variable from a seconds/nanoseconds value - * @secs: seconds to set - * @nsecs: nanoseconds to set - * - * Return the ktime_t representation of the value - */ -static inline ktime_t ktime_set(const long secs, const unsigned long nsecs) -{ -#if (BITS_PER_LONG == 64) - if (unlikely(secs >= KTIME_SEC_MAX)) - return (ktime_t){ .tv64 = KTIME_MAX }; -#endif - return (ktime_t) { .tv64 = (s64)secs * NSEC_PER_SEC + (s64)nsecs }; -} - -/* Subtract two ktime_t variables. rem = lhs -rhs: */ -#define ktime_sub(lhs, rhs) \ - ({ (ktime_t){ .tv64 = (lhs).tv64 - (rhs).tv64 }; }) - -/* Add two ktime_t variables. res = lhs + rhs: */ -#define ktime_add(lhs, rhs) \ - ({ (ktime_t){ .tv64 = (lhs).tv64 + (rhs).tv64 }; }) - -/* - * Add a ktime_t variable and a scalar nanosecond value. - * res = kt + nsval: - */ -#define ktime_add_ns(kt, nsval) \ - ({ (ktime_t){ .tv64 = (kt).tv64 + (nsval) }; }) - -/* - * Subtract a scalar nanosecod from a ktime_t variable - * res = kt - nsval: - */ -#define ktime_sub_ns(kt, nsval) \ - ({ (ktime_t){ .tv64 = (kt).tv64 - (nsval) }; }) - -/* convert a timespec to ktime_t format: */ -static inline ktime_t timespec_to_ktime(struct timespec ts) +static inline int64_t +ktime_to_ns(ktime_t kt) { - return ktime_set(ts.tv_sec, ts.tv_nsec); + return kt.tv64; } -/* convert a timeval to ktime_t format: */ -static inline ktime_t timeval_to_ktime(struct timeval tv) +static inline struct timeval +ktime_to_timeval(ktime_t kt) { - return ktime_set(tv.tv_sec, tv.tv_usec * NSEC_PER_USEC); + return ns_to_timeval(kt.tv64); } -/* Map the ktime_t to timespec conversion to ns_to_timespec function */ -#define ktime_to_timespec(kt) ns_to_timespec((kt).tv64) - -/* Map the ktime_t to timeval conversion to ns_to_timeval function */ -#define ktime_to_timeval(kt) ns_to_timeval((kt).tv64) - -/* Convert ktime_t to nanoseconds - NOP in the scalar storage format: */ -#define ktime_to_ns(kt) ((kt).tv64) - -#else /* !((BITS_PER_LONG == 64) || defined(CONFIG_KTIME_SCALAR)) */ - -/* - * Helper macros/inlines to get the ktime_t math right in the timespec - * representation. The macros are sometimes ugly - their actual use is - * pretty okay-ish, given the circumstances. We do all this for - * performance reasons. The pure scalar nsec_t based code was nice and - * simple, but created too many 64-bit / 32-bit conversions and divisions. - * - * Be especially aware that negative values are represented in a way - * that the tv.sec field is negative and the tv.nsec field is greater - * or equal to zero but less than nanoseconds per second. This is the - * same representation which is used by timespecs. - * - * tv.sec < 0 and 0 >= tv.nsec < NSEC_PER_SEC - */ - -/* Set a ktime_t variable to a value in sec/nsec representation: */ -static inline ktime_t ktime_set(const long secs, const unsigned long nsecs) -{ - return (ktime_t) { .tv = { .sec = secs, .nsec = nsecs } }; -} - -/** - * ktime_sub - subtract two ktime_t variables - * @lhs: minuend - * @rhs: subtrahend - * - * Returns the remainder of the subtraction - */ -static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs) +static inline ktime_t +ktime_add_ns(ktime_t kt, int64_t ns) { ktime_t res; - res.tv64 = lhs.tv64 - rhs.tv64; - if (res.tv.nsec < 0) - res.tv.nsec += NSEC_PER_SEC; - - return res; + res.tv64 = kt.tv64 + ns; + return kt; } -/** - * ktime_add - add two ktime_t variables - * @add1: addend1 - * @add2: addend2 - * - * Returns the sum of @add1 and @add2. - */ -static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2) +static inline ktime_t +ktime_sub_ns(ktime_t kt, int64_t ns) { ktime_t res; - res.tv64 = add1.tv64 + add2.tv64; - /* - * performance trick: the (u32) -NSEC gives 0x00000000Fxxxxxxx - * so we subtract NSEC_PER_SEC and add 1 to the upper 32 bit. - * - * it's equivalent to: - * tv.nsec -= NSEC_PER_SEC - * tv.sec ++; - */ - if (res.tv.nsec >= NSEC_PER_SEC) - res.tv64 += (u32)-NSEC_PER_SEC; - - return res; -} - -/** - * ktime_add_ns - Add a scalar nanoseconds value to a ktime_t variable - * @kt: addend - * @nsec: the scalar nsec value to add - * - * Returns the sum of @kt and @nsec in ktime_t format - */ -extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec); - -/** - * ktime_sub_ns - Subtract a scalar nanoseconds value from a ktime_t variable - * @kt: minuend - * @nsec: the scalar nsec value to subtract - * - * Returns the subtraction of @nsec from @kt in ktime_t format - */ -extern ktime_t ktime_sub_ns(const ktime_t kt, u64 nsec); + res.tv64 = kt.tv64 - ns; + return kt; +} -/** - * timespec_to_ktime - convert a timespec to ktime_t format - * @ts: the timespec variable to convert - * - * Returns a ktime_t variable with the converted timespec value - */ -static inline ktime_t timespec_to_ktime(const struct timespec ts) +static inline ktime_t +ktime_set(const long secs, const unsigned long nsecs) { - return (ktime_t) { .tv = { .sec = (s32)ts.tv_sec, - .nsec = (s32)ts.tv_nsec } }; + ktime_t retval = { (s64)secs * NSEC_PER_SEC + (s64)nsecs }; + return (retval); } -/** - * timeval_to_ktime - convert a timeval to ktime_t format - * @tv: the timeval variable to convert - * - * Returns a ktime_t variable with the converted timeval value - */ -static inline ktime_t timeval_to_ktime(const struct timeval tv) +static inline ktime_t +ktime_sub(ktime_t lhs, ktime_t rhs) { - return (ktime_t) { .tv = { .sec = (s32)tv.tv_sec, - .nsec = (s32)(tv.tv_usec * - NSEC_PER_USEC) } }; + lhs.tv64 -= rhs.tv64; + return (lhs); } -/** - * ktime_to_timespec - convert a ktime_t variable to timespec format - * @kt: the ktime_t variable to convert - * - * Returns the timespec representation of the ktime value - */ -static inline struct timespec ktime_to_timespec(const ktime_t kt) +static inline ktime_t +ktime_add(ktime_t lhs, ktime_t rhs) { - return (struct timespec) { .tv_sec = (time_t) kt.tv.sec, - .tv_nsec = (long) kt.tv.nsec }; + lhs.tv64 += rhs.tv64; + return (lhs); } -/** - * ktime_to_timeval - convert a ktime_t variable to timeval format - * @kt: the ktime_t variable to convert - * - * Returns the timeval representation of the ktime value - */ -static inline struct timeval ktime_to_timeval(const ktime_t kt) +static inline ktime_t +timespec_to_ktime(struct timespec ts) { - return (struct timeval) { - .tv_sec = (time_t) kt.tv.sec, - .tv_usec = (suseconds_t) (kt.tv.nsec / NSEC_PER_USEC) }; + return (ktime_set(ts.tv_sec, ts.tv_nsec)); } -/** - * ktime_to_ns - convert a ktime_t variable to scalar nanoseconds - * @kt: the ktime_t variable to convert - * - * Returns the scalar nanoseconds representation of @kt - */ -static inline s64 ktime_to_ns(const ktime_t kt) +static inline ktime_t +timeval_to_ktime(struct timeval tv) { - return (s64) kt.tv.sec * NSEC_PER_SEC + kt.tv.nsec; + return (ktime_set(tv.tv_sec, tv.tv_usec * NSEC_PER_USEC)); } -#endif /* !((BITS_PER_LONG == 64) || defined(CONFIG_KTIME_SCALAR)) */ +#define ktime_to_timespec(kt) ns_to_timespec((kt).tv64) +#define ktime_to_timeval(kt) ns_to_timeval((kt).tv64) +#define ktime_to_ns(kt) ((kt).tv64) -static inline s64 ktime_get_ns(void) +static inline s64 +ktime_get_ns(void) { struct timespec ts; ktime_t kt; + ktime_get_ts(&ts); kt = timespec_to_ktime(ts); return (ktime_to_ns(kt)); } +static inline ktime_t +ktime_get(void) +{ + struct timespec ts; + + ktime_get_ts(&ts); + return (timespec_to_ktime(ts)); +} + #endif /* _LINUX_KTIME_H */ Added: head/sys/ofed/include/linux/time.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/ofed/include/linux/time.h Mon Oct 19 11:46:48 2015 (r289572) @@ -0,0 +1,131 @@ +/* $FreeBSD$ */ +/* + * Copyright (c) 2014-2015 François Tigeot + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _LINUX_TIME_H_ +#define _LINUX_TIME_H_ + +#define NSEC_PER_USEC 1000L +#define NSEC_PER_SEC 1000000000L + +#include +#include + +static inline struct timeval +ns_to_timeval(const int64_t nsec) +{ + struct timeval tv; + long rem; + + if (nsec == 0) { + tv.tv_sec = 0; + tv.tv_usec = 0; + return (tv); + } + + tv.tv_sec = nsec / NSEC_PER_SEC; + rem = nsec % NSEC_PER_SEC; + if (rem < 0) { + tv.tv_sec--; + rem += NSEC_PER_SEC; + } + tv.tv_usec = rem / 1000; + return (tv); +} + +static inline int64_t +timeval_to_ns(const struct timeval *tv) +{ + return ((int64_t)tv->tv_sec * NSEC_PER_SEC) + + tv->tv_usec * NSEC_PER_USEC; +} + +#define getrawmonotonic(ts) nanouptime(ts) + +static inline struct timespec +timespec_sub(struct timespec lhs, struct timespec rhs) +{ + struct timespec ts; + + ts.tv_sec = lhs.tv_sec; + ts.tv_nsec = lhs.tv_nsec; + timespecsub(&ts, &rhs); + + return ts; +} + +static inline void +set_normalized_timespec(struct timespec *ts, time_t sec, int64_t nsec) +{ + /* XXX: this doesn't actually normalize anything */ + ts->tv_sec = sec; + ts->tv_nsec = nsec; +} + +static inline int64_t +timespec_to_ns(const struct timespec *ts) +{ + return ((ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec); +} + +static inline struct timespec +ns_to_timespec(const int64_t nsec) +{ + struct timespec ts; + int32_t rem; + + if (nsec == 0) { + ts.tv_sec = 0; + ts.tv_nsec = 0; + return (ts); + } + + ts.tv_sec = nsec / NSEC_PER_SEC; + rem = nsec % NSEC_PER_SEC; + if (rem < 0) { + ts.tv_sec--; + rem += NSEC_PER_SEC; + } + ts.tv_nsec = rem; + return (ts); +} + +static inline int +timespec_valid(const struct timespec *ts) +{ + if (ts->tv_sec < 0 || ts->tv_sec > 100000000 || + ts->tv_nsec < 0 || ts->tv_nsec >= 1000000000) + return (0); + return (1); +} + +static inline unsigned long +get_seconds(void) +{ + return time_uptime; +} + +#endif /* _LINUX_TIME_H_ */ From owner-svn-src-all@freebsd.org Mon Oct 19 11:57: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 93D6EA19815; Mon, 19 Oct 2015 11:57:35 +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 4E7CDB5B; Mon, 19 Oct 2015 11:57: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 t9JBvYWj070164; Mon, 19 Oct 2015 11:57:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JBvYc5070159; Mon, 19 Oct 2015 11:57:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510191157.t9JBvYc5070159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Oct 2015 11:57:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289574 - in head/sys/ofed: drivers/infiniband/core drivers/net/mlx4 include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 11:57:35 -0000 Author: hselasky Date: Mon Oct 19 11:57:33 2015 New Revision: 289574 URL: https://svnweb.freebsd.org/changeset/base/289574 Log: Merge LinuxKPI changes from DragonflyBSD: - Add more list related functions and macros. - Update the hlist_for_each_entry() macro to take one less argument. Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/cma.c head/sys/ofed/drivers/infiniband/core/fmr_pool.c head/sys/ofed/drivers/net/mlx4/en_netdev.c head/sys/ofed/include/linux/list.h Modified: head/sys/ofed/drivers/infiniband/core/cma.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/cma.c Mon Oct 19 11:51:10 2015 (r289573) +++ head/sys/ofed/drivers/infiniband/core/cma.c Mon Oct 19 11:57:33 2015 (r289574) @@ -2400,10 +2400,9 @@ static int cma_check_port(struct rdma_bi { struct rdma_id_private *cur_id; struct sockaddr *addr, *cur_addr; - struct hlist_node *node; addr = (struct sockaddr *) &id_priv->id.route.addr.src_addr; - hlist_for_each_entry(cur_id, node, &bind_list->owners, node) { + hlist_for_each_entry(cur_id, &bind_list->owners, node) { if (id_priv == cur_id) continue; Modified: head/sys/ofed/drivers/infiniband/core/fmr_pool.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/fmr_pool.c Mon Oct 19 11:51:10 2015 (r289573) +++ head/sys/ofed/drivers/infiniband/core/fmr_pool.c Mon Oct 19 11:57:33 2015 (r289574) @@ -118,14 +118,13 @@ static inline struct ib_pool_fmr *ib_fmr { struct hlist_head *bucket; struct ib_pool_fmr *fmr; - struct hlist_node *pos; if (!pool->cache_bucket) return NULL; bucket = pool->cache_bucket + ib_fmr_hash(*page_list); - hlist_for_each_entry(fmr, pos, bucket, cache_node) + hlist_for_each_entry(fmr, bucket, cache_node) if (io_virtual_address == fmr->io_virtual_address && page_list_len == fmr->page_list_len && !memcmp(page_list, fmr->page_list, Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Mon Oct 19 11:51:10 2015 (r289573) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Mon Oct 19 11:57:33 2015 (r289574) @@ -264,11 +264,10 @@ static inline struct mlx4_en_filter * mlx4_en_filter_find(struct mlx4_en_priv *priv, __be32 src_ip, __be32 dst_ip, u8 ip_proto, __be16 src_port, __be16 dst_port) { - struct hlist_node *elem; struct mlx4_en_filter *filter; struct mlx4_en_filter *ret = NULL; - hlist_for_each_entry(filter, elem, + hlist_for_each_entry(filter, filter_hash_bucket(priv, src_ip, dst_ip, src_port, dst_port), filter_chain) { Modified: head/sys/ofed/include/linux/list.h ============================================================================== --- head/sys/ofed/include/linux/list.h Mon Oct 19 11:51:10 2015 (r289573) +++ head/sys/ofed/include/linux/list.h Mon Oct 19 11:57:33 2015 (r289574) @@ -96,6 +96,15 @@ list_del(struct list_head *entry) } static inline void +list_replace(struct list_head *old, struct list_head *new) +{ + new->next = old->next; + new->next->prev = new; + new->prev = old->prev; + new->prev->next = new; +} + +static inline void _list_add(struct list_head *new, struct list_head *prev, struct list_head *next) { @@ -119,6 +128,9 @@ list_del_init(struct list_head *entry) #define list_first_entry(ptr, type, member) \ list_entry((ptr)->next, type, member) +#define list_next_entry(ptr, member) \ + list_entry(((ptr)->member.next), typeof(*(ptr)), member) + #define list_for_each(p, head) \ for (p = (head)->next; p != (head); p = p->next) @@ -134,6 +146,15 @@ list_del_init(struct list_head *entry) n = list_entry(p->field.next, typeof(*p), field); &p->field != (h);\ p = n, n = list_entry(n->field.next, typeof(*n), field)) +#define list_for_each_entry_continue(p, h, field) \ + for (p = list_next_entry((p), field); &p->field != (h); \ + p = list_next_entry((p), field)) + +#define list_for_each_entry_safe_from(pos, n, head, member) \ + for (n = list_entry(pos->member.next, typeof(*pos), member); \ + &pos->member != (head); \ + pos = n, n = list_entry(n->member.next, typeof(*n), member)) + #define list_for_each_entry_reverse(p, h, field) \ for (p = list_entry((h)->prev, typeof(*p), field); &p->field != (h); \ p = list_entry(p->field.prev, typeof(*p), field)) @@ -381,10 +402,14 @@ static inline int list_is_last(const str #define hlist_for_each_safe(p, n, head) \ for (p = (head)->first; p && ({ n = p->next; 1; }); p = n) -#define hlist_for_each_entry(tp, p, head, field) \ - for (p = (head)->first; \ - p ? (tp = hlist_entry(p, typeof(*tp), field)): NULL; p = p->next) - +#define hlist_entry_safe(ptr, type, member) \ + ((ptr) ? hlist_entry(ptr, type, member) : NULL) + +#define hlist_for_each_entry(pos, head, member) \ + for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\ + pos; \ + pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member)) + #define hlist_for_each_entry_continue(tp, p, field) \ for (p = (p)->next; \ p ? (tp = hlist_entry(p, typeof(*tp), field)): NULL; p = p->next) @@ -398,4 +423,8 @@ static inline int list_is_last(const str tpos = hlist_entry((pos), typeof(*(tpos)), member); 1;}); \ pos = (n)) +#define hlist_add_head_rcu(n, h) hlist_add_head(n, h) + +#define hlist_del_init_rcu(n) hlist_del_init(n) + #endif /* _LINUX_LIST_H_ */ From owner-svn-src-all@freebsd.org Mon Oct 19 12:00: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 766A3A19CBE; Mon, 19 Oct 2015 12:00:53 +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 404E1F73; Mon, 19 Oct 2015 12:00:53 +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 t9JC0q3d070338; Mon, 19 Oct 2015 12:00:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JC0qqa070337; Mon, 19 Oct 2015 12:00:52 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510191200.t9JC0qqa070337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Oct 2015 12:00:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289575 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 12:00:53 -0000 Author: hselasky Date: Mon Oct 19 12:00:52 2015 New Revision: 289575 URL: https://svnweb.freebsd.org/changeset/base/289575 Log: Implement IS_ERR_OR_NULL() function. Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/err.h Modified: head/sys/ofed/include/linux/err.h ============================================================================== --- head/sys/ofed/include/linux/err.h Mon Oct 19 11:57:33 2015 (r289574) +++ head/sys/ofed/include/linux/err.h Mon Oct 19 12:00:52 2015 (r289575) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -52,6 +52,12 @@ IS_ERR(const void *ptr) return IS_ERR_VALUE((unsigned long)ptr); } +static inline long +IS_ERR_OR_NULL(const void *ptr) +{ + return !ptr || IS_ERR_VALUE((unsigned long)ptr); +} + static inline void * ERR_CAST(void *ptr) { From owner-svn-src-all@freebsd.org Mon Oct 19 12:04: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 31026A19F0E; Mon, 19 Oct 2015 12:04: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 0004E1302; Mon, 19 Oct 2015 12:04: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 t9JC4LrS072883; Mon, 19 Oct 2015 12:04:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JC4LJt072882; Mon, 19 Oct 2015 12:04:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510191204.t9JC4LJt072882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Oct 2015 12:04:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289576 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 12:04:22 -0000 Author: hselasky Date: Mon Oct 19 12:04:20 2015 New Revision: 289576 URL: https://svnweb.freebsd.org/changeset/base/289576 Log: Map two more Linux error return codes to FreeBSD ones. Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/errno.h Modified: head/sys/ofed/include/linux/errno.h ============================================================================== --- head/sys/ofed/include/linux/errno.h Mon Oct 19 12:00:52 2015 (r289575) +++ head/sys/ofed/include/linux/errno.h Mon Oct 19 12:04:20 2015 (r289576) @@ -32,6 +32,8 @@ #include +#define ECHRNG EDOM +#define ETIME ETIMEDOUT #define ECOMM ESTALE #define ENODATA ECONNREFUSED #define ENOIOCTLCMD ENOIOCTL From owner-svn-src-all@freebsd.org Mon Oct 19 12:08: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 69E38A1809B; Mon, 19 Oct 2015 12:08:08 +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 06FC91546; Mon, 19 Oct 2015 12:08:07 +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 t9JC86CH073044; Mon, 19 Oct 2015 12:08:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JC86TJ073042; Mon, 19 Oct 2015 12:08:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510191208.t9JC86TJ073042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Oct 2015 12:08:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289577 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 12:08:08 -0000 Author: hselasky Date: Mon Oct 19 12:08:06 2015 New Revision: 289577 URL: https://svnweb.freebsd.org/changeset/base/289577 Log: Merge LinuxKPI changes from DragonflyBSD: - Map more Linux compiler related defines to FreeBSD ones. Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/compiler.h head/sys/ofed/include/linux/types.h Modified: head/sys/ofed/include/linux/compiler.h ============================================================================== --- head/sys/ofed/include/linux/compiler.h Mon Oct 19 12:04:20 2015 (r289576) +++ head/sys/ofed/include/linux/compiler.h Mon Oct 19 12:08:06 2015 (r289577) @@ -2,7 +2,8 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. + * Copyright (c) 2015 François Tigeot * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -62,5 +63,12 @@ #define typeof(x) __typeof(x) #define uninitialized_var(x) x = x +#define __read_mostly __attribute__((__section__(".data.read_mostly"))) +#define __always_unused __unused +#define __must_check __result_use_check + +#define __printf(a,b) __printflike(a,b) + +#define barrier() __asm__ __volatile__("": : :"memory") #endif /* _LINUX_COMPILER_H_ */ Modified: head/sys/ofed/include/linux/types.h ============================================================================== --- head/sys/ofed/include/linux/types.h Mon Oct 19 12:04:20 2015 (r289576) +++ head/sys/ofed/include/linux/types.h Mon Oct 19 12:08:06 2015 (r289577) @@ -36,8 +36,6 @@ #include #include -#define __read_mostly __attribute__((__section__(".data.read_mostly"))) - #ifndef __bitwise__ #ifdef __CHECKER__ #define __bitwise__ __attribute__((bitwise)) From owner-svn-src-all@freebsd.org Mon Oct 19 12:26: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 97B1CA18703; Mon, 19 Oct 2015 12:26:40 +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 562D7164; Mon, 19 Oct 2015 12:26:40 +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 t9JCQdIP078624; Mon, 19 Oct 2015 12:26:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JCQdL2078620; Mon, 19 Oct 2015 12:26:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510191226.t9JCQdL2078620@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Oct 2015 12:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289578 - in head/sys: dev/cxgbe/iw_cxgbe ofed/drivers/infiniband/core ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 12:26:40 -0000 Author: hselasky Date: Mon Oct 19 12:26:38 2015 New Revision: 289578 URL: https://svnweb.freebsd.org/changeset/base/289578 Log: Merge LinuxKPI changes from DragonflyBSD: - Define the kref structure identical to the one found in Linux. - Update clients referring inside the kref structure. - Implement kref_sub() for FreeBSD. Reviewed by: np @ Sponsored by: Mellanox Technologies Modified: head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h head/sys/dev/cxgbe/iw_cxgbe/qp.c head/sys/ofed/drivers/infiniband/core/uverbs_main.c head/sys/ofed/include/linux/kref.h Modified: head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Mon Oct 19 12:08:06 2015 (r289577) +++ head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Mon Oct 19 12:26:38 2015 (r289578) @@ -606,18 +606,16 @@ enum c4iw_mmid_state { #define MPA_V2_RDMA_READ_RTR 0x4000 #define MPA_V2_IRD_ORD_MASK 0x3FFF -/* Fixme: Use atomic_read for kref.count as same as Linux */ #define c4iw_put_ep(ep) { \ CTR4(KTR_IW_CXGBE, "put_ep (%s:%u) ep %p, refcnt %d", \ - __func__, __LINE__, ep, (ep)->kref.count); \ - WARN_ON((ep)->kref.count < 1); \ + __func__, __LINE__, ep, atomic_read(&(ep)->kref.refcount)); \ + WARN_ON(atomic_read(&(ep)->kref.refcount) < 1); \ kref_put(&((ep)->kref), _c4iw_free_ep); \ } -/* Fixme: Use atomic_read for kref.count as same as Linux */ #define c4iw_get_ep(ep) { \ CTR4(KTR_IW_CXGBE, "get_ep (%s:%u) ep %p, refcnt %d", \ - __func__, __LINE__, ep, (ep)->kref.count); \ + __func__, __LINE__, ep, atomic_read(&(ep)->kref.refcount)); \ kref_get(&((ep)->kref)); \ } Modified: head/sys/dev/cxgbe/iw_cxgbe/qp.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/qp.c Mon Oct 19 12:08:06 2015 (r289577) +++ head/sys/dev/cxgbe/iw_cxgbe/qp.c Mon Oct 19 12:26:38 2015 (r289578) @@ -1257,8 +1257,7 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, case C4IW_QP_STATE_RTS: switch (attrs->next_state) { case C4IW_QP_STATE_CLOSING: - //Fixme: Use atomic_read as same as Linux - BUG_ON(qhp->ep->com.kref.count < 2); + BUG_ON(atomic_read(&qhp->ep->com.kref.refcount) < 2); set_state(qhp, C4IW_QP_STATE_CLOSING); ep = qhp->ep; if (!internal) { Modified: head/sys/ofed/drivers/infiniband/core/uverbs_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/uverbs_main.c Mon Oct 19 12:08:06 2015 (r289577) +++ head/sys/ofed/drivers/infiniband/core/uverbs_main.c Mon Oct 19 12:26:38 2015 (r289578) @@ -1168,7 +1168,7 @@ static ssize_t show_dev_ref_cnt(struct d if (!dev) return -ENODEV; - return sprintf(buf, "%d\n", dev->ref.count); + return sprintf(buf, "%d\n", atomic_read(&dev->ref.refcount)); } static DEVICE_ATTR(ref_cnt, S_IRUGO, show_dev_ref_cnt, NULL); Modified: head/sys/ofed/include/linux/kref.h ============================================================================== --- head/sys/ofed/include/linux/kref.h Mon Oct 19 12:08:06 2015 (r289577) +++ head/sys/ofed/include/linux/kref.h Mon Oct 19 12:26:38 2015 (r289578) @@ -2,7 +2,8 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. + * Copyright (c) 2013 François Tigeot * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,33 +33,56 @@ #include #include +#include + struct kref { - volatile u_int count; + atomic_t refcount; }; static inline void kref_init(struct kref *kref) { - refcount_init(&kref->count, 1); + refcount_init(&kref->refcount.counter, 1); } static inline void kref_get(struct kref *kref) { - refcount_acquire(&kref->count); + refcount_acquire(&kref->refcount.counter); } static inline int kref_put(struct kref *kref, void (*rel)(struct kref *kref)) { - if (refcount_release(&kref->count)) { + if (refcount_release(&kref->refcount.counter)) { rel(kref); return 1; } return 0; } +static inline int +kref_sub(struct kref *kref, unsigned int count, + void (*rel)(struct kref *kref)) +{ + + while (count--) { + if (refcount_release(&kref->refcount.counter)) { + rel(kref); + return 1; + } + } + return 0; +} + +static inline int __must_check +kref_get_unless_zero(struct kref *kref) +{ + + return atomic_add_unless(&kref->refcount, 1, 0); +} + #endif /* _LINUX_KREF_H_ */ From owner-svn-src-all@freebsd.org Mon Oct 19 12:33: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 AD5FCA18A1F; Mon, 19 Oct 2015 12:33:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75064AF5; Mon, 19 Oct 2015 12:33:10 +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 t9JCX9m2081424; Mon, 19 Oct 2015 12:33:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JCX9o9081422; Mon, 19 Oct 2015 12:33:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510191233.t9JCX9o9081422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Oct 2015 12:33:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289579 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 12:33:10 -0000 Author: hselasky Date: Mon Oct 19 12:33:09 2015 New Revision: 289579 URL: https://svnweb.freebsd.org/changeset/base/289579 Log: Merge LinuxKPI changes from DragonflyBSD: - Implement more Linux kernel functions. Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/mm.h Modified: head/sys/ofed/include/linux/mm.h ============================================================================== --- head/sys/ofed/include/linux/mm.h Mon Oct 19 12:26:38 2015 (r289578) +++ head/sys/ofed/include/linux/mm.h Mon Oct 19 12:33:09 2015 (r289579) @@ -2,7 +2,9 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. + * Copyright (c) 2015 François Tigeot + * Copyright (c) 2015 Matthew Dillon * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -84,4 +86,24 @@ io_remap_pfn_range(struct vm_area_struct return (0); } +static inline unsigned long +vma_pages(struct vm_area_struct *vma) +{ + return ((vma->vm_end - vma->vm_start) >> PAGE_SHIFT); +} + +#define offset_in_page(off) ((off) & (PAGE_SIZE - 1)) + +static inline void +set_page_dirty(struct vm_page *page) +{ + vm_page_dirty(page); +} + +static inline void +get_page(struct vm_page *page) +{ + vm_page_hold(page); +} + #endif /* _LINUX_MM_H_ */ From owner-svn-src-all@freebsd.org Mon Oct 19 12:44: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 5F249A18D37; Mon, 19 Oct 2015 12:44:42 +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 38DF7111C; Mon, 19 Oct 2015 12:44: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 t9JCifue084365; Mon, 19 Oct 2015 12:44:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JCifFH084363; Mon, 19 Oct 2015 12:44:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510191244.t9JCifFH084363@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Oct 2015 12:44:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289580 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 12:44:42 -0000 Author: hselasky Date: Mon Oct 19 12:44:41 2015 New Revision: 289580 URL: https://svnweb.freebsd.org/changeset/base/289580 Log: Merge LinuxKPI changes from DragonflyBSD: - Redefine DIV_ROUND_UP as a function macro taking two arguments instead of none. - Implement more Linux kernel functions related to various forms of DELAY() and basic mathematical operations. Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/delay.h head/sys/ofed/include/linux/kernel.h Modified: head/sys/ofed/include/linux/delay.h ============================================================================== --- head/sys/ofed/include/linux/delay.h Mon Oct 19 12:33:09 2015 (r289579) +++ head/sys/ofed/include/linux/delay.h Mon Oct 19 12:44:41 2015 (r289580) @@ -2,7 +2,8 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. + * Copyright (c) 2014 François Tigeot * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,6 +32,7 @@ #define _LINUX_DELAY_H_ #include +#include static inline void linux_msleep(int ms) @@ -41,4 +43,25 @@ linux_msleep(int ms) #undef msleep #define msleep linux_msleep +#define udelay(t) DELAY(t) + +static inline void +mdelay(unsigned long msecs) +{ + while (msecs--) + DELAY(1000); +} + +static inline void +ndelay(unsigned long x) +{ + DELAY(howmany(x, 1000)); +} + +static inline void +usleep_range(unsigned long min, unsigned long max) +{ + DELAY(min); +} + #endif /* _LINUX_DELAY_H_ */ Modified: head/sys/ofed/include/linux/kernel.h ============================================================================== --- head/sys/ofed/include/linux/kernel.h Mon Oct 19 12:33:09 2015 (r289579) +++ head/sys/ofed/include/linux/kernel.h Mon Oct 19 12:44:41 2015 (r289580) @@ -2,7 +2,8 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. + * Copyright (c) 2014-2015 François Tigeot * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -69,7 +70,8 @@ #define ALIGN(x, y) roundup2((x), (y)) #undef PTR_ALIGN #define PTR_ALIGN(p, a) ((__typeof(p))ALIGN((uintptr_t)(p), (a))) -#define DIV_ROUND_UP howmany +#define DIV_ROUND_UP(x, n) howmany(x, n) +#define DIV_ROUND_UP_ULL(x, n) DIV_ROUND_UP((unsigned long long)(x), (n)) #define FIELD_SIZEOF(t, f) sizeof(((t *)0)->f) #define printk(X...) printf(X) @@ -90,9 +92,6 @@ ({ if (0) log(LOG_DEBUG, pr_fmt(fmt), ##__VA_ARGS__); 0; }) #endif -#define udelay(t) DELAY(t) -#define usleep_range(min,max) DELAY(min) - #ifndef pr_fmt #define pr_fmt(fmt) fmt #endif @@ -164,9 +163,16 @@ #define min(x, y) ((x) < (y) ? (x) : (y)) #define max(x, y) ((x) > (y) ? (x) : (y)) + +#define min3(a, b, c) min(a, min(b,c)) +#define max3(a, b, c) max(a, max(b,c)) + #define min_t(type, _x, _y) ((type)(_x) < (type)(_y) ? (type)(_x) : (type)(_y)) #define max_t(type, _x, _y) ((type)(_x) > (type)(_y) ? (type)(_x) : (type)(_y)) +#define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max) +#define clamp(x, lo, hi) min( max(x,lo), hi) + /* * This looks more complex than it should be. But we need to * get the type for the ~ right in round_down (it needs to be @@ -184,4 +190,28 @@ typedef struct pm_message { int event; } pm_message_t; +/* Swap values of a and b */ +#define swap(a, b) do { \ + typeof(a) _swap_tmp = a; \ + a = b; \ + b = _swap_tmp; \ +} while (0) + +#define DIV_ROUND_CLOSEST(x, divisor) (((x) + ((divisor) / 2)) / (divisor)) + +static inline uintmax_t +mult_frac(uintmax_t x, uintmax_t multiplier, uintmax_t divisor) +{ + uintmax_t q = (x / divisor); + uintmax_t r = (x % divisor); + + return ((q * multiplier) + ((r * multiplier) / divisor)); +} + +static inline int64_t +abs64(int64_t x) +{ + return (x < 0 ? -x : x); +} + #endif /* _LINUX_KERNEL_H_ */ From owner-svn-src-all@freebsd.org Mon Oct 19 13:20: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 D981EA187D1; Mon, 19 Oct 2015 13:20:24 +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 96FBE6BE; Mon, 19 Oct 2015 13:20:24 +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 t9JDKNw2093563; Mon, 19 Oct 2015 13:20:23 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JDKNIV093560; Mon, 19 Oct 2015 13:20:23 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201510191320.t9JDKNIV093560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 19 Oct 2015 13:20:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289581 - 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: Mon, 19 Oct 2015 13:20:24 -0000 Author: andrew Date: Mon Oct 19 13:20:23 2015 New Revision: 289581 URL: https://svnweb.freebsd.org/changeset/base/289581 Log: Use 4 levels of page tables when enabling the MMU. This will allow us to boot on an SoC that places physical memory at an address past where three levels of page tables can access in an identity mapping. Submitted by: Wojciech Macek , Patrick Wildt Differential Revision: https://reviews.freebsd.org/D3885 (partial) Differential Revision: https://reviews.freebsd.org/D3744 Modified: head/sys/arm64/arm64/locore.S head/sys/arm64/include/armreg.h Modified: head/sys/arm64/arm64/locore.S ============================================================================== --- head/sys/arm64/arm64/locore.S Mon Oct 19 12:44:41 2015 (r289580) +++ head/sys/arm64/arm64/locore.S Mon Oct 19 13:20:23 2015 (r289581) @@ -100,6 +100,16 @@ _start: br x15 virtdone: + /* + * Now that we are in virtual address space, + * we don't need the identity mapping in TTBR0 and + * can set the TCR to a more useful value. + */ + ldr x2, tcr + mrs x3, id_aa64mmfr0_el1 + bfi x2, x3, #32, #3 + msr tcr_el1, x2 + /* Set up the stack */ adr x25, initstack_end mov sp, x25 @@ -167,7 +177,7 @@ ENTRY(mpentry) /* Load the kernel page table */ adr x26, pagetable_l1_ttbr1 /* Load the identity page table */ - adr x27, pagetable_l1_ttbr0 + adr x27, pagetable_l0_ttbr0 /* Enable the mmu */ bl start_mmu @@ -177,6 +187,16 @@ ENTRY(mpentry) br x15 mp_virtdone: + /* + * Now that we are in virtual address space, + * we don't need the identity mapping in TTBR0 and + * can set the TCR to a more useful value. + */ + ldr x2, tcr + mrs x3, id_aa64mmfr0_el1 + bfi x2, x3, #32, #3 + msr tcr_el1, x2 + ldr x4, =secondary_stacks mov x5, #(PAGE_SIZE * KSTACK_PAGES) mul x5, x0, x5 @@ -373,9 +393,9 @@ create_pagetables: */ add x27, x26, #PAGE_SIZE + mov x6, x27 /* The initial page table */ #if defined(SOCDEV_PA) && defined(SOCDEV_VA) /* Create a table for the UART */ - mov x6, x27 /* The initial page table */ mov x7, #DEVICE_MEM mov x8, #(SOCDEV_VA) /* VA start */ mov x9, #(SOCDEV_PA) /* PA start */ @@ -384,18 +404,56 @@ create_pagetables: #endif /* Create the VA = PA map */ - mov x6, x27 /* The initial page table */ mov x7, #NORMAL_UNCACHED /* Uncached as it's only needed early on */ mov x9, x27 mov x8, x9 /* VA start (== PA start) */ mov x10, #1 bl build_l1_block_pagetable + /* Move to the l0 table */ + add x27, x27, #PAGE_SIZE + + /* Link the l0 -> l1 table */ + mov x9, x6 + mov x6, x27 + bl link_l0_pagetable + /* Restore the Link register */ mov x30, x5 ret /* + * Builds an L0 -> L1 table descriptor + * + * This is a link for a 512GiB block of memory with up to 1GiB regions mapped + * within it by build_l1_block_pagetable. + * + * x6 = L0 table + * x8 = Virtual Address + * x9 = L1 PA (trashed) + * x11, x12 and x13 are trashed + */ +link_l0_pagetable: + /* + * Link an L0 -> L1 table entry. + */ + /* Find the table index */ + lsr x11, x8, #L0_SHIFT + and x11, x11, #Ln_ADDR_MASK + + /* Build the L0 block entry */ + mov x12, #L0_TABLE + + /* Only use the output address bits */ + lsr x9, x9, #12 + orr x12, x12, x9, lsl #12 + + /* Store the entry */ + str x12, [x6, x11, lsl #3] + + ret + +/* * Builds an L1 -> L2 table descriptor * * This is a link for a 1GiB block of memory with up to 2MiB regions mapped @@ -535,8 +593,13 @@ start_mmu: ldr x2, mair msr mair_el1, x2 - /* Setup TCR according to PARange bits from ID_AA64MMFR0_EL1 */ - ldr x2, tcr + /* + * Setup TCR according to PARange bits from ID_AA64MMFR0_EL1. + * Some machines have physical memory mapped >512GiB, which can not + * be identity-mapped using the default 39 VA bits. Thus, use + * 48 VA bits for now and switch back to 39 after the VA jump. + */ + ldr x2, tcr_early mrs x3, id_aa64mmfr0_el1 bfi x2, x3, #32, #3 msr tcr_el1, x2 @@ -559,6 +622,9 @@ mair: tcr: .quad (TCR_TxSZ(64 - VIRT_BITS) | TCR_ASID_16 | TCR_TG1_4K | \ TCR_CACHE_ATTRS | TCR_SMP_ATTRS) +tcr_early: + .quad (TCR_T1SZ(64 - VIRT_BITS) | TCR_T0SZ(64 - 48) | \ + TCR_ASID_16 | TCR_TG1_4K | TCR_CACHE_ATTRS | TCR_SMP_ATTRS) sctlr_set: /* Bits to set */ .quad (SCTLR_UCI | SCTLR_nTWE | SCTLR_nTWI | SCTLR_UCT | SCTLR_DZE | \ @@ -586,6 +652,8 @@ pagetable_l1_ttbr1: .space PAGE_SIZE pagetable_l1_ttbr0: .space PAGE_SIZE +pagetable_l0_ttbr0: + .space PAGE_SIZE pagetable_end: el2_pagetable: Modified: head/sys/arm64/include/armreg.h ============================================================================== --- head/sys/arm64/include/armreg.h Mon Oct 19 12:44:41 2015 (r289580) +++ head/sys/arm64/include/armreg.h Mon Oct 19 13:20:23 2015 (r289581) @@ -231,7 +231,9 @@ #define TCR_T1SZ_SHIFT 16 #define TCR_T0SZ_SHIFT 0 -#define TCR_TxSZ(x) (((x) << TCR_T1SZ_SHIFT) | ((x) << TCR_T0SZ_SHIFT)) +#define TCR_T1SZ(x) ((x) << TCR_T1SZ_SHIFT) +#define TCR_T0SZ(x) ((x) << TCR_T0SZ_SHIFT) +#define TCR_TxSZ(x) (TCR_T1SZ(x) | TCR_T0SZ(x)) /* Saved Program Status Register */ #define DBG_SPSR_SS (0x1 << 21) From owner-svn-src-all@freebsd.org Mon Oct 19 14:12: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 EE148A18DC6; Mon, 19 Oct 2015 14:12:16 +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 B274B1199; Mon, 19 Oct 2015 14:12:16 +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 t9JECFDt012753; Mon, 19 Oct 2015 14:12:15 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JECFmw012752; Mon, 19 Oct 2015 14:12:15 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201510191412.t9JECFmw012752@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: Mon, 19 Oct 2015 14:12:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289582 - head/sys/dev/xen/netfront X-SVN-Group: head MIME-Version: 1.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, 19 Oct 2015 14:12:17 -0000 Author: royger Date: Mon Oct 19 14:12:15 2015 New Revision: 289582 URL: https://svnweb.freebsd.org/changeset/base/289582 Log: xen-netfront: delete all trailing white spaces Submitted by: Wei Liu Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3886 Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Mon Oct 19 13:20:23 2015 (r289581) +++ head/sys/dev/xen/netfront/netfront.c Mon Oct 19 14:12:15 2015 (r289582) @@ -230,7 +230,7 @@ struct net_device_stats u_long tx_fifo_errors; u_long tx_heartbeat_errors; u_long tx_window_errors; - + /* for cslip etc */ u_long rx_compressed; u_long tx_compressed; @@ -256,7 +256,7 @@ struct netfront_info { u_int copying_receiver; u_int carrier; u_int maxfrags; - + /* Receive-ring batched refills. */ #define RX_MIN_TARGET 32 #define RX_MAX_TARGET NET_RX_RING_SIZE @@ -265,9 +265,9 @@ struct netfront_info { int rx_target; grant_ref_t gref_tx_head; - grant_ref_t grant_tx_ref[NET_TX_RING_SIZE + 1]; + grant_ref_t grant_tx_ref[NET_TX_RING_SIZE + 1]; grant_ref_t gref_rx_head; - grant_ref_t grant_rx_ref[NET_TX_RING_SIZE + 1]; + grant_ref_t grant_rx_ref[NET_TX_RING_SIZE + 1]; device_t xbdev; int tx_ring_ref; @@ -299,12 +299,12 @@ struct netfront_info { #define XN_TX_LOCK(_sc) mtx_lock(&(_sc)->tx_lock) #define XN_TX_UNLOCK(_sc) mtx_unlock(&(_sc)->tx_lock) -#define XN_LOCK(_sc) mtx_lock(&(_sc)->sc_lock); -#define XN_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_lock); +#define XN_LOCK(_sc) mtx_lock(&(_sc)->sc_lock); +#define XN_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_lock); -#define XN_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_lock, MA_OWNED); -#define XN_RX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->rx_lock, MA_OWNED); -#define XN_TX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->tx_lock, MA_OWNED); +#define XN_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_lock, MA_OWNED); +#define XN_RX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->rx_lock, MA_OWNED); +#define XN_TX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->tx_lock, MA_OWNED); #define XN_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->rx_lock); \ mtx_destroy(&(_sc)->tx_lock); \ mtx_destroy(&(_sc)->sc_lock); @@ -389,7 +389,7 @@ xennet_get_rx_ref(struct netfront_info * * a preallocated array of length ETH_ALEN (as declared in linux/if_ether.h). * Return 0 on success, or errno on error. */ -static int +static int xen_net_read_mac(device_t dev, uint8_t mac[]) { int error, i; @@ -441,7 +441,7 @@ xen_net_read_mac(device_t dev, uint8_t m * inform the backend of the appropriate details for those. Switch to * Connected state. */ -static int +static int netfront_probe(device_t dev) { @@ -458,7 +458,7 @@ netfront_probe(device_t dev) static int netfront_attach(device_t dev) -{ +{ int err; err = create_netdev(dev); @@ -507,7 +507,7 @@ netfront_resume(device_t dev) } /* Common code used when first setting up, and when resuming. */ -static int +static int talk_to_backend(device_t dev, struct netfront_info *info) { const char *message; @@ -525,7 +525,7 @@ talk_to_backend(device_t dev, struct net err = setup_device(dev, info); if (err) goto out; - + again: err = xs_transaction_start(&xst); if (err) { @@ -582,9 +582,9 @@ talk_to_backend(device_t dev, struct net xenbus_dev_fatal(dev, err, "completing transaction"); goto destroy_ring; } - + return 0; - + abort_transaction: xs_transaction_end(xst, 1); xenbus_dev_fatal(dev, err, "%s", message); @@ -594,7 +594,7 @@ talk_to_backend(device_t dev, struct net return err; } -static int +static int setup_device(device_t dev, struct netfront_info *info) { netif_tx_sring_t *txs; @@ -642,7 +642,7 @@ setup_device(device_t dev, struct netfro } return (0); - + fail: netif_free(info); return (error); @@ -658,7 +658,7 @@ netfront_send_fake_arp(device_t dev, str { struct ifnet *ifp; struct ifaddr *ifa; - + ifp = info->xn_ifp; TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family == AF_INET) { @@ -675,7 +675,7 @@ static void netfront_backend_changed(device_t dev, XenbusState newstate) { struct netfront_info *sc = device_get_softc(dev); - + DPRINTK("newstate=%d\n", newstate); switch (newstate) { @@ -709,14 +709,14 @@ xn_free_rx_ring(struct netfront_info *sc { #if 0 int i; - + for (i = 0; i < NET_RX_RING_SIZE; i++) { if (sc->xn_cdata.rx_mbufs[i] != NULL) { m_freem(sc->rx_mbufs[i]); sc->rx_mbufs[i] = NULL; } } - + sc->rx.rsp_cons = 0; sc->xn_rx_if->req_prod = 0; sc->xn_rx_if->event = sc->rx.rsp_cons ; @@ -728,14 +728,14 @@ xn_free_tx_ring(struct netfront_info *sc { #if 0 int i; - + for (i = 0; i < NET_TX_RING_SIZE; i++) { if (sc->tx_mbufs[i] != NULL) { m_freem(sc->tx_mbufs[i]); sc->xn_cdata.xn_tx_chain[i] = NULL; } } - + return; #endif } @@ -798,12 +798,12 @@ network_alloc_rx_buffers(struct netfront netif_rx_request_t *req; vm_offset_t vaddr; u_long pfn; - + req_prod = sc->rx.req_prod_pvt; if (__predict_false(sc->carrier == 0)) return; - + /* * Allocate mbufs greedily, even though we batch updates to the * receive ring. This creates a less bursty demand on the memory @@ -825,11 +825,11 @@ network_alloc_rx_buffers(struct netfront break; } m_new->m_len = m_new->m_pkthdr.len = MJUMPAGESIZE; - + /* queue the mbufs allocated */ (void )mbufq_enqueue(&sc->xn_rx_batch, m_new); } - + /* * If we've allocated at least half of our target number of entries, * submit them to the backend - we have enough to make the overhead @@ -846,7 +846,7 @@ network_alloc_rx_buffers(struct netfront * Double floating fill target if we risked having the backend * run out of empty buffers for receive traffic. We define "running * low" as having less than a fourth of our target buffers free - * at the time we refilled the queue. + * at the time we refilled the queue. */ if ((req_prod - sc->rx.sring->rsp_prod) < (sc->rx_target / 4)) { sc->rx_target *= 2; @@ -888,11 +888,11 @@ refill: } req->id = id; req->gref = ref; - + sc->rx_pfn_array[i] = vtophys(mtod(m_new,vm_offset_t)) >> PAGE_SHIFT; - } - + } + KASSERT(i, ("no mbufs processed")); /* should have returned earlier */ KASSERT(mbufq_len(&sc->xn_rx_batch) == 0, ("not all mbufs processed")); /* @@ -912,7 +912,7 @@ refill: } else { wmb(); } - + /* Above is a suitable barrier to ensure backend will see requests. */ sc->rx.req_prod_pvt = req_prod + i; push: @@ -947,7 +947,7 @@ xn_rxeof(struct netfront_info *np) mbufq_init(&rxq, INT_MAX); ifp = np->xn_ifp; - + rp = np->rx.sring->rsp_prod; rmb(); /* Ensure we see queued responses up to 'rp'. */ @@ -974,7 +974,7 @@ xn_rxeof(struct netfront_info *np) * XXX this isn't necessarily the case - need to add * check */ - + m->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED | CSUM_IP_VALID | CSUM_DATA_VALID | CSUM_PSEUDO_HDR); @@ -994,16 +994,16 @@ xn_rxeof(struct netfront_info *np) balloon_update_driver_allowance(-pages_flipped); #endif } - + mbufq_drain(&errq); - /* + /* * Process all the mbufs after the remapping is complete. * Break the mbuf chain first though. */ while ((m = mbufq_dequeue(&rxq)) != NULL) { if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); - + /* * Do we really need to drop the rx lock? */ @@ -1023,7 +1023,7 @@ xn_rxeof(struct netfront_info *np) #endif XN_RX_LOCK(np); } - + np->rx.rsp_cons = i; #if __FreeBSD_version >= 700000 && (defined(INET) || defined(INET6)) @@ -1040,18 +1040,18 @@ xn_rxeof(struct netfront_info *np) #if 0 /* If we get a callback with very few responses, reduce fill target. */ /* NB. Note exponential increase, linear decrease. */ - if (((np->rx.req_prod_pvt - np->rx.sring->rsp_prod) > + if (((np->rx.req_prod_pvt - np->rx.sring->rsp_prod) > ((3*np->rx_target) / 4)) && (--np->rx_target < np->rx_min_target)) np->rx_target = np->rx_min_target; #endif - + network_alloc_rx_buffers(np); RING_FINAL_CHECK_FOR_RESPONSES(&np->rx, work_to_do); } while (work_to_do); } -static void +static void xn_txeof(struct netfront_info *np) { RING_IDX i, prod; @@ -1059,18 +1059,18 @@ xn_txeof(struct netfront_info *np) struct ifnet *ifp; netif_tx_response_t *txr; struct mbuf *m; - + XN_TX_LOCK_ASSERT(np); - + if (!netfront_carrier_ok(np)) return; - + ifp = np->xn_ifp; - + do { prod = np->tx.sring->rsp_prod; rmb(); /* Ensure we see responses up to 'rp'. */ - + for (i = np->tx.rsp_cons; i != prod; i++) { txr = RING_GET_RESPONSE(&np->tx, i); if (txr->status == NETIF_RSP_NULL) @@ -1081,13 +1081,13 @@ xn_txeof(struct netfront_info *np) __func__, txr->status); } id = txr->id; - m = np->tx_mbufs[id]; + m = np->tx_mbufs[id]; KASSERT(m != NULL, ("mbuf not found in xn_tx_chain")); KASSERT((uintptr_t)m > NET_TX_RING_SIZE, ("mbuf already on the free list, but we're " "trying to free it again!")); M_ASSERTVALID(m); - + /* * Increment packet count if this is the last * mbuf of the chain. @@ -1104,7 +1104,7 @@ xn_txeof(struct netfront_info *np) gnttab_release_grant_reference( &np->gref_tx_head, np->grant_tx_ref[id]); np->grant_tx_ref[id] = GRANT_REF_INVALID; - + np->tx_mbufs[id] = NULL; add_id_to_freelist(np->tx_mbufs, id); np->xn_cdata.xn_tx_chain_cnt--; @@ -1113,7 +1113,7 @@ xn_txeof(struct netfront_info *np) ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; } np->tx.rsp_cons = prod; - + /* * Set a new event, then check for race with update of * tx_cons. Note that it is essential to schedule a @@ -1128,7 +1128,7 @@ xn_txeof(struct netfront_info *np) mb(); } while (prod != np->tx.sring->rsp_prod); - + if (np->tx_full && ((np->tx.sring->req_prod - prod) < NET_TX_RING_SIZE)) { np->tx_full = 0; @@ -1154,8 +1154,8 @@ xn_intr(void *xsc) if (RING_HAS_UNCONSUMED_RESPONSES(&np->tx)) { XN_TX_LOCK(np); xn_txeof(np); - XN_TX_UNLOCK(np); - } + XN_TX_UNLOCK(np); + } XN_RX_LOCK(np); xn_rxeof(np); @@ -1193,10 +1193,10 @@ xennet_get_extras(struct netfront_info * grant_ref_t ref; if (__predict_false(*cons + 1 == rp)) { -#if 0 +#if 0 if (net_ratelimit()) WPRINTK("Missing extra info\n"); -#endif +#endif err = EINVAL; break; } @@ -1206,11 +1206,11 @@ xennet_get_extras(struct netfront_info * if (__predict_false(!extra->type || extra->type >= XEN_NETIF_EXTRA_TYPE_MAX)) { -#if 0 +#if 0 if (net_ratelimit()) WPRINTK("Invalid extra type: %d\n", extra->type); -#endif +#endif err = EINVAL; } else { memcpy(&extras[extra->type - 1], extra, sizeof(*extra)); @@ -1254,18 +1254,18 @@ xennet_get_responses(struct netfront_inf for (;;) { u_long mfn; -#if 0 +#if 0 DPRINTK("rx->status=%hd rx->offset=%hu frags=%u\n", rx->status, rx->offset, frags); #endif if (__predict_false(rx->status < 0 || rx->offset + rx->status > PAGE_SIZE)) { -#if 0 +#if 0 if (net_ratelimit()) WPRINTK("rx->offset: %x, size: %u\n", rx->offset, rx->status); -#endif +#endif xennet_move_rx_slot(np, m, ref); if (m0 == m) m0 = NULL; @@ -1273,7 +1273,7 @@ xennet_get_responses(struct netfront_inf err = EINVAL; goto next_skip_queue; } - + /* * This definitely indicates a bug, either in this driver or in * the backend driver. In future this should flag the bad @@ -1281,10 +1281,10 @@ xennet_get_responses(struct netfront_inf */ if (ref == GRANT_REF_INVALID) { -#if 0 +#if 0 if (net_ratelimit()) WPRINTK("Bad rx response id %d.\n", rx->id); -#endif +#endif printf("%s: Bad rx response id %d.\n", __func__,rx->id); err = EINVAL; goto next; @@ -1317,7 +1317,7 @@ next: m->m_len = rx->status; m->m_data += rx->offset; m0->m_pkthdr.len += rx->status; - + next_skip_queue: if (!(rx->flags & NETRXF_more_data)) break; @@ -1332,23 +1332,23 @@ next_skip_queue: } /* * Note that m can be NULL, if rx->status < 0 or if - * rx->offset + rx->status > PAGE_SIZE above. + * rx->offset + rx->status > PAGE_SIZE above. */ m_prev = m; - + rx = RING_GET_RESPONSE(&np->rx, *cons + frags); m = xennet_get_rx_mbuf(np, *cons + frags); /* * m_prev == NULL can happen if rx->status < 0 or if - * rx->offset + * rx->status > PAGE_SIZE above. + * rx->offset + * rx->status > PAGE_SIZE above. */ if (m_prev != NULL) m_prev->m_next = m; /* * m0 can be NULL if rx->status < 0 or if * rx->offset + - * rx->status > PAGE_SIZE above. + * rx->status > PAGE_SIZE above. */ if (m0 == NULL) m0 = m; @@ -1365,7 +1365,7 @@ next_skip_queue: } static void -xn_tick_locked(struct netfront_info *sc) +xn_tick_locked(struct netfront_info *sc) { XN_RX_LOCK_ASSERT(sc); callout_reset(&sc->xn_stat_ch, hz, xn_tick, sc); @@ -1374,10 +1374,10 @@ xn_tick_locked(struct netfront_info *sc) } static void -xn_tick(void *xsc) +xn_tick(void *xsc) { struct netfront_info *sc; - + sc = xsc; XN_RX_LOCK(sc); xn_tick_locked(sc); @@ -1573,7 +1573,7 @@ xn_assemble_tx_request(struct netfront_i } static void -xn_start_locked(struct ifnet *ifp) +xn_start_locked(struct ifnet *ifp) { struct netfront_info *sc; struct mbuf *m_head; @@ -1621,35 +1621,35 @@ xn_start(struct ifnet *ifp) } /* equivalent of network_open() in Linux */ -static void -xn_ifinit_locked(struct netfront_info *sc) +static void +xn_ifinit_locked(struct netfront_info *sc) { struct ifnet *ifp; - + XN_LOCK_ASSERT(sc); - + ifp = sc->xn_ifp; - - if (ifp->if_drv_flags & IFF_DRV_RUNNING) + + if (ifp->if_drv_flags & IFF_DRV_RUNNING) return; - + xn_stop(sc); - + network_alloc_rx_buffers(sc); sc->rx.sring->rsp_event = sc->rx.rsp_cons + 1; - + ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; if_link_state_change(ifp, LINK_STATE_UP); - + callout_reset(&sc->xn_stat_ch, hz, xn_tick, sc); } -static void +static void xn_ifinit(void *xsc) { struct netfront_info *sc = xsc; - + XN_LOCK(sc); xn_ifinit_locked(sc); XN_UNLOCK(sc); @@ -1671,12 +1671,12 @@ xn_ioctl(struct ifnet *ifp, u_long cmd, XN_LOCK(sc); if (ifa->ifa_addr->sa_family == AF_INET) { ifp->if_flags |= IFF_UP; - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) + if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) xn_ifinit_locked(sc); arp_ifinit(ifp, ifa); - XN_UNLOCK(sc); + XN_UNLOCK(sc); } else { - XN_UNLOCK(sc); + XN_UNLOCK(sc); #endif error = ether_ioctl(ifp, cmd, data); #ifdef INET @@ -1688,7 +1688,7 @@ xn_ioctl(struct ifnet *ifp, u_long cmd, #ifdef notyet if (ifr->ifr_mtu > XN_JUMBO_MTU) error = EINVAL; - else + else #endif { ifp->if_mtu = ifr->ifr_mtu; @@ -1763,7 +1763,7 @@ xn_ioctl(struct ifnet *ifp, u_long cmd, } if (mask & IFCAP_LRO) { ifp->if_capenable ^= IFCAP_LRO; - + } #endif error = 0; @@ -1786,24 +1786,24 @@ xn_ioctl(struct ifnet *ifp, u_long cmd, default: error = ether_ioctl(ifp, cmd, data); } - + return (error); } static void xn_stop(struct netfront_info *sc) -{ +{ struct ifnet *ifp; XN_LOCK_ASSERT(sc); - + ifp = sc->xn_ifp; callout_stop(&sc->xn_stat_ch); xn_free_rx_ring(sc); xn_free_tx_ring(sc); - + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); if_link_state_change(ifp, LINK_STATE_DOWN); } @@ -1836,9 +1836,9 @@ network_connect(struct netfront_info *np /* Recovery procedure: */ error = talk_to_backend(np->xbdev, np); - if (error) + if (error) return (error); - + /* Step 1: Reinitialise variables. */ xn_query_features(np); xn_configure_features(np); @@ -1874,7 +1874,7 @@ network_connect(struct netfront_info *np } np->rx.req_prod_pvt = requeue_idx; - + /* Step 3: All public and private state should now be sane. Get * ready to start sending and receiving packets and give the driver * domain a kick because we've probably just requeued some @@ -1971,7 +1971,7 @@ xn_configure_features(struct netfront_in * Create a network device. * @param dev Newbus device representing this virtual NIC. */ -int +int create_netdev(device_t dev) { int i; @@ -1980,9 +1980,9 @@ create_netdev(device_t dev) struct ifnet *ifp; np = device_get_softc(dev); - + np->xbdev = dev; - + XN_LOCK_INIT(np, xennetif); ifmedia_init(&np->sc_media, 0, xn_ifmedia_upd, xn_ifmedia_sts); @@ -1996,7 +1996,7 @@ create_netdev(device_t dev) /* Initialise {tx,rx}_skbs to be a free chain containing every entry. */ for (i = 0; i <= NET_TX_RING_SIZE; i++) { np->tx_mbufs[i] = (void *) ((u_long) i+1); - np->grant_tx_ref[i] = GRANT_REF_INVALID; + np->grant_tx_ref[i] = GRANT_REF_INVALID; } np->tx_mbufs[NET_TX_RING_SIZE] = (void *)0; @@ -2023,11 +2023,11 @@ create_netdev(device_t dev) err = ENOMEM; goto exit; } - + err = xen_net_read_mac(dev, np->mac); if (err) goto out; - + /* Set up ifnet structure */ ifp = np->xn_ifp = if_alloc(IFT_ETHER); ifp->if_softc = np; @@ -2041,13 +2041,13 @@ create_netdev(device_t dev) #endif ifp->if_init = xn_ifinit; ifp->if_snd.ifq_maxlen = NET_TX_RING_SIZE - 1; - + ifp->if_hwassist = XN_CSUM_FEATURES; ifp->if_capabilities = IFCAP_HWCSUM; ifp->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); ifp->if_hw_tsomaxsegcount = MAX_TX_REQ_FRAGS; ifp->if_hw_tsomaxsegsize = PAGE_SIZE; - + ether_ifattach(ifp, np->mac); callout_init(&np->xn_stat_ch, 1); netfront_carrier_off(np); @@ -2151,27 +2151,27 @@ xn_ifmedia_sts(struct ifnet *ifp, struct } /* ** Driver registration ** */ -static device_method_t netfront_methods[] = { - /* Device interface */ - DEVMETHOD(device_probe, netfront_probe), - DEVMETHOD(device_attach, netfront_attach), - DEVMETHOD(device_detach, netfront_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, netfront_suspend), - DEVMETHOD(device_resume, netfront_resume), - +static device_method_t netfront_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, netfront_probe), + DEVMETHOD(device_attach, netfront_attach), + DEVMETHOD(device_detach, netfront_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, netfront_suspend), + DEVMETHOD(device_resume, netfront_resume), + /* Xenbus interface */ DEVMETHOD(xenbus_otherend_changed, netfront_backend_changed), DEVMETHOD_END -}; +}; + +static driver_t netfront_driver = { + "xn", + netfront_methods, + sizeof(struct netfront_info), +}; +devclass_t netfront_devclass; -static driver_t netfront_driver = { - "xn", - netfront_methods, - sizeof(struct netfront_info), -}; -devclass_t netfront_devclass; - DRIVER_MODULE(xe, xenbusb_front, netfront_driver, netfront_devclass, NULL, - NULL); + NULL); From owner-svn-src-all@freebsd.org Mon Oct 19 14:20: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 94843A18F4F; Mon, 19 Oct 2015 14:20:08 +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 386EB15DD; Mon, 19 Oct 2015 14:20:08 +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 t9JEK6Q8013193; Mon, 19 Oct 2015 14:20:06 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JEK6cr013192; Mon, 19 Oct 2015 14:20:06 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201510191420.t9JEK6cr013192@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: Mon, 19 Oct 2015 14:20:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289583 - head/sys/dev/xen/netfront X-SVN-Group: head MIME-Version: 1.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, 19 Oct 2015 14:20:08 -0000 Author: royger Date: Mon Oct 19 14:20:06 2015 New Revision: 289583 URL: https://svnweb.freebsd.org/changeset/base/289583 Log: xen-netfront: purge page flipping support Currently neither Linux nor FreeBSD netback supports page flipping. NetBSD still supports that. It is not sure how many people actually use page flipping, but page flipping is supposed to be slower than copying nowadays. It will also shatter frontend / backend address space. Overall this feature is more of a burden than a benefit. Submitted by: Wei Liu Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3888 Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Mon Oct 19 14:12:15 2015 (r289582) +++ head/sys/dev/xen/netfront/netfront.c Mon Oct 19 14:20:06 2015 (r289583) @@ -110,18 +110,6 @@ TUNABLE_INT("hw.xn.enable_lro", &xn_enab #endif -#ifdef CONFIG_XEN -static int MODPARM_rx_copy = 0; -module_param_named(rx_copy, MODPARM_rx_copy, bool, 0); -MODULE_PARM_DESC(rx_copy, "Copy packets from network card (rather than flip)"); -static int MODPARM_rx_flip = 0; -module_param_named(rx_flip, MODPARM_rx_flip, bool, 0); -MODULE_PARM_DESC(rx_flip, "Flip packets from network card (rather than copy)"); -#else -static const int MODPARM_rx_copy = 1; -static const int MODPARM_rx_flip = 0; -#endif - /** * \brief The maximum allowed data fragments in a single transmit * request. @@ -186,7 +174,7 @@ static void xn_free_tx_ring(struct netfr static int xennet_get_responses(struct netfront_info *np, struct netfront_rx_info *rinfo, RING_IDX rp, RING_IDX *cons, - struct mbuf **list, int *pages_flipped_p); + struct mbuf **list); #define virt_to_mfn(x) (vtophys(x) >> PAGE_SHIFT) @@ -253,7 +241,6 @@ struct netfront_info { struct mtx sc_lock; xen_intr_handle_t xen_intr_handle; - u_int copying_receiver; u_int carrier; u_int maxfrags; @@ -551,8 +538,7 @@ talk_to_backend(device_t dev, struct net message = "writing event-channel"; goto abort_transaction; } - err = xs_printf(xst, node, "request-rx-copy", "%u", - info->copying_receiver); + err = xs_printf(xst, node, "request-rx-copy", "%u", 1); if (err) { message = "writing request-rx-copy"; goto abort_transaction; @@ -792,9 +778,7 @@ network_alloc_rx_buffers(struct netfront struct mbuf *m_new; int i, batch_target, notify; RING_IDX req_prod; - struct xen_memory_reservation reservation; grant_ref_t ref; - int nr_flips; netif_rx_request_t *req; vm_offset_t vaddr; u_long pfn; @@ -855,7 +839,7 @@ network_alloc_rx_buffers(struct netfront } refill: - for (nr_flips = i = 0; ; i++) { + for (i = 0; ; i++) { if ((m_new = mbufq_dequeue(&sc->xn_rx_batch)) == NULL) break; @@ -876,16 +860,7 @@ refill: pfn = vtophys(vaddr) >> PAGE_SHIFT; req = RING_GET_REQUEST(&sc->rx, req_prod + i); - if (sc->copying_receiver == 0) { - gnttab_grant_foreign_transfer_ref(ref, - otherend_id, pfn); - sc->rx_pfn_array[nr_flips] = pfn; - nr_flips++; - } else { - gnttab_grant_foreign_access_ref(ref, - otherend_id, - pfn, 0); - } + gnttab_grant_foreign_access_ref(ref, otherend_id, pfn, 0); req->id = id; req->gref = ref; @@ -899,19 +874,7 @@ refill: * We may have allocated buffers which have entries outstanding * in the page * update queue -- make sure we flush those first! */ - if (nr_flips != 0) { -#ifdef notyet - /* Tell the ballon driver what is going on. */ - balloon_update_driver_allowance(i); -#endif - set_xen_guest_handle(reservation.extent_start, sc->rx_pfn_array); - reservation.nr_extents = i; - reservation.extent_order = 0; - reservation.address_bits = 0; - reservation.domid = DOMID_SELF; - } else { - wmb(); - } + wmb(); /* Above is a suitable barrier to ensure backend will see requests. */ sc->rx.req_prod_pvt = req_prod + i; @@ -935,7 +898,7 @@ xn_rxeof(struct netfront_info *np) RING_IDX i, rp; struct mbuf *m; struct mbufq rxq, errq; - int err, pages_flipped = 0, work_to_do; + int err, work_to_do; do { XN_RX_LOCK_ASSERT(np); @@ -957,8 +920,7 @@ xn_rxeof(struct netfront_info *np) memset(extras, 0, sizeof(rinfo.extras)); m = NULL; - err = xennet_get_responses(np, &rinfo, rp, &i, &m, - &pages_flipped); + err = xennet_get_responses(np, &rinfo, rp, &i, &m); if (__predict_false(err)) { if (m) @@ -988,13 +950,6 @@ xn_rxeof(struct netfront_info *np) np->rx.rsp_cons = i; } - if (pages_flipped) { - /* Some pages are no longer absent... */ -#ifdef notyet - balloon_update_driver_allowance(-pages_flipped); -#endif - } - mbufq_drain(&errq); /* @@ -1227,10 +1182,8 @@ xennet_get_extras(struct netfront_info * static int xennet_get_responses(struct netfront_info *np, struct netfront_rx_info *rinfo, RING_IDX rp, RING_IDX *cons, - struct mbuf **list, - int *pages_flipped_p) + struct mbuf **list) { - int pages_flipped = *pages_flipped_p; struct netif_rx_response *rx = &rinfo->rx; struct netif_extra_info *extras = rinfo->extras; struct mbuf *m, *m0, *m_prev; @@ -1252,8 +1205,6 @@ xennet_get_responses(struct netfront_inf } for (;;) { - u_long mfn; - #if 0 DPRINTK("rx->status=%hd rx->offset=%hu frags=%u\n", rx->status, rx->offset, frags); @@ -1290,23 +1241,8 @@ xennet_get_responses(struct netfront_inf goto next; } - if (!np->copying_receiver) { - /* Memory pressure, insufficient buffer - * headroom, ... - */ - if (!(mfn = gnttab_end_foreign_transfer_ref(ref))) { - WPRINTK("Unfulfilled rx req (id=%d, st=%d).\n", - rx->id, rx->status); - xennet_move_rx_slot(np, m, ref); - err = ENOMEM; - goto next; - } - - pages_flipped++; - } else { - ret = gnttab_end_foreign_access_ref(ref); - KASSERT(ret, ("ret != 0")); - } + ret = gnttab_end_foreign_access_ref(ref); + KASSERT(ret, ("Unable to end access to grant references")); gnttab_release_grant_reference(&np->gref_rx_head, ref); @@ -1359,7 +1295,6 @@ next_skip_queue: } *list = m0; *cons += frags; - *pages_flipped_p = pages_flipped; return (err); } @@ -1815,24 +1750,16 @@ network_connect(struct netfront_info *np int i, requeue_idx, error; grant_ref_t ref; netif_rx_request_t *req; - u_int feature_rx_copy, feature_rx_flip; + u_int feature_rx_copy; error = xs_scanf(XST_NIL, xenbus_get_otherend_path(np->xbdev), "feature-rx-copy", NULL, "%u", &feature_rx_copy); if (error) feature_rx_copy = 0; - error = xs_scanf(XST_NIL, xenbus_get_otherend_path(np->xbdev), - "feature-rx-flip", NULL, "%u", &feature_rx_flip); - if (error) - feature_rx_flip = 1; - /* - * Copy packets on receive path if: - * (a) This was requested by user, and the backend supports it; or - * (b) Flipping was requested, but this is unsupported by the backend. - */ - np->copying_receiver = ((MODPARM_rx_copy && feature_rx_copy) || - (MODPARM_rx_flip && !feature_rx_flip)); + /* We only support rx copy. */ + if (!feature_rx_copy) + return (EPROTONOSUPPORT); /* Recovery procedure: */ error = talk_to_backend(np->xbdev, np); @@ -1858,15 +1785,10 @@ network_connect(struct netfront_info *np req = RING_GET_REQUEST(&np->rx, requeue_idx); pfn = vtophys(mtod(m, vm_offset_t)) >> PAGE_SHIFT; - if (!np->copying_receiver) { - gnttab_grant_foreign_transfer_ref(ref, - xenbus_get_otherend_id(np->xbdev), - pfn); - } else { - gnttab_grant_foreign_access_ref(ref, - xenbus_get_otherend_id(np->xbdev), - pfn, 0); - } + gnttab_grant_foreign_access_ref(ref, + xenbus_get_otherend_id(np->xbdev), + pfn, 0); + req->gref = ref; req->id = requeue_idx; From owner-svn-src-all@freebsd.org Mon Oct 19 14: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 989CDA19109; Mon, 19 Oct 2015 14:22:58 +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 4CD151C1E; Mon, 19 Oct 2015 14:22:58 +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 t9JEMvQc016020; Mon, 19 Oct 2015 14:22:57 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JEMvoO016019; Mon, 19 Oct 2015 14:22:57 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201510191422.t9JEMvoO016019@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: Mon, 19 Oct 2015 14:22:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289584 - head/sys/dev/xen/netfront X-SVN-Group: head MIME-Version: 1.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, 19 Oct 2015 14:22:58 -0000 Author: royger Date: Mon Oct 19 14:22:57 2015 New Revision: 289584 URL: https://svnweb.freebsd.org/changeset/base/289584 Log: xen-netfront: clean up netfront stats structure Rename it with netfront_ prefix and purge a bunch of unused fields. Submitted by: Wei Liu Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3889 Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Mon Oct 19 14:20:06 2015 (r289583) +++ head/sys/dev/xen/netfront/netfront.c Mon Oct 19 14:22:57 2015 (r289584) @@ -191,7 +191,7 @@ struct xn_chain_data { struct mbuf *xn_rx_chain[NET_RX_RING_SIZE+1]; }; -struct net_device_stats +struct netfront_stats { u_long rx_packets; /* total packets received */ u_long tx_packets; /* total packets transmitted */ @@ -199,29 +199,6 @@ struct net_device_stats u_long tx_bytes; /* total bytes transmitted */ u_long rx_errors; /* bad packets received */ u_long tx_errors; /* packet transmit problems */ - u_long rx_dropped; /* no space in linux buffers */ - u_long tx_dropped; /* no space available in linux */ - u_long multicast; /* multicast packets received */ - u_long collisions; - - /* detailed rx_errors: */ - u_long rx_length_errors; - u_long rx_over_errors; /* receiver ring buff overflow */ - u_long rx_crc_errors; /* recved pkt with crc error */ - u_long rx_frame_errors; /* recv'd frame alignment error */ - u_long rx_fifo_errors; /* recv'r fifo overrun */ - u_long rx_missed_errors; /* receiver missed packet */ - - /* detailed tx_errors */ - u_long tx_aborted_errors; - u_long tx_carrier_errors; - u_long tx_fifo_errors; - u_long tx_heartbeat_errors; - u_long tx_window_errors; - - /* for cslip etc */ - u_long rx_compressed; - u_long tx_compressed; }; struct netfront_info { @@ -230,7 +207,7 @@ struct netfront_info { struct lro_ctrl xn_lro; #endif - struct net_device_stats stats; + struct netfront_stats stats; u_int tx_full; netif_tx_front_ring_t tx; From owner-svn-src-all@freebsd.org Mon Oct 19 14:26: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 B8EBEA191F0; Mon, 19 Oct 2015 14:26:41 +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 6A5281E1A; Mon, 19 Oct 2015 14:26:41 +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 t9JEQe2P016178; Mon, 19 Oct 2015 14:26:40 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JEQebk016177; Mon, 19 Oct 2015 14:26:40 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201510191426.t9JEQebk016177@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: Mon, 19 Oct 2015 14:26:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289585 - head/sys/dev/xen/netfront X-SVN-Group: head MIME-Version: 1.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, 19 Oct 2015 14:26:41 -0000 Author: royger Date: Mon Oct 19 14:26:40 2015 New Revision: 289585 URL: https://svnweb.freebsd.org/changeset/base/289585 Log: xen-netfront: remove XN_LOCK_{INIT,DESTROY} Multiqueue feature will make the number of queues dynamic, so XN_LOCK_INIT won't be that useful. Remove the macro and call mtx_init directly. XN_LOCK_DESTROY is just dead code. Submitted by: Wei Liu Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3890 Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Mon Oct 19 14:22:57 2015 (r289584) +++ head/sys/dev/xen/netfront/netfront.c Mon Oct 19 14:26:40 2015 (r289585) @@ -252,11 +252,6 @@ struct netfront_info { #define rx_mbufs xn_cdata.xn_rx_chain #define tx_mbufs xn_cdata.xn_tx_chain -#define XN_LOCK_INIT(_sc, _name) \ - mtx_init(&(_sc)->tx_lock, #_name"_tx", "network transmit lock", MTX_DEF); \ - mtx_init(&(_sc)->rx_lock, #_name"_rx", "network receive lock", MTX_DEF); \ - mtx_init(&(_sc)->sc_lock, #_name"_sc", "netfront softc lock", MTX_DEF) - #define XN_RX_LOCK(_sc) mtx_lock(&(_sc)->rx_lock) #define XN_RX_UNLOCK(_sc) mtx_unlock(&(_sc)->rx_lock) @@ -269,9 +264,6 @@ struct netfront_info { #define XN_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_lock, MA_OWNED); #define XN_RX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->rx_lock, MA_OWNED); #define XN_TX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->tx_lock, MA_OWNED); -#define XN_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->rx_lock); \ - mtx_destroy(&(_sc)->tx_lock); \ - mtx_destroy(&(_sc)->sc_lock); struct netfront_rx_info { struct netif_rx_response rx; @@ -1882,7 +1874,9 @@ create_netdev(device_t dev) np->xbdev = dev; - XN_LOCK_INIT(np, xennetif); + mtx_init(&np->tx_lock, "xntx", "network transmit lock", MTX_DEF); + mtx_init(&np->rx_lock, "xnrx", "network receive lock", MTX_DEF); + mtx_init(&np->sc_lock, "xnsc", "netfront softc lock", MTX_DEF); ifmedia_init(&np->sc_media, 0, xn_ifmedia_upd, xn_ifmedia_sts); ifmedia_add(&np->sc_media, IFM_ETHER|IFM_MANUAL, 0, NULL); From owner-svn-src-all@freebsd.org Mon Oct 19 14:34: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 0EEE1A1940B; Mon, 19 Oct 2015 14:34:47 +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 BCCBB6EA; Mon, 19 Oct 2015 14:34:46 +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 t9JEYjak019085; Mon, 19 Oct 2015 14:34:45 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JEYjor019084; Mon, 19 Oct 2015 14:34:45 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201510191434.t9JEYjor019084@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: Mon, 19 Oct 2015 14:34:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289587 - head/sys/dev/xen/netfront X-SVN-Group: head MIME-Version: 1.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, 19 Oct 2015 14:34:47 -0000 Author: royger Date: Mon Oct 19 14:34:45 2015 New Revision: 289587 URL: https://svnweb.freebsd.org/changeset/base/289587 Log: xen-netfront: remove a bunch of FreeBSD version check We're way beyond FreeBSD 7 at this point. Submitted by: Wei Liu Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3892 Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Mon Oct 19 14:30:28 2015 (r289586) +++ head/sys/dev/xen/netfront/netfront.c Mon Oct 19 14:34:45 2015 (r289587) @@ -59,10 +59,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#if __FreeBSD_version >= 700000 #include #include -#endif #include #include @@ -94,7 +92,6 @@ __FBSDID("$FreeBSD$"); #define NET_TX_RING_SIZE __RING_SIZE((netif_tx_sring_t *)0, PAGE_SIZE) #define NET_RX_RING_SIZE __RING_SIZE((netif_rx_sring_t *)0, PAGE_SIZE) -#if __FreeBSD_version >= 700000 /* * Should the driver do LRO on the RX end * this can be toggled on the fly, but the @@ -103,12 +100,6 @@ __FBSDID("$FreeBSD$"); */ static int xn_enable_lro = 1; TUNABLE_INT("hw.xn.enable_lro", &xn_enable_lro); -#else - -#define IFCAP_TSO4 0 -#define CSUM_TSO 0 - -#endif /** * \brief The maximum allowed data fragments in a single transmit @@ -203,9 +194,7 @@ struct netfront_stats struct netfront_info { struct ifnet *xn_ifp; -#if __FreeBSD_version >= 700000 struct lro_ctrl xn_lro; -#endif struct netfront_stats stats; u_int tx_full; @@ -423,12 +412,10 @@ netfront_attach(device_t dev) return (err); } -#if __FreeBSD_version >= 700000 SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "enable_lro", CTLFLAG_RW, &xn_enable_lro, 0, "Large Receive Offload"); -#endif return (0); } @@ -522,13 +509,11 @@ talk_to_backend(device_t dev, struct net message = "writing feature-sg"; goto abort_transaction; } -#if __FreeBSD_version >= 700000 err = xs_printf(xst, node, "feature-gso-tcpv4", "%d", 1); if (err) { message = "writing feature-gso-tcpv4"; goto abort_transaction; } -#endif err = xs_transaction_end(xst, 0); if (err) { @@ -857,10 +842,8 @@ static void xn_rxeof(struct netfront_info *np) { struct ifnet *ifp; -#if __FreeBSD_version >= 700000 && (defined(INET) || defined(INET6)) struct lro_ctrl *lro = &np->xn_lro; struct lro_entry *queued; -#endif struct netfront_rx_info rinfo; struct netif_rx_response *rx = &rinfo.rx; struct netif_extra_info *extras = rinfo.extras; @@ -932,7 +915,7 @@ xn_rxeof(struct netfront_info *np) * Do we really need to drop the rx lock? */ XN_RX_UNLOCK(np); -#if __FreeBSD_version >= 700000 && (defined(INET) || defined(INET6)) +#if (defined(INET) || defined(INET6)) /* Use LRO if possible */ if ((ifp->if_capenable & IFCAP_LRO) == 0 || lro->lro_cnt == 0 || tcp_lro_rx(lro, m, 0)) { @@ -950,7 +933,7 @@ xn_rxeof(struct netfront_info *np) np->rx.rsp_cons = i; -#if __FreeBSD_version >= 700000 && (defined(INET) || defined(INET6)) +#if (defined(INET) || defined(INET6)) /* * Flush any outstanding LRO work */ @@ -1441,7 +1424,6 @@ xn_assemble_tx_request(struct netfront_i tx->flags |= (NETTXF_csum_blank | NETTXF_data_validated); } -#if __FreeBSD_version >= 700000 if (m->m_pkthdr.csum_flags & CSUM_TSO) { struct netif_extra_info *gso = (struct netif_extra_info *) @@ -1459,7 +1441,6 @@ xn_assemble_tx_request(struct netfront_i gso->type = XEN_NETIF_EXTRA_TYPE_GSO; gso->flags = 0; } -#endif } else { tx->size = m->m_len; } @@ -1651,7 +1632,6 @@ xn_ioctl(struct ifnet *ifp, u_long cmd, if (mask & IFCAP_RXCSUM) { ifp->if_capenable ^= IFCAP_RXCSUM; } -#if __FreeBSD_version >= 700000 if (mask & IFCAP_TSO4) { if (IFCAP_TSO4 & ifp->if_capenable) { ifp->if_capenable &= ~IFCAP_TSO4; @@ -1669,7 +1649,6 @@ xn_ioctl(struct ifnet *ifp, u_long cmd, ifp->if_capenable ^= IFCAP_LRO; } -#endif error = 0; break; case SIOCADDMULTI: @@ -1831,14 +1810,14 @@ xn_configure_features(struct netfront_in else cap_enabled = UINT_MAX; -#if __FreeBSD_version >= 700000 && (defined(INET) || defined(INET6)) +#if (defined(INET) || defined(INET6)) if ((np->xn_ifp->if_capenable & IFCAP_LRO) == (cap_enabled & IFCAP_LRO)) tcp_lro_free(&np->xn_lro); #endif np->xn_ifp->if_capenable = np->xn_ifp->if_capabilities & ~(IFCAP_LRO|IFCAP_TSO4) & cap_enabled; np->xn_ifp->if_hwassist &= ~CSUM_TSO; -#if __FreeBSD_version >= 700000 && (defined(INET) || defined(INET6)) +#if (defined(INET) || defined(INET6)) if (xn_enable_lro && (np->xn_ifp->if_capabilities & IFCAP_LRO) == (cap_enabled & IFCAP_LRO)) { err = tcp_lro_init(&np->xn_lro); From owner-svn-src-all@freebsd.org Mon Oct 19 14:37: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 C0590A194CE; Mon, 19 Oct 2015 14:37:18 +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 8E1CB979; Mon, 19 Oct 2015 14:37:18 +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 t9JEbHnY019223; Mon, 19 Oct 2015 14:37:17 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JEbHhI019222; Mon, 19 Oct 2015 14:37:17 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201510191437.t9JEbHhI019222@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: Mon, 19 Oct 2015 14:37:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289588 - head/sys/dev/xen/netfront X-SVN-Group: head MIME-Version: 1.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, 19 Oct 2015 14:37:18 -0000 Author: royger Date: Mon Oct 19 14:37:17 2015 New Revision: 289588 URL: https://svnweb.freebsd.org/changeset/base/289588 Log: xen-netfront: no need to set if_output This is redundant because ether_ifattach will set that field. Submitted by: Wei Liu Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3918 Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Mon Oct 19 14:34:45 2015 (r289587) +++ head/sys/dev/xen/netfront/netfront.c Mon Oct 19 14:37:17 2015 (r289588) @@ -1906,7 +1906,6 @@ create_netdev(device_t dev) if_initname(ifp, "xn", device_get_unit(dev)); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = xn_ioctl; - ifp->if_output = ether_output; ifp->if_start = xn_start; #ifdef notyet ifp->if_watchdog = xn_watchdog; From owner-svn-src-all@freebsd.org Mon Oct 19 14:47: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 74F48A1983A; Mon, 19 Oct 2015 14:47:38 +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 40D4510D1; Mon, 19 Oct 2015 14:47:38 +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 t9JElbNO022059; Mon, 19 Oct 2015 14:47:37 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JElbNe022058; Mon, 19 Oct 2015 14:47:37 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201510191447.t9JElbNe022058@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: Mon, 19 Oct 2015 14:47:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289589 - head/sys/dev/xen/netfront X-SVN-Group: head MIME-Version: 1.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, 19 Oct 2015 14:47:38 -0000 Author: royger Date: Mon Oct 19 14:47:37 2015 New Revision: 289589 URL: https://svnweb.freebsd.org/changeset/base/289589 Log: xen-netfront: fix netfront create_dev error path The failure path for allocating rx grant refs should not try to free tx grant refs because tx grant refs were allocated after that. Also fix the error path for xen_net_read_mac. Submitted by: Wei Liu Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3891 Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Mon Oct 19 14:37:17 2015 (r289588) +++ head/sys/dev/xen/netfront/netfront.c Mon Oct 19 14:47:37 2015 (r289589) @@ -1885,7 +1885,7 @@ create_netdev(device_t dev) &np->gref_tx_head) != 0) { IPRINTK("#### netfront can't alloc tx grant refs\n"); err = ENOMEM; - goto exit; + goto error; } /* A grant for every rx ring slot */ if (gnttab_alloc_grant_references(RX_MAX_TARGET, @@ -1893,12 +1893,15 @@ create_netdev(device_t dev) WPRINTK("#### netfront can't alloc rx grant refs\n"); gnttab_free_grant_references(np->gref_tx_head); err = ENOMEM; - goto exit; + goto error; } err = xen_net_read_mac(dev, np->mac); - if (err) - goto out; + if (err) { + gnttab_free_grant_references(np->gref_rx_head); + gnttab_free_grant_references(np->gref_tx_head); + goto error; + } /* Set up ifnet structure */ ifp = np->xn_ifp = if_alloc(IFT_ETHER); @@ -1925,9 +1928,8 @@ create_netdev(device_t dev) return (0); -exit: - gnttab_free_grant_references(np->gref_tx_head); -out: +error: + KASSERT(err != 0, ("Error path with no error code specified")); return (err); } From owner-svn-src-all@freebsd.org Mon Oct 19 15:01: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 BBBEAA19D59; Mon, 19 Oct 2015 15:01:39 +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 50EAD1DB1; Mon, 19 Oct 2015 15:01:39 +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 t9JF1USi095505 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 19 Oct 2015 18:01:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua t9JF1USi095505 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id t9JF1UVO095504; Mon, 19 Oct 2015 18:01:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 19 Oct 2015 18:01:30 +0300 From: Konstantin Belousov To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289565 - head/sys/ofed/include/linux Message-ID: <20151019150130.GK2257@kib.kiev.ua> References: <201510191056.t9JAuWhF052021@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201510191056.t9JAuWhF052021@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: Mon, 19 Oct 2015 15:01:39 -0000 On Mon, Oct 19, 2015 at 10:56:32AM +0000, Hans Petter Selasky wrote: > Author: hselasky > Date: Mon Oct 19 10:56:32 2015 > New Revision: 289565 > URL: https://svnweb.freebsd.org/changeset/base/289565 > > Log: > Merge LinuxKPI changes from DragonflyBSD: > - Implement pagefault_disable() and pagefault_enable(). > > Sponsored by: Mellanox Technologies > > Modified: > head/sys/ofed/include/linux/uaccess.h > > Modified: head/sys/ofed/include/linux/uaccess.h > ============================================================================== > --- head/sys/ofed/include/linux/uaccess.h Mon Oct 19 10:54:24 2015 (r289564) > +++ head/sys/ofed/include/linux/uaccess.h Mon Oct 19 10:56:32 2015 (r289565) > @@ -2,7 +2,8 @@ > * Copyright (c) 2010 Isilon Systems, Inc. > * Copyright (c) 2010 iX Systems, Inc. > * Copyright (c) 2010 Panasas, Inc. > - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. > + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. > + * Copyright (c) 2015 Fran??ois Tigeot > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > @@ -32,4 +33,14 @@ > #define get_user(_x, _p) -copyin((_p), &(_x), sizeof(*(_p))) > #define put_user(_x, _p) -copyout(&(_x), (_p), sizeof(*(_p))) > > +static inline void pagefault_disable(void) > +{ > + curthread_pflags_set(TDP_NOFAULTING | TDP_RESETSPUR); > +} > + > +static inline void pagefault_enable(void) > +{ > + curthread_pflags_restore(~(TDP_NOFAULTING | TDP_RESETSPUR)); > +} > + > #endif /* _LINUX_UACCESS_H_ */ This is wrong on many counts. First, we already provide the wrappers to implement the nofaulting behaviour, see vm_fault_disable_pagefaults() and vm_fault_enable_pagefaults(). Second, your implementation ignores possible recursion on the state, unconditionally re-enabling faulting, and more seriously, it unconditionally obliterates the spurious faults tracker. The return value from vm_fault_disable_pagefaults() is there for the reason, and if Linux KPI does not have a place to store the state, some replacement must be implemented instead of silently corrupting the flags on enable. From owner-svn-src-all@freebsd.org Mon Oct 19 15:06: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 8648EA19F1B; Mon, 19 Oct 2015 15:06:23 +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 4C7A761F; Mon, 19 Oct 2015 15:06:22 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id BB5A81FE023; Mon, 19 Oct 2015 17:06:19 +0200 (CEST) Subject: Re: svn commit: r289565 - head/sys/ofed/include/linux To: Konstantin Belousov References: <201510191056.t9JAuWhF052021@repo.freebsd.org> <20151019150130.GK2257@kib.kiev.ua> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <56250752.5030007@selasky.org> Date: Mon, 19 Oct 2015 17:08:02 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151019150130.GK2257@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; 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, 19 Oct 2015 15:06:23 -0000 On 10/19/15 17:01, Konstantin Belousov wrote: > On Mon, Oct 19, 2015 at 10:56:32AM +0000, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Mon Oct 19 10:56:32 2015 >> New Revision: 289565 >> URL: https://svnweb.freebsd.org/changeset/base/289565 >> >> Log: >> Merge LinuxKPI changes from DragonflyBSD: >> - Implement pagefault_disable() and pagefault_enable(). >> >> Sponsored by: Mellanox Technologies >> >> Modified: >> head/sys/ofed/include/linux/uaccess.h >> >> Modified: head/sys/ofed/include/linux/uaccess.h >> ============================================================================== >> --- head/sys/ofed/include/linux/uaccess.h Mon Oct 19 10:54:24 2015 (r289564) >> +++ head/sys/ofed/include/linux/uaccess.h Mon Oct 19 10:56:32 2015 (r289565) >> @@ -2,7 +2,8 @@ >> * Copyright (c) 2010 Isilon Systems, Inc. >> * Copyright (c) 2010 iX Systems, Inc. >> * Copyright (c) 2010 Panasas, Inc. >> - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. >> + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. >> + * Copyright (c) 2015 Fran??ois Tigeot >> * All rights reserved. >> * >> * Redistribution and use in source and binary forms, with or without >> @@ -32,4 +33,14 @@ >> #define get_user(_x, _p) -copyin((_p), &(_x), sizeof(*(_p))) >> #define put_user(_x, _p) -copyout(&(_x), (_p), sizeof(*(_p))) >> >> +static inline void pagefault_disable(void) >> +{ >> + curthread_pflags_set(TDP_NOFAULTING | TDP_RESETSPUR); >> +} >> + >> +static inline void pagefault_enable(void) >> +{ >> + curthread_pflags_restore(~(TDP_NOFAULTING | TDP_RESETSPUR)); >> +} >> + >> #endif /* _LINUX_UACCESS_H_ */ > > This is wrong on many counts. First, we already provide the wrappers to > implement the nofaulting behaviour, see vm_fault_disable_pagefaults() > and vm_fault_enable_pagefaults(). > > Second, your implementation ignores possible recursion on the > state, unconditionally re-enabling faulting, and more seriously, it > unconditionally obliterates the spurious faults tracker. > > The return value from vm_fault_disable_pagefaults() is there for the reason, > and if Linux KPI does not have a place to store the state, some replacement > must be implemented instead of silently corrupting the flags on enable. > Hi Konstantin, Thank you for you input. I'll update these functions according to your suggestion. We can have a return value, even if Linux doesn't. It doesn't have to be exactly the same and then I can set a compiler attribute that the return value must be checked. --HPS From owner-svn-src-all@freebsd.org Mon Oct 19 15:34: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 B1F65A195D2; Mon, 19 Oct 2015 15:34:25 +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 7D57B14D2; Mon, 19 Oct 2015 15:34:25 +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 t9JFYO7u038417; Mon, 19 Oct 2015 15:34:24 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JFYO2e038416; Mon, 19 Oct 2015 15:34:24 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201510191534.t9JFYO2e038416@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: Mon, 19 Oct 2015 15:34:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289591 - head/sys/dev/xen/netfront X-SVN-Group: head MIME-Version: 1.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, 19 Oct 2015 15:34:25 -0000 Author: royger Date: Mon Oct 19 15:34:24 2015 New Revision: 289591 URL: https://svnweb.freebsd.org/changeset/base/289591 Log: xen-netfront: use "netfront" in lock description Missed from r289585. Submitted by: Wei Liu Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3937 Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Mon Oct 19 14:48:31 2015 (r289590) +++ head/sys/dev/xen/netfront/netfront.c Mon Oct 19 15:34:24 2015 (r289591) @@ -1853,8 +1853,8 @@ create_netdev(device_t dev) np->xbdev = dev; - mtx_init(&np->tx_lock, "xntx", "network transmit lock", MTX_DEF); - mtx_init(&np->rx_lock, "xnrx", "network receive lock", MTX_DEF); + mtx_init(&np->tx_lock, "xntx", "netfront transmit lock", MTX_DEF); + mtx_init(&np->rx_lock, "xnrx", "netfront receive lock", MTX_DEF); mtx_init(&np->sc_lock, "xnsc", "netfront softc lock", MTX_DEF); ifmedia_init(&np->sc_media, 0, xn_ifmedia_upd, xn_ifmedia_sts); From owner-svn-src-all@freebsd.org Mon Oct 19 15:57: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 215A2A19C7A; Mon, 19 Oct 2015 15:57:01 +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 DCC16160; Mon, 19 Oct 2015 15:57:00 +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 t9JFuxYV044227; Mon, 19 Oct 2015 15:56:59 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JFuxX4044226; Mon, 19 Oct 2015 15:56:59 GMT (envelope-from des@FreeBSD.org) Message-Id: <201510191556.t9JFuxX4044226@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, 19 Oct 2015 15:56:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289592 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.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, 19 Oct 2015 15:57:01 -0000 Author: des Date: Mon Oct 19 15:56:59 2015 New Revision: 289592 URL: https://svnweb.freebsd.org/changeset/base/289592 Log: After starting Unbound, wait for up to five seconds until unbound-control indicates that it is up and running. PR: 184047 MFC after: 3 weeks Modified: head/etc/rc.d/local_unbound Modified: head/etc/rc.d/local_unbound ============================================================================== --- head/etc/rc.d/local_unbound Mon Oct 19 15:34:24 2015 (r289591) +++ head/etc/rc.d/local_unbound Mon Oct 19 15:56:59 2015 (r289592) @@ -17,6 +17,7 @@ rcvar="local_unbound_enable" command="/usr/sbin/unbound" extra_commands="anchor configtest reload setup" start_precmd="local_unbound_prestart" +start_postcmd="local_unbound_poststart" reload_precmd="local_unbound_configtest" anchor_cmd="local_unbound_anchor" configtest_cmd="local_unbound_configtest" @@ -90,5 +91,25 @@ local_unbound_prestart() fi } +# +# After starting, wait for Unbound to report that it is ready to avoid +# race conditions with services which require functioning DNS. +# +local_unbound_poststart() +{ + local retry=5 + + echo -n "Waiting for nameserver to start..." + until "${command}-control" status | grep -q "is running" ; do + if [ $((retry -= 1)) -eq 0 ] ; then + echo " giving up" + return 1 + fi + echo -n "." + sleep 1 + done + echo " good" +} + load_rc_config $name run_rc_command "$1" From owner-svn-src-all@freebsd.org Mon Oct 19 16:03: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 D9524A19E68; Mon, 19 Oct 2015 16:03:09 +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 A2ED18CA; Mon, 19 Oct 2015 16:03:09 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9JG38EA047013; Mon, 19 Oct 2015 16:03:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JG38Ub047012; Mon, 19 Oct 2015 16:03:08 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510191603.t9JG38Ub047012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Oct 2015 16:03:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289593 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 16:03:09 -0000 Author: hselasky Date: Mon Oct 19 16:03:08 2015 New Revision: 289593 URL: https://svnweb.freebsd.org/changeset/base/289593 Log: The returned value from vm_fault_disable_pagefaults() must be stored and passed to vm_fault_enable_pagefaults(). Else possible recursion on the state can be lost. Sponsored by: Mellanox Technologies Suggested by: kib @ Modified: head/sys/ofed/include/linux/uaccess.h Modified: head/sys/ofed/include/linux/uaccess.h ============================================================================== --- head/sys/ofed/include/linux/uaccess.h Mon Oct 19 15:56:59 2015 (r289592) +++ head/sys/ofed/include/linux/uaccess.h Mon Oct 19 16:03:08 2015 (r289593) @@ -30,17 +30,26 @@ #ifndef _LINUX_UACCESS_H_ #define _LINUX_UACCESS_H_ +#include + #define get_user(_x, _p) -copyin((_p), &(_x), sizeof(*(_p))) #define put_user(_x, _p) -copyout(&(_x), (_p), sizeof(*(_p))) -static inline void pagefault_disable(void) +/* + * NOTE: The returned value from pagefault_disable() must be stored + * and passed to pagefault_enable(). Else possible recursion on the + * state can be lost. + */ +static inline int __must_check +pagefault_disable(void) { - curthread_pflags_set(TDP_NOFAULTING | TDP_RESETSPUR); + return (vm_fault_disable_pagefaults()); } -static inline void pagefault_enable(void) +static inline void +pagefault_enable(int save) { - curthread_pflags_restore(~(TDP_NOFAULTING | TDP_RESETSPUR)); + vm_fault_enable_pagefaults(save); } #endif /* _LINUX_UACCESS_H_ */ From owner-svn-src-all@freebsd.org Mon Oct 19 16:08: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 F2DF6A19FB9; Mon, 19 Oct 2015 16:08:40 +0000 (UTC) (envelope-from jean-sebastien.pedron@dumbbell.fr) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA9D9BA2; Mon, 19 Oct 2015 16:08:40 +0000 (UTC) (envelope-from jean-sebastien.pedron@dumbbell.fr) Received: from 141.7.19.93.rev.sfr.net ([93.19.7.141] helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85 (FreeBSD)) (envelope-from ) id 1ZoCzG-000K3X-60; Mon, 19 Oct 2015 18:08:38 +0200 Subject: Re: svn commit: r289565 - head/sys/ofed/include/linux To: Hans Petter Selasky , Konstantin Belousov References: <201510191056.t9JAuWhF052021@repo.freebsd.org> <20151019150130.GK2257@kib.kiev.ua> <56250752.5030007@selasky.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= X-Enigmail-Draft-Status: N1110 Message-ID: <56251580.10907@dumbbell.fr> Date: Mon, 19 Oct 2015 18:08:32 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56250752.5030007@selasky.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="JpK9XquJoTafJjUEawQBni4UISTFCFgGD" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 16:08:41 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --JpK9XquJoTafJjUEawQBni4UISTFCFgGD Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 19.10.2015 17:08, Hans Petter Selasky wrote: > On 10/19/15 17:01, Konstantin Belousov wrote: >> This is wrong on many counts. First, we already provide the wrappers = to >> implement the nofaulting behaviour, see vm_fault_disable_pagefaults() >> and vm_fault_enable_pagefaults(). >> >> Second, your implementation ignores possible recursion on the >> state, unconditionally re-enabling faulting, and more seriously, it >> unconditionally obliterates the spurious faults tracker. >> >> The return value from vm_fault_disable_pagefaults() is there for the >> reason, >> and if Linux KPI does not have a place to store the state, some >> replacement >> must be implemented instead of silently corrupting the flags on enable= =2E >=20 > Hi Konstantin, >=20 > Thank you for you input. I'll update these functions according to your > suggestion. We can have a return value, even if Linux doesn't. It > doesn't have to be exactly the same and then I can set a compiler > attribute that the return value must be checked. Hi! I believe we should not try to completely "hide" FreeBSD at all cost when both KPIs do not match. If we can't implement the Linux behaviour, I think we should not modify the Linux KPI but instead use the native FreeBSD function. If we change the Linux KPI in a way which requires a change in the consumers, consumers will have a diff with Linux original code anyway, so let's use the native function and make the difference in KPI/behaviour explicit. To me, the goal of this shim is to reduce the diff with Linux in consumers, not eliminate it. --=20 Jean-S=E9bastien P=E9dron --JpK9XquJoTafJjUEawQBni4UISTFCFgGD 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 iQJ8BAEBCgBmBQJWJRWFXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NzA4N0ZEMUFFQUUwRTEyREJDNkE2RjAz OUU5OTc2MUE1RkQ5NENDAAoJEDnpl2Gl/ZTM6aYQAKZkM2ik6SDXHn6++oHtih77 92iGj7qA3PXwH4T7yInGJwX1RMyP5KhuEDLepEG9pSqS0Cc01/le3SZpj0t5yaOK qU071Ih23ICtREEos7Rq5l61D+QPAD76vXw5w5p5VTkIj2LAY3vDGXLDqN3eCzf5 gBhedlTLV2t4l0o/XO+Dv2ln3rE/WnrWeaX0worVuGk33TB8faPdPs0dNiqQg5t4 m7OOpOTgmc9gktVmIrKVSuZg5iGRVCS7CD6SEmL/ajxaCvA1zn0ua8+7uRs794q1 iTKMK/xxBufm3278VwkvwDDE1+9ajHybuyB+PBb10GcUJEfWy4u6FP9f42rIhDvx rNXN9lb51adbjlCRohiKkoAvtLP3SQ/w3Am/up6gfFJ3AcXMhotAb8AdrRyeO0BV VbgXnxnzjkGpH3WHSluHHwbUgkG5/G/cbxc0SsU/yemMBObSpJUHMCuEuFGgUDU5 iNC2Y9tKs9OPG8vuWeffjcsr8JR1d36VHqqNPrWBODcP0stUggK4xOSQcQS6ZKN1 /josVTGmdxb0ZK6dAiRzYtFMoWlW1odEO5rjP+PiXgP80ABAsWrMr3M4q/rma8JY qOhQA1Q3qhhvxNvu9yK61Y/67HiV9ZVjJh9hAxvqTQB3UfNuq3AH67SM8L33PIar wJ4BHL3jmadYPYOnJRZF =bFUl -----END PGP SIGNATURE----- --JpK9XquJoTafJjUEawQBni4UISTFCFgGD-- From owner-svn-src-all@freebsd.org Mon Oct 19 16:25: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 AD139A106AE; Mon, 19 Oct 2015 16:25:42 +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 75122188E; Mon, 19 Oct 2015 16:25: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 t9JGPfSw053051; Mon, 19 Oct 2015 16:25:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JGPfoB053050; Mon, 19 Oct 2015 16:25:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510191625.t9JGPfoB053050@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Oct 2015 16:25:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289594 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 16:25:42 -0000 Author: hselasky Date: Mon Oct 19 16:25:41 2015 New Revision: 289594 URL: https://svnweb.freebsd.org/changeset/base/289594 Log: Bump the __FreeBSD_version to reflect the recent Linux KPI updates. Sponsored by: Mellanox Technologies Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon Oct 19 16:03:08 2015 (r289593) +++ head/sys/sys/param.h Mon Oct 19 16:25:41 2015 (r289594) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100081 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100082 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Mon Oct 19 16:50: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 78882A1802A; Mon, 19 Oct 2015 16:50:58 +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 05466A3F; Mon, 19 Oct 2015 16:50:57 +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 t9JGooMh083532 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 19 Oct 2015 19:50:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua t9JGooMh083532 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id t9JGonHa083525; Mon, 19 Oct 2015 19:50:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 19 Oct 2015 19:50:49 +0300 From: Konstantin Belousov To: Bruce Evans Cc: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289332 - head/tools/regression/lib/msun Message-ID: <20151019165049.GM2257@kib.kiev.ua> References: <201510142022.t9EKMC1C088993@repo.freebsd.org> <20151015072039.GY2257@kib.kiev.ua> <20151015200157.I2174@besplex.bde.org> <20151017130907.GZ2257@kib.kiev.ua> <20151018032945.S2131@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151018032945.S2131@besplex.bde.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: Mon, 19 Oct 2015 16:50:58 -0000 On Sun, Oct 18, 2015 at 04:42:04AM +1100, Bruce Evans wrote: > On Sat, 17 Oct 2015, Konstantin Belousov wrote: > > > On Thu, Oct 15, 2015 at 10:12:03PM +1100, Bruce Evans wrote: > >> On Thu, 15 Oct 2015, Konstantin Belousov wrote: > >> > >>> On Wed, Oct 14, 2015 at 08:22:12PM +0000, Garrett Cooper wrote: > >>>> Author: ngie > >>>> Date: Wed Oct 14 20:22:12 2015 > >>>> New Revision: 289332 > >>>> URL: https://svnweb.freebsd.org/changeset/base/289332 > >>>> > >>>> Log: > >>>> Fix test-fenv:test_dfl_env when run on some amd64 CPUs > >>>> > >>>> Compare the fields that the AMD [1] and Intel [2] specs say will be > >>>> set once fnstenv returns. > >>>> > >>>> Not all amd64 capable processors zero out the env.__x87.__other field > >>>> (example: AMD Opteron 6308). The AMD64/x64 specs aren't explicit on what the > >>>> env.__x87.__other field will contain after fnstenv is executed, so the values > >>>> in env.__x87.__other could be filled with arbitrary data depending on how the > >>>> CPU-specific implementation of fnstenv. > >>> No Intel or AMD CPU write to __other field at all. > >> > >> No, they all do. > >> > >> Test on old i386 on old A64: > >> ... > > No, I did not thought about fegetenv() as executing FXSAVE instruction. > > I did knew that fegetenv() is a wrapper around FNSAVE, and I was completely > > sure that FNSAVE in the long mode, when executed by a 64bit program, > > never writes anything into the %eip/data offset portion of the FNSAVE > > area. I suspect that this was motivated by unavoidable 32-bitness of > > the store format. > > fegetenv() is actually a wrapper around FNSTENV, and FNSTENV is a subset > of FNSAVE. Yes, it was a thinko, which in fact does not change the relevant considerations. > > > I was unable to find a reference in either Intel SDM or in AMD APM which > > would support my statement. The closest thing is the claim that the FOP > > field is not filled, in the SDM. Still, I wonder how things are really > > arranged by hardware for FNSAVE in 64bit mode. > > Let's check FOP below. > > > Are your experiments below were done for the 32bit programs, or for 64bit ? > > Both FXSAVE and XSAVE area formats and rules would be irrelevant for the > > FreeBSD ABI. > > For amd64, I used the freefall default which I think is long mode, but > there is some magic for the pointer size (small model?) I am not sure I follow. Freefall is the native amd64 installation, and its userspace is 64bit. So the CPU is in long mode both in kernel and for the default userspace. > > BTW, -m32 has been broken on freefall for years. At least libgcc.a is > incompatible or not installed. What command line do you use, exactly ? Note that cc -m32 -static is not supported right now and probably would not be supported at all. > > >> ... > >> Modified state for fegetenv(): > >> X 0000005C 7F 12 00 00 00 00 80 1F FF FF FF FF 63 82 04 08 > >> --cw- -mxhi --sw- -mxlo --tw- -pad- ----fip---- > >> ----------------- > >> X 0000006C 1F 00 1D 05 A0 92 04 08 2F 00 FF FF > >> -fcs- -opc- ----foff--- -fds- -pad- > >> ----other[16]---------------------- > > FOP (opc) is clearly filled on i386 (32-bit mode). Which CPU is this ? Please look at the the Intel' SDM vol 1 8.1.9 Fopcode Compatibility Sub-Mode, which basically states that FOP is not filled starting with Core2. > > >> ... > >> Test on -current amd64 on Xeon (freefall): > >> ... > >> Later fegetenv(): > >> X 00000060 7f 03 ff ff 00 00 ff ff ff ff ff ff 75 08 40 00 > >> X 00000070 43 00 1c 05 20 62 60 00 3b 00 ff ff 80 1f 00 00 > > FOP is filled to 1c 05 on freefall and to 1D 05 on my old i386. But the > instruction is the same (fstpl). The difference is a different encoding > of the direct address mode. > > Futher testing: > > Only small model seems to be supported. I got relocation errors with > messages about R_X86_64_32S for an array of size 4G. Do you mean that -mcmodel=medium or large does not work ? > > malloc() works to allocate arrays larger than 4G. Writing to addresses > above 4G in such arrays or on the stack never gave 64-bit offsets. > It truncated the offsets to 32 bits and still printed the segment > register. Please show exact transcript of the session. From owner-svn-src-all@freebsd.org Mon Oct 19 17:31: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 C84C8A18B84; Mon, 19 Oct 2015 17:31:52 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96658171; Mon, 19 Oct 2015 17:31:52 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9JHVpC8071769; Mon, 19 Oct 2015 17:31:51 GMT (envelope-from antoine@FreeBSD.org) Received: (from antoine@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JHVp2s071768; Mon, 19 Oct 2015 17:31:51 GMT (envelope-from antoine@FreeBSD.org) Message-Id: <201510191731.t9JHVp2s071768@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: antoine set sender to antoine@FreeBSD.org using -f From: Antoine Brodin Date: Mon, 19 Oct 2015 17:31:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289595 - 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, 19 Oct 2015 17:31:52 -0000 Author: antoine Date: Mon Oct 19 17:31:51 2015 New Revision: 289595 URL: https://svnweb.freebsd.org/changeset/base/289595 Log: Add more obsolete files Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Oct 19 16:25:41 2015 (r289594) +++ head/ObsoleteFiles.inc Mon Oct 19 17:31:51 2015 (r289595) @@ -444,6 +444,8 @@ OLD_DIRS+=usr/share/doc/legal/intel_wpi OLD_FILES+=usr/share/doc/legal/intel_wpi/LICENSE # 20151006: new libc++ import OLD_FILES+=usr/include/c++/__tuple_03 +OLD_FILES+=usr/include/c++/v1/__tuple_03 +OLD_FILES+=usr/include/c++/v1/tr1/__tuple_03 # 20151006: new clang import which bumps version from 3.6.1 to 3.7.0. OLD_FILES+=usr/lib/clang/3.6.1/include/__stddef_max_align_t.h OLD_FILES+=usr/lib/clang/3.6.1/include/__wmmintrin_aes.h @@ -530,11 +532,16 @@ OLD_FILES+=usr/share/man/man4/dtrace-pro OLD_FILES+=usr/share/man/man4/dtrace-sched.4.gz OLD_FILES+=usr/share/man/man4/dtrace-tcp.4.gz OLD_FILES+=usr/share/man/man4/dtrace-udp.4.gz +# 20150704: nvlist private headers no longer installed +OLD_FILES+=usr/include/sys/nv_impl.h +OLD_FILES+=usr/include/sys/nvlist_impl.h +OLD_FILES+=usr/include/sys/nvpair_impl.h # 20150624 OLD_LIBS+=usr/lib/libugidfw.so.4 OLD_LIBS+=usr/lib32/libugidfw.so.4 # 20150604: Move nvlist man pages to section 9. OLD_FILES+=usr/share/man/man3/libnv.3.gz +OLD_FILES+=usr/share/man/man3/nv.3.gz OLD_FILES+=usr/share/man/man3/nvlist.3.gz OLD_FILES+=usr/share/man/man3/nvlist_add_binary.3.gz OLD_FILES+=usr/share/man/man3/nvlist_add_bool.3.gz From owner-svn-src-all@freebsd.org Mon Oct 19 17:41: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 37396A18D76; Mon, 19 Oct 2015 17:41:24 +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 F25A1902; Mon, 19 Oct 2015 17:41:23 +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 t9JHfM1X074044; Mon, 19 Oct 2015 17:41:22 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JHfMgC074043; Mon, 19 Oct 2015 17:41:22 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510191741.t9JHfMgC074043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Mon, 19 Oct 2015 17:41:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289596 - 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: Mon, 19 Oct 2015 17:41:24 -0000 Author: cem Date: Mon Oct 19 17:41:22 2015 New Revision: 289596 URL: https://svnweb.freebsd.org/changeset/base/289596 Log: NTB: Add ntb_mw_clear_trans() missed in r289546 It is just a trivial wrapper around ntb_mw_set_trans(). Authored by: Allen Hubbe Obtained from: Linux (Dual BSD/GPL driver) 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 Mon Oct 19 17:31:51 2015 (r289595) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Mon Oct 19 17:41:22 2015 (r289596) @@ -2117,6 +2117,23 @@ ntb_mw_set_trans(struct ntb_softc *ntb, return (0); } +/* + * ntb_mw_clear_trans() - clear the translation of a memory window + * @ntb: NTB device context + * @idx: Memory window number + * + * Clear the translation of a memory window. The peer may no longer access + * local memory through the window. + * + * Return: Zero on success, otherwise an error number. + */ +int +ntb_mw_clear_trans(struct ntb_softc *ntb, unsigned mw_idx) +{ + + return (ntb_mw_set_trans(ntb, mw_idx, 0, 0)); +} + /** * ntb_peer_db_set() - Set the doorbell on the secondary/external side * @ntb: pointer to ntb_softc instance From owner-svn-src-all@freebsd.org Mon Oct 19 17:53: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 223B1A19093; Mon, 19 Oct 2015 17:53:22 +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 E2DDBF0C; Mon, 19 Oct 2015 17:53:21 +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 t9JHrL2f080515; Mon, 19 Oct 2015 17:53:21 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JHrK4l080514; Mon, 19 Oct 2015 17:53:20 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510191753.t9JHrK4l080514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Mon, 19 Oct 2015 17:53:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289597 - 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: Mon, 19 Oct 2015 17:53:22 -0000 Author: cem Date: Mon Oct 19 17:53:20 2015 New Revision: 289597 URL: https://svnweb.freebsd.org/changeset/base/289597 Log: NTB: Add ntb_db_valid_mask() missed in r289546 Another trivial one. Pointy-hat: cem Obtained from: Linux (Dual BSD/GPL driver) 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 Mon Oct 19 17:41:22 2015 (r289596) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Mon Oct 19 17:53:20 2015 (r289597) @@ -2192,6 +2192,21 @@ ntb_get_peer_db_addr(struct ntb_softc *n return ((uint64_t)bar->pci_bus_handle + regoff); } +/* + * ntb_db_valid_mask() - get a mask of doorbell bits supported by the ntb + * @ntb: NTB device context + * + * Hardware may support different number or arrangement of doorbell bits. + * + * Return: A mask of doorbell bits supported by the ntb. + */ +uint64_t +ntb_db_valid_mask(struct ntb_softc *ntb) +{ + + return (ntb->db_valid_mask); +} + /** * ntb_link_is_up() - get the current ntb link state * @ntb: NTB device context From owner-svn-src-all@freebsd.org Mon Oct 19 18:06: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 439A4A19432; Mon, 19 Oct 2015 18:06:37 +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 1D3A2186A; Mon, 19 Oct 2015 18:06:37 +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 t9JI6aI7085343; Mon, 19 Oct 2015 18:06:36 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JI6ZwX085340; Mon, 19 Oct 2015 18:06:35 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510191806.t9JI6ZwX085340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Mon, 19 Oct 2015 18:06:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289598 - in head/sys/dev/ntb: if_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: Mon, 19 Oct 2015 18:06:37 -0000 Author: cem Date: Mon Oct 19 18:06:35 2015 New Revision: 289598 URL: https://svnweb.freebsd.org/changeset/base/289598 Log: NTB: Add ntb_db_vector_mask() missed in r289546 This is the last one. Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_hw.h Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Mon Oct 19 17:53:20 2015 (r289597) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Mon Oct 19 18:06:35 2015 (r289598) @@ -290,7 +290,7 @@ static int ntb_process_rxc(struct ntb_tr static void ntb_rx_copy_task(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry, void *offset); static void ntb_complete_rxc(void *arg, int pending); -static void ntb_transport_doorbell_callback(void *data, int vector); +static void ntb_transport_doorbell_callback(void *data, uint32_t vector); static void ntb_transport_event_callback(void *data); static void ntb_transport_link_work(void *arg); static int ntb_set_mw(struct ntb_transport_ctx *, int num_mw, unsigned size); @@ -1122,7 +1122,7 @@ ntb_complete_rxc(void *arg, int pending) } static void -ntb_transport_doorbell_callback(void *data, int vector) +ntb_transport_doorbell_callback(void *data, uint32_t vector) { struct ntb_transport_ctx *nt = data; struct ntb_transport_qp *qp; Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Mon Oct 19 17:53:20 2015 (r289597) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Mon Oct 19 18:06:35 2015 (r289598) @@ -2207,6 +2207,24 @@ ntb_db_valid_mask(struct ntb_softc *ntb) return (ntb->db_valid_mask); } +/* + * ntb_db_vector_mask() - get a mask of doorbell bits serviced by a vector + * @ntb: NTB device context + * @vector: Doorbell vector number + * + * Each interrupt vector may have a different number or arrangement of bits. + * + * Return: A mask of doorbell bits serviced by a vector. + */ +uint64_t +ntb_db_vector_mask(struct ntb_softc *ntb, uint32_t vector) +{ + + if (vector > ntb->db_vec_count) + return (0); + return (ntb->db_valid_mask & ntb_vec_mask(ntb, vector)); +} + /** * ntb_link_is_up() - get the current ntb link state * @ntb: NTB device context Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.h Mon Oct 19 17:53:20 2015 (r289597) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.h Mon Oct 19 18:06:35 2015 (r289598) @@ -56,7 +56,7 @@ enum ntb_width { SYSCTL_DECL(_hw_ntb); -typedef void (*ntb_db_callback)(void *data, int vector); +typedef void (*ntb_db_callback)(void *data, uint32_t vector); typedef void (*ntb_event_callback)(void *data); struct ntb_ctx_ops { @@ -90,13 +90,13 @@ int ntb_peer_spad_read(struct ntb_softc uint32_t *val); uint64_t ntb_db_valid_mask(struct ntb_softc *); +uint64_t ntb_db_vector_mask(struct ntb_softc *, uint32_t vector); bus_addr_t ntb_get_peer_db_addr(struct ntb_softc *, vm_size_t *sz_out); void ntb_db_clear(struct ntb_softc *, uint64_t bits); void ntb_db_clear_mask(struct ntb_softc *, uint64_t bits); uint64_t ntb_db_read(struct ntb_softc *); void ntb_db_set_mask(struct ntb_softc *, uint64_t bits); -uint64_t ntb_db_vector_mask(struct ntb_softc *, int vector); void ntb_peer_db_set(struct ntb_softc *, uint64_t bits); /* Hardware owns the low 32 bits of features. */ From owner-svn-src-all@freebsd.org Mon Oct 19 18:29: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 D14A2A19909; Mon, 19 Oct 2015 18:29: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 818EA9AC; Mon, 19 Oct 2015 18:29:34 +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 t9JITWrR092082; Mon, 19 Oct 2015 18:29:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JITW06092081; Mon, 19 Oct 2015 18:29:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510191829.t9JITW06092081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 19 Oct 2015 18:29:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289600 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.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, 19 Oct 2015 18:29:34 -0000 Author: ngie Date: Mon Oct 19 18:29:32 2015 New Revision: 289600 URL: https://svnweb.freebsd.org/changeset/base/289600 Log: Initialize `quiet` to false so `pw groupnext` again prints out the next gid by default Reported by: Florian Degner MFC after: 1 week PR: 203876 Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/pw/pw_group.c Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Mon Oct 19 18:29:17 2015 (r289599) +++ head/usr.sbin/pw/pw_group.c Mon Oct 19 18:29:32 2015 (r289600) @@ -259,7 +259,7 @@ pw_group_next(int argc, char **argv, cha struct userconf *cnf; const char *cfg = NULL; int ch; - bool quiet; + bool quiet = false; while ((ch = getopt(argc, argv, "Cq")) != -1) { switch (ch) { From owner-svn-src-all@freebsd.org Mon Oct 19 18:45: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 E86C2A19E28; Mon, 19 Oct 2015 18:45: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 9933C150B; Mon, 19 Oct 2015 18:45: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 t9JIjE1s098035; Mon, 19 Oct 2015 18:45:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JIjE1O098034; Mon, 19 Oct 2015 18:45:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510191845.t9JIjE1O098034@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 19 Oct 2015 18:45:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289601 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 18:45:16 -0000 Author: ngie Date: Mon Oct 19 18:45:14 2015 New Revision: 289601 URL: https://svnweb.freebsd.org/changeset/base/289601 Log: Don't check if `val` is NULL before calling free; free(3) already handles this MFC after: 1 week PR: 203649 Submitted by: Thomas Schmitt Coverity CID: 1305659 Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/makefs/cd9660.c Modified: head/usr.sbin/makefs/cd9660.c ============================================================================== --- head/usr.sbin/makefs/cd9660.c Mon Oct 19 18:29:32 2015 (r289600) +++ head/usr.sbin/makefs/cd9660.c Mon Oct 19 18:45:14 2015 (r289601) @@ -428,8 +428,7 @@ cd9660_parse_opts(const char *option, fs rv = set_option(cd9660_options, var, val); } - if (var) - free(var); + free(var); return (rv); } From owner-svn-src-all@freebsd.org Mon Oct 19 19:18: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 DF9F9A1969E; Mon, 19 Oct 2015 19:18:03 +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 B48D26DC; Mon, 19 Oct 2015 19:18:03 +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 t9JJI2de006704; Mon, 19 Oct 2015 19:18:02 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JJI2eB006699; Mon, 19 Oct 2015 19:18:02 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510191918.t9JJI2eB006699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 19 Oct 2015 19:18:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289602 - 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: Mon, 19 Oct 2015 19:18:04 -0000 Author: ian Date: Mon Oct 19 19:18:02 2015 New Revision: 289602 URL: https://svnweb.freebsd.org/changeset/base/289602 Log: Set the correct values in the arm aux control register, based on chip type. The bits in the aux control register vary based on the processor type. In the past we've always just set the 'smp' and "broadcast tlb/cache ops' bits, which worked fine for the first few SoCs we supported. Now that we support most of the cortex-a series processors, it's important to get the right bits set based on the processor type. Submitted by: Svatopluk Kraus Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/cpuinfo.c head/sys/arm/arm/mp_machdep.c head/sys/arm/arm/pmap-v6-new.c head/sys/arm/include/cpuinfo.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Mon Oct 19 18:45:14 2015 (r289601) +++ head/sys/arm/arm/cpufunc.c Mon Oct 19 19:18:02 2015 (r289602) @@ -1294,7 +1294,7 @@ cortexa_setup(void) /* And again. */ cpu_idcache_wbinv_all(); -#ifdef SMP +#if defined(SMP) && !defined(ARM_NEW_PMAP) armv7_auxctrl((1 << 6) | (1 << 0), (1 << 6) | (1 << 0)); /* Enable SMP + TLB broadcasting */ #endif Modified: head/sys/arm/arm/cpuinfo.c ============================================================================== --- head/sys/arm/arm/cpuinfo.c Mon Oct 19 18:45:14 2015 (r289601) +++ head/sys/arm/arm/cpuinfo.c Mon Oct 19 19:18:02 2015 (r289602) @@ -145,3 +145,82 @@ cpuinfo_init(void) cpuinfo.dcache_line_mask = cpuinfo.dcache_line_size - 1; cpuinfo.icache_line_mask = cpuinfo.icache_line_size - 1; } + +/* + * Get bits that must be set or cleared in ACLR register. + * Note: Bits in ACLR register are IMPLEMENTATION DEFINED. + * Its expected that SCU is in operational state before this + * function is called. + */ +void +cpuinfo_get_actlr_modifier(uint32_t *actlr_mask, uint32_t *actlr_set) +{ + *actlr_mask = 0; + *actlr_set = 0; + + if (cpuinfo.implementer == CPU_IMPLEMENTER_ARM) { + switch (cpuinfo.part_number) { + + case CPU_ARCH_CORTEX_A17: + case CPU_ARCH_CORTEX_A12: /* A12 is merged to A17 */ + /* + * Enable SMP mode + */ + *actlr_mask = (1 << 6); + *actlr_set = (1 << 6); + break; + case CPU_ARCH_CORTEX_A15: + /* + * Enable snoop-delayed exclusive handling + * Enable SMP mode + */ + *actlr_mask = (1U << 31) |(1 << 6); + *actlr_set = (1U << 31) |(1 << 6); + break; + case CPU_ARCH_CORTEX_A9: + /* + * Disable exclusive L1/L2 cache control + * Enable SMP mode + * Enable Cache and TLB maintenance broadcast + */ + *actlr_mask = (1 << 7) | (1 << 6) | (1 << 0); + *actlr_set = (1 << 6) | (1 << 0); + break; + case CPU_ARCH_CORTEX_A8: + /* + * Enable L2 cache + * Enable L1 data cache hardware alias checks + */ + *actlr_mask = (1 << 1) | (1 << 0); + *actlr_set = (1 << 1); + break; + case CPU_ARCH_CORTEX_A7: + /* + * Enable SMP mode + */ + *actlr_mask = (1 << 6); + *actlr_set = (1 << 6); + break; + case CPU_ARCH_CORTEX_A5: + /* + * Disable exclusive L1/L2 cache control + * Enable SMP mode + * Enable Cache and TLB maintenance broadcast + */ + *actlr_mask = (1 << 7) | (1 << 6) | (1 << 0); + *actlr_set = (1 << 6) | (1 << 0); + break; + case CPU_ARCH_ARM1176: + /* + * Restrict cache size to 16KB + * Enable the return stack + * Enable dynamic branch prediction + * Enable static branch prediction + */ + *actlr_mask = (1 << 6) | (1 << 2) | (1 << 1) | (1 << 0); + *actlr_set = (1 << 6) | (1 << 2) | (1 << 1) | (1 << 0); + break; + } + return; + } +} Modified: head/sys/arm/arm/mp_machdep.c ============================================================================== --- head/sys/arm/arm/mp_machdep.c Mon Oct 19 18:45:14 2015 (r289601) +++ head/sys/arm/arm/mp_machdep.c Mon Oct 19 19:18:02 2015 (r289602) @@ -154,10 +154,12 @@ init_secondary(int cpu) #ifndef ARM_INTRNG int start = 0, end = 0; #endif - #ifdef ARM_NEW_PMAP + uint32_t actlr_mask, actlr_set; + pmap_set_tex(); - reinit_mmu(pmap_kern_ttb, (1<<6) | (1<< 0), (1<<6) | (1<< 0)); + cpuinfo_get_actlr_modifier(&actlr_mask, &actlr_set); + reinit_mmu(pmap_kern_ttb, actlr_mask, actlr_set); cpu_setup(); /* Provide stack pointers for other processor modes. */ Modified: head/sys/arm/arm/pmap-v6-new.c ============================================================================== --- head/sys/arm/arm/pmap-v6-new.c Mon Oct 19 18:45:14 2015 (r289601) +++ head/sys/arm/arm/pmap-v6-new.c Mon Oct 19 19:18:02 2015 (r289602) @@ -713,6 +713,7 @@ pmap_bootstrap_prepare(vm_paddr_t last) pt1_entry_t *pte1p; pt2_entry_t *pte2p; u_int i; + uint32_t actlr_mask, actlr_set; /* * Now, we are going to make real kernel mapping. Note that we are @@ -829,8 +830,8 @@ pmap_bootstrap_prepare(vm_paddr_t last) /* Finally, switch from 'boot_pt1' to 'kern_pt1'. */ pmap_kern_ttb = base_pt1 | ttb_flags; - reinit_mmu(pmap_kern_ttb, (1 << 6) | (1 << 0), (1 << 6) | (1 << 0)); - + cpuinfo_get_actlr_modifier(&actlr_mask, &actlr_set); + reinit_mmu(pmap_kern_ttb, actlr_mask, actlr_set); /* * Initialize the first available KVA. As kernel image is mapped by * sections, we are leaving some gap behind. Modified: head/sys/arm/include/cpuinfo.h ============================================================================== --- head/sys/arm/include/cpuinfo.h Mon Oct 19 18:45:14 2015 (r289601) +++ head/sys/arm/include/cpuinfo.h Mon Oct 19 19:18:02 2015 (r289602) @@ -32,6 +32,23 @@ #include +#define CPU_IMPLEMENTER_ARM 0x41 +#define CPU_IMPLEMENTER_QCOM 0x51 +#define CPU_IMPLEMENTER_MRVL 0x56 + +/* ARM */ +#define CPU_ARCH_ARM1176 0xB76 +#define CPU_ARCH_CORTEX_A5 0xC05 +#define CPU_ARCH_CORTEX_A7 0xC07 +#define CPU_ARCH_CORTEX_A8 0xC08 +#define CPU_ARCH_CORTEX_A9 0xC09 +#define CPU_ARCH_CORTEX_A12 0xC0D +#define CPU_ARCH_CORTEX_A15 0xC0F +#define CPU_ARCH_CORTEX_A17 0xC11 + +/* QCOM */ +#define CPU_ARCH_KRAIT_300 0x06F + struct cpuinfo { /* raw id registers */ uint32_t midr; @@ -93,5 +110,5 @@ struct cpuinfo { extern struct cpuinfo cpuinfo; void cpuinfo_init(void); - +void cpuinfo_get_actlr_modifier(uint32_t *actlr_mask, uint32_t *actlr_set); #endif /* _MACHINE_CPUINFO_H_ */ From owner-svn-src-all@freebsd.org Mon Oct 19 20:22: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 07880A19506; Mon, 19 Oct 2015 20:22:19 +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 B272A2A6; Mon, 19 Oct 2015 20:22:18 +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 t9JKMHAD033729; Mon, 19 Oct 2015 20:22:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JKMHjc033727; Mon, 19 Oct 2015 20:22:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510192022.t9JKMHjc033727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 19 Oct 2015 20:22:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289603 - 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, 19 Oct 2015 20:22:19 -0000 Author: kib Date: Mon Oct 19 20:22:17 2015 New Revision: 289603 URL: https://svnweb.freebsd.org/changeset/base/289603 Log: Add tests for the copyin(9) handling of illegal buffers. Reviewed by: emaste, ngie Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D3925 Added: head/tests/sys/kern/kern_copyin.c (contents, props changed) Modified: head/tests/sys/kern/Makefile Modified: head/tests/sys/kern/Makefile ============================================================================== --- head/tests/sys/kern/Makefile Mon Oct 19 19:18:02 2015 (r289602) +++ head/tests/sys/kern/Makefile Mon Oct 19 20:22:17 2015 (r289603) @@ -2,6 +2,7 @@ TESTSDIR= ${TESTSBASE}/sys/kern +ATF_TESTS_C+= kern_copyin ATF_TESTS_C+= kern_descrip_test ATF_TESTS_C+= ptrace_test ATF_TESTS_C+= unix_seqpacket_test Added: head/tests/sys/kern/kern_copyin.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/kern/kern_copyin.c Mon Oct 19 20:22:17 2015 (r289603) @@ -0,0 +1,86 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static int scratch_file; + +static int +copyin_checker(uintptr_t uaddr, size_t len) +{ + ssize_t ret; + + ret = write(scratch_file, (const void *)uaddr, len); + return (ret == -1 ? errno : 0); +} + +#define FMAX ULONG_MAX + +ATF_TC_WITHOUT_HEAD(kern_copyin); +ATF_TC_BODY(kern_copyin, tc) +{ + char template[] = "copyin.XXXXXX"; + + scratch_file = mkstemp(template); + ATF_REQUIRE(scratch_file != -1); + unlink(template); + + ATF_CHECK(copyin_checker(0, 0) == 0); + ATF_CHECK(copyin_checker(VM_MAXUSER_ADDRESS - 10, 9) == 0); + ATF_CHECK(copyin_checker(VM_MAXUSER_ADDRESS - 10, 10) == 0); + ATF_CHECK(copyin_checker(VM_MAXUSER_ADDRESS - 10, 11) == EFAULT); + ATF_CHECK(copyin_checker(VM_MAXUSER_ADDRESS - 1, 1) == 0); + ATF_CHECK(copyin_checker(VM_MAXUSER_ADDRESS, 0) == 0); + ATF_CHECK(copyin_checker(VM_MAXUSER_ADDRESS, 1) == EFAULT); + ATF_CHECK(copyin_checker(VM_MAXUSER_ADDRESS, 2) == EFAULT); + ATF_CHECK(copyin_checker(VM_MAXUSER_ADDRESS + 1, 0) == 0); + ATF_CHECK(copyin_checker(VM_MAXUSER_ADDRESS + 1, 2) == EFAULT); + ATF_CHECK(copyin_checker(FMAX - 10, 9) == EFAULT); + ATF_CHECK(copyin_checker(FMAX - 10, 10) == EFAULT); + ATF_CHECK(copyin_checker(FMAX - 10, 11) == EFAULT); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, kern_copyin); + return (atf_no_error()); +} From owner-svn-src-all@freebsd.org Mon Oct 19 21:06: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 9DD60A19319; Mon, 19 Oct 2015 21:06:31 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66600BBF; Mon, 19 Oct 2015 21:06:31 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9JL6UTP046463; Mon, 19 Oct 2015 21:06:30 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JL6U88046462; Mon, 19 Oct 2015 21:06:30 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510192106.t9JL6U88046462@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 19 Oct 2015 21:06:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289604 - head/usr.bin/getconf X-SVN-Group: head MIME-Version: 1.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, 19 Oct 2015 21:06:31 -0000 Author: bapt Date: Mon Oct 19 21:06:30 2015 New Revision: 289604 URL: https://svnweb.freebsd.org/changeset/base/289604 Log: getconf(1): Fix typo. _POSIX_V6_LP64_OFFBIG -> _POSIX_V6_LPBIG_OFFBIG. Submitted by: Sascha Wildner Obtained from: DragonflyBSD MFC after: 3 days Modified: head/usr.bin/getconf/sysconf.gperf Modified: head/usr.bin/getconf/sysconf.gperf ============================================================================== --- head/usr.bin/getconf/sysconf.gperf Mon Oct 19 20:22:17 2015 (r289603) +++ head/usr.bin/getconf/sysconf.gperf Mon Oct 19 21:06:30 2015 (r289604) @@ -121,7 +121,7 @@ _POSIX_VERSION, _SC_VERSION _POSIX_V6_ILP32_OFF32, _SC_V6_ILP32_OFF32 _POSIX_V6_ILP32_OFFBIG, _SC_V6_ILP32_OFFBIG _POSIX_V6_LP64_OFF64, _SC_V6_LP64_OFF64 -_POSIX_V6_LP64_OFFBIG, _SC_V6_LP64_OFFBIG +_POSIX_V6_LPBIG_OFFBIG, _SC_V6_LPBIG_OFFBIG _XOPEN_CRYPT, _SC_XOPEN_CRYPT _XOPEN_ENH_I18N, _SC_XOPEN_ENH_I18N _XOPEN_LEGACY, _SC_XOPEN_LEGACY From owner-svn-src-all@freebsd.org Mon Oct 19 21:30: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 AE7E7A19ACD; Mon, 19 Oct 2015 21:30:37 +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 89CD81950; Mon, 19 Oct 2015 21:30:37 +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 9F3F6B949; Mon, 19 Oct 2015 17:30:36 -0400 (EDT) From: John Baldwin To: Edward Tomasz =?utf-8?B?TmFwaWVyYcWCYQ==?= Cc: "Bjoern A. Zeeb" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287934 - head/sys/boot/efi/loader Date: Mon, 19 Oct 2015 11:25:49 -0700 Message-ID: <7461243.7D4jZgdzzK@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) In-Reply-To: <20151009175906.GA4501@brick.home> References: <201509172036.t8HKalKU088025@repo.freebsd.org> <1581085.vcsbvoROWY@ralph.baldwin.cx> <20151009175906.GA4501@brick.home> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 19 Oct 2015 17:30:36 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 21:30:37 -0000 On Friday, October 09, 2015 07:59:06 PM Edward Tomasz Napiera=C5=82a wr= ote: > On 0917T1630, John Baldwin wrote: > > On Thursday, September 17, 2015 10:30:15 PM Bjoern A. Zeeb wrote: > > >=20 > > > > On 17 Sep 2015, at 20:43 , John Baldwin wrote= : > > > >=20 > > > > On Thursday, September 17, 2015 08:36:47 PM John Baldwin wrote:= > > > >> Author: jhb > > > >> Date: Thu Sep 17 20:36:46 2015 > > > >> New Revision: 287934 > > > >> URL: https://svnweb.freebsd.org/changeset/base/287934 > > > >>=20 > > > >> Log: > > > >> The EFI boot loader allocates a single chunk of contiguous me= mory to > > > >> hold the kernel, modules, and any other loaded data. This me= mory block > > > >> is relocated to the kernel's expected location during the tra= nsfer of > > > >> control from the loader to the kernel. > > > >>=20 > > > >> The GENERIC kernel on amd64 has recently grown such that a ke= rnel + zfs.ko > > > >> no longer fits in the default staging size. Bump the default= size from > > > >> 32MB to 48MB to provide more breathing room. > > > >=20 > > > > I believe that this should work fine for any system with 64MB o= f RAM. One > > > > downside of the static size is that the loader fails if it can'= t allocate > > > > a contiguous staging size (it isn't able to grow the staging ar= ea on > > > > demand). > > >=20 > > > how do md_images work in that case? > >=20 > > The md_image has to fit into the same staging area (kernel plus any= other > > files loaded by the loader including modules and md_images all have= to fit > > in the staging area). That was the original motivation for making = the > > staging area a build-time tunable rather than always hardcoded at 3= 2MB so > > that people who wished to deploy a large md_image can use a make fl= ag to > > build a loader with a larger staging size (I tested this with a 200= +MB > > mfsroot). >=20 > What would be required to get rid of that limitation altogether, ie m= ake > it dynamic? Right now it's quite a regression compared to the usual > (non-UEFI) loader. >From earlier in the thread: It's a harder problem to solve. Feel free to submit patches. One opti= on is to let the staging code allocate more memory chunks from EFI and chain = them together. However, your relocate code will now have to be smart enough= to order the various copies in such a way that none of them copy over top = of each other. I haven't sat down to see if that's easy to solve or not. The other approach I suggested earlier is to make the kernel relocatabl= e (and allow the module metadata to be anywhere and live in a chain inste= ad of an array) so that we can just load things wherever and leave them th= ere without having to relocate. --=20 John Baldwin From owner-svn-src-all@freebsd.org Mon Oct 19 21:30: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 AFA19A19B07; Mon, 19 Oct 2015 21:30:40 +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 2C7571996; Mon, 19 Oct 2015 21:30:40 +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 3C10BB923; Mon, 19 Oct 2015 17:30:39 -0400 (EDT) From: John Baldwin To: Garrett Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289441 - in head: etc/mtree tests/sys tests/sys/posixshm tools/regression/posixshm tools/test/posixshm Date: Mon, 19 Oct 2015 11:13:24 -0700 Message-ID: <2785397.klsznxE55q@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201510170432.t9H4WLs3007471@repo.freebsd.org> References: <201510170432.t9H4WLs3007471@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, 19 Oct 2015 17:30:39 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 21:30:40 -0000 On Saturday, October 17, 2015 04:32:21 AM Garrett Cooper wrote: > Author: ngie > Date: Sat Oct 17 04:32:21 2015 > New Revision: 289441 > URL: https://svnweb.freebsd.org/changeset/base/289441 > > Log: > Integrate tools/test/posixshm and tools/regression/posixshm into the FreeBSD > test suite as tests/sys/posixshm > > Some other highlights: > - Convert the testcases over to ATF > - Don't use hardcoded paths to /tmp (which violate the ATF/kyua samdbox); use > mkstemp to generate temporary paths for non-SHM_ANON shm objects. Using mkstemp() is probably not useful as POSIX SHM uses an entirely different namespace. There isn't an equivalent to mkstemp() for that namespace. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Oct 19 21:30: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 F209DA19ADA; Mon, 19 Oct 2015 21:30:38 +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 CEE981965; Mon, 19 Oct 2015 21:30:38 +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 E11ADB91E; Mon, 19 Oct 2015 17:30:37 -0400 (EDT) From: John Baldwin To: "Conrad E. Meyer" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289467 - in head: lib/libc/string share/man/man3 share/man/man9 Date: Mon, 19 Oct 2015 11:16:22 -0700 Message-ID: <90341262.9jL8iEHTRp@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201510171955.t9HJtwUF065449@repo.freebsd.org> References: <201510171955.t9HJtwUF065449@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, 19 Oct 2015 17:30:38 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 19 Oct 2015 21:30:39 -0000 On Saturday, October 17, 2015 07:55:58 PM Conrad E. Meyer wrote: > Author: cem > Date: Sat Oct 17 19:55:58 2015 > New Revision: 289467 > URL: https://svnweb.freebsd.org/changeset/base/289467 > > Log: > Document bitset(9) Very nice. It would be nice to have a cpuset(9) as well that the cpuset pages can reference. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Oct 19 22:27: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 1C316A19ABD; Mon, 19 Oct 2015 22:27:34 +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 D59391A9F; Mon, 19 Oct 2015 22:27: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 t9JMRWWc069140; Mon, 19 Oct 2015 22:27:32 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JMRW2W069139; Mon, 19 Oct 2015 22:27:32 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510192227.t9JMRW2W069139@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 19 Oct 2015 22:27:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289605 - 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, 19 Oct 2015 22:27:34 -0000 Author: bdrewery Date: Mon Oct 19 22:27:32 2015 New Revision: 289605 URL: https://svnweb.freebsd.org/changeset/base/289605 Log: Add missing .PHONY for parallel subdir target. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Mon Oct 19 21:06:30 2015 (r289604) +++ head/share/mk/bsd.subdir.mk Mon Oct 19 22:27:32 2015 (r289605) @@ -102,7 +102,7 @@ __deps= .for __dep in ${SUBDIR_DEPEND_${__dir}} __deps+= ${__target}_subdir_${__dep} .endfor -${__target}_subdir_${__dir}: .MAKE ${__deps} +${__target}_subdir_${__dir}: .PHONY .MAKE ${__deps} .if !defined(NO_SUBDIR) @${_+_}if test -d ${.CURDIR}/${__dir}.${MACHINE_ARCH}; then \ ${ECHODIR} "===> ${DIRPRFX}${__dir}.${MACHINE_ARCH} (${__target:realinstall=install})"; \ From owner-svn-src-all@freebsd.org Mon Oct 19 23:34: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 494DDA19373; Mon, 19 Oct 2015 23:34:37 +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 033FC69F; Mon, 19 Oct 2015 23:34: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 t9JNYZDP089766; Mon, 19 Oct 2015 23:34:35 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JNYZaL089765; Mon, 19 Oct 2015 23:34:35 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510192334.t9JNYZaL089765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 19 Oct 2015 23:34:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289606 - 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, 19 Oct 2015 23:34:37 -0000 Author: bdrewery Date: Mon Oct 19 23:34:35 2015 New Revision: 289606 URL: https://svnweb.freebsd.org/changeset/base/289606 Log: Replace all of the duplicated logic for recursing into a subdir with one implementation. It is duplicated at run-time but is more easily maintainable now. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Mon Oct 19 22:27:32 2015 (r289605) +++ head/share/mk/bsd.subdir.mk Mon Oct 19 23:34:35 2015 (r289606) @@ -63,30 +63,25 @@ distribute: .MAKE .endfor .endif +# Subdir code shared among 'make ', 'make ' and SUBDIR_PARALLEL. +_SUBDIR_SH= \ + if test -d ${.CURDIR}/$${dir}.${MACHINE_ARCH}; then \ + dir=$${dir}.${MACHINE_ARCH}; \ + fi; \ + ${ECHODIR} "===> ${DIRPRFX}$${dir} ($${target})"; \ + cd ${.CURDIR}/$${dir}; \ + ${MAKE} $${target} DIRPRFX=${DIRPRFX}$${dir}/ + _SUBDIR: .USE .MAKE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) - @${_+_}for entry in ${SUBDIR:N.WAIT}; do \ - if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \ - ${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE_ARCH} (${.TARGET:S,realinstall,install,:S,^_sub.,,})"; \ - edir=$${entry}.${MACHINE_ARCH}; \ - cd ${.CURDIR}/$${edir}; \ - else \ - ${ECHODIR} "===> ${DIRPRFX}$$entry (${.TARGET:S,realinstall,install,:S,^_sub.,,})"; \ - edir=$${entry}; \ - cd ${.CURDIR}/$${edir}; \ - fi; \ - ${MAKE} ${.TARGET:S,realinstall,install,:S,^_sub.,,} \ - DIRPRFX=${DIRPRFX}$$edir/; \ - done + @${_+_}target=${.TARGET:S,realinstall,install,:S,^_sub.,,}; \ + for dir in ${SUBDIR:N.WAIT}; do ${_SUBDIR_SH}; done .endif ${SUBDIR:N.WAIT}: .PHONY .MAKE - ${_+_}@if test -d ${.TARGET}.${MACHINE_ARCH}; then \ - cd ${.CURDIR}/${.TARGET}.${MACHINE_ARCH}; \ - else \ - cd ${.CURDIR}/${.TARGET}; \ - fi; \ - ${MAKE} all + ${_+_}@target=all; \ + dir=${.TARGET}; \ + ${_SUBDIR_SH}; # Work around parsing of .if nested in .for by putting .WAIT string into a var. __wait= .WAIT @@ -104,17 +99,9 @@ __deps+= ${__target}_subdir_${__dep} .endfor ${__target}_subdir_${__dir}: .PHONY .MAKE ${__deps} .if !defined(NO_SUBDIR) - @${_+_}if test -d ${.CURDIR}/${__dir}.${MACHINE_ARCH}; then \ - ${ECHODIR} "===> ${DIRPRFX}${__dir}.${MACHINE_ARCH} (${__target:realinstall=install})"; \ - edir=${__dir}.${MACHINE_ARCH}; \ - cd ${.CURDIR}/$${edir}; \ - else \ - ${ECHODIR} "===> ${DIRPRFX}${__dir} (${__target:realinstall=install})"; \ - edir=${__dir}; \ - cd ${.CURDIR}/$${edir}; \ - fi; \ - ${MAKE} ${__target:realinstall=install} \ - DIRPRFX=${DIRPRFX}$$edir/ + @${_+_}target=${__target:realinstall=install}; \ + dir=${__dir}; \ + ${_SUBDIR_SH}; .endif .endif .endfor From owner-svn-src-all@freebsd.org Tue Oct 20 01:45: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 5EF22A1972E; Tue, 20 Oct 2015 01:45:40 +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 1B28F1DD7; Tue, 20 Oct 2015 01:45:40 +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 t9K1jdM6027257; Tue, 20 Oct 2015 01:45:39 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9K1jdEM027256; Tue, 20 Oct 2015 01:45:39 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510200145.t9K1jdEM027256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 01:45:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289607 - 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, 20 Oct 2015 01:45:40 -0000 Author: cem Date: Tue Oct 20 01:45:38 2015 New Revision: 289607 URL: https://svnweb.freebsd.org/changeset/base/289607 Log: NTB: Replace last reg_ofs with self_reg Diff reduce with Linux driver. No functional change. Obtained from: Linux (Dual BSD/GPL driver) 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 Mon Oct 19 23:34:35 2015 (r289606) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 01:45:38 2015 (r289607) @@ -173,14 +173,6 @@ struct ntb_softc { #define CTX_ASSERT(sc,f) mtx_assert(&(sc)->ctx_lock, (f)) struct mtx ctx_lock; - struct { - uint32_t ldb; - uint32_t ldb_mask; - uint32_t bar4_xlat; - uint32_t bar5_xlat; - uint32_t spad_local; - uint32_t spci_cmd; - } reg_ofs; uint32_t ppd; uint8_t conn_type; uint8_t dev_type; @@ -335,6 +327,12 @@ static const struct ntb_reg soc_reg = { .mw_bar = { NTB_B2B_BAR_1, NTB_B2B_BAR_2 }, }; +static const struct ntb_alt_reg soc_pri_reg = { + .db_bell = SOC_PDOORBELL_OFFSET, + .db_mask = SOC_PDBMSK_OFFSET, + .spad = SOC_SPAD_OFFSET, +}; + static const struct ntb_alt_reg soc_b2b_reg = { .db_bell = SOC_B2B_DOORBELL_OFFSET, .spad = SOC_B2B_SPAD_OFFSET, @@ -362,6 +360,12 @@ static const struct ntb_reg xeon_reg = { .mw_bar = { NTB_B2B_BAR_1, NTB_B2B_BAR_2, NTB_B2B_BAR_3 }, }; +static const struct ntb_alt_reg xeon_pri_reg = { + .db_bell = XEON_PDOORBELL_OFFSET, + .db_mask = XEON_PDBMSK_OFFSET, + .spad = XEON_SPAD_OFFSET, +}; + static const struct ntb_alt_reg xeon_b2b_reg = { .db_bell = XEON_B2B_DOORBELL_OFFSET, .spad = XEON_B2B_SPAD_OFFSET, @@ -921,7 +925,7 @@ db_iowrite(struct ntb_softc *ntb, uint64 (uintmax_t)(val & ~ntb->db_valid_mask), (uintmax_t)ntb->db_valid_mask)); - if (regoff == ntb->reg_ofs.ldb_mask) + if (regoff == ntb->self_reg->db_mask) DB_MASK_ASSERT(ntb, MA_OWNED); if (ntb->type == NTB_SOC) { @@ -939,7 +943,7 @@ ntb_db_set_mask(struct ntb_softc *ntb, u DB_MASK_LOCK(ntb); ntb->db_mask |= bits; - db_iowrite(ntb, ntb->reg_ofs.ldb_mask, ntb->db_mask); + db_iowrite(ntb, ntb->self_reg->db_mask, ntb->db_mask); DB_MASK_UNLOCK(ntb); } @@ -954,7 +958,7 @@ ntb_db_clear_mask(struct ntb_softc *ntb, DB_MASK_LOCK(ntb); ntb->db_mask &= ~bits; - db_iowrite(ntb, ntb->reg_ofs.ldb_mask, ntb->db_mask); + db_iowrite(ntb, ntb->self_reg->db_mask, ntb->db_mask); DB_MASK_UNLOCK(ntb); } @@ -962,7 +966,7 @@ uint64_t ntb_db_read(struct ntb_softc *ntb) { - return (db_ioread(ntb, ntb->reg_ofs.ldb)); + return (db_ioread(ntb, ntb->self_reg->db_bell)); } void @@ -974,7 +978,7 @@ ntb_db_clear(struct ntb_softc *ntb, uint (uintmax_t)(bits & ~ntb->db_valid_mask), (uintmax_t)ntb->db_valid_mask)); - db_iowrite(ntb, ntb->reg_ofs.ldb, bits); + db_iowrite(ntb, ntb->self_reg->db_bell, bits); } static inline uint64_t @@ -1145,14 +1149,6 @@ ntb_xeon_init_dev(struct ntb_softc *ntb) { int rc; - ntb->reg_ofs.ldb = XEON_PDOORBELL_OFFSET; - ntb->reg_ofs.ldb_mask = XEON_PDBMSK_OFFSET; - ntb->reg_ofs.spad_local = XEON_SPAD_OFFSET; - ntb->reg_ofs.bar4_xlat = XEON_SBAR4XLAT_OFFSET; - if (HAS_FEATURE(NTB_SPLIT_BAR)) - ntb->reg_ofs.bar5_xlat = XEON_SBAR5XLAT_OFFSET; - ntb->reg_ofs.spci_cmd = XEON_PCICMD_OFFSET; - ntb->spad_count = XEON_SPAD_COUNT; ntb->db_count = XEON_DB_COUNT; ntb->db_link_mask = XEON_DB_LINK_BIT; @@ -1166,6 +1162,7 @@ ntb_xeon_init_dev(struct ntb_softc *ntb) } ntb->reg = &xeon_reg; + ntb->self_reg = &xeon_pri_reg; ntb->peer_reg = &xeon_b2b_reg; ntb->xlat_reg = &xeon_sec_xlat; @@ -1202,7 +1199,7 @@ ntb_xeon_init_dev(struct ntb_softc *ntb) return (rc); /* Enable Bus Master and Memory Space on the secondary side */ - ntb_reg_write(2, ntb->reg_ofs.spci_cmd, + ntb_reg_write(2, XEON_PCICMD_OFFSET, PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); /* Enable link training */ @@ -1218,12 +1215,6 @@ ntb_soc_init_dev(struct ntb_softc *ntb) KASSERT(ntb->conn_type == NTB_CONN_B2B, ("Unsupported NTB configuration (%d)\n", ntb->conn_type)); - ntb->reg_ofs.ldb = SOC_PDOORBELL_OFFSET; - ntb->reg_ofs.ldb_mask = SOC_PDBMSK_OFFSET; - ntb->reg_ofs.bar4_xlat = SOC_SBAR4XLAT_OFFSET; - ntb->reg_ofs.spad_local = SOC_SPAD_OFFSET; - ntb->reg_ofs.spci_cmd = SOC_PCICMD_OFFSET; - ntb->spad_count = SOC_SPAD_COUNT; ntb->db_count = SOC_DB_COUNT; ntb->db_vec_count = SOC_DB_MSIX_VECTOR_COUNT; @@ -1231,6 +1222,7 @@ ntb_soc_init_dev(struct ntb_softc *ntb) ntb->db_valid_mask = (1ull << ntb->db_count) - 1; ntb->reg = &soc_reg; + ntb->self_reg = &soc_pri_reg; ntb->peer_reg = &soc_b2b_reg; ntb->xlat_reg = &soc_sec_xlat; @@ -1243,7 +1235,7 @@ ntb_soc_init_dev(struct ntb_softc *ntb) configure_soc_secondary_side_bars(ntb); /* Enable Bus Master and Memory Space on the secondary side */ - ntb_reg_write(2, ntb->reg_ofs.spci_cmd, + ntb_reg_write(2, SOC_PCICMD_OFFSET, PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); /* Initiate PCI-E link training */ @@ -1814,7 +1806,7 @@ ntb_poll_link(struct ntb_softc *ntb) ntb->ntb_ctl = ntb_cntl; ntb->lnk_sta = ntb_reg_read(4, ntb->reg->lnk_sta); } else { - db_iowrite(ntb, ntb->reg_ofs.ldb, ntb->db_link_mask); + db_iowrite(ntb, ntb->self_reg->db_bell, ntb->db_link_mask); reg_val = pci_read_config(ntb->device, ntb->reg->lnk_sta, 2); if (reg_val == ntb->lnk_sta) @@ -1888,7 +1880,7 @@ ntb_spad_write(struct ntb_softc *ntb, un if (idx >= ntb->spad_count) return (EINVAL); - ntb_reg_write(4, ntb->reg_ofs.spad_local + idx * 4, val); + ntb_reg_write(4, ntb->self_reg->spad + idx * 4, val); return (0); } @@ -1911,7 +1903,7 @@ ntb_spad_read(struct ntb_softc *ntb, uns if (idx >= ntb->spad_count) return (EINVAL); - *val = ntb_reg_read(4, ntb->reg_ofs.spad_local + idx * 4); + *val = ntb_reg_read(4, ntb->self_reg->spad + idx * 4); return (0); } From owner-svn-src-all@freebsd.org Tue Oct 20 01:45: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 C764AA19774; Tue, 20 Oct 2015 01:45:49 +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 961211F1D; Tue, 20 Oct 2015 01:45:49 +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 t9K1jmZB027316; Tue, 20 Oct 2015 01:45:48 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9K1jmbZ027315; Tue, 20 Oct 2015 01:45:48 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510200145.t9K1jmbZ027315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 01:45:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289608 - 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, 20 Oct 2015 01:45:49 -0000 Author: cem Date: Tue Oct 20 01:45:48 2015 New Revision: 289608 URL: https://svnweb.freebsd.org/changeset/base/289608 Log: NTB: Drop some dead softc members 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 Oct 20 01:45:38 2015 (r289607) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 01:45:48 2015 (r289608) @@ -176,8 +176,6 @@ struct ntb_softc { uint32_t ppd; uint8_t conn_type; uint8_t dev_type; - uint8_t link_width; - uint8_t link_speed; /* Offset of peer bar0 in B2B BAR */ uint64_t b2b_off; @@ -1747,7 +1745,7 @@ static void recover_soc_link(void *arg) { struct ntb_softc *ntb = arg; - uint8_t speed, width; + unsigned speed, width, oldspeed, oldwidth; uint32_t status32; soc_perform_link_restart(ntb); @@ -1774,9 +1772,12 @@ recover_soc_link(void *arg) goto out; status32 = ntb_reg_read(4, ntb->reg->lnk_sta); - width = (status32 & NTB_LINK_WIDTH_MASK) >> 4; - speed = (status32 & NTB_LINK_SPEED_MASK); - if (ntb->link_width != width || ntb->link_speed != speed) + width = NTB_LNK_STA_WIDTH(status32); + speed = status32 & NTB_LINK_SPEED_MASK; + + oldwidth = NTB_LNK_STA_WIDTH(ntb->lnk_sta); + oldspeed = ntb->lnk_sta & NTB_LINK_SPEED_MASK; + if (oldwidth != width || oldspeed != speed) goto retry; out: From owner-svn-src-all@freebsd.org Tue Oct 20 01:45: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 9EDB5A197B9; Tue, 20 Oct 2015 01:45:58 +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 66B587F; Tue, 20 Oct 2015 01:45:58 +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 t9K1jvJi027376; Tue, 20 Oct 2015 01:45:57 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9K1jv0h027375; Tue, 20 Oct 2015 01:45:57 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510200145.t9K1jv0h027375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 01:45:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289609 - 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, 20 Oct 2015 01:45:58 -0000 Author: cem Date: Tue Oct 20 01:45:57 2015 New Revision: 289609 URL: https://svnweb.freebsd.org/changeset/base/289609 Log: NTB: Pull copy of soc_link_is_err out of recover_soc_link 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 Oct 20 01:45:48 2015 (r289608) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 01:45:57 2015 (r289609) @@ -1759,12 +1759,7 @@ recover_soc_link(void *arg) status32 = arc4random() % SOC_LINK_RECOVERY_TIME; pause("Link", (SOC_LINK_RECOVERY_TIME + status32) * hz / 1000); - status32 = ntb_reg_read(4, SOC_LTSSMSTATEJMP_OFFSET); - if ((status32 & SOC_LTSSMSTATEJMP_FORCEDETECT) != 0) - goto retry; - - status32 = ntb_reg_read(4, SOC_IBSTERRRCRVSTS0_OFFSET); - if ((status32 & SOC_IBIST_ERR_OFLOW) != 0) + if (soc_link_is_err(ntb)) goto retry; status32 = ntb_reg_read(4, ntb->reg->ntb_ctl); From owner-svn-src-all@freebsd.org Tue Oct 20 01:46: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 78270A19806; Tue, 20 Oct 2015 01:46:07 +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 4158120D; Tue, 20 Oct 2015 01:46:07 +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 t9K1k6at027441; Tue, 20 Oct 2015 01:46:06 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9K1k6AV027438; Tue, 20 Oct 2015 01:46:06 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510200146.t9K1k6AV027438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 01:46:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289610 - 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, 20 Oct 2015 01:46:07 -0000 Author: cem Date: Tue Oct 20 01:46:05 2015 New Revision: 289610 URL: https://svnweb.freebsd.org/changeset/base/289610 Log: NTB: enum-ify some HW constants Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_regs.h Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 01:45:57 2015 (r289609) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 01:46:05 2015 (r289610) @@ -72,6 +72,18 @@ enum ntb_device_type { NTB_SOC }; +/* ntb_conn_type are hardware numbers, cannot change. */ +enum ntb_conn_type { + NTB_CONN_TRANSPARENT = 0, + NTB_CONN_B2B = 1, + NTB_CONN_RP = 2, +}; + +enum ntb_b2b_direction { + NTB_DEV_USD = 0, + NTB_DEV_DSD = 1, +}; + enum ntb_bar { NTB_CONFIG_BAR = 0, NTB_B2B_BAR_1, @@ -173,9 +185,9 @@ struct ntb_softc { #define CTX_ASSERT(sc,f) mtx_assert(&(sc)->ctx_lock, (f)) struct mtx ctx_lock; - uint32_t ppd; - uint8_t conn_type; - uint8_t dev_type; + uint32_t ppd; + enum ntb_conn_type conn_type; + enum ntb_b2b_direction dev_type; /* Offset of peer bar0 in B2B BAR */ uint64_t b2b_off; Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_regs.h Tue Oct 20 01:45:57 2015 (r289609) +++ head/sys/dev/ntb/ntb_hw/ntb_regs.h Tue Oct 20 01:46:05 2015 (r289610) @@ -149,13 +149,6 @@ #define SOC_PPD_CONN_TYPE 0x0300 #define SOC_PPD_DEV_TYPE 0x1000 -#define NTB_CONN_TRANSPARENT 0 -#define NTB_CONN_B2B 1 -#define NTB_CONN_RP 2 - -#define NTB_DEV_DSD 1 -#define NTB_DEV_USD 0 - /* All addresses are in low 32-bit space so 32-bit BARs can function */ #define XEON_B2B_BAR0_USD_ADDR 0x1000000000000000ull #define XEON_B2B_BAR2_USD_ADDR64 0x2000000000000000ull From owner-svn-src-all@freebsd.org Tue Oct 20 01:46: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 3EB97A1984D; Tue, 20 Oct 2015 01:46:16 +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 0B66C3A0; Tue, 20 Oct 2015 01:46:15 +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 t9K1kFsG027502; Tue, 20 Oct 2015 01:46:15 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9K1kF9O027501; Tue, 20 Oct 2015 01:46:15 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510200146.t9K1kF9O027501@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 01:46:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289611 - 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, 20 Oct 2015 01:46:16 -0000 Author: cem Date: Tue Oct 20 01:46:14 2015 New Revision: 289611 URL: https://svnweb.freebsd.org/changeset/base/289611 Log: NTB: MFV 5ae0beb6: Enable link for Intel root port mode in probe We skip actually bringing up Rootport/Transparent configurations, so most of this doesn't apply. Original Linux commit log: Link training should be enabled in the driver probe for root port mode. We should not have to wait for transport to be loaded for this to happen. Otherwise the ntb device will not show up on the transparent bridge side of the link. Authored by: Dave Jiang Obtained from: Linux (Dual BSD/GPL driver) 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 Oct 20 01:46:05 2015 (r289610) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 01:46:14 2015 (r289611) @@ -1481,8 +1481,11 @@ static inline bool link_is_up(struct ntb_softc *ntb) { - if (ntb->type == NTB_XEON) + if (ntb->type == NTB_XEON) { + if (ntb->conn_type == NTB_CONN_TRANSPARENT) + return (true); return ((ntb->lnk_sta & NTB_LINK_STATUS_ACTIVE) != 0); + } KASSERT(ntb->type == NTB_SOC, ("ntb type")); return ((ntb->ntb_ctl & SOC_CNTL_LINK_DOWN) == 0); From owner-svn-src-all@freebsd.org Tue Oct 20 01:54: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 8EC4CA19C2A; Tue, 20 Oct 2015 01:54:09 +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 55EE3B04; Tue, 20 Oct 2015 01:54: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 t9K1s80N030884; Tue, 20 Oct 2015 01:54:08 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9K1s8eB030883; Tue, 20 Oct 2015 01:54:08 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510200154.t9K1s8eB030883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 01:54:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289612 - 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, 20 Oct 2015 01:54:09 -0000 Author: cem Date: Tue Oct 20 01:54:08 2015 New Revision: 289612 URL: https://svnweb.freebsd.org/changeset/base/289612 Log: NTB: Change Atom (BWD/SoC) pci_id name to match others 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 Oct 20 01:46:14 2015 (r289611) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 01:54:08 2015 (r289612) @@ -310,9 +310,10 @@ static bool ntb_poll_link(struct ntb_sof static void save_bar_parameters(struct ntb_pci_bar_info *bar); static struct ntb_hw_info pci_ids[] = { - { 0x0C4E8086, "Atom Processor S1200 NTB Primary B2B", NTB_SOC, 0 }, - /* XXX: PS/SS IDs left out until they are supported. */ + { 0x0C4E8086, "BWD Atom Processor S1200 Non-Transparent Bridge B2B", + NTB_SOC, 0 }, + { 0x37258086, "JSF Xeon C35xx/C55xx Non-Transparent Bridge B2B", NTB_XEON, NTB_SDOORBELL_LOCKUP | NTB_B2BDOORBELL_BIT14 }, { 0x3C0D8086, "SNB Xeon E5/Core i7 Non-Transparent Bridge B2B", From owner-svn-src-all@freebsd.org Tue Oct 20 01:54: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 3611CA19C59; Tue, 20 Oct 2015 01:54: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 EB161C52; Tue, 20 Oct 2015 01:54:17 +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 t9K1sGaO030943; Tue, 20 Oct 2015 01:54:16 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9K1sGLe030942; Tue, 20 Oct 2015 01:54:16 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510200154.t9K1sGLe030942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 01:54:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289613 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.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, 20 Oct 2015 01:54:18 -0000 Author: cem Date: Tue Oct 20 01:54:16 2015 New Revision: 289613 URL: https://svnweb.freebsd.org/changeset/base/289613 Log: if_ntb: MFV 2849b5d7: Reset transport QP link stats on down Reset the link stats when the link goes down. In particular, the TX and RX index and count must be reset, or else the TX side will be sending packets to the RX side where the RX side is not expecting them. Reset all the stats, to be consistent. Authored by: Allen Hubbe Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 01:54:08 2015 (r289612) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 01:54:16 2015 (r289613) @@ -300,6 +300,7 @@ static int ntb_transport_setup_qp_mw(str static void ntb_qp_link_work(void *arg); static void ntb_transport_link_cleanup(struct ntb_transport_ctx *nt); static void ntb_qp_link_down(struct ntb_transport_qp *qp); +static void ntb_qp_link_down_reset(struct ntb_transport_qp *qp); static void ntb_qp_link_cleanup(struct ntb_transport_qp *qp); static void ntb_transport_link_down(struct ntb_transport_qp *qp); static void ntb_send_link_down(struct ntb_transport_qp *qp); @@ -642,9 +643,9 @@ ntb_transport_init_queue(struct ntb_tran qp->qp_num = qp_num; qp->transport = nt; qp->ntb = nt->ntb; - qp->link_is_up = false; qp->client_ready = false; qp->event_handler = NULL; + ntb_qp_link_down_reset(qp); if (nt->qp_count % mw_count && mw_num + 1 < nt->qp_count / mw_count) num_qps_mw = nt->qp_count / mw_count + 1; @@ -1444,16 +1445,28 @@ ntb_qp_link_down(struct ntb_transport_qp } static void +ntb_qp_link_down_reset(struct ntb_transport_qp *qp) +{ + + qp->link_is_up = false; + + qp->tx_index = qp->rx_index = 0; + qp->tx_bytes = qp->rx_bytes = 0; + qp->tx_pkts = qp->rx_pkts = 0; + + qp->rx_ring_empty = 0; + qp->tx_ring_full = 0; + + qp->rx_err_no_buf = qp->rx_err_oflow = qp->rx_err_ver = 0; +} + +static void ntb_qp_link_cleanup(struct ntb_transport_qp *qp) { struct ntb_transport_ctx *nt = qp->transport; - if (!qp->link_is_up) { - callout_drain(&qp->link_work); - return; - } - - qp->link_is_up = false; + callout_drain(&qp->link_work); + ntb_qp_link_down_reset(qp); if (qp->event_handler != NULL) qp->event_handler(qp->cb_data, NTB_LINK_DOWN); @@ -1502,8 +1515,6 @@ ntb_send_link_down(struct ntb_transport_ if (!qp->link_is_up) return; - qp->link_is_up = false; - for (i = 0; i < NTB_LINK_DOWN_TIMEOUT; i++) { entry = ntb_list_rm(&qp->ntb_tx_free_q_lock, &qp->tx_free_q); if (entry != NULL) @@ -1524,6 +1535,8 @@ ntb_send_link_down(struct ntb_transport_ if (rc != 0) printf("ntb: Failed to send link down\n"); mtx_unlock(&qp->transport->tx_lock); + + ntb_qp_link_down_reset(qp); } From owner-svn-src-all@freebsd.org Tue Oct 20 01:54: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 B322BA19C9F; Tue, 20 Oct 2015 01:54:26 +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 90661D9B; Tue, 20 Oct 2015 01:54:26 +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 t9K1sPQX031003; Tue, 20 Oct 2015 01:54:25 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9K1sPH2031002; Tue, 20 Oct 2015 01:54:25 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510200154.t9K1sPH2031002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 01:54:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289614 - 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, 20 Oct 2015 01:54:26 -0000 Author: cem Date: Tue Oct 20 01:54:25 2015 New Revision: 289614 URL: https://svnweb.freebsd.org/changeset/base/289614 Log: NTB: MFV 42fefc86: Add parameters for Intel SNB B2B addresses Add module parameters for the addresses to be used in B2B topology. Authored by: Allen Hubbe Obtained from: Linux (Dual BSD/GPL driver) 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 Oct 20 01:54:16 2015 (r289613) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 01:54:25 2015 (r289614) @@ -397,7 +397,7 @@ static const struct ntb_xlat_reg xeon_se .bar5_xlat = XEON_SBAR5XLAT_OFFSET, }; -static const struct ntb_b2b_addr xeon_b2b_usd_addr = { +static struct ntb_b2b_addr xeon_b2b_usd_addr = { .bar0_addr = XEON_B2B_BAR0_USD_ADDR, .bar2_addr64 = XEON_B2B_BAR2_USD_ADDR64, .bar4_addr64 = XEON_B2B_BAR4_USD_ADDR64, @@ -405,7 +405,7 @@ static const struct ntb_b2b_addr xeon_b2 .bar5_addr32 = XEON_B2B_BAR5_USD_ADDR32, }; -static const struct ntb_b2b_addr xeon_b2b_dsd_addr = { +static struct ntb_b2b_addr xeon_b2b_dsd_addr = { .bar0_addr = XEON_B2B_BAR0_DSD_ADDR, .bar2_addr64 = XEON_B2B_BAR2_DSD_ADDR64, .bar4_addr64 = XEON_B2B_BAR4_DSD_ADDR64, @@ -413,6 +413,37 @@ static const struct ntb_b2b_addr xeon_b2 .bar5_addr32 = XEON_B2B_BAR5_DSD_ADDR32, }; +SYSCTL_NODE(_hw_ntb, OID_AUTO, xeon_b2b, CTLFLAG_RW, 0, + "B2B MW segment overrides -- MUST be the same on both sides"); + +SYSCTL_UQUAD(_hw_ntb_xeon_b2b, OID_AUTO, usd_bar2_addr64, CTLFLAG_RDTUN, + &xeon_b2b_usd_addr.bar2_addr64, 0, "If using B2B topology on Xeon " + "hardware, use this 64-bit address on the bus between the NTB devices for " + "the window at BAR2, on the upstream side of the link. MUST be the same " + "address on both sides."); +SYSCTL_UQUAD(_hw_ntb_xeon_b2b, OID_AUTO, usd_bar4_addr64, CTLFLAG_RDTUN, + &xeon_b2b_usd_addr.bar4_addr64, 0, "See usd_bar2_addr64, but BAR4."); +SYSCTL_UQUAD(_hw_ntb_xeon_b2b, OID_AUTO, usd_bar4_addr32, CTLFLAG_RDTUN, + &xeon_b2b_usd_addr.bar4_addr32, 0, "See usd_bar2_addr64, but BAR4 " + "(split-BAR mode)."); +SYSCTL_UQUAD(_hw_ntb_xeon_b2b, OID_AUTO, usd_bar5_addr32, CTLFLAG_RDTUN, + &xeon_b2b_usd_addr.bar4_addr32, 0, "See usd_bar2_addr64, but BAR5 " + "(split-BAR mode)."); + +SYSCTL_UQUAD(_hw_ntb_xeon_b2b, OID_AUTO, dsd_bar2_addr64, CTLFLAG_RDTUN, + &xeon_b2b_dsd_addr.bar2_addr64, 0, "If using B2B topology on Xeon " + "hardware, use this 64-bit address on the bus between the NTB devices for " + "the window at BAR2, on the downstream side of the link. MUST be the same" + " address on both sides."); +SYSCTL_UQUAD(_hw_ntb_xeon_b2b, OID_AUTO, dsd_bar4_addr64, CTLFLAG_RDTUN, + &xeon_b2b_dsd_addr.bar4_addr64, 0, "See dsd_bar2_addr64, but BAR4."); +SYSCTL_UQUAD(_hw_ntb_xeon_b2b, OID_AUTO, dsd_bar4_addr32, CTLFLAG_RDTUN, + &xeon_b2b_dsd_addr.bar4_addr32, 0, "See dsd_bar2_addr64, but BAR4 " + "(split-BAR mode)."); +SYSCTL_UQUAD(_hw_ntb_xeon_b2b, OID_AUTO, dsd_bar5_addr32, CTLFLAG_RDTUN, + &xeon_b2b_dsd_addr.bar4_addr32, 0, "See dsd_bar2_addr64, but BAR5 " + "(split-BAR mode)."); + /* * OS <-> Driver interface structures */ From owner-svn-src-all@freebsd.org Tue Oct 20 01:54: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 9DA7EA19CD6; Tue, 20 Oct 2015 01:54:35 +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 69A05EE1; Tue, 20 Oct 2015 01:54:35 +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 t9K1sYS6031062; Tue, 20 Oct 2015 01:54:34 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9K1sYq6031061; Tue, 20 Oct 2015 01:54:34 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510200154.t9K1sYq6031061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 01:54:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289615 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.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, 20 Oct 2015 01:54:35 -0000 Author: cem Date: Tue Oct 20 01:54:34 2015 New Revision: 289615 URL: https://svnweb.freebsd.org/changeset/base/289615 Log: if_ntb: Fix typo in qp_link_work to match Linux Throw away the result of the peer SPAD read. The peer will write our local SPAD and we need to keep the locally read SPAD value to check if the remote side is up. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 01:54:25 2015 (r289614) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 01:54:34 2015 (r289615) @@ -1381,14 +1381,14 @@ ntb_qp_link_work(void *arg) struct ntb_transport_qp *qp = arg; struct ntb_softc *ntb = qp->ntb; struct ntb_transport_ctx *nt = qp->transport; - int val; + uint32_t val, dummy; ntb_spad_read(ntb, IF_NTB_QP_LINKS, &val); ntb_peer_spad_write(ntb, IF_NTB_QP_LINKS, val | (1ull << qp->qp_num)); /* query remote spad for qp ready bits */ - ntb_peer_spad_read(ntb, IF_NTB_QP_LINKS, &val); + ntb_peer_spad_read(ntb, IF_NTB_QP_LINKS, &dummy); /* See if the remote side is up */ if ((val & (1ull << qp->qp_num)) != 0) { From owner-svn-src-all@freebsd.org Tue Oct 20 01:54: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 03BDDA19D18; Tue, 20 Oct 2015 01:54:45 +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 C34821037; Tue, 20 Oct 2015 01:54:44 +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 t9K1shoq031122; Tue, 20 Oct 2015 01:54:43 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9K1shVZ031121; Tue, 20 Oct 2015 01:54:43 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510200154.t9K1shVZ031121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 01:54:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289616 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.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, 20 Oct 2015 01:54:45 -0000 Author: cem Date: Tue Oct 20 01:54:43 2015 New Revision: 289616 URL: https://svnweb.freebsd.org/changeset/base/289616 Log: NTB: MFV 9891417d: Increase transport MTU to 64k from 16k Benchmarking showed a significant performance increase with the MTU size to 64k instead of 16k. Change the driver default to 64k. Authored by: Dave Jiang Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 01:54:34 2015 (r289615) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 01:54:43 2015 (r289616) @@ -90,7 +90,7 @@ enum ntb_link_event { NTB_LINK_UP, }; -static unsigned int transport_mtu = 0x4000 + ETHER_HDR_LEN + ETHER_CRC_LEN; +static unsigned int transport_mtu = 0x10000 + ETHER_HDR_LEN + ETHER_CRC_LEN; static uint64_t max_mw_size; SYSCTL_UQUAD(_hw_ntb, OID_AUTO, max_mw_size, CTLFLAG_RDTUN, &max_mw_size, 0, From owner-svn-src-all@freebsd.org Tue Oct 20 01: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 CD457A19D4B; Tue, 20 Oct 2015 01:54:53 +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 9765C1184; Tue, 20 Oct 2015 01:54:53 +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 t9K1sqP5031180; Tue, 20 Oct 2015 01:54:52 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9K1sqMP031179; Tue, 20 Oct 2015 01:54:52 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510200154.t9K1sqMP031179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 01:54:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289617 - 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, 20 Oct 2015 01:54:53 -0000 Author: cem Date: Tue Oct 20 01:54:52 2015 New Revision: 289617 URL: https://svnweb.freebsd.org/changeset/base/289617 Log: NTB: Clean up safely if attach fails early 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 Oct 20 01:54:43 2015 (r289616) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 01:54:52 2015 (r289617) @@ -543,7 +543,8 @@ ntb_detach(device_t device) ntb = DEVICE2SOFTC(device); - ntb_db_set_mask(ntb, ntb->db_valid_mask); + if (ntb->self_reg != NULL) + ntb_db_set_mask(ntb, ntb->db_valid_mask); callout_drain(&ntb->heartbeat_timer); callout_drain(&ntb->lr_timer); if (ntb->type == NTB_XEON) @@ -1108,7 +1109,8 @@ static void ntb_teardown_xeon(struct ntb_softc *ntb) { - ntb_link_disable(ntb); + if (ntb->reg != NULL) + ntb_link_disable(ntb); } static void From owner-svn-src-all@freebsd.org Tue Oct 20 03:25: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 5D54FA181AB; Tue, 20 Oct 2015 03:25:19 +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 1F50219B8; Tue, 20 Oct 2015 03:25:19 +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 t9K3PIvo058641; Tue, 20 Oct 2015 03:25:18 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9K3PIo3058640; Tue, 20 Oct 2015 03:25:18 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510200325.t9K3PIo3058640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 20 Oct 2015 03:25:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289618 - 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, 20 Oct 2015 03:25:19 -0000 Author: ian Date: Tue Oct 20 03:25:17 2015 New Revision: 289618 URL: https://svnweb.freebsd.org/changeset/base/289618 Log: Fix printf format to allow for bus_size_t not being u_long on all platforms. Modified: head/sys/kern/subr_busdma_bufalloc.c Modified: head/sys/kern/subr_busdma_bufalloc.c ============================================================================== --- head/sys/kern/subr_busdma_bufalloc.c Tue Oct 20 01:54:52 2015 (r289617) +++ head/sys/kern/subr_busdma_bufalloc.c Tue Oct 20 03:25:17 2015 (r289618) @@ -94,8 +94,8 @@ busdma_bufalloc_create(const char *name, for (i = 0, bz = ba->buf_zones, cursize = ba->min_size; i < nitems(ba->buf_zones) && cursize <= MAX_ZONE_BUFSIZE; ++i, ++bz, cursize <<= 1) { - snprintf(bz->name, sizeof(bz->name), "dma %.10s %lu", - name, cursize); + snprintf(bz->name, sizeof(bz->name), "dma %.10s %ju", + name, (uintmax_t)cursize); bz->size = cursize; bz->umazone = uma_zcreate(bz->name, bz->size, NULL, NULL, NULL, NULL, bz->size - 1, zcreate_flags); From owner-svn-src-all@freebsd.org Tue Oct 20 03:28: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 8E3D1A182AF; Tue, 20 Oct 2015 03:28:00 +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 5D9491B83; Tue, 20 Oct 2015 03:28:00 +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 t9K3Rx4r058757; Tue, 20 Oct 2015 03:27:59 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9K3RxWQ058756; Tue, 20 Oct 2015 03:27:59 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510200327.t9K3RxWQ058756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 20 Oct 2015 03:27:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289619 - 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: Tue, 20 Oct 2015 03:28:00 -0000 Author: ian Date: Tue Oct 20 03:27:59 2015 New Revision: 289619 URL: https://svnweb.freebsd.org/changeset/base/289619 Log: Follow the advice of the misplaced comment and don't access the map struct after freeing it. Remove the comment whose uselessness has been revealed. Modified: head/sys/arm/arm/busdma_machdep.c Modified: head/sys/arm/arm/busdma_machdep.c ============================================================================== --- head/sys/arm/arm/busdma_machdep.c Tue Oct 20 03:25:17 2015 (r289618) +++ head/sys/arm/arm/busdma_machdep.c Tue Oct 20 03:27:59 2015 (r289619) @@ -786,10 +786,9 @@ bus_dmamem_free(bus_dma_tag_t dmat, void ba = coherent_allocator; else ba = standard_allocator; - uma_zfree(dmamap_zone, map); free(map->slist, M_DEVBUF); - /* Be careful not to access map from here on. */ + uma_zfree(dmamap_zone, map); bufzone = busdma_bufalloc_findzone(ba, dmat->maxsize); From owner-svn-src-all@freebsd.org Tue Oct 20 08:29: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 04A1FA18D02; Tue, 20 Oct 2015 08:29: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 D389C82A; Tue, 20 Oct 2015 08:29: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 t9K8TUSY044121; Tue, 20 Oct 2015 08:29:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9K8TUgS044119; Tue, 20 Oct 2015 08:29:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510200829.t9K8TUgS044119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 20 Oct 2015 08:29:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289620 - 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, 20 Oct 2015 08:29:32 -0000 Author: mav Date: Tue Oct 20 08:29:30 2015 New Revision: 289620 URL: https://svnweb.freebsd.org/changeset/base/289620 Log: Decode more firmware attributes. 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 Tue Oct 20 03:27:59 2015 (r289619) +++ head/sys/dev/isp/isp.c Tue Oct 20 08:29:30 2015 (r289620) @@ -1090,8 +1090,13 @@ isp_reset(ispsoftc_t *isp, int do_load_d } else { isp->isp_fwattr = mbs.param[6]; } - if (IS_24XX(isp) && (isp->isp_fwattr & ISP2400_FW_ATTR_EXTNDED)) { - isp->isp_fwattr |= (((uint64_t) mbs.param[15]) << 16) | (((uint64_t) mbs.param[16]) << 32) | (((uint64_t) mbs.param[17]) << 48); + if (IS_24XX(isp)) { + isp->isp_fwattr |= ((uint64_t) mbs.param[15]) << 16; + if (isp->isp_fwattr & ISP2400_FW_ATTR_EXTNDED) { + isp->isp_fwattr |= + (((uint64_t) mbs.param[16]) << 32) | + (((uint64_t) mbs.param[17]) << 48); + } } } else if (IS_SCSI(isp)) { #ifndef ISP_TARGET_MODE @@ -1132,6 +1137,18 @@ isp_reset(ispsoftc_t *isp, int do_load_d fwt ^=ISP2400_FW_ATTR_VI; ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s VI", buf); } + if (fwt & ISP2400_FW_ATTR_MQ) { + fwt ^=ISP2400_FW_ATTR_MQ; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s MQ", buf); + } + if (fwt & ISP2400_FW_ATTR_MSIX) { + fwt ^=ISP2400_FW_ATTR_MSIX; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s MSIX", buf); + } + if (fwt & ISP2400_FW_ATTR_FCOE) { + fwt ^=ISP2400_FW_ATTR_FCOE; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s FCOE", buf); + } if (fwt & ISP2400_FW_ATTR_VP0) { fwt ^= ISP2400_FW_ATTR_VP0; ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s VP0_Decoupling", buf); @@ -1140,7 +1157,43 @@ isp_reset(ispsoftc_t *isp, int do_load_d fwt ^= ISP2400_FW_ATTR_EXPFW; ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s (Experimental)", buf); } + if (fwt & ISP2400_FW_ATTR_HOTFW) { + fwt ^= ISP2400_FW_ATTR_HOTFW; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s HotFW", buf); + } fwt &= ~ISP2400_FW_ATTR_EXTNDED; + if (fwt & ISP2400_FW_ATTR_EXTVP) { + fwt ^= ISP2400_FW_ATTR_EXTVP; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s ExtVP", buf); + } + if (fwt & ISP2400_FW_ATTR_VN2VN) { + fwt ^= ISP2400_FW_ATTR_VN2VN; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s VN2VN", buf); + } + if (fwt & ISP2400_FW_ATTR_EXMOFF) { + fwt ^= ISP2400_FW_ATTR_EXMOFF; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s EXMOFF", buf); + } + if (fwt & ISP2400_FW_ATTR_NPMOFF) { + fwt ^= ISP2400_FW_ATTR_NPMOFF; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s NPMOFF", buf); + } + if (fwt & ISP2400_FW_ATTR_DIFCHOP) { + fwt ^= ISP2400_FW_ATTR_DIFCHOP; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s DIFCHOP", buf); + } + if (fwt & ISP2400_FW_ATTR_SRIOV) { + fwt ^= ISP2400_FW_ATTR_SRIOV; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s SRIOV", buf); + } + if (fwt & ISP2400_FW_ATTR_ASICTMP) { + fwt ^= ISP2400_FW_ATTR_ASICTMP; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s ASICTMP", buf); + } + if (fwt & ISP2400_FW_ATTR_ATIOMQ) { + fwt ^= ISP2400_FW_ATTR_ATIOMQ; + ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s ATIOMQ", buf); + } if (fwt) { ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s (unknown 0x%08x%08x)", buf, (uint32_t) (fwt >> 32), (uint32_t) fwt); Modified: head/sys/dev/isp/ispmbox.h ============================================================================== --- head/sys/dev/isp/ispmbox.h Tue Oct 20 03:27:59 2015 (r289619) +++ head/sys/dev/isp/ispmbox.h Tue Oct 20 08:29:30 2015 (r289620) @@ -820,9 +820,21 @@ typedef struct { #define ISP2400_FW_ATTR_SB2 0x0008 #define ISP2400_FW_ATTR_T10CRC 0x0010 #define ISP2400_FW_ATTR_VI 0x0020 +#define ISP2400_FW_ATTR_MQ 0x0040 +#define ISP2400_FW_ATTR_MSIX 0x0080 +#define ISP2400_FW_ATTR_FCOE 0x0800 #define ISP2400_FW_ATTR_VP0 0x1000 #define ISP2400_FW_ATTR_EXPFW 0x2000 +#define ISP2400_FW_ATTR_HOTFW 0x4000 #define ISP2400_FW_ATTR_EXTNDED 0x8000 +#define ISP2400_FW_ATTR_EXTVP 0x00010000 +#define ISP2400_FW_ATTR_VN2VN 0x00040000 +#define ISP2400_FW_ATTR_EXMOFF 0x00080000 +#define ISP2400_FW_ATTR_NPMOFF 0x00100000 +#define ISP2400_FW_ATTR_DIFCHOP 0x00400000 +#define ISP2400_FW_ATTR_SRIOV 0x02000000 +#define ISP2400_FW_ATTR_ASICTMP 0x0200000000 +#define ISP2400_FW_ATTR_ATIOMQ 0x0400000000 /* * These are either manifestly true or are dependent on f/w attributes From owner-svn-src-all@freebsd.org Tue Oct 20 09:13: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 13C49A1A462; Tue, 20 Oct 2015 09:13:37 +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 C3FAA8C0; Tue, 20 Oct 2015 09:13:36 +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 t9K9DZH4058408; Tue, 20 Oct 2015 09:13:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9K9DZxf058407; Tue, 20 Oct 2015 09:13:35 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510200913.t9K9DZxf058407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 20 Oct 2015 09:13:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289621 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 20 Oct 2015 09:13:37 -0000 Author: hselasky Date: Tue Oct 20 09:13:35 2015 New Revision: 289621 URL: https://svnweb.freebsd.org/changeset/base/289621 Log: Merge LinuxKPI changes from DragonflyBSD: - Remove redundant NBLONG macro and use BIT_WORD() and BIT_MASK() instead. - Correctly define BIT_MASK() according to Linux and update all users of this macro. - Add missing GENMASK() macro. - Remove all comments deriving from Linux. Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/bitops.h Modified: head/sys/ofed/include/linux/bitops.h ============================================================================== --- head/sys/ofed/include/linux/bitops.h Tue Oct 20 08:29:30 2015 (r289620) +++ head/sys/ofed/include/linux/bitops.h Tue Oct 20 09:13:35 2015 (r289621) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,15 +29,21 @@ #ifndef _LINUX_BITOPS_H_ #define _LINUX_BITOPS_H_ +#include +#include + +#define BIT(nr) (1UL << (nr)) #ifdef __LP64__ #define BITS_PER_LONG 64 #else #define BITS_PER_LONG 32 #endif -#define BIT_MASK(n) (~0UL >> (BITS_PER_LONG - (n))) +#define BITMAP_FIRST_WORD_MASK(start) (~0UL << ((start) % BITS_PER_LONG)) +#define BITMAP_LAST_WORD_MASK(n) (~0UL >> (BITS_PER_LONG - (n))) #define BITS_TO_LONGS(n) howmany((n), BITS_PER_LONG) +#define BIT_MASK(nr) (1UL << ((nr) & (BITS_PER_LONG - 1))) #define BIT_WORD(nr) ((nr) / BITS_PER_LONG) - +#define GENMASK(lo, hi) (((2UL << ((hi) - (lo))) - 1UL) << (lo)) #define BITS_PER_BYTE 8 static inline int @@ -90,7 +96,7 @@ find_first_bit(unsigned long *addr, unsi return (bit + __ffsl(*addr)); } if (size) { - mask = (*addr) & BIT_MASK(size); + mask = (*addr) & BITMAP_LAST_WORD_MASK(size); if (mask) bit += __ffsl(mask); else @@ -112,7 +118,7 @@ find_first_zero_bit(unsigned long *addr, return (bit + __ffsl(~(*addr))); } if (size) { - mask = ~(*addr) & BIT_MASK(size); + mask = ~(*addr) & BITMAP_LAST_WORD_MASK(size); if (mask) bit += __ffsl(mask); else @@ -134,7 +140,7 @@ find_last_bit(unsigned long *addr, unsig bit = BITS_PER_LONG * pos; addr += pos; if (offs) { - mask = (*addr) & BIT_MASK(offs); + mask = (*addr) & BITMAP_LAST_WORD_MASK(offs); if (mask) return (bit + __flsl(mask)); } @@ -162,7 +168,7 @@ find_next_bit(unsigned long *addr, unsig bit = BITS_PER_LONG * pos; addr += pos; if (offs) { - mask = (*addr) & ~BIT_MASK(offs); + mask = (*addr) & ~BITMAP_LAST_WORD_MASK(offs); if (mask) return (bit + __ffsl(mask)); if (size - bit <= BITS_PER_LONG) @@ -177,7 +183,7 @@ find_next_bit(unsigned long *addr, unsig return (bit + __ffsl(*addr)); } if (size) { - mask = (*addr) & BIT_MASK(size); + mask = (*addr) & BITMAP_LAST_WORD_MASK(size); if (mask) bit += __ffsl(mask); else @@ -202,7 +208,7 @@ find_next_zero_bit(unsigned long *addr, bit = BITS_PER_LONG * pos; addr += pos; if (offs) { - mask = ~(*addr) & ~BIT_MASK(offs); + mask = ~(*addr) & ~BITMAP_LAST_WORD_MASK(offs); if (mask) return (bit + __ffsl(mask)); if (size - bit <= BITS_PER_LONG) @@ -217,7 +223,7 @@ find_next_zero_bit(unsigned long *addr, return (bit + __ffsl(~(*addr))); } if (size) { - mask = ~(*addr) & BIT_MASK(size); + mask = ~(*addr) & BITMAP_LAST_WORD_MASK(size); if (mask) bit += __ffsl(mask); else @@ -245,13 +251,13 @@ bitmap_fill(unsigned long *addr, int siz memset(addr, 0xff, len); tail = size & (BITS_PER_LONG - 1); if (tail) - addr[size / BITS_PER_LONG] = BIT_MASK(tail); + addr[size / BITS_PER_LONG] = BITMAP_LAST_WORD_MASK(tail); } static inline int bitmap_full(unsigned long *addr, int size) { - long mask; + unsigned long mask; int tail; int len; int i; @@ -262,7 +268,7 @@ bitmap_full(unsigned long *addr, int siz return (0); tail = size & (BITS_PER_LONG - 1); if (tail) { - mask = BIT_MASK(tail); + mask = BITMAP_LAST_WORD_MASK(tail); if ((addr[i] & mask) != mask) return (0); } @@ -272,7 +278,7 @@ bitmap_full(unsigned long *addr, int siz static inline int bitmap_empty(unsigned long *addr, int size) { - long mask; + unsigned long mask; int tail; int len; int i; @@ -283,38 +289,36 @@ bitmap_empty(unsigned long *addr, int si return (0); tail = size & (BITS_PER_LONG - 1); if (tail) { - mask = BIT_MASK(tail); + mask = BITMAP_LAST_WORD_MASK(tail); if ((addr[i] & mask) != 0) return (0); } return (1); } -#define NBLONG (NBBY * sizeof(long)) - #define __set_bit(i, a) \ - atomic_set_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << ((i) % NBLONG)) + atomic_set_long(&((volatile long *)(a))[BIT_WORD(i)], BIT_MASK(i)) #define set_bit(i, a) \ - atomic_set_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << ((i) % NBLONG)) + atomic_set_long(&((volatile long *)(a))[BIT_WORD(i)], BIT_MASK(i)) #define __clear_bit(i, a) \ - atomic_clear_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << ((i) % NBLONG)) + atomic_clear_long(&((volatile long *)(a))[BIT_WORD(i)], BIT_MASK(i)) #define clear_bit(i, a) \ - atomic_clear_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << ((i) % NBLONG)) + atomic_clear_long(&((volatile long *)(a))[BIT_WORD(i)], BIT_MASK(i)) #define test_bit(i, a) \ - !!(atomic_load_acq_long(&((volatile long *)(a))[(i)/NBLONG]) & \ - (1UL << ((i) % NBLONG))) + !!(atomic_load_acq_long(&((volatile long *)(a))[BIT_WORD(i)]) & \ + BIT_MASK(i)) static inline long test_and_clear_bit(long bit, long *var) { long val; - var += bit / (sizeof(long) * NBBY); - bit %= sizeof(long) * NBBY; + var += BIT_WORD(bit); + bit %= BITS_PER_LONG; bit = (1UL << bit); do { val = *(volatile long *)var; @@ -328,8 +332,8 @@ test_and_set_bit(long bit, long *var) { long val; - var += bit / (sizeof(long) * NBBY); - bit %= sizeof(long) * NBBY; + var += BIT_WORD(bit); + bit %= BITS_PER_LONG; bit = (1UL << bit); do { val = *(volatile long *)var; @@ -338,15 +342,6 @@ test_and_set_bit(long bit, long *var) return !!(val & bit); } - -#define BITMAP_FIRST_WORD_MASK(start) (~0UL << ((start) % BITS_PER_LONG)) -#define BITMAP_LAST_WORD_MASK(nbits) \ -( \ - ((nbits) % BITS_PER_LONG) ? \ - (1UL<<((nbits) % BITS_PER_LONG))-1 : ~0UL \ -) - - static inline void bitmap_set(unsigned long *map, int start, int nr) { @@ -390,36 +385,28 @@ bitmap_clear(unsigned long *map, int sta } enum { - REG_OP_ISFREE, /* true if region is all zero bits */ - REG_OP_ALLOC, /* set all bits in region */ - REG_OP_RELEASE, /* clear all bits in region */ + REG_OP_ISFREE, + REG_OP_ALLOC, + REG_OP_RELEASE, }; static int __reg_op(unsigned long *bitmap, int pos, int order, int reg_op) { - int nbits_reg; /* number of bits in region */ - int index; /* index first long of region in bitmap */ - int offset; /* bit offset region in bitmap[index] */ - int nlongs_reg; /* num longs spanned by region in bitmap */ - int nbitsinlong; /* num bits of region in each spanned long */ - unsigned long mask; /* bitmask for one long of region */ - int i; /* scans bitmap by longs */ - int ret = 0; /* return value */ - - /* - * Either nlongs_reg == 1 (for small orders that fit in one long) - * or (offset == 0 && mask == ~0UL) (for larger multiword orders.) - */ + int nbits_reg; + int index; + int offset; + int nlongs_reg; + int nbitsinlong; + unsigned long mask; + int i; + int ret = 0; + nbits_reg = 1 << order; index = pos / BITS_PER_LONG; offset = pos - (index * BITS_PER_LONG); nlongs_reg = BITS_TO_LONGS(nbits_reg); nbitsinlong = min(nbits_reg, BITS_PER_LONG); - /* - * Can't do "mask = (1UL << nbitsinlong) - 1", as that - * overflows if nbitsinlong == BITS_PER_LONG. - */ mask = (1UL << (nbitsinlong - 1)); mask += mask - 1; mask <<= offset; @@ -430,7 +417,7 @@ static int __reg_op(unsigned long *bitma if (bitmap[index + i] & mask) goto done; } - ret = 1; /* all bits in region free (zero) */ + ret = 1; break; case REG_OP_ALLOC: @@ -447,24 +434,11 @@ done: return ret; } -/** - * bitmap_find_free_region - find a contiguous aligned mem region - * @bitmap: array of unsigned longs corresponding to the bitmap - * @bits: number of bits in the bitmap - * @order: region size (log base 2 of number of bits) to find - * - * Find a region of free (zero) bits in a @bitmap of @bits bits and - * allocate them (set them to one). Only consider regions of length - * a power (@order) of two, aligned to that power of two, which - * makes the search algorithm much faster. - * - * Return the bit offset in bitmap of the allocated region, - * or -errno on failure. - */ static inline int bitmap_find_free_region(unsigned long *bitmap, int bits, int order) { - int pos, end; /* scans bitmap by regions of size order */ + int pos; + int end; for (pos = 0 ; (end = pos + (1 << order)) <= bits; pos = end) { if (!__reg_op(bitmap, pos, order, REG_OP_ISFREE)) @@ -475,18 +449,6 @@ bitmap_find_free_region(unsigned long *b return -ENOMEM; } -/** - * bitmap_allocate_region - allocate bitmap region - * @bitmap: array of unsigned longs corresponding to the bitmap - * @pos: beginning of bit region to allocate - * @order: region size (log base 2 of number of bits) to allocate - * - * Allocate (set bits in) a specified region of a bitmap. - * - * Return 0 on success, or %-EBUSY if specified region wasn't - * free (not all bits were zero). - */ - static inline int bitmap_allocate_region(unsigned long *bitmap, int pos, int order) { @@ -496,17 +458,6 @@ bitmap_allocate_region(unsigned long *bi return 0; } -/** - * bitmap_release_region - release allocated bitmap region - * @bitmap: array of unsigned longs corresponding to the bitmap - * @pos: beginning of bit region to release - * @order: region size (log base 2 of number of bits) to release - * - * This is the complement to __bitmap_find_free_region() and releases - * the found region (by clearing it in the bitmap). - * - * No return value. - */ static inline void bitmap_release_region(unsigned long *bitmap, int pos, int order) { From owner-svn-src-all@freebsd.org Tue Oct 20 10:16: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 D528FA184A0; Tue, 20 Oct 2015 10:16:06 +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 5413562C; Tue, 20 Oct 2015 10:16:06 +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 t9KAG4hs075490; Tue, 20 Oct 2015 10:16:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KAG4QF075488; Tue, 20 Oct 2015 10:16:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510201016.t9KAG4QF075488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 20 Oct 2015 10:16:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289622 - 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, 20 Oct 2015 10:16:07 -0000 Author: mav Date: Tue Oct 20 10:16:03 2015 New Revision: 289622 URL: https://svnweb.freebsd.org/changeset/base/289622 Log: Zero mbox[0] for INIT_FIRMWARE to fix version 7.3 firmware. While there, add new fields to isp_icb_2400_t structure. 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 Tue Oct 20 09:13:35 2015 (r289621) +++ head/sys/dev/isp/isp.c Tue Oct 20 10:16:03 2015 (r289622) @@ -1954,6 +1954,7 @@ isp_fibre_init(ispsoftc_t *isp) * Init the firmware */ MBSINIT(&mbs, MBOX_INIT_FIRMWARE, MBLOGALL, 30000000); + mbs.param[1] = 0; mbs.param[2] = DMA_WD1(fcp->isp_scdma); mbs.param[3] = DMA_WD0(fcp->isp_scdma); mbs.param[6] = DMA_WD3(fcp->isp_scdma); @@ -2253,6 +2254,7 @@ isp_fibre_init_2400(ispsoftc_t *isp) } else { mbs.param[0] = MBOX_INIT_FIRMWARE; } + mbs.param[1] = 0; mbs.param[2] = DMA_WD1(fcp->isp_scdma); mbs.param[3] = DMA_WD0(fcp->isp_scdma); mbs.param[6] = DMA_WD3(fcp->isp_scdma); @@ -7108,7 +7110,7 @@ static const uint32_t mbpfc[] = { ISP_FC_OPMAP(0x00, 0x00), /* 0x45: */ ISP_FC_OPMAP(0x00, 0x00), /* 0x46: */ ISP_FC_OPMAP(0xcf, 0x03), /* 0x47: GET PORT_DATABASE ENHANCED */ - ISP_FC_OPMAP(0xcd, 0x01), /* 0x48: MBOX_INIT_FIRMWARE_MULTI_ID */ + ISP_FC_OPMAP(0xcf, 0x0f), /* 0x48: MBOX_INIT_FIRMWARE_MULTI_ID */ ISP_FC_OPMAP(0xcd, 0x01), /* 0x49: MBOX_GET_VP_DATABASE */ ISP_FC_OPMAP_HALF(0x2, 0xcd, 0x0, 0x01), /* 0x4a: MBOX_GET_VP_DATABASE_ENTRY */ ISP_FC_OPMAP(0x00, 0x00), /* 0x4b: */ @@ -7132,7 +7134,7 @@ static const uint32_t mbpfc[] = { ISP_FC_OPMAP(0x07, 0x03), /* 0x5d: MBOX_GET_SET_DATA_RATE */ ISP_FC_OPMAP(0x00, 0x00), /* 0x5e: */ ISP_FC_OPMAP(0x00, 0x00), /* 0x5f: */ - ISP_FC_OPMAP(0xcd, 0x01), /* 0x60: MBOX_INIT_FIRMWARE */ + ISP_FC_OPMAP(0xcf, 0x0f), /* 0x60: MBOX_INIT_FIRMWARE */ ISP_FC_OPMAP(0x00, 0x00), /* 0x61: */ ISP_FC_OPMAP(0x01, 0x01), /* 0x62: MBOX_INIT_LIP */ ISP_FC_OPMAP(0xcd, 0x03), /* 0x63: MBOX_GET_FC_AL_POSITION_MAP */ Modified: head/sys/dev/isp/ispmbox.h ============================================================================== --- head/sys/dev/isp/ispmbox.h Tue Oct 20 09:13:35 2015 (r289621) +++ head/sys/dev/isp/ispmbox.h Tue Oct 20 10:16:03 2015 (r289622) @@ -1055,8 +1055,10 @@ typedef struct { uint16_t icb_prqstqlen; uint16_t icb_rqstaddr[4]; uint16_t icb_respaddr[4]; - uint16_t icb_priaddr[4]; - uint16_t icb_reserved1[4]; + uint16_t icb_priaddr[4]; + uint16_t icb_msixresp; + uint16_t icb_msixatio; + uint16_t icb_reserved1[2]; uint16_t icb_atio_in; uint16_t icb_atioqlen; uint16_t icb_atioqaddr[4]; @@ -1065,7 +1067,11 @@ typedef struct { uint32_t icb_fwoptions1; uint32_t icb_fwoptions2; uint32_t icb_fwoptions3; - uint16_t icb_reserved2[12]; + uint16_t icb_qos; + uint16_t icb_reserved2[3]; + uint16_t icb_enodemac[3]; + uint16_t icb_disctime; + uint16_t icb_reserved3[4]; } isp_icb_2400_t; #define RQRSP_ADDR0015 0 From owner-svn-src-all@freebsd.org Tue Oct 20 11:37: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 29B2BA1A3F3; Tue, 20 Oct 2015 11:37:18 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD0C2EC9; Tue, 20 Oct 2015 11:37:17 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9KBbG7H099322; Tue, 20 Oct 2015 11:37:16 GMT (envelope-from pluknet@FreeBSD.org) Received: (from pluknet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KBbGMS099321; Tue, 20 Oct 2015 11:37:16 GMT (envelope-from pluknet@FreeBSD.org) Message-Id: <201510201137.t9KBbGMS099321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pluknet set sender to pluknet@FreeBSD.org using -f From: Sergey Kandaurov Date: Tue, 20 Oct 2015 11:37:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289623 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 20 Oct 2015 11:37:18 -0000 Author: pluknet Date: Tue Oct 20 11:37:16 2015 New Revision: 289623 URL: https://svnweb.freebsd.org/changeset/base/289623 Log: o NetBSD 7.0, OpenBSD 5.8, FreeBSD 10.2, OS X 10.11 added. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Tue Oct 20 10:16:03 2015 (r289622) +++ head/share/misc/bsd-family-tree Tue Oct 20 11:37:16 2015 (r289623) @@ -320,17 +320,21 @@ FreeBSD 5.2 | | | | | | OpenBSD 5.6 | | FreeBSD | | | | | 10.1 | | | DragonFly 4.0.1 - | | | | | - | | | | DragonFly 4.0.2 - | | | | | - | | | | DragonFly 4.0.3 - | | | | | - | | | | DragonFly 4.0.4 - | | | | | - | | | | DragonFly 4.0.5 - | | | | | - | | | OpenBSD 5.7 | - | | | | DragonFly 4.2.0 + | | | | | | + | | | | | DragonFly 4.0.2 + | | | | | | + | | | | | DragonFly 4.0.3 + | | | | | | + | | | | | DragonFly 4.0.4 + | | | | | | + | | | | | DragonFly 4.0.5 + | | | | | | + | | | | OpenBSD 5.7 | + | | | | | DragonFly 4.2.0 + | FreeBSD | | | | + | 10.2 | | | | + | OS X NetBSD 7.0 | | + | 10.11 | OpenBSD 5.8 | | | | | | FreeBSD 11 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | @@ -673,6 +677,10 @@ DragonFly 4.0.4 2015-03-09 [DFB] DragonFly 4.0.5 2015-03-23 [DFB] OpenBSD 5.7 2015-05-01 [OBD] DragonFly 4.2.0 2015-06-29 [DFB] +FreeBSD 10.2 2015-08-13 [FBD] +NetBSD 7.0 2015-09-25 [NBD] +OS X 10.11 2015-09-30 [APL] +OpenBSD 5.8 2015-10-18 [OBD] Bibliography ------------------------ From owner-svn-src-all@freebsd.org Tue Oct 20 11:40: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 26BD8A1A482; Tue, 20 Oct 2015 11:40:13 +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 DBF651165; Tue, 20 Oct 2015 11:40:12 +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 t9KBeC6b099645; Tue, 20 Oct 2015 11:40:12 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KBe5LW099572; Tue, 20 Oct 2015 11:40:05 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510201140.t9KBe5LW099572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 20 Oct 2015 11:40:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289624 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 20 Oct 2015 11:40:13 -0000 Author: hselasky Date: Tue Oct 20 11:40:04 2015 New Revision: 289624 URL: https://svnweb.freebsd.org/changeset/base/289624 Log: Add missing FreeBSD RCS keyword and SVN properties. Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/bitops.h (contents, props changed) head/sys/ofed/include/linux/cache.h (contents, props changed) head/sys/ofed/include/linux/cdev.h (contents, props changed) head/sys/ofed/include/linux/clocksource.h (contents, props changed) head/sys/ofed/include/linux/compat.h (contents, props changed) head/sys/ofed/include/linux/compiler.h (contents, props changed) head/sys/ofed/include/linux/completion.h (contents, props changed) head/sys/ofed/include/linux/delay.h (contents, props changed) head/sys/ofed/include/linux/device.h (contents, props changed) head/sys/ofed/include/linux/dma-attrs.h (contents, props changed) head/sys/ofed/include/linux/dma-mapping.h (contents, props changed) head/sys/ofed/include/linux/dmapool.h (contents, props changed) head/sys/ofed/include/linux/err.h (contents, props changed) head/sys/ofed/include/linux/errno.h (contents, props changed) head/sys/ofed/include/linux/etherdevice.h (contents, props changed) head/sys/ofed/include/linux/file.h (contents, props changed) head/sys/ofed/include/linux/fs.h (contents, props changed) head/sys/ofed/include/linux/gfp.h (contents, props changed) head/sys/ofed/include/linux/hardirq.h (contents, props changed) head/sys/ofed/include/linux/idr.h (contents, props changed) head/sys/ofed/include/linux/if_arp.h (contents, props changed) head/sys/ofed/include/linux/if_ether.h (contents, props changed) head/sys/ofed/include/linux/if_vlan.h (contents, props changed) head/sys/ofed/include/linux/in.h (contents, props changed) head/sys/ofed/include/linux/in6.h (contents, props changed) head/sys/ofed/include/linux/inetdevice.h (contents, props changed) head/sys/ofed/include/linux/interrupt.h (contents, props changed) head/sys/ofed/include/linux/ioctl.h (contents, props changed) head/sys/ofed/include/linux/jiffies.h (contents, props changed) head/sys/ofed/include/linux/kdev_t.h (contents, props changed) head/sys/ofed/include/linux/kernel.h (contents, props changed) head/sys/ofed/include/linux/kmod.h (contents, props changed) head/sys/ofed/include/linux/kobject.h (contents, props changed) head/sys/ofed/include/linux/kref.h (contents, props changed) head/sys/ofed/include/linux/kthread.h (contents, props changed) head/sys/ofed/include/linux/ktime.h (contents, props changed) head/sys/ofed/include/linux/list.h (contents, props changed) head/sys/ofed/include/linux/lockdep.h (contents, props changed) head/sys/ofed/include/linux/log2.h (contents, props changed) head/sys/ofed/include/linux/math64.h (contents, props changed) head/sys/ofed/include/linux/miscdevice.h (contents, props changed) head/sys/ofed/include/linux/mm.h (contents, props changed) head/sys/ofed/include/linux/module.h (contents, props changed) head/sys/ofed/include/linux/moduleparam.h (contents, props changed) head/sys/ofed/include/linux/mutex.h (contents, props changed) head/sys/ofed/include/linux/net.h (contents, props changed) head/sys/ofed/include/linux/netdevice.h (contents, props changed) head/sys/ofed/include/linux/notifier.h (contents, props changed) head/sys/ofed/include/linux/page.h (contents, props changed) head/sys/ofed/include/linux/pci.h (contents, props changed) head/sys/ofed/include/linux/poll.h (contents, props changed) head/sys/ofed/include/linux/printk.h (contents, props changed) head/sys/ofed/include/linux/radix-tree.h (contents, props changed) head/sys/ofed/include/linux/random.h (contents, props changed) head/sys/ofed/include/linux/rbtree.h (contents, props changed) head/sys/ofed/include/linux/rwlock.h (contents, props changed) head/sys/ofed/include/linux/rwsem.h (contents, props changed) head/sys/ofed/include/linux/scatterlist.h (contents, props changed) head/sys/ofed/include/linux/sched.h (contents, props changed) head/sys/ofed/include/linux/semaphore.h (contents, props changed) head/sys/ofed/include/linux/slab.h (contents, props changed) head/sys/ofed/include/linux/socket.h (contents, props changed) head/sys/ofed/include/linux/spinlock.h (contents, props changed) head/sys/ofed/include/linux/string.h (contents, props changed) head/sys/ofed/include/linux/sysfs.h (contents, props changed) head/sys/ofed/include/linux/timer.h (contents, props changed) head/sys/ofed/include/linux/types.h (contents, props changed) head/sys/ofed/include/linux/uaccess.h (contents, props changed) head/sys/ofed/include/linux/wait.h (contents, props changed) head/sys/ofed/include/linux/workqueue.h (contents, props changed) Modified: head/sys/ofed/include/linux/bitops.h ============================================================================== --- head/sys/ofed/include/linux/bitops.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/bitops.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/cache.h ============================================================================== --- head/sys/ofed/include/linux/cache.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/cache.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/cdev.h ============================================================================== --- head/sys/ofed/include/linux/cdev.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/cdev.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/clocksource.h ============================================================================== --- head/sys/ofed/include/linux/clocksource.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/clocksource.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/compat.h ============================================================================== --- head/sys/ofed/include/linux/compat.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/compat.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/compiler.h ============================================================================== --- head/sys/ofed/include/linux/compiler.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/compiler.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/completion.h ============================================================================== --- head/sys/ofed/include/linux/completion.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/completion.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/delay.h ============================================================================== --- head/sys/ofed/include/linux/delay.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/delay.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/device.h ============================================================================== --- head/sys/ofed/include/linux/device.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/device.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/dma-attrs.h ============================================================================== --- head/sys/ofed/include/linux/dma-attrs.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/dma-attrs.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/dma-mapping.h ============================================================================== --- head/sys/ofed/include/linux/dma-mapping.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/dma-mapping.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/dmapool.h ============================================================================== --- head/sys/ofed/include/linux/dmapool.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/dmapool.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/err.h ============================================================================== --- head/sys/ofed/include/linux/err.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/err.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/errno.h ============================================================================== --- head/sys/ofed/include/linux/errno.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/errno.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/etherdevice.h ============================================================================== --- head/sys/ofed/include/linux/etherdevice.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/etherdevice.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Mellanox Technologies, Ltd. All rights reserved. Modified: head/sys/ofed/include/linux/file.h ============================================================================== --- head/sys/ofed/include/linux/file.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/file.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/fs.h ============================================================================== --- head/sys/ofed/include/linux/fs.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/fs.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/gfp.h ============================================================================== --- head/sys/ofed/include/linux/gfp.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/gfp.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/hardirq.h ============================================================================== --- head/sys/ofed/include/linux/hardirq.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/hardirq.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/idr.h ============================================================================== --- head/sys/ofed/include/linux/idr.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/idr.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/if_arp.h ============================================================================== --- head/sys/ofed/include/linux/if_arp.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/if_arp.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/if_ether.h ============================================================================== --- head/sys/ofed/include/linux/if_ether.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/if_ether.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/if_vlan.h ============================================================================== --- head/sys/ofed/include/linux/if_vlan.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/if_vlan.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/in.h ============================================================================== --- head/sys/ofed/include/linux/in.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/in.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/in6.h ============================================================================== --- head/sys/ofed/include/linux/in6.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/in6.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/inetdevice.h ============================================================================== --- head/sys/ofed/include/linux/inetdevice.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/inetdevice.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/interrupt.h ============================================================================== --- head/sys/ofed/include/linux/interrupt.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/interrupt.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/ioctl.h ============================================================================== --- head/sys/ofed/include/linux/ioctl.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/ioctl.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/jiffies.h ============================================================================== --- head/sys/ofed/include/linux/jiffies.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/jiffies.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/kdev_t.h ============================================================================== --- head/sys/ofed/include/linux/kdev_t.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/kdev_t.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/kernel.h ============================================================================== --- head/sys/ofed/include/linux/kernel.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/kernel.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/kmod.h ============================================================================== --- head/sys/ofed/include/linux/kmod.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/kmod.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/kobject.h ============================================================================== --- head/sys/ofed/include/linux/kobject.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/kobject.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/kref.h ============================================================================== --- head/sys/ofed/include/linux/kref.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/kref.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/kthread.h ============================================================================== --- head/sys/ofed/include/linux/kthread.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/kthread.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/ktime.h ============================================================================== --- head/sys/ofed/include/linux/ktime.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/ktime.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2014-2015 Mellanox Technologies, Ltd. * Copyright (c) 2015 François Tigeot Modified: head/sys/ofed/include/linux/list.h ============================================================================== --- head/sys/ofed/include/linux/list.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/list.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/lockdep.h ============================================================================== --- head/sys/ofed/include/linux/lockdep.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/lockdep.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/log2.h ============================================================================== --- head/sys/ofed/include/linux/log2.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/log2.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/math64.h ============================================================================== --- head/sys/ofed/include/linux/math64.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/math64.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014-2015 Mellanox Technologies, Ltd. All rights reserved. Modified: head/sys/ofed/include/linux/miscdevice.h ============================================================================== --- head/sys/ofed/include/linux/miscdevice.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/miscdevice.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/mm.h ============================================================================== --- head/sys/ofed/include/linux/mm.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/mm.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/module.h ============================================================================== --- head/sys/ofed/include/linux/module.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/module.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/moduleparam.h ============================================================================== --- head/sys/ofed/include/linux/moduleparam.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/moduleparam.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/mutex.h ============================================================================== --- head/sys/ofed/include/linux/mutex.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/mutex.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/net.h ============================================================================== --- head/sys/ofed/include/linux/net.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/net.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/netdevice.h ============================================================================== --- head/sys/ofed/include/linux/netdevice.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/netdevice.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/notifier.h ============================================================================== --- head/sys/ofed/include/linux/notifier.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/notifier.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/page.h ============================================================================== --- head/sys/ofed/include/linux/page.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/page.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/pci.h ============================================================================== --- head/sys/ofed/include/linux/pci.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/pci.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/poll.h ============================================================================== --- head/sys/ofed/include/linux/poll.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/poll.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/printk.h ============================================================================== --- head/sys/ofed/include/linux/printk.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/printk.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/radix-tree.h ============================================================================== --- head/sys/ofed/include/linux/radix-tree.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/radix-tree.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/random.h ============================================================================== --- head/sys/ofed/include/linux/random.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/random.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/rbtree.h ============================================================================== --- head/sys/ofed/include/linux/rbtree.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/rbtree.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/rwlock.h ============================================================================== --- head/sys/ofed/include/linux/rwlock.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/rwlock.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/rwsem.h ============================================================================== --- head/sys/ofed/include/linux/rwsem.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/rwsem.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/scatterlist.h ============================================================================== --- head/sys/ofed/include/linux/scatterlist.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/scatterlist.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/sched.h ============================================================================== --- head/sys/ofed/include/linux/sched.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/sched.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/semaphore.h ============================================================================== --- head/sys/ofed/include/linux/semaphore.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/semaphore.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/slab.h ============================================================================== --- head/sys/ofed/include/linux/slab.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/slab.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/socket.h ============================================================================== --- head/sys/ofed/include/linux/socket.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/socket.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/spinlock.h ============================================================================== --- head/sys/ofed/include/linux/spinlock.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/spinlock.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/string.h ============================================================================== --- head/sys/ofed/include/linux/string.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/string.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/sysfs.h ============================================================================== --- head/sys/ofed/include/linux/sysfs.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/sysfs.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/timer.h ============================================================================== --- head/sys/ofed/include/linux/timer.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/timer.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/types.h ============================================================================== --- head/sys/ofed/include/linux/types.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/types.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/uaccess.h ============================================================================== --- head/sys/ofed/include/linux/uaccess.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/uaccess.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/wait.h ============================================================================== --- head/sys/ofed/include/linux/wait.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/wait.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/workqueue.h ============================================================================== --- head/sys/ofed/include/linux/workqueue.h Tue Oct 20 11:37:16 2015 (r289623) +++ head/sys/ofed/include/linux/workqueue.h Tue Oct 20 11:40:04 2015 (r289624) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. From owner-svn-src-all@freebsd.org Tue Oct 20 11:42: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 A62BDA1A529; Tue, 20 Oct 2015 11:42:01 +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 70DA017E2; Tue, 20 Oct 2015 11:42: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 t9KBg0kQ002376; Tue, 20 Oct 2015 11:42:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KBg0bK002375; Tue, 20 Oct 2015 11:42:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510201142.t9KBg0bK002375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 20 Oct 2015 11:42:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289625 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 20 Oct 2015 11:42:01 -0000 Author: hselasky Date: Tue Oct 20 11:42:00 2015 New Revision: 289625 URL: https://svnweb.freebsd.org/changeset/base/289625 Log: Add missing dash to copyright clause. Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/time.h Modified: head/sys/ofed/include/linux/time.h ============================================================================== --- head/sys/ofed/include/linux/time.h Tue Oct 20 11:40:04 2015 (r289624) +++ head/sys/ofed/include/linux/time.h Tue Oct 20 11:42:00 2015 (r289625) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* +/*- * Copyright (c) 2014-2015 François Tigeot * All rights reserved. * From owner-svn-src-all@freebsd.org Tue Oct 20 12: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 03275A184C8; Tue, 20 Oct 2015 12:28: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 94D2F11CA; Tue, 20 Oct 2015 12:28: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 t9KCRx9Z014042; Tue, 20 Oct 2015 12:27:59 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KCRxax014039; Tue, 20 Oct 2015 12:27:59 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510201227.t9KCRxax014039@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 20 Oct 2015 12:27:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289626 - in head/sys: dev/isp dev/ispfw modules/ispfw modules/ispfw/isp_2400_multi modules/ispfw/isp_2500_multi X-SVN-Group: head MIME-Version: 1.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, 20 Oct 2015 12:28:01 -0000 Author: mav Date: Tue Oct 20 12:27:59 2015 New Revision: 289626 URL: https://svnweb.freebsd.org/changeset/base/289626 Log: Update firmware images for Qlogic 24xx/25xx from 5.5.0 to 7.3.0. This also removes separate "_multi" images, since this funcationality is now in base, and there is simply no new images without it for years. Deleted: head/sys/modules/ispfw/isp_2400_multi/ head/sys/modules/ispfw/isp_2500_multi/ Modified: head/sys/dev/isp/isp_pci.c head/sys/dev/ispfw/asm_2400.h head/sys/dev/ispfw/asm_2500.h head/sys/dev/ispfw/ispfw.c head/sys/modules/ispfw/Makefile Modified: head/sys/dev/isp/isp_pci.c ============================================================================== --- head/sys/dev/isp/isp_pci.c Tue Oct 20 11:42:00 2015 (r289625) +++ head/sys/dev/isp/isp_pci.c Tue Oct 20 12:27:59 2015 (r289626) @@ -899,9 +899,6 @@ isp_pci_attach(device_t dev) if (IS_SCSI(isp) && (ISP_SPI_PC(isp, 0)->def_role & ISP_ROLE_TARGET)) { snprintf(fwname, sizeof (fwname), "isp_%04x_it", did); isp->isp_osinfo.fw = firmware_get(fwname); - } else if (IS_24XX(isp)) { - snprintf(fwname, sizeof (fwname), "isp_%04x_multi", did); - isp->isp_osinfo.fw = firmware_get(fwname); } if (isp->isp_osinfo.fw == NULL) { snprintf(fwname, sizeof (fwname), "isp_%04x", did); Modified: head/sys/dev/ispfw/asm_2400.h ============================================================================== --- head/sys/dev/ispfw/asm_2400.h Tue Oct 20 11:42:00 2015 (r289625) +++ head/sys/dev/ispfw/asm_2400.h Tue Oct 20 12:27:59 2015 (r289626) @@ -1,6 +1,6 @@ /* $FreeBSD$ */ /*- - * Copyright (C) 2005-2010 by Qlogic, Inc. + * Copyright (C) 2005-2014 by Qlogic, Inc. * All rights reserved. * * Redistribution and use in source and binary forms are permitted provided @@ -25,23 +25,23 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* - * Firmware Version 5.05.00 (15:31 Dec 14, 2010) + * Firmware Version 7.03.00 (Apr 14, 2014) */ #ifdef ISP_2400 static const uint32_t isp_2400_risc_code[] = { - 0x0401f195, 0x00110000, 0x00100000, 0x0000afb1, - 0x00000005, 0x00000005, 0x00000000, 0x00008482, + 0x0401f195, 0x00112000, 0x00100000, 0x0000c798, + 0x00000007, 0x00000003, 0x00000000, 0x00009496, 0x00000003, 0x00000000, 0x20434f50, 0x59524947, 0x48542032, 0x30303720, 0x514c4f47, 0x49432043, 0x4f52504f, 0x52415449, 0x4f4e2020, 0x20495350, 0x32347878, 0x20466972, 0x6d776172, 0x65202020, - 0x56657273, 0x696f6e20, 0x2020352e, 0x30352e30, + 0x56657273, 0x696f6e20, 0x2020372e, 0x30332e30, 0x30202024, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x42001800, 0x0010014c, 0x42002000, 0x0010bdc7, + 0x42001800, 0x0010014c, 0x42002000, 0x0010e36f, 0x500c0800, 0x800c1800, 0x500c1000, 0x800c1800, 0x54042000, 0x80102000, 0x80040800, 0x80081040, 0x040207fc, 0x500c0800, 0x800409c0, 0x040207f6, @@ -124,23 +124,23 @@ static const uint32_t isp_2400_risc_code 0x00006150, 0x00000010, 0x00006170, 0x00000010, 0x00006190, 0x00000010, 0x000061b0, 0x00000010, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00100000, 0x00100000, 0x0000afb1, - 0xffffffff, 0x00110004, 0x00020000, 0x00000b53, - 0xffffffff, 0x00110b57, 0x0010d700, 0x00001ac0, - 0xffffffff, 0x00112617, 0x0000c000, 0x000007e8, - 0x00ffffff, 0x00112dff, 0x00008000, 0x000005e5, + 0x00000000, 0x00100000, 0x00100000, 0x0000c798, + 0xffffffff, 0x00112004, 0x00020000, 0x00000c50, + 0xffffffff, 0x00112c54, 0x0010fd00, 0x00001b58, + 0xffffffff, 0x001147ac, 0x0000c000, 0x000008b1, + 0x00ffffff, 0x0011505d, 0x00008000, 0x00000696, 0x00ffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x4203f000, 0x00021fff, 0x40000000, 0x4203e000, 0x90000100, 0x40000000, 0x42000800, - 0x00020b54, 0x4202f000, 0x00000000, 0x42000000, + 0x00020c51, 0x4202f000, 0x00000000, 0x42000000, 0x00007023, 0x50000000, 0x8c000500, 0x04020003, 0x42000800, 0x00020000, 0x45780800, 0x80040800, 0x82040580, 0x00022000, 0x040207fc, 0x4178a000, - 0x4200a800, 0x0010afb1, 0x42000800, 0x0010d700, - 0x40540000, 0x8004b480, 0x0201f800, 0x0010aeeb, - 0x0401fac9, 0x0401fa00, 0x4803c856, 0x42000000, + 0x4200a800, 0x0010c798, 0x42000800, 0x0010fd00, + 0x40540000, 0x8004b480, 0x0201f800, 0x0010c5e6, + 0x0401fade, 0x0401fa0a, 0x4803c856, 0x42000000, 0x00001000, 0x50000000, 0x82000480, 0x24320002, - 0x0402000d, 0x0201f800, 0x0010af26, 0x04000008, + 0x0402000d, 0x0201f800, 0x0010c62d, 0x04000008, 0x42000800, 0x00007a17, 0x50040000, 0x8c00050e, 0x04020003, 0x8400054e, 0x44000800, 0x4a030000, 0x00000000, 0x4a03c020, 0x00000004, 0x4203e000, @@ -148,14743 +148,177 @@ static const uint32_t isp_2400_risc_code 0x00000003, 0x59e00023, 0x8c000500, 0x04020027, 0x42002800, 0x0010017d, 0x58140800, 0x4817c857, 0x4807c857, 0x800409c0, 0x0400000b, 0x58142002, - 0x4813c857, 0x58141003, 0x4c140000, 0x0401fa95, + 0x4813c857, 0x58141003, 0x4c140000, 0x0401faaa, 0x5c002800, 0x0402002a, 0x82142c00, 0x00000004, 0x0401f7f2, 0x42002800, 0x0010017d, 0x5814a000, 0x4817c857, 0x4853c857, 0x8050a1c0, 0x0400000f, 0x4c140000, 0x5814a801, 0x4857c857, 0x40500000, 0x80540480, 0x04000005, 0x5814b002, 0x485bc857, - 0x0201f800, 0x0010aee2, 0x5c002800, 0x82142c00, + 0x0201f800, 0x0010c5dd, 0x5c002800, 0x82142c00, 0x00000004, 0x0401f7ee, 0x42002800, 0x0010017d, 0x58140801, 0x4817c857, 0x4807c857, 0x800409c0, 0x04000018, 0x58142002, 0x4813c857, 0x58141003, - 0x4c140000, 0x0401fa6f, 0x04020005, 0x5c002800, + 0x4c140000, 0x0401fa84, 0x04020005, 0x5c002800, 0x82142c00, 0x00000004, 0x0401f7f2, 0x4803c856, 0x4a03c020, 0x00004010, 0x4a03c011, 0x40100011, 0x04006000, 0x4203e000, 0x40000000, 0x4a03c017, 0x00000000, 0x4203e000, 0x30000001, 0x0401f000, - 0x4803c856, 0x0201f800, 0x0010d704, 0x0401faf6, - 0x4a03c014, 0x001c001c, 0x42002000, 0x0010f1c0, - 0x0201f800, 0x0010aef3, 0x42000000, 0x00001000, - 0x50000000, 0x82000480, 0x24220001, 0x04000906, + 0x4803c856, 0x0201f800, 0x0010fd04, 0x0401fb0b, + 0x4a03c014, 0x001c001c, 0x42002000, 0x00111858, + 0x0201f800, 0x0010c5ee, 0x42000000, 0x00001000, + 0x50000000, 0x82000480, 0x24220001, 0x04000908, 0x42000000, 0x00001000, 0x50000000, 0x82000480, - 0x24320001, 0x04000900, 0x59c40000, 0x82000500, + 0x24320001, 0x04000902, 0x59c40000, 0x82000500, 0xffff0000, 0x80000120, 0x82000580, 0x00002422, - 0x04020005, 0x59a8006d, 0x84000540, 0x4803506d, + 0x04020005, 0x59a8007e, 0x84000540, 0x4803507e, 0x0401f00a, 0x59e00003, 0x82000500, 0x00030000, - 0x82000580, 0x00010000, 0x04020004, 0x59a8006d, - 0x84000542, 0x4803506d, 0x4c140000, 0x0201f800, - 0x0010a6a0, 0x5c002800, 0x42000800, 0x00001100, + 0x82000580, 0x00010000, 0x04020004, 0x59a8007e, + 0x84000542, 0x4803507e, 0x4c140000, 0x0201f800, + 0x0010bd98, 0x5c002800, 0x42000800, 0x00001100, 0x42001800, 0x00000100, 0x82141480, 0x0017ffff, 0x0402100d, 0x42000800, 0x00000900, 0x82141480, - 0x0013ffff, 0x04021008, 0x42000800, 0x00000480, - 0x42001800, 0x00000080, 0x82141480, 0x0011ffff, - 0x040018d5, 0x4807500d, 0x480f5251, 0x42001000, - 0x00000024, 0x0201f800, 0x00105fef, 0x82040c00, - 0x0010f694, 0x4807500b, 0x4a03c810, 0x00100000, - 0x4a03c811, 0x0010afb1, 0x4a03c812, 0x0010d700, - 0x4a03c813, 0x0010f1bf, 0x4a03c829, 0x00000004, + 0x0013ffff, 0x04021008, 0x42000800, 0x00000240, + 0x42001800, 0x00000040, 0x82141480, 0x0011ffff, + 0x040018d7, 0x48075013, 0x480f5257, 0x42001000, + 0x0000002c, 0x0201f800, 0x00106fe1, 0x82040c00, + 0x00111d44, 0x4807500b, 0x4a03c810, 0x00100000, + 0x4a03c811, 0x0010c798, 0x4a03c812, 0x0010fd00, + 0x4a03c813, 0x00111857, 0x4a03c829, 0x00000004, 0x59e40001, 0x82000540, 0x0003403f, 0x4803c801, - 0x42001000, 0x0000001c, 0x0401f9f0, 0x4202c000, - 0x0010f694, 0x59aab00b, 0x59aaa00b, 0x59aaa80b, - 0x59aac80d, 0x49675050, 0x59a8000b, 0x4803500c, - 0x0201f800, 0x00107133, 0x0401fac4, 0x0401fb14, - 0x0201f800, 0x001017f9, 0x0201f800, 0x001010ea, - 0x0401fbdb, 0x0201f800, 0x00100ca5, 0x0201f800, - 0x0010602f, 0x0401f85c, 0x0201f800, 0x00101c0f, - 0x0201f800, 0x00104bce, 0x0201f800, 0x001044e5, - 0x0201f800, 0x00105acd, 0x0201f800, 0x001057ce, - 0x0201f800, 0x0010118f, 0x0201f800, 0x00100ff2, - 0x4203e000, 0xf0000001, 0x0201f800, 0x0010af45, - 0x4a03c018, 0x00000000, 0x4203e000, 0x20000511, - 0x4203e000, 0x50010000, 0x4a03c020, 0x00000000, - 0x04027010, 0x59e00020, 0x82000580, 0x00000002, - 0x0402000c, 0x4a03c020, 0x00004000, 0x4a03c011, - 0x40000010, 0x04006000, 0x4203e000, 0x40000000, - 0x4a03c017, 0x00000000, 0x4203e000, 0x30000001, - 0x4202d800, 0x00000000, 0x4203e000, 0xb0600000, - 0x59a80071, 0x4003f800, 0x0201f000, 0x00020004, - 0x4df00000, 0x4203e000, 0x50000000, 0x416c0000, - 0x82000c80, 0x00000008, 0x0402186b, 0x0c01f804, - 0x5c03e000, 0x0201f000, 0x00020008, 0x001002d0, - 0x0010f007, 0x0010ef4c, 0x001002cf, 0x0010ef18, - 0x001002cf, 0x001002cf, 0x001002e2, 0x0401f85e, - 0x42000800, 0x0010b8fa, 0x5804001e, 0x8c000500, - 0x0400000d, 0x84000500, 0x4800081e, 0x4202d800, - 0x00000004, 0x0401f97b, 0x49f3c857, 0x5c000800, - 0x5c000000, 0x82000540, 0x00003e00, 0x4c000000, - 0x4c040000, 0x1c01f000, 0x4a038805, 0x000000f0, - 0x1c01f000, 0x4a035048, 0x00000005, 0x4a035049, - 0x00000005, 0x4a03504a, 0x00000000, 0x4a03504b, - 0x00008482, 0x0201f800, 0x00104b98, 0x4a03541b, - 0x0000ffff, 0x4a03500f, 0x00ffffff, 0x0201f800, - 0x00108c7d, 0x4a03501f, 0x20200000, 0x4a035020, - 0x88000200, 0x4a035021, 0x00ff001f, 0x4a035022, - 0x000007d0, 0x4a035023, 0x80000000, 0x4a035024, - 0x00000200, 0x4a035025, 0x00ff0000, 0x4a035026, - 0x00010000, 0x4a03502d, 0x514c4f47, 0x4a03502e, - 0x49432020, 0x1c01f000, 0x4d440000, 0x417a8800, - 0x4c5c0000, 0x4178b800, 0x0201f800, 0x00020319, - 0x04020005, 0x0201f800, 0x00104181, 0x04020002, - 0x805cb800, 0x81468800, 0x83440580, 0x000007f0, - 0x040207f6, 0x405c0800, 0x5c00b800, 0x5c028800, - 0x1c01f000, 0x4803c857, 0x5c000000, 0x4c000000, - 0x4803c857, 0x0401f80c, 0x485fc857, 0x4203e000, - 0x50000000, 0x5c000000, 0x4d780000, 0x4200b800, - 0x00008002, 0x0401f009, 0x486bc857, 0x486fc857, - 0x4873c857, 0x485fc857, 0x4203e000, 0x50000000, - 0x4200b800, 0x00008002, 0x04006000, 0x4c000000, - 0x4c040000, 0x59bc00ea, 0x4803c857, 0x82000500, - 0x00000007, 0x82000580, 0x00000001, 0x04020005, - 0x42000800, 0x00000000, 0x0201f800, 0x001061cb, - 0x59b800ea, 0x4803c857, 0x4a0370e8, 0x00000004, - 0x5c000800, 0x4807c025, 0x80040920, 0x4807c026, - 0x5c000000, 0x4803c023, 0x80000120, 0x4803c024, - 0x5c000000, 0x4803c857, 0x4803c021, 0x80000120, - 0x4803c022, 0x41f80000, 0x4803c029, 0x80000120, - 0x4803c02a, 0x42000000, 0x00001000, 0x50000000, - 0x82000480, 0x24320001, 0x4803c857, 0x0400104b, - 0x0201f800, 0x0010af26, 0x04000046, 0x42000800, - 0x0010c626, 0x46000800, 0xfaceface, 0x80040800, - 0x4c080000, 0x4c0c0000, 0x42001000, 0x00007a00, - 0x58080013, 0x44000800, 0x80040800, 0x58080019, - 0x44000800, 0x80040800, 0x5808001a, 0x44000800, - 0x80040800, 0x5808001b, 0x44000800, 0x80040800, - 0x5808001c, 0x44000800, 0x80040800, 0x5808001f, - 0x44000800, 0x80040800, 0x42001000, 0x00007a40, - 0x42001800, 0x0000000b, 0x50080000, 0x44000800, - 0x80081000, 0x80040800, 0x800c1840, 0x040207fb, - 0x42001800, 0x00000003, 0x42001000, 0x00007b00, - 0x480c1003, 0x58080005, 0x44000800, 0x80040800, - 0x800c1840, 0x040217fb, 0x42001000, 0x00007c00, - 0x58080002, 0x44000800, 0x80040800, 0x58080003, - 0x44000800, 0x80040800, 0x58080020, 0x44000800, - 0x80040800, 0x58080021, 0x44000800, 0x80040800, - 0x58080022, 0x44000800, 0x80040800, 0x58080023, - 0x44000800, 0x80040800, 0x5c001800, 0x5c001000, - 0x4a030000, 0x00000000, 0x485fc020, 0x905cb9c0, - 0x825cbd40, 0x00000012, 0x485fc011, 0x4203e000, - 0x40000000, 0x4202d800, 0x00000005, 0x4a03c017, - 0x00000000, 0x4203e000, 0x30000001, 0x0401f847, - 0x0401f7ff, 0x42000000, 0x00000004, 0x0401f80c, - 0x4a03c855, 0x0001eb5a, 0x59e40001, 0x82000540, - 0x00000700, 0x4803c801, 0x42000000, 0x0010bdb1, - 0x49780003, 0x49780004, 0x1c01f000, 0x42000800, - 0x0010bdb3, 0x44000800, 0x59e40801, 0x82041500, - 0xfff3c0ff, 0x480bc801, 0x8c040d24, 0x0400000c, - 0x4c000000, 0x59e41052, 0x59e40054, 0x800000d4, - 0x82000400, 0x0010c642, 0x80081480, 0x480bc853, - 0x4a03c800, 0x00000040, 0x5c000000, 0x4a03c850, - 0x0010c642, 0x800000d4, 0x82002400, 0x0010c641, - 0x4813c851, 0x4a03c853, 0x00000400, 0x42000000, - 0x0010c642, 0x82001400, 0x00001000, 0x45780000, - 0x80000000, 0x80081d80, 0x040207fd, 0x4807c801, - 0x1c01f000, 0x42002000, 0x0010bdb1, 0x59e41801, - 0x58100c01, 0x82040500, 0x00003800, 0x820c1d00, - 0xffffc7ff, 0x800c1d40, 0x480fc801, 0x1c01f000, - 0x5c036000, 0x4db00000, 0x49b3c857, 0x4803c857, - 0x1c01f000, 0x1c01f000, 0x59a80059, 0x8c000530, - 0x040207fe, 0x4c080000, 0x42001000, 0x00000004, - 0x0401f862, 0x5c001000, 0x4201d000, 0x00028b0a, - 0x0201f800, 0x001059d2, 0x4c080000, 0x42001000, - 0x00000008, 0x0401f859, 0x5c001000, 0x4201d000, - 0x00028b0a, 0x0201f800, 0x001059d2, 0x4c080000, - 0x42001000, 0x00000010, 0x0401f850, 0x5c001000, - 0x4201d000, 0x00028b0a, 0x0201f800, 0x001059d2, - 0x0401f7e2, 0x8c00050c, 0x59a80859, 0x04020003, - 0x84040d30, 0x0401f006, 0x84040d70, 0x48075059, - 0x42001000, 0x00000000, 0x0401f040, 0x48075059, - 0x836c0500, 0x00000007, 0x0c01f001, 0x00100461, - 0x00100447, 0x00100447, 0x0010042f, 0x00100454, - 0x00100447, 0x00100447, 0x00100454, 0x59a8006d, - 0x8c000502, 0x04020013, 0x59c40801, 0x82040d00, - 0x00018000, 0x82040580, 0x00010000, 0x0400000a, - 0x82040580, 0x00008000, 0x04000004, 0x42001000, - 0x42004000, 0x0401f006, 0x42001000, 0x22002000, - 0x0401f003, 0x42001000, 0x12001000, 0x0401f025, - 0x42001000, 0x00001004, 0x0401f022, 0x59a8006d, - 0x8c000502, 0x04020008, 0x59a80059, 0x8c000534, - 0x04020004, 0x42001000, 0x74057005, 0x0401f819, - 0x1c01f000, 0x42001000, 0x00002008, 0x0401f7fc, - 0x59a80059, 0x8c000534, 0x0402000a, 0x59a8006d, - 0x8c000502, 0x04000004, 0x42001000, 0x24052005, - 0x0401f00c, 0x42001000, 0x74057005, 0x0401f009, - 0x1c01f000, 0x1c01f000, 0x82081500, 0x0000001c, - 0x82081540, 0x001c0000, 0x480bc013, 0x1c01f000, - 0x59a80059, 0x8c000530, 0x04000002, 0x84081570, - 0x480b5059, 0x8c000530, 0x04020005, 0x82081500, - 0x00007000, 0x80081114, 0x0401fff0, 0x1c01f000, - 0x41780000, 0x50041800, 0x800c0400, 0x80040800, - 0x80102040, 0x040207fc, 0x80080500, 0x80000540, - 0x1c01f000, 0x4202f000, 0x00000000, 0x41780000, - 0x41780800, 0x41781000, 0x41781800, 0x41782000, - 0x41782800, 0x41783000, 0x41783800, 0x41784000, - 0x41784800, 0x41785000, 0x41785800, 0x41786000, - 0x41786800, 0x41787000, 0x41787800, 0x41788000, - 0x41788800, 0x41789000, 0x41789800, 0x4178a000, - 0x4178a800, 0x4178b000, 0x4178b800, 0x4178c000, - 0x4178c800, 0x4178d000, 0x4178d800, 0x4178e000, - 0x4178e800, 0x4178f000, 0x4178f800, 0x41790000, - 0x41790800, 0x41791000, 0x41791800, 0x41792000, - 0x41792800, 0x41793000, 0x41793800, 0x41794000, - 0x41794800, 0x41795000, 0x41795800, 0x41796000, - 0x41796800, 0x41797000, 0x41797800, 0x41798000, - 0x41798800, 0x42019000, 0x0010b989, 0x42019800, - 0x0010b960, 0x4179a000, 0x4179a800, 0x4179b000, - 0x4179b800, 0x4179c800, 0x4179c000, 0x4179d000, - 0x4179d800, 0x4179e000, 0x4179e800, 0x4179f000, - 0x4179f800, 0x417a0000, 0x417a0800, 0x417a1000, - 0x417a1800, 0x417a2000, 0x42022800, 0x00006100, - 0x417a3000, 0x417a3800, 0x417a4000, 0x417a4800, - 0x417a5000, 0x417a5800, 0x417a6000, 0x417a6800, - 0x417a7000, 0x417a7800, 0x417a8000, 0x417a8800, - 0x417a9000, 0x417a9800, 0x417ae800, 0x417af800, - 0x42030000, 0x00007c00, 0x42031000, 0x0010bc5a, - 0x42031800, 0x0000bf1d, 0x42032000, 0x0000bf32, - 0x42032800, 0x0010bc22, 0x42033000, 0x00020b5d, - 0x42034000, 0x0010b8fa, 0x42033800, 0x0010b919, - 0x42034800, 0x0010b998, 0x42035000, 0x0010b880, - 0x42035800, 0x0010b080, 0x42030800, 0x0010b95b, - 0x417b6000, 0x42036800, 0x00006f00, 0x4203c800, - 0x00003000, 0x42037000, 0x0000ff00, 0x42037800, - 0x0000bf00, 0x42038000, 0x00007700, 0x42038800, - 0x00004000, 0x42039000, 0x00006000, 0x42039800, - 0x0010c35e, 0x4203a000, 0x00007600, 0x4203a800, - 0x00007400, 0x4203b000, 0x00007200, 0x4203b800, - 0x00007100, 0x4203c000, 0x00007000, 0x4203d000, - 0x00000000, 0x4203e800, 0x0002018e, 0x417bd800, - 0x1c01f000, 0x42000800, 0x00100000, 0x50040000, - 0x4c000000, 0x42000000, 0x0000aaaa, 0x44000800, - 0x42001800, 0x00005555, 0x42002000, 0x00010000, - 0x82102400, 0x00010000, 0x40100000, 0x80042c00, - 0x440c2800, 0x42003000, 0x0000000a, 0x80183040, - 0x040207ff, 0x50140000, 0x800c0580, 0x04020004, - 0x50040000, 0x800c0580, 0x040207f2, 0x5c000000, - 0x44000800, 0x80142840, 0x4817c861, 0x4817500a, - 0x1c01f000, 0x40681800, 0x59a80819, 0x800409c0, - 0x04020008, 0x49781c0c, 0x4a001a0c, 0x00000002, - 0x4a001804, 0x00000007, 0x59a8000f, 0x48001805, - 0x0401fdce, 0x800409c0, 0x04020002, 0x80040800, - 0x48041806, 0x1c01f000, 0x59a8080c, 0x4006d000, - 0x4202b800, 0x00000001, 0x59a8180a, 0x480fc857, - 0x82041400, 0x00000015, 0x82082400, 0x00000015, - 0x40100000, 0x800c0480, 0x04001006, 0x44080800, - 0x40080800, 0x40101000, 0x815eb800, 0x0401f7f7, - 0x45780800, 0x495f501a, 0x1c01f000, 0x0401f803, - 0x412d8800, 0x1c01f000, 0x835c0480, 0x00000020, - 0x0400100a, 0x496bc857, 0x815eb840, 0x416a5800, - 0x592ed000, 0x497a5800, 0x497a5801, 0x497a5805, - 0x812e59c0, 0x1c01f000, 0x42000000, 0x0010bd0f, - 0x0201f800, 0x0010ae10, 0x417a5800, 0x0401f7f9, - 0x0401f803, 0x412d8800, 0x1c01f000, 0x815eb840, - 0x04001009, 0x416a5800, 0x492fc857, 0x592ed000, - 0x497a5800, 0x497a5801, 0x497a5805, 0x812e59c0, - 0x1c01f000, 0x42000000, 0x0010bd0f, 0x0201f800, - 0x0010ae10, 0x417ab800, 0x417a5800, 0x0401f7f8, - 0x492fc857, 0x496a5800, 0x412ed000, 0x815eb800, - 0x59c80000, 0x82000540, 0x00001200, 0x48039000, - 0x1c01f000, 0x492fc857, 0x812e59c0, 0x04000007, - 0x592c0001, 0x497a5801, 0x4c000000, 0x0401fff1, - 0x5c025800, 0x0401f7f9, 0x1c01f000, 0x4807c856, - 0x42007000, 0x00020b54, 0x4a007000, 0x00000000, - 0x59e00003, 0x82000540, 0x00008080, 0x4803c003, - 0x4a03b805, 0x90000001, 0x59dc0006, 0x4a03b805, - 0x70000000, 0x59dc0006, 0x4a03b805, 0x30000000, - 0x59dc0006, 0x4a03b805, 0x80000000, 0x4200b000, - 0x00000020, 0x497bb807, 0x8058b040, 0x040207fe, - 0x4a03b805, 0x30000000, 0x59dc0006, 0x4a03b805, - 0x60000001, 0x59dc0006, 0x4a03b805, 0x70000001, - 0x59dc0006, 0x4a03b805, 0x30000002, 0x4200b000, - 0x00000020, 0x497bb807, 0x8058b040, 0x040207fe, - 0x4a03b805, 0x30000000, 0x59dc0006, 0x4a03b805, - 0x60000001, 0x4803c856, 0x0401ff98, 0x04000d6a, - 0x42001000, 0x0010bc55, 0x452c1000, 0x4a025801, - 0x00000001, 0x4a025802, 0x00000100, 0x4a025808, - 0x00106826, 0x497a5809, 0x497a580a, 0x497a580b, - 0x0401ff8a, 0x04000d5c, 0x42001000, 0x0010bc56, - 0x452c1000, 0x4a025801, 0x00000000, 0x4a025802, - 0x00000100, 0x4a025808, 0x00100f2f, 0x497a5803, - 0x497a5806, 0x497a5807, 0x497a5809, 0x59a8006d, - 0x8c000500, 0x04000006, 0x4a03b805, 0xe0000001, - 0x59dc0006, 0x8c000522, 0x040007fc, 0x1c01f000, - 0x40681000, 0x0201f800, 0x00020016, 0x1c01f000, - 0x42001000, 0x00020026, 0x0201f800, 0x0010587d, - 0x0201f800, 0x00108d64, 0x0201f800, 0x0010a32a, - 0x04000014, 0x4a03b805, 0x30000002, 0x59dc0006, - 0x4807b800, 0x480bb801, 0x42007000, 0x00020b54, - 0x4a007002, 0x00000040, 0x480c7008, 0x58380007, - 0x82000400, 0x00000005, 0x48007003, 0x4a007000, - 0x00000003, 0x4803b803, 0x0201f000, 0x00020050, - 0x42000000, 0x0010bc77, 0x0201f800, 0x0010ae10, - 0x0201f800, 0x00108d7c, 0x42000800, 0x00000001, - 0x42001000, 0x00020026, 0x0201f800, 0x00105856, - 0x42007000, 0x00020b54, 0x0201f000, 0x00020030, - 0x58380802, 0x42001000, 0x0000ff00, 0x82040480, - 0x0000ff00, 0x04021003, 0x40041000, 0x80000580, - 0x48007002, 0x480bb802, 0x59dc0006, 0x4a03b805, - 0x10000000, 0x1c01f000, 0x4a03b805, 0x30000001, - 0x58386001, 0x58301008, 0x4807c857, 0x4803c857, - 0x4833c857, 0x4a006002, 0x00000200, 0x4a007000, - 0x00000000, 0x800811c0, 0x02000000, 0x0002002c, - 0x0201f000, 0x00020092, 0x59dc0006, 0x8c000520, - 0x0400000a, 0x02004800, 0x0002090c, 0x59dc0006, - 0x82000500, 0x00006000, 0x04000004, 0x82000580, - 0x00006000, 0x040207f8, 0x1c01f000, 0x41781800, - 0x58382005, 0x40300000, 0x80100580, 0x04000007, - 0x40101800, 0x58102000, 0x801021c0, 0x040207fa, - 0x4803c856, 0x0401f011, 0x4833c857, 0x58302000, - 0x49786000, 0x800c19c0, 0x04020008, 0x801021c0, - 0x04000003, 0x48107005, 0x0401f008, 0x49787005, - 0x49787004, 0x0401f005, 0x48101800, 0x801021c0, - 0x04020002, 0x480c7004, 0x1c01f000, 0x4803c856, - 0x4dc00000, 0x42007000, 0x0010bc58, 0x4a007400, - 0x00000000, 0x49787001, 0x42038000, 0x00007720, - 0x4a038006, 0x60000001, 0x4a038009, 0xf4f60000, - 0x42038000, 0x00007700, 0x4a038006, 0x60000001, - 0x4a038009, 0xf4f60000, 0x4a03c822, 0x00000010, - 0x4a0370e8, 0x00000000, 0x0401f809, 0x4a0370e9, - 0x00003a0f, 0x4a0370e8, 0x00000000, 0x4a0370e8, - 0x00000001, 0x5c038000, 0x1c01f000, 0x4c5c0000, - 0x4178b800, 0x0401f80a, 0x5c00b800, 0x1c01f000, - 0x4803c856, 0x4c5c0000, 0x825cbd40, 0x00000001, - 0x0401f803, 0x5c00b800, 0x1c01f000, 0x4803c856, - 0x4dc00000, 0x4c500000, 0x4c580000, 0x4c540000, - 0x4a0370e8, 0x00000000, 0x805cb9c0, 0x0400000b, - 0x4a038807, 0x00000004, 0x4a0370e5, 0x00080000, - 0x59b800ea, 0x8c000510, 0x04000004, 0x59b800e0, - 0x0401f879, 0x0401f7fb, 0x42038000, 0x00007720, - 0x0201f800, 0x00100c07, 0x59c00007, 0x4a038006, - 0x20000000, 0x59c00007, 0x4a038006, 0x8000000a, - 0x59c00007, 0x4a038006, 0x8000000b, 0x59c00007, - 0x4a038006, 0x40000001, 0x83c00580, 0x00007700, - 0x04000004, 0x42038000, 0x00007700, 0x0401f7ed, - 0x42038000, 0x00007720, 0x42000800, 0x00000800, - 0x59c00007, 0x8c00051e, 0x04000006, 0x4a038006, - 0x90000001, 0x80040840, 0x040207fa, 0x0401fc6e, - 0x83c00580, 0x00007700, 0x04000004, 0x42038000, - 0x00007700, 0x0401f7f1, 0x4178a000, 0x805cb9c0, - 0x0402001d, 0x4200b000, 0x00000020, 0x83b8ac00, - 0x00000020, 0x0201f800, 0x0010aeeb, 0x4a0370fb, - 0x00000001, 0x4a037020, 0x00100e3a, 0x59a8002c, - 0x82000500, 0x0000ffff, 0x48037021, 0x4a037035, - 0x0010c2a4, 0x4a037030, 0x0010b88f, 0x4a037031, - 0x0010b080, 0x4a037032, 0x0010b96b, 0x4a037036, - 0x0010b976, 0x59840002, 0x48037034, 0x4a037038, - 0x00100e31, 0x4a0370fb, 0x00000001, 0x4200b000, - 0x00000020, 0x83b8ac00, 0x00000000, 0x0201f800, - 0x0010aeeb, 0x4200b000, 0x00000040, 0x83b8ac00, - 0x00000040, 0x0201f800, 0x0010aeeb, 0x805cb9c0, - 0x04020004, 0x4a0370e4, 0xaaaaaaaa, 0x0401f003, - 0x4a0370e4, 0xa2aa2a82, 0x4a0370e5, 0xaaaaaaaa, - 0x4a0370e6, 0xaaaaaaaa, 0x4a0370fb, 0x00000000, - 0x4a0370e6, 0xaaaaaaaa, 0x42038000, 0x00007720, - 0x4a038006, 0x90000000, 0x59c00007, 0x8c00051e, - 0x04020c25, 0x42038000, 0x00007700, 0x4a038006, - 0x90000000, 0x59c00007, 0x8c00051e, 0x04020c1e, - 0x5c00a800, 0x5c00b000, 0x5c00a000, 0x5c038000, - 0x1c01f000, 0x4d300000, 0x4d380000, 0x40026000, - 0x82000500, 0x7f000000, 0x82000580, 0x60000000, - 0x04020012, 0x83326500, 0x00ffffff, 0x0201f800, - 0x00109291, 0x0402000d, 0x59300203, 0x82000580, - 0x00000004, 0x04020009, 0x59300c07, 0x82040580, - 0x00000009, 0x04020005, 0x42027000, 0x00000047, - 0x0201f800, 0x00020a34, 0x5c027000, 0x5c026000, - 0x1c01f000, 0x4d300000, 0x4d2c0000, 0x4d340000, - 0x4d400000, 0x4cfc0000, 0x4d380000, 0x4d3c0000, - 0x4d440000, 0x4d4c0000, 0x4d480000, 0x4c5c0000, - 0x4c600000, 0x4c640000, 0x4d040000, 0x4cc80000, - 0x4ccc0000, 0x4cf40000, 0x4cf80000, 0x0201f800, - 0x00020095, 0x5c01f000, 0x5c01e800, 0x5c019800, - 0x5c019000, 0x5c020800, 0x5c00c800, 0x5c00c000, - 0x5c00b800, 0x5c029000, 0x5c029800, 0x5c028800, - 0x5c027800, 0x5c027000, 0x5c01f800, 0x5c028000, - 0x5c026800, 0x5c025800, 0x5c026000, 0x1c01f000, - 0x493bc857, 0x0201f000, 0x000200bc, 0x83300500, - 0x000000ff, 0x82000c80, 0x00000007, 0x02021800, - 0x0010032d, 0x0c01f025, 0x1c01f000, 0x82000d00, - 0xc0000038, 0x02020800, 0x00100322, 0x0201f800, - 0x0010032d, 0x00000000, 0x00000048, 0x00000054, - 0x00000053, 0x00100784, 0x001007a8, 0x001007a3, - 0x001007c7, 0x0010078f, 0x0010079b, 0x00100784, - 0x001007c2, 0x0010080e, 0x00100784, 0x00100811, - 0x00100784, 0x00100784, 0x00100814, 0x0010081a, - 0x00100837, 0x0010084c, 0x00100784, 0x00100855, - 0x00100861, 0x00100784, 0x00100784, 0x00100784, - 0x0201f800, 0x0010032d, 0x0010078d, 0x001008f8, - 0x001007d4, 0x001007fd, 0x0010078d, 0x0010078d, - 0x0010078d, 0x0201f800, 0x0010032d, 0x4803c856, - 0x59300004, 0x8c00053e, 0x04020005, 0x42027000, - 0x00000055, 0x0201f000, 0x00020a34, 0x0201f800, - 0x001064f2, 0x040007fa, 0x1c01f000, 0x4803c856, - 0x0401f8c7, 0x40002800, 0x41782000, 0x42027000, - 0x00000056, 0x0201f000, 0x00020a34, 0x4803c856, - 0x42027000, 0x00000057, 0x0201f000, 0x00020a34, - 0x4803c856, 0x59325809, 0x812e59c0, 0x04000016, - 0x59300008, 0x8c00051a, 0x0402000d, 0x592c0409, - 0x8c00051c, 0x04020003, 0x4a026012, 0xffffffff, - 0x59300004, 0x8c00053e, 0x04020008, 0x42027000, - 0x00000048, 0x0201f000, 0x00020a34, 0x4a025a07, - 0x00000007, 0x0401f7f5, 0x0201f800, 0x001064f2, - 0x040007f7, 0x1c01f000, 0x4803c856, 0x83300500, - 0x00ffffff, 0x0201f000, 0x00105e17, 0x1c01f000, - 0x4c040000, 0x59b808ea, 0x82040d00, 0x00000007, - 0x82040580, 0x00000003, 0x04000004, 0x42000000, - 0x60000000, 0x0401f8c6, 0x5c000800, 0x1c01f000, - 0x0401f914, 0x0400001b, 0x59325809, 0x812e59c0, - 0x04000018, 0x592c0205, 0x82000500, 0x000000ff, - 0x82000d80, 0x00000029, 0x04020012, 0x59300203, - 0x82000580, 0x00000003, 0x0400000b, 0x59300808, - 0x84040d26, 0x48066008, 0x0201f800, 0x00020111, - 0x4a03900d, 0x00000040, 0x4a0370e5, 0x00000008, - 0x1c01f000, 0x0201f800, 0x001064f2, 0x040007f4, - 0x42000000, 0x0010bd15, 0x0201f800, 0x0010ae10, - 0x5988014a, 0x80000000, 0x4803114a, 0x4a03900d, - 0x00000040, 0x42000000, 0xc0000000, 0x0201f000, - 0x00020105, 0x4c5c0000, 0x4c600000, 0x4c640000, - 0x4200c800, 0x0010c2ab, 0x4200b800, 0x00003000, - 0x4200c000, 0x00000105, 0x0201f800, 0x00105655, - 0x4a0370e4, 0x02000000, 0x5c00c800, 0x5c00c000, - 0x5c00b800, 0x1c01f000, 0x4933c857, 0x0201f000, - 0x00020a10, 0x4933c857, 0x0401fbfd, 0x1c01f000, - 0x41300800, 0x800409c0, 0x02020800, 0x0010032d, - 0x0201f800, 0x00100322, 0x42000000, 0x0010bd15, - 0x0201f800, 0x0010ae10, 0x4933c857, 0x813261c0, - 0x02000800, 0x0010032d, 0x0401f841, 0x40002800, - 0x0201f800, 0x0010ad79, 0x4c140000, 0x59a8006a, - 0x80000540, 0x04000004, 0x8c142d2a, 0x04000002, - 0x0401fbe3, 0x5c002800, 0x0401f8ae, 0x04000007, - 0x5932680a, 0x59340200, 0x8c00050e, 0x59300415, - 0x02020800, 0x00108c33, 0x1c01f000, 0x42000000, - 0x0010bd15, 0x0201f800, 0x0010ae10, 0x4933c857, - 0x813261c0, 0x02000800, 0x0010032d, 0x0401f89d, - 0x0400000b, 0x0201f800, 0x00108953, 0x04000008, - 0x59325809, 0x592c0209, 0x8400054e, 0x48025a09, - 0x417a7800, 0x0201f800, 0x0010853c, 0x1c01f000, - 0x485fc857, 0x5c000000, 0x4d780000, 0x4203e000, - 0x50000000, 0x4200b800, 0x00008005, 0x0201f000, - 0x00100332, 0x4933c857, 0x83300480, 0x00000020, - 0x02021800, 0x0010032d, 0x83300c00, 0x0010bd88, - 0x50040000, 0x80000000, 0x04001002, 0x44000800, - 0x1c01f000, 0x4933c857, 0x0401f7f4, 0x4807c856, - 0x59b800ea, 0x8c000510, 0x040007fd, 0x59b800e0, - 0x4803c857, 0x1c01f000, 0x4803c856, 0x42000000, - 0x10000000, 0x41300800, 0x0401f029, 0x8c000510, - 0x02000000, 0x0002010b, 0x4c040000, 0x0401f80b, - 0x5c000800, 0x82100480, 0x00000008, 0x02001000, - 0x0002010b, 0x4c040000, 0x0401feb7, 0x5c000800, - 0x0201f000, 0x0002010b, 0x59b800e2, 0x59b820e2, - 0x80100580, 0x040207fd, 0x80102114, 0x0401f001, - 0x40101800, 0x800c190a, 0x82100500, 0x0000001f, - 0x820c1d00, 0x0000001f, 0x800c2480, 0x82102500, - 0x0000001f, 0x1c01f000, 0x40680000, 0x406c0800, - 0x0401f807, 0x42018800, 0x00000001, 0x04020003, - 0x42018800, 0x00000000, 0x1c01f000, 0x82000500, - 0xf0000000, 0x82040d00, 0x0fffffff, 0x80040d40, - 0x4807c857, 0x42001000, 0x0010bc59, 0x50080000, - 0x80000540, 0x04020005, 0x4a0370e5, 0x00000003, - 0x4a0370e4, 0x00000300, 0x80000000, 0x44001000, - 0x42001000, 0x00000400, 0x59b800ea, 0x8c000510, - 0x0400000c, 0x0401ffd1, 0x82100480, 0x00000008, - 0x04001007, 0x4c040000, 0x4c080000, 0x0401fe7e, - 0x5c001000, 0x5c000800, 0x0401f020, 0x59b800ea, - 0x8c000516, 0x0402001d, 0x4a0370e4, 0x00300000, - 0x480770e1, 0x42001000, 0x0000ff00, 0x80081040, - 0x04000012, 0x59b808e4, 0x8c040d28, 0x040207fc, - 0x42001000, 0x0010bc59, 0x50080000, 0x80000040, - 0x04020005, 0x4a0370e5, 0x00000002, 0x4a0370e4, - 0x00000200, 0x02001800, 0x0010032d, 0x44001000, - 0x8c040d2c, 0x1c01f000, 0x41f80000, 0x50000000, - 0x0201f800, 0x0010032d, 0x80081040, 0x040207d3, - 0x41f80000, 0x50000000, 0x0201f800, 0x0010032d, - 0x4d380000, 0x59300c07, 0x82040580, 0x00000009, - 0x04020006, 0x42027000, 0x00000047, 0x0201f800, - 0x00020a34, 0x80000580, 0x5c027000, 0x1c01f000, - 0x4c500000, 0x4a03900d, 0x00000001, 0x59c8a020, - 0x4a03900d, 0x00000002, 0x59c80820, 0x8c50a52e, - 0x04000002, 0x900409c0, 0x82040d00, 0x0000ffff, - 0x0201f800, 0x00105617, 0x5c00a000, 0x1c01f000, - 0x42000000, 0x0010bd0c, 0x0201f800, 0x0010ae10, - 0x0401ffec, 0x0400004e, 0x4933c857, 0x59300407, - 0x82000580, 0x00000000, 0x04000049, 0x59c82021, - 0x4a03900d, 0x00000001, 0x59c82821, 0x82142d00, - 0x0000ffff, 0x59325809, 0x812e59c0, 0x04000040, - 0x5932680a, 0x0201f800, 0x001040c4, 0x02020800, - 0x00108c1b, 0x599c0019, 0x8c00050c, 0x04020018, - 0x0201f800, 0x001040c4, 0x04020015, 0x59300812, - 0x4807c857, 0x592c0409, 0x8c00051c, 0x0402000e, - 0x8400055c, 0x48025c09, 0x592c0a05, 0x82040d00, - 0x000000ff, 0x82040580, 0x00000048, 0x04000004, - 0x82040580, 0x00000018, 0x04020003, 0x59300812, - 0x48065803, 0x4a026012, 0x7fffffff, 0x48166014, - 0x0201f800, 0x001040c4, 0x04000004, 0x59300415, - 0x8c00051c, 0x04000004, 0x599c0019, 0x8c00050c, - 0x04000017, 0x0201f800, 0x00100e5a, 0x04020014, - 0x0401fa2f, 0x40280000, 0x4802600e, 0x04000005, - 0x4832600c, 0x50200000, 0x4802600b, 0x4822600d, - 0x59300415, 0x8c00051c, 0x04020004, 0x599c0019, - 0x8c00050c, 0x04020885, 0x4a03900d, 0x00000040, - 0x4a0370e5, 0x00000008, 0x1c01f000, 0x42000000, - 0x0010bd15, 0x0201f800, 0x0010ae10, 0x5988014c, - 0x80000000, 0x4803114c, 0x4a03900d, 0x00000040, - 0x42000000, 0xc0000000, 0x0201f000, 0x00020105, - 0x4cf80000, 0x58f40000, 0x8001f540, 0x0401f820, - 0x41781800, 0x0401f8f9, 0x04020014, 0x44140800, - 0x0401f82a, 0x04000011, 0x40043800, 0x42001800, - 0x00000001, 0x40142000, 0x0401f8f0, 0x0402000b, - 0x801c3800, 0x501c0000, 0x44000800, 0x0401f810, - 0x801c0580, 0x04000004, 0x44103800, 0x801c3840, - 0x44143800, 0x0401f819, 0x5c01f000, 0x1c01f000, - 0x80f9f1c0, 0x04020003, 0x58f41202, 0x0401f003, - 0x42001000, 0x00000007, 0x1c01f000, 0x80f9f1c0, - 0x04020006, 0x58f40401, 0x82000480, 0x00000002, - 0x80f40400, 0x0401f005, 0x58f80401, 0x82000480, - 0x00000002, 0x80f80400, 0x50002800, 0x80000000, - 0x50002000, 0x1c01f000, 0x80f9f1c0, 0x04020008, - 0x58f40401, 0x82000480, 0x00000002, 0x02001800, - 0x0010032d, 0x4801ec01, 0x0401f00b, 0x58f80401, - 0x82000480, 0x00000002, 0x02001800, 0x0010032d, - 0x4801f401, 0x82000580, 0x00000002, 0x04020002, - 0x0401f81b, 0x58f40202, 0x80000040, 0x4801ea02, - 0x02000800, 0x0010032d, 0x82000580, 0x00000001, - 0x1c01f000, 0x82f40580, 0xffffffff, 0x0400000f, - 0x58f40201, 0x82000580, 0x0000dcb3, 0x02020800, - 0x0010032d, 0x58f40000, 0x8001f540, 0x04000006, - 0x58f80201, 0x82000580, 0x0000ddb9, 0x02020800, - 0x0010032d, 0x0401f80a, 0x1c01f000, 0x4d2c0000, - 0x40fa5800, 0x0201f800, 0x00100580, 0x4979e800, - 0x4179f000, 0x5c025800, 0x1c01f000, 0x80f5e9c0, - 0x04000009, 0x80f9f1c0, 0x04020ff5, 0x4d2c0000, - 0x40f65800, 0x0201f800, 0x00100580, 0x4179e800, - 0x5c025800, 0x1c01f000, 0x4cf40000, 0x0201f800, - 0x001040c4, 0x04020036, 0x59300808, 0x82040500, - 0x00013100, 0x04020032, 0x8c040d22, 0x04000032, - 0x59300020, 0x8001ed40, 0x02000800, 0x0010032d, - 0x82000580, 0xffffffff, 0x04000029, 0x58f40201, - 0x82000580, 0x0000dcb3, 0x02020800, 0x0010032d, - 0x58f40a02, 0x82040500, 0x0000fffe, 0x04000003, - 0x0401ff74, 0x58f40a02, 0x82040480, 0x0000000f, - 0x04021059, 0x80040800, 0x4805ea02, 0x82040580, - 0x00000008, 0x0400005d, 0x82040480, 0x00000008, - 0x0400100a, 0x58f40000, 0x8001ed40, 0x02000800, - 0x0010032d, 0x58f40201, 0x82000580, 0x0000ddb9, - 0x02020800, 0x0010032d, 0x58f40401, 0x82000c00, - 0x00000002, 0x4805ec01, 0x80f40400, 0x59300813, - 0x44040000, 0x80000000, 0x45780000, 0x5c01e800, - 0x1c01f000, 0x42001000, 0x00000400, 0x59b800e4, - 0x8c000524, 0x04020023, 0x4a0370e4, 0x00030000, - 0x40000000, 0x59b800e4, 0x8c000524, 0x0402001b, - 0x59300808, 0x84040d62, 0x48066008, 0x4a0370e4, - 0x00020000, 0x4d2c0000, 0x0201f800, 0x0010055a, - 0x04000025, 0x492e6020, 0x4a025a01, 0x0000dcb3, - 0x59300009, 0x80001d40, 0x02000800, 0x0010032d, - 0x580c0810, 0x48065803, 0x59301812, 0x40040000, - 0x800c0580, 0x0402000d, 0x497a5a02, 0x4a025c01, - 0x00000004, 0x0401f011, 0x4a0370e4, 0x00020000, - 0x40000000, 0x40000000, 0x80081040, 0x02000800, - 0x0010032d, 0x0401f7d6, 0x4a025a02, 0x00000001, - 0x4a025c01, 0x00000006, 0x497a5804, 0x400c0000, - 0x80040480, 0x48025805, 0x412de800, 0x5c025800, - 0x0401f7a9, 0x5c025800, 0x4a026020, 0xffffffff, - 0x0401f7c3, 0x4d2c0000, 0x58f65800, 0x0201f800, - 0x00100580, 0x40f65800, 0x0201f800, 0x00100580, - 0x5c025800, 0x0401f7f5, 0x4d2c0000, 0x0201f800, - 0x0010055a, 0x040007f8, 0x4a025a01, 0x0000ddb9, - 0x4a025c01, 0x00000002, 0x492de800, 0x412de800, - 0x5c025800, 0x0401f7a5, 0x0401ff1e, 0x82f40400, - 0x00000004, 0x800c0400, 0x40000800, 0x50040000, - 0x80100580, 0x04000016, 0x82040c00, 0x00000002, - 0x80081040, 0x040207fa, 0x80f9f1c0, 0x04000011, - 0x58f41202, 0x82081480, 0x00000007, 0x82f80400, - 0x00000002, 0x800c0400, 0x40000800, 0x50040000, - 0x80100580, 0x04000006, 0x82040c00, 0x00000002, - 0x80081040, 0x040207fa, 0x0401f002, 0x1c01f000, - 0x82000540, 0x00000001, 0x0401f7fd, 0x4cf40000, - 0x4cf80000, 0x4001e800, 0x812e59c0, 0x04000024, - 0x592c0a07, 0x800409c0, 0x04020021, 0x82f40580, - 0xffffffff, 0x0400001b, 0x58f40201, 0x82000580, - 0x0000dcb3, 0x02020800, 0x0010032d, 0x58f40000, - 0x8001f540, 0x04000006, 0x58f80201, 0x82000580, - 0x0000ddb9, 0x02020800, 0x0010032d, 0x41783800, - 0x58f44003, 0x0401f839, 0x04020009, 0x0401ff2c, - 0x497a6020, 0x59300808, 0x84040d22, 0x48066008, - 0x5c01f000, 0x5c01e800, 0x1c01f000, 0x0401ff24, - 0x4a025a07, 0x00000011, 0x0401f7f6, 0x0401ff06, - 0x0401f7f4, 0x4cf40000, 0x4cf80000, 0x4001e800, - 0x82040580, 0x00000001, 0x04020020, 0x82f40580, - 0xffffffff, 0x0400001a, 0x58f40201, 0x82000580, - 0x0000dcb3, 0x02020800, 0x0010032d, 0x58f40000, - 0x8001f540, 0x04000006, 0x58f80201, 0x82000580, - 0x0000ddb9, 0x02020800, 0x0010032d, 0x41783800, - 0x58f44003, 0x0401f811, 0x04020008, 0x0401ff04, - 0x42000800, 0x00000001, 0x497a6020, 0x5c01f000, - 0x5c01e800, 0x1c01f000, 0x0401fefd, 0x42000800, - 0x00000011, 0x0401f7f9, 0x4c040000, 0x0401fede, - 0x5c000800, 0x0401f7f5, 0x4803c856, 0x401c2000, - 0x41781800, 0x4c200000, 0x0401ff88, 0x5c004000, - 0x0402002a, 0x40202000, 0x42001800, 0x00000001, - 0x0401ff82, 0x04020025, 0x0401fe9e, 0x40082800, - 0x82f43400, 0x00000004, 0x50182000, 0x40100000, - 0x801c0580, 0x04000005, 0x42001800, 0x00000001, - 0x0401ff76, 0x04020019, 0x82183400, 0x00000002, - 0x80142840, 0x040207f5, 0x80f9f1c0, 0x04000012, - 0x58f42a02, 0x82142c80, 0x00000007, 0x82f83400, - 0x00000002, 0x50182000, 0x40100000, 0x801c0580, - 0x04000005, 0x42001800, 0x00000001, 0x0401ff63, - 0x04020006, 0x82183400, 0x00000002, 0x80142840, - 0x040207f5, 0x1c01f000, 0x82000540, 0x00000001, - 0x0401f7fd, 0x0201f800, 0x0010032d, 0x58380a05, - 0x82040d00, 0x000000ff, 0x82040580, 0x0000001b, - 0x04000004, 0x82040580, 0x0000002b, 0x040207f6, - 0x50200000, 0x80387c00, 0x583c2800, 0x583c2001, - 0x583c1002, 0x592c0a08, 0x58383010, 0x59303808, - 0x497a6013, 0x497a6014, 0x0201f000, 0x00020149, - 0x58380208, 0x8c000502, 0x040007e7, 0x50200000, - 0x80387c00, 0x583c2800, 0x583c2001, 0x58380405, - 0x80001540, 0x04020002, 0x58381408, 0x58c83401, - 0x58380c09, 0x59303808, 0x497a6013, 0x497a6014, - 0x0201f000, 0x00020149, 0x592c0409, 0x8c000502, - 0x040007d5, 0x592c040a, 0x80000540, 0x040007d2, - 0x82000c80, 0x00000002, 0x04001011, 0x58380001, - 0x80007540, 0x02000800, 0x0010032d, 0x58380205, - 0x82000500, 0x0000000f, 0x82000400, 0x00100e3a, - 0x50004000, 0x40040000, 0x800409c0, 0x04000005, - 0x82040c80, 0x00000005, 0x040217f1, 0x80204400, - 0x50200000, 0x80387c00, 0x583c2800, 0x583c2001, - 0x583c1002, 0x592c0a08, 0x592c4c09, 0x592c300e, - 0x59303808, 0x497a6013, 0x497a6014, 0x4816600f, - 0x48126010, 0x480a6011, 0x481a6012, 0x80040840, - 0x4806600e, 0x02000000, 0x00020151, 0x80204000, - 0x50201800, 0x800c19c0, 0x0402000c, 0x58380001, - 0x80007540, 0x02000800, 0x0010032d, 0x58380205, - 0x82000500, 0x0000000f, 0x82000400, 0x00100e3a, - 0x50004000, 0x50201800, 0x483a600c, 0x480e600b, - 0x4822600d, 0x0201f000, 0x00020151, 0x4803c856, - 0x592c0209, 0x8c00051e, 0x04020017, 0x50200000, - 0x80306c00, 0x40240000, 0x0c01f001, 0x00100b7f, - 0x00100b7f, 0x00100b88, 0x00100b7f, 0x00100b7f, - 0x00100b7f, 0x00100b7f, 0x00100b7f, 0x00100b88, - 0x00100b7f, 0x00100b88, 0x00100b7f, 0x00100b7f, - 0x00100b88, 0x00100b7f, 0x00100b7f, 0x0201f800, - 0x0010032d, 0x8400051e, 0x48025a09, 0x50200000, - 0x80306c00, 0x58343801, 0x481e6010, 0x0401f007, - 0x58341802, 0x58342800, 0x58343801, 0x480e6011, - 0x4816600f, 0x481e6010, 0x0401f28a, 0x4933c857, - 0x5931f809, 0x59301006, 0x800811c0, 0x0400000b, - 0x41780800, 0x42000000, 0x0000000a, 0x0201f800, - 0x0010600e, 0x80080102, 0x04020002, 0x84001542, - 0x80081040, 0x4809fc07, 0x4a026006, 0x00000002, - 0x592c040a, 0x82000500, 0x00000008, 0x0400000b, - 0x0401f831, 0x59300203, 0x82000580, 0x00000004, - 0x04020005, 0x42027000, 0x00000048, 0x0201f800, - 0x00020a34, 0x1c01f000, 0x4cfc0000, 0x58fc0205, - 0x82000500, 0x000000ff, 0x82000580, 0x00000048, - 0x04020009, 0x58fc0409, 0x8c000500, 0x04000006, - 0x58fc080c, 0x8c040d16, 0x04000017, 0x58fc0008, - 0x0401f00a, 0x58fc0409, 0x8c000512, 0x04020014, - 0x58fc0c0a, 0x8c040d16, 0x04020003, 0x5c01f800, - 0x1c01f000, 0x58fc000b, 0x59300812, 0x80040580, - 0x04020009, 0x59300008, 0x84000500, 0x48026008, - 0x42027000, 0x00000048, 0x5c01f800, 0x0201f000, - 0x00020a34, 0x5c01f800, 0x1c01f000, 0x58fdf80a, - 0x0401f7ec, 0x5c000000, 0x4c000000, 0x4803c857, - 0x4933c857, 0x59b808ea, 0x82040d00, 0x00000007, - 0x82040580, 0x00000000, 0x04000025, 0x82040580, - 0x00000003, 0x04000022, 0x59300407, 0x4c000000, - 0x4a026407, 0x00000000, 0x42003000, 0x00000041, - 0x4a0370e5, 0x00003000, 0x42000000, 0x50000000, - 0x41300800, 0x4c180000, 0x0401fca9, 0x5c003000, - 0x0400000e, 0x42000000, 0x0000001e, 0x80000040, - 0x040207ff, 0x80183040, 0x040207f4, 0x42000000, - 0x40000000, 0x41300800, 0x0401fc9d, 0x59880146, - 0x80000000, 0x48031146, 0x4a0370e5, 0x00002000, - 0x5c000000, 0x48026407, 0x1c01f000, 0x59300008, - 0x84000500, 0x48026008, 0x0401f7fc, 0x59c00007, - 0x4a038006, 0x30000000, 0x40000000, 0x59c00007, - 0x8c00050a, 0x040207fe, 0x1c01f000, 0x5c000000, - 0x4c000000, 0x4803c857, 0x42000800, 0x00000001, - 0x0201f800, 0x00101994, 0x4dc00000, 0x4a0370e8, - 0x00000000, 0x42038000, 0x00007720, 0x0401ffec, - 0x42038000, 0x00007700, 0x0401ffe9, 0x0201f800, - 0x00104755, 0x04020017, 0x4a038891, 0x0000ffff, - 0x497b8880, 0x4ce80000, 0x4201d000, 0x00000016, - 0x0201f800, 0x001059d2, 0x497b8892, 0x4201d000, - 0x00000016, 0x0201f800, 0x001059d2, 0x5c01d000, - 0x42000000, 0x0010bd60, 0x0201f800, 0x0010ae10, - 0x0401f812, 0x5c038000, 0x0201f000, 0x00104879, - 0x0401f830, 0x4c080000, 0x4c140000, 0x42000000, - 0x0010bd61, 0x0201f800, 0x0010ae10, 0x0401f807, - 0x5c002800, 0x5c001000, 0x48178892, 0x480b8880, - 0x5c038000, 0x1c01f000, 0x496fc857, 0x836c0580, - 0x00000003, 0x0402000b, 0x4c080000, 0x4c0c0000, - 0x42001000, 0x00008048, 0x42001800, 0x0000ffff, - 0x0201f800, 0x001031f5, 0x5c001800, 0x5c001000, - 0x42000800, 0x0000003c, 0x0201f800, 0x001010db, - 0x59a8006a, 0x80000540, 0x04000005, 0x59a8106b, - 0x800811c0, 0x02020800, 0x001018ff, 0x4a038891, - 0x0000ffff, 0x4a03900d, 0x00000040, 0x0201f800, - 0x00100684, 0x4a0370e8, 0x00000001, 0x1c01f000, - 0x5c000000, 0x4c000000, 0x4803c857, 0x59c41080, - 0x497b8880, 0x4ce80000, 0x4201d000, 0x00000016, - 0x4c080000, 0x0201f800, 0x001059d2, 0x5c001000, - 0x5c01d000, 0x59c42892, 0x497b8892, 0x0201f800, - 0x00104755, 0x04020002, 0x1c01f000, 0x42002000, - 0x00000260, 0x59c418a4, 0x820c1d00, 0x0000000f, - 0x820c0580, 0x00000000, 0x04000010, 0x59c41805, - 0x820c1d00, 0x00000001, 0x0402000e, 0x59c418a4, - 0x820c1d00, 0x0000000f, 0x820c0480, 0x00000007, - 0x04001004, 0x820c0480, 0x0000000c, 0x04001003, - 0x80102040, 0x040207ec, 0x497b8891, 0x1c01f000, - 0x4c100000, 0x42002000, 0x00000019, 0x4a038805, - 0x00000001, 0x0201f800, 0x00101731, 0x59c41805, - 0x820c1d00, 0x00000001, 0x04000005, 0x80102040, - 0x040207f7, 0x5c002000, 0x0401f7f0, 0x5c002000, - 0x0401f7ec, 0x4803c856, 0x1c01f000, 0x00100cb7, - 0x00100cb7, 0x00100cb7, 0x00100cdb, 0x00100cb7, - 0x00100cb7, 0x00100cb7, 0x00100cb7, 0x00100cb7, - 0x00100cdb, 0x00100cb7, 0x00100cb9, 0x00100cb7, - 0x00100cb7, 0x00100cb7, 0x00100cb7, 0x0201f800, - 0x0010032d, 0x82040580, 0x0000001b, 0x0400001a, - 0x82040580, 0x0000002b, 0x04000017, 0x82040580, - 0x0000003b, 0x02020800, 0x0010032d, 0x592c020b, - 0x8c000500, 0x04000073, 0x592c1a08, 0x82040500, - 0x0000000f, 0x82000400, 0x00100e3a, 0x50001000, - 0x50080000, 0x59302014, 0x4802600b, 0x492e600c, - 0x480a600d, 0x480e600e, 0x48126013, 0x5c025800, - 0x1c01f000, 0x592c0010, 0x48026012, 0x592c0011, - 0x48026014, 0x592c1a08, 0x0401f7ed, 0x82040500, - 0x0000000f, 0x82000400, 0x00100e3a, 0x50001000, - 0x50080000, 0x592c1a08, 0x4802600b, 0x492e600c, - 0x480a600d, 0x480e600e, 0x497a6013, 0x0401f7ec, - 0x8c040d00, 0x0402004f, 0x82040d00, 0x00000080, - 0x0400004c, 0x0201f000, 0x00020164, 0x59300014, - 0x59301013, 0x80080580, 0x0402000c, 0x42007800, - 0x80000005, 0x592c1209, 0x82080500, 0xffff7fff, - 0x48025a09, 0x8c08151e, 0x0402003b, 0x823c7d40, - 0x00000020, 0x0401f038, 0x480bc857, 0x42000000, - 0x0010bd0d, 0x0201f800, 0x0010ae10, 0x59302014, - 0x59300415, 0x4803c857, 0x8c000514, 0x04020011, - 0x599c1819, 0x8c0c1d12, 0x0400000b, 0x592c0810, - 0x59300016, 0x80040c80, 0x04000005, 0x04001004, - 0x80040000, 0x80140480, 0x0400100a, 0x0201f800, - 0x001071c7, 0x820c1d40, 0x00000001, 0x0401f020, - 0x84000514, 0x48026415, 0x48126016, 0x4813c857, - 0x0401f93e, 0x0402001a, 0x42007800, 0x80000005, - 0x5930500e, 0x592c0209, 0x4803c857, 0x8c00051e, - 0x04020005, 0x823c7d40, 0x00000020, 0x5930400d, - 0x0401f004, 0x8400051e, 0x48025a09, 0x0401f8ed, - 0x50201800, 0x480e600b, 0x4832600c, 0x4822600d, - 0x482a600e, 0x480fc857, 0x4833c857, 0x4823c857, - 0x482bc857, 0x80000580, 0x483e6004, 0x1c01f000, - 0x0201f800, 0x0010032d, 0x4933c857, 0x4d2c0000, - 0x59900004, 0x81300580, 0x02020800, 0x0010032d, - 0x0201f800, 0x00108953, 0x02000800, 0x0010032d, - 0x59325809, 0x4d3c0000, 0x4d400000, 0x59300004, - 0x4803c857, 0x4c000000, 0x0201f800, 0x00106346, - 0x0201f800, 0x001060e2, 0x5c000000, 0x8c000516, - 0x04000011, 0x592c0010, 0x4803c857, 0x48025808, - 0x41780800, 0x42028000, 0x00000002, 0x0201f800, - 0x00104543, 0x4a025c07, 0x0000ffff, 0x492fc857, - 0x0201f800, 0x000203ab, 0x0201f800, 0x00107144, - 0x0401f015, 0x4a026203, 0x00000002, 0x592c0209, - 0x8400054e, 0x48025a09, 0x59300407, 0x82000580, - 0x00000006, 0x04020009, 0x811800ca, 0x81c80c00, - 0x58040939, 0x592c000e, 0x80040480, 0x592c0810, - 0x80040480, 0x4802580c, 0x417a7800, 0x0201f800, - 0x0010853c, 0x5c028000, 0x5c027800, 0x5c025800, - 0x1c01f000, 0x4933c857, 0x4d2c0000, 0x59900004, - 0x81300580, 0x02020800, 0x0010032d, 0x0201f800, - 0x00108953, 0x02000800, 0x0010032d, 0x59325809, - 0x592c0209, 0x84000540, 0x48025a09, 0x0401f7be, - 0x491bc857, 0x4dd00000, 0x4c580000, 0x41780800, - 0x8007a0ca, 0x83d3a400, 0x00007600, 0x4200b000, - 0x000007d0, 0x599c0019, 0x8c000506, 0x04020003, - 0x4200b000, 0x000003e8, 0x4a03a005, 0x80000002, - 0x0402400d, 0x4c040000, 0x02004800, 0x0002090c, - 0x5c000800, 0x42000000, 0x00001000, 0x50000000, - 0x82000480, 0x24320001, 0x04001003, 0x8058b040, - 0x04000016, 0x59d01006, 0x82080500, 0x00006000, - 0x82000580, 0x00006000, 0x04000007, 0x8c08151e, - 0x040007ec, 0x59d01006, 0x82080500, 0x00006000, - 0x040207e8, 0x83d3a400, 0x00000020, 0x80040800, - 0x82040480, 0x00000005, 0x040017d9, 0x5c00b000, - 0x5c03a000, 0x1c01f000, 0x41180000, 0x80040580, - 0x04000008, 0x42003000, 0x0010b995, 0x58180401, - 0x8c000504, 0x040007f0, 0x850e1d6e, 0x0401f7ee, - 0x4a03a005, 0x30000000, 0x59d00006, 0x4a03a005, - 0x30000000, 0x59d00006, 0x497ba003, 0x497ba007, - 0x4a03a005, 0xf0000001, 0x42001800, 0x00008000, - 0x59d00006, 0x8c00050a, 0x04000005, 0x800c1840, - 0x040207fc, 0x0201f800, 0x0010032d, 0x4a03a005, - 0xf0000000, 0x59d00006, 0x850e1d2e, 0x800410c8, - 0x82081400, 0x0000bf32, 0x58081804, 0x800c19c0, - 0x040007d1, 0x580c0004, 0x84000576, 0x48001804, - 0x4933c857, 0x0401f7cc, 0x4803c856, 0x4dd00000, - 0x41780800, 0x8007a0ca, 0x83d3a400, 0x00007600, - 0x4a03a005, 0x80000001, 0x59d00006, 0x83d3a400, - 0x00000020, 0x80040800, 0x82040480, 0x00000005, - 0x040017f8, 0x5c03a000, 0x1c01f000, 0x59d00006, - 0x8c00053e, 0x0400001e, 0x59902804, 0x4817c857, - 0x801429c0, 0x04000013, 0x5990000a, 0x5990080b, - 0x5990100c, 0x5990180d, 0x4800280b, 0x4804280c, - 0x4808280d, 0x480c280e, 0x59d00000, 0x59d00801, - 0x59d01002, 0x59d01803, 0x59d02004, 0x4800280f, - 0x48042810, 0x48082811, 0x480c2812, 0x48102813, - 0x59900006, 0x82000500, 0xffff0000, 0x48032006, - 0x4a03a005, 0x30000000, 0x59d00006, 0x1c01f000, - 0x4803c856, 0x80204000, 0x50200000, 0x80000540, - 0x04000003, 0x80285040, 0x1c01f000, 0x58300001, - 0x80000540, 0x0400000e, 0x4802600c, 0x40006000, - 0x58300205, 0x82000500, 0x0000000f, 0x82000400, - 0x00100e3a, 0x50004000, 0x802041c0, 0x02000800, - 0x0010032d, 0x80285040, 0x1c01f000, 0x40005000, - 0x1c01f000, 0x00000006, 0x00000009, 0x0000000c, - 0x0000000f, 0x00000012, 0x00000000, 0x00000000, - 0x0000000c, 0x00000000, 0x00000000, 0x00000000, - 0x00100e35, 0x00100e34, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00100e35, 0x00100e34, - 0x00100e31, 0x00100e35, 0x00100e34, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00100e35, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00100e35, 0x00100e35, - 0x00100e35, 0x00000000, 0x00100e35, 0x00000000, - 0x00000000, 0x00000000, 0x4813c857, 0x492fc857, - 0x4933c857, 0x48126013, 0x592c5208, 0x802851c0, - 0x0400004a, 0x412c6000, 0x0401f84b, 0x04000009, - 0x82240580, 0x00000002, 0x04020003, 0x5830000e, - 0x80102480, 0x50200000, 0x80004540, 0x0400003f, - 0x50200000, 0x80000540, 0x0400000b, 0x80301400, - 0x58080002, 0x80102480, 0x0400101e, 0x801021c0, - 0x04000009, 0x80285040, 0x04000034, 0x80204000, - 0x0401f7f4, 0x58300001, 0x80006540, 0x0400002f, - 0x0401f7e6, 0x80285040, 0x0400002c, 0x80204000, - 0x50200000, 0x80000540, 0x0402000a, 0x58300001, - 0x80006540, 0x04000025, 0x58300205, 0x82004d00, - 0x0000000f, 0x82244400, 0x00100e3a, 0x50204000, - 0x592c0209, 0x8400051e, 0x48025a09, 0x0401f013, - 0x80102080, 0x80102000, 0x48126011, 0x4813c857, - 0x58080802, 0x40100000, 0x80042480, 0x02001800, - 0x0010032d, 0x58080000, 0x58081801, 0x80102400, - 0x4812600f, 0x480e6010, 0x4813c857, 0x592c0209, - 0x8400055e, 0x48025a09, 0x4833c857, 0x4823c857, - 0x482bc857, 0x4832600c, 0x4822600d, 0x482a600e, - 0x80000580, 0x0401f003, 0x82000540, 0x00000001, - 0x1c01f000, 0x58300205, 0x82004d00, 0x0000000f, - 0x82244400, 0x00100e3a, 0x82000500, 0x000000ff, - 0x82000580, 0x00000029, 0x0402001b, 0x50204000, - 0x592c040a, 0x80000540, 0x02000800, 0x0010032d, - 0x82000c80, 0x00000002, 0x04001011, 0x58300001, - 0x80006540, 0x02000800, 0x0010032d, 0x58300205, - 0x82000500, 0x0000000f, 0x82000400, 0x00100e3a, - 0x50004000, 0x40040000, 0x800409c0, 0x04000006, - 0x82040c80, 0x00000005, 0x040217f1, 0x80204400, - 0x80000580, 0x1c01f000, 0x4c5c0000, 0x59e4b800, - 0x485fc857, 0x825c0500, 0x0000001f, 0x04000004, - 0x59e40862, 0x0201f800, 0x0010032d, 0x825c0500, - 0x000000e0, 0x02000800, 0x0010032d, 0x8c5cbd0e, - 0x04020807, 0x8c5cbd0c, 0x04020809, 0x8c5cbd0a, - 0x04020873, 0x5c00b800, 0x1c01f000, 0x4803c856, - 0x4a03c800, 0x00000080, 0x1c01f000, 0x4d2c0000, - 0x42007800, 0x0010bdb1, 0x583c0003, 0x583c0804, - 0x80040540, 0x0400003a, 0x42000800, 0x0010bc56, - 0x50065800, 0x592c0002, 0x82000580, 0x00000000, - 0x04000033, 0x59e40050, 0x59e40852, 0x80040480, - 0x82000500, 0xfffffc00, 0x04020005, 0x59e40050, - 0x59e40851, 0x80040800, 0x80040480, 0x82000c80, - 0x00000400, 0x59e40050, 0x80041400, 0x480bc857, - 0x50080000, 0x58080801, 0x80040540, 0x04000020, - 0x480bc857, 0x480a5803, 0x583c1009, 0x583c000a, - 0x80080580, 0x04020005, 0x583c0000, 0x84000550, - 0x48007800, 0x41781000, 0x82080400, 0x00001000, - 0x4803c857, 0x48007809, 0x583c0003, 0x80081400, - 0x480bc857, 0x583c0804, 0x4a025801, 0x00000000, - 0x4a025808, 0x00100f2f, 0x480a5806, 0x48065807, - 0x59e40053, 0x800000c4, 0x48025805, 0x412c1000, - 0x492fc857, 0x0201f800, 0x00020016, 0x5c025800, - 0x4a03c800, 0x00000040, 0x1c01f000, 0x42007800, - 0x0010bc56, 0x503c7800, 0x4a007802, 0x00000100, - 0x42007800, 0x0010bdb1, 0x583c0000, 0x84000552, - 0x48007800, 0x583c100c, 0x480bc857, 0x80081000, - 0x4808780c, 0x583c180b, 0x800c19c0, 0x04000017, - 0x82080500, 0x00000003, 0x04020014, 0x583c0007, - 0x4803c857, 0x583c2008, 0x4813c857, 0x80102000, - 0x80100580, 0x04020002, 0x41782000, 0x48107808, - 0x400c0000, 0x80080580, 0x04020008, 0x4978780c, - 0x42001800, 0x00000001, 0x42001000, 0x00008028, - 0x0201f800, 0x001031f5, 0x1c01f000, 0x4a03c800, - 0x00000020, 0x0201f800, 0x0010ae08, 0x59e40000, - 0x1c01f000, 0x42000000, 0x00001000, 0x50000000, - 0x82000480, 0x24320001, 0x0400100d, 0x0201f800, - 0x0010af26, 0x04000008, 0x42000000, 0x00007a42, - 0x50007000, 0x8c387520, 0x04020003, 0x84387560, - 0x44380000, 0x4a030000, 0x00000000, 0x1c01f000, - 0x4d2c0000, 0x4a007000, 0x00000000, 0x82040d00, - 0x43000f80, 0x02020800, 0x0010032d, 0x58380008, - 0x4803c00f, 0x4a0370e4, 0x00003000, 0x0201f800, - 0x00108d7c, 0x583a5807, 0x592c0000, 0x48007007, - 0x800001c0, 0x04020002, 0x49787006, 0x0201f800, - 0x00100580, 0x5c025800, 0x42007000, 0x00020b54, - 0x0201f000, 0x0002002c, 0x4803c856, 0x4c3c0000, - 0x4d2c0000, 0x4d300000, 0x58300009, 0x80025d40, - 0x02000800, 0x0010032d, 0x592e6009, 0x4c300000, - 0x0201f800, 0x00108d9b, 0x5c006000, 0x02000800, - 0x0010032d, 0x58300002, 0x82000580, 0x00000100, - 0x0402000f, 0x5930780c, 0x583c0001, 0x80007d40, - 0x0400000e, 0x4802600c, 0x82000400, 0x00000002, - 0x48006003, 0x583c0000, 0x48006005, 0x40301000, - 0x0201f800, 0x00020016, 0x0401f00c, 0x4a025a07, - 0x00000002, 0x492fc857, 0x4c300000, 0x0201f800, - 0x000203ab, 0x5c025800, 0x0201f800, 0x00100580, - 0x0201f800, 0x00020a10, 0x5c026000, 0x5c025800, - 0x5c007800, 0x1c01f000, 0x4803c856, 0x4d2c0000, - 0x4d300000, 0x42007000, 0x00020b54, 0x58380800, - 0x82040580, 0x00000002, 0x04020011, 0x58386001, - 0x58300009, 0x812c0580, 0x0402000d, 0x59e00004, - 0x8c00050e, 0x040007fe, 0x59dc0006, 0x4803c857, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Oct 20 12:49: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 D8200A18AA9; Tue, 20 Oct 2015 12:49:39 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6668115; Tue, 20 Oct 2015 12:49:39 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9KCncbk019708; Tue, 20 Oct 2015 12:49:38 GMT (envelope-from phk@FreeBSD.org) Received: (from phk@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KCnc2r019707; Tue, 20 Oct 2015 12:49:38 GMT (envelope-from phk@FreeBSD.org) Message-Id: <201510201249.t9KCnc2r019707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phk set sender to phk@FreeBSD.org using -f From: Poul-Henning Kamp Date: Tue, 20 Oct 2015 12:49:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289627 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.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, 20 Oct 2015 12:49:39 -0000 Author: phk Date: Tue Oct 20 12:49:38 2015 New Revision: 289627 URL: https://svnweb.freebsd.org/changeset/base/289627 Log: Allow osreldate and osrelease to be set per jail Modified: head/etc/rc.d/jail Modified: head/etc/rc.d/jail ============================================================================== --- head/etc/rc.d/jail Tue Oct 20 12:27:59 2015 (r289626) +++ head/etc/rc.d/jail Tue Oct 20 12:49:38 2015 (r289627) @@ -243,6 +243,8 @@ parse_options() extract_var $_j set_hostname_allow allow.set_hostname YN NO extract_var $_j sysvipc_allow allow.sysvipc YN NO + extract_var $_j osreldate osreldate + extract_var $_j osrelease osrelease for _p in $_parameters; do echo " ${_p%\;};" done From owner-svn-src-all@freebsd.org Tue Oct 20 13:20: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 41543A193CA; Tue, 20 Oct 2015 13:20:31 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0EB196CE; Tue, 20 Oct 2015 13:20:30 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9KDKUou028466; Tue, 20 Oct 2015 13:20:30 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KDKU5o028465; Tue, 20 Oct 2015 13:20:30 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201510201320.t9KDKU5o028465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 20 Oct 2015 13:20:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289628 - stable/10/sys/contrib/ipfilter/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 20 Oct 2015 13:20:31 -0000 Author: cy Date: Tue Oct 20 13:20:29 2015 New Revision: 289628 URL: https://svnweb.freebsd.org/changeset/base/289628 Log: MFC r289480. Really fix ipfilter bug 3600459. Obtained from: ipfilter cvs repo r1.48.2.25, r1.72 and NetBSD repo r1.4 Modified: stable/10/sys/contrib/ipfilter/netinet/ip_state.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_state.c Tue Oct 20 12:49:38 2015 (r289627) +++ stable/10/sys/contrib/ipfilter/netinet/ip_state.c Tue Oct 20 13:20:29 2015 (r289628) @@ -3650,7 +3650,6 @@ ipf_state_del(softc, is, why) if (is->is_ref > 0) { int refs; - is->is_ref--; refs = is->is_ref; MUTEX_EXIT(&is->is_lock); if (!orphan) @@ -3667,7 +3666,7 @@ ipf_state_del(softc, is, why) } } - is->is_ref = 0; + ASSERT(is->is_ref == 0); MUTEX_EXIT(&is->is_lock); if (is->is_tqehead[0] != NULL) { From owner-svn-src-all@freebsd.org Tue Oct 20 13:32: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 372E6A19818; Tue, 20 Oct 2015 13:32: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 E414E1063; Tue, 20 Oct 2015 13:32:10 +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 t9KDW97Y034066; Tue, 20 Oct 2015 13:32:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KDW9ln034065; Tue, 20 Oct 2015 13:32:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510201332.t9KDW9ln034065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 20 Oct 2015 13:32:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289629 - 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: Tue, 20 Oct 2015 13:32:11 -0000 Author: emaste Date: Tue Oct 20 13:32:09 2015 New Revision: 289629 URL: https://svnweb.freebsd.org/changeset/base/289629 Log: newfs_msdos: use NetBSD's mkfs_msdos.h verbatim for makefs compatibility Sponsored by: The FreeBSD Foundation Modified: head/sbin/newfs_msdos/mkfs_msdos.h Modified: head/sbin/newfs_msdos/mkfs_msdos.h ============================================================================== --- head/sbin/newfs_msdos/mkfs_msdos.h Tue Oct 20 13:20:29 2015 (r289628) +++ head/sbin/newfs_msdos/mkfs_msdos.h Tue Oct 20 13:32:09 2015 (r289629) @@ -1,9 +1,12 @@ +/* $FreeBSD$ */ +/* $NetBSD: mkfs_msdos.h,v 1.2 2013/01/23 15:29:15 christos Exp $ */ + /*- - * Copyright (c) 2015 The FreeBSD Foundation + * Copyright (c) 2013 The NetBSD Foundation, Inc. * All rights reserved. * - * This software was developed by Ed Maste under sponsorship from - * the FreeBSD Foundation. + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,48 +17,53 @@ * 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$ + * 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 +#include +#define ALLOPTS \ +AOPT('@', off_t, offset, 0, "Offset in device") \ +AOPT('B', const char *, bootstrap, -1, "Bootstrap file") \ +AOPT('C', off_t, create_size, 0, "Create file") \ +AOPT('F', uint8_t, fat_type, 12, "FAT type (12, 16, or 32)") \ +AOPT('I', uint32_t, volume_id, 0, "Volume ID") \ +AOPT('L', const char *, volume_label, -1, "Volume Label") \ +AOPT('N', bool, no_create, -2, "Don't create filesystem, print params only") \ +AOPT('O', const char *, OEM_string, -1, "OEM string") \ +AOPT('S', uint16_t, bytes_per_sector, 1, "Bytes per sector") \ +AOPT('a', uint32_t, sectors_per_fat, 1, "Sectors per FAT") \ +AOPT('b', uint32_t, block_size, 1, "Block size") \ +AOPT('c', uint8_t, sectors_per_cluster, 1, "Sectors per cluster") \ +AOPT('e', uint16_t, directory_entries, 1, "Directory entries") \ +AOPT('f', const char *, floppy, -1, "Standard format floppies (160,180,320,360,640,720,1200,1232,1440,2880)") \ +AOPT('h', uint16_t, drive_heads, 1, "Drive heads") \ +AOPT('i', uint16_t, info_sector, 1, "Info sector") \ +AOPT('k', uint16_t, backup_sector, 1, "Backup sector") \ +AOPT('m', uint8_t, media_descriptor, 0, "Media descriptor") \ +AOPT('n', uint8_t, num_FAT, 1, "Number of FATs") \ +AOPT('o', uint32_t, hidden_sectors, 0, "Hidden sectors") \ +AOPT('r', uint16_t, reserved_sectors, 1, "Reserved sectors") \ +AOPT('s', uint32_t, size, 1, "File System size") \ +AOPT('u', uint16_t, sectors_per_track, 1, "Sectors per track") + struct msdos_options { - const char *bootstrap; - const char *volume_label; - const char *OEM_string; - const char *floppy; - u_int fat_type; - u_int volume_id; - u_int bytes_per_sector; - u_int sectors_per_fat; - u_int block_size; - u_int sectors_per_cluster; - u_int directory_entries; - u_int drive_heads; - u_int info_sector; - u_int backup_sector; - u_int media_descriptor; - u_int num_FAT; - u_int hidden_sectors; - u_int reserved_sectors; - u_int size; - u_int sectors_per_track; - int no_create; - off_t create_size; - off_t offset; - int volume_id_set; - int media_descriptor_set; - int hidden_sectors_set; +#define AOPT(_opt, _type, _name, _min, _desc) _type _name; +ALLOPTS +#undef AOPT + uint32_t volume_id_set:1; + uint32_t media_descriptor_set:1; + uint32_t hidden_sectors_set:1; }; int mkfs_msdos(const char *, const char *, const struct msdos_options *); From owner-svn-src-all@freebsd.org Tue Oct 20 13:47: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 C465EA19012; Tue, 20 Oct 2015 13:47:38 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79029BA7; Tue, 20 Oct 2015 13:47:38 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9KDlbZP038989; Tue, 20 Oct 2015 13:47:37 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KDlblN038988; Tue, 20 Oct 2015 13:47:37 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201510201347.t9KDlblN038988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Tue, 20 Oct 2015 13:47:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289630 - head/sys/arm/amlogic/aml8726 X-SVN-Group: head MIME-Version: 1.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, 20 Oct 2015 13:47:38 -0000 Author: ganbold Date: Tue Oct 20 13:47:36 2015 New Revision: 289630 URL: https://svnweb.freebsd.org/changeset/base/289630 Log: Include "opt_platform.h" to fix kernel build for amlogic devices. Modified: head/sys/arm/amlogic/aml8726/aml8726_machdep.c Modified: head/sys/arm/amlogic/aml8726/aml8726_machdep.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_machdep.c Tue Oct 20 13:32:09 2015 (r289629) +++ head/sys/arm/amlogic/aml8726/aml8726_machdep.c Tue Oct 20 13:47:36 2015 (r289630) @@ -29,6 +29,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_platform.h" + #define _ARM32_BUS_DMA_PRIVATE #include #include From owner-svn-src-all@freebsd.org Tue Oct 20 15:02: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 D8BFCA1A719; Tue, 20 Oct 2015 15:02:33 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [IPv6:2607:fc50:1000:7400:216:3eff:fe72:314f]) by mx1.freebsd.org (Postfix) with ESMTP id B0DD8894; Tue, 20 Oct 2015 15:02:33 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from marvin.beer.town (unknown [76.164.8.130]) by smtp.vangyzen.net (Postfix) with ESMTPSA id C865F565A3; Tue, 20 Oct 2015 10:02:25 -0500 (CDT) Subject: Re: svn commit: r289626 - in head/sys: dev/isp dev/ispfw modules/ispfw modules/ispfw/isp_2400_multi modules/ispfw/isp_2500_multi To: Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510201227.t9KCRxax014039@repo.freebsd.org> From: Eric van Gyzen Message-ID: <5626577B.1030004@vangyzen.net> Date: Tue, 20 Oct 2015 10:02:19 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <201510201227.t9KCRxax014039@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 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: Tue, 20 Oct 2015 15:02:33 -0000 On 10/20/2015 07:27, Alexander Motin wrote: > Author: mav > Date: Tue Oct 20 12:27:59 2015 > New Revision: 289626 > URL: https://svnweb.freebsd.org/changeset/base/289626 > > Log: > Update firmware images for Qlogic 24xx/25xx from 5.5.0 to 7.3.0. > > This also removes separate "_multi" images, since this funcationality is > now in base, and there is simply no new images without it for years. Thank you for updating the firmware! I use these cards in practically all of my FreeBSD systems at work. Does this warrant an entry in UPDATING and/or the Release Notes? Users that load a "multi" kernel module via loader.conf might be astonished. Cheers, Eric From owner-svn-src-all@freebsd.org Tue Oct 20 15:15: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 42999A1AA4B; Tue, 20 Oct 2015 15:15:32 +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 F37B130A; Tue, 20 Oct 2015 15:15:31 +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 t9KFFUa2067067; Tue, 20 Oct 2015 15:15:30 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KFFUgC067066; Tue, 20 Oct 2015 15:15:30 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510201515.t9KFFUgC067066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 20 Oct 2015 15:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289631 - 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: Tue, 20 Oct 2015 15:15:32 -0000 Author: ian Date: Tue Oct 20 15:15:30 2015 New Revision: 289631 URL: https://svnweb.freebsd.org/changeset/base/289631 Log: Uncomment some rather important code that was commented out for benchmarking. Normally this routine is supposed to loop until the PIC returns a "no more interrupts pending" indication. I had commented that out to do just one interrupt per invokation to do some timing tests. Spotted by: Svata Kraus Pointy Hat: ian Modified: head/sys/arm/arm/gic.c Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Tue Oct 20 13:47:36 2015 (r289630) +++ head/sys/arm/arm/gic.c Tue Oct 20 15:15:30 2015 (r289631) @@ -554,10 +554,10 @@ dispatch_irq: arm_irq_dispatch(isrc, tf); next_irq: -// arm_irq_memory_barrier(irq); /* XXX */ -// irq_active_reg = gic_c_read_4(sc, GICC_IAR); -// irq = irq_active_reg & 0x3FF; - if (0 && irq < sc->nirqs) + arm_irq_memory_barrier(irq); + irq_active_reg = gic_c_read_4(sc, GICC_IAR); + irq = irq_active_reg & 0x3FF; + if (irq < sc->nirqs) goto dispatch_irq; return (FILTER_HANDLED); From owner-svn-src-all@freebsd.org Tue Oct 20 15:28: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 04913A1AE14; Tue, 20 Oct 2015 15:28:04 +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 D0245C1D; Tue, 20 Oct 2015 15:28:03 +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 t9KFS2xS070205; Tue, 20 Oct 2015 15:28:02 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KFS2E5070198; Tue, 20 Oct 2015 15:28:02 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510201528.t9KFS2E5070198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 20 Oct 2015 15:28:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289632 - head/sys/ofed/include/asm X-SVN-Group: head MIME-Version: 1.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, 20 Oct 2015 15:28:04 -0000 Author: hselasky Date: Tue Oct 20 15:28:02 2015 New Revision: 289632 URL: https://svnweb.freebsd.org/changeset/base/289632 Log: Add missing FreeBSD RCS keyword and SVN properties. Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/asm/atomic-long.h (contents, props changed) head/sys/ofed/include/asm/atomic.h (contents, props changed) head/sys/ofed/include/asm/byteorder.h (contents, props changed) head/sys/ofed/include/asm/fcntl.h (contents, props changed) head/sys/ofed/include/asm/io.h (contents, props changed) head/sys/ofed/include/asm/pgtable.h (contents, props changed) head/sys/ofed/include/asm/uaccess.h (contents, props changed) Directory Properties: head/sys/ofed/include/asm/types.h (props changed) Modified: head/sys/ofed/include/asm/atomic-long.h ============================================================================== --- head/sys/ofed/include/asm/atomic-long.h Tue Oct 20 15:15:30 2015 (r289631) +++ head/sys/ofed/include/asm/atomic-long.h Tue Oct 20 15:28:02 2015 (r289632) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/asm/atomic.h ============================================================================== --- head/sys/ofed/include/asm/atomic.h Tue Oct 20 15:15:30 2015 (r289631) +++ head/sys/ofed/include/asm/atomic.h Tue Oct 20 15:28:02 2015 (r289632) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/asm/byteorder.h ============================================================================== --- head/sys/ofed/include/asm/byteorder.h Tue Oct 20 15:15:30 2015 (r289631) +++ head/sys/ofed/include/asm/byteorder.h Tue Oct 20 15:28:02 2015 (r289632) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/asm/fcntl.h ============================================================================== --- head/sys/ofed/include/asm/fcntl.h Tue Oct 20 15:15:30 2015 (r289631) +++ head/sys/ofed/include/asm/fcntl.h Tue Oct 20 15:28:02 2015 (r289632) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/asm/io.h ============================================================================== --- head/sys/ofed/include/asm/io.h Tue Oct 20 15:15:30 2015 (r289631) +++ head/sys/ofed/include/asm/io.h Tue Oct 20 15:28:02 2015 (r289632) @@ -1,4 +1,5 @@ -/* +/* $FreeBSD$ */ +/*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. Modified: head/sys/ofed/include/asm/pgtable.h ============================================================================== --- head/sys/ofed/include/asm/pgtable.h Tue Oct 20 15:15:30 2015 (r289631) +++ head/sys/ofed/include/asm/pgtable.h Tue Oct 20 15:28:02 2015 (r289632) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/asm/uaccess.h ============================================================================== --- head/sys/ofed/include/asm/uaccess.h Tue Oct 20 15:15:30 2015 (r289631) +++ head/sys/ofed/include/asm/uaccess.h Tue Oct 20 15:28:02 2015 (r289632) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. From owner-svn-src-all@freebsd.org Tue Oct 20 15:35: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 184EFA1905A for ; Tue, 20 Oct 2015 15:35:04 +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 EBB34173 for ; Tue, 20 Oct 2015 15:35:03 +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; Tue, 20 Oct 2015 15:34:43 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t9KFYxjI012863; Tue, 20 Oct 2015 09:35:00 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1445355299.99375.16.camel@freebsd.org> Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp From: Ian Lepore To: David Malone Cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 20 Oct 2015 09:34:59 -0600 In-Reply-To: <20151017212033.GA43955@walton.maths.tcd.ie> References: <201510161404.t9GE4GqM046436@repo.freebsd.org> <1445106350.71631.36.camel@freebsd.org> <20151017212033.GA43955@walton.maths.tcd.ie> 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: Tue, 20 Oct 2015 15:35:04 -0000 On Sat, 2015-10-17 at 22:20 +0100, David Malone wrote: > On Sat, Oct 17, 2015 at 12:25:50PM -0600, Ian Lepore wrote: > > If the leapseconds file is present, the leap bits for reference > > clocks and downstratum servers are ignored. > > > > I can't determine from casual code examination (and I don't have > > time > > to experiment now) whether that is true even if the file is > > expired. > > The way the code seems to work is: > > 1) Take a vote from your peers on if there is an upcoming > leap second. Refclocks can outvote other peers. (This is > in ntp_proto.c:clock_update() - search for leap_vote_ins). > > 2) If one seems to be pending, try to insert it into an > in-memory table for the end of the month. > > 3) If you find that you loaded a table and the leapsecond > you are trying to insert is within the valid range of the > table, return an error. (This is in > ntp_leapsec.c:leapsec_add()) > > So, I think the change should be safe, if the comments match the > code. > > David. I am slightly less worried after absorbing this info. Only slightly. The leap second is accepted if the time it arrives from the peers is later than the current expiration date in the leapfile. For some reason, nist has always set that expiration date to be 2 days before the actual leap event. That is insane, always has been. The information in that file is valid right up until the second of the leap event. I've always thought that some day they'd straighten that out and use a real expiration date. If they ever do, ntpd is going to turn into a pumpkin at midnight, because it will then reject incoming leap notification from peers right up until the second that it is too late to act on them. But, all of that is theoretical and the way things stand right now it appears to be safe to enable this. I'm probably just scared because I've been burned by leap seconds so many times, especially related to handling leapfiles and their expiration dates (and things like the corner cases that happen when a unit has been powered down for months and gets powered up 30 seconds before a leap event). -- Ian From owner-svn-src-all@freebsd.org Tue Oct 20 16:02: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 1A4EBA1994A; Tue, 20 Oct 2015 16:02:13 +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 E6DF63CC; Tue, 20 Oct 2015 16:02:12 +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 t9KG2B4B079792; Tue, 20 Oct 2015 16:02:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KG2BeA079785; Tue, 20 Oct 2015 16:02:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510201602.t9KG2BeA079785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 20 Oct 2015 16:02:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289633 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 20 Oct 2015 16:02:13 -0000 Author: hselasky Date: Tue Oct 20 16:02:11 2015 New Revision: 289633 URL: https://svnweb.freebsd.org/changeset/base/289633 Log: Add missing FreeBSD RCS keyword and SVN properties. Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/io-mapping.h (contents, props changed) head/sys/ofed/include/linux/io.h (contents, props changed) head/sys/ofed/include/linux/jhash.h (contents, props changed) head/sys/ofed/include/linux/linux_compat.c (contents, props changed) head/sys/ofed/include/linux/linux_idr.c (contents, props changed) head/sys/ofed/include/linux/linux_radix.c (contents, props changed) head/sys/ofed/include/linux/vmalloc.h (contents, props changed) Modified: head/sys/ofed/include/linux/io-mapping.h ============================================================================== --- head/sys/ofed/include/linux/io-mapping.h Tue Oct 20 15:28:02 2015 (r289632) +++ head/sys/ofed/include/linux/io-mapping.h Tue Oct 20 16:02:11 2015 (r289633) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/io.h ============================================================================== --- head/sys/ofed/include/linux/io.h Tue Oct 20 15:28:02 2015 (r289632) +++ head/sys/ofed/include/linux/io.h Tue Oct 20 16:02:11 2015 (r289633) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/jhash.h ============================================================================== --- head/sys/ofed/include/linux/jhash.h Tue Oct 20 15:28:02 2015 (r289632) +++ head/sys/ofed/include/linux/jhash.h Tue Oct 20 16:02:11 2015 (r289633) @@ -18,6 +18,7 @@ * * I've modified Bob's hash to be useful in the Linux kernel, and * any bugs present are surely my fault. -DaveM + * $FreeBSD$ */ /* NOTE: Arguments are modified. */ Modified: head/sys/ofed/include/linux/linux_compat.c ============================================================================== --- head/sys/ofed/include/linux/linux_compat.c Tue Oct 20 15:28:02 2015 (r289632) +++ head/sys/ofed/include/linux/linux_compat.c Tue Oct 20 16:02:11 2015 (r289633) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/linux_idr.c ============================================================================== --- head/sys/ofed/include/linux/linux_idr.c Tue Oct 20 15:28:02 2015 (r289632) +++ head/sys/ofed/include/linux/linux_idr.c Tue Oct 20 16:02:11 2015 (r289633) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/linux_radix.c ============================================================================== --- head/sys/ofed/include/linux/linux_radix.c Tue Oct 20 15:28:02 2015 (r289632) +++ head/sys/ofed/include/linux/linux_radix.c Tue Oct 20 16:02:11 2015 (r289633) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. Modified: head/sys/ofed/include/linux/vmalloc.h ============================================================================== --- head/sys/ofed/include/linux/vmalloc.h Tue Oct 20 15:28:02 2015 (r289632) +++ head/sys/ofed/include/linux/vmalloc.h Tue Oct 20 16:02:11 2015 (r289633) @@ -1,3 +1,4 @@ +/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. From owner-svn-src-all@freebsd.org Tue Oct 20 16:10: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 A3721A19ACD; Tue, 20 Oct 2015 16:10:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 617E6B28; Tue, 20 Oct 2015 16:10:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9KGAlha082209; Tue, 20 Oct 2015 16:10:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KGAkwF082202; Tue, 20 Oct 2015 16:10:46 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201510201610.t9KGAkwF082202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Oct 2015 16:10:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289634 - in head/etc: etc.amd64 etc.i386 etc.mips etc.pc98 etc.powerpc etc.sparc64 X-SVN-Group: head MIME-Version: 1.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, 20 Oct 2015 16:10:48 -0000 Author: gjb Date: Tue Oct 20 16:10:46 2015 New Revision: 289634 URL: https://svnweb.freebsd.org/changeset/base/289634 Log: Enable all callin ttys if the tty is an available console. Discussed on: -arch@ (no objections) MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/etc/etc.amd64/ttys head/etc/etc.i386/ttys head/etc/etc.mips/ttys head/etc/etc.pc98/ttys head/etc/etc.powerpc/ttys head/etc/etc.sparc64/ttys Modified: head/etc/etc.amd64/ttys ============================================================================== --- head/etc/etc.amd64/ttys Tue Oct 20 16:02:11 2015 (r289633) +++ head/etc/etc.amd64/ttys Tue Oct 20 16:10:46 2015 (r289634) @@ -42,8 +42,8 @@ ttyv8 "/usr/local/bin/xdm -nodaemon" xte # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure -ttyu1 "/usr/libexec/getty std.9600" dialup off secure -ttyu2 "/usr/libexec/getty std.9600" dialup off secure -ttyu3 "/usr/libexec/getty std.9600" dialup off secure +ttyu1 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu2 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu3 "/usr/libexec/getty 3wire" vt100 onifconsole secure # Dumb console dcons "/usr/libexec/getty std.9600" vt100 off secure Modified: head/etc/etc.i386/ttys ============================================================================== --- head/etc/etc.i386/ttys Tue Oct 20 16:02:11 2015 (r289633) +++ head/etc/etc.i386/ttys Tue Oct 20 16:10:46 2015 (r289634) @@ -42,8 +42,8 @@ ttyv8 "/usr/local/bin/xdm -nodaemon" xte # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure -ttyu1 "/usr/libexec/getty std.9600" dialup off secure -ttyu2 "/usr/libexec/getty std.9600" dialup off secure -ttyu3 "/usr/libexec/getty std.9600" dialup off secure +ttyu1 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu2 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu3 "/usr/libexec/getty 3wire" vt100 onifconsole secure # Dumb console dcons "/usr/libexec/getty std.9600" vt100 off secure Modified: head/etc/etc.mips/ttys ============================================================================== --- head/etc/etc.mips/ttys Tue Oct 20 16:02:11 2015 (r289633) +++ head/etc/etc.mips/ttys Tue Oct 20 16:10:46 2015 (r289634) @@ -30,7 +30,7 @@ console none unknown off secure # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. -ttyu0 "/usr/libexec/getty 3wire" vt100 on secure -ttyu1 "/usr/libexec/getty std.115200" dialup off secure -ttyu2 "/usr/libexec/getty std.115200" dialup off secure -ttyu3 "/usr/libexec/getty std.115200" dialup off secure +ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu1 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu2 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu3 "/usr/libexec/getty 3wire" vt100 onifconsole secure Modified: head/etc/etc.pc98/ttys ============================================================================== --- head/etc/etc.pc98/ttys Tue Oct 20 16:02:11 2015 (r289633) +++ head/etc/etc.pc98/ttys Tue Oct 20 16:10:46 2015 (r289634) @@ -41,9 +41,9 @@ ttyv7 "/usr/libexec/getty Pc" cons25w o ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. -ttyu0 "/usr/libexec/getty std.9600" dialup off secure -ttyu1 "/usr/libexec/getty std.9600" dialup off secure -ttyu2 "/usr/libexec/getty std.9600" dialup off secure -ttyu3 "/usr/libexec/getty std.9600" dialup off secure +ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu1 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu2 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu3 "/usr/libexec/getty 3wire" vt100 onifconsole secure # Dumb console dcons "/usr/libexec/getty std.9600" vt100 off secure Modified: head/etc/etc.powerpc/ttys ============================================================================== --- head/etc/etc.powerpc/ttys Tue Oct 20 16:02:11 2015 (r289633) +++ head/etc/etc.powerpc/ttys Tue Oct 20 16:10:46 2015 (r289634) @@ -41,9 +41,9 @@ ttyv7 "/usr/libexec/getty Pc" xterm on #ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. -ttyu0 "/usr/libexec/getty 3wire" vt100 on secure -ttyu1 "/usr/libexec/getty std.9600" dialup off secure -ttyu2 "/usr/libexec/getty std.9600" dialup off secure -ttyu3 "/usr/libexec/getty std.9600" dialup off secure +ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu1 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu2 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu3 "/usr/libexec/getty 3wire" vt100 onifconsole secure # Dumb console dcons "/usr/libexec/getty std.9600" vt100 off secure Modified: head/etc/etc.sparc64/ttys ============================================================================== --- head/etc/etc.sparc64/ttys Tue Oct 20 16:02:11 2015 (r289633) +++ head/etc/etc.sparc64/ttys Tue Oct 20 16:10:46 2015 (r289634) @@ -46,9 +46,9 @@ ttyv8 "/usr/local/bin/xdm -nodaemon" xte # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. # uart(4) -ttyu0 "/usr/libexec/getty 3wire" vt100 on secure -ttyu1 "/usr/libexec/getty 3wire" vt100 on secure -ttyu2 "/usr/libexec/getty 3wire" vt100 on secure -ttyu3 "/usr/libexec/getty std.9600" vt100 off secure +ttyu0 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu1 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu2 "/usr/libexec/getty 3wire" vt100 onifconsole secure +ttyu3 "/usr/libexec/getty 3wire" vt100 onifconsole secure # Dumb console dcons "/usr/libexec/getty std.9600" vt100 off secure From owner-svn-src-all@freebsd.org Tue Oct 20 17:27: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 9B25FA1A06A; Tue, 20 Oct 2015 17:27:12 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CE4C2DA; Tue, 20 Oct 2015 17:27:12 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9KHRBjb005780; Tue, 20 Oct 2015 17:27:11 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KHRBPc005777; Tue, 20 Oct 2015 17:27:11 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201510201727.t9KHRBPc005777@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 20 Oct 2015 17:27:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289635 - head/sys/dev/qlxgbe X-SVN-Group: head MIME-Version: 1.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, 20 Oct 2015 17:27:12 -0000 Author: davidcs Date: Tue Oct 20 17:27:11 2015 New Revision: 289635 URL: https://svnweb.freebsd.org/changeset/base/289635 Log: ql_hw.c: fixed error code INJCT_HEARTBEAT_FAILURE ql_os.c: removed unnecessary debug printf ql_ver.h: updated version number MFC after:5 days Modified: head/sys/dev/qlxgbe/ql_hw.c head/sys/dev/qlxgbe/ql_os.c head/sys/dev/qlxgbe/ql_ver.h Modified: head/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- head/sys/dev/qlxgbe/ql_hw.c Tue Oct 20 16:10:46 2015 (r289634) +++ head/sys/dev/qlxgbe/ql_hw.c Tue Oct 20 17:27:11 2015 (r289635) @@ -387,6 +387,7 @@ ql_hw_add_sysctls(qla_host_t *ha) "Minidump Utility can start minidump process"); #ifdef QL_DBG + ha->err_inject = 0; SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "err_inject", @@ -3057,7 +3058,7 @@ ql_hw_check_health(qla_host_t *ha) val = READ_REG32(ha, Q8_FIRMWARE_HEARTBEAT); if ((val != ha->hw.hbeat_value) && - (!(QL_ERR_INJECT(ha, INJCT_TEMPERATURE_FAILURE)))) { + (!(QL_ERR_INJECT(ha, INJCT_HEARTBEAT_FAILURE)))) { ha->hw.hbeat_value = val; return 0; } Modified: head/sys/dev/qlxgbe/ql_os.c ============================================================================== --- head/sys/dev/qlxgbe/ql_os.c Tue Oct 20 16:10:46 2015 (r289634) +++ head/sys/dev/qlxgbe/ql_os.c Tue Oct 20 17:27:11 2015 (r289635) @@ -289,8 +289,6 @@ qla_pci_attach(device_t dev) int i; uint32_t num_rcvq = 0; - QL_DPRINT2(ha, (dev, "%s: enter\n", __func__)); - if ((ha = device_get_softc(dev)) == NULL) { device_printf(dev, "cannot get softc\n"); return (ENOMEM); Modified: head/sys/dev/qlxgbe/ql_ver.h ============================================================================== --- head/sys/dev/qlxgbe/ql_ver.h Tue Oct 20 16:10:46 2015 (r289634) +++ head/sys/dev/qlxgbe/ql_ver.h Tue Oct 20 17:27:11 2015 (r289635) @@ -36,6 +36,6 @@ #define QLA_VERSION_MAJOR 3 #define QLA_VERSION_MINOR 10 -#define QLA_VERSION_BUILD 24 +#define QLA_VERSION_BUILD 25 #endif /* #ifndef _QL_VER_H_ */ From owner-svn-src-all@freebsd.org Tue Oct 20 17:58: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 D1392A1A71D; Tue, 20 Oct 2015 17:58:22 +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 8498FD8; Tue, 20 Oct 2015 17:58:22 +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 t9KHwLFK014219; Tue, 20 Oct 2015 17:58:21 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KHwL9s014216; Tue, 20 Oct 2015 17:58:21 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510201758.t9KHwL9s014216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 20 Oct 2015 17:58:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289636 - in head: lib/libc/sys sys/kern sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 20 Oct 2015 17:58:22 -0000 Author: jhb Date: Tue Oct 20 17:58:21 2015 New Revision: 289636 URL: https://svnweb.freebsd.org/changeset/base/289636 Log: Switch pl_child_pid from int to pid_t. Reviewed by: emaste, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D3857 Modified: head/lib/libc/sys/ptrace.2 head/sys/kern/sys_process.c head/sys/sys/ptrace.h Modified: head/lib/libc/sys/ptrace.2 ============================================================================== --- head/lib/libc/sys/ptrace.2 Tue Oct 20 17:27:11 2015 (r289635) +++ head/lib/libc/sys/ptrace.2 Tue Oct 20 17:58:21 2015 (r289636) @@ -2,7 +2,7 @@ .\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ .\" .\" This file is in the public domain. -.Dd October 6, 2015 +.Dd October 20, 2015 .Dt PTRACE 2 .Os .Sh NAME @@ -306,7 +306,7 @@ struct ptrace_lwpinfo { sigset_t pl_siglist; siginfo_t pl_siginfo; char pl_tdname[MAXCOMLEN + 1]; - int pl_child_pid; + pid_t pl_child_pid; u_int pl_syscall_code; u_int pl_syscall_narg; }; Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Tue Oct 20 17:27:11 2015 (r289635) +++ head/sys/kern/sys_process.c Tue Oct 20 17:58:21 2015 (r289636) @@ -96,7 +96,7 @@ struct ptrace_lwpinfo32 { sigset_t pl_siglist; /* LWP pending signal */ struct siginfo32 pl_siginfo; /* siginfo for signal */ char pl_tdname[MAXCOMLEN + 1]; /* LWP name. */ - int pl_child_pid; /* New child pid */ + pid_t pl_child_pid; /* New child pid */ u_int pl_syscall_code; u_int pl_syscall_narg; }; Modified: head/sys/sys/ptrace.h ============================================================================== --- head/sys/sys/ptrace.h Tue Oct 20 17:27:11 2015 (r289635) +++ head/sys/sys/ptrace.h Tue Oct 20 17:58:21 2015 (r289636) @@ -112,7 +112,7 @@ struct ptrace_lwpinfo { sigset_t pl_siglist; /* LWP pending signal */ struct __siginfo pl_siginfo; /* siginfo for signal */ char pl_tdname[MAXCOMLEN + 1]; /* LWP name */ - int pl_child_pid; /* New child pid */ + pid_t pl_child_pid; /* New child pid */ u_int pl_syscall_code; u_int pl_syscall_narg; }; From owner-svn-src-all@freebsd.org Tue Oct 20 18:01: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 C46CFA1A84D; Tue, 20 Oct 2015 18:01:09 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BB626A1; Tue, 20 Oct 2015 18:01:09 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9KI189e016889; Tue, 20 Oct 2015 18:01:08 GMT (envelope-from emax@FreeBSD.org) Received: (from emax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KI18Ek016888; Tue, 20 Oct 2015 18:01:08 GMT (envelope-from emax@FreeBSD.org) Message-Id: <201510201801.t9KI18Ek016888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emax set sender to emax@FreeBSD.org using -f From: Maksim Yevmenkin Date: Tue, 20 Oct 2015 18:01:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289637 - head/usr.sbin/bluetooth/sdpcontrol X-SVN-Group: head MIME-Version: 1.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, 20 Oct 2015 18:01:10 -0000 Author: emax Date: Tue Oct 20 18:01:08 2015 New Revision: 289637 URL: https://svnweb.freebsd.org/changeset/base/289637 Log: check boundaries while parsing SDP responses Reported by: hps Reviewed by: hps MFC after: 1 week Modified: head/usr.sbin/bluetooth/sdpcontrol/search.c Modified: head/usr.sbin/bluetooth/sdpcontrol/search.c ============================================================================== --- head/usr.sbin/bluetooth/sdpcontrol/search.c Tue Oct 20 17:58:21 2015 (r289636) +++ head/usr.sbin/bluetooth/sdpcontrol/search.c Tue Oct 20 18:01:08 2015 (r289637) @@ -103,6 +103,12 @@ print_service_class_id_list(uint8_t cons /* NOT REACHED */ } + if (len > (end - start)) { + fprintf(stderr, "Invalid Service Class ID List. " \ + "Too long len=%d\n", len); + return; + } + while (start < end) { SDP_GET8(type, start); switch (type) { @@ -259,28 +265,31 @@ print_protocol_descriptor(uint8_t const case SDP_DATA_STR8: case SDP_DATA_URL8: SDP_GET8(len, start); - fprintf(stdout, "%*.*s\n", len, len, (char *) start); - start += len; + for (; start < end && len > 0; start ++, len --) + fprintf(stdout, "%c", *start); + fprintf(stdout, "\n"); break; case SDP_DATA_STR16: case SDP_DATA_URL16: SDP_GET16(len, start); - fprintf(stdout, "%*.*s\n", len, len, (char *) start); - start += len; + for (; start < end && len > 0; start ++, len --) + fprintf(stdout, "%c", *start); + fprintf(stdout, "\n"); break; case SDP_DATA_STR32: case SDP_DATA_URL32: SDP_GET32(len, start); - fprintf(stdout, "%*.*s\n", len, len, (char *) start); - start += len; + for (; start < end && len > 0; start ++, len --) + fprintf(stdout, "%c", *start); + fprintf(stdout, "\n"); break; case SDP_DATA_SEQ8: case SDP_DATA_ALT8: SDP_GET8(len, start); - for (; len > 0; start ++, len --) + for (; start < end && len > 0; start ++, len --) fprintf(stdout, "%#2.2x ", *start); fprintf(stdout, "\n"); break; @@ -288,7 +297,7 @@ print_protocol_descriptor(uint8_t const case SDP_DATA_SEQ16: case SDP_DATA_ALT16: SDP_GET16(len, start); - for (; len > 0; start ++, len --) + for (; start < end && len > 0; start ++, len --) fprintf(stdout, "%#2.2x ", *start); fprintf(stdout, "\n"); break; @@ -296,7 +305,7 @@ print_protocol_descriptor(uint8_t const case SDP_DATA_SEQ32: case SDP_DATA_ALT32: SDP_GET32(len, start); - for (; len > 0; start ++, len --) + for (; start < end && len > 0; start ++, len --) fprintf(stdout, "%#2.2x ", *start); fprintf(stdout, "\n"); break; @@ -342,6 +351,12 @@ print_protocol_descriptor_list(uint8_t c /* NOT REACHED */ } + if (len > (end - start)) { + fprintf(stderr, "Invalid Protocol Descriptor List. " \ + "Too long, len=%d\n", len); + return; + } + while (start < end) { SDP_GET8(type, start); switch (type) { @@ -364,6 +379,12 @@ print_protocol_descriptor_list(uint8_t c /* NOT REACHED */ } + if (len > (end - start)) { + fprintf(stderr, "Invalid Protocol Descriptor List. " \ + "Too long, len=%d\n", len); + return; + } + print_protocol_descriptor(start, start + len); start += len; } @@ -416,6 +437,12 @@ print_bluetooth_profile_descriptor_list( /* NOT REACHED */ } + if (len > (end - start)) { + fprintf(stderr, "Invalid Bluetooth Profile Descriptor List. " \ + "Too long, len=%d\n", len); + return; + } + while (start < end) { SDP_GET8(type, start); switch (type) { @@ -439,6 +466,13 @@ print_bluetooth_profile_descriptor_list( /* NOT REACHED */ } + if (len > (end - start)) { + fprintf(stderr, "Invalid Bluetooth Profile " \ + "Descriptor List. " \ + "Too long, len=%d\n", len); + return; + } + /* Get UUID */ SDP_GET8(type, start); switch (type) { From owner-svn-src-all@freebsd.org Tue Oct 20 18:20: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 EF80FA1ADE9; Tue, 20 Oct 2015 18:20:39 +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 B5AB9EE2; Tue, 20 Oct 2015 18:20:39 +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 t9KIKcp2020161; Tue, 20 Oct 2015 18:20:38 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KIKc4b020157; Tue, 20 Oct 2015 18:20:38 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510201820.t9KIKc4b020157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 20 Oct 2015 18:20: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: r289638 - stable/10/gnu/usr.bin/groff/tmac 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, 20 Oct 2015 18:20:40 -0000 Author: bdrewery Date: Tue Oct 20 18:20:38 2015 New Revision: 289638 URL: https://svnweb.freebsd.org/changeset/base/289638 Log: MFC r288429: Replace most of the beforeinstall: hack with FILES mechanism. Added: stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1.in - copied unchanged from r289637, stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1 stable/10/gnu/usr.bin/groff/tmac/mdoc.local.in - copied unchanged from r289637, stable/10/gnu/usr.bin/groff/tmac/mdoc.local stable/10/gnu/usr.bin/groff/tmac/ru.KOI8-R.in - copied unchanged from r289637, stable/10/gnu/usr.bin/groff/tmac/ru.KOI8-R Deleted: stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1 stable/10/gnu/usr.bin/groff/tmac/mdoc.local stable/10/gnu/usr.bin/groff/tmac/ru.KOI8-R Modified: stable/10/gnu/usr.bin/groff/tmac/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/gnu/usr.bin/groff/tmac/Makefile ============================================================================== --- stable/10/gnu/usr.bin/groff/tmac/Makefile Tue Oct 20 18:01:08 2015 (r289637) +++ stable/10/gnu/usr.bin/groff/tmac/Makefile Tue Oct 20 18:20:38 2015 (r289638) @@ -15,7 +15,7 @@ MLINKS+= groff_man.7 man.7 MLINKS+= groff_me.7 me.7 MLINKS+= groff_mdoc.7 mdoc.7 groff_mdoc.7 mdoc.samples.7 -CLEANFILES= ${MAN} ${MDOCFILES:S/$/-s/} ${STRIPFILES:S/$/-s/} ${SPECIALFILES:S/$/-s/} +CLEANFILES= ${MAN} NORMALFILES= mandoc.tmac andoc.tmac an-old.tmac \ me.tmac \ @@ -40,45 +40,59 @@ NORMALFILES= mandoc.tmac andoc.tmac an-o composite.tmac \ eqnrc \ troffrc troffrc-end \ + koi8-r.tmac hyphen.ru \ hyphen.us hyphenex.us +# These are all generated into the OBJDIR. SPECIALFILES= an.tmac man.tmac s.tmac ms.tmac www.tmac STRIPFILES= e.tmac doc.tmac mdoc.local MDOCFILES= doc-common doc-ditroff doc-nroff doc-syms \ fr.ISO8859-1 ru.KOI8-R +# These are in srcdir and must be built special to avoid colliding with +# CURDIR=OBJDIR. +SRCFILES= fr.ISO8859-1 mdoc.local ru.KOI8-R +CLEANFILES+= ${SRCFILES} + +FILESGROUPS= FILES +FILES= ${NORMALFILES} +FILESOWN= ${TMACOWN} +FILESGRP= ${TMACGRP} +FILESMODE= ${TMACMODE} +FILESDIR= ${TMACDIR} +MDOCFILESDIR= ${MDOCDIR} + +# Setup handling for the generated and special file groups +.for var in SPECIAL STRIP MDOC +FILESGROUPS+= ${var}FILES +CLEANFILES+= ${${var}FILES} +${var}FILESOWN?=${TMACOWN} +${var}FILESGRP?=${TMACGRP} +${var}FILESMODE?=${TMACMODE} +${var}FILESDIR?=${TMACDIR} +.endfor -all: ${MDOCFILES:S/$/-s/} ${STRIPFILES:S/$/-s/} ${SPECIALFILES:S/$/-s/} +beforeinstall: +.if !exists(${DESTDIR}${TMACDIR}/man.local) + ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ + ${DIST_DIR}/man.local ${DESTDIR}${TMACDIR} +.endif +.include + +# Do this after ../Makefile.inc gets included so DIST_DIR is defined. .for f in ${MDOCFILES} ${STRIPFILES} -$f-s: $f +# Generate the file from the contrib dir or src dir as needed. +.if ${SRCFILES:M${f}} != "" +${f}: ${.CURDIR}/${f}.in +.else +${f}: ${DIST_DIR}/${f} +.endif sed -f ${DIST_DIR}/strip.sed ${.ALLSRC} > ${.TARGET} .endfor .for f in ${SPECIALFILES} -$f-s: $f +${f}: ${DIST_DIR}/${f} sed -e "s;@TMAC_AN_PREFIX@;${tmac_an_prefix};g" \ -e "s;@TMAC_S_PREFIX@;${tmac_s_prefix};g" \ -e "s;@PNMTOPS_NOSETPAGE@;pnmtops;g" \ ${.ALLSRC} > ${.TARGET} .endfor - -beforeinstall: - (cd ${DIST_DIR} && \ - ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ - ${NORMALFILES} ${DESTDIR}${TMACDIR}) - (cd ${.CURDIR} && \ - ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ - koi8-r.tmac hyphen.ru ${DESTDIR}${TMACDIR}) -.for f in ${STRIPFILES} ${SPECIALFILES} - ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ - $f-s ${DESTDIR}${TMACDIR}/$f -.endfor -.for f in ${MDOCFILES} - ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ - $f-s ${DESTDIR}${MDOCDIR}/$f -.endfor -.if !exists(${DESTDIR}${TMACDIR}/man.local) - ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ - ${DIST_DIR}/man.local ${DESTDIR}${TMACDIR} -.endif - -.include Copied: stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1.in (from r289637, stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1.in Tue Oct 20 18:20:38 2015 (r289638, copy of r289637, stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1) @@ -0,0 +1,140 @@ +.\" Copyright (c) 2002 Sebastien Gioria . +.\" 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$ +.\" +.\" %beginstrip% +. +.\" .Dt localization +.nr doc-volume-operating-system-ateol 1 +.ds doc-volume-ds-1 Manuel des commandes utilisateur +.ds doc-volume-ds-2 Manuel des appels systèmes +.ds doc-volume-ds-3 Manuel des fonctions de la librairie +.ds doc-volume-ds-4 Manuel des interfaces du noyau +.ds doc-volume-ds-5 Manuel des formats de fichier +.ds doc-volume-ds-6 Manuel des jeux +.ds doc-volume-ds-7 Manuel d'informations diverses +.ds doc-volume-ds-8 Manuel de l'administrateur +.ds doc-volume-ds-9 Manuel du développeur du noyau +. +.ds doc-volume-ds-USD Documentation supplémentaire utilisateur +.ds doc-volume-ds-PS1 Documentation supplémentaire du programmeur +.ds doc-volume-ds-AMD Documentation ancestrale +.ds doc-volume-ds-SMM Manuel de l'administrateur +.ds doc-volume-ds-URM Manuel de référence utilisateur +.ds doc-volume-ds-PRM Manuel du programmeur +.ds doc-volume-ds-KM Manuel du noyau +.ds doc-volume-ds-IND Index principal des manuels +.ds doc-volume-ds-LOCAL Manuel local +.ds doc-volume-ds-CON Manuel des logiciels contribués +. +.\" .Os localization +.ds doc-operating-system-ATT-7 7th\~Edition +.ds doc-operating-system-BSD-3 3rd\~Distribution de Berkeley +.ds doc-operating-system-BSD-4 4th\~Distribution de Berkeley +.ds doc-operating-system-BSD-4.1 Distribution\~4.1 de Berkeley +.ds doc-operating-system-BSD-4.2 Distribution\~4.2 de Berkeley +.ds doc-operating-system-BSD-4.3 Distribution\~4.3 de Berkeley +.ds doc-operating-system-BSD-4.3T Distribution 4.3-Tahoe de Berkeley +.ds doc-operating-system-BSD-4.3R Distribution 4.3-Reno de Berkeley +. +.\" .Sh localization +.ds doc-section-name NOM +.ds doc-section-synopsis SYNOPSIS +.ds doc-section-library BIBLIOTHÈQUE +.ds doc-section-description DESCRIPTION +.ds doc-section-see-also VOIR +.ds doc-section-files FICHIERS +.ds doc-section-authors AUTEURS +. +.\" .Lb localization +.ds doc-str-Lb-libarm32 Bibliothèque de l'architecture ARM32 (libarm32, \-larm32) +.ds doc-str-Lb-libc Bibliothèque\~C Standard (libc, \-lc) +.ds doc-str-Lb-libc_r Bibliothèque\~C réentrante (libc_r, \-lc_r) +.\" XXX ds doc-str-Lb-libcalendar Calendar Arithmetic Library (libcalendar, \-lcalendar) +.\" XXX ds doc-str-Lb-libcam Common Access Method User Library (libcam, \-lcam) +.ds doc-str-Lb-libcipher Bibliothèque de cryptage FreeSec (libcipher, \-lcipher) +.ds doc-str-Lb-libcompat Bibliothèque de compatibilité (libcompat, \-lcompat) +.ds doc-str-Lb-libcrypt Bibliothèque de cryptage (libcrypt, \-lcrypt) +.ds doc-str-Lb-libcurses Bibliothèque de Curses (libcurses, \-lcurses) +.\" XXX ds doc-str-Lb-libdevinfo Device and Resource Information Utility Library (libdevinfo, \-devinfo) +.ds doc-str-Lb-libdevstat Bibliothèque de statistiques des périphériques (libdevstat, \-ldevstat) +.ds doc-str-Lb-libdisk Bibliothèque d'accès à l'interface des labels de partitions (libdisk, \-ldisk) +.ds doc-str-Lb-libedit Bibliothèque de l'éditeur de ligne de commande (libedit, \-ledit) +.ds doc-str-Lb-libfetch Bibliothèque de transfert de fichier (libfetch, \-lfetch) +.\" XXX ds doc-str-Lb-libgeom Userland API Library for kernel GEOM subsystem (libgeom, \-lgeom) +.ds doc-str-Lb-libi386 Bibliothèque de l'architecture i386 (libi386, \-li386) +.ds doc-str-Lb-libipsec Bibliothèque de contrôle de politique IPsec (libipsec, \-lipsec) +.ds doc-str-Lb-libipx Bibliothèque de support des conversions des adresses IPX (libipx, \-lipx) +.ds doc-str-Lb-libkvm Bibliothèque d'accès aux données du noyau (libkvm, \-lkvm) +.ds doc-str-Lb-libm Bibliothèque mathématique (libm, \-lm) +.ds doc-str-Lb-libmd Bibliothèque de support des signatures (MD4, MD5, etc.) (libmd, \-lmd) +.ds doc-str-Lb-libmenu Bibliothèque Curses des Menus (libmenu, \-lmenu) +.ds doc-str-Lb-libnetgraph Bibliothèque utilisateur Netgraph (libnetgraph, \-lnetgraph) +.ds doc-str-Lb-libossaudio Bibliothèque d'émulation audio OSS (libossaudio, \-lossaudio) +.ds doc-str-Lb-libpam Bibliothèque PAM (libpam, \-lpam) +.ds doc-str-Lb-libposix Bibliothèque de compatibilité \*[Px] (libposix, \-lposix) +.ds doc-str-Lb-libresolv Bibliothèque du résolveur DNS (libresolv, \-lresolv) +.ds doc-str-Lb-librpcsvc Bibliothèque des services RPC (librpcsvc, \-lrpcsvc) +.ds doc-str-Lb-libtermcap Bibliothèque d'accès aux terminaux (libtermcap, \-ltermcap) +.\" XXX ds doc-str-Lb-libufs UFS File System Access Library (libufs, \-lufs) +.\" XXX ds doc-str-Lb-libugidfw File System Firewall Interface Library (libugidfw, \-lugidfw) +.ds doc-str-Lb-libusbhid Bibliothèque d'accès aux routines USB HID (libusbhid, \-lusbhid) +.ds doc-str-Lb-libutil Bibliothèque des utilitaires système (libutil, \-lutil) +.ds doc-str-Lb-libvgl Bibliothèque graphique vidéo (libvgl, \-lvgl) +.ds doc-str-Lb-libz Bibliothèque de compression (libz, \-lz) +. +.\" .Rv localization +.ds doc-str-Rv-std-prefix "La +.ds doc-str-Rv-std-suffix "fonction retourne la valeur\~0 si tout c'est bien passé; +.as doc-str-Rv-std-suffix " sinon la valeur \~-1 est retournée et +.as doc-str-Rv-std-suffix " la variable globale \*[doc-Va-font]errno\f[P] +.as doc-str-Rv-std-suffix " est positionnée pour indiquer l'erreur. +. +.ds doc-str-Rv-stds-prefix "Les +.ds doc-str-Rv-stds-and "et +.ds doc-str-Rv-stds-suffix "fonctions retournent la valeur\~0 si tout c'est bien passé; +.as doc-str-Rv-stds-suffix " sinon la valeur \~-1 est retournée et +.as doc-str-Rv-stds-suffix " la variable globale \*[doc-Va-font]errno\f[P] +.as doc-str-Rv-stds-suffix " est positionnée pour indiquer l'erreur. +. +.ds doc-str-Rv-std0 "Si tout c'est bien passé, la valeur\~0 est retournée; +.as doc-str-Rv-std0 " sinon la valeur \~-1 est retournée et +.as doc-str-Rv-std0 " la variable globale \*[doc-Va-font]errno\f[P] +.as doc-str-Rv-std0 " est positionnée pour indiquer l'erreur. +. +.\" .Ex localization +.ds doc-str-Ex-std-prefix "La commande +.ds doc-str-Ex-std-suffix " retourne\~0 si tout c'est bien passé, +.as doc-str-Ex-std-suffix " et\~>0 si une erreur survient. +. +.ds doc-str-Ex-stds-prefix "Les commandes +.ds doc-str-Ex-stds-suffix "retournent\~0 si tout c'est bien passé, +.as doc-str-Ex-stds-suffix " et\~>0 si une erreur survient. +. +.\" .Ar localization +.ds doc-str-Ar-default "fichier\ .\|.\|. +. +.\" .%A localization +.ds doc-str-dpra "et Copied: stable/10/gnu/usr.bin/groff/tmac/mdoc.local.in (from r289637, stable/10/gnu/usr.bin/groff/tmac/mdoc.local) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/gnu/usr.bin/groff/tmac/mdoc.local.in Tue Oct 20 18:20:38 2015 (r289638, copy of r289637, stable/10/gnu/usr.bin/groff/tmac/mdoc.local) @@ -0,0 +1,80 @@ +.\" Copyright (c) 2001-2004 Ruslan Ermilov . +.\" 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$ +.\" +.\" %beginstrip% +. +.eo +. +. +.ds doc-volume-operating-system FreeBSD +. +.\" FreeBSD .Lb values +.ds doc-str-Lb-libarchive Streaming Archive Library (libarchive, \-larchive) +.ds doc-str-Lb-libbluetooth Bluetooth User Library (libbluetooth, \-lbluetooth) +.ds doc-str-Lb-libcapsicum Capsicum Library (libcapsicum, \-lcapsicum) +.ds doc-str-Lb-libcuse Userland Character Device Library (libcuse, \-lcuse) +.ds doc-str-Lb-libedit Line Editor and History Library (libedit, \-ledit) +.ds doc-str-Lb-libefi EFI Runtime Services Library (libefi, \-lefi) +.ds doc-str-Lb-libelf ELF Parsing Library (libelf, \-lelf) +.ds doc-str-Lb-libexecinfo Backtrace Access Library (libexecinfo, \-lexecinfo) +.ds doc-str-Lb-libfetch File Transfer Library (libfetch, \-lfetch) +.ds doc-str-Lb-libnv Name/value pairs library (libnv, \-lnv) +.ds doc-str-Lb-libpmc Performance Monitoring Counters Interface Library (libpmc, \-lpmc) +.ds doc-str-Lb-libproc Processor Monitoring and Analysis Library (libproc, \-lproc) +.ds doc-str-Lb-libprocstat Process and Files Information Retrieval (libprocstat, \-lprocstat) +.ds doc-str-Lb-librtld_db Run-time Linker Debugging Library (librtld_db, \-lrtld_db) +.ds doc-str-Lb-libsbuf Safe String Composition Library (libsbuf, \-lsbuf) +.ds doc-str-Lb-libstdthreads C11 Threads Library (libstdthreads, \-lstdthreads) +. +.\" Default .Os value +.ds doc-default-operating-system FreeBSD\~10.2 +. +.\" FreeBSD releases not found in doc-common +.ds doc-operating-system-FreeBSD-7.4 7.4 +.ds doc-operating-system-FreeBSD-8.3 8.3 +.ds doc-operating-system-FreeBSD-8.4 8.4 +.ds doc-operating-system-FreeBSD-9.1 9.1 +.ds doc-operating-system-FreeBSD-9.2 9.2 +.ds doc-operating-system-FreeBSD-9.3 9.3 +.ds doc-operating-system-FreeBSD-10.0 10.0 +.ds doc-operating-system-FreeBSD-10.1 10.1 +.ds doc-operating-system-FreeBSD-10.2 10.2 +.ds doc-operating-system-FreeBSD-11.0 11.0 +. +.\" Definitions for other *BSDs not (yet) in doc-common +.ds doc-operating-system-NetBSD-7.0 7.0 +. +.\" Definitions not (yet) in doc-syms +. +.ec +. +.\" Locale support +.if d doc-locale \{\ +. ie "\*[doc-locale]"ru.KOI8-R" \ +. mso mdoc/ru.KOI8-R +. el \{ .if "\*[doc-locale]"fr.ISO8859-1" \ +. mso mdoc/fr.ISO8859-1 +.\}\} Copied: stable/10/gnu/usr.bin/groff/tmac/ru.KOI8-R.in (from r289637, stable/10/gnu/usr.bin/groff/tmac/ru.KOI8-R) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/gnu/usr.bin/groff/tmac/ru.KOI8-R.in Tue Oct 20 18:20:38 2015 (r289638, copy of r289637, stable/10/gnu/usr.bin/groff/tmac/ru.KOI8-R) @@ -0,0 +1,140 @@ +.\" Copyright (c) 2001-2003 Ruslan Ermilov . +.\" 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$ +.\" +.\" %beginstrip% +. +.\" ÌÏËÁÌÉÚÁÃÉÑ .Dt +.nr doc-volume-operating-system-ateol 1 +.ds doc-volume-ds-1 óÐÒÁ×ÏÞÎÉË ÏÓÎÏ×ÎÙÈ ËÏÍÁÎÄ +.ds doc-volume-ds-2 óÐÒÁ×ÏÞÎÉË ÓÉÓÔÅÍÎÙÈ ×ÙÚÏ×Ï× +.ds doc-volume-ds-3 óÐÒÁ×ÏÞÎÉË ÂÉÂÌÉÏÔÅÞÎÙÈ ÆÕÎËÃÉÊ +.ds doc-volume-ds-4 óÐÒÁ×ÏÞÎÉË ÉÎÔÅÒÆÅÊÓÏ× ÑÄÒÁ +.ds doc-volume-ds-5 óÐÒÁ×ÏÞÎÉË ÆÏÒÍÁÔÏ× ÆÁÊÌÏ× +.ds doc-volume-ds-6 óÐÒÁ×ÏÞÎÉË ÉÇÒ +.ds doc-volume-ds-7 óÐÒÁ×ÏÞÎÉË ÒÁÚÎÏÊ ÉÎÆÏÒÍÁÃÉÉ +.ds doc-volume-ds-8 óÐÒÁ×ÏÞÎÉË ÓÉÓÔÅÍÎÏÇÏ ÁÄÍÉÎÉÓÔÒÁÔÏÒÁ +.ds doc-volume-ds-9 óÐÒÁ×ÏÞÎÉË ÒÁÚÒÁÂÏÔÞÉËÁ ÑÄÒÁ +. +.ds doc-volume-ds-USD äÏÐÏÌÎÉÔÅÌØÎÙÅ ÄÏËÕÍÅÎÔÙ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ +.ds doc-volume-ds-PS1 äÏÐÏÌÎÉÔÅÌØÎÙÅ ÄÏËÕÍÅÎÔÙ ÄÌÑ ÐÒÏÇÒÁÍÍÉÓÔÁ +.ds doc-volume-ds-AMD äÏËÕÍÅÎÔÙ ÕÎÁÓÌÅÄÏ×ÁÎÎÏÇÏ ÓÐÒÁ×ÏÞÎÉËÁ +.ds doc-volume-ds-SMM òÕËÏ×ÏÄÓÔ×Ï ÓÉÓÔÅÍÎÏÇÏ ÁÄÍÉÎÉÓÔÒÁÔÏÒÁ +.ds doc-volume-ds-URM óÐÒÁ×ÏÞÎÏÅ ÒÕËÏ×ÏÄÓÔ×Ï +.ds doc-volume-ds-PRM òÕËÏ×ÏÄÓÔ×Ï ÐÒÏÇÒÁÍÍÉÓÔÁ +.ds doc-volume-ds-KM òÕËÏ×ÏÄÓÔ×Ï ÐÏ ÑÄÒÕ +.ds doc-volume-ds-IND ïÓÎÏ×ÎÏÊ ÐÒÅÄÍÅÔÎÙÊ ÕËÁÚÁÔÅÌØ ÓÐÒÁ×ÏÞÎÉËÁ +.ds doc-volume-ds-LOCAL ìÏËÁÌØÎÙÊ ÓÐÒÁ×ÏÞÎÉË +.ds doc-volume-ds-CON óÐÒÁ×ÏÞÎÉË ÐÏ ÄÏÐÏÌÎÉÔÅÌØÎÏÍÕ ðï +. +.\" ÌÏËÁÌÉÚÁÃÉÑ .Os +.ds doc-operating-system-ATT-7 7Ñ\~ÒÅÄÁËÃÉÑ +.ds doc-operating-system-BSD-3 3Ê\~ÄÉÓÔÒÉÂÕÔÉ× âÅÒËÌÉ +.ds doc-operating-system-BSD-4 4Ê\~ÄÉÓÔÒÉÂÕÔÉ× âÅÒËÌÉ +.ds doc-operating-system-BSD-4.1 4.1\~ÄÉÓÔÒÉÂÕÔÉ× âÅÒËÌÉ +.ds doc-operating-system-BSD-4.2 4.2\~ÄÉÓÔÒÉÂÕÔÉ× âÅÒËÌÉ +.ds doc-operating-system-BSD-4.3 4.3\~ÄÉÓÔÒÉÂÕÔÉ× âÅÒËÌÉ +.ds doc-operating-system-BSD-4.3T 4.3-Tahoe ÄÉÓÔÒÉÂÕÔÉ× âÅÒËÌÉ +.ds doc-operating-system-BSD-4.3R 4.3-Reno ÄÉÓÔÒÉÂÕÔÉ× âÅÒËÌÉ +. +.\" ÌÏËÁÌÉÚÁÃÉÑ .Sh +.ds doc-section-name îáú÷áîéå +.ds doc-section-synopsis óéîôáëóéó +.ds doc-section-library âéâìéïôåëá +.ds doc-section-description ïðéóáîéå +.ds doc-section-see-also óíïôòé +.ds doc-section-files æáêìù +.ds doc-section-authors á÷ôïòù +. +.\" ÌÏËÁÌÉÚÁÃÉÑ .Lb (XXX) +.ds doc-str-Lb-libarm32 âÉÂÌÉÏÔÅËÁ ÁÒÈÉÔÅËÔÕÒÙ ARM32 (libarm32, \-larm32) +.ds doc-str-Lb-libc óÔÁÎÄÁÒÔÎÁÑ ÂÉÂÌÉÏÔÅËÁ\~C (libc, \-lc) +.ds doc-str-Lb-libc_r òÅÅÎÔÅÒÁÂÅÌØÎÁÑ ÂÉÂÌÉÏÔÅËÁ\~C (libc_r, \-lc_r) +.ds doc-str-Lb-libcalendar âÉÂÌÉÏÔÅËÁ ËÁÌÅÎÄÁÒÎÏÊ ÁÒÉÆÍÅÔÉËÉ (libcalendar, \-lcalendar) +.ds doc-str-Lb-libcam ðÏÌØÚÏ×ÁÔÅÌØÓËÁÑ ÂÉÂÌÉÏÔÅËÁ CAM (libcam, \-lcam) +.ds doc-str-Lb-libcipher âÉÂÌÉÏÔÅËÁ ËÒÉÐÔÏÇÒÁÆÉÉ FreeSec (libcipher, \-lcipher) +.ds doc-str-Lb-libcompat âÉÂÌÉÏÔÅËÁ ÓÏ×ÍÅÓÔÉÍÏÓÔÉ (libcompat, \-lcompat) +.ds doc-str-Lb-libcrypt âÉÂÌÉÏÔÅËÁ ËÒÉÐÔÏÇÒÁÆÉÉ (libcrypt, \-lcrypt) +.\" XXX ds doc-str-Lb-libcurses Curses Library (libcurses, \-lcurses) +.\" XXX ds doc-str-Lb-libdevinfo Device and Resource Information Utility Library (libdevinfo, \-ldevinfo) +.ds doc-str-Lb-libdevstat âÉÂÌÉÏÔÅËÁ ÓÔÁÔÉÓÔÉËÉ ÕÓÔÒÏÊÓÔ× (libdevstat, \-ldevstat) +.\" XXX ds doc-str-Lb-libdisk Interface to Slice and Partition Labels Library (libdisk, \-ldisk) +.ds doc-str-Lb-libedit âÉÂÌÉÏÔÅËÁ ÒÅÄÁËÔÏÒÁ ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÉ (libedit, \-ledit) +.ds doc-str-Lb-libfetch âÉÂÌÉÏÔÅËÁ ÆÁÊÌÏ×ÏÊ ÐÅÒÅÄÁÞÉ (libfetch, \-lfetch) +.ds doc-str-Lb-libgeom ðÏÌØÚÏ×ÁÔÅÌØÓËÁÑ API ÂÉÂÌÉÏÔÅËÁ ÐÏÄÓÉÓÔÅÍÙ ÑÄÒÁ GEOM (libgeom, \-lgeom) +.ds doc-str-Lb-libi386 âÉÂÌÉÏÔÅËÁ ÁÒÈÉÔÅËÔÕÒÙ i386 (libi386, \-li386) +.ds doc-str-Lb-libipsec âÉÂÌÉÏÔÅËÁ ÕÐÒÁ×ÌÅÎÉÑ IPsec Policy (libipsec, \-lipsec) +.ds doc-str-Lb-libipx âÉÂÌÉÏÔÅËÁ ÐÏÄÄÅÒÖËÉ ËÏÎ×ÅÒÓÉÉ ÁÄÒÅÓÏ× IPX (libipx, \-lipx) +.ds doc-str-Lb-libkvm âÉÂÌÉÏÔÅËÁ ÄÏÓÔÕÐÁ Ë ÄÁÎÎÙÍ ÑÄÒÁ (libkvm, \-lkvm) +.ds doc-str-Lb-libm âÉÂÌÉÏÔÅËÁ ÍÁÔÅÍÁÔÉÞÅÓËÉÈ ÆÕÎËÃÉÊ (libm, \-lm) +.\" XXX ds doc-str-Lb-libmd Message Digest (MD4, MD5, É Ô.Ä.) Support Library (libmd, \-lmd) +.\" XXX ds doc-str-Lb-libmenu Curses Menu Library (libmenu, \-lmenu) +.ds doc-str-Lb-libnetgraph ðÏÌØÚÏ×ÁÔÅÌØÓËÁÑ ÂÉÂÌÉÏÔÅËÁ Netgraph (libnetgraph, \-lnetgraph) +.ds doc-str-Lb-libossaudio âÉÂÌÉÏÔÅËÁ ÜÍÕÌÑÃÉÉ OSS Audio (libossaudio, \-lossaudio) +.ds doc-str-Lb-libpam âÉÂÌÉÏÔÅËÁ PAM (libpam, \-lpam) +.ds doc-str-Lb-libposix âÉÂÌÉÏÔÅËÁ \*[Px]\-ÓÏ×ÍÅÓÔÉÍÏÓÔÉ (libposix, \-lposix) +.\" XXX ds doc-str-Lb-libresolv DNS Resolver Library (libresolv, \-lresolv) +.ds doc-str-Lb-librpcsvc âÉÂÌÉÏÔÅËÁ ÓÌÕÖ RPC (librpcsvc, \-lrpcsvc) +.ds doc-str-Lb-libtermcap âÉÂÌÉÏÔÅËÁ ÄÏÓÔÕÐÁ Ë termcap (libtermcap, \-ltermcap) +.ds doc-str-Lb-libufs âÉÂÌÉÏÔÅËÁ ÄÏÓÔÕÐÁ Ë ÆÁÊÌÏ×ÏÊ ÓÉÓÔÅÍÅ UFS (libufs, \-lufs) +.\" XXX ds doc-str-Lb-libugidfw File System Firewall Interface Library (libugidfw, \-lugidfw) +.ds doc-str-Lb-libusbhid âÉÂÌÉÏÔÅËÁ ÆÕÎËÃÉÊ ÄÏÓÔÕÐÁ Ë USB HID (libusbhid, \-lusbhid) +.ds doc-str-Lb-libutil âÉÂÌÉÏÔÅËÁ ÓÉÓÔÅÍÎÙÈ ÕÔÉÌÉÔ (libutil, \-lutil) +.ds doc-str-Lb-libvgl âÉÂÌÉÏÔÅËÁ ×ÉÄÅÏ-ÇÒÁÆÉËÉ (libvgl, \-lvgl) +.ds doc-str-Lb-libz âÉÂÌÉÏÔÅËÁ ËÏÍÐÒÅÓÓÉÉ (libz, \-lz) +. +.\" ÌÏËÁÌÉÚÁÃÉÑ .Rv +.ds doc-str-Rv-std-prefix "æÕÎËÃÉÑ +.ds doc-str-Rv-std-suffix "×ÏÚ×ÒÁÝÁÅÔ\~0 × ÓÌÕÞÁÅ ÕÓÐÅÛÎÏÇÏ ÚÁ×ÅÒÛÅÎÉÑ; +.as doc-str-Rv-std-suffix " × ÐÒÏÔÉ×ÎÏÍ ÓÌÕÞÁÅ ÏÎÁ ×ÏÚ×ÒÁÝÁÅÔ\~-1, +.as doc-str-Rv-std-suffix " Á ËÏÄ ÏÛÉÂËÉ ÓÏÈÒÁÎÑÅÔÓÑ × ÇÌÏÂÁÌØÎÏÊ +.as doc-str-Rv-std-suffix " ÐÅÒÅÍÅÎÎÏÊ \*[doc-Va-font]errno\f[P]. +. +.ds doc-str-Rv-stds-prefix "æÕÎËÃÉÉ +.ds doc-str-Rv-stds-and "É +.ds doc-str-Rv-stds-suffix "×ÏÚ×ÒÁÝÁÀÔ\~0 × ÓÌÕÞÁÅ ÕÓÐÅÛÎÏÇÏ ÚÁ×ÅÒÛÅÎÉÑ; +.as doc-str-Rv-stds-suffix " × ÐÒÏÔÉ×ÎÏÍ ÓÌÕÞÁÅ ÏÎÉ ×ÏÚ×ÒÁÝÁÀÔ\~-1, +.as doc-str-Rv-stds-suffix " Á ËÏÄ ÏÛÉÂËÉ ÓÏÈÒÁÎÑÅÔÓÑ × ÇÌÏÂÁÌØÎÏÊ +.as doc-str-Rv-stds-suffix " ÐÅÒÅÍÅÎÎÏÊ \*[doc-Va-font]errno\f[P]. +. +.ds doc-str-Rv-std0 "÷ ÓÌÕÞÁÅ ÕÓÐÅÛÎÏÇÏ ÚÁ×ÅÒÛÅÎÉÑ ×ÏÚ×ÒÁÝÁÅÔÓÑ\~0; +.as doc-str-Rv-std0 " × ÐÒÏÔÉ×ÎÏÍ ÓÌÕÞÁÅ ×ÏÚ×ÒÁÝÁÅÔÓÑ\~-1, +.as doc-str-Rv-std0 " Á ËÏÄ ÏÛÉÂËÉ ÓÏÈÒÁÎÑÅÔÓÑ × ÇÌÏÂÁÌØÎÏÊ +.as doc-str-Rv-std0 " ÐÅÒÅÍÅÎÎÏÊ \*[doc-Va-font]errno\f[P]. +. +.\" ÌÏËÁÌÉÚÁÃÉÑ .Ex +.ds doc-str-Ex-std-prefix "õÔÉÌÉÔÁ +.ds doc-str-Ex-std-suffix "×ÏÚ×ÒÁÝÁÅÔ\~0 × ÓÌÕÞÁÅ ÕÓÐÅÛÎÏÇÏ ÚÁ×ÅÒÛÅÎÉÑ +.as doc-str-Ex-std-suffix " É\~>0 × ÓÌÕÞÁÅ ×ÏÚÎÉËÎÏ×ÅÎÉÑ ÏÛÉÂËÉ. +. +.ds doc-str-Ex-stds-prefix "õÔÉÌÉÔÙ +.ds doc-str-Ex-stds-suffix "×ÏÚ×ÒÁÝÁÀÔ\~0 × ÓÌÕÞÁÅ ÕÓÐÅÛÎÏÇÏ ÚÁ×ÅÒÛÅÎÉÑ +.as doc-str-Ex-stds-suffix " É\~>0 × ÓÌÕÞÁÅ ×ÏÚÎÉËÎÏ×ÅÎÉÑ ÏÛÉÂËÉ. +. +.\" ÌÏËÁÌÉÚÁÃÉÑ .Ar +.ds doc-str-Ar-default "ÆÁÊÌ\ .\|.\|. +. +.\" ÌÏËÁÌÉÚÁÃÉÑ .%A +.ds doc-str-dpra "É From owner-svn-src-all@freebsd.org Tue Oct 20 18: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 22476A1AF7B; Tue, 20 Oct 2015 18:23: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 C44F1123C; Tue, 20 Oct 2015 18:23: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 t9KINEAe022815; Tue, 20 Oct 2015 18:23:14 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KINEnN022814; Tue, 20 Oct 2015 18:23:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510201823.t9KINEnN022814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 20 Oct 2015 18:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289639 - stable/10/sbin/ipf/ipftest 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, 20 Oct 2015 18:23:16 -0000 Author: bdrewery Date: Tue Oct 20 18:23:14 2015 New Revision: 289639 URL: https://svnweb.freebsd.org/changeset/base/289639 Log: MFC r288477: META_MODE: For some reason meta mode cannot generate the intermediate tab.c files. Split up all of the targets to be more clear on how they are generated to fix the problem. Modified: stable/10/sbin/ipf/ipftest/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ipf/ipftest/Makefile ============================================================================== --- stable/10/sbin/ipf/ipftest/Makefile Tue Oct 20 18:20:38 2015 (r289638) +++ stable/10/sbin/ipf/ipftest/Makefile Tue Oct 20 18:23:14 2015 (r289639) @@ -32,15 +32,19 @@ CLEANFILES+= ipnat.tab.c ipnat.tab.h CLEANFILES+= ippool_y.c ippool_l.c CLEANFILES+= ippool.tab.c ippool.tab.h -ipnat_y.c: ipnat_y.y +ipnat.tab.c ipnat.tab.h: ipnat_y.y ${YACC} -b ipnat -d ${.ALLSRC} + +ipnat_y.c: ipnat.tab.c sed -e 's/yy/ipnat_yy/g' \ -e 's/y.tab.c/ipnat_y.c/' \ -e s/\"ipnat_y.y\"/\"..\\/tools\\/ipnat_y.y\"/ \ ipnat.tab.c > ${.TARGET} + +ipnat_y.h: ipnat.tab.h sed -e 's/yy/ipnat_yy/g' \ -e 's/y.tab.h/ipnat_y.h/' \ - ipnat.tab.h > ${.TARGET:.c=.h} + ipnat.tab.h > ${.TARGET} ipnat_y.h: ipnat_y.c @@ -54,13 +58,17 @@ ipnat_l.h: lexer.h sed -e 's/yy/ipnat_yy/g' \ ${.ALLSRC} > ${.TARGET} -ippool_y.c: ippool_y.y +ippool.tab.c ippool.tab.h: ippool_y.y ${YACC} -b ippool -d ${.ALLSRC} + +ippool_y.c: ippool.tab.c sed -e 's/yy/ippool_yy/g' \ -e 's/"ippool_y.y"/"..\/tools\/ippool_y.y"/' \ ippool.tab.c > ${.TARGET} + +ippool_y.h: ippool.tab.h sed -e 's/yy/ippool_yy/g' \ - ippool.tab.h > ${.TARGET:.c=.h} + ippool.tab.h > ${.TARGET} ippool_y.h: ippool_y.c @@ -74,13 +82,17 @@ ippool_l.h: lexer.h sed -e 's/yy/ippool_yy/g' \ ${.ALLSRC} > ${.TARGET} -ipf_y.c: ipf_y.y +ipf.tab.c ipf.tab.h: ipf_y.y ${YACC} -b ipf -d ${.ALLSRC} + +ipf_y.c: ipf.tab.c sed -e 's/yy/ipf_yy/g' \ -e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' \ ipf.tab.c > ${.TARGET} + +ipf_y.h: ipf.tab.h sed -e 's/yy/ipf_yy/g' \ - ipf.tab.h > ${.TARGET:.c=.h} + ipf.tab.h > ${.TARGET} ipf_y.h: ipf_y.c From owner-svn-src-all@freebsd.org Tue Oct 20 18:23: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 4094CA1AFC6; Tue, 20 Oct 2015 18:23: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 DEC06137C; Tue, 20 Oct 2015 18:23:45 +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 t9KINiab022875; Tue, 20 Oct 2015 18:23:44 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KINiK5022874; Tue, 20 Oct 2015 18:23:44 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510201823.t9KINiK5022874@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 20 Oct 2015 18:23:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289640 - stable/9/sbin/ipf/ipftest 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, 20 Oct 2015 18:23:46 -0000 Author: bdrewery Date: Tue Oct 20 18:23:44 2015 New Revision: 289640 URL: https://svnweb.freebsd.org/changeset/base/289640 Log: MFC r288477: META_MODE: For some reason meta mode cannot generate the intermediate tab.c files. Split up all of the targets to be more clear on how they are generated to fix the problem. Modified: stable/9/sbin/ipf/ipftest/Makefile Directory Properties: stable/9/sbin/ipf/ (props changed) Modified: stable/9/sbin/ipf/ipftest/Makefile ============================================================================== --- stable/9/sbin/ipf/ipftest/Makefile Tue Oct 20 18:23:14 2015 (r289639) +++ stable/9/sbin/ipf/ipftest/Makefile Tue Oct 20 18:23:44 2015 (r289640) @@ -25,15 +25,19 @@ CLEANFILES+= ipnat.tab.c ipnat.tab.h CLEANFILES+= ippool_y.c ippool_l.c CLEANFILES+= ippool.tab.c ippool.tab.h -ipnat_y.c: ipnat_y.y +ipnat.tab.c ipnat.tab.h: ipnat_y.y ${YACC} -b ipnat -d ${.ALLSRC} + +ipnat_y.c: ipnat.tab.c sed -e 's/yy/ipnat_yy/g' \ -e 's/y.tab.c/ipnat_y.c/' \ -e s/\"ipnat_y.y\"/\"..\\/tools\\/ipnat_y.y\"/ \ ipnat.tab.c > ${.TARGET} + +ipnat_y.h: ipnat.tab.h sed -e 's/yy/ipnat_yy/g' \ -e 's/y.tab.h/ipnat_y.h/' \ - ipnat.tab.h > ${.TARGET:.c=.h} + ipnat.tab.h > ${.TARGET} ipnat_y.h: ipnat_y.c @@ -47,13 +51,17 @@ ipnat_l.h: lexer.h sed -e 's/yy/ipnat_yy/g' \ ${.ALLSRC} > ${.TARGET} -ippool_y.c: ippool_y.y +ippool.tab.c ippool.tab.h: ippool_y.y ${YACC} -b ippool -d ${.ALLSRC} + +ippool_y.c: ippool.tab.c sed -e 's/yy/ippool_yy/g' \ -e 's/"ippool_y.y"/"..\/tools\/ippool_y.y"/' \ ippool.tab.c > ${.TARGET} + +ippool_y.h: ippool.tab.h sed -e 's/yy/ippool_yy/g' \ - ippool.tab.h > ${.TARGET:.c=.h} + ippool.tab.h > ${.TARGET} ippool_y.h: ippool_y.c @@ -67,13 +75,17 @@ ippool_l.h: lexer.h sed -e 's/yy/ippool_yy/g' \ ${.ALLSRC} > ${.TARGET} -ipf_y.c: ipf_y.y +ipf.tab.c ipf.tab.h: ipf_y.y ${YACC} -b ipf -d ${.ALLSRC} + +ipf_y.c: ipf.tab.c sed -e 's/yy/ipf_yy/g' \ -e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' \ ipf.tab.c > ${.TARGET} + +ipf_y.h: ipf.tab.h sed -e 's/yy/ipf_yy/g' \ - ipf.tab.h > ${.TARGET:.c=.h} + ipf.tab.h > ${.TARGET} ipf_y.h: ipf_y.c From owner-svn-src-all@freebsd.org Tue Oct 20 18:32: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 A89FFA1A2C5; Tue, 20 Oct 2015 18:32:37 +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 85E5A1B49; Tue, 20 Oct 2015 18:32:37 +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 9C468B94F; Tue, 20 Oct 2015 14:32:36 -0400 (EDT) From: John Baldwin To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289633 - head/sys/ofed/include/linux Date: Tue, 20 Oct 2015 11:04:46 -0700 Message-ID: <1878746.bHLk1ML9QM@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201510201602.t9KG2BeA079785@repo.freebsd.org> References: <201510201602.t9KG2BeA079785@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); Tue, 20 Oct 2015 14:32:36 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 20 Oct 2015 18:32:37 -0000 On Tuesday, October 20, 2015 04:02:11 PM Hans Petter Selasky wrote: > Author: hselasky > Date: Tue Oct 20 16:02:11 2015 > New Revision: 289633 > URL: https://svnweb.freebsd.org/changeset/base/289633 > > Log: > Add missing FreeBSD RCS keyword and SVN properties. > > Sponsored by: Mellanox Technologies > > Modified: > head/sys/ofed/include/linux/io-mapping.h (contents, props changed) > head/sys/ofed/include/linux/io.h (contents, props changed) > head/sys/ofed/include/linux/jhash.h (contents, props changed) > head/sys/ofed/include/linux/linux_compat.c (contents, props changed) > head/sys/ofed/include/linux/linux_idr.c (contents, props changed) > head/sys/ofed/include/linux/linux_radix.c (contents, props changed) > head/sys/ofed/include/linux/vmalloc.h (contents, props changed) > > Modified: head/sys/ofed/include/linux/io-mapping.h > ============================================================================== > --- head/sys/ofed/include/linux/io-mapping.h Tue Oct 20 15:28:02 2015 (r289632) > +++ head/sys/ofed/include/linux/io-mapping.h Tue Oct 20 16:02:11 2015 (r289633) > @@ -1,3 +1,4 @@ > +/* $FreeBSD$ */ > /*- > * Copyright (c) 2010 Isilon Systems, Inc. > * Copyright (c) 2010 iX Systems, Inc. Just a note on style. Most headers put the tag below the license block like so from : /*- * Copyright (c) 1997,1998,2003 Doug Rabson * All rights reserved. * ... * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD: head/sys/sys/bus.h 284088 2015-06-06 17:25:45Z marcel $ */ It would have been nice to be more consistent with the rest of the tree. Maybe look around next time to see if there is an existing style? > Modified: head/sys/ofed/include/linux/jhash.h > ============================================================================== > --- head/sys/ofed/include/linux/jhash.h Tue Oct 20 15:28:02 2015 (r289632) > +++ head/sys/ofed/include/linux/jhash.h Tue Oct 20 16:02:11 2015 (r289633) > @@ -18,6 +18,7 @@ > * > * I've modified Bob's hash to be useful in the Linux kernel, and > * any bugs present are surely my fault. -DaveM > + * $FreeBSD$ > */ Please fix this one to leave a blank line before the tag at least. -- John Baldwin From owner-svn-src-all@freebsd.org Tue Oct 20 18:35: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 9D022A1A47F; Tue, 20 Oct 2015 18:35:53 +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 653D170; Tue, 20 Oct 2015 18:35: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 t9KIZqsG025863; Tue, 20 Oct 2015 18:35:52 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KIZqaE025862; Tue, 20 Oct 2015 18:35:52 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510201835.t9KIZqaE025862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 20 Oct 2015 18:35: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: r289641 - stable/10/usr.bin/truss 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, 20 Oct 2015 18:35:53 -0000 Author: bdrewery Date: Tue Oct 20 18:35:52 2015 New Revision: 289641 URL: https://svnweb.freebsd.org/changeset/base/289641 Log: MFC r288903: Fix crash if a process sends itself a SIGTRAP. Just forward it as expected. This does not match head as the code was rewritten significantly there. Relnotes: yes Modified: stable/10/usr.bin/truss/setup.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/truss/setup.c ============================================================================== --- stable/10/usr.bin/truss/setup.c Tue Oct 20 18:23:44 2015 (r289640) +++ stable/10/usr.bin/truss/setup.c Tue Oct 20 18:35:52 2015 (r289641) @@ -221,11 +221,9 @@ detach: info->pr_why = S_SCX; info->curthread->in_syscall = 0; break; - } else { - errx(1, - "pl_flags %x contains neither PL_FLAG_SCE nor PL_FLAG_SCX", - lwpinfo.pl_flags); } + /* We didn't send the SIGTRAP, just forward it. */ + /* FALLTHROUGH */ default: info->pr_why = S_SIG; info->pr_data = WSTOPSIG(waitval); From owner-svn-src-all@freebsd.org Tue Oct 20 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 DCEA5A1A52B; Tue, 20 Oct 2015 18:37:43 +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 A06771EE; Tue, 20 Oct 2015 18:37:43 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id B906F1FE024; Tue, 20 Oct 2015 20:37:40 +0200 (CEST) Subject: Re: svn commit: r289633 - head/sys/ofed/include/linux To: John Baldwin References: <201510201602.t9KG2BeA079785@repo.freebsd.org> <1878746.bHLk1ML9QM@ralph.baldwin.cx> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <56268A5A.70103@selasky.org> Date: Tue, 20 Oct 2015 20:39:22 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <1878746.bHLk1ML9QM@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252; 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: Tue, 20 Oct 2015 18:37:44 -0000 Hi, On 10/20/15 20:04, John Baldwin wrote: > On Tuesday, October 20, 2015 04:02:11 PM Hans Petter Selasky wrote: >> Author: hselasky >> Date: Tue Oct 20 16:02:11 2015 >> New Revision: 289633 >> URL: https://svnweb.freebsd.org/changeset/base/289633 >> >> Log: >> Add missing FreeBSD RCS keyword and SVN properties. >> >> Sponsored by: Mellanox Technologies >> >> Modified: >> head/sys/ofed/include/linux/io-mapping.h (contents, props changed) >> head/sys/ofed/include/linux/io.h (contents, props changed) >> head/sys/ofed/include/linux/jhash.h (contents, props changed) >> head/sys/ofed/include/linux/linux_compat.c (contents, props changed) >> head/sys/ofed/include/linux/linux_idr.c (contents, props changed) >> head/sys/ofed/include/linux/linux_radix.c (contents, props changed) >> head/sys/ofed/include/linux/vmalloc.h (contents, props changed) >> >> Modified: head/sys/ofed/include/linux/io-mapping.h >> ============================================================================== >> --- head/sys/ofed/include/linux/io-mapping.h Tue Oct 20 15:28:02 2015 (r289632) >> +++ head/sys/ofed/include/linux/io-mapping.h Tue Oct 20 16:02:11 2015 (r289633) >> @@ -1,3 +1,4 @@ >> +/* $FreeBSD$ */ >> /*- >> * Copyright (c) 2010 Isilon Systems, Inc. >> * Copyright (c) 2010 iX Systems, Inc. > > Just a note on style. Most headers put the tag below the license block like so > from : I'll fix that. > > /*- > * Copyright (c) 1997,1998,2003 Doug Rabson > * All rights reserved. > * > ... > > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > * > * $FreeBSD: head/sys/sys/bus.h 284088 2015-06-06 17:25:45Z marcel $ > */ > > It would have been nice to be more consistent with the rest of the tree. Maybe > look around next time to see if there is an existing style? > >> Modified: head/sys/ofed/include/linux/jhash.h >> ============================================================================== >> --- head/sys/ofed/include/linux/jhash.h Tue Oct 20 15:28:02 2015 (r289632) >> +++ head/sys/ofed/include/linux/jhash.h Tue Oct 20 16:02:11 2015 (r289633) >> @@ -18,6 +18,7 @@ >> * >> * I've modified Bob's hash to be useful in the Linux kernel, and >> * any bugs present are surely my fault. -DaveM >> + * $FreeBSD$ >> */ > > Please fix this one to leave a blank line before the tag at least. > I tried to make linux/jhash.h similar to dev/cxgb/common/jhash.h, which are actually duplicate files. --HPS From owner-svn-src-all@freebsd.org Tue Oct 20 18:37: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 5DB77A1A52E; Tue, 20 Oct 2015 18:37:44 +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 22C0A1F0; Tue, 20 Oct 2015 18:37:44 +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 t9KIbhuj026024; Tue, 20 Oct 2015 18:37:43 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KIbhva026023; Tue, 20 Oct 2015 18:37:43 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510201837.t9KIbhva026023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 20 Oct 2015 18:37:43 +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: r289642 - stable/9/usr.bin/truss 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, 20 Oct 2015 18:37:44 -0000 Author: bdrewery Date: Tue Oct 20 18:37:42 2015 New Revision: 289642 URL: https://svnweb.freebsd.org/changeset/base/289642 Log: MFC r288903: Fix crash if a process sends itself a SIGTRAP. Just forward it as expected. This does not match head as the code was rewritten significantly there. Relnotes: yes Modified: stable/9/usr.bin/truss/setup.c Directory Properties: stable/9/usr.bin/truss/ (props changed) Modified: stable/9/usr.bin/truss/setup.c ============================================================================== --- stable/9/usr.bin/truss/setup.c Tue Oct 20 18:35:52 2015 (r289641) +++ stable/9/usr.bin/truss/setup.c Tue Oct 20 18:37:42 2015 (r289642) @@ -221,11 +221,9 @@ detach: info->pr_why = S_SCX; info->curthread->in_syscall = 0; break; - } else { - errx(1, - "pl_flags %x contains neither PL_FLAG_SCE nor PL_FLAG_SCX", - lwpinfo.pl_flags); } + /* We didn't send the SIGTRAP, just forward it. */ + /* FALLTHROUGH */ default: info->pr_why = S_SIG; info->pr_data = WSTOPSIG(waitval); From owner-svn-src-all@freebsd.org Tue Oct 20 18:51: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 EE012A1AA98; Tue, 20 Oct 2015 18:51:50 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-pa0-x231.google.com (mail-pa0-x231.google.com [IPv6:2607:f8b0:400e:c03::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 BF5CED45; Tue, 20 Oct 2015 18:51:50 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: by padhk11 with SMTP id hk11so29115405pad.1; Tue, 20 Oct 2015 11:51:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=ePRFkS9Ocs/PMgJXhwmP4ZW6EeB74tZcWzbPfi+7fQs=; b=MKdt7ruOpMrbX4msYt05YtGN3dNkt3B2wCPQcnSD+bmP/UUACtdd49MucPOCTIKaY3 beMTfAXE1yzD6YGek499NABn5KE0J3+BcUrXuf21iUl8we9k5zCSBzSz+DoY6r57SfEO 4I7XaJPAK6UTUmMWXnbUhWcTu8CAQXL96xm+kluSEUUt/Gj/VSigHFpOKNoZV/jXqz5h 4HkVCOSJ4xLlymUG3/wOvI+Tt8GMOm4J0L7mjntYr0YbvvM6Apxi/OGcAfWQbsKO9hw2 bv5dp/qs/8IKY7hMNEoJbPQi3DQ/gq+rzVxG44NqSuVgsKDY5Ivq4pPR6bmepPtMxfN8 aOKg== X-Received: by 10.66.160.100 with SMTP id xj4mr5574140pab.39.1445367110279; Tue, 20 Oct 2015 11:51:50 -0700 (PDT) Received: from [10.192.166.0] (stargate.chelsio.com. [67.207.115.98]) by smtp.googlemail.com with ESMTPSA id pq4sm5049351pbc.53.2015.10.20.11.51.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Oct 2015 11:51:48 -0700 (PDT) Subject: Re: svn commit: r289633 - head/sys/ofed/include/linux To: Hans Petter Selasky , John Baldwin References: <201510201602.t9KG2BeA079785@repo.freebsd.org> <1878746.bHLk1ML9QM@ralph.baldwin.cx> <56268A5A.70103@selasky.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Navdeep Parhar Message-ID: <56268D43.6000209@gmail.com> Date: Tue, 20 Oct 2015 11:51:47 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56268A5A.70103@selasky.org> Content-Type: text/plain; charset=windows-1252; 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: Tue, 20 Oct 2015 18:51:51 -0000 On 10/20/2015 11:39, Hans Petter Selasky wrote: > Hi, > > On 10/20/15 20:04, John Baldwin wrote: >> On Tuesday, October 20, 2015 04:02:11 PM Hans Petter Selasky wrote: >>> Author: hselasky >>> Date: Tue Oct 20 16:02:11 2015 >>> New Revision: 289633 >>> URL: https://svnweb.freebsd.org/changeset/base/289633 >>> >>> Log: >>> Add missing FreeBSD RCS keyword and SVN properties. >>> >>> Sponsored by: Mellanox Technologies >>> >>> Modified: >>> head/sys/ofed/include/linux/io-mapping.h (contents, props changed) >>> head/sys/ofed/include/linux/io.h (contents, props changed) >>> head/sys/ofed/include/linux/jhash.h (contents, props changed) >>> head/sys/ofed/include/linux/linux_compat.c (contents, props >>> changed) >>> head/sys/ofed/include/linux/linux_idr.c (contents, props changed) >>> head/sys/ofed/include/linux/linux_radix.c (contents, props changed) >>> head/sys/ofed/include/linux/vmalloc.h (contents, props changed) >>> >>> Modified: head/sys/ofed/include/linux/io-mapping.h >>> ============================================================================== >>> >>> --- head/sys/ofed/include/linux/io-mapping.h Tue Oct 20 15:28:02 >>> 2015 (r289632) >>> +++ head/sys/ofed/include/linux/io-mapping.h Tue Oct 20 16:02:11 >>> 2015 (r289633) >>> @@ -1,3 +1,4 @@ >>> +/* $FreeBSD$ */ >>> /*- >>> * Copyright (c) 2010 Isilon Systems, Inc. >>> * Copyright (c) 2010 iX Systems, Inc. >> >> Just a note on style. Most headers put the tag below the license >> block like so >> from : > > I'll fix that. > >> >> /*- >> * Copyright (c) 1997,1998,2003 Doug Rabson >> * All rights reserved. >> * >> ... >> >> * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE >> POSSIBILITY OF >> * SUCH DAMAGE. >> * >> * $FreeBSD: head/sys/sys/bus.h 284088 2015-06-06 17:25:45Z marcel $ >> */ >> >> It would have been nice to be more consistent with the rest of the >> tree. Maybe >> look around next time to see if there is an existing style? >> >>> Modified: head/sys/ofed/include/linux/jhash.h >>> ============================================================================== >>> >>> --- head/sys/ofed/include/linux/jhash.h Tue Oct 20 15:28:02 >>> 2015 (r289632) >>> +++ head/sys/ofed/include/linux/jhash.h Tue Oct 20 16:02:11 >>> 2015 (r289633) >>> @@ -18,6 +18,7 @@ >>> * >>> * I've modified Bob's hash to be useful in the Linux kernel, and >>> * any bugs present are surely my fault. -DaveM >>> + * $FreeBSD$ >>> */ >> >> Please fix this one to leave a blank line before the tag at least. >> > > I tried to make linux/jhash.h similar to dev/cxgb/common/jhash.h, which > are actually duplicate files. cxgb's copy of jhash.h does have a blank line before the $FreeBSD$ tag. These days jenkins_hash is available in the kernel (see hash(9)) so there's no real need for cxgb to include this file, but I don't touch cxgb except for bug fixes. cxgbe (with the 'e') uses FNV hash from the kernel and so it doesn't have any duplicate hashing implementation. Regards, Navdeep From owner-svn-src-all@freebsd.org Tue Oct 20 19:04: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 B85E8A1AF66; Tue, 20 Oct 2015 19:04:14 +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 7ECCC18EC; Tue, 20 Oct 2015 19:04:14 +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 t9KJ4D4F034428; Tue, 20 Oct 2015 19:04:13 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KJ4Dip034427; Tue, 20 Oct 2015 19:04:13 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510201904.t9KJ4Dip034427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 20 Oct 2015 19:04:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289643 - 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: Tue, 20 Oct 2015 19:04:14 -0000 Author: mav Date: Tue Oct 20 19:04:13 2015 New Revision: 289643 URL: https://svnweb.freebsd.org/changeset/base/289643 Log: Document isp_*_multi firmware kernel modules removal at r289626. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Oct 20 18:37:42 2015 (r289642) +++ head/UPDATING Tue Oct 20 19:04:13 2015 (r289643) @@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20151020: + Qlogic 24xx/25xx firmware images were updated from 5.5.0 to 7.3.0. + Kernel modules isp_2400_multi and isp_2500_multi were removed and + should be replaced with isp_2400 and isp_2500 modules respectively. + 20151017: The build previously allowed using 'make -n' to not recurse into sub-directories while showing what commands would be executed, and From owner-svn-src-all@freebsd.org Tue Oct 20 19:08: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 D89B7A1802A; Tue, 20 Oct 2015 19:08: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 8BCAF1AAC; Tue, 20 Oct 2015 19:08: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 t9KJ8Wug034657; Tue, 20 Oct 2015 19:08:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KJ8QVB034595; Tue, 20 Oct 2015 19:08:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510201908.t9KJ8QVB034595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 20 Oct 2015 19:08:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289644 - in head/sys/ofed/include: asm linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 20 Oct 2015 19:08:34 -0000 Author: hselasky Date: Tue Oct 20 19:08:26 2015 New Revision: 289644 URL: https://svnweb.freebsd.org/changeset/base/289644 Log: Move location of RCS keyword according to style. Suggested by: jhb @ Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/asm/atomic-long.h head/sys/ofed/include/asm/atomic.h head/sys/ofed/include/asm/byteorder.h head/sys/ofed/include/asm/fcntl.h head/sys/ofed/include/asm/io.h head/sys/ofed/include/asm/pgtable.h head/sys/ofed/include/asm/types.h head/sys/ofed/include/asm/uaccess.h head/sys/ofed/include/linux/bitops.h head/sys/ofed/include/linux/cache.h head/sys/ofed/include/linux/cdev.h head/sys/ofed/include/linux/clocksource.h head/sys/ofed/include/linux/compat.h head/sys/ofed/include/linux/compiler.h head/sys/ofed/include/linux/completion.h head/sys/ofed/include/linux/delay.h head/sys/ofed/include/linux/device.h head/sys/ofed/include/linux/dma-attrs.h head/sys/ofed/include/linux/dma-mapping.h head/sys/ofed/include/linux/dmapool.h head/sys/ofed/include/linux/err.h head/sys/ofed/include/linux/errno.h head/sys/ofed/include/linux/etherdevice.h head/sys/ofed/include/linux/file.h head/sys/ofed/include/linux/fs.h head/sys/ofed/include/linux/gfp.h head/sys/ofed/include/linux/hardirq.h head/sys/ofed/include/linux/idr.h head/sys/ofed/include/linux/if_arp.h head/sys/ofed/include/linux/if_ether.h head/sys/ofed/include/linux/if_vlan.h head/sys/ofed/include/linux/in.h head/sys/ofed/include/linux/in6.h head/sys/ofed/include/linux/inetdevice.h head/sys/ofed/include/linux/interrupt.h head/sys/ofed/include/linux/io-mapping.h head/sys/ofed/include/linux/io.h head/sys/ofed/include/linux/ioctl.h head/sys/ofed/include/linux/jhash.h head/sys/ofed/include/linux/jiffies.h head/sys/ofed/include/linux/kdev_t.h head/sys/ofed/include/linux/kernel.h head/sys/ofed/include/linux/kmod.h head/sys/ofed/include/linux/kobject.h head/sys/ofed/include/linux/kref.h head/sys/ofed/include/linux/kthread.h head/sys/ofed/include/linux/ktime.h head/sys/ofed/include/linux/linux_compat.c head/sys/ofed/include/linux/linux_idr.c head/sys/ofed/include/linux/linux_kmod.c head/sys/ofed/include/linux/linux_pci.c head/sys/ofed/include/linux/linux_radix.c head/sys/ofed/include/linux/list.h head/sys/ofed/include/linux/lockdep.h head/sys/ofed/include/linux/log2.h head/sys/ofed/include/linux/math64.h head/sys/ofed/include/linux/miscdevice.h head/sys/ofed/include/linux/mm.h head/sys/ofed/include/linux/module.h head/sys/ofed/include/linux/moduleparam.h head/sys/ofed/include/linux/mutex.h head/sys/ofed/include/linux/net.h head/sys/ofed/include/linux/netdevice.h head/sys/ofed/include/linux/notifier.h head/sys/ofed/include/linux/page.h head/sys/ofed/include/linux/pci.h head/sys/ofed/include/linux/poll.h head/sys/ofed/include/linux/printk.h head/sys/ofed/include/linux/radix-tree.h head/sys/ofed/include/linux/random.h head/sys/ofed/include/linux/rbtree.h head/sys/ofed/include/linux/rwlock.h head/sys/ofed/include/linux/rwsem.h head/sys/ofed/include/linux/scatterlist.h head/sys/ofed/include/linux/sched.h head/sys/ofed/include/linux/semaphore.h head/sys/ofed/include/linux/slab.h head/sys/ofed/include/linux/socket.h head/sys/ofed/include/linux/spinlock.h head/sys/ofed/include/linux/string.h head/sys/ofed/include/linux/sysfs.h head/sys/ofed/include/linux/time.h head/sys/ofed/include/linux/timer.h head/sys/ofed/include/linux/types.h head/sys/ofed/include/linux/uaccess.h head/sys/ofed/include/linux/vmalloc.h head/sys/ofed/include/linux/wait.h head/sys/ofed/include/linux/workqueue.h Modified: head/sys/ofed/include/asm/atomic-long.h ============================================================================== --- head/sys/ofed/include/asm/atomic-long.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/asm/atomic-long.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _ATOMIC_LONG_H_ #define _ATOMIC_LONG_H_ Modified: head/sys/ofed/include/asm/atomic.h ============================================================================== --- head/sys/ofed/include/asm/atomic.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/asm/atomic.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _ASM_ATOMIC_H_ #define _ASM_ATOMIC_H_ Modified: head/sys/ofed/include/asm/byteorder.h ============================================================================== --- head/sys/ofed/include/asm/byteorder.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/asm/byteorder.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _ASM_BYTEORDER_H_ #define _ASM_BYTEORDER_H_ Modified: head/sys/ofed/include/asm/fcntl.h ============================================================================== --- head/sys/ofed/include/asm/fcntl.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/asm/fcntl.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,6 +25,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _ASM_FCNTL_H_ #define _ASM_FCNTL_H_ Modified: head/sys/ofed/include/asm/io.h ============================================================================== --- head/sys/ofed/include/asm/io.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/asm/io.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _ASM_IO_H_ #define _ASM_IO_H_ Modified: head/sys/ofed/include/asm/pgtable.h ============================================================================== --- head/sys/ofed/include/asm/pgtable.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/asm/pgtable.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,6 +25,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _ASM_PGTABLE_H_ #define _ASM_PGTABLE_H_ Modified: head/sys/ofed/include/asm/types.h ============================================================================== --- head/sys/ofed/include/asm/types.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/asm/types.h Tue Oct 20 19:08:26 2015 (r289644) @@ -25,8 +25,9 @@ * 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 _ASM_TYPES_H_ #define _ASM_TYPES_H_ Modified: head/sys/ofed/include/asm/uaccess.h ============================================================================== --- head/sys/ofed/include/asm/uaccess.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/asm/uaccess.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _ASM_UACCESS_H_ #define _ASM_UACCESS_H_ Modified: head/sys/ofed/include/linux/bitops.h ============================================================================== --- head/sys/ofed/include/linux/bitops.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/bitops.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,6 +25,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _LINUX_BITOPS_H_ #define _LINUX_BITOPS_H_ Modified: head/sys/ofed/include/linux/cache.h ============================================================================== --- head/sys/ofed/include/linux/cache.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/cache.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_CACHE_H_ #define _LINUX_CACHE_H_ Modified: head/sys/ofed/include/linux/cdev.h ============================================================================== --- head/sys/ofed/include/linux/cdev.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/cdev.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_CDEV_H_ #define _LINUX_CDEV_H_ Modified: head/sys/ofed/include/linux/clocksource.h ============================================================================== --- head/sys/ofed/include/linux/clocksource.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/clocksource.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_CLOCKSOURCE_H #define _LINUX_CLOCKSOURCE_H Modified: head/sys/ofed/include/linux/compat.h ============================================================================== --- head/sys/ofed/include/linux/compat.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/compat.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_COMPAT_H_ #define _LINUX_COMPAT_H_ Modified: head/sys/ofed/include/linux/compiler.h ============================================================================== --- head/sys/ofed/include/linux/compiler.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/compiler.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -27,8 +26,9 @@ * 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 _LINUX_COMPILER_H_ #define _LINUX_COMPILER_H_ Modified: head/sys/ofed/include/linux/completion.h ============================================================================== --- head/sys/ofed/include/linux/completion.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/completion.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_COMPLETION_H_ #define _LINUX_COMPLETION_H_ Modified: head/sys/ofed/include/linux/delay.h ============================================================================== --- head/sys/ofed/include/linux/delay.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/delay.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -27,8 +26,9 @@ * 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 _LINUX_DELAY_H_ #define _LINUX_DELAY_H_ Modified: head/sys/ofed/include/linux/device.h ============================================================================== --- head/sys/ofed/include/linux/device.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/device.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,6 +25,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _LINUX_DEVICE_H_ #define _LINUX_DEVICE_H_ Modified: head/sys/ofed/include/linux/dma-attrs.h ============================================================================== --- head/sys/ofed/include/linux/dma-attrs.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/dma-attrs.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,6 +25,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _LINUX_DMA_ATTR_H_ #define _LINUX_DMA_ATTR_H_ Modified: head/sys/ofed/include/linux/dma-mapping.h ============================================================================== --- head/sys/ofed/include/linux/dma-mapping.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/dma-mapping.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,6 +25,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _LINUX_DMA_MAPPING_H_ #define _LINUX_DMA_MAPPING_H_ Modified: head/sys/ofed/include/linux/dmapool.h ============================================================================== --- head/sys/ofed/include/linux/dmapool.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/dmapool.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_DMAPOOL_H_ #define _LINUX_DMAPOOL_H_ Modified: head/sys/ofed/include/linux/err.h ============================================================================== --- head/sys/ofed/include/linux/err.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/err.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_ERR_H_ #define _LINUX_ERR_H_ Modified: head/sys/ofed/include/linux/errno.h ============================================================================== --- head/sys/ofed/include/linux/errno.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/errno.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_ERRNO_H_ #define _LINUX_ERRNO_H_ Modified: head/sys/ofed/include/linux/etherdevice.h ============================================================================== --- head/sys/ofed/include/linux/etherdevice.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/etherdevice.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014 Mellanox Technologies, Ltd. All rights reserved. @@ -30,9 +29,9 @@ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. + * + * $FreeBSD$ */ - - #ifndef _LINUX_ETHERDEVICE #define _LINUX_ETHERDEVICE Modified: head/sys/ofed/include/linux/file.h ============================================================================== --- head/sys/ofed/include/linux/file.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/file.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,6 +25,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _LINUX_FILE_H_ #define _LINUX_FILE_H_ Modified: head/sys/ofed/include/linux/fs.h ============================================================================== --- head/sys/ofed/include/linux/fs.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/fs.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,6 +25,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _LINUX_FS_H_ #define _LINUX_FS_H_ Modified: head/sys/ofed/include/linux/gfp.h ============================================================================== --- head/sys/ofed/include/linux/gfp.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/gfp.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_GFP_H_ #define _LINUX_GFP_H_ Modified: head/sys/ofed/include/linux/hardirq.h ============================================================================== --- head/sys/ofed/include/linux/hardirq.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/hardirq.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,6 +25,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _LINUX_HARDIRQ_H_ #define _LINUX_HARDIRQ_H_ Modified: head/sys/ofed/include/linux/idr.h ============================================================================== --- head/sys/ofed/include/linux/idr.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/idr.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_IDR_H_ #define _LINUX_IDR_H_ Modified: head/sys/ofed/include/linux/if_arp.h ============================================================================== --- head/sys/ofed/include/linux/if_arp.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/if_arp.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,6 +25,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _LINUX_IF_ARP_H_ #define _LINUX_IF_ARP_H_ Modified: head/sys/ofed/include/linux/if_ether.h ============================================================================== --- head/sys/ofed/include/linux/if_ether.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/if_ether.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,6 +25,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _LINUX_IF_ETHER_H_ #define _LINUX_IF_ETHER_H_ Modified: head/sys/ofed/include/linux/if_vlan.h ============================================================================== --- head/sys/ofed/include/linux/if_vlan.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/if_vlan.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_IF_VLAN_H_ #define _LINUX_IF_VLAN_H_ Modified: head/sys/ofed/include/linux/in.h ============================================================================== --- head/sys/ofed/include/linux/in.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/in.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,6 +25,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _LINUX_IN_H_ #define _LINUX_IN_H_ Modified: head/sys/ofed/include/linux/in6.h ============================================================================== --- head/sys/ofed/include/linux/in6.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/in6.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_IN6_H_ #define _LINUX_IN6_H_ Modified: head/sys/ofed/include/linux/inetdevice.h ============================================================================== --- head/sys/ofed/include/linux/inetdevice.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/inetdevice.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_INETDEVICE_H_ #define _LINUX_INETDEVICE_H_ Modified: head/sys/ofed/include/linux/interrupt.h ============================================================================== --- head/sys/ofed/include/linux/interrupt.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/interrupt.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_INTERRUPT_H_ #define _LINUX_INTERRUPT_H_ Modified: head/sys/ofed/include/linux/io-mapping.h ============================================================================== --- head/sys/ofed/include/linux/io-mapping.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/io-mapping.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_IO_MAPPING_H_ #define _LINUX_IO_MAPPING_H_ Modified: head/sys/ofed/include/linux/io.h ============================================================================== --- head/sys/ofed/include/linux/io.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/io.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_IO_H_ #define _LINUX_IO_H_ Modified: head/sys/ofed/include/linux/ioctl.h ============================================================================== --- head/sys/ofed/include/linux/ioctl.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/ioctl.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_IOCTL_H_ #define _LINUX_IOCTL_H_ Modified: head/sys/ofed/include/linux/jhash.h ============================================================================== --- head/sys/ofed/include/linux/jhash.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/jhash.h Tue Oct 20 19:08:26 2015 (r289644) @@ -18,6 +18,7 @@ * * I've modified Bob's hash to be useful in the Linux kernel, and * any bugs present are surely my fault. -DaveM + * * $FreeBSD$ */ Modified: head/sys/ofed/include/linux/jiffies.h ============================================================================== --- head/sys/ofed/include/linux/jiffies.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/jiffies.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,6 +25,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _LINUX_JIFFIES_H_ #define _LINUX_JIFFIES_H_ Modified: head/sys/ofed/include/linux/kdev_t.h ============================================================================== --- head/sys/ofed/include/linux/kdev_t.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/kdev_t.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_KDEV_T_H_ #define _LINUX_KDEV_T_H_ Modified: head/sys/ofed/include/linux/kernel.h ============================================================================== --- head/sys/ofed/include/linux/kernel.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/kernel.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -27,6 +26,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _LINUX_KERNEL_H_ #define _LINUX_KERNEL_H_ Modified: head/sys/ofed/include/linux/kmod.h ============================================================================== --- head/sys/ofed/include/linux/kmod.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/kmod.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_KMOD_H_ #define _LINUX_KMOD_H_ Modified: head/sys/ofed/include/linux/kobject.h ============================================================================== --- head/sys/ofed/include/linux/kobject.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/kobject.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,6 +25,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _LINUX_KOBJECT_H_ #define _LINUX_KOBJECT_H_ Modified: head/sys/ofed/include/linux/kref.h ============================================================================== --- head/sys/ofed/include/linux/kref.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/kref.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -27,6 +26,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _LINUX_KREF_H_ #define _LINUX_KREF_H_ Modified: head/sys/ofed/include/linux/kthread.h ============================================================================== --- head/sys/ofed/include/linux/kthread.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/kthread.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,6 +25,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _LINUX_KTHREAD_H_ #define _LINUX_KTHREAD_H_ Modified: head/sys/ofed/include/linux/ktime.h ============================================================================== --- head/sys/ofed/include/linux/ktime.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/ktime.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2014-2015 Mellanox Technologies, Ltd. * Copyright (c) 2015 François Tigeot @@ -24,8 +23,9 @@ * 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 _LINUX_KTIME_H #define _LINUX_KTIME_H Modified: head/sys/ofed/include/linux/linux_compat.c ============================================================================== --- head/sys/ofed/include/linux/linux_compat.c Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/linux_compat.c Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -28,6 +27,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: head/sys/ofed/include/linux/linux_idr.c ============================================================================== --- head/sys/ofed/include/linux/linux_idr.c Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/linux_idr.c Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -28,6 +27,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: head/sys/ofed/include/linux/linux_kmod.c ============================================================================== --- head/sys/ofed/include/linux/linux_kmod.c Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/linux_kmod.c Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2015 Mellanox Technologies, Ltd. * All rights reserved. @@ -25,6 +24,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include #include Modified: head/sys/ofed/include/linux/linux_pci.c ============================================================================== --- head/sys/ofed/include/linux/linux_pci.c Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/linux_pci.c Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2015 Mellanox Technologies, Ltd. * All rights reserved. @@ -25,6 +24,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: head/sys/ofed/include/linux/linux_radix.c ============================================================================== --- head/sys/ofed/include/linux/linux_radix.c Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/linux_radix.c Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -28,6 +27,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: head/sys/ofed/include/linux/list.h ============================================================================== --- head/sys/ofed/include/linux/list.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/list.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,6 +25,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _LINUX_LIST_H_ #define _LINUX_LIST_H_ Modified: head/sys/ofed/include/linux/lockdep.h ============================================================================== --- head/sys/ofed/include/linux/lockdep.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/lockdep.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_LOCKDEP_H_ #define _LINUX_LOCKDEP_H_ Modified: head/sys/ofed/include/linux/log2.h ============================================================================== --- head/sys/ofed/include/linux/log2.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/log2.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_LOG2_H_ #define _LINUX_LOG2_H_ Modified: head/sys/ofed/include/linux/math64.h ============================================================================== --- head/sys/ofed/include/linux/math64.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/math64.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2014-2015 Mellanox Technologies, Ltd. All rights reserved. @@ -24,8 +23,9 @@ * 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 _LINUX_MATH64_H #define _LINUX_MATH64_H Modified: head/sys/ofed/include/linux/miscdevice.h ============================================================================== --- head/sys/ofed/include/linux/miscdevice.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/miscdevice.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,8 +25,9 @@ * 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 _LINUX_MISCDEVICE_H_ #define _LINUX_MISCDEVICE_H_ Modified: head/sys/ofed/include/linux/mm.h ============================================================================== --- head/sys/ofed/include/linux/mm.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/mm.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -28,6 +27,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _LINUX_MM_H_ #define _LINUX_MM_H_ Modified: head/sys/ofed/include/linux/module.h ============================================================================== --- head/sys/ofed/include/linux/module.h Tue Oct 20 19:04:13 2015 (r289643) +++ head/sys/ofed/include/linux/module.h Tue Oct 20 19:08:26 2015 (r289644) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /*- * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. @@ -26,6 +25,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Oct 20 19:12: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 28766A1826E; Tue, 20 Oct 2015 19:12:28 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-ig0-x233.google.com (mail-ig0-x233.google.com [IPv6:2607:f8b0:4001:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E9F121E90; Tue, 20 Oct 2015 19:12:27 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by igbkq10 with SMTP id kq10so82405471igb.0; Tue, 20 Oct 2015 12:12:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=xx3IwTaDfn1i7ENmeh+xWnrfAklNYD+L0gE7eMn8fI0=; b=0QvJqLV1t/v/fj6AT9wfgcnI2/5h/amdA2Ib6K2neoI3xCM2sbR5mVTSZI67Koppki dNj9vuIBPLYcT5TDL3FH5WS8UVqM/lRbdIkQM6pFX2r5e3/pzjWXx02GaZSt4wELZmQ1 l8iD/ZNcjeT4zavyhTDMo+d/pDpF29tdO5RR17OFZhRr1co8kcOOiDrGkp5Q1yhoSubd zdxytzZzp/cVdugsyqB2ajixga8e4oN9RgcxHo4hoF63h0jpfkFtgb0Fn9LRg+nSUZrJ rmEBo9MDPkVQWRJ+/svRKamiDCwfO1SDzJVC9q6+W/+ApmouNciMYaGdcPo+gnB1rezv otzQ== X-Received: by 10.50.32.33 with SMTP id f1mr5770336igi.33.1445368347368; Tue, 20 Oct 2015 12:12:27 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.158.75 with HTTP; Tue, 20 Oct 2015 12:12:07 -0700 (PDT) In-Reply-To: <201510130232.t9D2WFo2034264@repo.freebsd.org> References: <201510130232.t9D2WFo2034264@repo.freebsd.org> From: Ed Maste Date: Tue, 20 Oct 2015 15:12:07 -0400 X-Google-Sender-Auth: CQyaPCmONAjqx-hvY73lqiDiYik Message-ID: Subject: Re: svn commit: r289203 - head/usr.sbin/makefs To: Adrian Chadd Cc: "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: Tue, 20 Oct 2015 19:12:28 -0000 On 12 October 2015 at 22:32, Adrian Chadd wrote: > Author: adrian > Date: Tue Oct 13 02:32:15 2015 > New Revision: 289203 > URL: https://svnweb.freebsd.org/changeset/base/289203 > > Log: > makefs: introduce a new option to specify what to round the resulting > image up to. >... > +.Op Fl r Ar roundup Note that NetBSD's makefs already has -r assigned -r When merging multiple directories replace duplicate files with the last found. We should pick a different option, and push this patch there too. From owner-svn-src-all@freebsd.org Tue Oct 20 19:19: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 B05EFA1859A; Tue, 20 Oct 2015 19:19:49 +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 75E5126B; Tue, 20 Oct 2015 19:19:49 +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 t9KJJmxW037585; Tue, 20 Oct 2015 19:19:48 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KJJmR6037583; Tue, 20 Oct 2015 19:19:48 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510201919.t9KJJmR6037583@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 19:19:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289645 - in head/sys/dev/ntb: if_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, 20 Oct 2015 19:19:49 -0000 Author: cem Date: Tue Oct 20 19:19:48 2015 New Revision: 289645 URL: https://svnweb.freebsd.org/changeset/base/289645 Log: NTB: MFV 7eb38781: Print driver name in module init Prints driver name to indicate what is being loaded. Authored by: Dave Jiang Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 19:08:26 2015 (r289644) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 19:19:48 2015 (r289645) @@ -393,6 +393,9 @@ ntb_setup_interface(void) ntb_transport_link_up(net_softc.qp); net_softc.bufsize = ntb_transport_max_size(net_softc.qp) + sizeof(struct ether_header); + + if_printf(ifp, "if_ntb device setup\n"); + return (0); } @@ -404,6 +407,7 @@ ntb_teardown_interface(void) ntb_transport_link_down(net_softc.qp); if (net_softc.ifp != NULL) { + if_printf(net_softc.ifp, "if_ntb device destroyed\n"); ether_ifdetach(net_softc.ifp); if_free(net_softc.ifp); } Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 19:08:26 2015 (r289644) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 19:19:48 2015 (r289645) @@ -530,6 +530,8 @@ ntb_attach(device_t device) pci_enable_busmaster(ntb->device); + device_printf(ntb->device, "NTB device registered\n"); + out: if (error != 0) ntb_detach(device); @@ -561,6 +563,8 @@ ntb_detach(device_t device) ntb_detect_max_mw(ntb); ntb_unmap_pci_bar(ntb); + device_printf(ntb->device, "NTB device unregistered\n"); + return (0); } From owner-svn-src-all@freebsd.org Tue Oct 20 19: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 820B9A185D7; Tue, 20 Oct 2015 19:19:58 +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 4E2943F1; Tue, 20 Oct 2015 19:19:58 +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 t9KJJvYS037634; Tue, 20 Oct 2015 19:19:57 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KJJvWt037633; Tue, 20 Oct 2015 19:19:57 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510201919.t9KJJvWt037633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 19:19:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289646 - 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, 20 Oct 2015 19:19:58 -0000 Author: cem Date: Tue Oct 20 19:19:57 2015 New Revision: 289646 URL: https://svnweb.freebsd.org/changeset/base/289646 Log: NTB: Fix typo in bar5 tunables Typo introduced in r289614. Pointy-hat: cem 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 Oct 20 19:19:48 2015 (r289645) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 19:19:57 2015 (r289646) @@ -427,7 +427,7 @@ SYSCTL_UQUAD(_hw_ntb_xeon_b2b, OID_AUTO, &xeon_b2b_usd_addr.bar4_addr32, 0, "See usd_bar2_addr64, but BAR4 " "(split-BAR mode)."); SYSCTL_UQUAD(_hw_ntb_xeon_b2b, OID_AUTO, usd_bar5_addr32, CTLFLAG_RDTUN, - &xeon_b2b_usd_addr.bar4_addr32, 0, "See usd_bar2_addr64, but BAR5 " + &xeon_b2b_usd_addr.bar5_addr32, 0, "See usd_bar2_addr64, but BAR5 " "(split-BAR mode)."); SYSCTL_UQUAD(_hw_ntb_xeon_b2b, OID_AUTO, dsd_bar2_addr64, CTLFLAG_RDTUN, @@ -441,7 +441,7 @@ SYSCTL_UQUAD(_hw_ntb_xeon_b2b, OID_AUTO, &xeon_b2b_dsd_addr.bar4_addr32, 0, "See dsd_bar2_addr64, but BAR4 " "(split-BAR mode)."); SYSCTL_UQUAD(_hw_ntb_xeon_b2b, OID_AUTO, dsd_bar5_addr32, CTLFLAG_RDTUN, - &xeon_b2b_dsd_addr.bar4_addr32, 0, "See dsd_bar2_addr64, but BAR5 " + &xeon_b2b_dsd_addr.bar5_addr32, 0, "See dsd_bar2_addr64, but BAR5 " "(split-BAR mode)."); /* From owner-svn-src-all@freebsd.org Tue Oct 20 19:20: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 7DBA8A18628; Tue, 20 Oct 2015 19:20:07 +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 3A1297E9; Tue, 20 Oct 2015 19:20:07 +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 t9KJK6k4037701; Tue, 20 Oct 2015 19:20:06 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KJK6rj037700; Tue, 20 Oct 2015 19:20:06 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510201920.t9KJK6rj037700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 19:20:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289647 - 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, 20 Oct 2015 19:20:07 -0000 Author: cem Date: Tue Oct 20 19:20:06 2015 New Revision: 289647 URL: https://svnweb.freebsd.org/changeset/base/289647 Log: NTB: Don't abort if setting a MW write-combine fails Also log BAR mapping results more verbosely. 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 Oct 20 19:19:57 2015 (r289646) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 19:20:06 2015 (r289647) @@ -265,7 +265,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 void print_map_success(struct ntb_softc *, struct ntb_pci_bar_info *); +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); static int map_memory_window_bar(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar); @@ -676,11 +677,16 @@ out: } static void -print_map_success(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar) +print_map_success(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar, + const char *kind) { - device_printf(ntb->device, "Bar size = %lx, v %p, p %p\n", - bar->size, bar->vbase, (void *)(bar->pbase)); + device_printf(ntb->device, + "Mapped BAR%d v:[%p-%p] p:[%p-%p] (0x%jx bytes) (%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), + (uintmax_t)bar->size, kind); } static int @@ -693,7 +699,7 @@ map_mmr_bar(struct ntb_softc *ntb, struc return (ENXIO); save_bar_parameters(bar); - print_map_success(ntb, bar); + print_map_success(ntb, bar, "mmr"); return (0); } @@ -749,12 +755,23 @@ map_memory_window_bar(struct ntb_softc * /* Mark bar region as write combining to improve performance. */ rc = pmap_change_attr((vm_offset_t)bar->vbase, bar->size, VM_MEMATTR_WRITE_COMBINING); - if (rc != 0) { + print_map_success(ntb, bar, "mw"); + if (rc == 0) device_printf(ntb->device, - "unable to mark bar as WRITE_COMBINING\n"); - return (rc); - } - print_map_success(ntb, bar); + "Marked BAR%d v:[%p-%p] p:[%p-%p] as " + "WRITE_COMBINING.\n", + PCI_RID2BAR(bar->pci_resource_id), bar->vbase, + (char *)bar->vbase + bar->size - 1, + (void *)bar->pbase, (void *)(bar->pbase + bar->size - 1)); + else + device_printf(ntb->device, + "Unable to mark BAR%d v:[%p-%p] p:[%p-%p] as " + "WRITE_COMBINING: %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); + /* Proceed anyway */ return (0); } From owner-svn-src-all@freebsd.org Tue Oct 20 19:20: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 59A6CA18661; Tue, 20 Oct 2015 19:20:16 +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 249F2926; Tue, 20 Oct 2015 19:20:16 +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 t9KJKFdL037751; Tue, 20 Oct 2015 19:20:15 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KJKFTE037749; Tue, 20 Oct 2015 19:20:15 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510201920.t9KJKFTE037749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 19:20:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289648 - 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, 20 Oct 2015 19:20:16 -0000 Author: cem Date: Tue Oct 20 19:20:15 2015 New Revision: 289648 URL: https://svnweb.freebsd.org/changeset/base/289648 Log: NTB: MFV 2f887b9a: Rename Intel code names to platform names Mechanically replace "SOC" with "ATOM" to match Linux. No functional change. Original Linux commit log follows: Instead of using the platform code names, use the correct platform names to identify the respective Intel NTB hardware. Authored by: Dave Jiang Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_regs.h Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 19:20:06 2015 (r289647) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 19:20:15 2015 (r289648) @@ -60,16 +60,16 @@ __FBSDID("$FreeBSD$"); * be picked up and redistributed in Linux with a dual GPL/BSD license. */ -#define MAX_MSIX_INTERRUPTS MAX(XEON_DB_COUNT, SOC_DB_COUNT) +#define MAX_MSIX_INTERRUPTS MAX(XEON_DB_COUNT, ATOM_DB_COUNT) #define NTB_HB_TIMEOUT 1 /* second */ -#define SOC_LINK_RECOVERY_TIME 500 /* ms */ +#define ATOM_LINK_RECOVERY_TIME 500 /* ms */ #define DEVICE2SOFTC(dev) ((struct ntb_softc *) device_get_softc(dev)) enum ntb_device_type { NTB_XEON, - NTB_SOC + NTB_ATOM }; /* ntb_conn_type are hardware numbers, cannot change. */ @@ -287,11 +287,11 @@ static void ntb_free_msix_vec(struct ntb static struct ntb_hw_info *ntb_get_device_info(uint32_t device_id); static void ntb_detect_max_mw(struct ntb_softc *ntb); static int ntb_detect_xeon(struct ntb_softc *ntb); -static int ntb_detect_soc(struct ntb_softc *ntb); +static int ntb_detect_atom(struct ntb_softc *ntb); static int ntb_xeon_init_dev(struct ntb_softc *ntb); -static int ntb_soc_init_dev(struct ntb_softc *ntb); +static int ntb_atom_init_dev(struct ntb_softc *ntb); static void ntb_teardown_xeon(struct ntb_softc *ntb); -static void configure_soc_secondary_side_bars(struct ntb_softc *ntb); +static void configure_atom_secondary_side_bars(struct ntb_softc *ntb); static void xeon_reset_sbar_size(struct ntb_softc *, enum ntb_bar idx, enum ntb_bar regbar); static void xeon_set_sbar_base_and_limit(struct ntb_softc *, @@ -301,19 +301,19 @@ static void xeon_set_pbar_xlat(struct nt static int xeon_setup_b2b_mw(struct ntb_softc *, const struct ntb_b2b_addr *addr, const struct ntb_b2b_addr *peer_addr); static inline bool link_is_up(struct ntb_softc *ntb); -static inline bool soc_link_is_err(struct ntb_softc *ntb); +static inline bool atom_link_is_err(struct ntb_softc *ntb); static inline enum ntb_speed ntb_link_sta_speed(struct ntb_softc *); static inline enum ntb_width ntb_link_sta_width(struct ntb_softc *); -static void soc_link_hb(void *arg); +static void atom_link_hb(void *arg); static void ntb_db_event(struct ntb_softc *ntb, uint32_t vec); -static void recover_soc_link(void *arg); +static void recover_atom_link(void *arg); static bool ntb_poll_link(struct ntb_softc *ntb); static void save_bar_parameters(struct ntb_pci_bar_info *bar); 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", - NTB_SOC, 0 }, + NTB_ATOM, 0 }, { 0x37258086, "JSF Xeon C35xx/C55xx Non-Transparent Bridge B2B", NTB_XEON, NTB_SDOORBELL_LOCKUP | NTB_B2BDOORBELL_BIT14 }, @@ -329,40 +329,40 @@ static struct ntb_hw_info pci_ids[] = { NTB_SDOORBELL_LOCKUP | NTB_B2BDOORBELL_BIT14 | NTB_SB01BASE_LOCKUP }, - { 0x00000000, NULL, NTB_SOC, 0 } + { 0x00000000, NULL, NTB_ATOM, 0 } }; -static const struct ntb_reg soc_reg = { - .ntb_ctl = SOC_NTBCNTL_OFFSET, - .lnk_sta = SOC_LINK_STATUS_OFFSET, +static const struct ntb_reg atom_reg = { + .ntb_ctl = ATOM_NTBCNTL_OFFSET, + .lnk_sta = ATOM_LINK_STATUS_OFFSET, .db_size = sizeof(uint64_t), .mw_bar = { NTB_B2B_BAR_1, NTB_B2B_BAR_2 }, }; -static const struct ntb_alt_reg soc_pri_reg = { - .db_bell = SOC_PDOORBELL_OFFSET, - .db_mask = SOC_PDBMSK_OFFSET, - .spad = SOC_SPAD_OFFSET, +static const struct ntb_alt_reg atom_pri_reg = { + .db_bell = ATOM_PDOORBELL_OFFSET, + .db_mask = ATOM_PDBMSK_OFFSET, + .spad = ATOM_SPAD_OFFSET, }; -static const struct ntb_alt_reg soc_b2b_reg = { - .db_bell = SOC_B2B_DOORBELL_OFFSET, - .spad = SOC_B2B_SPAD_OFFSET, +static const struct ntb_alt_reg atom_b2b_reg = { + .db_bell = ATOM_B2B_DOORBELL_OFFSET, + .spad = ATOM_B2B_SPAD_OFFSET, }; -static const struct ntb_xlat_reg soc_sec_xlat = { +static const struct ntb_xlat_reg atom_sec_xlat = { #if 0 /* "FIXME" says the Linux driver. */ - .bar0_base = SOC_SBAR0BASE_OFFSET, - .bar2_base = SOC_SBAR2BASE_OFFSET, - .bar4_base = SOC_SBAR4BASE_OFFSET, + .bar0_base = ATOM_SBAR0BASE_OFFSET, + .bar2_base = ATOM_SBAR2BASE_OFFSET, + .bar4_base = ATOM_SBAR4BASE_OFFSET, - .bar2_limit = SOC_SBAR2LMT_OFFSET, - .bar4_limit = SOC_SBAR4LMT_OFFSET, + .bar2_limit = ATOM_SBAR2LMT_OFFSET, + .bar4_limit = ATOM_SBAR4LMT_OFFSET, #endif - .bar2_xlat = SOC_SBAR2XLAT_OFFSET, - .bar4_xlat = SOC_SBAR4XLAT_OFFSET, + .bar2_xlat = ATOM_SBAR2XLAT_OFFSET, + .bar4_xlat = ATOM_SBAR4XLAT_OFFSET, }; static const struct ntb_reg xeon_reg = { @@ -501,14 +501,14 @@ ntb_attach(device_t device) ntb->features = p->features; ntb->b2b_mw_idx = B2B_MW_DISABLED; - /* Heartbeat timer for NTB_SOC since there is no link interrupt */ + /* Heartbeat timer for NTB_ATOM since there is no link interrupt */ callout_init(&ntb->heartbeat_timer, 1); callout_init(&ntb->lr_timer, 1); mtx_init(&ntb->db_mask_lock, "ntb hw bits", NULL, MTX_SPIN); mtx_init(&ntb->ctx_lock, "ntb ctx", NULL, MTX_SPIN); - if (ntb->type == NTB_SOC) - error = ntb_detect_soc(ntb); + if (ntb->type == NTB_ATOM) + error = ntb_detect_atom(ntb); else error = ntb_detect_xeon(ntb); if (error) @@ -519,8 +519,8 @@ ntb_attach(device_t device) error = ntb_map_pci_bars(ntb); if (error) goto out; - if (ntb->type == NTB_SOC) - error = ntb_soc_init_dev(ntb); + if (ntb->type == NTB_ATOM) + error = ntb_atom_init_dev(ntb); else error = ntb_xeon_init_dev(ntb); if (error) @@ -965,14 +965,14 @@ ntb_teardown_interrupts(struct ntb_softc } /* - * Doorbell register and mask are 64-bit on SoC, 16-bit on Xeon. Abstract it + * Doorbell register and mask are 64-bit on Atom, 16-bit on Xeon. Abstract it * out to make code clearer. */ static inline uint64_t db_ioread(struct ntb_softc *ntb, uint64_t regoff) { - if (ntb->type == NTB_SOC) + if (ntb->type == NTB_ATOM) return (ntb_reg_read(8, regoff)); KASSERT(ntb->type == NTB_XEON, ("bad ntb type")); @@ -992,7 +992,7 @@ db_iowrite(struct ntb_softc *ntb, uint64 if (regoff == ntb->self_reg->db_mask) DB_MASK_ASSERT(ntb, MA_OWNED); - if (ntb->type == NTB_SOC) { + if (ntb->type == NTB_ATOM) { ntb_reg_write(8, regoff, val); return; } @@ -1138,8 +1138,8 @@ static void ntb_detect_max_mw(struct ntb_softc *ntb) { - if (ntb->type == NTB_SOC) { - ntb->mw_count = SOC_MW_COUNT; + if (ntb->type == NTB_ATOM) { + ntb->mw_count = ATOM_MW_COUNT; return; } @@ -1185,19 +1185,19 @@ ntb_detect_xeon(struct ntb_softc *ntb) } static int -ntb_detect_soc(struct ntb_softc *ntb) +ntb_detect_atom(struct ntb_softc *ntb) { uint32_t ppd, conn_type; ppd = pci_read_config(ntb->device, NTB_PPD_OFFSET, 4); ntb->ppd = ppd; - if ((ppd & SOC_PPD_DEV_TYPE) != 0) + if ((ppd & ATOM_PPD_DEV_TYPE) != 0) ntb->dev_type = NTB_DEV_DSD; else ntb->dev_type = NTB_DEV_USD; - conn_type = (ppd & SOC_PPD_CONN_TYPE) >> 8; + conn_type = (ppd & ATOM_PPD_CONN_TYPE) >> 8; switch (conn_type) { case NTB_CONN_B2B: ntb->conn_type = conn_type; @@ -1274,62 +1274,62 @@ ntb_xeon_init_dev(struct ntb_softc *ntb) } static int -ntb_soc_init_dev(struct ntb_softc *ntb) +ntb_atom_init_dev(struct ntb_softc *ntb) { KASSERT(ntb->conn_type == NTB_CONN_B2B, ("Unsupported NTB configuration (%d)\n", ntb->conn_type)); - ntb->spad_count = SOC_SPAD_COUNT; - ntb->db_count = SOC_DB_COUNT; - ntb->db_vec_count = SOC_DB_MSIX_VECTOR_COUNT; - ntb->db_vec_shift = SOC_DB_MSIX_VECTOR_SHIFT; + ntb->spad_count = ATOM_SPAD_COUNT; + ntb->db_count = ATOM_DB_COUNT; + ntb->db_vec_count = ATOM_DB_MSIX_VECTOR_COUNT; + ntb->db_vec_shift = ATOM_DB_MSIX_VECTOR_SHIFT; ntb->db_valid_mask = (1ull << ntb->db_count) - 1; - ntb->reg = &soc_reg; - ntb->self_reg = &soc_pri_reg; - ntb->peer_reg = &soc_b2b_reg; - ntb->xlat_reg = &soc_sec_xlat; + ntb->reg = &atom_reg; + ntb->self_reg = &atom_pri_reg; + ntb->peer_reg = &atom_b2b_reg; + ntb->xlat_reg = &atom_sec_xlat; /* - * FIXME - MSI-X bug on early SOC HW, remove once internal issue is + * FIXME - MSI-X bug on early Atom HW, remove once internal issue is * resolved. Mask transaction layer internal parity errors. */ pci_write_config(ntb->device, 0xFC, 0x4, 4); - configure_soc_secondary_side_bars(ntb); + configure_atom_secondary_side_bars(ntb); /* Enable Bus Master and Memory Space on the secondary side */ - ntb_reg_write(2, SOC_PCICMD_OFFSET, + ntb_reg_write(2, ATOM_PCICMD_OFFSET, PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); /* Initiate PCI-E link training */ ntb_link_enable(ntb, NTB_SPEED_AUTO, NTB_WIDTH_AUTO); - callout_reset(&ntb->heartbeat_timer, 0, soc_link_hb, ntb); + callout_reset(&ntb->heartbeat_timer, 0, atom_link_hb, ntb); return (0); } -/* XXX: Linux driver doesn't seem to do any of this for SoC. */ +/* XXX: Linux driver doesn't seem to do any of this for Atom. */ static void -configure_soc_secondary_side_bars(struct ntb_softc *ntb) +configure_atom_secondary_side_bars(struct ntb_softc *ntb) { if (ntb->dev_type == NTB_DEV_USD) { - ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, + ntb_reg_write(8, ATOM_PBAR2XLAT_OFFSET, XEON_B2B_BAR2_DSD_ADDR64); - ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, + ntb_reg_write(8, ATOM_PBAR4XLAT_OFFSET, XEON_B2B_BAR4_DSD_ADDR64); - ntb_reg_write(8, SOC_MBAR23_OFFSET, XEON_B2B_BAR2_USD_ADDR64); - ntb_reg_write(8, SOC_MBAR45_OFFSET, XEON_B2B_BAR4_USD_ADDR64); + ntb_reg_write(8, ATOM_MBAR23_OFFSET, XEON_B2B_BAR2_USD_ADDR64); + ntb_reg_write(8, ATOM_MBAR45_OFFSET, XEON_B2B_BAR4_USD_ADDR64); } else { - ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, + ntb_reg_write(8, ATOM_PBAR2XLAT_OFFSET, XEON_B2B_BAR2_USD_ADDR64); - ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, + ntb_reg_write(8, ATOM_PBAR4XLAT_OFFSET, XEON_B2B_BAR4_USD_ADDR64); - ntb_reg_write(8, SOC_MBAR23_OFFSET, XEON_B2B_BAR2_DSD_ADDR64); - ntb_reg_write(8, SOC_MBAR45_OFFSET, XEON_B2B_BAR4_DSD_ADDR64); + ntb_reg_write(8, ATOM_MBAR23_OFFSET, XEON_B2B_BAR2_DSD_ADDR64); + ntb_reg_write(8, ATOM_MBAR45_OFFSET, XEON_B2B_BAR4_DSD_ADDR64); } } @@ -1542,28 +1542,28 @@ link_is_up(struct ntb_softc *ntb) return ((ntb->lnk_sta & NTB_LINK_STATUS_ACTIVE) != 0); } - KASSERT(ntb->type == NTB_SOC, ("ntb type")); - return ((ntb->ntb_ctl & SOC_CNTL_LINK_DOWN) == 0); + KASSERT(ntb->type == NTB_ATOM, ("ntb type")); + return ((ntb->ntb_ctl & ATOM_CNTL_LINK_DOWN) == 0); } static inline bool -soc_link_is_err(struct ntb_softc *ntb) +atom_link_is_err(struct ntb_softc *ntb) { uint32_t status; - KASSERT(ntb->type == NTB_SOC, ("ntb type")); + KASSERT(ntb->type == NTB_ATOM, ("ntb type")); - status = ntb_reg_read(4, SOC_LTSSMSTATEJMP_OFFSET); - if ((status & SOC_LTSSMSTATEJMP_FORCEDETECT) != 0) + status = ntb_reg_read(4, ATOM_LTSSMSTATEJMP_OFFSET); + if ((status & ATOM_LTSSMSTATEJMP_FORCEDETECT) != 0) return (true); - status = ntb_reg_read(4, SOC_IBSTERRRCRVSTS0_OFFSET); - return ((status & SOC_IBIST_ERR_OFLOW) != 0); + status = ntb_reg_read(4, ATOM_IBSTERRRCRVSTS0_OFFSET); + return ((status & ATOM_IBIST_ERR_OFLOW) != 0); } -/* SOC does not have link status interrupt, poll on that platform */ +/* Atom does not have link status interrupt, poll on that platform */ static void -soc_link_hb(void *arg) +atom_link_hb(void *arg) { struct ntb_softc *ntb = arg; sbintime_t timo, poll_ts; @@ -1583,53 +1583,53 @@ soc_link_hb(void *arg) if (ntb_poll_link(ntb)) ntb_link_event(ntb); - if (!link_is_up(ntb) && soc_link_is_err(ntb)) { + if (!link_is_up(ntb) && atom_link_is_err(ntb)) { /* Link is down with error, proceed with recovery */ - callout_reset(&ntb->lr_timer, 0, recover_soc_link, ntb); + callout_reset(&ntb->lr_timer, 0, recover_atom_link, ntb); return; } out: - callout_reset(&ntb->heartbeat_timer, timo, soc_link_hb, ntb); + callout_reset(&ntb->heartbeat_timer, timo, atom_link_hb, ntb); } static void -soc_perform_link_restart(struct ntb_softc *ntb) +atom_perform_link_restart(struct ntb_softc *ntb) { uint32_t status; /* Driver resets the NTB ModPhy lanes - magic! */ - ntb_reg_write(1, SOC_MODPHY_PCSREG6, 0xe0); - ntb_reg_write(1, SOC_MODPHY_PCSREG4, 0x40); - ntb_reg_write(1, SOC_MODPHY_PCSREG4, 0x60); - ntb_reg_write(1, SOC_MODPHY_PCSREG6, 0x60); + ntb_reg_write(1, ATOM_MODPHY_PCSREG6, 0xe0); + ntb_reg_write(1, ATOM_MODPHY_PCSREG4, 0x40); + ntb_reg_write(1, ATOM_MODPHY_PCSREG4, 0x60); + ntb_reg_write(1, ATOM_MODPHY_PCSREG6, 0x60); /* Driver waits 100ms to allow the NTB ModPhy to settle */ pause("ModPhy", hz / 10); /* Clear AER Errors, write to clear */ - status = ntb_reg_read(4, SOC_ERRCORSTS_OFFSET); + status = ntb_reg_read(4, ATOM_ERRCORSTS_OFFSET); status &= PCIM_AER_COR_REPLAY_ROLLOVER; - ntb_reg_write(4, SOC_ERRCORSTS_OFFSET, status); + ntb_reg_write(4, ATOM_ERRCORSTS_OFFSET, status); /* Clear unexpected electrical idle event in LTSSM, write to clear */ - status = ntb_reg_read(4, SOC_LTSSMERRSTS0_OFFSET); - status |= SOC_LTSSMERRSTS0_UNEXPECTEDEI; - ntb_reg_write(4, SOC_LTSSMERRSTS0_OFFSET, status); + status = ntb_reg_read(4, ATOM_LTSSMERRSTS0_OFFSET); + status |= ATOM_LTSSMERRSTS0_UNEXPECTEDEI; + ntb_reg_write(4, ATOM_LTSSMERRSTS0_OFFSET, status); /* Clear DeSkew Buffer error, write to clear */ - status = ntb_reg_read(4, SOC_DESKEWSTS_OFFSET); - status |= SOC_DESKEWSTS_DBERR; - ntb_reg_write(4, SOC_DESKEWSTS_OFFSET, status); - - status = ntb_reg_read(4, SOC_IBSTERRRCRVSTS0_OFFSET); - status &= SOC_IBIST_ERR_OFLOW; - ntb_reg_write(4, SOC_IBSTERRRCRVSTS0_OFFSET, status); + status = ntb_reg_read(4, ATOM_DESKEWSTS_OFFSET); + status |= ATOM_DESKEWSTS_DBERR; + ntb_reg_write(4, ATOM_DESKEWSTS_OFFSET, status); + + status = ntb_reg_read(4, ATOM_IBSTERRRCRVSTS0_OFFSET); + status &= ATOM_IBIST_ERR_OFLOW; + ntb_reg_write(4, ATOM_IBSTERRRCRVSTS0_OFFSET, status); /* Releases the NTB state machine to allow the link to retrain */ - status = ntb_reg_read(4, SOC_LTSSMSTATEJMP_OFFSET); - status &= ~SOC_LTSSMSTATEJMP_FORCEDETECT; - ntb_reg_write(4, SOC_LTSSMSTATEJMP_OFFSET, status); + status = ntb_reg_read(4, ATOM_LTSSMSTATEJMP_OFFSET); + status &= ~ATOM_LTSSMSTATEJMP_FORCEDETECT; + ntb_reg_write(4, ATOM_LTSSMSTATEJMP_OFFSET, status); } /* @@ -1758,9 +1758,9 @@ ntb_link_enable(struct ntb_softc *ntb, e { uint32_t cntl; - if (ntb->type == NTB_SOC) { + if (ntb->type == NTB_ATOM) { pci_write_config(ntb->device, NTB_PPD_OFFSET, - ntb->ppd | SOC_PPD_INIT_LINK, 4); + ntb->ppd | ATOM_PPD_INIT_LINK, 4); return (0); } @@ -1812,13 +1812,13 @@ ntb_link_disable(struct ntb_softc *ntb) } static void -recover_soc_link(void *arg) +recover_atom_link(void *arg) { struct ntb_softc *ntb = arg; unsigned speed, width, oldspeed, oldwidth; uint32_t status32; - soc_perform_link_restart(ntb); + atom_perform_link_restart(ntb); /* * There is a potential race between the 2 NTB devices recovering at @@ -1826,14 +1826,14 @@ recover_soc_link(void *arg) * and the driver will be stuck in this loop forever. Add a random * interval to the recovery time to prevent this race. */ - status32 = arc4random() % SOC_LINK_RECOVERY_TIME; - pause("Link", (SOC_LINK_RECOVERY_TIME + status32) * hz / 1000); + status32 = arc4random() % ATOM_LINK_RECOVERY_TIME; + pause("Link", (ATOM_LINK_RECOVERY_TIME + status32) * hz / 1000); - if (soc_link_is_err(ntb)) + if (atom_link_is_err(ntb)) goto retry; status32 = ntb_reg_read(4, ntb->reg->ntb_ctl); - if ((status32 & SOC_CNTL_LINK_DOWN) != 0) + if ((status32 & ATOM_CNTL_LINK_DOWN) != 0) goto out; status32 = ntb_reg_read(4, ntb->reg->lnk_sta); @@ -1846,12 +1846,12 @@ recover_soc_link(void *arg) goto retry; out: - callout_reset(&ntb->heartbeat_timer, NTB_HB_TIMEOUT * hz, soc_link_hb, + callout_reset(&ntb->heartbeat_timer, NTB_HB_TIMEOUT * hz, atom_link_hb, ntb); return; retry: - callout_reset(&ntb->lr_timer, NTB_HB_TIMEOUT * hz, recover_soc_link, + callout_reset(&ntb->lr_timer, NTB_HB_TIMEOUT * hz, recover_atom_link, ntb); } @@ -1864,7 +1864,7 @@ ntb_poll_link(struct ntb_softc *ntb) uint32_t ntb_cntl; uint16_t reg_val; - if (ntb->type == NTB_SOC) { + if (ntb->type == NTB_ATOM) { ntb_cntl = ntb_reg_read(4, ntb->reg->ntb_ctl); if (ntb_cntl == ntb->ntb_ctl) return (false); Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_regs.h Tue Oct 20 19:20:06 2015 (r289647) +++ head/sys/dev/ntb/ntb_hw/ntb_regs.h Tue Oct 20 19:20:15 2015 (r289648) @@ -81,48 +81,48 @@ #define XEON_B2B_XLAT_OFFSETL 0x0144 #define XEON_B2B_XLAT_OFFSETU 0x0148 -#define SOC_MW_COUNT 2 -#define SOC_DB_COUNT 34 -#define SOC_DB_MSIX_VECTOR_COUNT 34 -#define SOC_DB_MSIX_VECTOR_SHIFT 1 -#define SOC_SPAD_COUNT 16 - -#define SOC_PCICMD_OFFSET 0xb004 -#define SOC_MBAR23_OFFSET 0xb018 -#define SOC_MBAR45_OFFSET 0xb020 -#define SOC_DEVCTRL_OFFSET 0xb048 -#define SOC_LINK_STATUS_OFFSET 0xb052 -#define SOC_ERRCORSTS_OFFSET 0xb110 - -#define SOC_SBAR2XLAT_OFFSET 0x0008 -#define SOC_SBAR4XLAT_OFFSET 0x0010 -#define SOC_PDOORBELL_OFFSET 0x0020 -#define SOC_PDBMSK_OFFSET 0x0028 -#define SOC_NTBCNTL_OFFSET 0x0060 -#define SOC_EBDF_OFFSET 0x0064 -#define SOC_SPAD_OFFSET 0x0080 -#define SOC_SPADSEMA_OFFSET 0x00c0 -#define SOC_STKYSPAD_OFFSET 0x00c4 -#define SOC_PBAR2XLAT_OFFSET 0x8008 -#define SOC_PBAR4XLAT_OFFSET 0x8010 -#define SOC_B2B_DOORBELL_OFFSET 0x8020 -#define SOC_B2B_SPAD_OFFSET 0x8080 -#define SOC_B2B_SPADSEMA_OFFSET 0x80c0 -#define SOC_B2B_STKYSPAD_OFFSET 0x80c4 - -#define SOC_MODPHY_PCSREG4 0x1c004 -#define SOC_MODPHY_PCSREG6 0x1c006 - -#define SOC_IP_BASE 0xc000 -#define SOC_DESKEWSTS_OFFSET (SOC_IP_BASE + 0x3024) -#define SOC_LTSSMERRSTS0_OFFSET (SOC_IP_BASE + 0x3180) -#define SOC_LTSSMSTATEJMP_OFFSET (SOC_IP_BASE + 0x3040) -#define SOC_IBSTERRRCRVSTS0_OFFSET (SOC_IP_BASE + 0x3324) - -#define SOC_DESKEWSTS_DBERR (1 << 15) -#define SOC_LTSSMERRSTS0_UNEXPECTEDEI (1 << 20) -#define SOC_LTSSMSTATEJMP_FORCEDETECT (1 << 2) -#define SOC_IBIST_ERR_OFLOW 0x7fff7fff +#define ATOM_MW_COUNT 2 +#define ATOM_DB_COUNT 34 +#define ATOM_DB_MSIX_VECTOR_COUNT 34 +#define ATOM_DB_MSIX_VECTOR_SHIFT 1 +#define ATOM_SPAD_COUNT 16 + +#define ATOM_PCICMD_OFFSET 0xb004 +#define ATOM_MBAR23_OFFSET 0xb018 +#define ATOM_MBAR45_OFFSET 0xb020 +#define ATOM_DEVCTRL_OFFSET 0xb048 +#define ATOM_LINK_STATUS_OFFSET 0xb052 +#define ATOM_ERRCORSTS_OFFSET 0xb110 + +#define ATOM_SBAR2XLAT_OFFSET 0x0008 +#define ATOM_SBAR4XLAT_OFFSET 0x0010 +#define ATOM_PDOORBELL_OFFSET 0x0020 +#define ATOM_PDBMSK_OFFSET 0x0028 +#define ATOM_NTBCNTL_OFFSET 0x0060 +#define ATOM_EBDF_OFFSET 0x0064 +#define ATOM_SPAD_OFFSET 0x0080 +#define ATOM_SPADSEMA_OFFSET 0x00c0 +#define ATOM_STKYSPAD_OFFSET 0x00c4 +#define ATOM_PBAR2XLAT_OFFSET 0x8008 +#define ATOM_PBAR4XLAT_OFFSET 0x8010 +#define ATOM_B2B_DOORBELL_OFFSET 0x8020 +#define ATOM_B2B_SPAD_OFFSET 0x8080 +#define ATOM_B2B_SPADSEMA_OFFSET 0x80c0 +#define ATOM_B2B_STKYSPAD_OFFSET 0x80c4 + +#define ATOM_MODPHY_PCSREG4 0x1c004 +#define ATOM_MODPHY_PCSREG6 0x1c006 + +#define ATOM_IP_BASE 0xc000 +#define ATOM_DESKEWSTS_OFFSET (ATOM_IP_BASE + 0x3024) +#define ATOM_LTSSMERRSTS0_OFFSET (ATOM_IP_BASE + 0x3180) +#define ATOM_LTSSMSTATEJMP_OFFSET (ATOM_IP_BASE + 0x3040) +#define ATOM_IBSTERRRCRVSTS0_OFFSET (ATOM_IP_BASE + 0x3324) + +#define ATOM_DESKEWSTS_DBERR (1 << 15) +#define ATOM_LTSSMERRSTS0_UNEXPECTEDEI (1 << 20) +#define ATOM_LTSSMSTATEJMP_FORCEDETECT (1 << 2) +#define ATOM_IBIST_ERR_OFLOW 0x7fff7fff #define NTB_CNTL_CFG_LOCK (1 << 0) #define NTB_CNTL_LINK_DISABLE (1 << 1) @@ -132,7 +132,7 @@ #define NTB_CNTL_P2S_BAR4_SNOOP (1 << 8) #define NTB_CNTL_S2P_BAR5_SNOOP (1 << 12) #define NTB_CNTL_P2S_BAR5_SNOOP (1 << 14) -#define SOC_CNTL_LINK_DOWN (1 << 16) +#define ATOM_CNTL_LINK_DOWN (1 << 16) #define XEON_PBAR23SZ_OFFSET 0x00d0 #define XEON_PBAR45SZ_OFFSET 0x00d1 @@ -145,9 +145,9 @@ #define XEON_PPD_CONN_TYPE 0x0003 #define XEON_PPD_DEV_TYPE 0x0010 #define XEON_PPD_SPLIT_BAR 0x0040 -#define SOC_PPD_INIT_LINK 0x0008 -#define SOC_PPD_CONN_TYPE 0x0300 -#define SOC_PPD_DEV_TYPE 0x1000 +#define ATOM_PPD_INIT_LINK 0x0008 +#define ATOM_PPD_CONN_TYPE 0x0300 +#define ATOM_PPD_DEV_TYPE 0x1000 /* All addresses are in low 32-bit space so 32-bit BARs can function */ #define XEON_B2B_BAR0_USD_ADDR 0x1000000000000000ull From owner-svn-src-all@freebsd.org Tue Oct 20 19:20: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 6EAD9A186AE; Tue, 20 Oct 2015 19:20:26 +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 1020CA77; Tue, 20 Oct 2015 19:20:25 +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 t9KJKOoH037799; Tue, 20 Oct 2015 19:20:24 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KJKO2K037798; Tue, 20 Oct 2015 19:20:24 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510201920.t9KJKO2K037798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 19:20:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289649 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.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, 20 Oct 2015 19:20:26 -0000 Author: cem Date: Tue Oct 20 19:20:24 2015 New Revision: 289649 URL: https://svnweb.freebsd.org/changeset/base/289649 Log: if_ntb: Use if_printf instead of device_printf Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 19:20:15 2015 (r289648) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 19:20:24 2015 (r289649) @@ -797,7 +797,7 @@ ntb_transport_link_up(struct ntb_transpo qp->client_ready = true; if (bootverbose) - device_printf(ntb_get_device(qp->ntb), "qp client ready\n"); + if_printf(qp->transport->ifp, "qp client ready\n"); if (qp->transport->link_is_up) callout_reset(&qp->link_work, 0, ntb_qp_link_work, qp); @@ -1166,11 +1166,11 @@ ntb_transport_event_callback(void *data) if (ntb_link_is_up(nt->ntb, NULL, NULL)) { if (bootverbose) - device_printf(ntb_get_device(nt->ntb), "HW link up\n"); + if_printf(nt->ifp, "HW link up\n"); callout_reset(&nt->link_work, 0, ntb_transport_link_work, nt); } else { if (bootverbose) - device_printf(ntb_get_device(nt->ntb), "HW link down\n"); + if_printf(nt->ifp, "HW link down\n"); ntb_transport_link_cleanup(nt); } } @@ -1233,7 +1233,7 @@ ntb_transport_link_work(void *arg) nt->link_is_up = true; if (bootverbose) - device_printf(ntb_get_device(ntb), "transport link up\n"); + if_printf(nt->ifp, "transport link up\n"); for (i = 0; i < nt->qp_count; i++) { qp = &nt->qp_vec[i]; @@ -1294,7 +1294,7 @@ ntb_set_mw(struct ntb_transport_ctx *nt, * with the Linux driver. */ if (mw->dma_addr % mw->xlat_align != 0) { - device_printf(ntb_get_device(nt->ntb), + if_printf(nt->ifp, "DMA memory 0x%jx not aligned to BAR size 0x%x\n", (uintmax_t)mw->dma_addr, size); ntb_free_mw(nt, num_mw); @@ -1304,8 +1304,7 @@ ntb_set_mw(struct ntb_transport_ctx *nt, /* Notify HW the memory location of the receive buffer */ rc = ntb_mw_set_trans(nt->ntb, num_mw, mw->dma_addr, mw->xlat_size); if (rc) { - device_printf(ntb_get_device(nt->ntb), - "Unable to set mw%d translation", num_mw); + if_printf(nt->ifp, "Unable to set mw%d translation", num_mw); ntb_free_mw(nt, num_mw); return (rc); } @@ -1397,7 +1396,7 @@ ntb_qp_link_work(void *arg) /* See if the remote side is up */ if ((val & (1ull << qp->qp_num)) != 0) { if (bootverbose) - device_printf(ntb_get_device(ntb), "qp link up\n"); + if_printf(nt->ifp, "qp link up\n"); qp->link_is_up = true; if (qp->event_handler != NULL) From owner-svn-src-all@freebsd.org Tue Oct 20 19: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 F0FF6A186ED; Tue, 20 Oct 2015 19:20:34 +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 C0171BC6; Tue, 20 Oct 2015 19:20:34 +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 t9KJKXuB037847; Tue, 20 Oct 2015 19:20:33 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KJKXlT037846; Tue, 20 Oct 2015 19:20:33 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510201920.t9KJKXlT037846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 19:20:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289650 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.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, 20 Oct 2015 19:20:35 -0000 Author: cem Date: Tue Oct 20 19:20:33 2015 New Revision: 289650 URL: https://svnweb.freebsd.org/changeset/base/289650 Log: if_ntb: Correct over-long lines, use qmin() Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 19:20:24 2015 (r289649) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 19:20:33 2015 (r289650) @@ -673,8 +673,8 @@ ntb_transport_init_queue(struct ntb_tran qp->rx_info = (void *)((char *)qp->tx_mw + tx_size); /* Due to house-keeping, there must be at least 2 buffs */ - qp->tx_max_frame = min(transport_mtu + sizeof(struct ntb_payload_header), - tx_size / 2); + qp->tx_max_frame = qmin(tx_size / 2, + transport_mtu + sizeof(struct ntb_payload_header)); qp->tx_max_entry = tx_size / qp->tx_max_frame; callout_init(&qp->link_work, 0); @@ -1356,8 +1356,8 @@ ntb_transport_setup_qp_mw(struct ntb_tra qp->remote_rx_info = (void*)((char *)qp->rx_buff + rx_size); /* Due to house-keeping, there must be at least 2 buffs */ - qp->rx_max_frame = min(transport_mtu + sizeof(struct ntb_payload_header), - rx_size / 2); + qp->rx_max_frame = qmin(rx_size / 2, + transport_mtu + sizeof(struct ntb_payload_header)); qp->rx_max_entry = rx_size / qp->rx_max_frame; qp->rx_index = 0; From owner-svn-src-all@freebsd.org Tue Oct 20 19:20: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 CB117A18740; Tue, 20 Oct 2015 19:20:43 +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 A40A5D39; Tue, 20 Oct 2015 19:20:43 +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 t9KJKggX037895; Tue, 20 Oct 2015 19:20:42 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KJKgaV037894; Tue, 20 Oct 2015 19:20:42 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510201920.t9KJKgaV037894@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 19:20:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289651 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.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, 20 Oct 2015 19:20:44 -0000 Author: cem Date: Tue Oct 20 19:20:42 2015 New Revision: 289651 URL: https://svnweb.freebsd.org/changeset/base/289651 Log: NTB: MFV da2e5ae5: Fix ntb_transport out-of-order RX update It was possible for a synchronous update of the RX index in the error case to get ahead of the asynchronous RX index update in the normal case. Change the RX processing to preserve an RX completion order. There were two error cases. First, if a buffer is not present to receive data, there would be no queue entry to preserve the RX completion order. Instead of dropping the RX frame, leave the RX frame in the ring. Schedule RX processing when RX entries are enqueued, in case there are RX frames waiting in the ring to be received. Second, if a buffer is too small to receive data, drop the frame in the ring, mark the RX entry as done, and indicate the error in the RX entry length. Check for a negative length in the receive callback in ntb_netdev, and count occurrences as rx_length_errors. Authored by: Allen Hubbe Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 19:20:33 2015 (r289650) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 19:20:42 2015 (r289651) @@ -149,10 +149,11 @@ struct ntb_transport_qp { void (*rx_handler)(struct ntb_transport_qp *qp, void *qp_data, void *data, int len); + struct ntb_queue_list rx_post_q; struct ntb_queue_list rx_pend_q; struct ntb_queue_list rx_free_q; - struct mtx ntb_rx_pend_q_lock; - struct mtx ntb_rx_free_q_lock; + /* ntb_rx_q_lock: synchronize access to rx_XXXX_q */ + struct mtx ntb_rx_q_lock; struct task rx_completion_task; struct task rxc_db_work; void *rx_buff; @@ -285,10 +286,11 @@ static void ntb_memcpy_tx(struct ntb_tra struct ntb_queue_entry *entry, void *offset); static void ntb_qp_full(void *arg); static void ntb_transport_rxc_db(void *arg, int pending); -static void ntb_rx_pendq_full(void *arg); static int ntb_process_rxc(struct ntb_transport_qp *qp); -static void ntb_rx_copy_task(struct ntb_transport_qp *qp, +static void ntb_memcpy_rx(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry, void *offset); +static inline void ntb_rx_copy_callback(struct ntb_transport_qp *qp, + void *data); static void ntb_complete_rxc(void *arg, int pending); static void ntb_transport_doorbell_callback(void *data, uint32_t vector); static void ntb_transport_event_callback(void *data); @@ -308,6 +310,8 @@ static void ntb_list_add(struct mtx *loc struct ntb_queue_list *list); static struct ntb_queue_entry *ntb_list_rm(struct mtx *lock, struct ntb_queue_list *list); +static struct ntb_queue_entry *ntb_list_mv(struct mtx *lock, + struct ntb_queue_list *from, struct ntb_queue_list *to); static void create_random_local_eui48(u_char *eaddr); static unsigned int ntb_transport_max_size(struct ntb_transport_qp *qp); @@ -681,12 +685,12 @@ ntb_transport_init_queue(struct ntb_tran callout_init(&qp->queue_full, 1); callout_init(&qp->rx_full, 1); - mtx_init(&qp->ntb_rx_pend_q_lock, "ntb rx pend q", NULL, MTX_SPIN); - mtx_init(&qp->ntb_rx_free_q_lock, "ntb rx free q", NULL, MTX_SPIN); + mtx_init(&qp->ntb_rx_q_lock, "ntb rx q", NULL, MTX_SPIN); mtx_init(&qp->ntb_tx_free_q_lock, "ntb tx free q", NULL, MTX_SPIN); TASK_INIT(&qp->rx_completion_task, 0, ntb_complete_rxc, qp); TASK_INIT(&qp->rxc_db_work, 0, ntb_transport_rxc_db, qp); + STAILQ_INIT(&qp->rx_post_q); STAILQ_INIT(&qp->rx_pend_q); STAILQ_INIT(&qp->rx_free_q); STAILQ_INIT(&qp->tx_free_q); @@ -711,10 +715,13 @@ ntb_transport_free_queue(struct ntb_tran qp->tx_handler = NULL; qp->event_handler = NULL; - while ((entry = ntb_list_rm(&qp->ntb_rx_free_q_lock, &qp->rx_free_q))) + while ((entry = ntb_list_rm(&qp->ntb_rx_q_lock, &qp->rx_free_q))) free(entry, M_NTB_IF); - while ((entry = ntb_list_rm(&qp->ntb_rx_pend_q_lock, &qp->rx_pend_q))) + while ((entry = ntb_list_rm(&qp->ntb_rx_q_lock, &qp->rx_pend_q))) + free(entry, M_NTB_IF); + + while ((entry = ntb_list_rm(&qp->ntb_rx_q_lock, &qp->rx_post_q))) free(entry, M_NTB_IF); while ((entry = ntb_list_rm(&qp->ntb_tx_free_q_lock, &qp->tx_free_q))) @@ -769,7 +776,7 @@ ntb_transport_create_queue(void *data, s entry->cb_data = nt->ifp; entry->buf = NULL; entry->len = transport_mtu; - ntb_list_add(&qp->ntb_rx_pend_q_lock, entry, &qp->rx_pend_q); + ntb_list_add(&qp->ntb_rx_q_lock, entry, &qp->rx_pend_q); } for (i = 0; i < NTB_QP_DEF_NUM_ENTRIES; i++) { @@ -951,14 +958,6 @@ ntb_qp_full(void *arg) /* Transport Rx */ static void -ntb_rx_pendq_full(void *arg) -{ - - CTR0(KTR_NTB, "RX: ntb_rx_pendq_full callout"); - ntb_transport_rxc_db(arg, 0); -} - -static void ntb_transport_rxc_db(void *arg, int pending __unused) { struct ntb_transport_qp *qp = arg; @@ -1030,7 +1029,7 @@ ntb_process_rxc(struct ntb_transport_qp return (EIO); } - entry = ntb_list_rm(&qp->ntb_rx_pend_q_lock, &qp->rx_pend_q); + entry = ntb_list_mv(&qp->ntb_rx_q_lock, &qp->rx_pend_q, &qp->rx_post_q); if (entry == NULL) { qp->rx_err_no_buf++; CTR0(KTR_NTB, "RX: No entries in rx_pend_q"); @@ -1050,7 +1049,6 @@ ntb_process_rxc(struct ntb_transport_qp entry->len = -EIO; entry->flags |= IF_NTB_DESC_DONE_FLAG; - ntb_list_add(&qp->ntb_rx_free_q_lock, entry, &qp->rx_free_q); taskqueue_enqueue(taskqueue_swi, &qp->rx_completion_task); } else { qp->rx_bytes += hdr->len; @@ -1060,7 +1058,7 @@ ntb_process_rxc(struct ntb_transport_qp entry->len = hdr->len; - ntb_rx_copy_task(qp, entry, offset); + ntb_memcpy_rx(qp, entry, offset); } qp->rx_index++; @@ -1069,7 +1067,7 @@ ntb_process_rxc(struct ntb_transport_qp } static void -ntb_rx_copy_task(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry, +ntb_memcpy_rx(struct ntb_transport_qp *qp, struct ntb_queue_entry *entry, void *offset) { struct ifnet *ifp = entry->cb_data; @@ -1084,15 +1082,18 @@ ntb_rx_copy_task(struct ntb_transport_qp /* Ensure that the data is globally visible before clearing the flag */ wmb(); - entry->x_hdr->flags = 0; - /* TODO: replace with bus_space_write */ - qp->rx_info->entry = qp->rx_index; - CTR2(KTR_NTB, - "RX: copied entry %p to mbuf %p. Adding entry to rx_free_q", entry, - m); - ntb_list_add(&qp->ntb_rx_free_q_lock, entry, &qp->rx_free_q); + CTR2(KTR_NTB, "RX: copied entry %p to mbuf %p.", entry, m); + ntb_rx_copy_callback(qp, entry); +} +static inline void +ntb_rx_copy_callback(struct ntb_transport_qp *qp, void *data) +{ + struct ntb_queue_entry *entry; + + entry = data; + entry->flags |= IF_NTB_DESC_DONE_FLAG; taskqueue_enqueue(taskqueue_swi, &qp->rx_completion_task); } @@ -1100,30 +1101,39 @@ static void ntb_complete_rxc(void *arg, int pending) { struct ntb_transport_qp *qp = arg; - struct mbuf *m; struct ntb_queue_entry *entry; + struct mbuf *m; + unsigned len; CTR0(KTR_NTB, "RX: rx_completion_task"); - while ((entry = ntb_list_rm(&qp->ntb_rx_free_q_lock, &qp->rx_free_q))) { + mtx_lock_spin(&qp->ntb_rx_q_lock); + + while (!STAILQ_EMPTY(&qp->rx_post_q)) { + entry = STAILQ_FIRST(&qp->rx_post_q); + if ((entry->flags & IF_NTB_DESC_DONE_FLAG) == 0) + break; + + entry->x_hdr->flags = 0; + /* XXX bus_space_write */ + qp->rx_info->entry = entry->index; + + len = entry->len; m = entry->buf; - CTR2(KTR_NTB, "RX: completing entry %p, mbuf %p", entry, m); - if (qp->rx_handler && qp->client_ready) - qp->rx_handler(qp, qp->cb_data, m, entry->len); - entry->buf = NULL; - entry->len = qp->transport->bufsize; + STAILQ_REMOVE_HEAD(&qp->rx_post_q, entry); + STAILQ_INSERT_TAIL(&qp->rx_free_q, entry, entry); - CTR1(KTR_NTB,"RX: entry %p removed from rx_free_q " - "and added to rx_pend_q", entry); - ntb_list_add(&qp->ntb_rx_pend_q_lock, entry, &qp->rx_pend_q); - if (qp->rx_err_no_buf > qp->last_rx_no_buf) { - qp->last_rx_no_buf = qp->rx_err_no_buf; - CTR0(KTR_NTB, "RX: could spawn rx task"); - callout_reset(&qp->rx_full, hz / 1000, ntb_rx_pendq_full, - qp); - } + mtx_unlock_spin(&qp->ntb_rx_q_lock); + + CTR2(KTR_NTB, "RX: completing entry %p, mbuf %p", entry, m); + if (qp->rx_handler != NULL && qp->client_ready) + qp->rx_handler(qp, qp->cb_data, m, len); + + mtx_lock_spin(&qp->ntb_rx_q_lock); } + + mtx_unlock_spin(&qp->ntb_rx_q_lock); } static void @@ -1573,6 +1583,26 @@ out: return (entry); } +static struct ntb_queue_entry * +ntb_list_mv(struct mtx *lock, struct ntb_queue_list *from, + struct ntb_queue_list *to) +{ + struct ntb_queue_entry *entry; + + mtx_lock_spin(lock); + if (STAILQ_EMPTY(from)) { + entry = NULL; + goto out; + } + entry = STAILQ_FIRST(from); + STAILQ_REMOVE_HEAD(from, entry); + STAILQ_INSERT_TAIL(to, entry, entry); + +out: + mtx_unlock_spin(lock); + return (entry); +} + /* Helper functions */ /* TODO: This too should really be part of the kernel */ #define EUI48_MULTICAST 1 << 0 From owner-svn-src-all@freebsd.org Tue Oct 20 19:20: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 AB17BA187BA; Tue, 20 Oct 2015 19:20:53 +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 604E4EA4; Tue, 20 Oct 2015 19:20:53 +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 t9KJKqTH037945; Tue, 20 Oct 2015 19:20:52 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KJKqp3037944; Tue, 20 Oct 2015 19:20:52 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510201920.t9KJKqp3037944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 19:20:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289652 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.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, 20 Oct 2015 19:20:53 -0000 Author: cem Date: Tue Oct 20 19:20:52 2015 New Revision: 289652 URL: https://svnweb.freebsd.org/changeset/base/289652 Log: NTB: MFV 8c9edf63: Fix zero size or integer overflow in ntb_set_mw A plain 32 bit integer will overflow for values over 4GiB. Change the plain integer size to the appropriate size type in ntb_set_mw. Change the type of the size parameter and two local variables used for size. Even if there is no overflow, a size of zero is invalid here. Authored by: Allen Hubbe Reported by: Juyoung Jung Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 19:20:42 2015 (r289651) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 19:20:52 2015 (r289652) @@ -295,7 +295,7 @@ static void ntb_complete_rxc(void *arg, static void ntb_transport_doorbell_callback(void *data, uint32_t vector); static void ntb_transport_event_callback(void *data); static void ntb_transport_link_work(void *arg); -static int ntb_set_mw(struct ntb_transport_ctx *, int num_mw, unsigned size); +static int ntb_set_mw(struct ntb_transport_ctx *, int num_mw, size_t size); static void ntb_free_mw(struct ntb_transport_ctx *nt, int num_mw); static int ntb_transport_setup_qp_mw(struct ntb_transport_ctx *nt, unsigned int qp_num); @@ -1266,12 +1266,15 @@ out: } static int -ntb_set_mw(struct ntb_transport_ctx *nt, int num_mw, unsigned size) +ntb_set_mw(struct ntb_transport_ctx *nt, int num_mw, size_t size) { struct ntb_transport_mw *mw = &nt->mw_vec[num_mw]; - unsigned xlat_size, buff_size; + size_t xlat_size, buff_size; int rc; + if (size == 0) + return (EINVAL); + xlat_size = roundup(size, mw->xlat_align_size); buff_size = roundup(size, mw->xlat_align); @@ -1305,7 +1308,7 @@ ntb_set_mw(struct ntb_transport_ctx *nt, */ if (mw->dma_addr % mw->xlat_align != 0) { if_printf(nt->ifp, - "DMA memory 0x%jx not aligned to BAR size 0x%x\n", + "DMA memory 0x%jx not aligned to BAR size 0x%zx\n", (uintmax_t)mw->dma_addr, size); ntb_free_mw(nt, num_mw); return (ENOMEM); From owner-svn-src-all@freebsd.org Tue Oct 20 19:21: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 89556A1881F; Tue, 20 Oct 2015 19:21:02 +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 4A36A1037; Tue, 20 Oct 2015 19:21:02 +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 t9KJL1SB037998; Tue, 20 Oct 2015 19:21:01 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KJL1Hx037997; Tue, 20 Oct 2015 19:21:01 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510201921.t9KJL1Hx037997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 19:21:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289653 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.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, 20 Oct 2015 19:21:02 -0000 Author: cem Date: Tue Oct 20 19:21:01 2015 New Revision: 289653 URL: https://svnweb.freebsd.org/changeset/base/289653 Log: if_ntb: Diff-reduce with Linux; add queue index type Add ntb_q_idx_t so it is more clear which struct members are of the same type (some bogus uint64_ts snuck in that should have been unsigned int). Add tx_err_no_buf and s/ENOMEM/EBUSY/ in tx_enqueue to match Linux. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 19:20:52 2015 (r289652) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 19:21:01 2015 (r289653) @@ -105,6 +105,8 @@ SYSCTL_UINT(_hw_ntb, OID_AUTO, max_num_c STAILQ_HEAD(ntb_queue_list, ntb_queue_entry); +typedef unsigned ntb_q_idx_t; + struct ntb_queue_entry { /* ntb_queue list reference */ STAILQ_ENTRY(ntb_queue_entry) entry; @@ -117,11 +119,11 @@ struct ntb_queue_entry { struct ntb_transport_qp *qp; struct ntb_payload_header *x_hdr; - unsigned index; + ntb_q_idx_t index; }; struct ntb_rx_info { - unsigned int entry; + ntb_q_idx_t entry; }; struct ntb_transport_qp { @@ -143,8 +145,8 @@ struct ntb_transport_qp { struct mtx ntb_tx_free_q_lock; void *tx_mw; bus_addr_t tx_mw_phys; - uint64_t tx_index; - uint64_t tx_max_entry; + ntb_q_idx_t tx_index; + ntb_q_idx_t tx_max_entry; uint64_t tx_max_frame; void (*rx_handler)(struct ntb_transport_qp *qp, void *qp_data, @@ -157,8 +159,8 @@ struct ntb_transport_qp { struct task rx_completion_task; struct task rxc_db_work; void *rx_buff; - uint64_t rx_index; - uint64_t rx_max_entry; + ntb_q_idx_t rx_index; + ntb_q_idx_t rx_max_entry; uint64_t rx_max_frame; void (*event_handler)(void *data, enum ntb_link_event status); @@ -178,6 +180,7 @@ struct ntb_transport_qp { uint64_t tx_bytes; uint64_t tx_pkts; uint64_t tx_ring_full; + uint64_t tx_err_no_buf; }; struct ntb_queue_handlers { @@ -842,7 +845,8 @@ ntb_transport_tx_enqueue(struct ntb_tran entry = ntb_list_rm(&qp->ntb_tx_free_q_lock, &qp->tx_free_q); if (entry == NULL) { CTR0(KTR_NTB, "TX: could not get entry from tx_free_q"); - return (ENOMEM); + qp->tx_err_no_buf++; + return (EBUSY); } CTR1(KTR_NTB, "TX: got entry %p from tx_free_q", entry); @@ -961,7 +965,7 @@ static void ntb_transport_rxc_db(void *arg, int pending __unused) { struct ntb_transport_qp *qp = arg; - uint64_t i; + ntb_q_idx_t i; int rc; /* @@ -1346,7 +1350,7 @@ ntb_transport_setup_qp_mw(struct ntb_tra struct ntb_transport_qp *qp = &nt->qp_vec[qp_num]; struct ntb_transport_mw *mw; void *offset; - uint64_t i; + ntb_q_idx_t i; size_t rx_size; unsigned num_qps_mw, mw_num, mw_count; @@ -1473,7 +1477,8 @@ ntb_qp_link_down_reset(struct ntb_transp qp->rx_ring_empty = 0; qp->tx_ring_full = 0; - qp->rx_err_no_buf = qp->rx_err_oflow = qp->rx_err_ver = 0; + qp->rx_err_no_buf = qp->tx_err_no_buf = 0; + qp->rx_err_oflow = qp->rx_err_ver = 0; } static void From owner-svn-src-all@freebsd.org Tue Oct 20 19:28: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 E6D0AA18AC5; Tue, 20 Oct 2015 19:28:30 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f171.google.com (mail-yk0-f171.google.com [209.85.160.171]) (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 AD785159A; Tue, 20 Oct 2015 19:28:30 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykdr3 with SMTP id r3so27262765ykd.1; Tue, 20 Oct 2015 12:28:24 -0700 (PDT) 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:content-transfer-encoding; bh=STCo66s7AUXTu2yJR6vbbvAaQfhYTch2HqTvXml1eEI=; b=j2iIk/qODH5BEvyr0vUkZcB0rZzYGWPe8tJ/M9x86Ozba44a6IhqIpJob85GVe922f hwa0HdjnXvAdz5I5YLVODF3BFUHYF9GzbgA8ledTq5O/1o5vyTfrhFifjoHcJMou5LS1 VSnpewTFDVJNXav27LPD0XRh8/XX2Aa0cLWuM4hH/q3RDieHDYuK6NmfKfKSao8lQLtl 5f8y9yz71ETFRrYJlzH99ljbH/hmZ9iqsVE2btR4PTe7ajcKZNJL4CY/nAA7hKj2iABq /sq5hfLzBiEwTTxxWUyCclmwnOgEXhHN1HYdMKbBJyaa+HFyJ0B5nImAwrwwZIT2WV4N Ut4Q== X-Received: by 10.129.124.8 with SMTP id x8mr3731775ywc.44.1445369303828; Tue, 20 Oct 2015 12:28:23 -0700 (PDT) Received: from mail-yk0-f177.google.com (mail-yk0-f177.google.com. [209.85.160.177]) by smtp.gmail.com with ESMTPSA id f205sm2843511ywc.7.2015.10.20.12.28.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Oct 2015 12:28:23 -0700 (PDT) Received: by ykaz22 with SMTP id z22so27331728yka.2; Tue, 20 Oct 2015 12:28:23 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.13.212.82 with SMTP id w79mr3727090ywd.272.1445369303350; Tue, 20 Oct 2015 12:28:23 -0700 (PDT) Reply-To: cem@FreeBSD.org Received: by 10.37.203.75 with HTTP; Tue, 20 Oct 2015 12:28:23 -0700 (PDT) In-Reply-To: <201510201921.t9KJL1Hx037997@repo.freebsd.org> References: <201510201921.t9KJL1Hx037997@repo.freebsd.org> Date: Tue, 20 Oct 2015 12:28:23 -0700 Message-ID: Subject: Re: svn commit: r289653 - head/sys/dev/ntb/if_ntb 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 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, 20 Oct 2015 19:28:31 -0000 This catches us up to Linus' master branch as of today (the most recent NTB patch there is from Sep 7, 2015) =E2=80=94 modulo no DMA offload= in if_ntb, no debugfs-equivalent statistics, and neither of Linux' NTB test drivers. Also we don't make any attempt to allocate memory in the device-local NUMA zone, because that API doesn't exist yet. Nor do we push back on the upper network stack layers to stop sending when our queues are full, for the same reason. That's not quite finished, though; Intel and EMC (ex-Isilon) have some patches queued up waiting to go into Linux that should be applied too. Thanks, Conrad On Tue, Oct 20, 2015 at 12:21 PM, Conrad E. Meyer wrote: > Author: cem > Date: Tue Oct 20 19:21:01 2015 > New Revision: 289653 > URL: https://svnweb.freebsd.org/changeset/base/289653 > > Log: > if_ntb: Diff-reduce with Linux; add queue index type > > Add ntb_q_idx_t so it is more clear which struct members are of the sam= e > type (some bogus uint64_ts snuck in that should have been unsigned int)= . > > Add tx_err_no_buf and s/ENOMEM/EBUSY/ in tx_enqueue to match Linux. > > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/sys/dev/ntb/if_ntb/if_ntb.c > > Modified: head/sys/dev/ntb/if_ntb/if_ntb.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 19:20:52 2015 (= r289652) > +++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 19:21:01 2015 (= r289653) > @@ -105,6 +105,8 @@ SYSCTL_UINT(_hw_ntb, OID_AUTO, max_num_c > > STAILQ_HEAD(ntb_queue_list, ntb_queue_entry); > > +typedef unsigned ntb_q_idx_t; > + > struct ntb_queue_entry { > /* ntb_queue list reference */ > STAILQ_ENTRY(ntb_queue_entry) entry; > @@ -117,11 +119,11 @@ struct ntb_queue_entry { > > struct ntb_transport_qp *qp; > struct ntb_payload_header *x_hdr; > - unsigned index; > + ntb_q_idx_t index; > }; > > struct ntb_rx_info { > - unsigned int entry; > + ntb_q_idx_t entry; > }; > > struct ntb_transport_qp { > @@ -143,8 +145,8 @@ struct ntb_transport_qp { > struct mtx ntb_tx_free_q_lock; > void *tx_mw; > bus_addr_t tx_mw_phys; > - uint64_t tx_index; > - uint64_t tx_max_entry; > + ntb_q_idx_t tx_index; > + ntb_q_idx_t tx_max_entry; > uint64_t tx_max_frame; > > void (*rx_handler)(struct ntb_transport_qp *qp, void *qp_data, > @@ -157,8 +159,8 @@ struct ntb_transport_qp { > struct task rx_completion_task; > struct task rxc_db_work; > void *rx_buff; > - uint64_t rx_index; > - uint64_t rx_max_entry; > + ntb_q_idx_t rx_index; > + ntb_q_idx_t rx_max_entry; > uint64_t rx_max_frame; > > void (*event_handler)(void *data, enum ntb_link_event status); > @@ -178,6 +180,7 @@ struct ntb_transport_qp { > uint64_t tx_bytes; > uint64_t tx_pkts; > uint64_t tx_ring_full; > + uint64_t tx_err_no_buf; > }; > > struct ntb_queue_handlers { > @@ -842,7 +845,8 @@ ntb_transport_tx_enqueue(struct ntb_tran > entry =3D ntb_list_rm(&qp->ntb_tx_free_q_lock, &qp->tx_free_q); > if (entry =3D=3D NULL) { > CTR0(KTR_NTB, "TX: could not get entry from tx_free_q"); > - return (ENOMEM); > + qp->tx_err_no_buf++; > + return (EBUSY); > } > CTR1(KTR_NTB, "TX: got entry %p from tx_free_q", entry); > > @@ -961,7 +965,7 @@ static void > ntb_transport_rxc_db(void *arg, int pending __unused) > { > struct ntb_transport_qp *qp =3D arg; > - uint64_t i; > + ntb_q_idx_t i; > int rc; > > /* > @@ -1346,7 +1350,7 @@ ntb_transport_setup_qp_mw(struct ntb_tra > struct ntb_transport_qp *qp =3D &nt->qp_vec[qp_num]; > struct ntb_transport_mw *mw; > void *offset; > - uint64_t i; > + ntb_q_idx_t i; > size_t rx_size; > unsigned num_qps_mw, mw_num, mw_count; > > @@ -1473,7 +1477,8 @@ ntb_qp_link_down_reset(struct ntb_transp > qp->rx_ring_empty =3D 0; > qp->tx_ring_full =3D 0; > > - qp->rx_err_no_buf =3D qp->rx_err_oflow =3D qp->rx_err_ver =3D 0; > + qp->rx_err_no_buf =3D qp->tx_err_no_buf =3D 0; > + qp->rx_err_oflow =3D qp->rx_err_ver =3D 0; > } > > static void > From owner-svn-src-all@freebsd.org Tue Oct 20 19:30: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 2AA66A18B94; Tue, 20 Oct 2015 19:30:08 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [IPv6:2607:fc50:1000:7400:216:3eff:fe72:314f]) by mx1.freebsd.org (Postfix) with ESMTP id 0859F1898; Tue, 20 Oct 2015 19:30:08 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from marvin.beer.town (unknown [76.164.8.130]) by smtp.vangyzen.net (Postfix) with ESMTPSA id DAE18565A3; Tue, 20 Oct 2015 14:30:06 -0500 (CDT) Subject: Re: svn commit: r289643 - head To: Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510201904.t9KJ4Dip034427@repo.freebsd.org> From: Eric van Gyzen Message-ID: <5626963D.5070800@vangyzen.net> Date: Tue, 20 Oct 2015 14:30:05 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <201510201904.t9KJ4Dip034427@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 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: Tue, 20 Oct 2015 19:30:08 -0000 On 10/20/2015 14:04, Alexander Motin wrote: > Author: mav > Date: Tue Oct 20 19:04:13 2015 > New Revision: 289643 > URL: https://svnweb.freebsd.org/changeset/base/289643 > > Log: > Document isp_*_multi firmware kernel modules removal at r289626. > > Modified: > head/UPDATING Thanks! Eric From owner-svn-src-all@freebsd.org Tue Oct 20 19: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 CB67BA18D8B; Tue, 20 Oct 2015 19:32:17 +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 908981C4E; Tue, 20 Oct 2015 19:32:17 +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 t9KJWGDm041638; Tue, 20 Oct 2015 19:32:16 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KJWGJC041636; Tue, 20 Oct 2015 19:32:16 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510201932.t9KJWGJC041636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 19:32:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289654 - in head/sys/dev/ntb: if_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, 20 Oct 2015 19:32:17 -0000 Author: cem Date: Tue Oct 20 19:32:16 2015 New Revision: 289654 URL: https://svnweb.freebsd.org/changeset/base/289654 Log: NTB: Revert r289645 Per Benno, this is a Linuxism we do not need in FreeBSD. Suggested by: benno Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 19:21:01 2015 (r289653) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 19:32:16 2015 (r289654) @@ -400,9 +400,6 @@ ntb_setup_interface(void) ntb_transport_link_up(net_softc.qp); net_softc.bufsize = ntb_transport_max_size(net_softc.qp) + sizeof(struct ether_header); - - if_printf(ifp, "if_ntb device setup\n"); - return (0); } @@ -414,7 +411,6 @@ ntb_teardown_interface(void) ntb_transport_link_down(net_softc.qp); if (net_softc.ifp != NULL) { - if_printf(net_softc.ifp, "if_ntb device destroyed\n"); ether_ifdetach(net_softc.ifp); if_free(net_softc.ifp); } Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 19:21:01 2015 (r289653) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 19:32:16 2015 (r289654) @@ -531,8 +531,6 @@ ntb_attach(device_t device) pci_enable_busmaster(ntb->device); - device_printf(ntb->device, "NTB device registered\n"); - out: if (error != 0) ntb_detach(device); @@ -564,8 +562,6 @@ ntb_detach(device_t device) ntb_detect_max_mw(ntb); ntb_unmap_pci_bar(ntb); - device_printf(ntb->device, "NTB device unregistered\n"); - return (0); } From owner-svn-src-all@freebsd.org Tue Oct 20 19:32: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 F20A4A18DC3; Tue, 20 Oct 2015 19:32:27 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD5A11DD2; Tue, 20 Oct 2015 19:32:27 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9KJWQFR042615; Tue, 20 Oct 2015 19:32:26 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KJWQdZ042598; Tue, 20 Oct 2015 19:32:26 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201510201932.t9KJWQdZ042598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 20 Oct 2015 19:32:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289655 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 20 Oct 2015 19:32:28 -0000 Author: sbruno Date: Tue Oct 20 19:32:26 2015 New Revision: 289655 URL: https://svnweb.freebsd.org/changeset/base/289655 Log: Disable SWAPPING as we don't do it on this board. Modified: head/sys/mips/conf/TP-MR3020 Modified: head/sys/mips/conf/TP-MR3020 ============================================================================== --- head/sys/mips/conf/TP-MR3020 Tue Oct 20 19:32:16 2015 (r289654) +++ head/sys/mips/conf/TP-MR3020 Tue Oct 20 19:32:26 2015 (r289655) @@ -27,6 +27,9 @@ hints "TP-MR3020.hints" # Board memory - 32MB options AR71XX_REALMEM=(32*1024*1024) +# Disable support for paging +options NO_SWAPPING + # i2c GPIO bus device gpioiic device iicbb From owner-svn-src-all@freebsd.org Tue Oct 20 19: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 982E8A197F9; Tue, 20 Oct 2015 19:47:09 +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 64AB3C8F; Tue, 20 Oct 2015 19:47:09 +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 t9KJl8t9046953; Tue, 20 Oct 2015 19:47:08 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KJl85D046952; Tue, 20 Oct 2015 19:47:08 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201510201947.t9KJl85D046952@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: Tue, 20 Oct 2015 19:47:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289656 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.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, 20 Oct 2015 19:47:09 -0000 Author: dumbbell Date: Tue Oct 20 19:47:08 2015 New Revision: 289656 URL: https://svnweb.freebsd.org/changeset/base/289656 Log: iicbus: Remove trailing whitespaces MFC after: 1 week Modified: head/sys/dev/iicbus/iicbus.c Modified: head/sys/dev/iicbus/iicbus.c ============================================================================== --- head/sys/dev/iicbus/iicbus.c Tue Oct 20 19:32:26 2015 (r289655) +++ head/sys/dev/iicbus/iicbus.c Tue Oct 20 19:47:08 2015 (r289656) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include @@ -61,7 +61,7 @@ iicbus_probe(device_t dev) } #if SCAN_IICBUS -static int +static int iic_probe_device(device_t dev, u_char addr) { int count; @@ -127,7 +127,7 @@ iicbus_attach(device_t dev) bus_generic_attach(dev); return (0); } - + static int iicbus_detach(device_t dev) { @@ -138,7 +138,7 @@ iicbus_detach(device_t dev) mtx_destroy(&sc->lock); return (0); } - + static int iicbus_print_child(device_t dev, device_t child) { From owner-svn-src-all@freebsd.org Tue Oct 20 19:53: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 4788FA19A3E; Tue, 20 Oct 2015 19:53:01 +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 21FE51058; Tue, 20 Oct 2015 19:53:01 +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 t9KJr0RW049649; Tue, 20 Oct 2015 19:53:00 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KJqxxk049641; Tue, 20 Oct 2015 19:52:59 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201510201952.t9KJqxxk049641@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: Tue, 20 Oct 2015 19:52:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289657 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.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, 20 Oct 2015 19:53:01 -0000 Author: dumbbell Date: Tue Oct 20 19:52:59 2015 New Revision: 289657 URL: https://svnweb.freebsd.org/changeset/base/289657 Log: iicbus: Use device_delete_children() instead of explicit child removal If the bus is detached and deleted by a call to device_delete_child() or device_delete_children() on a device higher in the tree, I²C children were already detached and deleted. So the device_t pointer stored in sc points to freed memory: we must not try to delete it again. By using device_delete_children(), we let subr_bus.c figure out if there are children to take care of. While here, make sure iicbus_detach() and iicoc_detach() call device_delete_children() too, to be safe. Reviewed by: jhb, imp Approved by: jhb, imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D3926 Modified: head/sys/dev/iicbus/iicbb.c head/sys/dev/iicbus/iicbus.c head/sys/dev/iicbus/iicoc.c head/sys/dev/iicbus/iicsmb.c Modified: head/sys/dev/iicbus/iicbb.c ============================================================================== --- head/sys/dev/iicbus/iicbb.c Tue Oct 20 19:47:08 2015 (r289656) +++ head/sys/dev/iicbus/iicbb.c Tue Oct 20 19:52:59 2015 (r289657) @@ -149,22 +149,9 @@ iicbb_attach(device_t dev) static int iicbb_detach(device_t dev) { - struct iicbb_softc *sc = (struct iicbb_softc *)device_get_softc(dev); - device_t child; - /* - * We need to save child because the detach indirectly causes - * sc->iicbus to be zeroed. Since we added the device - * unconditionally in iicbb_attach, we need to make sure we - * delete it here. See iicbb_child_detached. We need that - * callback in case newbus detached our children w/o detaching - * us (say iicbus is a module and unloaded w/o iicbb being - * unloaded). - */ - child = sc->iicbus; bus_generic_detach(dev); - if (child) - device_delete_child(dev, child); + device_delete_children(dev); return (0); } Modified: head/sys/dev/iicbus/iicbus.c ============================================================================== --- head/sys/dev/iicbus/iicbus.c Tue Oct 20 19:47:08 2015 (r289656) +++ head/sys/dev/iicbus/iicbus.c Tue Oct 20 19:52:59 2015 (r289657) @@ -135,6 +135,7 @@ iicbus_detach(device_t dev) iicbus_reset(dev, IIC_FASTEST, 0, NULL); bus_generic_detach(dev); + device_delete_children(dev); mtx_destroy(&sc->lock); return (0); } Modified: head/sys/dev/iicbus/iicoc.c ============================================================================== --- head/sys/dev/iicbus/iicoc.c Tue Oct 20 19:47:08 2015 (r289656) +++ head/sys/dev/iicbus/iicoc.c Tue Oct 20 19:52:59 2015 (r289657) @@ -229,6 +229,7 @@ static int iicoc_detach(device_t dev) { bus_generic_detach(dev); + device_delete_children(dev); return (0); } Modified: head/sys/dev/iicbus/iicsmb.c ============================================================================== --- head/sys/dev/iicbus/iicsmb.c Tue Oct 20 19:47:08 2015 (r289656) +++ head/sys/dev/iicbus/iicsmb.c Tue Oct 20 19:52:59 2015 (r289657) @@ -167,11 +167,9 @@ static int iicsmb_detach(device_t dev) { struct iicsmb_softc *sc = (struct iicsmb_softc *)device_get_softc(dev); - + bus_generic_detach(dev); - if (sc->smbus) { - device_delete_child(dev, sc->smbus); - } + device_delete_children(dev); mtx_destroy(&sc->lock); return (0); From owner-svn-src-all@freebsd.org Tue Oct 20 20:12: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 98107A0A0B0; Tue, 20 Oct 2015 20:12:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F2761D14; Tue, 20 Oct 2015 20:12:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9KKCgjv056638; Tue, 20 Oct 2015 20:12:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KKCgOK056637; Tue, 20 Oct 2015 20:12:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510202012.t9KKCgOK056637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 20 Oct 2015 20:12:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289658 - 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, 20 Oct 2015 20:12:43 -0000 Author: kib Date: Tue Oct 20 20:12:42 2015 New Revision: 289658 URL: https://svnweb.freebsd.org/changeset/base/289658 Log: No need to dereference struct proc to pids when comparing processes for equality. Reviewed by: jhb, pho Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/sys_process.c Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Tue Oct 20 19:52:59 2015 (r289657) +++ head/sys/kern/sys_process.c Tue Oct 20 20:12:42 2015 (r289658) @@ -749,7 +749,7 @@ kern_ptrace(struct thread *td, int req, case PT_ATTACH: /* Self */ - if (p->p_pid == td->td_proc->p_pid) { + if (p == td->td_proc) { error = EINVAL; goto fail; } From owner-svn-src-all@freebsd.org Tue Oct 20 20:15: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 CB8ABA0A119; Tue, 20 Oct 2015 20:15: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 7CD311E93; Tue, 20 Oct 2015 20:15: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 t9KKFP0s056925; Tue, 20 Oct 2015 20:15:25 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KKFPQI056924; Tue, 20 Oct 2015 20:15:25 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510202015.t9KKFPQI056924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 20 Oct 2015 20:15:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289659 - 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: Tue, 20 Oct 2015 20:15:26 -0000 Author: bdrewery Date: Tue Oct 20 20:15:25 2015 New Revision: 289659 URL: https://svnweb.freebsd.org/changeset/base/289659 Log: Pass COMPILER_TYPE and COMPILER_VERSION to sub-makes to avoid redundant lookups. This uses a special variable name based on a hash of ${CC}, ${PATH}, and ${MACHINE} to ensure that a cached value is not used if any of these values changes to use a new compiler. Before this there were 34,620 fork/exec from bsd.compiler.mk during a buildworld. After this there are 608. More improvement is needed to cache a value from the top-level before descending into subdirs in the various build phases. Reviewed by: brooks (earlier version) MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D3898 Modified: head/share/mk/bsd.compiler.mk Modified: head/share/mk/bsd.compiler.mk ============================================================================== --- head/share/mk/bsd.compiler.mk Tue Oct 20 20:12:42 2015 (r289658) +++ head/share/mk/bsd.compiler.mk Tue Oct 20 20:15:25 2015 (r289659) @@ -25,6 +25,18 @@ .if !target(____) ____: +# Try to import COMPILER_TYPE and COMPILER_VERSION from parent make. +# The value is only used/exported for the same environment that impacts +# CC and COMPILER_* settings here. +_exported_vars= COMPILER_TYPE COMPILER_VERSION +_cc_hash= ${CC}${MACHINE}${PATH} +_cc_hash:= ${_cc_hash:hash} +.for var in ${_exported_vars} +.if defined(${var}.${_cc_hash}) +${var}= ${${var}.${_cc_hash}} +.endif +.endfor + .if ${MACHINE} == "common" # common is a pseudo machine for architecture independent # generated files - thus there is no compiler. @@ -54,6 +66,14 @@ COMPILER_VERSION!=echo ${_v:M[1-9].[0-9] .undef _v .endif +# Export the values so sub-makes don't have to look them up again, using the +# hash key computed above. +.for var in ${_exported_vars} +${var}.${_cc_hash}:= ${${var}} +.export-env ${var}.${_cc_hash} +.undef ${var}.${_cc_hash} +.endfor + .if ${COMPILER_TYPE} == "clang" || \ (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40800) COMPILER_FEATURES= c++11 From owner-svn-src-all@freebsd.org Tue Oct 20 20:22: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 039D4A0A3E9; Tue, 20 Oct 2015 20:22:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2DB66A2; Tue, 20 Oct 2015 20:22:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9KKMvVm060297; Tue, 20 Oct 2015 20:22:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KKMvxO060296; Tue, 20 Oct 2015 20:22:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510202022.t9KKMvxO060296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 20 Oct 2015 20:22:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289660 - 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, 20 Oct 2015 20:22:59 -0000 Author: kib Date: Tue Oct 20 20:22:57 2015 New Revision: 289660 URL: https://svnweb.freebsd.org/changeset/base/289660 Log: Reviewed by: jhb, pho Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D3908 Modified: head/sys/kern/sys_process.c Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Tue Oct 20 20:15:25 2015 (r289659) +++ head/sys/kern/sys_process.c Tue Oct 20 20:22:57 2015 (r289660) @@ -744,7 +744,18 @@ kern_ptrace(struct thread *td, int req, */ switch (req) { case PT_TRACE_ME: - /* Always legal. */ + /* + * Always legal, when there is a parent process which + * could trace us. Otherwise, reject. + */ + if ((p->p_flag & P_TRACED) != 0) { + error = EBUSY; + goto fail; + } + if (p->p_pptr == initproc) { + error = EPERM; + goto fail; + } break; case PT_ATTACH: From owner-svn-src-all@freebsd.org Tue Oct 20 20:29: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 C5567A0A4DD; Tue, 20 Oct 2015 20:29:22 +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 921929DA; Tue, 20 Oct 2015 20:29: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 t9KKTLxZ060976; Tue, 20 Oct 2015 20:29:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KKTLK7060975; Tue, 20 Oct 2015 20:29:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510202029.t9KKTLK7060975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 20 Oct 2015 20:29:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289661 - 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, 20 Oct 2015 20:29:22 -0000 Author: kib Date: Tue Oct 20 20:29:21 2015 New Revision: 289661 URL: https://svnweb.freebsd.org/changeset/base/289661 Log: Mark struct thread zone as type-stable. When establishing the locking state for several lock types (including blockable mutexes and sx) failed, locking primitives try to spin while the owner thread is running. The spinning loop performs the test for running condition by dereferencing the owner->td_state field of the owner thread. If the owner thread exited while spinner was put off the processor, it is harmless to access reused struct thread owner, since in some near future the current processor would notice the owner change and make appropriate progress. But it could be that the page which carried the freed struct thread was unmapped, then we fault (this cannot happen on amd64). For now, disallowing free of the struct thread seems to be good enough, and tests which create a lot of threads once, did not demonstrated regressions. Reviewed by: jhb, pho Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D3908 Modified: head/sys/kern/kern_thread.c Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Tue Oct 20 20:22:57 2015 (r289660) +++ head/sys/kern/kern_thread.c Tue Oct 20 20:29:21 2015 (r289661) @@ -281,7 +281,7 @@ threadinit(void) thread_zone = uma_zcreate("THREAD", sched_sizeof_thread(), thread_ctor, thread_dtor, thread_init, thread_fini, - 16 - 1, 0); + 16 - 1, UMA_ZONE_NOFREE); tidhashtbl = hashinit(maxproc / 2, M_TIDHASH, &tidhash); rw_init(&tidhash_lock, "tidhash"); } From owner-svn-src-all@freebsd.org Tue Oct 20 20:35: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 37DA8A0A72D; Tue, 20 Oct 2015 20:35:36 +0000 (UTC) (envelope-from jmmv@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA34EDBC; Tue, 20 Oct 2015 20:35:35 +0000 (UTC) (envelope-from jmmv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9KKZYpp064042; Tue, 20 Oct 2015 20:35:34 GMT (envelope-from jmmv@FreeBSD.org) Received: (from jmmv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KKZYXM064035; Tue, 20 Oct 2015 20:35:34 GMT (envelope-from jmmv@FreeBSD.org) Message-Id: <201510202035.t9KKZYXM064035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmmv set sender to jmmv@FreeBSD.org using -f From: Julio Merino Date: Tue, 20 Oct 2015 20:35:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289662 - in head: . etc etc/mtree tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 20 Oct 2015 20:35:36 -0000 Author: jmmv Date: Tue Oct 20 20:35:34 2015 New Revision: 289662 URL: https://svnweb.freebsd.org/changeset/base/289662 Log: Handle lib32 files during delete-old* when MK_LIB32=no. Extend OptionalObsoleteFiles.inc to delete all lib32 files when MK_LIB32 is set to no on a system that previously had lib32 libraries installed. Also, to prevent "make delete-old-dirs" from always deleting lib32 directories after an installworld, move the lib32 subtree to its own mtree file that only gets applied when MK_LIB32=yes. Test: Ran "make delete-old" and "make delete-old-libs" on a system that never had MK_LIB32 enabled, and on a system where MK_LIB32 was enabled and later disabled. Did this both on amd64 and powerpc64. Test: Ran "make tinderbox" without errors. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D3923 Added: head/etc/mtree/BSD.lib32.dist (contents, props changed) Modified: head/Makefile.inc1 head/etc/Makefile head/etc/mtree/BSD.debug.dist head/etc/mtree/BSD.usr.dist head/etc/mtree/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Oct 20 20:29:21 2015 (r289661) +++ head/Makefile.inc1 Tue Oct 20 20:35:34 2015 (r289662) @@ -560,6 +560,16 @@ _worldtmp: mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ -p ${WORLDTMP}/usr/lib >/dev/null .endif +.if ${MK_LIB32} != "no" + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \ + -p ${WORLDTMP}/usr >/dev/null +.if ${MK_DEBUG_FILES} != "no" + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \ + -p ${WORLDTMP}/legacy/usr/lib/debug/usr >/dev/null + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \ + -p ${WORLDTMP}/usr/lib/debug/usr >/dev/null +.endif +.endif .if ${MK_TESTS} != "no" mkdir -p ${WORLDTMP}${TESTSBASE} mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ @@ -653,9 +663,13 @@ build32: -p ${LIB32TMP}/usr >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${LIB32TMP}/usr/include >/dev/null + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \ + -p ${LIB32TMP}/usr >/dev/null .if ${MK_DEBUG_FILES} != "no" mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ -p ${LIB32TMP}/usr/lib >/dev/null + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \ + -p ${LIB32TMP}/usr/lib/debug/usr >/dev/null .endif mkdir -p ${WORLDTMP} ln -sf ${.CURDIR}/sys ${WORLDTMP} @@ -901,6 +915,14 @@ distributeworld installworld: _installch mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib >/dev/null .endif +.if ${MK_LIB32} != "no" + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \ + -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null +.if ${MK_DEBUG_FILES} != "no" + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \ + -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib/debug/usr >/dev/null +.endif +.endif .if ${MK_TESTS} != "no" && ${dist} == "tests" -mkdir -p ${DESTDIR}/${DISTDIR}/${dist}${TESTSBASE} mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ @@ -917,6 +939,10 @@ distributeworld installworld: _installch sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG} ${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.include.dist | \ sed -e 's#^\./#./${dist}/usr/include/#' >> ${METALOG} +.if ${MK_LIB32} != "no" + ${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.lib32.dist | \ + sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG} +.endif .endif .endfor -mkdir ${DESTDIR}/${DISTDIR}/base @@ -2241,6 +2267,10 @@ _xi-mtree: -p ${XDDESTDIR}/usr >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${XDDESTDIR}/usr/include >/dev/null +.if ${MK_LIB32} != "no" + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \ + -p ${XDDESTDIR}/usr >/dev/null +.endif .if ${MK_TESTS} != "no" mkdir -p ${XDDESTDIR}${TESTSBASE} mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Tue Oct 20 20:29:21 2015 (r289661) +++ head/etc/Makefile Tue Oct 20 20:35:34 2015 (r289662) @@ -151,6 +151,9 @@ BIN1+= regdomain.xml BIN2= netstart pccard_ether rc.suspend rc.resume MTREE= BSD.debug.dist BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist +.if ${MK_LIB32} != "no" +MTREE+= BSD.lib32.dist +.endif .if ${MK_TESTS} != "no" MTREE+= BSD.tests.dist .endif @@ -344,6 +347,10 @@ MTREES= mtree/BSD.root.dist / \ .if ${MK_GROFF} != "no" MTREES+= mtree/BSD.groff.dist /usr .endif +.if ${MK_LIB32} != "no" +MTREES+= mtree/BSD.lib32.dist /usr +MTREES+= mtree/BSD.lib32.dist /usr/lib/debug/usr +.endif .if ${MK_TESTS} != "no" MTREES+= mtree/BSD.tests.dist ${TESTSBASE} MTREES+= mtree/BSD.tests.dist /usr/lib/debug/${TESTSBASE} Modified: head/etc/mtree/BSD.debug.dist ============================================================================== --- head/etc/mtree/BSD.debug.dist Tue Oct 20 20:29:21 2015 (r289661) +++ head/etc/mtree/BSD.debug.dist Tue Oct 20 20:35:34 2015 (r289662) @@ -41,12 +41,6 @@ private .. .. - lib32 - i18n - .. - private - .. - .. libexec bsdinstall .. Added: head/etc/mtree/BSD.lib32.dist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/mtree/BSD.lib32.dist Tue Oct 20 20:35:34 2015 (r289662) @@ -0,0 +1,14 @@ +# $FreeBSD$ +# +# Please see the file src/etc/mtree/README before making changes to this file. +# + +/set type=dir uname=root gname=wheel mode=0755 +. + lib32 + dtrace + .. + i18n + .. + .. +.. Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Tue Oct 20 20:29:21 2015 (r289661) +++ head/etc/mtree/BSD.usr.dist Tue Oct 20 20:35:34 2015 (r289662) @@ -43,12 +43,6 @@ .. .. .. - lib32 - dtrace - .. - i18n - .. - .. libdata gcc .. Modified: head/etc/mtree/Makefile ============================================================================== --- head/etc/mtree/Makefile Tue Oct 20 20:29:21 2015 (r289661) +++ head/etc/mtree/Makefile Tue Oct 20 20:35:34 2015 (r289662) @@ -5,6 +5,7 @@ FILES= ${_BSD.debug.dist} \ BSD.include.dist \ BSD.root.dist \ + ${_BSD.lib32.dist} \ ${_BSD.sendmail.dist} \ ${_BSD.tests.dist} \ BSD.usr.dist \ @@ -16,6 +17,9 @@ _BSD.debug.dist= BSD.debug.dist .if ${MK_GROFF} != "no" _BSD.groff.dist= BSD.groff.dist .endif +.if ${MK_LIB32} != "no" +_BSD.lib32.dist= BSD.lib32.dist +.endif .if ${MK_SENDMAIL} != "no" _BSD.sendmail.dist= BSD.sendmail.dist .endif Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Oct 20 20:29:21 2015 (r289661) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Oct 20 20:35:34 2015 (r289662) @@ -3964,9 +3964,34 @@ OLD_FILES+=usr/share/man/man5/keymap.5.g OLD_FILES+=usr/share/man/man8/moused.8.gz .endif -#.if ${MK_LIB32} == no -# to be filled in -#.endif +.if ${MK_LIB32} == no +OLD_FILES+=etc/mtree/BSD.lib32.dist +OLD_FILES+=libexec/ld-elf32.so.1 +. if exists(${DESTDIR}/usr/lib32) +LIB32_DIRS!=find ${DESTDIR}/usr/lib32 -type d \ + | sed -e 's,^${DESTDIR}/,,'; echo +LIB32_FILES!=find ${DESTDIR}/usr/lib32 \! -type d \ + \! -name "lib*.so*" | sed -e 's,^${DESTDIR}/,,'; echo +LIB32_LIBS!=find ${DESTDIR}/usr/lib32 \! -type d \ + -name "lib*.so*" | sed -e 's,^${DESTDIR}/,,'; echo +OLD_DIRS+=${LIB32_DIRS} +OLD_FILES+=${LIB32_FILES} +OLD_LIBS+=${LIB32_LIBS} +. endif +. if ${MK_DEBUG_FILES} == no +. if exists(${DESTDIR}/usr/lib/debug/usr/lib32) +DEBUG_LIB32_DIRS!=find ${DESTDIR}/usr/lib/debug/usr/lib32 -type d \ + | sed -e 's,^${DESTDIR}/,,'; echo +DEBUG_LIB32_FILES!=find ${DESTDIR}/usr/lib/debug/usr/lib32 \! -type d \ + \! -name "lib*.so*" | sed -e 's,^${DESTDIR}/,,'; echo +DEBUG_LIB32_LIBS!=find ${DESTDIR}/usr/lib/debug/usr/lib32 \! -type d \ + -name "lib*.so*" | sed -e 's,^${DESTDIR}/,,'; echo +OLD_DIRS+=${DEBUG_LIB32_DIRS} +OLD_FILES+=${DEBUG_LIB32_FILES} +OLD_LIBS+=${DEBUG_LIB32_LIBS} +. endif +. endif +.endif .if ${MK_LIBCPLUSPLUS} == no OLD_LIBS+=lib/libcxxrt.so.1 From owner-svn-src-all@freebsd.org Tue Oct 20 20:36: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 50FE4A0A7E5; Tue, 20 Oct 2015 20:36:34 +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 2DBBEF48; Tue, 20 Oct 2015 20:36:34 +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 3D288B964; Tue, 20 Oct 2015 16:36:33 -0400 (EDT) From: John Baldwin To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289644 - in head/sys/ofed/include: asm linux Date: Tue, 20 Oct 2015 13:25:26 -0700 Message-ID: <8463823.2q37TKhH1F@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201510201908.t9KJ8QVB034595@repo.freebsd.org> References: <201510201908.t9KJ8QVB034595@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); Tue, 20 Oct 2015 16:36:33 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 20 Oct 2015 20:36:34 -0000 On Tuesday, October 20, 2015 07:08:26 PM Hans Petter Selasky wrote: > Author: hselasky > Date: Tue Oct 20 19:08:26 2015 > New Revision: 289644 > URL: https://svnweb.freebsd.org/changeset/base/289644 > > Log: > Move location of RCS keyword according to style. > > Suggested by: jhb @ > Sponsored by: Mellanox Technologies Thanks. -- John Baldwin From owner-svn-src-all@freebsd.org Tue Oct 20 20:37: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 39327A0A85E; Tue, 20 Oct 2015 20:37:02 +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 0159D1186; Tue, 20 Oct 2015 20:37:01 +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 t9KKb0VV064215; Tue, 20 Oct 2015 20:37:00 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KKb0sk064214; Tue, 20 Oct 2015 20:37:00 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510202037.t9KKb0sk064214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 20 Oct 2015 20:37:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289663 - 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: Tue, 20 Oct 2015 20:37:02 -0000 Author: bdrewery Date: Tue Oct 20 20:37:00 2015 New Revision: 289663 URL: https://svnweb.freebsd.org/changeset/base/289663 Log: Improve safety of caching from r289659 by only importing of none of the variables are already set. This should cover odd cases such as the COMPILER_TYPE override in lib/csu/powerpc64. X-MFC-With: r289659 MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.compiler.mk Modified: head/share/mk/bsd.compiler.mk ============================================================================== --- head/share/mk/bsd.compiler.mk Tue Oct 20 20:35:34 2015 (r289662) +++ head/share/mk/bsd.compiler.mk Tue Oct 20 20:37:00 2015 (r289663) @@ -31,11 +31,20 @@ ____: _exported_vars= COMPILER_TYPE COMPILER_VERSION _cc_hash= ${CC}${MACHINE}${PATH} _cc_hash:= ${_cc_hash:hash} +# Only import if none of the vars are set somehow else. +_can_export= yes +.for var in ${_exported_vars} +.if defined(${var}) +_can_export= no +.endif +.endfor +.if ${_can_export} == yes .for var in ${_exported_vars} .if defined(${var}.${_cc_hash}) ${var}= ${${var}.${_cc_hash}} .endif .endfor +.endif .if ${MACHINE} == "common" # common is a pseudo machine for architecture independent From owner-svn-src-all@freebsd.org Tue Oct 20 20:37: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 B05D4A0A8C5; Tue, 20 Oct 2015 20:37:56 +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 979AD12F6; Tue, 20 Oct 2015 20:37:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 8F5DE19B2; Tue, 20 Oct 2015 20:37:56 +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 4D0D9163B1; Tue, 20 Oct 2015 20:37:56 +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 KKCmsU-WeaX8; Tue, 20 Oct 2015 20:37:52 +0000 (UTC) Subject: Re: svn commit: r289660 - head/sys/kern DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 174EE163AB To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510202022.t9KKMvxO060296@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5626A620.3050405@FreeBSD.org> Date: Tue, 20 Oct 2015 13:37:52 -0700 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: <201510202022.t9KKMvxO060296@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Rijr5Ce0cO6pLdFXR4ogS5np575JUTCKP" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 20 Oct 2015 20:37:56 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Rijr5Ce0cO6pLdFXR4ogS5np575JUTCKP Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/20/2015 1:22 PM, Konstantin Belousov wrote: > Author: kib > Date: Tue Oct 20 20:22:57 2015 > New Revision: 289660 > URL: https://svnweb.freebsd.org/changeset/base/289660 >=20 > Log: > Reviewed by: jhb, pho > Reported and tested by: pho > Sponsored by: The FreeBSD Foundation > MFC after: 2 weeks > Differential revision: https://reviews.freebsd.org/D3908 Missing commit message. --=20 Regards, Bryan Drewery --Rijr5Ce0cO6pLdFXR4ogS5np575JUTCKP 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 iQEcBAEBAgAGBQJWJqYgAAoJEDXXcbtuRpfPwUkIAJDjJNTIK42C/xUlQHUHF8pi K3d0DISLSrqDs5Fyjt4ggROzB3AhVl5H6KaJynGNQqBseiK63DCmifKE0FIhf6so nHAJoRPpsxKuuHtctnOJNoaZL5ibyaBAKrjmBpQfhXx9j/T3iU0WpJBVgvGcpKr+ IFxS6SFffty9kc8dU77IxBpxlXpZnPSjoisOa3+LjKEf4mi7X4rsGIsejefCkn6A U+RJyJVhCo0IGVX9VRA7RZHFiAwuHMNdzT2OQRxM9lKjL4XnlJeEDMgRgOT3uHRh /Ipl68Dk18nkr3auwT4SXY1RgE0rwoQZ2cmz1W7OImY4mxe0xF8UoTYWde4jF0k= =EQAz -----END PGP SIGNATURE----- --Rijr5Ce0cO6pLdFXR4ogS5np575JUTCKP-- From owner-svn-src-all@freebsd.org Tue Oct 20 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 DCABCA0A92C; Tue, 20 Oct 2015 20:38:21 +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 A7625147F; Tue, 20 Oct 2015 20:38:21 +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 t9KKcKuX064374; Tue, 20 Oct 2015 20:38:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KKcKW5064373; Tue, 20 Oct 2015 20:38:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510202038.t9KKcKW5064373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 20 Oct 2015 20:38:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289664 - 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, 20 Oct 2015 20:38:22 -0000 Author: kib Date: Tue Oct 20 20:38:20 2015 New Revision: 289664 URL: https://svnweb.freebsd.org/changeset/base/289664 Log: Trim spaces at end of line to record the proper commit message for r289660: Do not allow to execute ptrace(PT_TRACE_ME) when the process is already traced. Do not allow to execute ptrace(PT_TRACE_ME) when there is no parent which can trace the process, i.e. when the parent is already init. Note that after the PT_TRACE_ME request the process is unkillable and non-continuable until a debugger is attached, or parent is killed, the later clears P_TRACED state. Since init clearly would not debug the caller, and cannot be killed, disallow creation of unkillable processes. Reviewed by: jhb, pho Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D3908 Modified: head/sys/kern/sys_process.c Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Tue Oct 20 20:37:00 2015 (r289663) +++ head/sys/kern/sys_process.c Tue Oct 20 20:38:20 2015 (r289664) @@ -443,7 +443,7 @@ ptrace_vm_entry(struct thread *td, struc } #ifdef COMPAT_FREEBSD32 -static int +static int ptrace_vm_entry32(struct thread *td, struct proc *p, struct ptrace_vm_entry32 *pve32) { From owner-svn-src-all@freebsd.org Tue Oct 20 20:42: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 BBE4AA0AAF2; Tue, 20 Oct 2015 20:42:51 +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 9CBF219A0; Tue, 20 Oct 2015 20:42:51 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 959D71CB6; Tue, 20 Oct 2015 20:42:51 +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 4F57F163C9; Tue, 20 Oct 2015 20:42:51 +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 ZugAx69UmTr1; Tue, 20 Oct 2015 20:42:48 +0000 (UTC) Subject: Re: svn commit: r289664 - head/sys/kern DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com BA2D7163C4 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510202038.t9KKcKW5064373@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5626A748.5040101@FreeBSD.org> Date: Tue, 20 Oct 2015 13:42:48 -0700 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: <201510202038.t9KKcKW5064373@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mSBiLJ3puu9mMv5QbcOWHaTeBH4wo5X9K" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 20 Oct 2015 20:42:51 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --mSBiLJ3puu9mMv5QbcOWHaTeBH4wo5X9K Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/20/2015 1:38 PM, Konstantin Belousov wrote: > Author: kib > Date: Tue Oct 20 20:38:20 2015 > New Revision: 289664 > URL: https://svnweb.freebsd.org/changeset/base/289664 >=20 > Log: > Trim spaces at end of line to record the proper commit message for > r289660: > =20 > Do not allow to execute ptrace(PT_TRACE_ME) when the process is > already traced. > =20 > Do not allow to execute ptrace(PT_TRACE_ME) when there is no parent > which can trace the process, i.e. when the parent is already init. > Note that after the PT_TRACE_ME request the process is unkillable and= > non-continuable until a debugger is attached, or parent is killed, th= e > later clears P_TRACED state. Since init clearly would not debug the > caller, and cannot be killed, disallow creation of unkillable > processes. > =20 > Reviewed by: jhb, pho > Reported and tested by: pho > Sponsored by: The FreeBSD Foundation > MFC after: 2 weeks > Differential revision: https://reviews.freebsd.org/D3908 >=20 > Modified: > head/sys/kern/sys_process.c >=20 > Modified: head/sys/kern/sys_process.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/sys_process.c Tue Oct 20 20:37:00 2015 (r289663) > +++ head/sys/kern/sys_process.c Tue Oct 20 20:38:20 2015 (r289664) > @@ -443,7 +443,7 @@ ptrace_vm_entry(struct thread *td, struc > } > =20 > #ifdef COMPAT_FREEBSD32 > -static int =20 > +static int > ptrace_vm_entry32(struct thread *td, struct proc *p, > struct ptrace_vm_entry32 *pve32) > { >=20 I really think we should just do a full revert and recommit in these cases, and not even a forced commit. Neither this commit or a forced commit will show in 'svn blame' or even during a bisect. It really just becomes luck to find the right commit noting the message. IMHO 'svn blame' is more important than some extra churn in 'svn log' or email. It does add more steps in 'svn blame' but it ends up giving the right message more obviously. I'm not asking to redo this commit now, but I think we should have a standard of just recommitting to fix mistakes. --=20 Regards, Bryan Drewery --mSBiLJ3puu9mMv5QbcOWHaTeBH4wo5X9K 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 iQEcBAEBAgAGBQJWJqdIAAoJEDXXcbtuRpfPaiEH+wYeDnFa8NOztiK81QdSwtvK l6V9dWcO9bToySKGDbozY48xBaEvkW0ofB0MSafsmr756LDAmGGUqwULJkSmGlfH QKWtNnzDDFOyxmVUWFnDOhOPjZm3X8+zcZyxBLH/WG2bhLJyjir8OklQY+sydyOE ls8jBY+XeF+7erFCG0oatoNf/NR6TtRxw6YRDatJFdCO7E1eNc9A72Md5sSl2hFh oDQjpWJTC9ZVvhb5FyV/iHAJsHHbpnDh6GZAfY9BImvxGondU2lPnDK13Y/oHNT0 +OugV8m5Jh4/FPYKSIZ2YTkH1I7QTq+UxqQ+t15e1o4J84sHnmqwn73D9oN/mkI= =xnWE -----END PGP SIGNATURE----- --mSBiLJ3puu9mMv5QbcOWHaTeBH4wo5X9K-- From owner-svn-src-all@freebsd.org Tue Oct 20 20:56: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 676CCA0AE42; Tue, 20 Oct 2015 20:56:26 +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 2F0F81FEC; Tue, 20 Oct 2015 20:56:25 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykaz22 with SMTP id z22so29722862yka.2; Tue, 20 Oct 2015 13:56:18 -0700 (PDT) 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=Q1wdIKoPwHElG90DnuWa7eF/L5CPY/6w/gYJDv8ZDdU=; b=fUQbyz+VuKMD5beL05640kPI1AhyuLQAPl1SzHpJnG/NjA1ObfKPrQhxw8mJbhws21 iNHTOTRIUhg9DVZEvvfHKj2hMY7UgSfpmR4ym6M70yEPNOtnq8DpnRC+G33FG7tmTkhe XJ5OhX4ZhZfxzBbb1PA3TvRHw/7ffO/phl/uI7ZV7R6IR9YF6OAcCJfxT9w/olWnUhVS xrfJmz8/G+On6YxZe8fJchVplXWF1vq7IKh849mPudDu/tKsSEHLWiOAKwOyyowgql51 l0c/G19ZSAkT/W0k+756XS8cwr5If55P1Hx4+l3N+5HTtYROCF2V3GXlzaGLd9ndyyZx 837w== X-Received: by 10.129.147.198 with SMTP id k189mr3831009ywg.282.1445374181034; Tue, 20 Oct 2015 13:49:41 -0700 (PDT) Received: from mail-yk0-f171.google.com (mail-yk0-f171.google.com. [209.85.160.171]) by smtp.gmail.com with ESMTPSA id f133sm3064216ywa.27.2015.10.20.13.49.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Oct 2015 13:49:40 -0700 (PDT) Received: by ykba4 with SMTP id a4so23405741ykb.3; Tue, 20 Oct 2015 13:49:40 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.129.31.195 with SMTP id f186mr835185ywf.204.1445374180518; Tue, 20 Oct 2015 13:49:40 -0700 (PDT) Reply-To: cem@FreeBSD.org Received: by 10.37.203.75 with HTTP; Tue, 20 Oct 2015 13:49:40 -0700 (PDT) In-Reply-To: <201510202037.t9KKb0sk064214@repo.freebsd.org> References: <201510202037.t9KKb0sk064214@repo.freebsd.org> Date: Tue, 20 Oct 2015 13:49:40 -0700 Message-ID: Subject: Re: svn commit: r289663 - head/share/mk From: Conrad Meyer To: Bryan Drewery Cc: 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: Tue, 20 Oct 2015 20:56:26 -0000 On Tue, Oct 20, 2015 at 1:37 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Tue Oct 20 20:37:00 2015 > New Revision: 289663 > URL: https://svnweb.freebsd.org/changeset/base/289663 > > Log: I think this should read: > Improve safety of caching from r289659 by only importing of none of the ... by only importing *if* none of the ... > variables are already set. This should cover odd cases such as the > COMPILER_TYPE override in lib/csu/powerpc64. Best, Conrad From owner-svn-src-all@freebsd.org Tue Oct 20 21:00: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 E679EA0AEB9; Tue, 20 Oct 2015 21:00:42 +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 CCA5E22F; Tue, 20 Oct 2015 21:00:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id C4A85127D; Tue, 20 Oct 2015 21:00:42 +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 816B316462; Tue, 20 Oct 2015 21:00:42 +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 qUDndTTpGsT7; Tue, 20 Oct 2015 21:00:39 +0000 (UTC) Subject: Re: svn commit: r289663 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 659571645D To: cem@FreeBSD.org References: <201510202037.t9KKb0sk064214@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5626AB76.9050604@FreeBSD.org> Date: Tue, 20 Oct 2015 14:00:38 -0700 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: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NWboBPIfcRTDBxI46AKCXOvMDFa68fnXX" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 20 Oct 2015 21:00:43 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --NWboBPIfcRTDBxI46AKCXOvMDFa68fnXX Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/20/2015 1:49 PM, Conrad Meyer wrote: > On Tue, Oct 20, 2015 at 1:37 PM, Bryan Drewery w= rote: >> Author: bdrewery >> Date: Tue Oct 20 20:37:00 2015 >> New Revision: 289663 >> URL: https://svnweb.freebsd.org/changeset/base/289663 >> >> Log: >=20 > I think this should read: >=20 >> Improve safety of caching from r289659 by only importing of none of = the >=20 > ... by only importing *if* none of the ... >=20 Yes. It's a common typo I make :( --=20 Regards, Bryan Drewery --NWboBPIfcRTDBxI46AKCXOvMDFa68fnXX 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 iQEcBAEBAgAGBQJWJqt2AAoJEDXXcbtuRpfPLM4IAJ8bWBgDEk2TLSOb7dlk2bRg zrUl6aQQ1fkqb/DmviukJXUTyCP9/96tKUQGdrsO/9i7pAVsA6F/k7BudewrDGup 4O6oCq/vR02HPFcJhMK2eWaw48MlzAIBPueqJPnmeiHZGPxAyawqnmXx5Qoqou0z tjiV3aBYNOhAu+tpCcMEXC9yXlTFHGGIuqH/U7n+oVI+m7mCxtrwt/DnH015IzR1 5pRJViMwWbDOHxUZd/fsEm3WTa2/TtmgaSSQHGYVqdVhCj/fqQD2ADF4eoVIxYD9 AWrqHy7YQWLTM9Rtm1squM57A7JpLZrSyCc4v0sOoXJtUDyv7Att4+2BRcQFHaE= =mR3P -----END PGP SIGNATURE----- --NWboBPIfcRTDBxI46AKCXOvMDFa68fnXX-- From owner-svn-src-all@freebsd.org Tue Oct 20 21:18: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 39D5DA1A3DB; Tue, 20 Oct 2015 21:18:04 +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 E05CDD43; Tue, 20 Oct 2015 21:18:03 +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 t9KLI2wZ078187; Tue, 20 Oct 2015 21:18:02 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KLI2ZK078186; Tue, 20 Oct 2015 21:18:02 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510202118.t9KLI2ZK078186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 20 Oct 2015 21:18:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289665 - head/sys/dev/etherswitch/arswitch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 20 Oct 2015 21:18:04 -0000 Author: adrian Date: Tue Oct 20 21:18:02 2015 New Revision: 289665 URL: https://svnweb.freebsd.org/changeset/base/289665 Log: AR8327: Fix up the ability to configure the vlangroup configuration for the CPU port I messed up when doing the reset_vlans method - setting vid[0] = 1 here was making it 'hidden' from configuration (as it needed ETHERSWITCH_VID_VALID as well) and so there was no way to configure vlangroup0. In per-port VLAN mode, vlangroup0 is for the CPU port (port0). Now, it normally wouldn't really matter - the CPU port thus sees all other ports. However there are two CPU ports on the AR8327 and so port0 (arge0) was seeing all traffic on port6 (arge1). If you thus tried to use arge1/port6 for anything (eg a WAN port) in a bridge group then things would very upset very quickly. Whilst here, add a comment to remind myself that yes, it'd be nice if we could specify a boot-time switch config. Tested: * AP135 reference platform w/ AR8327N switch Modified: head/sys/dev/etherswitch/arswitch/arswitch_8327.c Modified: head/sys/dev/etherswitch/arswitch/arswitch_8327.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch_8327.c Tue Oct 20 20:38:20 2015 (r289664) +++ head/sys/dev/etherswitch/arswitch/arswitch_8327.c Tue Oct 20 21:18:02 2015 (r289665) @@ -66,6 +66,14 @@ #include "miibus_if.h" #include "etherswitch_if.h" +/* + * AR8327 TODO: + * + * There should be a default hardware setup hint set for the default + * switch config. Otherwise the default is "all ports in one vlangroup", + * which means both CPU ports can see each other and that will quickly + * lead to traffic storms/loops. + */ static int ar8327_vlan_op(struct arswitch_softc *sc, uint32_t op, uint32_t vid, @@ -897,8 +905,8 @@ ar8327_reset_vlans(struct arswitch_softc /* * If dot1q - set pvid; dot1q, etc. */ - sc->vid[0] = 1; if (sc->vlan_mode == ETHERSWITCH_VLAN_DOT1Q) { + sc->vid[0] = 1; for (i = 0; i < AR8327_NUM_PORTS; i++) { /* Each port - pvid 1 */ sc->hal.arswitch_vlan_set_pvid(sc, i, sc->vid[0]); From owner-svn-src-all@freebsd.org Tue Oct 20 21:20: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 2E1ABA1A516; Tue, 20 Oct 2015 21:20:36 +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 C3C7DFB2; Tue, 20 Oct 2015 21:20:35 +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 t9KLKZfQ078469; Tue, 20 Oct 2015 21:20:35 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KLKYjW078463; Tue, 20 Oct 2015 21:20:34 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510202120.t9KLKYjW078463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 20 Oct 2015 21:20: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: r289666 - in stable/10/sys: arm/freescale/imx arm/freescale/vybrid arm/samsung/exynos dev/iicbus dev/pcf powerpc/mpc85xx 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, 20 Oct 2015 21:20:36 -0000 Author: ian Date: Tue Oct 20 21:20:34 2015 New Revision: 289666 URL: https://svnweb.freebsd.org/changeset/base/289666 Log: MFC r281828, r289083, r289084, r289091, r289093, r289095, r289097, r289098, r289104, r289105, r289118: various i2c fixes... Fix numerous issues in iic(4) and iicbus(4): --Allow multiple open iic fds by storing addressing state in cdevpriv --Fix, as much as possible, the baked-in race conditions in the iic ioctl interface by requesting bus ownership on I2CSTART, releasing it on I2CSTOP/I2CRSTCARD, and requiring bus ownership by the current cdevpriv to use the I/O ioctls --Reduce internal iic buffer size and remove 1K read/write limit by iteratively calling iicbus_read/iicbus_write --Eliminate dynamic allocation in I2CWRITE/I2CREAD --Move handling of I2CRDWR to separate function and improve error handling --Add new I2CSADDR ioctl to store address in current cdevpriv so that I2CSTART is not needed for read(2)/write(2) to work --Redesign iicbus_request_bus() and iicbus_release_bus(): --iicbus_request_bus() no longer falls through if the bus is already owned by the requesting device. Multiple threads on the same device may want exclusive access. Also, iicbus_release_bus() was never device-recursive anyway. --Previously, if IICBUS_CALLBACK failed in iicbus_release_bus(), but the following iicbus_poll() call succeeded, IICBUS_CALLBACK would not be issued again --Do not hold iicbus mtx during IICBUS_CALLBACK call. There are several drivers that may sleep in IICBUS_CALLBACK, if IIC_WAIT is passed. --Do not loop in iicbus_request_bus if IICBUS_CALLBACK returns EWOULDBLOCK; instead pass that to the caller so that it can retry if so desired. Bugfix: Exit the transfer loop if any read or write operation fails. Also, perform a stop operation on the bus if there was an error, otherwise the bus will remain hung forever. Consistantly use 'if (error != 0)' style in the function. Mostly rewrite the imx i2c driver. This started out as an attempt to fix one specific problem: the driver didn't check for ACK/NAK after writing a slave address byte to the bus, and some slaves signal that they are busy (such as when completing an internal write to flash memory) by sending a NAK in response to being addressed. Use IIC_EBUSBSY and IIC_BUSERR status values consistantly across all drivers. Make it clearer what each one means in the comments that define them. Add iic2errno(), a helper function to translate IIC_Exxxxx status values to errno values that are at least vaguely equivelent. Also add a new status value, IIC_ERESOURCE, to indicate a failure to acquire memory or other required resources to complete a transaction. Return only IIC_Exxxx status values from iicbus-layer functions. Most of these functions are thin wrappers around calling the hardware-layer driver, but some of them do sanity checks and return an error. Add a short name, IIC_INTRWAIT, for the common case (IIC_INTR | IIC_WAIT). Replace a local sx lock that allowed only one client at a time to access an eeprom device with iicbus_request/release_bus(), which achieves the same effect and also keeps other i2c slave drivers from clashing on the bus. Modified: stable/10/sys/arm/freescale/imx/imx_i2c.c stable/10/sys/arm/freescale/vybrid/vf_i2c.c stable/10/sys/arm/samsung/exynos/exynos5_i2c.c stable/10/sys/dev/iicbus/icee.c stable/10/sys/dev/iicbus/iic.c stable/10/sys/dev/iicbus/iic.h stable/10/sys/dev/iicbus/iicbus_if.m stable/10/sys/dev/iicbus/iicoc.c stable/10/sys/dev/iicbus/iiconf.c stable/10/sys/dev/iicbus/iiconf.h stable/10/sys/dev/pcf/pcf.c stable/10/sys/powerpc/mpc85xx/i2c.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/freescale/imx/imx_i2c.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_i2c.c Tue Oct 20 21:18:02 2015 (r289665) +++ stable/10/sys/arm/freescale/imx/imx_i2c.c Tue Oct 20 21:20:34 2015 (r289666) @@ -1,6 +1,7 @@ /*- * Copyright (C) 2008-2009 Semihalf, Michal Hajduk * Copyright (c) 2012, 2013 The FreeBSD Foundation + * Copyright (c) 2015 Ian Lepore * All rights reserved. * * Portions of this software were developed by Oleksandr Rybalko @@ -28,6 +29,19 @@ * SUCH DAMAGE. */ +/* + * I2C driver for Freescale i.MX hardware. + * + * Note that the hardware is capable of running as both a master and a slave. + * This driver currently implements only master-mode operations. + * + * This driver supports multi-master i2c busses, by detecting bus arbitration + * loss and returning IIC_EBUSBSY status. Notably, it does not do any kind of + * retries if some other master jumps onto the bus and interrupts one of our + * transfer cycles resulting in arbitration loss in mid-transfer. The caller + * must handle retries in a way that makes sense for the slave being addressed. + */ + #include __FBSDID("$FreeBSD$"); @@ -43,9 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include - #include #include @@ -108,13 +119,6 @@ static struct clkdiv clkdiv_table[] = { { 2560, 0x1d }, { 3072, 0x1e }, { 3840, 0x1f }, {UINT_MAX, 0x1f} }; -#ifdef DEBUG -#define debugf(fmt, args...) do { printf("%s(): ", __func__); \ - printf(fmt,##args); } while (0) -#else -#define debugf(fmt, args...) -#endif - static struct ofw_compat_data compat_data[] = { {"fsl,imx6q-i2c", 1}, {"fsl,imx-i2c", 1}, @@ -125,10 +129,8 @@ struct i2c_softc { device_t dev; device_t iicbus; struct resource *res; - struct mtx mutex; int rid; - bus_space_handle_t bsh; - bus_space_tag_t bst; + sbintime_t byte_time_sbt; }; static phandle_t i2c_get_node(device_t, device_t); @@ -158,7 +160,7 @@ static device_method_t i2c_methods[] = { DEVMETHOD(iicbus_write, i2c_write), DEVMETHOD(iicbus_transfer, iicbus_transfer_gen), - { 0, 0 } + DEVMETHOD_END }; static driver_t i2c_driver = { @@ -184,14 +186,14 @@ static __inline void i2c_write_reg(struct i2c_softc *sc, bus_size_t off, uint8_t val) { - bus_space_write_1(sc->bst, sc->bsh, off, val); + bus_write_1(sc->res, off, val); } static __inline uint8_t i2c_read_reg(struct i2c_softc *sc, bus_size_t off) { - return (bus_space_read_1(sc->bst, sc->bsh, off)); + return (bus_read_1(sc->res, off)); } static __inline void @@ -204,60 +206,77 @@ i2c_flag_set(struct i2c_softc *sc, bus_s i2c_write_reg(sc, off, status); } -/* Wait for transfer interrupt flag */ +/* Wait for bus to become busy or not-busy. */ static int -wait_for_iif(struct i2c_softc *sc) +wait_for_busbusy(struct i2c_softc *sc, int wantbusy) { - int retry; + int retry, srb; retry = 1000; while (retry --) { - if (i2c_read_reg(sc, I2C_STATUS_REG) & I2CSR_MIF) + srb = i2c_read_reg(sc, I2C_STATUS_REG) & I2CSR_MBB; + if ((srb && wantbusy) || (!srb && !wantbusy)) return (IIC_NOERR); - DELAY(10); + DELAY(1); } - return (IIC_ETIMEOUT); } -/* Wait for free bus */ +/* Wait for transfer to complete, optionally check RXAK. */ static int -wait_for_nibb(struct i2c_softc *sc) +wait_for_xfer(struct i2c_softc *sc, int checkack) { - int retry; + int retry, sr; - retry = 1000; + /* + * Sleep for about the time it takes to transfer a byte (with precision + * set to tolerate 5% oversleep). We calculate the approximate byte + * transfer time when we set the bus speed divisor. Slaves are allowed + * to do clock-stretching so the actual transfer time can be larger, but + * this gets the bulk of the waiting out of the way without tying up the + * processor the whole time. + */ + pause_sbt("imxi2c", sc->byte_time_sbt, sc->byte_time_sbt / 20, 0); + + retry = 10000; while (retry --) { - if ((i2c_read_reg(sc, I2C_STATUS_REG) & I2CSR_MBB) == 0) - return (IIC_NOERR); - DELAY(10); + sr = i2c_read_reg(sc, I2C_STATUS_REG); + if (sr & I2CSR_MIF) { + if (sr & I2CSR_MAL) + return (IIC_EBUSERR); + else if (checkack && (sr & I2CSR_RXAK)) + return (IIC_ENOACK); + else + return (IIC_NOERR); + } + DELAY(1); } - return (IIC_ETIMEOUT); } -/* Wait for transfer complete+interrupt flag */ +/* + * Implement the error handling shown in the state diagram of the imx6 reference + * manual. If there was an error, then: + * - Clear master mode (MSTA and MTX). + * - Wait for the bus to become free or for a timeout to happen. + * - Disable the controller. + */ static int -wait_for_icf(struct i2c_softc *sc) +i2c_error_handler(struct i2c_softc *sc, int error) { - int retry; - retry = 1000; - while (retry --) { - - if ((i2c_read_reg(sc, I2C_STATUS_REG) & - (I2CSR_MCF|I2CSR_MIF)) == (I2CSR_MCF|I2CSR_MIF)) - return (IIC_NOERR); - DELAY(10); + if (error != 0) { + i2c_write_reg(sc, I2C_STATUS_REG, 0); + i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN); + wait_for_busbusy(sc, false); + i2c_write_reg(sc, I2C_CONTROL_REG, 0); } - - return (IIC_ETIMEOUT); + return (error); } static int i2c_probe(device_t dev) { - struct i2c_softc *sc; if (!ofw_bus_status_okay(dev)) return (ENXIO); @@ -265,23 +284,7 @@ i2c_probe(device_t dev) if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); - sc = device_get_softc(dev); - sc->rid = 0; - - sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->rid, - RF_ACTIVE); - if (sc->res == NULL) { - device_printf(dev, "could not allocate resources\n"); - return (ENXIO); - } - - sc->bst = rman_get_bustag(sc->res); - sc->bsh = rman_get_bushandle(sc->res); - - /* Enable I2C */ - i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN); - bus_release_resource(dev, SYS_RES_MEMORY, sc->rid, sc->res); - device_set_desc(dev, "Freescale i.MX I2C bus controller"); + device_set_desc(dev, "Freescale i.MX I2C"); return (BUS_PROBE_DEFAULT); } @@ -295,28 +298,21 @@ i2c_attach(device_t dev) sc->dev = dev; sc->rid = 0; - mtx_init(&sc->mutex, device_get_nameunit(dev), "I2C", MTX_DEF); - sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->rid, RF_ACTIVE); if (sc->res == NULL) { device_printf(dev, "could not allocate resources"); - mtx_destroy(&sc->mutex); return (ENXIO); } - sc->bst = rman_get_bustag(sc->res); - sc->bsh = rman_get_bushandle(sc->res); - sc->iicbus = device_add_child(dev, "iicbus", -1); if (sc->iicbus == NULL) { device_printf(dev, "could not add iicbus child"); - mtx_destroy(&sc->mutex); return (ENXIO); } bus_generic_attach(dev); - return (IIC_NOERR); + return (0); } static int @@ -327,34 +323,20 @@ i2c_repeated_start(device_t dev, u_char sc = device_get_softc(dev); - mtx_lock(&sc->mutex); - - i2c_write_reg(sc, I2C_ADDR_REG, slave); if ((i2c_read_reg(sc, I2C_STATUS_REG) & I2CSR_MBB) == 0) { - mtx_unlock(&sc->mutex); - return (IIC_EBUSBSY); + return (IIC_EBUSERR); } - /* Set repeated start condition */ - DELAY(10); + /* + * Set repeated start condition, delay (per reference manual, min 156nS) + * before writing slave address, wait for ack after write. + */ i2c_flag_set(sc, I2C_CONTROL_REG, I2CCR_RSTA); - DELAY(10); - /* Clear status */ + DELAY(1); i2c_write_reg(sc, I2C_STATUS_REG, 0x0); - /* Write target address - LSB is R/W bit */ i2c_write_reg(sc, I2C_DATA_REG, slave); - - error = wait_for_iif(sc); - - /* Clear status */ - i2c_write_reg(sc, I2C_STATUS_REG, 0x0); - - mtx_unlock(&sc->mutex); - - if (error) - return (error); - - return (IIC_NOERR); + error = wait_for_xfer(sc, true); + return (i2c_error_handler(sc, error)); } static int @@ -365,53 +347,30 @@ i2c_start(device_t dev, u_char slave, in sc = device_get_softc(dev); - mtx_lock(&sc->mutex); - i2c_write_reg(sc, I2C_ADDR_REG, slave); + i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN); + DELAY(10); /* Delay for controller to sample bus state. */ if (i2c_read_reg(sc, I2C_STATUS_REG) & I2CSR_MBB) { - mtx_unlock(&sc->mutex); - return (IIC_EBUSBSY); + return (i2c_error_handler(sc, IIC_EBUSERR)); } - - /* Set start condition */ - i2c_write_reg(sc, I2C_CONTROL_REG, - I2CCR_MEN | I2CCR_MSTA | I2CCR_TXAK); - DELAY(100); - i2c_write_reg(sc, I2C_CONTROL_REG, - I2CCR_MEN | I2CCR_MSTA | I2CCR_MTX | I2CCR_TXAK); - /* Clear status */ - i2c_write_reg(sc, I2C_STATUS_REG, 0x0); - /* Write target address - LSB is R/W bit */ + i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | I2CCR_MSTA | I2CCR_MTX); + if ((error = wait_for_busbusy(sc, true)) != IIC_NOERR) + return (i2c_error_handler(sc, error)); + i2c_write_reg(sc, I2C_STATUS_REG, 0); i2c_write_reg(sc, I2C_DATA_REG, slave); - - error = wait_for_iif(sc); - - mtx_unlock(&sc->mutex); - if (error) - return (error); - - return (IIC_NOERR); + error = wait_for_xfer(sc, true); + return (i2c_error_handler(sc, error)); } - static int i2c_stop(device_t dev) { struct i2c_softc *sc; sc = device_get_softc(dev); - mtx_lock(&sc->mutex); - i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | I2CCR_TXAK); - DELAY(100); - /* Reset controller if bus still busy after STOP */ - if (wait_for_nibb(sc) == IIC_ETIMEOUT) { - i2c_write_reg(sc, I2C_CONTROL_REG, 0); - DELAY(1000); - i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | I2CCR_TXAK); - - i2c_write_reg(sc, I2C_STATUS_REG, 0x0); - } - mtx_unlock(&sc->mutex); + i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN); + wait_for_busbusy(sc, false); + i2c_write_reg(sc, I2C_CONTROL_REG, 0); return (IIC_NOERR); } @@ -434,19 +393,23 @@ i2c_reset(device_t dev, u_char speed, u_ if (clkdiv_table[i].divisor >= div) break; } - div = clkdiv_table[i].regcode; - mtx_lock(&sc->mutex); - i2c_write_reg(sc, I2C_CONTROL_REG, 0x0); - i2c_write_reg(sc, I2C_STATUS_REG, 0x0); - DELAY(1000); + /* + * Calculate roughly how long it will take to transfer a byte (which + * requires 9 clock cycles) at the new bus speed. This value is used to + * pause() while waiting for transfer-complete. With a 66MHz IPG clock + * and the actual i2c bus speeds that leads to, for nominal 100KHz and + * 400KHz bus speeds the transfer times are roughly 104uS and 22uS. + */ + busfreq = ipgfreq / clkdiv_table[i].divisor; + sc->byte_time_sbt = SBT_1US * (9000000 / busfreq); - i2c_write_reg(sc, I2C_FDR_REG, (uint8_t)div); - i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN); - DELAY(1000); + /* + * Disable the controller (do the reset), and set the new clock divisor. + */ i2c_write_reg(sc, I2C_STATUS_REG, 0x0); - mtx_unlock(&sc->mutex); - + i2c_write_reg(sc, I2C_CONTROL_REG, 0x0); + i2c_write_reg(sc, I2C_FDR_REG, (uint8_t)clkdiv_table[i].regcode); return (IIC_NOERR); } @@ -459,48 +422,42 @@ i2c_read(device_t dev, char *buf, int le sc = device_get_softc(dev); *read = 0; - mtx_lock(&sc->mutex); - if (len) { if (len == 1) i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | I2CCR_MSTA | I2CCR_TXAK); - else i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | I2CCR_MSTA); - - /* dummy read */ + /* Dummy read to prime the receiver. */ + i2c_write_reg(sc, I2C_STATUS_REG, 0x0); i2c_read_reg(sc, I2C_DATA_REG); - DELAY(1000); } + error = 0; + *read = 0; while (*read < len) { - error = wait_for_icf(sc); - if (error) { - mtx_unlock(&sc->mutex); - return (error); - } + if ((error = wait_for_xfer(sc, false)) != IIC_NOERR) + break; i2c_write_reg(sc, I2C_STATUS_REG, 0x0); - if ((*read == len - 2) && last) { - /* NO ACK on last byte */ - i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | - I2CCR_MSTA | I2CCR_TXAK); + if (last) { + if (*read == len - 2) { + /* NO ACK on last byte */ + i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | + I2CCR_MSTA | I2CCR_TXAK); + } else if (*read == len - 1) { + /* Transfer done, signal stop. */ + i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | + I2CCR_TXAK); + wait_for_busbusy(sc, false); + } } - - if ((*read == len - 1) && last) { - /* Transfer done, remove master bit */ - i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | - I2CCR_TXAK); - } - reg = i2c_read_reg(sc, I2C_DATA_REG); *buf++ = reg; (*read)++; } - mtx_unlock(&sc->mutex); - return (IIC_NOERR); + return (i2c_error_handler(sc, error)); } static int @@ -510,22 +467,16 @@ i2c_write(device_t dev, const char *buf, int error; sc = device_get_softc(dev); - *sent = 0; - mtx_lock(&sc->mutex); + error = 0; + *sent = 0; while (*sent < len) { i2c_write_reg(sc, I2C_STATUS_REG, 0x0); i2c_write_reg(sc, I2C_DATA_REG, *buf++); - - error = wait_for_iif(sc); - if (error) { - mtx_unlock(&sc->mutex); - return (error); - } - + if ((error = wait_for_xfer(sc, true)) != IIC_NOERR) + break; (*sent)++; } - mtx_unlock(&sc->mutex); - return (IIC_NOERR); + return (i2c_error_handler(sc, error)); } Modified: stable/10/sys/arm/freescale/vybrid/vf_i2c.c ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_i2c.c Tue Oct 20 21:18:02 2015 (r289665) +++ stable/10/sys/arm/freescale/vybrid/vf_i2c.c Tue Oct 20 21:20:34 2015 (r289666) @@ -233,7 +233,7 @@ i2c_repeated_start(device_t dev, u_char if ((READ1(sc, I2C_IBSR) & IBSR_IBB) == 0) { mtx_unlock(&sc->mutex); - return (IIC_EBUSBSY); + return (IIC_EBUSERR); } /* Set repeated start condition */ @@ -276,7 +276,7 @@ i2c_start(device_t dev, u_char slave, in if (READ1(sc, I2C_IBSR) & IBSR_IBB) { mtx_unlock(&sc->mutex); vf_i2c_dbg(sc, "cant i2c start: IIC_EBUSBSY\n"); - return (IIC_EBUSBSY); + return (IIC_EBUSERR); } /* Set start condition */ Modified: stable/10/sys/arm/samsung/exynos/exynos5_i2c.c ============================================================================== --- stable/10/sys/arm/samsung/exynos/exynos5_i2c.c Tue Oct 20 21:18:02 2015 (r289665) +++ stable/10/sys/arm/samsung/exynos/exynos5_i2c.c Tue Oct 20 21:20:34 2015 (r289666) @@ -265,8 +265,8 @@ i2c_start(device_t dev, u_char slave, in error = wait_for_nibb(sc); if (error) { mtx_unlock(&sc->mutex); - DPRINTF("cant i2c start: IIC_EBUSBSY\n"); - return (IIC_EBUSBSY); + DPRINTF("cant i2c start: IIC_EBUSERR\n"); + return (IIC_EBUSERR); } reg = READ1(sc, I2CCON); Modified: stable/10/sys/dev/iicbus/icee.c ============================================================================== --- stable/10/sys/dev/iicbus/icee.c Tue Oct 20 21:18:02 2015 (r289665) +++ stable/10/sys/dev/iicbus/icee.c Tue Oct 20 21:20:34 2015 (r289666) @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); struct icee_softc { device_t sc_dev; /* Myself */ - struct sx sc_lock; /* basically a perimeter lock */ + device_t sc_busdev; /* Parent bus */ struct cdev *cdev; /* user interface */ int addr; int size; /* How big am I? */ @@ -57,12 +57,6 @@ struct icee_softc { int wr_sz; /* What's the write page size */ }; -#define ICEE_LOCK(_sc) sx_xlock(&(_sc)->sc_lock) -#define ICEE_UNLOCK(_sc) sx_xunlock(&(_sc)->sc_lock) -#define ICEE_LOCK_INIT(_sc) sx_init(&_sc->sc_lock, "icee") -#define ICEE_LOCK_DESTROY(_sc) sx_destroy(&_sc->sc_lock); -#define ICEE_ASSERT_LOCKED(_sc) sx_assert(&_sc->sc_lock, SA_XLOCKED); -#define ICEE_ASSERT_UNLOCKED(_sc) sx_assert(&_sc->sc_lock, SA_UNLOCKED); #define CDEV2SOFTC(dev) ((dev)->si_drv1) /* cdev routines */ @@ -84,7 +78,7 @@ static struct cdevsw icee_cdevsw = static int icee_probe(device_t dev) { - /* XXX really probe? -- not until we know the size... */ + device_set_desc(dev, "I2C EEPROM"); return (BUS_PROBE_NOWILDCARD); } @@ -97,6 +91,7 @@ icee_attach(device_t dev) int dunit, err; sc->sc_dev = dev; + sc->sc_busdev = device_get_parent(sc->sc_dev); sc->addr = iicbus_get_addr(dev); err = 0; dname = device_get_name(dev); @@ -117,8 +112,7 @@ icee_attach(device_t dev) goto out; } sc->cdev->si_drv1 = sc; - ICEE_LOCK_INIT(sc); -out:; +out: return (err); } @@ -126,7 +120,7 @@ static int icee_open(struct cdev *dev, int oflags, int devtype, struct thread *td) { - return (0); + return (0); } static int @@ -155,7 +149,9 @@ icee_read(struct cdev *dev, struct uio * return (EIO); if (sc->type != 8 && sc->type != 16) return (EINVAL); - ICEE_LOCK(sc); + error = iicbus_request_bus(sc->sc_busdev, sc->sc_dev, IIC_INTRWAIT); + if (error!= 0) + return (iic2errno(error)); slave = error = 0; while (uio->uio_resid > 0) { if (uio->uio_offset >= sc->size) @@ -180,13 +176,15 @@ icee_read(struct cdev *dev, struct uio * for (i = 0; i < 2; i++) msgs[i].slave = slave; error = iicbus_transfer(sc->sc_dev, msgs, 2); - if (error) + if (error) { + error = iic2errno(error); break; + } error = uiomove(data, len, uio); if (error) break; } - ICEE_UNLOCK(sc); + iicbus_release_bus(sc->sc_busdev, sc->sc_dev); return (error); } @@ -214,7 +212,10 @@ icee_write(struct cdev *dev, struct uio return (EIO); if (sc->type != 8 && sc->type != 16) return (EINVAL); - ICEE_LOCK(sc); + + error = iicbus_request_bus(sc->sc_busdev, sc->sc_dev, IIC_INTRWAIT); + if (error!= 0) + return (iic2errno(error)); slave = error = 0; while (uio->uio_resid > 0) { if (uio->uio_offset >= sc->size) @@ -239,22 +240,22 @@ icee_write(struct cdev *dev, struct uio if (error) break; error = iicbus_transfer(sc->sc_dev, wr, 1); - if (error) + if (error) { + error = iic2errno(error); break; - // Now wait for the write to be done by trying to read - // the part. + } + /* Read after write to wait for write-done. */ waitlimit = 10000; rd[0].slave = slave; - do - { - error = iicbus_transfer(sc->sc_dev, rd, 1); + do { + error = iicbus_transfer(sc->sc_dev, rd, 1); } while (waitlimit-- > 0 && error != 0); if (error) { - printf("waiting for write failed %d\n", error); - break; + error = iic2errno(error); + break; } } - ICEE_UNLOCK(sc); + iicbus_release_bus(sc->sc_busdev, sc->sc_dev); return error; } Modified: stable/10/sys/dev/iicbus/iic.c ============================================================================== --- stable/10/sys/dev/iicbus/iic.c Tue Oct 20 21:18:02 2015 (r289665) +++ stable/10/sys/dev/iicbus/iic.c Tue Oct 20 21:20:34 2015 (r289666) @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -44,28 +45,32 @@ #include "iicbus_if.h" -#define BUFSIZE 1024 - struct iic_softc { - device_t sc_dev; - u_char sc_addr; /* 7 bit address on iicbus */ - int sc_count; /* >0 if device opened */ - - char sc_buffer[BUFSIZE]; /* output buffer */ - char sc_inbuf[BUFSIZE]; /* input buffer */ - struct cdev *sc_devnode; - struct sx sc_lock; }; -#define IIC_LOCK(sc) sx_xlock(&(sc)->sc_lock) -#define IIC_UNLOCK(sc) sx_xunlock(&(sc)->sc_lock) +struct iic_cdevpriv { + struct sx lock; + struct iic_softc *sc; + bool started; + uint8_t addr; +}; + + +#define IIC_LOCK(cdp) sx_xlock(&(cdp)->lock) +#define IIC_UNLOCK(cdp) sx_xunlock(&(cdp)->lock) + +static MALLOC_DEFINE(M_IIC, "iic", "I2C device data"); static int iic_probe(device_t); static int iic_attach(device_t); static int iic_detach(device_t); static void iic_identify(driver_t *driver, device_t parent); +static void iicdtor(void *data); +static int iicuio_move(struct iic_cdevpriv *priv, struct uio *uio, int last); +static int iicuio(struct cdev *dev, struct uio *uio, int ioflag); +static int iicrdwr(struct iic_cdevpriv *priv, struct iic_rdwr_data *d, int flags); static devclass_t iic_devclass; @@ -89,18 +94,13 @@ static driver_t iic_driver = { }; static d_open_t iicopen; -static d_close_t iicclose; -static d_write_t iicwrite; -static d_read_t iicread; static d_ioctl_t iicioctl; static struct cdevsw iic_cdevsw = { .d_version = D_VERSION, - .d_flags = D_TRACKCLOSE, .d_open = iicopen, - .d_close = iicclose, - .d_read = iicread, - .d_write = iicwrite, + .d_read = iicuio, + .d_write = iicuio, .d_ioctl = iicioctl, .d_name = "iic", }; @@ -127,16 +127,15 @@ iic_probe(device_t dev) static int iic_attach(device_t dev) { - struct iic_softc *sc = (struct iic_softc *)device_get_softc(dev); + struct iic_softc *sc; + sc = device_get_softc(dev); sc->sc_dev = dev; - sx_init(&sc->sc_lock, "iic"); sc->sc_devnode = make_dev(&iic_cdevsw, device_get_unit(dev), UID_ROOT, GID_WHEEL, 0600, "iic%d", device_get_unit(dev)); if (sc->sc_devnode == NULL) { device_printf(dev, "failed to create character device\n"); - sx_destroy(&sc->sc_lock); return (ENXIO); } sc->sc_devnode->si_drv1 = sc; @@ -147,11 +146,12 @@ iic_attach(device_t dev) static int iic_detach(device_t dev) { - struct iic_softc *sc = (struct iic_softc *)device_get_softc(dev); + struct iic_softc *sc; + + sc = device_get_softc(dev); if (sc->sc_devnode) destroy_dev(sc->sc_devnode); - sx_destroy(&sc->sc_lock); return (0); } @@ -159,238 +159,331 @@ iic_detach(device_t dev) static int iicopen(struct cdev *dev, int flags, int fmt, struct thread *td) { - struct iic_softc *sc = dev->si_drv1; + struct iic_cdevpriv *priv; + int error; - IIC_LOCK(sc); - if (sc->sc_count > 0) { - IIC_UNLOCK(sc); - return (EBUSY); - } + priv = malloc(sizeof(*priv), M_IIC, M_WAITOK | M_ZERO); - sc->sc_count++; - IIC_UNLOCK(sc); + sx_init(&priv->lock, "iic"); + priv->sc = dev->si_drv1; - return (0); + error = devfs_set_cdevpriv(priv, iicdtor); + if (error != 0) + free(priv, M_IIC); + + return (error); } -static int -iicclose(struct cdev *dev, int flags, int fmt, struct thread *td) +static void +iicdtor(void *data) { - struct iic_softc *sc = dev->si_drv1; + device_t iicdev, parent; + struct iic_cdevpriv *priv; - IIC_LOCK(sc); - if (!sc->sc_count) { - /* XXX: I don't think this can happen. */ - IIC_UNLOCK(sc); - return (EINVAL); - } + priv = data; + KASSERT(priv != NULL, ("iic cdevpriv should not be NULL!")); - sc->sc_count--; + iicdev = priv->sc->sc_dev; + parent = device_get_parent(iicdev); - if (sc->sc_count < 0) - panic("%s: iic_count < 0!", __func__); - IIC_UNLOCK(sc); + if (priv->started) { + iicbus_stop(parent); + iicbus_reset(parent, IIC_UNKNOWN, 0, NULL); + iicbus_release_bus(parent, iicdev); + } - return (0); + sx_destroy(&priv->lock); + free(priv, M_IIC); } static int -iicwrite(struct cdev *dev, struct uio * uio, int ioflag) +iicuio_move(struct iic_cdevpriv *priv, struct uio *uio, int last) { - struct iic_softc *sc = dev->si_drv1; - device_t iicdev = sc->sc_dev; - int sent, error, count; - - IIC_LOCK(sc); - if (!sc->sc_addr) { - IIC_UNLOCK(sc); - return (EINVAL); + device_t parent; + int error, num_bytes, transferred_bytes, written_bytes; + char buffer[128]; + + parent = device_get_parent(priv->sc->sc_dev); + error = 0; + + /* + * We can only transfer up to sizeof(buffer) bytes in 1 shot, so loop until + * everything has been transferred. + */ + while ((error == 0) && (uio->uio_resid > 0)) { + + num_bytes = MIN(uio->uio_resid, sizeof(buffer)); + transferred_bytes = 0; + + if (uio->uio_rw == UIO_WRITE) { + error = uiomove(buffer, num_bytes, uio); + + while ((error == 0) && (transferred_bytes < num_bytes)) { + written_bytes = 0; + error = iicbus_write(parent, &buffer[transferred_bytes], + num_bytes - transferred_bytes, &written_bytes, 0); + transferred_bytes += written_bytes; + } + + } else if (uio->uio_rw == UIO_READ) { + error = iicbus_read(parent, buffer, + num_bytes, &transferred_bytes, + ((uio->uio_resid <= sizeof(buffer)) ? last : 0), 0); + if (error == 0) + error = uiomove(buffer, transferred_bytes, uio); + } } - if (sc->sc_count == 0) { - /* XXX: I don't think this can happen. */ - IIC_UNLOCK(sc); - return (EINVAL); - } + return (error); +} - error = iicbus_request_bus(device_get_parent(iicdev), iicdev, - IIC_DONTWAIT); - if (error) { - IIC_UNLOCK(sc); +static int +iicuio(struct cdev *dev, struct uio *uio, int ioflag) +{ + device_t parent; + struct iic_cdevpriv *priv; + int error; + uint8_t addr; + + priv = NULL; + error = devfs_get_cdevpriv((void**)&priv); + + if (error != 0) return (error); + KASSERT(priv != NULL, ("iic cdevpriv should not be NULL!")); + + IIC_LOCK(priv); + if (priv->started || (priv->addr == 0)) { + IIC_UNLOCK(priv); + return (ENXIO); } + parent = device_get_parent(priv->sc->sc_dev); - count = min(uio->uio_resid, BUFSIZE); - error = uiomove(sc->sc_buffer, count, uio); - if (error) { - IIC_UNLOCK(sc); + error = iicbus_request_bus(parent, priv->sc->sc_dev, + (ioflag & O_NONBLOCK) ? IIC_DONTWAIT : (IIC_WAIT | IIC_INTR)); + if (error != 0) { + IIC_UNLOCK(priv); return (error); } - error = iicbus_block_write(device_get_parent(iicdev), sc->sc_addr, - sc->sc_buffer, count, &sent); + if (uio->uio_rw == UIO_READ) + addr = priv->addr | LSB; + else + addr = priv->addr & ~LSB; + + error = iicbus_start(parent, addr, 0); + if (error != 0) + { + iicbus_release_bus(parent, priv->sc->sc_dev); + IIC_UNLOCK(priv); + return (error); + } - iicbus_release_bus(device_get_parent(iicdev), iicdev); - IIC_UNLOCK(sc); + error = iicuio_move(priv, uio, IIC_LAST_READ); + iicbus_stop(parent); + iicbus_release_bus(parent, priv->sc->sc_dev); + IIC_UNLOCK(priv); return (error); } static int -iicread(struct cdev *dev, struct uio * uio, int ioflag) +iicrdwr(struct iic_cdevpriv *priv, struct iic_rdwr_data *d, int flags) { - struct iic_softc *sc = dev->si_drv1; - device_t iicdev = sc->sc_dev; - int len, error = 0; - int bufsize; - - IIC_LOCK(sc); - if (!sc->sc_addr) { - IIC_UNLOCK(sc); - return (EINVAL); - } + struct iic_msg *buf, *m; + void **usrbufs; + device_t iicdev, parent; + int error, i; - if (sc->sc_count == 0) { - /* XXX: I don't think this can happen. */ - IIC_UNLOCK(sc); - return (EINVAL); - } + iicdev = priv->sc->sc_dev; + parent = device_get_parent(iicdev); + error = 0; - error = iicbus_request_bus(device_get_parent(iicdev), iicdev, - IIC_DONTWAIT); - if (error) { - IIC_UNLOCK(sc); - return (error); - } + buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_IIC, M_WAITOK); - /* max amount of data to read */ - len = min(uio->uio_resid, BUFSIZE); + error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs); - error = iicbus_block_read(device_get_parent(iicdev), sc->sc_addr, - sc->sc_inbuf, len, &bufsize); - if (error) { - IIC_UNLOCK(sc); - return (error); + /* Alloc kernel buffers for userland data, copyin write data */ + usrbufs = malloc(sizeof(void *) * d->nmsgs, M_IIC, M_WAITOK | M_ZERO); + + for (i = 0; i < d->nmsgs; i++) { + m = &(buf[i]); + usrbufs[i] = m->buf; + + /* *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Oct 20 21:50: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 B408CA1AC36; Tue, 20 Oct 2015 21:50:28 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 82C021F2E; Tue, 20 Oct 2015 21:50:28 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by iofz202 with SMTP id z202so37756447iof.2; Tue, 20 Oct 2015 14:50:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=+JmxL6D/eLT+QVpywnQQST48AE3GlyNJrGGwY7SVKfY=; b=F18ElgT2BK9+qnMWS1F8ZPysMo01H8yImiefmJ527olR/HAx9uhD1LfCnV3jyGqZKX E8Dk1biZScPZpV9SkwSG5RGw420fXGTggHAsA4Fx4Kah7wJ5Um0RQ4G8u9jcQc/QLZ+u 7MAX/5CFmxEKVrg0HxMfRIrABlbkfW/zZqiMwyfM2NZbYhSliR0ZypMvhDPGw/dfBXwa OzV2a86n5Tya2V+03PSqjkHuG8uW/nuOWEpmu8lHE65T7Zw+YVBJV1Bo1P71XOAlSXDf ybbVEaKy8GUqciTt1FIQSswU3rvJyQv/iWzA8TK9T/4zydrAIoGHcpdVkjn7IY/GLCvY WTkg== X-Received: by 10.107.165.140 with SMTP id o134mr6318892ioe.29.1445377827662; Tue, 20 Oct 2015 14:50:27 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.158.75 with HTTP; Tue, 20 Oct 2015 14:50:08 -0700 (PDT) In-Reply-To: <5626A748.5040101@FreeBSD.org> References: <201510202038.t9KKcKW5064373@repo.freebsd.org> <5626A748.5040101@FreeBSD.org> From: Ed Maste Date: Tue, 20 Oct 2015 17:50:08 -0400 X-Google-Sender-Auth: z5XE5vyoMLsmemZMFhQeJagMHTk Message-ID: Subject: Re: svn commit: r289664 - head/sys/kern To: Bryan Drewery Cc: "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: Tue, 20 Oct 2015 21:50:28 -0000 On 20 October 2015 at 16:42, Bryan Drewery wrote: > > I really think we should just do a full revert and recommit in these > cases, and not even a forced commit. Neither this commit or a forced > commit will show in 'svn blame' or even during a bisect. It really just > becomes luck to find the right commit noting the message. IMHO 'svn > blame' is more important than some extra churn in 'svn log' or email. It > does add more steps in 'svn blame' but it ends up giving the right > message more obviously. > > I'm not asking to redo this commit now, but I think we should have a > standard of just recommitting to fix mistakes. This is the approach taken by LLVM and it works well there. You're right that it introduces a bit of churn but I think it's worth the cost. From owner-svn-src-all@freebsd.org Tue Oct 20 21:53: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 CEA6DA1AE2A; Tue, 20 Oct 2015 21:53:37 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::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 9B7CB6AC; Tue, 20 Oct 2015 21:53:37 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by iodv82 with SMTP id v82so37846677iod.0; Tue, 20 Oct 2015 14:53:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=uT7kPULAaOQenFNjjt3ziP08cqXQALm6lmtfy44JRUM=; b=ecKPzJKaaITqJKU+k9vaWCTZHds02jibBmEXpvkLyzNgYQhlPZuKj+9k3e3z9mPGTR VxsxFWgRZwP08k55LYeXsqzkAKZvPalITy1aXopn21tGEYny6MOy9ma0wOwBFUe4TuDr iFvLwht3x0DAVOhzlolE9KSiFUDRmxZPLpxdAtPXUft6CFo5cwKN+C81MHtAJBd9x6/c GwYm3hC0+a6Ri9k7bx1gbDsPB9YSzXU+GqdrawbVEC/vGwXbTp/z/xqUUnQvP0vHVGmY HbXApH2gSaDAUuYEcZ2zNiuHgUFvTW6BuYmq+x7uULy9wCdDGctyK0tiQbdyDFou/7Ii yiQw== MIME-Version: 1.0 X-Received: by 10.107.46.228 with SMTP id u97mr6499010iou.165.1445378017049; Tue, 20 Oct 2015 14:53:37 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.46.66 with HTTP; Tue, 20 Oct 2015 14:53:36 -0700 (PDT) In-Reply-To: References: <201510130232.t9D2WFo2034264@repo.freebsd.org> Date: Tue, 20 Oct 2015 14:53:36 -0700 X-Google-Sender-Auth: jey7X1-72JbC_qKbrE9tU4OYvuw Message-ID: Subject: Re: svn commit: r289203 - head/usr.sbin/makefs From: Adrian Chadd To: Ed Maste Cc: "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: Tue, 20 Oct 2015 21:53:37 -0000 please absolutely do reassign the option to something that doesn't clash ASAP. -adrian On 20 October 2015 at 12:12, Ed Maste wrote: > On 12 October 2015 at 22:32, Adrian Chadd wrote: >> Author: adrian >> Date: Tue Oct 13 02:32:15 2015 >> New Revision: 289203 >> URL: https://svnweb.freebsd.org/changeset/base/289203 >> >> Log: >> makefs: introduce a new option to specify what to round the resulting >> image up to. >>... >> +.Op Fl r Ar roundup > > Note that NetBSD's makefs already has -r assigned > -r When merging multiple directories replace duplicate files with the > last found. > > We should pick a different option, and push this patch there too. From owner-svn-src-all@freebsd.org Tue Oct 20 22:42: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 0A598A1AA91; Tue, 20 Oct 2015 22:42:49 +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 DCE0914A3; Tue, 20 Oct 2015 22:42:48 +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 CAA53B964; Tue, 20 Oct 2015 18:42:46 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289661 - head/sys/kern Date: Tue, 20 Oct 2015 14:46:18 -0700 Message-ID: <1597934.qIGj71kvt0@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201510202029.t9KKTLK7060975@repo.freebsd.org> References: <201510202029.t9KKTLK7060975@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); Tue, 20 Oct 2015 18:42:46 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 20 Oct 2015 22:42:49 -0000 On Tuesday, October 20, 2015 08:29:21 PM Konstantin Belousov wrote: > Author: kib > Date: Tue Oct 20 20:29:21 2015 > New Revision: 289661 > URL: https://svnweb.freebsd.org/changeset/base/289661 > > Log: > Mark struct thread zone as type-stable. > > When establishing the locking state for several lock types (including > blockable mutexes and sx) failed, locking primitives try to spin while > the owner thread is running. The spinning loop performs the test for > running condition by dereferencing the owner->td_state field of the > owner thread. If the owner thread exited while spinner was put off > the processor, it is harmless to access reused struct thread owner, > since in some near future the current processor would notice the owner > change and make appropriate progress. But it could be that the page > which carried the freed struct thread was unmapped, then we fault > (this cannot happen on amd64). > > For now, disallowing free of the struct thread seems to be good > enough, and tests which create a lot of threads once, did not > demonstrated regressions. > > Reviewed by: jhb, pho > Reported and tested by: pho > Sponsored by: The FreeBSD Foundation > MFC after: 2 weeks > Differential revision: https://reviews.freebsd.org/D3908 PR: 65448 -- John Baldwin From owner-svn-src-all@freebsd.org Tue Oct 20 23:48: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 04EF8A15CA1; Tue, 20 Oct 2015 23:48:16 +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 B4FA31456; Tue, 20 Oct 2015 23:48:15 +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 t9KNmEu0029665; Tue, 20 Oct 2015 23:48:14 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KNmEAh029662; Tue, 20 Oct 2015 23:48:14 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510202348.t9KNmEAh029662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 23:48:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289667 - 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: Tue, 20 Oct 2015 23:48:16 -0000 Author: cem Date: Tue Oct 20 23:48:14 2015 New Revision: 289667 URL: https://svnweb.freebsd.org/changeset/base/289667 Log: Document cpuset(9) A follow-up to r289467. Coerced by: jhb Sponsored by: EMC / Isilon Storage Division Added: head/share/man/man9/cpuset.9 (contents, props changed) Modified: head/share/man/man9/Makefile head/share/man/man9/bitset.9 Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Tue Oct 20 21:20:34 2015 (r289666) +++ head/share/man/man9/Makefile Tue Oct 20 23:48:14 2015 (r289667) @@ -57,6 +57,7 @@ MAN= accept_filter.9 \ contigmalloc.9 \ copy.9 \ counter.9 \ + cpuset.9 \ cr_cansee.9 \ critical_enter.9 \ cr_seeothergids.9 \ @@ -636,6 +637,31 @@ MLINKS+=counter.9 counter_u64_alloc.9 \ counter.9 counter_u64_add_protected.9 \ counter.9 counter_u64_fetch.9 \ counter.9 counter_u64_zero.9 +MLINKS+=cpuset.9 CPUSET_T_INITIALIZER.9 \ + cpuset.9 CPUSET_FSET.9 \ + cpuset.9 CPU_CLR.9 \ + cpuset.9 CPU_COPY.9 \ + cpuset.9 CPU_ISSET.9 \ + cpuset.9 CPU_SET.9 \ + cpuset.9 CPU_ZERO.9 \ + cpuset.9 CPU_FILL.9 \ + cpuset.9 CPU_SETOF.9 \ + cpuset.9 CPU_EMPTY.9 \ + cpuset.9 CPU_ISFULLSET.9 \ + cpuset.9 CPU_FFS.9 \ + cpuset.9 CPU_COUNT.9 \ + cpuset.9 CPU_SUBSET.9 \ + cpuset.9 CPU_OVERLAP.9 \ + cpuset.9 CPU_CMP.9 \ + cpuset.9 CPU_OR.9 \ + cpuset.9 CPU_AND.9 \ + cpuset.9 CPU_NAND.9 \ + cpuset.9 CPU_CLR_ATOMIC.9 \ + cpuset.9 CPU_SET_ATOMIC.9 \ + cpuset.9 CPU_SET_ATOMIC_ACQ.9 \ + cpuset.9 CPU_AND_ATOMIC.9 \ + cpuset.9 CPU_OR_ATOMIC.9 \ + cpuset.9 CPU_COPY_STORE_REL.9 MLINKS+=critical_enter.9 critical.9 \ critical_enter.9 critical_exit.9 MLINKS+=crypto.9 crypto_dispatch.9 \ Modified: head/share/man/man9/bitset.9 ============================================================================== --- head/share/man/man9/bitset.9 Tue Oct 20 21:20:34 2015 (r289666) +++ head/share/man/man9/bitset.9 Tue Oct 20 23:48:14 2015 (r289667) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 17, 2015 +.Dd October 20, 2015 .Dt BITSET 9 .Os .Sh NAME @@ -352,16 +352,9 @@ myset = BITSET_T_INITIALIZER(BITSET_FSET myset = BITSET_T_INITIALIZER(0x1); .Ed .Sh SEE ALSO -The older -.Xr bitstring 3 . +.Xr bitstring 3 , +.Xr cpuset 9 .Sh HISTORY -.In sys/cpuset.h -first appeared in -.Fx 7.1 , -released in January 2009, and in -.Fx 8.0 , -released in November 2009 . -.Pp The .Nm macros first appeared in @@ -377,11 +370,9 @@ This manual page first appeared in .An -nosplit The .Nm -macros were written for +macros were generalized and pulled out of .In sys/cpuset.h -by -.An Jeff Roberson Aq Mt jeff@FreeBSD.org ; -they were generalized and pulled out as +as .In sys/_bitset.h and .In sys/bitset.h Added: head/share/man/man9/cpuset.9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/cpuset.9 Tue Oct 20 23:48:14 2015 (r289667) @@ -0,0 +1,350 @@ +.\" Copyright (c) 2015 Conrad Meyer +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' +.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE +.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd October 20, 2015 +.Dt CPUSET 9 +.Os +.Sh NAME +.Nm cpuset(9) +\(em +.Nm CPUSET_T_INITIALIZER , +.Nm CPUSET_FSET , +.Nm CPU_CLR , +.Nm CPU_COPY , +.Nm CPU_ISSET , +.Nm CPU_SET , +.Nm CPU_ZERO , +.Nm CPU_FILL , +.Nm CPU_SETOF , +.Nm CPU_EMPTY , +.Nm CPU_ISFULLSET , +.Nm CPU_FFS , +.Nm CPU_COUNT , +.Nm CPU_SUBSET , +.Nm CPU_OVERLAP , +.Nm CPU_CMP , +.Nm CPU_OR , +.Nm CPU_AND , +.Nm CPU_NAND , +.Nm CPU_CLR_ATOMIC , +.Nm CPU_SET_ATOMIC , +.Nm CPU_SET_ATOMIC_ACQ , +.Nm CPU_AND_ATOMIC , +.Nm CPU_OR_ATOMIC , +.Nm CPU_COPY_STORE_REL +.Nd cpuset manipulation macros +.Sh SYNOPSIS +.In sys/_cpuset.h +.In sys/cpuset.h +.\" +.Fn CPUSET_T_INITIALIZER "ARRAY_CONTENTS" +.Vt CPUSET_FSET +.\" +.Fn CPU_CLR "size_t cpu_idx" "cpuset_t *cpuset" +.Fn CPU_COPY "cpuset_t *from" "cpuset_t *to" +.Ft bool +.Fn CPU_ISSET "size_t cpu_idx" "cpuset_t *cpuset" +.Fn CPU_SET "size_t cpu_idx" "cpuset_t *cpuset" +.Fn CPU_ZERO "cpuset_t *cpuset" +.Fn CPU_FILL "cpuset_t *cpuset" +.Fn CPU_SETOF "size_t cpu_idx" "cpuset_t *cpuset" +.Ft bool +.Fn CPU_EMPTY "cpuset_t *cpuset" +.Ft bool +.Fn CPU_ISFULLSET "cpuset_t *cpuset" +.Ft size_t +.Fn CPU_FFS "cpuset_t *cpuset" +.Ft size_t +.Fn CPU_COUNT "cpuset_t *cpuset" +.\" +.Ft bool +.Fn CPU_SUBSET "cpuset_t *haystack" "cpuset_t *needle" +.Ft bool +.Fn CPU_OVERLAP "cpuset_t *cpuset1" "cpuset_t *cpuset2" +.Ft bool +.Fn CPU_CMP "cpuset_t *cpuset1" "cpuset_t *cpuset2" +.Fn CPU_OR "cpuset_t *dst" "cpuset_t *src" +.Fn CPU_AND "cpuset_t *dst" "cpuset_t *src" +.Fn CPU_NAND "cpuset_t *dst" "cpuset_t *src" +.\" +.Fn CPU_CLR_ATOMIC "size_t cpu_idx" "cpuset_t *cpuset" +.Fn CPU_SET_ATOMIC "size_t cpu_idx" "cpuset_t *cpuset" +.Fn CPU_SET_ATOMIC_ACQ "size_t cpu_idx" "cpuset_t *cpuset" +.\" +.Fn CPU_AND_ATOMIC "cpuset_t *dst" "cpuset_t *src" +.Fn CPU_OR_ATOMIC "cpuset_t *dst" "cpuset_t *src" +.Fn CPU_COPY_STORE_REL "cpuset_t *from" "cpuset_t *to" +.Sh DESCRIPTION +The +.Nm +family of macros provide a flexible and efficient CPU set implementation, +backed by the +.Xr bitset 9 +macros. +Each CPU is represented by a single bit. +The maximum number of CPUs representable by +.Vt cpuset_t +is +.Va MAXCPU . +Individual CPUs in cpusets are referenced with indices zero through +.Fa MAXCPU - 1 . +.Pp +The +.Fn CPUSET_T_INITIALIZER +macro allows one to initialize a +.Vt cpuset_t +with a compile time literal value. +.Pp +The +.Fn CPUSET_FSET +macro defines a compile time literal, usable by +.Fn CPUSET_T_INITIALIZER , +representing a full cpuset (all CPUs present). +For examples of +.Fn CPUSET_T_INITIALIZER +and +.Fn CPUSET_FSET +usage, see the +.Sx CPUSET_T_INITIALIZER EXAMPLE +section. +.Pp +The +.Fn CPU_CLR +macro removes CPU +.Fa cpu_idx +from the cpuset pointed to by +.Fa cpuset . +The +.Fn CPU_CLR_ATOMIC +macro is identical, but the bit representing the CPU is cleared with atomic +machine instructions. +.Pp +The +.Fn CPU_COPY +macro copies the contents of the cpuset +.Fa from +to the cpuset +.Fa to . +.Fn CPU_COPY_STORE_REL +is similar, but copies component machine words from +.Fa from +and writes them to +.Fa to +with atomic store with release semantics. +(That is, if +.Fa to +is composed of multiple machine words, +.Fn CPU_COPY_STORE_REL +performs multiple individually atomic operations.) +.Pp +The +.Fn CPU_SET +macro adds CPU +.Fa cpu_idx +to the cpuset pointed to by +.Fa cpuset , +if it is not already present. +The +.Fn CPU_SET_ATOMIC +macro is identical, but the bit representing the CPU is set with atomic +machine instructions. +The +.Fn CPU_SET_ATOMIC_ACQ +macro sets the bit representing the CPU with atomic acquire semantics. +.Pp +The +.Fn CPU_ZERO +macro removes all CPUs from +.Fa cpuset . +.Pp +The +.Fn CPU_FILL +macro adds all CPUs to +.Fa cpuset . +.Pp +The +.Fn CPU_SETOF +macro removes all CPUs in +.Fa cpuset +before adding only CPU +.Fa cpu_idx . +.Pp +The +.Fn CPU_EMPTY +macro returns +.Dv true +if +.Fa cpuset +is empty. +.Pp +The +.Fn CPU_ISFULLSET +macro returns +.Dv true +if +.Fa cpuset +is full (the set of all CPUs). +.Pp +The +.Fn CPU_FFS +macro returns the 1-index of the first (lowest) CPU in +.Fa cpuset , +or zero if +.Fa cpuset +is empty. +Like with +.Xr ffs 3 , +to use the non-zero result of +.Fn CPU_FFS +as a +.Fa cpu_idx +index parameter to any other +.Nm +macro, you must subtract one from the result. +.Pp +The +.Fn CPU_COUNT +macro returns the total number of CPUs in +.Fa cpuset . +.Pp +The +.Fn CPU_SUBSET +macro returns +.Dv true +if +.Fa needle +is a subset of +.Fa haystack . +.Pp +The +.Fn CPU_OVERLAP +macro returns +.Dv true +if +.Fa cpuset1 +and +.Fa cpuset2 +have any common CPUs. +(That is, if +.Fa cpuset1 +AND +.Fa cpuset2 +is not the empty set.) +.Pp +The +.Fn CPU_CMP +macro returns +.Dv true +if +.Fa cpuset1 +is NOT equal to +.Fa cpuset2 . +.Pp +The +.Fn CPU_OR +macro adds CPUs present in +.Fa src +to +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst +|= +.Fa src . ) +.Fn CPU_OR_ATOMIC +is similar, but sets the bits representing CPUs in the component machine words +in +.Fa dst +with atomic machine instructions. +(That is, if +.Fa dst +is composed of multiple machine words, +.Fn CPU_OR_ATOMIC +performs multiple individually atomic operations.) +.Pp +The +.Fn CPU_AND +macro removes CPUs absent from +.Fa src +from +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst +&= +.Fa src . ) +.Fn CPU_AND_ATOMIC +is similar, with the same atomic semantics as +.Fn CPU_OR_ATOMIC . +.Pp +The +.Fn CPU_NAND +macro removes CPUs in +.Fa src +from +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst +&= +.Fa ~ src . ) +.Sh CPUSET_T_INITIALIZER EXAMPLE +.Bd -literal +cpuset_t myset; + +/* Initialize myset to filled (all CPUs) */ +myset = CPUSET_T_INITIALIZER(CPUSET_FSET); + +/* Initialize myset to only the lowest CPU */ +myset = CPUSET_T_INITIALIZER(0x1); +.Ed +.Sh SEE ALSO +.Xr bitset 9 +.Sh HISTORY +.In sys/cpuset.h +first appeared in +.Fx 7.1 , +released in January 2009, and in +.Fx 8.0 , +released in November 2009. +.Pp +This manual page first appeared in +.Fx 11.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +macros were written by +.An Jeff Roberson Aq Mt jeff@FreeBSD.org . +This manual page was written by +.An Conrad Meyer Aq Mt cem@FreeBSD.org . +.Sh CAVEATS +Unlike every other reference to individual set members, which are zero-indexed, +.Fn CPU_FFS +returns a one-indexed result (or zero if the cpuset is empty). From owner-svn-src-all@freebsd.org Tue Oct 20 23:52: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 E8CE0A15FE2; Tue, 20 Oct 2015 23:52:38 +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 999191B27; Tue, 20 Oct 2015 23:52:38 +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 t9KNqbhG032502; Tue, 20 Oct 2015 23:52:37 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9KNqbhH032498; Tue, 20 Oct 2015 23:52:37 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510202352.t9KNqbhH032498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 23:52:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289668 - in head: lib/libc/sys 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: Tue, 20 Oct 2015 23:52:39 -0000 Author: cem Date: Tue Oct 20 23:52:37 2015 New Revision: 289668 URL: https://svnweb.freebsd.org/changeset/base/289668 Log: cpuset.9: Link to/from the new page A follow-up to r289667. Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/sys/cpuset.2 head/lib/libc/sys/cpuset_getaffinity.2 head/share/man/man9/cpuset.9 Modified: head/lib/libc/sys/cpuset.2 ============================================================================== --- head/lib/libc/sys/cpuset.2 Tue Oct 20 23:48:14 2015 (r289667) +++ head/lib/libc/sys/cpuset.2 Tue Oct 20 23:52:37 2015 (r289668) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2015 +.Dd October 20, 2015 .Dt CPUSET 2 .Os .Sh NAME @@ -219,7 +219,8 @@ for allocation. .Xr cpuset_getaffinity 2 , .Xr cpuset_setaffinity 2 , .Xr pthread_affinity_np 3 , -.Xr pthread_attr_affinity_np 3 +.Xr pthread_attr_affinity_np 3 , +.Xr cpuset 9 .Sh HISTORY The .Nm Modified: head/lib/libc/sys/cpuset_getaffinity.2 ============================================================================== --- head/lib/libc/sys/cpuset_getaffinity.2 Tue Oct 20 23:48:14 2015 (r289667) +++ head/lib/libc/sys/cpuset_getaffinity.2 Tue Oct 20 23:52:37 2015 (r289668) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 10, 2010 +.Dd October 20, 2015 .Dt CPUSET_GETAFFINITY 2 .Os .Sh NAME @@ -153,7 +153,8 @@ operation. .Xr cpuset_getid 2 , .Xr cpuset_setid 2 , .Xr pthread_affinity_np 3 , -.Xr pthread_attr_affinity_np 3 +.Xr pthread_attr_affinity_np 3 , +.Xr cpuset 9 .Sh HISTORY The .Nm Modified: head/share/man/man9/cpuset.9 ============================================================================== --- head/share/man/man9/cpuset.9 Tue Oct 20 23:48:14 2015 (r289667) +++ head/share/man/man9/cpuset.9 Tue Oct 20 23:52:37 2015 (r289668) @@ -325,6 +325,8 @@ myset = CPUSET_T_INITIALIZER(CPUSET_FSET myset = CPUSET_T_INITIALIZER(0x1); .Ed .Sh SEE ALSO +.Xr cpuset 1 , +.Xr cpuset 2 , .Xr bitset 9 .Sh HISTORY .In sys/cpuset.h From owner-svn-src-all@freebsd.org Wed Oct 21 00:25: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 55724A1A6E7; Wed, 21 Oct 2015 00:25:19 +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 217B97DC; Wed, 21 Oct 2015 00:25:19 +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 t9L0PIj1042916; Wed, 21 Oct 2015 00:25:18 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9L0PI7L042915; Wed, 21 Oct 2015 00:25:18 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510210025.t9L0PI7L042915@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 21 Oct 2015 00:25:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289669 - 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, 21 Oct 2015 00:25:19 -0000 Author: bdrewery Date: Wed Oct 21 00:25:18 2015 New Revision: 289669 URL: https://svnweb.freebsd.org/changeset/base/289669 Log: Fix building in a directory with SUBDIRs and SUBDIR_PARALLEL. The SUBDIR_PARALLEL feature uses a .for dir in ${SUBDIR} loop. The old code here for recursing was setting SUBDIR= as a make *argument*. The SUBDIR= replacement was not actually handled until after the .for loop was unrolled. This could be seen with a '.info ${SUBDIR} ${dir}' inside of the loop which showed an empty ${SUBDIR} and a set ${dir}. Setting NO_SUBIDR= before calling ${MAKE} as an *environment* variable handles the case fine and is a more proper mechanism for disabling subdir handling. This could be seen with 'make -C tests/sys/kern -j15 SUBDIR_PARALLEL=yes'. 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 Tue Oct 20 23:52:37 2015 (r289668) +++ head/share/mk/bsd.progs.mk Wed Oct 21 00:25:18 2015 (r289669) @@ -116,16 +116,16 @@ x.$p= PROG_CXX=$p $p ${p}_p: .PHONY .MAKE (cd ${.CURDIR} && \ DEPENDFILE=.depend.$p \ - ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ - SUBDIR= PROG=$p ${x.$p}) + NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ + PROG=$p ${x.$p}) # Pseudo targets for PROG, such as 'install'. .for t in ${PROGS_TARGETS:O:u} $p.$t: .PHONY .MAKE (cd ${.CURDIR} && \ DEPENDFILE=.depend.$p \ - ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ - SUBDIR= PROG=$p ${x.$p} ${@:E}) + NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ + PROG=$p ${x.$p} ${@:E}) .endfor .endfor From owner-svn-src-all@freebsd.org Wed Oct 21 00:35: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 74D2EA1A9E6; Wed, 21 Oct 2015 00:35:50 +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 52001D54; Wed, 21 Oct 2015 00:35:50 +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 6703FB97F; Tue, 20 Oct 2015 20:35:49 -0400 (EDT) From: John Baldwin To: "Conrad E. Meyer" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289667 - head/share/man/man9 Date: Tue, 20 Oct 2015 17:09:32 -0700 Message-ID: <1495320.eY8Pa9M8jn@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201510202348.t9KNmEAh029662@repo.freebsd.org> References: <201510202348.t9KNmEAh029662@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); Tue, 20 Oct 2015 20:35:49 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 00:35:50 -0000 On Tuesday, October 20, 2015 11:48:14 PM Conrad E. Meyer wrote: > Author: cem > Date: Tue Oct 20 23:48:14 2015 > New Revision: 289667 > URL: https://svnweb.freebsd.org/changeset/base/289667 > > Log: > Document cpuset(9) > > A follow-up to r289467. > > Coerced by: jhb > Sponsored by: EMC / Isilon Storage Division Thank you! Writing this has been on my todo list for years. -- John Baldwin From owner-svn-src-all@freebsd.org Wed Oct 21 01:02: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 1D612A190AA; Wed, 21 Oct 2015 01:02:26 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f180.google.com (mail-yk0-f180.google.com [209.85.160.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D8296928; Wed, 21 Oct 2015 01:02:25 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykaz22 with SMTP id z22so34663545yka.2; Tue, 20 Oct 2015 18:02:24 -0700 (PDT) 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=Mz/Ai4drxOCIVs8guFXvq01a3l3O7hDriWK1JNrjBLA=; b=JR0goLoJkOZP4vN/GgwU5ivW26Qv/laZVwTJllWZ/TUmN8sL7P5jM03DfIguxq/4t/ G37Ho+5qrEPRRF56PYt/9DXZrmMAR8pWusK881SCREkv+9qh91pbktA4tW5TnORJNTpQ Kd6oXRXgSxtEp9m0gMTPqiKbxUKNCS1tB/DkW32uJUsBhjyXyNetxKjjyBCRqYRfwXE3 mL1K0UFk/dTdoqSVpTj3DNLu2ushf9eilyZIWtsPK7FqjhICf6gwgT3zrFHQzhqfQJez w9mxNzkuz9htpYnMe0tnUiHdRsw2Oaou8DHnW8PLUHMo1ZRS+xaQkZVd6DGAvZg0UOHw oqWw== X-Received: by 10.129.155.130 with SMTP id s124mr2821405ywg.68.1445389344114; Tue, 20 Oct 2015 18:02:24 -0700 (PDT) Received: from mail-yk0-f180.google.com (mail-yk0-f180.google.com. [209.85.160.180]) by smtp.gmail.com with ESMTPSA id c5sm3833345ywf.12.2015.10.20.18.02.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Oct 2015 18:02:24 -0700 (PDT) Received: by ykdr3 with SMTP id r3so34554604ykd.1; Tue, 20 Oct 2015 18:02:23 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.13.213.141 with SMTP id x135mr4455425ywd.43.1445389343731; Tue, 20 Oct 2015 18:02:23 -0700 (PDT) Reply-To: cem@FreeBSD.org Received: by 10.37.203.75 with HTTP; Tue, 20 Oct 2015 18:02:23 -0700 (PDT) In-Reply-To: <1495320.eY8Pa9M8jn@ralph.baldwin.cx> References: <201510202348.t9KNmEAh029662@repo.freebsd.org> <1495320.eY8Pa9M8jn@ralph.baldwin.cx> Date: Tue, 20 Oct 2015 18:02:23 -0700 Message-ID: Subject: Re: svn commit: r289667 - head/share/man/man9 From: Conrad Meyer To: John Baldwin Cc: 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: Wed, 21 Oct 2015 01:02:26 -0000 On Tue, Oct 20, 2015 at 5:09 PM, John Baldwin wrote: > On Tuesday, October 20, 2015 11:48:14 PM Conrad E. Meyer wrote: >> Author: cem >> Date: Tue Oct 20 23:48:14 2015 >> New Revision: 289667 >> URL: https://svnweb.freebsd.org/changeset/base/289667 >> >> Log: >> Document cpuset(9) >> >> A follow-up to r289467. >> >> Coerced by: jhb >> Sponsored by: EMC / Isilon Storage Division > > Thank you! Writing this has been on my todo list for years. You're welcome :). I didn't proofread this especially thoroughly, so if you want to do a pass for grammar, errors, or additions, please do! Thanks, Conrad From owner-svn-src-all@freebsd.org Wed Oct 21 01:02: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 840C8A190DC; Wed, 21 Oct 2015 01:02:32 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.strugglingcoder.info", Issuer "mail.strugglingcoder.info" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 619719DC; Wed, 21 Oct 2015 01:02:31 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id E126310A6BF; Tue, 20 Oct 2015 18:02:24 -0700 (PDT) Date: Tue, 20 Oct 2015 18:02:24 -0700 From: hiren panchasara To: "Conrad E. Meyer" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289667 - head/share/man/man9 Message-ID: <20151021010224.GC28288@strugglingcoder.info> References: <201510202348.t9KNmEAh029662@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yVhtmJPUSI46BTXb" Content-Disposition: inline In-Reply-To: <201510202348.t9KNmEAh029662@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, 21 Oct 2015 01:02:32 -0000 --yVhtmJPUSI46BTXb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 10/20/15 at 11:48P, Conrad E. Meyer wrote: > Author: cem > Date: Tue Oct 20 23:48:14 2015 > New Revision: 289667 > URL: https://svnweb.freebsd.org/changeset/base/289667 >=20 > Log: > Document cpuset(9) > =20 > A follow-up to r289467. > =20 > Coerced by: jhb > Sponsored by: EMC / Isilon Storage Division Thanks a lot! Cheers, Hiren --yVhtmJPUSI46BTXb Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJWJuQdXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lBNMH/i+oExE1TMaZHL0VDdcvzXy5 QYDsNv7uWXEJ1ZjTdJxGGR6e0mqXkMsCP/r5nCZGNnQduGBePF0TuskxB1mEue+p YqTUR8+JwvODz9cLIfHbIBkn4vDbmodxW2ygdT+yj3HHvzGjk/Z0nG0RZ4agETaR enEzTT68rscDl/0GSeQeF+PnDbGtyIdQXs1FpzJHlhUEOSKB23QgoUcoUZQVy7PD SlhfUL+d3W4nVoQdD8Dr9cm13P+HHUvhPkRrlbjuDOuLu+YQ+fGUo7fzHKHvgwA6 OopcbhaJJk2BI5K+wetfF9QJhNwpXEsVlAr7yjY370HiX338w77yulKqYNyrl/s= =uUms -----END PGP SIGNATURE----- --yVhtmJPUSI46BTXb-- From owner-svn-src-all@freebsd.org Wed Oct 21 01:34: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 99136A19808; Wed, 21 Oct 2015 01:34:52 +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 4BFE67F6; Wed, 21 Oct 2015 01:34:52 +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 t9L1YpiZ066330; Wed, 21 Oct 2015 01:34:51 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9L1YpFT066329; Wed, 21 Oct 2015 01:34:51 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510210134.t9L1YpFT066329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 21 Oct 2015 01:34:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289670 - head/gnu/usr.bin/groff/src/devices/xditview X-SVN-Group: head MIME-Version: 1.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, 21 Oct 2015 01:34:52 -0000 Author: bdrewery Date: Wed Oct 21 01:34:51 2015 New Revision: 289670 URL: https://svnweb.freebsd.org/changeset/base/289670 Log: Remove disconnected xditview. Deleted: head/gnu/usr.bin/groff/src/devices/xditview/ From owner-svn-src-all@freebsd.org Wed Oct 21 01:41: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 1BE0EA19994; Wed, 21 Oct 2015 01:41: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 E5684ABD; Wed, 21 Oct 2015 01:41:19 +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 t9L1fIZc069353; Wed, 21 Oct 2015 01:41:18 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9L1fIxY069352; Wed, 21 Oct 2015 01:41:18 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510210141.t9L1fIxY069352@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 21 Oct 2015 01:41:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289671 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 01:41:20 -0000 Author: adrian Date: Wed Oct 21 01:41:18 2015 New Revision: 289671 URL: https://svnweb.freebsd.org/changeset/base/289671 Log: arge: don't do the rx fixup copy and just offset the mbuf by 2 bytes The existing code meets the "alignment" requirement for the l3 payload by offsetting the mbuf by uint64_t and then calling an rx fixup routine to copy the frame backwards by 2 bytes. This DWORD aligns the L3 payload so tcp, etc doesn't panic on unaligned access. This is .. slow. For arge MACs that support 1 byte TX/RX address alignment, we can do the "other" hack: offset the RX address of the mbuf so the L3 payload again is hopefully DWORD aligned. This is much cheaper - since TX/RX is both 1 byte align ready (thanks to the previous commit) there's no bounce buffering going on and there is no rx fixup copying. This gets bridging performance up from 180mbit/sec -> 410mbit/sec. There's around 10% of CPU cycles spent in _bus_dmamap_sync(); I'll investigate that later. Tested: * QCA955x SoC (AP135 reference board), bridging arge0/arge1 by programming the switch to have two vlangroups in dot1q mode: # ifconfig bridge0 inet 192.168.2.20/24 # etherswitchcfg config vlan_mode dot1q # etherswitchcfg vlangroup0 members 0,1,2,3,4 # etherswitchcfg vlangroup1 vlan 2 members 5,6 # etherswitchcfg port5 pvid 2 # etherswitchcfg port6 pvid 2 # ifconfig arge1 up # ifconfig bridge0 addm arge1 Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Wed Oct 21 01:34:51 2015 (r289670) +++ head/sys/mips/atheros/if_arge.c Wed Oct 21 01:41:18 2015 (r289671) @@ -2165,6 +2165,7 @@ arge_newbuf(struct arge_softc *sc, int i bus_dmamap_t map; int nsegs; + /* XXX TODO: should just allocate an explicit 2KiB buffer */ m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) return (ENOBUFS); @@ -2174,7 +2175,15 @@ arge_newbuf(struct arge_softc *sc, int i * Add extra space to "adjust" (copy) the packet back to be aligned * for purposes of IPv4/IPv6 header contents. */ - m_adj(m, sizeof(uint64_t)); + if (sc->arge_hw_flags & ARGE_HW_FLG_RX_DESC_ALIGN_4BYTE) + m_adj(m, sizeof(uint64_t)); + /* + * If it's a 1-byte aligned buffer, then just offset it two bytes + * and that will give us a hopefully correctly DWORD aligned + * L3 payload - and we won't have to undo it afterwards. + */ + else if (sc->arge_hw_flags & ARGE_HW_FLG_RX_DESC_ALIGN_1BYTE) + m_adj(m, sizeof(uint16_t)); if (bus_dmamap_load_mbuf_sg(sc->arge_cdata.arge_rx_tag, sc->arge_cdata.arge_rx_sparemap, m, segs, &nsegs, 0) != 0) { @@ -2186,6 +2195,11 @@ arge_newbuf(struct arge_softc *sc, int i rxd = &sc->arge_cdata.arge_rxdesc[idx]; if (rxd->rx_m != NULL) { bus_dmamap_unload(sc->arge_cdata.arge_rx_tag, rxd->rx_dmamap); + /* XXX TODO: free rx_m? */ + device_printf(sc->arge_dev, + "%s: ring[%d] rx_m wasn't free?\n", + __func__, + idx); } map = rxd->rx_dmamap; rxd->rx_dmamap = sc->arge_cdata.arge_rx_sparemap; @@ -2205,6 +2219,13 @@ arge_newbuf(struct arge_softc *sc, int i return (0); } +/* + * Move the data backwards 16 bits to (hopefully!) ensure the + * IPv4/IPv6 payload is aligned. + * + * This is required for earlier hardware where the RX path + * requires DWORD aligned buffers. + */ static __inline void arge_fixup_rx(struct mbuf *m) { @@ -2344,7 +2365,13 @@ arge_rx_locked(struct arge_softc *sc) BUS_DMASYNC_POSTREAD); m = rxd->rx_m; - arge_fixup_rx(m); + /* + * If the MAC requires 4 byte alignment then the RX setup + * routine will have pre-offset things; so un-offset it here. + */ + if (sc->arge_hw_flags & ARGE_HW_FLG_RX_DESC_ALIGN_4BYTE) + arge_fixup_rx(m); + m->m_pkthdr.rcvif = ifp; /* Skip 4 bytes of CRC */ m->m_pkthdr.len = m->m_len = packet_len - ETHER_CRC_LEN; From owner-svn-src-all@freebsd.org Wed Oct 21 01:41: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 36036A199BB; Wed, 21 Oct 2015 01:41:24 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2734AF3; Wed, 21 Oct 2015 01:41:23 +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 t9L1fMaj069399; Wed, 21 Oct 2015 01:41:22 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9L1fMYH069398; Wed, 21 Oct 2015 01:41:22 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510210141.t9L1fMYH069398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 21 Oct 2015 01:41:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289672 - stable/10/sys/compat/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 01:41:24 -0000 Author: bdrewery Date: Wed Oct 21 01:41:22 2015 New Revision: 289672 URL: https://svnweb.freebsd.org/changeset/base/289672 Log: MFC r288994: Remove redundant RFFPWAIT/vfork(2) handling in Linux fork(2) and clone(2) wrappers. Modified: stable/10/sys/compat/linux/linux_fork.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_fork.c ============================================================================== --- stable/10/sys/compat/linux/linux_fork.c Wed Oct 21 01:41:18 2015 (r289671) +++ stable/10/sys/compat/linux/linux_fork.c Wed Oct 21 01:41:22 2015 (r289672) @@ -111,9 +111,8 @@ linux_vfork(struct thread *td, struct li printf(ARGS(vfork, "")); #endif - /* Exclude RFPPWAIT */ - if ((error = fork1(td, RFFDG | RFPROC | RFMEM | RFSTOPPED, 0, &p2, - NULL, 0)) != 0) + if ((error = fork1(td, RFFDG | RFPROC | RFMEM | RFPPWAIT | RFSTOPPED, + 0, &p2, NULL, 0)) != 0) return (error); td->td_retval[0] = p2->p_pid; @@ -122,10 +121,6 @@ linux_vfork(struct thread *td, struct li if (error) return (error); - PROC_LOCK(p2); - p2->p_flag |= P_PPWAIT; - PROC_UNLOCK(p2); - td2 = FIRST_THREAD_IN_PROC(p2); /* @@ -136,12 +131,6 @@ linux_vfork(struct thread *td, struct li sched_add(td2, SRQ_BORING); thread_unlock(td2); - /* wait for the children to exit, ie. emulate vfork */ - PROC_LOCK(p2); - while (p2->p_flag & P_PPWAIT) - cv_wait(&p2->p_pwait, &p2->p_mtx); - PROC_UNLOCK(p2); - return (0); } @@ -203,6 +192,9 @@ linux_clone(struct thread *td, struct li if (args->parent_tidptr == NULL) return (EINVAL); + if (args->flags & LINUX_CLONE_VFORK) + ff |= RFPPWAIT; + error = fork1(td, ff, 0, &p2, NULL, 0); if (error) return (error); @@ -271,12 +263,6 @@ linux_clone(struct thread *td, struct li "stack %p sig = %d"), (int)p2->p_pid, args->stack, exit_signal); #endif - if (args->flags & LINUX_CLONE_VFORK) { - PROC_LOCK(p2); - p2->p_flag |= P_PPWAIT; - PROC_UNLOCK(p2); - } - /* * Make this runnable after we are finished with it. */ @@ -288,13 +274,5 @@ linux_clone(struct thread *td, struct li td->td_retval[0] = p2->p_pid; td->td_retval[1] = 0; - if (args->flags & LINUX_CLONE_VFORK) { - /* wait for the children to exit, ie. emulate vfork */ - PROC_LOCK(p2); - while (p2->p_flag & P_PPWAIT) - cv_wait(&p2->p_pwait, &p2->p_mtx); - PROC_UNLOCK(p2); - } - return (0); } From owner-svn-src-all@freebsd.org Wed Oct 21 01:45: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 07FCAA19B5B; Wed, 21 Oct 2015 01:45:20 +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 ADF24E4B; Wed, 21 Oct 2015 01:45:19 +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 t9L1jIQA069738; Wed, 21 Oct 2015 01:45:18 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9L1jILm069737; Wed, 21 Oct 2015 01:45:18 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510210145.t9L1jILm069737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 21 Oct 2015 01:45:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289673 - stable/9/sys/compat/linux X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 01:45:20 -0000 Author: bdrewery Date: Wed Oct 21 01:45:18 2015 New Revision: 289673 URL: https://svnweb.freebsd.org/changeset/base/289673 Log: MFC r288994: Remove redundant RFFPWAIT/vfork(2) handling in Linux fork(2) and clone(2) wrappers. Modified: stable/9/sys/compat/linux/linux_fork.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/compat/linux/linux_fork.c ============================================================================== --- stable/9/sys/compat/linux/linux_fork.c Wed Oct 21 01:41:22 2015 (r289672) +++ stable/9/sys/compat/linux/linux_fork.c Wed Oct 21 01:45:18 2015 (r289673) @@ -110,9 +110,8 @@ linux_vfork(struct thread *td, struct li printf(ARGS(vfork, "")); #endif - /* Exclude RFPPWAIT */ - if ((error = fork1(td, RFFDG | RFPROC | RFMEM | RFSTOPPED, 0, &p2, - NULL, 0)) != 0) + if ((error = fork1(td, RFFDG | RFPROC | RFMEM | RFPPWAIT | RFSTOPPED, + 0, &p2, NULL, 0)) != 0) return (error); td->td_retval[0] = p2->p_pid; @@ -121,10 +120,6 @@ linux_vfork(struct thread *td, struct li if (error) return (error); - PROC_LOCK(p2); - p2->p_flag |= P_PPWAIT; - PROC_UNLOCK(p2); - td2 = FIRST_THREAD_IN_PROC(p2); /* @@ -135,12 +130,6 @@ linux_vfork(struct thread *td, struct li sched_add(td2, SRQ_BORING); thread_unlock(td2); - /* wait for the children to exit, ie. emulate vfork */ - PROC_LOCK(p2); - while (p2->p_flag & P_PPWAIT) - cv_wait(&p2->p_pwait, &p2->p_mtx); - PROC_UNLOCK(p2); - return (0); } @@ -202,6 +191,9 @@ linux_clone(struct thread *td, struct li if (args->parent_tidptr == NULL) return (EINVAL); + if (args->flags & LINUX_CLONE_VFORK) + ff |= RFPPWAIT; + error = fork1(td, ff, 0, &p2, NULL, 0); if (error) return (error); @@ -270,12 +262,6 @@ linux_clone(struct thread *td, struct li "stack %p sig = %d"), (int)p2->p_pid, args->stack, exit_signal); #endif - if (args->flags & LINUX_CLONE_VFORK) { - PROC_LOCK(p2); - p2->p_flag |= P_PPWAIT; - PROC_UNLOCK(p2); - } - /* * Make this runnable after we are finished with it. */ @@ -287,13 +273,5 @@ linux_clone(struct thread *td, struct li td->td_retval[0] = p2->p_pid; td->td_retval[1] = 0; - if (args->flags & LINUX_CLONE_VFORK) { - /* wait for the children to exit, ie. emulate vfork */ - PROC_LOCK(p2); - while (p2->p_flag & P_PPWAIT) - cv_wait(&p2->p_pwait, &p2->p_mtx); - PROC_UNLOCK(p2); - } - return (0); } From owner-svn-src-all@freebsd.org Wed Oct 21 02:23: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 6D2D3A1A673; Wed, 21 Oct 2015 02:23:51 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-ig0-x230.google.com (mail-ig0-x230.google.com [IPv6:2607:f8b0:4001:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 333ECEC4; Wed, 21 Oct 2015 02:23:51 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by igbkq10 with SMTP id kq10so88859862igb.0; Tue, 20 Oct 2015 19:23:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=cC/fOQh2r8jvNSv2E6K8I9Y+1gdnlpNgeFmWy9k5OhU=; b=Zhm6pzbSQYy9USstTBgOKCwKwSHZEVGkSG4xXdGMPe3dmh7mmXwZzz2L0FCYZdIoQk 6/QjUQf46I2LAsYx8NxzO+Hg7ybeCkHZDkzUqed1fi3ICGxsLcc7cwns5uO9FF8qvjAO wdIlCZ7+bV2o3I1tma3RRT9acfBbzA/GaIcok/Vp4f4zTQZZJdmWfd1A65iOxcHsSc0p whYECgxsSC9fn6rfkBhFFKUl2LrwcmEUzXGmxXCtgX4v5UAqFGp7UH1I1i34dDcD6XsC Qe7if0gTfTOT7I/MIU33r1lK43zzmZHC3BUBs1mh7Hi1M42ojxPreXVLkgf+j6S42+CV SE7A== X-Received: by 10.50.131.234 with SMTP id op10mr24875549igb.58.1445394230168; Tue, 20 Oct 2015 19:23:50 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.158.75 with HTTP; Tue, 20 Oct 2015 19:23:30 -0700 (PDT) In-Reply-To: References: <201510130232.t9D2WFo2034264@repo.freebsd.org> From: Ed Maste Date: Wed, 21 Oct 2015 02:23:30 +0000 X-Google-Sender-Auth: KQQACtSFut4yWL1ApzFbpLoEQoo Message-ID: Subject: Re: svn commit: r289203 - head/usr.sbin/makefs To: Adrian Chadd Cc: "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: Wed, 21 Oct 2015 02:23:51 -0000 On 20 October 2015 at 21:53, Adrian Chadd wrote: > please absolutely do reassign the option to something that doesn't clash ASAP. It's important that we do it soon, but a few more days won't make a difference. I've discussed syncing NetBSD's & FreeBSD's makefs on the NetBSD tech-userlevel list with the hope that we can avoid any new incompatibilities in option letters, and want to figure out how we can sync ours and theirs. From owner-svn-src-all@freebsd.org Wed Oct 21 02:50: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 0D466A1AC0C; Wed, 21 Oct 2015 02:50:24 +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 CB94B19D5; Wed, 21 Oct 2015 02:50:23 +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 t9L2oMcg087204; Wed, 21 Oct 2015 02:50:22 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9L2oMcN087203; Wed, 21 Oct 2015 02:50:22 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201510210250.t9L2oMcN087203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 21 Oct 2015 02:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289674 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.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, 21 Oct 2015 02:50:24 -0000 Author: kevlo Date: Wed Oct 21 02:50:22 2015 New Revision: 289674 URL: https://svnweb.freebsd.org/changeset/base/289674 Log: Switch PCI register reads from using magic numbers to using the names defined in pcireg.h Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Wed Oct 21 01:45:18 2015 (r289673) +++ head/sys/dev/iwn/if_iwn.c Wed Oct 21 02:50:22 2015 (r289674) @@ -6280,8 +6280,8 @@ iwn_set_pslevel(struct iwn_softc *sc, in if (level == 5) cmd.flags |= htole16(IWN_PS_FAST_PD); /* Retrieve PCIe Active State Power Management (ASPM). */ - reg = pci_read_config(sc->sc_dev, sc->sc_cap_off + 0x10, 1); - if (!(reg & 0x1)) /* L0s Entry disabled. */ + reg = pci_read_config(sc->sc_dev, sc->sc_cap_off + PCIER_LINK_CTL, 4); + if (!(reg & PCIEM_LINK_CTL_ASPMC_L0S)) /* L0s Entry disabled. */ cmd.flags |= htole16(IWN_PS_PCI_PMGT); cmd.rxtimeout = htole32(pmgt->rxtimeout * 1024); cmd.txtimeout = htole32(pmgt->txtimeout * 1024); @@ -8280,9 +8280,9 @@ iwn_apm_init(struct iwn_softc *sc) IWN_SETBITS(sc, IWN_HW_IF_CONFIG, IWN_HW_IF_CONFIG_HAP_WAKE_L1A); /* Retrieve PCIe Active State Power Management (ASPM). */ - reg = pci_read_config(sc->sc_dev, sc->sc_cap_off + 0x10, 1); + reg = pci_read_config(sc->sc_dev, sc->sc_cap_off + PCIER_LINK_CTL, 4); /* Workaround for HW instability in PCIe L0->L0s->L1 transition. */ - if (reg & 0x02) /* L1 Entry enabled. */ + if (reg & PCIEM_LINK_CTL_ASPMC_L1) /* L1 Entry enabled. */ IWN_SETBITS(sc, IWN_GIO, IWN_GIO_L0S_ENA); else IWN_CLRBITS(sc, IWN_GIO, IWN_GIO_L0S_ENA); From owner-svn-src-all@freebsd.org Wed Oct 21 04:53: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 2C67AA1AEDB; Wed, 21 Oct 2015 04:53:36 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01F3C8CE; Wed, 21 Oct 2015 04:53:35 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9L4rZTO025020; Wed, 21 Oct 2015 04:53:35 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9L4rYek025019; Wed, 21 Oct 2015 04:53:34 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201510210453.t9L4rYek025019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Wed, 21 Oct 2015 04:53:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289675 - 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: Wed, 21 Oct 2015 04:53:36 -0000 Author: jah Date: Wed Oct 21 04:53:34 2015 New Revision: 289675 URL: https://svnweb.freebsd.org/changeset/base/289675 Log: Use pmap_quick* for out-of-context bounce buffers and (limited) cache maintenance of unmapped buffers in armv5 busdma. Tested by: Mattia Rossi Differential Revision: https://reviews.freebsd.org/D3522 Modified: head/sys/arm/arm/busdma_machdep.c Modified: head/sys/arm/arm/busdma_machdep.c ============================================================================== --- head/sys/arm/arm/busdma_machdep.c Wed Oct 21 02:50:22 2015 (r289674) +++ head/sys/arm/arm/busdma_machdep.c Wed Oct 21 04:53:34 2015 (r289675) @@ -124,14 +124,16 @@ struct bounce_page { vm_offset_t vaddr; /* kva of bounce buffer */ bus_addr_t busaddr; /* Physical address */ vm_offset_t datavaddr; /* kva of client data */ - bus_addr_t dataaddr; /* client physical address */ + vm_page_t datapage; /* physical page of client data */ + vm_offset_t dataoffs; /* page offset of client data */ bus_size_t datacount; /* client data count */ STAILQ_ENTRY(bounce_page) links; }; struct sync_list { - vm_offset_t vaddr; /* kva of bounce buffer */ - bus_addr_t busaddr; /* Physical address */ + vm_offset_t vaddr; /* kva of client data */ + vm_page_t pages; /* starting page of client data */ + vm_offset_t dataoffs; /* page offset of client data */ bus_size_t datacount; /* client data count */ }; @@ -197,6 +199,8 @@ static bus_addr_t add_bounce_page(bus_dm vm_offset_t vaddr, bus_addr_t addr, bus_size_t size); static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); +static void bus_dmamap_sync_sl(struct sync_list *sl, bus_dmasync_op_t op, + int bufaligned); /* Default tag, as most drivers provide no parent tag. */ bus_dma_tag_t arm_root_dma_tag; @@ -819,7 +823,8 @@ _bus_dmamap_count_phys(bus_dma_tag_t dma while (buflen != 0) { sgsize = MIN(buflen, dmat->maxsegsz); if (run_filter(dmat, curaddr) != 0) { - sgsize = MIN(sgsize, PAGE_SIZE); + sgsize = MIN(sgsize, + PAGE_SIZE - (curaddr & PAGE_MASK)); map->pagesneeded++; } curaddr += sgsize; @@ -949,8 +954,10 @@ int _bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf, bus_size_t buflen, int flags, bus_dma_segment_t *segs, int *segp) { + struct sync_list *sl; bus_size_t sgsize; bus_addr_t curaddr; + bus_addr_t sl_end = 0; int error; if (segs == NULL) @@ -965,14 +972,35 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat } } + sl = map->slist + map->sync_count - 1; + while (buflen > 0) { curaddr = buf; sgsize = MIN(buflen, dmat->maxsegsz); if (((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) && map->pagesneeded != 0 && run_filter(dmat, curaddr)) { - sgsize = MIN(sgsize, PAGE_SIZE); + sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK)); curaddr = add_bounce_page(dmat, map, 0, curaddr, sgsize); + } else { + if (map->sync_count > 0) + sl_end = VM_PAGE_TO_PHYS(sl->pages) + + sl->dataoffs + sl->datacount; + + if (map->sync_count == 0 || curaddr != sl_end) { + if (++map->sync_count > dmat->nsegments) + break; + sl++; + sl->vaddr = 0; + sl->datacount = sgsize; + /* + * PHYS_TO_VM_PAGE() will truncate + * unaligned addresses. + */ + sl->pages = PHYS_TO_VM_PAGE(curaddr); + sl->dataoffs = curaddr & PAGE_MASK; + } else + sl->datacount += sgsize; } sgsize = _bus_dmamap_addseg(dmat, map, curaddr, sgsize, segs, segp); @@ -1013,8 +1041,11 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm { bus_size_t sgsize; bus_addr_t curaddr; + bus_addr_t sl_pend = 0; struct sync_list *sl; + vm_offset_t kvaddr; vm_offset_t vaddr = (vm_offset_t)buf; + vm_offset_t sl_vend = 0; int error = 0; if (segs == NULL) @@ -1033,21 +1064,25 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm CTR3(KTR_BUSDMA, "lowaddr= %d boundary= %d, " "alignment= %d", dmat->lowaddr, dmat->boundary, dmat->alignment); + sl = map->slist + map->sync_count - 1; + while (buflen > 0) { /* * Get the physical address for this segment. */ if (__predict_true(pmap == kernel_pmap)) { curaddr = pmap_kextract(vaddr); + kvaddr = vaddr; } else { curaddr = pmap_extract(pmap, vaddr); map->flags &= ~DMAMAP_COHERENT; + kvaddr = 0; } /* * Compute the segment size, and adjust counts. */ - sgsize = PAGE_SIZE - ((u_long)curaddr & PAGE_MASK); + sgsize = PAGE_SIZE - (curaddr & PAGE_MASK); if (sgsize > dmat->maxsegsz) sgsize = dmat->maxsegsz; if (buflen < sgsize) @@ -1055,18 +1090,30 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm if (((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) && map->pagesneeded != 0 && run_filter(dmat, curaddr)) { - curaddr = add_bounce_page(dmat, map, vaddr, curaddr, + curaddr = add_bounce_page(dmat, map, kvaddr, curaddr, sgsize); } else { - sl = &map->slist[map->sync_count - 1]; + if (map->sync_count > 0) { + sl_pend = VM_PAGE_TO_PHYS(sl->pages) + + sl->dataoffs + sl->datacount; + sl_vend = sl->vaddr + sl->datacount; + } + if (map->sync_count == 0 || - vaddr != sl->vaddr + sl->datacount) { + (kvaddr != 0 && kvaddr != sl_vend) || + (kvaddr == 0 && curaddr != sl_pend)) { + if (++map->sync_count > dmat->nsegments) goto cleanup; sl++; - sl->vaddr = vaddr; + sl->vaddr = kvaddr; sl->datacount = sgsize; - sl->busaddr = curaddr; + /* + * PHYS_TO_VM_PAGE() will truncate + * unaligned addresses. + */ + sl->pages = PHYS_TO_VM_PAGE(curaddr); + sl->dataoffs = curaddr & PAGE_MASK; } else sl->datacount += sgsize; } @@ -1198,18 +1245,66 @@ bus_dmamap_sync_buf(vm_offset_t buf, int } static void +bus_dmamap_sync_sl(struct sync_list *sl, bus_dmasync_op_t op, + int bufaligned) +{ + vm_offset_t tempvaddr; + vm_page_t curpage; + size_t npages; + + if (sl->vaddr != 0) { + bus_dmamap_sync_buf(sl->vaddr, sl->datacount, op, bufaligned); + return; + } + + tempvaddr = 0; + npages = atop(round_page(sl->dataoffs + sl->datacount)); + + for (curpage = sl->pages; curpage != sl->pages + npages; ++curpage) { + /* + * If the page is mapped to some other VA that hasn't + * been supplied to busdma, then pmap_quick_enter_page() + * will find all duplicate mappings and mark them + * uncacheable. + * That will also do any necessary wb/inv. Otherwise, + * if the page is truly unmapped, then we don't actually + * need to do cache maintenance. + * XXX: May overwrite DMA'ed data in the POSTREAD + * case where the CPU has written to a cacheline not + * completely covered by the DMA region. + */ + KASSERT(VM_PAGE_TO_PHYS(curpage) == VM_PAGE_TO_PHYS(sl->pages) + + ptoa(curpage - sl->pages), + ("unexpected vm_page_t phys: 0x%08x != 0x%08x", + VM_PAGE_TO_PHYS(curpage), VM_PAGE_TO_PHYS(sl->pages) + + ptoa(curpage - sl->pages))); + tempvaddr = pmap_quick_enter_page(curpage); + pmap_quick_remove_page(tempvaddr); + } +} + +static void _bus_dmamap_sync_bp(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) { struct bounce_page *bpage; + vm_offset_t datavaddr, tempvaddr; + + if ((op & (BUS_DMASYNC_PREWRITE | BUS_DMASYNC_POSTREAD)) == 0) + return; STAILQ_FOREACH(bpage, &map->bpages, links) { + tempvaddr = 0; + datavaddr = bpage->datavaddr; if (op & BUS_DMASYNC_PREWRITE) { - if (bpage->datavaddr != 0) - bcopy((void *)bpage->datavaddr, - (void *)bpage->vaddr, bpage->datacount); - else - physcopyout(bpage->dataaddr, - (void *)bpage->vaddr,bpage->datacount); + if (datavaddr == 0) { + tempvaddr = + pmap_quick_enter_page(bpage->datapage); + datavaddr = tempvaddr | bpage->dataoffs; + } + bcopy((void *)datavaddr, + (void *)bpage->vaddr, bpage->datacount); + if (tempvaddr != 0) + pmap_quick_remove_page(tempvaddr); cpu_dcache_wb_range(bpage->vaddr, bpage->datacount); cpu_l2cache_wb_range(bpage->vaddr, bpage->datacount); dmat->bounce_zone->total_bounced++; @@ -1217,12 +1312,15 @@ _bus_dmamap_sync_bp(bus_dma_tag_t dmat, if (op & BUS_DMASYNC_POSTREAD) { cpu_dcache_inv_range(bpage->vaddr, bpage->datacount); cpu_l2cache_inv_range(bpage->vaddr, bpage->datacount); - if (bpage->datavaddr != 0) - bcopy((void *)bpage->vaddr, - (void *)bpage->datavaddr, bpage->datacount); - else - physcopyin((void *)bpage->vaddr, - bpage->dataaddr, bpage->datacount); + if (datavaddr == 0) { + tempvaddr = + pmap_quick_enter_page(bpage->datapage); + datavaddr = tempvaddr | bpage->dataoffs; + } + bcopy((void *)bpage->vaddr, + (void *)datavaddr, bpage->datacount); + if (tempvaddr != 0) + pmap_quick_remove_page(tempvaddr); dmat->bounce_zone->total_bounced++; } } @@ -1245,8 +1343,7 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus if (map->sync_count) { end = &map->slist[map->sync_count]; for (sl = &map->slist[0]; sl != end; sl++) - bus_dmamap_sync_buf(sl->vaddr, sl->datacount, op, - bufaligned); + bus_dmamap_sync_sl(sl, op, bufaligned); } drain: @@ -1444,7 +1541,9 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ bpage->busaddr |= addr & PAGE_MASK; } bpage->datavaddr = vaddr; - bpage->dataaddr = addr; + /* PHYS_TO_VM_PAGE() will truncate unaligned addresses. */ + bpage->datapage = PHYS_TO_VM_PAGE(addr); + bpage->dataoffs = addr & PAGE_MASK; bpage->datacount = size; STAILQ_INSERT_TAIL(&(map->bpages), bpage, links); return (bpage->busaddr); From owner-svn-src-all@freebsd.org Wed Oct 21 05:33: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 4B1B6A1AA21; Wed, 21 Oct 2015 05:33:49 +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 24959A87; Wed, 21 Oct 2015 05:33:49 +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 t9L5XmPd036210; Wed, 21 Oct 2015 05:33:48 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9L5Xmqn036209; Wed, 21 Oct 2015 05:33:48 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510210533.t9L5Xmqn036209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 21 Oct 2015 05:33:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289676 - 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: Wed, 21 Oct 2015 05:33:49 -0000 Author: bdrewery Date: Wed Oct 21 05:33:48 2015 New Revision: 289676 URL: https://svnweb.freebsd.org/changeset/base/289676 Log: Add some missing '+', .MAKE, and .PHONY modifiers. Some of these targets were lacking both .MAKE and a '+'. Others were just inconsistent. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Oct 21 04:53:34 2015 (r289675) +++ head/Makefile.inc1 Wed Oct 21 05:33:48 2015 (r289676) @@ -513,7 +513,7 @@ KMAKE= ${KMAKEENV} ${MAKE} ${.MAKEFLAGS # Attempt to rebuild the entire system, with reasonable chance of # success, regardless of how old your existing system is. # -_worldtmp: +_worldtmp: .PHONY .if ${.CURDIR:C/[^,]//g} != "" # The m4 build of sendmail files doesn't like it if ',' is used # anywhere in the path of it's files. @@ -653,7 +653,7 @@ everything: @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${WMAKE} par-all .if defined(LIB32TMP) -build32: +build32: .PHONY @echo @echo "--------------------------------------------------------------" @echo ">>> stage 5.1: building 32 bit shim libraries" @@ -674,54 +674,55 @@ build32: mkdir -p ${WORLDTMP} ln -sf ${.CURDIR}/sys ${WORLDTMP} .for _t in obj includes - cd ${.CURDIR}/include; ${LIB32WMAKE} DIRPRFX=include/ ${_t} - cd ${.CURDIR}/lib; ${LIB32WMAKE} DIRPRFX=lib/ ${_t} + ${_+_}cd ${.CURDIR}/include; ${LIB32WMAKE} DIRPRFX=include/ ${_t} + ${_+_}cd ${.CURDIR}/lib; ${LIB32WMAKE} DIRPRFX=lib/ ${_t} .if ${MK_CDDL} != "no" - cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} DIRPRFX=cddl/lib/ ${_t} + ${_+_}cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} DIRPRFX=cddl/lib/ ${_t} .endif - cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} DIRPRFX=gnu/lib/ ${_t} + ${_+_}cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} DIRPRFX=gnu/lib/ ${_t} .if ${MK_CRYPT} != "no" - cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} DIRPRFX=secure/lib/ ${_t} + ${_+_}cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} DIRPRFX=secure/lib/ ${_t} .endif .if ${MK_KERBEROS} != "no" - cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} DIRPRFX=kerberos5/lib ${_t} + ${_+_}cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} DIRPRFX=kerberos5/lib ${_t} .endif .endfor .for _dir in usr.bin/lex/lib - cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} DIRPRFX=${_dir}/ obj + ${_+_}cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} DIRPRFX=${_dir}/ obj .endfor .for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic - cd ${.CURDIR}/${_dir}; \ + ${_+_}cd ${.CURDIR}/${_dir}; \ WORLDTMP=${WORLDTMP} \ MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \ MAKEOBJDIRPREFIX=${LIB32_OBJTREE} ${MAKE} SSP_CFLAGS= DESTDIR= \ DIRPRFX=${_dir}/ -DNO_LINT -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ build-tools .endfor - cd ${.CURDIR}; \ + ${_+_}cd ${.CURDIR}; \ ${LIB32WMAKE} -f Makefile.inc1 libraries .for _t in obj depend all - cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} \ + ${_+_}cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} \ DIRPRFX=libexec/rtld-elf/ ${_t} - cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} \ + ${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} \ DIRPRFX=usr.bin/ldd ${_t} .endfor -distribute32 install32: - cd ${.CURDIR}/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} +distribute32 install32: .MAKE .PHONY + ${_+_}cd ${.CURDIR}/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .if ${MK_CDDL} != "no" - cd ${.CURDIR}/cddl/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} + ${_+_}cd ${.CURDIR}/cddl/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .endif - cd ${.CURDIR}/gnu/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} + ${_+_}cd ${.CURDIR}/gnu/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .if ${MK_CRYPT} != "no" - cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} + ${_+_}cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .endif .if ${MK_KERBEROS} != "no" - cd ${.CURDIR}/kerberos5/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} + ${_+_}cd ${.CURDIR}/kerberos5/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .endif - cd ${.CURDIR}/libexec/rtld-elf; \ + ${_+_}cd ${.CURDIR}/libexec/rtld-elf; \ PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//} - cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32IMAKE} ${.TARGET:S/32$//} + ${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32IMAKE} \ + ${.TARGET:S/32$//} .endif WMAKE_TGTS= @@ -946,7 +947,7 @@ distributeworld installworld: _installch .endif .endfor -mkdir ${DESTDIR}/${DISTDIR}/base - cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ + ${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ METALOG=${METALOG} ${IMAKE_INSTALL} ${IMAKE_MTREE} \ DISTBASE=/base DESTDIR=${DESTDIR}/${DISTDIR}/base \ LOCAL_MTREE=${LOCAL_MTREE:Q} distrib-dirs @@ -1014,7 +1015,7 @@ packageworld: # and do a 'make reinstall' on the *client* to install new binaries from the # most recent server build. # -reinstall: .MAKE +reinstall: .MAKE .PHONY @echo "--------------------------------------------------------------" @echo ">>> Making hierarchy" @echo "--------------------------------------------------------------" @@ -1029,7 +1030,7 @@ reinstall: .MAKE ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install32 .endif -redistribute: .MAKE +redistribute: .MAKE .PHONY @echo "--------------------------------------------------------------" @echo ">>> Distributing everything" @echo "--------------------------------------------------------------" @@ -1039,12 +1040,12 @@ redistribute: .MAKE DISTRIBUTION=lib32 .endif -distrib-dirs: .MAKE - cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ +distrib-dirs: .MAKE .PHONY + ${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ ${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET} -distribution: .MAKE - cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ +distribution: .MAKE .PHONY + ${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ ${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET} ${_+_}cd ${.CURDIR}; ${CROSSENV} PATH=${TMPPATH} \ ${MAKE} -f Makefile.inc1 ${IMAKE_INSTALL} \ @@ -1097,14 +1098,14 @@ INSTALLKERNEL= ${_kernel} .endif .endfor -buildkernel ${WMAKE_TGTS:N_worldtmp:Nbuild32} ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE .PHONY +${WMAKE_TGTS:N_worldtmp:Nbuild32} ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE .PHONY # # buildkernel # # Builds all kernels defined by BUILDKERNELS. # -buildkernel: +buildkernel: .MAKE .PHONY .if empty(BUILDKERNELS) @echo "ERROR: Missing kernel configuration file(s) (${KERNCONF})."; \ false @@ -1131,14 +1132,14 @@ buildkernel: @echo "--------------------------------------------------------------" @echo ">>> stage 2.1: cleaning up the object tree" @echo "--------------------------------------------------------------" - cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} ${CLEANDIR} + ${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} ${CLEANDIR} .endif .if !defined(NO_KERNELOBJ) @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2.2: rebuilding the object tree" @echo "--------------------------------------------------------------" - cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} obj + ${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} obj .endif @echo @echo "--------------------------------------------------------------" @@ -1150,13 +1151,13 @@ buildkernel: @echo "--------------------------------------------------------------" @echo ">>> stage 3.1: making dependencies" @echo "--------------------------------------------------------------" - cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} depend -DNO_MODULES_OBJ + ${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} depend -DNO_MODULES_OBJ .endif @echo @echo "--------------------------------------------------------------" @echo ">>> stage 3.2: building everything" @echo "--------------------------------------------------------------" - cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} all -DNO_MODULES_OBJ + ${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} all -DNO_MODULES_OBJ @echo "--------------------------------------------------------------" @echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`" @echo "--------------------------------------------------------------" @@ -1257,12 +1258,12 @@ packagekernel: # # Build the API documentation with doxygen # -doxygen: +doxygen: .PHONY @if [ ! -x `/usr/bin/which doxygen` ]; then \ echo "You need doxygen (devel/doxygen) to generate the API documentation of the kernel." | /usr/bin/fmt; \ exit 1; \ fi - cd ${.CURDIR}/tools/kerneldoc/subsys && ${MAKE} obj all + ${_+_}cd ${.CURDIR}/tools/kerneldoc/subsys && ${MAKE} obj all # # update @@ -1587,7 +1588,7 @@ _cc= gnu/usr.bin/cc _usb_tools= sys/boot/usb/tools .endif -cross-tools: .MAKE +cross-tools: .MAKE .PHONY .for _tool in \ ${_clang_libs} \ ${_clang} \ @@ -1626,7 +1627,7 @@ NXBMAKE= ${NXBENV} ${MAKE} \ # For non-clang enabled targets that are still using the in tree gcc # we must build a gperf binary for one instance of its Makefiles. On # clang-enabled systems, the gperf binary is obsolete. -native-xtools: +native-xtools: .PHONY .if ${MK_GCC_BOOTSTRAP} != "no" mkdir -p ${OBJTREE}/gperf_for_gcc/usr/bin ${_+_}@${ECHODIR} "===> ${_gperf} (obj,depend,all,install)"; \ @@ -1713,8 +1714,8 @@ native-xtools: # # hierarchy - ensure that all the needed directories are present # -hierarchy hier: .MAKE - cd ${.CURDIR}/etc && ${HMAKE} distrib-dirs +hierarchy hier: .MAKE .PHONY + ${_+_}cd ${.CURDIR}/etc && ${HMAKE} distrib-dirs # # libraries - build all libraries, and install them under ${DESTDIR}. @@ -1723,8 +1724,8 @@ hierarchy hier: .MAKE # interdependencies (__L) are built automatically by the # ${.CURDIR}/tools/make_libdeps.sh script. # -libraries: .MAKE - cd ${.CURDIR} && \ +libraries: .MAKE .PHONY + ${_+_}cd ${.CURDIR} && \ ${MAKE} -f Makefile.inc1 _prereq_libs && \ ${MAKE} -f Makefile.inc1 _startup_libs && \ ${MAKE} -f Makefile.inc1 _prebuild_libs && \ @@ -2222,12 +2223,12 @@ xdev: xdev-build xdev-install .ORDER: _xb-worldtmp _xb-bootstrap-tools _xb-build-tools _xb-cross-tools xdev-build: _xb-worldtmp _xb-bootstrap-tools _xb-build-tools _xb-cross-tools -_xb-worldtmp: +_xb-worldtmp: .PHONY mkdir -p ${CDTMP}/usr mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${CDTMP}/usr >/dev/null -_xb-bootstrap-tools: +_xb-bootstrap-tools: .PHONY .for _tool in \ ${_clang_tblgen} \ ${_gperf} @@ -2239,11 +2240,11 @@ _xb-bootstrap-tools: ${CDMAKE} DIRPRFX=${_tool}/ DESTDIR=${CDTMP} install .endfor -_xb-build-tools: +_xb-build-tools: .PHONY ${_+_}@cd ${.CURDIR}; \ ${CDBENV} ${MAKE} -f Makefile.inc1 ${NOFUN} build-tools -_xb-cross-tools: +_xb-cross-tools: .PHONY .for _tool in \ ${_binutils} \ ${_elftctools} \ @@ -2258,7 +2259,7 @@ _xb-cross-tools: ${CDMAKE} DIRPRFX=${_tool}/ all .endfor -_xi-mtree: +_xi-mtree: .PHONY ${_+_}@${ECHODIR} "mtree populating ${XDDESTDIR}" mkdir -p ${XDDESTDIR} mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \ @@ -2280,7 +2281,7 @@ _xi-mtree: .ORDER: xdev-build _xi-mtree _xi-cross-tools _xi-includes _xi-libraries xdev-install: xdev-build _xi-mtree _xi-cross-tools _xi-includes _xi-libraries -_xi-cross-tools: +_xi-cross-tools: .PHONY @echo "_xi-cross-tools" .for _tool in \ ${_binutils} \ @@ -2294,17 +2295,17 @@ _xi-cross-tools: ${CDMAKE} DIRPRFX=${_tool}/ install DESTDIR=${XDDESTDIR} .endfor -_xi-includes: +_xi-includes: .PHONY ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 buildincludes \ DESTDIR=${XDDESTDIR} ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 installincludes \ DESTDIR=${XDDESTDIR} -_xi-libraries: +_xi-libraries: .PHONY ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 libraries \ DESTDIR=${XDDESTDIR} -xdev-links: +xdev-links: .PHONY ${_+_}cd ${XDDESTDIR}/usr/bin; \ mkdir -p ../../../../usr/bin; \ for i in *; do \ From owner-svn-src-all@freebsd.org Wed Oct 21 05:37: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 B1461A1AB02; Wed, 21 Oct 2015 05:37:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 754EFC06; Wed, 21 Oct 2015 05:37:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9L5bEa6036405; Wed, 21 Oct 2015 05:37:14 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9L5bAZ7036358; Wed, 21 Oct 2015 05:37:10 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201510210537.t9L5bAZ7036358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 21 Oct 2015 05:37:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289677 - in head: bin/csh sbin/devd sbin/fsck_ffs sbin/ipfw sbin/natd sbin/newfs_nandfs sbin/rcorder usr.bin/calendar usr.bin/colldef usr.bin/dtc usr.bin/indent usr.bin/locale usr.bin/... X-SVN-Group: head MIME-Version: 1.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, 21 Oct 2015 05:37:15 -0000 Author: eadler Date: Wed Oct 21 05:37:09 2015 New Revision: 289677 URL: https://svnweb.freebsd.org/changeset/base/289677 Log: Fix a ton of speelling errors arc lint is helpful Reviewed By: allanjude, wblock, #manpages, chris@bsdjunk.com Differential Revision: https://reviews.freebsd.org/D3337 Modified: head/bin/csh/config_p.h head/sbin/devd/devd.cc head/sbin/fsck_ffs/fsck.h head/sbin/fsck_ffs/globs.c head/sbin/ipfw/tables.c head/sbin/natd/natd.c head/sbin/newfs_nandfs/newfs_nandfs.c head/sbin/rcorder/rcorder.c head/usr.bin/calendar/parsedata.c head/usr.bin/colldef/parse.y head/usr.bin/dtc/dtb.hh head/usr.bin/indent/indent.1 head/usr.bin/locale/locale.c head/usr.bin/look/look.1 head/usr.bin/mkimg/mkimg.1 head/usr.bin/mt/mt.c head/usr.bin/patch/pch.c head/usr.bin/pr/egetopt.c head/usr.bin/sed/compile.c head/usr.bin/sockstat/sockstat.c head/usr.bin/vgrind/regexp.c head/usr.sbin/bhyve/pci_emul.c head/usr.sbin/bsdconfig/bsdconfig head/usr.sbin/config/config.h head/usr.sbin/ctld/ctld.c head/usr.sbin/fwcontrol/fwmpegts.c head/usr.sbin/jail/command.c head/usr.sbin/jail/jailp.h head/usr.sbin/jail/jailparse.y head/usr.sbin/jls/jls.c head/usr.sbin/makefs/cd9660.c head/usr.sbin/mfiutil/mfiutil.8 head/usr.sbin/nandsim/nandsim.8 head/usr.sbin/nandsim/nandsim.c head/usr.sbin/nandsim/nandsim_cfgparse.c head/usr.sbin/ndp/ndp.c head/usr.sbin/newsyslog/newsyslog.c head/usr.sbin/pmcstudy/eval_expr.c head/usr.sbin/ppp/ip.c head/usr.sbin/ppp/ppp.8 head/usr.sbin/rtsold/rtsold.h head/usr.sbin/uefisign/magic.h head/usr.sbin/uefisign/pe.c head/usr.sbin/ypbind/ypbind.c head/usr.sbin/ypserv/ypinit.sh Modified: head/bin/csh/config_p.h ============================================================================== --- head/bin/csh/config_p.h Wed Oct 21 05:33:48 2015 (r289676) +++ head/bin/csh/config_p.h Wed Oct 21 05:37:09 2015 (r289677) @@ -9,7 +9,7 @@ #ifndef _h_config #define _h_config -/****************** System dependant compilation flags ****************/ +/****************** System dependent compilation flags ****************/ /* * POSIX This system supports IEEE Std 1003.1-1988 (POSIX). */ Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Wed Oct 21 05:33:48 2015 (r289676) +++ head/sbin/devd/devd.cc Wed Oct 21 05:37:09 2015 (r289677) @@ -850,7 +850,7 @@ create_socket(const char *name, int sock return (fd); } -unsigned int max_clients = 10; /* Default, can be overriden on cmdline. */ +unsigned int max_clients = 10; /* Default, can be overridden on cmdline. */ unsigned int num_clients; list clients; Modified: head/sbin/fsck_ffs/fsck.h ============================================================================== --- head/sbin/fsck_ffs/fsck.h Wed Oct 21 05:33:48 2015 (r289676) +++ head/sbin/fsck_ffs/fsck.h Wed Oct 21 05:37:09 2015 (r289677) @@ -301,7 +301,7 @@ extern char snapname[BUFSIZ]; /* when do extern char *cdevname; /* name of device being checked */ extern long dev_bsize; /* computed value of DEV_BSIZE */ extern long secsize; /* actual disk sector size */ -extern u_int real_dev_bsize; /* actual disk sector size, not overriden */ +extern u_int real_dev_bsize; /* actual disk sector size, not overridden */ extern char nflag; /* assume a no response */ extern char yflag; /* assume a yes response */ extern int bkgrdflag; /* use a snapshot to run on an active system */ Modified: head/sbin/fsck_ffs/globs.c ============================================================================== --- head/sbin/fsck_ffs/globs.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/sbin/fsck_ffs/globs.c Wed Oct 21 05:37:09 2015 (r289677) @@ -73,7 +73,7 @@ char snapname[BUFSIZ]; /* when doing sna char *cdevname; /* name of device being checked */ long dev_bsize; /* computed value of DEV_BSIZE */ long secsize; /* actual disk sector size */ -u_int real_dev_bsize; /* actual disk sector size, not overriden */ +u_int real_dev_bsize; /* actual disk sector size, not overridden */ char nflag; /* assume a no response */ char yflag; /* assume a yes response */ int bkgrdflag; /* use a snapshot to run on an active system */ Modified: head/sbin/ipfw/tables.c ============================================================================== --- head/sbin/ipfw/tables.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/sbin/ipfw/tables.c Wed Oct 21 05:37:09 2015 (r289677) @@ -450,7 +450,7 @@ table_create(ipfw_obj_header *oh, int ac } } - /* Set some defaults to preserve compability */ + /* Set some defaults to preserve compatibility. */ if (xi.algoname[0] == '\0' && xi.type == 0) xi.type = IPFW_TABLE_ADDR; if (xi.vmask == 0) @@ -918,7 +918,7 @@ table_modify_record(ipfw_obj_header *oh, tentry_fill_key(oh, ptent, *av, add, &type, &vmask, &xi); /* - * compability layer: auto-create table if not exists + * Compatibility layer: auto-create table if not exists. */ if (xi.tablename[0] == '\0') { xi.type = type; @@ -1387,8 +1387,8 @@ tentry_fill_key(ipfw_obj_header *oh, ipf vmask = xi->vmask; } else { /* - * we're running `ipfw -n` - * Compability layer: try to guess key type + * We're running `ipfw -n` + * Compatibility layer: try to guess key type * before failing. */ if (guess_key_type(key, &type) != 0) { @@ -1407,7 +1407,7 @@ tentry_fill_key(ipfw_obj_header *oh, ipf oh->ntlv.name); /* * Table does not exist - * Compability layer: try to guess key type before failing. + * Compatibility layer: try to guess key type before failing. */ if (guess_key_type(key, &type) != 0) { /* Inknown key */ Modified: head/sbin/natd/natd.c ============================================================================== --- head/sbin/natd/natd.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/sbin/natd/natd.c Wed Oct 21 05:37:09 2015 (r289677) @@ -223,7 +223,7 @@ int main (int argc, char** argv) /* * Create divert sockets. Use only one socket if -p was specified * on command line. Otherwise, create separate sockets for - * outgoing and incoming connnections. + * outgoing and incoming connections. */ if (mip->inOutPort) { Modified: head/sbin/newfs_nandfs/newfs_nandfs.c ============================================================================== --- head/sbin/newfs_nandfs/newfs_nandfs.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/sbin/newfs_nandfs/newfs_nandfs.c Wed Oct 21 05:37:09 2015 (r289677) @@ -1088,7 +1088,7 @@ static void print_summary(void) { - printf("filesystem created succesfully\n"); + printf("filesystem was created successfully\n"); printf("total segments: %#jx valid segments: %#jx\n", nsegments, nsegments - bad_segments_count); printf("total space: %ju MB free: %ju MB\n", Modified: head/sbin/rcorder/rcorder.c ============================================================================== --- head/sbin/rcorder/rcorder.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/sbin/rcorder/rcorder.c Wed Oct 21 05:37:09 2015 (r289677) @@ -220,7 +220,7 @@ strnode_add(strnodelist **listp, char *s /* * below are the functions that deal with creating the lists - * from the filename's given and the dependancies and provisions + * from the filename's given dependencies and provisions * in each of these files. no ordering or checking is done here. */ @@ -696,7 +696,7 @@ keep_ok(filenode *fnode) * * NOTE: do_file() is called recursively from several places and cannot * safely free() anything related to items that may be recursed on. - * Circular dependancies will cause problems if we do. + * Circular dependencies will cause problems if we do. */ static void do_file(filenode *fnode) Modified: head/usr.bin/calendar/parsedata.c ============================================================================== --- head/usr.bin/calendar/parsedata.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.bin/calendar/parsedata.c Wed Oct 21 05:37:09 2015 (r289677) @@ -274,7 +274,7 @@ determinestyle(char *date, int *flags, /* If both the month and date are specified as numbers */ if (isonlydigits(p1, 1) && isonlydigits(p2, 0)) { - /* Now who wants to be this ambigious? :-( */ + /* Now who wants to be this ambiguous? :-( */ int m, d; if (strchr(p2, '*') != NULL) Modified: head/usr.bin/colldef/parse.y ============================================================================== --- head/usr.bin/colldef/parse.y Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.bin/colldef/parse.y Wed Oct 21 05:37:09 2015 (r289677) @@ -134,17 +134,17 @@ order : ORDER order_list { strcpy(__collate_version, COLLATE_VERSION1_2); if (fwrite(__collate_version, sizeof(__collate_version), 1, fp) != 1) err(EX_IOERR, - "IO error writting collate version to destination file %s", + "I/O error writing collate version to destination file %s", out_file); u32 = htonl(chain_index); if (fwrite(&u32, sizeof(u32), 1, fp) != 1) err(EX_IOERR, - "IO error writting chains number to destination file %s", + "I/O error writing chains number to destination file %s", out_file); if (fwrite(__collate_substitute_table, sizeof(__collate_substitute_table), 1, fp) != 1) err(EX_IOERR, - "IO error writting substitute table to destination file %s", + "I/O error writing substitution table to destination file %s", out_file); for (ch = 0; ch < UCHAR_MAX + 1; ch++) { __collate_char_pri_table[ch].prim = @@ -155,7 +155,7 @@ order : ORDER order_list { if (fwrite(__collate_char_pri_table, sizeof(__collate_char_pri_table), 1, fp) != 1) err(EX_IOERR, - "IO error writting char table to destination file %s", + "I/O error writing char table to destination file %s", out_file); for (ch = 0; ch < chain_index; ch++) { __collate_chain_pri_table[ch].prim = @@ -167,10 +167,10 @@ order : ORDER order_list { sizeof(*__collate_chain_pri_table), chain_index, fp) != (size_t)chain_index) err(EX_IOERR, - "IO error writting chain table to destination file %s", + "I/O error writing chain table to destination file %s", out_file); if (fclose(fp) != 0) - err(EX_IOERR, "IO error closing destination file %s", + err(EX_IOERR, "I/O error closing destination file %s", out_file); exit(EX_OK); } Modified: head/usr.bin/dtc/dtb.hh ============================================================================== --- head/usr.bin/dtc/dtb.hh Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.bin/dtc/dtb.hh Wed Oct 21 05:37:09 2015 (r289677) @@ -224,7 +224,7 @@ class asm_writer : public output_writer uint32_t bytes_written; /** - * Writes a C string directly to the ouput as-is. This is mainly used + * Writes a C string directly to the output as-is. This is mainly used * for writing directives. */ void write_string(const char *c); Modified: head/usr.bin/indent/indent.1 ============================================================================== --- head/usr.bin/indent/indent.1 Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.bin/indent/indent.1 Wed Oct 21 05:37:09 2015 (r289677) @@ -518,7 +518,7 @@ The utility understands a substantial amount about the syntax of C, but it has a `forgiving' parser. It attempts to cope with the usual sorts of -incomplete and misformed syntax. +incomplete and malformed syntax. In particular, the use of macros like: .Pp .Dl #define forever for(;;) Modified: head/usr.bin/locale/locale.c ============================================================================== --- head/usr.bin/locale/locale.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.bin/locale/locale.c Wed Oct 21 05:37:09 2015 (r289677) @@ -466,10 +466,10 @@ showlocale(void) && strcmp(lang, vval)) { /* * Appropriate environment variable set, its value - * is valid and not overriden by LC_ALL + * is valid and not overridden by LC_ALL * * XXX: possible side effect: if both LANG and - * overriden environment variable are set into same + * overridden environment variable are set into same * value, then it'll be assumed as 'implied' */ printf("%s=%s\n", lcinfo[i].name, vval); Modified: head/usr.bin/look/look.1 ============================================================================== --- head/usr.bin/look/look.1 Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.bin/look/look.1 Wed Oct 21 05:37:09 2015 (r289677) @@ -108,7 +108,7 @@ The .Fl a and .Fl -alternative -flags are ignored for compability. +flags are ignored for compatibility. .Sh SEE ALSO .Xr grep 1 , .Xr sort 1 Modified: head/usr.bin/mkimg/mkimg.1 ============================================================================== --- head/usr.bin/mkimg/mkimg.1 Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.bin/mkimg/mkimg.1 Wed Oct 21 05:37:09 2015 (r289677) @@ -289,7 +289,7 @@ utility as follows: .Dl % mkimg -s mbr -b /boot/mbr -p freebsd:-'mkimg -s bsd -b /boot/boot \ -p freebsd-ufs:=root-file-system.ufs -p freebsd-swap::1G' -o mbr-bsd.img .Pp -To accomodate the need to have partitions named or numbered in a certain +To accommodate the need to have partitions named or numbered in a certain way, the .Nm utility allows for the specification of empty partitions. Modified: head/usr.bin/mt/mt.c ============================================================================== --- head/usr.bin/mt/mt.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.bin/mt/mt.c Wed Oct 21 05:37:09 2015 (r289677) @@ -1342,7 +1342,7 @@ mt_param(int argc, char **argv, int mtfd break; case 'p': if (param_name != NULL) { - warnx("Only one paramter name may be " + warnx("Only one parameter name may be " "specified"); retval = 1; goto bailout; @@ -1354,7 +1354,7 @@ mt_param(int argc, char **argv, int mtfd break; case 's': if (param_value != NULL) { - warnx("Only one paramter value may be " + warnx("Only one parameter value may be " "specified"); retval = 1; goto bailout; Modified: head/usr.bin/patch/pch.c ============================================================================== --- head/usr.bin/patch/pch.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.bin/patch/pch.c Wed Oct 21 05:37:09 2015 (r289677) @@ -499,7 +499,7 @@ another_hunk(void) LINENUM fillcnt; /* #lines of missing ptrn or repl */ LINENUM fillsrc; /* index of first line to copy */ LINENUM filldst; /* index of first missing line */ - bool ptrn_spaces_eaten; /* ptrn was slightly misformed */ + bool ptrn_spaces_eaten; /* ptrn was slightly malformed */ bool repl_could_be_missing; /* no + or ! lines in this hunk */ bool repl_missing; /* we are now backtracking */ off_t repl_backtrack_position; /* file pos of first repl line */ Modified: head/usr.bin/pr/egetopt.c ============================================================================== --- head/usr.bin/pr/egetopt.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.bin/pr/egetopt.c Wed Oct 21 05:37:09 2015 (r289677) @@ -76,7 +76,7 @@ egetopt(int nargc, char * const *nargv, { static char *place = emsg; /* option letter processing */ char *oli; /* option letter list index */ - static int delim; /* which option delimeter */ + static int delim; /* which option delimiter */ char *p; static char savec = '\0'; Modified: head/usr.bin/sed/compile.c ============================================================================== --- head/usr.bin/sed/compile.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.bin/sed/compile.c Wed Oct 21 05:37:09 2015 (r289677) @@ -364,7 +364,7 @@ nonsel: /* Now parse the command */ } /* - * Get a delimited string. P points to the delimeter of the string; d points + * Get a delimited string. P points to the delimiter of the string; d points * to a buffer area. Newline and delimiter escapes are processed; other * escapes are ignored. * Modified: head/usr.bin/sockstat/sockstat.c ============================================================================== --- head/usr.bin/sockstat/sockstat.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.bin/sockstat/sockstat.c Wed Oct 21 05:37:09 2015 (r289677) @@ -373,7 +373,7 @@ gather_sctp(void) htons(xinpcb->local_port)); break; default: - errx(1, "adress family %d not supported", + errx(1, "address family %d not supported", xladdr->address.sa.sa_family); } laddr->next = NULL; @@ -466,7 +466,7 @@ gather_sctp(void) htons(xstcb->local_port)); break; default: - errx(1, "adress family %d not supported", + errx(1, "address family %d not supported", xladdr->address.sa.sa_family); } laddr->next = NULL; @@ -508,7 +508,7 @@ gather_sctp(void) htons(xstcb->remote_port)); break; default: - errx(1, "adress family %d not supported", + errx(1, "address family %d not supported", xraddr->address.sa.sa_family); } faddr->next = NULL; Modified: head/usr.bin/vgrind/regexp.c ============================================================================== --- head/usr.bin/vgrind/regexp.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.bin/vgrind/regexp.c Wed Oct 21 05:37:09 2015 (r289677) @@ -318,7 +318,7 @@ expconv() /* - * The following routine recognises an irregular expresion + * The following routine recognises an irregular expression * with the following special characters: * * \? - means last match was optional Modified: head/usr.sbin/bhyve/pci_emul.c ============================================================================== --- head/usr.sbin/bhyve/pci_emul.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/bhyve/pci_emul.c Wed Oct 21 05:37:09 2015 (r289677) @@ -295,7 +295,7 @@ pci_emul_msix_tread(struct pci_devinst * /* * The PCI standard only allows 4 and 8 byte accesses to the MSI-X - * table but we also allow 1 byte access to accomodate reads from + * table but we also allow 1 byte access to accommodate reads from * ddb. */ if (size != 1 && size != 4 && size != 8) Modified: head/usr.sbin/bsdconfig/bsdconfig ============================================================================== --- head/usr.sbin/bsdconfig/bsdconfig Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/bsdconfig/bsdconfig Wed Oct 21 05:37:09 2015 (r289677) @@ -131,7 +131,7 @@ usage() # determine if we can use more than one column to display commands. # local x=$longest_cmd ncols=1 - x=$(( $x + 8 )) # Accomodate leading tab character + x=$(( $x + 8 )) # Accommodate leading tab character x=$(( $x + 3 + $longest_cmd )) # Preload end of next column while [ $x -lt $max_width ]; do ncols=$(( $ncols + 1 )) Modified: head/usr.sbin/config/config.h ============================================================================== --- head/usr.sbin/config/config.h Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/config/config.h Wed Oct 21 05:37:09 2015 (r289677) @@ -50,7 +50,7 @@ struct file_list { int f_type; /* type */ u_char f_flags; /* see below */ char *f_compilewith; /* special make rule if present */ - char *f_depends; /* additional dependancies */ + char *f_depends; /* additional dependencies */ char *f_clean; /* File list to add to clean rule */ char *f_warn; /* warning message */ const char *f_objprefix; /* prefix string for object name */ Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/ctld/ctld.c Wed Oct 21 05:37:09 2015 (r289677) @@ -2028,7 +2028,7 @@ conf_apply(struct conf *oldconf, struct } /* - * Go through the new portals, opening the sockets as neccessary. + * Go through the new portals, opening the sockets as necessary. */ TAILQ_FOREACH(newpg, &newconf->conf_portal_groups, pg_next) { if (newpg->pg_foreign) Modified: head/usr.sbin/fwcontrol/fwmpegts.c ============================================================================== --- head/usr.sbin/fwcontrol/fwmpegts.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/fwcontrol/fwmpegts.c Wed Oct 21 05:37:09 2015 (r289677) @@ -119,7 +119,7 @@ bandwidth (R): 2) 1.5 < R < 3 Mbps: db0/db1 or db2/db3 or db4/db5 or db6/db7 is payload, 3) 3 < R < 6 Mbps: db0/db1/db2/db3 or db4/db5/db6/db7 is payload, 4) R > 6 Mbps: all db0..db7 contain the payload. -Curently, only case (4) is supported in fwmpegts.c +Currently, only case (4) is supported in fwmpegts.c Each packet may contain N MPEG TS data blocks with timestamp header, which are (4+188)B long. Experimentally, the N ranges from 0 through 3. Modified: head/usr.sbin/jail/command.c ============================================================================== --- head/usr.sbin/jail/command.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/jail/command.c Wed Oct 21 05:37:09 2015 (r289677) @@ -761,7 +761,7 @@ add_proc(struct cfjail *j, pid_t pid) if (j->timeout.tv_sec == 0) requeue(j, &sleeping); else { - /* File the jail in the sleep queue acording to its timeout. */ + /* File the jail in the sleep queue according to its timeout. */ TAILQ_REMOVE(j->queue, j, tq); TAILQ_FOREACH(tj, &sleeping, tq) { if (!tj->timeout.tv_sec || Modified: head/usr.sbin/jail/jailp.h ============================================================================== --- head/usr.sbin/jail/jailp.h Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/jail/jailp.h Wed Oct 21 05:37:09 2015 (r289677) @@ -41,7 +41,7 @@ #define DF_SEEN 0x01 /* Dependency has been followed */ #define DF_LIGHT 0x02 /* Implied dependency on jail existence only */ -#define DF_NOFAIL 0x04 /* Don't propigate failed jails */ +#define DF_NOFAIL 0x04 /* Don't propagate failed jails */ #define PF_VAR 0x01 /* This is a variable, not a true parameter */ #define PF_APPEND 0x02 /* Append to existing parameter list */ Modified: head/usr.sbin/jail/jailparse.y ============================================================================== --- head/usr.sbin/jail/jailparse.y Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/jail/jailparse.y Wed Oct 21 05:37:09 2015 (r289677) @@ -103,7 +103,7 @@ param_l : /* * Parameters have a name and an optional list of value strings, - * which may have "+=" or "=" preceeding them. + * which may have "+=" or "=" preceding them. */ param : name { Modified: head/usr.sbin/jls/jls.c ============================================================================== --- head/usr.sbin/jls/jls.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/jls/jls.c Wed Oct 21 05:37:09 2015 (r289677) @@ -220,7 +220,7 @@ main(int argc, char **argv) putchar('\n'); } - /* Fetch the jail(s) and print the paramters. */ + /* Fetch the jail(s) and print the parameters. */ if (jid != 0 || jname != NULL) { if (print_jail(pflags, jflags) < 0) errx(1, "%s", jail_errmsg); Modified: head/usr.sbin/makefs/cd9660.c ============================================================================== --- head/usr.sbin/makefs/cd9660.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/makefs/cd9660.c Wed Oct 21 05:37:09 2015 (r289677) @@ -163,7 +163,7 @@ static cd9660node *cd9660_create_special /* - * Allocate and initalize a cd9660node + * Allocate and initialize a cd9660node * @returns struct cd9660node * Pointer to new node, or NULL on error */ static cd9660node * Modified: head/usr.sbin/mfiutil/mfiutil.8 ============================================================================== --- head/usr.sbin/mfiutil/mfiutil.8 Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/mfiutil/mfiutil.8 Wed Oct 21 05:37:09 2015 (r289677) @@ -607,25 +607,25 @@ Scan for foreign configurations and disp argument for the commands below takes the form of a number from 0 to the total configurations found. .It Cm foreign clear Op config -Clear the specifed foreign +Clear the specified foreign .Ar config or all if no .Ar config argument is provided. .It Cm foreign diag Op config -Display a diagnostic display of the specifed foreign +Display a diagnostic display of the specified foreign .Ar config or all if no .Ar config argument is provided. .It Cm foreign preview Op config -Preview the specifed foreign +Preview the specified foreign .Ar config after import or all if no .Ar config argument is provided. .It Cm foreign import Op config -Import the specifed foreign +Import the specified foreign .Ar config or all if no .Ar config Modified: head/usr.sbin/nandsim/nandsim.8 ============================================================================== --- head/usr.sbin/nandsim/nandsim.8 Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/nandsim/nandsim.8 Wed Oct 21 05:37:09 2015 (r289677) @@ -177,7 +177,7 @@ list all blocks marked as bad on a given .El .It Ic log Prints activity log of the specified controller to stdout; if -controller number is not specifed, logs for all available +controller number is not specified, logs for all available controllers are printed. .It Ic stats Print statistics of the selected controller, chip and page. Modified: head/usr.sbin/nandsim/nandsim.c ============================================================================== --- head/usr.sbin/nandsim/nandsim.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/nandsim/nandsim.c Wed Oct 21 05:37:09 2015 (r289677) @@ -421,7 +421,7 @@ cmdmod(int gargc __unused, char **gargv) if (gargc >= 4) { if (strcmp(gargv[2], "--loglevel") == 0 || strcmp(gargv[2], "-l") == 0) { - /* Set loglevel (ctrl:chip pair independant) */ + /* Set loglevel (ctrl:chip pair independent) */ mods.field = SIM_MOD_LOG_LEVEL; if (convert_arguint(gargv[3], &mods.new_value) != 0) Modified: head/usr.sbin/nandsim/nandsim_cfgparse.c ============================================================================== --- head/usr.sbin/nandsim/nandsim_cfgparse.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/nandsim/nandsim_cfgparse.c Wed Oct 21 05:37:09 2015 (r289677) @@ -349,7 +349,7 @@ create_ctrls(struct rcfile *f, struct si /* * ECC layout have to end up with 0xffff, so * we're filling buffer with 0xff. If ecc_layout is - * defined in config file, values will be overriden. + * defined in config file, values will be overridden. */ memset((void *)&ctrl_conf.ecc_layout, 0xff, sizeof(ctrl_conf.ecc_layout)); @@ -411,7 +411,7 @@ create_chips(struct rcfile *f, struct si /* * Bad block map have to end up with 0xffff, so * we're filling array with 0xff. If bad block map is - * defined in config file, values will be overriden. + * defined in config file, values will be overridden. */ memset((void *)&chip_conf.bad_block_map, 0xff, sizeof(chip_conf.bad_block_map)); Modified: head/usr.sbin/ndp/ndp.c ============================================================================== --- head/usr.sbin/ndp/ndp.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/ndp/ndp.c Wed Oct 21 05:37:09 2015 (r289677) @@ -675,7 +675,7 @@ again:; printf("%-*.*s %-*.*s %*.*s", addrwidth, addrwidth, host_buf, llwidth, llwidth, ether_str(sdl), ifwidth, ifwidth, ifname); - /* Print neighbor discovery specific informations */ + /* Print neighbor discovery specific information */ nbi = getnbrinfo(&sin->sin6_addr, sdl->sdl_index, 1); if (nbi) { if (nbi->expire > now.tv_sec) { Modified: head/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/newsyslog/newsyslog.c Wed Oct 21 05:37:09 2015 (r289677) @@ -1915,7 +1915,7 @@ do_sigwork(struct sigwork_entry *swork) /* * Compute the pause between consecutive signals. Use a longer * sleep time if we will be sending two signals to the same - * deamon or process-group. + * daemon or process-group. */ secs = 0; nextsig = SLIST_NEXT(swork, sw_nextp); Modified: head/usr.sbin/pmcstudy/eval_expr.c ============================================================================== --- head/usr.sbin/pmcstudy/eval_expr.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/pmcstudy/eval_expr.c Wed Oct 21 05:37:09 2015 (r289677) @@ -444,7 +444,7 @@ parse_expression(char *str) * val OP val * val OP ( * d) A final optional step (not implemented yet) would be - * to insert the mathimatical precedence paran's. For + * to insert the mathematical precedence paran's. For * the start we will just do the left to right evaluation and * then later we can add this guy to add paran's to make it * mathimatically correct... i.e instead of 1 + 2 * 3 we Modified: head/usr.sbin/ppp/ip.c ============================================================================== --- head/usr.sbin/ppp/ip.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/ppp/ip.c Wed Oct 21 05:37:09 2015 (r289677) @@ -473,7 +473,7 @@ FilterCheck(const unsigned char *packet, ncpaddr_ntoa(&srcaddr), sport, dstip, dport); } return 1; - } /* Explict match. Deny this packet */ + } /* Explicit match. Deny this packet */ } } else { n++; Modified: head/usr.sbin/ppp/ppp.8 ============================================================================== --- head/usr.sbin/ppp/ppp.8 Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/ppp/ppp.8 Wed Oct 21 05:37:09 2015 (r289677) @@ -5404,7 +5404,7 @@ and .Dq default can be used for .Ar dest -to sepcify the default route, and +to specify the default route, and .Dq 0.0.0.0 is understood to be the same as .Dq default @@ -5454,7 +5454,7 @@ and .Dq default can be used for .Ar dest -to sepcify the default route, and +to specify the default route, and .Dq :: is understood to be the same as .Dq default Modified: head/usr.sbin/rtsold/rtsold.h ============================================================================== --- head/usr.sbin/rtsold/rtsold.h Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/rtsold/rtsold.h Wed Oct 21 05:37:09 2015 (r289677) @@ -67,7 +67,7 @@ struct ifinfo { int active; /* interface status */ int probeinterval; /* interval of probe timer (if necessary) */ int probetimer; /* rest of probe timer */ - int mediareqok; /* wheter the IF supports SIOCGIFMEDIA */ + int mediareqok; /* whether the IF supports SIOCGIFMEDIA */ int otherconfig; /* need a separate protocol for the "other" * configuration */ int state; Modified: head/usr.sbin/uefisign/magic.h ============================================================================== --- head/usr.sbin/uefisign/magic.h Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/uefisign/magic.h Wed Oct 21 05:37:09 2015 (r289677) @@ -50,7 +50,7 @@ static const char *magic_fmt = "a = FORMAT:HEX,BITSTRING:00\n" /* * Well, there should be some other struct here, "SPCLink", but it doesn't - * appear to be neccessary for UEFI, and I have no idea how to synthesize it, + * appear to be necessary for UEFI, and I have no idea how to synthesize it, * as it uses the CHOICE type. */ "\n" Modified: head/usr.sbin/uefisign/pe.c ============================================================================== --- head/usr.sbin/uefisign/pe.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/uefisign/pe.c Wed Oct 21 05:37:09 2015 (r289677) @@ -304,7 +304,7 @@ parse_directory(struct executable *x, of * Note that most software does not care about the checksum at all; perhaps * we could just set it to 0 instead. * - * XXX: Endianess? + * XXX: Endianness? */ static uint32_t compute_checksum(const struct executable *x) Modified: head/usr.sbin/ypbind/ypbind.c ============================================================================== --- head/usr.sbin/ypbind/ypbind.c Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/ypbind/ypbind.c Wed Oct 21 05:37:09 2015 (r289677) @@ -396,7 +396,7 @@ main(int argc, char *argv[]) if (flock(yplockfd, LOCK_EX|LOCK_NB) == -1 && errno == EWOULDBLOCK) errx(1, "another ypbind is already running. Aborting"); - /* XXX domainname will be overriden if we use restricted mode */ + /* XXX domainname will be overridden if we use restricted mode */ yp_get_default_domain(&domain_name); if (domain_name[0] == '\0') errx(1, "domainname not set. Aborting"); Modified: head/usr.sbin/ypserv/ypinit.sh ============================================================================== --- head/usr.sbin/ypserv/ypinit.sh Wed Oct 21 05:33:48 2015 (r289676) +++ head/usr.sbin/ypserv/ypinit.sh Wed Oct 21 05:37:09 2015 (r289677) @@ -235,7 +235,7 @@ then for MAP in ${YPMAPLIST} do - echo "Transfering ${MAP}..." + echo "Transferring ${MAP}..." if ! ${YPXFR} -p ${YP_DIR} -h ${MASTER} -c -d ${DOMAIN} ${MAP}; then echo "Can't transfer map ${MAP}." 1>&2 ERROR_EXISTS="YES" From owner-svn-src-all@freebsd.org Wed Oct 21 05:52: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 20861A1AEDA; Wed, 21 Oct 2015 05:52:06 +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 E0E4B1236; Wed, 21 Oct 2015 05:52:05 +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 t9L5q4L4041850; Wed, 21 Oct 2015 05:52:04 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9L5q4aI041849; Wed, 21 Oct 2015 05:52:04 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510210552.t9L5q4aI041849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 21 Oct 2015 05:52:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289678 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 05:52:06 -0000 Author: adrian Date: Wed Oct 21 05:52:04 2015 New Revision: 289678 URL: https://svnweb.freebsd.org/changeset/base/289678 Log: arge: Remove the debugging printf that snuck in. This was triggering when using it as an AP bridge rather than an ethernet bridge. The code is unclear but it works; I'll fix it to be clearer and test performance at a later stage. Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Wed Oct 21 05:37:09 2015 (r289677) +++ head/sys/mips/atheros/if_arge.c Wed Oct 21 05:52:04 2015 (r289678) @@ -2195,11 +2195,6 @@ arge_newbuf(struct arge_softc *sc, int i rxd = &sc->arge_cdata.arge_rxdesc[idx]; if (rxd->rx_m != NULL) { bus_dmamap_unload(sc->arge_cdata.arge_rx_tag, rxd->rx_dmamap); - /* XXX TODO: free rx_m? */ - device_printf(sc->arge_dev, - "%s: ring[%d] rx_m wasn't free?\n", - __func__, - idx); } map = rxd->rx_dmamap; rxd->rx_dmamap = sc->arge_cdata.arge_rx_sparemap; From owner-svn-src-all@freebsd.org Wed Oct 21 06:23: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 68358A1A80B; Wed, 21 Oct 2015 06:23:59 +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 2802ECB; Wed, 21 Oct 2015 06:23:59 +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 t9L6Nwg6050574; Wed, 21 Oct 2015 06:23:58 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9L6Nw9X050571; Wed, 21 Oct 2015 06:23:58 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201510210623.t9L6Nw9X050571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 21 Oct 2015 06:23:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289679 - in head/sys/dev: iwm iwn wpi X-SVN-Group: head MIME-Version: 1.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, 21 Oct 2015 06:23:59 -0000 Author: kevlo Date: Wed Oct 21 06:23:57 2015 New Revision: 289679 URL: https://svnweb.freebsd.org/changeset/base/289679 Log: Remove BUS_DMA_NOWAIT from bus_dma_tag_create() invocations as it's no valid flag there. Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwn/if_iwn.c head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Wed Oct 21 05:52:04 2015 (r289678) +++ head/sys/dev/iwm/if_iwm.c Wed Oct 21 06:23:57 2015 (r289679) @@ -717,7 +717,7 @@ iwm_dma_contig_alloc(bus_dma_tag_t tag, error = bus_dma_tag_create(tag, alignment, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, size, - 1, size, BUS_DMA_NOWAIT, NULL, NULL, &dma->tag); + 1, size, 0, NULL, NULL, &dma->tag); if (error != 0) goto fail; @@ -851,8 +851,7 @@ iwm_alloc_rx_ring(struct iwm_softc *sc, /* Create RX buffer DMA tag. */ error = bus_dma_tag_create(sc->sc_dmat, 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, - IWM_RBUF_SIZE, 1, IWM_RBUF_SIZE, BUS_DMA_NOWAIT, NULL, NULL, - &ring->data_dmat); + IWM_RBUF_SIZE, 1, IWM_RBUF_SIZE, 0, NULL, NULL, &ring->data_dmat); if (error != 0) { device_printf(sc->sc_dev, "%s: could not create RX buf DMA tag, error %d\n", @@ -957,8 +956,7 @@ iwm_alloc_tx_ring(struct iwm_softc *sc, error = bus_dma_tag_create(sc->sc_dmat, 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, - IWM_MAX_SCATTER - 1, MCLBYTES, BUS_DMA_NOWAIT, NULL, NULL, - &ring->data_dmat); + IWM_MAX_SCATTER - 1, MCLBYTES, 0, NULL, NULL, &ring->data_dmat); if (error != 0) { device_printf(sc->sc_dev, "could not create TX buf DMA tag\n"); goto fail; Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Wed Oct 21 05:52:04 2015 (r289678) +++ head/sys/dev/iwn/if_iwn.c Wed Oct 21 06:23:57 2015 (r289679) @@ -1732,7 +1732,7 @@ iwn_dma_contig_alloc(struct iwn_softc *s error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), alignment, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, size, - 1, size, BUS_DMA_NOWAIT, NULL, NULL, &dma->tag); + 1, size, 0, NULL, NULL, &dma->tag); if (error != 0) goto fail; @@ -1861,8 +1861,7 @@ iwn_alloc_rx_ring(struct iwn_softc *sc, /* Create RX buffer DMA tag. */ error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, - IWN_RBUF_SIZE, 1, IWN_RBUF_SIZE, BUS_DMA_NOWAIT, NULL, NULL, - &ring->data_dmat); + IWN_RBUF_SIZE, 1, IWN_RBUF_SIZE, 0, NULL, NULL, &ring->data_dmat); if (error != 0) { device_printf(sc->sc_dev, "%s: could not create RX buf DMA tag, error %d\n", @@ -2008,8 +2007,7 @@ iwn_alloc_tx_ring(struct iwn_softc *sc, error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, - IWN_MAX_SCATTER - 1, MCLBYTES, BUS_DMA_NOWAIT, NULL, NULL, - &ring->data_dmat); + IWN_MAX_SCATTER - 1, MCLBYTES, 0, NULL, NULL, &ring->data_dmat); if (error != 0) { device_printf(sc->sc_dev, "%s: could not create TX buf DMA tag, error %d\n", Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Wed Oct 21 05:52:04 2015 (r289678) +++ head/sys/dev/wpi/if_wpi.c Wed Oct 21 06:23:57 2015 (r289679) @@ -918,7 +918,7 @@ wpi_dma_contig_alloc(struct wpi_softc *s error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), alignment, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, size, - 1, size, BUS_DMA_NOWAIT, NULL, NULL, &dma->tag); + 1, size, 0, NULL, NULL, &dma->tag); if (error != 0) goto fail; @@ -1019,8 +1019,7 @@ wpi_alloc_rx_ring(struct wpi_softc *sc) /* Create RX buffer DMA tag. */ error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, - MJUMPAGESIZE, 1, MJUMPAGESIZE, BUS_DMA_NOWAIT, NULL, NULL, - &ring->data_dmat); + MJUMPAGESIZE, 1, MJUMPAGESIZE, 0, NULL, NULL, &ring->data_dmat); if (error != 0) { device_printf(sc->sc_dev, "%s: could not create RX buf DMA tag, error %d\n", @@ -1203,8 +1202,7 @@ wpi_alloc_tx_ring(struct wpi_softc *sc, error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, - WPI_MAX_SCATTER - 1, MCLBYTES, BUS_DMA_NOWAIT, NULL, NULL, - &ring->data_dmat); + WPI_MAX_SCATTER - 1, MCLBYTES, 0, NULL, NULL, &ring->data_dmat); if (error != 0) { device_printf(sc->sc_dev, "%s: could not create TX buf DMA tag, error %d\n", From owner-svn-src-all@freebsd.org Wed Oct 21 07:59: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 54EF9A1BD07; Wed, 21 Oct 2015 07:59:47 +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 3045EFF5; Wed, 21 Oct 2015 07:59: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 t9L7xkSs076146; Wed, 21 Oct 2015 07:59:46 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9L7xksb076145; Wed, 21 Oct 2015 07:59:46 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510210759.t9L7xksb076145@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 21 Oct 2015 07:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289680 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 07:59:47 -0000 Author: hselasky Date: Wed Oct 21 07:59:46 2015 New Revision: 289680 URL: https://svnweb.freebsd.org/changeset/base/289680 Log: Reimplement header file, remove all comments deriving from Linux and update copyright to 2-clause BSD. Suggested by: emaste @ Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/etherdevice.h Modified: head/sys/ofed/include/linux/etherdevice.h ============================================================================== --- head/sys/ofed/include/linux/etherdevice.h Wed Oct 21 06:23:57 2015 (r289679) +++ head/sys/ofed/include/linux/etherdevice.h Wed Oct 21 07:59:46 2015 (r289680) @@ -1,97 +1,62 @@ /*- - * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2014 Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2015 Mellanox Technologies, Ltd. All rights reserved. * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _LINUX_ETHERDEVICE -#define _LINUX_ETHERDEVICE +#define _LINUX_ETHERDEVICE #include -/** - * is_zero_ether_addr - Determine if give Ethernet address is all zeros. - * @addr: Pointer to a six-byte array containing the Ethernet address - * - * Return true if the address is all zeroes. - */ -static inline bool is_zero_ether_addr(const u8 *addr) +static inline bool +is_zero_ether_addr(const u8 * addr) { - return !(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]); + return ((addr[0] + addr[1] + addr[2] + addr[3] + addr[4] + addr[5]) == 0x00); } - - -/** - * is_multicast_ether_addr - Determine if the Ethernet address is a multicast. - * @addr: Pointer to a six-byte array containing the Ethernet address - * - * Return true if the address is a multicast address. - * By definition the broadcast address is also a multicast address. - */ -static inline bool is_multicast_ether_addr(const u8 *addr) +static inline bool +is_multicast_ether_addr(const u8 * addr) { - return (0x01 & addr[0]); + return (0x01 & addr[0]); } -/** - * is_broadcast_ether_addr - Determine if the Ethernet address is broadcast - * @addr: Pointer to a six-byte array containing the Ethernet address - * - * Return true if the address is the broadcast address. - */ -static inline bool is_broadcast_ether_addr(const u8 *addr) +static inline bool +is_broadcast_ether_addr(const u8 * addr) { - return (addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) == 0xff; + return ((addr[0] + addr[1] + addr[2] + addr[3] + addr[4] + addr[5]) == (6 * 0xff)); } -/** - * is_valid_ether_addr - Determine if the given Ethernet address is valid - * @addr: Pointer to a six-byte array containing the Ethernet address - * - * Check that the Ethernet address (MAC) is not 00:00:00:00:00:00, is not - * a multicast address, and is not FF:FF:FF:FF:FF:FF. - * - * Return true if the address is valid. - **/ -static inline bool is_valid_ether_addr(const u8 *addr) +static inline bool +is_valid_ether_addr(const u8 * addr) { - /* FF:FF:FF:FF:FF:FF is a multicast address so we don't need to - ** explicitly check for it here. */ - return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr); + return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr); } -static inline void ether_addr_copy(u8 *dst, const u8 *src) +static inline void +ether_addr_copy(u8 * dst, const u8 * src) { memcpy(dst, src, 6); } -#endif /* _LINUX_ETHERDEVICE */ +#endif /* _LINUX_ETHERDEVICE */ From owner-svn-src-all@freebsd.org Wed Oct 21 08:04: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 20621A1A06A; Wed, 21 Oct 2015 08:04:56 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x22e.google.com (mail-pa0-x22e.google.com [IPv6:2607:f8b0:400e:c03::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E7D9614BB; Wed, 21 Oct 2015 08:04:55 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pacfv9 with SMTP id fv9so49718220pac.3; Wed, 21 Oct 2015 01:04:55 -0700 (PDT) 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=ZZtqyAPyXZ8nDjI0llOGh4yU62yPcDAFD6MLiW6nRCc=; b=LWJSRI41T7pPWkB4BU15RJF3pfWm1FSKqNeGJNBVbTE/4NtoBG1rXFWPT3GiPYsXWi EPb+Jd6fKexDK2zVTm969noobN7xYZc/EigM7reP7u92zp2za7ghunVWkAZVEVyIfwWE d6IayBs6Tt/YoQSP7Spe+IhC/n9ikmZ+IBu1QQwhiU+XtfJeTbh9w/19QdjJrZfVF6H0 MozfCoQsuAoNwnCo6lUFrXNtgBcGb8W9bgLL7s1hE5QXsfYblewPmcRgnyc6erg7Ais1 7xAGurcHfboDCz89pODEunzt6pvipIQSoy0oSV4oOOTl7Ccz5OGZkkfV8UNDYPCALlcJ mnrg== X-Received: by 10.68.242.130 with SMTP id wq2mr8994332pbc.117.1445414695350; Wed, 21 Oct 2015 01:04:55 -0700 (PDT) Received: from ?IPv6:2601:601:800:126d:ed49:68d3:f4e:e5ab? ([2601:601:800:126d:ed49:68d3:f4e:e5ab]) by smtp.gmail.com with ESMTPSA id of1sm7688023pbc.11.2015.10.21.01.04.54 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Oct 2015 01:04:54 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r289203 - head/usr.sbin/makefs From: NGie Cooper In-Reply-To: <201510130232.t9D2WFo2034264@repo.freebsd.org> Date: Wed, 21 Oct 2015 01:04:53 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201510130232.t9D2WFo2034264@repo.freebsd.org> To: Adrian Chadd 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: Wed, 21 Oct 2015 08:04:56 -0000 > On Oct 12, 2015, at 19:32, Adrian Chadd wrote: >=20 > Author: adrian > Date: Tue Oct 13 02:32:15 2015 > New Revision: 289203 > URL: https://svnweb.freebsd.org/changeset/base/289203 >=20 > Log: > makefs: introduce a new option to specify what to round the resulting > image up to. >=20 > =46rom ticket: >=20 > While trying to run FreeBSD/mips on some device having very small = flash media, > one is forced to compress file system with mkulzma(8) utility. It is = desirable > to specify small UFS block/fragment sizes like 4096/512 bytes for = makefs(8) > and big compression block size like 65535 bytes to mkulzma at the = same time. > Then one obtains very good comression ratios (like 75% and more) but = faces > the following problem. >=20 > geom_uncompress kernel module reports GEOM provider size rounded up = to its > compression block size. Generally, this changes original media size = and now > it fails to match the size of embedded UFS file system that leads to = other > problems, f.e. geom_label kernel module does not like this and skips = the > file system while tasting the GEOM and looking for UFS label. >=20 > This makes it impossible to refer to the file system using known UFS = label > instead of something like /dev/map/rootfs.uncompress. >=20 > The following patch introduces new command line option "-r roundup" = for makefs > that makes it round up the image to specified block size. Hence, = geom_uncompress > does not change GEOM media size for images rounded that way and = geom_label > accepts such GEOMs just fine. >=20 > With the patch applied, one can use following commands: >=20 > $ makefs -t ffs -r 65536 -o bsize=3D4096,fsize=3D512,label=3Dflash = optimization=3Dspace fs.img fs > $ mkulzma -s 65536 -o fs.img.ulzma fs.img >=20 > PR: bin/203707 > Submitted by: 1. roundup doesn=E2=80=99t seem like a user-friendly name. 2. =E2=80=9Croundup=E2=80=9D isn=E2=80=99t documented under the = FFS-specific options. I=E2=80=99m going to send out a CR soon updating the documentation and = changing -r to -R. Thanks, -NGie= From owner-svn-src-all@freebsd.org Wed Oct 21 08:23: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 2CB41A1A8B1; Wed, 21 Oct 2015 08:23: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 0197E333; Wed, 21 Oct 2015 08:23: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 t9L8NKl2084576; Wed, 21 Oct 2015 08:23:20 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9L8NJMS084574; Wed, 21 Oct 2015 08:23:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510210823.t9L8NJMS084574@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 21 Oct 2015 08:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289681 - 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: Wed, 21 Oct 2015 08:23:21 -0000 Author: mav Date: Wed Oct 21 08:23:19 2015 New Revision: 289681 URL: https://svnweb.freebsd.org/changeset/base/289681 Log: Some more defines and polishing for INIT_FIRMWARE. 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 Wed Oct 21 07:59:46 2015 (r289680) +++ head/sys/dev/isp/isp.c Wed Oct 21 08:23:19 2015 (r289681) @@ -2075,10 +2075,11 @@ isp_fibre_init_2400(ispsoftc_t *isp) icbp->icb_fwoptions2 |= ICB2400_OPT2_FCTAPE; } - if (icbp->icb_fwoptions2 & ICB2400_OPT2_FCTAPE) { - FCPARAM(isp, chan)->fctape_enabled = 1; - } else { - FCPARAM(isp, chan)->fctape_enabled = 0; + for (chan = 0; chan < isp->isp_nchan; chan++) { + if (icbp->icb_fwoptions2 & ICB2400_OPT2_FCTAPE) + FCPARAM(isp, chan)->fctape_enabled = 1; + else + FCPARAM(isp, chan)->fctape_enabled = 0; } switch (isp->isp_confopts & ISP_CFG_PORT_PREF) { @@ -2209,31 +2210,39 @@ isp_fibre_init_2400(ispsoftc_t *isp) size_t amt = 0; uint8_t *off; - vpinfo.vp_count = isp->isp_nchan - 1; vpinfo.vp_global_options = 0; + if (isp->isp_fwattr & ISP2400_FW_ATTR_VP0) { + vpinfo.vp_global_options |= ICB2400_VPGOPT_VP0_DECOUPLE; + vpinfo.vp_count = isp->isp_nchan; + chan = 0; + } else { + vpinfo.vp_count = isp->isp_nchan - 1; + chan = 1; + } off = fcp->isp_scratch; off += ICB2400_VPINFO_OFF; vdst = (isp_icb_2400_vpinfo_t *) off; isp_put_icb_2400_vpinfo(isp, &vpinfo, vdst); amt = ICB2400_VPINFO_OFF + sizeof (isp_icb_2400_vpinfo_t); - for (chan = 1; chan < isp->isp_nchan; chan++) { + for (; chan < isp->isp_nchan; chan++) { fcparam *fcp2; ISP_MEMZERO(&pi, sizeof (pi)); fcp2 = FCPARAM(isp, chan); if (fcp2->role != ISP_ROLE_NONE) { pi.vp_port_options = ICB2400_VPOPT_ENABLED; - if (fcp2->role & ISP_ROLE_INITIATOR) { + if (fcp2->role & ISP_ROLE_INITIATOR) pi.vp_port_options |= ICB2400_VPOPT_INI_ENABLE; - } - if ((fcp2->role & ISP_ROLE_TARGET) == 0) { + if ((fcp2->role & ISP_ROLE_TARGET) == 0) pi.vp_port_options |= ICB2400_VPOPT_TGT_DISABLE; - } - MAKE_NODE_NAME_FROM_WWN(pi.vp_port_portname, fcp2->isp_wwpn); - MAKE_NODE_NAME_FROM_WWN(pi.vp_port_nodename, fcp2->isp_wwnn); } + MAKE_NODE_NAME_FROM_WWN(pi.vp_port_portname, fcp2->isp_wwpn); + MAKE_NODE_NAME_FROM_WWN(pi.vp_port_nodename, fcp2->isp_wwnn); off = fcp->isp_scratch; - off += ICB2400_VPINFO_PORT_OFF(chan); + if (isp->isp_fwattr & ISP2400_FW_ATTR_VP0) + off += ICB2400_VPINFO_PORT_OFF(chan); + else + off += ICB2400_VPINFO_PORT_OFF(chan - 1); pdst = (vp_port_info_t *) off; isp_put_vp_port_info(isp, &pi, pdst); amt += ICB2400_VPOPT_WRITE_SIZE; Modified: head/sys/dev/isp/ispmbox.h ============================================================================== --- head/sys/dev/isp/ispmbox.h Wed Oct 21 07:59:46 2015 (r289680) +++ head/sys/dev/isp/ispmbox.h Wed Oct 21 08:23:19 2015 (r289681) @@ -989,6 +989,13 @@ typedef struct { #define ICB2400_OPT1_FAIRNESS 0x00000002 #define ICB2400_OPT1_HARD_ADDRESS 0x00000001 +#define ICB2400_OPT2_ENA_ATIOMQ 0x08000000 +#define ICB2400_OPT2_ENA_IHA 0x04000000 +#define ICB2400_OPT2_QOS 0x02000000 +#define ICB2400_OPT2_IOCBS 0x01000000 +#define ICB2400_OPT2_ENA_IHR 0x00400000 +#define ICB2400_OPT2_ENA_VMS 0x00200000 +#define ICB2400_OPT2_ENA_TA 0x00100000 #define ICB2400_OPT2_TPRLIC 0x00004000 #define ICB2400_OPT2_FCTAPE 0x00001000 #define ICB2400_OPT2_FCSP 0x00000800 @@ -1003,14 +1010,20 @@ typedef struct { #define ICB2400_OPT2_ZIO 0x00000005 #define ICB2400_OPT2_ZIO1 0x00000006 -#define ICB2400_OPT3_75_OHM 0x00010000 +#define ICB2400_OPT3_NO_CTXDIS 0x40000000 +#define ICB2400_OPT3_ENA_ETH_RESP 0x08000000 +#define ICB2400_OPT3_ENA_ETH_ATIO 0x04000000 +#define ICB2400_OPT3_ENA_MFCF 0x00020000 +#define ICB2400_OPT3_SKIP_FOURGB 0x00010000 #define ICB2400_OPT3_RATE_MASK 0x0000E000 #define ICB2400_OPT3_RATE_ONEGB 0x00000000 #define ICB2400_OPT3_RATE_TWOGB 0x00002000 -#define ICB2400_OPT3_RATE_AUTO 0x00004000 +#define ICB2400_OPT3_RATE_AUTO 0x00004000 #define ICB2400_OPT3_RATE_FOURGB 0x00006000 #define ICB2400_OPT3_RATE_EIGHTGB 0x00008000 +#define ICB2400_OPT3_RATE_SIXTEENGB 0x0000A000 #define ICB2400_OPT3_ENA_OOF_XFRDY 0x00000200 +#define ICB2400_OPT3_NO_N2N_LOGI 0x00000100 #define ICB2400_OPT3_NO_LOCAL_PLOGI 0x00000080 #define ICB2400_OPT3_ENA_OOF 0x00000040 /* note that a response size flag of zero is reserved! */ @@ -1124,12 +1137,13 @@ typedef struct { uint16_t vp_port_portid_hi; /* not present when trailing icb */ } vp_port_info_t; -#define ICB2400_VPOPT_TGT_DISABLE 0x00000020 /* disable target mode */ -#define ICB2400_VPOPT_INI_ENABLE 0x00000010 /* enable initiator mode */ -#define ICB2400_VPOPT_ENABLED 0x00000008 -#define ICB2400_VPOPT_NOPLAY 0x00000004 -#define ICB2400_VPOPT_PREVLOOP 0x00000002 -#define ICB2400_VPOPT_HARD_ADDRESS 0x00000001 +#define ICB2400_VPOPT_ENA_SNSLOGIN 0x00000040 /* Enable SNS Login and SCR for Virtual Ports */ +#define ICB2400_VPOPT_TGT_DISABLE 0x00000020 /* Target Mode Disabled */ +#define ICB2400_VPOPT_INI_ENABLE 0x00000010 /* Initiator Mode Enabled */ +#define ICB2400_VPOPT_ENABLED 0x00000008 /* VP Enabled */ +#define ICB2400_VPOPT_NOPLAY 0x00000004 /* ID Not Acquired */ +#define ICB2400_VPOPT_PREVLOOP 0x00000002 /* Previously Assigned ID */ +#define ICB2400_VPOPT_HARD_ADDRESS 0x00000001 /* Hard Assigned ID */ #define ICB2400_VPOPT_WRITE_SIZE 20 @@ -1145,12 +1159,14 @@ typedef struct { #define ICB2400_VPINFO_OFF 0x80 /* offset from start of ICB */ #define ICB2400_VPINFO_PORT_OFF(chan) \ - ICB2400_VPINFO_OFF + \ - sizeof (isp_icb_2400_vpinfo_t) + ((chan - 1) * ICB2400_VPOPT_WRITE_SIZE) + (ICB2400_VPINFO_OFF + \ + sizeof (isp_icb_2400_vpinfo_t) + (chan * ICB2400_VPOPT_WRITE_SIZE)) #define ICB2400_VPGOPT_FCA 0x01 /* Assume Clean Address bit in FLOGI ACC set (works only in static configurations) */ #define ICB2400_VPGOPT_MID_DISABLE 0x02 /* when set, connection mode2 will work with NPIV-capable switched */ #define ICB2400_VPGOPT_VP0_DECOUPLE 0x04 /* Allow VP0 decoupling if firmware supports it */ +#define ICB2400_VPGOPT_SUSP_FDISK 0x10 /* Suspend FDISC for Enabled VPs */ +#define ICB2400_VPGOPT_GEN_RIDA 0x20 /* Generate RIDA if FLOGI Fails */ typedef struct { isphdr_t vp_ctrl_hdr; @@ -1197,8 +1213,10 @@ typedef struct { #define VP_IDX_ERR 0x04 #define VP_STS_BSY 0x05 -#define VP_MODIFY_VP 0x00 +#define VP_MODIFY 0x00 #define VP_MODIFY_ENA 0x01 +#define VP_MODIFY_OPT 0x02 +#define VP_RESUME 0x03 /* * Port Data Base Element From owner-svn-src-all@freebsd.org Wed Oct 21 08:51: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 D5825A1B1AB; Wed, 21 Oct 2015 08:51:50 +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 A650F1357; Wed, 21 Oct 2015 08:51:50 +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 t9L8pnPl092739; Wed, 21 Oct 2015 08:51:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9L8pnkT092738; Wed, 21 Oct 2015 08:51:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510210851.t9L8pnkT092738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 21 Oct 2015 08:51:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289682 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 08:51:51 -0000 Author: hselasky Date: Wed Oct 21 08:51:49 2015 New Revision: 289682 URL: https://svnweb.freebsd.org/changeset/base/289682 Log: Remove all comments deriving from Linux. Style file for FreeBSD. Suggested by: emaste @ Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/scatterlist.h Modified: head/sys/ofed/include/linux/scatterlist.h ============================================================================== --- head/sys/ofed/include/linux/scatterlist.h Wed Oct 21 08:23:19 2015 (r289681) +++ head/sys/ofed/include/linux/scatterlist.h Wed Oct 21 08:51:49 2015 (r289682) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. * Copyright (c) 2015 Matthew Dillon * All rights reserved. * @@ -35,48 +35,30 @@ #include #include -/* - * SG table design. - * - * If flags bit 0 is set, then the sg field contains a pointer to the next sg - * table list. Otherwise the next entry is at sg + 1, can be determined using - * the sg_is_chain() function. - * - * If flags bit 1 is set, then this sg entry is the last element in a list, - * can be determined using the sg_is_last() function. - * - * See sg_next(). - * - */ - struct scatterlist { union { - struct page *page; - struct scatterlist *sg; - } sl_un; - dma_addr_t address; - unsigned long offset; - uint32_t length; - uint32_t flags; + struct page *page; + struct scatterlist *sg; + } sl_un; + dma_addr_t address; + unsigned long offset; + uint32_t length; + uint32_t flags; }; struct sg_table { - struct scatterlist *sgl; /* the list */ - unsigned int nents; /* number of mapped entries */ - unsigned int orig_nents; /* original size of list */ + struct scatterlist *sgl; + unsigned int nents; + unsigned int orig_nents; }; struct sg_page_iter { - struct scatterlist *sg; - unsigned int sg_pgoffset; /* page index */ - unsigned int maxents; + struct scatterlist *sg; + unsigned int sg_pgoffset; + unsigned int maxents; }; -/* - * Maximum number of entries that will be allocated in one piece, if - * a list larger than this is required then chaining will be utilized. - */ -#define SG_MAX_SINGLE_ALLOC (PAGE_SIZE / sizeof(struct scatterlist)) +#define SG_MAX_SINGLE_ALLOC (PAGE_SIZE / sizeof(struct scatterlist)) #define sg_dma_address(sg) (sg)->address #define sg_dma_len(sg) (sg)->length @@ -128,60 +110,24 @@ sg_phys(struct scatterlist *sg) return sg_page(sg)->phys_addr + sg->offset; } -/** - * sg_chain - Chain two sglists together - * @prv: First scatterlist - * @prv_nents: Number of entries in prv - * @sgl: Second scatterlist - * - * Description: - * Links @prv@ and @sgl@ together, to form a longer scatterlist. - * - **/ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents, - struct scatterlist *sgl) + struct scatterlist *sgl) { -/* - * offset and length are unused for chain entry. Clear them. - */ struct scatterlist *sg = &prv[prv_nents - 1]; sg->offset = 0; sg->length = 0; - - /* - * Indicate a link pointer, and set the link to the second list. - */ sg->flags = SG_CHAIN; sg->sl_un.sg = sgl; } -/** - * sg_mark_end - Mark the end of the scatterlist - * @sg: SG entryScatterlist - * - * Description: - * Marks the passed in sg entry as the termination point for the sg - * table. A call to sg_next() on this entry will return NULL. - * - **/ -static inline void sg_mark_end(struct scatterlist *sg) +static inline void +sg_mark_end(struct scatterlist *sg) { - sg->flags = SG_END; + sg->flags = SG_END; } -/** - * __sg_free_table - Free a previously mapped sg table - * @table: The sg table header to use - * @max_ents: The maximum number of entries per single scatterlist - * - * Description: - * Free an sg table previously allocated and setup with - * __sg_alloc_table(). The @max_ents value must be identical to - * that previously used with __sg_alloc_table(). - * - **/ static inline void __sg_free_table(struct sg_table *table, unsigned int max_ents) { @@ -195,12 +141,6 @@ __sg_free_table(struct sg_table *table, unsigned int alloc_size = table->orig_nents; unsigned int sg_size; - /* - * If we have more than max_ents segments left, - * then assign 'next' to the sg table after the current one. - * sg_size is then one less than alloc size, since the last - * element is the chain pointer. - */ if (alloc_size > max_ents) { next = sgl[max_ents - 1].sl_un.sg; alloc_size = max_ents; @@ -218,38 +158,15 @@ __sg_free_table(struct sg_table *table, table->sgl = NULL; } -/** - * sg_free_table - Free a previously allocated sg table - * @table: The mapped sg table header - * - **/ static inline void sg_free_table(struct sg_table *table) { __sg_free_table(table, SG_MAX_SINGLE_ALLOC); } -/** - * __sg_alloc_table - Allocate and initialize an sg table with given allocator - * @table: The sg table header to use - * @nents: Number of entries in sg list - * @max_ents: The maximum number of entries the allocator returns per call - * @gfp_mask: GFP allocation mask - * - * Description: - * This function returns a @table @nents long. The allocator is - * defined to return scatterlist chunks of maximum size @max_ents. - * Thus if @nents is bigger than @max_ents, the scatterlists will be - * chained in units of @max_ents. - * - * Notes: - * If this function returns non-0 (eg failure), the caller must call - * __sg_free_table() to cleanup any leftover allocations. - * - **/ static inline int __sg_alloc_table(struct sg_table *table, unsigned int nents, - unsigned int max_ents, gfp_t gfp_mask) + unsigned int max_ents, gfp_t gfp_mask) { struct scatterlist *sg, *prv; unsigned int left; @@ -261,7 +178,8 @@ __sg_alloc_table(struct sg_table *table, left = nents; prv = NULL; do { - unsigned int sg_size, alloc_size = left; + unsigned int sg_size; + unsigned int alloc_size = left; if (alloc_size > max_ents) { alloc_size = max_ents; @@ -273,33 +191,19 @@ __sg_alloc_table(struct sg_table *table, sg = kmalloc(alloc_size * sizeof(struct scatterlist), gfp_mask); if (unlikely(!sg)) { - /* - * Adjust entry count to reflect that the last - * entry of the previous table won't be used for - * linkage. Without this, sg_kfree() may get - * confused. - */ if (prv) table->nents = ++table->orig_nents; return -ENOMEM; } - sg_init_table(sg, alloc_size); table->nents = table->orig_nents += sg_size; - /* - * If this is the first mapping, assign the sg table header. - * If this is not the first mapping, chain previous part. - */ if (prv) sg_chain(prv, max_ents, sg); else table->sgl = sg; - /* - * If no more entries after this one, mark the end - */ if (!left) sg_mark_end(&sg[sg_size - 1]); @@ -309,34 +213,19 @@ __sg_alloc_table(struct sg_table *table, return 0; } -/** - * sg_alloc_table - Allocate and initialize an sg table - * @table: The sg table header to use - * @nents: Number of entries in sg list - * @gfp_mask: GFP allocation mask - * - * Description: - * Allocate and initialize an sg table. If @nents@ is larger than - * SG_MAX_SINGLE_ALLOC a chained sg table will be setup. - * - **/ - static inline int sg_alloc_table(struct sg_table *table, unsigned int nents, gfp_t gfp_mask) { int ret; ret = __sg_alloc_table(table, nents, SG_MAX_SINGLE_ALLOC, - gfp_mask); + gfp_mask); if (unlikely(ret)) __sg_free_table(table, SG_MAX_SINGLE_ALLOC); return ret; } -/* - * Iterate pages in sg list. - */ static inline void _sg_iter_next(struct sg_page_iter *iter) { @@ -358,26 +247,16 @@ _sg_iter_next(struct sg_page_iter *iter) iter->sg = sg; } -/* - * NOTE: pgoffset is really a page index, not a byte offset. - */ static inline void _sg_iter_init(struct scatterlist *sgl, struct sg_page_iter *iter, - unsigned int nents, unsigned long pgoffset) + unsigned int nents, unsigned long pgoffset) { if (nents) { - /* - * Nominal case. Note subtract 1 from starting page index - * for initial _sg_iter_next() call. - */ iter->sg = sgl; iter->sg_pgoffset = pgoffset - 1; iter->maxents = nents; _sg_iter_next(iter); } else { - /* - * Degenerate case - */ iter->sg = NULL; iter->sg_pgoffset = 0; iter->maxents = 0; @@ -397,4 +276,4 @@ sg_page_iter_dma_address(struct sg_page_ #define for_each_sg(sglist, sg, sgmax, _itr) \ for (_itr = 0, sg = (sglist); _itr < (sgmax); _itr++, sg = sg_next(sg)) -#endif /* _LINUX_SCATTERLIST_H_ */ +#endif /* _LINUX_SCATTERLIST_H_ */ From owner-svn-src-all@freebsd.org Wed Oct 21 09:37: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 27627A1BC97; Wed, 21 Oct 2015 09:37: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 CEAE8DDE; Wed, 21 Oct 2015 09:37: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 t9L9bYPS005067; Wed, 21 Oct 2015 09:37:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9L9bYL6005066; Wed, 21 Oct 2015 09:37:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510210937.t9L9bYL6005066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 21 Oct 2015 09:37:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289683 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 09:37:36 -0000 Author: hselasky Date: Wed Oct 21 09:37:34 2015 New Revision: 289683 URL: https://svnweb.freebsd.org/changeset/base/289683 Log: Remove all comments deriving from Linux. Minor rework of ilog2() function. Suggested by: emaste @ Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/log2.h Modified: head/sys/ofed/include/linux/log2.h ============================================================================== --- head/sys/ofed/include/linux/log2.h Wed Oct 21 08:51:49 2015 (r289682) +++ head/sys/ofed/include/linux/log2.h Wed Oct 21 09:37:34 2015 (r289683) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -53,50 +53,10 @@ rounddown_pow_of_two(unsigned long x) return (1UL << (flsl(x) - 1)); } - -/* - * deal with unrepresentable constant logarithms - */ -extern __attribute__((const, noreturn)) -int ____ilog2_NaN(void); - -/* - * non-constant log of base 2 calculators - * - the arch may override these in asm/bitops.h if they can be implemented - * more efficiently than using fls() and fls64() - * - the arch is not required to handle n==0 if implementing the fallback - */ -#ifndef CONFIG_ARCH_HAS_ILOG2_U32 -static inline __attribute__((const)) -int __ilog2_u32(u32 n) -{ - return flsl(n) - 1; -} -#endif - -#ifndef CONFIG_ARCH_HAS_ILOG2_U64 -static inline __attribute__((const)) -int __ilog2_u64(u64 n) -{ - return flsl(n) - 1; -} -#endif - - -/** - * ilog2 - log of base 2 of 32-bit or a 64-bit unsigned value - * @n - parameter - * - * constant-capable log of base 2 calculation - * - this can be used to initialise global variables from constant data, hence - * the massive ternary operator construction - * - * selects the appropriately-sized optimised version depending on sizeof(n) - */ -#define ilog2(n) \ +#define ilog2(n) \ ( \ __builtin_constant_p(n) ? ( \ - (n) < 1 ? ____ilog2_NaN() : \ + (n) < 1 ? -1 : \ (n) & (1ULL << 63) ? 63 : \ (n) & (1ULL << 62) ? 62 : \ (n) & (1ULL << 61) ? 61 : \ @@ -161,12 +121,10 @@ int __ilog2_u64(u64 n) (n) & (1ULL << 2) ? 2 : \ (n) & (1ULL << 1) ? 1 : \ (n) & (1ULL << 0) ? 0 : \ - ____ilog2_NaN() \ - ) : \ + -1) : \ (sizeof(n) <= 4) ? \ - __ilog2_u32(n) : \ - __ilog2_u64(n) \ - ) + fls((u32)(n)) - 1 : flsll((u64)(n)) - 1 \ +) #define order_base_2(x) ilog2(roundup_pow_of_two(x)) From owner-svn-src-all@freebsd.org Wed Oct 21 10:04: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 7D91EA1A37F; Wed, 21 Oct 2015 10:04:37 +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 3F38C1D2C; Wed, 21 Oct 2015 10:04:37 +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 t9LA4aOm013633; Wed, 21 Oct 2015 10:04:36 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LA4ala013630; Wed, 21 Oct 2015 10:04:36 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201510211004.t9LA4ala013630@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: Wed, 21 Oct 2015 10:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289685 - in head/sys: amd64/include/xen i386/include/xen x86/include/xen X-SVN-Group: head MIME-Version: 1.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, 21 Oct 2015 10:04:37 -0000 Author: royger Date: Wed Oct 21 10:04:35 2015 New Revision: 289685 URL: https://svnweb.freebsd.org/changeset/base/289685 Log: x86/xen: Consolidate xen-os.h in a single place amd64 and i386 platform code contain very similar xen/xen-os.h The only differences are: - Functions/variables/types which were unused in i386/xen/xen-os.h: * xen_xchg * __xchg_dummy * __xg * __xchg * atomic_t * atomic_inc * rdtscll The functions/variables/types unused in xen-os.h can be dropped and there is no more differences betwen amd64 and i386. The new header is placed in x86/include/xen and each platform will have dummy headers include x86/xen/*.h. This is to be able to include machine/xen/*.h in the PV drivers. Submitted by: Julien Grall Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3880 Sponsored by: Citrix Systems R&D Added: head/sys/x86/include/xen/ head/sys/x86/include/xen/xen-os.h (contents, props changed) Modified: head/sys/amd64/include/xen/xen-os.h head/sys/i386/include/xen/xen-os.h Modified: head/sys/amd64/include/xen/xen-os.h ============================================================================== --- head/sys/amd64/include/xen/xen-os.h Wed Oct 21 09:44:50 2015 (r289684) +++ head/sys/amd64/include/xen/xen-os.h Wed Oct 21 10:04:35 2015 (r289685) @@ -1,132 +1,6 @@ -/****************************************************************************** - * amd64/xen/xen-os.h - * - * Random collection of macros and definition - * - * Copyright (c) 2003, 2004 Keir Fraser (on behalf of the Xen team) - * All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * $FreeBSD$ +/*- + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE_XEN_XEN_OS_H_ -#define _MACHINE_XEN_XEN_OS_H_ - -#ifdef PAE -#define CONFIG_X86_PAE -#endif - -/* Everything below this point is not included by assembler (.S) files. */ -#ifndef __ASSEMBLY__ - -/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ -static inline void rep_nop(void) -{ - __asm__ __volatile__ ( "rep;nop" : : : "memory" ); -} -#define cpu_relax() rep_nop() - -/* This is a barrier for the compiler only, NOT the processor! */ -#define barrier() __asm__ __volatile__("": : :"memory") - -#define LOCK_PREFIX "" -#define LOCK "" -#define ADDR (*(volatile long *) addr) - -/** - * test_and_clear_bit - Clear a bit and return its old value - * @nr: Bit to set - * @addr: Address to count from - * - * This operation is atomic and cannot be reordered. - * It also implies a memory barrier. - */ -static __inline int test_and_clear_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm__ __volatile__( LOCK_PREFIX - "btrl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"Ir" (nr) : "memory"); - return oldbit; -} - -static __inline int constant_test_bit(int nr, const volatile void * addr) -{ - return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; -} - -static __inline int variable_test_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm__ __volatile__( - "btl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit) - :"m" (ADDR),"Ir" (nr)); - return oldbit; -} - -#define test_bit(nr,addr) \ -(__builtin_constant_p(nr) ? \ - constant_test_bit((nr),(addr)) : \ - variable_test_bit((nr),(addr))) - -/** - * set_bit - Atomically set a bit in memory - * @nr: the bit to set - * @addr: the address to start counting from - * - * This function is atomic and may not be reordered. See __set_bit() - * if you do not require the atomic guarantees. - * Note that @nr may be almost arbitrarily large; this function is not - * restricted to acting on a single-word quantity. - */ -static __inline__ void set_bit(int nr, volatile void * addr) -{ - __asm__ __volatile__( LOCK_PREFIX - "btsl %1,%0" - :"=m" (ADDR) - :"Ir" (nr)); -} - -/** - * clear_bit - Clears a bit in memory - * @nr: Bit to clear - * @addr: Address to start counting from - * - * clear_bit() is atomic and may not be reordered. However, it does - * not contain a memory barrier, so if it is used for locking purposes, - * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() - * in order to ensure changes are visible on other processors. - */ -static __inline__ void clear_bit(int nr, volatile void * addr) -{ - __asm__ __volatile__( LOCK_PREFIX - "btrl %1,%0" - :"=m" (ADDR) - :"Ir" (nr)); -} - -#endif /* !__ASSEMBLY__ */ - -#endif /* _MACHINE_XEN_XEN_OS_H_ */ +#include Modified: head/sys/i386/include/xen/xen-os.h ============================================================================== --- head/sys/i386/include/xen/xen-os.h Wed Oct 21 09:44:50 2015 (r289684) +++ head/sys/i386/include/xen/xen-os.h Wed Oct 21 10:04:35 2015 (r289685) @@ -1,188 +1,6 @@ -/***************************************************************************** - * i386/xen/xen-os.h - * - * Random collection of macros and definition - * - * Copyright (c) 2003, 2004 Keir Fraser (on behalf of the Xen team) - * All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * $FreeBSD$ +/*- + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE_XEN_XEN_OS_H_ -#define _MACHINE_XEN_XEN_OS_H_ - -#ifdef PAE -#define CONFIG_X86_PAE -#endif - -/* Everything below this point is not included by assembler (.S) files. */ -#ifndef __ASSEMBLY__ - -/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ -static inline void rep_nop(void) -{ - __asm__ __volatile__ ( "rep;nop" : : : "memory" ); -} -#define cpu_relax() rep_nop() - -/* This is a barrier for the compiler only, NOT the processor! */ -#define barrier() __asm__ __volatile__("": : :"memory") - -#define LOCK_PREFIX "" -#define LOCK "" -#define ADDR (*(volatile long *) addr) -/* - * Make sure gcc doesn't try to be clever and move things around - * on us. We need to use _exactly_ the address the user gave us, - * not some alias that contains the same information. - */ -typedef struct { volatile int counter; } atomic_t; - -#define xen_xchg(ptr,v) \ - ((__typeof__(*(ptr)))__xchg((unsigned long)(v),(ptr),sizeof(*(ptr)))) -struct __xchg_dummy { unsigned long a[100]; }; -#define __xg(x) ((volatile struct __xchg_dummy *)(x)) -static __inline unsigned long __xchg(unsigned long x, volatile void * ptr, - int size) -{ - switch (size) { - case 1: - __asm__ __volatile__("xchgb %b0,%1" - :"=q" (x) - :"m" (*__xg(ptr)), "0" (x) - :"memory"); - break; - case 2: - __asm__ __volatile__("xchgw %w0,%1" - :"=r" (x) - :"m" (*__xg(ptr)), "0" (x) - :"memory"); - break; - case 4: - __asm__ __volatile__("xchgl %0,%1" - :"=r" (x) - :"m" (*__xg(ptr)), "0" (x) - :"memory"); - break; - } - return x; -} - -/** - * test_and_clear_bit - Clear a bit and return its old value - * @nr: Bit to set - * @addr: Address to count from - * - * This operation is atomic and cannot be reordered. - * It also implies a memory barrier. - */ -static __inline int test_and_clear_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm__ __volatile__( LOCK_PREFIX - "btrl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"Ir" (nr) : "memory"); - return oldbit; -} - -static __inline int constant_test_bit(int nr, const volatile void * addr) -{ - return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; -} - -static __inline int variable_test_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm__ __volatile__( - "btl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit) - :"m" (ADDR),"Ir" (nr)); - return oldbit; -} - -#define test_bit(nr,addr) \ -(__builtin_constant_p(nr) ? \ - constant_test_bit((nr),(addr)) : \ - variable_test_bit((nr),(addr))) - - -/** - * set_bit - Atomically set a bit in memory - * @nr: the bit to set - * @addr: the address to start counting from - * - * This function is atomic and may not be reordered. See __set_bit() - * if you do not require the atomic guarantees. - * Note that @nr may be almost arbitrarily large; this function is not - * restricted to acting on a single-word quantity. - */ -static __inline__ void set_bit(int nr, volatile void * addr) -{ - __asm__ __volatile__( LOCK_PREFIX - "btsl %1,%0" - :"=m" (ADDR) - :"Ir" (nr)); -} - -/** - * clear_bit - Clears a bit in memory - * @nr: Bit to clear - * @addr: Address to start counting from - * - * clear_bit() is atomic and may not be reordered. However, it does - * not contain a memory barrier, so if it is used for locking purposes, - * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() - * in order to ensure changes are visible on other processors. - */ -static __inline__ void clear_bit(int nr, volatile void * addr) -{ - __asm__ __volatile__( LOCK_PREFIX - "btrl %1,%0" - :"=m" (ADDR) - :"Ir" (nr)); -} - -/** - * atomic_inc - increment atomic variable - * @v: pointer of type atomic_t - * - * Atomically increments @v by 1. Note that the guaranteed - * useful range of an atomic_t is only 24 bits. - */ -static __inline__ void atomic_inc(atomic_t *v) -{ - __asm__ __volatile__( - LOCK "incl %0" - :"=m" (v->counter) - :"m" (v->counter)); -} - - -#define rdtscll(val) \ - __asm__ __volatile__("rdtsc" : "=A" (val)) - -#endif /* !__ASSEMBLY__ */ - -#endif /* _MACHINE_XEN_XEN_OS_H_ */ +#include Added: head/sys/x86/include/xen/xen-os.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/x86/include/xen/xen-os.h Wed Oct 21 10:04:35 2015 (r289685) @@ -0,0 +1,132 @@ +/***************************************************************************** + * x86/xen/xen-os.h + * + * Random collection of macros and definition + * + * Copyright (c) 2003, 2004 Keir Fraser (on behalf of the Xen team) + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_X86_XEN_XEN_OS_H_ +#define _MACHINE_X86_XEN_XEN_OS_H_ + +#ifdef PAE +#define CONFIG_X86_PAE +#endif + +/* Everything below this point is not included by assembler (.S) files. */ +#ifndef __ASSEMBLY__ + +/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ +static inline void rep_nop(void) +{ + __asm__ __volatile__ ( "rep;nop" : : : "memory" ); +} +#define cpu_relax() rep_nop() + +/* This is a barrier for the compiler only, NOT the processor! */ +#define barrier() __asm__ __volatile__("": : :"memory") + +#define LOCK_PREFIX "" +#define LOCK "" +#define ADDR (*(volatile long *) addr) + +/** + * test_and_clear_bit - Clear a bit and return its old value + * @nr: Bit to set + * @addr: Address to count from + * + * This operation is atomic and cannot be reordered. + * It also implies a memory barrier. + */ +static __inline int test_and_clear_bit(int nr, volatile void * addr) +{ + int oldbit; + + __asm__ __volatile__( LOCK_PREFIX + "btrl %2,%1\n\tsbbl %0,%0" + :"=r" (oldbit),"=m" (ADDR) + :"Ir" (nr) : "memory"); + return oldbit; +} + +static __inline int constant_test_bit(int nr, const volatile void * addr) +{ + return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; +} + +static __inline int variable_test_bit(int nr, volatile void * addr) +{ + int oldbit; + + __asm__ __volatile__( + "btl %2,%1\n\tsbbl %0,%0" + :"=r" (oldbit) + :"m" (ADDR),"Ir" (nr)); + return oldbit; +} + +#define test_bit(nr,addr) \ +(__builtin_constant_p(nr) ? \ + constant_test_bit((nr),(addr)) : \ + variable_test_bit((nr),(addr))) + +/** + * set_bit - Atomically set a bit in memory + * @nr: the bit to set + * @addr: the address to start counting from + * + * This function is atomic and may not be reordered. See __set_bit() + * if you do not require the atomic guarantees. + * Note that @nr may be almost arbitrarily large; this function is not + * restricted to acting on a single-word quantity. + */ +static __inline__ void set_bit(int nr, volatile void * addr) +{ + __asm__ __volatile__( LOCK_PREFIX + "btsl %1,%0" + :"=m" (ADDR) + :"Ir" (nr)); +} + +/** + * clear_bit - Clears a bit in memory + * @nr: Bit to clear + * @addr: Address to start counting from + * + * clear_bit() is atomic and may not be reordered. However, it does + * not contain a memory barrier, so if it is used for locking purposes, + * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() + * in order to ensure changes are visible on other processors. + */ +static __inline__ void clear_bit(int nr, volatile void * addr) +{ + __asm__ __volatile__( LOCK_PREFIX + "btrl %1,%0" + :"=m" (ADDR) + :"Ir" (nr)); +} + +#endif /* !__ASSEMBLY__ */ + +#endif /* _MACHINE_X86_XEN_XEN_OS_H_ */ From owner-svn-src-all@freebsd.org Wed Oct 21 10:44: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 31CB7A1A9B1; Wed, 21 Oct 2015 10:44:10 +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 EE7AF122C; Wed, 21 Oct 2015 10:44:09 +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 t9LAi99i025475; Wed, 21 Oct 2015 10:44:09 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LAi73I025460; Wed, 21 Oct 2015 10:44:07 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201510211044.t9LAi73I025460@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: Wed, 21 Oct 2015 10:44:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289686 - in head/sys: dev/xen/balloon dev/xen/blkback dev/xen/control dev/xen/grant_table dev/xen/netback dev/xen/netfront dev/xen/xenpci dev/xen/xenstore x86/include x86/include/xen x... X-SVN-Group: head MIME-Version: 1.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, 21 Oct 2015 10:44:10 -0000 Author: royger Date: Wed Oct 21 10:44:07 2015 New Revision: 289686 URL: https://svnweb.freebsd.org/changeset/base/289686 Log: xen: Code cleanup and small bug fixes xen/hypervisor.h: - Remove unused helpers: MULTI_update_va_mapping, is_initial_xendomain, is_running_on_xen - Remove unused define CONFIG_X86_PAE - Remove unused variable xen_start_info: note that it's used inpcifront which is not built at all - Remove forward declaration of HYPERVISOR_crash xen/xen-os.h: - Remove unused define CONFIG_X86_PAE - Drop unused helpers: test_and_clear_bit, clear_bit, force_evtchn_callback - Implement a generic version (based on ofed/include/linux/bitops.h) of set_bit and test_bit and prefix them by xen_ to avoid any use by other code than Xen. Note that It would be worth to investigate a generic implementation in FreeBSD. - Replace barrier() by __compiler_membar() - Replace cpu_relax() by cpu_spinwait(): it's exactly the same as rep;nop = pause xen/xen_intr.h: - Move the prototype of xen_intr_handle_upcall in it: Use by all the platform x86/xen/xen_intr.c: - Use BITSET* for the enabledbits: Avoid to use custom helpers - test_bit/set_bit has been renamed to xen_test_bit/xen_set_bit - Don't export the variable xen_intr_pcpu dev/xen/blkback/blkback.c: - Fix the string format when XBB_DEBUG is enabled: host_addr is typed uint64_t dev/xen/balloon/balloon.c: - Remove set but not used variable - Use the correct type for frame_list: xen_pfn_t represents the frame number on any architecture dev/xen/control/control.c: - Return BUS_PROBE_WILDCARD in xs_probe: Returning 0 in a probe callback means the driver can handle this device. If by any chance xenstore is the first driver, every new device with the driver is unset will use xenstore. dev/xen/grant-table/grant_table.c: - Remove unused cmpxchg - Drop unused include opt_pmap.h: Doesn't exist on ARM64 and it doesn't contain anything required for the code on x86 dev/xen/netfront/netfront.c: - Use the correct type for rx_pfn_array: xen_pfn_t represents the frame number on any architecture dev/xen/netback/netback.c: - Use the correct type for gmfn: xen_pfn_t represents the frame number on any architecture dev/xen/xenstore/xenstore.c: - Return BUS_PROBE_WILDCARD in xctrl_probe: Returning 0 in a probe callback means the driver can handle this device. If by any chance xenstore is the first driver, every new device with the driver is unset will use xenstore. Note that with the changes, x86/include/xen/xen-os.h doesn't contain anymore arch-specific code. Although, a new series will add some helpers that differ between x86 and ARM64, so I've kept the headers for now. Submitted by: Julien Grall Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3921 Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/balloon/balloon.c head/sys/dev/xen/blkback/blkback.c head/sys/dev/xen/control/control.c head/sys/dev/xen/grant_table/grant_table.c head/sys/dev/xen/netback/netback.c head/sys/dev/xen/netfront/netfront.c head/sys/dev/xen/xenpci/xenpci.c head/sys/dev/xen/xenstore/xenstore.c head/sys/x86/include/apicvar.h head/sys/x86/include/xen/xen-os.h head/sys/x86/xen/xen_intr.c head/sys/xen/blkif.h head/sys/xen/hypervisor.h head/sys/xen/xen-os.h head/sys/xen/xen_intr.h Modified: head/sys/dev/xen/balloon/balloon.c ============================================================================== --- head/sys/dev/xen/balloon/balloon.c Wed Oct 21 10:04:35 2015 (r289685) +++ head/sys/dev/xen/balloon/balloon.c Wed Oct 21 10:44:07 2015 (r289686) @@ -57,7 +57,7 @@ static MALLOC_DEFINE(M_BALLOON, "Balloon struct mtx balloon_mutex; /* We increase/decrease in batches which fit in a page */ -static unsigned long frame_list[PAGE_SIZE / sizeof(unsigned long)]; +static xen_pfn_t frame_list[PAGE_SIZE / sizeof(xen_pfn_t)]; struct balloon_stats { /* We aim for 'current allocation' == 'target allocation'. */ @@ -149,7 +149,7 @@ minimum_target(void) static int increase_reservation(unsigned long nr_pages) { - unsigned long pfn, i; + unsigned long i; vm_page_t page; long rc; struct xen_memory_reservation reservation = { @@ -195,7 +195,6 @@ increase_reservation(unsigned long nr_pa TAILQ_REMOVE(&ballooned_pages, page, plinks.q); bs.balloon_low--; - pfn = (VM_PAGE_TO_PHYS(page) >> PAGE_SHIFT); KASSERT(xen_feature(XENFEAT_auto_translated_physmap), ("auto translated physmap but mapping is valid")); @@ -211,7 +210,7 @@ increase_reservation(unsigned long nr_pa static int decrease_reservation(unsigned long nr_pages) { - unsigned long pfn, i; + unsigned long i; vm_page_t page; int need_sleep = 0; int ret; @@ -246,8 +245,7 @@ decrease_reservation(unsigned long nr_pa pmap_zero_page(page); } - pfn = (VM_PAGE_TO_PHYS(page) >> PAGE_SHIFT); - frame_list[i] = pfn; + frame_list[i] = (VM_PAGE_TO_PHYS(page) >> PAGE_SHIFT); TAILQ_INSERT_HEAD(&ballooned_pages, page, plinks.q); bs.balloon_low++; Modified: head/sys/dev/xen/blkback/blkback.c ============================================================================== --- head/sys/dev/xen/blkback/blkback.c Wed Oct 21 10:04:35 2015 (r289685) +++ head/sys/dev/xen/blkback/blkback.c Wed Oct 21 10:44:07 2015 (r289686) @@ -1741,7 +1741,7 @@ xbb_dispatch_io(struct xbb_softc *xbb, s if (__predict_false(map->status != 0)) { DPRINTF("invalid buffer -- could not remap " "it (%d)\n", map->status); - DPRINTF("Mapping(%d): Host Addr 0x%lx, flags " + DPRINTF("Mapping(%d): Host Addr 0x%"PRIx64", flags " "0x%x ref 0x%x, dom %d\n", seg_idx, map->host_addr, map->flags, map->ref, map->dom); Modified: head/sys/dev/xen/control/control.c ============================================================================== --- head/sys/dev/xen/control/control.c Wed Oct 21 10:04:35 2015 (r289685) +++ head/sys/dev/xen/control/control.c Wed Oct 21 10:44:07 2015 (r289686) @@ -365,7 +365,7 @@ xctrl_probe(device_t dev) { device_set_desc(dev, "Xen Control Device"); - return (0); + return (BUS_PROBE_NOWILDCARD); } /** Modified: head/sys/dev/xen/grant_table/grant_table.c ============================================================================== --- head/sys/dev/xen/grant_table/grant_table.c Wed Oct 21 10:04:35 2015 (r289685) +++ head/sys/dev/xen/grant_table/grant_table.c Wed Oct 21 10:44:07 2015 (r289686) @@ -13,8 +13,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_pmap.h" - #include #include #include @@ -27,6 +25,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -40,8 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define cmpxchg(a, b, c) atomic_cmpset_int((volatile u_int *)(a),(b),(c)) - /* External tools reserve first few grant table entries. */ #define NR_RESERVED_ENTRIES 8 #define GREFS_PER_GRANT_FRAME (PAGE_SIZE / sizeof(grant_entry_t)) @@ -291,13 +288,13 @@ gnttab_end_foreign_transfer_ref(grant_re while (!((flags = shared[ref].flags) & GTF_transfer_committed)) { if ( synch_cmpxchg(&shared[ref].flags, flags, 0) == flags ) return (0); - cpu_relax(); + cpu_spinwait(); } /* If a transfer is in progress then wait until it is completed. */ while (!(flags & GTF_transfer_completed)) { flags = shared[ref].flags; - cpu_relax(); + cpu_spinwait(); } /* Read the frame number /after/ reading completion status. */ Modified: head/sys/dev/xen/netback/netback.c ============================================================================== --- head/sys/dev/xen/netback/netback.c Wed Oct 21 10:04:35 2015 (r289685) +++ head/sys/dev/xen/netback/netback.c Wed Oct 21 10:44:07 2015 (r289686) @@ -524,13 +524,15 @@ xnb_dump_gnttab_copy(const struct gnttab if (entry->flags & GNTCOPY_dest_gref) printf("gnttab dest ref=\t%u\n", entry->dest.u.ref); else - printf("gnttab dest gmfn=\t%lu\n", entry->dest.u.gmfn); + printf("gnttab dest gmfn=\t%"PRI_xen_pfn"\n", + entry->dest.u.gmfn); printf("gnttab dest offset=\t%hu\n", entry->dest.offset); printf("gnttab dest domid=\t%hu\n", entry->dest.domid); if (entry->flags & GNTCOPY_source_gref) printf("gnttab source ref=\t%u\n", entry->source.u.ref); else - printf("gnttab source gmfn=\t%lu\n", entry->source.u.gmfn); + printf("gnttab source gmfn=\t%"PRI_xen_pfn"\n", + entry->source.u.gmfn); printf("gnttab source offset=\t%hu\n", entry->source.offset); printf("gnttab source domid=\t%hu\n", entry->source.domid); printf("gnttab len=\t%hu\n", entry->len); Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Wed Oct 21 10:04:35 2015 (r289685) +++ head/sys/dev/xen/netfront/netfront.c Wed Oct 21 10:44:07 2015 (r289686) @@ -232,7 +232,7 @@ struct netfront_info { int xn_if_flags; struct callout xn_stat_ch; - u_long rx_pfn_array[NET_RX_RING_SIZE]; + xen_pfn_t rx_pfn_array[NET_RX_RING_SIZE]; struct ifmedia sc_media; bool xn_resume; Modified: head/sys/dev/xen/xenpci/xenpci.c ============================================================================== --- head/sys/dev/xen/xenpci/xenpci.c Wed Oct 21 10:04:35 2015 (r289685) +++ head/sys/dev/xen/xenpci/xenpci.c Wed Oct 21 10:44:07 2015 (r289686) @@ -43,14 +43,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include -extern void xen_intr_handle_upcall(struct trapframe *trap_frame); - /* * This is used to find our platform device instance. */ Modified: head/sys/dev/xen/xenstore/xenstore.c ============================================================================== --- head/sys/dev/xen/xenstore/xenstore.c Wed Oct 21 10:04:35 2015 (r289685) +++ head/sys/dev/xen/xenstore/xenstore.c Wed Oct 21 10:44:07 2015 (r289686) @@ -1124,7 +1124,7 @@ xs_probe(device_t dev) * Unconditionally return success. */ device_set_desc(dev, "XenStore"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static void Modified: head/sys/x86/include/apicvar.h ============================================================================== --- head/sys/x86/include/apicvar.h Wed Oct 21 10:04:35 2015 (r289685) +++ head/sys/x86/include/apicvar.h Wed Oct 21 10:44:07 2015 (r289686) @@ -455,7 +455,6 @@ void lapic_handle_cmc(void); void lapic_handle_error(void); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); -void xen_intr_handle_upcall(struct trapframe *frame); void hv_vector_handler(struct trapframe *frame); extern int x2apic_mode; Modified: head/sys/x86/include/xen/xen-os.h ============================================================================== --- head/sys/x86/include/xen/xen-os.h Wed Oct 21 10:04:35 2015 (r289685) +++ head/sys/x86/include/xen/xen-os.h Wed Oct 21 10:44:07 2015 (r289686) @@ -30,103 +30,9 @@ #ifndef _MACHINE_X86_XEN_XEN_OS_H_ #define _MACHINE_X86_XEN_XEN_OS_H_ -#ifdef PAE -#define CONFIG_X86_PAE -#endif - /* Everything below this point is not included by assembler (.S) files. */ #ifndef __ASSEMBLY__ -/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ -static inline void rep_nop(void) -{ - __asm__ __volatile__ ( "rep;nop" : : : "memory" ); -} -#define cpu_relax() rep_nop() - -/* This is a barrier for the compiler only, NOT the processor! */ -#define barrier() __asm__ __volatile__("": : :"memory") - -#define LOCK_PREFIX "" -#define LOCK "" -#define ADDR (*(volatile long *) addr) - -/** - * test_and_clear_bit - Clear a bit and return its old value - * @nr: Bit to set - * @addr: Address to count from - * - * This operation is atomic and cannot be reordered. - * It also implies a memory barrier. - */ -static __inline int test_and_clear_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm__ __volatile__( LOCK_PREFIX - "btrl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"Ir" (nr) : "memory"); - return oldbit; -} - -static __inline int constant_test_bit(int nr, const volatile void * addr) -{ - return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; -} - -static __inline int variable_test_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm__ __volatile__( - "btl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit) - :"m" (ADDR),"Ir" (nr)); - return oldbit; -} - -#define test_bit(nr,addr) \ -(__builtin_constant_p(nr) ? \ - constant_test_bit((nr),(addr)) : \ - variable_test_bit((nr),(addr))) - -/** - * set_bit - Atomically set a bit in memory - * @nr: the bit to set - * @addr: the address to start counting from - * - * This function is atomic and may not be reordered. See __set_bit() - * if you do not require the atomic guarantees. - * Note that @nr may be almost arbitrarily large; this function is not - * restricted to acting on a single-word quantity. - */ -static __inline__ void set_bit(int nr, volatile void * addr) -{ - __asm__ __volatile__( LOCK_PREFIX - "btsl %1,%0" - :"=m" (ADDR) - :"Ir" (nr)); -} - -/** - * clear_bit - Clears a bit in memory - * @nr: Bit to clear - * @addr: Address to start counting from - * - * clear_bit() is atomic and may not be reordered. However, it does - * not contain a memory barrier, so if it is used for locking purposes, - * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() - * in order to ensure changes are visible on other processors. - */ -static __inline__ void clear_bit(int nr, volatile void * addr) -{ - __asm__ __volatile__( LOCK_PREFIX - "btrl %1,%0" - :"=m" (ADDR) - :"Ir" (nr)); -} - #endif /* !__ASSEMBLY__ */ #endif /* _MACHINE_X86_XEN_XEN_OS_H_ */ Modified: head/sys/x86/xen/xen_intr.c ============================================================================== --- head/sys/x86/xen/xen_intr.c Wed Oct 21 10:04:35 2015 (r289685) +++ head/sys/x86/xen/xen_intr.c Wed Oct 21 10:44:07 2015 (r289686) @@ -71,6 +71,9 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_XENINTR, "xen_intr", "Xen Interrupt Services"); +#define ENABLED_SETSIZE (sizeof(u_long) * 8) +BITSET_DEFINE(enabledbits, ENABLED_SETSIZE) + /** * Per-cpu event channel processing state. */ @@ -95,14 +98,14 @@ struct xen_intr_pcpu_data { * A bitmap of ports that can be serviced from this CPU. * A set bit means interrupt handling is enabled. */ - u_long evtchn_enabled[sizeof(u_long) * 8]; + struct enabledbits evtchn_enabled; }; /* * Start the scan at port 0 by initializing the last scanned * location as the highest numbered event channel port. */ -DPCPU_DEFINE(struct xen_intr_pcpu_data, xen_intr_pcpu) = { +static DPCPU_DEFINE(struct xen_intr_pcpu_data, xen_intr_pcpu) = { .last_processed_l1i = LONG_BIT - 1, .last_processed_l2i = LONG_BIT - 1 }; @@ -212,7 +215,7 @@ evtchn_cpu_mask_port(u_int cpu, evtchn_p struct xen_intr_pcpu_data *pcpu; pcpu = DPCPU_ID_PTR(cpu, xen_intr_pcpu); - clear_bit(port, pcpu->evtchn_enabled); + BIT_CLR_ATOMIC(ENABLED_SETSIZE, port, &pcpu->evtchn_enabled); } /** @@ -234,7 +237,7 @@ evtchn_cpu_unmask_port(u_int cpu, evtchn struct xen_intr_pcpu_data *pcpu; pcpu = DPCPU_ID_PTR(cpu, xen_intr_pcpu); - set_bit(port, pcpu->evtchn_enabled); + BIT_SET_ATOMIC(ENABLED_SETSIZE, port, &pcpu->evtchn_enabled); } /** @@ -498,7 +501,7 @@ xen_intr_active_ports(struct xen_intr_pc { return (sh->evtchn_pending[idx] & ~sh->evtchn_mask[idx] - & pcpu->evtchn_enabled[idx]); + & pcpu->evtchn_enabled.__bits[idx]); } /** @@ -634,8 +637,10 @@ xen_intr_init(void *dummy __unused) */ CPU_FOREACH(i) { pcpu = DPCPU_ID_PTR(i, xen_intr_pcpu); - memset(pcpu->evtchn_enabled, i == 0 ? ~0 : 0, - sizeof(pcpu->evtchn_enabled)); + if (i == 0) + BIT_FILL(ENABLED_SETSIZE, &pcpu->evtchn_enabled); + else + BIT_ZERO(ENABLED_SETSIZE, &pcpu->evtchn_enabled); xen_intr_intrcnt_add(i); } @@ -748,8 +753,11 @@ xen_intr_resume(struct pic *unused, bool struct xen_intr_pcpu_data *pcpu; pcpu = DPCPU_ID_PTR(i, xen_intr_pcpu); - memset(pcpu->evtchn_enabled, - i == 0 ? ~0 : 0, sizeof(pcpu->evtchn_enabled)); + + if (i == 0) + BIT_FILL(ENABLED_SETSIZE, &pcpu->evtchn_enabled); + else + BIT_ZERO(ENABLED_SETSIZE, &pcpu->evtchn_enabled); } /* Mask all event channels. */ @@ -1033,7 +1041,7 @@ xen_intr_pirq_eoi_source(struct intsrc * isrc = (struct xenisrc *)base_isrc; - if (test_bit(isrc->xi_pirq, xen_intr_pirq_eoi_map)) { + if (xen_test_bit(isrc->xi_pirq, xen_intr_pirq_eoi_map)) { struct physdev_eoi eoi = { .irq = isrc->xi_pirq }; error = HYPERVISOR_physdev_op(PHYSDEVOP_eoi, &eoi); @@ -1070,7 +1078,7 @@ xen_intr_pirq_enable_intr(struct intsrc * Since the dynamic PIRQ EOI map is not available * mark the PIRQ as needing EOI unconditionally. */ - set_bit(isrc->xi_pirq, xen_intr_pirq_eoi_map); + xen_set_bit(isrc->xi_pirq, xen_intr_pirq_eoi_map); } } @@ -1591,20 +1599,21 @@ xen_intr_dump_port(struct xenisrc *isrc) db_printf("\tPirq: %d ActiveHi: %d EdgeTrigger: %d " "NeedsEOI: %d\n", isrc->xi_pirq, isrc->xi_activehi, isrc->xi_edgetrigger, - !!test_bit(isrc->xi_pirq, xen_intr_pirq_eoi_map)); + !!xen_test_bit(isrc->xi_pirq, xen_intr_pirq_eoi_map)); } if (isrc->xi_type == EVTCHN_TYPE_VIRQ) db_printf("\tVirq: %d\n", isrc->xi_virq); db_printf("\tMasked: %d Pending: %d\n", - !!test_bit(isrc->xi_port, &s->evtchn_mask[0]), - !!test_bit(isrc->xi_port, &s->evtchn_pending[0])); + !!xen_test_bit(isrc->xi_port, &s->evtchn_mask[0]), + !!xen_test_bit(isrc->xi_port, &s->evtchn_pending[0])); db_printf("\tPer-CPU Masks: "); CPU_FOREACH(i) { pcpu = DPCPU_ID_PTR(i, xen_intr_pcpu); db_printf("cpu#%d: %d ", i, - !!test_bit(isrc->xi_port, pcpu->evtchn_enabled)); + BIT_ISSET(ENABLED_SETSIZE, isrc->xi_port, + &pcpu->evtchn_enabled)); } db_printf("\n"); } Modified: head/sys/xen/blkif.h ============================================================================== --- head/sys/xen/blkif.h Wed Oct 21 10:04:35 2015 (r289685) +++ head/sys/xen/blkif.h Wed Oct 21 10:44:07 2015 (r289686) @@ -120,7 +120,7 @@ static void inline blkif_get_x86_32_req( dst->handle = src->handle; dst->id = src->id; dst->sector_number = src->sector_number; - barrier(); + __compiler_membar(); if (n > dst->nr_segments) n = dst->nr_segments; for (i = 0; i < n; i++) @@ -135,7 +135,7 @@ static void inline blkif_get_x86_64_req( dst->handle = src->handle; dst->id = src->id; dst->sector_number = src->sector_number; - barrier(); + __compiler_membar(); if (n > dst->nr_segments) n = dst->nr_segments; for (i = 0; i < n; i++) Modified: head/sys/xen/hypervisor.h ============================================================================== --- head/sys/xen/hypervisor.h Wed Oct 21 10:04:35 2015 (r289685) +++ head/sys/xen/hypervisor.h Wed Oct 21 10:44:07 2015 (r289686) @@ -11,22 +11,6 @@ #ifndef __XEN_HYPERVISOR_H__ #define __XEN_HYPERVISOR_H__ -#ifdef XENHVM - -#define is_running_on_xen() (HYPERVISOR_shared_info != NULL) - -#else - -#define is_running_on_xen() 1 - -#endif - -#ifdef PAE -#ifndef CONFIG_X86_PAE -#define CONFIG_X86_PAE -#endif -#endif - #include #include #include @@ -38,22 +22,6 @@ #include #include -#if defined(__amd64__) -#define MULTI_UVMFLAGS_INDEX 2 -#define MULTI_UVMDOMID_INDEX 3 -#else -#define MULTI_UVMFLAGS_INDEX 3 -#define MULTI_UVMDOMID_INDEX 4 -#endif - -#ifdef CONFIG_XEN_PRIVILEGED_GUEST -#define is_initial_xendomain() (xen_start_info->flags & SIF_INITDOMAIN) -#else -#define is_initial_xendomain() 0 -#endif - -extern start_info_t *xen_start_info; - extern uint64_t get_system_time(int ticks); static inline int @@ -62,8 +30,6 @@ HYPERVISOR_console_write(const char *str return HYPERVISOR_console_io(CONSOLEIO_write, count, str); } -static inline void HYPERVISOR_crash(void) __dead2; - static inline int HYPERVISOR_yield(void) { @@ -132,23 +98,4 @@ HYPERVISOR_poll( return (rc); } -static inline void -MULTI_update_va_mapping( - multicall_entry_t *mcl, unsigned long va, - uint64_t new_val, unsigned long flags) -{ - mcl->op = __HYPERVISOR_update_va_mapping; - mcl->args[0] = va; -#if defined(__amd64__) - mcl->args[1] = new_val; -#elif defined(PAE) - mcl->args[1] = (uint32_t)(new_val & 0xffffffff) ; - mcl->args[2] = (uint32_t)(new_val >> 32); -#else - mcl->args[1] = new_val; - mcl->args[2] = 0; -#endif - mcl->args[MULTI_UVMFLAGS_INDEX] = flags; -} - #endif /* __XEN_HYPERVISOR_H__ */ Modified: head/sys/xen/xen-os.h ============================================================================== --- head/sys/xen/xen-os.h Wed Oct 21 10:04:35 2015 (r289685) +++ head/sys/xen/xen-os.h Wed Oct 21 10:44:07 2015 (r289686) @@ -47,9 +47,6 @@ /* Everything below this point is not included by assembler (.S) files. */ #ifndef __ASSEMBLY__ -/* Force a proper event-channel callback from Xen. */ -void force_evtchn_callback(void); - extern shared_info_t *HYPERVISOR_shared_info; extern start_info_t *HYPERVISOR_start_info; @@ -93,6 +90,31 @@ xen_initial_domain(void) } /* + * Based on ofed/include/linux/bitops.h + * + * Those helpers are prefixed by xen_ because xen-os.h is widely included + * and we don't want the other drivers using them. + * + */ +#define NBPL (NBBY * sizeof(long)) + +static inline bool +xen_test_bit(int bit, volatile long *addr) +{ + unsigned long mask = 1UL << (bit % NBPL); + + return !!(atomic_load_acq_long(&addr[bit / NBPL]) & mask); +} + +static inline void +xen_set_bit(int bit, volatile long *addr) +{ + atomic_set_long(&addr[bit / NBPL], 1UL << (bit % NBPL)); +} + +#undef NPBL + +/* * Functions to allocate/free unused memory in order * to map memory from other domains. */ Modified: head/sys/xen/xen_intr.h ============================================================================== --- head/sys/xen/xen_intr.h Wed Oct 21 10:04:35 2015 (r289685) +++ head/sys/xen/xen_intr.h Wed Oct 21 10:44:07 2015 (r289686) @@ -41,6 +41,8 @@ typedef void * xen_intr_handle_t; /** If non-zero, the hypervisor has been configured to use a direct vector */ extern int xen_vector_callback_enabled; +void xen_intr_handle_upcall(struct trapframe *trap_frame); + /** * Associate an already allocated local event channel port an interrupt * handler. From owner-svn-src-all@freebsd.org Wed Oct 21 11:38: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 5FAB9A1A99C; Wed, 21 Oct 2015 11:38: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 2CD34F31; Wed, 21 Oct 2015 11:38: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 t9LBcmjS040030; Wed, 21 Oct 2015 11:38:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LBcmQ8040029; Wed, 21 Oct 2015 11:38:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510211138.t9LBcmQ8040029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 21 Oct 2015 11:38:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289687 - head/usr.sbin/makefs/cd9660 X-SVN-Group: head MIME-Version: 1.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, 21 Oct 2015 11:38:49 -0000 Author: ngie Date: Wed Oct 21 11:38:48 2015 New Revision: 289687 URL: https://svnweb.freebsd.org/changeset/base/289687 Log: Free buffer before returning from cd9660_write_path_table to avoid leaking it after returning from the function MFC after: 1 week PR: 203647 Submitted by: Thomas Schmitt Coverity CID: 978431 Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/makefs/cd9660/cd9660_write.c Modified: head/usr.sbin/makefs/cd9660/cd9660_write.c ============================================================================== --- head/usr.sbin/makefs/cd9660/cd9660_write.c Wed Oct 21 10:44:07 2015 (r289686) +++ head/usr.sbin/makefs/cd9660/cd9660_write.c Wed Oct 21 11:38:48 2015 (r289687) @@ -165,7 +165,7 @@ cd9660_write_path_table(FILE *fd, off_t diskStructure.pathTableLength); unsigned char *buffer; unsigned char *buffer_head; - int len; + int len, ret; path_table_entry temp_entry; cd9660node *ptcur; @@ -213,8 +213,10 @@ cd9660_write_path_table(FILE *fd, off_t ptcur = ptcur->ptnext; } - return cd9660_write_filedata(fd, sector, buffer_head, + ret = cd9660_write_filedata(fd, sector, buffer_head, path_table_sectors); + free(buffer); + return ret; } From owner-svn-src-all@freebsd.org Wed Oct 21 12:08: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 67344A1A844; Wed, 21 Oct 2015 12:08: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 28B8D327; Wed, 21 Oct 2015 12:08:32 +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 t9LC8VKo048665; Wed, 21 Oct 2015 12:08:31 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LC8VbD048664; Wed, 21 Oct 2015 12:08:31 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510211208.t9LC8VbD048664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 21 Oct 2015 12:08:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289689 - vendor/illumos/dist/cmd/zfs X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 12:08:32 -0000 Author: mav Date: Wed Oct 21 12:08:31 2015 New Revision: 289689 URL: https://svnweb.freebsd.org/changeset/base/289689 Log: 5984 zfs clone should not mount the clone if canmount == noauto Reviewed by: Matthew Ahrens Reviewed by: Justin Gibbs Reviewed by: Richard Elling Approved by: Matthew Ahrens illumos/illumos-gate@780828c8aa1df2dc6f2066107a4aa8d045297972 Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c ============================================================================== --- vendor/illumos/dist/cmd/zfs/zfs_main.c Wed Oct 21 11:43:18 2015 (r289688) +++ vendor/illumos/dist/cmd/zfs/zfs_main.c Wed Oct 21 12:08:31 2015 (r289689) @@ -582,6 +582,17 @@ finish_progress(char *done) } /* + * Check if the dataset is mountable and should be automatically mounted. + */ +static boolean_t +should_auto_mount(zfs_handle_t *zhp) +{ + if (!zfs_prop_valid_for_type(ZFS_PROP_CANMOUNT, zfs_get_type(zhp))) + return (B_FALSE); + return (zfs_prop_get_int(zhp, ZFS_PROP_CANMOUNT) == ZFS_CANMOUNT_ON); +} + +/* * zfs clone [-p] [-o prop=value] ... * * Given an existing dataset, create a writable copy whose initial contents @@ -666,9 +677,22 @@ zfs_do_clone(int argc, char **argv) clone = zfs_open(g_zfs, argv[1], ZFS_TYPE_DATASET); if (clone != NULL) { - if (zfs_get_type(clone) != ZFS_TYPE_VOLUME) - if ((ret = zfs_mount(clone, NULL, 0)) == 0) - ret = zfs_share(clone); + /* + * If the user doesn't want the dataset + * automatically mounted, then skip the mount/share + * step. + */ + if (should_auto_mount(clone)) { + if ((ret = zfs_mount(clone, NULL, 0)) != 0) { + (void) fprintf(stderr, gettext("clone " + "successfully created, " + "but not mounted\n")); + } else if ((ret = zfs_share(clone)) != 0) { + (void) fprintf(stderr, gettext("clone " + "successfully created, " + "but not shared\n")); + } + } zfs_close(clone); } } @@ -714,7 +738,6 @@ zfs_do_create(int argc, char **argv) int ret = 1; nvlist_t *props; uint64_t intval; - int canmount = ZFS_CANMOUNT_OFF; if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0) nomem(); @@ -858,19 +881,15 @@ zfs_do_create(int argc, char **argv) goto error; ret = 0; - /* - * if the user doesn't want the dataset automatically mounted, - * then skip the mount/share step - */ - if (zfs_prop_valid_for_type(ZFS_PROP_CANMOUNT, type)) - canmount = zfs_prop_get_int(zhp, ZFS_PROP_CANMOUNT); /* * Mount and/or share the new filesystem as appropriate. We provide a * verbose error message to let the user know that their filesystem was * in fact created, even if we failed to mount or share it. + * If the user doesn't want the dataset automatically mounted, + * then skip the mount/share step altogether. */ - if (canmount == ZFS_CANMOUNT_ON) { + if (should_auto_mount(zhp)) { if (zfs_mount(zhp, NULL, 0) != 0) { (void) fprintf(stderr, gettext("filesystem " "successfully created, but not mounted\n")); From owner-svn-src-all@freebsd.org Wed Oct 21 12:16: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 CC1FBA1AB28; Wed, 21 Oct 2015 12:16: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 803FDAEE; Wed, 21 Oct 2015 12:16: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 t9LCGcOT051527; Wed, 21 Oct 2015 12:16:38 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LCGclG051526; Wed, 21 Oct 2015 12:16:38 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510211216.t9LCGclG051526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 21 Oct 2015 12:16:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289690 - in head/cddl/contrib/opensolaris: . cmd/zfs X-SVN-Group: head MIME-Version: 1.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, 21 Oct 2015 12:16:39 -0000 Author: mav Date: Wed Oct 21 12:16:38 2015 New Revision: 289690 URL: https://svnweb.freebsd.org/changeset/base/289690 Log: Record MFV r289689. The change itself was directly committed earlier at r284309. Modified: Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) From owner-svn-src-all@freebsd.org Wed Oct 21 12:54: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 4AFBCA1B57A; Wed, 21 Oct 2015 12:54:17 +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 12D0C1FA6; Wed, 21 Oct 2015 12:54: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 t9LCsGYG063398; Wed, 21 Oct 2015 12:54:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LCsGlI063397; Wed, 21 Oct 2015 12:54:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510211254.t9LCsGlI063397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 21 Oct 2015 12:54:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289693 - head/usr.sbin/makefs/cd9660 X-SVN-Group: head MIME-Version: 1.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, 21 Oct 2015 12:54:17 -0000 Author: ngie Date: Wed Oct 21 12:54:15 2015 New Revision: 289693 URL: https://svnweb.freebsd.org/changeset/base/289693 Log: Unbreak makefs -t cd9660 after r289687 buffer_head needs to be freed -- not buffer Detected by jemalloc, i.e. running makefs failed the arena assert because my copy of malloc on CURRENT is compiled with the default !MALLOC_PRODUCTION asserts on Pointyhat to: ngie PR: 203647 X-MFC with: r289687 Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/makefs/cd9660/cd9660_write.c Modified: head/usr.sbin/makefs/cd9660/cd9660_write.c ============================================================================== --- head/usr.sbin/makefs/cd9660/cd9660_write.c Wed Oct 21 12:44:51 2015 (r289692) +++ head/usr.sbin/makefs/cd9660/cd9660_write.c Wed Oct 21 12:54:15 2015 (r289693) @@ -215,7 +215,7 @@ cd9660_write_path_table(FILE *fd, off_t ret = cd9660_write_filedata(fd, sector, buffer_head, path_table_sectors); - free(buffer); + free(buffer_head); return ret; } From owner-svn-src-all@freebsd.org Wed Oct 21 13: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 BD306A1B9F9; Wed, 21 Oct 2015 13:13: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 84E48BF6; Wed, 21 Oct 2015 13:13: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 t9LDDdCs069181; Wed, 21 Oct 2015 13:13:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LDDch8069172; Wed, 21 Oct 2015 13:13:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510211313.t9LDDch8069172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 21 Oct 2015 13:13:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289694 - in head: etc/mtree usr.sbin/makefs usr.sbin/makefs/cd9660 usr.sbin/makefs/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, 21 Oct 2015 13:13:40 -0000 Author: ngie Date: Wed Oct 21 13:13:38 2015 New Revision: 289694 URL: https://svnweb.freebsd.org/changeset/base/289694 Log: Add some rudimentary [smoke] testcases for makefs MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Added: head/usr.sbin/makefs/tests/ head/usr.sbin/makefs/tests/Makefile (contents, props changed) head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh (contents, props changed) head/usr.sbin/makefs/tests/makefs_ffs_tests.sh (contents, props changed) head/usr.sbin/makefs/tests/makefs_tests_common.sh (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/usr.sbin/makefs/Makefile head/usr.sbin/makefs/cd9660/iso9660_rrip.c head/usr.sbin/makefs/makefs.8 head/usr.sbin/makefs/makefs.c Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Wed Oct 21 12:54:15 2015 (r289693) +++ head/etc/mtree/BSD.tests.dist Wed Oct 21 13:13:38 2015 (r289694) @@ -596,6 +596,8 @@ .. fstyp .. + makefs + .. newsyslog .. nmtree Modified: head/usr.sbin/makefs/Makefile ============================================================================== --- head/usr.sbin/makefs/Makefile Wed Oct 21 12:54:15 2015 (r289693) +++ head/usr.sbin/makefs/Makefile Wed Oct 21 13:13:38 2015 (r289694) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + PROG= makefs CFLAGS+=-I${.CURDIR} @@ -32,4 +34,8 @@ SRCS+= ffs_tables.c CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd LIBADD= netbsd util sbuf +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: head/usr.sbin/makefs/cd9660/iso9660_rrip.c ============================================================================== --- head/usr.sbin/makefs/cd9660/iso9660_rrip.c Wed Oct 21 12:54:15 2015 (r289693) +++ head/usr.sbin/makefs/cd9660/iso9660_rrip.c Wed Oct 21 13:13:38 2015 (r289694) @@ -1,4 +1,4 @@ -/* $NetBSD: iso9660_rrip.c,v 1.11 2012/04/29 13:32:21 joerg Exp $ */ +/* $NetBSD: iso9660_rrip.c,v 1.14 2014/05/30 13:14:47 martin Exp $ */ /* * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan @@ -656,13 +656,14 @@ cd9660node_rrip_pn(struct ISO_SUSP_ATTRI pn_field->attr.rr_entry.PN.h.length[0] = 20; pn_field->attr.rr_entry.PN.h.version[0] = 1; - if (sizeof (fnode->inode->st.st_dev) > 32) - cd9660_bothendian_dword((uint64_t)fnode->inode->st.st_dev >> 32, + if (sizeof (fnode->inode->st.st_rdev) > 4) + cd9660_bothendian_dword( + (uint64_t)fnode->inode->st.st_rdev >> 32, pn_field->attr.rr_entry.PN.high); else cd9660_bothendian_dword(0, pn_field->attr.rr_entry.PN.high); - cd9660_bothendian_dword(fnode->inode->st.st_dev & 0xffffffff, + cd9660_bothendian_dword(fnode->inode->st.st_rdev & 0xffffffff, pn_field->attr.rr_entry.PN.low); return 1; } Modified: head/usr.sbin/makefs/makefs.8 ============================================================================== --- head/usr.sbin/makefs/makefs.8 Wed Oct 21 12:54:15 2015 (r289693) +++ head/usr.sbin/makefs/makefs.8 Wed Oct 21 13:13:38 2015 (r289694) @@ -53,7 +53,7 @@ .Op Fl m Ar maximum-size .Op Fl N Ar userdb-dir .Op Fl o Ar fs-options -.Op Fl r Ar roundup +.Op Fl R Ar roundup-size .Op Fl S Ar sector-size .Op Fl s Ar image-size .Op Fl t Ar fs-type @@ -196,9 +196,12 @@ Deprecated. See the .Fl Z flag. -.It Fl r Ar roundup -Round the image up to specified block size that should be multiple -of block size. +.It Fl R Ar roundup-size +Round the image up to +.Ar roundup-size . +.Ar roundup-size +should be a multiple of the file system block size specified by +.Ar bsize . .It Fl S Ar sector-size Set the file system sector size to .Ar sector-size . @@ -277,6 +280,11 @@ or .Ql time . .It Sy extent Maximum extent size. +.It Sy roundup +Round the image up to +.Ar roundup-size . +should be a multiple of +.Ar bsize . .It Sy maxbpcg Maximum total number of blocks in a cylinder group. .It Sy version Modified: head/usr.sbin/makefs/makefs.c ============================================================================== --- head/usr.sbin/makefs/makefs.c Wed Oct 21 12:54:15 2015 (r289693) +++ head/usr.sbin/makefs/makefs.c Wed Oct 21 13:13:38 2015 (r289694) @@ -209,10 +209,10 @@ main(int argc, char *argv[]) fsoptions.sparse = 1; break; - case 'r': + case 'R': /* Round image size up to specified block size */ fsoptions.roundup = - strsuftoll("roundup", optarg, 0, LLONG_MAX); + strsuftoll("roundup-size", optarg, 0, LLONG_MAX); break; case 's': @@ -365,7 +365,7 @@ usage(void) prog = getprogname(); fprintf(stderr, "usage: %s [-t fs-type] [-o fs-options] [-d debug-mask] [-B endian]\n" -"\t[-S sector-size] [-M minimum-size] [-m maximum-size] [-r roundup ]\n" +"\t[-S sector-size] [-M minimum-size] [-m maximum-size] [-R roundup-size]\n" "\t[-s image-size] [-b free-blocks] [-f free-files] [-F mtree-specfile]\n" "\t[-xZ] [-N userdb-dir] image-file directory | manifest [extra-directory ...]\n", prog); Added: head/usr.sbin/makefs/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/makefs/tests/Makefile Wed Oct 21 13:13:38 2015 (r289694) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +ATF_TESTS_SH+= makefs_cd9660_tests +ATF_TESTS_SH+= makefs_ffs_tests + +BINDIR= ${TESTSDIR} + +SCRIPTS+= makefs_tests_common.sh +SCRIPTSNAME_makefs_tests_common.sh= makefs_tests_common.sh + +.for t in ${ATF_TESTS_SH} +TEST_METADATA.$t+= required_user="root" +.endfor + +.include Added: head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Wed Oct 21 13:13:38 2015 (r289694) @@ -0,0 +1,62 @@ +# +# Copyright 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: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * 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 COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# $FreeBSD$ +# + +. "$(dirname "$0")/makefs_tests_common.sh" + +MAKEFS="makefs -t cd9660" +TEST_IMAGE="test.iso" + +atf_test_case basic_cd9660 cleanup +basic_cd9660_body() +{ + create_test_inputs + + atf_check -e empty -o empty -s exit:0 \ + $MAKEFS $TEST_IMAGE $TEST_INPUTS_DIR + atf_check -e empty -o save:$TEST_MD_DEVICE_FILE -s exit:0 \ + mdconfig -a -f $TEST_IMAGE + atf_check -e empty -o empty -s exit:0 \ + mount_cd9660 /dev/$(cat $TEST_MD_DEVICE_FILE) $TEST_MOUNT_DIR + atf_check -e empty -o not-empty -s exit:0 ls $TEST_MOUNT_DIR +} +basic_cd9660_cleanup() +{ + ls -a + + test_md_device=$(cat $TEST_MD_DEVICE_FILE) || return + + umount -f /dev/$test_md_device + mdconfig -d -u $test_md_device +} + +atf_init_test_cases() +{ + + atf_add_test_case basic_cd9660 +} Added: head/usr.sbin/makefs/tests/makefs_ffs_tests.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/makefs/tests/makefs_ffs_tests.sh Wed Oct 21 13:13:38 2015 (r289694) @@ -0,0 +1,64 @@ +# +# Copyright 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: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * 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 COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# $FreeBSD$ +# + +. "$(dirname "$0")/makefs_tests_common.sh" + +MAKEFS="makefs -t ffs" +TEST_IMAGE="test.img" + +atf_test_case basic_ffs cleanup +basic_ffs_body() +{ + create_test_inputs + + atf_check -e empty -o not-empty -s exit:0 \ + $MAKEFS -M 1m $TEST_IMAGE $TEST_INPUTS_DIR + atf_check -e empty -o save:$TEST_MD_DEVICE_FILE -s exit:0 \ + mdconfig -a -f $TEST_IMAGE + atf_check -e save:$ATF_TMPDIR/tunefs.output -o empty -s exit:0 \ + tunefs -p /dev/$(cat $TEST_MD_DEVICE_FILE) + atf_check -e empty -o empty -s exit:0 \ + mount /dev/$(cat $TEST_MD_DEVICE_FILE) $TEST_MOUNT_DIR + atf_check -e empty -o not-empty -s exit:0 ls $TEST_MOUNT_DIR +} +basic_ffs_cleanup() +{ + ls -a + + test_md_device=$(cat $TEST_MD_DEVICE_FILE) || return + + umount -f /dev/$test_md_device + mdconfig -d -u $test_md_device +} + +atf_init_test_cases() +{ + + atf_add_test_case basic_ffs +} Added: head/usr.sbin/makefs/tests/makefs_tests_common.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/makefs/tests/makefs_tests_common.sh Wed Oct 21 13:13:38 2015 (r289694) @@ -0,0 +1,81 @@ +# +# Copyright 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: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * 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 COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# $FreeBSD$ +# + +TEST_MD_DEVICE_FILE="md.output" +TEST_MOUNT_DIR="mnt" + +create_test_dir() +{ + [ -z "$ATF_TMPDIR" ] || return 0 + + export ATF_TMPDIR=$(pwd) + + TEST_MD_DEVICE_FILE="${ATF_TMPDIR}/${TEST_MD_DEVICE_FILE}" + TEST_MOUNT_DIR="${ATF_TMPDIR}/${TEST_MOUNT_DIR}" + + # XXX: need to nest this because of how kyua creates $TMPDIR; otherwise + # it will run into EPERM issues later + TEST_INPUTS_DIR="${ATF_TMPDIR}/test/inputs" + + atf_check -e empty -s exit:0 mkdir -m 0777 -p $TEST_MOUNT_DIR + atf_check -e empty -s exit:0 mkdir -m 0777 -p $TEST_INPUTS_DIR + cd $TEST_INPUTS_DIR +} + +create_test_inputs() +{ + create_test_dir + + atf_check -e empty -s exit:0 mkdir -m 0755 -p a/b/1 + atf_check -e empty -s exit:0 ln -s a/b c + atf_check -e empty -s exit:0 touch d + atf_check -e empty -s exit:0 ln d e + atf_check -e empty -s exit:0 touch .f + atf_check -e empty -s exit:0 mkdir .g + atf_check -e empty -s exit:0 mkfifo h + atf_check -e ignore -s exit:0 dd if=/dev/zero of=i count=1000 bs=1 + atf_check -e empty -s exit:0 touch klmn + atf_check -e empty -s exit:0 touch opqr + atf_check -e empty -s exit:0 touch stuv + atf_check -e empty -s exit:0 install -m 0755 /dev/null wxyz + atf_check -e empty -s exit:0 touch 0b00000001 + atf_check -e empty -s exit:0 touch 0b00000010 + atf_check -e empty -s exit:0 touch 0b00000011 + atf_check -e empty -s exit:0 touch 0b00000100 + atf_check -e empty -s exit:0 touch 0b00000101 + atf_check -e empty -s exit:0 touch 0b00000110 + atf_check -e empty -s exit:0 touch 0b00000111 + atf_check -e empty -s exit:0 touch 0b00001000 + atf_check -e empty -s exit:0 touch 0b00001001 + atf_check -e empty -s exit:0 touch 0b00001010 + atf_check -e empty -s exit:0 touch 0b00001011 + atf_check -e empty -s exit:0 touch 0b00001100 + atf_check -e empty -s exit:0 touch 0b00001101 + atf_check -e empty -s exit:0 touch 0b00001110 +} From owner-svn-src-all@freebsd.org Wed Oct 21 13:15: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 107FEA1BA7B; Wed, 21 Oct 2015 13:15: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 C273AD73; Wed, 21 Oct 2015 13:15: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 t9LDF4Yc069300; Wed, 21 Oct 2015 13:15:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LDF4R2069294; Wed, 21 Oct 2015 13:15:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510211315.t9LDF4R2069294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 21 Oct 2015 13:15:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289695 - in head: etc/mtree lib/libc/gen usr.sbin/makefs usr.sbin/makefs/cd9660 usr.sbin/makefs/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, 21 Oct 2015 13:15:06 -0000 Author: ngie Date: Wed Oct 21 13:15:04 2015 New Revision: 289695 URL: https://svnweb.freebsd.org/changeset/base/289695 Log: Revert r289694 I committed some other undesirable local changes by accident Deleted: head/usr.sbin/makefs/tests/ Modified: head/etc/mtree/BSD.tests.dist head/lib/libc/gen/dirname.3 head/usr.sbin/makefs/Makefile head/usr.sbin/makefs/cd9660/iso9660_rrip.c head/usr.sbin/makefs/makefs.8 head/usr.sbin/makefs/makefs.c Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Wed Oct 21 13:13:38 2015 (r289694) +++ head/etc/mtree/BSD.tests.dist Wed Oct 21 13:15:04 2015 (r289695) @@ -596,8 +596,6 @@ .. fstyp .. - makefs - .. newsyslog .. nmtree Modified: head/lib/libc/gen/dirname.3 ============================================================================== --- head/lib/libc/gen/dirname.3 Wed Oct 21 13:13:38 2015 (r289694) +++ head/lib/libc/gen/dirname.3 Wed Oct 21 13:15:04 2015 (r289695) @@ -78,6 +78,8 @@ The following error codes may be set in .It Bq Er ENAMETOOLONG The path component to be returned was larger than .Dv MAXPATHLEN . +.It Bq Er ENOMEM +The path component to be returned was larger than .El .Sh SEE ALSO .Xr basename 1 , Modified: head/usr.sbin/makefs/Makefile ============================================================================== --- head/usr.sbin/makefs/Makefile Wed Oct 21 13:13:38 2015 (r289694) +++ head/usr.sbin/makefs/Makefile Wed Oct 21 13:15:04 2015 (r289695) @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - PROG= makefs CFLAGS+=-I${.CURDIR} @@ -34,8 +32,4 @@ SRCS+= ffs_tables.c CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd LIBADD= netbsd util sbuf -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif - .include Modified: head/usr.sbin/makefs/cd9660/iso9660_rrip.c ============================================================================== --- head/usr.sbin/makefs/cd9660/iso9660_rrip.c Wed Oct 21 13:13:38 2015 (r289694) +++ head/usr.sbin/makefs/cd9660/iso9660_rrip.c Wed Oct 21 13:15:04 2015 (r289695) @@ -1,4 +1,4 @@ -/* $NetBSD: iso9660_rrip.c,v 1.14 2014/05/30 13:14:47 martin Exp $ */ +/* $NetBSD: iso9660_rrip.c,v 1.11 2012/04/29 13:32:21 joerg Exp $ */ /* * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan @@ -656,14 +656,13 @@ cd9660node_rrip_pn(struct ISO_SUSP_ATTRI pn_field->attr.rr_entry.PN.h.length[0] = 20; pn_field->attr.rr_entry.PN.h.version[0] = 1; - if (sizeof (fnode->inode->st.st_rdev) > 4) - cd9660_bothendian_dword( - (uint64_t)fnode->inode->st.st_rdev >> 32, + if (sizeof (fnode->inode->st.st_dev) > 32) + cd9660_bothendian_dword((uint64_t)fnode->inode->st.st_dev >> 32, pn_field->attr.rr_entry.PN.high); else cd9660_bothendian_dword(0, pn_field->attr.rr_entry.PN.high); - cd9660_bothendian_dword(fnode->inode->st.st_rdev & 0xffffffff, + cd9660_bothendian_dword(fnode->inode->st.st_dev & 0xffffffff, pn_field->attr.rr_entry.PN.low); return 1; } Modified: head/usr.sbin/makefs/makefs.8 ============================================================================== --- head/usr.sbin/makefs/makefs.8 Wed Oct 21 13:13:38 2015 (r289694) +++ head/usr.sbin/makefs/makefs.8 Wed Oct 21 13:15:04 2015 (r289695) @@ -53,7 +53,7 @@ .Op Fl m Ar maximum-size .Op Fl N Ar userdb-dir .Op Fl o Ar fs-options -.Op Fl R Ar roundup-size +.Op Fl r Ar roundup .Op Fl S Ar sector-size .Op Fl s Ar image-size .Op Fl t Ar fs-type @@ -196,12 +196,9 @@ Deprecated. See the .Fl Z flag. -.It Fl R Ar roundup-size -Round the image up to -.Ar roundup-size . -.Ar roundup-size -should be a multiple of the file system block size specified by -.Ar bsize . +.It Fl r Ar roundup +Round the image up to specified block size that should be multiple +of block size. .It Fl S Ar sector-size Set the file system sector size to .Ar sector-size . @@ -280,11 +277,6 @@ or .Ql time . .It Sy extent Maximum extent size. -.It Sy roundup -Round the image up to -.Ar roundup-size . -should be a multiple of -.Ar bsize . .It Sy maxbpcg Maximum total number of blocks in a cylinder group. .It Sy version Modified: head/usr.sbin/makefs/makefs.c ============================================================================== --- head/usr.sbin/makefs/makefs.c Wed Oct 21 13:13:38 2015 (r289694) +++ head/usr.sbin/makefs/makefs.c Wed Oct 21 13:15:04 2015 (r289695) @@ -209,10 +209,10 @@ main(int argc, char *argv[]) fsoptions.sparse = 1; break; - case 'R': + case 'r': /* Round image size up to specified block size */ fsoptions.roundup = - strsuftoll("roundup-size", optarg, 0, LLONG_MAX); + strsuftoll("roundup", optarg, 0, LLONG_MAX); break; case 's': @@ -365,7 +365,7 @@ usage(void) prog = getprogname(); fprintf(stderr, "usage: %s [-t fs-type] [-o fs-options] [-d debug-mask] [-B endian]\n" -"\t[-S sector-size] [-M minimum-size] [-m maximum-size] [-R roundup-size]\n" +"\t[-S sector-size] [-M minimum-size] [-m maximum-size] [-r roundup ]\n" "\t[-s image-size] [-b free-blocks] [-f free-files] [-F mtree-specfile]\n" "\t[-xZ] [-N userdb-dir] image-file directory | manifest [extra-directory ...]\n", prog); From owner-svn-src-all@freebsd.org Wed Oct 21 13:16: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 67D5AA1BACE; Wed, 21 Oct 2015 13:16:04 +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 31B72ED2; Wed, 21 Oct 2015 13:16:04 +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 t9LDG3Oo069396; Wed, 21 Oct 2015 13:16:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LDG33R069395; Wed, 21 Oct 2015 13:16:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510211316.t9LDG33R069395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 21 Oct 2015 13:16:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289696 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 13:16:04 -0000 Author: ngie Date: Wed Oct 21 13:16:03 2015 New Revision: 289696 URL: https://svnweb.freebsd.org/changeset/base/289696 Log: Revert lib/libc/gen/dirname.3@r289695 This is why I use branches usually, not commit directly to head Modified: head/lib/libc/gen/dirname.3 Modified: head/lib/libc/gen/dirname.3 ============================================================================== --- head/lib/libc/gen/dirname.3 Wed Oct 21 13:15:04 2015 (r289695) +++ head/lib/libc/gen/dirname.3 Wed Oct 21 13:16:03 2015 (r289696) @@ -78,8 +78,6 @@ The following error codes may be set in .It Bq Er ENAMETOOLONG The path component to be returned was larger than .Dv MAXPATHLEN . -.It Bq Er ENOMEM -The path component to be returned was larger than .El .Sh SEE ALSO .Xr basename 1 , From owner-svn-src-all@freebsd.org Wed Oct 21 13:53: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 3A429A1B21C; Wed, 21 Oct 2015 13:53:09 +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 F3673D9; Wed, 21 Oct 2015 13:53:08 +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 t9LDr7ED080945; Wed, 21 Oct 2015 13:53:07 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LDr7Og080944; Wed, 21 Oct 2015 13:53:07 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201510211353.t9LDr7Og080944@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: Wed, 21 Oct 2015 13:53:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289697 - head/sys/dev/xen/netfront X-SVN-Group: head MIME-Version: 1.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, 21 Oct 2015 13:53:09 -0000 Author: royger Date: Wed Oct 21 13:53:07 2015 New Revision: 289697 URL: https://svnweb.freebsd.org/changeset/base/289697 Log: netfront: fix LINT-NOIP r289587 broke LINT-NOIP kernels because the lro and queued local variables are defined but not used. Add preprocessor guards around them. Reported by: emaste Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Wed Oct 21 13:16:03 2015 (r289696) +++ head/sys/dev/xen/netfront/netfront.c Wed Oct 21 13:53:07 2015 (r289697) @@ -842,8 +842,10 @@ static void xn_rxeof(struct netfront_info *np) { struct ifnet *ifp; +#if (defined(INET) || defined(INET6)) struct lro_ctrl *lro = &np->xn_lro; struct lro_entry *queued; +#endif struct netfront_rx_info rinfo; struct netif_rx_response *rx = &rinfo.rx; struct netif_extra_info *extras = rinfo.extras; From owner-svn-src-all@freebsd.org Wed Oct 21 13:59: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 5CD13A1B2C2; Wed, 21 Oct 2015 13:59:02 +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 1C7DE280; Wed, 21 Oct 2015 13:59:02 +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 t9LDx1iN081199; Wed, 21 Oct 2015 13:59:01 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LDx1sH081198; Wed, 21 Oct 2015 13:59:01 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510211359.t9LDx1sH081198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Oct 2015 13:59:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289698 - 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: Wed, 21 Oct 2015 13:59:02 -0000 Author: ian Date: Wed Oct 21 13:59:00 2015 New Revision: 289698 URL: https://svnweb.freebsd.org/changeset/base/289698 Log: Move arm_gic_bind() out of the #ifdef SMP block to fix compile errors in the not-SMP case. This is safe because arm_irq_next_cpu() will return the cpuid of the current/only core in the not-SMP case. Submitted by: Bartosz Szczepanek @ semihalf Modified: head/sys/arm/arm/gic.c Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Wed Oct 21 13:53:07 2015 (r289697) +++ head/sys/arm/arm/gic.c Wed Oct 21 13:59:00 2015 (r289698) @@ -860,7 +860,6 @@ arm_gic_post_filter(device_t dev, struct gic_c_write_4(sc, GICC_EOIR, isrc->isrc_data); } -#ifdef SMP static int arm_gic_bind(device_t dev, struct arm_irqsrc *isrc) { @@ -877,6 +876,7 @@ arm_gic_bind(device_t dev, struct arm_ir return (gic_bind(sc, irq, &isrc->isrc_cpu)); } +#ifdef SMP static void arm_gic_ipi_send(device_t dev, struct arm_irqsrc *isrc, cpuset_t cpus) { From owner-svn-src-all@freebsd.org Wed Oct 21 14:58: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 C1ABEA1B38B; Wed, 21 Oct 2015 14:58:00 +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 9B33111AF; Wed, 21 Oct 2015 14:58:00 +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 t9LEvxeq000103; Wed, 21 Oct 2015 14:57:59 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LEvx3H000101; Wed, 21 Oct 2015 14:57:59 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510211457.t9LEvx3H000101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Oct 2015 14:57:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289699 - in head/sys/mips: include mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 14:58:01 -0000 Author: ian Date: Wed Oct 21 14:57:59 2015 New Revision: 289699 URL: https://svnweb.freebsd.org/changeset/base/289699 Log: Switch from a stub to a real implementation of pmap_page_set_attr() for mips, and implement support for VM_MEMATTR_UNCACHEABLE. This will be used in upcoming changes to support BUS_DMA_COHERENT in bus_dmamem_alloc(). Reviewed by: adrian, imp Modified: head/sys/mips/include/pmap.h head/sys/mips/mips/pmap.c Modified: head/sys/mips/include/pmap.h ============================================================================== --- head/sys/mips/include/pmap.h Wed Oct 21 13:59:00 2015 (r289698) +++ head/sys/mips/include/pmap.h Wed Oct 21 14:57:59 2015 (r289699) @@ -74,6 +74,7 @@ struct md_page { }; #define PV_TABLE_REF 0x02 /* referenced */ +#define PV_MEMATTR_UNCACHEABLE 0x04 #define ASID_BITS 8 #define ASIDGEN_BITS (32 - ASID_BITS) @@ -165,7 +166,6 @@ extern vm_paddr_t dump_avail[PHYS_AVAIL_ #define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) #define pmap_page_is_write_mapped(m) (((m)->aflags & PGA_WRITEABLE) != 0) -#define pmap_page_set_memattr(m, ma) (void)0 void pmap_bootstrap(void); void *pmap_mapdev(vm_paddr_t, vm_size_t); @@ -179,6 +179,7 @@ void pmap_kenter_temporary_free(vm_paddr void pmap_flush_pvcache(vm_page_t m); int pmap_emulate_modified(pmap_t pmap, vm_offset_t va); void pmap_grow_direct_page_cache(void); +void pmap_page_set_memattr(vm_page_t, vm_memattr_t); #endif /* _KERNEL */ Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Wed Oct 21 13:59:00 2015 (r289698) +++ head/sys/mips/mips/pmap.c Wed Oct 21 14:57:59 2015 (r289699) @@ -314,6 +314,15 @@ pmap_lmem_unmap(void) } #endif /* !__mips_n64 */ +static __inline int +is_cacheable_page(vm_paddr_t pa, vm_page_t m) +{ + + return ((m->md.pv_flags & PV_MEMATTR_UNCACHEABLE) == 0 && + is_cacheable_mem(pa)); + +} + /* * Page table entry lookup routines. */ @@ -2009,7 +2018,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, newpte |= PTE_W; if (is_kernel_pmap(pmap)) newpte |= PTE_G; - if (is_cacheable_mem(pa)) + if (is_cacheable_page(pa, m)) newpte |= PTE_C_CACHE; else newpte |= PTE_C_UNCACHED; @@ -2280,7 +2289,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ if ((m->oflags & VPO_UNMANAGED) == 0) *pte |= PTE_MANAGED; - if (is_cacheable_mem(pa)) + if (is_cacheable_page(pa, m)) *pte |= PTE_C_CACHE; else *pte |= PTE_C_UNCACHED; @@ -2650,9 +2659,12 @@ pmap_quick_enter_page(vm_page_t m) pa = VM_PAGE_TO_PHYS(m); - if (MIPS_DIRECT_MAPPABLE(pa)) - return (MIPS_PHYS_TO_DIRECT(pa)); - + if (MIPS_DIRECT_MAPPABLE(pa)) { + if (m->md.pv_flags & PV_MEMATTR_UNCACHEABLE) + return (MIPS_PHYS_TO_DIRECT_UNCACHED(pa)); + else + return (MIPS_PHYS_TO_DIRECT(pa)); + } critical_enter(); sysm = &sysmap_lmem[PCPU_GET(cpuid)]; @@ -2660,7 +2672,7 @@ pmap_quick_enter_page(vm_page_t m) pte = pmap_pte(kernel_pmap, sysm->base); *pte = TLBLO_PA_TO_PFN(pa) | PTE_D | PTE_V | PTE_G | - (is_cacheable_mem(pa) ? PTE_C_CACHE : PTE_C_UNCACHED); + (is_cacheable_page(pa, m) ? PTE_C_CACHE : PTE_C_UNCACHED); sysm->valid1 = 1; return (sysm->base); @@ -3520,3 +3532,27 @@ pmap_flush_pvcache(vm_page_t m) } } } + +void +pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma) +{ + + /* + * It appears that this function can only be called before any mappings + * for the page are established. If this ever changes, this code will + * need to walk the pv_list and make each of the existing mappings + * uncacheable, being careful to sync caches and PTEs (and maybe + * invalidate TLB?) for any current mapping it modifies. + */ + if (TAILQ_FIRST(&m->md.pv_list) != NULL) + panic("Can't change memattr on page with existing mappings"); + + /* + * The only memattr we support is UNCACHEABLE, translate the (semi-)MI + * representation of that into our internal flag in the page MD struct. + */ + if (ma == VM_MEMATTR_UNCACHEABLE) + m->md.pv_flags |= PV_MEMATTR_UNCACHEABLE; + else + m->md.pv_flags &= ~PV_MEMATTR_UNCACHEABLE; +} From owner-svn-src-all@freebsd.org Wed Oct 21 15:01: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 0FBFCA1B511; Wed, 21 Oct 2015 15:01:53 +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 CD9D3160E; Wed, 21 Oct 2015 15:01:52 +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 t9LF1pDr000794; Wed, 21 Oct 2015 15:01:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LF1phM000793; Wed, 21 Oct 2015 15:01:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510211501.t9LF1phM000793@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 21 Oct 2015 15:01:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289700 - in head/sys/compat/linuxkpi: . common common/include common/include/asm common/include/linux common/src X-SVN-Group: head MIME-Version: 1.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, 21 Oct 2015 15:01:53 -0000 Author: hselasky Date: Wed Oct 21 15:01:51 2015 New Revision: 289700 URL: https://svnweb.freebsd.org/changeset/base/289700 Log: Start process of moving the LinuxKPI into the default kernel build by creating an empty directory tree. Sponsored by: Mellanox Technologies Added: head/sys/compat/linuxkpi/ head/sys/compat/linuxkpi/common/ head/sys/compat/linuxkpi/common/include/ head/sys/compat/linuxkpi/common/include/asm/ head/sys/compat/linuxkpi/common/include/linux/ head/sys/compat/linuxkpi/common/src/ From owner-svn-src-all@freebsd.org Wed Oct 21 15:06: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 B2057A1B767; Wed, 21 Oct 2015 15:06:49 +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 7C66D1D05; Wed, 21 Oct 2015 15:06:49 +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 t9LF6mC5003029; Wed, 21 Oct 2015 15:06:48 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LF6maB003027; Wed, 21 Oct 2015 15:06:48 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510211506.t9LF6maB003027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Oct 2015 15:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289701 - in head/sys: conf mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 15:06:49 -0000 Author: ian Date: Wed Oct 21 15:06:48 2015 New Revision: 289701 URL: https://svnweb.freebsd.org/changeset/base/289701 Log: Switch mips busdma to using the common busdma_buffalloc code. This amounts to copying in some code from the armv4 busdma, and adapting a few variable and flag names to match the surrounding mips code. Instead of keeping a local cache of prealloced busdma_map structs on a mutex-protected list, set up an uma zone to cache them. Instead of all memory allocations using M_DEVBUF, use new categories M_BUSDMA for allocations of metadata (tags, maps, segment tracking lists), and M_BOUNCE for bounce pages. When buffers are allocated out of the busdma_bufalloc zones the alignment and size of the buffers is known, and the code can skip doing any "partial cacheline flush" logic to preserve data that may be adjacent to the DMA buffer but contain non-DMA data. Reviewed by: adrian, imp Modified: head/sys/conf/files.mips head/sys/mips/mips/busdma_machdep.c Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Wed Oct 21 15:01:51 2015 (r289700) +++ head/sys/conf/files.mips Wed Oct 21 15:06:48 2015 (r289701) @@ -50,6 +50,7 @@ mips/mips/vm_machdep.c standard # misc opt-in bits kern/kern_clocksource.c standard kern/link_elf_obj.c standard +kern/subr_busdma_bufalloc.c standard kern/subr_dummy_vdso_tc.c standard kern/subr_sfbuf.c optional mips | mipsel | mipsn32 Modified: head/sys/mips/mips/busdma_machdep.c ============================================================================== --- head/sys/mips/mips/busdma_machdep.c Wed Oct 21 15:01:51 2015 (r289700) +++ head/sys/mips/mips/busdma_machdep.c Wed Oct 21 15:06:48 2015 (r289701) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -47,7 +48,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include +#include #include #include @@ -129,9 +133,8 @@ static SYSCTL_NODE(_hw, OID_AUTO, busdma SYSCTL_INT(_hw_busdma, OID_AUTO, total_bpages, CTLFLAG_RD, &total_bpages, 0, "Total bounce pages"); -#define DMAMAP_UNCACHEABLE 0x8 -#define DMAMAP_ALLOCATED 0x10 -#define DMAMAP_MALLOCUSED 0x20 +#define DMAMAP_UNCACHEABLE 0x08 +#define DMAMAP_CACHE_ALIGNED 0x10 struct bus_dmamap { struct bp_list bpages; @@ -153,16 +156,6 @@ struct bus_dmamap { static STAILQ_HEAD(, bus_dmamap) bounce_map_waitinglist; static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist; -static TAILQ_HEAD(,bus_dmamap) dmamap_freelist = - TAILQ_HEAD_INITIALIZER(dmamap_freelist); - -#define BUSDMA_STATIC_MAPS 128 -static struct bus_dmamap map_pool[BUSDMA_STATIC_MAPS]; - -static struct mtx busdma_mtx; - -MTX_SYSINIT(busdma_mtx, &busdma_mtx, "busdma lock", MTX_DEF); - static void init_bounce_pages(void *dummy); static int alloc_bounce_zone(bus_dma_tag_t dmat); static int alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages); @@ -176,6 +169,80 @@ static void free_bounce_page(bus_dma_tag /* Default tag, as most drivers provide no parent tag. */ bus_dma_tag_t mips_root_dma_tag; +static uma_zone_t dmamap_zone; /* Cache of struct bus_dmamap items */ + +static busdma_bufalloc_t coherent_allocator; /* Cache of coherent buffers */ +static busdma_bufalloc_t standard_allocator; /* Cache of standard buffers */ + +MALLOC_DEFINE(M_BUSDMA, "busdma", "busdma metadata"); +MALLOC_DEFINE(M_BOUNCE, "bounce", "busdma bounce pages"); + +/* + * This is the ctor function passed to uma_zcreate() for the pool of dma maps. + * It'll need platform-specific changes if this code is copied. + */ +static int +dmamap_ctor(void *mem, int size, void *arg, int flags) +{ + bus_dmamap_t map; + bus_dma_tag_t dmat; + + map = (bus_dmamap_t)mem; + dmat = (bus_dma_tag_t)arg; + + dmat->map_count++; + + map->dmat = dmat; + map->flags = 0; + map->slist = NULL; + map->allocbuffer = NULL; + map->sync_count = 0; + STAILQ_INIT(&map->bpages); + + return (0); +} + +/* + * This is the dtor function passed to uma_zcreate() for the pool of dma maps. + * It may need platform-specific changes if this code is copied . + */ +static void +dmamap_dtor(void *mem, int size, void *arg) +{ + bus_dmamap_t map; + + map = (bus_dmamap_t)mem; + + map->dmat->map_count--; +} + +static void +busdma_init(void *dummy) +{ + + /* Create a cache of maps for bus_dmamap_create(). */ + dmamap_zone = uma_zcreate("dma maps", sizeof(struct bus_dmamap), + dmamap_ctor, dmamap_dtor, NULL, NULL, UMA_ALIGN_PTR, 0); + + /* Create a cache of buffers in standard (cacheable) memory. */ + standard_allocator = busdma_bufalloc_create("buffer", + mips_pdcache_linesize, /* minimum_alignment */ + NULL, /* uma_alloc func */ + NULL, /* uma_free func */ + 0); /* uma_zcreate_flags */ + + /* + * Create a cache of buffers in uncacheable memory, to implement the + * BUS_DMA_COHERENT flag. + */ + coherent_allocator = busdma_bufalloc_create("coherent", + mips_pdcache_linesize, /* minimum_alignment */ + busdma_bufalloc_alloc_uncacheable, + busdma_bufalloc_free_uncacheable, + 0); /* uma_zcreate_flags */ +} +SYSINIT(busdma, SI_SUB_KMEM, SI_ORDER_FOURTH, busdma_init, NULL); + /* * Return true if a match is made. * @@ -203,17 +270,6 @@ run_filter(bus_dma_tag_t dmat, bus_addr_ return (retval); } -static void -mips_dmamap_freelist_init(void *dummy) -{ - int i; - - for (i = 0; i < BUSDMA_STATIC_MAPS; i++) - TAILQ_INSERT_HEAD(&dmamap_freelist, &map_pool[i], freelist); -} - -SYSINIT(busdma, SI_SUB_VM, SI_ORDER_ANY, mips_dmamap_freelist_init, NULL); - /* * Check to see if the specified page is in an allowed DMA range. */ @@ -277,24 +333,13 @@ _busdma_alloc_dmamap(bus_dma_tag_t dmat) struct sync_list *slist; bus_dmamap_t map; - slist = malloc(sizeof(*slist) * dmat->nsegments, M_DEVBUF, M_NOWAIT); + slist = malloc(sizeof(*slist) * dmat->nsegments, M_BUSDMA, M_NOWAIT); if (slist == NULL) return (NULL); - mtx_lock(&busdma_mtx); - map = TAILQ_FIRST(&dmamap_freelist); - if (map) - TAILQ_REMOVE(&dmamap_freelist, map, freelist); - mtx_unlock(&busdma_mtx); - if (!map) { - map = malloc(sizeof(*map), M_DEVBUF, M_NOWAIT | M_ZERO); - if (map) - map->flags = DMAMAP_ALLOCATED; - } else - map->flags = 0; - if (map != NULL) { - STAILQ_INIT(&map->bpages); + map = uma_zalloc_arg(dmamap_zone, dmat, M_NOWAIT); + if (map != NULL) map->slist = slist; - } else + else free(slist, M_DEVBUF); return (map); } @@ -303,13 +348,7 @@ static __inline void _busdma_free_dmamap(bus_dmamap_t map) { free(map->slist, M_DEVBUF); - if (map->flags & DMAMAP_ALLOCATED) - free(map, M_DEVBUF); - else { - mtx_lock(&busdma_mtx); - TAILQ_INSERT_HEAD(&dmamap_freelist, map, freelist); - mtx_unlock(&busdma_mtx); - } + uma_zfree(dmamap_zone, map); } /* @@ -332,7 +371,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, if (!parent) parent = mips_root_dma_tag; - newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_DEVBUF, M_NOWAIT); + newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_BUSDMA, M_NOWAIT); if (newtag == NULL) { CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d", __func__, newtag, 0, error); @@ -476,7 +515,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, in if (dmat->segments == NULL) { dmat->segments = (bus_dma_segment_t *)malloc( - sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF, + sizeof(bus_dma_segment_t) * dmat->nsegments, M_BUSDMA, M_NOWAIT); if (dmat->segments == NULL) { CTR3(KTR_BUSDMA, "%s: tag %p error %d", @@ -491,10 +530,6 @@ bus_dmamap_create(bus_dma_tag_t dmat, in return (ENOMEM); } *mapp = newmap; - newmap->dmat = dmat; - newmap->allocbuffer = NULL; - newmap->sync_count = 0; - dmat->map_count++; /* * Bouncing might be required if the driver asks for an active @@ -565,7 +600,6 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, b } if (dmat->bounce_zone) dmat->bounce_zone->map_count--; - dmat->map_count--; _busdma_free_dmamap(map); CTR2(KTR_BUSDMA, "%s: tag %p error 0", __func__, dmat); return (0); @@ -577,10 +611,14 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, b * A dmamap to for use with dmamap_load is also allocated. */ int -bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, +bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddrp, int flags, bus_dmamap_t *mapp) { bus_dmamap_t newmap = NULL; + busdma_bufalloc_t ba; + struct busdma_bufzone *bufzone; + vm_memattr_t memattr; + void *vaddr; int mflags; @@ -590,7 +628,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi mflags = M_WAITOK; if (dmat->segments == NULL) { dmat->segments = (bus_dma_segment_t *)malloc( - sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF, + sizeof(bus_dma_segment_t) * dmat->nsegments, M_BUSDMA, mflags); if (dmat->segments == NULL) { CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", @@ -598,8 +636,6 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi return (ENOMEM); } } - if (flags & BUS_DMA_ZERO) - mflags |= M_ZERO; newmap = _busdma_alloc_dmamap(dmat); if (newmap == NULL) { @@ -607,10 +643,6 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi __func__, dmat, dmat->flags, ENOMEM); return (ENOMEM); } - dmat->map_count++; - *mapp = newmap; - newmap->dmat = dmat; - newmap->sync_count = 0; /* * If all the memory is coherent with DMA then we don't need to @@ -619,54 +651,62 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi if (dmat->flags & BUS_DMA_COHERENT) flags &= ~BUS_DMA_COHERENT; + if (flags & BUS_DMA_COHERENT) { + memattr = VM_MEMATTR_UNCACHEABLE; + ba = coherent_allocator; + newmap->flags |= DMAMAP_UNCACHEABLE; + } else { + memattr = VM_MEMATTR_DEFAULT; + ba = standard_allocator; + } + /* All buffers we allocate are cache-aligned. */ + newmap->flags |= DMAMAP_CACHE_ALIGNED; + + if (flags & BUS_DMA_ZERO) + mflags |= M_ZERO; + /* - * Allocate uncacheable memory if all else fails. + * Try to find a bufzone in the allocator that holds a cache of buffers + * of the right size for this request. If the buffer is too big to be + * held in the allocator cache, this returns NULL. */ - if (flags & BUS_DMA_COHERENT) - newmap->flags |= DMAMAP_UNCACHEABLE; + bufzone = busdma_bufalloc_findzone(ba, dmat->maxsize); - if (dmat->maxsize <= PAGE_SIZE && - (dmat->alignment < dmat->maxsize) && - !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr) && - !(newmap->flags & DMAMAP_UNCACHEABLE)) { - *vaddr = malloc(dmat->maxsize, M_DEVBUF, mflags); - newmap->flags |= DMAMAP_MALLOCUSED; + /* + * Allocate the buffer from the uma(9) allocator if... + * - It's small enough to be in the allocator (bufzone not NULL). + * - The alignment constraint isn't larger than the allocation size + * (the allocator aligns buffers to their size boundaries). + * - There's no need to handle lowaddr/highaddr exclusion zones. + * else allocate non-contiguous pages if... + * - The page count that could get allocated doesn't exceed nsegments. + * - The alignment constraint isn't larger than a page boundary. + * - There are no boundary-crossing constraints. + * else allocate a block of contiguous pages because one or more of the + * constraints is something that only the contig allocator can fulfill. + */ + if (bufzone != NULL && dmat->alignment <= bufzone->size && + !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr)) { + vaddr = uma_zalloc(bufzone->umazone, mflags); + } else if (dmat->nsegments >= btoc(dmat->maxsize) && + dmat->alignment <= PAGE_SIZE && dmat->boundary == 0) { + vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->maxsize, + mflags, 0, dmat->lowaddr, memattr); } else { - /* - * XXX Use Contigmalloc until it is merged into this facility - * and handles multi-seg allocations. Nobody is doing - * multi-seg allocations yet though. - */ - *vaddr = contigmalloc(dmat->maxsize, M_DEVBUF, mflags, - 0ul, dmat->lowaddr, dmat->alignment? dmat->alignment : 1ul, - dmat->boundary); - } - if (*vaddr == NULL) { - if (newmap != NULL) { - _busdma_free_dmamap(newmap); - dmat->map_count--; - } - *mapp = NULL; - return (ENOMEM); + vaddr = (void *)kmem_alloc_contig(kernel_arena, dmat->maxsize, + mflags, 0, dmat->lowaddr, dmat->alignment, dmat->boundary, + memattr); + } + if (vaddr == NULL) { + _busdma_free_dmamap(newmap); + newmap = NULL; + } else { + newmap->sync_count = 0; } + *vaddrp = vaddr; + *mapp = newmap; - if (newmap->flags & DMAMAP_UNCACHEABLE) { - void *tmpaddr = (void *)*vaddr; - - if (tmpaddr) { - tmpaddr = (void *)pmap_mapdev(vtophys(tmpaddr), - dmat->maxsize); - newmap->origbuffer = *vaddr; - newmap->allocbuffer = tmpaddr; - mips_dcache_wbinv_range((vm_offset_t)*vaddr, - dmat->maxsize); - *vaddr = tmpaddr; - } else - newmap->origbuffer = newmap->allocbuffer = NULL; - } else - newmap->origbuffer = newmap->allocbuffer = NULL; - - return (0); + return (vaddr == NULL ? ENOMEM : 0); } /* @@ -676,21 +716,24 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map) { - if (map->allocbuffer) { - KASSERT(map->allocbuffer == vaddr, - ("Trying to freeing the wrong DMA buffer")); - vaddr = map->origbuffer; - } + struct busdma_bufzone *bufzone; + busdma_bufalloc_t ba; if (map->flags & DMAMAP_UNCACHEABLE) - pmap_unmapdev((vm_offset_t)map->allocbuffer, dmat->maxsize); - if (map->flags & DMAMAP_MALLOCUSED) - free(vaddr, M_DEVBUF); + ba = coherent_allocator; else - contigfree(vaddr, dmat->maxsize, M_DEVBUF); + ba = standard_allocator; - dmat->map_count--; - _busdma_free_dmamap(map); + free(map->slist, M_DEVBUF); + uma_zfree(dmamap_zone, map); + + bufzone = busdma_bufalloc_findzone(ba, dmat->maxsize); + + if (bufzone != NULL && dmat->alignment <= bufzone->size && + !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr)) + uma_zfree(bufzone->umazone, vaddr); + else + kmem_free(kernel_arena, (vm_offset_t)vaddr, dmat->maxsize); CTR3(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat, dmat->flags); } @@ -1013,7 +1056,7 @@ _bus_dmamap_unload(bus_dma_tag_t dmat, b } static void -bus_dmamap_sync_buf(vm_offset_t buf, int len, bus_dmasync_op_t op) +bus_dmamap_sync_buf(vm_offset_t buf, int len, bus_dmasync_op_t op, int aligned) { char tmp_cl[mips_pdcache_linesize], tmp_clend[mips_pdcache_linesize]; vm_offset_t buf_cl, buf_clend; @@ -1025,13 +1068,23 @@ bus_dmamap_sync_buf(vm_offset_t buf, int * and could modify areas of memory that share the same cache line * at the beginning and the ending of the buffer. In order to * prevent a data loss we save these chunks in temporary buffer - * before invalidation and restore them afer it + * before invalidation and restore them afer it. + * + * If the aligned flag is set the buffer came from our allocator caches + * which are always sized and aligned to cacheline boundaries, so we can + * skip preserving nearby data if a transfer is unaligned (especially + * it's likely to not end on a boundary). */ - buf_cl = buf & ~cache_linesize_mask; - size_cl = buf & cache_linesize_mask; - buf_clend = buf + len; - size_clend = (mips_pdcache_linesize - - (buf_clend & cache_linesize_mask)) & cache_linesize_mask; + if (aligned) { + size_cl = 0; + size_clend = 0; + } else { + buf_cl = buf & ~cache_linesize_mask; + size_cl = buf & cache_linesize_mask; + buf_clend = buf + len; + size_clend = (mips_pdcache_linesize - + (buf_clend & cache_linesize_mask)) & cache_linesize_mask; + } switch (op) { case BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE: @@ -1151,6 +1204,7 @@ void _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) { struct sync_list *sl, *end; + int aligned; if (op == BUS_DMASYNC_POSTWRITE) return; @@ -1163,11 +1217,14 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus if (map->flags & DMAMAP_UNCACHEABLE) return; + aligned = (map->flags & DMAMAP_CACHE_ALIGNED) ? 1 : 0; + CTR3(KTR_BUSDMA, "%s: op %x flags %x", __func__, op, map->flags); if (map->sync_count) { end = &map->slist[map->sync_count]; for (sl = &map->slist[0]; sl != end; sl++) - bus_dmamap_sync_buf(sl->vaddr, sl->datacount, op); + bus_dmamap_sync_buf(sl->vaddr, sl->datacount, op, + aligned); } } @@ -1209,7 +1266,7 @@ alloc_bounce_zone(bus_dma_tag_t dmat) } } - if ((bz = (struct bounce_zone *)malloc(sizeof(*bz), M_DEVBUF, + if ((bz = (struct bounce_zone *)malloc(sizeof(*bz), M_BUSDMA, M_NOWAIT | M_ZERO)) == NULL) return (ENOMEM); @@ -1280,12 +1337,12 @@ alloc_bounce_pages(bus_dma_tag_t dmat, u while (numpages > 0) { struct bounce_page *bpage; - bpage = (struct bounce_page *)malloc(sizeof(*bpage), M_DEVBUF, + bpage = (struct bounce_page *)malloc(sizeof(*bpage), M_BUSDMA, M_NOWAIT | M_ZERO); if (bpage == NULL) break; - bpage->vaddr = (vm_offset_t)contigmalloc(PAGE_SIZE, M_DEVBUF, + bpage->vaddr = (vm_offset_t)contigmalloc(PAGE_SIZE, M_BOUNCE, M_NOWAIT, 0ul, bz->lowaddr, PAGE_SIZE, From owner-svn-src-all@freebsd.org Wed Oct 21 15:28: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 600F5A1BC5B; Wed, 21 Oct 2015 15:28:11 +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 488D2A99; Wed, 21 Oct 2015 15:28:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 415DF1336; Wed, 21 Oct 2015 15:28:11 +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 D8FF215A41; Wed, 21 Oct 2015 15:28:10 +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 H_xx3GcVFGrb; Wed, 21 Oct 2015 15:27:59 +0000 (UTC) Subject: Re: svn commit: r289700 - in head/sys/compat/linuxkpi: . common common/include common/include/asm common/include/linux common/src DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 3BF5815A3B To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510211501.t9LF1phM000793@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5627AF01.8070501@FreeBSD.org> Date: Wed, 21 Oct 2015 08:28:01 -0700 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: <201510211501.t9LF1phM000793@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bVGD39pJL6mMMF0r6pwAa7fKwixPigWja" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 15:28:11 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --bVGD39pJL6mMMF0r6pwAa7fKwixPigWja Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/21/2015 8:01 AM, Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Oct 21 15:01:51 2015 > New Revision: 289700 > URL: https://svnweb.freebsd.org/changeset/base/289700 >=20 > Log: > Start process of moving the LinuxKPI into the default kernel build by= > creating an empty directory tree. > =20 > Sponsored by: Mellanox Technologies >=20 > Added: > head/sys/compat/linuxkpi/ > head/sys/compat/linuxkpi/common/ > head/sys/compat/linuxkpi/common/include/ > head/sys/compat/linuxkpi/common/include/asm/ > head/sys/compat/linuxkpi/common/include/linux/ > head/sys/compat/linuxkpi/common/src/ >=20 This makes me think a branch should be used instead. --=20 Regards, Bryan Drewery --bVGD39pJL6mMMF0r6pwAa7fKwixPigWja 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 iQEcBAEBAgAGBQJWJ68CAAoJEDXXcbtuRpfPArsH/0pL6hsSQueuUn3VHx9NMX3g nYD/cUmqmMFOpecrkxe9Ddy9dKHD8c2kWVktCIthm0PY99b23DSqkwk1hx3u8KMJ wt+NeC4n1DRu5wVW12obQN3isR98IpWbWydy2bjWpcz5KO6n/91QOpaaDX5EGg3g bLZLlhRAUhYvcFuBkj7zc8JtafQ2FyeLFBGy9AmPjuLhTkbQDzVrmGoQrWOiY19A hTfQ9UaCNSNsH5QtP2jJnC/zBsyv6faCbrvvlMpljrpcrtiVMyK+LzJ0WYcJwUrI hpLng/KRFrT3zIBjfRiOo0u0czjgU1EcBxPa4ivIpbIgSkoBAtQpDmPTfh8bYJg= =rtGv -----END PGP SIGNATURE----- --bVGD39pJL6mMMF0r6pwAa7fKwixPigWja-- From owner-svn-src-all@freebsd.org Wed Oct 21 15:31: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 8A946A1BE86; Wed, 21 Oct 2015 15:31:27 +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 4AB36F4B; Wed, 21 Oct 2015 15:31:27 +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 t9LFVQGt011373; Wed, 21 Oct 2015 15:31:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LFVQqN011371; Wed, 21 Oct 2015 15:31:26 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510211531.t9LFVQqN011371@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 21 Oct 2015 15:31:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289702 - 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: Wed, 21 Oct 2015 15:31:27 -0000 Author: mav Date: Wed Oct 21 15:31:26 2015 New Revision: 289702 URL: https://svnweb.freebsd.org/changeset/base/289702 Log: Make some panic strings mode informative. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_backend_block.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Wed Oct 21 15:06:48 2015 (r289701) +++ head/sys/cam/ctl/ctl.c Wed Oct 21 15:31:26 2015 (r289702) @@ -3810,7 +3810,7 @@ ctl_expand_number(const char *buf, uint6 static int ctl_init_page_index(struct ctl_lun *lun) { - int i; + int i, page_code; struct ctl_page_index *page_index; const char *value; uint64_t ival; @@ -3831,10 +3831,12 @@ ctl_init_page_index(struct ctl_lun *lun) (page_index->page_flags & CTL_PAGE_FLAG_CDROM) == 0) continue; - switch (page_index->page_code & SMPH_PC_MASK) { + page_code = page_index->page_code & SMPH_PC_MASK; + switch (page_code) { case SMS_RW_ERROR_RECOVERY_PAGE: { - if (page_index->subpage != SMS_SUBPAGE_PAGE_0) - panic("subpage is incorrect!"); + KASSERT(page_index->subpage == SMS_SUBPAGE_PAGE_0, + ("subpage %#x for page %#x is incorrect!", + page_index->subpage, page_code)); memcpy(&lun->mode_pages.rw_er_page[CTL_PAGE_CURRENT], &rw_er_page_default, sizeof(rw_er_page_default)); @@ -3854,8 +3856,9 @@ ctl_init_page_index(struct ctl_lun *lun) case SMS_FORMAT_DEVICE_PAGE: { struct scsi_format_page *format_page; - if (page_index->subpage != SMS_SUBPAGE_PAGE_0) - panic("subpage is incorrect!"); + KASSERT(page_index->subpage == SMS_SUBPAGE_PAGE_0, + ("subpage %#x for page %#x is incorrect!", + page_index->subpage, page_code)); /* * Sectors per track are set above. Bytes per @@ -3901,9 +3904,9 @@ ctl_init_page_index(struct ctl_lun *lun) int shift; #endif /* !__XSCALE__ */ - if (page_index->subpage != SMS_SUBPAGE_PAGE_0) - panic("invalid subpage value %d", - page_index->subpage); + KASSERT(page_index->subpage == SMS_SUBPAGE_PAGE_0, + ("subpage %#x for page %#x is incorrect!", + page_index->subpage, page_code)); /* * Rotation rate and sectors per track are set @@ -3981,9 +3984,9 @@ ctl_init_page_index(struct ctl_lun *lun) case SMS_CACHING_PAGE: { struct scsi_caching_page *caching_page; - if (page_index->subpage != SMS_SUBPAGE_PAGE_0) - panic("invalid subpage value %d", - page_index->subpage); + KASSERT(page_index->subpage == SMS_SUBPAGE_PAGE_0, + ("subpage %#x for page %#x is incorrect!", + page_index->subpage, page_code)); memcpy(&lun->mode_pages.caching_page[CTL_PAGE_DEFAULT], &caching_page_default, sizeof(caching_page_default)); @@ -4066,6 +4069,9 @@ ctl_init_page_index(struct ctl_lun *lun) page_index->page_data = (uint8_t *)lun->mode_pages.control_ext_page; break; + default: + panic("subpage %#x for page %#x is incorrect!", + page_index->subpage, page_code); } break; } @@ -4157,10 +4163,18 @@ ctl_init_page_index(struct ctl_lun *lun) sizeof(lbp_page_default)); page_index->page_data = (uint8_t *)lun->mode_pages.lbp_page; - }} + break; + } + default: + panic("subpage %#x for page %#x is incorrect!", + page_index->subpage, page_code); + } break; } case SMS_CDDVD_CAPS_PAGE:{ + KASSERT(page_index->subpage == SMS_SUBPAGE_PAGE_0, + ("subpage %#x for page %#x is incorrect!", + page_index->subpage, page_code)); memcpy(&lun->mode_pages.cddvd_page[CTL_PAGE_DEFAULT], &cddvd_page_default, sizeof(cddvd_page_default)); @@ -4201,17 +4215,14 @@ ctl_init_page_index(struct ctl_lun *lun) break; } default: - panic("invalid subpage value %d", - page_index->subpage); - break; + panic("subpage %#x for page %#x is incorrect!", + page_index->subpage, page_code); } - break; + break; } default: - panic("invalid page value %d", - page_index->page_code & SMPH_PC_MASK); - break; - } + panic("invalid page code value %#x", page_code); + } } return (CTL_RETVAL_COMPLETE); @@ -6223,8 +6234,7 @@ ctl_mode_select(struct ctl_scsiio *ctsio break; } default: - panic("Invalid CDB type %#x", ctsio->cdb[0]); - break; + panic("%s: Invalid CDB type %#x", __func__, ctsio->cdb[0]); } if (param_len < (header_size + bd_len)) { @@ -6487,8 +6497,7 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) break; } default: - panic("invalid CDB type %#x", ctsio->cdb[0]); - break; /* NOTREACHED */ + panic("%s: Invalid CDB type %#x", __func__, ctsio->cdb[0]); } /* @@ -7502,7 +7511,7 @@ retry: lun->pr_key_count; break; default: - panic("Invalid PR type %x", cdb->action); + panic("%s: Invalid PR type %#x", __func__, cdb->action); } mtx_unlock(&lun->lun_lock); @@ -7698,12 +7707,7 @@ retry: break; } default: - /* - * This is a bug, because we just checked for this above, - * and should have returned an error. - */ - panic("Invalid PR type %x", cdb->action); - break; /* NOTREACHED */ + panic("%s: Invalid PR type %#x", __func__, cdb->action); } mtx_unlock(&lun->lun_lock); @@ -8421,7 +8425,7 @@ ctl_persistent_reserve_out(struct ctl_sc break; } default: - panic("Invalid PR type %x", cdb->action); + panic("%s: Invalid PR type %#x", __func__, cdb->action); } done: @@ -11030,8 +11034,9 @@ ctl_check_for_blockage(struct ctl_lun *l case CTL_SER_SKIP: return (CTL_ACTION_SKIP); default: - panic("invalid serialization value %d", - serialize_row[pending_entry->seridx]); + panic("%s: Invalid serialization value %d for %d => %d", + __func__, serialize_row[pending_entry->seridx], + pending_entry->seridx, ooa_entry->seridx); } return (CTL_ACTION_ERROR); @@ -11080,8 +11085,7 @@ ctl_check_ooa(struct ctl_lun *lun, union case CTL_ACTION_PASS: break; default: - panic("invalid action %d", action); - break; /* NOTREACHED */ + panic("%s: Invalid action %d\n", __func__, action); } } @@ -12558,9 +12562,8 @@ ctl_datamove(union ctl_io *io) io->taskio.tag_num, io->taskio.tag_type); break; default: - printf("Invalid CTL I/O type %d\n", io->io_hdr.io_type); - panic("Invalid CTL I/O type %d\n", io->io_hdr.io_type); - break; + panic("%s: Invalid CTL I/O type %d\n", + __func__, io->io_hdr.io_type); } sbuf_cat(&sb, path_str); sbuf_printf(&sb, "ctl_datamove: %jd seconds\n", @@ -13093,9 +13096,8 @@ ctl_process_done(union ctl_io *io) io->taskio.tag_num, io->taskio.tag_type); break; default: - printf("Invalid CTL I/O type %d\n", io->io_hdr.io_type); - panic("Invalid CTL I/O type %d\n", io->io_hdr.io_type); - break; + panic("%s: Invalid CTL I/O type %d\n", + __func__, io->io_hdr.io_type); } sbuf_cat(&sb, path_str); sbuf_printf(&sb, "ctl_process_done: %jd seconds\n", @@ -13114,9 +13116,8 @@ ctl_process_done(union ctl_io *io) fe_done(io); return; default: - panic("ctl_process_done: invalid io type %d\n", - io->io_hdr.io_type); - break; /* NOTREACHED */ + panic("%s: Invalid CTL I/O type %d\n", + __func__, io->io_hdr.io_type); } lun = (struct ctl_lun *)io->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Wed Oct 21 15:06:48 2015 (r289701) +++ head/sys/cam/ctl/ctl_backend_block.c Wed Oct 21 15:31:26 2015 (r289702) @@ -2110,7 +2110,7 @@ ctl_be_block_close(struct ctl_be_block_l case CTL_BE_BLOCK_NONE: break; default: - panic("Unexpected backend type."); + panic("Unexpected backend type %d", be_lun->dev_type); break; } be_lun->dev_type = CTL_BE_BLOCK_NONE; From owner-svn-src-all@freebsd.org Wed Oct 21 15:32: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 CE31AA1BF24; Wed, 21 Oct 2015 15:32:22 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95CCE11D6; Wed, 21 Oct 2015 15:32:22 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9LFWLob011448; Wed, 21 Oct 2015 15:32:21 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LFWLgY011444; Wed, 21 Oct 2015 15:32:21 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201510211532.t9LFWLgY011444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 21 Oct 2015 15:32:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289703 - in stable/10/sys: net netpfil/pf 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, 21 Oct 2015 15:32:23 -0000 Author: kp Date: Wed Oct 21 15:32:21 2015 New Revision: 289703 URL: https://svnweb.freebsd.org/changeset/base/289703 Log: MFC r289316: pf: Fix TSO issues In certain configurations (mostly but not exclusively as a VM on Xen) pf produced packets with an invalid TCP checksum. The problem was that pf could only handle packets with a full checksum. The FreeBSD IP stack produces TCP packets with a pseudo-header checksum (only addresses, length and protocol). Certain network interfaces expect to see the pseudo-header checksum, so they end up producing packets with invalid checksums. To fix this stop calculating the full checksum and teach pf to only update TCP checksums if TSO is disabled or the change affects the pseudo-header checksum. PR: 154428, 193579, 198868 Relnotes: yes Sponsored by: RootBSD Modified: stable/10/sys/net/pfvar.h stable/10/sys/netpfil/pf/pf.c stable/10/sys/netpfil/pf/pf_ioctl.c stable/10/sys/netpfil/pf/pf_norm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/pfvar.h ============================================================================== --- stable/10/sys/net/pfvar.h Wed Oct 21 15:31:26 2015 (r289702) +++ stable/10/sys/net/pfvar.h Wed Oct 21 15:32:21 2015 (r289703) @@ -1554,6 +1554,8 @@ extern void pf_print_state(struct pf_ extern void pf_print_flags(u_int8_t); extern u_int16_t pf_cksum_fixup(u_int16_t, u_int16_t, u_int16_t, u_int8_t); +extern u_int16_t pf_proto_cksum_fixup(struct mbuf *, u_int16_t, + u_int16_t, u_int16_t, u_int8_t); VNET_DECLARE(struct ifnet *, sync_ifp); #define V_sync_ifp VNET(sync_ifp); @@ -1583,6 +1585,9 @@ u_int32_t pf_new_isn(struct pf_state *); void *pf_pull_hdr(struct mbuf *, int, void *, int, u_short *, u_short *, sa_family_t); void pf_change_a(void *, u_int16_t *, u_int32_t, u_int8_t); +void pf_change_proto_a(struct mbuf *, void *, u_int16_t *, u_int32_t, + u_int8_t); +void pf_change_tcp_a(struct mbuf *, void *, u_int16_t *, u_int32_t); void pf_send_deferred_syn(struct pf_state *); int pf_match_addr(u_int8_t, struct pf_addr *, struct pf_addr *, struct pf_addr *, sa_family_t); Modified: stable/10/sys/netpfil/pf/pf.c ============================================================================== --- stable/10/sys/netpfil/pf/pf.c Wed Oct 21 15:31:26 2015 (r289702) +++ stable/10/sys/netpfil/pf/pf.c Wed Oct 21 15:32:21 2015 (r289703) @@ -203,7 +203,7 @@ static void pf_init_threshold(struct p static void pf_add_threshold(struct pf_threshold *); static int pf_check_threshold(struct pf_threshold *); -static void pf_change_ap(struct pf_addr *, u_int16_t *, +static void pf_change_ap(struct mbuf *, struct pf_addr *, u_int16_t *, u_int16_t *, u_int16_t *, struct pf_addr *, u_int16_t, u_int8_t, sa_family_t); static int pf_modulate_sack(struct mbuf *, int, struct pf_pdesc *, @@ -1989,6 +1989,22 @@ pf_addr_wrap_neq(struct pf_addr_wrap *aw } } +/** + * Checksum updates are a little complicated because the checksum in the TCP/UDP + * header isn't always a full checksum. In some cases (i.e. output) it's a + * pseudo-header checksum, which is a partial checksum over src/dst IP + * addresses, protocol number and length. + * + * That means we have the following cases: + * * Input or forwarding: we don't have TSO, the checksum fields are full + * checksums, we need to update the checksum whenever we change anything. + * * Output (i.e. the checksum is a pseudo-header checksum): + * x The field being updated is src/dst address or affects the length of + * the packet. We need to update the pseudo-header checksum (note that this + * checksum is not ones' complement). + * x Some other field is being modified (e.g. src/dst port numbers): We + * don't have to update anything. + **/ u_int16_t pf_cksum_fixup(u_int16_t cksum, u_int16_t old, u_int16_t new, u_int8_t udp) { @@ -2004,9 +2020,20 @@ pf_cksum_fixup(u_int16_t cksum, u_int16_ return (l); } +u_int16_t +pf_proto_cksum_fixup(struct mbuf *m, u_int16_t cksum, u_int16_t old, + u_int16_t new, u_int8_t udp) +{ + if (m->m_pkthdr.csum_flags & (CSUM_DELAY_DATA | CSUM_DELAY_DATA_IPV6)) + return (cksum); + + return (pf_cksum_fixup(cksum, old, new, udp)); +} + static void -pf_change_ap(struct pf_addr *a, u_int16_t *p, u_int16_t *ic, u_int16_t *pc, - struct pf_addr *an, u_int16_t pn, u_int8_t u, sa_family_t af) +pf_change_ap(struct mbuf *m, struct pf_addr *a, u_int16_t *p, u_int16_t *ic, + u_int16_t *pc, struct pf_addr *an, u_int16_t pn, u_int8_t u, + sa_family_t af) { struct pf_addr ao; u_int16_t po = *p; @@ -2014,6 +2041,9 @@ pf_change_ap(struct pf_addr *a, u_int16_ PF_ACPY(&ao, a, af); PF_ACPY(a, an, af); + if (m->m_pkthdr.csum_flags & (CSUM_DELAY_DATA | CSUM_DELAY_DATA_IPV6)) + *pc = ~*pc; + *p = pn; switch (af) { @@ -2023,17 +2053,19 @@ pf_change_ap(struct pf_addr *a, u_int16_ ao.addr16[0], an->addr16[0], 0), ao.addr16[1], an->addr16[1], 0); *p = pn; - *pc = pf_cksum_fixup(pf_cksum_fixup(pf_cksum_fixup(*pc, + + *pc = pf_cksum_fixup(pf_cksum_fixup(*pc, ao.addr16[0], an->addr16[0], u), - ao.addr16[1], an->addr16[1], u), - po, pn, u); + ao.addr16[1], an->addr16[1], u); + + *pc = pf_proto_cksum_fixup(m, *pc, po, pn, u); break; #endif /* INET */ #ifdef INET6 case AF_INET6: *pc = pf_cksum_fixup(pf_cksum_fixup(pf_cksum_fixup( pf_cksum_fixup(pf_cksum_fixup(pf_cksum_fixup( - pf_cksum_fixup(pf_cksum_fixup(pf_cksum_fixup(*pc, + pf_cksum_fixup(pf_cksum_fixup(*pc, ao.addr16[0], an->addr16[0], u), ao.addr16[1], an->addr16[1], u), ao.addr16[2], an->addr16[2], u), @@ -2041,13 +2073,20 @@ pf_change_ap(struct pf_addr *a, u_int16_ ao.addr16[4], an->addr16[4], u), ao.addr16[5], an->addr16[5], u), ao.addr16[6], an->addr16[6], u), - ao.addr16[7], an->addr16[7], u), - po, pn, u); + ao.addr16[7], an->addr16[7], u); + + *pc = pf_proto_cksum_fixup(m, *pc, po, pn, u); break; #endif /* INET6 */ } -} + if (m->m_pkthdr.csum_flags & (CSUM_DELAY_DATA | + CSUM_DELAY_DATA_IPV6)) { + *pc = ~*pc; + if (! *pc) + *pc = 0xffff; + } +} /* Changes a u_int32_t. Uses a void * so there are no align restrictions */ void @@ -2061,6 +2100,19 @@ pf_change_a(void *a, u_int16_t *c, u_int ao % 65536, an % 65536, u); } +void +pf_change_proto_a(struct mbuf *m, void *a, u_int16_t *c, u_int32_t an, u_int8_t udp) +{ + u_int32_t ao; + + memcpy(&ao, a, sizeof(ao)); + memcpy(a, &an, sizeof(u_int32_t)); + + *c = pf_proto_cksum_fixup(m, + pf_proto_cksum_fixup(m, *c, ao / 65536, an / 65536, udp), + ao % 65536, an % 65536, udp); +} + #ifdef INET6 static void pf_change_a6(struct pf_addr *a, u_int16_t *c, struct pf_addr *an, u_int8_t u) @@ -2206,12 +2258,10 @@ pf_modulate_sack(struct mbuf *m, int off for (i = 2; i + TCPOLEN_SACK <= olen; i += TCPOLEN_SACK) { memcpy(&sack, &opt[i], sizeof(sack)); - pf_change_a(&sack.start, &th->th_sum, - htonl(ntohl(sack.start) - - dst->seqdiff), 0); - pf_change_a(&sack.end, &th->th_sum, - htonl(ntohl(sack.end) - - dst->seqdiff), 0); + pf_change_proto_a(m, &sack.start, &th->th_sum, + htonl(ntohl(sack.start) - dst->seqdiff), 0); + pf_change_proto_a(m, &sack.end, &th->th_sum, + htonl(ntohl(sack.end) - dst->seqdiff), 0); memcpy(&opt[i], &sack, sizeof(sack)); } copyback = 1; @@ -3115,7 +3165,7 @@ pf_test_rule(struct pf_rule **rm, struct if (PF_ANEQ(saddr, &nk->addr[pd->sidx], af) || nk->port[pd->sidx] != sport) { - pf_change_ap(saddr, &th->th_sport, pd->ip_sum, + pf_change_ap(m, saddr, &th->th_sport, pd->ip_sum, &th->th_sum, &nk->addr[pd->sidx], nk->port[pd->sidx], 0, af); pd->sport = &th->th_sport; @@ -3124,7 +3174,7 @@ pf_test_rule(struct pf_rule **rm, struct if (PF_ANEQ(daddr, &nk->addr[pd->didx], af) || nk->port[pd->didx] != dport) { - pf_change_ap(daddr, &th->th_dport, pd->ip_sum, + pf_change_ap(m, daddr, &th->th_dport, pd->ip_sum, &th->th_sum, &nk->addr[pd->didx], nk->port[pd->didx], 0, af); dport = th->th_dport; @@ -3138,7 +3188,7 @@ pf_test_rule(struct pf_rule **rm, struct if (PF_ANEQ(saddr, &nk->addr[pd->sidx], af) || nk->port[pd->sidx] != sport) { - pf_change_ap(saddr, &pd->hdr.udp->uh_sport, + pf_change_ap(m, saddr, &pd->hdr.udp->uh_sport, pd->ip_sum, &pd->hdr.udp->uh_sum, &nk->addr[pd->sidx], nk->port[pd->sidx], 1, af); @@ -3148,7 +3198,7 @@ pf_test_rule(struct pf_rule **rm, struct if (PF_ANEQ(daddr, &nk->addr[pd->didx], af) || nk->port[pd->didx] != dport) { - pf_change_ap(daddr, &pd->hdr.udp->uh_dport, + pf_change_ap(m, daddr, &pd->hdr.udp->uh_dport, pd->ip_sum, &pd->hdr.udp->uh_sum, &nk->addr[pd->didx], nk->port[pd->didx], 1, af); @@ -3500,7 +3550,7 @@ pf_create_state(struct pf_rule *r, struc if ((s->src.seqdiff = pf_tcp_iss(pd) - s->src.seqlo) == 0) s->src.seqdiff = 1; - pf_change_a(&th->th_seq, &th->th_sum, + pf_change_proto_a(m, &th->th_seq, &th->th_sum, htonl(s->src.seqlo + s->src.seqdiff), 0); *rewrite = 1; } else @@ -3824,9 +3874,9 @@ pf_tcp_track_full(struct pf_state_peer * while ((src->seqdiff = arc4random() - seq) == 0) ; ack = ntohl(th->th_ack) - dst->seqdiff; - pf_change_a(&th->th_seq, &th->th_sum, htonl(seq + + pf_change_proto_a(m, &th->th_seq, &th->th_sum, htonl(seq + src->seqdiff), 0); - pf_change_a(&th->th_ack, &th->th_sum, htonl(ack), 0); + pf_change_proto_a(m, &th->th_ack, &th->th_sum, htonl(ack), 0); *copyback = 1; } else { ack = ntohl(th->th_ack); @@ -3876,9 +3926,9 @@ pf_tcp_track_full(struct pf_state_peer * ack = ntohl(th->th_ack) - dst->seqdiff; if (src->seqdiff) { /* Modulate sequence numbers */ - pf_change_a(&th->th_seq, &th->th_sum, htonl(seq + + pf_change_proto_a(m, &th->th_seq, &th->th_sum, htonl(seq + src->seqdiff), 0); - pf_change_a(&th->th_ack, &th->th_sum, htonl(ack), 0); + pf_change_proto_a(m, &th->th_ack, &th->th_sum, htonl(ack), 0); *copyback = 1; } end = seq + pd->p_len; @@ -4332,14 +4382,14 @@ pf_test_state_tcp(struct pf_state **stat if (PF_ANEQ(pd->src, &nk->addr[pd->sidx], pd->af) || nk->port[pd->sidx] != th->th_sport) - pf_change_ap(pd->src, &th->th_sport, pd->ip_sum, - &th->th_sum, &nk->addr[pd->sidx], + pf_change_ap(m, pd->src, &th->th_sport, + pd->ip_sum, &th->th_sum, &nk->addr[pd->sidx], nk->port[pd->sidx], 0, pd->af); if (PF_ANEQ(pd->dst, &nk->addr[pd->didx], pd->af) || nk->port[pd->didx] != th->th_dport) - pf_change_ap(pd->dst, &th->th_dport, pd->ip_sum, - &th->th_sum, &nk->addr[pd->didx], + pf_change_ap(m, pd->dst, &th->th_dport, + pd->ip_sum, &th->th_sum, &nk->addr[pd->didx], nk->port[pd->didx], 0, pd->af); copyback = 1; } @@ -4403,13 +4453,13 @@ pf_test_state_udp(struct pf_state **stat if (PF_ANEQ(pd->src, &nk->addr[pd->sidx], pd->af) || nk->port[pd->sidx] != uh->uh_sport) - pf_change_ap(pd->src, &uh->uh_sport, pd->ip_sum, + pf_change_ap(m, pd->src, &uh->uh_sport, pd->ip_sum, &uh->uh_sum, &nk->addr[pd->sidx], nk->port[pd->sidx], 1, pd->af); if (PF_ANEQ(pd->dst, &nk->addr[pd->didx], pd->af) || nk->port[pd->didx] != uh->uh_dport) - pf_change_ap(pd->dst, &uh->uh_dport, pd->ip_sum, + pf_change_ap(m, pd->dst, &uh->uh_dport, pd->ip_sum, &uh->uh_sum, &nk->addr[pd->didx], nk->port[pd->didx], 1, pd->af); m_copyback(m, off, sizeof(*uh), (caddr_t)uh); Modified: stable/10/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- stable/10/sys/netpfil/pf/pf_ioctl.c Wed Oct 21 15:31:26 2015 (r289702) +++ stable/10/sys/netpfil/pf/pf_ioctl.c Wed Oct 21 15:32:21 2015 (r289703) @@ -3560,12 +3560,6 @@ pf_check_out(void *arg, struct mbuf **m, { int chk; - /* We need a proper CSUM befor we start (s. OpenBSD ip_output) */ - if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { - in_delayed_cksum(*m); - (*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; - } - chk = pf_test(PF_OUT, ifp, m, inp); if (chk && *m) { m_freem(*m); @@ -3604,13 +3598,6 @@ pf_check6_out(void *arg, struct mbuf **m { int chk; - /* We need a proper CSUM before we start (s. OpenBSD ip_output) */ - if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { - in6_delayed_cksum(*m, - (*m)->m_pkthdr.len - sizeof(struct ip6_hdr), - sizeof(struct ip6_hdr)); - (*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; - } CURVNET_SET(ifp->if_vnet); chk = pf_test6(PF_OUT, ifp, m, inp); CURVNET_RESTORE(); Modified: stable/10/sys/netpfil/pf/pf_norm.c ============================================================================== --- stable/10/sys/netpfil/pf/pf_norm.c Wed Oct 21 15:31:26 2015 (r289702) +++ stable/10/sys/netpfil/pf/pf_norm.c Wed Oct 21 15:32:21 2015 (r289703) @@ -1680,13 +1680,14 @@ pf_normalize_tcp(int dir, struct pfi_kif th->th_x2 = 0; nv = *(u_int16_t *)(&th->th_ack + 1); - th->th_sum = pf_cksum_fixup(th->th_sum, ov, nv, 0); + th->th_sum = pf_proto_cksum_fixup(m, th->th_sum, ov, nv, 0); rewrite = 1; } /* Remove urgent pointer, if TH_URG is not set */ if (!(flags & TH_URG) && th->th_urp) { - th->th_sum = pf_cksum_fixup(th->th_sum, th->th_urp, 0, 0); + th->th_sum = pf_proto_cksum_fixup(m, th->th_sum, th->th_urp, + 0, 0); th->th_urp = 0; rewrite = 1; } @@ -1887,7 +1888,7 @@ pf_normalize_tcp_stateful(struct mbuf *m (src->scrub->pfss_flags & PFSS_TIMESTAMP)) { tsval = ntohl(tsval); - pf_change_a(&opt[2], + pf_change_proto_a(m, &opt[2], &th->th_sum, htonl(tsval + src->scrub->pfss_ts_mod), @@ -1903,7 +1904,7 @@ pf_normalize_tcp_stateful(struct mbuf *m PFSS_TIMESTAMP)) { tsecr = ntohl(tsecr) - dst->scrub->pfss_ts_mod; - pf_change_a(&opt[6], + pf_change_proto_a(m, &opt[6], &th->th_sum, htonl(tsecr), 0); copyback = 1; @@ -2230,8 +2231,8 @@ pf_normalize_tcpopt(struct pf_rule *r, s case TCPOPT_MAXSEG: mss = (u_int16_t *)(optp + 2); if ((ntohs(*mss)) > r->max_mss) { - th->th_sum = pf_cksum_fixup(th->th_sum, - *mss, htons(r->max_mss), 0); + th->th_sum = pf_proto_cksum_fixup(m, + th->th_sum, *mss, htons(r->max_mss), 0); *mss = htons(r->max_mss); rewrite = 1; } From owner-svn-src-all@freebsd.org Wed Oct 21 15:37: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 CB045A1B091; Wed, 21 Oct 2015 15:37:55 +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 936771791; Wed, 21 Oct 2015 15:37:55 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id EE5D51FE023; Wed, 21 Oct 2015 17:37:52 +0200 (CEST) Subject: Re: svn commit: r289700 - in head/sys/compat/linuxkpi: . common common/include common/include/asm common/include/linux common/src To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510211501.t9LF1phM000793@repo.freebsd.org> <5627AF01.8070501@FreeBSD.org> From: Hans Petter Selasky Message-ID: <5627B1B5.30607@selasky.org> Date: Wed, 21 Oct 2015 17:39:33 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <5627AF01.8070501@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: Wed, 21 Oct 2015 15:37:55 -0000 On 10/21/15 17:28, Bryan Drewery wrote: > On 10/21/2015 8:01 AM, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Wed Oct 21 15:01:51 2015 >> New Revision: 289700 >> URL: https://svnweb.freebsd.org/changeset/base/289700 >> >> Log: >> Start process of moving the LinuxKPI into the default kernel build by >> creating an empty directory tree. >> >> Sponsored by: Mellanox Technologies >> >> Added: >> head/sys/compat/linuxkpi/ >> head/sys/compat/linuxkpi/common/ >> head/sys/compat/linuxkpi/common/include/ >> head/sys/compat/linuxkpi/common/include/asm/ >> head/sys/compat/linuxkpi/common/include/linux/ >> head/sys/compat/linuxkpi/common/src/ >> > > This makes me think a branch should be used instead. > Most of what will be done is "svn mv" out of "sys/ofed" and changing some include paths in sys/modules and sys/conf . Can you explain why you think a branch is required ? --HPS From owner-svn-src-all@freebsd.org Wed Oct 21 15:41: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 53A88A1B1F0; Wed, 21 Oct 2015 15:41:18 +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 057F319DB; Wed, 21 Oct 2015 15:41:17 +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 t9LFfHsq011960; Wed, 21 Oct 2015 15:41:17 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LFfGRS011957; Wed, 21 Oct 2015 15:41:16 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510211541.t9LFfGRS011957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Oct 2015 15:41:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289704 - in head/sys: arm/ti/am335x dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 15:41:18 -0000 Author: ian Date: Wed Oct 21 15:41:16 2015 New Revision: 289704 URL: https://svnweb.freebsd.org/changeset/base/289704 Log: Fix parsing of I2C addresses properties in fdt data. I2C address is represented in 7-bits format in DT files, but system expect it in 8-bit format. Also, fix two drivers that locally hack around this bug. Submitted by: Michal Meloun Modified: head/sys/arm/ti/am335x/am335x_pmic.c head/sys/arm/ti/am335x/tda19988.c head/sys/dev/ofw/ofw_iicbus.c Modified: head/sys/arm/ti/am335x/am335x_pmic.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_pmic.c Wed Oct 21 15:32:21 2015 (r289703) +++ head/sys/arm/ti/am335x/am335x_pmic.c Wed Oct 21 15:41:16 2015 (r289704) @@ -147,7 +147,7 @@ am335x_pmic_probe(device_t dev) sc = device_get_softc(dev); sc->sc_dev = dev; /* Convert to 8-bit addressing */ - sc->sc_addr = iicbus_get_addr(dev) << 1; + sc->sc_addr = iicbus_get_addr(dev); device_set_desc(dev, "TI TPS65217 Power Management IC"); Modified: head/sys/arm/ti/am335x/tda19988.c ============================================================================== --- head/sys/arm/ti/am335x/tda19988.c Wed Oct 21 15:32:21 2015 (r289703) +++ head/sys/arm/ti/am335x/tda19988.c Wed Oct 21 15:41:16 2015 (r289704) @@ -731,7 +731,7 @@ tda19988_attach(device_t dev) sc = device_get_softc(dev); sc->sc_dev = dev; - sc->sc_addr = iicbus_get_addr(dev) << 1; + sc->sc_addr = iicbus_get_addr(dev); sc->sc_cec_addr = (0x34 << 1); /* hardcoded */ sc->sc_edid = malloc(EDID_LENGTH, M_DEVBUF, M_WAITOK | M_ZERO); sc->sc_edid_len = EDID_LENGTH; Modified: head/sys/dev/ofw/ofw_iicbus.c ============================================================================== --- head/sys/dev/ofw/ofw_iicbus.c Wed Oct 21 15:32:21 2015 (r289703) +++ head/sys/dev/ofw/ofw_iicbus.c Wed Oct 21 15:41:16 2015 (r289704) @@ -147,7 +147,11 @@ ofw_iicbus_attach(device_t dev) M_NOWAIT | M_ZERO); if (dinfo == NULL) continue; - dinfo->opd_dinfo.addr = paddr; + /* + * OFW uses 7-bit I2C address format (see ePAPR), + * but system expect 8-bit. + */ + dinfo->opd_dinfo.addr = paddr << 1; if (ofw_bus_gen_setup_devinfo(&dinfo->opd_obdinfo, child) != 0) { free(dinfo, M_DEVBUF); From owner-svn-src-all@freebsd.org Wed Oct 21 15:42: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 5237FA1B235; Wed, 21 Oct 2015 15:42:02 +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 39AA41C6B; Wed, 21 Oct 2015 15:42:02 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 335321D8B; Wed, 21 Oct 2015 15:42:02 +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 DD7B015AB7; Wed, 21 Oct 2015 15:42:01 +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 I3OsleTwWT2k; Wed, 21 Oct 2015 15:41:59 +0000 (UTC) Subject: Re: svn commit: r289700 - in head/sys/compat/linuxkpi: . common common/include common/include/asm common/include/linux common/src DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 8558315AB2 To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510211501.t9LF1phM000793@repo.freebsd.org> <5627AF01.8070501@FreeBSD.org> <5627B1B5.30607@selasky.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5627B24A.4010905@FreeBSD.org> Date: Wed, 21 Oct 2015 08:42:02 -0700 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: <5627B1B5.30607@selasky.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dAM54jQ4m7gl9FxTpvp2xIn7llFQsgp7V" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 15:42:02 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --dAM54jQ4m7gl9FxTpvp2xIn7llFQsgp7V Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/21/2015 8:39 AM, Hans Petter Selasky wrote: > On 10/21/15 17:28, Bryan Drewery wrote: >> On 10/21/2015 8:01 AM, Hans Petter Selasky wrote: >>> Author: hselasky >>> Date: Wed Oct 21 15:01:51 2015 >>> New Revision: 289700 >>> URL: https://svnweb.freebsd.org/changeset/base/289700 >>> >>> Log: >>> Start process of moving the LinuxKPI into the default kernel build= by >>> creating an empty directory tree. >>> >>> Sponsored by: Mellanox Technologies >>> >>> Added: >>> head/sys/compat/linuxkpi/ >>> head/sys/compat/linuxkpi/common/ >>> head/sys/compat/linuxkpi/common/include/ >>> head/sys/compat/linuxkpi/common/include/asm/ >>> head/sys/compat/linuxkpi/common/include/linux/ >>> head/sys/compat/linuxkpi/common/src/ >>> >> >> This makes me think a branch should be used instead. >> >=20 > Most of what will be done is "svn mv" out of "sys/ofed" and changing > some include paths in sys/modules and sys/conf . Can you explain why yo= u > think a branch is required ? Because you're splitting commits up that should otherwise not be split up. There's no reason to commit empty directories before a 'svn mv' into them. --=20 Regards, Bryan Drewery --dAM54jQ4m7gl9FxTpvp2xIn7llFQsgp7V 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 iQEcBAEBAgAGBQJWJ7JLAAoJEDXXcbtuRpfPzd0H/A40JZhouq+EBVbcGy8lDiK2 5tV7Y5pmpyZvzYuSLhTqYthMgGTc9WHo0RY3SBV5LobBwYfV2NkC8LlP0fVJPbFx IinhzDPsHjTlkxRTr09uWZaXw9Dhg7n1+9wJmm8xlW0ejWfKSOVk/q1UcKI2AuZD 2dHtDB8aIlGsVRl8BRUEM61hT9J05A00W6697zJbKWGmQi7kGQbYChiPTLFaKaJV sFU9cgTkoYDQwWvK3pDA8+z8omK04FK//NRUkn8idRydtXiqhn0cfAAFAuoyhoyZ 4zDYhxucxivN4oEMrW0NcN6DFf2m/Bkfs63SMQ97HYbIBWqwuY3jfYY5c5krp5Q= =kNk+ -----END PGP SIGNATURE----- --dAM54jQ4m7gl9FxTpvp2xIn7llFQsgp7V-- From owner-svn-src-all@freebsd.org Wed Oct 21 15:54: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 11547A1B4F8; Wed, 21 Oct 2015 15:54:43 +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 CB4D02B6; Wed, 21 Oct 2015 15:54:42 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id B0D3A1FE023; Wed, 21 Oct 2015 17:54:39 +0200 (CEST) Subject: Re: svn commit: r289700 - in head/sys/compat/linuxkpi: . common common/include common/include/asm common/include/linux common/src To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510211501.t9LF1phM000793@repo.freebsd.org> <5627AF01.8070501@FreeBSD.org> <5627B1B5.30607@selasky.org> <5627B24A.4010905@FreeBSD.org> From: Hans Petter Selasky Message-ID: <5627B5A4.70800@selasky.org> Date: Wed, 21 Oct 2015 17:56:20 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <5627B24A.4010905@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: Wed, 21 Oct 2015 15:54:43 -0000 On 10/21/15 17:42, Bryan Drewery wrote: > On 10/21/2015 8:39 AM, Hans Petter Selasky wrote: >> On 10/21/15 17:28, Bryan Drewery wrote: >>> On 10/21/2015 8:01 AM, Hans Petter Selasky wrote: >>>> Author: hselasky >>>> Date: Wed Oct 21 15:01:51 2015 >>>> New Revision: 289700 >>>> URL: https://svnweb.freebsd.org/changeset/base/289700 >>>> >>>> Log: >>>> Start process of moving the LinuxKPI into the default kernel build by >>>> creating an empty directory tree. >>>> >>>> Sponsored by: Mellanox Technologies >>>> >>>> Added: >>>> head/sys/compat/linuxkpi/ >>>> head/sys/compat/linuxkpi/common/ >>>> head/sys/compat/linuxkpi/common/include/ >>>> head/sys/compat/linuxkpi/common/include/asm/ >>>> head/sys/compat/linuxkpi/common/include/linux/ >>>> head/sys/compat/linuxkpi/common/src/ >>>> >>> >>> This makes me think a branch should be used instead. >>> >> >> Most of what will be done is "svn mv" out of "sys/ofed" and changing >> some include paths in sys/modules and sys/conf . Can you explain why you >> think a branch is required ? > > Because you're splitting commits up that should otherwise not be split > up. There's no reason to commit empty directories before a 'svn mv' into > them. OK, I see. Do you want me to revert the "svn add" and put it altogether in a single commit, or is not not that big deal if I keep the next linuxkpi file moving as a single commit? --HPS From owner-svn-src-all@freebsd.org Wed Oct 21 16:07: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 282B5A1B8A5; Wed, 21 Oct 2015 16:07:22 +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 0B207AF5; Wed, 21 Oct 2015 16:07:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 0458F134F; Wed, 21 Oct 2015 16:07:22 +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 B3B3215B29; Wed, 21 Oct 2015 16:07:21 +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 Pfk2qyW22fQ3; Wed, 21 Oct 2015 16:07:16 +0000 (UTC) Subject: Re: svn commit: r289700 - in head/sys/compat/linuxkpi: . common common/include common/include/asm common/include/linux common/src DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 9D44E15B23 To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510211501.t9LF1phM000793@repo.freebsd.org> <5627AF01.8070501@FreeBSD.org> <5627B1B5.30607@selasky.org> <5627B24A.4010905@FreeBSD.org> <5627B5A4.70800@selasky.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5627B836.7010704@FreeBSD.org> Date: Wed, 21 Oct 2015 09:07:18 -0700 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: <5627B5A4.70800@selasky.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="V0FVMBdkdnQCHTiIKaUQkq0Hj0df16Kpf" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 16:07:22 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --V0FVMBdkdnQCHTiIKaUQkq0Hj0df16Kpf Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/21/2015 8:56 AM, Hans Petter Selasky wrote: > On 10/21/15 17:42, Bryan Drewery wrote: >> On 10/21/2015 8:39 AM, Hans Petter Selasky wrote: >>> On 10/21/15 17:28, Bryan Drewery wrote: >>>> On 10/21/2015 8:01 AM, Hans Petter Selasky wrote: >>>>> Author: hselasky >>>>> Date: Wed Oct 21 15:01:51 2015 >>>>> New Revision: 289700 >>>>> URL: https://svnweb.freebsd.org/changeset/base/289700 >>>>> >>>>> Log: >>>>> Start process of moving the LinuxKPI into the default kernel >>>>> build by >>>>> creating an empty directory tree. >>>>> >>>>> Sponsored by: Mellanox Technologies >>>>> >>>>> Added: >>>>> head/sys/compat/linuxkpi/ >>>>> head/sys/compat/linuxkpi/common/ >>>>> head/sys/compat/linuxkpi/common/include/ >>>>> head/sys/compat/linuxkpi/common/include/asm/ >>>>> head/sys/compat/linuxkpi/common/include/linux/ >>>>> head/sys/compat/linuxkpi/common/src/ >>>>> >>>> >>>> This makes me think a branch should be used instead. >>>> >>> >>> Most of what will be done is "svn mv" out of "sys/ofed" and changing >>> some include paths in sys/modules and sys/conf . Can you explain why = you >>> think a branch is required ? >> >> Because you're splitting commits up that should otherwise not be split= >> up. There's no reason to commit empty directories before a 'svn mv' in= to >> them. >=20 > OK, I see. Do you want me to revert the "svn add" and put it altogether= > in a single commit, or is not not that big deal if I keep the next > linuxkpi file moving as a single commit? No, it's fine. I just didn't want to see subsequent partial commits that broke the tree. --=20 Regards, Bryan Drewery --V0FVMBdkdnQCHTiIKaUQkq0Hj0df16Kpf 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 iQEcBAEBAgAGBQJWJ7g2AAoJEDXXcbtuRpfPXhkH/AwxHmkvrBgbgGNxdXsq5Lec drnNLxT51JTyXknsSPVdq0cymFfMsGVhQhBv4SVmaumm//ASDIP9rtpON3YH8Nja aS6mF1Fk7npru9Fx9wKKjwb3Fwj5cWKnivpoxZjO9HVL2I/vA3vH8jC0vewNdD/y 8JwOQuDmJVYGLH2+BZfWKakdqjPMJgUTI/67n9XHSDj2HI4MMcftYQd6/9UgvIou FqK1IXXMsy0sC+bLai4FI2IDTB+SSs323BxNROPgLEU89qFKIKKiTPeL0KCYtaDQ UTubNffJD8aQeqzXGDmFwSKK7LNQkC9iWyTmDhWbfAKzOd1ohCQk8L8/I9Ls9Zo= =8E1x -----END PGP SIGNATURE----- --V0FVMBdkdnQCHTiIKaUQkq0Hj0df16Kpf-- From owner-svn-src-all@freebsd.org Wed Oct 21 16:24: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 A6207A1BD27; Wed, 21 Oct 2015 16:24:45 +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 573A113AA; Wed, 21 Oct 2015 16:24:45 +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 t9LGOieQ026031; Wed, 21 Oct 2015 16:24:44 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LGOi0q026030; Wed, 21 Oct 2015 16:24:44 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510211624.t9LGOi0q026030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 21 Oct 2015 16:24:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289705 - 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, 21 Oct 2015 16:24:45 -0000 Author: bdrewery Date: Wed Oct 21 16:24:44 2015 New Revision: 289705 URL: https://svnweb.freebsd.org/changeset/base/289705 Log: Remove indirection of _sub target for using _SUBDIR. This reverts r266473 as the need for it, working around .MAKE and '+' issues, is no longer needed after r289460. This avoids extra log output in -j builds of '-- _sub.TARGET --' that are redundant with the '-- TARGET --' and '-- TARGET_subdir_DIR --' entries already showing. r266473 also made a subtle change in the ordering of _SUBDIR handling. Before the change, SUBDIRS were recursed into after building the TARGET due to the .USE of _SUBDIR *appending* the commands onto the TARGET. After the change though the indirection caused TARGET to depend on _sub.TARGET which had the _SUBDIR handling in it. This TARGET would run after recursing. However, the SUBDIR_PARALLEL handling from r263778 has this ordering as well. Since this has so far not been a problem, for now make this behavior for non-SUBDIR_PARALLEL use of _SUBDIR explicit by using .USEBEFORE. Further research may change this back to .USE as well as the SUBDIR_PARALLEL handling and bsd.progs.mk recursing. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Wed Oct 21 15:41:16 2015 (r289704) +++ head/share/mk/bsd.subdir.mk Wed Oct 21 16:24:44 2015 (r289705) @@ -72,9 +72,9 @@ _SUBDIR_SH= \ cd ${.CURDIR}/$${dir}; \ ${MAKE} $${target} DIRPRFX=${DIRPRFX}$${dir}/ -_SUBDIR: .USE .MAKE +_SUBDIR: .USEBEFORE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) - @${_+_}target=${.TARGET:S,realinstall,install,:S,^_sub.,,}; \ + @${_+_}target=${.TARGET:S,realinstall,install,}; \ for dir in ${SUBDIR:N.WAIT}; do ${_SUBDIR_SH}; done .endif @@ -107,8 +107,7 @@ ${__target}_subdir_${__dir}: .PHONY .MAK .endfor ${__target}: ${__subdir_targets} .else -${__target}: _sub.${__target} -_sub.${__target}: _SUBDIR +${__target}: _SUBDIR .endif .endfor @@ -119,8 +118,7 @@ _sub.${__target}: _SUBDIR .for __stage in build install ${__stage}${__target}: .if make(${__stage}${__target}) -${__stage}${__target}: _sub.${__stage}${__target} -_sub.${__stage}${__target}: _SUBDIR +${__stage}${__target}: _SUBDIR .endif .endfor .if !target(${__target}) From owner-svn-src-all@freebsd.org Wed Oct 21 16:32: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 13EAEA1BEB0; Wed, 21 Oct 2015 16:32:03 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD30818BB; Wed, 21 Oct 2015 16:32:02 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9LGW1iL028767; Wed, 21 Oct 2015 16:32:01 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LGW1FE028766; Wed, 21 Oct 2015 16:32:01 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201510211632.t9LGW1FE028766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Wed, 21 Oct 2015 16:32:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289706 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 16:32:03 -0000 Author: ed Date: Wed Oct 21 16:32:01 2015 New Revision: 289706 URL: https://svnweb.freebsd.org/changeset/base/289706 Log: Add missing forward declaration of struct image_params. Modified: head/sys/sys/imgact_elf.h Modified: head/sys/sys/imgact_elf.h ============================================================================== --- head/sys/sys/imgact_elf.h Wed Oct 21 16:24:44 2015 (r289705) +++ head/sys/sys/imgact_elf.h Wed Oct 21 16:32:01 2015 (r289706) @@ -37,6 +37,7 @@ #define AUXARGS_ENTRY(pos, id, val) {suword(pos++, id); suword(pos++, val);} +struct image_params; struct thread; /* From owner-svn-src-all@freebsd.org Wed Oct 21 17: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 0F078A1B91D; Wed, 21 Oct 2015 17: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 CB32E12C4; Wed, 21 Oct 2015 17: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 t9LHRhYo043965; Wed, 21 Oct 2015 17:27:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LHRhs4043964; Wed, 21 Oct 2015 17:27:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510211727.t9LHRhs4043964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 21 Oct 2015 17:27:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289707 - head/sys/dev/ata/chipsets X-SVN-Group: head MIME-Version: 1.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, 21 Oct 2015 17:27:45 -0000 Author: mav Date: Wed Oct 21 17:27:43 2015 New Revision: 289707 URL: https://svnweb.freebsd.org/changeset/base/289707 Log: Pass proper device to pci_read_config(). For some reason JMicron driver was different from others at this point. Modified: head/sys/dev/ata/chipsets/ata-jmicron.c Modified: head/sys/dev/ata/chipsets/ata-jmicron.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-jmicron.c Wed Oct 21 16:32:01 2015 (r289706) +++ head/sys/dev/ata/chipsets/ata-jmicron.c Wed Oct 21 17:27:43 2015 (r289707) @@ -142,12 +142,13 @@ ata_jmicron_ch_attach(device_t dev) static int ata_jmicron_setmode(device_t dev, int target, int mode) { - struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); + device_t parent = device_get_parent(dev); + struct ata_pci_controller *ctlr = device_get_softc(parent); mode = min(mode, ctlr->chip->max_dma); /* check for 80pin cable present */ if (ata_dma_check_80pin && mode > ATA_UDMA2 && - pci_read_config(dev, 0x40, 1) & 0x08) { + pci_read_config(parent, 0x40, 1) & 0x08) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; } From owner-svn-src-all@freebsd.org Wed Oct 21 17:41: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 381CEA1BCD0; Wed, 21 Oct 2015 17:41:22 +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 DD0DA1CB2; Wed, 21 Oct 2015 17:41:21 +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 t9LHfK0o048935; Wed, 21 Oct 2015 17:41:20 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LHfKjv048934; Wed, 21 Oct 2015 17:41:20 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510211741.t9LHfKjv048934@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Oct 2015 17:41:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289708 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 17:41:22 -0000 Author: ian Date: Wed Oct 21 17:41:20 2015 New Revision: 289708 URL: https://svnweb.freebsd.org/changeset/base/289708 Log: Free memory back into the categories it was allocated from. Noticed by: sbruno Pointy hat: ian Modified: head/sys/mips/mips/busdma_machdep.c Modified: head/sys/mips/mips/busdma_machdep.c ============================================================================== --- head/sys/mips/mips/busdma_machdep.c Wed Oct 21 17:27:43 2015 (r289707) +++ head/sys/mips/mips/busdma_machdep.c Wed Oct 21 17:41:20 2015 (r289708) @@ -340,14 +340,15 @@ _busdma_alloc_dmamap(bus_dma_tag_t dmat) if (map != NULL) map->slist = slist; else - free(slist, M_DEVBUF); + free(slist, M_BUSDMA); return (map); } static __inline void _busdma_free_dmamap(bus_dmamap_t map) { - free(map->slist, M_DEVBUF); + + free(map->slist, M_BUSDMA); uma_zfree(dmamap_zone, map); } @@ -439,7 +440,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, /* Must bounce */ if ((error = alloc_bounce_zone(newtag)) != 0) { - free(newtag, M_DEVBUF); + free(newtag, M_BUSDMA); return (error); } bz = newtag->bounce_zone; @@ -458,7 +459,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, } else newtag->bounce_zone = NULL; if (error != 0) - free(newtag, M_DEVBUF); + free(newtag, M_BUSDMA); else *dmat = newtag; CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d", @@ -485,8 +486,8 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) atomic_subtract_int(&dmat->ref_count, 1); if (dmat->ref_count == 0) { if (dmat->segments != NULL) - free(dmat->segments, M_DEVBUF); - free(dmat, M_DEVBUF); + free(dmat->segments, M_BUSDMA); + free(dmat, M_BUSDMA); /* * Last reference count, so * release our reference @@ -724,7 +725,7 @@ bus_dmamem_free(bus_dma_tag_t dmat, void else ba = standard_allocator; - free(map->slist, M_DEVBUF); + free(map->slist, M_BUSDMA); uma_zfree(dmamap_zone, map); bufzone = busdma_bufalloc_findzone(ba, dmat->maxsize); @@ -1348,7 +1349,7 @@ alloc_bounce_pages(bus_dma_tag_t dmat, u PAGE_SIZE, 0); if (bpage->vaddr == 0) { - free(bpage, M_DEVBUF); + free(bpage, M_BUSDMA); break; } bpage->busaddr = pmap_kextract(bpage->vaddr); From owner-svn-src-all@freebsd.org Wed Oct 21 17: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 665F3A1BEA6; Wed, 21 Oct 2015 17:49:56 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2445F1F0; Wed, 21 Oct 2015 17:49:56 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9LHntxi049884; Wed, 21 Oct 2015 17:49:55 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LHntOT049882; Wed, 21 Oct 2015 17:49:55 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201510211749.t9LHntOT049882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 21 Oct 2015 17:49:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289709 - in vendor/ntp: . dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 17:49:56 -0000 Author: glebius Date: Wed Oct 21 17:49:54 2015 New Revision: 289709 URL: https://svnweb.freebsd.org/changeset/base/289709 Log: Move FREEBSD-* files out of dist into vendor/ntp. Added: vendor/ntp/FREEBSD-Xlist - copied unchanged from r289708, vendor/ntp/dist/FREEBSD-Xlist vendor/ntp/FREEBSD-upgrade - copied unchanged from r289708, vendor/ntp/dist/FREEBSD-upgrade Deleted: vendor/ntp/dist/FREEBSD-Xlist vendor/ntp/dist/FREEBSD-upgrade Copied: vendor/ntp/FREEBSD-Xlist (from r289708, vendor/ntp/dist/FREEBSD-Xlist) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ntp/FREEBSD-Xlist Wed Oct 21 17:49:54 2015 (r289709, copy of r289708, vendor/ntp/dist/FREEBSD-Xlist) @@ -0,0 +1,2 @@ +*ports +*html/pic Copied: vendor/ntp/FREEBSD-upgrade (from r289708, vendor/ntp/dist/FREEBSD-upgrade) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ntp/FREEBSD-upgrade Wed Oct 21 17:49:54 2015 (r289709, copy of r289708, vendor/ntp/dist/FREEBSD-upgrade) @@ -0,0 +1,55 @@ +# ex:ts=8 +# +# $FreeBSD$ + +NTP 4.2.8 + originals can be found on http://www.ntp.org/downloads.html + +Import +------ + +For the import of NTP the following files were removed: + + ports/* NT files + html/pic/* GIF files + html/build/hints/solaris.xtra.4095849 Trigger merge conflict script + +The stripped down version was created using FREEBSD-Xlist during +extraction: + + tar -X FREEBSD-Xlist -xvzf ntp-4.2.8.tar.gz + mv ntp-4.2.8 4.2.8 + +Imported by: + See procedure on +https://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/subversion-primer.html + +Updating usr.sbin/ntp +--------------------- + +./configure --disable-all-clocks --enable-NMEA --enable-ONCORE +--enable-RAWDCF --with-crypto --disable-debugging +--enable-LOCAL-CLOCK --with-sntp --with-arlib --prefix=/usr + +config.h was generated by running configure and excluding almost all clock +drivers (what is included is DCF77 -- what I use --, NMEA, Motorola OnCORE +and local clocks). + +The file is then edited to edit the value of "NO_PARENB_IGNPAR" because we +need to set no parity on the serial port (needed for DCF77). All clock +drivers are then disabled (some of them are included by default by ntpd). + +Note that there are two #ifdef to support other architectures (WRT to long +size and endianness). They'll need to be redone for each upgrade to the +vendor branch to keep config.h in sync. + +ntpd/ntp_control.c is now the only file that is different from the vendor +branch for unsigned char/int fixes and removal of a DoS. + +Documentation in /usr/share/doc/ntp is generated from the HTML files with +lynx (without the GIF files of course). + +A patch to fix IPV6_MULTICAST_LOOP was committed to head as r222444 and +filed as http://bugs.ntp.org/show_bug.cgi?id=1936. Check if still needed +or re-apply on update. + From owner-svn-src-all@freebsd.org Wed Oct 21 18:30: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 31AE3A1A804; Wed, 21 Oct 2015 18:30:44 +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 F20DE1809; Wed, 21 Oct 2015 18:30:43 +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 t9LIUhW4061528; Wed, 21 Oct 2015 18:30:43 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LIUgWt061526; Wed, 21 Oct 2015 18:30:42 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510211830.t9LIUgWt061526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 21 Oct 2015 18:30:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289710 - in head/sys/modules: i2c/iicbb uart X-SVN-Group: head MIME-Version: 1.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, 21 Oct 2015 18:30:44 -0000 Author: emaste Date: Wed Oct 21 18:30:42 2015 New Revision: 289710 URL: https://svnweb.freebsd.org/changeset/base/289710 Log: Build ofw_bus_if.h for modules that need it on arm64 Modified: head/sys/modules/i2c/iicbb/Makefile head/sys/modules/uart/Makefile Modified: head/sys/modules/i2c/iicbb/Makefile ============================================================================== --- head/sys/modules/i2c/iicbb/Makefile Wed Oct 21 17:49:54 2015 (r289709) +++ head/sys/modules/i2c/iicbb/Makefile Wed Oct 21 18:30:42 2015 (r289710) @@ -1,7 +1,8 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../../dev/iicbus -.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \ + ${MACHINE_CPUARCH} == "powerpc" ofw_bus_if= ofw_bus_if.h .endif KMOD = iicbb Modified: head/sys/modules/uart/Makefile ============================================================================== --- head/sys/modules/uart/Makefile Wed Oct 21 17:49:54 2015 (r289709) +++ head/sys/modules/uart/Makefile Wed Oct 21 18:30:42 2015 (r289710) @@ -10,8 +10,8 @@ uart_bus_ebus= uart_bus_ebus.c uart_dev_lpc= uart_dev_lpc.c .endif -.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "sparc64" || \ - ${MACHINE_CPUARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \ + ${MACHINE_CPUARCH} == "sparc64" || ${MACHINE_CPUARCH} == "powerpc" ofw_bus_if= ofw_bus_if.h .endif From owner-svn-src-all@freebsd.org Wed Oct 21 18: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 E42FEA1AEFF; Wed, 21 Oct 2015 18:52:39 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA505805; Wed, 21 Oct 2015 18:52:39 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9LIqcYR069952; Wed, 21 Oct 2015 18:52:38 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LIqcaA069951; Wed, 21 Oct 2015 18:52:38 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201510211852.t9LIqcaA069951@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 21 Oct 2015 18:52:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r289711 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 18:52:40 -0000 Author: glebius Date: Wed Oct 21 18:52:38 2015 New Revision: 289711 URL: https://svnweb.freebsd.org/changeset/base/289711 Log: Temporary raise my limit for ntp vendor import. > Empty fields above will be automatically removed. M sizelimit.conf Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Wed Oct 21 18:30:42 2015 (r289710) +++ svnadmin/conf/sizelimit.conf Wed Oct 21 18:52:38 2015 (r289711) @@ -45,3 +45,4 @@ sam stas thompsa rpaulo +glebius From owner-svn-src-all@freebsd.org Wed Oct 21 18:58: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 B36C9A1B062; Wed, 21 Oct 2015 18:58: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 7F0A3A4C; Wed, 21 Oct 2015 18:58: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 t9LIwkRF070245; Wed, 21 Oct 2015 18:58:46 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LIwk3C070244; Wed, 21 Oct 2015 18:58:46 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510211858.t9LIwk3C070244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 21 Oct 2015 18:58:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289712 - 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: Wed, 21 Oct 2015 18:58:47 -0000 Author: bdrewery Date: Wed Oct 21 18:58:46 2015 New Revision: 289712 URL: https://svnweb.freebsd.org/changeset/base/289712 Log: Fix my change in r289435 causing 'etc' to be added to SUBDIR when using SUBDIR_OVERRIDE. MFC after: 2 weeks X-MFC-With: r289435 Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Oct 21 18:52:38 2015 (r289711) +++ head/Makefile.inc1 Wed Oct 21 18:58:46 2015 (r289712) @@ -113,7 +113,6 @@ SUBDIR+= ${_DIR} .warning ${_DIR} not added to SUBDIR list. See UPDATING 20141121. .endif .endfor -.endif # We must do etc/ last as it hooks into building the man whatis file # by calling 'makedb' in share/man. This is only relevant for @@ -124,6 +123,8 @@ SUBDIR+=.WAIT .endif SUBDIR+=etc +.endif # defined(SUBDIR_OVERRIDE) + .if defined(NOCLEAN) NO_CLEAN= ${NOCLEAN} .endif From owner-svn-src-all@freebsd.org Wed Oct 21 19:06: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 91EEAA1B1CE; Wed, 21 Oct 2015 19:06:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82484E6E; Wed, 21 Oct 2015 19:06:53 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9LJ6qgr073008; Wed, 21 Oct 2015 19:06:52 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LJ6qFs073004; Wed, 21 Oct 2015 19:06:52 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201510211906.t9LJ6qFs073004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 21 Oct 2015 19:06:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289713 - in vendor/ntp/4.2.8p4: . adjtimed clockstuff conf html html/drivers html/drivers/icons html/drivers/scripts html/hints html/icons html/pic html/scripts include include/isc ker... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 19:06:54 -0000 Author: glebius Date: Wed Oct 21 19:06:51 2015 New Revision: 289713 URL: https://svnweb.freebsd.org/changeset/base/289713 Log: Vendor import of ntp-4.2.8p4. Added: vendor/ntp/4.2.8p4/ vendor/ntp/4.2.8p4/COPYRIGHT (contents, props changed) vendor/ntp/4.2.8p4/ChangeLog (contents, props changed) vendor/ntp/4.2.8p4/CommitLog (contents, props changed) vendor/ntp/4.2.8p4/CommitLog-4.1.0 (contents, props changed) vendor/ntp/4.2.8p4/INSTALL (contents, props changed) vendor/ntp/4.2.8p4/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/NEWS (contents, props changed) vendor/ntp/4.2.8p4/NOTES.y2kfixes (contents, props changed) vendor/ntp/4.2.8p4/README (contents, props changed) vendor/ntp/4.2.8p4/README.bk (contents, props changed) vendor/ntp/4.2.8p4/README.hackers (contents, props changed) vendor/ntp/4.2.8p4/README.leapsmear (contents, props changed) vendor/ntp/4.2.8p4/README.patches (contents, props changed) vendor/ntp/4.2.8p4/README.refclocks (contents, props changed) vendor/ntp/4.2.8p4/README.versions (contents, props changed) vendor/ntp/4.2.8p4/TODO (contents, props changed) vendor/ntp/4.2.8p4/WHERE-TO-START (contents, props changed) vendor/ntp/4.2.8p4/aclocal.m4 (contents, props changed) vendor/ntp/4.2.8p4/adjtimed/ vendor/ntp/4.2.8p4/adjtimed/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/adjtimed/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/adjtimed/README (contents, props changed) vendor/ntp/4.2.8p4/adjtimed/adjtimed.c (contents, props changed) vendor/ntp/4.2.8p4/bincheck.mf (contents, props changed) vendor/ntp/4.2.8p4/bootstrap (contents, props changed) vendor/ntp/4.2.8p4/build (contents, props changed) vendor/ntp/4.2.8p4/check-libopts.mf (contents, props changed) vendor/ntp/4.2.8p4/clockstuff/ vendor/ntp/4.2.8p4/clockstuff/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/clockstuff/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/clockstuff/README (contents, props changed) vendor/ntp/4.2.8p4/clockstuff/chutest.c (contents, props changed) vendor/ntp/4.2.8p4/clockstuff/propdelay.c (contents, props changed) vendor/ntp/4.2.8p4/compile (contents, props changed) vendor/ntp/4.2.8p4/conf/ vendor/ntp/4.2.8p4/conf/README (contents, props changed) vendor/ntp/4.2.8p4/conf/baldwin.conf (contents, props changed) vendor/ntp/4.2.8p4/conf/beauregard.conf (contents, props changed) vendor/ntp/4.2.8p4/conf/grundoon.conf (contents, props changed) vendor/ntp/4.2.8p4/conf/malarky.conf (contents, props changed) vendor/ntp/4.2.8p4/conf/pogo.conf (contents, props changed) vendor/ntp/4.2.8p4/conf/rackety.conf (contents, props changed) vendor/ntp/4.2.8p4/config.guess (contents, props changed) vendor/ntp/4.2.8p4/config.h.in (contents, props changed) vendor/ntp/4.2.8p4/config.sub (contents, props changed) vendor/ntp/4.2.8p4/configure (contents, props changed) vendor/ntp/4.2.8p4/configure.ac (contents, props changed) vendor/ntp/4.2.8p4/depcomp (contents, props changed) vendor/ntp/4.2.8p4/deps-ver (contents, props changed) vendor/ntp/4.2.8p4/depsver.mf (contents, props changed) vendor/ntp/4.2.8p4/dot.emacs (contents, props changed) vendor/ntp/4.2.8p4/flock-build (contents, props changed) vendor/ntp/4.2.8p4/html/ vendor/ntp/4.2.8p4/html/access.html (contents, props changed) vendor/ntp/4.2.8p4/html/accopt.html (contents, props changed) vendor/ntp/4.2.8p4/html/assoc.html (contents, props changed) vendor/ntp/4.2.8p4/html/audio.html (contents, props changed) vendor/ntp/4.2.8p4/html/authentic.html (contents, props changed) vendor/ntp/4.2.8p4/html/authopt.html (contents, props changed) vendor/ntp/4.2.8p4/html/autokey.html (contents, props changed) vendor/ntp/4.2.8p4/html/bugs.html (contents, props changed) vendor/ntp/4.2.8p4/html/build.html (contents, props changed) vendor/ntp/4.2.8p4/html/clock.html (contents, props changed) vendor/ntp/4.2.8p4/html/clockopt.html (contents, props changed) vendor/ntp/4.2.8p4/html/cluster.html (contents, props changed) vendor/ntp/4.2.8p4/html/comdex.html (contents, props changed) vendor/ntp/4.2.8p4/html/config.html (contents, props changed) vendor/ntp/4.2.8p4/html/confopt.html (contents, props changed) vendor/ntp/4.2.8p4/html/copyright.html (contents, props changed) vendor/ntp/4.2.8p4/html/debug.html (contents, props changed) vendor/ntp/4.2.8p4/html/decode.html (contents, props changed) vendor/ntp/4.2.8p4/html/discipline.html (contents, props changed) vendor/ntp/4.2.8p4/html/discover.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/ vendor/ntp/4.2.8p4/html/drivers/driver1.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver10.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver11.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver12.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver16.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver18.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver19.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver20.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver22.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver26.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver27.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver28.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver29.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver3.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver30.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver31.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver32.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver33.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver34.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver35.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver36.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver37.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver38.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver39.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver4.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver40-ja.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver40.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver42.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver43.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver44.html vendor/ntp/4.2.8p4/html/drivers/driver45.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver46.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver5.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver6.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver7.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver8.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/driver9.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/icons/ vendor/ntp/4.2.8p4/html/drivers/icons/home.gif (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/icons/mail2.gif (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/mx4200data.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/oncore-shmem.html (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/scripts/ vendor/ntp/4.2.8p4/html/drivers/scripts/footer.txt (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/scripts/style.css (contents, props changed) vendor/ntp/4.2.8p4/html/drivers/tf582_4.html (contents, props changed) vendor/ntp/4.2.8p4/html/extern.html (contents, props changed) vendor/ntp/4.2.8p4/html/filter.html (contents, props changed) vendor/ntp/4.2.8p4/html/hints/ vendor/ntp/4.2.8p4/html/hints.html (contents, props changed) vendor/ntp/4.2.8p4/html/hints/a-ux (contents, props changed) vendor/ntp/4.2.8p4/html/hints/aix (contents, props changed) vendor/ntp/4.2.8p4/html/hints/bsdi (contents, props changed) vendor/ntp/4.2.8p4/html/hints/changes (contents, props changed) vendor/ntp/4.2.8p4/html/hints/decosf1 (contents, props changed) vendor/ntp/4.2.8p4/html/hints/decosf2 (contents, props changed) vendor/ntp/4.2.8p4/html/hints/freebsd (contents, props changed) vendor/ntp/4.2.8p4/html/hints/hpux (contents, props changed) vendor/ntp/4.2.8p4/html/hints/linux (contents, props changed) vendor/ntp/4.2.8p4/html/hints/mpeix (contents, props changed) vendor/ntp/4.2.8p4/html/hints/notes-xntp-v3 (contents, props changed) vendor/ntp/4.2.8p4/html/hints/parse (contents, props changed) vendor/ntp/4.2.8p4/html/hints/refclocks (contents, props changed) vendor/ntp/4.2.8p4/html/hints/rs6000 (contents, props changed) vendor/ntp/4.2.8p4/html/hints/sco.html (contents, props changed) vendor/ntp/4.2.8p4/html/hints/sgi (contents, props changed) vendor/ntp/4.2.8p4/html/hints/solaris-dosynctodr.html (contents, props changed) vendor/ntp/4.2.8p4/html/hints/solaris.html (contents, props changed) vendor/ntp/4.2.8p4/html/hints/solaris.xtra.4023118 (contents, props changed) vendor/ntp/4.2.8p4/html/hints/solaris.xtra.4095849 (contents, props changed) vendor/ntp/4.2.8p4/html/hints/solaris.xtra.S99ntpd (contents, props changed) vendor/ntp/4.2.8p4/html/hints/solaris.xtra.patchfreq (contents, props changed) vendor/ntp/4.2.8p4/html/hints/sun4 (contents, props changed) vendor/ntp/4.2.8p4/html/hints/svr4-dell (contents, props changed) vendor/ntp/4.2.8p4/html/hints/svr4_package (contents, props changed) vendor/ntp/4.2.8p4/html/hints/todo (contents, props changed) vendor/ntp/4.2.8p4/html/hints/vxworks.html (contents, props changed) vendor/ntp/4.2.8p4/html/hints/winnt.html (contents, props changed) vendor/ntp/4.2.8p4/html/history.html (contents, props changed) vendor/ntp/4.2.8p4/html/howto.html (contents, props changed) vendor/ntp/4.2.8p4/html/huffpuff.html (contents, props changed) vendor/ntp/4.2.8p4/html/icons/ vendor/ntp/4.2.8p4/html/icons/home.gif (contents, props changed) vendor/ntp/4.2.8p4/html/icons/mail2.gif (contents, props changed) vendor/ntp/4.2.8p4/html/icons/sitemap.png (contents, props changed) vendor/ntp/4.2.8p4/html/index.html (contents, props changed) vendor/ntp/4.2.8p4/html/kern.html (contents, props changed) vendor/ntp/4.2.8p4/html/kernpps.html (contents, props changed) vendor/ntp/4.2.8p4/html/keygen.html (contents, props changed) vendor/ntp/4.2.8p4/html/leap.html (contents, props changed) vendor/ntp/4.2.8p4/html/miscopt.html (contents, props changed) vendor/ntp/4.2.8p4/html/monopt.html (contents, props changed) vendor/ntp/4.2.8p4/html/msyslog.html (contents, props changed) vendor/ntp/4.2.8p4/html/ntp-wait.html (contents, props changed) vendor/ntp/4.2.8p4/html/ntp_conf.html (contents, props changed) vendor/ntp/4.2.8p4/html/ntpd.html (contents, props changed) vendor/ntp/4.2.8p4/html/ntpdate.html (contents, props changed) vendor/ntp/4.2.8p4/html/ntpdc.html (contents, props changed) vendor/ntp/4.2.8p4/html/ntpdsim.html (contents, props changed) vendor/ntp/4.2.8p4/html/ntpdsim_new.html (contents, props changed) vendor/ntp/4.2.8p4/html/ntpq.html (contents, props changed) vendor/ntp/4.2.8p4/html/ntptime.html (contents, props changed) vendor/ntp/4.2.8p4/html/ntptrace.html (contents, props changed) vendor/ntp/4.2.8p4/html/orphan.html (contents, props changed) vendor/ntp/4.2.8p4/html/parsedata.html (contents, props changed) vendor/ntp/4.2.8p4/html/parsenew.html (contents, props changed) vendor/ntp/4.2.8p4/html/pic/ vendor/ntp/4.2.8p4/html/pic/9400n.jpg (contents, props changed) vendor/ntp/4.2.8p4/html/pic/alice11.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/alice13.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/alice15.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/alice23.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/alice31.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/alice32.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/alice35.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/alice38.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/alice44.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/alice47.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/alice51.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/alice61.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/barnstable.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/beaver.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/boom3.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/boom3a.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/boom4.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/broad.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/bustardfly.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/c51.jpg (contents, props changed) vendor/ntp/4.2.8p4/html/pic/description.jpg (contents, props changed) vendor/ntp/4.2.8p4/html/pic/discipline.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/dogsnake.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/driver29.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/driver43_1.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/driver43_2.jpg (contents, props changed) vendor/ntp/4.2.8p4/html/pic/fg6021.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/fg6039.jpg (contents, props changed) vendor/ntp/4.2.8p4/html/pic/fig_3_1.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/flatheads.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/flt1.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/flt2.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/flt3.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/flt4.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/flt5.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/flt6.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/flt7.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/flt8.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/flt9.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/freq1211.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/gadget.jpg (contents, props changed) vendor/ntp/4.2.8p4/html/pic/gps167.jpg (contents, props changed) vendor/ntp/4.2.8p4/html/pic/group.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/hornraba.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/igclock.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/neoclock4x.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/offset1211.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/oncore_evalbig.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/oncore_remoteant.jpg (contents, props changed) vendor/ntp/4.2.8p4/html/pic/oncore_utplusbig.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/oz2.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/panda.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/pd_om006.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/pd_om011.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/peer.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/pogo.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/pogo1a.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/pogo3a.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/pogo4.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/pogo5.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/pogo6.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/pogo7.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/pogo8.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/pzf509.jpg (contents, props changed) vendor/ntp/4.2.8p4/html/pic/pzf511.jpg (contents, props changed) vendor/ntp/4.2.8p4/html/pic/rabbit.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/radio2.jpg (contents, props changed) vendor/ntp/4.2.8p4/html/pic/sheepb.jpg (contents, props changed) vendor/ntp/4.2.8p4/html/pic/stack1a.jpg (contents, props changed) vendor/ntp/4.2.8p4/html/pic/stats.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/sx5.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/thunderbolt.jpg (contents, props changed) vendor/ntp/4.2.8p4/html/pic/time1.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/tonea.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/tribeb.gif (contents, props changed) vendor/ntp/4.2.8p4/html/pic/wingdorothy.gif (contents, props changed) vendor/ntp/4.2.8p4/html/poll.html (contents, props changed) vendor/ntp/4.2.8p4/html/pps.html (contents, props changed) vendor/ntp/4.2.8p4/html/prefer.html (contents, props changed) vendor/ntp/4.2.8p4/html/quick.html (contents, props changed) vendor/ntp/4.2.8p4/html/rate.html (contents, props changed) vendor/ntp/4.2.8p4/html/rdebug.html (contents, props changed) vendor/ntp/4.2.8p4/html/refclock.html (contents, props changed) vendor/ntp/4.2.8p4/html/release.html (contents, props changed) vendor/ntp/4.2.8p4/html/scripts/ vendor/ntp/4.2.8p4/html/scripts/accopt.txt (contents, props changed) vendor/ntp/4.2.8p4/html/scripts/audio.txt (contents, props changed) vendor/ntp/4.2.8p4/html/scripts/authopt.txt (contents, props changed) vendor/ntp/4.2.8p4/html/scripts/clockopt.txt (contents, props changed) vendor/ntp/4.2.8p4/html/scripts/command.txt (contents, props changed) vendor/ntp/4.2.8p4/html/scripts/config.txt (contents, props changed) vendor/ntp/4.2.8p4/html/scripts/confopt.txt (contents, props changed) vendor/ntp/4.2.8p4/html/scripts/external.txt (contents, props changed) vendor/ntp/4.2.8p4/html/scripts/footer.txt vendor/ntp/4.2.8p4/html/scripts/hand.txt (contents, props changed) vendor/ntp/4.2.8p4/html/scripts/install.txt (contents, props changed) vendor/ntp/4.2.8p4/html/scripts/manual.txt (contents, props changed) vendor/ntp/4.2.8p4/html/scripts/misc.txt (contents, props changed) vendor/ntp/4.2.8p4/html/scripts/miscopt.txt (contents, props changed) vendor/ntp/4.2.8p4/html/scripts/monopt.txt (contents, props changed) vendor/ntp/4.2.8p4/html/scripts/refclock.txt (contents, props changed) vendor/ntp/4.2.8p4/html/scripts/special.txt (contents, props changed) vendor/ntp/4.2.8p4/html/scripts/style.css vendor/ntp/4.2.8p4/html/select.html (contents, props changed) vendor/ntp/4.2.8p4/html/sitemap.html (contents, props changed) vendor/ntp/4.2.8p4/html/sntp.html (contents, props changed) vendor/ntp/4.2.8p4/html/stats.html (contents, props changed) vendor/ntp/4.2.8p4/html/tickadj.html (contents, props changed) vendor/ntp/4.2.8p4/html/warp.html (contents, props changed) vendor/ntp/4.2.8p4/html/xleave.html (contents, props changed) vendor/ntp/4.2.8p4/include/ vendor/ntp/4.2.8p4/include/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/include/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/include/README (contents, props changed) vendor/ntp/4.2.8p4/include/adjtime.h (contents, props changed) vendor/ntp/4.2.8p4/include/ascii.h (contents, props changed) vendor/ntp/4.2.8p4/include/audio.h (contents, props changed) vendor/ntp/4.2.8p4/include/binio.h (contents, props changed) vendor/ntp/4.2.8p4/include/declcond.h (contents, props changed) vendor/ntp/4.2.8p4/include/gps.h (contents, props changed) vendor/ntp/4.2.8p4/include/hopf6039.h (contents, props changed) vendor/ntp/4.2.8p4/include/icom.h (contents, props changed) vendor/ntp/4.2.8p4/include/ieee754io.h (contents, props changed) vendor/ntp/4.2.8p4/include/intreswork.h (contents, props changed) vendor/ntp/4.2.8p4/include/iosignal.h (contents, props changed) vendor/ntp/4.2.8p4/include/isc/ vendor/ntp/4.2.8p4/include/isc/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/include/isc/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/include/isc/mem.h (contents, props changed) vendor/ntp/4.2.8p4/include/l_stdlib.h (contents, props changed) vendor/ntp/4.2.8p4/include/lib_strbuf.h (contents, props changed) vendor/ntp/4.2.8p4/include/libntp.h (contents, props changed) vendor/ntp/4.2.8p4/include/mbg_gps166.h (contents, props changed) vendor/ntp/4.2.8p4/include/mx4200.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntif.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_assert.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_calendar.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_cmdargs.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_config.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_control.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_crypto.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_datum.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_debug.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_filegen.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_fp.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_if.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_intres.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_io.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_libopts.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_lineedit.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_lists.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_machine.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_malloc.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_md5.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_net.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_prio_q.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_proto.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_random.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_refclock.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_request.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_rfc2553.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_select.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_stdlib.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_string.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_syscall.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_syslog.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_tty.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_types.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_unixtime.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_worker.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntp_workimpl.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntpd.h (contents, props changed) vendor/ntp/4.2.8p4/include/ntpsim.h (contents, props changed) vendor/ntp/4.2.8p4/include/parse.h (contents, props changed) vendor/ntp/4.2.8p4/include/parse_conf.h (contents, props changed) vendor/ntp/4.2.8p4/include/rc_cmdlength.h (contents, props changed) vendor/ntp/4.2.8p4/include/recvbuff.h (contents, props changed) vendor/ntp/4.2.8p4/include/refclock_atom.h (contents, props changed) vendor/ntp/4.2.8p4/include/refidsmear.h (contents, props changed) vendor/ntp/4.2.8p4/include/ssl_applink.c (contents, props changed) vendor/ntp/4.2.8p4/include/timepps-SCO.h (contents, props changed) vendor/ntp/4.2.8p4/include/timepps-Solaris.h (contents, props changed) vendor/ntp/4.2.8p4/include/timepps-SunOS.h (contents, props changed) vendor/ntp/4.2.8p4/include/timespecops.h (contents, props changed) vendor/ntp/4.2.8p4/include/timetoa.h (contents, props changed) vendor/ntp/4.2.8p4/include/timevalops.h (contents, props changed) vendor/ntp/4.2.8p4/include/trimble.h (contents, props changed) vendor/ntp/4.2.8p4/include/vint64ops.h (contents, props changed) vendor/ntp/4.2.8p4/includes.mf (contents, props changed) vendor/ntp/4.2.8p4/install-sh (contents, props changed) vendor/ntp/4.2.8p4/kernel/ vendor/ntp/4.2.8p4/kernel/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/kernel/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/kernel/sys/ vendor/ntp/4.2.8p4/kernel/sys/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/kernel/sys/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/kernel/sys/README (contents, props changed) vendor/ntp/4.2.8p4/kernel/sys/bsd_audioirig.h (contents, props changed) vendor/ntp/4.2.8p4/kernel/sys/i8253.h (contents, props changed) vendor/ntp/4.2.8p4/kernel/sys/parsestreams.h (contents, props changed) vendor/ntp/4.2.8p4/kernel/sys/pcl720.h (contents, props changed) vendor/ntp/4.2.8p4/kernel/sys/ppsclock.h (contents, props changed) vendor/ntp/4.2.8p4/kernel/sys/timex.h (contents, props changed) vendor/ntp/4.2.8p4/kernel/sys/tpro.h (contents, props changed) vendor/ntp/4.2.8p4/kernel/sys/tt560_api.h (contents, props changed) vendor/ntp/4.2.8p4/lib/ vendor/ntp/4.2.8p4/lib/isc/ vendor/ntp/4.2.8p4/lib/isc/Atffile (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/alpha/ vendor/ntp/4.2.8p4/lib/isc/alpha/include/ vendor/ntp/4.2.8p4/lib/isc/alpha/include/isc/ vendor/ntp/4.2.8p4/lib/isc/alpha/include/isc/atomic.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/api (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/app_api.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/assertions.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/backtrace-emptytbl.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/backtrace.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/base32.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/base64.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/bitstring.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/buffer.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/bufferlist.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/commandline.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/entropy.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/error.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/event.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/fsaccess.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/hash.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/heap.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/hex.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/hmacmd5.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/hmacsha.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/httpd.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/ia64/ vendor/ntp/4.2.8p4/lib/isc/ia64/include/ vendor/ntp/4.2.8p4/lib/isc/ia64/include/isc/ vendor/ntp/4.2.8p4/lib/isc/ia64/include/isc/atomic.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/ vendor/ntp/4.2.8p4/lib/isc/include/isc/ vendor/ntp/4.2.8p4/lib/isc/include/isc/app.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/assertions.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/backtrace.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/base32.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/base64.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/bind9.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/bitstring.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/boolean.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/buffer.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/bufferlist.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/commandline.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/entropy.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/error.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/event.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/eventclass.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/file.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/formatcheck.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/fsaccess.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/hash.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/heap.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/hex.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/hmacmd5.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/hmacsha.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/httpd.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/interfaceiter.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/ipv6.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/iterated_hash.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/lang.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/lex.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/lfsr.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/lib.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/list.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/log.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/magic.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/md5.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/mem.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/msgcat.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/msgs.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/mutexblock.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/namespace.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/netaddr.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/netscope.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/ondestroy.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/os.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/parseint.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/platform.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/platform.h.in (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/portset.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/print.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/queue.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/quota.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/radix.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/random.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/ratelimiter.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/refcount.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/region.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/resource.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/result.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/resultclass.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/rwlock.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/serial.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/sha1.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/sha2.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/sockaddr.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/socket.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/stats.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/stdio.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/stdlib.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/string.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/symtab.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/task.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/taskpool.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/timer.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/types.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/util.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/version.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/include/isc/xml.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/inet_aton.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/inet_ntop.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/inet_pton.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/iterated_hash.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/lex.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/lfsr.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/lib.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/log.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/md5.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/mem.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/mem_api.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/mips/ vendor/ntp/4.2.8p4/lib/isc/mips/include/ vendor/ntp/4.2.8p4/lib/isc/mips/include/isc/ vendor/ntp/4.2.8p4/lib/isc/mips/include/isc/atomic.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/mutexblock.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/netaddr.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/netscope.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/nls/ vendor/ntp/4.2.8p4/lib/isc/nls/msgcat.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/noatomic/ vendor/ntp/4.2.8p4/lib/isc/noatomic/include/ vendor/ntp/4.2.8p4/lib/isc/noatomic/include/isc/ vendor/ntp/4.2.8p4/lib/isc/noatomic/include/isc/atomic.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/nothreads/ vendor/ntp/4.2.8p4/lib/isc/nothreads/condition.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/nothreads/include/ vendor/ntp/4.2.8p4/lib/isc/nothreads/include/isc/ vendor/ntp/4.2.8p4/lib/isc/nothreads/include/isc/condition.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/nothreads/include/isc/mutex.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/nothreads/include/isc/once.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/nothreads/include/isc/thread.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/nothreads/mutex.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/nothreads/thread.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/ondestroy.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/parseint.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/portset.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/powerpc/ vendor/ntp/4.2.8p4/lib/isc/powerpc/include/ vendor/ntp/4.2.8p4/lib/isc/powerpc/include/isc/ vendor/ntp/4.2.8p4/lib/isc/powerpc/include/isc/atomic.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/print.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/pthreads/ vendor/ntp/4.2.8p4/lib/isc/pthreads/condition.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/pthreads/include/ vendor/ntp/4.2.8p4/lib/isc/pthreads/include/isc/ vendor/ntp/4.2.8p4/lib/isc/pthreads/include/isc/condition.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/pthreads/include/isc/mutex.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/pthreads/include/isc/once.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/pthreads/include/isc/thread.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/pthreads/mutex.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/pthreads/thread.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/quota.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/radix.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/random.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/ratelimiter.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/refcount.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/region.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/result.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/rwlock.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/serial.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/sha1.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/sha2.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/sockaddr.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/socket_api.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/sparc64/ vendor/ntp/4.2.8p4/lib/isc/sparc64/include/ vendor/ntp/4.2.8p4/lib/isc/sparc64/include/isc/ vendor/ntp/4.2.8p4/lib/isc/sparc64/include/isc/atomic.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/stats.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/string.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/strtoul.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/symtab.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/task.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/task_api.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/task_p.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/taskpool.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/tests/ vendor/ntp/4.2.8p4/lib/isc/tests/Atffile (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/tests/hash_test.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/tests/isctest.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/tests/isctest.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/tests/queue_test.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/tests/socket_test.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/tests/symtab_test.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/tests/task_test.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/tests/taskpool_test.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/timer.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/timer_api.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/timer_p.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/ vendor/ntp/4.2.8p4/lib/isc/unix/app.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/dir.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/entropy.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/errno2result.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/errno2result.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/file.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/fsaccess.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/ifiter_getifaddrs.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/ifiter_ioctl.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/ifiter_sysctl.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/include/ vendor/ntp/4.2.8p4/lib/isc/unix/include/isc/ vendor/ntp/4.2.8p4/lib/isc/unix/include/isc/dir.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/include/isc/int.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/include/isc/keyboard.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/include/isc/net.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/include/isc/netdb.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/include/isc/offset.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/include/isc/stat.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/include/isc/stdtime.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/include/isc/strerror.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/include/isc/syslog.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/include/isc/time.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/interfaceiter.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/ipv6.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/keyboard.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/net.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/os.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/resource.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/socket.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/socket_p.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/stdio.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/stdtime.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/strerror.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/syslog.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/unix/time.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/version.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/ vendor/ntp/4.2.8p4/lib/isc/win32/DLLMain.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/app.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/condition.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/dir.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/entropy.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/errno2result.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/errno2result.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/file.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/fsaccess.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/ vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/ vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/bind_registry.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/bindevt.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/condition.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/dir.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/int.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/ipv6.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/keyboard.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/mutex.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/net.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/netdb.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/ntgroups.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/ntpaths.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/offset.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/once.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/platform.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/stat.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/stdtime.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/strerror.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/syslog.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/thread.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/time.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/include/isc/win32os.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/interfaceiter.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/ipv6.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/keyboard.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/libgen.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/libisc.def (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/libisc.dsp (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/libisc.dsw (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/libisc.mak (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/net.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/netdb.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/ntgroups.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/ntpaths.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/once.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/os.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/resource.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/socket.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/stdio.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/stdtime.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/strerror.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/syslog.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/syslog.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/thread.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/time.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/unistd.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/version.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/win32/win32os.c (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/x86_32/ vendor/ntp/4.2.8p4/lib/isc/x86_32/include/ vendor/ntp/4.2.8p4/lib/isc/x86_32/include/isc/ vendor/ntp/4.2.8p4/lib/isc/x86_32/include/isc/atomic.h (contents, props changed) vendor/ntp/4.2.8p4/lib/isc/x86_64/ vendor/ntp/4.2.8p4/lib/isc/x86_64/include/ vendor/ntp/4.2.8p4/lib/isc/x86_64/include/isc/ vendor/ntp/4.2.8p4/lib/isc/x86_64/include/isc/atomic.h (contents, props changed) vendor/ntp/4.2.8p4/libjsmn/ vendor/ntp/4.2.8p4/libjsmn/LICENSE (contents, props changed) vendor/ntp/4.2.8p4/libjsmn/Makefile (contents, props changed) vendor/ntp/4.2.8p4/libjsmn/README.md (contents, props changed) vendor/ntp/4.2.8p4/libjsmn/example/ vendor/ntp/4.2.8p4/libjsmn/example/jsondump.c (contents, props changed) vendor/ntp/4.2.8p4/libjsmn/example/simple.c (contents, props changed) vendor/ntp/4.2.8p4/libjsmn/jsmn.c (contents, props changed) vendor/ntp/4.2.8p4/libjsmn/jsmn.h (contents, props changed) vendor/ntp/4.2.8p4/libjsmn/jsmn_test.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/ vendor/ntp/4.2.8p4/libntp/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/libntp/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/libntp/README (contents, props changed) vendor/ntp/4.2.8p4/libntp/a_md5encrypt.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/adjtime.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/adjtimex.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/atoint.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/atolfp.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/atouint.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/audio.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/authkeys.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/authreadkeys.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/authusekey.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/bsd_strerror.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/buftvtots.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/caljulian.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/caltontp.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/calyearstart.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/clocktime.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/clocktypes.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/decodenetnum.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/dofptoa.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/dolfptoa.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/emalloc.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/findconfig.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/getopt.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/hextoint.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/hextolfp.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/humandate.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/icom.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/iosignal.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/lib_strbuf.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/machines.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/mktime.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/modetoa.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/mstolfp.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/msyslog.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/netof.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/ntp_calendar.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/ntp_crypto_rnd.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/ntp_intres.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/ntp_libopts.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/ntp_lineedit.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/ntp_random.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/ntp_rfc2553.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/ntp_worker.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/numtoa.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/numtohost.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/octtoint.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/prettydate.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/recvbuff.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/refidsmear.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/refnumtoa.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/snprintf.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/socket.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/socktoa.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/socktohost.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/ssl_init.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/statestr.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/strdup.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/strl_obsd.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/syssignal.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/systime.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/systime_s.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/timetoa.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/timevalops.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/uglydate.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/vint64ops.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/work_fork.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/work_thread.c (contents, props changed) vendor/ntp/4.2.8p4/libntp/ymd2yd.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/ vendor/ntp/4.2.8p4/libparse/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/libparse/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/libparse/README (contents, props changed) vendor/ntp/4.2.8p4/libparse/binio.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/clk_computime.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/clk_dcf7000.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/clk_hopf6021.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/clk_meinberg.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/clk_rawdcf.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/clk_rcc8000.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/clk_schmid.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/clk_sel240x.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/clk_trimtaip.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/clk_trimtsip.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/clk_varitext.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/clk_wharton.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/data_mbg.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/gpstolfp.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/ieee754io.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/info_trimble.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/mfp_mul.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/mkinfo_rcmd.sed (contents, props changed) vendor/ntp/4.2.8p4/libparse/mkinfo_scmd.sed (contents, props changed) vendor/ntp/4.2.8p4/libparse/parse.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/parse_conf.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/parsesolaris.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/parsestreams.c (contents, props changed) vendor/ntp/4.2.8p4/libparse/trim_info.c (contents, props changed) vendor/ntp/4.2.8p4/ltmain.sh (contents, props changed) vendor/ntp/4.2.8p4/missing (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ vendor/ntp/4.2.8p4/ntpd/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/ntpd/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/ntpd/check_y2k.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/cmd_args.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/complete.conf.in (contents, props changed) vendor/ntp/4.2.8p4/ntpd/declcond.h (contents, props changed) vendor/ntp/4.2.8p4/ntpd/invoke-ntp.conf.menu (contents, props changed) vendor/ntp/4.2.8p4/ntpd/invoke-ntp.conf.texi (contents, props changed) vendor/ntp/4.2.8p4/ntpd/invoke-ntp.keys.menu (contents, props changed) vendor/ntp/4.2.8p4/ntpd/invoke-ntp.keys.texi (contents, props changed) vendor/ntp/4.2.8p4/ntpd/invoke-ntpd.menu (contents, props changed) vendor/ntp/4.2.8p4/ntpd/invoke-ntpd.texi (contents, props changed) vendor/ntp/4.2.8p4/ntpd/jupiter.h (contents, props changed) vendor/ntp/4.2.8p4/ntpd/keyword-gen-utd (contents, props changed) vendor/ntp/4.2.8p4/ntpd/keyword-gen.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp.conf.5man (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp.conf.5mdoc (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp.conf.def (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp.conf.html (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp.conf.man.in (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp.conf.mdoc.in (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp.conf.texi (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp.keys.5man (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp.keys.5mdoc (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp.keys.def (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp.keys.html (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp.keys.man.in (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp.keys.mdoc.in (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp.keys.texi (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_config.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_control.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_crypto.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_filegen.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_io.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_keyword.h (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_leapsec.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_leapsec.h (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_loopfilter.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_monitor.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_parser.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_parser.h (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_parser.y (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_peer.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_prio_q.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_proto.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_refclock.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_request.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_restrict.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_scanner.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_scanner.h (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_signd.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_timer.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntp_util.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntpd-opts.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntpd-opts.def (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntpd-opts.h (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntpd.1ntpdman (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntpd.1ntpdmdoc (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntpd.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntpd.html (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntpd.man.in (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntpd.mdoc.in (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntpd.texi (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntpdbase-opts.def (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ntpsim.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/ppsapi_timepps.h (contents, props changed) vendor/ntp/4.2.8p4/ntpd/rc_cmdlength.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_acts.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_arbiter.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_arc.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_as2201.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_atom.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_bancomm.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_chronolog.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_chu.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_conf.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_datum.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_dumbclock.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_fg.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_gpsdjson.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_gpsvme.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_heath.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_hopfpci.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_hopfser.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_hpgps.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_irig.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_jjy.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_jupiter.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_leitch.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_local.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_msfees.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_mx4200.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_neoclock4x.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_nmea.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_oncore.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_palisade.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_palisade.h (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_parse.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_pcf.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_pst.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_ripencc.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_shm.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_tpro.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_true.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_tsyncpci.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_tt560.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_ulink.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_wwv.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_wwvb.c (contents, props changed) vendor/ntp/4.2.8p4/ntpd/refclock_zyfer.c (contents, props changed) vendor/ntp/4.2.8p4/ntpdate/ vendor/ntp/4.2.8p4/ntpdate/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/ntpdate/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/ntpdate/README (contents, props changed) vendor/ntp/4.2.8p4/ntpdate/ntpdate.c (contents, props changed) vendor/ntp/4.2.8p4/ntpdate/ntpdate.h (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/ vendor/ntp/4.2.8p4/ntpdc/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/README (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/invoke-ntpdc.menu (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/invoke-ntpdc.texi (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/layout.std (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/nl.pl (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/nl.pl.in (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/nl_in.c (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/ntpdc-layout.c (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/ntpdc-opts.c (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/ntpdc-opts.def (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/ntpdc-opts.h (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/ntpdc.1ntpdcman (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/ntpdc.1ntpdcmdoc (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/ntpdc.c (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/ntpdc.h (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/ntpdc.html (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/ntpdc.man.in (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/ntpdc.mdoc.in (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/ntpdc.texi (contents, props changed) vendor/ntp/4.2.8p4/ntpdc/ntpdc_ops.c (contents, props changed) vendor/ntp/4.2.8p4/ntpq/ vendor/ntp/4.2.8p4/ntpq/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/ntpq/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/ntpq/README (contents, props changed) vendor/ntp/4.2.8p4/ntpq/invoke-ntpq.menu (contents, props changed) vendor/ntp/4.2.8p4/ntpq/invoke-ntpq.texi (contents, props changed) vendor/ntp/4.2.8p4/ntpq/libntpq.c (contents, props changed) vendor/ntp/4.2.8p4/ntpq/libntpq.h (contents, props changed) vendor/ntp/4.2.8p4/ntpq/libntpq_subs.c (contents, props changed) vendor/ntp/4.2.8p4/ntpq/ntpq-opts.c (contents, props changed) vendor/ntp/4.2.8p4/ntpq/ntpq-opts.def (contents, props changed) vendor/ntp/4.2.8p4/ntpq/ntpq-opts.h (contents, props changed) vendor/ntp/4.2.8p4/ntpq/ntpq-subs.c (contents, props changed) vendor/ntp/4.2.8p4/ntpq/ntpq.1ntpqman (contents, props changed) vendor/ntp/4.2.8p4/ntpq/ntpq.1ntpqmdoc (contents, props changed) vendor/ntp/4.2.8p4/ntpq/ntpq.c (contents, props changed) vendor/ntp/4.2.8p4/ntpq/ntpq.h (contents, props changed) vendor/ntp/4.2.8p4/ntpq/ntpq.html (contents, props changed) vendor/ntp/4.2.8p4/ntpq/ntpq.man.in (contents, props changed) vendor/ntp/4.2.8p4/ntpq/ntpq.mdoc.in (contents, props changed) vendor/ntp/4.2.8p4/ntpq/ntpq.texi (contents, props changed) vendor/ntp/4.2.8p4/ntpsnmpd/ vendor/ntp/4.2.8p4/ntpsnmpd/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/ntpsnmpd/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/ntpsnmpd/README (contents, props changed) vendor/ntp/4.2.8p4/ntpsnmpd/invoke-ntpsnmpd.menu (contents, props changed) vendor/ntp/4.2.8p4/ntpsnmpd/invoke-ntpsnmpd.texi (contents, props changed) vendor/ntp/4.2.8p4/ntpsnmpd/netsnmp_daemonize.c (contents, props changed) vendor/ntp/4.2.8p4/ntpsnmpd/ntpSnmpSubagentObject.c (contents, props changed) vendor/ntp/4.2.8p4/ntpsnmpd/ntpSnmpSubagentObject.h (contents, props changed) vendor/ntp/4.2.8p4/ntpsnmpd/ntp_snmp.h (contents, props changed) vendor/ntp/4.2.8p4/ntpsnmpd/ntpsnmpd-opts.c (contents, props changed) vendor/ntp/4.2.8p4/ntpsnmpd/ntpsnmpd-opts.def (contents, props changed) vendor/ntp/4.2.8p4/ntpsnmpd/ntpsnmpd-opts.h (contents, props changed) vendor/ntp/4.2.8p4/ntpsnmpd/ntpsnmpd.1ntpsnmpdman (contents, props changed) vendor/ntp/4.2.8p4/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc (contents, props changed) vendor/ntp/4.2.8p4/ntpsnmpd/ntpsnmpd.c (contents, props changed) vendor/ntp/4.2.8p4/ntpsnmpd/ntpsnmpd.html (contents, props changed) vendor/ntp/4.2.8p4/ntpsnmpd/ntpsnmpd.man.in (contents, props changed) vendor/ntp/4.2.8p4/ntpsnmpd/ntpsnmpd.mdoc.in (contents, props changed) vendor/ntp/4.2.8p4/ntpsnmpd/ntpsnmpd.texi (contents, props changed) vendor/ntp/4.2.8p4/ntpsnmpd/ntpv4-mib.mib (contents, props changed) vendor/ntp/4.2.8p4/packageinfo.sh (contents, props changed) vendor/ntp/4.2.8p4/parseutil/ vendor/ntp/4.2.8p4/parseutil/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/parseutil/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/parseutil/README (contents, props changed) vendor/ntp/4.2.8p4/parseutil/dcfd.c (contents, props changed) vendor/ntp/4.2.8p4/parseutil/testdcf.c (contents, props changed) vendor/ntp/4.2.8p4/ports/ vendor/ntp/4.2.8p4/ports/winnt/ vendor/ntp/4.2.8p4/ports/winnt/include/ vendor/ntp/4.2.8p4/ports/winnt/include/arpa/ vendor/ntp/4.2.8p4/ports/winnt/include/arpa/inet.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/clockstuff.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/config.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/gaa_compat.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/hopf_PCI_io.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/netdb.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/ntp_iocompletionport.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/ntp_timer.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/ntservice.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/stdint.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/stdnoreturn.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/sys/ vendor/ntp/4.2.8p4/ports/winnt/include/sys/ioctl.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/sys/param.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/sys/resource.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/sys/signal.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/sys/time.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/sys/wait.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/syslog.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/termios.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/timepps.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/unistd.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/include/win32_io.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/instsrv/ vendor/ntp/4.2.8p4/ports/winnt/instsrv/instsrv.c (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/libntp/ vendor/ntp/4.2.8p4/ports/winnt/libntp/MSG00001.bin (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/libntp/SetSystemTime.c (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/libntp/arc4wrap.c (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/libntp/getclock.c (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/libntp/messages.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/libntp/messages.mc (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/libntp/messages.rc (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/libntp/randfile.c (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/libntp/setpriority.c (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/libntp/syslog.c (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/libntp/termios.c (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/libntp/util_clockstuff.c (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/libntp/win32_io.c (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/ntpd/ vendor/ntp/4.2.8p4/ports/winnt/ntpd/hopf_PCI_io.c (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/ntpd/nt_clockstuff.c (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/ntpd/ntp_iocompletionport.c (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/ntpd/ntservice.c (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/ntptrace/ vendor/ntp/4.2.8p4/ports/winnt/ntptrace/ntptrace.dsp (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/ppsapi/ vendor/ntp/4.2.8p4/ports/winnt/ppsapi/loopback/ vendor/ntp/4.2.8p4/ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.txt (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/ppsapi/loopback/src/ vendor/ntp/4.2.8p4/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.c (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.def (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/ppsapi/loopback/src/sys/ vendor/ntp/4.2.8p4/ports/winnt/ppsapi/loopback/src/sys/time.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/ppsapi/loopback/src/timepps.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/ppsapi/skelprov/ vendor/ntp/4.2.8p4/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.c (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.def (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.sln (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.vcproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/ppsapi/skelprov/sys/ vendor/ntp/4.2.8p4/ports/winnt/ppsapi/skelprov/sys/time.h (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/scripts/ vendor/ntp/4.2.8p4/ports/winnt/scripts/mkver.bat (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2005/ vendor/ntp/4.2.8p4/ports/winnt/vs2005/Instsrv.vcproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2005/libntp.vcproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2005/ntp.sln (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2005/ntpd.vcproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2005/ntpdate.vcproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2005/ntpdc.vcproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2005/ntpkeygen.vcproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2005/ntpq.vcproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2008/ vendor/ntp/4.2.8p4/ports/winnt/vs2008/common.vsprops (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2008/debug-x64.vsprops (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2008/debug.vsprops (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2008/instsrv/ vendor/ntp/4.2.8p4/ports/winnt/vs2008/instsrv/instsrv.vcproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2008/libntp/ vendor/ntp/4.2.8p4/ports/winnt/vs2008/libntp/libntp.vcproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2008/loopback-pps/ vendor/ntp/4.2.8p4/ports/winnt/vs2008/loopback-pps/loopback-ppsapi-provider.vcproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2008/ntp-keygen/ vendor/ntp/4.2.8p4/ports/winnt/vs2008/ntp-keygen/ntp-keygen.vcproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2008/ntp.sln (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2008/ntpd/ vendor/ntp/4.2.8p4/ports/winnt/vs2008/ntpd-keyword-gen/ vendor/ntp/4.2.8p4/ports/winnt/vs2008/ntpd-keyword-gen/ntpd-keyword-gen.vcproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2008/ntpd/gen-ntp_keyword.bat (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2008/ntpd/ntpd.vcproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2008/ntpdate/ vendor/ntp/4.2.8p4/ports/winnt/vs2008/ntpdate/ntpdate.vcproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2008/ntpdc/ vendor/ntp/4.2.8p4/ports/winnt/vs2008/ntpdc/ntpdc.vcproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2008/ntpq/ vendor/ntp/4.2.8p4/ports/winnt/vs2008/ntpq/ntpq.vcproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2008/release-x64.vsprops (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2008/release.vsprops (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/ vendor/ntp/4.2.8p4/ports/winnt/vs2013/common.props (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/debug-x64.props (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/debug.props (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/instsrv/ vendor/ntp/4.2.8p4/ports/winnt/vs2013/instsrv/instsrv.vcxproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/instsrv/instsrv.vcxproj.filters (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/libntp/ vendor/ntp/4.2.8p4/ports/winnt/vs2013/libntp/libntp.vcxproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/libntp/libntp.vcxproj.filters (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/loopback-pps/ vendor/ntp/4.2.8p4/ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcxproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcxproj.filters (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/ntp-keygen/ vendor/ntp/4.2.8p4/ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcxproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcxproj.filters (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/ntp.sln (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/ntpd/ vendor/ntp/4.2.8p4/ports/winnt/vs2013/ntpd-keyword-gen/ vendor/ntp/4.2.8p4/ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj.filters (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/ntpd/gen-ntp_keyword.bat (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/ntpd/ntpd.vcxproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/ntpd/ntpd.vcxproj.filters (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/ntpdate/ vendor/ntp/4.2.8p4/ports/winnt/vs2013/ntpdate/ntpdate.vcxproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/ntpdate/ntpdate.vcxproj.filters (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/ntpdc/ vendor/ntp/4.2.8p4/ports/winnt/vs2013/ntpdc/ntpdc.vcxproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/ntpdc/ntpdc.vcxproj.filters (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/ntpq/ vendor/ntp/4.2.8p4/ports/winnt/vs2013/ntpq/ntpq.vcxproj (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/ntpq/ntpq.vcxproj.filters (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/release-x64.props (contents, props changed) vendor/ntp/4.2.8p4/ports/winnt/vs2013/release.props (contents, props changed) vendor/ntp/4.2.8p4/readme.y2kfixes (contents, props changed) vendor/ntp/4.2.8p4/results.y2kfixes (contents, props changed) vendor/ntp/4.2.8p4/scripts/ vendor/ntp/4.2.8p4/scripts/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/scripts/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/README (contents, props changed) vendor/ntp/4.2.8p4/scripts/build/ vendor/ntp/4.2.8p4/scripts/build/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/scripts/build/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/build/UpdatePoint (contents, props changed) vendor/ntp/4.2.8p4/scripts/build/VersionName (contents, props changed) vendor/ntp/4.2.8p4/scripts/build/check--help (contents, props changed) vendor/ntp/4.2.8p4/scripts/build/checkChangeLog (contents, props changed) vendor/ntp/4.2.8p4/scripts/build/checkHtmlFileDates (contents, props changed) vendor/ntp/4.2.8p4/scripts/build/fixautomakedepsmagic (contents, props changed) vendor/ntp/4.2.8p4/scripts/build/genCommitLog (contents, props changed) vendor/ntp/4.2.8p4/scripts/build/genver (contents, props changed) vendor/ntp/4.2.8p4/scripts/build/mkver.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/build/updateBEDate (contents, props changed) vendor/ntp/4.2.8p4/scripts/calc_tickadj/ vendor/ntp/4.2.8p4/scripts/calc_tickadj/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/scripts/calc_tickadj/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/calc_tickadj/calc_tickadj-opts (contents, props changed) vendor/ntp/4.2.8p4/scripts/calc_tickadj/calc_tickadj-opts.def (contents, props changed) vendor/ntp/4.2.8p4/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman (contents, props changed) vendor/ntp/4.2.8p4/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc (contents, props changed) vendor/ntp/4.2.8p4/scripts/calc_tickadj/calc_tickadj.html (contents, props changed) vendor/ntp/4.2.8p4/scripts/calc_tickadj/calc_tickadj.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/calc_tickadj/calc_tickadj.man.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/calc_tickadj/calc_tickadj.mdoc.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/calc_tickadj/calc_tickadj.texi (contents, props changed) vendor/ntp/4.2.8p4/scripts/calc_tickadj/invoke-calc_tickadj.menu (contents, props changed) vendor/ntp/4.2.8p4/scripts/calc_tickadj/invoke-calc_tickadj.texi (contents, props changed) vendor/ntp/4.2.8p4/scripts/deprecated/ vendor/ntp/4.2.8p4/scripts/deprecated/freq_adj.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/deprecated/hpadjtime.sh (contents, props changed) vendor/ntp/4.2.8p4/scripts/deprecated/html2man.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/deprecated/ntp-close (contents, props changed) vendor/ntp/4.2.8p4/scripts/deprecated/ntp-groper (contents, props changed) vendor/ntp/4.2.8p4/scripts/deprecated/ntp-restart (contents, props changed) vendor/ntp/4.2.8p4/scripts/deprecated/ntp-status (contents, props changed) vendor/ntp/4.2.8p4/scripts/invoke-plot_summary.menu (contents, props changed) vendor/ntp/4.2.8p4/scripts/invoke-plot_summary.texi (contents, props changed) vendor/ntp/4.2.8p4/scripts/invoke-summary.menu (contents, props changed) vendor/ntp/4.2.8p4/scripts/invoke-summary.texi (contents, props changed) vendor/ntp/4.2.8p4/scripts/lib/ vendor/ntp/4.2.8p4/scripts/lib/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/scripts/lib/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/lib/NTP/ vendor/ntp/4.2.8p4/scripts/lib/NTP/Util.pm (contents, props changed) vendor/ntp/4.2.8p4/scripts/monitoring/ vendor/ntp/4.2.8p4/scripts/monitoring/README (contents, props changed) vendor/ntp/4.2.8p4/scripts/monitoring/loopwatch.config.SAMPLE (contents, props changed) vendor/ntp/4.2.8p4/scripts/monitoring/lr.pl (contents, props changed) vendor/ntp/4.2.8p4/scripts/monitoring/ntp.pl (contents, props changed) vendor/ntp/4.2.8p4/scripts/monitoring/ntploopstat (contents, props changed) vendor/ntp/4.2.8p4/scripts/monitoring/ntploopwatch (contents, props changed) vendor/ntp/4.2.8p4/scripts/monitoring/ntptrap (contents, props changed) vendor/ntp/4.2.8p4/scripts/monitoring/timelocal.pl (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntp-wait/ vendor/ntp/4.2.8p4/scripts/ntp-wait/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntp-wait/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntp-wait/invoke-ntp-wait.menu (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntp-wait/invoke-ntp-wait.texi (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntp-wait/ntp-wait-opts (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntp-wait/ntp-wait-opts.def (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntp-wait/ntp-wait.1ntp-waitman (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntp-wait/ntp-wait.html (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntp-wait/ntp-wait.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntp-wait/ntp-wait.man.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntp-wait/ntp-wait.mdoc.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntp-wait/ntp-wait.texi (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntpsweep/ vendor/ntp/4.2.8p4/scripts/ntpsweep/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntpsweep/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntpsweep/invoke-ntpsweep.menu (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntpsweep/invoke-ntpsweep.texi (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntpsweep/ntpsweep-opts (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntpsweep/ntpsweep-opts.def (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntpsweep/ntpsweep.1ntpsweepman (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntpsweep/ntpsweep.html (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntpsweep/ntpsweep.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntpsweep/ntpsweep.man.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntpsweep/ntpsweep.mdoc.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntpsweep/ntpsweep.texi (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntptrace/ vendor/ntp/4.2.8p4/scripts/ntptrace/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntptrace/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntptrace/invoke-ntptrace.menu (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntptrace/invoke-ntptrace.texi (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntptrace/ntptrace-opts (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntptrace/ntptrace-opts.def (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntptrace/ntptrace.1ntptraceman (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntptrace/ntptrace.1ntptracemdoc (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntptrace/ntptrace.html (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntptrace/ntptrace.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntptrace/ntptrace.man.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntptrace/ntptrace.mdoc.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntptrace/ntptrace.texi (contents, props changed) vendor/ntp/4.2.8p4/scripts/ntpver.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/plot_summary-opts (contents, props changed) vendor/ntp/4.2.8p4/scripts/plot_summary-opts.def (contents, props changed) vendor/ntp/4.2.8p4/scripts/plot_summary.1plot_summaryman (contents, props changed) vendor/ntp/4.2.8p4/scripts/plot_summary.1plot_summarymdoc (contents, props changed) vendor/ntp/4.2.8p4/scripts/plot_summary.html (contents, props changed) vendor/ntp/4.2.8p4/scripts/plot_summary.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/plot_summary.man.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/plot_summary.mdoc.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/plot_summary.texi (contents, props changed) vendor/ntp/4.2.8p4/scripts/rc/ vendor/ntp/4.2.8p4/scripts/rc/README (contents, props changed) vendor/ntp/4.2.8p4/scripts/rc/ntpd (contents, props changed) vendor/ntp/4.2.8p4/scripts/rc/ntpwait (contents, props changed) vendor/ntp/4.2.8p4/scripts/rc/rc.d/ vendor/ntp/4.2.8p4/scripts/rc/rc.d/TIMESYNC (contents, props changed) vendor/ntp/4.2.8p4/scripts/rc/rc.d/ntpd (contents, props changed) vendor/ntp/4.2.8p4/scripts/rc/rc.d/ntpwait (contents, props changed) vendor/ntp/4.2.8p4/scripts/stats/ vendor/ntp/4.2.8p4/scripts/stats/README (contents, props changed) vendor/ntp/4.2.8p4/scripts/stats/README.stats (contents, props changed) vendor/ntp/4.2.8p4/scripts/stats/README.timecodes (contents, props changed) vendor/ntp/4.2.8p4/scripts/stats/clock.awk (contents, props changed) vendor/ntp/4.2.8p4/scripts/stats/dupe.awk (contents, props changed) vendor/ntp/4.2.8p4/scripts/stats/ensemble.S (contents, props changed) vendor/ntp/4.2.8p4/scripts/stats/ensemble.awk (contents, props changed) vendor/ntp/4.2.8p4/scripts/stats/etf.S (contents, props changed) vendor/ntp/4.2.8p4/scripts/stats/etf.awk (contents, props changed) vendor/ntp/4.2.8p4/scripts/stats/itf.S (contents, props changed) vendor/ntp/4.2.8p4/scripts/stats/itf.awk (contents, props changed) vendor/ntp/4.2.8p4/scripts/stats/loop.S (contents, props changed) vendor/ntp/4.2.8p4/scripts/stats/loop.awk (contents, props changed) vendor/ntp/4.2.8p4/scripts/stats/loop_summary (contents, props changed) vendor/ntp/4.2.8p4/scripts/stats/peer.awk (contents, props changed) vendor/ntp/4.2.8p4/scripts/stats/psummary.awk (contents, props changed) vendor/ntp/4.2.8p4/scripts/stats/summary.sh (contents, props changed) vendor/ntp/4.2.8p4/scripts/stats/tdata.S (contents, props changed) vendor/ntp/4.2.8p4/scripts/stats/tdata.awk (contents, props changed) vendor/ntp/4.2.8p4/scripts/summary-opts (contents, props changed) vendor/ntp/4.2.8p4/scripts/summary-opts.def (contents, props changed) vendor/ntp/4.2.8p4/scripts/summary.1summaryman (contents, props changed) vendor/ntp/4.2.8p4/scripts/summary.1summarymdoc (contents, props changed) vendor/ntp/4.2.8p4/scripts/summary.html (contents, props changed) vendor/ntp/4.2.8p4/scripts/summary.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/summary.man.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/summary.mdoc.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/summary.texi (contents, props changed) vendor/ntp/4.2.8p4/scripts/update-leap/ vendor/ntp/4.2.8p4/scripts/update-leap/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/scripts/update-leap/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/update-leap/invoke-update-leap.menu (contents, props changed) vendor/ntp/4.2.8p4/scripts/update-leap/invoke-update-leap.texi (contents, props changed) vendor/ntp/4.2.8p4/scripts/update-leap/update-leap-opts (contents, props changed) vendor/ntp/4.2.8p4/scripts/update-leap/update-leap-opts.def (contents, props changed) vendor/ntp/4.2.8p4/scripts/update-leap/update-leap.1update-leapman (contents, props changed) vendor/ntp/4.2.8p4/scripts/update-leap/update-leap.1update-leapmdoc (contents, props changed) vendor/ntp/4.2.8p4/scripts/update-leap/update-leap.html (contents, props changed) vendor/ntp/4.2.8p4/scripts/update-leap/update-leap.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/update-leap/update-leap.man.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/update-leap/update-leap.mdoc.in (contents, props changed) vendor/ntp/4.2.8p4/scripts/update-leap/update-leap.sh (contents, props changed) vendor/ntp/4.2.8p4/scripts/update-leap/update-leap.texi (contents, props changed) vendor/ntp/4.2.8p4/sntp/ vendor/ntp/4.2.8p4/sntp/COPYRIGHT (contents, props changed) vendor/ntp/4.2.8p4/sntp/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/sntp/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/sntp/aclocal.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/ag-tpl/ vendor/ntp/4.2.8p4/sntp/ag-tpl/0-old/ vendor/ntp/4.2.8p4/sntp/ag-tpl/0-old/Mdoc.pm (contents, props changed) vendor/ntp/4.2.8p4/sntp/ag-tpl/0-old/agman-cmd.tpl (contents, props changed) vendor/ntp/4.2.8p4/sntp/ag-tpl/0-old/agmdoc-cmd.tpl (contents, props changed) vendor/ntp/4.2.8p4/sntp/ag-tpl/0-old/cmd-doc.tlib (contents, props changed) vendor/ntp/4.2.8p4/sntp/ag-tpl/0-old/mdoc-synopsis.tlib (contents, props changed) vendor/ntp/4.2.8p4/sntp/ag-tpl/0-old/mdoc2man (contents, props changed) vendor/ntp/4.2.8p4/sntp/ag-tpl/0-old/mdoc2texi (contents, props changed) vendor/ntp/4.2.8p4/sntp/ag-tpl/0-old/perlopt.tpl (contents, props changed) vendor/ntp/4.2.8p4/sntp/ag-tpl/Mdoc.pm (contents, props changed) vendor/ntp/4.2.8p4/sntp/ag-tpl/mdoc2man (contents, props changed) vendor/ntp/4.2.8p4/sntp/bincheck.mf (contents, props changed) vendor/ntp/4.2.8p4/sntp/check-libntp.mf (contents, props changed) vendor/ntp/4.2.8p4/sntp/check-libopts.mf (contents, props changed) vendor/ntp/4.2.8p4/sntp/compile (contents, props changed) vendor/ntp/4.2.8p4/sntp/config.guess (contents, props changed) vendor/ntp/4.2.8p4/sntp/config.h.in (contents, props changed) vendor/ntp/4.2.8p4/sntp/config.sub (contents, props changed) vendor/ntp/4.2.8p4/sntp/configure (contents, props changed) vendor/ntp/4.2.8p4/sntp/configure.ac (contents, props changed) vendor/ntp/4.2.8p4/sntp/crypto.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/crypto.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/data_formats.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/depcomp (contents, props changed) vendor/ntp/4.2.8p4/sntp/deps-ver (contents, props changed) vendor/ntp/4.2.8p4/sntp/depsver.mf (contents, props changed) vendor/ntp/4.2.8p4/sntp/include/ vendor/ntp/4.2.8p4/sntp/include/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/sntp/include/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/sntp/include/autogen-version.def (contents, props changed) vendor/ntp/4.2.8p4/sntp/include/copyright.def (contents, props changed) vendor/ntp/4.2.8p4/sntp/include/debug-opt.def (contents, props changed) vendor/ntp/4.2.8p4/sntp/include/homerc.def (contents, props changed) vendor/ntp/4.2.8p4/sntp/include/ntp.lic (contents, props changed) vendor/ntp/4.2.8p4/sntp/include/version.def (contents, props changed) vendor/ntp/4.2.8p4/sntp/include/version.texi (contents, props changed) vendor/ntp/4.2.8p4/sntp/includes.mf (contents, props changed) vendor/ntp/4.2.8p4/sntp/install-sh (contents, props changed) vendor/ntp/4.2.8p4/sntp/invoke-sntp.menu (contents, props changed) vendor/ntp/4.2.8p4/sntp/invoke-sntp.texi (contents, props changed) vendor/ntp/4.2.8p4/sntp/kod_management.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/kod_management.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/ vendor/ntp/4.2.8p4/sntp/libevent/ChangeLog (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/ChangeLog-1.4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/ChangeLog-2.0 (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/Doxyfile (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/LICENSE (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/Makefile.nmake (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/WIN32-Code/ vendor/ntp/4.2.8p4/sntp/libevent/WIN32-Code/nmake/ vendor/ntp/4.2.8p4/sntp/libevent/WIN32-Code/nmake/evconfig-private.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/WIN32-Code/nmake/event2/ vendor/ntp/4.2.8p4/sntp/libevent/WIN32-Code/nmake/event2/event-config.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/WIN32-Code/tree.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/aclocal.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/arc4random.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/autogen.sh (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/buffer.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/buffer_iocp.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/bufferevent-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/bufferevent.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/bufferevent_async.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/bufferevent_filter.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/bufferevent_openssl.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/bufferevent_pair.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/bufferevent_ratelim.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/bufferevent_sock.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/build-aux/ vendor/ntp/4.2.8p4/sntp/libevent/build-aux/ar-lib (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/build-aux/compile (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/build-aux/config.guess (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/build-aux/config.sub (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/build-aux/depcomp (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/build-aux/install-sh (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/build-aux/ltmain.sh (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/build-aux/missing (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/build-aux/test-driver (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/build-aux/ylwrap (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/changelist-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/compat/ vendor/ntp/4.2.8p4/sntp/libevent/compat/sys/ vendor/ntp/4.2.8p4/sntp/libevent/compat/sys/queue.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/config.h.in (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/configure (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/configure.ac (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/defer-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/devpoll.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/epoll.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/epoll_sub.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/epolltable-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/evbuffer-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/evconfig-private.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/evconfig-private.h.in (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/evdns.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/event-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/event.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/event_iocp.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/event_rpcgen.py (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/event_tagging.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/evmap-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/evmap.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/evport.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/evrpc-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/evrpc.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/evsignal-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/evthread-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/evthread.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/evthread_pthread.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/evthread_win32.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/evutil.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/evutil_rand.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/evutil_time.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/ht-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/http-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/http.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/ vendor/ntp/4.2.8p4/sntp/libevent/include/evdns.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/ vendor/ntp/4.2.8p4/sntp/libevent/include/event2/buffer.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/buffer_compat.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/bufferevent.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/bufferevent_compat.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/bufferevent_ssl.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/bufferevent_struct.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/dns.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/dns_compat.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/dns_struct.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/event.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/event_compat.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/event_struct.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/http.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/http_compat.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/http_struct.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/keyvalq_struct.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/listener.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/rpc.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/rpc_compat.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/rpc_struct.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/tag.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/tag_compat.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/thread.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/util.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/event2/visibility.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/evhttp.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/evrpc.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/evutil.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/include/include.am (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/iocp-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/ipv6-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/kqueue-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/kqueue.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/libevent.pc.in (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/libevent_openssl.pc.in (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/libevent_pthreads.pc.in (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/listener.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/log-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/log.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/m4/ vendor/ntp/4.2.8p4/sntp/libevent/m4/ac_backport_259_ssizet.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/m4/acx_pthread.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/m4/libevent_openssl.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/m4/libtool.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/m4/ltoptions.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/m4/ltsugar.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/m4/ltversion.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/m4/lt~obsolete.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/m4/ntp_pkg_config.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/make-event-config.sed (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/minheap-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/mm-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/poll.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/ratelim-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/select.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/signal.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/strlcpy-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/strlcpy.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/ vendor/ntp/4.2.8p4/sntp/libevent/test/Makefile.nmake (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/bench.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/bench_cascade.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/bench_http.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/bench_httpclient.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/check-dumpevents.py (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/include.am (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress.gen.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress.gen.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress.rpc (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress_buffer.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress_bufferevent.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress_dns.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress_et.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress_finalize.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress_http.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress_iocp.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress_listener.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress_main.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress_minheap.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress_rpc.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress_ssl.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress_testutils.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress_testutils.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress_thread.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress_thread.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress_util.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/regress_zlib.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/rpcgen_wrapper.sh (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/test-changelist.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/test-closed.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/test-dumpevents.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/test-eof.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/test-fdleak.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/test-init.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/test-ratelim.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/test-time.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/test-weof.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/test.sh (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/tinytest.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/tinytest.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/tinytest_local.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/test/tinytest_macros.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/time-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/util-internal.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/whatsnew-2.0.txt (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/whatsnew-2.1.txt (contents, props changed) vendor/ntp/4.2.8p4/sntp/libevent/win32select.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/ vendor/ntp/4.2.8p4/sntp/libopts/COPYING.gplv3 (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/COPYING.lgplv3 (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/COPYING.mbsd (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/MakeDefs.inc vendor/ntp/4.2.8p4/sntp/libopts/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/README (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/ag-char-map.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/alias.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/ao-strs.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/ao-strs.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/autoopts/ vendor/ntp/4.2.8p4/sntp/libopts/autoopts.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/autoopts.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/autoopts/options.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/autoopts/project.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/autoopts/usage-txt.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/boolean.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/check.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/compat/ vendor/ntp/4.2.8p4/sntp/libopts/compat/_Noreturn.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/compat/compat.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/compat/pathfind.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/compat/snprintf.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/compat/strchr.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/compat/strdup.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/compat/windows-config.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/configfile.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/cook.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/enum.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/env.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/file.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/find.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/genshell.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/genshell.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/gettext.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/init.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/intprops.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/libopts.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/load.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/m4/ vendor/ntp/4.2.8p4/sntp/libopts/m4/libopts.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/m4/liboptschk.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/m4/stdnoreturn.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/makeshell.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/nested.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/numeric.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/option-value-type.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/option-value-type.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/option-xat-attribute.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/option-xat-attribute.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/parse-duration.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/parse-duration.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/pgusage.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/proto.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/putshell.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/reset.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/restore.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/save.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/sort.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/stack.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/stdnoreturn.in.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/streqvcmp.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/text_mmap.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/time.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/tokenize.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/usage.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libopts/version.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libpkgver/ vendor/ntp/4.2.8p4/sntp/libpkgver/colcomp.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/libpkgver/pkgver.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/loc/ vendor/ntp/4.2.8p4/sntp/loc/README (contents, props changed) vendor/ntp/4.2.8p4/sntp/loc/darwin (contents, props changed) vendor/ntp/4.2.8p4/sntp/loc/debian (contents, props changed) vendor/ntp/4.2.8p4/sntp/loc/freebsd (contents, props changed) vendor/ntp/4.2.8p4/sntp/loc/legacy (contents, props changed) vendor/ntp/4.2.8p4/sntp/loc/netbsd (contents, props changed) vendor/ntp/4.2.8p4/sntp/loc/redhat (contents, props changed) vendor/ntp/4.2.8p4/sntp/loc/solaris (contents, props changed) vendor/ntp/4.2.8p4/sntp/log.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/log.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/ltmain.sh (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ vendor/ntp/4.2.8p4/sntp/m4/ax_c99_struct_init.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/define_dir.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/hms_search_lib.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/libtool.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ltoptions.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ltsugar.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ltversion.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/lt~obsolete.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_cacheversion.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_compiler.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_crosscompile.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_crypto_rand.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_debug.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_dir_sep.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_facilitynames.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_googletest.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_ipv6.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_lib_m.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_libevent.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_libntp.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_lineeditlibs.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_locinfo.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_openssl.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_pkg_config.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_problemtests.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_prog_cc.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_rlimit.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_sntp.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_sysexits.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_unitytest.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_ver_suffix.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/ntp_vpathhack.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/openldap-thread-check.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/openldap.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/os_cflags.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/snprintf.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/m4/version.m4 (contents, props changed) vendor/ntp/4.2.8p4/sntp/main.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/main.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/missing (contents, props changed) vendor/ntp/4.2.8p4/sntp/networking.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/networking.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/scm-rev (contents, props changed) vendor/ntp/4.2.8p4/sntp/scripts/ vendor/ntp/4.2.8p4/sntp/scripts/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/sntp/scripts/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/sntp/scripts/cvo.sh (contents, props changed) vendor/ntp/4.2.8p4/sntp/scripts/genLocInfo (contents, props changed) vendor/ntp/4.2.8p4/sntp/scripts/mansec2subst.sed (contents, props changed) vendor/ntp/4.2.8p4/sntp/sntp-opts.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/sntp-opts.def (contents, props changed) vendor/ntp/4.2.8p4/sntp/sntp-opts.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/sntp.1sntpman (contents, props changed) vendor/ntp/4.2.8p4/sntp/sntp.1sntpmdoc (contents, props changed) vendor/ntp/4.2.8p4/sntp/sntp.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/sntp.html (contents, props changed) vendor/ntp/4.2.8p4/sntp/sntp.man.in (contents, props changed) vendor/ntp/4.2.8p4/sntp/sntp.mdoc.in (contents, props changed) vendor/ntp/4.2.8p4/sntp/sntp.texi (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/ vendor/ntp/4.2.8p4/sntp/tests/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/crypto.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/data/ vendor/ntp/4.2.8p4/sntp/tests/data/debug-input-lfp-bin (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/data/debug-input-lfp-dec (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/data/debug-input-pkt (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/data/key-test-ascii (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/data/key-test-comments (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/data/key-test-empty vendor/ntp/4.2.8p4/sntp/tests/data/key-test-hex (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/data/key-test-invalid-hex (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/data/kod-expected-multiple (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/data/kod-expected-single (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/data/kod-test-blanks (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/data/kod-test-correct (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/data/kod-test-empty vendor/ntp/4.2.8p4/sntp/tests/fileHandlingTest.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/fileHandlingTest.h.in (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/keyFile.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/kodDatabase.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/kodFile.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/networking.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/packetHandling.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/packetProcessing.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/run-crypto.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/run-keyFile.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/run-kodDatabase.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/run-kodFile.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/run-networking.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/run-packetHandling.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/run-packetProcessing.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/run-t-log.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/run-utilities.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/sntptest.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/sntptest.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/t-log.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/tests-runner (contents, props changed) vendor/ntp/4.2.8p4/sntp/tests/utilities.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/ vendor/ntp/4.2.8p4/sntp/unity/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/auto/ vendor/ntp/4.2.8p4/sntp/unity/auto/colour_prompt.rb (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/auto/colour_reporter.rb (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/auto/generate_config.yml (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/auto/generate_module.rb (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/auto/generate_test_runner.rb (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/auto/parseOutput.rb (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/auto/runner_maybe.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/auto/test_file_filter.rb (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/auto/type_sanitizer.rb (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/auto/unity_test_summary.py (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/auto/unity_test_summary.rb (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/unity.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/unity.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/unity_config.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/unity_fixture.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/unity_fixture.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/unity_fixture_internals.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/unity_fixture_malloc_overrides.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/unity/unity_internals.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/utilities.c (contents, props changed) vendor/ntp/4.2.8p4/sntp/utilities.h (contents, props changed) vendor/ntp/4.2.8p4/sntp/version.c (contents, props changed) vendor/ntp/4.2.8p4/tests/ vendor/ntp/4.2.8p4/tests/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/tests/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/tests/bug-2803/ vendor/ntp/4.2.8p4/tests/bug-2803/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/tests/bug-2803/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/tests/bug-2803/bug-2803.c (contents, props changed) vendor/ntp/4.2.8p4/tests/bug-2803/run-bug-2803.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/ vendor/ntp/4.2.8p4/tests/libntp/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/a_md5encrypt.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/atoint.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/atouint.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/authkeys.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/buftvtots.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/calendar.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/caljulian.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/caltontp.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/calyearstart.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/clocktime.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/decodenetnum.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/hextoint.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/hextolfp.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/humandate.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/lfpfunc.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/lfptest.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/lfptest.h (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/lfptostr.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/modetoa.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/msyslog.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/netof.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/numtoa.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/numtohost.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/octtoint.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/prettydate.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/recvbuff.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/refidsmear.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/refnumtoa.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-a_md5encrypt.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-atoint.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-atouint.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-authkeys.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-buftvtots.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-calendar.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-caljulian.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-caltontp.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-calyearstart.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-clocktime.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-decodenetnum.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-hextoint.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-hextolfp.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-humandate.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-lfpfunc.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-lfptostr.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-modetoa.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-msyslog.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-netof.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-numtoa.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-numtohost.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-octtoint.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-prettydate.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-recvbuff.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-refidsmear.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-refnumtoa.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-sfptostr.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-socktoa.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-ssl_init.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-statestr.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-strtolfp.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-timespecops.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-timevalops.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-tstotv.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-tvtots.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-uglydate.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-vi64ops.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/run-ymd2yd.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/sfptostr.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/sockaddrtest.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/sockaddrtest.h (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/socktoa.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/ssl_init.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/statestr.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/strtolfp.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/test-libntp.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/test-libntp.h (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/timespecops.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/timevalops.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/tstotv.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/tvtots.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/uglydate.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/vi64ops.c (contents, props changed) vendor/ntp/4.2.8p4/tests/libntp/ymd2yd.c (contents, props changed) vendor/ntp/4.2.8p4/tests/ntpd/ vendor/ntp/4.2.8p4/tests/ntpd/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/tests/ntpd/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/tests/ntpd/leapsec.c (contents, props changed) vendor/ntp/4.2.8p4/tests/ntpd/ntp_prio_q.c (contents, props changed) vendor/ntp/4.2.8p4/tests/ntpd/ntp_restrict.c (contents, props changed) vendor/ntp/4.2.8p4/tests/ntpd/rc_cmdlength.c (contents, props changed) vendor/ntp/4.2.8p4/tests/ntpd/run-leapsec.c (contents, props changed) vendor/ntp/4.2.8p4/tests/ntpd/run-ntp_prio_q.c (contents, props changed) vendor/ntp/4.2.8p4/tests/ntpd/run-ntp_restrict.c (contents, props changed) vendor/ntp/4.2.8p4/tests/ntpd/run-rc_cmdlength.c (contents, props changed) vendor/ntp/4.2.8p4/tests/ntpd/run-t-ntp_scanner.c (contents, props changed) vendor/ntp/4.2.8p4/tests/ntpd/run-t-ntp_signd.c (contents, props changed) vendor/ntp/4.2.8p4/tests/ntpd/t-ntp_scanner.c (contents, props changed) vendor/ntp/4.2.8p4/tests/ntpd/t-ntp_signd.c (contents, props changed) vendor/ntp/4.2.8p4/tests/ntpq/ vendor/ntp/4.2.8p4/tests/ntpq/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/tests/ntpq/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/tests/ntpq/run-t-ntpq.c (contents, props changed) vendor/ntp/4.2.8p4/tests/ntpq/t-ntpq.c (contents, props changed) vendor/ntp/4.2.8p4/tests/sandbox/ vendor/ntp/4.2.8p4/tests/sandbox/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/tests/sandbox/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/tests/sandbox/bug-2803.c (contents, props changed) vendor/ntp/4.2.8p4/tests/sandbox/modetoa.c (contents, props changed) vendor/ntp/4.2.8p4/tests/sandbox/run-modetoa.c (contents, props changed) vendor/ntp/4.2.8p4/tests/sandbox/run-uglydate.c (contents, props changed) vendor/ntp/4.2.8p4/tests/sandbox/run-ut-2803.c (contents, props changed) vendor/ntp/4.2.8p4/tests/sandbox/smeartest.c (contents, props changed) vendor/ntp/4.2.8p4/tests/sandbox/uglydate.c (contents, props changed) vendor/ntp/4.2.8p4/tests/sandbox/ut-2803.c (contents, props changed) vendor/ntp/4.2.8p4/tests/sec-2853/ vendor/ntp/4.2.8p4/tests/sec-2853/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/tests/sec-2853/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/tests/sec-2853/run-sec-2853.c (contents, props changed) vendor/ntp/4.2.8p4/tests/sec-2853/sec-2853.c (contents, props changed) vendor/ntp/4.2.8p4/util/ vendor/ntp/4.2.8p4/util/Makefile.am (contents, props changed) vendor/ntp/4.2.8p4/util/Makefile.in (contents, props changed) vendor/ntp/4.2.8p4/util/README (contents, props changed) vendor/ntp/4.2.8p4/util/audio-pcm.c (contents, props changed) vendor/ntp/4.2.8p4/util/byteorder.c (contents, props changed) vendor/ntp/4.2.8p4/util/hist.c (contents, props changed) vendor/ntp/4.2.8p4/util/invoke-ntp-keygen.menu (contents, props changed) vendor/ntp/4.2.8p4/util/invoke-ntp-keygen.texi (contents, props changed) vendor/ntp/4.2.8p4/util/jitter.c (contents, props changed) vendor/ntp/4.2.8p4/util/kern.c (contents, props changed) vendor/ntp/4.2.8p4/util/longsize.c (contents, props changed) vendor/ntp/4.2.8p4/util/ntp-keygen-opts.c (contents, props changed) vendor/ntp/4.2.8p4/util/ntp-keygen-opts.def (contents, props changed) vendor/ntp/4.2.8p4/util/ntp-keygen-opts.h (contents, props changed) vendor/ntp/4.2.8p4/util/ntp-keygen.1ntp-keygenman (contents, props changed) vendor/ntp/4.2.8p4/util/ntp-keygen.1ntp-keygenmdoc (contents, props changed) vendor/ntp/4.2.8p4/util/ntp-keygen.c (contents, props changed) vendor/ntp/4.2.8p4/util/ntp-keygen.html (contents, props changed) vendor/ntp/4.2.8p4/util/ntp-keygen.man.in (contents, props changed) vendor/ntp/4.2.8p4/util/ntp-keygen.mdoc.in (contents, props changed) vendor/ntp/4.2.8p4/util/ntp-keygen.texi (contents, props changed) vendor/ntp/4.2.8p4/util/ntptime.c (contents, props changed) vendor/ntp/4.2.8p4/util/pps-api.c (contents, props changed) vendor/ntp/4.2.8p4/util/precision.c (contents, props changed) vendor/ntp/4.2.8p4/util/sht.c (contents, props changed) vendor/ntp/4.2.8p4/util/testrs6000.c (contents, props changed) vendor/ntp/4.2.8p4/util/tg.c (contents, props changed) vendor/ntp/4.2.8p4/util/tg2.c (contents, props changed) vendor/ntp/4.2.8p4/util/tickadj.c (contents, props changed) vendor/ntp/4.2.8p4/util/timetrim.c (contents, props changed) vendor/ntp/4.2.8p4/ylwrap (contents, props changed) Added: vendor/ntp/4.2.8p4/COPYRIGHT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ntp/4.2.8p4/COPYRIGHT Wed Oct 21 19:06:51 2015 (r289713) @@ -0,0 +1,229 @@ +This file is automatically generated from html/copyright.html + + Copyright Notice + + jpg "Clone me," says Dolly sheepishly. + + Last update: 17-Jan-2015 00:16 UTC + _________________________________________________________________ + + The following copyright notice applies to all files collectively + called the Network Time Protocol Version 4 Distribution. Unless + specifically declared otherwise in an individual file, this entire + notice applies as if the text was explicitly included in the file. +*********************************************************************** +* * +* Copyright (c) University of Delaware 1992-2015 * +* * +* Permission to use, copy, modify, and distribute this software and * +* its documentation for any purpose with or without fee is hereby * +* granted, provided that the above copyright notice appears in all * +* copies and that both the copyright notice and this permission * +* notice appear in supporting documentation, and that the name * +* University of Delaware not be used in advertising or publicity * +* pertaining to distribution of the software without specific, * +* written prior permission. The University of Delaware makes no * +* representations about the suitability this software for any * +* purpose. It is provided "as is" without express or implied * +* warranty. * +* * +*********************************************************************** + + Content starting in 2011 from Harlan Stenn, Danny Mayer, and Martin + Burnicki is: +*********************************************************************** +* * +* Copyright (c) Network Time Foundation 2011-2015 * +* * +* 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 ``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. * +*********************************************************************** + + The following individuals contributed in part to the Network Time + Protocol Distribution Version 4 and are acknowledged as authors of + this work. + 1. [1]Takao Abe Clock driver for JJY receivers + 2. [2]Mark Andrews Leitch atomic clock + controller + 3. [3]Bernd Altmeier hopf Elektronik serial + line and PCI-bus devices + 4. [4]Viraj Bais and [5]Clayton Kirkwood + port to WindowsNT 3.5 + 5. [6]Michael Barone GPSVME fixes + 6. [7]Karl Berry syslog to file option + 7. [8]Greg Brackley Major rework of WINNT + port. Clean up recvbuf and iosignal code into separate modules. + 8. [9]Marc Brett Magnavox GPS clock driver + 9. [10]Piete Brooks MSF clock driver, + Trimble PARSE support + 10. [11]Nelson B Bolyard update and complete + broadcast and crypto features in sntp + 11. [12]Jean-Francois Boudreault + IPv6 support + 12. [13]Reg Clemens Oncore driver (Current maintainer) + 13. [14]Steve Clift OMEGA clock driver + 14. [15]Casey Crellin vxWorks (Tornado) port and + help with target configuration + 15. [16]Sven Dietrich Palisade reference + clock driver, NT adj. residuals, integrated Greg's Winnt port. + 16. [17]John A. Dundas III Apple A/UX port + 17. [18]Torsten Duwe Linux + port + 18. [19]Dennis Ferguson foundation code for + NTP Version 2 as specified in RFC-1119 + 19. [20]John Hay IPv6 support and testing + 20. [21]Dave Hart General maintenance, Windows + port interpolation rewrite + 21. [22]Claas Hilbrecht NeoClock4X clock driver + 22. [23]Glenn Hollinger GOES clock driver + 23. [24]Mike Iglesias DEC Alpha port + 24. [25]Jim Jagielski A/UX port + 25. [26]Jeff Johnson massive prototyping + overhaul + 26. [27]Hans Lambermont or + [28] ntpsweep + 27. [29]Poul-Henning Kamp Oncore driver (Original + author) + 28. [30]Frank Kardel [31] PARSE + (driver 14 reference clocks), STREAMS modules for PARSE, support + scripts, syslog cleanup, dynamic interface handling + 29. [32]Johannes Maximilian Kuehn Rewrote sntp to + comply with NTPv4 specification, ntpq saveconfig + 30. [33]William L. Jones RS/6000 AIX + modifications, HPUX modifications + 31. [34]Dave Katz RS/6000 AIX port + 32. [35]Craig Leres 4.4BSD port, ppsclock, Magnavox + GPS clock driver + 33. [36]George Lindholm SunOS 5.1 port + 34. [37]Louis A. Mamakos MD5-based authentication + 35. [38]Lars H. Mathiesen adaptation of foundation + code for Version 3 as specified in RFC-1305 + 36. [39]Danny Mayer Network I/O, Windows Port, Code + Maintenance + 37. [40]David L. Mills Version 4 foundation, + precision kernel; clock drivers: 1, 3, 4, 6, 7, 11, 13, 18, 19, + 22, 36 + 38. [41]Wolfgang Moeller VMS port + 39. [42]Jeffrey Mogul ntptrace utility + 40. [43]Tom Moore i386 svr4 port + 41. [44]Kamal A Mostafa SCO OpenServer port + 42. [45]Derek Mulcahy and [46]Damon + Hart-Davis ARCRON MSF clock driver + 43. [47]Rob Neal Bancomm refclock and config/parse code + maintenance + 44. [48]Rainer Pruy + monitoring/trap scripts, statistics file handling + 45. [49]Dirce Richards Digital UNIX V4.0 port + 46. [50]Wilfredo Sánchez added support for + NetInfo + 47. [51]Nick Sayer SunOS streams modules + 48. [52]Jack Sasportas Saved a Lot of + space on the stuff in the html/pic/ subdirectory + 49. [53]Ray Schnitzler Unixware1 port + 50. [54]Michael Shields USNO clock driver + 51. [55]Jeff Steinman Datum PTS clock + driver + 52. [56]Harlan Stenn GNU automake/autoconfigure + makeover, various other bits (see the ChangeLog) + 53. [57]Kenneth Stone HP-UX port + 54. [58]Ajit Thyagarajan IP multicast/anycast + support + 55. [59]Tomoaki TSURUOKA TRAK clock + driver + 56. [60]Brian Utterback General codebase, + Solaris issues + 57. [61]Loganaden Velvindron Sandboxing + (libseccomp) support + 58. [62]Paul A Vixie TrueTime GPS driver, generic + TrueTime clock driver + 59. [63]Ulrich Windl corrected and + validated HTML documents according to the HTML DTD + _________________________________________________________________ + +References + + 1. mailto:%20takao_abe@xurb.jp + 2. mailto:%20mark_andrews@isc.org + 3. mailto:%20altmeier@atlsoft.de + 4. mailto:%20vbais@mailman1.intel.co + 5. mailto:%20kirkwood@striderfm.intel.com + 6. mailto:%20michael.barone@lmco.com + 7. mailto:%20karl@owl.HQ.ileaf.com + 8. mailto:%20greg.brackley@bigfoot.com + 9. mailto:%20Marc.Brett@westgeo.com + 10. mailto:%20Piete.Brooks@cl.cam.ac.uk + 11. mailto:%20nelson@bolyard.me + 12. mailto:%20Jean-Francois.Boudreault@viagenie.qc.ca + 13. mailto:%20reg@dwf.com + 14. mailto:%20clift@ml.csiro.au + 15. mailto:%20casey@csc.co.za + 16. mailto:%20Sven_Dietrich@trimble.COM + 17. mailto:%20dundas@salt.jpl.nasa.gov + 18. mailto:%20duwe@immd4.informatik.uni-erlangen.de + 19. mailto:%20dennis@mrbill.canet.ca + 20. mailto:%20jhay@icomtek.csir.co.za + 21. mailto:%20davehart@davehart.com + 22. mailto:%20neoclock4x@linum.com + 23. mailto:%20glenn@herald.usask.ca + 24. mailto:%20iglesias@uci.edu + 25. mailto:%20jagubox.gsfc.nasa.gov + 26. mailto:%20jbj@chatham.usdesign.com + 27. mailto:%20Hans.Lambermont@nl.origin-it.com + 28. mailto:H.Lambermont@chello.nl + 29. mailto:%20phk@FreeBSD.ORG + 30. http://www4.informatik.uni-erlangen.de/%7ekardel + 31. mailto:%20kardel%20%28at%29%20ntp%20%28dot%29%20org + 32. mailto:kuehn@ntp.org + 33. mailto:%20jones@hermes.chpc.utexas.edu + 34. mailto:%20dkatz@cisco.com + 35. mailto:%20leres@ee.lbl.gov + 36. mailto:%20lindholm@ucs.ubc.ca + 37. mailto:%20louie@ni.umd.edu + 38. mailto:%20thorinn@diku.dk + 39. mailto:%20mayer@ntp.org + 40. mailto:%20mills@udel.edu + 41. mailto:%20moeller@gwdgv1.dnet.gwdg.de + 42. mailto:%20mogul@pa.dec.com + 43. mailto:%20tmoore@fievel.daytonoh.ncr.com + 44. mailto:%20kamal@whence.com + 45. mailto:%20derek@toybox.demon.co.uk + 46. mailto:%20d@hd.org + 47. mailto:%20neal@ntp.org + 48. mailto:%20Rainer.Pruy@informatik.uni-erlangen.de + 49. mailto:%20dirce@zk3.dec.com + 50. mailto:%20wsanchez@apple.com + 51. mailto:%20mrapple@quack.kfu.com + 52. mailto:%20jack@innovativeinternet.com + 53. mailto:%20schnitz@unipress.com + 54. mailto:%20shields@tembel.org + 55. mailto:%20pebbles.jpl.nasa.gov + 56. mailto:%20harlan@pfcs.com + 57. mailto:%20ken@sdd.hp.com + 58. mailto:%20ajit@ee.udel.edu + 59. mailto:%20tsuruoka@nc.fukuoka-u.ac.jp + 60. mailto:%20brian.utterback@oracle.com + 61. mailto:%20loganaden@gmail.com + 62. mailto:%20vixie@vix.com + 63. mailto:%20Ulrich.Windl@rz.uni-regensburg.de Added: vendor/ntp/4.2.8p4/ChangeLog ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ntp/4.2.8p4/ChangeLog Wed Oct 21 19:06:51 2015 (r289713) @@ -0,0 +1,4295 @@ +--- +(4.2.8p4) 2015/10/21 Released by Harlan Stenn +(4.2.8p4-RC1) 2015/10/06 Released by Harlan Stenn + +* [Sec 2899] CVE-2014-9297 perlinger@ntp.org +* [Sec 2901] Drop invalid packet before checking KoD. Check for all KoD's. + Danny Mayer. Log incoming packets that fail TEST2. Harlan Stenn. +* [Sec 2902] configuration directives "pidfile" and "driftfile" + should be local-only. perlinger@ntp.org (patch by Miroslav Lichvar) +* [Sec 2909] added missing call to 'free()' in ntp_crypto.c. perlinger@ntp.org +* [Sec 2913] TALOS-CAN-0052: crash by loop counter underrun. perlinger@ntp.org +* [Sec 2916] TALOS-CAN-0054: memory corruption in password store. JPerlinger +* [Sec 2917] TALOS-CAN-0055: Infinite loop if extended logging enabled and + the logfile and keyfile are the same. perlinger@ntp.org +* [Sec 1918] TALOS-CAN-0062: prevent directory traversal for VMS, too, when + using 'saveconfig' command. perlinger@ntp.org +* [Bug 2919] TALOS-CAN-0063: avoid buffer overrun in ntpq. perlinger@ntp.org +* [Sec 2020] TALOS-CAN-0064: signed/unsiged clash could lead to buffer overun + and memory corruption. perlinger@ntp.org +* [Sec 2921] TALOS-CAN-0065: password length memory corruption. JPerlinger. +* [Sec 2922] decodenetnum() will ASSERT botch instead of returning FAIL + on some bogus values. Harlan Stenn. +* [Sec 2941] NAK to the Future: Symmetric association authentication + bypass via crypto-NAK. Patch applied. perlinger@ntp.org +* [Bug 2332] (reopened) Exercise thread cancellation once before dropping + privileges and limiting resources in NTPD removes the need to link + forcefully against 'libgcc_s' which does not always work. J.Perlinger +* [Bug 2595] ntpdate man page quirks. Hal Murray, Harlan Stenn. +* [Bug 2625] Deprecate flag1 in local refclock. Hal Murray, Harlan Stenn. +* [Bug 2817] Stop locking ntpd into memory by default under Linux. H.Stenn. +* [Bug 2821] minor build issues: fixed refclock_gpsdjson.c. perlinger@ntp.org +* [Bug 2823] ntpsweep with recursive peers option doesn't work. H.Stenn. +* [Bug 2849] Systems with more than one default route may never + synchronize. Brian Utterback. Note that this patch might need to + be reverted once Bug 2043 has been fixed. +* [Bug 2864] 4.2.8p3 fails to compile on Windows. Juergen Perlinger +* [Bug 2866] segmentation fault at initgroups(). Harlan Stenn. +* [Bug 2867] ntpd with autokey active crashed by 'ntpq -crv'. J.Perlinger +* [Bug 2873] libevent should not include .deps/ in the tarball. H.Stenn +* [Bug 2874] Don't distribute generated sntp/tests/fileHandlingTest.h. H.Stenn +* [Bug 2875] sntp/Makefile.am: Get rid of DIST_SUBDIRS. libevent must + be configured for the distribution targets. Harlan Stenn. +* [Bug 2883] ntpd crashes on exit with empty driftfile. Miroslav Lichvar. +* [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org +* [Bug 2888] streamline calendar functions. perlinger@ntp.org +* [Bug 2889] ntp-dev-4.3.67 does not build on Windows. perlinger@ntp.org +* [Bug 2890] Ignore ENOBUFS on routing netlink socket. Konstantin Khlebnikov. +* [Bug 2906] make check needs better support for pthreads. Harlan Stenn. +* [Bug 2907] dist* build targets require our libevent/ to be enabled. HStenn. +* [Bug 2912] no munlockall() under Windows. David Taylor, Harlan Stenn. +* libntp/emalloc.c: Remove explicit include of stdint.h. Harlan Stenn. +* Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn. +* tests/ntpd/g_leapsec.cpp typo fix. Harlan Stenn. +* Phase 1 deprecation of google test in sntp/tests/. Harlan Stenn. +* On some versions of HP-UX, inttypes.h does not include stdint.h. H.Stenn. +* top_srcdir can change based on ntp v. sntp. Harlan Stenn. +* sntp/tests/ function parameter list cleanup. Damir Tomić. +* tests/libntp/ function parameter list cleanup. Damir Tomić. +* tests/ntpd/ function parameter list cleanup. Damir Tomić. +* sntp/unity/unity_config.h: handle stdint.h. Harlan Stenn. +* sntp/unity/unity_internals.h: handle *INTPTR_MAX on old Solaris. H.Stenn. +* tests/libntp/timevalops.c and timespecops.c fixed error printing. D.Tomić. +* tests/libntp/ improvements in code and fixed error printing. Damir Tomić. +* tests/libntp: a_md5encrypt.c, authkeys.c, buftvtots.c, calendar.c, caljulian.c, + caltontp.c, clocktime.c, humandate.c, hextolfp.c, decodenetnum.c - fixed + formatting; first declaration, then code (C90); deleted unnecessary comments; + changed from sprintf to snprintf; fixed order of includes. Tomasz Flendrich +* tests/libntp/lfpfunc.c remove unnecessary include, remove old comments, + fix formatting, cleanup. Tomasz Flendrich +* tests/libntp/lfptostr.c remove unnecessary include, add consts, fix formatting. + Tomasz Flendrich +* tests/libntp/statestr.c remove empty functions, remove unnecessary include, + fix formatting. Tomasz Flendrich +* tests/libntp/modetoa.c fixed formatting. Tomasz Flendrich +* tests/libntp/msyslog.c fixed formatting. Tomasz Flendrich +* tests/libntp/numtoa.c deleted unnecessary empty functions, fixed formatting. + Tomasz Flendrich +* tests/libntp/numtohost.c added const, fixed formatting. Tomasz Flendrich +* tests/libntp/refnumtoa.c fixed formatting. Tomasz Flendrich +* tests/libntp/ssl_init.c fixed formatting. Tomasz Flendrich +* tests/libntp/tvtots.c fixed a bug, fixed formatting. Tomasz Flendrich +* tests/libntp/uglydate.c removed an unnecessary include. Tomasz Flendrich +* tests/libntp/vi64ops.c removed an unnecessary comment, fixed formatting. +* tests/libntp/ymd3yd.c removed an empty function and an unnecessary include, +fixed formatting. Tomasz Flendrich +* tests/libntp/timespecops.c fixed formatting, fixed the order of includes, + removed unnecessary comments, cleanup. Tomasz Flendrich +* tests/libntp/timevalops.c fixed the order of includes, deleted unnecessary + comments, cleanup. Tomasz Flendrich +* tests/libntp/sockaddrtest.h making it agree to NTP's conventions of formatting. + Tomasz Flendrich +* tests/libntp/lfptest.h cleanup. Tomasz Flendrich +* tests/libntp/test-libntp.c fix formatting. Tomasz Flendrich +* sntp/tests/crypto.c is now using proper Unity's assertions, fixed formatting. + Tomasz Flendrich +* sntp/tests/kodDatabase.c added consts, deleted empty function, + fixed formatting. Tomasz Flendrich +* sntp/tests/kodFile.c cleanup, fixed formatting. Tomasz Flendrich +* sntp/tests/packetHandling.c is now using proper Unity's assertions, + fixed formatting, deleted unused variable. Tomasz Flendrich +* sntp/tests/keyFile.c is now using proper Unity's assertions, fixed formatting. + Tomasz Flendrich +* sntp/tests/packetProcessing.c changed from sprintf to snprintf, + fixed formatting. Tomasz Flendrich +* sntp/tests/utilities.c is now using proper Unity's assertions, changed + the order of includes, fixed formatting, removed unnecessary comments. + Tomasz Flendrich +* sntp/tests/sntptest.h fixed formatting. Tomasz Flendrich +* sntp/tests/fileHandlingTest.h.in fixed a possible buffer overflow problem, + made one function do its job, deleted unnecessary prints, fixed formatting. + Tomasz Flendrich +* sntp/unity/Makefile.am added a missing header. Tomasz Flendrich +* sntp/unity/unity_config.h: Distribute it. Harlan Stenn. +* sntp/libevent/evconfig-private.h: remove generated filefrom SCM. H.Stenn. +* sntp/unity/Makefile.am: fix some broken paths. Harlan Stenn. +* sntp/unity/unity.c: Clean up a printf(). Harlan Stenn. +* Phase 1 deprecation of google test in tests/libntp/. Harlan Stenn. +* Don't build sntp/libevent/sample/. Harlan Stenn. +* tests/libntp/test_caltontp needs -lpthread. Harlan Stenn. +* br-flock: --enable-local-libevent. Harlan Stenn. +* Wrote tests for ntpd/ntp_prio_q.c. Tomasz Flendrich +* scripts/lib/NTP/Util.pm: stratum output is version-dependent. Harlan Stenn. +* Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn. +* Code cleanup. Harlan Stenn. +* libntp/icom.c: Typo fix. Harlan Stenn. +* util/ntptime.c: initialization nit. Harlan Stenn. +* ntpd/ntp_peer.c:newpeer(): added a DEBUG_REQUIRE(srcadr). Harlan Stenn. +* Add std_unity_tests to various Makefile.am files. Harlan Stenn. +* ntpd/ntp_restrict.c: added a few assertions, created tests for this file. + Tomasz Flendrich +* Changed progname to be const in many files - now it's consistent. Tomasz + Flendrich +* Typo fix for GCC warning suppression. Harlan Stenn. +* Added tests/ntpd/ntp_scanner.c test. Damir Tomić. +* Added declarations to all Unity tests, and did minor fixes to them. + Reduced the number of warnings by half. Damir Tomić. +* Updated generate_test_runner.rb and updated the sntp/unity/auto directory + with the latest Unity updates from Mark. Damir Tomić. +* Retire google test - phase I. Harlan Stenn. +* Unity test cleanup: move declaration of 'initializing'. Harlan Stenn. +* Update the NEWS file. Harlan Stenn. +* Autoconf cleanup. Harlan Stenn. +* Unit test dist cleanup. Harlan Stenn. +* Cleanup various test Makefile.am files. Harlan Stenn. +* Pthread autoconf macro cleanup. Harlan Stenn. +* Fix progname definition in unity runner scripts. Harlan Stenn. +* Clean trailing whitespace in tests/ntpd/Makefile.am. Harlan Stenn. +* Update the patch for bug 2817. Harlan Stenn. +* More updates for bug 2817. Harlan Stenn. +* Fix bugs in tests/ntpd/ntp_prio_q.c. Harlan Stenn. +* gcc on older HPUX may need +allowdups. Harlan Stenn. +* Adding missing MCAST protection. Harlan Stenn. +* Disable certain test programs on certain platforms. Harlan Stenn. +* Implement --enable-problem-tests (on by default). Harlan Stenn. +* build system tweaks. Harlan Stenn. +--- +(4.2.8p3) 2015/06/29 Released by Harlan Stenn + +* [Sec 2853] Crafted remote config packet can crash some versions of + ntpd. Aleksis Kauppinen, Juergen Perlinger, Harlan Stenn. +* [Sec 2853] Initial work on tests/sec-2853/. Harlan Stenn. +* [Bug 1060] Buffer overruns in libparse/clk_rawdcf.c. Helge Oldach. +* [Bug 2846] Report 'unsynchronized' status during the leap second. + Fixed in Martin's changes to Bug 2855. Martin Burnicki. +* [Bug 2859] Improve raw DCF77 robustness deconding. Frank Kardel. +* [Bug 2860] ntpq ifstats sanity check is too stringent. Frank Kardel. +* README.leapsmear added. Martin Burnicki. +* README.leapsmear edited. Harlan Stenn. +* tests/libntp/msyslog.c: fixed a gcc warning. Tomasz Flendrich. +* ntpd/ntp.conf.def: Document DSCP and leapsmearinterval. Harlan Stenn. +* html/miscopt.html: Document leapsmearinterval, other cleanup. Harlan Stenn. +--- +(4.2.8p3-RC3) 2015/06/27 Released by Harlan Stenn + +* [Bug 2855] Parser fix for conditional leap smear code. Harlan Stenn. +* [Bug 2855] Report leap smear in the REFID. Harlan Stenn. +* [Bug 2856] ntpd should wait() on terminated child processes. Paul Green. +* [Bug 2857] Stratus VOS does not support SIGIO. Paul Green. +* html/drivers/driver22.html: typo fix. Harlan Stenn. +* refidsmear test cleanup. Tomasz Flendrich. +* refidsmear function support and tests. Harlan Stenn. +* sntp/tests/Makefile.am: remove g_nameresolution.cpp as it tested + something that was only in the 4.2.6 sntp. Harlan Stenn. +* Modified tests/bug-2803/Makefile.am so it builds Unity framework tests. + Damir Tomić +* Modified tests/libtnp/Makefile.am so it builds Unity framework tests. + Damir Tomić +* Modified sntp/tests/Makefile.am so it builds Unity framework tests. + Damir Tomić +* tests/sandbox/smeartest.c: Harlan Stenn, Damir Tomic, Juergen Perlinger. +* Converted from gtest to Unity: tests/bug-2803/. Damir Tomić +* Converted from gtest to Unity: tests/libntp/ a_md5encrypt, atoint.c, + atouint.c, authkeys.c, buftvtots.c, calendar.c, caljulian.c, + calyearstart.c, clocktime.c, hextoint.c, lfpfunc.c, modetoa.c, + numtoa.c, numtohost.c, refnumtoa.c, ssl_init.c, statestr.c, + timespecops.c, timevalops.c, uglydate.c, vi64ops.c, ymd2yd.c. + Damir Tomić +* Converted from gtest to Unity: sntp/tests/ kodDatabase.c, kodFile.c, + networking.c, keyFile.c, utilities.cpp, sntptest.h, + fileHandlingTest.h. Damir Tomić +* Converted from gtest to Unity: sntp/tests/ caltontp.c, humandate.c, + msyslog.c, prettydate.c, recvbuff.c, sfptostr.c, tstotv.c, tvtots.c, + sntp/tests/packetProcessing.c. Tomasz Flendrich +--- +(4.2.8p3-RC2) 2015/06/24 Released by Harlan Stenn + +* [Bug 2778] Implement "apeers" ntpq command to include associd. +* [Bug 2805] ntpd fails to join multicast group. +* [Bug 2824] Convert update-leap to perl. (also see 2769) +* [Bug 2830] ntpd doesn't always transfer the correct TAI offset via autokey + NTPD transfers the current TAI (instead of an announcement) now. + This might still needed improvement. + Update autokey data ASAP when 'sys_tai' changes. + Fix unit test that was broken by changes for autokey update. + Avoid potential signature length issue and use DPRINTF where possible + in ntp_crypto.c. +* [Bug 2832] refclock_jjy.c supports the TDC-300. +* [Bug 2834] Correct a broken html tag in html/refclock.html +* [Bug 2836] DFC77 patches from Frank Kardel to make decoding more + robust, and require 2 consecutive timestamps to be consistent. +* [Bug 2837] Allow a configurable DSCP value. +* [Bug 2837] add test for DSCP to ntpd/complete.conf.in +* [Bug 2842] Glitch in ntp.conf.def documentation stanza. +* [Bug 2842] Bug in mdoc2man. +* [Bug 2843] make check fails on 4.3.36 + Fixed compiler warnings about numeric range overflow + (The original topic was fixed in a byplay to bug#2830) +* [Bug 2845] Harden memory allocation in ntpd. +* [Bug 2852] 'make check' can't find unity.h. Hal Murray. +* [Bug 2854] Missing brace in libntp/strdup.c. Masanari Iida. +* [Bug 2855] Implement conditional leap smear code. Martin Burnicki. +* [Bug 2855] leap smear cleanup. Harlan Stenn. +* Initial support for experimental leap smear code. Harlan Stenn. +* Fixes to sntp/tests/fileHandlingTest.h.in. Harlan Stenn. +* Report select() debug messages at debug level 3 now. +* sntp/scripts/genLocInfo: treat raspbian as debian. +* Unity test framework fixes. + ** Requires ruby for changes to tests. +* Initial support for PACKAGE_VERSION tests. +* sntp/libpkgver belongs in EXTRA_DIST, not DIST_SUBDIRS. +* tests/bug-2803/Makefile.am must distribute bug-2803.h. +* automake-1.15 cleanup for sntp/tests/fileHandlingTest.h.in . Harlan Stenn. +--- +(4.2.8p3-RC1) 2015/05/12 Released by Harlan Stenn + +* CID 739725: Fix a rare resource leak in libevent/listener.c. +* CID 1295478: Quiet a pedantic potential error from the fix for Bug 2776. +* CID 1296235: Fix refclock_jjy.c and correcting type of the driver40-ja.html +* CID 1269537: Clean up a line of dead code in getShmTime(). +* [Bug 2590] autogen-5.18.5. +* [Bug 2612] restrict: Warn when 'monitor' can't be disabled because + of 'limited'. +* [Bug 2650] fix includefile processing. +* [Bug 2745] ntpd -x steps clock on leap second + Fixed an initial-value problem that caused misbehaviour in absence of + any leapsecond information. + Do leap second stepping only of the step adjustment is beyond the + proper jump distance limit and step correction is allowed at all. +* [Bug 2750] build for Win64 + Building for 32bit of loopback ppsapi needs def file +* [Bug 2776] Improve ntpq's 'help keytype'. +* [Bug 2782] Refactor refclock_shm.c, add memory barrier protection. +* [Bug 2792] If the IFF_RUNNING interface flag is supported then an + interface is ignored as long as this flag is not set since the + interface is not usable (e.g., no link). +* [Bug 2794] Clean up kernel clock status reports. +* [Bug 2800] refclock_true.c true_debug() can't open debug log because + of incompatible open/fdopen parameters. +* [Bug 2804] install-local-data assumes GNU 'find' semantics. +* [Bug 2806] refclock_jjy.c supports the Telephone JJY. +* [Bug 2808] GPSD_JSON driver enhancements, step 1. + Fix crash during cleanup if GPS device not present and char device. + Increase internal token buffer to parse all JSON data, even SKY. + Defer logging of errors during driver init until the first unit is + started, so the syslog is not cluttered when the driver is not used. + Various improvements, see http://bugs.ntp.org/2808 for details. + Changed libjsmn to a more recent version. +* [Bug 2810] refclock_shm.c memory barrier code needs tweaks for QNX. +* [Bug 2813] HP-UX needs -D__STDC_VERSION__=199901L and limits.h. +* [Bug 2815] net-snmp before v5.4 has circular library dependencies. +* [Bug 2821] Add a missing NTP_PRINTF and a missing const. +* [Bug 2822] New leap column in sntp broke NTP::Util.pm. +* [Bug 2825] Quiet file installation in html/ . +* [Bug 2830] ntpd doesn't always transfer the correct TAI offset via autokey + NTPD transfers the current TAI (instead of an announcement) now. + This might still needed improvement. +* Add an assert to the ntpq ifstats code. +* Clean up the RLIMIT_STACK code. +* Improve the ntpq documentation around the controlkey keyid. +* ntpq.c cleanup. +* Windows port build cleanup. +--- +(4.2.8p2) 2015/04/07 Released by Harlan Stenn +(4.2.8p2-RC3) 2015/04/03 Released by Harlan Stenn + +* [Bug 2763] Fix for different thresholds for forward and backward steps. +* Initial import of the Unity test framework. +--- +(4.2.8p2-RC2) 2015/04/03 Released by Harlan Stenn + +* [Bug 2592] FLAG_TSTAMP_PPS cleanup for refclock_parse.c. +* [Bug 2769] New script: update-leap +* [Bug 2769] cleannup for update-leap +* [Bug 2788] New flag -G (force_step_once). +* [Bug 2794] Clean up kernel clock status reports. +* [Bug 2795] Cannot build without OpenSLL (on Win32). + Provided a Win32 specific wrapper around libevent/arc4random.c. + fixed some minor warnings. +* [Bug 2796] ntp-keygen crashes in 'getclock()' on Win32. +* [Bug 2797] ntp-keygen trapped in endless loop for MD5 keys + on big-endian machines. +* [Bug 2798] sntp should decode and display the leap indicator. +* Simple cleanup to html/build.html +--- +(4.2.8p2-RC1) 2015/03/30 Released by Harlan Stenn + +* [Bug 2794] Don't let reports on normal kernel status changes + look like errors. +* [Bug 2788] New flag -G (force_step_once). +* [Bug 2592] Account for PPS sources which can provide an accurate + absolute time stamp, and status information. + Fixed indention and removed trailing whitespace. +* [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003. +* [Bug 1960] setsockopt IPV6_MULTICAST_IF: Invalid argument. +* [Bug 2346] "graceful termination" signals do not do peer cleanup. +* [Bug 2728] See if C99-style structure initialization works. +* [Bug 2747] Upgrade libevent to 2.1.5-beta. +* [Bug 2749] ntp/lib/NTP/Util.pm needs update for ntpq -w, IPv6, .POOL. . +* [Bug 2751] jitter.h has stale copies of l_fp macros. +* [Bug 2756] ntpd hangs in startup with gcc 3.3.5 on ARM. +* [Bug 2757] Quiet compiler warnings. +* [Bug 2759] Expose nonvolatile/clk_wander_threshold to ntpq. +* [Bug 2763] Allow different thresholds for forward and backward steps. +* [Bug 2766] ntp-keygen output files should not be world-readable. +* [Bug 2767] ntp-keygen -M should symlink to ntp.keys. +* [Bug 2771] nonvolatile value is documented in wrong units. +* [Bug 2773] Early leap announcement from Palisade/Thunderbolt +* [Bug 2774] Unreasonably verbose printout - leap pending/warning +* [Bug 2775] ntp-keygen.c fails to compile under Windows. +* [Bug 2777] Fixed loops and decoding of Meinberg GPS satellite info. + Removed non-ASCII characters from some copyright comments. + Removed trailing whitespace. + Updated definitions for Meinberg clocks from current Meinberg header files. + Now use C99 fixed-width types and avoid non-ASCII characters in comments. + Account for updated definitions pulled from Meinberg header files. + Updated comments on Meinberg GPS receivers which are not only called GPS16x. + Replaced some constant numbers by defines from ntp_calendar.h + Modified creation of parse-specific variables for Meinberg devices + in gps16x_message(). + Reworked mk_utcinfo() to avoid printing of ambiguous leap second dates. + Modified mbg_tm_str() which now expexts an additional parameter controlling + if the time status shall be printed. +* [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto. +* [Sec 2781] Authentication doesn't protect symmetric associations against + DoS attacks. +* [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE. +* [Bug 2784] Fix for 2782 uses clock_gettime() instead of get_ostime(). +* [Bug 2789] Quiet compiler warnings from libevent. +* [Bug 2790] If ntpd sets the Windows MM timer highest resolution + pause briefly before measuring system clock precision to yield + correct results. +* Comment from Juergen Perlinger in ntp_calendar.c to make the code clearer. +* Use predefined function types for parse driver functions + used to set up function pointers. + Account for changed prototype of parse_inp_fnc_t functions. + Cast parse conversion results to appropriate types to avoid + compiler warnings. + Let ioctl() for Windows accept a (void *) to avoid compiler warnings + when called with pointers to different types. +--- +(4.2.8p1) 2015/02/04 Released by Harlan Stenn + +* Update the NEWS file. +* [Sec 2671] vallen in extension fields are not validated. +--- +(4.2.8p1-RC2) 2015/01/29 Released by Harlan Stenn + +* [Bug 2627] shm refclock allows only two units with owner-only access + rework: reverted sense of mode bit (so default reflects previous + behaviour) and updated ducumentation. +* [Bug 2732] - Leap second not handled correctly on Windows 8 + use 'GetTickCount()' to get the true elapsed time of slew + (This should work for all versions of Windows >= W2K) +* [Bug 2738] Missing buffer initialization in refclocK_parse.c::parsestate(). +* [Bug 2739] Parse driver with PPS enabled occasionally evaluates + PPS timestamp with wrong sign. + Removed some German umlauts. +* [Bug 2740] Removed some obsolete code from the parse driver. +* [Bug 2741] Incorrect buffer check in refclocK_parse.c::parsestatus(). +--- +(4.2.8p1-RC1) 2015/01/24 Released by Harlan Stenn + +* Start the RC for 4.2.8p1. +* [Bug 2187] Update version number generation scripts. +* [Bug 2617] Fix sntp Usage documentation section. +* [Sec 2672] Code cleanup: On some OSes ::1 can be spoofed... +* [Bug 2736] Show error message if we cannot open the config file. +* Copyright update. +* Fix the package name. +--- +(4.2.8p1-beta5) 2015/01/07 Released by Harlan Stenn + +* [Bug 2695] Windows build: __func__ not supported under Windows. +* [Bug 2728] Work around C99-style structure initialization code + for older compilers, specifically Visual Studio prior to VS2013. +--- +(4.2.8p1-beta4) 2015/01/04 Released by Harlan Stenn + +* [Bug 1084] PPSAPI for ntpd on Windows with DLL backends +* [Bug 2695] Build problem on Windows (sys/socket.h). +* [Bug 2715] mdnstries option for ntp.conf from NetBSD. +* Fix a regression introduced to timepps-Solaris.h as part of: + [Bug 1206] Required compiler changes for Windows + (4.2.5p181) 2009/06/06 +--- +(4.2.8p1-beta3) 2015/01/02 Released by Harlan Stenn + +* [Bug 2627] shm refclock allows only two units with owner-only access + Use mode bit 0 to select public access for units >= 2 (units 0 & 1 are + always private. +* [Bug 2681] Fix display of certificate EOValidity dates on 32-bit systems. +* [Bug 2695] 4.2.8 does not build on Windows. +* [bug 2700] mrulist stopped working in 4.2.8. +* [Bug 2706] libparse/info_trimble.c build dependencies are broken. +* [Bug 2713] variable type/cast, parameter name, general cleanup from NetBSD. +* [Bug 2714] libevent may need to be built independently of any build of sntp. +* [Bug 2715] mdnstries option for ntp.conf from NetBSD. +--- +(4.2.8p1-beta2) 2014/12/27 Released by Harlan Stenn + +* [Bug 2674] Install sntp in sbin on NetBSD. +* [Bug 2693] ntp-keygen doesn't build without OpenSSL and sntp. +* [Bug 2707] Avoid a C90 extension in libjsmn/jsmn.c. +* [Bug 2709] see if we have a C99 compiler (not yet required). +--- +(4.2.8p1-beta1) 2014/12/23 Released by Harlan Stenn + +* [Sec 2672] On some OSes ::1 can be spoofed, bypassing source IP ACLs. +* [Bug 2693] ntp-keygen doesn't build without OpenSSL. +* [Bug 2697] IN6_IS_ADDR_LOOPBACK build problems on some OSes. +* [Bug 2699] HAVE_SYS_SELECT_H is misspelled in refclock_gpsdjson.c. +--- +(4.2.8) 2014/12/19 Released by Harlan Stenn + +* [Sec 730] Increase RSA_generate_key modulus. +* [Sec 2666] Use cryptographic random numbers for md5 key generation. +* [Sec 2667] buffer overflow in crypto_recv(). +* [Sec 2668] buffer overflow in ctl_putdata(). +* [Sec 2669] buffer overflow in configure(). +* [Sec 2670] Missing return; from error clause. +* [Sec 2671] vallen in extension fields are not validated. +* [Sec 2672] On some OSes ::1 can be spoofed, bypassing source IP ACLs. +* [Bug 2691] Wrong variable name in refclock_ripencc.c. +(4.2.7p486-RC) 2014/12/18 Released by Harlan Stenn +* [Bug 2687] RefClock 26/hpgps doesn't work at default line speed +(4.2.7p485-RC) 2014/12/12 Released by Harlan Stenn +* [Bug 2686] refclock_gpsdjson needs strtoll(), which is not always present. +(4.2.7p484-RC) 2014/12/11 Released by Harlan Stenn +(4.2.7p483) 2014/12/08 Released by Harlan Stenn +* [Bug 2685] Better document the KOD file for sntp. +(4.2.7p482) 2014/12/02 Released by Harlan Stenn +* [Bug 2641] sntp is installed in the wrong location in Solaris. +* [Bug 2678] nmea_control() now checks 'refclock_params()' result. +(4.2.7p481) 2014/11/22 Released by Harlan Stenn +* [Bug 2314] Only enable PPS if kernel consumer binding succeeds. +* [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition. +* Rename pps_enable to hardpps_enable. +(4.2.7p480) 2014/11/21 Released by Harlan Stenn +* [Bug 2677] PATH_MAX isn't #define'd under Windows. + Regression from the patch fixing Bug 2639. +(4.2.7p479) 2014/11/15 Released by Harlan Stenn +* [Bug 2651] Certificates with ASN timestamps w/ 4-digit years mis-parsed. +(4.2.7p478) 2014/11/14 Released by Harlan Stenn +* [Sec 2630] buffer overrun in ntpq tokenize(). +* [Bug 2639] Check return value of ntp_adjtime(). +* [Bug 2650] includefile processing broken. +* [Bug 2661] ntpq crashes with mreadvar. +(4.2.7p477) 2014/11/13 Released by Harlan Stenn +* [Bug 2657] Document that "restrict nopeer" intereferes with "pool". +(4.2.7p476) 2014/10/08 Released by Harlan Stenn +* [Bug 2503] SHT utility outdated +(4.2.7p475) 2014/09/11 Released by Harlan Stenn +* [Bug 2654] refclock_true.c doesn't identify the Mk III. +(4.2.7p474) 2014/09/10 Released by Harlan Stenn +* [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup. +* [Bug 2649] Clean up html/ page installation. +(4.2.7p473) 2014/09/06 Released by Harlan Stenn +* [Bug 2649] Clean up html/ page installation. +(4.2.7p472) 2014/09/06 Released by Harlan Stenn +* [Bug 2556] mrulist is missing from the generated ntpq man page. +(4.2.7p471) 2014/09/05 Released by Harlan Stenn +* [Bug 2649] "make install" leaves wrong owner for files in html/. +* [Bug 2652] Windows hates directory names that contain a :. +(4.2.7p470) 2014/09/02 Released by Harlan Stenn +* [Bug 2502] Autogen text replacement errors. +* autogen-5.18.5pre1 +* html/ cleanups from Hal Murray. +(4.2.7p469) 2014/09/01 Released by Harlan Stenn +* [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup. +(4.2.7p468) 2014/08/31 Released by Harlan Stenn +* [Bug 2556] ntpq man page cleanup. +* autogen-5.18.4 +(4.2.7p467) 2014/08/28 Released by Harlan Stenn +* [Bug 2639] Check return value of ntp_adjtime(). +* [Bug 2640] STA_NANO can result in invalid ntv.constant. +(4.2.7p466) 2014/08/27 Released by Harlan Stenn +* [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup. +(4.2.7p465) 2014/08/23 Released by Harlan Stenn +* [Bug 2538] NTP programs print exit code in help/usage text. +* [Bug 2595] Man page quirks: ntpdate references in ntpd. +* [Bug 2613] www.ntp.org/bugs.html tells folks to email doc bugs to DLM. +* [Bug 2636] Clutter in syslog if gpsd not running + - found (hopefully) last cause for clutter in protocol version + - log GPSD revision and release numbers with protocol version +(4.2.7p464) 2014/08/22 Released by Harlan Stenn +* [Bug 2636] Fix coverity warning from previous patch. +(4.2.7p463) 2014/08/21 Released by Harlan Stenn +* [Bug 2636] Clutter in syslog if gpsd not running + - make driver work with GPSD protocol version 3.9 + - use exponential back-off for connection problems + - implement rate-limit for syslog entries +(4.2.7p462) 2014/08/16 Released by Harlan Stenn +* [Bug 2622] Synchronisation problem using SHM [...] + Add 'control' function -- fudge values not available during start. +(4.2.7p461) 2014/08/14 Released by Harlan Stenn +* [Bug 1128] ntpq truncates "remote" host information. +* More autogen-5.18.4pre14 cleanup. +(4.2.7p460) 2014/08/13 Released by Harlan Stenn +* More autogen-5.18.4pre14 cleanup. +(4.2.7p459) 2014/08/12 Released by Harlan Stenn +* [Bug 2630] Limit the ntpq command buffer to 512 bytes. +* FlexeLint cleanups. +* Try bison-3.0.2 instead of bison-2.5. +(4.2.7p458) 2014/08/11 Released by Harlan Stenn +* [Bug 2633] Provide stdnoreturn.h for windows port. +(4.2.7p457) 2014/08/09 Released by Harlan Stenn +* [Bug 2622] Synchronisation problem using SHM when time difference is + more than four hours: Change SHM driver so TOY restricted API is not + used any more. (Plus some minor cleanup in logic and flow control) +* Pass the configration source into the parser as argument rather + than through a global variable. +* Fix nits in the ntpq man page. +* autogen-5.18.4pre14 +(4.2.7p456) 2014/08/07 Released by Harlan Stenn +* CID 739722: Change the way the extention and MAC fields are processed. +(4.2.7p455) 2014/08/03 Released by Harlan Stenn +* [Bug 2565] ntpd sometimes logs unexpected getifaddrs() errors. +* CID 739722: Clean up the definition of the exten field of struct pkt. +(4.2.7p454) 2014/07/30 Released by Harlan Stenn +* [Bug 2628] 'mon_getmoremem()' relies on undefined behaviour +(4.2.7p453) 2014/07/19 Released by Harlan Stenn +* [Bug 2597] leap file loose ends (follow-up) + - uniform expiration check messages for config and timer triggered + leap file loads + - timer triggered loads log messages only once per day +(4.2.7p452) 2014/07/18 Released by Harlan Stenn +* Make all of the html/ .html files use the same format for "Last update". +(4.2.7p451) 2014/07/17 Released by Harlan Stenn +* Fix the "Last update" entries in the html/ subtree. +(4.2.7p450) 2014/07/16 Released by Harlan Stenn +* Distribute the scripts needed for the fix for Bug 2547. +(4.2.7p449) 2014/07/16 Released by Harlan Stenn +* [Bug 2547] Automate update of "Last Update" datestamps in .html files. +* [Bug 2623] Missing {} in refclock_oncore.c. +* Quiet warnings from ntp_calendar.h: avoid using argument names. +* Fix typos in decode.html and debug.html . +(4.2.7p448) 2014/07/15 Released by Harlan Stenn +* [Bug 2621] Avoid use of indeterminate address after 'free()' + (minor C standard conformance issue) +* Quiet warnings from ntp_calendar.h: avoid using argument names. +(4.2.7p447) 2014/07/05 Released by Harlan Stenn +* [Bug 2620] Use version.pm for checking version numbers in NTP::Util. +* [Bug 2624] Fix signed compare on 'l_fp'. +(4.2.7p446) 2014/06/28 Released by Harlan Stenn +* [Bug 2597] leap file processing -- loose ends. +* [Bug 2614] use 'unsigned long' consistently in ntp_random.c + to avoid possibly undefined behaviour in signed int overflow +* [Bug 2619] Save a signed int copy of the return value of i2d_DSA_SIG(). + Provide missing msyslog() message in crypto_alice(). +* Fix a variable lifetime issue. +* Allow for version suffix in libevent in ntp_libevent.m4. +(4.2.7p445) 2014/06/12 Released by Harlan Stenn +* [Bug 2556] mrulist isn't mentioned in the ntpq man page. +(4.2.7p444) 2014/05/19 Released by Harlan Stenn +* [Bug 2597] leap file processing -- loose ends + fixed coverity issues +(4.2.7p443) 2014/05/10 Released by Harlan Stenn +* [Bug 2594] Update the year in sntp/include/copyright.def. +(4.2.7p442) 2014/05/09 Released by Harlan Stenn +* [Bug 2589] Update VS2013 project files for libntp. +* [Bug 2600] Fix "Undisicplined Local Clock" driver1.html page. +(4.2.7p441) 2014/05/04 Released by Harlan Stenn +* [Bug 2597] leap file processing -- loose ends + log daily warning when leap info less than 28 days to expiration or + already expired; nag hourly on last day before expiration; log when + leapfile name is invalid +(4.2.7p440) 2014/04/09 Released by Harlan Stenn +* [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup. +* [Bug 2570] cleanup: fix log format for successful leapfile load +(4.2.7p439) 2014/04/03 Released by Harlan Stenn +* [Bug 2589] fix VS2009 compile problem. +(4.2.7p438) 2014/04/01 Released by Harlan Stenn +* [Bug 2546] Windows build documentation updates. +(4.2.7p437) 2014/03/31 Released by Harlan Stenn +* [Bug 2537] ntpd truncates symmetric keys to 20 bytes. +* [Bug 2546] Documentation updates. +(4.2.7p436) 2014/03/31 Released by Harlan Stenn +* Update to libopts-40.2.15, and autogen-5.18.3pre18. +* [Bug 2311] Add more tags to mdoc2xxx. +* [Bug 2502] Assorted text replacement errors in 4.2.7p345 +* [Bug 2538] ntp programs print exit code as part of the "usage" text. +(4.2.7p435) 2014/03/29 Released by Harlan Stenn +* [Bug 2570] cleanup: reduced logging noise, moved some functions + into libntp. +(4.2.7p434) 2014/03/21 Released by Harlan Stenn +* [Bug 2577] Update VS2013 solution and project files. +(4.2.7p433) 2014/03/10 Released by Harlan Stenn +* Clean up last-update timestamps of html/*.html files. +* [Bug 2546] Documentation updates. +(4.2.7p432) 2014/03/09 Released by Harlan Stenn +* CID 711660: Do a non-NULL pointer assertion check a bit earlier. +(4.2.7p431) 2014/03/05 Released by Harlan Stenn +* [Bug 2572] cross-compiling fails for --with-yielding-select. +(4.2.7p430) 2014/03/04 Released by Harlan Stenn +* Upgrade to libevent-2.1.3-alpha-dev. +* [Bug 2572] cross-compiling fails for --with-yielding-select. +(4.2.7p429) 2014/03/03 Released by Harlan Stenn +* CID 1165098: Remove logically dead code from refclock_true.c. +* CID 1189401: Use INSIST() instead of a belt-and-suspenders pointer check. +* In ntp_dir_sep.m4, we care about $host_os, not $target_os. +* [Bug 2170] Use AC_PREPROC_IFELSE instead of AC_EGREP_CPP. +* [Bug 2540] bootstrap script needs to 'touch' files in finer-grained groups. +* [Bug 2570] refuse to load leapsec file with bad/missing SHA1 hash + -- change reading the hash line code: NIST omits leading zeros. +* [Bug 2576] refclock_gpsdjson.c doesn't compile if CLOCK_GPSDJSON is + not enabled at configure time. +(4.2.7p428) 2014/03/03 Released by Harlan Stenn +* [Bug 2570] refuse to load leapsec file with bad/missing SHA1 hash +* [Bug 2562] Distribute the code in libjsmn/ . +(4.2.7p427) 2014/03/02 Released by Harlan Stenn +* [Bug 2562] GPSD_JSON: fix solaris issues (asprintf(), isfinite()) +* [Bug 2562] first release of the GPSD client clock (type 46) +(4.2.7p426) 2014/02/28 Released by Harlan Stenn +* [Bug 2113] Warn about ignored extra args in ntpq. +* [Bug 2540] bootstrap script needs to 'touch' files in finer-grained groups. +* [Bug 2561] Allow wildcards in the target of the "interface" command. +* [Bug 2572] cross-compiling fails for --with-yielding_select. +(4.2.7p425) 2014/02/26 Released by Harlan Stenn +* Copyright file update. +(4.2.7p424) 2014/02/24 Released by Harlan Stenn +* [Bug 2541] ntpd terminates itself with SIGHUP unexpectedly. +(4.2.7p423) 2014/02/23 Released by Harlan Stenn +* [Bug 2565] Handle EINTR on getifaddrs(). +(4.2.7p422) 2014/02/17 Released by Harlan Stenn +* [Bug 2536] ntpd sandboxing support (libseccomp2). +(4.2.7p421) 2014/02/10 Released by Harlan Stenn +* [Bug 898] More documentation fixes. +* [Bug 2555] Autogen mdoc man pages all stamped with SunOS 5.10. +* calc_tickadj/Makefile.am man/mdoc page build cleanup. +(4.2.7p420) 2014/02/09 Released by Harlan Stenn +* [Bug 492] Clearly document ntpdate's pending deprecation. +* [Bug 1186] ntpd fails with link local IPv6 addresses. +* [Sec 2542] Strengthen the mrulist nonce. +(4.2.7p419) 2014/02/08 Released by Harlan Stenn +* [Bug 2466] Wrap NMEA timestamps in 1024 week cycles. +(4.2.7p418) 2014/02/05 Released by Harlan Stenn +* [Bug 2551] --disable-local-libevent breaks the build. +(4.2.7p417) 2014/02/02 Released by Harlan Stenn +* [Bug 2539] doc and code tweaks for NMEA driver. +* Add check for enable stats to ntpd/complete.conf.in +* Fix typo in html/confopt.html +(4.2.7p416) 2014/01/31 Released by Harlan Stenn +* Tweak the 'Modified' line on appropriate html pages. +* Note in the deprecation of ntpdc in its documentation. +* [Bug 2332] Be more careful about when we use 'libgcc_s'. +(4.2.7p415) 2014/01/28 Released by Harlan Stenn +* Fix the man page installation for the scripts/ files. +(4.2.7p414) 2014/01/28 Released by Harlan Stenn +* [Bug 792] TrueTime TL-3 WWV refclock support. +* [Bug 898] Documentation fixes. +* [Bug 930] ntpdc docs refer to 'clockinfo', but mean 'clockstat'. +* [Bug 1002] ntp-keygen option and documentation updates: -p/--pvt-passwd + is now -p/--password, and -q/--get-pvt-passwd is now -q/--export-passwd. +* [Bug 1349] statistics command not documented in HTML documentation. + In html/monopt.html, add statistics id, definition, description, and + correct typo. + In html/scripts/monopt.txt, add statistics item, href, and comment. + In ntpd/ntp.conf.def, under statistics correct four to eight kinds. + In ntpd/complete.conf.in, add all eight kinds to statistics. + In html/comdex.html, remove duplicate footer. +* [Bug 1734] Include man page for ntp.conf (fixed in 4.2.7p297). +* [Bug 2049] Clarify ntpdate's -d option behavior. +* [Bug 2366] ntpdc.html: burst/iburst only work on servers. +* [Bug 2493] ntptrace needs a man page (fixed in 4.2.7p402). +* [Bug 2545] Cleanup of scripts/monitoring/ntptrap. +(4.2.7p413) 2014/01/27 Released by Harlan Stenn +* Require a version string for perl scripts that use autogen. +* html/ cleanup. +(4.2.7p412) 2014/01/20 Released by Harlan Stenn +* [Bug 2540] bootstrap script needs to 'touch' files in finer-grained groups. +(4.2.7p411) 2014/01/12 Released by Harlan Stenn +* [Bug 2532] Note in ntpdc docs that "enable pps" only works on older ntpd. +(4.2.7p410) 2014/01/08 Released by Harlan Stenn +* [Bug 2332] Force reference to 'libgcc_s' when using GCC, because + threading+restricted user+locked memory otherwise fails on Linux. +* [Bug 2530] Fix documentation for enable/disable mode7 and pps. +* Cleanup to the new scripts/*/Makefile.am files. +(4.2.7p409) 2014/01/04 Released by Harlan Stenn +* [Bug 2060] Warn about restrictions with "kod" but not "limited". +(4.2.7p408) 2013/12/29 Released by Harlan Stenn +* [Bug 2187] Update version number generation scripts. +(4.2.7p407) 2013/12/29 Released by Harlan Stenn +* [Bug 2519] mktime.c does not compile on 64-bit Solaris but we do not + need timegm() and the Solaris provides mktime(). +* [Bug 2522] Revert Bug 2513 fix - it breaks backward compatibility. +(4.2.7p406) 2013/12/28 Released by Harlan Stenn +* [Bug 2521] VPATH tweaks for perl -opts files. +(4.2.7p405) 2013/12/27 Released by Harlan Stenn +* [Bug 2521] bootstrap script needs a tweak for perl -opts files. +* [Bug 2524] Add ntpsweep to sntp/loc/* files. +* [Bug 2526] Add "noinst" support to the sntp/loc/ framework. +(4.2.7p404) 2013/12/24 Released by Harlan Stenn +* [Bug 135] AIX5: "Address already in use" for IPv6 wildcard. +(4.2.7p403) 2013/12/23 Released by Harlan Stenn +* [Bug 2513] Remove any PIDFILE in finish(). +* [Bug 2516] Enable clock_gettime() support for AIX 5+. +* [Bug 2517] Fix peer status errors in decode.html. +(4.2.7p402) 2013/12/23 Released by Harlan Stenn +* Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup. +(4.2.7p401) 2013/11/30 Released by Harlan Stenn +* [Bug 2491] VS20xx compile fixes. +(4.2.7p400) 2013/11/29 Released by Harlan Stenn +* [Bug 2491] VS2013 project files. +(4.2.7p399) 2013/11/28 Released by Harlan Stenn +* [Bug 2326] More leapsecond file notification cleanup. +* [Bug 2506] make sure routing updates are always tracked +* [Bug 2514] secs/* #define usage cleanup. +(4.2.7p398) 2013/11/25 Released by Harlan Stenn +* [Bug 2326] More leapsecond file notification cleanup. +* Improve sntp KoD data file fopen() error message. +(4.2.7p397) 2013/11/20 Released by Harlan Stenn +* [Bug 2326] More leapsecond file notification cleanup. +(4.2.7p396) 2013/11/19 Released by Harlan Stenn +* [Bug 2326] Improve stale leapsecond notifications. +(4.2.7p395) 2013/11/12 Released by Harlan Stenn +* Upgrade to autogen-5.18.3pre5 and libopts-40.1.15. +(4.2.7p394) 2013/11/05 Released by Harlan Stenn +* [Bug 1050] Change ONCORE log message for leap second announcement + to avoid misunderstandings. +* [Bug 2499] Win32 user-space/loopback ppsapi provider drops samples. +* [Bug 2256] Improve configure's function searches in libraries. +(4.2.7p393) 2013/10/16 Released by Harlan Stenn +* [Bug 2272] Use C99 integer types. ntp_calendar.h and ntp_types.h . +(4.2.7p392) 2013/10/15 Released by Harlan Stenn +* [Bug 2375] Improve AIX compatibility. +* [Bug 2490] Fixed non-const initializer coming from [Bug 2250] fix. +(4.2.7p391) 2013/10/12 Released by Harlan Stenn +* [Bug 2250] Rework of leap second handling machine. +* [Bug 2419] [rc-nmea] Improve clockstats reporting when receiver sends + data without valid GPS fix. +(4.2.7p390) 2013/09/26 Released by Harlan Stenn +* [Bug 2482] Cleanup of droproot and jail support for Solaris. +(4.2.7p389) 2013/09/24 Released by Harlan Stenn +* [Bug 2473] revisited: NTPD exits after clock is stepped backwards + Avoid possible unsigned underrun for startup condition when testing *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Oct 21 19:08: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 EE84BA1B237; Wed, 21 Oct 2015 19:08:17 +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 BD1B81084; Wed, 21 Oct 2015 19:08:17 +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 t9LJ8GrX073097; Wed, 21 Oct 2015 19:08:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LJ8G7P073096; Wed, 21 Oct 2015 19:08:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510211908.t9LJ8G7P073096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 21 Oct 2015 19:08:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289714 - head/sys/arm64/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, 21 Oct 2015 19:08:18 -0000 Author: emaste Date: Wed Oct 21 19:08:16 2015 New Revision: 289714 URL: https://svnweb.freebsd.org/changeset/base/289714 Log: arm64: Enable CTF for DTrace support Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/conf/GENERIC Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Wed Oct 21 19:06:51 2015 (r289713) +++ head/sys/arm64/conf/GENERIC Wed Oct 21 19:08:16 2015 (r289714) @@ -22,6 +22,7 @@ cpu ARM64 ident GENERIC makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +makeoptions WITH_CTF=1 # Run ctfconvert(1) for DTrace support options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption From owner-svn-src-all@freebsd.org Wed Oct 21 19: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 2A143A1B47F; Wed, 21 Oct 2015 19:16:16 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6C631578; Wed, 21 Oct 2015 19:16:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9LJGED7075960; Wed, 21 Oct 2015 19:16:14 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LJGE5F075957; Wed, 21 Oct 2015 19:16:14 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201510211916.t9LJGE5F075957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 21 Oct 2015 19:16:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289715 - in vendor/ntp/dist: . adjtimed clockstuff html include include/isc kernel kernel/sys libntp libparse ntpd ntpdate ntpdc ntpq ntpsnmpd parseutil ports/winnt/libntp ports/winnt/... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 19:16:16 -0000 Author: glebius Date: Wed Oct 21 19:16:13 2015 New Revision: 289715 URL: https://svnweb.freebsd.org/changeset/base/289715 Log: Merge NTP 4.2.8p4 into dist. Added: vendor/ntp/dist/include/rc_cmdlength.h vendor/ntp/dist/sntp/m4/ntp_problemtests.m4 vendor/ntp/dist/sntp/tests/fileHandlingTest.c vendor/ntp/dist/sntp/tests/run-t-log.c vendor/ntp/dist/sntp/tests/sntptest.c vendor/ntp/dist/sntp/tests/t-log.c vendor/ntp/dist/sntp/unity/auto/parseOutput.rb (contents, props changed) vendor/ntp/dist/sntp/unity/auto/type_sanitizer.rb (contents, props changed) vendor/ntp/dist/sntp/unity/auto/unity_test_summary.py (contents, props changed) vendor/ntp/dist/sntp/unity/unity_config.h vendor/ntp/dist/tests/libntp/lfptest.c vendor/ntp/dist/tests/libntp/sockaddrtest.c vendor/ntp/dist/tests/ntpd/leapsec.c vendor/ntp/dist/tests/ntpd/ntp_prio_q.c vendor/ntp/dist/tests/ntpd/ntp_restrict.c vendor/ntp/dist/tests/ntpd/rc_cmdlength.c vendor/ntp/dist/tests/ntpd/run-leapsec.c vendor/ntp/dist/tests/ntpd/run-ntp_prio_q.c vendor/ntp/dist/tests/ntpd/run-ntp_restrict.c vendor/ntp/dist/tests/ntpd/run-rc_cmdlength.c vendor/ntp/dist/tests/ntpd/run-t-ntp_scanner.c vendor/ntp/dist/tests/ntpd/run-t-ntp_signd.c vendor/ntp/dist/tests/ntpd/t-ntp_scanner.c vendor/ntp/dist/tests/ntpd/t-ntp_signd.c vendor/ntp/dist/tests/ntpq/ vendor/ntp/dist/tests/ntpq/Makefile.am vendor/ntp/dist/tests/ntpq/Makefile.in vendor/ntp/dist/tests/ntpq/run-t-ntpq.c vendor/ntp/dist/tests/ntpq/t-ntpq.c Deleted: vendor/ntp/dist/sntp/libevent/sample/ vendor/ntp/dist/sntp/tests/fileHandlingTest.h vendor/ntp/dist/sntp/tests/g_fileHandlingTest.h vendor/ntp/dist/sntp/tests/g_networking.cpp vendor/ntp/dist/sntp/tests/g_packetHandling.cpp vendor/ntp/dist/sntp/tests/g_packetProcessing.cpp vendor/ntp/dist/sntp/tests/g_sntptest.h vendor/ntp/dist/sntp/tests_main.cpp vendor/ntp/dist/sntp/tests_main.h vendor/ntp/dist/tests/libntp/g_a_md5encrypt.cpp vendor/ntp/dist/tests/libntp/g_atoint.cpp vendor/ntp/dist/tests/libntp/g_atouint.cpp vendor/ntp/dist/tests/libntp/g_authkeys.cpp vendor/ntp/dist/tests/libntp/g_buftvtots.cpp vendor/ntp/dist/tests/libntp/g_calendar.cpp vendor/ntp/dist/tests/libntp/g_caljulian.cpp vendor/ntp/dist/tests/libntp/g_caltontp.cpp vendor/ntp/dist/tests/libntp/g_calyearstart.cpp vendor/ntp/dist/tests/libntp/g_clocktime.cpp vendor/ntp/dist/tests/libntp/g_decodenetnum.cpp vendor/ntp/dist/tests/libntp/g_hextoint.cpp vendor/ntp/dist/tests/libntp/g_hextolfp.cpp vendor/ntp/dist/tests/libntp/g_humandate.cpp vendor/ntp/dist/tests/libntp/g_lfpfunc.cpp vendor/ntp/dist/tests/libntp/g_lfptest.h vendor/ntp/dist/tests/libntp/g_lfptostr.cpp vendor/ntp/dist/tests/libntp/g_libntptest.cpp vendor/ntp/dist/tests/libntp/g_libntptest.h vendor/ntp/dist/tests/libntp/g_modetoa.cpp vendor/ntp/dist/tests/libntp/g_msyslog.cpp vendor/ntp/dist/tests/libntp/g_netof.cpp vendor/ntp/dist/tests/libntp/g_numtoa.cpp vendor/ntp/dist/tests/libntp/g_numtohost.cpp vendor/ntp/dist/tests/libntp/g_octtoint.cpp vendor/ntp/dist/tests/libntp/g_prettydate.cpp vendor/ntp/dist/tests/libntp/g_recvbuff.cpp vendor/ntp/dist/tests/libntp/g_refnumtoa.cpp vendor/ntp/dist/tests/libntp/g_sfptostr.cpp vendor/ntp/dist/tests/libntp/g_sockaddrtest.h vendor/ntp/dist/tests/libntp/g_socktoa.cpp vendor/ntp/dist/tests/libntp/g_ssl_init.cpp vendor/ntp/dist/tests/libntp/g_statestr.cpp vendor/ntp/dist/tests/libntp/g_strtolfp.cpp vendor/ntp/dist/tests/libntp/g_timespecops.cpp vendor/ntp/dist/tests/libntp/g_timestructs.cpp vendor/ntp/dist/tests/libntp/g_timestructs.h vendor/ntp/dist/tests/libntp/g_timevalops.cpp vendor/ntp/dist/tests/libntp/g_tstotv.cpp vendor/ntp/dist/tests/libntp/g_tvtots.cpp vendor/ntp/dist/tests/libntp/g_uglydate.cpp vendor/ntp/dist/tests/libntp/g_vi64ops.cpp vendor/ntp/dist/tests/libntp/g_ymd2yd.cpp vendor/ntp/dist/tests/ntpd/leapsec.cpp vendor/ntp/dist/tests/ntpd/ntpdtest.cpp vendor/ntp/dist/tests/ntpd/ntpdtest.h Modified: vendor/ntp/dist/ChangeLog vendor/ntp/dist/CommitLog vendor/ntp/dist/Makefile.am vendor/ntp/dist/Makefile.in vendor/ntp/dist/NEWS vendor/ntp/dist/aclocal.m4 vendor/ntp/dist/adjtimed/Makefile.in vendor/ntp/dist/adjtimed/adjtimed.c vendor/ntp/dist/clockstuff/Makefile.in vendor/ntp/dist/clockstuff/chutest.c vendor/ntp/dist/clockstuff/propdelay.c vendor/ntp/dist/configure vendor/ntp/dist/configure.ac vendor/ntp/dist/html/decode.html vendor/ntp/dist/html/miscopt.html vendor/ntp/dist/html/stats.html vendor/ntp/dist/include/Makefile.am vendor/ntp/dist/include/Makefile.in vendor/ntp/dist/include/isc/Makefile.in vendor/ntp/dist/include/ntp_assert.h vendor/ntp/dist/include/ntp_calendar.h vendor/ntp/dist/include/ntp_config.h vendor/ntp/dist/include/ntp_control.h vendor/ntp/dist/include/ntp_lists.h vendor/ntp/dist/include/ntp_stdlib.h vendor/ntp/dist/include/ntp_syslog.h vendor/ntp/dist/include/ntp_types.h vendor/ntp/dist/kernel/Makefile.in vendor/ntp/dist/kernel/sys/Makefile.in vendor/ntp/dist/libntp/Makefile.in vendor/ntp/dist/libntp/atolfp.c vendor/ntp/dist/libntp/audio.c vendor/ntp/dist/libntp/authkeys.c vendor/ntp/dist/libntp/authreadkeys.c vendor/ntp/dist/libntp/caljulian.c vendor/ntp/dist/libntp/caltontp.c vendor/ntp/dist/libntp/decodenetnum.c vendor/ntp/dist/libntp/emalloc.c vendor/ntp/dist/libntp/icom.c vendor/ntp/dist/libntp/machines.c vendor/ntp/dist/libntp/msyslog.c vendor/ntp/dist/libntp/ntp_calendar.c vendor/ntp/dist/libntp/ntp_intres.c vendor/ntp/dist/libntp/ntp_lineedit.c vendor/ntp/dist/libntp/ntp_rfc2553.c vendor/ntp/dist/libntp/ntp_worker.c vendor/ntp/dist/libntp/prettydate.c vendor/ntp/dist/libntp/recvbuff.c vendor/ntp/dist/libntp/socket.c vendor/ntp/dist/libntp/socktohost.c vendor/ntp/dist/libntp/statestr.c vendor/ntp/dist/libparse/Makefile.in vendor/ntp/dist/ntpd/Makefile.am vendor/ntp/dist/ntpd/Makefile.in vendor/ntp/dist/ntpd/invoke-ntp.conf.texi vendor/ntp/dist/ntpd/invoke-ntp.keys.texi vendor/ntp/dist/ntpd/invoke-ntpd.texi vendor/ntp/dist/ntpd/ntp.conf.5man vendor/ntp/dist/ntpd/ntp.conf.5mdoc vendor/ntp/dist/ntpd/ntp.conf.def vendor/ntp/dist/ntpd/ntp.conf.html vendor/ntp/dist/ntpd/ntp.conf.man.in vendor/ntp/dist/ntpd/ntp.conf.mdoc.in vendor/ntp/dist/ntpd/ntp.keys.5man vendor/ntp/dist/ntpd/ntp.keys.5mdoc vendor/ntp/dist/ntpd/ntp.keys.html vendor/ntp/dist/ntpd/ntp.keys.man.in vendor/ntp/dist/ntpd/ntp.keys.mdoc.in vendor/ntp/dist/ntpd/ntp_config.c vendor/ntp/dist/ntpd/ntp_control.c vendor/ntp/dist/ntpd/ntp_crypto.c vendor/ntp/dist/ntpd/ntp_io.c vendor/ntp/dist/ntpd/ntp_loopfilter.c vendor/ntp/dist/ntpd/ntp_monitor.c vendor/ntp/dist/ntpd/ntp_parser.c vendor/ntp/dist/ntpd/ntp_parser.h vendor/ntp/dist/ntpd/ntp_parser.y vendor/ntp/dist/ntpd/ntp_peer.c vendor/ntp/dist/ntpd/ntp_proto.c vendor/ntp/dist/ntpd/ntp_refclock.c vendor/ntp/dist/ntpd/ntp_request.c vendor/ntp/dist/ntpd/ntp_restrict.c vendor/ntp/dist/ntpd/ntp_timer.c vendor/ntp/dist/ntpd/ntpd-opts.c vendor/ntp/dist/ntpd/ntpd-opts.def vendor/ntp/dist/ntpd/ntpd-opts.h vendor/ntp/dist/ntpd/ntpd.1ntpdman vendor/ntp/dist/ntpd/ntpd.1ntpdmdoc vendor/ntp/dist/ntpd/ntpd.c vendor/ntp/dist/ntpd/ntpd.html vendor/ntp/dist/ntpd/ntpd.man.in vendor/ntp/dist/ntpd/ntpd.mdoc.in vendor/ntp/dist/ntpd/rc_cmdlength.c vendor/ntp/dist/ntpd/refclock_arc.c vendor/ntp/dist/ntpd/refclock_chu.c vendor/ntp/dist/ntpd/refclock_gpsdjson.c vendor/ntp/dist/ntpd/refclock_local.c vendor/ntp/dist/ntpd/refclock_nmea.c vendor/ntp/dist/ntpd/refclock_palisade.c vendor/ntp/dist/ntpd/refclock_parse.c vendor/ntp/dist/ntpd/refclock_wwv.c vendor/ntp/dist/ntpdate/Makefile.in vendor/ntp/dist/ntpdate/ntpdate.c vendor/ntp/dist/ntpdc/Makefile.in vendor/ntp/dist/ntpdc/invoke-ntpdc.texi vendor/ntp/dist/ntpdc/ntpdc-opts.c vendor/ntp/dist/ntpdc/ntpdc-opts.h vendor/ntp/dist/ntpdc/ntpdc.1ntpdcman vendor/ntp/dist/ntpdc/ntpdc.1ntpdcmdoc vendor/ntp/dist/ntpdc/ntpdc.c vendor/ntp/dist/ntpdc/ntpdc.html vendor/ntp/dist/ntpdc/ntpdc.man.in vendor/ntp/dist/ntpdc/ntpdc.mdoc.in vendor/ntp/dist/ntpq/Makefile.in vendor/ntp/dist/ntpq/invoke-ntpq.texi vendor/ntp/dist/ntpq/libntpq.h vendor/ntp/dist/ntpq/ntpq-opts.c vendor/ntp/dist/ntpq/ntpq-opts.h vendor/ntp/dist/ntpq/ntpq-subs.c vendor/ntp/dist/ntpq/ntpq.1ntpqman vendor/ntp/dist/ntpq/ntpq.1ntpqmdoc vendor/ntp/dist/ntpq/ntpq.c vendor/ntp/dist/ntpq/ntpq.html vendor/ntp/dist/ntpq/ntpq.man.in vendor/ntp/dist/ntpq/ntpq.mdoc.in vendor/ntp/dist/ntpsnmpd/Makefile.in vendor/ntp/dist/ntpsnmpd/invoke-ntpsnmpd.texi vendor/ntp/dist/ntpsnmpd/ntpsnmpd-opts.c vendor/ntp/dist/ntpsnmpd/ntpsnmpd-opts.h vendor/ntp/dist/ntpsnmpd/ntpsnmpd.1ntpsnmpdman vendor/ntp/dist/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc vendor/ntp/dist/ntpsnmpd/ntpsnmpd.html vendor/ntp/dist/ntpsnmpd/ntpsnmpd.man.in vendor/ntp/dist/ntpsnmpd/ntpsnmpd.mdoc.in vendor/ntp/dist/packageinfo.sh vendor/ntp/dist/parseutil/Makefile.in vendor/ntp/dist/ports/winnt/libntp/termios.c vendor/ntp/dist/ports/winnt/ntpd/nt_clockstuff.c vendor/ntp/dist/ports/winnt/ntpd/ntp_iocompletionport.c vendor/ntp/dist/ports/winnt/vs2005/ntpd.vcproj vendor/ntp/dist/ports/winnt/vs2008/ntpd/ntpd.vcproj vendor/ntp/dist/ports/winnt/vs2013/ntpd/ntpd.vcxproj vendor/ntp/dist/ports/winnt/vs2013/ntpd/ntpd.vcxproj.filters vendor/ntp/dist/scripts/Makefile.in vendor/ntp/dist/scripts/build/Makefile.in vendor/ntp/dist/scripts/calc_tickadj/Makefile.in vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.html vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.man.in vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.mdoc.in vendor/ntp/dist/scripts/calc_tickadj/invoke-calc_tickadj.texi vendor/ntp/dist/scripts/invoke-plot_summary.texi vendor/ntp/dist/scripts/invoke-summary.texi vendor/ntp/dist/scripts/lib/Makefile.in vendor/ntp/dist/scripts/lib/NTP/Util.pm vendor/ntp/dist/scripts/ntp-wait/Makefile.in vendor/ntp/dist/scripts/ntp-wait/invoke-ntp-wait.texi vendor/ntp/dist/scripts/ntp-wait/ntp-wait-opts vendor/ntp/dist/scripts/ntp-wait/ntp-wait.1ntp-waitman vendor/ntp/dist/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc vendor/ntp/dist/scripts/ntp-wait/ntp-wait.html vendor/ntp/dist/scripts/ntp-wait/ntp-wait.man.in vendor/ntp/dist/scripts/ntp-wait/ntp-wait.mdoc.in vendor/ntp/dist/scripts/ntpsweep/Makefile.in vendor/ntp/dist/scripts/ntpsweep/invoke-ntpsweep.texi vendor/ntp/dist/scripts/ntpsweep/ntpsweep-opts vendor/ntp/dist/scripts/ntpsweep/ntpsweep.1ntpsweepman vendor/ntp/dist/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc vendor/ntp/dist/scripts/ntpsweep/ntpsweep.html vendor/ntp/dist/scripts/ntpsweep/ntpsweep.in vendor/ntp/dist/scripts/ntpsweep/ntpsweep.man.in vendor/ntp/dist/scripts/ntpsweep/ntpsweep.mdoc.in vendor/ntp/dist/scripts/ntptrace/Makefile.in vendor/ntp/dist/scripts/ntptrace/invoke-ntptrace.texi vendor/ntp/dist/scripts/ntptrace/ntptrace-opts vendor/ntp/dist/scripts/ntptrace/ntptrace.1ntptraceman vendor/ntp/dist/scripts/ntptrace/ntptrace.1ntptracemdoc vendor/ntp/dist/scripts/ntptrace/ntptrace.html vendor/ntp/dist/scripts/ntptrace/ntptrace.man.in vendor/ntp/dist/scripts/ntptrace/ntptrace.mdoc.in vendor/ntp/dist/scripts/plot_summary-opts vendor/ntp/dist/scripts/plot_summary.1plot_summaryman vendor/ntp/dist/scripts/plot_summary.1plot_summarymdoc vendor/ntp/dist/scripts/plot_summary.html vendor/ntp/dist/scripts/plot_summary.man.in vendor/ntp/dist/scripts/plot_summary.mdoc.in vendor/ntp/dist/scripts/summary-opts vendor/ntp/dist/scripts/summary.1summaryman vendor/ntp/dist/scripts/summary.1summarymdoc vendor/ntp/dist/scripts/summary.html vendor/ntp/dist/scripts/summary.man.in vendor/ntp/dist/scripts/summary.mdoc.in vendor/ntp/dist/scripts/update-leap/Makefile.in vendor/ntp/dist/scripts/update-leap/invoke-update-leap.texi vendor/ntp/dist/scripts/update-leap/update-leap-opts vendor/ntp/dist/scripts/update-leap/update-leap.1update-leapman vendor/ntp/dist/scripts/update-leap/update-leap.1update-leapmdoc vendor/ntp/dist/scripts/update-leap/update-leap.html vendor/ntp/dist/scripts/update-leap/update-leap.man.in vendor/ntp/dist/scripts/update-leap/update-leap.mdoc.in vendor/ntp/dist/sntp/Makefile.am vendor/ntp/dist/sntp/Makefile.in vendor/ntp/dist/sntp/configure vendor/ntp/dist/sntp/configure.ac vendor/ntp/dist/sntp/include/Makefile.in vendor/ntp/dist/sntp/include/version.def vendor/ntp/dist/sntp/include/version.texi vendor/ntp/dist/sntp/invoke-sntp.texi vendor/ntp/dist/sntp/libevent/Makefile.am vendor/ntp/dist/sntp/libevent/Makefile.in vendor/ntp/dist/sntp/libevent/test/bench_httpclient.c vendor/ntp/dist/sntp/libevent/test/regress.c vendor/ntp/dist/sntp/libevent/test/regress_dns.c vendor/ntp/dist/sntp/libevent/test/regress_http.c vendor/ntp/dist/sntp/libevent/test/regress_minheap.c vendor/ntp/dist/sntp/libevent/test/test-ratelim.c vendor/ntp/dist/sntp/libevent/test/test-time.c vendor/ntp/dist/sntp/libopts/Makefile.in vendor/ntp/dist/sntp/libopts/compat/pathfind.c vendor/ntp/dist/sntp/log.c vendor/ntp/dist/sntp/log.h vendor/ntp/dist/sntp/m4/ntp_libevent.m4 vendor/ntp/dist/sntp/m4/ntp_libntp.m4 vendor/ntp/dist/sntp/m4/ntp_rlimit.m4 vendor/ntp/dist/sntp/m4/openldap-thread-check.m4 vendor/ntp/dist/sntp/m4/os_cflags.m4 vendor/ntp/dist/sntp/m4/version.m4 vendor/ntp/dist/sntp/networking.c vendor/ntp/dist/sntp/scripts/Makefile.in vendor/ntp/dist/sntp/sntp-opts.c vendor/ntp/dist/sntp/sntp-opts.h vendor/ntp/dist/sntp/sntp.1sntpman vendor/ntp/dist/sntp/sntp.1sntpmdoc vendor/ntp/dist/sntp/sntp.html vendor/ntp/dist/sntp/sntp.man.in vendor/ntp/dist/sntp/sntp.mdoc.in vendor/ntp/dist/sntp/tests/Makefile.am vendor/ntp/dist/sntp/tests/Makefile.in vendor/ntp/dist/sntp/tests/crypto.c vendor/ntp/dist/sntp/tests/fileHandlingTest.h.in vendor/ntp/dist/sntp/tests/keyFile.c vendor/ntp/dist/sntp/tests/kodDatabase.c vendor/ntp/dist/sntp/tests/kodFile.c vendor/ntp/dist/sntp/tests/packetHandling.c vendor/ntp/dist/sntp/tests/packetProcessing.c vendor/ntp/dist/sntp/tests/run-crypto.c vendor/ntp/dist/sntp/tests/run-keyFile.c vendor/ntp/dist/sntp/tests/run-kodDatabase.c vendor/ntp/dist/sntp/tests/run-kodFile.c vendor/ntp/dist/sntp/tests/run-networking.c vendor/ntp/dist/sntp/tests/run-packetHandling.c vendor/ntp/dist/sntp/tests/run-packetProcessing.c vendor/ntp/dist/sntp/tests/run-utilities.c vendor/ntp/dist/sntp/tests/sntptest.h vendor/ntp/dist/sntp/tests/utilities.c vendor/ntp/dist/sntp/unity/Makefile.am vendor/ntp/dist/sntp/unity/Makefile.in vendor/ntp/dist/sntp/unity/auto/generate_test_runner.rb vendor/ntp/dist/sntp/unity/auto/unity_test_summary.rb vendor/ntp/dist/sntp/unity/unity.c vendor/ntp/dist/sntp/unity/unity_internals.h vendor/ntp/dist/sntp/version.c vendor/ntp/dist/tests/Makefile.am vendor/ntp/dist/tests/Makefile.in vendor/ntp/dist/tests/bug-2803/Makefile.am vendor/ntp/dist/tests/bug-2803/Makefile.in vendor/ntp/dist/tests/bug-2803/run-bug-2803.c vendor/ntp/dist/tests/libntp/Makefile.am vendor/ntp/dist/tests/libntp/Makefile.in vendor/ntp/dist/tests/libntp/a_md5encrypt.c vendor/ntp/dist/tests/libntp/atoint.c vendor/ntp/dist/tests/libntp/atouint.c vendor/ntp/dist/tests/libntp/authkeys.c vendor/ntp/dist/tests/libntp/buftvtots.c vendor/ntp/dist/tests/libntp/calendar.c vendor/ntp/dist/tests/libntp/caljulian.c vendor/ntp/dist/tests/libntp/caltontp.c vendor/ntp/dist/tests/libntp/calyearstart.c vendor/ntp/dist/tests/libntp/clocktime.c vendor/ntp/dist/tests/libntp/decodenetnum.c vendor/ntp/dist/tests/libntp/hextoint.c vendor/ntp/dist/tests/libntp/hextolfp.c vendor/ntp/dist/tests/libntp/humandate.c vendor/ntp/dist/tests/libntp/lfpfunc.c vendor/ntp/dist/tests/libntp/lfptest.h vendor/ntp/dist/tests/libntp/lfptostr.c vendor/ntp/dist/tests/libntp/modetoa.c vendor/ntp/dist/tests/libntp/msyslog.c vendor/ntp/dist/tests/libntp/netof.c vendor/ntp/dist/tests/libntp/numtoa.c vendor/ntp/dist/tests/libntp/numtohost.c vendor/ntp/dist/tests/libntp/octtoint.c vendor/ntp/dist/tests/libntp/prettydate.c vendor/ntp/dist/tests/libntp/recvbuff.c vendor/ntp/dist/tests/libntp/refidsmear.c vendor/ntp/dist/tests/libntp/refnumtoa.c vendor/ntp/dist/tests/libntp/run-a_md5encrypt.c vendor/ntp/dist/tests/libntp/run-atoint.c vendor/ntp/dist/tests/libntp/run-atouint.c vendor/ntp/dist/tests/libntp/run-authkeys.c vendor/ntp/dist/tests/libntp/run-buftvtots.c vendor/ntp/dist/tests/libntp/run-calendar.c vendor/ntp/dist/tests/libntp/run-caljulian.c vendor/ntp/dist/tests/libntp/run-caltontp.c vendor/ntp/dist/tests/libntp/run-calyearstart.c vendor/ntp/dist/tests/libntp/run-clocktime.c vendor/ntp/dist/tests/libntp/run-decodenetnum.c vendor/ntp/dist/tests/libntp/run-hextoint.c vendor/ntp/dist/tests/libntp/run-hextolfp.c vendor/ntp/dist/tests/libntp/run-humandate.c vendor/ntp/dist/tests/libntp/run-lfpfunc.c vendor/ntp/dist/tests/libntp/run-lfptostr.c vendor/ntp/dist/tests/libntp/run-modetoa.c vendor/ntp/dist/tests/libntp/run-msyslog.c vendor/ntp/dist/tests/libntp/run-netof.c vendor/ntp/dist/tests/libntp/run-numtoa.c vendor/ntp/dist/tests/libntp/run-numtohost.c vendor/ntp/dist/tests/libntp/run-octtoint.c vendor/ntp/dist/tests/libntp/run-prettydate.c vendor/ntp/dist/tests/libntp/run-recvbuff.c vendor/ntp/dist/tests/libntp/run-refidsmear.c vendor/ntp/dist/tests/libntp/run-refnumtoa.c vendor/ntp/dist/tests/libntp/run-sfptostr.c vendor/ntp/dist/tests/libntp/run-socktoa.c vendor/ntp/dist/tests/libntp/run-ssl_init.c vendor/ntp/dist/tests/libntp/run-statestr.c vendor/ntp/dist/tests/libntp/run-strtolfp.c vendor/ntp/dist/tests/libntp/run-timespecops.c vendor/ntp/dist/tests/libntp/run-timevalops.c vendor/ntp/dist/tests/libntp/run-tstotv.c vendor/ntp/dist/tests/libntp/run-tvtots.c vendor/ntp/dist/tests/libntp/run-uglydate.c vendor/ntp/dist/tests/libntp/run-vi64ops.c vendor/ntp/dist/tests/libntp/run-ymd2yd.c vendor/ntp/dist/tests/libntp/sfptostr.c vendor/ntp/dist/tests/libntp/sockaddrtest.h vendor/ntp/dist/tests/libntp/socktoa.c vendor/ntp/dist/tests/libntp/ssl_init.c vendor/ntp/dist/tests/libntp/statestr.c vendor/ntp/dist/tests/libntp/strtolfp.c vendor/ntp/dist/tests/libntp/test-libntp.c vendor/ntp/dist/tests/libntp/test-libntp.h vendor/ntp/dist/tests/libntp/timespecops.c vendor/ntp/dist/tests/libntp/timevalops.c vendor/ntp/dist/tests/libntp/tstotv.c vendor/ntp/dist/tests/libntp/tvtots.c vendor/ntp/dist/tests/libntp/uglydate.c vendor/ntp/dist/tests/libntp/vi64ops.c vendor/ntp/dist/tests/libntp/ymd2yd.c vendor/ntp/dist/tests/ntpd/Makefile.am vendor/ntp/dist/tests/ntpd/Makefile.in vendor/ntp/dist/tests/sandbox/Makefile.am vendor/ntp/dist/tests/sandbox/Makefile.in vendor/ntp/dist/tests/sandbox/run-modetoa.c vendor/ntp/dist/tests/sandbox/run-uglydate.c vendor/ntp/dist/tests/sandbox/run-ut-2803.c vendor/ntp/dist/tests/sandbox/smeartest.c vendor/ntp/dist/tests/sec-2853/Makefile.am vendor/ntp/dist/tests/sec-2853/Makefile.in vendor/ntp/dist/tests/sec-2853/run-sec-2853.c vendor/ntp/dist/tests/sec-2853/sec-2853.c vendor/ntp/dist/util/Makefile.in vendor/ntp/dist/util/invoke-ntp-keygen.texi vendor/ntp/dist/util/ntp-keygen-opts.c vendor/ntp/dist/util/ntp-keygen-opts.h vendor/ntp/dist/util/ntp-keygen.1ntp-keygenman vendor/ntp/dist/util/ntp-keygen.1ntp-keygenmdoc vendor/ntp/dist/util/ntp-keygen.c vendor/ntp/dist/util/ntp-keygen.html vendor/ntp/dist/util/ntp-keygen.man.in vendor/ntp/dist/util/ntp-keygen.mdoc.in vendor/ntp/dist/util/ntptime.c Modified: vendor/ntp/dist/ChangeLog ============================================================================== --- vendor/ntp/dist/ChangeLog Wed Oct 21 19:08:16 2015 (r289714) +++ vendor/ntp/dist/ChangeLog Wed Oct 21 19:16:13 2015 (r289715) @@ -1,4 +1,159 @@ --- +(4.2.8p4) 2015/10/21 Released by Harlan Stenn +(4.2.8p4-RC1) 2015/10/06 Released by Harlan Stenn + +* [Sec 2899] CVE-2014-9297 perlinger@ntp.org +* [Sec 2901] Drop invalid packet before checking KoD. Check for all KoD's. + Danny Mayer. Log incoming packets that fail TEST2. Harlan Stenn. +* [Sec 2902] configuration directives "pidfile" and "driftfile" + should be local-only. perlinger@ntp.org (patch by Miroslav Lichvar) +* [Sec 2909] added missing call to 'free()' in ntp_crypto.c. perlinger@ntp.org +* [Sec 2913] TALOS-CAN-0052: crash by loop counter underrun. perlinger@ntp.org +* [Sec 2916] TALOS-CAN-0054: memory corruption in password store. JPerlinger +* [Sec 2917] TALOS-CAN-0055: Infinite loop if extended logging enabled and + the logfile and keyfile are the same. perlinger@ntp.org +* [Sec 1918] TALOS-CAN-0062: prevent directory traversal for VMS, too, when + using 'saveconfig' command. perlinger@ntp.org +* [Bug 2919] TALOS-CAN-0063: avoid buffer overrun in ntpq. perlinger@ntp.org +* [Sec 2020] TALOS-CAN-0064: signed/unsiged clash could lead to buffer overun + and memory corruption. perlinger@ntp.org +* [Sec 2921] TALOS-CAN-0065: password length memory corruption. JPerlinger. +* [Sec 2922] decodenetnum() will ASSERT botch instead of returning FAIL + on some bogus values. Harlan Stenn. +* [Sec 2941] NAK to the Future: Symmetric association authentication + bypass via crypto-NAK. Patch applied. perlinger@ntp.org +* [Bug 2332] (reopened) Exercise thread cancellation once before dropping + privileges and limiting resources in NTPD removes the need to link + forcefully against 'libgcc_s' which does not always work. J.Perlinger +* [Bug 2595] ntpdate man page quirks. Hal Murray, Harlan Stenn. +* [Bug 2625] Deprecate flag1 in local refclock. Hal Murray, Harlan Stenn. +* [Bug 2817] Stop locking ntpd into memory by default under Linux. H.Stenn. +* [Bug 2821] minor build issues: fixed refclock_gpsdjson.c. perlinger@ntp.org +* [Bug 2823] ntpsweep with recursive peers option doesn't work. H.Stenn. +* [Bug 2849] Systems with more than one default route may never + synchronize. Brian Utterback. Note that this patch might need to + be reverted once Bug 2043 has been fixed. +* [Bug 2864] 4.2.8p3 fails to compile on Windows. Juergen Perlinger +* [Bug 2866] segmentation fault at initgroups(). Harlan Stenn. +* [Bug 2867] ntpd with autokey active crashed by 'ntpq -crv'. J.Perlinger +* [Bug 2873] libevent should not include .deps/ in the tarball. H.Stenn +* [Bug 2874] Don't distribute generated sntp/tests/fileHandlingTest.h. H.Stenn +* [Bug 2875] sntp/Makefile.am: Get rid of DIST_SUBDIRS. libevent must + be configured for the distribution targets. Harlan Stenn. +* [Bug 2883] ntpd crashes on exit with empty driftfile. Miroslav Lichvar. +* [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org +* [Bug 2888] streamline calendar functions. perlinger@ntp.org +* [Bug 2889] ntp-dev-4.3.67 does not build on Windows. perlinger@ntp.org +* [Bug 2890] Ignore ENOBUFS on routing netlink socket. Konstantin Khlebnikov. +* [Bug 2906] make check needs better support for pthreads. Harlan Stenn. +* [Bug 2907] dist* build targets require our libevent/ to be enabled. HStenn. +* [Bug 2912] no munlockall() under Windows. David Taylor, Harlan Stenn. +* libntp/emalloc.c: Remove explicit include of stdint.h. Harlan Stenn. +* Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn. +* tests/ntpd/g_leapsec.cpp typo fix. Harlan Stenn. +* Phase 1 deprecation of google test in sntp/tests/. Harlan Stenn. +* On some versions of HP-UX, inttypes.h does not include stdint.h. H.Stenn. +* top_srcdir can change based on ntp v. sntp. Harlan Stenn. +* sntp/tests/ function parameter list cleanup. Damir Tomić. +* tests/libntp/ function parameter list cleanup. Damir Tomić. +* tests/ntpd/ function parameter list cleanup. Damir Tomić. +* sntp/unity/unity_config.h: handle stdint.h. Harlan Stenn. +* sntp/unity/unity_internals.h: handle *INTPTR_MAX on old Solaris. H.Stenn. +* tests/libntp/timevalops.c and timespecops.c fixed error printing. D.Tomić. +* tests/libntp/ improvements in code and fixed error printing. Damir Tomić. +* tests/libntp: a_md5encrypt.c, authkeys.c, buftvtots.c, calendar.c, caljulian.c, + caltontp.c, clocktime.c, humandate.c, hextolfp.c, decodenetnum.c - fixed + formatting; first declaration, then code (C90); deleted unnecessary comments; + changed from sprintf to snprintf; fixed order of includes. Tomasz Flendrich +* tests/libntp/lfpfunc.c remove unnecessary include, remove old comments, + fix formatting, cleanup. Tomasz Flendrich +* tests/libntp/lfptostr.c remove unnecessary include, add consts, fix formatting. + Tomasz Flendrich +* tests/libntp/statestr.c remove empty functions, remove unnecessary include, + fix formatting. Tomasz Flendrich +* tests/libntp/modetoa.c fixed formatting. Tomasz Flendrich +* tests/libntp/msyslog.c fixed formatting. Tomasz Flendrich +* tests/libntp/numtoa.c deleted unnecessary empty functions, fixed formatting. + Tomasz Flendrich +* tests/libntp/numtohost.c added const, fixed formatting. Tomasz Flendrich +* tests/libntp/refnumtoa.c fixed formatting. Tomasz Flendrich +* tests/libntp/ssl_init.c fixed formatting. Tomasz Flendrich +* tests/libntp/tvtots.c fixed a bug, fixed formatting. Tomasz Flendrich +* tests/libntp/uglydate.c removed an unnecessary include. Tomasz Flendrich +* tests/libntp/vi64ops.c removed an unnecessary comment, fixed formatting. +* tests/libntp/ymd3yd.c removed an empty function and an unnecessary include, +fixed formatting. Tomasz Flendrich +* tests/libntp/timespecops.c fixed formatting, fixed the order of includes, + removed unnecessary comments, cleanup. Tomasz Flendrich +* tests/libntp/timevalops.c fixed the order of includes, deleted unnecessary + comments, cleanup. Tomasz Flendrich +* tests/libntp/sockaddrtest.h making it agree to NTP's conventions of formatting. + Tomasz Flendrich +* tests/libntp/lfptest.h cleanup. Tomasz Flendrich +* tests/libntp/test-libntp.c fix formatting. Tomasz Flendrich +* sntp/tests/crypto.c is now using proper Unity's assertions, fixed formatting. + Tomasz Flendrich +* sntp/tests/kodDatabase.c added consts, deleted empty function, + fixed formatting. Tomasz Flendrich +* sntp/tests/kodFile.c cleanup, fixed formatting. Tomasz Flendrich +* sntp/tests/packetHandling.c is now using proper Unity's assertions, + fixed formatting, deleted unused variable. Tomasz Flendrich +* sntp/tests/keyFile.c is now using proper Unity's assertions, fixed formatting. + Tomasz Flendrich +* sntp/tests/packetProcessing.c changed from sprintf to snprintf, + fixed formatting. Tomasz Flendrich +* sntp/tests/utilities.c is now using proper Unity's assertions, changed + the order of includes, fixed formatting, removed unnecessary comments. + Tomasz Flendrich +* sntp/tests/sntptest.h fixed formatting. Tomasz Flendrich +* sntp/tests/fileHandlingTest.h.in fixed a possible buffer overflow problem, + made one function do its job, deleted unnecessary prints, fixed formatting. + Tomasz Flendrich +* sntp/unity/Makefile.am added a missing header. Tomasz Flendrich +* sntp/unity/unity_config.h: Distribute it. Harlan Stenn. +* sntp/libevent/evconfig-private.h: remove generated filefrom SCM. H.Stenn. +* sntp/unity/Makefile.am: fix some broken paths. Harlan Stenn. +* sntp/unity/unity.c: Clean up a printf(). Harlan Stenn. +* Phase 1 deprecation of google test in tests/libntp/. Harlan Stenn. +* Don't build sntp/libevent/sample/. Harlan Stenn. +* tests/libntp/test_caltontp needs -lpthread. Harlan Stenn. +* br-flock: --enable-local-libevent. Harlan Stenn. +* Wrote tests for ntpd/ntp_prio_q.c. Tomasz Flendrich +* scripts/lib/NTP/Util.pm: stratum output is version-dependent. Harlan Stenn. +* Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn. +* Code cleanup. Harlan Stenn. +* libntp/icom.c: Typo fix. Harlan Stenn. +* util/ntptime.c: initialization nit. Harlan Stenn. +* ntpd/ntp_peer.c:newpeer(): added a DEBUG_REQUIRE(srcadr). Harlan Stenn. +* Add std_unity_tests to various Makefile.am files. Harlan Stenn. +* ntpd/ntp_restrict.c: added a few assertions, created tests for this file. + Tomasz Flendrich +* Changed progname to be const in many files - now it's consistent. Tomasz + Flendrich +* Typo fix for GCC warning suppression. Harlan Stenn. +* Added tests/ntpd/ntp_scanner.c test. Damir Tomić. +* Added declarations to all Unity tests, and did minor fixes to them. + Reduced the number of warnings by half. Damir Tomić. +* Updated generate_test_runner.rb and updated the sntp/unity/auto directory + with the latest Unity updates from Mark. Damir Tomić. +* Retire google test - phase I. Harlan Stenn. +* Unity test cleanup: move declaration of 'initializing'. Harlan Stenn. +* Update the NEWS file. Harlan Stenn. +* Autoconf cleanup. Harlan Stenn. +* Unit test dist cleanup. Harlan Stenn. +* Cleanup various test Makefile.am files. Harlan Stenn. +* Pthread autoconf macro cleanup. Harlan Stenn. +* Fix progname definition in unity runner scripts. Harlan Stenn. +* Clean trailing whitespace in tests/ntpd/Makefile.am. Harlan Stenn. +* Update the patch for bug 2817. Harlan Stenn. +* More updates for bug 2817. Harlan Stenn. +* Fix bugs in tests/ntpd/ntp_prio_q.c. Harlan Stenn. +* gcc on older HPUX may need +allowdups. Harlan Stenn. +* Adding missing MCAST protection. Harlan Stenn. +* Disable certain test programs on certain platforms. Harlan Stenn. +* Implement --enable-problem-tests (on by default). Harlan Stenn. +* build system tweaks. Harlan Stenn. +--- (4.2.8p3) 2015/06/29 Released by Harlan Stenn * [Sec 2853] Crafted remote config packet can crash some versions of Modified: vendor/ntp/dist/CommitLog ============================================================================== --- vendor/ntp/dist/CommitLog Wed Oct 21 19:08:16 2015 (r289714) +++ vendor/ntp/dist/CommitLog Wed Oct 21 19:16:13 2015 (r289715) @@ -1,3 +1,4916 @@ +ChangeSet@1.3577, 2015-10-21 12:42:02-04:00, stenn@deacon.udel.edu + NTP_4_2_8P4 + TAG: NTP_4_2_8P4 + + ChangeLog@1.1757 +1 -0 + NTP_4_2_8P4 + + ntpd/invoke-ntp.conf.texi@1.193 +1 -1 + NTP_4_2_8P4 + + ntpd/invoke-ntp.keys.texi@1.185 +1 -1 + NTP_4_2_8P4 + + ntpd/invoke-ntpd.texi@1.502 +2 -2 + NTP_4_2_8P4 + + ntpd/ntp.conf.5man@1.227 +3 -3 + NTP_4_2_8P4 + + ntpd/ntp.conf.5mdoc@1.227 +2 -2 + NTP_4_2_8P4 + + ntpd/ntp.conf.html@1.181 +94 -107 + NTP_4_2_8P4 + + ntpd/ntp.conf.man.in@1.227 +3 -3 + NTP_4_2_8P4 + + ntpd/ntp.conf.mdoc.in@1.227 +2 -2 + NTP_4_2_8P4 + + ntpd/ntp.keys.5man@1.219 +2 -2 + NTP_4_2_8P4 + + ntpd/ntp.keys.5mdoc@1.219 +3 -3 + NTP_4_2_8P4 + + ntpd/ntp.keys.html@1.181 +21 -33 + NTP_4_2_8P4 + + ntpd/ntp.keys.man.in@1.219 +2 -2 + NTP_4_2_8P4 + + ntpd/ntp.keys.mdoc.in@1.219 +3 -3 + NTP_4_2_8P4 + + ntpd/ntpd-opts.c@1.524 +245 -245 + NTP_4_2_8P4 + + ntpd/ntpd-opts.h@1.523 +3 -3 + NTP_4_2_8P4 + + ntpd/ntpd.1ntpdman@1.331 +3 -3 + NTP_4_2_8P4 + + ntpd/ntpd.1ntpdmdoc@1.331 +2 -2 + NTP_4_2_8P4 + + ntpd/ntpd.html@1.175 +142 -186 + NTP_4_2_8P4 + + ntpd/ntpd.man.in@1.331 +3 -3 + NTP_4_2_8P4 + + ntpd/ntpd.mdoc.in@1.331 +2 -2 + NTP_4_2_8P4 + + ntpdc/invoke-ntpdc.texi@1.499 +2 -2 + NTP_4_2_8P4 + + ntpdc/ntpdc-opts.c@1.517 +107 -107 + NTP_4_2_8P4 + + ntpdc/ntpdc-opts.h@1.516 +3 -3 + NTP_4_2_8P4 + + ntpdc/ntpdc.1ntpdcman@1.330 +3 -3 + NTP_4_2_8P4 + + ntpdc/ntpdc.1ntpdcmdoc@1.330 +2 -2 + NTP_4_2_8P4 + + ntpdc/ntpdc.html@1.343 +75 -95 + NTP_4_2_8P4 + + ntpdc/ntpdc.man.in@1.330 +3 -3 + NTP_4_2_8P4 + + ntpdc/ntpdc.mdoc.in@1.330 +2 -2 + NTP_4_2_8P4 + + ntpq/invoke-ntpq.texi@1.506 +2 -2 + NTP_4_2_8P4 + + ntpq/ntpq-opts.c@1.523 +106 -106 + NTP_4_2_8P4 + + ntpq/ntpq-opts.h@1.521 +3 -3 + NTP_4_2_8P4 + + ntpq/ntpq.1ntpqman@1.334 +3 -3 + NTP_4_2_8P4 + + ntpq/ntpq.1ntpqmdoc@1.334 +2 -2 + NTP_4_2_8P4 + + ntpq/ntpq.html@1.172 +132 -155 + NTP_4_2_8P4 + + ntpq/ntpq.man.in@1.334 +3 -3 + NTP_4_2_8P4 + + ntpq/ntpq.mdoc.in@1.334 +2 -2 + NTP_4_2_8P4 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.501 +2 -2 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd-opts.c@1.519 +68 -68 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd-opts.h@1.518 +3 -3 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.330 +3 -3 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.330 +2 -2 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd.html@1.170 +10 -14 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd.man.in@1.330 +3 -3 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.330 +2 -2 + NTP_4_2_8P4 + + packageinfo.sh@1.520 +3 -3 + NTP_4_2_8P4 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.91 +3 -3 + NTP_4_2_8P4 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.92 +2 -2 + NTP_4_2_8P4 + + scripts/calc_tickadj/calc_tickadj.html@1.93 +30 -42 + NTP_4_2_8P4 + + scripts/calc_tickadj/calc_tickadj.man.in@1.90 +3 -3 + NTP_4_2_8P4 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.92 +2 -2 + NTP_4_2_8P4 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.95 +1 -1 + NTP_4_2_8P4 + + scripts/invoke-plot_summary.texi@1.112 +2 -2 + NTP_4_2_8P4 + + scripts/invoke-summary.texi@1.112 +2 -2 + NTP_4_2_8P4 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.322 +2 -2 + NTP_4_2_8P4 + + scripts/ntp-wait/ntp-wait-opts@1.58 +2 -2 + NTP_4_2_8P4 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.319 +3 -3 + NTP_4_2_8P4 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.320 +2 -2 + NTP_4_2_8P4 + + scripts/ntp-wait/ntp-wait.html@1.339 +41 -59 + NTP_4_2_8P4 + + scripts/ntp-wait/ntp-wait.man.in@1.319 +3 -3 + NTP_4_2_8P4 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.320 +2 -2 + NTP_4_2_8P4 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.110 +2 -2 + NTP_4_2_8P4 + + scripts/ntpsweep/ntpsweep-opts@1.60 +2 -2 + NTP_4_2_8P4 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.98 +3 -3 + NTP_4_2_8P4 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.98 +2 -2 + NTP_4_2_8P4 + + scripts/ntpsweep/ntpsweep.html@1.111 +46 -57 + NTP_4_2_8P4 + + scripts/ntpsweep/ntpsweep.man.in@1.98 +3 -3 + NTP_4_2_8P4 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.99 +2 -2 + NTP_4_2_8P4 + + scripts/ntptrace/invoke-ntptrace.texi@1.111 +2 -2 + NTP_4_2_8P4 + + scripts/ntptrace/ntptrace-opts@1.60 +2 -2 + NTP_4_2_8P4 + + scripts/ntptrace/ntptrace.1ntptraceman@1.98 +3 -3 + NTP_4_2_8P4 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.99 +2 -2 + NTP_4_2_8P4 + + scripts/ntptrace/ntptrace.html@1.112 +38 -47 + NTP_4_2_8P4 + + scripts/ntptrace/ntptrace.man.in@1.98 +3 -3 + NTP_4_2_8P4 + + scripts/ntptrace/ntptrace.mdoc.in@1.100 +2 -2 + NTP_4_2_8P4 + + scripts/plot_summary-opts@1.60 +2 -2 + NTP_4_2_8P4 + + scripts/plot_summary.1plot_summaryman@1.110 +3 -3 + NTP_4_2_8P4 + + scripts/plot_summary.1plot_summarymdoc@1.110 +2 -2 + NTP_4_2_8P4 + + scripts/plot_summary.html@1.113 +40 -58 + NTP_4_2_8P4 + + scripts/plot_summary.man.in@1.110 +3 -3 + NTP_4_2_8P4 + + scripts/plot_summary.mdoc.in@1.110 +2 -2 + NTP_4_2_8P4 + + scripts/summary-opts@1.60 +2 -2 + NTP_4_2_8P4 + + scripts/summary.1summaryman@1.110 +3 -3 + NTP_4_2_8P4 + + scripts/summary.1summarymdoc@1.110 +2 -2 + NTP_4_2_8P4 + + scripts/summary.html@1.113 +37 -49 + NTP_4_2_8P4 + + scripts/summary.man.in@1.110 +3 -3 + NTP_4_2_8P4 + + scripts/summary.mdoc.in@1.110 +2 -2 + NTP_4_2_8P4 + + scripts/update-leap/invoke-update-leap.texi@1.11 +1 -1 + NTP_4_2_8P4 + + scripts/update-leap/update-leap-opts@1.11 +2 -2 + NTP_4_2_8P4 + + scripts/update-leap/update-leap.1update-leapman@1.11 +3 -3 + NTP_4_2_8P4 + + scripts/update-leap/update-leap.1update-leapmdoc@1.11 +2 -2 + NTP_4_2_8P4 + + scripts/update-leap/update-leap.html@1.11 +48 -72 + NTP_4_2_8P4 + + scripts/update-leap/update-leap.man.in@1.11 +3 -3 + NTP_4_2_8P4 + + scripts/update-leap/update-leap.mdoc.in@1.11 +2 -2 + NTP_4_2_8P4 + + sntp/invoke-sntp.texi@1.499 +2 -2 + NTP_4_2_8P4 + + sntp/sntp-opts.c@1.518 +159 -159 + NTP_4_2_8P4 + + sntp/sntp-opts.h@1.516 +3 -3 + NTP_4_2_8P4 + + sntp/sntp.1sntpman@1.334 +3 -3 + NTP_4_2_8P4 + + sntp/sntp.1sntpmdoc@1.334 +2 -2 + NTP_4_2_8P4 + + sntp/sntp.html@1.514 +111 -135 + NTP_4_2_8P4 + + sntp/sntp.man.in@1.334 +3 -3 + NTP_4_2_8P4 + + sntp/sntp.mdoc.in@1.334 +2 -2 + NTP_4_2_8P4 + + util/invoke-ntp-keygen.texi@1.502 +2 -2 + NTP_4_2_8P4 + + util/ntp-keygen-opts.c@1.520 +173 -173 + NTP_4_2_8P4 + + util/ntp-keygen-opts.h@1.518 +3 -3 + NTP_4_2_8P4 + + util/ntp-keygen.1ntp-keygenman@1.330 +3 -3 + NTP_4_2_8P4 + + util/ntp-keygen.1ntp-keygenmdoc@1.330 +2 -2 + NTP_4_2_8P4 + + util/ntp-keygen.html@1.176 +157 -216 + NTP_4_2_8P4 + + util/ntp-keygen.man.in@1.330 +3 -3 + NTP_4_2_8P4 + + util/ntp-keygen.mdoc.in@1.330 +2 -2 + NTP_4_2_8P4 + +ChangeSet@1.3576, 2015-10-21 11:58:26-04:00, stenn@deacon.udel.edu + 4.2.8p4 + + packageinfo.sh@1.519 +1 -1 + 4.2.8p4 + +ChangeSet@1.3575, 2015-10-21 15:35:31+00:00, stenn@psp-deb1.ntp.org + Update severity information + + NEWS@1.150 +2 -2 + Update severity information + +ChangeSet@1.3574, 2015-10-20 08:00:43+00:00, stenn@psp-deb1.ntp.org + Update CVEs + + NEWS@1.149 +16 -16 + Update CVEs + +ChangeSet@1.3573, 2015-10-17 06:28:49+00:00, stenn@psp-deb1.ntp.org + ntp-4.2.8p4-sec-RC2 + + NEWS@1.148 +336 -4 + ntp-4.2.8p4-sec-RC2 + + ntpd/invoke-ntp.conf.texi@1.192 +1 -1 + ntp-4.2.8p4-sec-RC2 + + ntpd/invoke-ntp.keys.texi@1.184 +1 -1 + ntp-4.2.8p4-sec-RC2 + + ntpd/invoke-ntpd.texi@1.501 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.conf.5man@1.226 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.conf.5mdoc@1.226 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.conf.html@1.180 +107 -94 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.conf.man.in@1.226 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.conf.mdoc.in@1.226 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.keys.5man@1.218 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.keys.5mdoc@1.218 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.keys.html@1.180 +33 -21 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.keys.man.in@1.218 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.keys.mdoc.in@1.218 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd-opts.c@1.523 +245 -245 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd-opts.h@1.522 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd.1ntpdman@1.330 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd.1ntpdmdoc@1.330 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd.html@1.174 +186 -142 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd.man.in@1.330 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd.mdoc.in@1.330 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpdc/invoke-ntpdc.texi@1.498 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc-opts.c@1.516 +107 -107 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc-opts.h@1.515 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc.1ntpdcman@1.329 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc.1ntpdcmdoc@1.329 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc.html@1.342 +95 -75 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc.man.in@1.329 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc.mdoc.in@1.329 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpq/invoke-ntpq.texi@1.505 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq-opts.c@1.522 +106 -106 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq-opts.h@1.520 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq.1ntpqman@1.333 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq.1ntpqmdoc@1.333 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq.html@1.171 +155 -132 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq.man.in@1.333 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq.mdoc.in@1.333 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.500 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd-opts.c@1.518 +68 -68 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd-opts.h@1.517 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.329 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.329 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd.html@1.169 +14 -10 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd.man.in@1.329 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.329 +2 -2 + ntp-4.2.8p4-sec-RC2 + + packageinfo.sh@1.518 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.90 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.91 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/calc_tickadj/calc_tickadj.html@1.92 +42 -30 + ntp-4.2.8p4-sec-RC2 + + scripts/calc_tickadj/calc_tickadj.man.in@1.89 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.91 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.94 +1 -1 + ntp-4.2.8p4-sec-RC2 + + scripts/invoke-plot_summary.texi@1.111 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/invoke-summary.texi@1.111 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.321 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/ntp-wait-opts@1.57 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.318 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.319 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/ntp-wait.html@1.338 +59 -41 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/ntp-wait.man.in@1.318 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.319 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.109 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/ntpsweep-opts@1.59 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.97 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.97 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/ntpsweep.html@1.110 +57 -46 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/ntpsweep.man.in@1.97 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.98 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/invoke-ntptrace.texi@1.110 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/ntptrace-opts@1.59 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/ntptrace.1ntptraceman@1.97 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.98 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/ntptrace.html@1.111 +47 -38 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/ntptrace.man.in@1.97 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/ntptrace.mdoc.in@1.99 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/plot_summary-opts@1.59 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/plot_summary.1plot_summaryman@1.109 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/plot_summary.1plot_summarymdoc@1.109 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/plot_summary.html@1.112 +58 -40 + ntp-4.2.8p4-sec-RC2 + + scripts/plot_summary.man.in@1.109 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/plot_summary.mdoc.in@1.109 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/summary-opts@1.59 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/summary.1summaryman@1.109 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/summary.1summarymdoc@1.109 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/summary.html@1.112 +49 -37 + ntp-4.2.8p4-sec-RC2 + + scripts/summary.man.in@1.109 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/summary.mdoc.in@1.109 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/invoke-update-leap.texi@1.10 +1 -1 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/update-leap-opts@1.10 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/update-leap.1update-leapman@1.10 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/update-leap.1update-leapmdoc@1.10 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/update-leap.html@1.10 +72 -48 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/update-leap.man.in@1.10 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/update-leap.mdoc.in@1.10 +2 -2 + ntp-4.2.8p4-sec-RC2 + + sntp/invoke-sntp.texi@1.498 +2 -2 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp-opts.c@1.517 +159 -159 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp-opts.h@1.515 +3 -3 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp.1sntpman@1.333 +3 -3 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp.1sntpmdoc@1.333 +2 -2 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp.html@1.513 +135 -111 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp.man.in@1.333 +3 -3 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp.mdoc.in@1.333 +2 -2 + ntp-4.2.8p4-sec-RC2 + + util/invoke-ntp-keygen.texi@1.501 +2 -2 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen-opts.c@1.519 +173 -173 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen-opts.h@1.517 +3 -3 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen.1ntp-keygenman@1.329 +3 -3 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen.1ntp-keygenmdoc@1.329 +2 -2 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen.html@1.175 +216 -157 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen.man.in@1.329 +3 -3 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen.mdoc.in@1.329 +2 -2 + ntp-4.2.8p4-sec-RC2 + +ChangeSet@1.3572, 2015-10-17 03:10:01+00:00, stenn@psp-deb1.ntp.org + cleanup + + ChangeLog@1.1756 +1 -5 + cleanup + +ChangeSet@1.3571, 2015-10-17 01:39:22+00:00, stenn@psp-deb1.ntp.org + [Sec 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK + + ChangeLog@1.1755 +4 -1 + [Sec 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK + +ChangeSet@1.3558.3.3, 2015-10-11 08:10:20+02:00, jnperlin@hydra.localnet + [Bug 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK + + ChangeLog@1.1743.3.3 +3 -0 + [Bug 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK + + ntpd/ntp_proto.c@1.364.1.1 +18 -0 + [Bug 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK + +ChangeSet@1.3558.3.2, 2015-10-06 06:25:48-04:00, stenn@deacon.udel.edu + NTP_4_2_8P4_RC1 + TAG: NTP_4_2_8P4_RC1 + + ChangeLog@1.1743.3.2 +1 -0 + NTP_4_2_8P4_RC1 + + ntpd/invoke-ntp.conf.texi@1.191 +1 -1 + NTP_4_2_8P4_RC1 + + ntpd/invoke-ntp.keys.texi@1.183 +1 -1 + NTP_4_2_8P4_RC1 + + ntpd/invoke-ntpd.texi@1.500 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntp.conf.5man@1.225 +3 -3 + NTP_4_2_8P4_RC1 + + ntpd/ntp.conf.5mdoc@1.225 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntp.conf.html@1.179 +1196 -1524 + NTP_4_2_8P4_RC1 + + ntpd/ntp.conf.man.in@1.225 +3 -3 + NTP_4_2_8P4_RC1 + + ntpd/ntp.conf.mdoc.in@1.225 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntp.keys.5man@1.217 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntp.keys.5mdoc@1.217 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntp.keys.html@1.179 +1 -1 + NTP_4_2_8P4_RC1 + + ntpd/ntp.keys.man.in@1.217 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntp.keys.mdoc.in@1.217 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntpd-opts.c@1.522 +245 -245 + NTP_4_2_8P4_RC1 + + ntpd/ntpd-opts.h@1.521 +3 -3 + NTP_4_2_8P4_RC1 + + ntpd/ntpd.1ntpdman@1.329 +8 -4 + NTP_4_2_8P4_RC1 + + ntpd/ntpd.1ntpdmdoc@1.329 +7 -3 + NTP_4_2_8P4_RC1 + + ntpd/ntpd.html@1.173 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntpd.man.in@1.329 +8 -4 + NTP_4_2_8P4_RC1 + + ntpd/ntpd.mdoc.in@1.329 +7 -3 + NTP_4_2_8P4_RC1 + + ntpdc/invoke-ntpdc.texi@1.497 +2 -2 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc-opts.c@1.515 +107 -107 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc-opts.h@1.514 +3 -3 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc.1ntpdcman@1.328 +3 -3 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc.1ntpdcmdoc@1.328 +2 -2 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc.html@1.341 +2 -2 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc.man.in@1.328 +3 -3 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc.mdoc.in@1.328 +2 -2 + NTP_4_2_8P4_RC1 + + ntpq/invoke-ntpq.texi@1.504 +2 -2 + NTP_4_2_8P4_RC1 + + ntpq/ntpq-opts.c@1.521 +106 -106 + NTP_4_2_8P4_RC1 + + ntpq/ntpq-opts.h@1.519 +3 -3 + NTP_4_2_8P4_RC1 + + ntpq/ntpq.1ntpqman@1.332 +3 -3 + NTP_4_2_8P4_RC1 + + ntpq/ntpq.1ntpqmdoc@1.332 +2 -2 + NTP_4_2_8P4_RC1 + + ntpq/ntpq.html@1.170 +2 -2 + NTP_4_2_8P4_RC1 + + ntpq/ntpq.man.in@1.332 +3 -3 + NTP_4_2_8P4_RC1 + + ntpq/ntpq.mdoc.in@1.332 +2 -2 + NTP_4_2_8P4_RC1 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.499 +2 -2 + NTP_4_2_8P4_RC1 + + ntpsnmpd/ntpsnmpd-opts.c@1.517 +68 -68 + NTP_4_2_8P4_RC1 + + ntpsnmpd/ntpsnmpd-opts.h@1.516 +3 -3 + NTP_4_2_8P4_RC1 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.328 +3 -3 + NTP_4_2_8P4_RC1 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.328 +2 -2 + NTP_4_2_8P4_RC1 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Oct 21 19:16: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 C7913A1B4C6; Wed, 21 Oct 2015 19:16:49 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-ig0-x236.google.com (mail-ig0-x236.google.com [IPv6:2607:f8b0:4001:c05::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 94C9217C7; Wed, 21 Oct 2015 19:16:49 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by igbhv6 with SMTP id hv6so45019731igb.0; Wed, 21 Oct 2015 12:16:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=uI94NHpH8r+QGjxiRjHzy+DpZp3H3s8VlWCMHy92ruw=; b=SB7xpXNQEhGQvp49tB3eX3kAkcv3Ll3T+Z146FYOF0TaDLZdm8CJTsQX3RmfkzPXcs tC1ZeUiN5e4ZmvtHMNQa2j2hZjB1+bNkQRTBh0CLkj7mmpMl+CG1Npo8liH7GPVEE6rd HD1yvSZlBuQAgJP/vrpgooA9U8HJ7JSg5PIicn8XOcamNMoEsaxaZtL6JiMBopEUxnzb 7oa8/+p3ye+Zt8D+EOBHW0EKfo+L00RoqtzV0LzjFPT6FShqj2D/4Gr4i38lzbpUCMhj 93f3IA8V5khuaFKP9l7duuYNHYH7moVaYnZ8LBDGdpkP7BHTq4/Zje7YKviDAd6xMXrw OCTg== X-Received: by 10.50.117.5 with SMTP id ka5mr5227721igb.58.1445455008919; Wed, 21 Oct 2015 12:16:48 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.158.75 with HTTP; Wed, 21 Oct 2015 12:16:29 -0700 (PDT) In-Reply-To: <201510211830.t9LIUgWt061526@repo.freebsd.org> References: <201510211830.t9LIUgWt061526@repo.freebsd.org> From: Ed Maste Date: Wed, 21 Oct 2015 15:16:29 -0400 X-Google-Sender-Auth: rGZnBNGSInLYOIH34IRr1mjntM4 Message-ID: Subject: Re: svn commit: r289710 - in head/sys/modules: i2c/iicbb uart To: "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: Wed, 21 Oct 2015 19:16:49 -0000 On 21 October 2015 at 14:30, Ed Maste wrote: > Author: emaste > Date: Wed Oct 21 18:30:42 2015 > New Revision: 289710 > URL: https://svnweb.freebsd.org/changeset/base/289710 > > Log: > Build ofw_bus_if.h for modules that need it on arm64 Module Makefile build rules for ofw_bus_if.h are a bit of a mess; some modules build it unconditionally while others build it only on certain archs. There are a large number of different combinations of sparc64, mips, powerpc, arm, and aarch64. This is true for a number of other arch-specific module Makefile support. Should we have MK_* knobs to control these cases -- e.g. MK_OFW (MK_FDT?) here? That would at least move the arch-specific tests to a common location. From owner-svn-src-all@freebsd.org Wed Oct 21 19:24: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 22AE6A1B7BC; Wed, 21 Oct 2015 19:24:22 +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 CB3F31CB5; Wed, 21 Oct 2015 19:24:21 +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 t9LJOKRv078835; Wed, 21 Oct 2015 19:24:20 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LJOKk1078834; Wed, 21 Oct 2015 19:24:20 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510211924.t9LJOKk1078834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Oct 2015 19:24:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289716 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 19:24:22 -0000 Author: ian Date: Wed Oct 21 19:24:20 2015 New Revision: 289716 URL: https://svnweb.freebsd.org/changeset/base/289716 Log: Treat mbufs as cacheline-aligned. Even when the transfer begins at an offset within the buffer to align the L3 headers we know the buffer itself was allocated and sized on cacheline boundaries and we don't need to preserve partitial cachelines at the start and end of the buffer when doing busdma sync operations. Modified: head/sys/mips/mips/busdma_machdep.c Modified: head/sys/mips/mips/busdma_machdep.c ============================================================================== --- head/sys/mips/mips/busdma_machdep.c Wed Oct 21 19:16:13 2015 (r289715) +++ head/sys/mips/mips/busdma_machdep.c Wed Oct 21 19:24:20 2015 (r289716) @@ -951,6 +951,8 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm if (segs == NULL) segs = dmat->segments; + if ((flags & BUS_DMA_LOAD_MBUF) != 0) + map->flags |= DMAMAP_CACHE_ALIGNED; if ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) { _bus_dmamap_count_pages(dmat, map, pmap, buf, buflen, flags); @@ -1071,10 +1073,16 @@ bus_dmamap_sync_buf(vm_offset_t buf, int * prevent a data loss we save these chunks in temporary buffer * before invalidation and restore them afer it. * - * If the aligned flag is set the buffer came from our allocator caches - * which are always sized and aligned to cacheline boundaries, so we can - * skip preserving nearby data if a transfer is unaligned (especially - * it's likely to not end on a boundary). + * If the aligned flag is set the buffer is either an mbuf or came from + * our allocator caches. In both cases they are always sized and + * aligned to cacheline boundaries, so we can skip preserving nearby + * data if a transfer appears to overlap cachelines. An mbuf in + * particular will usually appear to be overlapped because of offsetting + * within the buffer to align the L3 headers, but we know that the bytes + * preceeding that offset are part of the same mbuf memory and are not + * unrelated adjacent data (and a rule of mbuf handling is that the cpu + * is not allowed to touch the mbuf while dma is in progress, including + * header fields). */ if (aligned) { size_cl = 0; From owner-svn-src-all@freebsd.org Wed Oct 21 19:44: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 3996CA1BC08; Wed, 21 Oct 2015 19:44:22 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9CE686B; Wed, 21 Oct 2015 19:44:21 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9LJiLuV084514; Wed, 21 Oct 2015 19:44:21 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LJiKrj084513; Wed, 21 Oct 2015 19:44:20 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201510211944.t9LJiKrj084513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Wed, 21 Oct 2015 19:44:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289717 - 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: Wed, 21 Oct 2015 19:44:22 -0000 Author: jah Date: Wed Oct 21 19:44:20 2015 New Revision: 289717 URL: https://svnweb.freebsd.org/changeset/base/289717 Log: Use pmap_quick* functions in arm64 busdma to make bounce buffer synchronization more flexible and avoid borrowing UVAs for userspace buffers. This is mostly equivalent to r286785 and r286787 for x86. Differential Revision: https://reviews.freebsd.org/D3870 Modified: head/sys/arm64/arm64/busdma_bounce.c Modified: head/sys/arm64/arm64/busdma_bounce.c ============================================================================== --- head/sys/arm64/arm64/busdma_bounce.c Wed Oct 21 19:24:20 2015 (r289716) +++ head/sys/arm64/arm64/busdma_bounce.c Wed Oct 21 19:44:20 2015 (r289717) @@ -78,7 +78,8 @@ struct bounce_page { vm_offset_t vaddr; /* kva of bounce buffer */ bus_addr_t busaddr; /* Physical address */ vm_offset_t datavaddr; /* kva of client data */ - bus_addr_t dataaddr; /* client physical address */ + vm_page_t datapage; /* physical page of client data */ + vm_offset_t dataoffs; /* page offset of client data */ bus_size_t datacount; /* client data count */ STAILQ_ENTRY(bounce_page) links; }; @@ -478,7 +479,8 @@ _bus_dmamap_count_phys(bus_dma_tag_t dma while (buflen != 0) { sgsize = MIN(buflen, dmat->common.maxsegsz); if (bus_dma_run_filter(&dmat->common, curaddr)) { - sgsize = MIN(sgsize, PAGE_SIZE); + sgsize = MIN(sgsize, + PAGE_SIZE - (curaddr & PAGE_MASK)); map->pagesneeded++; } curaddr += sgsize; @@ -632,7 +634,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_ if (((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) && map->pagesneeded != 0 && bus_dma_run_filter(&dmat->common, curaddr)) { - sgsize = MIN(sgsize, PAGE_SIZE); + sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK)); curaddr = add_bounce_page(dmat, map, 0, curaddr, sgsize); } @@ -661,7 +663,7 @@ bounce_bus_dmamap_load_buffer(bus_dma_ta { bus_size_t sgsize, max_sgsize; bus_addr_t curaddr; - vm_offset_t vaddr; + vm_offset_t kvaddr, vaddr; int error; if (map == NULL) @@ -684,22 +686,25 @@ bounce_bus_dmamap_load_buffer(bus_dma_ta /* * Get the physical address for this segment. */ - if (pmap == kernel_pmap) + if (pmap == kernel_pmap) { curaddr = pmap_kextract(vaddr); - else + kvaddr = vaddr; + } else { curaddr = pmap_extract(pmap, vaddr); + kvaddr = 0; + } /* * Compute the segment size, and adjust counts. */ max_sgsize = MIN(buflen, dmat->common.maxsegsz); - sgsize = PAGE_SIZE - ((vm_offset_t)curaddr & PAGE_MASK); + sgsize = PAGE_SIZE - (curaddr & PAGE_MASK); if (((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) && map->pagesneeded != 0 && bus_dma_run_filter(&dmat->common, curaddr)) { sgsize = roundup2(sgsize, dmat->common.alignment); sgsize = MIN(sgsize, max_sgsize); - curaddr = add_bounce_page(dmat, map, vaddr, curaddr, + curaddr = add_bounce_page(dmat, map, kvaddr, curaddr, sgsize); } else { sgsize = MIN(sgsize, max_sgsize); @@ -760,6 +765,10 @@ bounce_bus_dmamap_sync(bus_dma_tag_t dma bus_dmasync_op_t op) { struct bounce_page *bpage; + vm_offset_t datavaddr, tempvaddr; + + if ((bpage = STAILQ_FIRST(&map->bpages)) == NULL) + return; /* * XXX ARM64TODO: @@ -768,47 +777,47 @@ bounce_bus_dmamap_sync(bus_dma_tag_t dma * added to this function. */ - if ((bpage = STAILQ_FIRST(&map->bpages)) != NULL) { - /* - * Handle data bouncing. We might also - * want to add support for invalidating - * the caches on broken hardware - */ - CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x op 0x%x " - "performing bounce", __func__, dmat, - dmat->common.flags, op); - - if ((op & BUS_DMASYNC_PREWRITE) != 0) { - while (bpage != NULL) { - if (bpage->datavaddr != 0) { - bcopy((void *)bpage->datavaddr, - (void *)bpage->vaddr, - bpage->datacount); - } else { - physcopyout(bpage->dataaddr, - (void *)bpage->vaddr, - bpage->datacount); - } - bpage = STAILQ_NEXT(bpage, links); + CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x op 0x%x " + "performing bounce", __func__, dmat, dmat->common.flags, op); + + if ((op & BUS_DMASYNC_PREWRITE) != 0) { + while (bpage != NULL) { + tempvaddr = 0; + datavaddr = bpage->datavaddr; + if (datavaddr == 0) { + tempvaddr = + pmap_quick_enter_page(bpage->datapage); + datavaddr = tempvaddr | bpage->dataoffs; } - dmat->bounce_zone->total_bounced++; - } - if ((op & BUS_DMASYNC_POSTREAD) != 0) { - while (bpage != NULL) { - if (bpage->datavaddr != 0) { - bcopy((void *)bpage->vaddr, - (void *)bpage->datavaddr, - bpage->datacount); - } else { - physcopyin((void *)bpage->vaddr, - bpage->dataaddr, - bpage->datacount); - } - bpage = STAILQ_NEXT(bpage, links); + bcopy((void *)datavaddr, + (void *)bpage->vaddr, bpage->datacount); + + if (tempvaddr != 0) + pmap_quick_remove_page(tempvaddr); + bpage = STAILQ_NEXT(bpage, links); + } + dmat->bounce_zone->total_bounced++; + } + + if ((op & BUS_DMASYNC_POSTREAD) != 0) { + while (bpage != NULL) { + tempvaddr = 0; + datavaddr = bpage->datavaddr; + if (datavaddr == 0) { + tempvaddr = + pmap_quick_enter_page(bpage->datapage); + datavaddr = tempvaddr | bpage->dataoffs; } - dmat->bounce_zone->total_bounced++; + + bcopy((void *)bpage->vaddr, + (void *)datavaddr, bpage->datacount); + + if (tempvaddr != 0) + pmap_quick_remove_page(tempvaddr); + bpage = STAILQ_NEXT(bpage, links); } + dmat->bounce_zone->total_bounced++; } } @@ -1000,7 +1009,9 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ bpage->busaddr |= addr & PAGE_MASK; } bpage->datavaddr = vaddr; - bpage->dataaddr = addr; + /* PHYS_TO_VM_PAGE() will truncate unaligned addresses. */ + bpage->datapage = PHYS_TO_VM_PAGE(addr); + bpage->dataoffs = addr & PAGE_MASK; bpage->datacount = size; STAILQ_INSERT_TAIL(&(map->bpages), bpage, links); return (bpage->busaddr); From owner-svn-src-all@freebsd.org Wed Oct 21 19:56: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 847EFA1BEBE; Wed, 21 Oct 2015 19:56:17 +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 4C5A9EB7; Wed, 21 Oct 2015 19:56:17 +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 t9LJuGDY087941; Wed, 21 Oct 2015 19:56:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LJuG0n087940; Wed, 21 Oct 2015 19:56:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510211956.t9LJuG0n087940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 21 Oct 2015 19:56:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289718 - 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, 21 Oct 2015 19:56:17 -0000 Author: emaste Date: Wed Oct 21 19:56:16 2015 New Revision: 289718 URL: https://svnweb.freebsd.org/changeset/base/289718 Log: if_tap: correct typo in sysctl description (Enably) Sponsored by: The FreeBSD Foundation Modified: head/sys/net/if_tap.c Modified: head/sys/net/if_tap.c ============================================================================== --- head/sys/net/if_tap.c Wed Oct 21 19:44:20 2015 (r289717) +++ head/sys/net/if_tap.c Wed Oct 21 19:56:16 2015 (r289718) @@ -171,7 +171,7 @@ SYSCTL_INT(_net_link_tap, OID_AUTO, user SYSCTL_INT(_net_link_tap, OID_AUTO, up_on_open, CTLFLAG_RW, &tapuponopen, 0, "Bring interface up when /dev/tap is opened"); SYSCTL_INT(_net_link_tap, OID_AUTO, devfs_cloning, CTLFLAG_RWTUN, &tapdclone, 0, - "Enably legacy devfs interface creation"); + "Enable legacy devfs interface creation"); SYSCTL_INT(_net_link_tap, OID_AUTO, debug, CTLFLAG_RW, &tapdebug, 0, ""); DEV_MODULE(if_tap, tapmodevent, NULL); From owner-svn-src-all@freebsd.org Wed Oct 21 20:49: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 3DF93A1BE0C; Wed, 21 Oct 2015 20:49:47 +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 0CCDC1144; Wed, 21 Oct 2015 20:49:46 +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 t9LKnk4B002446; Wed, 21 Oct 2015 20:49:46 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LKnkkj002445; Wed, 21 Oct 2015 20:49:46 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510212049.t9LKnkkj002445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 21 Oct 2015 20:49:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289719 - 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: Wed, 21 Oct 2015 20:49:47 -0000 Author: jhb Date: Wed Oct 21 20:49:45 2015 New Revision: 289719 URL: https://svnweb.freebsd.org/changeset/base/289719 Log: i915_gem_do_execbuffer() holds the pages backing each relocation region for various reasons while executing user commands. After these commands are completed, the pages backing the relocation regions are unheld. Since relocation regions do not have to be page aligned, the code in validate_exec_list() allocates 2 extra page pointers in the array of held pages populated by vm_fault_quick_hold_pages(). However, the cleanup code that unheld the pages always assumed that only the buffer size / PAGE_SIZE pages were used. This meant that non-page aligned buffers would not unheld the last 1 or 2 pages in the list. Fix this by saving the number of held pages returned by vm_fault_quick_hold_pages() for each relocation region and using this count during cleanup. Reviewed by: dumbbell, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D3965 Modified: head/sys/dev/drm2/i915/i915_gem_execbuffer.c Modified: head/sys/dev/drm2/i915/i915_gem_execbuffer.c ============================================================================== --- head/sys/dev/drm2/i915/i915_gem_execbuffer.c Wed Oct 21 19:56:16 2015 (r289718) +++ head/sys/dev/drm2/i915/i915_gem_execbuffer.c Wed Oct 21 20:49:45 2015 (r289719) @@ -941,13 +941,15 @@ i915_gem_check_execbuffer(struct drm_i91 static int validate_exec_list(struct drm_i915_gem_exec_object2 *exec, int count, - vm_page_t ***map) + vm_page_t ***map, int **maplen) { vm_page_t *ma; int i, length, page_count; /* XXXKIB various limits checking is missing there */ *map = malloc(count * sizeof(*ma), DRM_I915_GEM, M_WAITOK | M_ZERO); + *maplen = malloc(count * sizeof(*maplen), DRM_I915_GEM, M_WAITOK | + M_ZERO); for (i = 0; i < count; i++) { /* First check for malicious input causing overflow */ if (exec[i].relocation_count > @@ -969,9 +971,10 @@ validate_exec_list(struct drm_i915_gem_e page_count = howmany(length, PAGE_SIZE) + 2; ma = (*map)[i] = malloc(page_count * sizeof(vm_page_t), DRM_I915_GEM, M_WAITOK | M_ZERO); - if (vm_fault_quick_hold_pages(&curproc->p_vmspace->vm_map, - exec[i].relocs_ptr, length, VM_PROT_READ | VM_PROT_WRITE, - ma, page_count) == -1) { + (*maplen)[i] = vm_fault_quick_hold_pages( + &curproc->p_vmspace->vm_map, exec[i].relocs_ptr, length, + VM_PROT_READ | VM_PROT_WRITE, ma, page_count); + if ((*maplen)[i] == -1) { free(ma, DRM_I915_GEM); (*map)[i] = NULL; return (-EFAULT); @@ -1123,6 +1126,7 @@ i915_gem_do_execbuffer(struct drm_device struct drm_clip_rect *cliprects = NULL; struct intel_ring_buffer *ring; vm_page_t **relocs_ma; + int *relocs_len; u32 ctx_id = i915_execbuffer2_get_context_id(*args); u32 exec_start, exec_len; u32 seqno; @@ -1137,7 +1141,8 @@ i915_gem_do_execbuffer(struct drm_device if (args->batch_len == 0) return (0); - ret = validate_exec_list(exec, args->buffer_count, &relocs_ma); + ret = validate_exec_list(exec, args->buffer_count, &relocs_ma, + &relocs_len); if (ret != 0) goto pre_struct_lock_err; @@ -1411,13 +1416,11 @@ err: pre_struct_lock_err: for (i = 0; i < args->buffer_count; i++) { if (relocs_ma[i] != NULL) { - vm_page_unhold_pages(relocs_ma[i], howmany( - exec[i].relocation_count * - sizeof(struct drm_i915_gem_relocation_entry), - PAGE_SIZE)); + vm_page_unhold_pages(relocs_ma[i], relocs_len[i]); free(relocs_ma[i], DRM_I915_GEM); } } + free(relocs_len, DRM_I915_GEM); free(relocs_ma, DRM_I915_GEM); free(cliprects, DRM_I915_GEM); return ret; From owner-svn-src-all@freebsd.org Wed Oct 21 22:09: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 149E8A1BBCA; Wed, 21 Oct 2015 22:09:42 +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 E7C8B1527; Wed, 21 Oct 2015 22:09:41 +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 43641B98F; Wed, 21 Oct 2015 18:09:40 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289719 - head/sys/dev/drm2/i915 Date: Wed, 21 Oct 2015 14:13:05 -0700 Message-ID: <1544184.b1AHehjrnL@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201510212049.t9LKnkkj002445@repo.freebsd.org> References: <201510212049.t9LKnkkj002445@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); Wed, 21 Oct 2015 18:09:40 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 22:09:42 -0000 On Wednesday, October 21, 2015 08:49:46 PM John Baldwin wrote: > Author: jhb > Date: Wed Oct 21 20:49:45 2015 > New Revision: 289719 > URL: https://svnweb.freebsd.org/changeset/base/289719 > > Log: > i915_gem_do_execbuffer() holds the pages backing each relocation region for > various reasons while executing user commands. After these commands are > completed, the pages backing the relocation regions are unheld. > > Since relocation regions do not have to be page aligned, the code in > validate_exec_list() allocates 2 extra page pointers in the array of > held pages populated by vm_fault_quick_hold_pages(). However, the cleanup > code that unheld the pages always assumed that only the buffer size / > PAGE_SIZE pages were used. This meant that non-page aligned buffers would > not unheld the last 1 or 2 pages in the list. Fix this by saving the > number of held pages returned by vm_fault_quick_hold_pages() for each > relocation region and using this count during cleanup. > > Reviewed by: dumbbell, kib > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D3965 I have been getting panics on my x220 due to vm_page_unhold() finding a reference count on a page of 0 every 2-3 days for the past month or so. When I examined the dumps I would find other pages backing the relocation regions that had insanely high hold counts (like 30 to 60 thousand). Given that hold_count is a unsigned short I figured it was overflowing. The first attempt to fix this was the changes in r288452. However, even with that in place I was still seeing the same panics. I've only run this for a day, but it "looks" correct. If you have been getting vm_page_unhold panics with i915kms loaded this is worth trying. I'm not sure why my x220 was so prone to this when other people have been able to run X with i915kms without any problems. I do have CPUTYPE set to enable AVX, but I don't know that that would suddenly make lots of buffers non-page aligned that would be page-aligned otherwise. -- John Baldwin From owner-svn-src-all@freebsd.org Wed Oct 21 22:14: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 6C181A1BD96; Wed, 21 Oct 2015 22:14:26 +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 0757F1AEC; Wed, 21 Oct 2015 22:14:25 +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 t9LMEPZT030118; Wed, 21 Oct 2015 22:14:25 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LMENGq030089; Wed, 21 Oct 2015 22:14:23 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201510212214.t9LMENGq030089@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Wed, 21 Oct 2015 22:14:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289720 - in vendor/NetBSD/bmake/dist: . mk unit-tests X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 22:14:26 -0000 Author: sjg Date: Wed Oct 21 22:14:23 2015 New Revision: 289720 URL: https://svnweb.freebsd.org/changeset/base/289720 Log: Import bmake-20151020 Added: vendor/NetBSD/bmake/dist/metachar.c (contents, props changed) vendor/NetBSD/bmake/dist/metachar.h (contents, props changed) Modified: vendor/NetBSD/bmake/dist/ChangeLog vendor/NetBSD/bmake/dist/FILES vendor/NetBSD/bmake/dist/Makefile vendor/NetBSD/bmake/dist/arch.c vendor/NetBSD/bmake/dist/compat.c vendor/NetBSD/bmake/dist/cond.c vendor/NetBSD/bmake/dist/configure.in vendor/NetBSD/bmake/dist/for.c vendor/NetBSD/bmake/dist/job.c vendor/NetBSD/bmake/dist/main.c vendor/NetBSD/bmake/dist/make-bootstrap.sh.in vendor/NetBSD/bmake/dist/make.c vendor/NetBSD/bmake/dist/make.h vendor/NetBSD/bmake/dist/meta.c vendor/NetBSD/bmake/dist/mk/ChangeLog vendor/NetBSD/bmake/dist/mk/auto.obj.mk vendor/NetBSD/bmake/dist/mk/dirdeps.mk vendor/NetBSD/bmake/dist/mk/doc.mk vendor/NetBSD/bmake/dist/mk/gendirdeps.mk vendor/NetBSD/bmake/dist/mk/host-target.mk vendor/NetBSD/bmake/dist/mk/install-mk vendor/NetBSD/bmake/dist/mk/meta.autodep.mk vendor/NetBSD/bmake/dist/mk/meta.stage.mk vendor/NetBSD/bmake/dist/mk/meta.sys.mk vendor/NetBSD/bmake/dist/mk/own.mk vendor/NetBSD/bmake/dist/mk/rst2htm.mk vendor/NetBSD/bmake/dist/nonints.h vendor/NetBSD/bmake/dist/os.sh vendor/NetBSD/bmake/dist/parse.c vendor/NetBSD/bmake/dist/suff.c vendor/NetBSD/bmake/dist/unit-tests/varmisc.exp vendor/NetBSD/bmake/dist/unit-tests/varmisc.mk vendor/NetBSD/bmake/dist/var.c Modified: vendor/NetBSD/bmake/dist/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/ChangeLog Wed Oct 21 20:49:45 2015 (r289719) +++ vendor/NetBSD/bmake/dist/ChangeLog Wed Oct 21 22:14:23 2015 (r289720) @@ -1,3 +1,40 @@ +2015-10-20 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20151020 + Merge with NetBSD make, pick up + o var.c: fix uninitialized var + +2015-10-12 Simon J. Gerraty + + * var.c: the conditional expressions used with ':?' can be + expensive, if already discarding do not evaluate or expand + anything. + +2015-10-10 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20151010 + Merge with NetBSD make, pick up + o Add Boolean wantit flag to Var_Subst and Var_Parse + when FALSE we know we are discarding the result and can + skip operations like Cmd_Exec. + +2015-10-09 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20151009 + Merge with NetBSD make, pick up + o var.c: don't check for NULL before free() + o meta.c: meta_oodate, do not hard code ignore of makeDependfile + +2015-09-10 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150910 + Merge with NetBSD make, pick up + o main.c: with -w print Enter/Leaving messages for objdir too + if necessary. + o centralize shell metachar handling + + * FILES: add metachar.[ch] + 2015-06-06 Simon J. Gerraty * Makefile (MAKE_VERSION): 20150606 Modified: vendor/NetBSD/bmake/dist/FILES ============================================================================== --- vendor/NetBSD/bmake/dist/FILES Wed Oct 21 20:49:45 2015 (r289719) +++ vendor/NetBSD/bmake/dist/FILES Wed Oct 21 22:14:23 2015 (r289720) @@ -71,6 +71,8 @@ make_malloc.h makefile.in meta.c meta.h +metachar.c +metachar.h missing/sys/cdefs.h mkdeps.sh nonints.h Modified: vendor/NetBSD/bmake/dist/Makefile ============================================================================== --- vendor/NetBSD/bmake/dist/Makefile Wed Oct 21 20:49:45 2015 (r289719) +++ vendor/NetBSD/bmake/dist/Makefile Wed Oct 21 22:14:23 2015 (r289720) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.39 2015/06/07 15:54:37 sjg Exp $ +# $Id: Makefile,v 1.44 2015/10/20 21:41:40 sjg Exp $ # Base version on src date -MAKE_VERSION= 20150606 +MAKE_VERSION= 20151020 PROG= bmake @@ -18,6 +18,7 @@ SRCS= \ make.c \ make_malloc.c \ meta.c \ + metachar.c \ parse.c \ str.c \ strlist.c \ Modified: vendor/NetBSD/bmake/dist/arch.c ============================================================================== --- vendor/NetBSD/bmake/dist/arch.c Wed Oct 21 20:49:45 2015 (r289719) +++ vendor/NetBSD/bmake/dist/arch.c Wed Oct 21 22:14:23 2015 (r289720) @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.63 2012/06/12 19:21:50 joerg Exp $ */ +/* $NetBSD: arch.c,v 1.64 2015/10/11 04:51:24 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: arch.c,v 1.63 2012/06/12 19:21:50 joerg Exp $"; +static char rcsid[] = "$NetBSD: arch.c,v 1.64 2015/10/11 04:51:24 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: arch.c,v 1.63 2012/06/12 19:21:50 joerg Exp $"); +__RCSID("$NetBSD: arch.c,v 1.64 2015/10/11 04:51:24 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -310,7 +310,7 @@ Arch_ParseArchive(char **linePtr, Lst no void *freeIt; char *result; - result = Var_Parse(cp, ctxt, TRUE, &length, &freeIt); + result = Var_Parse(cp, ctxt, TRUE, TRUE, &length, &freeIt); if (freeIt) free(freeIt); if (result == var_Error) { @@ -325,7 +325,7 @@ Arch_ParseArchive(char **linePtr, Lst no *cp++ = '\0'; if (subLibName) { - libName = Var_Subst(NULL, libName, ctxt, TRUE); + libName = Var_Subst(NULL, libName, ctxt, TRUE, TRUE); } @@ -351,7 +351,7 @@ Arch_ParseArchive(char **linePtr, Lst no void *freeIt; char *result; - result = Var_Parse(cp, ctxt, TRUE, &length, &freeIt); + result = Var_Parse(cp, ctxt, TRUE, TRUE, &length, &freeIt); if (freeIt) free(freeIt); if (result == var_Error) { @@ -404,7 +404,7 @@ Arch_ParseArchive(char **linePtr, Lst no char *oldMemName = memName; size_t sz; - memName = Var_Subst(NULL, memName, ctxt, TRUE); + memName = Var_Subst(NULL, memName, ctxt, TRUE, TRUE); /* * Now form an archive spec and recurse to deal with nested Modified: vendor/NetBSD/bmake/dist/compat.c ============================================================================== --- vendor/NetBSD/bmake/dist/compat.c Wed Oct 21 20:49:45 2015 (r289719) +++ vendor/NetBSD/bmake/dist/compat.c Wed Oct 21 22:14:23 2015 (r289720) @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $ */ +/* $NetBSD: compat.c,v 1.101 2015/10/11 04:51:24 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.101 2015/10/11 04:51:24 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $"); +__RCSID("$NetBSD: compat.c,v 1.101 2015/10/11 04:51:24 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -111,37 +111,14 @@ __RCSID("$NetBSD: compat.c,v 1.96 2014/0 #include "hash.h" #include "dir.h" #include "job.h" +#include "metachar.h" #include "pathnames.h" -/* - * The following array is used to make a fast determination of which - * characters are interpreted specially by the shell. If a command - * contains any of these characters, it is executed by the shell, not - * directly by us. - */ - -static char meta[256]; static GNode *curTarg = NULL; static GNode *ENDNode; static void CompatInterrupt(int); -static void -Compat_Init(void) -{ - const char *cp; - - Shell_Init(); /* setup default shell */ - - for (cp = "~#=|^(){};&<>*?[]:$`\\\n"; *cp != '\0'; cp++) { - meta[(unsigned char) *cp] = 1; - } - /* - * The null character serves as a sentinel in the string. - */ - meta[0] = 1; -} - /*- *----------------------------------------------------------------------- * CompatInterrupt -- @@ -236,7 +213,7 @@ CompatRunCommand(void *cmdp, void *gnp) doIt = FALSE; cmdNode = Lst_Member(gn->commands, cmd); - cmdStart = Var_Subst(NULL, cmd, gn, FALSE); + cmdStart = Var_Subst(NULL, cmd, gn, FALSE, TRUE); /* * brk_string will return an argv with a NULL in av[0], thus causing @@ -271,8 +248,8 @@ CompatRunCommand(void *cmdp, void *gnp) break; case '+': doIt = TRUE; - if (!meta[0]) /* we came here from jobs */ - Compat_Init(); + if (!shellName) /* we came here from jobs */ + Shell_Init(); break; } cmd++; @@ -300,11 +277,13 @@ CompatRunCommand(void *cmdp, void *gnp) * Search for meta characters in the command. If there are no meta * characters, there's no need to execute a shell to execute the * command. + * + * Additionally variable assignments and empty commands + * go to the shell. Therefore treat '=' and ':' like shell + * meta characters as documented in make(1). */ - for (cp = cmd; !meta[(unsigned char)*cp]; cp++) { - continue; - } - useShell = (*cp != '\0'); + + useShell = needshell(cmd, FALSE); #endif /* @@ -512,8 +491,8 @@ Compat_Make(void *gnp, void *pgnp) GNode *gn = (GNode *)gnp; GNode *pgn = (GNode *)pgnp; - if (!meta[0]) /* we came here from jobs */ - Compat_Init(); + if (!shellName) /* we came here from jobs */ + Shell_Init(); if (gn->made == UNMADE && (gn == pgn || (pgn->type & OP_MADE) == 0)) { /* * First mark ourselves to be made, then apply whatever transformations @@ -693,7 +672,8 @@ Compat_Run(Lst targs) GNode *gn = NULL;/* Current root target */ int errors; /* Number of targets not remade due to errors */ - Compat_Init(); + if (!shellName) + Shell_Init(); if (bmake_signal(SIGINT, SIG_IGN) != SIG_IGN) { bmake_signal(SIGINT, CompatInterrupt); Modified: vendor/NetBSD/bmake/dist/cond.c ============================================================================== --- vendor/NetBSD/bmake/dist/cond.c Wed Oct 21 20:49:45 2015 (r289719) +++ vendor/NetBSD/bmake/dist/cond.c Wed Oct 21 22:14:23 2015 (r289720) @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.68 2015/05/05 21:51:09 sjg Exp $ */ +/* $NetBSD: cond.c,v 1.69 2015/10/11 04:51:24 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: cond.c,v 1.68 2015/05/05 21:51:09 sjg Exp $"; +static char rcsid[] = "$NetBSD: cond.c,v 1.69 2015/10/11 04:51:24 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: cond.c,v 1.68 2015/05/05 21:51:09 sjg Exp $"); +__RCSID("$NetBSD: cond.c,v 1.69 2015/10/11 04:51:24 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -289,7 +289,7 @@ CondGetArg(char **linePtr, char **argPtr int len; void *freeIt; - cp2 = Var_Parse(cp, VAR_CMD, TRUE, &len, &freeIt); + cp2 = Var_Parse(cp, VAR_CMD, TRUE, TRUE, &len, &freeIt); Buf_AddBytes(&buf, strlen(cp2), cp2); if (freeIt) free(freeIt); @@ -571,7 +571,7 @@ CondGetString(Boolean doEval, Boolean *q case '$': /* if we are in quotes, then an undefined variable is ok */ str = Var_Parse(condExpr, VAR_CMD, (qt ? 0 : doEval), - &len, freeIt); + TRUE, &len, freeIt); if (str == var_Error) { if (*freeIt) { free(*freeIt); @@ -823,7 +823,7 @@ get_mpt_arg(char **linePtr, char **argPt /* We do all the work here and return the result as the length */ *argPtr = NULL; - val = Var_Parse(cp - 1, VAR_CMD, FALSE, &length, &freeIt); + val = Var_Parse(cp - 1, VAR_CMD, FALSE, TRUE, &length, &freeIt); /* * Advance *linePtr to beyond the closing ). Note that * we subtract one because 'length' is calculated from 'cp - 1'. Modified: vendor/NetBSD/bmake/dist/configure.in ============================================================================== --- vendor/NetBSD/bmake/dist/configure.in Wed Oct 21 20:49:45 2015 (r289719) +++ vendor/NetBSD/bmake/dist/configure.in Wed Oct 21 22:14:23 2015 (r289720) @@ -1,11 +1,11 @@ dnl dnl RCSid: -dnl $Id: configure.in,v 1.53 2014/11/06 01:49:40 sjg Exp $ +dnl $Id: configure.in,v 1.54 2015/10/10 04:17:10 sjg Exp $ dnl dnl Process this file with autoconf to produce a configure script dnl AC_PREREQ(2.50) -AC_INIT([bmake], [20140214], [sjg@NetBSD.org]) +AC_INIT([bmake], [20151009], [sjg@NetBSD.org]) AC_CONFIG_HEADERS(config.h) dnl make srcdir absolute @@ -105,6 +105,7 @@ AC_CHECK_HEADERS( \ ar.h \ err.h \ fcntl.h \ + limits.h \ paths.h \ poll.h \ ranlib.h \ Modified: vendor/NetBSD/bmake/dist/for.c ============================================================================== --- vendor/NetBSD/bmake/dist/for.c Wed Oct 21 20:49:45 2015 (r289719) +++ vendor/NetBSD/bmake/dist/for.c Wed Oct 21 22:14:23 2015 (r289720) @@ -1,4 +1,4 @@ -/* $NetBSD: for.c,v 1.49 2012/06/03 04:29:40 sjg Exp $ */ +/* $NetBSD: for.c,v 1.50 2015/10/11 04:51:24 sjg Exp $ */ /* * Copyright (c) 1992, The Regents of the University of California. @@ -30,14 +30,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: for.c,v 1.49 2012/06/03 04:29:40 sjg Exp $"; +static char rcsid[] = "$NetBSD: for.c,v 1.50 2015/10/11 04:51:24 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)for.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: for.c,v 1.49 2012/06/03 04:29:40 sjg Exp $"); +__RCSID("$NetBSD: for.c,v 1.50 2015/10/11 04:51:24 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -216,7 +216,7 @@ For_Eval(char *line) * We can't do the escapes here - because we don't know whether * we are substuting into ${...} or $(...). */ - sub = Var_Subst(NULL, ptr, VAR_GLOBAL, FALSE); + sub = Var_Subst(NULL, ptr, VAR_GLOBAL, FALSE, TRUE); /* * Split into words allowing for quoted strings. Modified: vendor/NetBSD/bmake/dist/job.c ============================================================================== --- vendor/NetBSD/bmake/dist/job.c Wed Oct 21 20:49:45 2015 (r289719) +++ vendor/NetBSD/bmake/dist/job.c Wed Oct 21 22:14:23 2015 (r289720) @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.180 2015/04/16 13:31:03 joerg Exp $ */ +/* $NetBSD: job.c,v 1.181 2015/10/11 04:51:24 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.180 2015/04/16 13:31:03 joerg Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.181 2015/10/11 04:51:24 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.180 2015/04/16 13:31:03 joerg Exp $"); +__RCSID("$NetBSD: job.c,v 1.181 2015/10/11 04:51:24 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -715,7 +715,7 @@ JobPrintCommand(void *cmdp, void *jobp) numCommands += 1; - cmdStart = cmd = Var_Subst(NULL, cmd, job->node, FALSE); + cmdStart = cmd = Var_Subst(NULL, cmd, job->node, FALSE, TRUE); cmdTemplate = "%s\n"; @@ -903,7 +903,7 @@ JobPrintCommand(void *cmdp, void *jobp) static int JobSaveCommand(void *cmd, void *gn) { - cmd = Var_Subst(NULL, (char *)cmd, (GNode *)gn, FALSE); + cmd = Var_Subst(NULL, (char *)cmd, (GNode *)gn, FALSE, TRUE); (void)Lst_AtEnd(postCommands->commands, cmd); return(0); } @@ -2194,7 +2194,8 @@ Job_SetPrefix(void) Var_Set(MAKE_JOB_PREFIX, "---", VAR_GLOBAL, 0); } - targPrefix = Var_Subst(NULL, "${" MAKE_JOB_PREFIX "}", VAR_GLOBAL, 0); + targPrefix = Var_Subst(NULL, "${" MAKE_JOB_PREFIX "}", + VAR_GLOBAL, FALSE, TRUE); } /*- Modified: vendor/NetBSD/bmake/dist/main.c ============================================================================== --- vendor/NetBSD/bmake/dist/main.c Wed Oct 21 20:49:45 2015 (r289719) +++ vendor/NetBSD/bmake/dist/main.c Wed Oct 21 22:14:23 2015 (r289720) @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.232 2015/03/26 22:20:42 sjg Exp $ */ +/* $NetBSD: main.c,v 1.234 2015/10/11 04:51:24 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.232 2015/03/26 22:20:42 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.234 2015/10/11 04:51:24 sjg Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.232 2015/03/26 22:20:42 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.234 2015/10/11 04:51:24 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -172,6 +172,7 @@ Boolean keepgoing; /* -k flag */ Boolean queryFlag; /* -q flag */ Boolean touchFlag; /* -t flag */ Boolean enterFlag; /* -w flag */ +Boolean enterFlagObj; /* -w and objdir != srcdir */ Boolean ignoreErrors; /* -i flag */ Boolean beSilent; /* -s flag */ Boolean oldVars; /* variable substitution style */ @@ -722,7 +723,7 @@ Main_SetObjdir(const char *path) /* expand variable substitutions */ if (strchr(path, '$') != 0) { snprintf(buf, MAXPATHLEN, "%s", path); - path = p = Var_Subst(NULL, buf, VAR_GLOBAL, 0); + path = p = Var_Subst(NULL, buf, VAR_GLOBAL, FALSE, TRUE); } if (path[0] != '/') { @@ -741,6 +742,8 @@ Main_SetObjdir(const char *path) setenv("PWD", objdir, 1); Dir_InitDot(); rc = TRUE; + if (enterFlag && strcmp(objdir, curdir) != 0) + enterFlagObj = TRUE; } } @@ -803,7 +806,8 @@ MakeMode(const char *mode) char *mp = NULL; if (!mode) - mode = mp = Var_Subst(NULL, "${" MAKE_MODE ":tl}", VAR_GLOBAL, 0); + mode = mp = Var_Subst(NULL, "${" MAKE_MODE ":tl}", + VAR_GLOBAL, FALSE, TRUE); if (mode && *mode) { if (strstr(mode, "compat")) { @@ -1249,7 +1253,7 @@ main(int argc, char **argv) (char *)Lst_Datum(ln)); } else { p1 = Var_Subst(NULL, "${" MAKEFILE_PREFERENCE "}", - VAR_CMD, 0); + VAR_CMD, FALSE, TRUE); if (p1) { (void)str2Lst_Append(makefiles, p1, NULL); (void)Lst_Find(makefiles, NULL, ReadMakefile); @@ -1260,12 +1264,15 @@ main(int argc, char **argv) /* In particular suppress .depend for '-r -V .OBJDIR -f /dev/null' */ if (!noBuiltins || !printVars) { makeDependfile = Var_Subst(NULL, "${.MAKE.DEPENDFILE:T}", - VAR_CMD, 0); + VAR_CMD, FALSE, TRUE); doing_depend = TRUE; (void)ReadMakefile(makeDependfile, NULL); doing_depend = FALSE; } + if (enterFlagObj) + printf("%s: Entering directory `%s'\n", progname, objdir); + MakeMode(NULL); Var_Append("MFLAGS", Var_Value(MAKEFLAGS, VAR_GLOBAL, &p1), VAR_GLOBAL); @@ -1295,7 +1302,7 @@ main(int argc, char **argv) */ static char VPATH[] = "${VPATH}"; - vpath = Var_Subst(NULL, VPATH, VAR_CMD, FALSE); + vpath = Var_Subst(NULL, VPATH, VAR_CMD, FALSE, TRUE); path = vpath; do { /* skip to end of directory */ @@ -1342,14 +1349,16 @@ main(int argc, char **argv) char *value; if (strchr(var, '$')) { - value = p1 = Var_Subst(NULL, var, VAR_GLOBAL, 0); + value = p1 = Var_Subst(NULL, var, VAR_GLOBAL, + FALSE, TRUE); } else if (expandVars) { char tmp[128]; if (snprintf(tmp, sizeof(tmp), "${%s}", var) >= (int)(sizeof(tmp))) Fatal("%s: variable name too big: %s", progname, var); - value = p1 = Var_Subst(NULL, tmp, VAR_GLOBAL, 0); + value = p1 = Var_Subst(NULL, tmp, VAR_GLOBAL, + FALSE, TRUE); } else { value = Var_Value(var, VAR_GLOBAL, &p1); } @@ -1406,6 +1415,8 @@ main(int argc, char **argv) Trace_Log(MAKEEND, 0); + if (enterFlagObj) + printf("%s: Leaving directory `%s'\n", progname, objdir); if (enterFlag) printf("%s: Leaving directory `%s'\n", progname, curdir); @@ -1885,7 +1896,7 @@ PrintOnError(GNode *gn, const char *s) } strncpy(tmp, "${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'\n@}", sizeof(tmp) - 1); - cp = Var_Subst(NULL, tmp, VAR_GLOBAL, 0); + cp = Var_Subst(NULL, tmp, VAR_GLOBAL, FALSE, TRUE); if (cp) { if (*cp) printf("%s", cp); @@ -1914,7 +1925,7 @@ Main_ExportMAKEFLAGS(Boolean first) strncpy(tmp, "${.MAKEFLAGS} ${.MAKEOVERRIDES:O:u:@v@$v=${$v:Q}@}", sizeof(tmp)); - s = Var_Subst(NULL, tmp, VAR_CMD, 0); + s = Var_Subst(NULL, tmp, VAR_CMD, FALSE, TRUE); if (s && *s) { #ifdef POSIX setenv("MAKEFLAGS", s, 1); @@ -1936,7 +1947,8 @@ getTmpdir(void) * Honor $TMPDIR but only if it is valid. * Ensure it ends with /. */ - tmpdir = Var_Subst(NULL, "${TMPDIR:tA:U" _PATH_TMP "}/", VAR_GLOBAL, 0); + tmpdir = Var_Subst(NULL, "${TMPDIR:tA:U" _PATH_TMP "}/", VAR_GLOBAL, + FALSE, TRUE); if (stat(tmpdir, &st) < 0 || !S_ISDIR(st.st_mode)) { free(tmpdir); tmpdir = bmake_strdup(_PATH_TMP); @@ -1991,7 +2003,7 @@ getBoolean(const char *name, Boolean bf) char *cp; if (snprintf(tmp, sizeof(tmp), "${%s:tl}", name) < (int)(sizeof(tmp))) { - cp = Var_Subst(NULL, tmp, VAR_GLOBAL, 0); + cp = Var_Subst(NULL, tmp, VAR_GLOBAL, FALSE, TRUE); if (cp) { switch(*cp) { Modified: vendor/NetBSD/bmake/dist/make-bootstrap.sh.in ============================================================================== --- vendor/NetBSD/bmake/dist/make-bootstrap.sh.in Wed Oct 21 20:49:45 2015 (r289719) +++ vendor/NetBSD/bmake/dist/make-bootstrap.sh.in Wed Oct 21 22:14:23 2015 (r289720) @@ -52,7 +52,7 @@ do_link() { } BASE_OBJECTS="arch.o buf.o compat.o cond.o dir.o for.o getopt hash.o \ -job.o make.o make_malloc.o parse.o sigcompat.o str.o strlist.o \ +job.o make.o make_malloc.o metachar.o parse.o sigcompat.o str.o strlist.o \ suff.o targ.o trace.o var.o util.o" LST_OBJECTS="lstAppend.o lstDupl.o lstInit.o lstOpen.o \ Modified: vendor/NetBSD/bmake/dist/make.c ============================================================================== --- vendor/NetBSD/bmake/dist/make.c Wed Oct 21 20:49:45 2015 (r289719) +++ vendor/NetBSD/bmake/dist/make.c Wed Oct 21 22:14:23 2015 (r289720) @@ -1,4 +1,4 @@ -/* $NetBSD: make.c,v 1.91 2014/10/18 08:33:30 snj Exp $ */ +/* $NetBSD: make.c,v 1.92 2015/10/11 04:51:24 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: make.c,v 1.91 2014/10/18 08:33:30 snj Exp $"; +static char rcsid[] = "$NetBSD: make.c,v 1.92 2015/10/11 04:51:24 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)make.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: make.c,v 1.91 2014/10/18 08:33:30 snj Exp $"); +__RCSID("$NetBSD: make.c,v 1.92 2015/10/11 04:51:24 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -485,7 +485,7 @@ Make_HandleUse(GNode *cgn, GNode *pgn) if (gn->name) free(gn->name); } - gn->name = Var_Subst(NULL, gn->uname, pgn, FALSE); + gn->name = Var_Subst(NULL, gn->uname, pgn, FALSE, TRUE); if (gn->name && gn->uname && strcmp(gn->name, gn->uname) != 0) { /* See if we have a target for this node. */ tgn = Targ_FindNode(gn->name, TARG_NOCREATE); Modified: vendor/NetBSD/bmake/dist/make.h ============================================================================== --- vendor/NetBSD/bmake/dist/make.h Wed Oct 21 20:49:45 2015 (r289719) +++ vendor/NetBSD/bmake/dist/make.h Wed Oct 21 22:14:23 2015 (r289720) @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.95 2014/09/07 20:55:34 joerg Exp $ */ +/* $NetBSD: make.h,v 1.96 2015/09/21 21:50:16 pooka Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -519,8 +519,15 @@ int str2Lst_Append(Lst, char *, const ch #define MAX(a, b) ((a > b) ? a : b) #endif +/* At least GNU/Hurd systems lack hardcoded MAXPATHLEN/PATH_MAX */ +#ifdef HAVE_LIMITS_H +#include +#endif #ifndef MAXPATHLEN -#define MAXPATHLEN BMAKE_PATH_MAX +#define MAXPATHLEN BMAKE_PATH_MAX +#endif +#ifndef PATH_MAX +#define PATH_MAX MAXPATHLEN #endif #endif /* _MAKE_H_ */ Modified: vendor/NetBSD/bmake/dist/meta.c ============================================================================== --- vendor/NetBSD/bmake/dist/meta.c Wed Oct 21 20:49:45 2015 (r289719) +++ vendor/NetBSD/bmake/dist/meta.c Wed Oct 21 22:14:23 2015 (r289720) @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.38 2015/04/11 05:24:30 sjg Exp $ */ +/* $NetBSD: meta.c,v 1.40 2015/10/11 04:51:24 sjg Exp $ */ /* * Implement 'meta' mode. @@ -324,7 +324,7 @@ is_submake(void *cmdp, void *gnp) } cp = strchr(cmd, '$'); if ((cp)) { - mp = Var_Subst(NULL, cmd, gn, FALSE); + mp = Var_Subst(NULL, cmd, gn, FALSE, TRUE); cmd = mp; } cp2 = strstr(cmd, p_make); @@ -367,7 +367,7 @@ printCMD(void *cmdp, void *mfpp) char *cp = NULL; if (strchr(cmd, '$')) { - cmd = cp = Var_Subst(NULL, cmd, mfp->gn, FALSE); + cmd = cp = Var_Subst(NULL, cmd, mfp->gn, FALSE, TRUE); } fprintf(mfp->fp, "CMD %s\n", cmd); if (cp) @@ -462,7 +462,7 @@ meta_create(BuildMon *pbm, GNode *gn) char *mp; /* Describe the target we are building */ - mp = Var_Subst(NULL, "${" MAKE_META_PREFIX "}", gn, 0); + mp = Var_Subst(NULL, "${" MAKE_META_PREFIX "}", gn, FALSE, TRUE); if (*mp) fprintf(stdout, "%s\n", mp); free(mp); @@ -605,7 +605,8 @@ meta_mode_init(const char *make_mode) * We consider ourselves master of all within ${.MAKE.META.BAILIWICK} */ metaBailiwick = Lst_Init(FALSE); - cp = Var_Subst(NULL, "${.MAKE.META.BAILIWICK:O:u:tA}", VAR_GLOBAL, 0); + cp = Var_Subst(NULL, "${.MAKE.META.BAILIWICK:O:u:tA}", VAR_GLOBAL, + FALSE, TRUE); if (cp) { str2Lst_Append(metaBailiwick, cp, NULL); } @@ -616,7 +617,8 @@ meta_mode_init(const char *make_mode) Var_Append(MAKE_META_IGNORE_PATHS, "/dev /etc /proc /tmp /var/run /var/tmp ${TMPDIR}", VAR_GLOBAL); cp = Var_Subst(NULL, - "${" MAKE_META_IGNORE_PATHS ":O:u:tA}", VAR_GLOBAL, 0); + "${" MAKE_META_IGNORE_PATHS ":O:u:tA}", VAR_GLOBAL, + FALSE, TRUE); if (cp) { str2Lst_Append(metaIgnorePaths, cp, NULL); } @@ -727,7 +729,8 @@ meta_job_output(Job *job, char *cp, cons if (!meta_prefix) { char *cp2; - meta_prefix = Var_Subst(NULL, "${" MAKE_META_PREFIX "}", VAR_GLOBAL, 0); + meta_prefix = Var_Subst(NULL, "${" MAKE_META_PREFIX "}", + VAR_GLOBAL, FALSE, TRUE); if ((cp2 = strchr(meta_prefix, '$'))) meta_prefix_len = cp2 - meta_prefix; else @@ -1209,16 +1212,6 @@ meta_oodate(GNode *gn, Boolean oodate) break; } - if ((cp = strrchr(p, '/'))) { - cp++; - /* - * We don't normally expect to see this, - * but we do expect it to change. - */ - if (strcmp(cp, makeDependfile) == 0) - break; - } - /* * The rest of the record is the file name. * Check if it's not an absolute path. @@ -1322,7 +1315,7 @@ meta_oodate(GNode *gn, Boolean oodate) if (DEBUG(META)) fprintf(debug_file, "%s: %d: cannot compare command using .OODATE\n", fname, lineno); } - cmd = Var_Subst(NULL, cmd, gn, TRUE); + cmd = Var_Subst(NULL, cmd, gn, TRUE, TRUE); if ((cp = strchr(cmd, '\n'))) { int n; Added: vendor/NetBSD/bmake/dist/metachar.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/bmake/dist/metachar.c Wed Oct 21 22:14:23 2015 (r289720) @@ -0,0 +1,88 @@ +/* $NetBSD: metachar.c,v 1.5 2015/06/19 08:03:35 mlelstv Exp $ */ + +/*- + * Copyright (c) 2015 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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. + */ + +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +#endif + +#if defined(MAKE_NATIVE) || defined(HAVE_NBTOOL_CONFIG_H) +#include +#endif + +#if defined(__RCSID) && !defined(lint) +__RCSID("$NetBSD: metachar.c,v 1.5 2015/06/19 08:03:35 mlelstv Exp $"); +#endif + +#include "metachar.h" +/* + * The following array is used to make a fast determination of which + * characters are interpreted specially by the shell. If a command + * contains any of these characters, it is executed by the shell, not + * directly by us. + * + * perhaps move it to ctype? + */ + +unsigned char _metachar[128] = { +// nul soh stx etx eot enq ack bel + 1, 0, 0, 0, 0, 0, 0, 0, +// bs ht nl vt np cr so si + 0, 0, 1, 0, 0, 0, 0, 0, +// dle dc1 dc2 dc3 dc4 nak syn etb + 0, 0, 0, 0, 0, 0, 0, 0, +// can em sub esc fs gs rs us + 0, 0, 0, 0, 0, 0, 0, 0, +// sp ! " # $ % & ' + 0, 1, 1, 1, 1, 0, 1, 1, +// ( ) * + , - . / + 1, 1, 1, 0, 0, 0, 0, 0, +// 0 1 2 3 4 5 6 7 + 0, 0, 0, 0, 0, 0, 0, 0, +// 8 9 : ; < = > ? + 0, 0, 0, 1, 1, 0, 1, 1, +// @ A B C D E F G + 0, 0, 0, 0, 0, 0, 0, 0, +// H I J K L M N O + 0, 0, 0, 0, 0, 0, 0, 0, +// P Q R S T U V W + 0, 0, 0, 0, 0, 0, 0, 0, +// X Y Z [ \ ] ^ _ + 0, 0, 0, 1, 1, 1, 1, 0, +// ` a b c d e f g + 1, 0, 0, 0, 0, 0, 0, 0, +// h i j k l m n o + 0, 0, 0, 0, 0, 0, 0, 0, +// p q r s t u v w + 0, 0, 0, 0, 0, 0, 0, 0, +// x y z { | } ~ del + 0, 0, 0, 1, 1, 1, 1, 0, +}; + Added: vendor/NetBSD/bmake/dist/metachar.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/bmake/dist/metachar.h Wed Oct 21 22:14:23 2015 (r289720) @@ -0,0 +1,61 @@ +/* $NetBSD: metachar.h,v 1.4 2015/06/21 20:26:02 christos Exp $ */ + +/*- + * Copyright (c) 2015 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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. + */ +#ifndef _METACHAR_H +#define _METACHAR_H + +#include + +extern unsigned char _metachar[]; + +#define ismeta(c) _metachar[(c) & 0x7f] + +static inline int +hasmeta(const char *cmd) +{ + while (!ismeta(*cmd)) + cmd++; + + return *cmd != '\0'; +} + +static inline int +needshell(const char *cmd, int white) +{ + while (!ismeta(*cmd) && *cmd != ':' && *cmd != '=') { + if (white && isspace((unsigned char)*cmd)) + break; + cmd++; + } + + return *cmd != '\0'; +} + +#endif /* _METACHAR_H */ Modified: vendor/NetBSD/bmake/dist/mk/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/mk/ChangeLog Wed Oct 21 20:49:45 2015 (r289719) +++ vendor/NetBSD/bmake/dist/mk/ChangeLog Wed Oct 21 22:14:23 2015 (r289720) @@ -1,3 +1,48 @@ +2015-10-20 Simon J. Gerraty + + * install-mk (MK_VERSION): 20151020 + + * dirdeps.mk: Add logic for + make -f dirdeps.mk some/dir.${TARGET_SPEC} + +2015-10-14 Simon J. Gerraty + + * install-mk (MK_VERSION): 20151010 + +2015-10-02 Simon J. Gerraty + + * meta.stage.mk: use staging: ${STAGE_TARGETS:... + to have stage_lins run last in non-jobs mode. + Use .ORDER only for jobs mode. + +2015-09-02 Simon J. Gerraty + + * rst2htm.mk: allow for per target flags etc. + +2015-09-01 Simon J. Gerraty + + * install-mk (MK_VERSION): 20150901 + + * doc.mk: create dir if needed use DOC_INSTALL_OWN + +2015-06-15 Simon J. Gerraty + + * install-mk (MK_VERSION): 20150615 + + * auto.obj.mk: allow use of MAKEOBJDIRPREFIX too. + Follow make's normal precedence rules. + + * gendirdeps.mk: allow customization of the header. + eg. for FreeBSD: + GENDIRDEPS_HEADER= echo '\# ${FreeBSD:L:@v@$$$v$$ @:M*F*}'; + + * meta.autodep.mk: ignore dirdeps.cache* + + * meta.stage.mk: when bootstrapping options it can be handy to + throw warnings rather than errors for staging conflicts. + + * meta.sys.mk: include local.meta.sys.mk for customization + 2015-06-06 Simon J. Gerraty * install-mk (MK_VERSION): 20150606 Modified: vendor/NetBSD/bmake/dist/mk/auto.obj.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/auto.obj.mk Wed Oct 21 20:49:45 2015 (r289719) +++ vendor/NetBSD/bmake/dist/mk/auto.obj.mk Wed Oct 21 22:14:23 2015 (r289720) @@ -1,4 +1,4 @@ -# $Id: auto.obj.mk,v 1.10 2015/04/16 16:59:00 sjg Exp $ +# $Id: auto.obj.mk,v 1.11 2015/06/16 06:28:21 sjg Exp $ # # @(#) Copyright (c) 2004, Simon J. Gerraty # @@ -40,7 +40,10 @@ MKOBJDIRS= auto .if !defined(NOOBJ) && !defined(NO_OBJ) && ${MKOBJDIRS:Uno} == auto # Use __objdir here so it is easier to tweak without impacting # the logic. -__objdir?= ${MAKEOBJDIR} +.if !empty(MAKEOBJDIRPREFIX) && exists(${MAKEOBJDIRPREFIX}) +__objdir?= ${MAKEOBJDIRPREFIX}${.CURDIR} +.endif +__objdir?= ${MAKEOBJDIR:Uobj} __objdir:= ${__objdir:tA} .if ${.OBJDIR} != ${__objdir} # We need to chdir, make the directory if needed Modified: vendor/NetBSD/bmake/dist/mk/dirdeps.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/dirdeps.mk Wed Oct 21 20:49:45 2015 (r289719) +++ vendor/NetBSD/bmake/dist/mk/dirdeps.mk Wed Oct 21 22:14:23 2015 (r289720) @@ -1,4 +1,4 @@ -# $Id: dirdeps.mk,v 1.54 2015/06/08 20:55:11 sjg Exp $ +# $Id: dirdeps.mk,v 1.55 2015/10/20 22:04:53 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -242,6 +242,21 @@ DEP_${TARGET_SPEC_VARS:[$i]} := ${_tspec DEP_MACHINE := ${_DEP_TARGET_SPEC} .endif +.if ${MAKEFILE:T} == ${.PARSEFILE} && empty(DIRDEPS) && ${.TARGETS:Uall:M*/*} != "" +# This little trick let's us do +# +# mk -f dirdeps.mk some/dir.${TARGET_SPEC} +# +all: +${.TARGETS:Nall}: all +DIRDEPS := ${.TARGETS:M*/*} +# so that -DNO_DIRDEPS works +DEP_RELDIR := ${DIRDEPS:R:[1]} +# disable DIRDEPS_CACHE as it does not like this trick +MK_DIRDEPS_CACHE = no +.endif + + # pickup customizations # as below you can use !target(_DIRDEP_USE) to protect things # which should only be done once. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Oct 21 22:14: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 0EB1DA1BDE5; Wed, 21 Oct 2015 22:14:59 +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 B6F451C54; Wed, 21 Oct 2015 22:14:58 +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 t9LMEv1x030194; Wed, 21 Oct 2015 22:14:57 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LMEvtW030193; Wed, 21 Oct 2015 22:14:57 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201510212214.t9LMEvtW030193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Wed, 21 Oct 2015 22:14:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289721 - vendor/NetBSD/bmake/20151020 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 22:14:59 -0000 Author: sjg Date: Wed Oct 21 22:14:57 2015 New Revision: 289721 URL: https://svnweb.freebsd.org/changeset/base/289721 Log: Tag bmake 20151020 Added: - copied from r289720, vendor/NetBSD/bmake/dist/ Directory Properties: vendor/NetBSD/bmake/20151020/ (props changed) From owner-svn-src-all@freebsd.org Wed Oct 21 22:15: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 0C8C0A1BE31; Wed, 21 Oct 2015 22:15:46 +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 CE06A1D9F; Wed, 21 Oct 2015 22:15:45 +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 t9LMFiqH030312; Wed, 21 Oct 2015 22:15:44 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LMFi5F030310; Wed, 21 Oct 2015 22:15:44 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510212215.t9LMFi5F030310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 21 Oct 2015 22:15:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r289722 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 22:15:46 -0000 Author: adrian Date: Wed Oct 21 22:15:44 2015 New Revision: 289722 URL: https://svnweb.freebsd.org/changeset/base/289722 Log: Add avos@ , me as mentor. Approved by: core (implicit) Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Wed Oct 21 22:14:57 2015 (r289721) +++ svnadmin/conf/access Wed Oct 21 22:15:44 2015 (r289722) @@ -36,6 +36,7 @@ arybchik asomers avatar avg +avos bapt bde bdrewery Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Wed Oct 21 22:14:57 2015 (r289721) +++ svnadmin/conf/mentors Wed Oct 21 22:15:44 2015 (r289722) @@ -34,3 +34,4 @@ torek rpaulo venkat delphij Co-mentor: luigi, jhb versus gavin Co-mentor: fjoe whu royger Co-mentor: gibbs +avos adrian From owner-svn-src-all@freebsd.org Wed Oct 21 22:17: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 EBC02A1BE87; Wed, 21 Oct 2015 22:17:08 +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 D4ACA1EFE; Wed, 21 Oct 2015 22:17:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id CCE4411C8; Wed, 21 Oct 2015 22:17:08 +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 89E8B164AF; Wed, 21 Oct 2015 22:17:08 +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 bBniAv9QW4mM; Wed, 21 Oct 2015 22:17:06 +0000 (UTC) Subject: Re: svn commit: r289720 - in vendor/NetBSD/bmake/dist: . mk unit-tests DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 1F1E3164AA To: "Simon J. Gerraty" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org References: <201510212214.t9LMENGq030089@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56280EE6.9050909@FreeBSD.org> Date: Wed, 21 Oct 2015 15:17:10 -0700 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: <201510212214.t9LMENGq030089@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tioM6CQtkjh3L2BmhcKr4qdWtuBCJVeAQ" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 22:17:09 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --tioM6CQtkjh3L2BmhcKr4qdWtuBCJVeAQ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/21/2015 3:14 PM, Simon J. Gerraty wrote: > +2015-10-12 Simon J. Gerraty > + > + * var.c: the conditional expressions used with ':?' can be > + expensive, if already discarding do not evaluate or expand > + anything.=20 > + > +2015-10-10 Simon J. Gerraty > + > + * Makefile (MAKE_VERSION): 20151010 > + Merge with NetBSD make, pick up > + o Add Boolean wantit flag to Var_Subst and Var_Parse > + when FALSE we know we are discarding the result and can > + skip operations like Cmd_Exec. Thank you! I haven't yet had a chance to try these but I do expect it to be beneficial for ports. --=20 Regards, Bryan Drewery --tioM6CQtkjh3L2BmhcKr4qdWtuBCJVeAQ 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 iQEcBAEBAgAGBQJWKA7mAAoJEDXXcbtuRpfPIw4H/jxODlwkHjZJcv+tugvUUlec w+lvx8bZpnYIVDGSH/ITVQ7VMEAQdRGhF/k8nz1Sr4lfF34aypa6e2kF77a9ECTB TBlqclJJnFfJvJoKi8AMIYLABE73LV48kfUjAaKArl/Ru8K4qi2ka7DgFrcDt06F 1z2O+i0lecjJtxnVwEMh0GFuWpMt/4dX8xaZuOq1Q41HAJLZB3hTL33gUBxYcso5 klva71vHYbo7/ebgdqdSzCL+kBDxepoHYojpjYZRL2ZK31a0+abZhjjpAUodWMFX VeJJF0W09KiisRTHF1bdOM4dmx1nqtED3ye5XK34xz4qstEYRfuPKIMxZF5kWzI= =/2Vj -----END PGP SIGNATURE----- --tioM6CQtkjh3L2BmhcKr4qdWtuBCJVeAQ-- From owner-svn-src-all@freebsd.org Wed Oct 21 22:23: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 20167A1B086; Wed, 21 Oct 2015 22:23:39 +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 DC205372; Wed, 21 Oct 2015 22:23: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 t9LMNbYf033362; Wed, 21 Oct 2015 22:23:37 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LMNbab033361; Wed, 21 Oct 2015 22:23:37 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510212223.t9LMNbab033361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 21 Oct 2015 22:23:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r289723 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 22:23:39 -0000 Author: adrian Date: Wed Oct 21 22:23:37 2015 New Revision: 289723 URL: https://svnweb.freebsd.org/changeset/base/289723 Log: Alphabetically sort things before anyone notices. Approved by: core (implicit) Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Wed Oct 21 22:15:44 2015 (r289722) +++ svnadmin/conf/mentors Wed Oct 21 22:23:37 2015 (r289723) @@ -14,6 +14,7 @@ achim scottl Co-mentor: emaste agc scottl Co-mentor: emax allanjude bapt Co-mentor: marcel araujo bapt Co-mentor: rodrigc +avos adrian benl philip Co-mentor: simon carl jimharris cherry gibbs @@ -34,4 +35,3 @@ torek rpaulo venkat delphij Co-mentor: luigi, jhb versus gavin Co-mentor: fjoe whu royger Co-mentor: gibbs -avos adrian From owner-svn-src-all@freebsd.org Wed Oct 21 22:31: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 BE7B5A1B218; Wed, 21 Oct 2015 22:31:18 +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 8C5F795C; Wed, 21 Oct 2015 22:31:18 +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 t9LMVHJf033779; Wed, 21 Oct 2015 22:31:17 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9LMVHSD033778; Wed, 21 Oct 2015 22:31:17 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201510212231.t9LMVHSD033778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 21 Oct 2015 22:31:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289724 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2015 22:31:18 -0000 Author: avos Date: Wed Oct 21 22:31:17 2015 New Revision: 289724 URL: https://svnweb.freebsd.org/changeset/base/289724 Log: Add myself (avos) to committers-src.dot Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D3941 Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Wed Oct 21 22:23:37 2015 (r289723) +++ head/share/misc/committers-src.dot Wed Oct 21 22:31:17 2015 (r289724) @@ -119,6 +119,7 @@ art [label="Artem Belevich\nart@FreeBSD. arybchik [label="Andrew Rybchenko\narybchik@FreeBSD.org\n2014/10/12"] asomers [label="Alan Somers\nasomers@FreeBSD.org\n2013/04/24"] avg [label="Andriy Gapon\navg@FreeBSD.org\n2009/02/18"] +avos [label="Andriy Voskoboinyk\navos@FreeBSD.org\n2015/09/24"] bapt [label="Baptiste Daroussin\nbapt@FreeBSD.org\n2011/12/23"] bdrewery [label="Bryan Drewery\nbdrewery@FreeBSD.org\n2013/12/14"] benl [label="Ben Laurie\nbenl@FreeBSD.org\n2011/05/18"] @@ -332,6 +333,7 @@ day1 -> rgrimes day1 -> alm day1 -> dg +adrian -> avos adrian -> loos adrian -> monthadar adrian -> ray From owner-svn-src-all@freebsd.org Thu Oct 22 00:07: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 8DB78A1A5E5; Thu, 22 Oct 2015 00:07:49 +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 66C681054; Thu, 22 Oct 2015 00:07:49 +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 t9M07mjN062247; Thu, 22 Oct 2015 00:07:48 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M07mJo062245; Thu, 22 Oct 2015 00:07:48 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510220007.t9M07mJo062245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 22 Oct 2015 00:07:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289725 - in head: . share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2015 00:07:49 -0000 Author: bdrewery Date: Thu Oct 22 00:07:48 2015 New Revision: 289725 URL: https://svnweb.freebsd.org/changeset/base/289725 Log: Let SUBDIR_OVERRIDE with 'make buildworld' be more useful. Now it can be used to effectively "build in a subdir". It will use the 'cross-tools', 'libraries', and 'includes' phases of 'buildworld' to properly setup a WORLDTMP to use. Then it will build 'everything' only in the listed SUBDIR_OVERRIDE directories. It is still required to list custom library directories in LOCAL_LIB_DIRS if SUBDIR_OVERRIDE is something that contains libraries outside of the normal area (such as SUBDIR_OVERRIDE=contrib/ofed needing LOCAL_LIB_DIRS=contrib/ofed/usr.lib) Without these changes, SUBDIR_OVERRIDE with buildworld was broken or hit obscure failures due to missing libraries, includes, or cross compiler. SUBDIR_OVERRIDE with 'make ' will continue to work as it did before although its usefulness is questionable. With a fully populated WORLDTMP, building with a SUBDIR_OVERRIDE with -DNO_CLEAN only takes a few minutes to start building the target directories. This is still much better than building unneeded things via 'everything' when testing small subset changes. A BUILDFAST or SKIPWORLDTMP might make sense for this as well. - Add in '_worldtmp' as we still need to create WORLDTMP as later targets, such as '_libraries' and '_includes' use it. This probably was avoiding calling '_worldtmp' to not remove WORLDTMP for debugging purposes, but -DNO_CLEAN can be used for that. - '_legacy' must be included since '_build-tools' uses -legacy. The SUBDIR_OVERRIDE change came in r95509, while -legacy being part of build-tools came in r113136. - 'bootstrap-tools' is still skipped as this feature is not for upgrades. - Fix buildworld combined with SUBDIR_OVERRIDE not installing all includes. The original change for SUBDIR_OVERRIDE in r95509 kept '_includes' and '_libraries' as building everything possible as the SUBDIR_OVERRIDE could need anything from them. However in r96462 the real 'includes' target was changed from manual sub-makes to just recursing 'includes' on SUBDIR, thus not all includes have been installed into WORLDTMP since then when combined with 'buildworld'. This is not done unless calling 'make buildworld' as it would be unexpected to have it go into all directories when doing 'make SUBDIR_OVERRIDE=mydir includes'. - Also need to build the cross-compiler so it is used with --sysroot. If this is burdensome then telling the build to use the local compiler as an external compiler (thus using a proper --sysroot to WORLDTMP) is possible by setting CC=/usr/bin/cc, CXX=/usr/bin/c++, etc. - Don't build the lib32 distribution with SUBDIR_OVERRIDE in buildworld since it won't contain anything related to SUBDIR_OVERRIDE. Testing of the lib32 build can be done with 'make build32'. - Document these changes in build.7 Sponsored by: EMC / Isilon Storage Division MFC after: 2 weeks Modified: head/Makefile.inc1 head/share/man/man7/build.7 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Oct 21 22:31:17 2015 (r289724) +++ head/Makefile.inc1 Thu Oct 22 00:07:48 2015 (r289725) @@ -30,6 +30,8 @@ # BUILDENV_SHELL= shell to launch for the buildenv target (def:/bin/sh) # WORLD_FLAGS= additional flags to pass to make(1) during buildworld # KERNEL_FLAGS= additional flags to pass to make(1) during buildkernel +# SUBDIR_OVERRIDE="list of dirs" to build rather than everything. +# All libraries and includes, and some build tools will still build. # # The intended user-driven targets are: @@ -59,7 +61,7 @@ # system here would require fine-grained ordering of all components based # on their dependencies. SRCDIR?= ${.CURDIR} -.if defined(SUBDIR_OVERRIDE) +.if !empty(SUBDIR_OVERRIDE) SUBDIR= ${SUBDIR_OVERRIDE} .else SUBDIR= lib libexec @@ -123,7 +125,7 @@ SUBDIR+=.WAIT .endif SUBDIR+=etc -.endif # defined(SUBDIR_OVERRIDE) +.endif # !empty(SUBDIR_OVERRIDE) .if defined(NOCLEAN) NO_CLEAN= ${NOCLEAN} @@ -631,8 +633,16 @@ _includes: @echo "--------------------------------------------------------------" @echo ">>> stage 4.1: building includes" @echo "--------------------------------------------------------------" +# Special handling for SUBDIR_OVERRIDE in buildworld as they most likely need +# headers from default SUBDIR. Do SUBDIR_OVERRIDE includes last. + ${_+_}cd ${.CURDIR}; ${WMAKE} SUBDIR_OVERRIDE= SHARED=symlinks \ + buildincludes + ${_+_}cd ${.CURDIR}; ${WMAKE} SUBDIR_OVERRIDE= SHARED=symlinks \ + installincludes +.if !empty(SUBDIR_OVERRIDE) && make(buildworld) ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks buildincludes ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks installincludes +.endif _libraries: @echo @echo "--------------------------------------------------------------" @@ -727,15 +737,13 @@ distribute32 install32: .MAKE .PHONY .endif WMAKE_TGTS= -.if !defined(SUBDIR_OVERRIDE) -WMAKE_TGTS+= _worldtmp _legacy _bootstrap-tools -.endif -WMAKE_TGTS+= _cleanobj _obj _build-tools -.if !defined(SUBDIR_OVERRIDE) -WMAKE_TGTS+= _cross-tools +WMAKE_TGTS+= _worldtmp _legacy +.if empty(SUBDIR_OVERRIDE) +WMAKE_TGTS+= _bootstrap-tools .endif +WMAKE_TGTS+= _cleanobj _obj _build-tools _cross-tools WMAKE_TGTS+= _includes _libraries _depend everything -.if defined(LIB32TMP) && ${MK_LIB32} != "no" +.if defined(LIB32TMP) && ${MK_LIB32} != "no" && empty(SUBDIR_OVERRIDE) WMAKE_TGTS+= build32 .endif Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Wed Oct 21 22:31:17 2015 (r289724) +++ head/share/man/man7/build.7 Thu Oct 22 00:07:48 2015 (r289725) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 31, 2014 +.Dd October 21, 2015 .Dt BUILD 7 .Os .Sh NAME @@ -463,7 +463,19 @@ for more details. .It Va SUBDIR_OVERRIDE Override the default list of sub-directories and only build the sub-directory named in this variable. -This variable is useful when debugging failed builds. +If combined with +.Cm buildworld +then all libraries and includes, and some of the build tools will still build +as well. +When combined with +.Cm buildworld +it is necesarry to override +.Va LOCAL_LIB_DIRS +with any custom directories containing libraries. +This allows building a subset of the system in the same way as +.Cm buildworld +does using its sysroot handling. +This variable can also be useful when debugging failed builds. .Bd -literal -offset indent make some-target SUBDIR_OVERRIDE=foo/bar .Ed From owner-svn-src-all@freebsd.org Thu Oct 22 00: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 51D86A1AB43; Thu, 22 Oct 2015 00:33:41 +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 3BD011A5A; Thu, 22 Oct 2015 00:33:41 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 348081870; Thu, 22 Oct 2015 00:33:41 +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 DE2CF166DD; Thu, 22 Oct 2015 00:33:40 +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 y8zr2d8-BgWC; Thu, 22 Oct 2015 00:33:38 +0000 (UTC) Subject: Re: svn commit: r289725 - in head: . share/man/man7 DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 1F101166D8 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510220007.t9M07mJo062245@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56282EE4.4040608@FreeBSD.org> Date: Wed, 21 Oct 2015 17:33:40 -0700 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: <201510220007.t9M07mJo062245@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="O8MrSlkj44h8P0bCbwTVPGRkhEe6xOAvr" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2015 00:33:41 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --O8MrSlkj44h8P0bCbwTVPGRkhEe6xOAvr Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/21/2015 5:07 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Thu Oct 22 00:07:48 2015 > New Revision: 289725 > URL: https://svnweb.freebsd.org/changeset/base/289725 >=20 > Log: > Let SUBDIR_OVERRIDE with 'make buildworld' be more useful. > =20 The main point is that it used to require a full buildworld first but now can work without doing that. > With a fully populated WORLDTMP, building with a SUBDIR_OVERRIDE with= > -DNO_CLEAN only takes a few minutes to start building the target > directories. This is still much better than building unneeded things= via > 'everything' when testing small subset changes. A BUILDFAST or > SKIPWORLDTMP might make sense for this as well. I do think it would be a good idea to have a BUILDFAST type thing here. I've had the same suggestion come across IRC just now. --=20 Regards, Bryan Drewery --O8MrSlkj44h8P0bCbwTVPGRkhEe6xOAvr 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 iQEcBAEBAgAGBQJWKC7kAAoJEDXXcbtuRpfPcbcIAKV25RhjDDjQX+uD2y5D7yc9 OeR2Ki0eLo/MV5KZ0K4bo63uzyCPoBA4FkVcSsGZ62gKEsW74Fco2Xkzfn3+g51/ J1VKN6U9pv8YJ0w2nT0qW64JQ/XEUwU7UB7vHdpuGfTgBOCOrEHjGk0h+uBkl2xk tAjOC6GBVnSaaYkKESzp6ysF1Vqi3Ibd72Wjaz9vkwHR3XqTbF+OtAd7J3KdAYJa 4TQIWwVdXTh8MCWD/DB5jONlbmss8hRbC2mnfKSE5wI8YkNTfHHQGiDKziLIuoAf 6MjyAcNwKgwkZQsKNIRC/gd8TchpTkbL4qowgdIAArCvD6BMgPqSgZcwpyCoKgw= =6Qts -----END PGP SIGNATURE----- --O8MrSlkj44h8P0bCbwTVPGRkhEe6xOAvr-- From owner-svn-src-all@freebsd.org Thu Oct 22 00:55: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 2C749A1B00B; Thu, 22 Oct 2015 00:55:01 +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 CFD5F123E; Thu, 22 Oct 2015 00:55:00 +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 t9M0sxZc076493; Thu, 22 Oct 2015 00:54:59 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M0sxD0076490; Thu, 22 Oct 2015 00:54:59 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510220054.t9M0sxD0076490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 22 Oct 2015 00:54:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289726 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 00:55:01 -0000 Author: ian Date: Thu Oct 22 00:54:59 2015 New Revision: 289726 URL: https://svnweb.freebsd.org/changeset/base/289726 Log: Add iicbus_transfer_excl(), a helper routine to do an i2c bus transaction while holding exclusive ownership of the bus. This is the routine most slave drivers should use unless they have a need to acquire and hold the bus across a series of related operations that involves multiple transfers. Modified: head/sys/dev/iicbus/iiconf.c head/sys/dev/iicbus/iiconf.h Modified: head/sys/dev/iicbus/iiconf.c ============================================================================== --- head/sys/dev/iicbus/iiconf.c Thu Oct 22 00:07:48 2015 (r289725) +++ head/sys/dev/iicbus/iiconf.c Thu Oct 22 00:54:59 2015 (r289726) @@ -395,6 +395,21 @@ iicbus_transfer(device_t bus, struct iic return (IICBUS_TRANSFER(device_get_parent(bus), msgs, nmsgs)); } +int +iicbus_transfer_excl(device_t dev, struct iic_msg *msgs, uint32_t nmsgs, + int how) +{ + device_t bus; + int error; + + bus = device_get_parent(dev); + error = iicbus_request_bus(bus, dev, how); + if (error == 0) + error = IICBUS_TRANSFER(bus, msgs, nmsgs); + iicbus_release_bus(bus, dev); + return (error); +} + /* * Generic version of iicbus_transfer that calls the appropriate * routines to accomplish this. See note above about acceptable Modified: head/sys/dev/iicbus/iiconf.h ============================================================================== --- head/sys/dev/iicbus/iiconf.h Thu Oct 22 00:07:48 2015 (r289725) +++ head/sys/dev/iicbus/iiconf.h Thu Oct 22 00:54:59 2015 (r289726) @@ -129,6 +129,8 @@ extern int iicbus_block_read(device_t, u /* vectors of iic operations to pass to bridge */ int iicbus_transfer(device_t bus, struct iic_msg *msgs, uint32_t nmsgs); +int iicbus_transfer_excl(device_t bus, struct iic_msg *msgs, uint32_t nmsgs, + int how); int iicbus_transfer_gen(device_t bus, struct iic_msg *msgs, uint32_t nmsgs); #define IICBUS_MODVER 1 From owner-svn-src-all@freebsd.org Thu Oct 22 01:04: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 7DEC3A1B1A1; Thu, 22 Oct 2015 01:04:33 +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 2F245177C; Thu, 22 Oct 2015 01:04:33 +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 t9M14Wrx079387; Thu, 22 Oct 2015 01:04:32 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M14WNF079386; Thu, 22 Oct 2015 01:04:32 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510220104.t9M14WNF079386@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 22 Oct 2015 01:04:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289727 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 01:04:33 -0000 Author: ian Date: Thu Oct 22 01:04:31 2015 New Revision: 289727 URL: https://svnweb.freebsd.org/changeset/base/289727 Log: Add FDT compatibility to the icee driver. The FDT bindings for eeprom parts don't include any metadata about the device other than the part name encoded in the compatible property. Instead, a driver is required to have a compiled-in table of information about the various parts (page size, device capacity, addressing scheme). So much for FDT being an abstract description of hardware characteristics, huh? In addition to the FDT-specific changes, this also switches to using the newer iicbus_transfer_excl() mechanism which holds bus ownership for the duration of the transfer. Previously this code held the bus across all the transfers needed to complete the user's IO request, which could be up to 128KB of data which might occupy the bus for 10-20 seconds. Now the bus will be released and re-aquired between every page-sized (8-256 byte) transfer, making this driver a much nicer citizen on the i2c bus. The hint-based configuration mechanism is still in place for non-FDT systems. Michal Meloun contributed some of the code for these changes. Modified: head/sys/dev/iicbus/icee.c Modified: head/sys/dev/iicbus/icee.c ============================================================================== --- head/sys/dev/iicbus/icee.c Thu Oct 22 00:54:59 2015 (r289726) +++ head/sys/dev/iicbus/icee.c Thu Oct 22 01:04:31 2015 (r289727) @@ -27,6 +27,9 @@ __FBSDID("$FreeBSD$"); /* * Generic IIC eeprom support, modeled after the AT24C family of products. */ + +#include "opt_platform.h" + #include #include #include @@ -37,26 +40,73 @@ __FBSDID("$FreeBSD$"); #include #include #include + +#ifdef FDT +#include +#include +#endif + #include #include #include "iicbus_if.h" -#define IIC_M_WR 0 /* write operation */ +/* + * AT24 parts have a "write page size" that differs per-device, and a "read page + * size" that is always equal to the full device size. We define maximum values + * here to limit how long we occupy the bus with a single transfer, and because + * there are temporary buffers of these sizes allocated on the stack. + */ #define MAX_RD_SZ 256 /* Largest read size we support */ -#define MAX_WR_SZ 256 /* Largest write size we support */ +#define MAX_WR_SZ 256 /* Largest write size we support */ struct icee_softc { - device_t sc_dev; /* Myself */ - device_t sc_busdev; /* Parent bus */ + device_t dev; /* Myself */ struct cdev *cdev; /* user interface */ - int addr; + int addr; /* Slave address on the bus */ int size; /* How big am I? */ - int type; /* What type 8 or 16 bit? */ - int rd_sz; /* What's the read page size */ + int type; /* What address type 8 or 16 bit? */ int wr_sz; /* What's the write page size */ }; +#ifdef FDT +struct eeprom_desc { + int type; + int size; + int wr_sz; + const char *name; +}; + +static struct eeprom_desc type_desc[] = { + { 8, 128, 8, "AT24C01"}, + { 8, 256, 8, "AT24C02"}, + { 8, 512, 16, "AT24C04"}, + { 8, 1024, 16, "AT24C08"}, + { 8, 2 * 1024, 16, "AT24C16"}, + {16, 4 * 1024, 32, "AT24C32"}, + {16, 8 * 1024, 32, "AT24C64"}, + {16, 16 * 1024, 64, "AT24C128"}, + {16, 32 * 1024, 64, "AT24C256"}, + {16, 64 * 1024, 128, "AT24C512"}, + {16, 128 * 1024, 256, "AT24CM01"}, +}; + +static struct ofw_compat_data compat_data[] = { + {"atmel,24c01", (uintptr_t)(&type_desc[0])}, + {"atmel,24c02", (uintptr_t)(&type_desc[1])}, + {"atmel,24c04", (uintptr_t)(&type_desc[2])}, + {"atmel,24c08", (uintptr_t)(&type_desc[3])}, + {"atmel,24c16", (uintptr_t)(&type_desc[4])}, + {"atmel,24c32", (uintptr_t)(&type_desc[5])}, + {"atmel,24c64", (uintptr_t)(&type_desc[6])}, + {"atmel,24c128", (uintptr_t)(&type_desc[7])}, + {"atmel,24c256", (uintptr_t)(&type_desc[8])}, + {"atmel,24c512", (uintptr_t)(&type_desc[9])}, + {"atmel,24c1024", (uintptr_t)(&type_desc[10])}, + {NULL, (uintptr_t)NULL}, +}; +#endif + #define CDEV2SOFTC(dev) ((dev)->si_drv1) /* cdev routines */ @@ -75,6 +125,39 @@ static struct cdevsw icee_cdevsw = .d_write = icee_write }; +#ifdef FDT +static int +icee_probe(device_t dev) +{ + struct eeprom_desc *d; + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + d = (struct eeprom_desc *) + ofw_bus_search_compatible(dev, compat_data)->ocd_data; + if (d == NULL) + return (ENXIO); + + device_set_desc(dev, d->name); + return (BUS_PROBE_DEFAULT); +} + +static void +icee_init(struct icee_softc *sc) +{ + struct eeprom_desc *d; + + d = (struct eeprom_desc *) + ofw_bus_search_compatible(sc->dev, compat_data)->ocd_data; + if (d == NULL) + return; /* attach will see sc->size == 0 and return error */ + + sc->size = d->size; + sc->type = d->type; + sc->wr_sz = d->wr_sz; +} +#else /* !FDT */ static int icee_probe(device_t dev) { @@ -83,37 +166,44 @@ icee_probe(device_t dev) return (BUS_PROBE_NOWILDCARD); } -static int -icee_attach(device_t dev) +static void +icee_init(struct icee_softc *sc) { - struct icee_softc *sc = device_get_softc(dev); const char *dname; - int dunit, err; + int dunit; - sc->sc_dev = dev; - sc->sc_busdev = device_get_parent(sc->sc_dev); - sc->addr = iicbus_get_addr(dev); - err = 0; - dname = device_get_name(dev); - dunit = device_get_unit(dev); + dname = device_get_name(sc->dev); + dunit = device_get_unit(sc->dev); resource_int_value(dname, dunit, "size", &sc->size); resource_int_value(dname, dunit, "type", &sc->type); - resource_int_value(dname, dunit, "rd_sz", &sc->rd_sz); - if (sc->rd_sz > MAX_RD_SZ) - sc->rd_sz = MAX_RD_SZ; resource_int_value(dname, dunit, "wr_sz", &sc->wr_sz); +} +#endif /* FDT */ + +static int +icee_attach(device_t dev) +{ + struct icee_softc *sc = device_get_softc(dev); + + sc->dev = dev; + sc->addr = iicbus_get_addr(dev); + icee_init(sc); + if (sc->size == 0 || sc->type == 0 || sc->wr_sz == 0) { + device_printf(sc->dev, "Missing config data, " + "these cannot be zero: size %d type %d wr_sz %d\n", + sc->size, sc->type, sc->wr_sz); + return (EINVAL); + } if (bootverbose) - device_printf(dev, "size: %d bytes bus_width: %d-bits\n", + device_printf(dev, "size: %d bytes, addressing: %d-bits\n", sc->size, sc->type); sc->cdev = make_dev(&icee_cdevsw, device_get_unit(dev), UID_ROOT, GID_WHEEL, 0600, "icee%d", device_get_unit(dev)); if (sc->cdev == NULL) { - err = ENOMEM; - goto out; + return (ENOMEM); } sc->cdev->si_drv1 = sc; -out: - return (err); + return (0); } static int @@ -149,14 +239,11 @@ icee_read(struct cdev *dev, struct uio * return (EIO); if (sc->type != 8 && sc->type != 16) return (EINVAL); - error = iicbus_request_bus(sc->sc_busdev, sc->sc_dev, IIC_INTRWAIT); - if (error!= 0) - return (iic2errno(error)); slave = error = 0; while (uio->uio_resid > 0) { if (uio->uio_offset >= sc->size) break; - len = MIN(sc->rd_sz - (uio->uio_offset & (sc->rd_sz - 1)), + len = MIN(MAX_RD_SZ - (uio->uio_offset & (MAX_RD_SZ - 1)), uio->uio_resid); switch (sc->type) { case 8: @@ -175,7 +262,7 @@ icee_read(struct cdev *dev, struct uio * } for (i = 0; i < 2; i++) msgs[i].slave = slave; - error = iicbus_transfer(sc->sc_dev, msgs, 2); + error = iicbus_transfer_excl(sc->dev, msgs, 2, IIC_INTRWAIT); if (error) { error = iic2errno(error); break; @@ -184,7 +271,6 @@ icee_read(struct cdev *dev, struct uio * if (error) break; } - iicbus_release_bus(sc->sc_busdev, sc->sc_dev); return (error); } @@ -213,9 +299,6 @@ icee_write(struct cdev *dev, struct uio if (sc->type != 8 && sc->type != 16) return (EINVAL); - error = iicbus_request_bus(sc->sc_busdev, sc->sc_dev, IIC_INTRWAIT); - if (error!= 0) - return (iic2errno(error)); slave = error = 0; while (uio->uio_resid > 0) { if (uio->uio_offset >= sc->size) @@ -239,7 +322,7 @@ icee_write(struct cdev *dev, struct uio error = uiomove(data + sc->type / 8, len, uio); if (error) break; - error = iicbus_transfer(sc->sc_dev, wr, 1); + error = iicbus_transfer_excl(sc->dev, wr, 1, IIC_INTRWAIT); if (error) { error = iic2errno(error); break; @@ -248,14 +331,14 @@ icee_write(struct cdev *dev, struct uio waitlimit = 10000; rd[0].slave = slave; do { - error = iicbus_transfer(sc->sc_dev, rd, 1); + error = iicbus_transfer_excl(sc->dev, rd, 1, + IIC_INTRWAIT); } while (waitlimit-- > 0 && error != 0); if (error) { error = iic2errno(error); break; } } - iicbus_release_bus(sc->sc_busdev, sc->sc_dev); return error; } From owner-svn-src-all@freebsd.org Thu Oct 22 01:32: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 C762FA1B6B4; Thu, 22 Oct 2015 01:32:12 +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 8F79E11FE; Thu, 22 Oct 2015 01:32:12 +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 t9M1WBFK087667; Thu, 22 Oct 2015 01:32:11 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M1WBW9087666; Thu, 22 Oct 2015 01:32:11 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510220132.t9M1WBW9087666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 22 Oct 2015 01:32:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289728 - 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: Thu, 22 Oct 2015 01:32:12 -0000 Author: emaste Date: Thu Oct 22 01:32:11 2015 New Revision: 289728 URL: https://svnweb.freebsd.org/changeset/base/289728 Log: Warn that NOCLEAN is deprecated - use NO_CLEAN instead NO_CLEAN has been the correct spelling for over a decade. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Oct 22 01:04:31 2015 (r289727) +++ head/Makefile.inc1 Thu Oct 22 01:32:11 2015 (r289728) @@ -128,6 +128,7 @@ SUBDIR+=etc .endif # !empty(SUBDIR_OVERRIDE) .if defined(NOCLEAN) +.warning NOCLEAN option is deprecated. Use NO_CLEAN instead. NO_CLEAN= ${NOCLEAN} .endif .if defined(NO_CLEANDIR) From owner-svn-src-all@freebsd.org Thu Oct 22 01:36: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 79580A1B888; Thu, 22 Oct 2015 01:36:17 +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 440DD1450; Thu, 22 Oct 2015 01:36:17 +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 t9M1aGQT087860; Thu, 22 Oct 2015 01:36:16 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M1aGJF087859; Thu, 22 Oct 2015 01:36:16 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201510220136.t9M1aGJF087859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Thu, 22 Oct 2015 01:36:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289729 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 01:36:17 -0000 Author: kevlo Date: Thu Oct 22 01:36:16 2015 New Revision: 289729 URL: https://svnweb.freebsd.org/changeset/base/289729 Log: Fix IEEE80211_ADDR_COPY() usage. Reviewed by: adrian Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Thu Oct 22 01:32:11 2015 (r289728) +++ head/sys/dev/iwm/if_iwm.c Thu Oct 22 01:36:16 2015 (r289729) @@ -2081,7 +2081,7 @@ iwm_run_init_mvm_ucode(struct iwm_softc device_printf(sc->sc_dev, "failed to read nvm\n"); return error; } - IEEE80211_ADDR_COPY(sc->sc_ic.ic_macaddr, &sc->sc_nvm.hw_addr); + IEEE80211_ADDR_COPY(sc->sc_ic.ic_macaddr, sc->sc_nvm.hw_addr); sc->sc_scan_cmd_len = sizeof(struct iwm_scan_cmd) + sc->sc_capa_max_probe_len From owner-svn-src-all@freebsd.org Thu Oct 22 01:46: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 B2D00A1BAB2; Thu, 22 Oct 2015 01:46:00 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qk0-x232.google.com (mail-qk0-x232.google.com [IPv6:2607:f8b0:400d: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 6DB6F1978; Thu, 22 Oct 2015 01:46:00 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by qkbl190 with SMTP id l190so47610000qkb.2; Wed, 21 Oct 2015 18:45:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type; bh=2QWGMRc+VJIP7uEMLZBgCIlJGL55GvNBSFfu91S+7K8=; b=QzLvboW+hyEfUtt7E8QSTJ8FcHLEL33OjsULxBRx1Uemfu2g3+OImVmTtYrcvKjoly 8TAzsBxjVGmD39rXnuW1ndHhW03Yor7yNRU193BOwaWievrAkFFw1AdGeAESm5/xP0CC 7fWiabk0aNoua4UtEi6lqg8oVvEzhiQkKvtjC8AaQGBIklEXAxkuDd+vZXQSg8FTFZtY Zgpa2SWn59EdTwM97YzBHtQvxjYPqhCpOh6IbrCNyBUgiCEb0+gQyuSmq3ZQyBCElXg7 SNfxyAsstNmQNYx5AXgecsKr6Wm6ba1SUri+2/qZNAu6PuTbIymY6AheY7O9DFmPEu21 qqHw== X-Received: by 10.55.26.14 with SMTP id a14mr14622889qka.99.1445478359344; Wed, 21 Oct 2015 18:45:59 -0700 (PDT) Received: from kan ([2601:18f:0:1570:226:18ff:fe00:232e]) by smtp.gmail.com with ESMTPSA id i34sm4468861qgd.8.2015.10.21.18.45.58 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Oct 2015 18:45:58 -0700 (PDT) Date: Wed, 21 Oct 2015 21:45:50 -0400 From: Alexander Kabaev To: Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289728 - head Message-ID: <20151021214550.70b25f13@kan> In-Reply-To: <201510220132.t9M1WBW9087666@repo.freebsd.org> References: <201510220132.t9M1WBW9087666@repo.freebsd.org> X-Mailer: Claws Mail 3.13.0 (GTK+ 2.24.28; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/YqHnDqj/mtPjNAt8f1KdOMh"; protocol="application/pgp-signature" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2015 01:46:00 -0000 --Sig_/YqHnDqj/mtPjNAt8f1KdOMh Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 22 Oct 2015 01:32:11 +0000 (UTC) Ed Maste wrote: > Author: emaste > Date: Thu Oct 22 01:32:11 2015 > New Revision: 289728 > URL: https://svnweb.freebsd.org/changeset/base/289728 >=20 > Log: > Warn that NOCLEAN is deprecated - use NO_CLEAN instead > =20 > NO_CLEAN has been the correct spelling for over a decade. >=20 > Modified: > head/Makefile.inc1 >=20 > Modified: head/Makefile.inc1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/Makefile.inc1 Thu Oct 22 01:04:31 2015 > (r289727) +++ head/Makefile.inc1 Thu Oct 22 01:32:11 > 2015 (r289728) @@ -128,6 +128,7 @@ SUBDIR+=3Detc > .endif # !empty(SUBDIR_OVERRIDE) > =20 > .if defined(NOCLEAN) > +.warning NOCLEAN option is deprecated. Use NO_CLEAN instead. > NO_CLEAN=3D ${NOCLEAN} > .endif > .if defined(NO_CLEANDIR) For some definition of 'correct'. It definitely is not for those who have -DNOCLEAN wired into their finger memory and above mentioned decade did not help with that any. I think some of the common spellings were left as is in great NO_ revolution for a reason and I see no reason why the sudden itch to change that. --=20 Alexander Kabaev --Sig_/YqHnDqj/mtPjNAt8f1KdOMh Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJWKD/OXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDNUY3RDk5NTk5QjY0MUUxM0M1MTU2OTEw NzEzMjI5OTkyNzkyRTdFAAoJEAcTIpmSeS5+zV4P/3NGaQx+0Jm9HMD3PQvWOpiv z0/T97bjxh4tGZut8QWFWMFRGaWaDZur9cKJbFdQAVr9LWRGgTcdH3uh3FtYbc5p ww2kPtcfU3Ph5jp6m5/akrX+25tS9fE2XcgBt7vYPIxFCOGRTslr9tlbOYWFwx7+ fG68CPPxCplKqFOLCvTbcMUgViDNXeqCxaSYRy2mUxxdLNn0YqrANCAEsBXmlVsI KBtLcgGARXeV0MhBaQrxn2VUjVqmGSjDISGASQ/UbtG3t1Vc95xmVNYLyQPiLWCX PkysoPMx4NhlUpOifWFEiOrKXjF72zzZAxjpyQX3TSxeSMemDJzWBPkIHxfluVGW GekwbHee255cUGqC5lMEXE3UWVmzIJt7rAxGuDsXkZPlQmAAoWuqk0wPP4SYrPhN ZS83ASCrC9xyYnci47LcOKeg5bpBiR16znQH886EAl5WZsE+PVYwuPdamIO1a9WD ueUF8OVv7jJB9m7JSISmiwibH8D4brLHDqc9zyRkuDzx4+77AotH99kPSbUnIJxU oE/xKf61eHHUy8ISptETc+PR+k2JZOxXcv4gtk/vKA+gCvIxpeVL+cz2LboNkaeW iQWt0xFc68eG2RhmO/u+X5ILxBnD/68CC0l+Evop2mVt1NEJNVziMIFJkZG4+HC5 G9l9M4/qve0/Cb7hIbB+ =d68+ -----END PGP SIGNATURE----- --Sig_/YqHnDqj/mtPjNAt8f1KdOMh-- From owner-svn-src-all@freebsd.org Thu Oct 22 01:59: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 673ECA1BD0A; Thu, 22 Oct 2015 01:59:29 +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 44AAB1E71; Thu, 22 Oct 2015 01:59:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 3D5CD18E9; Thu, 22 Oct 2015 01:59:29 +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 E88B616871; Thu, 22 Oct 2015 01:59:28 +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 Re_bs2o9J7LM; Thu, 22 Oct 2015 01:59:26 +0000 (UTC) Subject: Re: svn commit: r289728 - head DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com E81111686C To: Alexander Kabaev , Ed Maste References: <201510220132.t9M1WBW9087666@repo.freebsd.org> <20151021214550.70b25f13@kan> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56284302.8030104@FreeBSD.org> Date: Wed, 21 Oct 2015 18:59:30 -0700 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: <20151021214550.70b25f13@kan> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kfgpee45XuL8FLa0BAhNhO1ko6hbCHnje" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2015 01:59:29 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --kfgpee45XuL8FLa0BAhNhO1ko6hbCHnje Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10/21/2015 6:45 PM, Alexander Kabaev wrote: > On Thu, 22 Oct 2015 01:32:11 +0000 (UTC) > Ed Maste wrote: >=20 >> Author: emaste >> Date: Thu Oct 22 01:32:11 2015 >> New Revision: 289728 >> URL: https://svnweb.freebsd.org/changeset/base/289728 >> >> Log: >> Warn that NOCLEAN is deprecated - use NO_CLEAN instead >> =20 >> NO_CLEAN has been the correct spelling for over a decade. >> >> Modified: >> head/Makefile.inc1 >> >> Modified: head/Makefile.inc1 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/Makefile.inc1 Thu Oct 22 01:04:31 2015 >> (r289727) +++ head/Makefile.inc1 Thu Oct 22 01:32:11 >> 2015 (r289728) @@ -128,6 +128,7 @@ SUBDIR+=3Detc >> .endif # !empty(SUBDIR_OVERRIDE) >> =20 >> .if defined(NOCLEAN) >> +.warning NOCLEAN option is deprecated. Use NO_CLEAN instead. >> NO_CLEAN=3D ${NOCLEAN} >> .endif >> .if defined(NO_CLEANDIR) >=20 >=20 > For some definition of 'correct'. It definitely is not for those who > have -DNOCLEAN wired into their finger memory and above mentioned > decade did not help with that any. >=20 > I think some of the common spellings were left as is in great NO_ > revolution for a reason and I see no reason why the sudden itch to > change that. >=20 I almost argued against this before it went in but I felt I had outspent my negative credits for the week on gdb->lldb and login(1) and stayed out of it. I've always been confused on the "correct" spelling and usually go open the file to see which is supported. I do see both being suggested often though and see that at work our build configuration does use -DNOCLEAN too (not my change). This is something that doesn't seem worth hassling people over. --=20 Regards, Bryan Drewery --kfgpee45XuL8FLa0BAhNhO1ko6hbCHnje 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 iQEcBAEBAgAGBQJWKEMCAAoJEDXXcbtuRpfPhSMIAKfoSGrD9JsdL1Kx0Axo1hBk K9BEEPcAcY5dsIHM/tirUVuSYS7iiMkTis3TQ1LAdgyT264CRg8Oczdx/wZ/TjJy ZiG9cKVCnYwJ98fOD/pLyJisp1b2hkApez2RnhRQRC42jcdunfUtOb8DYGDMWvif NtwgiA9o1oFCk9k/hTkPEQDcdP8tGcoMbGDcczuh/EnRCyCjTj7iSVs3KUAC6Pwx YqyxZTEhNsm/eZbTWtzPX772vF9mPe52PHcjhNcMcXAYUh1jrZwAU6s3pv8ILZGh CEELpehqoWnqOfR36rFc/6880AOKEPyKwBHoxwpep+G0Toi/BkelqZt0VGPzbhk= =QN/k -----END PGP SIGNATURE----- --kfgpee45XuL8FLa0BAhNhO1ko6hbCHnje-- From owner-svn-src-all@freebsd.org Thu Oct 22 02:09: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 5AC7BA1BF06; Thu, 22 Oct 2015 02:09:18 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::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 2741A1326; Thu, 22 Oct 2015 02:09:18 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by iow1 with SMTP id 1so77621577iow.1; Wed, 21 Oct 2015 19:09:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=i4ROahz7t1wMgFoHpUxO1J47TMbYUjGsnboRfxwuXi0=; b=wPI8OIkUreWjSWBANQFfVyAcRdKBGP2BkDSpqIxE9b1GPujBpQMAMuDKs7VfdtIOCC Qjd6RGJemKOjcg5mqmH+PHyfXwjlhl7gguhsZnnkHR+paQee5obFpdhViT83oYiYVMOm oTKDH14UdIOrJrCGU6U4OjoFpf8eiIJ8SDCZMWL7omVHLPGzmd0RnhwHaVN2DhQJJvDB ZM6MrBpoAGvordsZ1HcilyMOqF5bzyG9w2ksA0lgutz5TJTciOiy7gsTe77mfak+VV2p uJlGgsfyjrl9t5IrmULtqN0AQN7MYuee6+PpahtfKbeWk92hi9/QDXqnz7CFZOcxfJ3w mG+Q== X-Received: by 10.107.155.16 with SMTP id d16mr2929796ioe.38.1445479756608; Wed, 21 Oct 2015 19:09:16 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.158.75 with HTTP; Wed, 21 Oct 2015 19:08:57 -0700 (PDT) In-Reply-To: <56284302.8030104@FreeBSD.org> References: <201510220132.t9M1WBW9087666@repo.freebsd.org> <20151021214550.70b25f13@kan> <56284302.8030104@FreeBSD.org> From: Ed Maste Date: Thu, 22 Oct 2015 02:08:57 +0000 X-Google-Sender-Auth: gKLmqfY0M6h7xtHi5OiaHO9Acus Message-ID: Subject: Re: svn commit: r289728 - head To: Bryan Drewery Cc: Alexander Kabaev , "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: Thu, 22 Oct 2015 02:09:18 -0000 On 22 October 2015 at 01:59, Bryan Drewery wrote: > > I've always been confused on the "correct" spelling and usually go open > the file to see which is supported. That's why I added it, to avoid developers having to go spelunking in search of the "correct" spelling. I'll track down mentions of NOCLEAN in our docs etc., and see what other reports come out as a result of this warning. If it turns out to be an annoyance I'm happy to revert and add a comment instead, but would like to leave it for a while. From owner-svn-src-all@freebsd.org Thu Oct 22 02:11: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 8F038A1B087; Thu, 22 Oct 2015 02:11:42 +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 6F6231868; Thu, 22 Oct 2015 02:11:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 68CAB1DD6; Thu, 22 Oct 2015 02:11:42 +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 28240168A2; Thu, 22 Oct 2015 02:11:42 +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 U4Ilx_orQYH5; Thu, 22 Oct 2015 02:11:40 +0000 (UTC) Subject: Re: svn commit: r289728 - head DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com AE8BE1689D To: Ed Maste References: <201510220132.t9M1WBW9087666@repo.freebsd.org> <20151021214550.70b25f13@kan> <56284302.8030104@FreeBSD.org> Cc: Alexander Kabaev , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <562845DF.80306@FreeBSD.org> Date: Wed, 21 Oct 2015 19:11:43 -0700 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: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7oouBxpRB1gJMmEjujEOg4sj5V9qnQNdE" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2015 02:11:42 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --7oouBxpRB1gJMmEjujEOg4sj5V9qnQNdE Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/21/2015 7:08 PM, Ed Maste wrote: > On 22 October 2015 at 01:59, Bryan Drewery wrote= : >> >> I've always been confused on the "correct" spelling and usually go ope= n >> the file to see which is supported. >=20 > That's why I added it, to avoid developers having to go spelunking in > search of the "correct" spelling. I'll track down mentions of NOCLEAN > in our docs etc., and see what other reports come out as a result of > this warning. >=20 > If it turns out to be an annoyance I'm happy to revert and add a > comment instead, but would like to leave it for a while. >=20 Sounds reasonable. --=20 Regards, Bryan Drewery --7oouBxpRB1gJMmEjujEOg4sj5V9qnQNdE 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 iQEcBAEBAgAGBQJWKEXgAAoJEDXXcbtuRpfPVV4IAJuQz2jDoqh4alzINmzF4hhb CCG10KvcB0xgxXfDL56sOF2ax6EFzCypzYg2v7MY/Xe2TdWJbUPcOVOEokm6+p19 jYWl/N0R590Z6OsZiQp2hzl8INbXV/MhVfbvIlJle4H9ifkaTa3xPu8hIF8BSndO 9Usb/QBYkJm5Jr5qUEx1l66ND3efpGJR9c1zwc5Sn3Znsr3+aipUSaBiXtYFFsIT vRmo4nv9dECSrrVCRc2FK2MfIAVpRyUkM7niv3bRmdw/KMrxZ7NuOGpvOdFE1RIz P8b96qgnm07bvnl5qVmGcBDT/PYnA/gtOIs56jtSbddMlPxxxZZxMy0Q17RTJ50= =2wQl -----END PGP SIGNATURE----- --7oouBxpRB1gJMmEjujEOg4sj5V9qnQNdE-- From owner-svn-src-all@freebsd.org Thu Oct 22 02:46: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 DF17FA1B527 for ; Thu, 22 Oct 2015 02:46:16 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) (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 B50C5136B for ; Thu, 22 Oct 2015 02:46:16 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by pacfv9 with SMTP id fv9so75877488pac.3 for ; Wed, 21 Oct 2015 19:46:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=E9Bp/8T8FIRWMR+6sZ4tNWHg/Zy5WBSWO7nSHAtZHUo=; b=FHRHHCBgUe0BfMGjsez1RfYAHVENUBb5J0Q5d6xb+AybQhBrMdx7MmGtZv3+SERHiZ ISnKjPFBqnXTPWLWdE0DhBWrfXlxhL/+3uej7mYyMYD90jm5cDFE5EneXkgCLE0DfjAx eHFr/6VK3AfOE01ywhi8lzhymYn1M7s/y12+vXPv3ky1lVrSPzW4kWWhH9CrnmIw6yh4 bHrD3ZQbCvr2dJALa7/FCqsDDfY9bmwU/n56o70ISvbBGUmrzWda0R8KxDELfs7IW3gp 7JX1Z2YpNV2Crqn9jxR+64XBc3G+pvVo0OVnt2tLD37dc3k6QZYhXcv5ksOUQS09pmsN 85wg== X-Gm-Message-State: ALoCoQkBBd1Ij0cBPkGoAWTXIeg4fEnaJE1Hj9sGOlx8YNtvm4XZ2zh/YwLn91SPE0V6o61JfkgC X-Received: by 10.68.250.163 with SMTP id zd3mr14674302pbc.23.1445481970576; Wed, 21 Oct 2015 19:46:10 -0700 (PDT) Received: from [100.127.128.44] ([69.53.245.4]) by smtp.gmail.com with ESMTPSA id ip7sm4764326pbd.49.2015.10.21.19.46.09 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Oct 2015 19:46:10 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r289728 - head Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_84FA71B8-955D-4F11-88D9-166CDDE6FAA0"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5.2 From: Warner Losh In-Reply-To: <20151021214550.70b25f13@kan> Date: Wed, 21 Oct 2015 20:46:07 -0600 Cc: Ed Maste , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <58F602B5-1F88-48C1-B248-0328437E9D8B@bsdimp.com> References: <201510220132.t9M1WBW9087666@repo.freebsd.org> <20151021214550.70b25f13@kan> To: Alexander Kabaev 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: Thu, 22 Oct 2015 02:46:17 -0000 --Apple-Mail=_84FA71B8-955D-4F11-88D9-166CDDE6FAA0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Oct 21, 2015, at 7:45 PM, Alexander Kabaev = wrote: >=20 > On Thu, 22 Oct 2015 01:32:11 +0000 (UTC) > Ed Maste wrote: >=20 >> Author: emaste >> Date: Thu Oct 22 01:32:11 2015 >> New Revision: 289728 >> URL: https://svnweb.freebsd.org/changeset/base/289728 >>=20 >> Log: >> Warn that NOCLEAN is deprecated - use NO_CLEAN instead >>=20 >> NO_CLEAN has been the correct spelling for over a decade. >>=20 >> Modified: >> head/Makefile.inc1 >>=20 >> Modified: head/Makefile.inc1 >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/Makefile.inc1 Thu Oct 22 01:04:31 2015 >> (r289727) +++ head/Makefile.inc1 Thu Oct 22 01:32:11 >> 2015 (r289728) @@ -128,6 +128,7 @@ SUBDIR+=3Detc >> .endif # !empty(SUBDIR_OVERRIDE) >>=20 >> .if defined(NOCLEAN) >> +.warning NOCLEAN option is deprecated. Use NO_CLEAN instead. >> NO_CLEAN=3D ${NOCLEAN} >> .endif >> .if defined(NO_CLEANDIR) >=20 >=20 > For some definition of 'correct'. It definitely is not for those who > have -DNOCLEAN wired into their finger memory and above mentioned > decade did not help with that any. >=20 > I think some of the common spellings were left as is in great NO_ > revolution for a reason and I see no reason why the sudden itch to > change that. There=E2=80=99s no sudden itch. We=E2=80=99ve been scratching at the = NO_ irritants in the tree regularly for years, and more regularly in the past year. I eliminated a boatload of them 9 months ago. More will go away. Warner --Apple-Mail=_84FA71B8-955D-4F11-88D9-166CDDE6FAA0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJWKE3wAAoJEGwc0Sh9sBEAci8QAN7AFfFce84BmMbrBZ2dV+hH hUuOjT9dZIMeMUZT2EtSXY0VDsSmMnfvr3cwY6ATS9HcqiveXI8ooFm+Iv/Th/Kl OQE1Aq02OQTdd8qyTe1JQVjWOPCM1DMtGSozpucaBG++2Dc2jOWuIAYt1jzd1hHN 1DtNJmaSWLYkO2Xx+C8RqewWEPw7DvpbINtEBXRX60FL1k+aUQ+WX2tqI6ME50vt OwMaikqu3TVmletoEqE0B0EZyZ2+CxxoZE/jLo7OiDaeP2HqvD+sGHggIiqa96U9 scnwx9oaV6NdlMgF1rupYxshu5Y3oL0OtB3gqVNPueYKh5EU+iTEdM1f9SlexaKJ MQWlqBcYmXdyIdkyVW8I2YEs3XX8DcOGZDA/dll9JSkAlF3Sf/6GWzWP99qesefO G86M9gEbmtcKaNyo6S4RosIcfOpF/VtCiA069OjRgkQqqtUOYUXEK9MATJGBn8Y6 tpErMup2CIsMFOwJtdV97dw+rvqBCGxE5t6ZRpws1xoLZoIIr4rvyoEspeu9IQNi qd1iDgyTJRiauIXEhG2B+OdKpF/bwO2T8X8CVN7xLppmwrZxEYsivuJ5KSa3ytIb q0E3eCcMMkg6latFmi5QAFvnZ8+13wA39q1t2z4zQ2TrfALdQ4MSYZxwHnxGd9tB OAv5witMlpccZdGsL+HU =PKFD -----END PGP SIGNATURE----- --Apple-Mail=_84FA71B8-955D-4F11-88D9-166CDDE6FAA0-- From owner-svn-src-all@freebsd.org Thu Oct 22 03:51: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 34645A1B61D; Thu, 22 Oct 2015 03:51:27 +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 E8AD318E6; Thu, 22 Oct 2015 03:51: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 t9M3pQpG028103; Thu, 22 Oct 2015 03:51:26 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M3pP5B028098; Thu, 22 Oct 2015 03:51:25 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510220351.t9M3pP5B028098@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 22 Oct 2015 03:51:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289730 - in head: contrib/groff/tmac contrib/mdocml lib/libgpib targets/pseudo/userland/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, 22 Oct 2015 03:51:27 -0000 Author: bdrewery Date: Thu Oct 22 03:51:25 2015 New Revision: 289730 URL: https://svnweb.freebsd.org/changeset/base/289730 Log: Remove more disconnected libgpib items missed in r276214. Sponsored by: EMC / Isilon Storage Division Deleted: head/lib/libgpib/ Modified: head/contrib/groff/tmac/doc-syms head/contrib/groff/tmac/groff_mdoc.man head/contrib/mdocml/lib.in head/targets/pseudo/userland/lib/Makefile.depend Modified: head/contrib/groff/tmac/doc-syms ============================================================================== --- head/contrib/groff/tmac/doc-syms Thu Oct 22 01:36:16 2015 (r289729) +++ head/contrib/groff/tmac/doc-syms Thu Oct 22 03:51:25 2015 (r289730) @@ -780,7 +780,6 @@ .ds doc-str-Lb-libfetch File Transfer Library for URLs (libfetch, \-lfetch) .ds doc-str-Lb-libform Curses Form Library (libform, \-lform) .ds doc-str-Lb-libgeom Userland API Library for kernel GEOM subsystem (libgeom, \-lgeom) -.ds doc-str-Lb-libgpib General-Purpose Instrument Bus (GPIB) library (libgpib, \-lgpib) .ds doc-str-Lb-libi386 i386 Architecture Library (libi386, \-li386) .ds doc-str-Lb-libintl Internationalized Message Handling Library (libintl, \-lintl) .ds doc-str-Lb-libipsec IPsec Policy Control Library (libipsec, \-lipsec) Modified: head/contrib/groff/tmac/groff_mdoc.man ============================================================================== --- head/contrib/groff/tmac/groff_mdoc.man Thu Oct 22 01:36:16 2015 (r289729) +++ head/contrib/groff/tmac/groff_mdoc.man Thu Oct 22 03:51:25 2015 (r289730) @@ -1732,8 +1732,6 @@ and their results are: .Lb libform .It Li libgeom .Lb libgeom -.It Li libgpib -.Lb libgpib .It Li libi386 .Lb libi386 .It Li libintl Modified: head/contrib/mdocml/lib.in ============================================================================== --- head/contrib/mdocml/lib.in Thu Oct 22 01:36:16 2015 (r289729) +++ head/contrib/mdocml/lib.in Thu Oct 22 03:51:25 2015 (r289730) @@ -57,7 +57,6 @@ LINE("libfsid", "Filesystem Identificat LINE("libftpio", "FTP Connection Management Library (libftpio, \\-lftpio)") LINE("libform", "Curses Form Library (libform, \\-lform)") LINE("libgeom", "Userland API Library for Kernel GEOM subsystem (libgeom, \\-lgeom)") -LINE("libgpib", "General-Purpose Instrument Bus (GPIB) library (libgpib, \\-lgpib)") LINE("libgpio", "General-Purpose Input Output (GPIO) library (libgpio, \\-lgpio)") LINE("libhammer", "HAMMER Filesystem Userland Library (libhammer, \\-lhammer)") LINE("libi386", "i386 Architecture Library (libi386, \\-li386)") Modified: head/targets/pseudo/userland/lib/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/lib/Makefile.depend Thu Oct 22 01:36:16 2015 (r289729) +++ head/targets/pseudo/userland/lib/Makefile.depend Thu Oct 22 03:51:25 2015 (r289730) @@ -42,7 +42,6 @@ DIRDEPS = \ lib/libexpat \ lib/libfetch \ lib/libgeom \ - lib/libgpib \ lib/libgssapi \ lib/libiconv_modules/BIG5 \ lib/libiconv_modules/DECHanyu \ From owner-svn-src-all@freebsd.org Thu Oct 22 04:28: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 04E8CA1BC86; Thu, 22 Oct 2015 04:28:24 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2EC817C3; Thu, 22 Oct 2015 04:28:23 +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 t9M4SM1l038748; Thu, 22 Oct 2015 04:28:22 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M4SM4U038747; Thu, 22 Oct 2015 04:28:22 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510220428.t9M4SM4U038747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 22 Oct 2015 04:28:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289731 - 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, 22 Oct 2015 04:28:24 -0000 Author: bdrewery Date: Thu Oct 22 04:28:22 2015 New Revision: 289731 URL: https://svnweb.freebsd.org/changeset/base/289731 Log: Clean up some bsd.crunchgen.mk issues. - Remove handling of 'make -P' since that is for fmake only. - Add '+' where appropriate for sub-make calls. - Pass MK_TESTS=no to all of the sub-makes to prevent recursing into test directories for targets such as 'obj', 'clean', 'depend', etc. 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 Thu Oct 22 03:51:25 2015 (r289730) +++ head/share/mk/bsd.crunchgen.mk Thu Oct 22 04:28:22 2015 (r289731) @@ -107,26 +107,27 @@ $(CONF): Makefile .endfor CRUNCHGEN?= crunchgen -# XXX Make sure we don't pass -P to crunchgen(1). -.MAKEFLAGS:= ${.MAKEFLAGS:N-P} +CRUNCHENV?= MK_TESTS=no .ORDER: $(OUTPUTS) objs $(OUTPUTS): $(CONF) .META MAKE=${MAKE} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${CRUNCHGEN} -fq -m $(OUTMK) \ -c $(OUTC) $(CONF) +# These 2 targets cannot use .MAKE since they depend on the generated +# ${OUTMK} above. $(PROG): $(OUTPUTS) objs - MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) exe + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) exe objs: $(OUTMK) - MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) objs + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) objs # Someone should replace the bin/csh and bin/sh build-tools with # shell scripts so we can remove this nonsense. build-tools: .for _tool in $(CRUNCH_BUILDTOOLS) - cd $(.CURDIR)/../../${_tool}; \ - MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} obj; \ - MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} build-tools + ${_+_}cd $(.CURDIR)/../../${_tool}; \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} obj; \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} build-tools .endfor # Use a separate build tree to hold files compiled for this crunchgen binary @@ -137,12 +138,12 @@ cleandepend cleandir obj objlink: .for D in $(CRUNCH_SRCDIRS) .for P in $(CRUNCH_PROGS_$(D)) .ifdef CRUNCH_SRCDIR_${P} - cd ${CRUNCH_SRCDIR_$(P)} && \ - MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ + ${_+_}cd ${CRUNCH_SRCDIR_$(P)} && \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} .else - cd $(.CURDIR)/../../${D}/${P} && \ - MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ + ${_+_}cd $(.CURDIR)/../../${D}/${P} && \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} .endif .endfor @@ -150,18 +151,18 @@ cleandepend cleandir obj objlink: clean: rm -f ${CLEANFILES} - if [ -e ${.OBJDIR}/$(OUTMK) ]; then \ - MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) clean; \ + ${_+_}if [ -e ${.OBJDIR}/$(OUTMK) ]; then \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) clean; \ fi .for D in $(CRUNCH_SRCDIRS) .for P in $(CRUNCH_PROGS_$(D)) .ifdef CRUNCH_SRCDIR_${P} - cd ${CRUNCH_SRCDIR_$(P)} && \ - MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ + ${_+_}cd ${CRUNCH_SRCDIR_$(P)} && \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} .else - cd $(.CURDIR)/../../${D}/${P} && \ - MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ + ${_+_}cd $(.CURDIR)/../../${D}/${P} && \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} .endif .endfor From owner-svn-src-all@freebsd.org Thu Oct 22 04:33: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 0AF1BA1BDF3; Thu, 22 Oct 2015 04:33:07 +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 AD7A91B93; Thu, 22 Oct 2015 04:33:06 +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 t9M4X5bH041501; Thu, 22 Oct 2015 04:33:05 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M4X5hL041498; Thu, 22 Oct 2015 04:33:05 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510220433.t9M4X5hL041498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 22 Oct 2015 04:33:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289732 - head/sys/dev/ioat X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 04:33:07 -0000 Author: cem Date: Thu Oct 22 04:33:05 2015 New Revision: 289732 URL: https://svnweb.freebsd.org/changeset/base/289732 Log: ioat: Define IOAT_XFERCAP_VALID_MASK and use in ioat_read_xfercap Instead of ANDing a magic constant later. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat.c head/sys/dev/ioat/ioat_hw.h head/sys/dev/ioat/ioat_internal.h Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Thu Oct 22 04:28:22 2015 (r289731) +++ head/sys/dev/ioat/ioat.c Thu Oct 22 04:33:05 2015 (r289732) @@ -341,9 +341,6 @@ ioat3_attach(device_t device) capabilities = ioat_read_dmacapability(ioat); xfercap = ioat_read_xfercap(ioat); - - /* Only bits [4:0] are valid. */ - xfercap &= 0x1f; ioat->max_xfer_size = 1 << xfercap; /* TODO: need to check DCA here if we ever do XOR/PQ */ Modified: head/sys/dev/ioat/ioat_hw.h ============================================================================== --- head/sys/dev/ioat/ioat_hw.h Thu Oct 22 04:28:22 2015 (r289731) +++ head/sys/dev/ioat/ioat_hw.h Thu Oct 22 04:33:05 2015 (r289732) @@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$"); #define IOAT_CHANCNT_OFFSET 0x00 #define IOAT_XFERCAP_OFFSET 0x01 +/* Only bits [4:0] are valid. */ +#define IOAT_XFERCAP_VALID_MASK 0x1f #define IOAT_GENCTRL_OFFSET 0x02 Modified: head/sys/dev/ioat/ioat_internal.h ============================================================================== --- head/sys/dev/ioat/ioat_internal.h Thu Oct 22 04:28:22 2015 (r289731) +++ head/sys/dev/ioat/ioat_internal.h Thu Oct 22 04:33:05 2015 (r289732) @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$"); ioat_read_1((ioat), IOAT_CHANCNT_OFFSET) #define ioat_read_xfercap(ioat) \ - ioat_read_1((ioat), IOAT_XFERCAP_OFFSET) + (ioat_read_1((ioat), IOAT_XFERCAP_OFFSET) & IOAT_XFERCAP_VALID_MASK) #define ioat_write_intrctrl(ioat, value) \ ioat_write_1((ioat), IOAT_INTRCTRL_OFFSET, (value)) From owner-svn-src-all@freebsd.org Thu Oct 22 04:38: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 A15A0A1BEA7; Thu, 22 Oct 2015 04:38:07 +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 664C71DA9; Thu, 22 Oct 2015 04:38:07 +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 t9M4c6pr041739; Thu, 22 Oct 2015 04:38:06 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M4c67v041733; Thu, 22 Oct 2015 04:38:06 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510220438.t9M4c67v041733@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 22 Oct 2015 04:38:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289733 - in head: sys/dev/ioat tools/tools/ioat X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 04:38:07 -0000 Author: cem Date: Thu Oct 22 04:38:05 2015 New Revision: 289733 URL: https://svnweb.freebsd.org/changeset/base/289733 Log: Improve flexibility of ioat_test / ioatcontrol(8) The test logic now preallocates memory before running the test. The buffer size is now configurable. Post-copy verification is configurable. The number of copies to chain into one transaction (one interrupt) is configurable. A 'duration' mode is added, which repeats the test until the duration has elapsed, reporting the B/s and transactions completed. ioatcontrol.8 has been updated to document the new arguments. Initial limits (on this particular Broadwell-DE) (and when the interrupts are working) seem to be: 256 interrupts/sec or ~6 GB/s, whichever limit is more restrictive. Unfortunately, it seems the interrupt-reset handling on Broadwell isn't working as intended. That will be fixed in a later commit. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat_test.c head/sys/dev/ioat/ioat_test.h head/tools/tools/ioat/Makefile head/tools/tools/ioat/ioatcontrol.8 head/tools/tools/ioat/ioatcontrol.c Modified: head/sys/dev/ioat/ioat_test.c ============================================================================== --- head/sys/dev/ioat/ioat_test.c Thu Oct 22 04:33:05 2015 (r289732) +++ head/sys/dev/ioat/ioat_test.c Thu Oct 22 04:38:05 2015 (r289733) @@ -51,18 +51,28 @@ __FBSDID("$FreeBSD$"); #include "ioat_internal.h" #include "ioat_test.h" +#ifndef time_after +#define time_after(a,b) ((long)(b) - (long)(a) < 0) +#endif + MALLOC_DEFINE(M_IOAT_TEST, "ioat_test", "ioat test allocations"); -#define IOAT_TEST_SIZE 0x40000 -#define IOAT_MAX_BUFS 8 +#define IOAT_MAX_BUFS 256 struct test_transaction { - uint8_t num_buffers; void *buf[IOAT_MAX_BUFS]; uint32_t length; + uint32_t depth; struct ioat_test *test; + TAILQ_ENTRY(test_transaction) entry; }; +#define IT_LOCK() mtx_lock(&ioat_test_lk) +#define IT_UNLOCK() mtx_unlock(&ioat_test_lk) +#define IT_ASSERT() mtx_assert(&ioat_test_lk, MA_OWNED) +static struct mtx ioat_test_lk; +MTX_SYSINIT(ioat_test_lk, &ioat_test_lk, "test coordination mtx", MTX_DEF); + static int g_thread_index = 1; static struct cdev *g_ioat_cdev = NULL; @@ -73,7 +83,7 @@ ioat_test_transaction_destroy(struct tes for (i = 0; i < IOAT_MAX_BUFS; i++) { if (tx->buf[i] != NULL) { - contigfree(tx->buf[i], IOAT_TEST_SIZE, M_IOAT_TEST); + contigfree(tx->buf[i], tx->length, M_IOAT_TEST); tx->buf[i] = NULL; } } @@ -82,17 +92,16 @@ ioat_test_transaction_destroy(struct tes } static struct -test_transaction *ioat_test_transaction_create(uint8_t num_buffers, +test_transaction *ioat_test_transaction_create(unsigned num_buffers, uint32_t buffer_size) { struct test_transaction *tx; - int i; + unsigned i; - tx = malloc(sizeof(struct test_transaction), M_IOAT_TEST, M_NOWAIT | M_ZERO); + tx = malloc(sizeof(*tx), M_IOAT_TEST, M_NOWAIT | M_ZERO); if (tx == NULL) return (NULL); - tx->num_buffers = num_buffers; tx->length = buffer_size; for (i = 0; i < num_buffers; i++) { @@ -107,6 +116,18 @@ test_transaction *ioat_test_transaction_ return (tx); } +static bool +ioat_compare_ok(struct test_transaction *tx) +{ + uint32_t i; + + for (i = 0; i < tx->depth; i++) { + if (memcmp(tx->buf[2*i], tx->buf[2*i+1], tx->length) != 0) + return (false); + } + return (true); +} + static void ioat_dma_test_callback(void *arg) { @@ -116,82 +137,195 @@ ioat_dma_test_callback(void *arg) tx = arg; test = tx->test; - if (memcmp(tx->buf[0], tx->buf[1], tx->length) != 0) { + if (test->verify && !ioat_compare_ok(tx)) { ioat_log_message(0, "miscompare found\n"); - test->status = IOAT_TEST_MISCOMPARE; + atomic_add_32(&test->status[IOAT_TEST_MISCOMPARE], tx->depth); + } else if (!test->too_late) + atomic_add_32(&test->status[IOAT_TEST_OK], tx->depth); + + IT_LOCK(); + TAILQ_REMOVE(&test->pend_q, tx, entry); + TAILQ_INSERT_TAIL(&test->free_q, tx, entry); + wakeup(&test->free_q); + IT_UNLOCK(); +} + +static int +ioat_test_prealloc_memory(struct ioat_test *test, int index) +{ + uint32_t i, j, k; + struct test_transaction *tx; + + for (i = 0; i < test->transactions; i++) { + tx = ioat_test_transaction_create(test->chain_depth * 2, + test->buffer_size); + if (tx == NULL) { + ioat_log_message(0, "tx == NULL - memory exhausted\n"); + test->status[IOAT_TEST_NO_MEMORY]++; + return (ENOMEM); + } + + TAILQ_INSERT_HEAD(&test->free_q, tx, entry); + + tx->test = test; + tx->depth = test->chain_depth; + + /* fill in source buffers */ + for (j = 0; j < (tx->length / sizeof(uint32_t)); j++) { + uint32_t val = j + (index << 28); + + for (k = 0; k < test->chain_depth; k++) { + ((uint32_t *)tx->buf[2*k])[j] = ~val; + ((uint32_t *)tx->buf[2*k+1])[j] = val; + } + } } - atomic_add_32(&test->num_completions, 1); - ioat_test_transaction_destroy(tx); - if (test->num_completions == test->num_loops) - wakeup(test); + return (0); } static void -ioat_dma_test(void *arg) +ioat_test_release_memory(struct ioat_test *test) +{ + struct test_transaction *tx, *s; + + TAILQ_FOREACH_SAFE(tx, &test->free_q, entry, s) + ioat_test_transaction_destroy(tx); + TAILQ_INIT(&test->free_q); + + TAILQ_FOREACH_SAFE(tx, &test->pend_q, entry, s) + ioat_test_transaction_destroy(tx); + TAILQ_INIT(&test->pend_q); +} + +static void +ioat_test_submit_1_tx(struct ioat_test *test, bus_dmaengine_t dma) { struct test_transaction *tx; + struct bus_dmadesc *desc; + bus_dmaengine_callback_t cb; + bus_addr_t src, dest; + uint32_t i, flags; + + IT_LOCK(); + while (TAILQ_EMPTY(&test->free_q)) + msleep(&test->free_q, &ioat_test_lk, 0, "test_submit", 0); + + tx = TAILQ_FIRST(&test->free_q); + TAILQ_REMOVE(&test->free_q, tx, entry); + TAILQ_INSERT_HEAD(&test->pend_q, tx, entry); + IT_UNLOCK(); + + ioat_acquire(dma); + for (i = 0; i < tx->depth; i++) { + src = vtophys((vm_offset_t)tx->buf[2*i]); + dest = vtophys((vm_offset_t)tx->buf[2*i+1]); + + if (i == tx->depth - 1) { + cb = ioat_dma_test_callback; + flags = DMA_INT_EN; + } else { + cb = NULL; + flags = 0; + } + + desc = ioat_copy(dma, src, dest, tx->length, cb, tx, flags); + if (desc == NULL) + panic("Failed to allocate a ring slot " + "-- this shouldn't happen!"); + } + ioat_release(dma); +} + +static void +ioat_dma_test(void *arg) +{ struct ioat_test *test; bus_dmaengine_t dmaengine; uint32_t loops; - int index, i; + int index, rc, start, end; test = arg; - loops = test->num_loops; + memset(__DEVOLATILE(void *, test->status), 0, sizeof(test->status)); + + if (test->buffer_size > 1024 * 1024) { + ioat_log_message(0, "Buffer size too large >1MB\n"); + test->status[IOAT_TEST_NO_MEMORY]++; + return; + } - test->status = IOAT_TEST_OK; - test->num_completions = 0; + if (test->chain_depth * 2 > IOAT_MAX_BUFS) { + ioat_log_message(0, "Depth too large (> %u)\n", + (unsigned)IOAT_MAX_BUFS / 2); + test->status[IOAT_TEST_NO_MEMORY]++; + return; + } - index = g_thread_index++; - dmaengine = ioat_get_dmaengine(test->channel_index); + if (btoc((uint64_t)test->buffer_size * test->chain_depth * + test->transactions) > (physmem / 4)) { + ioat_log_message(0, "Sanity check failed -- test would " + "use more than 1/4 of phys mem.\n"); + test->status[IOAT_TEST_NO_MEMORY]++; + return; + } + if ((uint64_t)test->transactions * test->chain_depth > (1<<16)) { + ioat_log_message(0, "Sanity check failed -- test would " + "use more than available IOAT ring space.\n"); + test->status[IOAT_TEST_NO_MEMORY]++; + return; + } + + dmaengine = ioat_get_dmaengine(test->channel_index); if (dmaengine == NULL) { ioat_log_message(0, "Couldn't acquire dmaengine\n"); - test->status = IOAT_TEST_NO_DMA_ENGINE; + test->status[IOAT_TEST_NO_DMA_ENGINE]++; return; } - ioat_log_message(0, "Thread %d: num_loops remaining: 0x%07x\n", index, - test->num_loops); + index = g_thread_index++; + TAILQ_INIT(&test->free_q); + TAILQ_INIT(&test->pend_q); - for (loops = 0; loops < test->num_loops; loops++) { - bus_addr_t src, dest; + if (test->duration == 0) + ioat_log_message(1, "Thread %d: num_loops remaining: 0x%08x\n", + index, test->transactions); + else + ioat_log_message(1, "Thread %d: starting\n", index); + + rc = ioat_test_prealloc_memory(test, index); + if (rc != 0) { + ioat_log_message(0, "prealloc_memory: %d\n", rc); + return; + } + wmb(); - if (loops % 0x10000 == 0) { - ioat_log_message(0, "Thread %d: " - "num_loops remaining: 0x%07x\n", index, - test->num_loops - loops); + test->too_late = false; + start = ticks; + end = start + (((sbintime_t)test->duration * hz) / 1000); + + for (loops = 0;; loops++) { + if (test->duration == 0 && loops >= test->transactions) + break; + else if (test->duration != 0 && time_after(ticks, end)) { + test->too_late = true; + break; } - tx = ioat_test_transaction_create(2, IOAT_TEST_SIZE); - if (tx == NULL) { - ioat_log_message(0, "tx == NULL - memory exhausted\n"); - atomic_add_32(&test->num_completions, 1); - test->status = IOAT_TEST_NO_MEMORY; - continue; - } - - tx->test = test; - wmb(); - - /* fill in source buffer */ - for (i = 0; i < (IOAT_TEST_SIZE / sizeof(uint32_t)); i++) { - uint32_t val = i + (loops << 16) + (index << 28); - ((uint32_t *)tx->buf[0])[i] = ~val; - ((uint32_t *)tx->buf[1])[i] = val; - } + ioat_test_submit_1_tx(test, dmaengine); + } - src = pmap_kextract((vm_offset_t)tx->buf[0]); - dest = pmap_kextract((vm_offset_t)tx->buf[1]); + ioat_log_message(1, "Test Elapsed: %d ticks (overrun %d), %d sec.\n", + ticks - start, ticks - end, (ticks - start) / hz); - ioat_acquire(dmaengine); - ioat_copy(dmaengine, src, dest, IOAT_TEST_SIZE, - ioat_dma_test_callback, tx, DMA_INT_EN); - ioat_release(dmaengine); - } + IT_LOCK(); + while (!TAILQ_EMPTY(&test->pend_q)) + msleep(&test->free_q, &ioat_test_lk, 0, "ioattestcompl", hz); + IT_UNLOCK(); - while (test->num_completions < test->num_loops) - tsleep(test, 0, "compl", 5 * hz); + ioat_log_message(1, "Test Elapsed2: %d ticks (overrun %d), %d sec.\n", + ticks - start, ticks - end, (ticks - start) / hz); + ioat_test_release_memory(test); } static int Modified: head/sys/dev/ioat/ioat_test.h ============================================================================== --- head/sys/dev/ioat/ioat_test.h Thu Oct 22 04:33:05 2015 (r289732) +++ head/sys/dev/ioat/ioat_test.h Thu Oct 22 04:38:05 2015 (r289733) @@ -29,17 +29,39 @@ __FBSDID("$FreeBSD$"); #ifndef __IOAT_TEST_H__ #define __IOAT_TEST_H__ +enum ioat_res { + IOAT_TEST_OK = 0, + IOAT_TEST_NO_DMA_ENGINE, + IOAT_TEST_NO_MEMORY, + IOAT_TEST_MISCOMPARE, + IOAT_NUM_RES +}; + +struct test_transaction; + struct ioat_test { + volatile uint32_t status[IOAT_NUM_RES]; uint32_t channel_index; - uint32_t num_loops; - volatile uint32_t num_completions; - uint32_t status; -}; -#define IOAT_TEST_OK 0 -#define IOAT_TEST_NO_DMA_ENGINE 1 -#define IOAT_TEST_NO_MEMORY 2 -#define IOAT_TEST_MISCOMPARE 3 + /* HW max of 1MB */ + uint32_t buffer_size; + uint32_t chain_depth; + uint32_t transactions; + + /* + * If non-zero, duration is time in ms; + * If zero, bounded by 'transactions' above. + */ + uint32_t duration; + + /* If true, check for miscompares after a copy. */ + bool verify; + + /* Internal usage -- not test inputs */ + TAILQ_HEAD(, test_transaction) free_q; + TAILQ_HEAD(, test_transaction) pend_q; + volatile bool too_late; +}; #define IOAT_DMATEST _IOWR('i', 0, struct ioat_test) Modified: head/tools/tools/ioat/Makefile ============================================================================== --- head/tools/tools/ioat/Makefile Thu Oct 22 04:33:05 2015 (r289732) +++ head/tools/tools/ioat/Makefile Thu Oct 22 04:38:05 2015 (r289733) @@ -4,5 +4,6 @@ PROG= ioatcontrol MAN= ioatcontrol.8 CFLAGS+= -I${.CURDIR:H:H:H}/sys/dev/ioat WARNS?= 6 +LIBADD= util .include Modified: head/tools/tools/ioat/ioatcontrol.8 ============================================================================== --- head/tools/tools/ioat/ioatcontrol.8 Thu Oct 22 04:33:05 2015 (r289732) +++ head/tools/tools/ioat/ioatcontrol.8 Thu Oct 22 04:38:05 2015 (r289733) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 24, 2015 +.Dd October 21, 2015 .Dt IOATCONTROL 8 .Os .Sh NAME @@ -33,18 +33,64 @@ .Xr ioat 4 .Sh SYNOPSIS .Nm +.Op Fl V .Ar channel_number -.Ar num_loops +.Ar num_txns +.Ar [ bufsize +.Ar [ chain-len +.Ar [ duration ] ] ] .Sh DESCRIPTION .Nm allows one to issue some number of test operations to the .Xr ioat 4 driver on a specific hardware channel. +The arguments are as follows: +.Bl -tag -width Ds +.It Fl V +Verify copies for accuracy +.El .Pp -Each loop will allocate two chunks of memory, write data patterns to them, -submit a DMA request to copy one buffer to the other, and compare the contents -in the callback. -If the contents are not as expected, an error is reported. +.Nm +operates in one of two modes; if the +.Ar duration +argument is passed, +.Nm +tries to estimate the copy rate in bytes per second by running +.Ar num_txns +repeatedly in loop. +If +.Ar duration +is not passed, +.Nm +only runs through +.Ar num_txns +once and prints the total bytes copied, as well as error information. +.Pp +The +.Ar bufsize +argument determines the size of buffers to use for each +.Fn ioat_copy +invocation. +The default is 256 KB. +.Pp +The +.Ar chain-len +argument determines the number of copies to chain together in a single DMA +transaction. +The default is 1, and the maximum is currently 4. +.Pp +The +.Ar duration +argument specifies an approximate time limit for the test, in milliseconds. +.Pp +The test will allocate two chunks of memory for each component of each +transaction's chain. +It will initialize them with specific data patterns. +During the test, it submits DMA requests to copy between pairs of buffers. +If the +.Fl V +flag was specified, it will compare the contents in the callback for a copy +error. .Sh FILES .Pa /dev/ioat_test .Pp @@ -55,6 +101,10 @@ and .Nm exposes it with .Cd hw.ioat.enable_ioat_test=1 . +.Sh DIAGNOSTICS +The wait channel +.Va test_submit +indicates that the test code is keeping the DMA engine full of work. .Sh SEE ALSO .Xr ioat 4 .Sh HISTORY Modified: head/tools/tools/ioat/ioatcontrol.c ============================================================================== --- head/tools/tools/ioat/ioatcontrol.c Thu Oct 22 04:33:05 2015 (r289732) +++ head/tools/tools/ioat/ioatcontrol.c Thu Oct 22 04:38:05 2015 (r289733) @@ -28,34 +28,88 @@ __FBSDID("$FreeBSD$"); #include +#include #include +#include #include #include #include #include #include +#include + #include "ioat_test.h" +static int prettyprint(struct ioat_test *); + +static void +usage(void) +{ + + printf("Usage: %s [-V] [ " + "[ [duration]]]\n", getprogname()); + exit(EX_USAGE); +} + int main(int argc, char **argv) { struct ioat_test t; - int fd; + int fd, ch; - if (argc < 3) { - printf("Usage: %s \n", argv[0]); - return (EX_USAGE); + while ((ch = getopt(argc, argv, "V")) != -1) { + switch (ch) { + case 'V': + t.verify = true; + break; + default: + usage(); + } } + argc -= optind; + argv += optind; + + if (argc < 2) + usage(); + + /* Defaults for optional args */ + t.buffer_size = 256 * 1024; + t.chain_depth = 2; + t.duration = 0; - t.channel_index = atoi(argv[1]); + t.channel_index = atoi(argv[0]); if (t.channel_index > 8) { printf("Channel number must be between 0 and 7.\n"); return (EX_USAGE); } - t.num_loops = atoi(argv[2]); + t.transactions = atoi(argv[1]); + + if (argc >= 3) { + t.buffer_size = atoi(argv[2]); + if (t.buffer_size == 0) { + printf("Buffer size must be greater than zero\n"); + return (EX_USAGE); + } + } + + if (argc >= 4) { + t.chain_depth = atoi(argv[3]); + if (t.chain_depth < 1) { + printf("Chain length must be greater than zero\n"); + return (EX_USAGE); + } + } + + if (argc >= 5) { + t.duration = atoi(argv[4]); + if (t.duration < 1) { + printf("Duration must be greater than zero\n"); + return (EX_USAGE); + } + } fd = open("/dev/ioat_test", O_RDWR); if (fd < 0) { @@ -66,5 +120,44 @@ main(int argc, char **argv) (void)ioctl(fd, IOAT_DMATEST, &t); close(fd); - return (t.status); + return (prettyprint(&t)); +} + +static int +prettyprint(struct ioat_test *t) +{ + char bps[10], bytesh[10]; + uintmax_t bytes; + + if (t->status[IOAT_TEST_NO_DMA_ENGINE] != 0 || + t->status[IOAT_TEST_NO_MEMORY] != 0 || + t->status[IOAT_TEST_MISCOMPARE] != 0) { + printf("Errors:\n"); + if (t->status[IOAT_TEST_NO_DMA_ENGINE] != 0) + printf("\tNo DMA engine present: %u\n", + (unsigned)t->status[IOAT_TEST_NO_DMA_ENGINE]); + if (t->status[IOAT_TEST_NO_MEMORY] != 0) + printf("\tOut of memory: %u\n", + (unsigned)t->status[IOAT_TEST_NO_MEMORY]); + if (t->status[IOAT_TEST_MISCOMPARE] != 0) + printf("\tMiscompares: %u\n", + (unsigned)t->status[IOAT_TEST_MISCOMPARE]); + } + + printf("Processed %u txns\n", (unsigned)t->status[IOAT_TEST_OK] / + t->chain_depth); + bytes = (uintmax_t)t->buffer_size * t->status[IOAT_TEST_OK]; + + humanize_number(bytesh, sizeof(bytesh), (int64_t)bytes, "B", + HN_AUTOSCALE, HN_DECIMAL); + if (t->duration) { + humanize_number(bps, sizeof(bps), + (int64_t)1000 * bytes / t->duration, "B/s", HN_AUTOSCALE, + HN_DECIMAL); + printf("%ju (%s) copied in %u ms (%s)\n", bytes, bytesh, + (unsigned)t->duration, bps); + } else + printf("%ju (%s) copied\n", bytes, bytesh); + + return (EX_OK); } From owner-svn-src-all@freebsd.org Thu Oct 22 04:42: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 C8CBBA1B058; Thu, 22 Oct 2015 04:42: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 875361149; Thu, 22 Oct 2015 04:42: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 t9M4gHjD044331; Thu, 22 Oct 2015 04:42:17 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M4gHcB044330; Thu, 22 Oct 2015 04:42:17 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510220442.t9M4gHcB044330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 22 Oct 2015 04:42:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289734 - 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, 22 Oct 2015 04:42:19 -0000 Author: bdrewery Date: Thu Oct 22 04:42:17 2015 New Revision: 289734 URL: https://svnweb.freebsd.org/changeset/base/289734 Log: Rewrite crunchgen target handling for progs so that it can be parallelized. This covers 'clean', 'cleandepend', 'cleandir', 'obj', 'objlink' and 'build-tools'. This uses the same method as bsd.subdir.mk. MFC after: 2 weeks X-MFC-With: r289731 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 Thu Oct 22 04:38:05 2015 (r289733) +++ head/share/mk/bsd.crunchgen.mk Thu Oct 22 04:42:17 2015 (r289734) @@ -123,29 +123,32 @@ objs: $(OUTMK) # Someone should replace the bin/csh and bin/sh build-tools with # shell scripts so we can remove this nonsense. -build-tools: .for _tool in $(CRUNCH_BUILDTOOLS) +build-tools-${_tool}: ${_+_}cd $(.CURDIR)/../../${_tool}; \ - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} obj; \ - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} build-tools + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} obj; \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} build-tools +build-tools: build-tools-${_tool} .endfor # Use a separate build tree to hold files compiled for this crunchgen binary # Yes, this does seem to partly duplicate bsd.subdir.mk, but I can't # get that to cooperate with bsd.prog.mk. Besides, many of the standard # targets should NOT be propagated into the components. -cleandepend cleandir obj objlink: +.for __target in clean cleandepend cleandir obj objlink .for D in $(CRUNCH_SRCDIRS) .for P in $(CRUNCH_PROGS_$(D)) .ifdef CRUNCH_SRCDIR_${P} - ${_+_}cd ${CRUNCH_SRCDIR_$(P)} && \ - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ - DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} +__dir= ${CRUNCH_SRCDIR_$(P)} .else - ${_+_}cd $(.CURDIR)/../../${D}/${P} && \ - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ - DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} +__dir= ${.CURDIR}/../../${D}/${P} .endif +${__target}_crunchdir_${P}: .PHONY .MAKE + ${_+_}cd ${__dir} && \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ + DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${__target} +${__target}: ${__target}_crunchdir_${P} +.endfor .endfor .endfor @@ -154,16 +157,3 @@ clean: ${_+_}if [ -e ${.OBJDIR}/$(OUTMK) ]; then \ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) clean; \ fi -.for D in $(CRUNCH_SRCDIRS) -.for P in $(CRUNCH_PROGS_$(D)) -.ifdef CRUNCH_SRCDIR_${P} - ${_+_}cd ${CRUNCH_SRCDIR_$(P)} && \ - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ - DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} -.else - ${_+_}cd $(.CURDIR)/../../${D}/${P} && \ - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ - DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} -.endif -.endfor -.endfor From owner-svn-src-all@freebsd.org Thu Oct 22 04:47: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 EC087A1B130; Thu, 22 Oct 2015 04:47:53 +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 BEEE71374; Thu, 22 Oct 2015 04:47: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 t9M4lq3k044582; Thu, 22 Oct 2015 04:47:52 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M4lqa0044581; Thu, 22 Oct 2015 04:47:52 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510220447.t9M4lqa0044581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 22 Oct 2015 04:47:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289735 - 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, 22 Oct 2015 04:47:54 -0000 Author: bdrewery Date: Thu Oct 22 04:47:52 2015 New Revision: 289735 URL: https://svnweb.freebsd.org/changeset/base/289735 Log: Fix style. Namely use {} rather than (). MFC after: 2 weeks 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 Thu Oct 22 04:42:17 2015 (r289734) +++ head/share/mk/bsd.crunchgen.mk Thu Oct 22 04:47:52 2015 (r289735) @@ -13,14 +13,14 @@ # local architecture. # # Special options can be specified for individual programs -# CRUNCH_SRCDIR_$(P): base source directory for program $(P) -# CRUNCH_BUILDOPTS_$(P): additional build options for $(P) -# CRUNCH_ALIAS_$(P): additional names to be used for $(P) +# CRUNCH_SRCDIR_${P}: base source directory for program ${P} +# CRUNCH_BUILDOPTS_${P}: additional build options for ${P} +# CRUNCH_ALIAS_${P}: additional names to be used for ${P} # # By default, any name appearing in CRUNCH_PROGS or CRUNCH_ALIAS_${P} # will be used to generate a hard link to the resulting binary. # Specific links can be suppressed by setting -# CRUNCH_SUPPRESS_LINK_$(NAME) to 1. +# CRUNCH_SUPPRESS_LINK_${NAME} to 1. # # If CRUNCH_GENERATE_LINKS is set to no, no links will be generated. # @@ -31,101 +31,101 @@ # The following is pretty nearly a generic crunchgen-handling makefile # -CONF= $(PROG).conf -OUTMK= $(PROG).mk -OUTC= $(PROG).c -OUTPUTS=$(OUTMK) $(OUTC) $(PROG).cache +CONF= ${PROG}.conf +OUTMK= ${PROG}.mk +OUTC= ${PROG}.c +OUTPUTS=${OUTMK} ${OUTC} ${PROG}.cache CRUNCHOBJS= ${.OBJDIR} -.if defined(MAKEOBJDIRPREFIX) +.if defined{MAKEOBJDIRPREFIX} CANONICALOBJDIR:= ${MAKEOBJDIRPREFIX}${.CURDIR} -.elif defined(MAKEOBJDIR) && ${MAKEOBJDIR:M/*} != "" -CANONICALOBJDIR:=${MAKEOBJDIR} +.elif defined{MAKEOBJDIR} && ${MAKEOBJDIR:M/*} != "" +CANONICALOBJDIR:= ${MAKEOBJDIR} .else CANONICALOBJDIR:= /usr/obj${.CURDIR} .endif -CRUNCH_GENERATE_LINKS?= yes +CRUNCH_GENERATE_LINKS?= yes -CLEANFILES+= $(CONF) *.o *.lo *.c *.mk *.cache *.a *.h +CLEANFILES+= ${CONF} *.o *.lo *.c *.mk *.cache *.a *.h # Don't try to extract debug info from ${PROG}. -MK_DEBUG_FILES=no +MK_DEBUG_FILES= no # Program names and their aliases contribute hardlinks to 'rescue' executable, # except for those that get suppressed. -.for D in $(CRUNCH_SRCDIRS) -.for P in $(CRUNCH_PROGS_$(D)) +.for D in ${CRUNCH_SRCDIRS} +.for P in ${CRUNCH_PROGS_${D}} .ifdef CRUNCH_SRCDIR_${P} -$(OUTPUTS): $(CRUNCH_SRCDIR_${P})/Makefile +${OUTPUTS}: ${CRUNCH_SRCDIR_${P}}/Makefile .else -$(OUTPUTS): $(.CURDIR)/../../$(D)/$(P)/Makefile +${OUTPUTS}: ${.CURDIR}/../../${D}/${P}/Makefile .endif .if ${CRUNCH_GENERATE_LINKS} == "yes" .ifndef CRUNCH_SUPPRESS_LINK_${P} -LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(P) +LINKS+= ${BINDIR}/${PROG} ${BINDIR}/${P} .endif -.for A in $(CRUNCH_ALIAS_$(P)) +.for A in ${CRUNCH_ALIAS_${P}} .ifndef CRUNCH_SUPPRESS_LINK_${A} -LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(A) +LINKS+= ${BINDIR}/${PROG} ${BINDIR}/${A} .endif .endfor .endif .endfor .endfor -all: $(PROG) -exe: $(PROG) +all: ${PROG} +exe: ${PROG} -$(CONF): Makefile - echo \# Auto-generated, do not edit >$(.TARGET) +${CONF}: Makefile + echo \# Auto-generated, do not edit >${.TARGET} .ifdef CRUNCH_BUILDOPTS - echo buildopts $(CRUNCH_BUILDOPTS) >>$(.TARGET) + echo buildopts ${CRUNCH_BUILDOPTS} >>${.TARGET} .endif .ifdef CRUNCH_LIBS - echo libs $(CRUNCH_LIBS) >>$(.TARGET) + echo libs ${CRUNCH_LIBS} >>${.TARGET} .endif .ifdef CRUNCH_SHLIBS - echo libs_so $(CRUNCH_SHLIBS) >>$(.TARGET) + echo libs_so ${CRUNCH_SHLIBS} >>${.TARGET} .endif -.for D in $(CRUNCH_SRCDIRS) -.for P in $(CRUNCH_PROGS_$(D)) - echo progs $(P) >>$(.TARGET) +.for D in ${CRUNCH_SRCDIRS} +.for P in ${CRUNCH_PROGS_${D}} + echo progs ${P} >>${.TARGET} .ifdef CRUNCH_SRCDIR_${P} - echo special $(P) srcdir $(CRUNCH_SRCDIR_${P}) >>$(.TARGET) + echo special ${P} srcdir ${CRUNCH_SRCDIR_${P}} >>${.TARGET} .else - echo special $(P) srcdir $(.CURDIR)/../../$(D)/$(P) >>$(.TARGET) + echo special ${P} srcdir ${.CURDIR}/../../${D}/${P} >>${.TARGET} .endif .ifdef CRUNCH_BUILDOPTS_${P} - echo special $(P) buildopts DIRPRFX=${DIRPRFX}${P}/ \ - $(CRUNCH_BUILDOPTS_${P}) >>$(.TARGET) + echo special ${P} buildopts DIRPRFX=${DIRPRFX}${P}/ \ + ${CRUNCH_BUILDOPTS_${P}} >>${.TARGET} .else - echo special $(P) buildopts DIRPRFX=${DIRPRFX}${P}/ >>$(.TARGET) + echo special ${P} buildopts DIRPRFX=${DIRPRFX}${P}/ >>${.TARGET} .endif -.for A in $(CRUNCH_ALIAS_$(P)) - echo ln $(P) $(A) >>$(.TARGET) +.for A in ${CRUNCH_ALIAS_${P}} + echo ln ${P} ${A} >>${.TARGET} .endfor .endfor .endfor CRUNCHGEN?= crunchgen CRUNCHENV?= MK_TESTS=no -.ORDER: $(OUTPUTS) objs -$(OUTPUTS): $(CONF) .META - MAKE=${MAKE} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${CRUNCHGEN} -fq -m $(OUTMK) \ - -c $(OUTC) $(CONF) +.ORDER: ${OUTPUTS} objs +${OUTPUTS}: ${CONF} .META + MAKE=${MAKE} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${CRUNCHGEN} -fq \ + -m ${OUTMK} -c ${OUTC} ${CONF} # These 2 targets cannot use .MAKE since they depend on the generated # ${OUTMK} above. -$(PROG): $(OUTPUTS) objs - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) exe +${PROG}: ${OUTPUTS} objs + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f ${OUTMK} exe -objs: $(OUTMK) - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) objs +objs: ${OUTMK} + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f ${OUTMK} objs # Someone should replace the bin/csh and bin/sh build-tools with # shell scripts so we can remove this nonsense. -.for _tool in $(CRUNCH_BUILDTOOLS) +.for _tool in ${CRUNCH_BUILDTOOLS} build-tools-${_tool}: - ${_+_}cd $(.CURDIR)/../../${_tool}; \ + ${_+_}cd ${.CURDIR}/../../${_tool}; \ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} obj; \ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} build-tools build-tools: build-tools-${_tool} @@ -136,10 +136,10 @@ build-tools: build-tools-${_tool} # get that to cooperate with bsd.prog.mk. Besides, many of the standard # targets should NOT be propagated into the components. .for __target in clean cleandepend cleandir obj objlink -.for D in $(CRUNCH_SRCDIRS) -.for P in $(CRUNCH_PROGS_$(D)) +.for D in ${CRUNCH_SRCDIRS} +.for P in ${CRUNCH_PROGS_${D}} .ifdef CRUNCH_SRCDIR_${P} -__dir= ${CRUNCH_SRCDIR_$(P)} +__dir= ${CRUNCH_SRCDIR_${P}} .else __dir= ${.CURDIR}/../../${D}/${P} .endif @@ -154,6 +154,7 @@ ${__target}: ${__target}_crunchdir_${P} clean: rm -f ${CLEANFILES} - ${_+_}if [ -e ${.OBJDIR}/$(OUTMK) ]; then \ - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) clean; \ + ${_+_}if [ -e ${.OBJDIR}/${OUTMK} ]; then \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} \ + -f ${OUTMK} clean; \ fi From owner-svn-src-all@freebsd.org Thu Oct 22 04:49: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 9AF70A1B185; Thu, 22 Oct 2015 04:49:17 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x22c.google.com (mail-pa0-x22c.google.com [IPv6:2607:f8b0:400e:c03::22c]) (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 6D2C81546; Thu, 22 Oct 2015 04:49:17 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pacfv9 with SMTP id fv9so79056074pac.3; Wed, 21 Oct 2015 21:49:16 -0700 (PDT) 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=WzX5w8WQRQzQKGd1qZmeF+XNqktdYSITMxzeaIEOHc0=; b=lwOHOeF3btlvMihxRGGklD1MMZdyQnBsz6XPwkXbWiNEH5yV6Eitk0X+wiFqJYRXDk 9YdOtCZV+zt7hsM4kW5xIVik0ZZVI5qEHz+GQQ+ZZUYtreOZs2rRmQC7TdAp1XfOuIdT O926cjcfQ3N7vJlgwrpvjNSl+ZNuGZoS21BFnhIGHpH6tiO3dopvcbjIYlrLlXiXxWES d577MB8ATP+jXGVZdhUpBHCzutXCT17KrKUqFqGlT3yISDzfHapRoEqpALWeP6iykQOE liaWFWKXfBl46XjscF3/42GIoP82sz+Fh3o9NhutEDuA+iGjzGLCKlgtmLsOIGeohut3 nswQ== X-Received: by 10.66.216.101 with SMTP id op5mr14942185pac.51.1445489356646; Wed, 21 Oct 2015 21:49:16 -0700 (PDT) Received: from ?IPv6:2601:601:800:126d:ed49:68d3:f4e:e5ab? ([2601:601:800:126d:ed49:68d3:f4e:e5ab]) by smtp.gmail.com with ESMTPSA id b6sm11894058pbu.90.2015.10.21.21.49.15 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Oct 2015 21:49:16 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r289735 - head/share/mk From: NGie Cooper In-Reply-To: <201510220447.t9M4lqa0044581@repo.freebsd.org> Date: Wed, 21 Oct 2015 21:49:15 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <201510220447.t9M4lqa0044581@repo.freebsd.org> To: Bryan Drewery 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: Thu, 22 Oct 2015 04:49:17 -0000 > On Oct 21, 2015, at 21:47, Bryan Drewery wrote: > > +.if defined{MAKEOBJDIRPREFIX} Uh... From owner-svn-src-all@freebsd.org Thu Oct 22 04:50: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 D340BA1B20D; Thu, 22 Oct 2015 04:50:53 +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 9FFE518CF; Thu, 22 Oct 2015 04:50: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 t9M4oqYH044742; Thu, 22 Oct 2015 04:50:52 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M4oqlB044741; Thu, 22 Oct 2015 04:50:52 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510220450.t9M4oqlB044741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 22 Oct 2015 04:50:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289736 - 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: Thu, 22 Oct 2015 04:50:53 -0000 Author: bdrewery Date: Thu Oct 22 04:50:52 2015 New Revision: 289736 URL: https://svnweb.freebsd.org/changeset/base/289736 Log: Document that we use {} for variable expansion. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/share/man/man5/style.Makefile.5 Modified: head/share/man/man5/style.Makefile.5 ============================================================================== --- head/share/man/man5/style.Makefile.5 Thu Oct 22 04:47:52 2015 (r289735) +++ head/share/man/man5/style.Makefile.5 Thu Oct 22 04:50:52 2015 (r289736) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2005 +.Dd October 21, 2015 .Dt STYLE.MAKEFILE 5 .Os .Sh NAME @@ -117,6 +117,13 @@ i.e., no space between the variable name .Ic = . Keep values sorted alphabetically, if possible. .It +Variables are expanded with +.Sy {} , +not +.Sy () . +Such as +.Va ${VARIABLE} . +.It Do not use .Ic += to set variables that are only set once From owner-svn-src-all@freebsd.org Thu Oct 22 04: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 43084A1B3E2; Thu, 22 Oct 2015 04:52:39 +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 0EBF81B35; Thu, 22 Oct 2015 04:52:38 +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 t9M4qc6a047358; Thu, 22 Oct 2015 04:52:38 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M4qc83047357; Thu, 22 Oct 2015 04:52:38 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510220452.t9M4qc83047357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 22 Oct 2015 04:52:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289737 - 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, 22 Oct 2015 04:52:39 -0000 Author: bdrewery Date: Thu Oct 22 04:52:37 2015 New Revision: 289737 URL: https://svnweb.freebsd.org/changeset/base/289737 Log: Fix incorrect defined() usage from style clean up in r289735. Submitted by: ngie MFC after: 2 weeks X-MFC-With: r289735 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 Thu Oct 22 04:50:52 2015 (r289736) +++ head/share/mk/bsd.crunchgen.mk Thu Oct 22 04:52:37 2015 (r289737) @@ -36,9 +36,9 @@ OUTMK= ${PROG}.mk OUTC= ${PROG}.c OUTPUTS=${OUTMK} ${OUTC} ${PROG}.cache CRUNCHOBJS= ${.OBJDIR} -.if defined{MAKEOBJDIRPREFIX} +.if defined(MAKEOBJDIRPREFIX) CANONICALOBJDIR:= ${MAKEOBJDIRPREFIX}${.CURDIR} -.elif defined{MAKEOBJDIR} && ${MAKEOBJDIR:M/*} != "" +.elif defined(MAKEOBJDIR) && ${MAKEOBJDIR:M/*} != "" CANONICALOBJDIR:= ${MAKEOBJDIR} .else CANONICALOBJDIR:= /usr/obj${.CURDIR} From owner-svn-src-all@freebsd.org Thu Oct 22 04:52: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 68D0EA1B411; Thu, 22 Oct 2015 04:52:51 +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 5121C1CA3; Thu, 22 Oct 2015 04:52:51 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 4A1C217E7; Thu, 22 Oct 2015 04:52:51 +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 BF77E16B53; Thu, 22 Oct 2015 04:52:50 +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 TV_8iAIimTzn; Thu, 22 Oct 2015 04:52:47 +0000 (UTC) Subject: Re: svn commit: r289735 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 410FB16B49 To: NGie Cooper References: <201510220447.t9M4lqa0044581@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56286BA1.8010909@FreeBSD.org> Date: Wed, 21 Oct 2015 21:52:49 -0700 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: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JKn23pr7bDqIJ0r7mfVsbNCmn0L37gjQd" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2015 04:52:51 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --JKn23pr7bDqIJ0r7mfVsbNCmn0L37gjQd Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10/21/2015 9:49 PM, NGie Cooper wrote: >=20 >> On Oct 21, 2015, at 21:47, Bryan Drewery wrote:= >> >> +.if defined{MAKEOBJDIRPREFIX} >=20 > Uh... >=20 Hah. Thanks. --=20 Regards, Bryan Drewery --JKn23pr7bDqIJ0r7mfVsbNCmn0L37gjQd 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 iQEcBAEBAgAGBQJWKGuhAAoJEDXXcbtuRpfPUo4IAIWrpT9tsSnRYejFiPj/tgga xFRvEP1D99Hxj9XQxwqRXmN8nNsk+dqLk1SMZsN1AWPbYrYe9enMHJQg14Znarjp xIYfmRzpKO7oE8HjrcaEvnocBq3AVtnewXh0B4tzb0FeE+ExF7bF/u6o/LNWk6Pt Lwew93kO5gQTDUdL6kENRLs1Yw+lTA9cVELjcOA5TKdKc5wXuyANMYBtXie/849V Krvs439eQG5+3E3MSW15R/HAdAa0QNvZr34lE3Po9YYdVihj1Opn2q2oUck176Q/ +Nc/7/1WOqH6kgGvc4lw1d8eQzGIicCt7EkKC1ZTskpaZMllSDm/q9KdJojCkEY= =aCGv -----END PGP SIGNATURE----- --JKn23pr7bDqIJ0r7mfVsbNCmn0L37gjQd-- From owner-svn-src-all@freebsd.org Thu Oct 22 05:01: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 088D7A1B75E; Thu, 22 Oct 2015 05:01: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 C12671F8B; Thu, 22 Oct 2015 05:01: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 t9M51E03050266; Thu, 22 Oct 2015 05:01:14 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M51EE9050265; Thu, 22 Oct 2015 05:01:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510220501.t9M51EE9050265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 22 Oct 2015 05:01:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289738 - 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: Thu, 22 Oct 2015 05:01:16 -0000 Author: bdrewery Date: Thu Oct 22 05:01:14 2015 New Revision: 289738 URL: https://svnweb.freebsd.org/changeset/base/289738 Log: Parallelize build-tools. MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Oct 22 04:52:37 2015 (r289737) +++ head/Makefile.inc1 Thu Oct 22 05:01:14 2015 (r289738) @@ -1507,7 +1507,6 @@ _gcc_tools= gnu/usr.bin/cc/cc_tools _rescue=rescue/rescue .endif -build-tools: .MAKE .for _tool in \ bin/csh \ bin/sh \ @@ -1521,18 +1520,22 @@ build-tools: .MAKE usr.bin/mkesdb_static \ usr.bin/mkcsmapper_static \ usr.bin/vi/catalog +build-tools_${_tool}: .PHONY ${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \ cd ${.CURDIR}/${_tool} && \ ${MAKE} DIRPRFX=${_tool}/ obj && \ ${MAKE} DIRPRFX=${_tool}/ build-tools +build-tools: build-tools_${_tool} .endfor .for _tool in \ ${_gcc_tools} +build-tools_${_tool}: .PHONY ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \ cd ${.CURDIR}/${_tool} && \ ${MAKE} DIRPRFX=${_tool}/ obj && \ ${MAKE} DIRPRFX=${_tool}/ depend && \ ${MAKE} DIRPRFX=${_tool}/ all +build-tools: build-tools_${_tool} .endfor # From owner-svn-src-all@freebsd.org Thu Oct 22 05:04: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 0906BA1B7C5; Thu, 22 Oct 2015 05:04:02 +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 E214D1287; Thu, 22 Oct 2015 05:04:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id DB3E01B8B; Thu, 22 Oct 2015 05:04:01 +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 AB83116B80; Thu, 22 Oct 2015 05:04:01 +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 qIKw2exZTIa2; Thu, 22 Oct 2015 05:03:59 +0000 (UTC) Subject: Re: svn commit: r289438 - head DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com A8D0516B7B To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510170351.t9H3poQZ095465@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56286E43.50702@FreeBSD.org> Date: Wed, 21 Oct 2015 22:04:03 -0700 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: <201510170351.t9H3poQZ095465@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RkceL45asv7Uc8tg38DwfCENFa00TEdGi" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2015 05:04:02 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --RkceL45asv7Uc8tg38DwfCENFa00TEdGi Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/16/2015 8:51 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Sat Oct 17 03:51:50 2015 > New Revision: 289438 > URL: https://svnweb.freebsd.org/changeset/base/289438 >=20 > Log: > Rework the world subdir build targets to use the standard SUBDIR_PARA= LLEL mechanism. This accidentally deparallelized the 'includes' phase for a cost of a few minutes. It's quite special. I have a fix I've been testing for a few days and will have it in over the next few days. --=20 Regards, Bryan Drewery --RkceL45asv7Uc8tg38DwfCENFa00TEdGi 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 iQEcBAEBAgAGBQJWKG5DAAoJEDXXcbtuRpfPAAQH/jeRiHiHRXxYzyvh4Kl4UvNW E1i3WRGOuybw/L/k6/RzaamVcoeZepXbos4yppDAb3cZ+UBaK+oMRPQ4w2d+xEXc XBoBghGqLNoKUdWUTf8DqbCX8/NIh0ZDk16owKIb+MW7a23CSQq67jPgwsA9JyvN JK0XU/ZQJv3Sdsonol/UluM6Gx7FJDp3iiuzdxF4XuH3x3MSr9N8O4X3YoV41JVI qC3AKWRqDksqfZ33APzqRI9tSzwOXOB6qKBlKtzPFeRFOvGMHJmBrl9AW634I6Km 7Nk7fE1xhy49Py286QXglZSGjvimIxsdligpBxMZixdAOQuamZCCVtsexvBq+vI= =PJfK -----END PGP SIGNATURE----- --RkceL45asv7Uc8tg38DwfCENFa00TEdGi-- From owner-svn-src-all@freebsd.org Thu Oct 22 05:32: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 11F61A1BDDD; Thu, 22 Oct 2015 05:32:47 +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 D05A11DBC; Thu, 22 Oct 2015 05:32:46 +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 t9M5WjTM058725; Thu, 22 Oct 2015 05:32:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M5Wj5E058723; Thu, 22 Oct 2015 05:32:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510220532.t9M5Wj5E058723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 22 Oct 2015 05:32:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289739 - in head: etc/mtree usr.sbin/makefs usr.sbin/makefs/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: Thu, 22 Oct 2015 05:32:47 -0000 Author: ngie Date: Thu Oct 22 05:32:45 2015 New Revision: 289739 URL: https://svnweb.freebsd.org/changeset/base/289739 Log: Correctly reintroduce the rudimentary smoke tests I botched up in r289684 MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Added: head/usr.sbin/makefs/tests/ - copied from r289694, head/usr.sbin/makefs/tests/ Modified: head/etc/mtree/BSD.tests.dist head/usr.sbin/makefs/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Thu Oct 22 05:01:14 2015 (r289738) +++ head/etc/mtree/BSD.tests.dist Thu Oct 22 05:32:45 2015 (r289739) @@ -596,6 +596,8 @@ .. fstyp .. + makefs + .. newsyslog .. nmtree Modified: head/usr.sbin/makefs/Makefile ============================================================================== --- head/usr.sbin/makefs/Makefile Thu Oct 22 05:01:14 2015 (r289738) +++ head/usr.sbin/makefs/Makefile Thu Oct 22 05:32:45 2015 (r289739) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + PROG= makefs CFLAGS+=-I${.CURDIR} @@ -32,4 +34,8 @@ SRCS+= ffs_tables.c CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd LIBADD= netbsd util sbuf +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include From owner-svn-src-all@freebsd.org Thu Oct 22 06:32: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 3E610A1C6EB; Thu, 22 Oct 2015 06:32:35 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07BD315C9; Thu, 22 Oct 2015 06:32:34 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9M6WYOs076203; Thu, 22 Oct 2015 06:32:34 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M6WYOt076202; Thu, 22 Oct 2015 06:32:34 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510220632.t9M6WYOt076202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 22 Oct 2015 06:32:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289740 - stable/10/usr.bin/getconf 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, 22 Oct 2015 06:32:35 -0000 Author: bapt Date: Thu Oct 22 06:32:33 2015 New Revision: 289740 URL: https://svnweb.freebsd.org/changeset/base/289740 Log: getconf(1): Fix typo. _POSIX_V6_LP64_OFFBIG -> _POSIX_V6_LPBIG_OFFBIG. Submitted by: Sascha Wildner Obtained from: DragonflyBSD Modified: stable/10/usr.bin/getconf/sysconf.gperf Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/getconf/sysconf.gperf ============================================================================== --- stable/10/usr.bin/getconf/sysconf.gperf Thu Oct 22 05:32:45 2015 (r289739) +++ stable/10/usr.bin/getconf/sysconf.gperf Thu Oct 22 06:32:33 2015 (r289740) @@ -121,7 +121,7 @@ _POSIX_VERSION, _SC_VERSION _POSIX_V6_ILP32_OFF32, _SC_V6_ILP32_OFF32 _POSIX_V6_ILP32_OFFBIG, _SC_V6_ILP32_OFFBIG _POSIX_V6_LP64_OFF64, _SC_V6_LP64_OFF64 -_POSIX_V6_LP64_OFFBIG, _SC_V6_LP64_OFFBIG +_POSIX_V6_LPBIG_OFFBIG, _SC_V6_LPBIG_OFFBIG _XOPEN_CRYPT, _SC_XOPEN_CRYPT _XOPEN_ENH_I18N, _SC_XOPEN_ENH_I18N _XOPEN_LEGACY, _SC_XOPEN_LEGACY From owner-svn-src-all@freebsd.org Thu Oct 22 07: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 99CE1A1CED1; Thu, 22 Oct 2015 07:22: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 5ABA21FEC; Thu, 22 Oct 2015 07:22:06 +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 t9M7M50p090814; Thu, 22 Oct 2015 07:22:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M7M5EN090811; Thu, 22 Oct 2015 07:22:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510220722.t9M7M5EN090811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 22 Oct 2015 07:22:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289743 - head/usr.sbin/makefs/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: Thu, 22 Oct 2015 07:22:06 -0000 Author: ngie Date: Thu Oct 22 07:22:05 2015 New Revision: 289743 URL: https://svnweb.freebsd.org/changeset/base/289743 Log: Revise "create_test_inputs" to simplify the file structure as these testcases don't need to be nested as much as bin/ls/ls_tests.sh do when verifying ls -a, ls -A, etc. This allows the tests to make all paths relative to the top of the temporary directory instead of always tacking on $ATF_TMPDIR, thus complicating things unnecessarily Create non-empty files in create_test_inputs as well now, similar to create_test_inputs2 in bin/ls/ls_tests.sh Compare the input files to the output file contents using diff where possible: - Skip over the fifo comparison for now because it always fails - Skip over the symlink comparison on cd9660 because it always fails today Sponsored by: EMC / Isilon Storage Division MFC after: 2 weeks X-MFC with: r289739 Modified: head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh head/usr.sbin/makefs/tests/makefs_ffs_tests.sh head/usr.sbin/makefs/tests/makefs_tests_common.sh Modified: head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh ============================================================================== --- head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Thu Oct 22 07:01:01 2015 (r289742) +++ head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Thu Oct 22 07:22:05 2015 (r289743) @@ -30,7 +30,6 @@ . "$(dirname "$0")/makefs_tests_common.sh" MAKEFS="makefs -t cd9660" -TEST_IMAGE="test.iso" atf_test_case basic_cd9660 cleanup basic_cd9660_body() @@ -43,12 +42,17 @@ basic_cd9660_body() mdconfig -a -f $TEST_IMAGE atf_check -e empty -o empty -s exit:0 \ mount_cd9660 /dev/$(cat $TEST_MD_DEVICE_FILE) $TEST_MOUNT_DIR - atf_check -e empty -o not-empty -s exit:0 ls $TEST_MOUNT_DIR + # diffutils doesn't feature --no-dereference until v3.3, so + # $TEST_INPUTS_DIR/c will mismatch with $TEST_MOUNT_DIR/c (the + # former will look like a directory; the latter like a file). + # + # XXX: the latter behavior seems suspect; seems like it should be a + # symlink; need to verify this with mkisofs, etc + atf_check -e empty -o empty -s exit:0 \ + diff --exclude c -Naur $TEST_INPUTS_DIR $TEST_MOUNT_DIR } basic_cd9660_cleanup() { - ls -a - test_md_device=$(cat $TEST_MD_DEVICE_FILE) || return umount -f /dev/$test_md_device Modified: head/usr.sbin/makefs/tests/makefs_ffs_tests.sh ============================================================================== --- head/usr.sbin/makefs/tests/makefs_ffs_tests.sh Thu Oct 22 07:01:01 2015 (r289742) +++ head/usr.sbin/makefs/tests/makefs_ffs_tests.sh Thu Oct 22 07:22:05 2015 (r289743) @@ -30,7 +30,6 @@ . "$(dirname "$0")/makefs_tests_common.sh" MAKEFS="makefs -t ffs" -TEST_IMAGE="test.img" atf_test_case basic_ffs cleanup basic_ffs_body() @@ -45,12 +44,11 @@ basic_ffs_body() tunefs -p /dev/$(cat $TEST_MD_DEVICE_FILE) atf_check -e empty -o empty -s exit:0 \ mount /dev/$(cat $TEST_MD_DEVICE_FILE) $TEST_MOUNT_DIR - atf_check -e empty -o not-empty -s exit:0 ls $TEST_MOUNT_DIR + atf_check -e empty -o empty -s exit:0 \ + diff -Naur $TEST_INPUTS_DIR $TEST_MOUNT_DIR } basic_ffs_cleanup() { - ls -a - test_md_device=$(cat $TEST_MD_DEVICE_FILE) || return umount -f /dev/$test_md_device Modified: head/usr.sbin/makefs/tests/makefs_tests_common.sh ============================================================================== --- head/usr.sbin/makefs/tests/makefs_tests_common.sh Thu Oct 22 07:01:01 2015 (r289742) +++ head/usr.sbin/makefs/tests/makefs_tests_common.sh Thu Oct 22 07:22:05 2015 (r289743) @@ -27,30 +27,23 @@ # $FreeBSD$ # +KB=1024 +TEST_IMAGE="test.img" +TEST_INPUTS_DIR="inputs" TEST_MD_DEVICE_FILE="md.output" TEST_MOUNT_DIR="mnt" -create_test_dir() +create_test_dirs() { - [ -z "$ATF_TMPDIR" ] || return 0 - - export ATF_TMPDIR=$(pwd) - - TEST_MD_DEVICE_FILE="${ATF_TMPDIR}/${TEST_MD_DEVICE_FILE}" - TEST_MOUNT_DIR="${ATF_TMPDIR}/${TEST_MOUNT_DIR}" - - # XXX: need to nest this because of how kyua creates $TMPDIR; otherwise - # it will run into EPERM issues later - TEST_INPUTS_DIR="${ATF_TMPDIR}/test/inputs" - atf_check -e empty -s exit:0 mkdir -m 0777 -p $TEST_MOUNT_DIR atf_check -e empty -s exit:0 mkdir -m 0777 -p $TEST_INPUTS_DIR - cd $TEST_INPUTS_DIR } create_test_inputs() { - create_test_dir + create_test_dirs + + cd $TEST_INPUTS_DIR atf_check -e empty -s exit:0 mkdir -m 0755 -p a/b/1 atf_check -e empty -s exit:0 ln -s a/b c @@ -58,7 +51,9 @@ create_test_inputs() atf_check -e empty -s exit:0 ln d e atf_check -e empty -s exit:0 touch .f atf_check -e empty -s exit:0 mkdir .g - atf_check -e empty -s exit:0 mkfifo h + # XXX: fifos on the filesystem don't match fifos created by makefs for + # some odd reason. + #atf_check -e empty -s exit:0 mkfifo h atf_check -e ignore -s exit:0 dd if=/dev/zero of=i count=1000 bs=1 atf_check -e empty -s exit:0 touch klmn atf_check -e empty -s exit:0 touch opqr @@ -78,4 +73,14 @@ create_test_inputs() atf_check -e empty -s exit:0 touch 0b00001100 atf_check -e empty -s exit:0 touch 0b00001101 atf_check -e empty -s exit:0 touch 0b00001110 + + for filesize in 1 512 $(( 2 * $KB )) $(( 10 * $KB )) $(( 512 * $KB )); \ + do + atf_check -e ignore -o empty -s exit:0 \ + dd if=/dev/zero of=${filesize}.file bs=1 \ + count=1 oseek=${filesize} conv=sparse + files="${files} ${filesize}.file" + done + + cd - } From owner-svn-src-all@freebsd.org Thu Oct 22 08:02: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 84D57A1B742; Thu, 22 Oct 2015 08:02:28 +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 49E6D1F9A; Thu, 22 Oct 2015 08:02:28 +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 t9M82Rph000476; Thu, 22 Oct 2015 08:02:27 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M82RBG000475; Thu, 22 Oct 2015 08:02:27 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510220802.t9M82RBG000475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 22 Oct 2015 08:02:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289744 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2015 08:02:28 -0000 Author: adrian Date: Thu Oct 22 08:02:27 2015 New Revision: 289744 URL: https://svnweb.freebsd.org/changeset/base/289744 Log: arge: use 1-byte TX and RX alignment for AR9330/AR9331. This part seems to work bug-free with single byte TX/RX buffer alignment. This drops the CPU requirement to bridge 100mbit iperf from 100% CPU to ~ 50% CPU. Tested: * AP121 (AR9330) SoC, highly magic netbooted kernel + USB rootfs due to 4mb flash, 16mb RAM; doing bridging between arge0 and arge1. Notes: * Yes, I likely can also turn this on for the AR934x SoC family now. But since hardware design apparently follows similar branching strategies to software design, I'll go and make sure all the AR934x's that made it out into shipping products work before I flip it on. Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Thu Oct 22 07:22:05 2015 (r289743) +++ head/sys/mips/atheros/if_arge.c Thu Oct 22 08:02:27 2015 (r289744) @@ -653,6 +653,8 @@ arge_attach(device_t dev) * Hardware workarounds. */ switch (ar71xx_soc) { + case AR71XX_SOC_AR9330: + case AR71XX_SOC_AR9331: case AR71XX_SOC_QCA9556: case AR71XX_SOC_QCA9558: /* Arbitrary alignment */ From owner-svn-src-all@freebsd.org Thu Oct 22 08:08: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 3B193A1B7E7; Thu, 22 Oct 2015 08:08:08 +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 E42C911A5; Thu, 22 Oct 2015 08:08:07 +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 t9M886QJ002689; Thu, 22 Oct 2015 08:08:06 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M886On002687; Thu, 22 Oct 2015 08:08:06 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510220808.t9M886On002687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 22 Oct 2015 08:08:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289745 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2015 08:08:08 -0000 Author: adrian Date: Thu Oct 22 08:08:06 2015 New Revision: 289745 URL: https://svnweb.freebsd.org/changeset/base/289745 Log: Add support for the TP-Link TL-WR740N v4. This is an AR9331 part based on the AP121 reference design but with 32MB RAM. Yes, it has 4MB flash and it has no USB, so clever hacks are required to get it up and working. But boot/work it does. Added: head/sys/mips/conf/TL-WR740Nv4 (contents, props changed) head/sys/mips/conf/TL-WR740Nv4.hints (contents, props changed) Added: head/sys/mips/conf/TL-WR740Nv4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/TL-WR740Nv4 Thu Oct 22 08:08:06 2015 (r289745) @@ -0,0 +1,53 @@ +# +# TP-Link WR740N v4 +# +# * AR9330 SoC +# * 32MB RAM +# * 4MB flash +# * Integrated 1x1 2GHz wifi and 10/100 bridge +# +# $FreeBSD$ +# + +# Include the default AR933x parameters +include "AR933X_BASE" + +ident CARAMBOLA2 + +# Override hints with board values +hints "CARAMBOLA2.hints" + +# Board memory - 32MB +options AR71XX_REALMEM=(32*1024*1024) + +# i2c GPIO bus +#device gpioiic +#device iicbb +#device iicbus +#device iic + +# Options required for miiproxy and mdiobus +options ARGE_MDIO # Export an MDIO bus separate from arge +device miiproxy # MDIO bus <-> MII PHY rendezvous + +device etherswitch +device arswitch + +# read MSDOS formatted disks - USB +#options MSDOSFS + +# Enable the uboot environment stuff rather then the +# redboot stuff. +options AR71XX_ENV_UBOOT + +# uzip - to boot natively from flash +device geom_uncompress +options GEOM_UNCOMPRESS + +# Used for the static uboot partition map +device geom_map + +# Boot off of the rootfs, as defined in the geom_map setup. +# options ROOTDEVNAME=\"ufs:map/rootfs.uncompress\" +# Note: we don't fit in 4MB flash, so the rootfs must be on USB for now +options ROOTDEVNAME=\"ufs:da0\" Added: head/sys/mips/conf/TL-WR740Nv4.hints ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/TL-WR740Nv4.hints Thu Oct 22 08:08:06 2015 (r289745) @@ -0,0 +1,87 @@ +# +# This file adds to the values in AR933X_BASE.hints +# +# $FreeBSD$ + +# mdiobus on arge1 +hint.argemdio.0.at="nexus0" +hint.argemdio.0.maddr=0x1a000000 +hint.argemdio.0.msize=0x1000 +hint.argemdio.0.order=0 + +# Embedded Atheros Switch +hint.arswitch.0.at="mdio0" + +# XXX this should really say it's an AR933x switch, as there +# are some vlan specific differences here! +hint.arswitch.0.is_7240=1 +hint.arswitch.0.numphys=4 +hint.arswitch.0.phy4cpu=1 # phy 4 is a "CPU" separate PHY +hint.arswitch.0.is_rgmii=0 +hint.arswitch.0.is_gmii=1 # arge1 <-> switch PHY is GMII + +# arge0 - MII, autoneg, phy(4) +hint.arge.0.phymask=0x10 # PHY4 +hint.arge.0.mdio=mdioproxy1 # .. off of the switch mdiobus +hint.arge.0.eeprommac=0x1fff0000 + +# arge1 - GMII, 1000/full +hint.arge.1.phymask=0x0 # No directly mapped PHYs +hint.arge.1.media=1000 +hint.arge.1.fduplex=1 +hint.arge.1.eeprommac=0x1fff0006 + +# Where the ART is - last 64k in the flash +# 0x9fff1000 ? +hint.ath.0.eepromaddr=0x1fff0000 +hint.ath.0.eepromsize=16384 + +# The TL-WR740N v4 is a default AP121 - it comes with 4MB flash. +# +# The boot parameters: +# bootargs=console=ttyS0,115200 root=31:02 rootfstype=squashfs init=/sbin/init +# mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),2752k(rootfs), +# 896k(uImage),64k(NVRAM),64k(ART) +# bootcmd=bootm 0x9f020000 +# +# .. so uboot is 128K, there's no ubootenv, and the runtime image starts +# at 0x9f020000. + +hint.map.0.at="flash/spi0" +hint.map.0.start=0x00000000 +hint.map.0.end=0x000020000 +hint.map.0.name="uboot" +hint.map.0.readonly=1 + +hint.map.1.at="flash/spi0" +hint.map.1.start=0x00020000 +hint.map.1.end=0x003e0000 +hint.map.1.name="kernel" +hint.map.1.readonly=0 + +hint.map.2.at="flash/spi0" +hint.map.2.start=0x003e0000 +hint.map.2.end=0x003f0000 +hint.map.2.name="cfg" +hint.map.2.readonly=0 + +# This is radio calibration section. It is (or should be!) unique +# for each board, to take into account thermal and electrical differences +# as well as the regulatory compliance data. +# +hint.map.3.at="flash/spi0" +hint.map.3.start=0x003f0000 +hint.map.3.end=0x0x400000 +hint.map.3.name="art" +hint.map.3.readonly=1 + +# GPIO specific configuration block + +# Don't flip on anything that isn't already enabled. +# This includes leaving the SPI CS1/CS2 pins as GPIO pins as they're +# not used here. +hint.gpio.0.function_set=0x00000000 +hint.gpio.0.function_clear=0x00000000 + +# These are the GPIO LEDs and buttons which can be software controlled. +# hint.gpio.0.pinmask=0x00fc1803 From owner-svn-src-all@freebsd.org Thu Oct 22 08:37: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 86E9BA1BEF8; Thu, 22 Oct 2015 08:37:12 +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 552231001; Thu, 22 Oct 2015 08:37:12 +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 t9M8bB2A011282; Thu, 22 Oct 2015 08:37:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M8bB6f011281; Thu, 22 Oct 2015 08:37:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510220837.t9M8bB6f011281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 22 Oct 2015 08:37:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289746 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2015 08:37:12 -0000 Author: ngie Date: Thu Oct 22 08:37:11 2015 New Revision: 289746 URL: https://svnweb.freebsd.org/changeset/base/289746 Log: Exit with a user-friendly message instead of tripping an assert if vm_activate_cpu(..) fails when called from fbsdrun_addcpu(..) MFC after: 1 week PR: 203884 Reviewed by: grehan Submitted by: William Orr Modified: head/usr.sbin/bhyve/bhyverun.c Modified: head/usr.sbin/bhyve/bhyverun.c ============================================================================== --- head/usr.sbin/bhyve/bhyverun.c Thu Oct 22 08:08:06 2015 (r289745) +++ head/usr.sbin/bhyve/bhyverun.c Thu Oct 22 08:37:11 2015 (r289746) @@ -261,7 +261,8 @@ fbsdrun_addcpu(struct vmctx *ctx, int fr * with vm_suspend(). */ error = vm_activate_cpu(ctx, newcpu); - assert(error == 0); + if (error != 0) + err(EX_OSERR, "could not activate CPU %d", newcpu); CPU_SET_ATOMIC(newcpu, &cpumask); From owner-svn-src-all@freebsd.org Thu Oct 22 09:07: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 438ECA1C547; Thu, 22 Oct 2015 09:07:55 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18FA81E67; Thu, 22 Oct 2015 09:07:55 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9M97s0N019792; Thu, 22 Oct 2015 09:07:54 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M97rYe019787; Thu, 22 Oct 2015 09:07:53 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201510220907.t9M97rYe019787@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 22 Oct 2015 09:07:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289747 - in head/sys: amd64/cloudabi64 compat/cloudabi64 conf modules/cloudabi64 X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 09:07:55 -0000 Author: ed Date: Thu Oct 22 09:07:53 2015 New Revision: 289747 URL: https://svnweb.freebsd.org/changeset/base/289747 Log: Refactoring: move out generic bits from cloudabi64_sysvec.c. In order to make it easier to support CloudABI on ARM64, move out all of the bits from the AMD64 cloudabi_sysvec.c into a new file cloudabi_module.c that would otherwise remain identical. This reduces the AMD64 specific code to just ~160 lines. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D3974 Added: head/sys/compat/cloudabi64/cloudabi64_module.c - copied, changed from r289745, head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Modified: head/sys/amd64/cloudabi64/cloudabi64_sysvec.c head/sys/compat/cloudabi64/cloudabi64_util.h head/sys/conf/files head/sys/modules/cloudabi64/Makefile Modified: head/sys/amd64/cloudabi64/cloudabi64_sysvec.c ============================================================================== --- head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Thu Oct 22 08:37:11 2015 (r289746) +++ head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Thu Oct 22 09:07:53 2015 (r289747) @@ -27,107 +27,26 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#include #include -#include #include -#include -#include #include -#include -#include #include +#include #include #include #include -#include #include #include #include -#include #include extern const char *cloudabi64_syscallnames[]; extern struct sysent cloudabi64_sysent[]; -static register_t * -cloudabi64_copyout_strings(struct image_params *imgp) -{ - uintptr_t begin; - size_t len; - - /* Copy out program arguments. */ - len = imgp->args->begin_envv - imgp->args->begin_argv; - begin = rounddown2(USRSTACK - len, sizeof(register_t)); - copyout(imgp->args->begin_argv, (void *)begin, len); - return ((register_t *)begin); -} - -static int -cloudabi64_fixup(register_t **stack_base, struct image_params *imgp) -{ - char canarybuf[64]; - Elf64_Auxargs *args; - struct thread *td; - void *argdata, *canary; - size_t argdatalen; - int error; - - /* - * CloudABI executables do not store the FreeBSD OS release - * number in their header. Set the OS release number to the - * latest version of FreeBSD, so that system calls behave as if - * called natively. - */ - td = curthread; - td->td_proc->p_osrel = __FreeBSD_version; - - /* Store canary for stack smashing protection. */ - argdata = *stack_base; - arc4rand(canarybuf, sizeof(canarybuf), 0); - *stack_base -= howmany(sizeof(canarybuf), sizeof(register_t)); - canary = *stack_base; - error = copyout(canarybuf, canary, sizeof(canarybuf)); - if (error != 0) - return (error); - - /* - * Compute length of program arguments. As the argument data is - * binary safe, we had to add a trailing null byte in - * exec_copyin_data_fds(). Undo this by reducing the length. - */ - args = (Elf64_Auxargs *)imgp->auxargs; - argdatalen = imgp->args->begin_envv - imgp->args->begin_argv; - if (argdatalen > 0) - --argdatalen; - - /* Write out an auxiliary vector. */ - cloudabi64_auxv_t auxv[] = { -#define VAL(type, val) { .a_type = (type), .a_val = (val) } -#define PTR(type, ptr) { .a_type = (type), .a_ptr = (uintptr_t)(ptr) } - PTR(CLOUDABI_AT_ARGDATA, argdata), - VAL(CLOUDABI_AT_ARGDATALEN, argdatalen), - PTR(CLOUDABI_AT_CANARY, canary), - VAL(CLOUDABI_AT_CANARYLEN, sizeof(canarybuf)), - VAL(CLOUDABI_AT_NCPUS, mp_ncpus), - VAL(CLOUDABI_AT_PAGESZ, args->pagesz), - PTR(CLOUDABI_AT_PHDR, args->phdr), - VAL(CLOUDABI_AT_PHNUM, args->phnum), - VAL(CLOUDABI_AT_TID, td->td_tid), -#undef VAL -#undef PTR - { .a_type = CLOUDABI_AT_NULL }, - }; - *stack_base -= howmany(sizeof(auxv), sizeof(register_t)); - return (copyout(auxv, *stack_base, sizeof(auxv))); -} - static int cloudabi64_fetch_syscall_args(struct thread *td, struct syscall_args *sa) { @@ -234,43 +153,9 @@ static struct sysentvec cloudabi64_elf_s INIT_SYSENTVEC(elf_sysvec, &cloudabi64_elf_sysvec); -static Elf64_Brandinfo cloudabi64_brand = { +Elf64_Brandinfo cloudabi64_brand = { .brand = ELFOSABI_CLOUDABI, .machine = EM_X86_64, .sysvec = &cloudabi64_elf_sysvec, .compat_3_brand = "CloudABI", }; - -static int -cloudabi64_modevent(module_t mod, int type, void *data) -{ - - switch (type) { - case MOD_LOAD: - if (elf64_insert_brand_entry(&cloudabi64_brand) < 0) { - printf("Failed to add CloudABI ELF brand handler\n"); - return (EINVAL); - } - return (0); - case MOD_UNLOAD: - if (elf64_brand_inuse(&cloudabi64_brand)) - return (EBUSY); - if (elf64_remove_brand_entry(&cloudabi64_brand) < 0) { - printf("Failed to remove CloudABI ELF brand handler\n"); - return (EINVAL); - } - return (0); - default: - return (EOPNOTSUPP); - } -} - -static moduledata_t cloudabi64_module = { - "cloudabi64", - cloudabi64_modevent, - NULL -}; - -DECLARE_MODULE_TIED(cloudabi64, cloudabi64_module, SI_SUB_EXEC, SI_ORDER_ANY); -MODULE_DEPEND(cloudabi64, cloudabi, 1, 1, 1); -FEATURE(cloudabi64, "CloudABI 64bit support"); Copied and modified: head/sys/compat/cloudabi64/cloudabi64_module.c (from r289745, head/sys/amd64/cloudabi64/cloudabi64_sysvec.c) ============================================================================== --- head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Thu Oct 22 08:08:06 2015 (r289745, copy source) +++ head/sys/compat/cloudabi64/cloudabi64_module.c Thu Oct 22 09:07:53 2015 (r289747) @@ -27,9 +27,7 @@ __FBSDID("$FreeBSD$"); #include -#include #include -#include #include #include #include @@ -38,38 +36,25 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include #include #include -extern const char *cloudabi64_syscallnames[]; -extern struct sysent cloudabi64_sysent[]; - -static register_t * +register_t * cloudabi64_copyout_strings(struct image_params *imgp) { + struct image_args *args; uintptr_t begin; size_t len; /* Copy out program arguments. */ - len = imgp->args->begin_envv - imgp->args->begin_argv; - begin = rounddown2(USRSTACK - len, sizeof(register_t)); - copyout(imgp->args->begin_argv, (void *)begin, len); + args = imgp->args; + len = args->begin_envv - args->begin_argv; + begin = rounddown2(imgp->sysent->sv_usrstack - len, sizeof(register_t)); + copyout(args->begin_argv, (void *)begin, len); return ((register_t *)begin); } -static int +int cloudabi64_fixup(register_t **stack_base, struct image_params *imgp) { char canarybuf[64]; @@ -129,119 +114,6 @@ cloudabi64_fixup(register_t **stack_base } static int -cloudabi64_fetch_syscall_args(struct thread *td, struct syscall_args *sa) -{ - struct trapframe *frame = td->td_frame; - - /* Obtain system call number. */ - sa->code = frame->tf_rax; - if (sa->code >= CLOUDABI64_SYS_MAXSYSCALL) - return (ENOSYS); - sa->callp = &cloudabi64_sysent[sa->code]; - - /* Fetch system call arguments. */ - sa->args[0] = frame->tf_rdi; - sa->args[1] = frame->tf_rsi; - sa->args[2] = frame->tf_rdx; - sa->args[3] = frame->tf_rcx; /* Actually %r10. */ - sa->args[4] = frame->tf_r8; - sa->args[5] = frame->tf_r9; - - /* Default system call return values. */ - td->td_retval[0] = 0; - td->td_retval[1] = frame->tf_rdx; - return (0); -} - -static void -cloudabi64_set_syscall_retval(struct thread *td, int error) -{ - struct trapframe *frame = td->td_frame; - - switch (error) { - case 0: - /* System call succeeded. */ - frame->tf_rax = td->td_retval[0]; - frame->tf_rdx = td->td_retval[1]; - frame->tf_rflags &= ~PSL_C; - break; - case ERESTART: - /* Restart system call. */ - frame->tf_rip -= frame->tf_err; - frame->tf_r10 = frame->tf_rcx; - set_pcb_flags(td->td_pcb, PCB_FULL_IRET); - break; - case EJUSTRETURN: - break; - default: - /* System call returned an error. */ - frame->tf_rax = cloudabi_convert_errno(error); - frame->tf_rflags |= PSL_C; - break; - } -} - -static void -cloudabi64_schedtail(struct thread *td) -{ - struct trapframe *frame = td->td_frame; - - /* Initial register values for processes returning from fork. */ - frame->tf_rax = CLOUDABI_PROCESS_CHILD; - frame->tf_rdx = td->td_tid; -} - -void -cloudabi64_thread_setregs(struct thread *td, - const cloudabi64_threadattr_t *attr) -{ - struct trapframe *frame; - stack_t stack; - - /* Perform standard register initialization. */ - stack.ss_sp = (void *)attr->stack; - stack.ss_size = attr->stack_size; - cpu_set_upcall_kse(td, (void *)attr->entry_point, NULL, &stack); - - /* - * Pass in the thread ID of the new thread and the argument - * pointer provided by the parent thread in as arguments to the - * entry point. - */ - frame = td->td_frame; - frame->tf_rdi = td->td_tid; - frame->tf_rsi = attr->argument; -} - -static struct sysentvec cloudabi64_elf_sysvec = { - .sv_size = CLOUDABI64_SYS_MAXSYSCALL, - .sv_table = cloudabi64_sysent, - .sv_fixup = cloudabi64_fixup, - .sv_name = "CloudABI ELF64", - .sv_coredump = elf64_coredump, - .sv_pagesize = PAGE_SIZE, - .sv_minuser = VM_MIN_ADDRESS, - .sv_maxuser = VM_MAXUSER_ADDRESS, - .sv_usrstack = USRSTACK, - .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, - .sv_copyout_strings = cloudabi64_copyout_strings, - .sv_flags = SV_ABI_CLOUDABI | SV_CAPSICUM, - .sv_set_syscall_retval = cloudabi64_set_syscall_retval, - .sv_fetch_syscall_args = cloudabi64_fetch_syscall_args, - .sv_syscallnames = cloudabi64_syscallnames, - .sv_schedtail = cloudabi64_schedtail, -}; - -INIT_SYSENTVEC(elf_sysvec, &cloudabi64_elf_sysvec); - -static Elf64_Brandinfo cloudabi64_brand = { - .brand = ELFOSABI_CLOUDABI, - .machine = EM_X86_64, - .sysvec = &cloudabi64_elf_sysvec, - .compat_3_brand = "CloudABI", -}; - -static int cloudabi64_modevent(module_t mod, int type, void *data) { Modified: head/sys/compat/cloudabi64/cloudabi64_util.h ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_util.h Thu Oct 22 08:37:11 2015 (r289746) +++ head/sys/compat/cloudabi64/cloudabi64_util.h Thu Oct 22 09:07:53 2015 (r289747) @@ -28,10 +28,20 @@ #ifndef _CLOUDABI64_UTIL_H_ #define _CLOUDABI64_UTIL_H_ +#include +#include + #include +struct image_params; struct thread; +extern Elf64_Brandinfo cloudabi64_brand; + +/* Stack initialization during process execution. */ +register_t *cloudabi64_copyout_strings(struct image_params *); +int cloudabi64_fixup(register_t **, struct image_params *); + void cloudabi64_thread_setregs(struct thread *, const cloudabi64_threadattr_t *); Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Oct 22 08:37:11 2015 (r289746) +++ head/sys/conf/files Thu Oct 22 09:07:53 2015 (r289747) @@ -266,6 +266,7 @@ compat/cloudabi/cloudabi_random.c option compat/cloudabi/cloudabi_sock.c optional compat_cloudabi64 compat/cloudabi/cloudabi_thread.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_fd.c optional compat_cloudabi64 +compat/cloudabi64/cloudabi64_module.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_poll.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_sock.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_syscalls.c optional compat_cloudabi64 Modified: head/sys/modules/cloudabi64/Makefile ============================================================================== --- head/sys/modules/cloudabi64/Makefile Thu Oct 22 08:37:11 2015 (r289746) +++ head/sys/modules/cloudabi64/Makefile Thu Oct 22 09:07:53 2015 (r289747) @@ -4,8 +4,8 @@ .PATH: ${.CURDIR}/../../${MACHINE}/cloudabi64 KMOD= cloudabi64 -SRCS= cloudabi64_fd.c cloudabi64_poll.c cloudabi64_sock.c \ - cloudabi64_syscalls.c cloudabi64_sysent.c cloudabi64_sysvec.c \ - cloudabi64_thread.c +SRCS= cloudabi64_fd.c cloudabi64_module.c cloudabi64_poll.c \ + cloudabi64_sock.c cloudabi64_syscalls.c cloudabi64_sysent.c \ + cloudabi64_sysvec.c cloudabi64_thread.c .include From owner-svn-src-all@freebsd.org Thu Oct 22 09:33: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 ABF4BA1C953; Thu, 22 Oct 2015 09:33:35 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AFF91D20; Thu, 22 Oct 2015 09:33:35 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9M9XYCF028343; Thu, 22 Oct 2015 09:33:34 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M9XYRm028340; Thu, 22 Oct 2015 09:33:34 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201510220933.t9M9XYRm028340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 22 Oct 2015 09:33:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289748 - 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: Thu, 22 Oct 2015 09:33:35 -0000 Author: ed Date: Thu Oct 22 09:33:34 2015 New Revision: 289748 URL: https://svnweb.freebsd.org/changeset/base/289748 Log: Add a way to distinguish between forking and thread creation in schedtail. For CloudABI we need to initialize the registers of new threads differently based on whether the thread got created through a fork or through simple thread creation. Add a flag, TDP_FORKING, that is set by do_fork() and cleared by fork_exit(). This can be tested against in schedtail. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D3973 Modified: head/sys/kern/kern_fork.c head/sys/kern/subr_syscall.c head/sys/sys/proc.h Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Thu Oct 22 09:07:53 2015 (r289747) +++ head/sys/kern/kern_fork.c Thu Oct 22 09:33:34 2015 (r289748) @@ -586,7 +586,7 @@ do_fork(struct thread *td, int flags, st * been preserved. */ p2->p_flag |= p1->p_flag & P_SUGID; - td2->td_pflags |= td->td_pflags & TDP_ALTSTACK; + td2->td_pflags |= (td->td_pflags & TDP_ALTSTACK) | TDP_FORKING; SESS_LOCK(p1->p_session); if (p1->p_session->s_ttyvp != NULL && p1->p_flag & P_CONTROLT) p2->p_flag |= P_CONTROLT; @@ -1023,6 +1023,7 @@ fork_exit(void (*callout)(void *, struct if (p->p_sysent->sv_schedtail != NULL) (p->p_sysent->sv_schedtail)(td); + td->td_pflags &= ~TDP_FORKING; } /* Modified: head/sys/kern/subr_syscall.c ============================================================================== --- head/sys/kern/subr_syscall.c Thu Oct 22 09:07:53 2015 (r289747) +++ head/sys/kern/subr_syscall.c Thu Oct 22 09:33:34 2015 (r289748) @@ -176,6 +176,9 @@ syscallret(struct thread *td, int error, struct proc *p, *p2; int traced; + KASSERT((td->td_pflags & TDP_FORKING) == 0, + ("fork() did not clear TDP_FORKING upon completion")); + p = td->td_proc; /* Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Thu Oct 22 09:07:53 2015 (r289747) +++ head/sys/sys/proc.h Thu Oct 22 09:33:34 2015 (r289748) @@ -446,7 +446,7 @@ do { \ #define TDP_RESETSPUR 0x04000000 /* Reset spurious page fault history. */ #define TDP_NERRNO 0x08000000 /* Last errno is already in td_errno */ #define TDP_UIOHELD 0x10000000 /* Current uio has pages held in td_ma */ -#define TDP_UNUSED29 0x20000000 /* --available-- */ +#define TDP_FORKING 0x20000000 /* Thread is being created through fork() */ #define TDP_EXECVMSPC 0x40000000 /* Execve destroyed old vmspace */ /* From owner-svn-src-all@freebsd.org Thu Oct 22 09:50: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 7AA79A1CB8A; Thu, 22 Oct 2015 09:50: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 37BA4134A; Thu, 22 Oct 2015 09:50:48 +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 t9M9olD4033404; Thu, 22 Oct 2015 09:50:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M9ojfg033389; Thu, 22 Oct 2015 09:50:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510220950.t9M9ojfg033389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 22 Oct 2015 09:50:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289749 - in head/sys: conf contrib/rdma/krping dev/cxgb/ulp/iw_cxgb dev/cxgbe/iw_cxgbe modules modules/linuxapi modules/linuxkpi ofed/drivers/infiniband/core ofed/drivers/infiniband/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: Thu, 22 Oct 2015 09:50:48 -0000 Author: hselasky Date: Thu Oct 22 09:50:45 2015 New Revision: 289749 URL: https://svnweb.freebsd.org/changeset/base/289749 Log: Rename linuxapi[.ko] into linuxkpi[.ko], to reflect that it is a kernel programming interface module, KPI, to avoid confusion with the existing Linux userspace binary compatibility shims. Bump the FreeBSD_version number. Reviewed by: np @ Suggested by: dumbbell @ Sponsored by: Mellanox Technologies Added: head/sys/modules/linuxkpi/ - copied from r289748, head/sys/modules/linuxapi/ Deleted: head/sys/modules/linuxapi/ Modified: head/sys/conf/files head/sys/conf/options head/sys/contrib/rdma/krping/krping.c head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c head/sys/dev/cxgbe/iw_cxgbe/device.c head/sys/modules/Makefile head/sys/modules/linuxkpi/Makefile head/sys/ofed/drivers/infiniband/core/device.c head/sys/ofed/drivers/infiniband/hw/mlx4/main.c head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c head/sys/ofed/drivers/net/mlx4/en_main.c head/sys/ofed/drivers/net/mlx4/main.c head/sys/ofed/include/linux/linux_kmod.c head/sys/sys/param.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Oct 22 09:33:34 2015 (r289748) +++ head/sys/conf/files Thu Oct 22 09:50:45 2015 (r289749) @@ -3797,15 +3797,15 @@ nlm/nlm_prot_xdr.c optional nfslockd | nlm/sm_inter_xdr.c optional nfslockd | nfsd # Linux Kernel Compatibility API -ofed/include/linux/linux_kmod.c optional ofed | compat_linuxapi \ +ofed/include/linux/linux_kmod.c optional ofed | compat_linuxkpi \ no-depend compile-with "${OFED_C}" -ofed/include/linux/linux_compat.c optional ofed | compat_linuxapi \ +ofed/include/linux/linux_compat.c optional ofed | compat_linuxkpi \ no-depend compile-with "${OFED_C}" -ofed/include/linux/linux_pci.c optional ofed | compat_linuxapi \ +ofed/include/linux/linux_pci.c optional ofed | compat_linuxkpi \ no-depend compile-with "${OFED_C}" -ofed/include/linux/linux_idr.c optional ofed | compat_linuxapi \ +ofed/include/linux/linux_idr.c optional ofed | compat_linuxkpi \ no-depend compile-with "${OFED_C}" -ofed/include/linux/linux_radix.c optional ofed | compat_linuxapi \ +ofed/include/linux/linux_radix.c optional ofed | compat_linuxkpi \ no-depend compile-with "${OFED_C}" # OpenFabrics Enterprise Distribution (Infiniband) ofed/drivers/infiniband/core/addr.c optional ofed \ Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Oct 22 09:33:34 2015 (r289748) +++ head/sys/conf/options Thu Oct 22 09:50:45 2015 (r289749) @@ -86,7 +86,7 @@ COMPAT_FREEBSD7 opt_compat.h COMPAT_FREEBSD9 opt_compat.h COMPAT_FREEBSD10 opt_compat.h COMPAT_CLOUDABI64 opt_dontuse.h -COMPAT_LINUXAPI opt_compat.h +COMPAT_LINUXKPI opt_compat.h COMPILING_LINT opt_global.h CY_PCI_FASTINTR DEADLKRES opt_watchdog.h Modified: head/sys/contrib/rdma/krping/krping.c ============================================================================== --- head/sys/contrib/rdma/krping/krping.c Thu Oct 22 09:33:34 2015 (r289748) +++ head/sys/contrib/rdma/krping/krping.c Thu Oct 22 09:50:45 2015 (r289749) @@ -61,7 +61,7 @@ MODULE_AUTHOR("Steve Wise"); MODULE_DESCRIPTION("RDMA ping client/server"); MODULE_LICENSE("Dual BSD/GPL"); MODULE_VERSION(krping, 1); -MODULE_DEPEND(krping, linuxapi, 1, 1, 1); +MODULE_DEPEND(krping, linuxkpi, 1, 1, 1); static __inline uint64_t get_cycles(void) Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c Thu Oct 22 09:33:34 2015 (r289748) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c Thu Oct 22 09:50:45 2015 (r289749) @@ -296,5 +296,5 @@ MODULE_DEPEND(t3_tom, cxgbc, 1, 1, 1); MODULE_DEPEND(iw_cxgb, toecore, 1, 1, 1); MODULE_DEPEND(iw_cxgb, t3_tom, 1, 1, 1); MODULE_DEPEND(iw_cxgb, ibcore, 1, 1, 1); -MODULE_DEPEND(iw_cxgb, linuxapi, 1, 1, 1); +MODULE_DEPEND(iw_cxgb, linuxkpi, 1, 1, 1); Modified: head/sys/dev/cxgbe/iw_cxgbe/device.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/device.c Thu Oct 22 09:33:34 2015 (r289748) +++ head/sys/dev/cxgbe/iw_cxgbe/device.c Thu Oct 22 09:50:45 2015 (r289749) @@ -363,5 +363,5 @@ MODULE_VERSION(iw_cxgbe, 1); MODULE_DEPEND(iw_cxgbe, t4nex, 1, 1, 1); MODULE_DEPEND(iw_cxgbe, t4_tom, 1, 1, 1); MODULE_DEPEND(iw_cxgbe, ibcore, 1, 1, 1); -MODULE_DEPEND(iw_cxgbe, linuxapi, 1, 1, 1); +MODULE_DEPEND(iw_cxgbe, linuxkpi, 1, 1, 1); DECLARE_MODULE(iw_cxgbe, c4iw_mod_data, SI_SUB_EXEC, SI_ORDER_ANY); Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Thu Oct 22 09:33:34 2015 (r289748) +++ head/sys/modules/Makefile Thu Oct 22 09:50:45 2015 (r289749) @@ -203,7 +203,7 @@ SUBDIR= \ ${_linux} \ ${_linux_common} \ ${_linux64} \ - ${_linuxapi} \ + ${_linuxkpi} \ lmc \ lpt \ mac_biba \ @@ -534,7 +534,7 @@ _linprocfs= linprocfs _linsysfs= linsysfs _linux= linux .if ${MK_OFED} != "no" -_linuxapi= linuxapi +_linuxkpi= linuxkpi .endif _ndis= ndis .if ${MK_CDDL} != "no" || defined(ALL_MODULES) Modified: head/sys/modules/linuxkpi/Makefile ============================================================================== --- head/sys/modules/linuxapi/Makefile Thu Oct 22 09:33:34 2015 (r289748) +++ head/sys/modules/linuxkpi/Makefile Thu Oct 22 09:50:45 2015 (r289749) @@ -1,7 +1,7 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../ofed/include/linux -KMOD= linuxapi +KMOD= linuxkpi SRCS= linux_kmod.c \ linux_compat.c \ linux_pci.c \ Modified: head/sys/ofed/drivers/infiniband/core/device.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/device.c Thu Oct 22 09:33:34 2015 (r289748) +++ head/sys/ofed/drivers/infiniband/core/device.c Thu Oct 22 09:50:45 2015 (r289749) @@ -789,5 +789,5 @@ static moduledata_t ibcore_mod = { }; MODULE_VERSION(ibcore, 1); -MODULE_DEPEND(ibcore, linuxapi, 1, 1, 1); +MODULE_DEPEND(ibcore, linuxkpi, 1, 1, 1); DECLARE_MODULE(ibcore, ibcore_mod, SI_SUB_SMP, SI_ORDER_ANY); Modified: head/sys/ofed/drivers/infiniband/hw/mlx4/main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mlx4/main.c Thu Oct 22 09:33:34 2015 (r289748) +++ head/sys/ofed/drivers/infiniband/hw/mlx4/main.c Thu Oct 22 09:50:45 2015 (r289749) @@ -2884,4 +2884,4 @@ static moduledata_t mlx4ib_mod = { DECLARE_MODULE(mlx4ib, mlx4ib_mod, SI_SUB_SMP, SI_ORDER_ANY); MODULE_DEPEND(mlx4ib, mlx4, 1, 1, 1); MODULE_DEPEND(mlx4ib, ibcore, 1, 1, 1); -MODULE_DEPEND(mlx4ib, linuxapi, 1, 1, 1); +MODULE_DEPEND(mlx4ib, linuxkpi, 1, 1, 1); Modified: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c Thu Oct 22 09:33:34 2015 (r289748) +++ head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c Thu Oct 22 09:50:45 2015 (r289749) @@ -48,7 +48,7 @@ MODULE_AUTHOR("Roland Dreier"); MODULE_DESCRIPTION("Mellanox InfiniBand HCA low-level driver"); MODULE_LICENSE("Dual BSD/GPL"); MODULE_VERSION(mthca, 1); -MODULE_DEPEND(mthca, linuxapi, 1, 1, 1); +MODULE_DEPEND(mthca, linuxkpi, 1, 1, 1); MODULE_DEPEND(mthca, ibcore, 1, 1, 1); #ifdef CONFIG_INFINIBAND_MTHCA_DEBUG Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Thu Oct 22 09:33:34 2015 (r289748) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Thu Oct 22 09:50:45 2015 (r289749) @@ -1541,4 +1541,4 @@ static moduledata_t ipoib_mod = { DECLARE_MODULE(ipoib, ipoib_mod, SI_SUB_SMP, SI_ORDER_ANY); MODULE_DEPEND(ipoib, ibcore, 1, 1, 1); -MODULE_DEPEND(ipoib, linuxapi, 1, 1, 1); +MODULE_DEPEND(ipoib, linuxkpi, 1, 1, 1); Modified: head/sys/ofed/drivers/net/mlx4/en_main.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_main.c Thu Oct 22 09:33:34 2015 (r289748) +++ head/sys/ofed/drivers/net/mlx4/en_main.c Thu Oct 22 09:50:45 2015 (r289749) @@ -349,4 +349,4 @@ static moduledata_t mlxen_mod = { }; DECLARE_MODULE(mlxen, mlxen_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY); MODULE_DEPEND(mlxen, mlx4, 1, 1, 1); -MODULE_DEPEND(mlxen, linuxapi, 1, 1, 1); +MODULE_DEPEND(mlxen, linuxkpi, 1, 1, 1); Modified: head/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/main.c Thu Oct 22 09:33:34 2015 (r289748) +++ head/sys/ofed/drivers/net/mlx4/main.c Thu Oct 22 09:50:45 2015 (r289749) @@ -3809,5 +3809,5 @@ static moduledata_t mlx4_mod = { }; MODULE_VERSION(mlx4, 1); DECLARE_MODULE(mlx4, mlx4_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY); -MODULE_DEPEND(mlx4, linuxapi, 1, 1, 1); +MODULE_DEPEND(mlx4, linuxkpi, 1, 1, 1); Modified: head/sys/ofed/include/linux/linux_kmod.c ============================================================================== --- head/sys/ofed/include/linux/linux_kmod.c Thu Oct 22 09:33:34 2015 (r289748) +++ head/sys/ofed/include/linux/linux_kmod.c Thu Oct 22 09:50:45 2015 (r289749) @@ -30,6 +30,6 @@ __FBSDID("$FreeBSD$"); #include #include -MODULE_VERSION(linuxapi, 1); -MODULE_DEPEND(linuxapi, pci, 1, 1, 1); +MODULE_VERSION(linuxkpi, 1); +MODULE_DEPEND(linuxkpi, pci, 1, 1, 1); Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Thu Oct 22 09:33:34 2015 (r289748) +++ head/sys/sys/param.h Thu Oct 22 09:50:45 2015 (r289749) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100082 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100083 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Thu Oct 22 09:55: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 E2F6EA1CD2A; Thu, 22 Oct 2015 09:55:41 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADA8B18E4; Thu, 22 Oct 2015 09:55:41 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9M9tea3034216; Thu, 22 Oct 2015 09:55:40 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9M9teSs034215; Thu, 22 Oct 2015 09:55:40 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201510220955.t9M9teSs034215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 22 Oct 2015 09:55:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289750 - head/usr.sbin/rtadvd X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 09:55:42 -0000 Author: hrs Date: Thu Oct 22 09:55:40 2015 New Revision: 289750 URL: https://svnweb.freebsd.org/changeset/base/289750 Log: - Fix a bug which prevented dnssl[0-9] and rdnss[0-9] parameters from working. - Fix a pointer calculation for padding when multiple dnssl[0-9] parameters are specified [*]. Reported by: http://bugs.dragonflybsd.org/issues/2847 [*] Modified: head/usr.sbin/rtadvd/config.c Modified: head/usr.sbin/rtadvd/config.c ============================================================================== --- head/usr.sbin/rtadvd/config.c Thu Oct 22 09:50:45 2015 (r289749) +++ head/usr.sbin/rtadvd/config.c Thu Oct 22 09:55:40 2015 (r289750) @@ -808,7 +808,7 @@ getconfig_free_rti: makeentry(entbuf, sizeof(entbuf), i, "rdnss"); addr = (char *)agetstr(entbuf, &bp); if (addr == NULL) - break; + continue; ELM_MALLOC(rdn, exit(1)); TAILQ_INIT(&rdn->rd_list); @@ -859,7 +859,7 @@ getconfig_free_rdn: makeentry(entbuf, sizeof(entbuf), i, "dnssl"); addr = (char *)agetstr(entbuf, &bp); if (addr == NULL) - break; + continue; ELM_MALLOC(dns, exit(1)); @@ -1528,6 +1528,7 @@ make_packet(struct rainfo *rai) /* Padding to next 8 octets boundary */ len = buf - (char *)ndopt_dnssl; len += (len % 8) ? 8 - len % 8 : 0; + buf = (char *)ndopt_dnssl + len; /* Length field must be in 8 octets */ ndopt_dnssl->nd_opt_dnssl_len = len / 8; From owner-svn-src-all@freebsd.org Thu Oct 22 10:57: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 6253EA1AC5F; Thu, 22 Oct 2015 10:57:17 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 237361A7E; Thu, 22 Oct 2015 10:57:17 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9MAvGIs052975; Thu, 22 Oct 2015 10:57:16 GMT (envelope-from gabor@FreeBSD.org) Received: (from gabor@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MAvG6A052974; Thu, 22 Oct 2015 10:57:16 GMT (envelope-from gabor@FreeBSD.org) Message-Id: <201510221057.t9MAvG6A052974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gabor set sender to gabor@FreeBSD.org using -f From: Gabor Kovesdan Date: Thu, 22 Oct 2015 10:57:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289751 - head/usr.bin/sort X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 10:57:17 -0000 Author: gabor Date: Thu Oct 22 10:57:15 2015 New Revision: 289751 URL: https://svnweb.freebsd.org/changeset/base/289751 Log: -C and -c allow at most one input file. Ensure this is the case when the input files are specified through --files0-from. Submitted by: tim@OpenBSD Obtained from: OpenBSD MFC after: 1 week Modified: head/usr.bin/sort/sort.c Modified: head/usr.bin/sort/sort.c ============================================================================== --- head/usr.bin/sort/sort.c Thu Oct 22 09:55:40 2015 (r289750) +++ head/usr.bin/sort/sort.c Thu Oct 22 10:57:15 2015 (r289751) @@ -1168,6 +1168,11 @@ main(int argc, char **argv) argc -= optind; argv += optind; + if (argv_from_file0) { + argc = argc_from_file0; + argv = argv_from_file0; + } + #ifndef WITHOUT_NLS catalog = catopen("sort", NL_CAT_LOCALE); #endif @@ -1205,11 +1210,6 @@ main(int argc, char **argv) ks->sm.func = get_sort_func(&(ks->sm)); } - if (argv_from_file0) { - argc = argc_from_file0; - argv = argv_from_file0; - } - if (debug_sort) { printf("Memory to be used for sorting: %llu\n",available_free_memory); #if defined(SORT_THREADS) From owner-svn-src-all@freebsd.org Thu Oct 22 11:09: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 99070A1AE85; Thu, 22 Oct 2015 11:09:27 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 656D11F19; Thu, 22 Oct 2015 11:09:27 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9MB9QQ6055946; Thu, 22 Oct 2015 11:09:26 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MB9Qc1055942; Thu, 22 Oct 2015 11:09:26 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201510221109.t9MB9Qc1055942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 22 Oct 2015 11:09:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289752 - in head: share/man/man4 sys/arm64/cloudabi64 sys/conf sys/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2015 11:09:27 -0000 Author: ed Date: Thu Oct 22 11:09:25 2015 New Revision: 289752 URL: https://svnweb.freebsd.org/changeset/base/289752 Log: Add support for CloudABI on ARM64. It turns out that it is pretty easy to make CloudABI work on ARM64. We essentially only need to copy over the sysvec from AMD64 and ensure that we use ARM64 specific registers. As there is an overlap between function argument and return registers, we do need to extend cloudabi64_schedtail() to only set its values if we're actually forking. Not when we're creating a new thread. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D3917 Added: head/sys/arm64/cloudabi64/ head/sys/arm64/cloudabi64/cloudabi64_sysvec.c - copied, changed from r289747, head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Modified: head/share/man/man4/cloudabi.4 head/sys/conf/files.arm64 head/sys/modules/Makefile Modified: head/share/man/man4/cloudabi.4 ============================================================================== --- head/share/man/man4/cloudabi.4 Thu Oct 22 10:57:15 2015 (r289751) +++ head/share/man/man4/cloudabi.4 Thu Oct 22 11:09:25 2015 (r289752) @@ -22,7 +22,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd July 31, 2015 +.Dd October 22, 2015 .Dt CLOUDABI 4 .Os .Sh NAME @@ -73,7 +73,7 @@ module can be loaded on any architecture .Fx , the .Nm cloudabi64 -module is only available for amd64. +module is only available for amd64 and arm64. .Pp A full cross compilation toolchain for CloudABI is available in the .Pa devel/cloudabi-toolchain @@ -95,6 +95,9 @@ restricted set of resources. .Pp cloudlibc on GitHub: .Pa https://github.com/NuxiNL/cloudlibc . +.Pp +The CloudABI Ports Collection on GitHub: +.Pa https://github.com/NuxiNL/cloudabi-ports . .Sh HISTORY CloudABI support first appeared in .Fx 11.0 . Copied and modified: head/sys/arm64/cloudabi64/cloudabi64_sysvec.c (from r289747, head/sys/amd64/cloudabi64/cloudabi64_sysvec.c) ============================================================================== --- head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Thu Oct 22 09:07:53 2015 (r289747, copy source) +++ head/sys/arm64/cloudabi64/cloudabi64_sysvec.c Thu Oct 22 11:09:25 2015 (r289752) @@ -51,24 +51,21 @@ static int cloudabi64_fetch_syscall_args(struct thread *td, struct syscall_args *sa) { struct trapframe *frame = td->td_frame; + int i; /* Obtain system call number. */ - sa->code = frame->tf_rax; + sa->code = frame->tf_x[8]; if (sa->code >= CLOUDABI64_SYS_MAXSYSCALL) return (ENOSYS); sa->callp = &cloudabi64_sysent[sa->code]; /* Fetch system call arguments. */ - sa->args[0] = frame->tf_rdi; - sa->args[1] = frame->tf_rsi; - sa->args[2] = frame->tf_rdx; - sa->args[3] = frame->tf_rcx; /* Actually %r10. */ - sa->args[4] = frame->tf_r8; - sa->args[5] = frame->tf_r9; + for (i = 0; i < MAXARGS; i++) + sa->args[i] = frame->tf_x[i]; /* Default system call return values. */ td->td_retval[0] = 0; - td->td_retval[1] = frame->tf_rdx; + td->td_retval[1] = frame->tf_x[1]; return (0); } @@ -80,22 +77,20 @@ cloudabi64_set_syscall_retval(struct thr switch (error) { case 0: /* System call succeeded. */ - frame->tf_rax = td->td_retval[0]; - frame->tf_rdx = td->td_retval[1]; - frame->tf_rflags &= ~PSL_C; + frame->tf_x[0] = td->td_retval[0]; + frame->tf_x[1] = td->td_retval[1]; + frame->tf_spsr &= ~PSR_C; break; case ERESTART: /* Restart system call. */ - frame->tf_rip -= frame->tf_err; - frame->tf_r10 = frame->tf_rcx; - set_pcb_flags(td->td_pcb, PCB_FULL_IRET); + frame->tf_elr -= 4; break; case EJUSTRETURN: break; default: /* System call returned an error. */ - frame->tf_rax = cloudabi_convert_errno(error); - frame->tf_rflags |= PSL_C; + frame->tf_x[0] = cloudabi_convert_errno(error); + frame->tf_spsr |= PSR_C; break; } } @@ -105,9 +100,15 @@ cloudabi64_schedtail(struct thread *td) { struct trapframe *frame = td->td_frame; - /* Initial register values for processes returning from fork. */ - frame->tf_rax = CLOUDABI_PROCESS_CHILD; - frame->tf_rdx = td->td_tid; + /* + * Initial register values for processes returning from fork. + * Make sure that we only set these values when forking, not + * when creating a new thread. + */ + if ((td->td_pflags & TDP_FORKING) != 0) { + frame->tf_x[0] = CLOUDABI_PROCESS_CHILD; + frame->tf_x[1] = td->td_tid; + } } void @@ -128,8 +129,8 @@ cloudabi64_thread_setregs(struct thread * entry point. */ frame = td->td_frame; - frame->tf_rdi = td->td_tid; - frame->tf_rsi = attr->argument; + frame->tf_x[0] = td->td_tid; + frame->tf_x[1] = attr->argument; } static struct sysentvec cloudabi64_elf_sysvec = { @@ -155,7 +156,7 @@ INIT_SYSENTVEC(elf_sysvec, &cloudabi64_e Elf64_Brandinfo cloudabi64_brand = { .brand = ELFOSABI_CLOUDABI, - .machine = EM_X86_64, + .machine = EM_AARCH64, .sysvec = &cloudabi64_elf_sysvec, .compat_3_brand = "CloudABI", }; Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Thu Oct 22 10:57:15 2015 (r289751) +++ head/sys/conf/files.arm64 Thu Oct 22 11:09:25 2015 (r289752) @@ -53,6 +53,7 @@ arm64/arm64/vm_machdep.c standard arm64/cavium/thunder_pcie.c optional soc_cavm_thunderx pci fdt arm64/cavium/thunder_pcie_pem.c optional soc_cavm_thunderx pci arm64/cavium/thunder_pcie_common.c optional soc_cavm_thunderx pci +arm64/cloudabi64/cloudabi64_sysvec.c optional compat_cloudabi64 crypto/blowfish/bf_enc.c optional crypto | ipsec crypto/des/des_enc.c optional crypto | ipsec | netsmb dev/acpica/acpi_if.m optional acpi Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Thu Oct 22 10:57:15 2015 (r289751) +++ head/sys/modules/Makefile Thu Oct 22 11:09:25 2015 (r289752) @@ -633,7 +633,6 @@ _x86bios= x86bios .endif .if ${MACHINE_CPUARCH} == "amd64" -_cloudabi64= cloudabi64 _ioat= ioat _ixl= ixl _ixlv= ixlv @@ -749,6 +748,10 @@ _zfs= zfs .endif .endif +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" +_cloudabi64= cloudabi64 +.endif + .endif SUBDIR+=${MODULES_EXTRA} From owner-svn-src-all@freebsd.org Thu Oct 22 12:15: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 5A317A1C5E1; Thu, 22 Oct 2015 12:15:41 +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 256F710CD; Thu, 22 Oct 2015 12:15:41 +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 t9MCFe6v076047; Thu, 22 Oct 2015 12:15:40 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MCFeUk076046; Thu, 22 Oct 2015 12:15:40 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201510221215.t9MCFeUk076046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 22 Oct 2015 12:15:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289753 - 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: Thu, 22 Oct 2015 12:15:41 -0000 Author: avos Date: Thu Oct 22 12:15:40 2015 New Revision: 289753 URL: https://svnweb.freebsd.org/changeset/base/289753 Log: Initialize radiotap header fields before calling ieee80211_radiotap_rx() Reviewed by: kevlo Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D3951 Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Thu Oct 22 11:09:25 2015 (r289752) +++ head/sys/dev/usb/wlan/if_run.c Thu Oct 22 12:15:40 2015 (r289753) @@ -2847,13 +2847,6 @@ run_rx_frame(struct run_softc *sc, struc m->m_pkthdr.len = m->m_len = len; - if (ni != NULL) { - (void)ieee80211_input(ni, m, rssi, nf); - ieee80211_free_node(ni); - } else { - (void)ieee80211_input_all(ic, m, rssi, nf); - } - if (__predict_false(ieee80211_radiotap_active(ic))) { struct run_rx_radiotap_header *tap = &sc->sc_rxtap; uint16_t phy; @@ -2892,6 +2885,13 @@ run_rx_frame(struct run_softc *sc, struc break; } } + + if (ni != NULL) { + (void)ieee80211_input(ni, m, rssi, nf); + ieee80211_free_node(ni); + } else { + (void)ieee80211_input_all(ic, m, rssi, nf); + } } static void From owner-svn-src-all@freebsd.org Thu Oct 22 15:13: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 592B7A1A5EE; Thu, 22 Oct 2015 15:13:49 +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 0EC74124E; Thu, 22 Oct 2015 15:13: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 t9MFDm8S029283; Thu, 22 Oct 2015 15:13:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MFDm92029282; Thu, 22 Oct 2015 15:13:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510221513.t9MFDm92029282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 22 Oct 2015 15:13:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289755 - head/sys/dev/ispfw X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 15:13:49 -0000 Author: mav Date: Thu Oct 22 15:13:47 2015 New Revision: 289755 URL: https://svnweb.freebsd.org/changeset/base/289755 Log: Remove residual verbosity. firmware_register() already reports errors. Modified: head/sys/dev/ispfw/ispfw.c Modified: head/sys/dev/ispfw/ispfw.c ============================================================================== --- head/sys/dev/ispfw/ispfw.c Thu Oct 22 14:29:19 2015 (r289754) +++ head/sys/dev/ispfw/ispfw.c Thu Oct 22 15:13:47 2015 (r289755) @@ -135,43 +135,27 @@ static int isp_2500_loaded; #define ISPFW_VERSION 1 -#if !defined(KLD_MODULE) -#define ISPFW_KLD 0 -#else -#define ISPFW_KLD 1 -#endif - #define RMACRO(token) do { \ if (token##_loaded) \ break; \ if (firmware_register(#token, token##_risc_code, \ token##_risc_code[3] * sizeof(token##_risc_code[3]), \ - ISPFW_VERSION, NULL) == NULL) { \ - printf("%s: unable to register firmware <%s>\n", \ - MODULE_NAME, #token); \ + ISPFW_VERSION, NULL) == NULL) \ break; \ - } \ token##_loaded++; \ - if (bootverbose || ISPFW_KLD) \ - printf("%s: registered firmware <%s>\n", MODULE_NAME, \ - #token); \ } while (0) #define UMACRO(token) do { \ if (!token##_loaded) \ break; \ if (firmware_unregister(#token) != 0) { \ - printf("%s: unable to unregister firmware <%s>\n", \ - MODULE_NAME, #token); \ + error = EBUSY; \ break; \ } \ token##_loaded--; \ - if (bootverbose || ISPFW_KLD) \ - printf("%s: unregistered firmware <%s>\n", MODULE_NAME, \ - #token); \ } while (0) -static void +static int do_load_fw(void) { @@ -214,11 +198,13 @@ do_load_fw(void) #if defined(ISP_2500) RMACRO(isp_2500); #endif + return (0); } -static void +static int do_unload_fw(void) { + int error = 0; #if defined(ISP_1000) UMACRO(isp_1000); @@ -259,6 +245,7 @@ do_unload_fw(void) #if defined(ISP_2500) UMACRO(isp_2500); #endif + return (error); } static int @@ -267,17 +254,11 @@ module_handler(module_t mod, int what, v switch (what) { case MOD_LOAD: - do_load_fw(); - break; + return (do_load_fw()); case MOD_UNLOAD: - do_unload_fw(); - break; - case MOD_SHUTDOWN: - break; - default: - return (EOPNOTSUPP); + return (do_unload_fw()); } - return (0); + return (EOPNOTSUPP); } static moduledata_t ispfw_mod = { MODULE_NAME, module_handler, NULL From owner-svn-src-all@freebsd.org Thu Oct 22 15:15: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 F11AEA1A6D6; Thu, 22 Oct 2015 15:15:46 +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 B9AE914EB; Thu, 22 Oct 2015 15:15:46 +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 t9MFFj0a029391; Thu, 22 Oct 2015 15:15:45 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MFFjtE029390; Thu, 22 Oct 2015 15:15:45 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510221515.t9MFFjtE029390@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 22 Oct 2015 15:15:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289756 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2015 15:15:47 -0000 Author: adrian Date: Thu Oct 22 15:15:45 2015 New Revision: 289756 URL: https://svnweb.freebsd.org/changeset/base/289756 Log: Commit the right board file - use the right name + hints. Modified: head/sys/mips/conf/TL-WR740Nv4 Modified: head/sys/mips/conf/TL-WR740Nv4 ============================================================================== --- head/sys/mips/conf/TL-WR740Nv4 Thu Oct 22 15:13:47 2015 (r289755) +++ head/sys/mips/conf/TL-WR740Nv4 Thu Oct 22 15:15:45 2015 (r289756) @@ -12,10 +12,10 @@ # Include the default AR933x parameters include "AR933X_BASE" -ident CARAMBOLA2 +ident TL-WR740Nv4 # Override hints with board values -hints "CARAMBOLA2.hints" +hints "TL-WR740Nv4.hints" # Board memory - 32MB options AR71XX_REALMEM=(32*1024*1024) From owner-svn-src-all@freebsd.org Thu Oct 22 15: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 B5046A1A8C1; Thu, 22 Oct 2015 15:20:34 +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 7E25819B4; Thu, 22 Oct 2015 15:20:34 +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 t9MFKXTC029601; Thu, 22 Oct 2015 15:20:33 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MFKXZp029600; Thu, 22 Oct 2015 15:20:33 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201510221520.t9MFKXZp029600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 22 Oct 2015 15:20:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289757 - head/sys/dev/wtap X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 15:20:34 -0000 Author: avos Date: Thu Oct 22 15:20:33 2015 New Revision: 289757 URL: https://svnweb.freebsd.org/changeset/base/289757 Log: wtap: remove some obsolete radiotap(9) code This code is not needed since r192468. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D3975 Modified: head/sys/dev/wtap/if_wtap.c Modified: head/sys/dev/wtap/if_wtap.c ============================================================================== --- head/sys/dev/wtap/if_wtap.c Thu Oct 22 15:15:45 2015 (r289756) +++ head/sys/dev/wtap/if_wtap.c Thu Oct 22 15:20:33 2015 (r289757) @@ -527,15 +527,9 @@ wtap_rx_proc(void *arg, int npending) /* * Sending station is known, dispatch directly. */ -#if 0 - ieee80211_radiotap_rx(ni->ni_vap, m); -#endif type = ieee80211_input(ni, m, 1<<7, 10); ieee80211_free_node(ni); } else { -#if 0 - ieee80211_radiotap_rx_all(ic, m); -#endif type = ieee80211_input_all(ic, m, 1<<7, 10); } From owner-svn-src-all@freebsd.org Thu Oct 22 15:42: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 732A5A1AF75; Thu, 22 Oct 2015 15:42:55 +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 346111512; Thu, 22 Oct 2015 15:42:55 +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 t9MFgsF1038131; Thu, 22 Oct 2015 15:42:54 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MFgsi4038128; Thu, 22 Oct 2015 15:42:54 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201510221542.t9MFgsi4038128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 22 Oct 2015 15:42:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289758 - 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: Thu, 22 Oct 2015 15:42:55 -0000 Author: avos Date: Thu Oct 22 15:42:53 2015 New Revision: 289758 URL: https://svnweb.freebsd.org/changeset/base/289758 Log: urtwn(4): replace hardcoded rate indices with their names Reviewed by: kevlo Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D3967 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 Thu Oct 22 15:20:33 2015 (r289757) +++ head/sys/dev/usb/wlan/if_urtwn.c Thu Oct 22 15:42:53 2015 (r289758) @@ -665,22 +665,7 @@ urtwn_rx_frame(struct urtwn_softc *sc, u tap->wr_flags = 0; /* Map HW rate index to 802.11 rate. */ if (!(rxdw3 & R92C_RXDW3_HT)) { - switch (rate) { - /* CCK. */ - case 0: tap->wr_rate = 2; break; - case 1: tap->wr_rate = 4; break; - case 2: tap->wr_rate = 11; break; - case 3: tap->wr_rate = 22; break; - /* OFDM. */ - case 4: tap->wr_rate = 12; break; - case 5: tap->wr_rate = 18; break; - case 6: tap->wr_rate = 24; break; - case 7: tap->wr_rate = 36; break; - case 8: tap->wr_rate = 48; break; - case 9: tap->wr_rate = 72; break; - case 10: tap->wr_rate = 96; break; - case 11: tap->wr_rate = 108; break; - } + tap->wr_rate = ridx2rate[rate]; } else if (rate >= 12) { /* MCS0~15. */ /* Bit 7 set means HT MCS instead of rate. */ tap->wr_rate = 0x80 | (rate - 12); @@ -1411,8 +1396,6 @@ urtwn_r88e_read_rom(struct urtwn_softc * static int urtwn_ra_init(struct urtwn_softc *sc) { - static const uint8_t map[] = - { 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108 }; struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); struct ieee80211_node *ni; @@ -1430,10 +1413,11 @@ urtwn_ra_init(struct urtwn_softc *sc) maxrate = maxbasicrate = 0; for (i = 0; i < rs->rs_nrates; i++) { /* Convert 802.11 rate to HW rate index. */ - for (j = 0; j < nitems(map); j++) - if ((rs->rs_rates[i] & IEEE80211_RATE_VAL) == map[j]) + for (j = 0; j < nitems(ridx2rate); j++) + if ((rs->rs_rates[i] & IEEE80211_RATE_VAL) == + ridx2rate[j]) break; - if (j == nitems(map)) /* Unknown rate, skip. */ + if (j == nitems(ridx2rate)) /* Unknown rate, skip. */ continue; rates |= 1 << j; if (j > maxrate) @@ -1740,7 +1724,7 @@ urtwn_update_avgrssi(struct urtwn_softc else pwdb = 100 + rssi; if (!(sc->chip & URTWN_CHIP_88E)) { - if (rate <= 3) { + if (rate <= URTWN_RIDX_CCK11) { /* CCK gain is smaller than OFDM/MCS gain. */ pwdb += 6; if (pwdb > 100) @@ -1773,7 +1757,7 @@ urtwn_get_rssi(struct urtwn_softc *sc, i uint8_t rpt; int8_t rssi; - if (rate <= 3) { + if (rate <= URTWN_RIDX_CCK11) { cck = (struct r92c_rx_cck *)physt; if (sc->sc_flags & URTWN_FLAG_CCK_HIPWR) { rpt = (cck->agc_rpt >> 5) & 0x3; @@ -1799,7 +1783,7 @@ urtwn_r88e_get_rssi(struct urtwn_softc * int8_t rssi; rssi = 0; - if (rate <= 3) { + if (rate <= URTWN_RIDX_CCK11) { cck = (struct r88e_rx_cck *)physt; cck_agc_rpt = cck->agc_rpt; lna_idx = (cck_agc_rpt & 0xe0) >> 5; @@ -1932,10 +1916,12 @@ urtwn_tx_start(struct urtwn_softc *sc, s } } /* Send RTS at OFDM24. */ - txd->txdw4 |= htole32(SM(R92C_TXDW4_RTSRATE, 8)); + txd->txdw4 |= htole32(SM(R92C_TXDW4_RTSRATE, + URTWN_RIDX_OFDM24)); txd->txdw5 |= htole32(0x0001ff00); /* Send data at OFDM54. */ - txd->txdw5 |= htole32(SM(R92C_TXDW5_DATARATE, 11)); + txd->txdw5 |= htole32(SM(R92C_TXDW5_DATARATE, + URTWN_RIDX_OFDM54)); } else { txd->txdw1 |= htole32( SM(R92C_TXDW1_MACID, 0) | @@ -1944,7 +1930,8 @@ urtwn_tx_start(struct urtwn_softc *sc, s /* Force CCK1. */ txd->txdw4 |= htole32(R92C_TXDW4_DRVRATE); - txd->txdw5 |= htole32(SM(R92C_TXDW5_DATARATE, 0)); + txd->txdw5 |= htole32(SM(R92C_TXDW5_DATARATE, + URTWN_RIDX_CCK1)); } /* Set sequence number (already little endian). */ txd->txdseq |= *(uint16_t *)wh->i_seq; @@ -2930,10 +2917,10 @@ urtwn_get_txpower(struct urtwn_softc *sc memset(power, 0, URTWN_RIDX_COUNT * sizeof(power[0])); if (sc->regulatory == 0) { - for (ridx = 0; ridx <= 3; ridx++) + for (ridx = URTWN_RIDX_CCK1; ridx <= URTWN_RIDX_CCK11; ridx++) power[ridx] = base->pwr[0][ridx]; } - for (ridx = 4; ridx < URTWN_RIDX_COUNT; ridx++) { + for (ridx = URTWN_RIDX_OFDM6; ridx < URTWN_RIDX_COUNT; ridx++) { if (sc->regulatory == 3) { power[ridx] = base->pwr[0][ridx]; /* Apply vendor limits. */ @@ -2953,7 +2940,7 @@ urtwn_get_txpower(struct urtwn_softc *sc /* Compute per-CCK rate Tx power. */ cckpow = rom->cck_tx_pwr[chain][group]; - for (ridx = 0; ridx <= 3; ridx++) { + for (ridx = URTWN_RIDX_CCK1; ridx <= URTWN_RIDX_CCK11; ridx++) { power[ridx] += cckpow; if (power[ridx] > R92C_MAX_TX_PWR) power[ridx] = R92C_MAX_TX_PWR; @@ -2971,7 +2958,7 @@ urtwn_get_txpower(struct urtwn_softc *sc diff = rom->ofdm_tx_pwr_diff[group]; diff = (diff >> (chain * 4)) & 0xf; ofdmpow = htpow + diff; /* HT->OFDM correction. */ - for (ridx = 4; ridx <= 11; ridx++) { + for (ridx = URTWN_RIDX_OFDM6; ridx <= URTWN_RIDX_OFDM54; ridx++) { power[ridx] += ofdmpow; if (power[ridx] > R92C_MAX_TX_PWR) power[ridx] = R92C_MAX_TX_PWR; @@ -2992,7 +2979,7 @@ urtwn_get_txpower(struct urtwn_softc *sc if (urtwn_debug >= 4) { /* Dump per-rate Tx power values. */ printf("Tx power for chain %d:\n", chain); - for (ridx = 0; ridx < URTWN_RIDX_COUNT; ridx++) + for (ridx = URTWN_RIDX_CCK1; ridx < URTWN_RIDX_COUNT; ridx++) printf("Rate %d = %u\n", ridx, power[ridx]); } #endif @@ -3028,10 +3015,10 @@ urtwn_r88e_get_txpower(struct urtwn_soft memset(power, 0, URTWN_RIDX_COUNT * sizeof(power[0])); if (sc->regulatory == 0) { - for (ridx = 0; ridx <= 3; ridx++) + for (ridx = URTWN_RIDX_CCK1; ridx <= URTWN_RIDX_CCK11; ridx++) power[ridx] = base->pwr[0][ridx]; } - for (ridx = 4; ridx < URTWN_RIDX_COUNT; ridx++) { + for (ridx = URTWN_RIDX_OFDM6; ridx < URTWN_RIDX_COUNT; ridx++) { if (sc->regulatory == 3) power[ridx] = base->pwr[0][ridx]; else if (sc->regulatory == 1) { @@ -3043,7 +3030,7 @@ urtwn_r88e_get_txpower(struct urtwn_soft /* Compute per-CCK rate Tx power. */ cckpow = sc->cck_tx_pwr[group]; - for (ridx = 0; ridx <= 3; ridx++) { + for (ridx = URTWN_RIDX_CCK1; ridx <= URTWN_RIDX_CCK11; ridx++) { power[ridx] += cckpow; if (power[ridx] > R92C_MAX_TX_PWR) power[ridx] = R92C_MAX_TX_PWR; @@ -3053,7 +3040,7 @@ urtwn_r88e_get_txpower(struct urtwn_soft /* Compute per-OFDM rate Tx power. */ ofdmpow = htpow + sc->ofdm_tx_pwr_diff; - for (ridx = 4; ridx <= 11; ridx++) { + for (ridx = URTWN_RIDX_OFDM6; ridx <= URTWN_RIDX_OFDM54; ridx++) { power[ridx] += ofdmpow; if (power[ridx] > R92C_MAX_TX_PWR) power[ridx] = R92C_MAX_TX_PWR; Modified: head/sys/dev/usb/wlan/if_urtwnreg.h ============================================================================== --- head/sys/dev/usb/wlan/if_urtwnreg.h Thu Oct 22 15:20:33 2015 (r289757) +++ head/sys/dev/usb/wlan/if_urtwnreg.h Thu Oct 22 15:42:53 2015 (r289758) @@ -1060,6 +1060,19 @@ struct r92c_tx_desc { } __packed __attribute__((aligned(4))); +static const uint8_t ridx2rate[] = + { 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108 }; + +/* HW rate indices. */ +#define URTWN_RIDX_CCK1 0 +#define URTWN_RIDX_CCK11 3 +#define URTWN_RIDX_OFDM6 4 +#define URTWN_RIDX_OFDM24 8 +#define URTWN_RIDX_OFDM54 11 + +#define URTWN_RIDX_COUNT 28 + + /* * MAC initialization values. */ Modified: head/sys/dev/usb/wlan/if_urtwnvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_urtwnvar.h Thu Oct 22 15:20:33 2015 (r289757) +++ head/sys/dev/usb/wlan/if_urtwnvar.h Thu Oct 22 15:42:53 2015 (r289758) @@ -26,8 +26,6 @@ #define URTWN_RX_DESC_SIZE (sizeof(struct r92c_rx_stat)) #define URTWN_TX_DESC_SIZE (sizeof(struct r92c_tx_desc)) -#define URTWN_RIDX_COUNT 28 - #define URTWN_TX_TIMEOUT 5000 /* ms */ #define URTWN_LED_LINK 0 From owner-svn-src-all@freebsd.org Thu Oct 22 16:38: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 812DAA1CD36; Thu, 22 Oct 2015 16:38:02 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45D961127; Thu, 22 Oct 2015 16:38:02 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9MGc1NK053887; Thu, 22 Oct 2015 16:38:01 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MGc1cc053885; Thu, 22 Oct 2015 16:38:01 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201510221638.t9MGc1cc053885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Thu, 22 Oct 2015 16:38:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289759 - 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: Thu, 22 Oct 2015 16:38:02 -0000 Author: jah Date: Thu Oct 22 16:38:01 2015 New Revision: 289759 URL: https://svnweb.freebsd.org/changeset/base/289759 Log: Use pmap_quick* functions in armv6 busdma, for bounce buffers and cache maintenance. This makes it safe to sync buffers that have no VA mapping associated with the busdma map, but may have other mappings, possibly on different CPUs. This also makes it safe to sync unmapped bounce buffers in non-sleepable thread contexts. Similar to r286787 for x86, this treats userspace buffers the same as unmapped buffers and no longer borrows the UVA for sync operations. Submitted by: Svatopluk Kraus (earlier revision) Tested by: Svatopluk Kraus Differential Revision: https://reviews.freebsd.org/D3869 Modified: head/sys/arm/arm/busdma_machdep-v6.c head/sys/arm/include/cpu-v6.h Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Thu Oct 22 15:42:53 2015 (r289758) +++ head/sys/arm/arm/busdma_machdep-v6.c Thu Oct 22 16:38:01 2015 (r289759) @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #define MAX_BPAGES 64 @@ -104,14 +104,16 @@ struct bounce_page { vm_offset_t vaddr; /* kva of bounce buffer */ bus_addr_t busaddr; /* Physical address */ vm_offset_t datavaddr; /* kva of client data */ - bus_addr_t dataaddr; /* client physical address */ + vm_page_t datapage; /* physical page of client data */ + vm_offset_t dataoffs; /* page offset of client data */ bus_size_t datacount; /* client data count */ STAILQ_ENTRY(bounce_page) links; }; struct sync_list { vm_offset_t vaddr; /* kva of client data */ - bus_addr_t busaddr; /* client physical address */ + vm_page_t pages; /* starting page of client data */ + vm_offset_t dataoffs; /* page offset of client data */ bus_size_t datacount; /* client data count */ }; @@ -181,7 +183,6 @@ struct bus_dmamap { int pagesreserved; bus_dma_tag_t dmat; struct memdesc mem; - pmap_t pmap; bus_dmamap_callback_t *callback; void *callback_arg; int flags; @@ -206,12 +207,14 @@ static bus_addr_t add_bounce_page(bus_dm vm_offset_t vaddr, bus_addr_t addr, bus_size_t size); static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); -static void _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, - void *buf, bus_size_t buflen, int flags); +static void _bus_dmamap_count_pages(bus_dma_tag_t dmat, pmap_t pmap, + bus_dmamap_t map, void *buf, bus_size_t buflen, int flags); static void _bus_dmamap_count_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf, bus_size_t buflen, int flags); static int _bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int flags); +static void dma_preread_safe(vm_offset_t va, vm_paddr_t pa, vm_size_t size); +static void dma_dcache_sync(struct sync_list *sl, bus_dmasync_op_t op); static busdma_bufalloc_t coherent_allocator; /* Cache of coherent buffers */ static busdma_bufalloc_t standard_allocator; /* Cache of standard buffers */ @@ -896,7 +899,8 @@ _bus_dmamap_count_phys(bus_dma_tag_t dma while (buflen != 0) { sgsize = MIN(buflen, dmat->maxsegsz); if (must_bounce(dmat, map, curaddr, sgsize) != 0) { - sgsize = MIN(sgsize, PAGE_SIZE); + sgsize = MIN(sgsize, + PAGE_SIZE - (curaddr & PAGE_MASK)); map->pagesneeded++; } curaddr += sgsize; @@ -907,7 +911,7 @@ _bus_dmamap_count_phys(bus_dma_tag_t dma } static void -_bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, +_bus_dmamap_count_pages(bus_dma_tag_t dmat, pmap_t pmap, bus_dmamap_t map, void *buf, bus_size_t buflen, int flags) { vm_offset_t vaddr; @@ -927,10 +931,10 @@ _bus_dmamap_count_pages(bus_dma_tag_t dm vendaddr = (vm_offset_t)buf + buflen; while (vaddr < vendaddr) { - if (__predict_true(map->pmap == kernel_pmap)) + if (__predict_true(pmap == kernel_pmap)) paddr = pmap_kextract(vaddr); else - paddr = pmap_extract(map->pmap, vaddr); + paddr = pmap_extract(pmap, vaddr); if (must_bounce(dmat, map, paddr, min(vendaddr - vaddr, (PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK)))) != 0) { @@ -1043,7 +1047,9 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat int *segp) { bus_addr_t curaddr; + bus_addr_t sl_end = 0; bus_size_t sgsize; + struct sync_list *sl; int error; if (segs == NULL) @@ -1052,7 +1058,7 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat counter_u64_add(maploads_total, 1); counter_u64_add(maploads_physmem, 1); - if (might_bounce(dmat, map, buflen, buflen)) { + if (might_bounce(dmat, map, (bus_addr_t)buf, buflen)) { _bus_dmamap_count_phys(dmat, map, buf, buflen, flags); if (map->pagesneeded != 0) { counter_u64_add(maploads_bounced, 1); @@ -1062,14 +1068,35 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat } } + sl = map->slist + map->sync_count - 1; + while (buflen > 0) { curaddr = buf; sgsize = MIN(buflen, dmat->maxsegsz); if (map->pagesneeded != 0 && must_bounce(dmat, map, curaddr, sgsize)) { - sgsize = MIN(sgsize, PAGE_SIZE); + sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK)); curaddr = add_bounce_page(dmat, map, 0, curaddr, sgsize); + } else { + if (map->sync_count > 0) + sl_end = VM_PAGE_TO_PHYS(sl->pages) + + sl->dataoffs + sl->datacount; + + if (map->sync_count == 0 || curaddr != sl_end) { + if (++map->sync_count > dmat->nsegments) + break; + sl++; + sl->vaddr = 0; + sl->datacount = sgsize; + /* + * PHYS_TO_VM_PAGE() will truncate + * unaligned addresses. + */ + sl->pages = PHYS_TO_VM_PAGE(curaddr); + sl->dataoffs = curaddr & PAGE_MASK; + } else + sl->datacount += sgsize; } sgsize = _bus_dmamap_addseg(dmat, map, curaddr, sgsize, segs, segp); @@ -1114,7 +1141,8 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm { bus_size_t sgsize; bus_addr_t curaddr; - vm_offset_t vaddr; + bus_addr_t sl_pend = 0; + vm_offset_t kvaddr, vaddr, sl_vend = 0; struct sync_list *sl; int error; @@ -1132,10 +1160,8 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm map->flags |= DMAMAP_MBUF; } - map->pmap = pmap; - if (might_bounce(dmat, map, (bus_addr_t)buf, buflen)) { - _bus_dmamap_count_pages(dmat, map, buf, buflen, flags); + _bus_dmamap_count_pages(dmat, pmap, map, buf, buflen, flags); if (map->pagesneeded != 0) { counter_u64_add(maploads_bounced, 1); error = _bus_dmamap_reserve_pages(dmat, map, flags); @@ -1144,22 +1170,25 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm } } - sl = NULL; + sl = map->slist + map->sync_count - 1; vaddr = (vm_offset_t)buf; while (buflen > 0) { /* * Get the physical address for this segment. */ - if (__predict_true(map->pmap == kernel_pmap)) + if (__predict_true(pmap == kernel_pmap)) { curaddr = pmap_kextract(vaddr); - else - curaddr = pmap_extract(map->pmap, vaddr); + kvaddr = vaddr; + } else { + curaddr = pmap_extract(pmap, vaddr); + kvaddr = 0; + } /* * Compute the segment size, and adjust counts. */ - sgsize = PAGE_SIZE - ((u_long)curaddr & PAGE_MASK); + sgsize = PAGE_SIZE - (curaddr & PAGE_MASK); if (sgsize > dmat->maxsegsz) sgsize = dmat->maxsegsz; if (buflen < sgsize) @@ -1167,21 +1196,30 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm if (map->pagesneeded != 0 && must_bounce(dmat, map, curaddr, sgsize)) { - curaddr = add_bounce_page(dmat, map, vaddr, curaddr, + curaddr = add_bounce_page(dmat, map, kvaddr, curaddr, sgsize); } else { - sl = &map->slist[map->sync_count - 1]; + if (map->sync_count > 0) { + sl_pend = VM_PAGE_TO_PHYS(sl->pages) + + sl->dataoffs + sl->datacount; + sl_vend = sl->vaddr + sl->datacount; + } + if (map->sync_count == 0 || -#ifdef ARM_L2_PIPT - curaddr != sl->busaddr + sl->datacount || -#endif - vaddr != sl->vaddr + sl->datacount) { + (kvaddr != 0 && kvaddr != sl_vend) || + (curaddr != sl_pend)) { + if (++map->sync_count > dmat->nsegments) goto cleanup; sl++; - sl->vaddr = vaddr; + sl->vaddr = kvaddr; sl->datacount = sgsize; - sl->busaddr = curaddr; + /* + * PHYS_TO_VM_PAGE() will truncate + * unaligned addresses. + */ + sl->pages = PHYS_TO_VM_PAGE(curaddr); + sl->dataoffs = curaddr & PAGE_MASK; } else sl->datacount += sgsize; } @@ -1252,64 +1290,94 @@ _bus_dmamap_unload(bus_dma_tag_t dmat, b map->flags &= ~DMAMAP_MBUF; } -#ifdef notyetbounceuser -/* If busdma uses user pages, then the interrupt handler could - * be use the kernel vm mapping. Both bounce pages and sync list - * do not cross page boundaries. - * Below is a rough sequence that a person would do to fix the - * user page reference in the kernel vmspace. This would be - * done in the dma post routine. - */ -void -_bus_dmamap_fix_user(vm_offset_t buf, bus_size_t len, - pmap_t pmap, int op) +static void +dma_preread_safe(vm_offset_t va, vm_paddr_t pa, vm_size_t size) { - bus_size_t sgsize; - bus_addr_t curaddr; - vm_offset_t va; - /* - * each synclist entry is contained within a single page. - * this would be needed if BUS_DMASYNC_POSTxxxx was implemented + * Write back any partial cachelines immediately before and + * after the DMA region. We don't need to round the address + * down to the nearest cacheline or specify the exact size, + * as dcache_wb_poc() will do the rounding for us and works + * at cacheline granularity. */ - curaddr = pmap_extract(pmap, buf); - va = pmap_dma_map(curaddr); - switch (op) { - case SYNC_USER_INV: - cpu_dcache_wb_range(va, sgsize); - break; + if (va & cpuinfo.dcache_line_mask) + dcache_wb_poc(va, pa, 1); + if ((va + size) & cpuinfo.dcache_line_mask) + dcache_wb_poc(va + size, pa + size, 1); - case SYNC_USER_COPYTO: - bcopy((void *)va, (void *)bounce, sgsize); - break; + dcache_dma_preread(va, pa, size); +} - case SYNC_USER_COPYFROM: - bcopy((void *) bounce, (void *)va, sgsize); - break; +static void +dma_dcache_sync(struct sync_list *sl, bus_dmasync_op_t op) +{ + uint32_t len, offset; + vm_page_t m; + vm_paddr_t pa; + vm_offset_t va, tempva; + bus_size_t size; + + offset = sl->dataoffs; + m = sl->pages; + size = sl->datacount; + pa = VM_PAGE_TO_PHYS(m) | offset; + + for ( ; size != 0; size -= len, pa += len, offset = 0, ++m) { + tempva = 0; + if (sl->vaddr == 0) { + len = min(PAGE_SIZE - offset, size); + tempva = pmap_quick_enter_page(m); + va = tempva | offset; + } else { + len = sl->datacount; + va = sl->vaddr; + } + KASSERT(pa == (VM_PAGE_TO_PHYS(m) | offset), + ("unexpected vm_page_t phys: 0x%08x != 0x%08x", + VM_PAGE_TO_PHYS(m) | offset, pa)); - default: - break; - } + switch (op) { + case BUS_DMASYNC_PREWRITE: + case BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD: + dcache_wb_poc(va, pa, len); + break; + case BUS_DMASYNC_PREREAD: + /* + * An mbuf may start in the middle of a cacheline. There + * will be no cpu writes to the beginning of that line + * (which contains the mbuf header) while dma is in + * progress. Handle that case by doing a writeback of + * just the first cacheline before invalidating the + * overall buffer. Any mbuf in a chain may have this + * misalignment. Buffers which are not mbufs bounce if + * they are not aligned to a cacheline. + */ + dma_preread_safe(va, pa, len); + break; + case BUS_DMASYNC_POSTREAD: + case BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE: + dcache_inv_poc(va, pa, len); + break; + default: + panic("unsupported combination of sync operations: " + "0x%08x\n", op); + } - pmap_dma_unmap(va); + if (tempva != 0) + pmap_quick_remove_page(tempva); + } } -#endif - -#ifdef ARM_L2_PIPT -#define l2cache_wb_range(va, pa, size) cpu_l2cache_wb_range(pa, size) -#define l2cache_wbinv_range(va, pa, size) cpu_l2cache_wbinv_range(pa, size) -#define l2cache_inv_range(va, pa, size) cpu_l2cache_inv_range(pa, size) -#else -#define l2cache_wb_range(va, pa, size) cpu_l2cache_wb_range(va, size) -#define l2cache_wbinv_range(va, pa, size) cpu_l2cache_wbinv_range(va, size) -#define l2cache_inv_range(va, pa, size) cpu_l2cache_inv_range(va, size) -#endif void _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) { struct bounce_page *bpage; struct sync_list *sl, *end; + vm_offset_t datavaddr, tempvaddr; + + if (op == BUS_DMASYNC_POSTWRITE) + return; + /* * If the buffer was from user space, it is possible that this is not * the same vm map, especially on a POST operation. It's not clear that @@ -1317,8 +1385,6 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus * we're able to test direct userland dma, panic on a map mismatch. */ if ((bpage = STAILQ_FIRST(&map->bpages)) != NULL) { - if (!pmap_dmap_iscurrent(map->pmap)) - panic("_bus_dmamap_sync: wrong user map for bounce sync."); CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x op 0x%x " "performing bounce", __func__, dmat, dmat->flags, op); @@ -1329,18 +1395,18 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus */ if (op & BUS_DMASYNC_PREWRITE) { while (bpage != NULL) { - if (bpage->datavaddr != 0) - bcopy((void *)bpage->datavaddr, - (void *)bpage->vaddr, - bpage->datacount); - else - physcopyout(bpage->dataaddr, - (void *)bpage->vaddr, - bpage->datacount); - cpu_dcache_wb_range((vm_offset_t)bpage->vaddr, + tempvaddr = 0; + datavaddr = bpage->datavaddr; + if (datavaddr == 0) { + tempvaddr = pmap_quick_enter_page( + bpage->datapage); + datavaddr = tempvaddr | bpage->dataoffs; + } + bcopy((void *)datavaddr, (void *)bpage->vaddr, bpage->datacount); - l2cache_wb_range((vm_offset_t)bpage->vaddr, - (vm_offset_t)bpage->busaddr, + if (tempvaddr != 0) + pmap_quick_remove_page(tempvaddr); + dcache_wb_poc(bpage->vaddr, bpage->busaddr, bpage->datacount); bpage = STAILQ_NEXT(bpage, links); } @@ -1361,10 +1427,7 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus if ((op & BUS_DMASYNC_PREREAD) && !(op & BUS_DMASYNC_PREWRITE)) { bpage = STAILQ_FIRST(&map->bpages); while (bpage != NULL) { - cpu_dcache_inv_range((vm_offset_t)bpage->vaddr, - bpage->datacount); - l2cache_inv_range((vm_offset_t)bpage->vaddr, - (vm_offset_t)bpage->busaddr, + dcache_dma_preread(bpage->vaddr, bpage->busaddr, bpage->datacount); bpage = STAILQ_NEXT(bpage, links); } @@ -1381,19 +1444,19 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus */ if (op & BUS_DMASYNC_POSTREAD) { while (bpage != NULL) { - l2cache_inv_range((vm_offset_t)bpage->vaddr, - (vm_offset_t)bpage->busaddr, + dcache_inv_poc(bpage->vaddr, bpage->busaddr, bpage->datacount); - cpu_dcache_inv_range((vm_offset_t)bpage->vaddr, + tempvaddr = 0; + datavaddr = bpage->datavaddr; + if (datavaddr == 0) { + tempvaddr = pmap_quick_enter_page( + bpage->datapage); + datavaddr = tempvaddr | bpage->dataoffs; + } + bcopy((void *)bpage->vaddr, (void *)datavaddr, bpage->datacount); - if (bpage->datavaddr != 0) - bcopy((void *)bpage->vaddr, - (void *)bpage->datavaddr, - bpage->datacount); - else - physcopyin((void *)bpage->vaddr, - bpage->dataaddr, - bpage->datacount); + if (tempvaddr != 0) + pmap_quick_remove_page(tempvaddr); bpage = STAILQ_NEXT(bpage, links); } dmat->bounce_zone->total_bounced++; @@ -1424,68 +1487,13 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus * outer-to-inner for POSTREAD invalidation is not a mistake. */ if (map->sync_count != 0) { - if (!pmap_dmap_iscurrent(map->pmap)) - panic("_bus_dmamap_sync: wrong user map for sync."); - sl = &map->slist[0]; end = &map->slist[map->sync_count]; CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x op 0x%x " "performing sync", __func__, dmat, dmat->flags, op); - switch (op) { - case BUS_DMASYNC_PREWRITE: - case BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD: - while (sl != end) { - cpu_dcache_wb_range(sl->vaddr, sl->datacount); - l2cache_wb_range(sl->vaddr, sl->busaddr, - sl->datacount); - sl++; - } - break; - - case BUS_DMASYNC_PREREAD: - /* - * An mbuf may start in the middle of a cacheline. There - * will be no cpu writes to the beginning of that line - * (which contains the mbuf header) while dma is in - * progress. Handle that case by doing a writeback of - * just the first cacheline before invalidating the - * overall buffer. Any mbuf in a chain may have this - * misalignment. Buffers which are not mbufs bounce if - * they are not aligned to a cacheline. - */ - while (sl != end) { - if (sl->vaddr & arm_dcache_align_mask) { - KASSERT(map->flags & DMAMAP_MBUF, - ("unaligned buffer is not an mbuf")); - cpu_dcache_wb_range(sl->vaddr, 1); - l2cache_wb_range(sl->vaddr, - sl->busaddr, 1); - } - cpu_dcache_inv_range(sl->vaddr, sl->datacount); - l2cache_inv_range(sl->vaddr, sl->busaddr, - sl->datacount); - sl++; - } - break; - - case BUS_DMASYNC_POSTWRITE: - break; - - case BUS_DMASYNC_POSTREAD: - case BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE: - while (sl != end) { - l2cache_inv_range(sl->vaddr, sl->busaddr, - sl->datacount); - cpu_dcache_inv_range(sl->vaddr, sl->datacount); - sl++; - } - break; - - default: - panic("unsupported combination of sync operations: 0x%08x\n", op); - break; - } + for ( ; sl != end; ++sl) + dma_dcache_sync(sl, op); } } @@ -1679,7 +1687,9 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ bpage->busaddr |= addr & PAGE_MASK; } bpage->datavaddr = vaddr; - bpage->dataaddr = addr; + /* PHYS_TO_VM_PAGE() will truncate unaligned addresses. */ + bpage->datapage = PHYS_TO_VM_PAGE(addr); + bpage->dataoffs = addr & PAGE_MASK; bpage->datacount = size; STAILQ_INSERT_TAIL(&(map->bpages), bpage, links); return (bpage->busaddr); Modified: head/sys/arm/include/cpu-v6.h ============================================================================== --- head/sys/arm/include/cpu-v6.h Thu Oct 22 15:42:53 2015 (r289758) +++ head/sys/arm/include/cpu-v6.h Thu Oct 22 16:38:01 2015 (r289759) @@ -471,6 +471,31 @@ dcache_inv_poc(vm_offset_t va, vm_paddr_ } /* + * Discard D-cache lines to PoC, prior to overwrite by DMA engine + * + * Invalidate caches, discarding data in dirty lines. This is useful + * if the memory is about to be overwritten, e.g. by a DMA engine. + * Invalidate caches from innermost to outermost to follow the flow + * of dirty cachelines. + */ +static __inline void +dcache_dma_preread(vm_offset_t va, vm_paddr_t pa, vm_size_t size) +{ + vm_offset_t eva = va + size; + + /* invalidate L1 first */ + dsb(); + va &= ~cpuinfo.dcache_line_mask; + for ( ; va < eva; va += cpuinfo.dcache_line_size) { + _CP15_DCIMVAC(va); + } + dsb(); + + /* then L2 */ + cpu_l2cache_inv_range(pa, size); +} + +/* * Write back D-cache to PoC * * Caches are written back from innermost to outermost as dirty cachelines From owner-svn-src-all@freebsd.org Thu Oct 22 16:46: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 F2715A1C030; Thu, 22 Oct 2015 16:46:22 +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 CACD11833; Thu, 22 Oct 2015 16:46:22 +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 t9MGkLg0056755; Thu, 22 Oct 2015 16:46:21 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MGkL3D056752; Thu, 22 Oct 2015 16:46:21 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510221646.t9MGkL3D056752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 22 Oct 2015 16:46:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289760 - head/sys/dev/ioat X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 16:46:23 -0000 Author: cem Date: Thu Oct 22 16:46:21 2015 New Revision: 289760 URL: https://svnweb.freebsd.org/changeset/base/289760 Log: ioat: Fix some attach/detach issues Don't run the selftest until after we've enabled bus mastering, or the DMA engine can't copy anything for our test. Create the ioat_test device on attach, if so tuned. Destroy the ioat_test device on teardown. Replace deprecated 'CALLOUT_MPSAFE' with correct '1' in callout_init(). Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat.c head/sys/dev/ioat/ioat_internal.h head/sys/dev/ioat/ioat_test.c Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Thu Oct 22 16:38:01 2015 (r289759) +++ head/sys/dev/ioat/ioat.c Thu Oct 22 16:46:21 2015 (r289760) @@ -56,6 +56,7 @@ static int ioat_detach(device_t device); static int ioat_setup_intr(struct ioat_softc *ioat); static int ioat_teardown_intr(struct ioat_softc *ioat); static int ioat3_attach(device_t device); +static int ioat3_selftest(struct ioat_softc *ioat); static int ioat_map_pci_bar(struct ioat_softc *ioat); static void ioat_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error); @@ -239,7 +240,15 @@ ioat_attach(device_t device) if (error != 0) goto err; + error = ioat3_selftest(ioat); + if (error != 0) + return (error); + + ioat_process_events(ioat); + ioat_setup_sysctl(device); + ioat_channel[ioat_channel_index++] = ioat; + ioat_test_attach(); err: if (error != 0) @@ -254,6 +263,8 @@ ioat_detach(device_t device) uint32_t i; ioat = DEVICE2SOFTC(device); + + ioat_test_detach(); callout_drain(&ioat->timer); pci_disable_busmaster(device); @@ -347,7 +358,7 @@ ioat3_attach(device_t device) mtx_init(&ioat->submit_lock, "ioat_submit", NULL, MTX_DEF); mtx_init(&ioat->cleanup_lock, "ioat_process_events", NULL, MTX_DEF); - callout_init(&ioat->timer, CALLOUT_MPSAFE); + callout_init(&ioat->timer, 1); ioat->is_resize_pending = FALSE; ioat->is_completion_pending = FALSE; @@ -415,13 +426,6 @@ ioat3_attach(device_t device) ioat_write_chanctrl(ioat, IOAT_CHANCTRL_RUN); ioat_write_chancmp(ioat, ioat->comp_update_bus_addr); ioat_write_chainaddr(ioat, ring[0]->hw_desc_bus_addr); - - error = ioat3_selftest(ioat); - if (error != 0) - return (error); - - ioat_process_events(ioat); - ioat_setup_sysctl(device); return (0); } Modified: head/sys/dev/ioat/ioat_internal.h ============================================================================== --- head/sys/dev/ioat/ioat_internal.h Thu Oct 22 16:38:01 2015 (r289759) +++ head/sys/dev/ioat/ioat_internal.h Thu Oct 22 16:46:21 2015 (r289760) @@ -366,6 +366,9 @@ struct ioat_softc { struct mtx cleanup_lock; }; +void ioat_test_attach(void); +void ioat_test_detach(void); + static inline uint64_t ioat_get_chansts(struct ioat_softc *ioat) { Modified: head/sys/dev/ioat/ioat_test.c ============================================================================== --- head/sys/dev/ioat/ioat_test.c Thu Oct 22 16:38:01 2015 (r289759) +++ head/sys/dev/ioat/ioat_test.c Thu Oct 22 16:46:21 2015 (r289760) @@ -367,6 +367,22 @@ static struct cdevsw ioat_cdevsw = { }; static int +enable_ioat_test(bool enable) +{ + + mtx_assert(&Giant, MA_OWNED); + + if (enable && g_ioat_cdev == NULL) { + g_ioat_cdev = make_dev(&ioat_cdevsw, 0, UID_ROOT, GID_WHEEL, + 0600, "ioat_test"); + } else if (!enable && g_ioat_cdev != NULL) { + destroy_dev(g_ioat_cdev); + g_ioat_cdev = NULL; + } + return (0); +} + +static int sysctl_enable_ioat_test(SYSCTL_HANDLER_ARGS) { int error, enabled; @@ -376,15 +392,32 @@ sysctl_enable_ioat_test(SYSCTL_HANDLER_A if (error != 0 || req->newptr == NULL) return (error); - if (enabled != 0 && g_ioat_cdev == NULL) { - g_ioat_cdev = make_dev(&ioat_cdevsw, 0, UID_ROOT, GID_WHEEL, - 0600, "ioat_test"); - } else if (enabled == 0 && g_ioat_cdev != NULL) { - destroy_dev(g_ioat_cdev); - g_ioat_cdev = NULL; - } + enable_ioat_test(enabled); return (0); } SYSCTL_PROC(_hw_ioat, OID_AUTO, enable_ioat_test, CTLTYPE_INT | CTLFLAG_RW, 0, 0, sysctl_enable_ioat_test, "I", "Non-zero: Enable the /dev/ioat_test device"); + +void +ioat_test_attach(void) +{ + char *val; + + val = kern_getenv("hw.ioat.enable_ioat_test"); + if (val != NULL && strcmp(val, "0") != 0) { + mtx_lock(&Giant); + enable_ioat_test(true); + mtx_unlock(&Giant); + } + freeenv(val); +} + +void +ioat_test_detach(void) +{ + + mtx_lock(&Giant); + enable_ioat_test(false); + mtx_unlock(&Giant); +} From owner-svn-src-all@freebsd.org Thu Oct 22 16:46: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 1FE72A1C051; Thu, 22 Oct 2015 16:46:32 +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 C799B1972; Thu, 22 Oct 2015 16:46:31 +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 t9MGkUoe056803; Thu, 22 Oct 2015 16:46:30 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MGkUEE056802; Thu, 22 Oct 2015 16:46:30 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510221646.t9MGkUEE056802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 22 Oct 2015 16:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289761 - 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: Thu, 22 Oct 2015 16:46:32 -0000 Author: cem Date: Thu Oct 22 16:46:30 2015 New Revision: 289761 URL: https://svnweb.freebsd.org/changeset/base/289761 Log: getenv.9: Document behavior of freeenv(NULL) Fix a couple igor(1)-indicated spelling issues while here. Suggested by: jhb Sponsored by: EMC / Isilon Storage Division Modified: head/share/man/man9/getenv.9 Modified: head/share/man/man9/getenv.9 ============================================================================== --- head/share/man/man9/getenv.9 Thu Oct 22 16:46:21 2015 (r289760) +++ head/share/man/man9/getenv.9 Thu Oct 22 16:46:30 2015 (r289761) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 22, 2013 +.Dd October 22, 2015 .Dt GETENV 9 .Os .Sh NAME @@ -78,7 +78,6 @@ function obtains the current value of th .Fa name and returns a pointer to the string value. The caller should not modify the string pointed to by the return value. -.Pp The .Fn getenv function may allocate temporary storage, @@ -88,12 +87,24 @@ function must be called to release any a returned by .Fn getenv is no longer needed. +.Pp +The +.Fn freeenv +function is used to release the resources allocated by a previous call to +.Fn getenv . The .Fa env argument passed to .Fn freeenv is the pointer returned by the earlier call to .Fn getenv . +Like +.Xr free 3 , +the +.Fa env +argument can be +.Va NULL , +in which case no action occurs. .Pp The .Fn setenv @@ -156,7 +167,8 @@ Otherwise, the value is interpreted as decimal. The value may contain a single character suffix specifying a unit for the value. -The interpreted value is multipled by the unit's magnitude before being returned. +The interpreted value is multiplied by the unit's magnitude before being +returned. The following unit suffixes are supported: .Bl -column -offset indent ".Sy Unit" ".Sy Magnitude" .It Sy Unit Ta Sy Magnitude @@ -179,7 +191,7 @@ zero is returned. If the variable exists, up to .Fa size - 1 -characters of it's value are copied to the buffer pointed to by +characters of its value are copied to the buffer pointed to by .Fa data followed by a null character and a non-zero value is returned. .Sh RETURN VALUES From owner-svn-src-all@freebsd.org Thu Oct 22 17:08: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 80DE8A1C564; Thu, 22 Oct 2015 17:08:14 +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 438C61133; Thu, 22 Oct 2015 17:08:14 +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 t9MH8Dwk062530; Thu, 22 Oct 2015 17:08:13 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MH8D5v062527; Thu, 22 Oct 2015 17:08:13 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201510221708.t9MH8D5v062527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 22 Oct 2015 17:08:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289762 - in head/tools/regression/net80211: ccmp tkip wep X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 17:08:14 -0000 Author: avos Date: Thu Oct 22 17:08:12 2015 New Revision: 289762 URL: https://svnweb.freebsd.org/changeset/base/289762 Log: Unbreak regression testing tools for net80211 crypto cipher modules Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D3441 Modified: head/tools/regression/net80211/ccmp/test_ccmp.c head/tools/regression/net80211/tkip/test_tkip.c head/tools/regression/net80211/wep/test_wep.c Modified: head/tools/regression/net80211/ccmp/test_ccmp.c ============================================================================== --- head/tools/regression/net80211/ccmp/test_ccmp.c Thu Oct 22 16:46:30 2015 (r289761) +++ head/tools/regression/net80211/ccmp/test_ccmp.c Thu Oct 22 17:08:12 2015 (r289762) @@ -53,6 +53,7 @@ #include #include +#include #include #include @@ -591,32 +592,32 @@ printtest(const struct ciphertest *t) } static int -runtest(struct ieee80211com *ic, struct ciphertest *t) +runtest(struct ieee80211vap *vap, struct ciphertest *t) { - struct ieee80211_key key; + struct ieee80211_key *key = &vap->iv_nw_keys[t->keyix]; struct mbuf *m = NULL; const struct ieee80211_cipher *cip; - u_int8_t mac[IEEE80211_ADDR_LEN]; + int hdrlen; printf("%s: ", t->name); /* * Setup key. */ - memset(&key, 0, sizeof(key)); - key.wk_flags = IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV; - key.wk_cipher = &ieee80211_cipher_none; - if (!ieee80211_crypto_newkey(ic, t->cipher, - IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV, &key)) { + memset(key, 0, sizeof(*key)); + key->wk_flags = IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV; + key->wk_cipher = &ieee80211_cipher_none; + if (!ieee80211_crypto_newkey(vap, t->cipher, + IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV, key)) { printf("FAIL: ieee80211_crypto_newkey failed\n"); goto bad; } - memcpy(key.wk_key, t->key, t->key_len); - key.wk_keylen = t->key_len; - key.wk_keyrsc = 0; - key.wk_keytsc = t->pn-1; /* PN-1 since we do encap */ - if (!ieee80211_crypto_setkey(ic, &key, mac)) { + memcpy(key->wk_key, t->key, t->key_len); + key->wk_keylen = t->key_len; + memset(key->wk_keyrsc, 0, sizeof(key->wk_keyrsc)); + key->wk_keytsc = t->pn-1; /* PN-1 since we do encap */ + if (!ieee80211_crypto_setkey(vap, key)) { printf("FAIL: ieee80211_crypto_setkey failed\n"); goto bad; } @@ -624,17 +625,18 @@ runtest(struct ieee80211com *ic, struct /* * Craft frame from plaintext data. */ - cip = key.wk_cipher; + cip = key->wk_cipher; m = m_getcl(M_NOWAIT, MT_HEADER, M_PKTHDR); m->m_data += cip->ic_header; memcpy(mtod(m, void *), t->plaintext, t->plaintext_len); m->m_len = t->plaintext_len; m->m_pkthdr.len = m->m_len; + hdrlen = ieee80211_anyhdrsize(mtod(m, void *)); /* * Encrypt frame w/ MIC. */ - if (!cip->ic_encap(&key, m, t->keyix<<6)) { + if (!cip->ic_encap(key, m)) { printtest(t); printf("FAIL: ccmp encap failed\n"); goto bad; @@ -660,7 +662,7 @@ runtest(struct ieee80211com *ic, struct /* * Decrypt frame; strip MIC. */ - if (!cip->ic_decap(&key, m)) { + if (!cip->ic_decap(key, m, hdrlen)) { printf("FAIL: ccmp decap failed\n"); printtest(t); cmpfail(mtod(m, const void *), m->m_len, @@ -680,17 +682,17 @@ runtest(struct ieee80211com *ic, struct printf("FAIL: decap botch; data does not compare\n"); printtest(t); cmpfail(mtod(m, const void *), m->m_pkthdr.len, - t->plaintext, t_plaintext_len); + t->plaintext, t->plaintext_len); goto bad; } m_freem(m); - ieee80211_crypto_delkey(ic, &key); + ieee80211_crypto_delkey(vap, key); printf("PASS\n"); return 1; bad: if (m != NULL) m_freem(m); - ieee80211_crypto_delkey(ic, &key); + ieee80211_crypto_delkey(vap, key); return 0; } @@ -704,26 +706,38 @@ static int debug = 0; static int init_crypto_ccmp_test(void) { -#define N(a) (sizeof(a)/sizeof(a[0])) struct ieee80211com ic; + struct ieee80211vap vap; + struct ifnet ifp; int i, pass, total; memset(&ic, 0, sizeof(ic)); - if (debug) - ic.ic_debug = IEEE80211_MSG_CRYPTO; + memset(&vap, 0, sizeof(vap)); + memset(&ifp, 0, sizeof(ifp)); + ieee80211_crypto_attach(&ic); + /* some minimal initialization */ + strncpy(ifp.if_xname, "test_ccmp", sizeof(ifp.if_xname)); + vap.iv_ic = ⁣ + vap.iv_ifp = &ifp; + if (debug) + vap.iv_debug = IEEE80211_MSG_CRYPTO; + ieee80211_crypto_vattach(&vap); + pass = 0; total = 0; - for (i = 0; i < N(ccmptests); i++) + for (i = 0; i < nitems(ccmptests); i++) if (tests & (1< #include +#include #include #include @@ -141,7 +142,6 @@ struct tkip_ctx { struct ieee80211com *tc_ic; /* for diagnostics */ uint16_t tx_ttak[5]; - int tx_phase1_done; uint8_t tx_rc4key[16]; uint16_t rx_ttak[5]; @@ -179,34 +179,34 @@ cmpfail(const void *gen, size_t genlen, } static int -runtest(struct ieee80211com *ic, struct ciphertest *t) +runtest(struct ieee80211vap *vap, struct ciphertest *t) { struct tkip_ctx *ctx; - struct ieee80211_key key; + struct ieee80211_key *key = &vap->iv_nw_keys[t->keyix]; struct mbuf *m = NULL; const struct ieee80211_cipher *cip; - u_int8_t mac[IEEE80211_ADDR_LEN]; u_int len; + int hdrlen; printf("%s: ", t->name); /* * Setup key. */ - memset(&key, 0, sizeof(key)); - key.wk_flags = IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV; - key.wk_cipher = &ieee80211_cipher_none; - if (!ieee80211_crypto_newkey(ic, IEEE80211_CIPHER_TKIP, - IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV, &key)) { + memset(key, 0, sizeof(*key)); + key->wk_flags = IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV; + key->wk_cipher = &ieee80211_cipher_none; + if (!ieee80211_crypto_newkey(vap, t->cipher, + IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV, key)) { printf("FAIL: ieee80211_crypto_newkey failed\n"); goto bad; } - memcpy(key.wk_key, t->key, t->key_len); - key.wk_keylen = 128/NBBY; - key.wk_keyrsc = 0; - key.wk_keytsc = t->pn; - if (!ieee80211_crypto_setkey(ic, &key, mac)) { + memcpy(key->wk_key, t->key, t->key_len); + key->wk_keylen = 128/NBBY; + memset(key->wk_keyrsc, 0, sizeof(key->wk_keyrsc)); + key->wk_keytsc = t->pn; + if (!ieee80211_crypto_setkey(vap, key)) { printf("FAIL: ieee80211_crypto_setkey failed\n"); goto bad; } @@ -214,18 +214,19 @@ runtest(struct ieee80211com *ic, struct /* * Craft frame from plaintext data. */ - cip = key.wk_cipher; + cip = key->wk_cipher; m = m_getcl(M_NOWAIT, MT_HEADER, M_PKTHDR); m->m_data += cip->ic_header; len = t->plaintext_len - IEEE80211_WEP_MICLEN; memcpy(mtod(m, void *), t->plaintext, len); m->m_len = len; m->m_pkthdr.len = m->m_len; + hdrlen = ieee80211_anyhdrsize(mtod(m, void *)); /* * Add MIC. */ - if (!ieee80211_crypto_enmic(ic, &key, m)) { + if (!ieee80211_crypto_enmic(vap, key, m, 1)) { printf("FAIL: tkip enmic failed\n"); goto bad; } @@ -247,14 +248,14 @@ runtest(struct ieee80211com *ic, struct /* * Encrypt frame w/ MIC. */ - if (!cip->ic_encap(&key, m, t->keyix<<6)) { + if (!cip->ic_encap(key, m)) { printf("FAIL: tkip encap failed\n"); goto bad; } /* * Verify: phase1, phase2, frame length, frame contents. */ - ctx = key.wk_private; + ctx = key->wk_private; if (memcmp(ctx->tx_ttak, t->phase1, t->phase1_len)) { printf("FAIL: encrypt phase1 botch\n"); cmpfail(ctx->tx_ttak, sizeof(ctx->tx_ttak), @@ -281,7 +282,7 @@ runtest(struct ieee80211com *ic, struct /* * Decrypt frame. */ - if (!cip->ic_decap(&key, m)) { + if (!cip->ic_decap(key, m, hdrlen)) { printf("tkip decap failed\n"); /* * Check reason for failure: phase1, phase2, frame data (ICV). @@ -319,17 +320,19 @@ runtest(struct ieee80211com *ic, struct /* * De-MIC decrypted frame. */ - if (!ieee80211_crypto_demic(ic, &key, m)) { + if (!ieee80211_crypto_demic(vap, key, m, 1)) { printf("FAIL: tkip demic failed\n"); goto bad; } /* XXX check frame length and contents... */ + m_freem(m); + ieee80211_crypto_delkey(vap, key); printf("PASS\n"); return 1; bad: if (m != NULL) m_freem(m); - ieee80211_crypto_delkey(ic, &key); + ieee80211_crypto_delkey(vap, key); return 0; } @@ -343,26 +346,38 @@ static int tests = -1; static int init_crypto_tkip_test(void) { -#define N(a) (sizeof(a)/sizeof(a[0])) struct ieee80211com ic; + struct ieee80211vap vap; + struct ifnet ifp; int i, pass, total; memset(&ic, 0, sizeof(ic)); - if (debug) - ic.ic_debug = IEEE80211_MSG_CRYPTO; + memset(&vap, 0, sizeof(vap)); + memset(&ifp, 0, sizeof(ifp)); + ieee80211_crypto_attach(&ic); + /* some minimal initialization */ + strncpy(ifp.if_xname, "test_ccmp", sizeof(ifp.if_xname)); + vap.iv_ic = ⁣ + vap.iv_ifp = &ifp; + if (debug) + vap.iv_debug = IEEE80211_MSG_CRYPTO; + ieee80211_crypto_vattach(&vap); + pass = 0; total = 0; - for (i = 0; i < N(tkiptests); i++) + for (i = 0; i < nitems(tkiptests); i++) if (tests & (1< #include +#include #include #include @@ -178,54 +179,55 @@ cmpfail(const void *gen, size_t genlen, } struct wep_ctx_hw { /* for use with h/w support */ - struct ieee80211com *wc_ic; /* for diagnostics */ - u_int32_t wc_iv; /* initial vector for crypto */ + struct ieee80211vap *wc_vap; /* for diagnostics+statistics */ + struct ieee80211com *wc_ic; + uint32_t wc_iv; /* initial vector for crypto */ }; static int -runtest(struct ieee80211com *ic, struct ciphertest *t) +runtest(struct ieee80211vap *vap, struct ciphertest *t) { - struct ieee80211_key key; + struct ieee80211_key *key = &vap->iv_nw_keys[t->keyix]; struct mbuf *m = NULL; const struct ieee80211_cipher *cip; - u_int8_t mac[IEEE80211_ADDR_LEN]; struct wep_ctx_hw *ctx; + int hdrlen; printf("%s: ", t->name); /* * Setup key. */ - memset(&key, 0, sizeof(key)); - key.wk_flags = IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV; - key.wk_cipher = &ieee80211_cipher_none; - if (!ieee80211_crypto_newkey(ic, t->cipher, - IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV, &key)) { + memset(key, 0, sizeof(*key)); + key->wk_flags = IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV; + key->wk_cipher = &ieee80211_cipher_none; + if (!ieee80211_crypto_newkey(vap, t->cipher, + IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV, key)) { printf("FAIL: ieee80211_crypto_newkey failed\n"); goto bad; } - memcpy(key.wk_key, t->key, t->key_len); - key.wk_keylen = t->key_len; - if (!ieee80211_crypto_setkey(ic, &key, mac)) { + memcpy(key->wk_key, t->key, t->key_len); + key->wk_keylen = t->key_len; + if (!ieee80211_crypto_setkey(vap, key)) { printf("FAIL: ieee80211_crypto_setkey failed\n"); goto bad; } - cip = key.wk_cipher; /* * Craft frame from plaintext data. */ - cip = key.wk_cipher; + cip = key->wk_cipher; m = m_getcl(M_NOWAIT, MT_HEADER, M_PKTHDR); memcpy(mtod(m, void *), t->encrypted, t->encrypted_len); m->m_len = t->encrypted_len; m->m_pkthdr.len = m->m_len; + hdrlen = ieee80211_anyhdrsize(mtod(m, void *)); /* * Decrypt frame. */ - if (!cip->ic_decap(&key, m)) { + if (!cip->ic_decap(key, m, hdrlen)) { printf("FAIL: wep decap failed\n"); cmpfail(mtod(m, const void *), m->m_pkthdr.len, t->plaintext, t->plaintext_len); @@ -249,9 +251,11 @@ runtest(struct ieee80211com *ic, struct /* * Encrypt frame. */ - ctx = (struct wep_ctx_hw *) key.wk_private; + ctx = (struct wep_ctx_hw *) key->wk_private; + ctx->wc_vap = vap; + ctx->wc_ic = vap->iv_ic; memcpy(&ctx->wc_iv, t->iv, sizeof(t->iv)); /* for encap/encrypt */ - if (!cip->ic_encap(&key, m, t->keyix<<6)) { + if (!cip->ic_encap(key, m)) { printf("FAIL: wep encap failed\n"); goto bad; } @@ -271,13 +275,13 @@ runtest(struct ieee80211com *ic, struct goto bad; } m_freem(m); - ieee80211_crypto_delkey(ic, &key); + ieee80211_crypto_delkey(vap, key); printf("PASS\n"); return 1; bad: if (m != NULL) m_freem(m); - ieee80211_crypto_delkey(ic, &key); + ieee80211_crypto_delkey(vap, key); return 0; } @@ -291,25 +295,38 @@ static int debug = 0; static int init_crypto_wep_test(void) { -#define N(a) (sizeof(a)/sizeof(a[0])) struct ieee80211com ic; + struct ieee80211vap vap; + struct ifnet ifp; int i, pass, total; memset(&ic, 0, sizeof(ic)); - if (debug) - ic.ic_debug = IEEE80211_MSG_CRYPTO; + memset(&vap, 0, sizeof(vap)); + memset(&ifp, 0, sizeof(ifp)); + ieee80211_crypto_attach(&ic); + + /* some minimal initialization */ + strncpy(ifp.if_xname, "test_ccmp", sizeof(ifp.if_xname)); + vap.iv_ic = ⁣ + vap.iv_ifp = &ifp; + if (debug) + vap.iv_debug = IEEE80211_MSG_CRYPTO; + ieee80211_crypto_vattach(&vap); + pass = 0; total = 0; - for (i = 0; i < N(weptests); i++) + for (i = 0; i < nitems(weptests); i++) if (tests & (1< Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2839A1C17C; Thu, 22 Oct 2015 18:05:12 +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 9414612EC; Thu, 22 Oct 2015 18:05:12 +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 t9MI5BCo080958; Thu, 22 Oct 2015 18:05:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MI5BE5080957; Thu, 22 Oct 2015 18:05:11 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510221805.t9MI5BE5080957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 22 Oct 2015 18:05:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289763 - head/tools/bsdbox X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 18:05:12 -0000 Author: bdrewery Date: Thu Oct 22 18:05:11 2015 New Revision: 289763 URL: https://svnweb.freebsd.org/changeset/base/289763 Log: Fix warning about redefined *_crunchdir_hostname target after r289734. 'hostname' was in the build list twice. X-MFC-With: r289734 MFC after: 2 weeks Reported by: sbruno Sponsored by: EMC / Isilon Storage Division Modified: head/tools/bsdbox/Makefile.base Modified: head/tools/bsdbox/Makefile.base ============================================================================== --- head/tools/bsdbox/Makefile.base Thu Oct 22 17:08:12 2015 (r289762) +++ head/tools/bsdbox/Makefile.base Thu Oct 22 18:05:11 2015 (r289763) @@ -6,7 +6,7 @@ # CRUNCH_PROGS_sbin+= dmesg sysctl init reboot CRUNCH_PROGS_bin+= ls cat dd df cp hostname kill mkdir sleep ps -CRUNCH_PROGS_bin+= ln rm hostname kenv mv expr +CRUNCH_PROGS_bin+= ln rm kenv mv expr CRUNCH_PROGS_usr.bin+= true false hexdump tail nc w head uname tset CRUNCH_PROGS_usr.sbin+= gpioctl CRUNCH_ALIAS_w= uptime From owner-svn-src-all@freebsd.org Thu Oct 22 19:42: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 B8D22A1C801; Thu, 22 Oct 2015 19:42:59 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 599F5164D; Thu, 22 Oct 2015 19:42:59 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9MJgwv1016674; Thu, 22 Oct 2015 19:42:58 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MJgwUD016671; Thu, 22 Oct 2015 19:42:58 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201510221942.t9MJgwUD016671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 22 Oct 2015 19:42:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289764 - in head: contrib/ntp contrib/ntp/adjtimed contrib/ntp/clockstuff contrib/ntp/html contrib/ntp/include contrib/ntp/include/isc contrib/ntp/kernel contrib/ntp/kernel/sys contrib... X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 19:42:59 -0000 Author: glebius Date: Thu Oct 22 19:42:57 2015 New Revision: 289764 URL: https://svnweb.freebsd.org/changeset/base/289764 Log: MFV ntp-4.2.8p4 (r289715) Security: VuXML: c4a18a12-77fc-11e5-a687-206a8a720317 Security: CVE-2015-7871 Security: CVE-2015-7855 Security: CVE-2015-7854 Security: CVE-2015-7853 Security: CVE-2015-7852 Security: CVE-2015-7851 Security: CVE-2015-7850 Security: CVE-2015-7849 Security: CVE-2015-7848 Security: CVE-2015-7701 Security: CVE-2015-7703 Security: CVE-2015-7704, CVE-2015-7705 Security: CVE-2015-7691, CVE-2015-7692, CVE-2015-7702 Security: http://support.ntp.org/bin/view/Main/SecurityNotice#October_2015_NTP_Security_Vulner Sponsored by: Nginx, Inc. Added: head/contrib/ntp/include/rc_cmdlength.h - copied unchanged from r289715, vendor/ntp/dist/include/rc_cmdlength.h head/contrib/ntp/sntp/m4/ntp_problemtests.m4 - copied unchanged from r289715, vendor/ntp/dist/sntp/m4/ntp_problemtests.m4 head/contrib/ntp/sntp/tests/fileHandlingTest.c - copied unchanged from r289715, vendor/ntp/dist/sntp/tests/fileHandlingTest.c head/contrib/ntp/sntp/tests/run-t-log.c - copied unchanged from r289715, vendor/ntp/dist/sntp/tests/run-t-log.c head/contrib/ntp/sntp/tests/sntptest.c - copied unchanged from r289715, vendor/ntp/dist/sntp/tests/sntptest.c head/contrib/ntp/sntp/tests/t-log.c - copied unchanged from r289715, vendor/ntp/dist/sntp/tests/t-log.c head/contrib/ntp/sntp/unity/auto/parseOutput.rb - copied unchanged from r289715, vendor/ntp/dist/sntp/unity/auto/parseOutput.rb head/contrib/ntp/sntp/unity/auto/type_sanitizer.rb - copied unchanged from r289715, vendor/ntp/dist/sntp/unity/auto/type_sanitizer.rb head/contrib/ntp/sntp/unity/auto/unity_test_summary.py - copied unchanged from r289715, vendor/ntp/dist/sntp/unity/auto/unity_test_summary.py head/contrib/ntp/sntp/unity/unity_config.h - copied unchanged from r289715, vendor/ntp/dist/sntp/unity/unity_config.h head/contrib/ntp/tests/libntp/lfptest.c - copied unchanged from r289715, vendor/ntp/dist/tests/libntp/lfptest.c head/contrib/ntp/tests/libntp/sockaddrtest.c - copied unchanged from r289715, vendor/ntp/dist/tests/libntp/sockaddrtest.c head/contrib/ntp/tests/ntpd/leapsec.c - copied unchanged from r289715, vendor/ntp/dist/tests/ntpd/leapsec.c head/contrib/ntp/tests/ntpd/ntp_prio_q.c - copied unchanged from r289715, vendor/ntp/dist/tests/ntpd/ntp_prio_q.c head/contrib/ntp/tests/ntpd/ntp_restrict.c - copied unchanged from r289715, vendor/ntp/dist/tests/ntpd/ntp_restrict.c head/contrib/ntp/tests/ntpd/rc_cmdlength.c - copied unchanged from r289715, vendor/ntp/dist/tests/ntpd/rc_cmdlength.c head/contrib/ntp/tests/ntpd/run-leapsec.c - copied unchanged from r289715, vendor/ntp/dist/tests/ntpd/run-leapsec.c head/contrib/ntp/tests/ntpd/run-ntp_prio_q.c - copied unchanged from r289715, vendor/ntp/dist/tests/ntpd/run-ntp_prio_q.c head/contrib/ntp/tests/ntpd/run-ntp_restrict.c - copied unchanged from r289715, vendor/ntp/dist/tests/ntpd/run-ntp_restrict.c head/contrib/ntp/tests/ntpd/run-rc_cmdlength.c - copied unchanged from r289715, vendor/ntp/dist/tests/ntpd/run-rc_cmdlength.c head/contrib/ntp/tests/ntpd/run-t-ntp_scanner.c - copied unchanged from r289715, vendor/ntp/dist/tests/ntpd/run-t-ntp_scanner.c head/contrib/ntp/tests/ntpd/run-t-ntp_signd.c - copied unchanged from r289715, vendor/ntp/dist/tests/ntpd/run-t-ntp_signd.c head/contrib/ntp/tests/ntpd/t-ntp_scanner.c - copied unchanged from r289715, vendor/ntp/dist/tests/ntpd/t-ntp_scanner.c head/contrib/ntp/tests/ntpd/t-ntp_signd.c - copied unchanged from r289715, vendor/ntp/dist/tests/ntpd/t-ntp_signd.c head/contrib/ntp/tests/ntpq/ - copied from r289715, vendor/ntp/dist/tests/ntpq/ Deleted: head/contrib/ntp/FREEBSD-Xlist head/contrib/ntp/FREEBSD-upgrade head/contrib/ntp/sntp/libevent/sample/ head/contrib/ntp/sntp/tests/fileHandlingTest.h head/contrib/ntp/sntp/tests/g_fileHandlingTest.h head/contrib/ntp/sntp/tests/g_networking.cpp head/contrib/ntp/sntp/tests/g_packetHandling.cpp head/contrib/ntp/sntp/tests/g_packetProcessing.cpp head/contrib/ntp/sntp/tests/g_sntptest.h head/contrib/ntp/sntp/tests_main.cpp head/contrib/ntp/sntp/tests_main.h head/contrib/ntp/tests/libntp/g_a_md5encrypt.cpp head/contrib/ntp/tests/libntp/g_atoint.cpp head/contrib/ntp/tests/libntp/g_atouint.cpp head/contrib/ntp/tests/libntp/g_authkeys.cpp head/contrib/ntp/tests/libntp/g_buftvtots.cpp head/contrib/ntp/tests/libntp/g_calendar.cpp head/contrib/ntp/tests/libntp/g_caljulian.cpp head/contrib/ntp/tests/libntp/g_caltontp.cpp head/contrib/ntp/tests/libntp/g_calyearstart.cpp head/contrib/ntp/tests/libntp/g_clocktime.cpp head/contrib/ntp/tests/libntp/g_decodenetnum.cpp head/contrib/ntp/tests/libntp/g_hextoint.cpp head/contrib/ntp/tests/libntp/g_hextolfp.cpp head/contrib/ntp/tests/libntp/g_humandate.cpp head/contrib/ntp/tests/libntp/g_lfpfunc.cpp head/contrib/ntp/tests/libntp/g_lfptest.h head/contrib/ntp/tests/libntp/g_lfptostr.cpp head/contrib/ntp/tests/libntp/g_libntptest.cpp head/contrib/ntp/tests/libntp/g_libntptest.h head/contrib/ntp/tests/libntp/g_modetoa.cpp head/contrib/ntp/tests/libntp/g_msyslog.cpp head/contrib/ntp/tests/libntp/g_netof.cpp head/contrib/ntp/tests/libntp/g_numtoa.cpp head/contrib/ntp/tests/libntp/g_numtohost.cpp head/contrib/ntp/tests/libntp/g_octtoint.cpp head/contrib/ntp/tests/libntp/g_prettydate.cpp head/contrib/ntp/tests/libntp/g_recvbuff.cpp head/contrib/ntp/tests/libntp/g_refnumtoa.cpp head/contrib/ntp/tests/libntp/g_sfptostr.cpp head/contrib/ntp/tests/libntp/g_sockaddrtest.h head/contrib/ntp/tests/libntp/g_socktoa.cpp head/contrib/ntp/tests/libntp/g_ssl_init.cpp head/contrib/ntp/tests/libntp/g_statestr.cpp head/contrib/ntp/tests/libntp/g_strtolfp.cpp head/contrib/ntp/tests/libntp/g_timespecops.cpp head/contrib/ntp/tests/libntp/g_timestructs.cpp head/contrib/ntp/tests/libntp/g_timestructs.h head/contrib/ntp/tests/libntp/g_timevalops.cpp head/contrib/ntp/tests/libntp/g_tstotv.cpp head/contrib/ntp/tests/libntp/g_tvtots.cpp head/contrib/ntp/tests/libntp/g_uglydate.cpp head/contrib/ntp/tests/libntp/g_vi64ops.cpp head/contrib/ntp/tests/libntp/g_ymd2yd.cpp head/contrib/ntp/tests/ntpd/leapsec.cpp head/contrib/ntp/tests/ntpd/ntpdtest.cpp head/contrib/ntp/tests/ntpd/ntpdtest.h Modified: head/contrib/ntp/ChangeLog head/contrib/ntp/CommitLog head/contrib/ntp/Makefile.am head/contrib/ntp/Makefile.in head/contrib/ntp/NEWS head/contrib/ntp/aclocal.m4 head/contrib/ntp/adjtimed/Makefile.in head/contrib/ntp/adjtimed/adjtimed.c head/contrib/ntp/clockstuff/Makefile.in head/contrib/ntp/clockstuff/chutest.c head/contrib/ntp/clockstuff/propdelay.c head/contrib/ntp/configure head/contrib/ntp/configure.ac head/contrib/ntp/html/decode.html head/contrib/ntp/html/miscopt.html head/contrib/ntp/html/stats.html head/contrib/ntp/include/Makefile.am head/contrib/ntp/include/Makefile.in head/contrib/ntp/include/isc/Makefile.in head/contrib/ntp/include/ntp_assert.h head/contrib/ntp/include/ntp_calendar.h head/contrib/ntp/include/ntp_config.h head/contrib/ntp/include/ntp_control.h head/contrib/ntp/include/ntp_lists.h head/contrib/ntp/include/ntp_stdlib.h head/contrib/ntp/include/ntp_syslog.h head/contrib/ntp/include/ntp_types.h head/contrib/ntp/kernel/Makefile.in head/contrib/ntp/kernel/sys/Makefile.in head/contrib/ntp/libntp/Makefile.in head/contrib/ntp/libntp/atolfp.c head/contrib/ntp/libntp/audio.c head/contrib/ntp/libntp/authkeys.c head/contrib/ntp/libntp/authreadkeys.c head/contrib/ntp/libntp/caljulian.c head/contrib/ntp/libntp/caltontp.c head/contrib/ntp/libntp/decodenetnum.c head/contrib/ntp/libntp/emalloc.c head/contrib/ntp/libntp/icom.c head/contrib/ntp/libntp/machines.c head/contrib/ntp/libntp/msyslog.c head/contrib/ntp/libntp/ntp_calendar.c head/contrib/ntp/libntp/ntp_intres.c head/contrib/ntp/libntp/ntp_lineedit.c head/contrib/ntp/libntp/ntp_rfc2553.c head/contrib/ntp/libntp/ntp_worker.c head/contrib/ntp/libntp/prettydate.c head/contrib/ntp/libntp/recvbuff.c head/contrib/ntp/libntp/socket.c head/contrib/ntp/libntp/socktohost.c head/contrib/ntp/libntp/statestr.c head/contrib/ntp/libparse/Makefile.in head/contrib/ntp/ntpd/Makefile.am head/contrib/ntp/ntpd/Makefile.in head/contrib/ntp/ntpd/invoke-ntp.conf.texi head/contrib/ntp/ntpd/invoke-ntp.keys.texi head/contrib/ntp/ntpd/invoke-ntpd.texi head/contrib/ntp/ntpd/ntp.conf.5man head/contrib/ntp/ntpd/ntp.conf.5mdoc head/contrib/ntp/ntpd/ntp.conf.def head/contrib/ntp/ntpd/ntp.conf.html head/contrib/ntp/ntpd/ntp.conf.man.in head/contrib/ntp/ntpd/ntp.conf.mdoc.in head/contrib/ntp/ntpd/ntp.keys.5man head/contrib/ntp/ntpd/ntp.keys.5mdoc head/contrib/ntp/ntpd/ntp.keys.html head/contrib/ntp/ntpd/ntp.keys.man.in head/contrib/ntp/ntpd/ntp.keys.mdoc.in head/contrib/ntp/ntpd/ntp_config.c head/contrib/ntp/ntpd/ntp_control.c head/contrib/ntp/ntpd/ntp_crypto.c head/contrib/ntp/ntpd/ntp_io.c head/contrib/ntp/ntpd/ntp_loopfilter.c head/contrib/ntp/ntpd/ntp_monitor.c head/contrib/ntp/ntpd/ntp_parser.c head/contrib/ntp/ntpd/ntp_parser.h head/contrib/ntp/ntpd/ntp_peer.c head/contrib/ntp/ntpd/ntp_proto.c head/contrib/ntp/ntpd/ntp_refclock.c head/contrib/ntp/ntpd/ntp_request.c head/contrib/ntp/ntpd/ntp_restrict.c head/contrib/ntp/ntpd/ntp_timer.c head/contrib/ntp/ntpd/ntpd-opts.c head/contrib/ntp/ntpd/ntpd-opts.def head/contrib/ntp/ntpd/ntpd-opts.h head/contrib/ntp/ntpd/ntpd.1ntpdman head/contrib/ntp/ntpd/ntpd.1ntpdmdoc head/contrib/ntp/ntpd/ntpd.c head/contrib/ntp/ntpd/ntpd.html head/contrib/ntp/ntpd/ntpd.man.in head/contrib/ntp/ntpd/ntpd.mdoc.in head/contrib/ntp/ntpd/rc_cmdlength.c head/contrib/ntp/ntpd/refclock_arc.c head/contrib/ntp/ntpd/refclock_chu.c head/contrib/ntp/ntpd/refclock_gpsdjson.c head/contrib/ntp/ntpd/refclock_local.c head/contrib/ntp/ntpd/refclock_nmea.c head/contrib/ntp/ntpd/refclock_palisade.c head/contrib/ntp/ntpd/refclock_parse.c head/contrib/ntp/ntpd/refclock_wwv.c head/contrib/ntp/ntpdate/Makefile.in head/contrib/ntp/ntpdate/ntpdate.c head/contrib/ntp/ntpdc/Makefile.in head/contrib/ntp/ntpdc/invoke-ntpdc.texi head/contrib/ntp/ntpdc/ntpdc-opts.c head/contrib/ntp/ntpdc/ntpdc-opts.h head/contrib/ntp/ntpdc/ntpdc.1ntpdcman head/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc head/contrib/ntp/ntpdc/ntpdc.c head/contrib/ntp/ntpdc/ntpdc.html head/contrib/ntp/ntpdc/ntpdc.man.in head/contrib/ntp/ntpdc/ntpdc.mdoc.in head/contrib/ntp/ntpq/Makefile.in head/contrib/ntp/ntpq/invoke-ntpq.texi head/contrib/ntp/ntpq/libntpq.h head/contrib/ntp/ntpq/ntpq-opts.c head/contrib/ntp/ntpq/ntpq-opts.h head/contrib/ntp/ntpq/ntpq-subs.c head/contrib/ntp/ntpq/ntpq.1ntpqman head/contrib/ntp/ntpq/ntpq.1ntpqmdoc head/contrib/ntp/ntpq/ntpq.c head/contrib/ntp/ntpq/ntpq.html head/contrib/ntp/ntpq/ntpq.man.in head/contrib/ntp/ntpq/ntpq.mdoc.in head/contrib/ntp/ntpsnmpd/Makefile.in head/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi head/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c head/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h head/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman head/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc head/contrib/ntp/ntpsnmpd/ntpsnmpd.html head/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in head/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in head/contrib/ntp/packageinfo.sh head/contrib/ntp/parseutil/Makefile.in head/contrib/ntp/scripts/Makefile.in head/contrib/ntp/scripts/build/Makefile.in head/contrib/ntp/scripts/calc_tickadj/Makefile.in head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in head/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi head/contrib/ntp/scripts/invoke-plot_summary.texi head/contrib/ntp/scripts/invoke-summary.texi head/contrib/ntp/scripts/lib/Makefile.in head/contrib/ntp/scripts/lib/NTP/Util.pm head/contrib/ntp/scripts/ntp-wait/Makefile.in head/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi head/contrib/ntp/scripts/ntp-wait/ntp-wait-opts head/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman head/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc head/contrib/ntp/scripts/ntp-wait/ntp-wait.html head/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in head/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in head/contrib/ntp/scripts/ntpsweep/Makefile.in head/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi head/contrib/ntp/scripts/ntpsweep/ntpsweep-opts head/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman head/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc head/contrib/ntp/scripts/ntpsweep/ntpsweep.html head/contrib/ntp/scripts/ntpsweep/ntpsweep.in head/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in head/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in head/contrib/ntp/scripts/ntptrace/Makefile.in head/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi head/contrib/ntp/scripts/ntptrace/ntptrace-opts head/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman head/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc head/contrib/ntp/scripts/ntptrace/ntptrace.html head/contrib/ntp/scripts/ntptrace/ntptrace.man.in head/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in head/contrib/ntp/scripts/plot_summary-opts head/contrib/ntp/scripts/plot_summary.1plot_summaryman head/contrib/ntp/scripts/plot_summary.1plot_summarymdoc head/contrib/ntp/scripts/plot_summary.html head/contrib/ntp/scripts/plot_summary.man.in head/contrib/ntp/scripts/plot_summary.mdoc.in head/contrib/ntp/scripts/summary-opts head/contrib/ntp/scripts/summary.1summaryman head/contrib/ntp/scripts/summary.1summarymdoc head/contrib/ntp/scripts/summary.html head/contrib/ntp/scripts/summary.man.in head/contrib/ntp/scripts/summary.mdoc.in head/contrib/ntp/scripts/update-leap/Makefile.in head/contrib/ntp/scripts/update-leap/invoke-update-leap.texi head/contrib/ntp/scripts/update-leap/update-leap-opts head/contrib/ntp/scripts/update-leap/update-leap.1update-leapman head/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc head/contrib/ntp/scripts/update-leap/update-leap.html head/contrib/ntp/scripts/update-leap/update-leap.man.in head/contrib/ntp/scripts/update-leap/update-leap.mdoc.in head/contrib/ntp/sntp/Makefile.am head/contrib/ntp/sntp/Makefile.in head/contrib/ntp/sntp/configure head/contrib/ntp/sntp/configure.ac head/contrib/ntp/sntp/include/Makefile.in head/contrib/ntp/sntp/include/version.def head/contrib/ntp/sntp/include/version.texi head/contrib/ntp/sntp/invoke-sntp.texi head/contrib/ntp/sntp/libevent/Makefile.am head/contrib/ntp/sntp/libevent/Makefile.in head/contrib/ntp/sntp/libevent/test/bench_httpclient.c head/contrib/ntp/sntp/libevent/test/regress.c head/contrib/ntp/sntp/libevent/test/regress_dns.c head/contrib/ntp/sntp/libevent/test/regress_http.c head/contrib/ntp/sntp/libevent/test/regress_minheap.c head/contrib/ntp/sntp/libevent/test/test-ratelim.c head/contrib/ntp/sntp/libevent/test/test-time.c head/contrib/ntp/sntp/libopts/Makefile.in head/contrib/ntp/sntp/libopts/compat/pathfind.c head/contrib/ntp/sntp/log.c head/contrib/ntp/sntp/log.h head/contrib/ntp/sntp/m4/ntp_libevent.m4 head/contrib/ntp/sntp/m4/ntp_libntp.m4 head/contrib/ntp/sntp/m4/ntp_rlimit.m4 head/contrib/ntp/sntp/m4/openldap-thread-check.m4 head/contrib/ntp/sntp/m4/os_cflags.m4 head/contrib/ntp/sntp/m4/version.m4 head/contrib/ntp/sntp/networking.c head/contrib/ntp/sntp/scripts/Makefile.in head/contrib/ntp/sntp/sntp-opts.c head/contrib/ntp/sntp/sntp-opts.h head/contrib/ntp/sntp/sntp.1sntpman head/contrib/ntp/sntp/sntp.1sntpmdoc head/contrib/ntp/sntp/sntp.html head/contrib/ntp/sntp/sntp.man.in head/contrib/ntp/sntp/sntp.mdoc.in head/contrib/ntp/sntp/tests/Makefile.am head/contrib/ntp/sntp/tests/Makefile.in head/contrib/ntp/sntp/tests/crypto.c head/contrib/ntp/sntp/tests/fileHandlingTest.h.in head/contrib/ntp/sntp/tests/keyFile.c head/contrib/ntp/sntp/tests/kodDatabase.c head/contrib/ntp/sntp/tests/kodFile.c head/contrib/ntp/sntp/tests/packetHandling.c head/contrib/ntp/sntp/tests/packetProcessing.c head/contrib/ntp/sntp/tests/run-crypto.c head/contrib/ntp/sntp/tests/run-keyFile.c head/contrib/ntp/sntp/tests/run-kodDatabase.c head/contrib/ntp/sntp/tests/run-kodFile.c head/contrib/ntp/sntp/tests/run-networking.c head/contrib/ntp/sntp/tests/run-packetHandling.c head/contrib/ntp/sntp/tests/run-packetProcessing.c head/contrib/ntp/sntp/tests/run-utilities.c head/contrib/ntp/sntp/tests/sntptest.h head/contrib/ntp/sntp/tests/utilities.c head/contrib/ntp/sntp/unity/Makefile.am head/contrib/ntp/sntp/unity/Makefile.in head/contrib/ntp/sntp/unity/auto/generate_test_runner.rb head/contrib/ntp/sntp/unity/auto/unity_test_summary.rb head/contrib/ntp/sntp/unity/unity.c head/contrib/ntp/sntp/unity/unity_internals.h head/contrib/ntp/sntp/version.c head/contrib/ntp/tests/Makefile.am head/contrib/ntp/tests/Makefile.in head/contrib/ntp/tests/bug-2803/Makefile.am head/contrib/ntp/tests/bug-2803/Makefile.in head/contrib/ntp/tests/bug-2803/run-bug-2803.c head/contrib/ntp/tests/libntp/Makefile.am head/contrib/ntp/tests/libntp/Makefile.in head/contrib/ntp/tests/libntp/a_md5encrypt.c head/contrib/ntp/tests/libntp/atoint.c head/contrib/ntp/tests/libntp/atouint.c head/contrib/ntp/tests/libntp/authkeys.c head/contrib/ntp/tests/libntp/buftvtots.c head/contrib/ntp/tests/libntp/calendar.c head/contrib/ntp/tests/libntp/caljulian.c head/contrib/ntp/tests/libntp/caltontp.c head/contrib/ntp/tests/libntp/calyearstart.c head/contrib/ntp/tests/libntp/clocktime.c head/contrib/ntp/tests/libntp/decodenetnum.c head/contrib/ntp/tests/libntp/hextoint.c head/contrib/ntp/tests/libntp/hextolfp.c head/contrib/ntp/tests/libntp/humandate.c head/contrib/ntp/tests/libntp/lfpfunc.c head/contrib/ntp/tests/libntp/lfptest.h head/contrib/ntp/tests/libntp/lfptostr.c head/contrib/ntp/tests/libntp/modetoa.c head/contrib/ntp/tests/libntp/msyslog.c head/contrib/ntp/tests/libntp/netof.c head/contrib/ntp/tests/libntp/numtoa.c head/contrib/ntp/tests/libntp/numtohost.c head/contrib/ntp/tests/libntp/octtoint.c head/contrib/ntp/tests/libntp/prettydate.c head/contrib/ntp/tests/libntp/recvbuff.c head/contrib/ntp/tests/libntp/refidsmear.c head/contrib/ntp/tests/libntp/refnumtoa.c head/contrib/ntp/tests/libntp/run-a_md5encrypt.c head/contrib/ntp/tests/libntp/run-atoint.c head/contrib/ntp/tests/libntp/run-atouint.c head/contrib/ntp/tests/libntp/run-authkeys.c head/contrib/ntp/tests/libntp/run-buftvtots.c head/contrib/ntp/tests/libntp/run-calendar.c head/contrib/ntp/tests/libntp/run-caljulian.c head/contrib/ntp/tests/libntp/run-caltontp.c head/contrib/ntp/tests/libntp/run-calyearstart.c head/contrib/ntp/tests/libntp/run-clocktime.c head/contrib/ntp/tests/libntp/run-decodenetnum.c head/contrib/ntp/tests/libntp/run-hextoint.c head/contrib/ntp/tests/libntp/run-hextolfp.c head/contrib/ntp/tests/libntp/run-humandate.c head/contrib/ntp/tests/libntp/run-lfpfunc.c head/contrib/ntp/tests/libntp/run-lfptostr.c head/contrib/ntp/tests/libntp/run-modetoa.c head/contrib/ntp/tests/libntp/run-msyslog.c head/contrib/ntp/tests/libntp/run-netof.c head/contrib/ntp/tests/libntp/run-numtoa.c head/contrib/ntp/tests/libntp/run-numtohost.c head/contrib/ntp/tests/libntp/run-octtoint.c head/contrib/ntp/tests/libntp/run-prettydate.c head/contrib/ntp/tests/libntp/run-recvbuff.c head/contrib/ntp/tests/libntp/run-refidsmear.c head/contrib/ntp/tests/libntp/run-refnumtoa.c head/contrib/ntp/tests/libntp/run-sfptostr.c head/contrib/ntp/tests/libntp/run-socktoa.c head/contrib/ntp/tests/libntp/run-ssl_init.c head/contrib/ntp/tests/libntp/run-statestr.c head/contrib/ntp/tests/libntp/run-strtolfp.c head/contrib/ntp/tests/libntp/run-timespecops.c head/contrib/ntp/tests/libntp/run-timevalops.c head/contrib/ntp/tests/libntp/run-tstotv.c head/contrib/ntp/tests/libntp/run-tvtots.c head/contrib/ntp/tests/libntp/run-uglydate.c head/contrib/ntp/tests/libntp/run-vi64ops.c head/contrib/ntp/tests/libntp/run-ymd2yd.c head/contrib/ntp/tests/libntp/sfptostr.c head/contrib/ntp/tests/libntp/sockaddrtest.h head/contrib/ntp/tests/libntp/socktoa.c head/contrib/ntp/tests/libntp/ssl_init.c head/contrib/ntp/tests/libntp/statestr.c head/contrib/ntp/tests/libntp/strtolfp.c head/contrib/ntp/tests/libntp/test-libntp.c head/contrib/ntp/tests/libntp/test-libntp.h head/contrib/ntp/tests/libntp/timespecops.c head/contrib/ntp/tests/libntp/timevalops.c head/contrib/ntp/tests/libntp/tstotv.c head/contrib/ntp/tests/libntp/tvtots.c head/contrib/ntp/tests/libntp/uglydate.c head/contrib/ntp/tests/libntp/vi64ops.c head/contrib/ntp/tests/libntp/ymd2yd.c head/contrib/ntp/tests/ntpd/Makefile.am head/contrib/ntp/tests/ntpd/Makefile.in head/contrib/ntp/tests/sandbox/Makefile.am head/contrib/ntp/tests/sandbox/Makefile.in head/contrib/ntp/tests/sandbox/run-modetoa.c head/contrib/ntp/tests/sandbox/run-uglydate.c head/contrib/ntp/tests/sandbox/run-ut-2803.c head/contrib/ntp/tests/sandbox/smeartest.c head/contrib/ntp/tests/sec-2853/Makefile.am head/contrib/ntp/tests/sec-2853/Makefile.in head/contrib/ntp/tests/sec-2853/run-sec-2853.c head/contrib/ntp/tests/sec-2853/sec-2853.c head/contrib/ntp/util/Makefile.in head/contrib/ntp/util/invoke-ntp-keygen.texi head/contrib/ntp/util/ntp-keygen-opts.c head/contrib/ntp/util/ntp-keygen-opts.h head/contrib/ntp/util/ntp-keygen.1ntp-keygenman head/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc head/contrib/ntp/util/ntp-keygen.c head/contrib/ntp/util/ntp-keygen.html head/contrib/ntp/util/ntp-keygen.man.in head/contrib/ntp/util/ntp-keygen.mdoc.in head/contrib/ntp/util/ntptime.c head/usr.sbin/ntp/config.h head/usr.sbin/ntp/doc/ntp-keygen.8 head/usr.sbin/ntp/doc/ntp.conf.5 head/usr.sbin/ntp/doc/ntp.keys.5 head/usr.sbin/ntp/doc/ntpd.8 head/usr.sbin/ntp/doc/ntpdc.8 head/usr.sbin/ntp/doc/ntpq.8 head/usr.sbin/ntp/doc/sntp.8 head/usr.sbin/ntp/scripts/mkver Directory Properties: head/contrib/ntp/ (props changed) Modified: head/contrib/ntp/ChangeLog ============================================================================== --- head/contrib/ntp/ChangeLog Thu Oct 22 18:05:11 2015 (r289763) +++ head/contrib/ntp/ChangeLog Thu Oct 22 19:42:57 2015 (r289764) @@ -1,4 +1,159 @@ --- +(4.2.8p4) 2015/10/21 Released by Harlan Stenn +(4.2.8p4-RC1) 2015/10/06 Released by Harlan Stenn + +* [Sec 2899] CVE-2014-9297 perlinger@ntp.org +* [Sec 2901] Drop invalid packet before checking KoD. Check for all KoD's. + Danny Mayer. Log incoming packets that fail TEST2. Harlan Stenn. +* [Sec 2902] configuration directives "pidfile" and "driftfile" + should be local-only. perlinger@ntp.org (patch by Miroslav Lichvar) +* [Sec 2909] added missing call to 'free()' in ntp_crypto.c. perlinger@ntp.org +* [Sec 2913] TALOS-CAN-0052: crash by loop counter underrun. perlinger@ntp.org +* [Sec 2916] TALOS-CAN-0054: memory corruption in password store. JPerlinger +* [Sec 2917] TALOS-CAN-0055: Infinite loop if extended logging enabled and + the logfile and keyfile are the same. perlinger@ntp.org +* [Sec 1918] TALOS-CAN-0062: prevent directory traversal for VMS, too, when + using 'saveconfig' command. perlinger@ntp.org +* [Bug 2919] TALOS-CAN-0063: avoid buffer overrun in ntpq. perlinger@ntp.org +* [Sec 2020] TALOS-CAN-0064: signed/unsiged clash could lead to buffer overun + and memory corruption. perlinger@ntp.org +* [Sec 2921] TALOS-CAN-0065: password length memory corruption. JPerlinger. +* [Sec 2922] decodenetnum() will ASSERT botch instead of returning FAIL + on some bogus values. Harlan Stenn. +* [Sec 2941] NAK to the Future: Symmetric association authentication + bypass via crypto-NAK. Patch applied. perlinger@ntp.org +* [Bug 2332] (reopened) Exercise thread cancellation once before dropping + privileges and limiting resources in NTPD removes the need to link + forcefully against 'libgcc_s' which does not always work. J.Perlinger +* [Bug 2595] ntpdate man page quirks. Hal Murray, Harlan Stenn. +* [Bug 2625] Deprecate flag1 in local refclock. Hal Murray, Harlan Stenn. +* [Bug 2817] Stop locking ntpd into memory by default under Linux. H.Stenn. +* [Bug 2821] minor build issues: fixed refclock_gpsdjson.c. perlinger@ntp.org +* [Bug 2823] ntpsweep with recursive peers option doesn't work. H.Stenn. +* [Bug 2849] Systems with more than one default route may never + synchronize. Brian Utterback. Note that this patch might need to + be reverted once Bug 2043 has been fixed. +* [Bug 2864] 4.2.8p3 fails to compile on Windows. Juergen Perlinger +* [Bug 2866] segmentation fault at initgroups(). Harlan Stenn. +* [Bug 2867] ntpd with autokey active crashed by 'ntpq -crv'. J.Perlinger +* [Bug 2873] libevent should not include .deps/ in the tarball. H.Stenn +* [Bug 2874] Don't distribute generated sntp/tests/fileHandlingTest.h. H.Stenn +* [Bug 2875] sntp/Makefile.am: Get rid of DIST_SUBDIRS. libevent must + be configured for the distribution targets. Harlan Stenn. +* [Bug 2883] ntpd crashes on exit with empty driftfile. Miroslav Lichvar. +* [Bug 2886] Mis-spelling: "outlyer" should be "outlier". dave@horsfall.org +* [Bug 2888] streamline calendar functions. perlinger@ntp.org +* [Bug 2889] ntp-dev-4.3.67 does not build on Windows. perlinger@ntp.org +* [Bug 2890] Ignore ENOBUFS on routing netlink socket. Konstantin Khlebnikov. +* [Bug 2906] make check needs better support for pthreads. Harlan Stenn. +* [Bug 2907] dist* build targets require our libevent/ to be enabled. HStenn. +* [Bug 2912] no munlockall() under Windows. David Taylor, Harlan Stenn. +* libntp/emalloc.c: Remove explicit include of stdint.h. Harlan Stenn. +* Put Unity CPPFLAGS items in unity_config.h. Harlan Stenn. +* tests/ntpd/g_leapsec.cpp typo fix. Harlan Stenn. +* Phase 1 deprecation of google test in sntp/tests/. Harlan Stenn. +* On some versions of HP-UX, inttypes.h does not include stdint.h. H.Stenn. +* top_srcdir can change based on ntp v. sntp. Harlan Stenn. +* sntp/tests/ function parameter list cleanup. Damir Tomić. +* tests/libntp/ function parameter list cleanup. Damir Tomić. +* tests/ntpd/ function parameter list cleanup. Damir Tomić. +* sntp/unity/unity_config.h: handle stdint.h. Harlan Stenn. +* sntp/unity/unity_internals.h: handle *INTPTR_MAX on old Solaris. H.Stenn. +* tests/libntp/timevalops.c and timespecops.c fixed error printing. D.Tomić. +* tests/libntp/ improvements in code and fixed error printing. Damir Tomić. +* tests/libntp: a_md5encrypt.c, authkeys.c, buftvtots.c, calendar.c, caljulian.c, + caltontp.c, clocktime.c, humandate.c, hextolfp.c, decodenetnum.c - fixed + formatting; first declaration, then code (C90); deleted unnecessary comments; + changed from sprintf to snprintf; fixed order of includes. Tomasz Flendrich +* tests/libntp/lfpfunc.c remove unnecessary include, remove old comments, + fix formatting, cleanup. Tomasz Flendrich +* tests/libntp/lfptostr.c remove unnecessary include, add consts, fix formatting. + Tomasz Flendrich +* tests/libntp/statestr.c remove empty functions, remove unnecessary include, + fix formatting. Tomasz Flendrich +* tests/libntp/modetoa.c fixed formatting. Tomasz Flendrich +* tests/libntp/msyslog.c fixed formatting. Tomasz Flendrich +* tests/libntp/numtoa.c deleted unnecessary empty functions, fixed formatting. + Tomasz Flendrich +* tests/libntp/numtohost.c added const, fixed formatting. Tomasz Flendrich +* tests/libntp/refnumtoa.c fixed formatting. Tomasz Flendrich +* tests/libntp/ssl_init.c fixed formatting. Tomasz Flendrich +* tests/libntp/tvtots.c fixed a bug, fixed formatting. Tomasz Flendrich +* tests/libntp/uglydate.c removed an unnecessary include. Tomasz Flendrich +* tests/libntp/vi64ops.c removed an unnecessary comment, fixed formatting. +* tests/libntp/ymd3yd.c removed an empty function and an unnecessary include, +fixed formatting. Tomasz Flendrich +* tests/libntp/timespecops.c fixed formatting, fixed the order of includes, + removed unnecessary comments, cleanup. Tomasz Flendrich +* tests/libntp/timevalops.c fixed the order of includes, deleted unnecessary + comments, cleanup. Tomasz Flendrich +* tests/libntp/sockaddrtest.h making it agree to NTP's conventions of formatting. + Tomasz Flendrich +* tests/libntp/lfptest.h cleanup. Tomasz Flendrich +* tests/libntp/test-libntp.c fix formatting. Tomasz Flendrich +* sntp/tests/crypto.c is now using proper Unity's assertions, fixed formatting. + Tomasz Flendrich +* sntp/tests/kodDatabase.c added consts, deleted empty function, + fixed formatting. Tomasz Flendrich +* sntp/tests/kodFile.c cleanup, fixed formatting. Tomasz Flendrich +* sntp/tests/packetHandling.c is now using proper Unity's assertions, + fixed formatting, deleted unused variable. Tomasz Flendrich +* sntp/tests/keyFile.c is now using proper Unity's assertions, fixed formatting. + Tomasz Flendrich +* sntp/tests/packetProcessing.c changed from sprintf to snprintf, + fixed formatting. Tomasz Flendrich +* sntp/tests/utilities.c is now using proper Unity's assertions, changed + the order of includes, fixed formatting, removed unnecessary comments. + Tomasz Flendrich +* sntp/tests/sntptest.h fixed formatting. Tomasz Flendrich +* sntp/tests/fileHandlingTest.h.in fixed a possible buffer overflow problem, + made one function do its job, deleted unnecessary prints, fixed formatting. + Tomasz Flendrich +* sntp/unity/Makefile.am added a missing header. Tomasz Flendrich +* sntp/unity/unity_config.h: Distribute it. Harlan Stenn. +* sntp/libevent/evconfig-private.h: remove generated filefrom SCM. H.Stenn. +* sntp/unity/Makefile.am: fix some broken paths. Harlan Stenn. +* sntp/unity/unity.c: Clean up a printf(). Harlan Stenn. +* Phase 1 deprecation of google test in tests/libntp/. Harlan Stenn. +* Don't build sntp/libevent/sample/. Harlan Stenn. +* tests/libntp/test_caltontp needs -lpthread. Harlan Stenn. +* br-flock: --enable-local-libevent. Harlan Stenn. +* Wrote tests for ntpd/ntp_prio_q.c. Tomasz Flendrich +* scripts/lib/NTP/Util.pm: stratum output is version-dependent. Harlan Stenn. +* Get rid of the NTP_ prefix on our assertion macros. Harlan Stenn. +* Code cleanup. Harlan Stenn. +* libntp/icom.c: Typo fix. Harlan Stenn. +* util/ntptime.c: initialization nit. Harlan Stenn. +* ntpd/ntp_peer.c:newpeer(): added a DEBUG_REQUIRE(srcadr). Harlan Stenn. +* Add std_unity_tests to various Makefile.am files. Harlan Stenn. +* ntpd/ntp_restrict.c: added a few assertions, created tests for this file. + Tomasz Flendrich +* Changed progname to be const in many files - now it's consistent. Tomasz + Flendrich +* Typo fix for GCC warning suppression. Harlan Stenn. +* Added tests/ntpd/ntp_scanner.c test. Damir Tomić. +* Added declarations to all Unity tests, and did minor fixes to them. + Reduced the number of warnings by half. Damir Tomić. +* Updated generate_test_runner.rb and updated the sntp/unity/auto directory + with the latest Unity updates from Mark. Damir Tomić. +* Retire google test - phase I. Harlan Stenn. +* Unity test cleanup: move declaration of 'initializing'. Harlan Stenn. +* Update the NEWS file. Harlan Stenn. +* Autoconf cleanup. Harlan Stenn. +* Unit test dist cleanup. Harlan Stenn. +* Cleanup various test Makefile.am files. Harlan Stenn. +* Pthread autoconf macro cleanup. Harlan Stenn. +* Fix progname definition in unity runner scripts. Harlan Stenn. +* Clean trailing whitespace in tests/ntpd/Makefile.am. Harlan Stenn. +* Update the patch for bug 2817. Harlan Stenn. +* More updates for bug 2817. Harlan Stenn. +* Fix bugs in tests/ntpd/ntp_prio_q.c. Harlan Stenn. +* gcc on older HPUX may need +allowdups. Harlan Stenn. +* Adding missing MCAST protection. Harlan Stenn. +* Disable certain test programs on certain platforms. Harlan Stenn. +* Implement --enable-problem-tests (on by default). Harlan Stenn. +* build system tweaks. Harlan Stenn. +--- (4.2.8p3) 2015/06/29 Released by Harlan Stenn * [Sec 2853] Crafted remote config packet can crash some versions of Modified: head/contrib/ntp/CommitLog ============================================================================== --- head/contrib/ntp/CommitLog Thu Oct 22 18:05:11 2015 (r289763) +++ head/contrib/ntp/CommitLog Thu Oct 22 19:42:57 2015 (r289764) @@ -1,3 +1,4916 @@ +ChangeSet@1.3577, 2015-10-21 12:42:02-04:00, stenn@deacon.udel.edu + NTP_4_2_8P4 + TAG: NTP_4_2_8P4 + + ChangeLog@1.1757 +1 -0 + NTP_4_2_8P4 + + ntpd/invoke-ntp.conf.texi@1.193 +1 -1 + NTP_4_2_8P4 + + ntpd/invoke-ntp.keys.texi@1.185 +1 -1 + NTP_4_2_8P4 + + ntpd/invoke-ntpd.texi@1.502 +2 -2 + NTP_4_2_8P4 + + ntpd/ntp.conf.5man@1.227 +3 -3 + NTP_4_2_8P4 + + ntpd/ntp.conf.5mdoc@1.227 +2 -2 + NTP_4_2_8P4 + + ntpd/ntp.conf.html@1.181 +94 -107 + NTP_4_2_8P4 + + ntpd/ntp.conf.man.in@1.227 +3 -3 + NTP_4_2_8P4 + + ntpd/ntp.conf.mdoc.in@1.227 +2 -2 + NTP_4_2_8P4 + + ntpd/ntp.keys.5man@1.219 +2 -2 + NTP_4_2_8P4 + + ntpd/ntp.keys.5mdoc@1.219 +3 -3 + NTP_4_2_8P4 + + ntpd/ntp.keys.html@1.181 +21 -33 + NTP_4_2_8P4 + + ntpd/ntp.keys.man.in@1.219 +2 -2 + NTP_4_2_8P4 + + ntpd/ntp.keys.mdoc.in@1.219 +3 -3 + NTP_4_2_8P4 + + ntpd/ntpd-opts.c@1.524 +245 -245 + NTP_4_2_8P4 + + ntpd/ntpd-opts.h@1.523 +3 -3 + NTP_4_2_8P4 + + ntpd/ntpd.1ntpdman@1.331 +3 -3 + NTP_4_2_8P4 + + ntpd/ntpd.1ntpdmdoc@1.331 +2 -2 + NTP_4_2_8P4 + + ntpd/ntpd.html@1.175 +142 -186 + NTP_4_2_8P4 + + ntpd/ntpd.man.in@1.331 +3 -3 + NTP_4_2_8P4 + + ntpd/ntpd.mdoc.in@1.331 +2 -2 + NTP_4_2_8P4 + + ntpdc/invoke-ntpdc.texi@1.499 +2 -2 + NTP_4_2_8P4 + + ntpdc/ntpdc-opts.c@1.517 +107 -107 + NTP_4_2_8P4 + + ntpdc/ntpdc-opts.h@1.516 +3 -3 + NTP_4_2_8P4 + + ntpdc/ntpdc.1ntpdcman@1.330 +3 -3 + NTP_4_2_8P4 + + ntpdc/ntpdc.1ntpdcmdoc@1.330 +2 -2 + NTP_4_2_8P4 + + ntpdc/ntpdc.html@1.343 +75 -95 + NTP_4_2_8P4 + + ntpdc/ntpdc.man.in@1.330 +3 -3 + NTP_4_2_8P4 + + ntpdc/ntpdc.mdoc.in@1.330 +2 -2 + NTP_4_2_8P4 + + ntpq/invoke-ntpq.texi@1.506 +2 -2 + NTP_4_2_8P4 + + ntpq/ntpq-opts.c@1.523 +106 -106 + NTP_4_2_8P4 + + ntpq/ntpq-opts.h@1.521 +3 -3 + NTP_4_2_8P4 + + ntpq/ntpq.1ntpqman@1.334 +3 -3 + NTP_4_2_8P4 + + ntpq/ntpq.1ntpqmdoc@1.334 +2 -2 + NTP_4_2_8P4 + + ntpq/ntpq.html@1.172 +132 -155 + NTP_4_2_8P4 + + ntpq/ntpq.man.in@1.334 +3 -3 + NTP_4_2_8P4 + + ntpq/ntpq.mdoc.in@1.334 +2 -2 + NTP_4_2_8P4 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.501 +2 -2 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd-opts.c@1.519 +68 -68 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd-opts.h@1.518 +3 -3 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.330 +3 -3 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.330 +2 -2 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd.html@1.170 +10 -14 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd.man.in@1.330 +3 -3 + NTP_4_2_8P4 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.330 +2 -2 + NTP_4_2_8P4 + + packageinfo.sh@1.520 +3 -3 + NTP_4_2_8P4 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.91 +3 -3 + NTP_4_2_8P4 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.92 +2 -2 + NTP_4_2_8P4 + + scripts/calc_tickadj/calc_tickadj.html@1.93 +30 -42 + NTP_4_2_8P4 + + scripts/calc_tickadj/calc_tickadj.man.in@1.90 +3 -3 + NTP_4_2_8P4 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.92 +2 -2 + NTP_4_2_8P4 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.95 +1 -1 + NTP_4_2_8P4 + + scripts/invoke-plot_summary.texi@1.112 +2 -2 + NTP_4_2_8P4 + + scripts/invoke-summary.texi@1.112 +2 -2 + NTP_4_2_8P4 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.322 +2 -2 + NTP_4_2_8P4 + + scripts/ntp-wait/ntp-wait-opts@1.58 +2 -2 + NTP_4_2_8P4 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.319 +3 -3 + NTP_4_2_8P4 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.320 +2 -2 + NTP_4_2_8P4 + + scripts/ntp-wait/ntp-wait.html@1.339 +41 -59 + NTP_4_2_8P4 + + scripts/ntp-wait/ntp-wait.man.in@1.319 +3 -3 + NTP_4_2_8P4 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.320 +2 -2 + NTP_4_2_8P4 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.110 +2 -2 + NTP_4_2_8P4 + + scripts/ntpsweep/ntpsweep-opts@1.60 +2 -2 + NTP_4_2_8P4 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.98 +3 -3 + NTP_4_2_8P4 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.98 +2 -2 + NTP_4_2_8P4 + + scripts/ntpsweep/ntpsweep.html@1.111 +46 -57 + NTP_4_2_8P4 + + scripts/ntpsweep/ntpsweep.man.in@1.98 +3 -3 + NTP_4_2_8P4 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.99 +2 -2 + NTP_4_2_8P4 + + scripts/ntptrace/invoke-ntptrace.texi@1.111 +2 -2 + NTP_4_2_8P4 + + scripts/ntptrace/ntptrace-opts@1.60 +2 -2 + NTP_4_2_8P4 + + scripts/ntptrace/ntptrace.1ntptraceman@1.98 +3 -3 + NTP_4_2_8P4 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.99 +2 -2 + NTP_4_2_8P4 + + scripts/ntptrace/ntptrace.html@1.112 +38 -47 + NTP_4_2_8P4 + + scripts/ntptrace/ntptrace.man.in@1.98 +3 -3 + NTP_4_2_8P4 + + scripts/ntptrace/ntptrace.mdoc.in@1.100 +2 -2 + NTP_4_2_8P4 + + scripts/plot_summary-opts@1.60 +2 -2 + NTP_4_2_8P4 + + scripts/plot_summary.1plot_summaryman@1.110 +3 -3 + NTP_4_2_8P4 + + scripts/plot_summary.1plot_summarymdoc@1.110 +2 -2 + NTP_4_2_8P4 + + scripts/plot_summary.html@1.113 +40 -58 + NTP_4_2_8P4 + + scripts/plot_summary.man.in@1.110 +3 -3 + NTP_4_2_8P4 + + scripts/plot_summary.mdoc.in@1.110 +2 -2 + NTP_4_2_8P4 + + scripts/summary-opts@1.60 +2 -2 + NTP_4_2_8P4 + + scripts/summary.1summaryman@1.110 +3 -3 + NTP_4_2_8P4 + + scripts/summary.1summarymdoc@1.110 +2 -2 + NTP_4_2_8P4 + + scripts/summary.html@1.113 +37 -49 + NTP_4_2_8P4 + + scripts/summary.man.in@1.110 +3 -3 + NTP_4_2_8P4 + + scripts/summary.mdoc.in@1.110 +2 -2 + NTP_4_2_8P4 + + scripts/update-leap/invoke-update-leap.texi@1.11 +1 -1 + NTP_4_2_8P4 + + scripts/update-leap/update-leap-opts@1.11 +2 -2 + NTP_4_2_8P4 + + scripts/update-leap/update-leap.1update-leapman@1.11 +3 -3 + NTP_4_2_8P4 + + scripts/update-leap/update-leap.1update-leapmdoc@1.11 +2 -2 + NTP_4_2_8P4 + + scripts/update-leap/update-leap.html@1.11 +48 -72 + NTP_4_2_8P4 + + scripts/update-leap/update-leap.man.in@1.11 +3 -3 + NTP_4_2_8P4 + + scripts/update-leap/update-leap.mdoc.in@1.11 +2 -2 + NTP_4_2_8P4 + + sntp/invoke-sntp.texi@1.499 +2 -2 + NTP_4_2_8P4 + + sntp/sntp-opts.c@1.518 +159 -159 + NTP_4_2_8P4 + + sntp/sntp-opts.h@1.516 +3 -3 + NTP_4_2_8P4 + + sntp/sntp.1sntpman@1.334 +3 -3 + NTP_4_2_8P4 + + sntp/sntp.1sntpmdoc@1.334 +2 -2 + NTP_4_2_8P4 + + sntp/sntp.html@1.514 +111 -135 + NTP_4_2_8P4 + + sntp/sntp.man.in@1.334 +3 -3 + NTP_4_2_8P4 + + sntp/sntp.mdoc.in@1.334 +2 -2 + NTP_4_2_8P4 + + util/invoke-ntp-keygen.texi@1.502 +2 -2 + NTP_4_2_8P4 + + util/ntp-keygen-opts.c@1.520 +173 -173 + NTP_4_2_8P4 + + util/ntp-keygen-opts.h@1.518 +3 -3 + NTP_4_2_8P4 + + util/ntp-keygen.1ntp-keygenman@1.330 +3 -3 + NTP_4_2_8P4 + + util/ntp-keygen.1ntp-keygenmdoc@1.330 +2 -2 + NTP_4_2_8P4 + + util/ntp-keygen.html@1.176 +157 -216 + NTP_4_2_8P4 + + util/ntp-keygen.man.in@1.330 +3 -3 + NTP_4_2_8P4 + + util/ntp-keygen.mdoc.in@1.330 +2 -2 + NTP_4_2_8P4 + +ChangeSet@1.3576, 2015-10-21 11:58:26-04:00, stenn@deacon.udel.edu + 4.2.8p4 + + packageinfo.sh@1.519 +1 -1 + 4.2.8p4 + +ChangeSet@1.3575, 2015-10-21 15:35:31+00:00, stenn@psp-deb1.ntp.org + Update severity information + + NEWS@1.150 +2 -2 + Update severity information + +ChangeSet@1.3574, 2015-10-20 08:00:43+00:00, stenn@psp-deb1.ntp.org + Update CVEs + + NEWS@1.149 +16 -16 + Update CVEs + +ChangeSet@1.3573, 2015-10-17 06:28:49+00:00, stenn@psp-deb1.ntp.org + ntp-4.2.8p4-sec-RC2 + + NEWS@1.148 +336 -4 + ntp-4.2.8p4-sec-RC2 + + ntpd/invoke-ntp.conf.texi@1.192 +1 -1 + ntp-4.2.8p4-sec-RC2 + + ntpd/invoke-ntp.keys.texi@1.184 +1 -1 + ntp-4.2.8p4-sec-RC2 + + ntpd/invoke-ntpd.texi@1.501 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.conf.5man@1.226 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.conf.5mdoc@1.226 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.conf.html@1.180 +107 -94 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.conf.man.in@1.226 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.conf.mdoc.in@1.226 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.keys.5man@1.218 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.keys.5mdoc@1.218 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.keys.html@1.180 +33 -21 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.keys.man.in@1.218 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntp.keys.mdoc.in@1.218 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd-opts.c@1.523 +245 -245 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd-opts.h@1.522 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd.1ntpdman@1.330 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd.1ntpdmdoc@1.330 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd.html@1.174 +186 -142 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd.man.in@1.330 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpd/ntpd.mdoc.in@1.330 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpdc/invoke-ntpdc.texi@1.498 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc-opts.c@1.516 +107 -107 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc-opts.h@1.515 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc.1ntpdcman@1.329 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc.1ntpdcmdoc@1.329 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc.html@1.342 +95 -75 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc.man.in@1.329 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpdc/ntpdc.mdoc.in@1.329 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpq/invoke-ntpq.texi@1.505 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq-opts.c@1.522 +106 -106 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq-opts.h@1.520 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq.1ntpqman@1.333 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq.1ntpqmdoc@1.333 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq.html@1.171 +155 -132 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq.man.in@1.333 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpq/ntpq.mdoc.in@1.333 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.500 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd-opts.c@1.518 +68 -68 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd-opts.h@1.517 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.329 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.329 +2 -2 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd.html@1.169 +14 -10 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd.man.in@1.329 +3 -3 + ntp-4.2.8p4-sec-RC2 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.329 +2 -2 + ntp-4.2.8p4-sec-RC2 + + packageinfo.sh@1.518 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.90 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.91 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/calc_tickadj/calc_tickadj.html@1.92 +42 -30 + ntp-4.2.8p4-sec-RC2 + + scripts/calc_tickadj/calc_tickadj.man.in@1.89 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.91 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.94 +1 -1 + ntp-4.2.8p4-sec-RC2 + + scripts/invoke-plot_summary.texi@1.111 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/invoke-summary.texi@1.111 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.321 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/ntp-wait-opts@1.57 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.318 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.319 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/ntp-wait.html@1.338 +59 -41 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/ntp-wait.man.in@1.318 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.319 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.109 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/ntpsweep-opts@1.59 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.97 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.97 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/ntpsweep.html@1.110 +57 -46 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/ntpsweep.man.in@1.97 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.98 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/invoke-ntptrace.texi@1.110 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/ntptrace-opts@1.59 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/ntptrace.1ntptraceman@1.97 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.98 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/ntptrace.html@1.111 +47 -38 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/ntptrace.man.in@1.97 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/ntptrace/ntptrace.mdoc.in@1.99 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/plot_summary-opts@1.59 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/plot_summary.1plot_summaryman@1.109 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/plot_summary.1plot_summarymdoc@1.109 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/plot_summary.html@1.112 +58 -40 + ntp-4.2.8p4-sec-RC2 + + scripts/plot_summary.man.in@1.109 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/plot_summary.mdoc.in@1.109 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/summary-opts@1.59 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/summary.1summaryman@1.109 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/summary.1summarymdoc@1.109 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/summary.html@1.112 +49 -37 + ntp-4.2.8p4-sec-RC2 + + scripts/summary.man.in@1.109 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/summary.mdoc.in@1.109 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/invoke-update-leap.texi@1.10 +1 -1 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/update-leap-opts@1.10 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/update-leap.1update-leapman@1.10 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/update-leap.1update-leapmdoc@1.10 +2 -2 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/update-leap.html@1.10 +72 -48 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/update-leap.man.in@1.10 +3 -3 + ntp-4.2.8p4-sec-RC2 + + scripts/update-leap/update-leap.mdoc.in@1.10 +2 -2 + ntp-4.2.8p4-sec-RC2 + + sntp/invoke-sntp.texi@1.498 +2 -2 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp-opts.c@1.517 +159 -159 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp-opts.h@1.515 +3 -3 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp.1sntpman@1.333 +3 -3 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp.1sntpmdoc@1.333 +2 -2 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp.html@1.513 +135 -111 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp.man.in@1.333 +3 -3 + ntp-4.2.8p4-sec-RC2 + + sntp/sntp.mdoc.in@1.333 +2 -2 + ntp-4.2.8p4-sec-RC2 + + util/invoke-ntp-keygen.texi@1.501 +2 -2 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen-opts.c@1.519 +173 -173 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen-opts.h@1.517 +3 -3 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen.1ntp-keygenman@1.329 +3 -3 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen.1ntp-keygenmdoc@1.329 +2 -2 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen.html@1.175 +216 -157 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen.man.in@1.329 +3 -3 + ntp-4.2.8p4-sec-RC2 + + util/ntp-keygen.mdoc.in@1.329 +2 -2 + ntp-4.2.8p4-sec-RC2 + +ChangeSet@1.3572, 2015-10-17 03:10:01+00:00, stenn@psp-deb1.ntp.org + cleanup + + ChangeLog@1.1756 +1 -5 + cleanup + +ChangeSet@1.3571, 2015-10-17 01:39:22+00:00, stenn@psp-deb1.ntp.org + [Sec 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK + + ChangeLog@1.1755 +4 -1 + [Sec 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK + +ChangeSet@1.3558.3.3, 2015-10-11 08:10:20+02:00, jnperlin@hydra.localnet + [Bug 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK + + ChangeLog@1.1743.3.3 +3 -0 + [Bug 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK + + ntpd/ntp_proto.c@1.364.1.1 +18 -0 + [Bug 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK + +ChangeSet@1.3558.3.2, 2015-10-06 06:25:48-04:00, stenn@deacon.udel.edu + NTP_4_2_8P4_RC1 + TAG: NTP_4_2_8P4_RC1 + + ChangeLog@1.1743.3.2 +1 -0 + NTP_4_2_8P4_RC1 + + ntpd/invoke-ntp.conf.texi@1.191 +1 -1 + NTP_4_2_8P4_RC1 + + ntpd/invoke-ntp.keys.texi@1.183 +1 -1 + NTP_4_2_8P4_RC1 + + ntpd/invoke-ntpd.texi@1.500 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntp.conf.5man@1.225 +3 -3 + NTP_4_2_8P4_RC1 + + ntpd/ntp.conf.5mdoc@1.225 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntp.conf.html@1.179 +1196 -1524 + NTP_4_2_8P4_RC1 + + ntpd/ntp.conf.man.in@1.225 +3 -3 + NTP_4_2_8P4_RC1 + + ntpd/ntp.conf.mdoc.in@1.225 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntp.keys.5man@1.217 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntp.keys.5mdoc@1.217 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntp.keys.html@1.179 +1 -1 + NTP_4_2_8P4_RC1 + + ntpd/ntp.keys.man.in@1.217 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntp.keys.mdoc.in@1.217 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntpd-opts.c@1.522 +245 -245 + NTP_4_2_8P4_RC1 + + ntpd/ntpd-opts.h@1.521 +3 -3 + NTP_4_2_8P4_RC1 + + ntpd/ntpd.1ntpdman@1.329 +8 -4 + NTP_4_2_8P4_RC1 + + ntpd/ntpd.1ntpdmdoc@1.329 +7 -3 + NTP_4_2_8P4_RC1 + + ntpd/ntpd.html@1.173 +2 -2 + NTP_4_2_8P4_RC1 + + ntpd/ntpd.man.in@1.329 +8 -4 + NTP_4_2_8P4_RC1 + + ntpd/ntpd.mdoc.in@1.329 +7 -3 + NTP_4_2_8P4_RC1 + + ntpdc/invoke-ntpdc.texi@1.497 +2 -2 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc-opts.c@1.515 +107 -107 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc-opts.h@1.514 +3 -3 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc.1ntpdcman@1.328 +3 -3 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc.1ntpdcmdoc@1.328 +2 -2 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc.html@1.341 +2 -2 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc.man.in@1.328 +3 -3 + NTP_4_2_8P4_RC1 + + ntpdc/ntpdc.mdoc.in@1.328 +2 -2 + NTP_4_2_8P4_RC1 + + ntpq/invoke-ntpq.texi@1.504 +2 -2 + NTP_4_2_8P4_RC1 + + ntpq/ntpq-opts.c@1.521 +106 -106 + NTP_4_2_8P4_RC1 + + ntpq/ntpq-opts.h@1.519 +3 -3 + NTP_4_2_8P4_RC1 + + ntpq/ntpq.1ntpqman@1.332 +3 -3 + NTP_4_2_8P4_RC1 + + ntpq/ntpq.1ntpqmdoc@1.332 +2 -2 + NTP_4_2_8P4_RC1 + + ntpq/ntpq.html@1.170 +2 -2 + NTP_4_2_8P4_RC1 + + ntpq/ntpq.man.in@1.332 +3 -3 + NTP_4_2_8P4_RC1 + + ntpq/ntpq.mdoc.in@1.332 +2 -2 + NTP_4_2_8P4_RC1 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.499 +2 -2 + NTP_4_2_8P4_RC1 + + ntpsnmpd/ntpsnmpd-opts.c@1.517 +68 -68 + NTP_4_2_8P4_RC1 + + ntpsnmpd/ntpsnmpd-opts.h@1.516 +3 -3 + NTP_4_2_8P4_RC1 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.328 +3 -3 + NTP_4_2_8P4_RC1 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.328 +2 -2 + NTP_4_2_8P4_RC1 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Oct 22 20:28: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 7F0B5A1C0BD; Thu, 22 Oct 2015 20:28:39 +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 474DB1D75; Thu, 22 Oct 2015 20:28:39 +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 t9MKScAT032878; Thu, 22 Oct 2015 20:28:38 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MKSbRu032869; Thu, 22 Oct 2015 20:28:37 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510222028.t9MKSbRu032869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 22 Oct 2015 20:28:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289765 - in head/sys: conf libkern 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: Thu, 22 Oct 2015 20:28:39 -0000 Author: cem Date: Thu Oct 22 20:28:37 2015 New Revision: 289765 URL: https://svnweb.freebsd.org/changeset/base/289765 Log: Add libkern ffsll() for parity with flsll() Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D3962 Added: head/sys/libkern/ffsll.c (contents, props changed) Modified: head/sys/conf/files.arm head/sys/conf/files.arm64 head/sys/conf/files.i386 head/sys/conf/files.mips head/sys/conf/files.pc98 head/sys/conf/files.powerpc head/sys/conf/files.sparc64 head/sys/sys/libkern.h Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Thu Oct 22 19:42:57 2015 (r289764) +++ head/sys/conf/files.arm Thu Oct 22 20:28:37 2015 (r289765) @@ -120,6 +120,7 @@ libkern/ashldi3.c standard libkern/ashrdi3.c standard libkern/divdi3.c standard libkern/ffsl.c standard +libkern/ffsll.c standard libkern/fls.c standard libkern/flsl.c standard libkern/flsll.c standard Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Thu Oct 22 19:42:57 2015 (r289764) +++ head/sys/conf/files.arm64 Thu Oct 22 20:28:37 2015 (r289765) @@ -82,6 +82,7 @@ kern/subr_dummy_vdso_tc.c standard libkern/bcmp.c standard libkern/ffs.c standard libkern/ffsl.c standard +libkern/ffsll.c standard libkern/fls.c standard libkern/flsl.c standard libkern/flsll.c standard Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Thu Oct 22 19:42:57 2015 (r289764) +++ head/sys/conf/files.i386 Thu Oct 22 20:28:37 2015 (r289765) @@ -530,6 +530,7 @@ kern/imgact_aout.c optional compat_aout kern/imgact_gzip.c optional gzip kern/subr_sfbuf.c standard libkern/divdi3.c standard +libkern/ffsll.c standard libkern/flsll.c standard libkern/memmove.c standard libkern/memset.c standard Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Thu Oct 22 19:42:57 2015 (r289764) +++ head/sys/conf/files.mips Thu Oct 22 20:28:37 2015 (r289765) @@ -56,6 +56,7 @@ kern/subr_sfbuf.c optional mips | mips # gcc/clang runtime libkern/ffsl.c standard +libkern/ffsll.c standard libkern/fls.c standard libkern/flsl.c standard libkern/flsll.c standard Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Thu Oct 22 19:42:57 2015 (r289764) +++ head/sys/conf/files.pc98 Thu Oct 22 20:28:37 2015 (r289765) @@ -222,6 +222,7 @@ kern/imgact_aout.c optional compat_aout kern/imgact_gzip.c optional gzip kern/subr_sfbuf.c standard libkern/divdi3.c standard +libkern/ffsll.c standard libkern/flsll.c standard libkern/memmove.c standard libkern/memset.c standard Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Thu Oct 22 19:42:57 2015 (r289764) +++ head/sys/conf/files.powerpc Thu Oct 22 20:28:37 2015 (r289765) @@ -87,6 +87,7 @@ libkern/cmpdi2.c optional powerpc libkern/divdi3.c optional powerpc libkern/ffs.c standard libkern/ffsl.c standard +libkern/ffsll.c standard libkern/fls.c standard libkern/flsl.c standard libkern/flsll.c standard Modified: head/sys/conf/files.sparc64 ============================================================================== --- head/sys/conf/files.sparc64 Thu Oct 22 19:42:57 2015 (r289764) +++ head/sys/conf/files.sparc64 Thu Oct 22 20:28:37 2015 (r289765) @@ -67,6 +67,7 @@ kern/syscalls.c optional ktr kern/subr_sfbuf.c standard libkern/ffs.c standard libkern/ffsl.c standard +libkern/ffsll.c standard libkern/fls.c standard libkern/flsl.c standard libkern/flsll.c standard Added: head/sys/libkern/ffsll.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/libkern/ffsll.c Thu Oct 22 20:28:37 2015 (r289765) @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +/* + * Find First Set bit + */ +int +ffsll(long long mask) +{ + int bit; + + if (mask == 0) + return (0); + for (bit = 1; !(mask & 1); bit++) + mask = (unsigned long long)mask >> 1; + return (bit); +} Modified: head/sys/sys/libkern.h ============================================================================== --- head/sys/sys/libkern.h Thu Oct 22 19:42:57 2015 (r289764) +++ head/sys/sys/libkern.h Thu Oct 22 20:28:37 2015 (r289765) @@ -89,6 +89,9 @@ int ffs(int); #ifndef HAVE_INLINE_FFSL int ffsl(long); #endif +#ifndef HAVE_INLINE_FFSLL +int ffsll(long long); +#endif #ifndef HAVE_INLINE_FLS int fls(int); #endif From owner-svn-src-all@freebsd.org Thu Oct 22 21:04: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 ACCA4A1C8A6; Thu, 22 Oct 2015 21:04:49 +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 6F8A61EBC; Thu, 22 Oct 2015 21:04:49 +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 t9ML4mH9047776; Thu, 22 Oct 2015 21:04:48 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ML4mb1047770; Thu, 22 Oct 2015 21:04:48 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510222104.t9ML4mb1047770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 22 Oct 2015 21:04:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289766 - head/sys/libkern X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 21:04:49 -0000 Author: cem Date: Thu Oct 22 21:04:47 2015 New Revision: 289766 URL: https://svnweb.freebsd.org/changeset/base/289766 Log: libkern: ffs, fls: s/4/3/ the 3rd BSD clause Approved by: emaste Sponsored by: EMC / Isilon Storage Division Modified: head/sys/libkern/ffs.c head/sys/libkern/ffsl.c head/sys/libkern/ffsll.c head/sys/libkern/fls.c head/sys/libkern/flsl.c head/sys/libkern/flsll.c Modified: head/sys/libkern/ffs.c ============================================================================== --- head/sys/libkern/ffs.c Thu Oct 22 20:28:37 2015 (r289765) +++ head/sys/libkern/ffs.c Thu Oct 22 21:04:47 2015 (r289766) @@ -10,7 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/sys/libkern/ffsl.c ============================================================================== --- head/sys/libkern/ffsl.c Thu Oct 22 20:28:37 2015 (r289765) +++ head/sys/libkern/ffsl.c Thu Oct 22 21:04:47 2015 (r289766) @@ -10,7 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/sys/libkern/ffsll.c ============================================================================== --- head/sys/libkern/ffsll.c Thu Oct 22 20:28:37 2015 (r289765) +++ head/sys/libkern/ffsll.c Thu Oct 22 21:04:47 2015 (r289766) @@ -10,7 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/sys/libkern/fls.c ============================================================================== --- head/sys/libkern/fls.c Thu Oct 22 20:28:37 2015 (r289765) +++ head/sys/libkern/fls.c Thu Oct 22 21:04:47 2015 (r289766) @@ -10,7 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/sys/libkern/flsl.c ============================================================================== --- head/sys/libkern/flsl.c Thu Oct 22 20:28:37 2015 (r289765) +++ head/sys/libkern/flsl.c Thu Oct 22 21:04:47 2015 (r289766) @@ -10,7 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/sys/libkern/flsll.c ============================================================================== --- head/sys/libkern/flsll.c Thu Oct 22 20:28:37 2015 (r289765) +++ head/sys/libkern/flsll.c Thu Oct 22 21:04:47 2015 (r289766) @@ -10,7 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * From owner-svn-src-all@freebsd.org Thu Oct 22 21:13: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 38F36A1CA02; Thu, 22 Oct 2015 21:13:37 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F159D2C1; Thu, 22 Oct 2015 21:13:36 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9MLDa7n051415; Thu, 22 Oct 2015 21:13:36 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MLDaw2051414; Thu, 22 Oct 2015 21:13:36 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510222113.t9MLDaw2051414@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 22 Oct 2015 21:13:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289767 - head/usr.sbin/mptable X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 21:13:37 -0000 Author: bapt Date: Thu Oct 22 21:13:35 2015 New Revision: 289767 URL: https://svnweb.freebsd.org/changeset/base/289767 Log: Stop suggesting -grope argument when -grope argument was actually given Modified: head/usr.sbin/mptable/mptable.c Modified: head/usr.sbin/mptable/mptable.c ============================================================================== --- head/usr.sbin/mptable/mptable.c Thu Oct 22 21:04:47 2015 (r289766) +++ head/usr.sbin/mptable/mptable.c Thu Oct 22 21:13:35 2015 (r289767) @@ -217,7 +217,8 @@ main( int argc, char *argv[] ) apic_probe( &paddr, &where ); if ( where <= 0 ) { fprintf( stderr, "\n MP FPS NOT found,\n" ); - fprintf( stderr, " suggest trying -grope option!!!\n\n" ); + if (!grope) + fprintf( stderr, " suggest trying -grope option!!!\n\n" ); return 1; } From owner-svn-src-all@freebsd.org Thu Oct 22 21:22: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 A29AEA1CC5D; Thu, 22 Oct 2015 21:22:17 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x232.google.com (mail-qk0-x232.google.com [IPv6:2607:f8b0:400d: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 616E3C51; Thu, 22 Oct 2015 21:22:17 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qkca6 with SMTP id a6so60212391qkc.3; Thu, 22 Oct 2015 14:22:16 -0700 (PDT) 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=YCsWiRygD65iPey6bFDq6i04l22Tz4+p1hN5yR7dAzQ=; b=y4slqEFWU+Q56WFpSvz9GYR+kgk3OpuqFa7hXXVXgUY4D+GLtAZ64KSrIW/TtrFbx+ Ttm/2HHXZ2iV2HlVCQcnKYA6X74m+8KfdeF4X2Zq01J6RcEC7pSSJDDVUjHAS1WB5K2L UDm8tNHFyAPup8vTxmLLNBZ/YtD9fso5rDywravnZglCvxVGymHJSrXLZLsDg27Qrviw GnBdaBZa+uKlE/BWilWyVq3fXYPgFIafV8aFjA98TLZ5UJTF0n8eX3MEJNt30Z+QKJbU h3hTH75LFTvvjw/8xijrk82kEJVtw+592RncY17hu+mthN3gvVPR5sK3gh3px7oCzz8k 0Zlw== MIME-Version: 1.0 X-Received: by 10.55.55.82 with SMTP id e79mr20481279qka.59.1445548936355; Thu, 22 Oct 2015 14:22:16 -0700 (PDT) Received: by 10.140.88.209 with HTTP; Thu, 22 Oct 2015 14:22:16 -0700 (PDT) In-Reply-To: <201510222113.t9MLDaw2051414@repo.freebsd.org> References: <201510222113.t9MLDaw2051414@repo.freebsd.org> Date: Thu, 22 Oct 2015 14:22:16 -0700 Message-ID: Subject: Re: svn commit: r289767 - head/usr.sbin/mptable From: NGie Cooper To: Baptiste Daroussin Cc: "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: Thu, 22 Oct 2015 21:22:17 -0000 On Thu, Oct 22, 2015 at 2:13 PM, Baptiste Daroussin wrote: > Author: bapt > Date: Thu Oct 22 21:13:35 2015 > New Revision: 289767 > URL: https://svnweb.freebsd.org/changeset/base/289767 > > Log: > Stop suggesting -grope argument when -grope argument was actually given -grope is a weird option name... and it sounds like something I really wouldn't want to describe to my boss. From owner-svn-src-all@freebsd.org Thu Oct 22 21:23: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 A9988A1CDC1; Thu, 22 Oct 2015 21:23:59 +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 73B10E40; Thu, 22 Oct 2015 21:23:59 +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 t9MLNwtq055523; Thu, 22 Oct 2015 21:23:58 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MLNwOm055522; Thu, 22 Oct 2015 21:23:58 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510222123.t9MLNwOm055522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 22 Oct 2015 21:23:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289768 - head/sys/amd64/linux32 X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 21:23:59 -0000 Author: jhb Date: Thu Oct 22 21:23:58 2015 New Revision: 289768 URL: https://svnweb.freebsd.org/changeset/base/289768 Log: Merge r289055 to amd64/linux32: linux: fix handling of out-of-bounds syscall attempts Due to an off by one the code would read an entry past the table, as opposed to the last entry which contains the nosys handler. Modified: head/sys/amd64/linux32/linux32_sysvec.c Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Thu Oct 22 21:13:35 2015 (r289767) +++ head/sys/amd64/linux32/linux32_sysvec.c Thu Oct 22 21:23:58 2015 (r289768) @@ -741,7 +741,7 @@ linux32_fetch_syscall_args(struct thread if (sa->code >= p->p_sysent->sv_size) /* nosys */ - sa->callp = &p->p_sysent->sv_table[LINUX_SYS_MAXSYSCALL]; + sa->callp = &p->p_sysent->sv_table[p->p_sysent->sv_size - 1]; else sa->callp = &p->p_sysent->sv_table[sa->code]; sa->narg = sa->callp->sy_narg; From owner-svn-src-all@freebsd.org Thu Oct 22 21:24: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 382FEA1CDFF; Thu, 22 Oct 2015 21:24:20 +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 226C1F8D; Thu, 22 Oct 2015 21:24:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 1B1B313C8; Thu, 22 Oct 2015 21:24:20 +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 BCBC512D93; Thu, 22 Oct 2015 21:24:19 +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 r697K9Bwj1bx; Thu, 22 Oct 2015 21:24:17 +0000 (UTC) Subject: Re: svn commit: r289767 - head/usr.sbin/mptable DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 1A29D12D8D To: NGie Cooper , Baptiste Daroussin References: <201510222113.t9MLDaw2051414@repo.freebsd.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Bryan Drewery Organization: FreeBSD Message-ID: <562953FE.8070706@FreeBSD.org> Date: Thu, 22 Oct 2015 14:24:14 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 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: Thu, 22 Oct 2015 21:24:20 -0000 On 10/22/15 2:22 PM, NGie Cooper wrote: > On Thu, Oct 22, 2015 at 2:13 PM, Baptiste Daroussin wrote: >> Author: bapt >> Date: Thu Oct 22 21:13:35 2015 >> New Revision: 289767 >> URL: https://svnweb.freebsd.org/changeset/base/289767 >> >> Log: >> Stop suggesting -grope argument when -grope argument was actually given > > -grope is a weird option name... and it sounds like something I really > wouldn't want to describe to my boss. > I *may* have violated the CoC due to this commit already. Yay. -- Regards, Bryan Drewery From owner-svn-src-all@freebsd.org Thu Oct 22 21:28: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 35FE0A1CEA6; Thu, 22 Oct 2015 21:28:23 +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 E3DF11161; Thu, 22 Oct 2015 21:28:22 +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 t9MLSLhp056155; Thu, 22 Oct 2015 21:28:21 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MLSLpI056145; Thu, 22 Oct 2015 21:28:21 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510222128.t9MLSLpI056145@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 22 Oct 2015 21:28:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289769 - in head/sys: amd64/linux amd64/linux32 cddl/dev/systrace kern modules/dtrace modules/dtrace/systrace_linux modules/dtrace/systrace_linux32 X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 21:28:23 -0000 Author: jhb Date: Thu Oct 22 21:28:20 2015 New Revision: 289769 URL: https://svnweb.freebsd.org/changeset/base/289769 Log: Rename remaining linux32 symbols such as linux_sysent[] and linux_syscallnames[] from linux_* to linux32_* to avoid conflicts with linux64.ko. While here, add support for linux64 binaries to systrace. - Update NOPROTO entries in amd64/linux/syscalls.master to match the main table to fix systrace build. - Add a special case for union l_semun arguments to the systrace generation. - The systrace_linux32 module now only builds the systrace_linux32.ko. module on amd64. - Add a new systrace_linux module that builds on both i386 and amd64. For i386 it builds the existing systrace_linux.ko. For amd64 it builds a systrace_linux.ko for 64-bit binaries. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D3954 Added: head/sys/modules/dtrace/systrace_linux/ head/sys/modules/dtrace/systrace_linux/Makefile - copied, changed from r289767, head/sys/modules/dtrace/systrace_linux32/Makefile Modified: head/sys/amd64/linux/syscalls.master head/sys/amd64/linux32/linux32_sysvec.c head/sys/amd64/linux32/syscalls.conf head/sys/amd64/linux32/syscalls.master head/sys/cddl/dev/systrace/systrace.c head/sys/kern/makesyscalls.sh head/sys/modules/dtrace/Makefile head/sys/modules/dtrace/systrace_linux32/Makefile Modified: head/sys/amd64/linux/syscalls.master ============================================================================== --- head/sys/amd64/linux/syscalls.master Thu Oct 22 21:23:58 2015 (r289768) +++ head/sys/amd64/linux/syscalls.master Thu Oct 22 21:28:20 2015 (r289769) @@ -49,8 +49,8 @@ struct l_newstat *buf); } 6 AUE_LSTAT STD { int linux_newlstat(char *path, \ struct l_newstat *buf); } -7 AUE_POLL NOPROTO { int poll(struct pollfd*, \ - unsigned int nfds, int timeout); } +7 AUE_POLL NOPROTO { int poll(struct pollfd *fds, u_int nfds, \ + int timeout); } 8 AUE_LSEEK STD { int linux_lseek(l_uint fdes, l_off_t off, \ l_int whence); } 9 AUE_MMAP STD { int linux_mmap2(l_ulong addr, l_ulong len, \ @@ -316,7 +316,7 @@ 161 AUE_CHROOT NOPROTO { int chroot(char *path); } 162 AUE_SYNC NOPROTO { int sync(void); } 163 AUE_ACCT NOPROTO { int acct(char *path); } -164 AUE_SETTIMEOFDAY NOPROTO { int settimeofday(struct l_timeval *tp, struct timezone *tzp); } +164 AUE_SETTIMEOFDAY NOPROTO { int settimeofday(struct l_timeval *tv, struct timezone *tzp); } 165 AUE_MOUNT STD { int linux_mount(char *specialfile, \ char *dir, char *filesystemtype, \ l_ulong rwflag, void *data); } Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Thu Oct 22 21:23:58 2015 (r289768) +++ head/sys/amd64/linux32/linux32_sysvec.c Thu Oct 22 21:28:20 2015 (r289769) @@ -115,7 +115,7 @@ static char *linux_shared_page_mapping; extern char _binary_linux32_locore_o_start; extern char _binary_linux32_locore_o_end; -extern struct sysent linux_sysent[LINUX_SYS_MAXSYSCALL]; +extern struct sysent linux32_sysent[LINUX32_SYS_MAXSYSCALL]; SET_DECLARE(linux_ioctl_handler_set, struct linux_ioctl_handler); @@ -1008,8 +1008,8 @@ linux32_fixlimit(struct rlimit *rl, int } struct sysentvec elf_linux_sysvec = { - .sv_size = LINUX_SYS_MAXSYSCALL, - .sv_table = linux_sysent, + .sv_size = LINUX32_SYS_MAXSYSCALL, + .sv_table = linux32_sysent, .sv_mask = 0, .sv_sigsize = 0, .sv_sigtbl = NULL, Modified: head/sys/amd64/linux32/syscalls.conf ============================================================================== --- head/sys/amd64/linux32/syscalls.conf Thu Oct 22 21:23:58 2015 (r289768) +++ head/sys/amd64/linux32/syscalls.conf Thu Oct 22 21:28:20 2015 (r289769) @@ -1,11 +1,11 @@ # $FreeBSD$ sysnames="linux32_syscalls.c" sysproto="linux32_proto.h" -sysproto_h=_LINUX_SYSPROTO_H_ +sysproto_h=_LINUX32_SYSPROTO_H_ syshdr="linux32_syscall.h" syssw="linux32_sysent.c" sysmk="/dev/null" -syscallprefix="LINUX_SYS_" -switchname="linux_sysent" -namesname="linux_syscallnames" +syscallprefix="LINUX32_SYS_" +switchname="linux32_sysent" +namesname="linux32_syscallnames" systrace="linux32_systrace_args.c" Modified: head/sys/amd64/linux32/syscalls.master ============================================================================== --- head/sys/amd64/linux32/syscalls.master Thu Oct 22 21:23:58 2015 (r289768) +++ head/sys/amd64/linux32/syscalls.master Thu Oct 22 21:28:20 2015 (r289769) @@ -2,7 +2,7 @@ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 ; System call name/number master file (or rather, slave, from LINUX). -; Processed to create linux_sysent.c, linux_proto.h and linux_syscall.h. +; Processed to create linux32_sysent.c, linux32_proto.h and linux32_syscall.h. ; Columns: number audit type nargs name alt{name,tag,rtyp}/comments ; number system call number, must be in order Modified: head/sys/cddl/dev/systrace/systrace.c ============================================================================== --- head/sys/cddl/dev/systrace/systrace.c Thu Oct 22 21:23:58 2015 (r289768) +++ head/sys/cddl/dev/systrace/systrace.c Thu Oct 22 21:28:20 2015 (r289769) @@ -60,24 +60,37 @@ #ifdef LINUX_SYSTRACE #if defined(__amd64__) -#include -#include -#include -#include -#define MODNAME "linux32" +#include +#include +#include +#include #elif defined(__i386__) #include #include #include #include -#define MODNAME "linux" #else #error Only i386 and amd64 are supported. #endif +#define MODNAME "linux" extern struct sysent linux_sysent[]; #define MAXSYSCALL LINUX_SYS_MAXSYSCALL #define SYSCALLNAMES linux_syscallnames #define SYSENT linux_sysent +#elif defined(LINUX32_SYSTRACE) +#if defined(__amd64__) +#include +#include +#include +#include +#else +#error Only amd64 is supported. +#endif +#define MODNAME "linux32" +extern struct sysent linux32_sysent[]; +#define MAXSYSCALL LINUX32_SYS_MAXSYSCALL +#define SYSCALLNAMES linux32_syscallnames +#define SYSENT linux32_sysent #elif defined(FREEBSD32_SYSTRACE) /* * The syscall arguments are processed into a DTrace argument array @@ -103,6 +116,7 @@ extern const char *freebsd32_syscallname #define MAXSYSCALL SYS_MAXSYSCALL #define SYSCALLNAMES syscallnames #define SYSENT sysent +#define NATIVE_ABI #endif #define PROVNAME "syscall" @@ -132,7 +146,7 @@ static void systrace_load(void *); static struct cdevsw systrace_cdevsw = { .d_version = D_VERSION, .d_open = systrace_open, -#ifdef LINUX_SYSTRACE +#ifndef NATIVE_ABI .d_name = "systrace_" MODNAME, #else .d_name = "systrace", @@ -171,7 +185,7 @@ static dtrace_provider_id_t systrace_id; typedef void (*systrace_dtrace_probe_t)(dtrace_id_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); -#if !defined(LINUX_SYSTRACE) +#ifdef NATIVE_ABI /* * Probe callback function. * @@ -314,7 +328,7 @@ systrace_load(void *dummy) NULL, &systrace_pops, NULL, &systrace_id) != 0) return; -#if !defined(LINUX_SYSTRACE) +#ifdef NATIVE_ABI systrace_probe_func = systrace_probe; #endif } @@ -328,7 +342,7 @@ systrace_unload() if ((error = dtrace_unregister(systrace_id)) != 0) return (error); -#if !defined(LINUX_SYSTRACE) +#ifdef NATIVE_ABI systrace_probe_func = NULL; #endif @@ -370,6 +384,16 @@ SYSINIT(systrace_load, SI_SUB_DTRACE_PRO SYSUNINIT(systrace_unload, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, systrace_unload, NULL); #ifdef LINUX_SYSTRACE +DEV_MODULE(systrace_linux, systrace_modevent, NULL); +MODULE_VERSION(systrace_linux, 1); +#ifdef __amd64__ +MODULE_DEPEND(systrace_linux, linux64, 1, 1, 1); +#else +MODULE_DEPEND(systrace_linux, linux, 1, 1, 1); +#endif +MODULE_DEPEND(systrace_linux, dtrace, 1, 1, 1); +MODULE_DEPEND(systrace_linux, opensolaris, 1, 1, 1); +#elif defined(LINUX32_SYSTRACE) DEV_MODULE(systrace_linux32, systrace_modevent, NULL); MODULE_VERSION(systrace_linux32, 1); MODULE_DEPEND(systrace_linux32, linux, 1, 1, 1); Modified: head/sys/kern/makesyscalls.sh ============================================================================== --- head/sys/kern/makesyscalls.sh Thu Oct 22 21:23:58 2015 (r289768) +++ head/sys/kern/makesyscalls.sh Thu Oct 22 21:28:20 2015 (r289769) @@ -411,6 +411,10 @@ s/\$//g printf("\t\tuarg[%d] = (intptr_t) p->%s; /* %s */\n", \ i - 1, \ argname[i], arg) > systrace + else if (arg == "union l_semun") + printf("\t\tuarg[%d] = p->%s.buf; /* %s */\n", \ + i - 1, \ + argname[i], arg) > systrace else if (substr(arg, 1, 1) == "u" || arg == "size_t") printf("\t\tuarg[%d] = p->%s; /* %s */\n", \ i - 1, \ Modified: head/sys/modules/dtrace/Makefile ============================================================================== --- head/sys/modules/dtrace/Makefile Thu Oct 22 21:23:58 2015 (r289768) +++ head/sys/modules/dtrace/Makefile Thu Oct 22 21:28:20 2015 (r289769) @@ -13,7 +13,10 @@ SUBDIR= dtmalloc \ systrace .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" -SUBDIR+= fasttrap fbt systrace_linux32 +SUBDIR+= fasttrap fbt systrace_linux +.endif +.if ${MACHINE_CPUARCH} == "amd64" +SUBDIR+= systrace_linux32 .endif .if ${MACHINE_CPUARCH} == "powerpc" SUBDIR+= fbt fasttrap Copied and modified: head/sys/modules/dtrace/systrace_linux/Makefile (from r289767, head/sys/modules/dtrace/systrace_linux32/Makefile) ============================================================================== --- head/sys/modules/dtrace/systrace_linux32/Makefile Thu Oct 22 21:13:35 2015 (r289767, copy source) +++ head/sys/modules/dtrace/systrace_linux/Makefile Thu Oct 22 21:28:20 2015 (r289769) @@ -4,11 +4,7 @@ SYSDIR?= ${.CURDIR}/../../.. .PATH: ${SYSDIR}/cddl/dev/systrace -.if ${MACHINE} == "amd64" -KMOD= systrace_linux32 -.else KMOD= systrace_linux -.endif SRCS= systrace.c SRCS+= vnode_if.h Modified: head/sys/modules/dtrace/systrace_linux32/Makefile ============================================================================== --- head/sys/modules/dtrace/systrace_linux32/Makefile Thu Oct 22 21:23:58 2015 (r289768) +++ head/sys/modules/dtrace/systrace_linux32/Makefile Thu Oct 22 21:28:20 2015 (r289769) @@ -4,18 +4,14 @@ SYSDIR?= ${.CURDIR}/../../.. .PATH: ${SYSDIR}/cddl/dev/systrace -.if ${MACHINE} == "amd64" KMOD= systrace_linux32 -.else -KMOD= systrace_linux -.endif SRCS= systrace.c SRCS+= vnode_if.h CFLAGS+= -I${SYSDIR}/cddl/compat/opensolaris \ -I${SYSDIR}/cddl/contrib/opensolaris/uts/common \ - -I${SYSDIR} -DLINUX_SYSTRACE + -I${SYSDIR} -DLINUX32_SYSTRACE .include From owner-svn-src-all@freebsd.org Thu Oct 22 21:30: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 CAEDFA1CF1D; Thu, 22 Oct 2015 21:30:41 +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 88FB812FE; Thu, 22 Oct 2015 21:30:41 +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 t9MLUegj057117; Thu, 22 Oct 2015 21:30:40 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MLUeVS057110; Thu, 22 Oct 2015 21:30:40 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510222130.t9MLUeVS057110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 22 Oct 2015 21:30:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289770 - 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: Thu, 22 Oct 2015 21:30:42 -0000 Author: jhb Date: Thu Oct 22 21:30:39 2015 New Revision: 289770 URL: https://svnweb.freebsd.org/changeset/base/289770 Log: Missing regen after last change to sys/kern/syscalls.master. Modified: head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Thu Oct 22 21:28:20 2015 (r289769) +++ head/sys/kern/init_sysent.c Thu Oct 22 21:30:39 2015 (r289770) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 281714 2015-04-18 21:50:13Z kib + * created from FreeBSD: head/sys/kern/syscalls.master 285388 2015-07-11 15:22:11Z adrian */ #include "opt_compat.h" Modified: head/sys/kern/syscalls.c ============================================================================== --- head/sys/kern/syscalls.c Thu Oct 22 21:28:20 2015 (r289769) +++ head/sys/kern/syscalls.c Thu Oct 22 21:30:39 2015 (r289770) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 281714 2015-04-18 21:50:13Z kib + * created from FreeBSD: head/sys/kern/syscalls.master 285388 2015-07-11 15:22:11Z adrian */ const char *syscallnames[] = { Modified: head/sys/sys/syscall.h ============================================================================== --- head/sys/sys/syscall.h Thu Oct 22 21:28:20 2015 (r289769) +++ head/sys/sys/syscall.h Thu Oct 22 21:30:39 2015 (r289770) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 281714 2015-04-18 21:50:13Z kib + * created from FreeBSD: head/sys/kern/syscalls.master 285388 2015-07-11 15:22:11Z adrian */ #define SYS_syscall 0 Modified: head/sys/sys/syscall.mk ============================================================================== --- head/sys/sys/syscall.mk Thu Oct 22 21:28:20 2015 (r289769) +++ head/sys/sys/syscall.mk Thu Oct 22 21:30:39 2015 (r289770) @@ -1,7 +1,7 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: head/sys/kern/syscalls.master 281714 2015-04-18 21:50:13Z kib +# created from FreeBSD: head/sys/kern/syscalls.master 285388 2015-07-11 15:22:11Z adrian MIASM = \ syscall.o \ exit.o \ Modified: head/sys/sys/sysproto.h ============================================================================== --- head/sys/sys/sysproto.h Thu Oct 22 21:28:20 2015 (r289769) +++ head/sys/sys/sysproto.h Thu Oct 22 21:30:39 2015 (r289770) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 281714 2015-04-18 21:50:13Z kib + * created from FreeBSD: head/sys/kern/syscalls.master 285388 2015-07-11 15:22:11Z adrian */ #ifndef _SYS_SYSPROTO_H_ From owner-svn-src-all@freebsd.org Thu Oct 22 21:33: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 2F004A1C116; Thu, 22 Oct 2015 21:33:40 +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 CE15A1988; Thu, 22 Oct 2015 21:33:39 +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 t9MLXcuf059479; Thu, 22 Oct 2015 21:33:38 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MLXcY4059471; Thu, 22 Oct 2015 21:33:38 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510222133.t9MLXcY4059471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 22 Oct 2015 21:33:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289771 - in head/sys/amd64: linux linux32 X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 21:33:40 -0000 Author: jhb Date: Thu Oct 22 21:33:37 2015 New Revision: 289771 URL: https://svnweb.freebsd.org/changeset/base/289771 Log: Regen for linux32 rename and linux64 systrace. Modified: head/sys/amd64/linux/linux_proto.h head/sys/amd64/linux/linux_syscall.h head/sys/amd64/linux/linux_syscalls.c head/sys/amd64/linux/linux_sysent.c head/sys/amd64/linux/linux_systrace_args.c head/sys/amd64/linux32/linux32_proto.h head/sys/amd64/linux32/linux32_syscall.h head/sys/amd64/linux32/linux32_syscalls.c head/sys/amd64/linux32/linux32_sysent.c Modified: head/sys/amd64/linux/linux_proto.h ============================================================================== --- head/sys/amd64/linux/linux_proto.h Thu Oct 22 21:30:39 2015 (r289770) +++ head/sys/amd64/linux/linux_proto.h Thu Oct 22 21:33:37 2015 (r289771) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux/syscalls.master 283492 2015-05-24 18:08:01Z dchagin + * created from FreeBSD: head/sys/amd64/linux/syscalls.master 289769 2015-10-22 21:28:20Z jhb */ #ifndef _LINUX_SYSPROTO_H_ Modified: head/sys/amd64/linux/linux_syscall.h ============================================================================== --- head/sys/amd64/linux/linux_syscall.h Thu Oct 22 21:30:39 2015 (r289770) +++ head/sys/amd64/linux/linux_syscall.h Thu Oct 22 21:33:37 2015 (r289771) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux/syscalls.master 283492 2015-05-24 18:08:01Z dchagin + * created from FreeBSD: head/sys/amd64/linux/syscalls.master 289769 2015-10-22 21:28:20Z jhb */ #define LINUX_SYS_read 0 Modified: head/sys/amd64/linux/linux_syscalls.c ============================================================================== --- head/sys/amd64/linux/linux_syscalls.c Thu Oct 22 21:30:39 2015 (r289770) +++ head/sys/amd64/linux/linux_syscalls.c Thu Oct 22 21:33:37 2015 (r289771) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux/syscalls.master 283492 2015-05-24 18:08:01Z dchagin + * created from FreeBSD: head/sys/amd64/linux/syscalls.master 289769 2015-10-22 21:28:20Z jhb */ const char *linux_syscallnames[] = { Modified: head/sys/amd64/linux/linux_sysent.c ============================================================================== --- head/sys/amd64/linux/linux_sysent.c Thu Oct 22 21:30:39 2015 (r289770) +++ head/sys/amd64/linux/linux_sysent.c Thu Oct 22 21:33:37 2015 (r289771) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux/syscalls.master 283492 2015-05-24 18:08:01Z dchagin + * created from FreeBSD: head/sys/amd64/linux/syscalls.master 289769 2015-10-22 21:28:20Z jhb */ #include Modified: head/sys/amd64/linux/linux_systrace_args.c ============================================================================== --- head/sys/amd64/linux/linux_systrace_args.c Thu Oct 22 21:30:39 2015 (r289770) +++ head/sys/amd64/linux/linux_systrace_args.c Thu Oct 22 21:33:37 2015 (r289771) @@ -73,8 +73,8 @@ systrace_args(int sysnum, void *params, /* poll */ case 7: { struct poll_args *p = params; - iarg[0] = p->*; /* struct pollfd */ - uarg[1] = p->nfds; /* unsigned int */ + uarg[0] = (intptr_t) p->fds; /* struct pollfd * */ + uarg[1] = p->nfds; /* u_int */ iarg[2] = p->timeout; /* int */ *n_args = 3; break; @@ -591,7 +591,7 @@ systrace_args(int sysnum, void *params, iarg[0] = p->semid; /* l_int */ iarg[1] = p->semnum; /* l_int */ iarg[2] = p->cmd; /* l_int */ - uarg[3] = p->arg; /* union l_semun */ + uarg[3] = p->arg.buf; /* union l_semun */ *n_args = 4; break; } @@ -1327,7 +1327,7 @@ systrace_args(int sysnum, void *params, /* settimeofday */ case 164: { struct settimeofday_args *p = params; - uarg[0] = (intptr_t) p->tp; /* struct l_timeval * */ + uarg[0] = (intptr_t) p->tv; /* struct l_timeval * */ uarg[1] = (intptr_t) p->tzp; /* struct timezone * */ *n_args = 2; break; @@ -2380,10 +2380,10 @@ systrace_entry_setargdesc(int sysnum, in case 7: switch(ndx) { case 0: - p = "struct pollfd"; + p = "struct pollfd *"; break; case 1: - p = "unsigned int"; + p = "u_int"; break; case 2: p = "int"; Modified: head/sys/amd64/linux32/linux32_proto.h ============================================================================== --- head/sys/amd64/linux32/linux32_proto.h Thu Oct 22 21:30:39 2015 (r289770) +++ head/sys/amd64/linux32/linux32_proto.h Thu Oct 22 21:33:37 2015 (r289771) @@ -3,11 +3,11 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 283492 2015-05-24 18:08:01Z dchagin + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 289769 2015-10-22 21:28:20Z jhb */ -#ifndef _LINUX_SYSPROTO_H_ -#define _LINUX_SYSPROTO_H_ +#ifndef _LINUX32_SYSPROTO_H_ +#define _LINUX32_SYSPROTO_H_ #include #include @@ -1464,286 +1464,286 @@ int linux_process_vm_writev(struct threa #endif /* COMPAT_FREEBSD7 */ -#define LINUX_SYS_AUE_linux_exit AUE_EXIT -#define LINUX_SYS_AUE_linux_fork AUE_FORK -#define LINUX_SYS_AUE_linux_open AUE_OPEN_RWTC -#define LINUX_SYS_AUE_linux_waitpid AUE_WAIT4 -#define LINUX_SYS_AUE_linux_creat AUE_CREAT -#define LINUX_SYS_AUE_linux_link AUE_LINK -#define LINUX_SYS_AUE_linux_unlink AUE_UNLINK -#define LINUX_SYS_AUE_linux_execve AUE_EXECVE -#define LINUX_SYS_AUE_linux_chdir AUE_CHDIR -#define LINUX_SYS_AUE_linux_time AUE_NULL -#define LINUX_SYS_AUE_linux_mknod AUE_MKNOD -#define LINUX_SYS_AUE_linux_chmod AUE_CHMOD -#define LINUX_SYS_AUE_linux_lchown16 AUE_LCHOWN -#define LINUX_SYS_AUE_linux_stat AUE_STAT -#define LINUX_SYS_AUE_linux_lseek AUE_LSEEK -#define LINUX_SYS_AUE_linux_getpid AUE_GETPID -#define LINUX_SYS_AUE_linux_mount AUE_MOUNT -#define LINUX_SYS_AUE_linux_oldumount AUE_UMOUNT -#define LINUX_SYS_AUE_linux_setuid16 AUE_SETUID -#define LINUX_SYS_AUE_linux_getuid16 AUE_GETUID -#define LINUX_SYS_AUE_linux_stime AUE_SETTIMEOFDAY -#define LINUX_SYS_AUE_linux_ptrace AUE_PTRACE -#define LINUX_SYS_AUE_linux_alarm AUE_NULL -#define LINUX_SYS_AUE_linux_pause AUE_NULL -#define LINUX_SYS_AUE_linux_utime AUE_UTIME -#define LINUX_SYS_AUE_linux_access AUE_ACCESS -#define LINUX_SYS_AUE_linux_nice AUE_NICE -#define LINUX_SYS_AUE_linux_kill AUE_KILL -#define LINUX_SYS_AUE_linux_rename AUE_RENAME -#define LINUX_SYS_AUE_linux_mkdir AUE_MKDIR -#define LINUX_SYS_AUE_linux_rmdir AUE_RMDIR -#define LINUX_SYS_AUE_linux_pipe AUE_PIPE -#define LINUX_SYS_AUE_linux_times AUE_NULL -#define LINUX_SYS_AUE_linux_brk AUE_NULL -#define LINUX_SYS_AUE_linux_setgid16 AUE_SETGID -#define LINUX_SYS_AUE_linux_getgid16 AUE_GETGID -#define LINUX_SYS_AUE_linux_signal AUE_NULL -#define LINUX_SYS_AUE_linux_geteuid16 AUE_GETEUID -#define LINUX_SYS_AUE_linux_getegid16 AUE_GETEGID -#define LINUX_SYS_AUE_linux_umount AUE_UMOUNT -#define LINUX_SYS_AUE_linux_ioctl AUE_IOCTL -#define LINUX_SYS_AUE_linux_fcntl AUE_FCNTL -#define LINUX_SYS_AUE_linux_olduname AUE_NULL -#define LINUX_SYS_AUE_linux_ustat AUE_NULL -#define LINUX_SYS_AUE_linux_getppid AUE_GETPPID -#define LINUX_SYS_AUE_linux_sigaction AUE_NULL -#define LINUX_SYS_AUE_linux_sgetmask AUE_NULL -#define LINUX_SYS_AUE_linux_ssetmask AUE_NULL -#define LINUX_SYS_AUE_linux_setreuid16 AUE_SETREUID -#define LINUX_SYS_AUE_linux_setregid16 AUE_SETREGID -#define LINUX_SYS_AUE_linux_sigsuspend AUE_NULL -#define LINUX_SYS_AUE_linux_sigpending AUE_NULL -#define LINUX_SYS_AUE_linux_sethostname AUE_SYSCTL -#define LINUX_SYS_AUE_linux_setrlimit AUE_SETRLIMIT -#define LINUX_SYS_AUE_linux_old_getrlimit AUE_GETRLIMIT -#define LINUX_SYS_AUE_linux_getrusage AUE_GETRUSAGE -#define LINUX_SYS_AUE_linux_gettimeofday AUE_NULL -#define LINUX_SYS_AUE_linux_settimeofday AUE_SETTIMEOFDAY -#define LINUX_SYS_AUE_linux_getgroups16 AUE_GETGROUPS -#define LINUX_SYS_AUE_linux_setgroups16 AUE_SETGROUPS -#define LINUX_SYS_AUE_linux_old_select AUE_SELECT -#define LINUX_SYS_AUE_linux_symlink AUE_SYMLINK -#define LINUX_SYS_AUE_linux_lstat AUE_LSTAT -#define LINUX_SYS_AUE_linux_readlink AUE_READLINK -#define LINUX_SYS_AUE_linux_reboot AUE_REBOOT -#define LINUX_SYS_AUE_linux_readdir AUE_GETDIRENTRIES -#define LINUX_SYS_AUE_linux_mmap AUE_MMAP -#define LINUX_SYS_AUE_linux_truncate AUE_TRUNCATE -#define LINUX_SYS_AUE_linux_ftruncate AUE_FTRUNCATE -#define LINUX_SYS_AUE_linux_getpriority AUE_GETPRIORITY -#define LINUX_SYS_AUE_linux_statfs AUE_STATFS -#define LINUX_SYS_AUE_linux_fstatfs AUE_FSTATFS -#define LINUX_SYS_AUE_linux_socketcall AUE_NULL -#define LINUX_SYS_AUE_linux_syslog AUE_NULL -#define LINUX_SYS_AUE_linux_setitimer AUE_SETITIMER -#define LINUX_SYS_AUE_linux_getitimer AUE_GETITIMER -#define LINUX_SYS_AUE_linux_newstat AUE_STAT -#define LINUX_SYS_AUE_linux_newlstat AUE_LSTAT -#define LINUX_SYS_AUE_linux_newfstat AUE_FSTAT -#define LINUX_SYS_AUE_linux_uname AUE_NULL -#define LINUX_SYS_AUE_linux_iopl AUE_NULL -#define LINUX_SYS_AUE_linux_vhangup AUE_NULL -#define LINUX_SYS_AUE_linux_wait4 AUE_WAIT4 -#define LINUX_SYS_AUE_linux_swapoff AUE_SWAPOFF -#define LINUX_SYS_AUE_linux_sysinfo AUE_NULL -#define LINUX_SYS_AUE_linux_ipc AUE_NULL -#define LINUX_SYS_AUE_linux_sigreturn AUE_SIGRETURN -#define LINUX_SYS_AUE_linux_clone AUE_RFORK -#define LINUX_SYS_AUE_linux_setdomainname AUE_SYSCTL -#define LINUX_SYS_AUE_linux_newuname AUE_NULL -#define LINUX_SYS_AUE_linux_adjtimex AUE_ADJTIME -#define LINUX_SYS_AUE_linux_mprotect AUE_MPROTECT -#define LINUX_SYS_AUE_linux_sigprocmask AUE_SIGPROCMASK -#define LINUX_SYS_AUE_linux_create_module AUE_NULL -#define LINUX_SYS_AUE_linux_init_module AUE_NULL -#define LINUX_SYS_AUE_linux_delete_module AUE_NULL -#define LINUX_SYS_AUE_linux_get_kernel_syms AUE_NULL -#define LINUX_SYS_AUE_linux_quotactl AUE_QUOTACTL -#define LINUX_SYS_AUE_linux_bdflush AUE_BDFLUSH -#define LINUX_SYS_AUE_linux_sysfs AUE_NULL -#define LINUX_SYS_AUE_linux_personality AUE_PERSONALITY -#define LINUX_SYS_AUE_linux_setfsuid16 AUE_SETFSUID -#define LINUX_SYS_AUE_linux_setfsgid16 AUE_SETFSGID -#define LINUX_SYS_AUE_linux_llseek AUE_LSEEK -#define LINUX_SYS_AUE_linux_getdents AUE_GETDIRENTRIES -#define LINUX_SYS_AUE_linux_select AUE_SELECT -#define LINUX_SYS_AUE_linux_msync AUE_MSYNC -#define LINUX_SYS_AUE_linux_readv AUE_READV -#define LINUX_SYS_AUE_linux_writev AUE_WRITEV -#define LINUX_SYS_AUE_linux_getsid AUE_GETSID -#define LINUX_SYS_AUE_linux_fdatasync AUE_NULL -#define LINUX_SYS_AUE_linux_sysctl AUE_SYSCTL -#define LINUX_SYS_AUE_linux_sched_setparam AUE_SCHED_SETPARAM -#define LINUX_SYS_AUE_linux_sched_getparam AUE_SCHED_GETPARAM -#define LINUX_SYS_AUE_linux_sched_setscheduler AUE_SCHED_SETSCHEDULER -#define LINUX_SYS_AUE_linux_sched_getscheduler AUE_SCHED_GETSCHEDULER -#define LINUX_SYS_AUE_linux_sched_get_priority_max AUE_SCHED_GET_PRIORITY_MAX -#define LINUX_SYS_AUE_linux_sched_get_priority_min AUE_SCHED_GET_PRIORITY_MIN -#define LINUX_SYS_AUE_linux_sched_rr_get_interval AUE_SCHED_RR_GET_INTERVAL -#define LINUX_SYS_AUE_linux_nanosleep AUE_NULL -#define LINUX_SYS_AUE_linux_mremap AUE_NULL -#define LINUX_SYS_AUE_linux_setresuid16 AUE_SETRESUID -#define LINUX_SYS_AUE_linux_getresuid16 AUE_GETRESUID -#define LINUX_SYS_AUE_linux_query_module AUE_NULL -#define LINUX_SYS_AUE_linux_nfsservctl AUE_NULL -#define LINUX_SYS_AUE_linux_setresgid16 AUE_SETRESGID -#define LINUX_SYS_AUE_linux_getresgid16 AUE_GETRESGID -#define LINUX_SYS_AUE_linux_prctl AUE_PRCTL -#define LINUX_SYS_AUE_linux_rt_sigreturn AUE_NULL -#define LINUX_SYS_AUE_linux_rt_sigaction AUE_NULL -#define LINUX_SYS_AUE_linux_rt_sigprocmask AUE_NULL -#define LINUX_SYS_AUE_linux_rt_sigpending AUE_NULL -#define LINUX_SYS_AUE_linux_rt_sigtimedwait AUE_NULL -#define LINUX_SYS_AUE_linux_rt_sigqueueinfo AUE_NULL -#define LINUX_SYS_AUE_linux_rt_sigsuspend AUE_NULL -#define LINUX_SYS_AUE_linux_pread AUE_PREAD -#define LINUX_SYS_AUE_linux_pwrite AUE_PWRITE -#define LINUX_SYS_AUE_linux_chown16 AUE_CHOWN -#define LINUX_SYS_AUE_linux_getcwd AUE_GETCWD -#define LINUX_SYS_AUE_linux_capget AUE_CAPGET -#define LINUX_SYS_AUE_linux_capset AUE_CAPSET -#define LINUX_SYS_AUE_linux_sigaltstack AUE_NULL -#define LINUX_SYS_AUE_linux_sendfile AUE_SENDFILE -#define LINUX_SYS_AUE_linux_vfork AUE_VFORK -#define LINUX_SYS_AUE_linux_getrlimit AUE_GETRLIMIT -#define LINUX_SYS_AUE_linux_mmap2 AUE_MMAP -#define LINUX_SYS_AUE_linux_truncate64 AUE_TRUNCATE -#define LINUX_SYS_AUE_linux_ftruncate64 AUE_FTRUNCATE -#define LINUX_SYS_AUE_linux_stat64 AUE_STAT -#define LINUX_SYS_AUE_linux_lstat64 AUE_LSTAT -#define LINUX_SYS_AUE_linux_fstat64 AUE_FSTAT -#define LINUX_SYS_AUE_linux_lchown AUE_LCHOWN -#define LINUX_SYS_AUE_linux_getuid AUE_GETUID -#define LINUX_SYS_AUE_linux_getgid AUE_GETGID -#define LINUX_SYS_AUE_linux_getgroups AUE_GETGROUPS -#define LINUX_SYS_AUE_linux_setgroups AUE_SETGROUPS -#define LINUX_SYS_AUE_linux_chown AUE_CHOWN -#define LINUX_SYS_AUE_linux_setfsuid AUE_SETFSUID -#define LINUX_SYS_AUE_linux_setfsgid AUE_SETFSGID -#define LINUX_SYS_AUE_linux_pivot_root AUE_PIVOT_ROOT -#define LINUX_SYS_AUE_linux_mincore AUE_MINCORE -#define LINUX_SYS_AUE_linux_getdents64 AUE_GETDIRENTRIES -#define LINUX_SYS_AUE_linux_fcntl64 AUE_FCNTL -#define LINUX_SYS_AUE_linux_gettid AUE_NULL -#define LINUX_SYS_AUE_linux_setxattr AUE_NULL -#define LINUX_SYS_AUE_linux_lsetxattr AUE_NULL -#define LINUX_SYS_AUE_linux_fsetxattr AUE_NULL -#define LINUX_SYS_AUE_linux_getxattr AUE_NULL -#define LINUX_SYS_AUE_linux_lgetxattr AUE_NULL -#define LINUX_SYS_AUE_linux_fgetxattr AUE_NULL -#define LINUX_SYS_AUE_linux_listxattr AUE_NULL -#define LINUX_SYS_AUE_linux_llistxattr AUE_NULL -#define LINUX_SYS_AUE_linux_flistxattr AUE_NULL -#define LINUX_SYS_AUE_linux_removexattr AUE_NULL -#define LINUX_SYS_AUE_linux_lremovexattr AUE_NULL -#define LINUX_SYS_AUE_linux_fremovexattr AUE_NULL -#define LINUX_SYS_AUE_linux_tkill AUE_NULL -#define LINUX_SYS_AUE_linux_sys_futex AUE_NULL -#define LINUX_SYS_AUE_linux_sched_setaffinity AUE_NULL -#define LINUX_SYS_AUE_linux_sched_getaffinity AUE_NULL -#define LINUX_SYS_AUE_linux_set_thread_area AUE_NULL -#define LINUX_SYS_AUE_linux_fadvise64 AUE_NULL -#define LINUX_SYS_AUE_linux_exit_group AUE_EXIT -#define LINUX_SYS_AUE_linux_lookup_dcookie AUE_NULL -#define LINUX_SYS_AUE_linux_epoll_create AUE_NULL -#define LINUX_SYS_AUE_linux_epoll_ctl AUE_NULL -#define LINUX_SYS_AUE_linux_epoll_wait AUE_NULL -#define LINUX_SYS_AUE_linux_remap_file_pages AUE_NULL -#define LINUX_SYS_AUE_linux_set_tid_address AUE_NULL -#define LINUX_SYS_AUE_linux_timer_create AUE_NULL -#define LINUX_SYS_AUE_linux_timer_settime AUE_NULL -#define LINUX_SYS_AUE_linux_timer_gettime AUE_NULL -#define LINUX_SYS_AUE_linux_timer_getoverrun AUE_NULL -#define LINUX_SYS_AUE_linux_timer_delete AUE_NULL -#define LINUX_SYS_AUE_linux_clock_settime AUE_CLOCK_SETTIME -#define LINUX_SYS_AUE_linux_clock_gettime AUE_NULL -#define LINUX_SYS_AUE_linux_clock_getres AUE_NULL -#define LINUX_SYS_AUE_linux_clock_nanosleep AUE_NULL -#define LINUX_SYS_AUE_linux_statfs64 AUE_STATFS -#define LINUX_SYS_AUE_linux_fstatfs64 AUE_FSTATFS -#define LINUX_SYS_AUE_linux_tgkill AUE_NULL -#define LINUX_SYS_AUE_linux_utimes AUE_UTIMES -#define LINUX_SYS_AUE_linux_fadvise64_64 AUE_NULL -#define LINUX_SYS_AUE_linux_mbind AUE_NULL -#define LINUX_SYS_AUE_linux_get_mempolicy AUE_NULL -#define LINUX_SYS_AUE_linux_set_mempolicy AUE_NULL -#define LINUX_SYS_AUE_linux_mq_open AUE_NULL -#define LINUX_SYS_AUE_linux_mq_unlink AUE_NULL -#define LINUX_SYS_AUE_linux_mq_timedsend AUE_NULL -#define LINUX_SYS_AUE_linux_mq_timedreceive AUE_NULL -#define LINUX_SYS_AUE_linux_mq_notify AUE_NULL -#define LINUX_SYS_AUE_linux_mq_getsetattr AUE_NULL -#define LINUX_SYS_AUE_linux_kexec_load AUE_NULL -#define LINUX_SYS_AUE_linux_waitid AUE_WAIT6 -#define LINUX_SYS_AUE_linux_add_key AUE_NULL -#define LINUX_SYS_AUE_linux_request_key AUE_NULL -#define LINUX_SYS_AUE_linux_keyctl AUE_NULL -#define LINUX_SYS_AUE_linux_ioprio_set AUE_NULL -#define LINUX_SYS_AUE_linux_ioprio_get AUE_NULL -#define LINUX_SYS_AUE_linux_inotify_init AUE_NULL -#define LINUX_SYS_AUE_linux_inotify_add_watch AUE_NULL -#define LINUX_SYS_AUE_linux_inotify_rm_watch AUE_NULL -#define LINUX_SYS_AUE_linux_migrate_pages AUE_NULL -#define LINUX_SYS_AUE_linux_openat AUE_OPEN_RWTC -#define LINUX_SYS_AUE_linux_mkdirat AUE_MKDIRAT -#define LINUX_SYS_AUE_linux_mknodat AUE_MKNODAT -#define LINUX_SYS_AUE_linux_fchownat AUE_FCHOWNAT -#define LINUX_SYS_AUE_linux_futimesat AUE_FUTIMESAT -#define LINUX_SYS_AUE_linux_fstatat64 AUE_FSTATAT -#define LINUX_SYS_AUE_linux_unlinkat AUE_UNLINKAT -#define LINUX_SYS_AUE_linux_renameat AUE_RENAMEAT -#define LINUX_SYS_AUE_linux_linkat AUE_LINKAT -#define LINUX_SYS_AUE_linux_symlinkat AUE_SYMLINKAT -#define LINUX_SYS_AUE_linux_readlinkat AUE_READLINKAT -#define LINUX_SYS_AUE_linux_fchmodat AUE_FCHMODAT -#define LINUX_SYS_AUE_linux_faccessat AUE_FACCESSAT -#define LINUX_SYS_AUE_linux_pselect6 AUE_SELECT -#define LINUX_SYS_AUE_linux_ppoll AUE_POLL -#define LINUX_SYS_AUE_linux_unshare AUE_NULL -#define LINUX_SYS_AUE_linux_set_robust_list AUE_NULL -#define LINUX_SYS_AUE_linux_get_robust_list AUE_NULL -#define LINUX_SYS_AUE_linux_splice AUE_NULL -#define LINUX_SYS_AUE_linux_sync_file_range AUE_NULL -#define LINUX_SYS_AUE_linux_tee AUE_NULL -#define LINUX_SYS_AUE_linux_vmsplice AUE_NULL -#define LINUX_SYS_AUE_linux_move_pages AUE_NULL -#define LINUX_SYS_AUE_linux_getcpu AUE_NULL -#define LINUX_SYS_AUE_linux_epoll_pwait AUE_NULL -#define LINUX_SYS_AUE_linux_utimensat AUE_FUTIMESAT -#define LINUX_SYS_AUE_linux_signalfd AUE_NULL -#define LINUX_SYS_AUE_linux_timerfd_create AUE_NULL -#define LINUX_SYS_AUE_linux_eventfd AUE_NULL -#define LINUX_SYS_AUE_linux_fallocate AUE_NULL -#define LINUX_SYS_AUE_linux_timerfd_settime AUE_NULL -#define LINUX_SYS_AUE_linux_timerfd_gettime AUE_NULL -#define LINUX_SYS_AUE_linux_signalfd4 AUE_NULL -#define LINUX_SYS_AUE_linux_eventfd2 AUE_NULL -#define LINUX_SYS_AUE_linux_epoll_create1 AUE_NULL -#define LINUX_SYS_AUE_linux_dup3 AUE_NULL -#define LINUX_SYS_AUE_linux_pipe2 AUE_NULL -#define LINUX_SYS_AUE_linux_inotify_init1 AUE_NULL -#define LINUX_SYS_AUE_linux_preadv AUE_NULL -#define LINUX_SYS_AUE_linux_pwritev AUE_NULL -#define LINUX_SYS_AUE_linux_rt_tsigqueueinfo AUE_NULL -#define LINUX_SYS_AUE_linux_perf_event_open AUE_NULL -#define LINUX_SYS_AUE_linux_recvmmsg AUE_NULL -#define LINUX_SYS_AUE_linux_fanotify_init AUE_NULL -#define LINUX_SYS_AUE_linux_fanotify_mark AUE_NULL -#define LINUX_SYS_AUE_linux_prlimit64 AUE_NULL -#define LINUX_SYS_AUE_linux_name_to_handle_at AUE_NULL -#define LINUX_SYS_AUE_linux_open_by_handle_at AUE_NULL -#define LINUX_SYS_AUE_linux_clock_adjtime AUE_NULL -#define LINUX_SYS_AUE_linux_syncfs AUE_SYNC -#define LINUX_SYS_AUE_linux_sendmmsg AUE_NULL -#define LINUX_SYS_AUE_linux_setns AUE_NULL -#define LINUX_SYS_AUE_linux_process_vm_readv AUE_NULL -#define LINUX_SYS_AUE_linux_process_vm_writev AUE_NULL +#define LINUX32_SYS_AUE_linux_exit AUE_EXIT +#define LINUX32_SYS_AUE_linux_fork AUE_FORK +#define LINUX32_SYS_AUE_linux_open AUE_OPEN_RWTC +#define LINUX32_SYS_AUE_linux_waitpid AUE_WAIT4 +#define LINUX32_SYS_AUE_linux_creat AUE_CREAT +#define LINUX32_SYS_AUE_linux_link AUE_LINK +#define LINUX32_SYS_AUE_linux_unlink AUE_UNLINK +#define LINUX32_SYS_AUE_linux_execve AUE_EXECVE +#define LINUX32_SYS_AUE_linux_chdir AUE_CHDIR +#define LINUX32_SYS_AUE_linux_time AUE_NULL +#define LINUX32_SYS_AUE_linux_mknod AUE_MKNOD +#define LINUX32_SYS_AUE_linux_chmod AUE_CHMOD +#define LINUX32_SYS_AUE_linux_lchown16 AUE_LCHOWN +#define LINUX32_SYS_AUE_linux_stat AUE_STAT +#define LINUX32_SYS_AUE_linux_lseek AUE_LSEEK +#define LINUX32_SYS_AUE_linux_getpid AUE_GETPID +#define LINUX32_SYS_AUE_linux_mount AUE_MOUNT +#define LINUX32_SYS_AUE_linux_oldumount AUE_UMOUNT +#define LINUX32_SYS_AUE_linux_setuid16 AUE_SETUID +#define LINUX32_SYS_AUE_linux_getuid16 AUE_GETUID +#define LINUX32_SYS_AUE_linux_stime AUE_SETTIMEOFDAY +#define LINUX32_SYS_AUE_linux_ptrace AUE_PTRACE +#define LINUX32_SYS_AUE_linux_alarm AUE_NULL +#define LINUX32_SYS_AUE_linux_pause AUE_NULL +#define LINUX32_SYS_AUE_linux_utime AUE_UTIME +#define LINUX32_SYS_AUE_linux_access AUE_ACCESS +#define LINUX32_SYS_AUE_linux_nice AUE_NICE +#define LINUX32_SYS_AUE_linux_kill AUE_KILL +#define LINUX32_SYS_AUE_linux_rename AUE_RENAME +#define LINUX32_SYS_AUE_linux_mkdir AUE_MKDIR +#define LINUX32_SYS_AUE_linux_rmdir AUE_RMDIR +#define LINUX32_SYS_AUE_linux_pipe AUE_PIPE +#define LINUX32_SYS_AUE_linux_times AUE_NULL +#define LINUX32_SYS_AUE_linux_brk AUE_NULL +#define LINUX32_SYS_AUE_linux_setgid16 AUE_SETGID +#define LINUX32_SYS_AUE_linux_getgid16 AUE_GETGID +#define LINUX32_SYS_AUE_linux_signal AUE_NULL +#define LINUX32_SYS_AUE_linux_geteuid16 AUE_GETEUID +#define LINUX32_SYS_AUE_linux_getegid16 AUE_GETEGID +#define LINUX32_SYS_AUE_linux_umount AUE_UMOUNT +#define LINUX32_SYS_AUE_linux_ioctl AUE_IOCTL +#define LINUX32_SYS_AUE_linux_fcntl AUE_FCNTL +#define LINUX32_SYS_AUE_linux_olduname AUE_NULL +#define LINUX32_SYS_AUE_linux_ustat AUE_NULL +#define LINUX32_SYS_AUE_linux_getppid AUE_GETPPID +#define LINUX32_SYS_AUE_linux_sigaction AUE_NULL +#define LINUX32_SYS_AUE_linux_sgetmask AUE_NULL +#define LINUX32_SYS_AUE_linux_ssetmask AUE_NULL +#define LINUX32_SYS_AUE_linux_setreuid16 AUE_SETREUID +#define LINUX32_SYS_AUE_linux_setregid16 AUE_SETREGID +#define LINUX32_SYS_AUE_linux_sigsuspend AUE_NULL +#define LINUX32_SYS_AUE_linux_sigpending AUE_NULL +#define LINUX32_SYS_AUE_linux_sethostname AUE_SYSCTL +#define LINUX32_SYS_AUE_linux_setrlimit AUE_SETRLIMIT +#define LINUX32_SYS_AUE_linux_old_getrlimit AUE_GETRLIMIT +#define LINUX32_SYS_AUE_linux_getrusage AUE_GETRUSAGE +#define LINUX32_SYS_AUE_linux_gettimeofday AUE_NULL +#define LINUX32_SYS_AUE_linux_settimeofday AUE_SETTIMEOFDAY +#define LINUX32_SYS_AUE_linux_getgroups16 AUE_GETGROUPS +#define LINUX32_SYS_AUE_linux_setgroups16 AUE_SETGROUPS +#define LINUX32_SYS_AUE_linux_old_select AUE_SELECT +#define LINUX32_SYS_AUE_linux_symlink AUE_SYMLINK +#define LINUX32_SYS_AUE_linux_lstat AUE_LSTAT +#define LINUX32_SYS_AUE_linux_readlink AUE_READLINK +#define LINUX32_SYS_AUE_linux_reboot AUE_REBOOT +#define LINUX32_SYS_AUE_linux_readdir AUE_GETDIRENTRIES +#define LINUX32_SYS_AUE_linux_mmap AUE_MMAP +#define LINUX32_SYS_AUE_linux_truncate AUE_TRUNCATE +#define LINUX32_SYS_AUE_linux_ftruncate AUE_FTRUNCATE +#define LINUX32_SYS_AUE_linux_getpriority AUE_GETPRIORITY +#define LINUX32_SYS_AUE_linux_statfs AUE_STATFS +#define LINUX32_SYS_AUE_linux_fstatfs AUE_FSTATFS +#define LINUX32_SYS_AUE_linux_socketcall AUE_NULL +#define LINUX32_SYS_AUE_linux_syslog AUE_NULL +#define LINUX32_SYS_AUE_linux_setitimer AUE_SETITIMER +#define LINUX32_SYS_AUE_linux_getitimer AUE_GETITIMER +#define LINUX32_SYS_AUE_linux_newstat AUE_STAT +#define LINUX32_SYS_AUE_linux_newlstat AUE_LSTAT +#define LINUX32_SYS_AUE_linux_newfstat AUE_FSTAT +#define LINUX32_SYS_AUE_linux_uname AUE_NULL +#define LINUX32_SYS_AUE_linux_iopl AUE_NULL +#define LINUX32_SYS_AUE_linux_vhangup AUE_NULL +#define LINUX32_SYS_AUE_linux_wait4 AUE_WAIT4 +#define LINUX32_SYS_AUE_linux_swapoff AUE_SWAPOFF +#define LINUX32_SYS_AUE_linux_sysinfo AUE_NULL +#define LINUX32_SYS_AUE_linux_ipc AUE_NULL +#define LINUX32_SYS_AUE_linux_sigreturn AUE_SIGRETURN +#define LINUX32_SYS_AUE_linux_clone AUE_RFORK +#define LINUX32_SYS_AUE_linux_setdomainname AUE_SYSCTL +#define LINUX32_SYS_AUE_linux_newuname AUE_NULL +#define LINUX32_SYS_AUE_linux_adjtimex AUE_ADJTIME +#define LINUX32_SYS_AUE_linux_mprotect AUE_MPROTECT +#define LINUX32_SYS_AUE_linux_sigprocmask AUE_SIGPROCMASK +#define LINUX32_SYS_AUE_linux_create_module AUE_NULL +#define LINUX32_SYS_AUE_linux_init_module AUE_NULL +#define LINUX32_SYS_AUE_linux_delete_module AUE_NULL +#define LINUX32_SYS_AUE_linux_get_kernel_syms AUE_NULL +#define LINUX32_SYS_AUE_linux_quotactl AUE_QUOTACTL +#define LINUX32_SYS_AUE_linux_bdflush AUE_BDFLUSH +#define LINUX32_SYS_AUE_linux_sysfs AUE_NULL +#define LINUX32_SYS_AUE_linux_personality AUE_PERSONALITY +#define LINUX32_SYS_AUE_linux_setfsuid16 AUE_SETFSUID +#define LINUX32_SYS_AUE_linux_setfsgid16 AUE_SETFSGID +#define LINUX32_SYS_AUE_linux_llseek AUE_LSEEK +#define LINUX32_SYS_AUE_linux_getdents AUE_GETDIRENTRIES +#define LINUX32_SYS_AUE_linux_select AUE_SELECT +#define LINUX32_SYS_AUE_linux_msync AUE_MSYNC +#define LINUX32_SYS_AUE_linux_readv AUE_READV +#define LINUX32_SYS_AUE_linux_writev AUE_WRITEV +#define LINUX32_SYS_AUE_linux_getsid AUE_GETSID +#define LINUX32_SYS_AUE_linux_fdatasync AUE_NULL +#define LINUX32_SYS_AUE_linux_sysctl AUE_SYSCTL +#define LINUX32_SYS_AUE_linux_sched_setparam AUE_SCHED_SETPARAM +#define LINUX32_SYS_AUE_linux_sched_getparam AUE_SCHED_GETPARAM +#define LINUX32_SYS_AUE_linux_sched_setscheduler AUE_SCHED_SETSCHEDULER +#define LINUX32_SYS_AUE_linux_sched_getscheduler AUE_SCHED_GETSCHEDULER +#define LINUX32_SYS_AUE_linux_sched_get_priority_max AUE_SCHED_GET_PRIORITY_MAX +#define LINUX32_SYS_AUE_linux_sched_get_priority_min AUE_SCHED_GET_PRIORITY_MIN +#define LINUX32_SYS_AUE_linux_sched_rr_get_interval AUE_SCHED_RR_GET_INTERVAL +#define LINUX32_SYS_AUE_linux_nanosleep AUE_NULL +#define LINUX32_SYS_AUE_linux_mremap AUE_NULL +#define LINUX32_SYS_AUE_linux_setresuid16 AUE_SETRESUID +#define LINUX32_SYS_AUE_linux_getresuid16 AUE_GETRESUID +#define LINUX32_SYS_AUE_linux_query_module AUE_NULL +#define LINUX32_SYS_AUE_linux_nfsservctl AUE_NULL +#define LINUX32_SYS_AUE_linux_setresgid16 AUE_SETRESGID +#define LINUX32_SYS_AUE_linux_getresgid16 AUE_GETRESGID +#define LINUX32_SYS_AUE_linux_prctl AUE_PRCTL +#define LINUX32_SYS_AUE_linux_rt_sigreturn AUE_NULL +#define LINUX32_SYS_AUE_linux_rt_sigaction AUE_NULL +#define LINUX32_SYS_AUE_linux_rt_sigprocmask AUE_NULL +#define LINUX32_SYS_AUE_linux_rt_sigpending AUE_NULL +#define LINUX32_SYS_AUE_linux_rt_sigtimedwait AUE_NULL +#define LINUX32_SYS_AUE_linux_rt_sigqueueinfo AUE_NULL +#define LINUX32_SYS_AUE_linux_rt_sigsuspend AUE_NULL +#define LINUX32_SYS_AUE_linux_pread AUE_PREAD +#define LINUX32_SYS_AUE_linux_pwrite AUE_PWRITE +#define LINUX32_SYS_AUE_linux_chown16 AUE_CHOWN +#define LINUX32_SYS_AUE_linux_getcwd AUE_GETCWD +#define LINUX32_SYS_AUE_linux_capget AUE_CAPGET +#define LINUX32_SYS_AUE_linux_capset AUE_CAPSET +#define LINUX32_SYS_AUE_linux_sigaltstack AUE_NULL +#define LINUX32_SYS_AUE_linux_sendfile AUE_SENDFILE +#define LINUX32_SYS_AUE_linux_vfork AUE_VFORK +#define LINUX32_SYS_AUE_linux_getrlimit AUE_GETRLIMIT +#define LINUX32_SYS_AUE_linux_mmap2 AUE_MMAP +#define LINUX32_SYS_AUE_linux_truncate64 AUE_TRUNCATE +#define LINUX32_SYS_AUE_linux_ftruncate64 AUE_FTRUNCATE +#define LINUX32_SYS_AUE_linux_stat64 AUE_STAT +#define LINUX32_SYS_AUE_linux_lstat64 AUE_LSTAT +#define LINUX32_SYS_AUE_linux_fstat64 AUE_FSTAT +#define LINUX32_SYS_AUE_linux_lchown AUE_LCHOWN +#define LINUX32_SYS_AUE_linux_getuid AUE_GETUID +#define LINUX32_SYS_AUE_linux_getgid AUE_GETGID +#define LINUX32_SYS_AUE_linux_getgroups AUE_GETGROUPS +#define LINUX32_SYS_AUE_linux_setgroups AUE_SETGROUPS +#define LINUX32_SYS_AUE_linux_chown AUE_CHOWN +#define LINUX32_SYS_AUE_linux_setfsuid AUE_SETFSUID +#define LINUX32_SYS_AUE_linux_setfsgid AUE_SETFSGID +#define LINUX32_SYS_AUE_linux_pivot_root AUE_PIVOT_ROOT +#define LINUX32_SYS_AUE_linux_mincore AUE_MINCORE +#define LINUX32_SYS_AUE_linux_getdents64 AUE_GETDIRENTRIES +#define LINUX32_SYS_AUE_linux_fcntl64 AUE_FCNTL +#define LINUX32_SYS_AUE_linux_gettid AUE_NULL +#define LINUX32_SYS_AUE_linux_setxattr AUE_NULL +#define LINUX32_SYS_AUE_linux_lsetxattr AUE_NULL +#define LINUX32_SYS_AUE_linux_fsetxattr AUE_NULL +#define LINUX32_SYS_AUE_linux_getxattr AUE_NULL +#define LINUX32_SYS_AUE_linux_lgetxattr AUE_NULL +#define LINUX32_SYS_AUE_linux_fgetxattr AUE_NULL +#define LINUX32_SYS_AUE_linux_listxattr AUE_NULL +#define LINUX32_SYS_AUE_linux_llistxattr AUE_NULL +#define LINUX32_SYS_AUE_linux_flistxattr AUE_NULL +#define LINUX32_SYS_AUE_linux_removexattr AUE_NULL +#define LINUX32_SYS_AUE_linux_lremovexattr AUE_NULL +#define LINUX32_SYS_AUE_linux_fremovexattr AUE_NULL +#define LINUX32_SYS_AUE_linux_tkill AUE_NULL +#define LINUX32_SYS_AUE_linux_sys_futex AUE_NULL +#define LINUX32_SYS_AUE_linux_sched_setaffinity AUE_NULL +#define LINUX32_SYS_AUE_linux_sched_getaffinity AUE_NULL +#define LINUX32_SYS_AUE_linux_set_thread_area AUE_NULL +#define LINUX32_SYS_AUE_linux_fadvise64 AUE_NULL +#define LINUX32_SYS_AUE_linux_exit_group AUE_EXIT +#define LINUX32_SYS_AUE_linux_lookup_dcookie AUE_NULL +#define LINUX32_SYS_AUE_linux_epoll_create AUE_NULL +#define LINUX32_SYS_AUE_linux_epoll_ctl AUE_NULL +#define LINUX32_SYS_AUE_linux_epoll_wait AUE_NULL +#define LINUX32_SYS_AUE_linux_remap_file_pages AUE_NULL +#define LINUX32_SYS_AUE_linux_set_tid_address AUE_NULL +#define LINUX32_SYS_AUE_linux_timer_create AUE_NULL +#define LINUX32_SYS_AUE_linux_timer_settime AUE_NULL +#define LINUX32_SYS_AUE_linux_timer_gettime AUE_NULL +#define LINUX32_SYS_AUE_linux_timer_getoverrun AUE_NULL +#define LINUX32_SYS_AUE_linux_timer_delete AUE_NULL +#define LINUX32_SYS_AUE_linux_clock_settime AUE_CLOCK_SETTIME +#define LINUX32_SYS_AUE_linux_clock_gettime AUE_NULL +#define LINUX32_SYS_AUE_linux_clock_getres AUE_NULL +#define LINUX32_SYS_AUE_linux_clock_nanosleep AUE_NULL +#define LINUX32_SYS_AUE_linux_statfs64 AUE_STATFS +#define LINUX32_SYS_AUE_linux_fstatfs64 AUE_FSTATFS +#define LINUX32_SYS_AUE_linux_tgkill AUE_NULL +#define LINUX32_SYS_AUE_linux_utimes AUE_UTIMES +#define LINUX32_SYS_AUE_linux_fadvise64_64 AUE_NULL +#define LINUX32_SYS_AUE_linux_mbind AUE_NULL +#define LINUX32_SYS_AUE_linux_get_mempolicy AUE_NULL +#define LINUX32_SYS_AUE_linux_set_mempolicy AUE_NULL +#define LINUX32_SYS_AUE_linux_mq_open AUE_NULL +#define LINUX32_SYS_AUE_linux_mq_unlink AUE_NULL +#define LINUX32_SYS_AUE_linux_mq_timedsend AUE_NULL +#define LINUX32_SYS_AUE_linux_mq_timedreceive AUE_NULL +#define LINUX32_SYS_AUE_linux_mq_notify AUE_NULL +#define LINUX32_SYS_AUE_linux_mq_getsetattr AUE_NULL +#define LINUX32_SYS_AUE_linux_kexec_load AUE_NULL +#define LINUX32_SYS_AUE_linux_waitid AUE_WAIT6 +#define LINUX32_SYS_AUE_linux_add_key AUE_NULL +#define LINUX32_SYS_AUE_linux_request_key AUE_NULL +#define LINUX32_SYS_AUE_linux_keyctl AUE_NULL +#define LINUX32_SYS_AUE_linux_ioprio_set AUE_NULL +#define LINUX32_SYS_AUE_linux_ioprio_get AUE_NULL +#define LINUX32_SYS_AUE_linux_inotify_init AUE_NULL +#define LINUX32_SYS_AUE_linux_inotify_add_watch AUE_NULL +#define LINUX32_SYS_AUE_linux_inotify_rm_watch AUE_NULL +#define LINUX32_SYS_AUE_linux_migrate_pages AUE_NULL +#define LINUX32_SYS_AUE_linux_openat AUE_OPEN_RWTC +#define LINUX32_SYS_AUE_linux_mkdirat AUE_MKDIRAT +#define LINUX32_SYS_AUE_linux_mknodat AUE_MKNODAT +#define LINUX32_SYS_AUE_linux_fchownat AUE_FCHOWNAT +#define LINUX32_SYS_AUE_linux_futimesat AUE_FUTIMESAT +#define LINUX32_SYS_AUE_linux_fstatat64 AUE_FSTATAT +#define LINUX32_SYS_AUE_linux_unlinkat AUE_UNLINKAT +#define LINUX32_SYS_AUE_linux_renameat AUE_RENAMEAT +#define LINUX32_SYS_AUE_linux_linkat AUE_LINKAT +#define LINUX32_SYS_AUE_linux_symlinkat AUE_SYMLINKAT +#define LINUX32_SYS_AUE_linux_readlinkat AUE_READLINKAT +#define LINUX32_SYS_AUE_linux_fchmodat AUE_FCHMODAT +#define LINUX32_SYS_AUE_linux_faccessat AUE_FACCESSAT +#define LINUX32_SYS_AUE_linux_pselect6 AUE_SELECT +#define LINUX32_SYS_AUE_linux_ppoll AUE_POLL +#define LINUX32_SYS_AUE_linux_unshare AUE_NULL +#define LINUX32_SYS_AUE_linux_set_robust_list AUE_NULL +#define LINUX32_SYS_AUE_linux_get_robust_list AUE_NULL +#define LINUX32_SYS_AUE_linux_splice AUE_NULL +#define LINUX32_SYS_AUE_linux_sync_file_range AUE_NULL +#define LINUX32_SYS_AUE_linux_tee AUE_NULL +#define LINUX32_SYS_AUE_linux_vmsplice AUE_NULL +#define LINUX32_SYS_AUE_linux_move_pages AUE_NULL +#define LINUX32_SYS_AUE_linux_getcpu AUE_NULL +#define LINUX32_SYS_AUE_linux_epoll_pwait AUE_NULL +#define LINUX32_SYS_AUE_linux_utimensat AUE_FUTIMESAT +#define LINUX32_SYS_AUE_linux_signalfd AUE_NULL +#define LINUX32_SYS_AUE_linux_timerfd_create AUE_NULL +#define LINUX32_SYS_AUE_linux_eventfd AUE_NULL +#define LINUX32_SYS_AUE_linux_fallocate AUE_NULL +#define LINUX32_SYS_AUE_linux_timerfd_settime AUE_NULL +#define LINUX32_SYS_AUE_linux_timerfd_gettime AUE_NULL +#define LINUX32_SYS_AUE_linux_signalfd4 AUE_NULL +#define LINUX32_SYS_AUE_linux_eventfd2 AUE_NULL +#define LINUX32_SYS_AUE_linux_epoll_create1 AUE_NULL +#define LINUX32_SYS_AUE_linux_dup3 AUE_NULL +#define LINUX32_SYS_AUE_linux_pipe2 AUE_NULL +#define LINUX32_SYS_AUE_linux_inotify_init1 AUE_NULL +#define LINUX32_SYS_AUE_linux_preadv AUE_NULL +#define LINUX32_SYS_AUE_linux_pwritev AUE_NULL +#define LINUX32_SYS_AUE_linux_rt_tsigqueueinfo AUE_NULL +#define LINUX32_SYS_AUE_linux_perf_event_open AUE_NULL +#define LINUX32_SYS_AUE_linux_recvmmsg AUE_NULL +#define LINUX32_SYS_AUE_linux_fanotify_init AUE_NULL +#define LINUX32_SYS_AUE_linux_fanotify_mark AUE_NULL +#define LINUX32_SYS_AUE_linux_prlimit64 AUE_NULL +#define LINUX32_SYS_AUE_linux_name_to_handle_at AUE_NULL +#define LINUX32_SYS_AUE_linux_open_by_handle_at AUE_NULL +#define LINUX32_SYS_AUE_linux_clock_adjtime AUE_NULL +#define LINUX32_SYS_AUE_linux_syncfs AUE_SYNC +#define LINUX32_SYS_AUE_linux_sendmmsg AUE_NULL +#define LINUX32_SYS_AUE_linux_setns AUE_NULL +#define LINUX32_SYS_AUE_linux_process_vm_readv AUE_NULL +#define LINUX32_SYS_AUE_linux_process_vm_writev AUE_NULL #undef PAD_ #undef PADL_ #undef PADR_ -#endif /* !_LINUX_SYSPROTO_H_ */ +#endif /* !_LINUX32_SYSPROTO_H_ */ Modified: head/sys/amd64/linux32/linux32_syscall.h ============================================================================== --- head/sys/amd64/linux32/linux32_syscall.h Thu Oct 22 21:30:39 2015 (r289770) +++ head/sys/amd64/linux32/linux32_syscall.h Thu Oct 22 21:33:37 2015 (r289771) @@ -3,322 +3,322 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 283492 2015-05-24 18:08:01Z dchagin + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 289769 2015-10-22 21:28:20Z jhb */ -#define LINUX_SYS_linux_exit 1 -#define LINUX_SYS_linux_fork 2 -#define LINUX_SYS_read 3 -#define LINUX_SYS_write 4 -#define LINUX_SYS_linux_open 5 -#define LINUX_SYS_close 6 -#define LINUX_SYS_linux_waitpid 7 -#define LINUX_SYS_linux_creat 8 -#define LINUX_SYS_linux_link 9 -#define LINUX_SYS_linux_unlink 10 -#define LINUX_SYS_linux_execve 11 -#define LINUX_SYS_linux_chdir 12 -#define LINUX_SYS_linux_time 13 -#define LINUX_SYS_linux_mknod 14 -#define LINUX_SYS_linux_chmod 15 -#define LINUX_SYS_linux_lchown16 16 -#define LINUX_SYS_linux_stat 18 -#define LINUX_SYS_linux_lseek 19 -#define LINUX_SYS_linux_getpid 20 -#define LINUX_SYS_linux_mount 21 -#define LINUX_SYS_linux_oldumount 22 -#define LINUX_SYS_linux_setuid16 23 -#define LINUX_SYS_linux_getuid16 24 -#define LINUX_SYS_linux_stime 25 -#define LINUX_SYS_linux_ptrace 26 -#define LINUX_SYS_linux_alarm 27 -#define LINUX_SYS_linux_pause 29 -#define LINUX_SYS_linux_utime 30 -#define LINUX_SYS_linux_access 33 -#define LINUX_SYS_linux_nice 34 -#define LINUX_SYS_sync 36 -#define LINUX_SYS_linux_kill 37 -#define LINUX_SYS_linux_rename 38 -#define LINUX_SYS_linux_mkdir 39 -#define LINUX_SYS_linux_rmdir 40 -#define LINUX_SYS_dup 41 -#define LINUX_SYS_linux_pipe 42 -#define LINUX_SYS_linux_times 43 -#define LINUX_SYS_linux_brk 45 -#define LINUX_SYS_linux_setgid16 46 -#define LINUX_SYS_linux_getgid16 47 -#define LINUX_SYS_linux_signal 48 -#define LINUX_SYS_linux_geteuid16 49 -#define LINUX_SYS_linux_getegid16 50 -#define LINUX_SYS_acct 51 -#define LINUX_SYS_linux_umount 52 -#define LINUX_SYS_linux_ioctl 54 -#define LINUX_SYS_linux_fcntl 55 -#define LINUX_SYS_setpgid 57 -#define LINUX_SYS_linux_olduname 59 -#define LINUX_SYS_umask 60 -#define LINUX_SYS_chroot 61 -#define LINUX_SYS_linux_ustat 62 -#define LINUX_SYS_dup2 63 -#define LINUX_SYS_linux_getppid 64 -#define LINUX_SYS_getpgrp 65 -#define LINUX_SYS_setsid 66 -#define LINUX_SYS_linux_sigaction 67 -#define LINUX_SYS_linux_sgetmask 68 -#define LINUX_SYS_linux_ssetmask 69 -#define LINUX_SYS_linux_setreuid16 70 -#define LINUX_SYS_linux_setregid16 71 -#define LINUX_SYS_linux_sigsuspend 72 -#define LINUX_SYS_linux_sigpending 73 -#define LINUX_SYS_linux_sethostname 74 -#define LINUX_SYS_linux_setrlimit 75 -#define LINUX_SYS_linux_old_getrlimit 76 -#define LINUX_SYS_linux_getrusage 77 -#define LINUX_SYS_linux_gettimeofday 78 -#define LINUX_SYS_linux_settimeofday 79 -#define LINUX_SYS_linux_getgroups16 80 -#define LINUX_SYS_linux_setgroups16 81 -#define LINUX_SYS_linux_old_select 82 -#define LINUX_SYS_linux_symlink 83 -#define LINUX_SYS_linux_lstat 84 -#define LINUX_SYS_linux_readlink 85 -#define LINUX_SYS_swapon 87 -#define LINUX_SYS_linux_reboot 88 -#define LINUX_SYS_linux_readdir 89 -#define LINUX_SYS_linux_mmap 90 -#define LINUX_SYS_munmap 91 -#define LINUX_SYS_linux_truncate 92 -#define LINUX_SYS_linux_ftruncate 93 -#define LINUX_SYS_fchmod 94 -#define LINUX_SYS_fchown 95 -#define LINUX_SYS_linux_getpriority 96 -#define LINUX_SYS_setpriority 97 -#define LINUX_SYS_linux_statfs 99 -#define LINUX_SYS_linux_fstatfs 100 -#define LINUX_SYS_linux_socketcall 102 -#define LINUX_SYS_linux_syslog 103 -#define LINUX_SYS_linux_setitimer 104 -#define LINUX_SYS_linux_getitimer 105 -#define LINUX_SYS_linux_newstat 106 -#define LINUX_SYS_linux_newlstat 107 -#define LINUX_SYS_linux_newfstat 108 -#define LINUX_SYS_linux_uname 109 -#define LINUX_SYS_linux_iopl 110 -#define LINUX_SYS_linux_vhangup 111 -#define LINUX_SYS_linux_wait4 114 -#define LINUX_SYS_linux_swapoff 115 -#define LINUX_SYS_linux_sysinfo 116 -#define LINUX_SYS_linux_ipc 117 -#define LINUX_SYS_fsync 118 -#define LINUX_SYS_linux_sigreturn 119 -#define LINUX_SYS_linux_clone 120 -#define LINUX_SYS_linux_setdomainname 121 -#define LINUX_SYS_linux_newuname 122 -#define LINUX_SYS_linux_adjtimex 124 -#define LINUX_SYS_linux_mprotect 125 -#define LINUX_SYS_linux_sigprocmask 126 -#define LINUX_SYS_linux_create_module 127 -#define LINUX_SYS_linux_init_module 128 -#define LINUX_SYS_linux_delete_module 129 -#define LINUX_SYS_linux_get_kernel_syms 130 -#define LINUX_SYS_linux_quotactl 131 -#define LINUX_SYS_getpgid 132 -#define LINUX_SYS_fchdir 133 -#define LINUX_SYS_linux_bdflush 134 -#define LINUX_SYS_linux_sysfs 135 -#define LINUX_SYS_linux_personality 136 -#define LINUX_SYS_linux_setfsuid16 138 -#define LINUX_SYS_linux_setfsgid16 139 -#define LINUX_SYS_linux_llseek 140 -#define LINUX_SYS_linux_getdents 141 -#define LINUX_SYS_linux_select 142 -#define LINUX_SYS_flock 143 -#define LINUX_SYS_linux_msync 144 -#define LINUX_SYS_linux_readv 145 -#define LINUX_SYS_linux_writev 146 -#define LINUX_SYS_linux_getsid 147 -#define LINUX_SYS_linux_fdatasync 148 -#define LINUX_SYS_linux_sysctl 149 -#define LINUX_SYS_mlock 150 -#define LINUX_SYS_munlock 151 -#define LINUX_SYS_mlockall 152 -#define LINUX_SYS_munlockall 153 -#define LINUX_SYS_linux_sched_setparam 154 -#define LINUX_SYS_linux_sched_getparam 155 -#define LINUX_SYS_linux_sched_setscheduler 156 -#define LINUX_SYS_linux_sched_getscheduler 157 -#define LINUX_SYS_sched_yield 158 -#define LINUX_SYS_linux_sched_get_priority_max 159 -#define LINUX_SYS_linux_sched_get_priority_min 160 -#define LINUX_SYS_linux_sched_rr_get_interval 161 -#define LINUX_SYS_linux_nanosleep 162 -#define LINUX_SYS_linux_mremap 163 -#define LINUX_SYS_linux_setresuid16 164 -#define LINUX_SYS_linux_getresuid16 165 -#define LINUX_SYS_linux_query_module 167 -#define LINUX_SYS_poll 168 -#define LINUX_SYS_linux_nfsservctl 169 -#define LINUX_SYS_linux_setresgid16 170 -#define LINUX_SYS_linux_getresgid16 171 -#define LINUX_SYS_linux_prctl 172 -#define LINUX_SYS_linux_rt_sigreturn 173 -#define LINUX_SYS_linux_rt_sigaction 174 -#define LINUX_SYS_linux_rt_sigprocmask 175 -#define LINUX_SYS_linux_rt_sigpending 176 -#define LINUX_SYS_linux_rt_sigtimedwait 177 -#define LINUX_SYS_linux_rt_sigqueueinfo 178 -#define LINUX_SYS_linux_rt_sigsuspend 179 -#define LINUX_SYS_linux_pread 180 -#define LINUX_SYS_linux_pwrite 181 -#define LINUX_SYS_linux_chown16 182 -#define LINUX_SYS_linux_getcwd 183 -#define LINUX_SYS_linux_capget 184 -#define LINUX_SYS_linux_capset 185 -#define LINUX_SYS_linux_sigaltstack 186 -#define LINUX_SYS_linux_sendfile 187 -#define LINUX_SYS_linux_vfork 190 -#define LINUX_SYS_linux_getrlimit 191 -#define LINUX_SYS_linux_mmap2 192 -#define LINUX_SYS_linux_truncate64 193 -#define LINUX_SYS_linux_ftruncate64 194 -#define LINUX_SYS_linux_stat64 195 -#define LINUX_SYS_linux_lstat64 196 -#define LINUX_SYS_linux_fstat64 197 -#define LINUX_SYS_linux_lchown 198 -#define LINUX_SYS_linux_getuid 199 -#define LINUX_SYS_linux_getgid 200 -#define LINUX_SYS_geteuid 201 -#define LINUX_SYS_getegid 202 -#define LINUX_SYS_setreuid 203 -#define LINUX_SYS_setregid 204 -#define LINUX_SYS_linux_getgroups 205 -#define LINUX_SYS_linux_setgroups 206 -#define LINUX_SYS_setresuid 208 -#define LINUX_SYS_getresuid 209 -#define LINUX_SYS_setresgid 210 -#define LINUX_SYS_getresgid 211 -#define LINUX_SYS_linux_chown 212 -#define LINUX_SYS_setuid 213 -#define LINUX_SYS_setgid 214 -#define LINUX_SYS_linux_setfsuid 215 -#define LINUX_SYS_linux_setfsgid 216 -#define LINUX_SYS_linux_pivot_root 217 -#define LINUX_SYS_linux_mincore 218 -#define LINUX_SYS_madvise 219 -#define LINUX_SYS_linux_getdents64 220 -#define LINUX_SYS_linux_fcntl64 221 -#define LINUX_SYS_linux_gettid 224 -#define LINUX_SYS_linux_setxattr 226 -#define LINUX_SYS_linux_lsetxattr 227 -#define LINUX_SYS_linux_fsetxattr 228 -#define LINUX_SYS_linux_getxattr 229 -#define LINUX_SYS_linux_lgetxattr 230 -#define LINUX_SYS_linux_fgetxattr 231 -#define LINUX_SYS_linux_listxattr 232 -#define LINUX_SYS_linux_llistxattr 233 -#define LINUX_SYS_linux_flistxattr 234 -#define LINUX_SYS_linux_removexattr 235 -#define LINUX_SYS_linux_lremovexattr 236 -#define LINUX_SYS_linux_fremovexattr 237 -#define LINUX_SYS_linux_tkill 238 -#define LINUX_SYS_linux_sys_futex 240 -#define LINUX_SYS_linux_sched_setaffinity 241 -#define LINUX_SYS_linux_sched_getaffinity 242 -#define LINUX_SYS_linux_set_thread_area 243 -#define LINUX_SYS_linux_fadvise64 250 -#define LINUX_SYS_linux_exit_group 252 -#define LINUX_SYS_linux_lookup_dcookie 253 -#define LINUX_SYS_linux_epoll_create 254 -#define LINUX_SYS_linux_epoll_ctl 255 -#define LINUX_SYS_linux_epoll_wait 256 -#define LINUX_SYS_linux_remap_file_pages 257 -#define LINUX_SYS_linux_set_tid_address 258 -#define LINUX_SYS_linux_timer_create 259 -#define LINUX_SYS_linux_timer_settime 260 -#define LINUX_SYS_linux_timer_gettime 261 -#define LINUX_SYS_linux_timer_getoverrun 262 -#define LINUX_SYS_linux_timer_delete 263 -#define LINUX_SYS_linux_clock_settime 264 -#define LINUX_SYS_linux_clock_gettime 265 -#define LINUX_SYS_linux_clock_getres 266 -#define LINUX_SYS_linux_clock_nanosleep 267 -#define LINUX_SYS_linux_statfs64 268 -#define LINUX_SYS_linux_fstatfs64 269 -#define LINUX_SYS_linux_tgkill 270 -#define LINUX_SYS_linux_utimes 271 -#define LINUX_SYS_linux_fadvise64_64 272 -#define LINUX_SYS_linux_mbind 274 -#define LINUX_SYS_linux_get_mempolicy 275 -#define LINUX_SYS_linux_set_mempolicy 276 -#define LINUX_SYS_linux_mq_open 277 -#define LINUX_SYS_linux_mq_unlink 278 -#define LINUX_SYS_linux_mq_timedsend 279 -#define LINUX_SYS_linux_mq_timedreceive 280 -#define LINUX_SYS_linux_mq_notify 281 -#define LINUX_SYS_linux_mq_getsetattr 282 -#define LINUX_SYS_linux_kexec_load 283 -#define LINUX_SYS_linux_waitid 284 -#define LINUX_SYS_linux_add_key 286 -#define LINUX_SYS_linux_request_key 287 -#define LINUX_SYS_linux_keyctl 288 -#define LINUX_SYS_linux_ioprio_set 289 -#define LINUX_SYS_linux_ioprio_get 290 -#define LINUX_SYS_linux_inotify_init 291 -#define LINUX_SYS_linux_inotify_add_watch 292 -#define LINUX_SYS_linux_inotify_rm_watch 293 -#define LINUX_SYS_linux_migrate_pages 294 -#define LINUX_SYS_linux_openat 295 -#define LINUX_SYS_linux_mkdirat 296 -#define LINUX_SYS_linux_mknodat 297 -#define LINUX_SYS_linux_fchownat 298 -#define LINUX_SYS_linux_futimesat 299 -#define LINUX_SYS_linux_fstatat64 300 -#define LINUX_SYS_linux_unlinkat 301 -#define LINUX_SYS_linux_renameat 302 -#define LINUX_SYS_linux_linkat 303 -#define LINUX_SYS_linux_symlinkat 304 -#define LINUX_SYS_linux_readlinkat 305 -#define LINUX_SYS_linux_fchmodat 306 -#define LINUX_SYS_linux_faccessat 307 -#define LINUX_SYS_linux_pselect6 308 -#define LINUX_SYS_linux_ppoll 309 -#define LINUX_SYS_linux_unshare 310 -#define LINUX_SYS_linux_set_robust_list 311 -#define LINUX_SYS_linux_get_robust_list 312 -#define LINUX_SYS_linux_splice 313 -#define LINUX_SYS_linux_sync_file_range 314 -#define LINUX_SYS_linux_tee 315 -#define LINUX_SYS_linux_vmsplice 316 -#define LINUX_SYS_linux_move_pages 317 -#define LINUX_SYS_linux_getcpu 318 -#define LINUX_SYS_linux_epoll_pwait 319 -#define LINUX_SYS_linux_utimensat 320 -#define LINUX_SYS_linux_signalfd 321 -#define LINUX_SYS_linux_timerfd_create 322 -#define LINUX_SYS_linux_eventfd 323 -#define LINUX_SYS_linux_fallocate 324 -#define LINUX_SYS_linux_timerfd_settime 325 -#define LINUX_SYS_linux_timerfd_gettime 326 -#define LINUX_SYS_linux_signalfd4 327 -#define LINUX_SYS_linux_eventfd2 328 -#define LINUX_SYS_linux_epoll_create1 329 -#define LINUX_SYS_linux_dup3 330 -#define LINUX_SYS_linux_pipe2 331 -#define LINUX_SYS_linux_inotify_init1 332 -#define LINUX_SYS_linux_preadv 333 -#define LINUX_SYS_linux_pwritev 334 -#define LINUX_SYS_linux_rt_tsigqueueinfo 335 -#define LINUX_SYS_linux_perf_event_open 336 -#define LINUX_SYS_linux_recvmmsg 337 -#define LINUX_SYS_linux_fanotify_init 338 -#define LINUX_SYS_linux_fanotify_mark 339 -#define LINUX_SYS_linux_prlimit64 340 -#define LINUX_SYS_linux_name_to_handle_at 341 -#define LINUX_SYS_linux_open_by_handle_at 342 -#define LINUX_SYS_linux_clock_adjtime 343 -#define LINUX_SYS_linux_syncfs 344 -#define LINUX_SYS_linux_sendmmsg 345 -#define LINUX_SYS_linux_setns 346 -#define LINUX_SYS_linux_process_vm_readv 347 -#define LINUX_SYS_linux_process_vm_writev 348 -#define LINUX_SYS_MAXSYSCALL 350 +#define LINUX32_SYS_linux_exit 1 +#define LINUX32_SYS_linux_fork 2 +#define LINUX32_SYS_read 3 +#define LINUX32_SYS_write 4 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Oct 22 22:12: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 250DEA1C998; Thu, 22 Oct 2015 22:12:47 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x22d.google.com (mail-qk0-x22d.google.com [IPv6:2607:f8b0:400d:c09::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 D6D23B11; Thu, 22 Oct 2015 22:12:46 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qkbl190 with SMTP id l190so60356877qkb.2; Thu, 22 Oct 2015 15:12:46 -0700 (PDT) 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=c3B5I6mhrCJ+kSp4hi4ri6cb/3WcOX6S4OjSYVZEvoo=; b=nDAt+GHWnfHbqHa1WTTNtOAjqfjfKlFoGrzbbB2MXcH7WREH4gZSpvrZ3Dc/K7FAJW OPry5TKtMZUPsRrIQhUvfqccPLz1jImaQ6U/NmQRrNOCArZC1QrMn71svb3Xcknjf+1c FWUXAEjSfydvVZX2V9OE9AkLwy+asumnShxkvM4+b7zcXNOr08db7VwBWU4lllOgnjq/ 20WGP0sgGw+/6Ztdx4J2aP6+BtjIJ9mwljuhJPLo+9gwzKnL5bag6vBasuwcJofvUVOx DTr7NXygDrJ/s30xKGfe9bynrP/NI80zQvEETcc2v3M61qCSd1m5ee5jdbaXyvc4xaGB 7fRw== MIME-Version: 1.0 X-Received: by 10.55.221.65 with SMTP id n62mr21637324qki.42.1445551965864; Thu, 22 Oct 2015 15:12:45 -0700 (PDT) Received: by 10.140.88.209 with HTTP; Thu, 22 Oct 2015 15:12:45 -0700 (PDT) In-Reply-To: <562953FE.8070706@FreeBSD.org> References: <201510222113.t9MLDaw2051414@repo.freebsd.org> <562953FE.8070706@FreeBSD.org> Date: Thu, 22 Oct 2015 15:12:45 -0700 Message-ID: Subject: Re: svn commit: r289767 - head/usr.sbin/mptable From: NGie Cooper To: Bryan Drewery Cc: Baptiste Daroussin , "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: Thu, 22 Oct 2015 22:12:47 -0000 On Thu, Oct 22, 2015 at 2:24 PM, Bryan Drewery wrote: > On 10/22/15 2:22 PM, NGie Cooper wrote: ... >> -grope is a weird option name... and it sounds like something I really >> wouldn't want to describe to my boss. >> > > I *may* have violated the CoC due to this commit already. Yay. *hands bdrewery over to HR* :P From owner-svn-src-all@freebsd.org Thu Oct 22 22:29: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 90035A1CBD9; Thu, 22 Oct 2015 22:29: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 50E46F70; Thu, 22 Oct 2015 22:29: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 t9MMTP6b079347; Thu, 22 Oct 2015 22:29:25 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MMTPfG079346; Thu, 22 Oct 2015 22:29:25 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510222229.t9MMTPfG079346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 22 Oct 2015 22:29:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289772 - 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, 22 Oct 2015 22:29:26 -0000 Author: bdrewery Date: Thu Oct 22 22:29:25 2015 New Revision: 289772 URL: https://svnweb.freebsd.org/changeset/base/289772 Log: Fix installation of manpages with WITHOUT_COMPRESS broken since r284685. This partially reverts r284685. An attempt was made in r285295 to fix this but was not enough. There were still $${} vars in the code that should have been using the ${_page} and ${_sect} vars, but the bigger problem was that .for cannot be used on .ALLSRC as it is not defined when the .for is evaluated. Using ${MAN} here in a .for loop doesn't work either as the paths are not expanded right for lib/libc/ subdirs despite having a .PATH set for all of them. Add some comments around long .else and .endif as well. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.man.mk Modified: head/share/mk/bsd.man.mk ============================================================================== --- head/share/mk/bsd.man.mk Thu Oct 22 21:33:37 2015 (r289771) +++ head/share/mk/bsd.man.mk Thu Oct 22 22:29:25 2015 (r289772) @@ -104,8 +104,8 @@ ${__target}: ${__page} .endfor .endif .endfor -.endif -.else +.endif # !empty(MAN) +.else # !defined(MANFILTER) .if defined(MAN) && !empty(MAN) CLEANFILES+= ${MAN:T:S/$/${CATEXT}/g} .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) @@ -120,9 +120,9 @@ ${__target}: ${__page} _manpages: ${MAN} .endif .endif -.endif +.endif # defined(MANFILTER) -.else +.else # ${MK_MANCOMPRESS} == "yes" ZEXT= ${MCOMPRESS_EXT} @@ -169,7 +169,7 @@ ${__target}: ${__page} .endfor .endif -.endif +.endif # ${MK_MANCOMPRESS} == "no" maninstall: _maninstall _maninstall: @@ -185,20 +185,26 @@ _maninstall: ${MAN} ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page} .endif .endfor -.else -.for _page _sect in ${.ALLSRC:C/\.([^.]*)$/.\1 \1/} - @d=${DESTDIR}${MANDIR}${_sect}${MANSUBDIR}/; \ - ${ECHO} ${MINSTALL} ${_page} $${d}; \ - ${MINSTALL} $${page} $${d}; -.endfor +.else # !defined(MANFILTER) + @set ${.ALLSRC:C/\.([^.]*)$/.\1 \1/}; \ + while : ; do \ + case $$# in \ + 0) break;; \ + 1) echo "warn: missing extension: $$1"; break;; \ + esac; \ + page=$$1; shift; sect=$$1; shift; \ + d=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}; \ + ${ECHO} ${MINSTALL} $${page} $${d}; \ + ${MINSTALL} $${page} $${d}; \ + done .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) .for __page in ${MAN} ${MINSTALL} ${__page:T:S/$/${CATEXT}/} \ ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T} .endfor .endif -.endif -.else +.endif # defined(MANFILTER) +.else # ${MK_MANCOMPRESS} == "yes" .for __page in ${MAN} ${MINSTALL} ${__page:T:S/$/${MCOMPRESS_EXT}/g} \ ${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR}/ @@ -207,7 +213,7 @@ _maninstall: ${MAN} ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T:S/$/${MCOMPRESS_EXT}/} .endif .endfor -.endif +.endif # ${MK_MANCOMPRESS} == "no" .endif .if !defined(NO_MLINKS) && defined(MLINKS) && !empty(MLINKS) From owner-svn-src-all@freebsd.org Thu Oct 22 22:30: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 DC9FAA1CC79; Thu, 22 Oct 2015 22:30:39 +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 CA84512C6; Thu, 22 Oct 2015 22:30:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id C3444125B; Thu, 22 Oct 2015 22:30:39 +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 8B56812EB3; Thu, 22 Oct 2015 22:30:39 +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 iSMg6Wlfu85C; Thu, 22 Oct 2015 22:30:37 +0000 (UTC) Subject: Re: svn commit: r289772 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 0497F12EAC To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510222229.t9MMTPfG079346@repo.freebsd.org> From: Bryan Drewery Organization: FreeBSD Message-ID: <5629638C.6000703@FreeBSD.org> Date: Thu, 22 Oct 2015 15:30:36 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510222229.t9MMTPfG079346@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 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: Thu, 22 Oct 2015 22:30:40 -0000 On 10/22/15 3:29 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Thu Oct 22 22:29:25 2015 > New Revision: 289772 > URL: https://svnweb.freebsd.org/changeset/base/289772 > > Log: > Fix installation of manpages with WITHOUT_COMPRESS broken since r284685. WITHOUT_MANCOMPRESS of course. -- Regards, Bryan Drewery From owner-svn-src-all@freebsd.org Thu Oct 22 22:33: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 B221FA1CE1F; Thu, 22 Oct 2015 22:33:24 +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 9FFB0163E; Thu, 22 Oct 2015 22:33:24 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 98C4913F1; Thu, 22 Oct 2015 22:33:24 +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 58D7612EE8; Thu, 22 Oct 2015 22:33:24 +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 tHihrGuBFfXZ; Thu, 22 Oct 2015 22:33:22 +0000 (UTC) Subject: Re: svn commit: r289772 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 022A712EE2 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510222229.t9MMTPfG079346@repo.freebsd.org> From: Bryan Drewery Organization: FreeBSD Message-ID: <56296431.60006@FreeBSD.org> Date: Thu, 22 Oct 2015 15:33:21 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510222229.t9MMTPfG079346@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 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: Thu, 22 Oct 2015 22:33:24 -0000 On 10/22/15 3:29 PM, Bryan Drewery wrote: > .endif > .endfor > -.endif > +.endif # ${MK_MANCOMPRESS} == "no" > .endif > > .if !defined(NO_MLINKS) && defined(MLINKS) && !empty(MLINKS) This shows oddly with local 'svn diff' using svn 1.9.2: # svn diff -c r289772 <...> .endif .endfor +.endif # ${MK_MANCOMPRESS} == "no" .endif -.endif .if !defined(NO_MLINKS) && defined(MLINKS) && !empty(MLINKS) .for _oname _osect _dname _dsect in ${MLINKS:C/\.([^.]*)$/.\1 \1/} -- Regards, Bryan Drewery From owner-svn-src-all@freebsd.org Thu Oct 22 23:03: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 8E1FEA1C36E; Thu, 22 Oct 2015 23:03:08 +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 556351F4; Thu, 22 Oct 2015 23:03:08 +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 t9MN377T093849; Thu, 22 Oct 2015 23:03:07 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MN37D2093845; Thu, 22 Oct 2015 23:03:07 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510222303.t9MN37D2093845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 22 Oct 2015 23:03:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289773 - in head: sbin/sysctl sys/kern sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2015 23:03:08 -0000 Author: cem Date: Thu Oct 22 23:03:06 2015 New Revision: 289773 URL: https://svnweb.freebsd.org/changeset/base/289773 Log: Sysctl: Add common support for U8, U16 types Sponsored by: EMC / Isilon Storage Division Modified: head/sbin/sysctl/sysctl.c head/sys/kern/kern_sysctl.c head/sys/sys/sysctl.h Modified: head/sbin/sysctl/sysctl.c ============================================================================== --- head/sbin/sysctl/sysctl.c Thu Oct 22 22:29:25 2015 (r289772) +++ head/sbin/sysctl/sysctl.c Thu Oct 22 23:03:06 2015 (r289773) @@ -96,6 +96,8 @@ static int ctl_size[CTLTYPE+1] = { [CTLTYPE_ULONG] = sizeof(u_long), [CTLTYPE_S64] = sizeof(int64_t), [CTLTYPE_U64] = sizeof(uint64_t), + [CTLTYPE_U8] = sizeof(uint8_t), + [CTLTYPE_U16] = sizeof(uint16_t), }; static const char *ctl_typename[CTLTYPE+1] = { @@ -105,6 +107,8 @@ static const char *ctl_typename[CTLTYPE+ [CTLTYPE_ULONG] = "unsigned long", [CTLTYPE_S64] = "int64_t", [CTLTYPE_U64] = "uint64_t", + [CTLTYPE_U8] = "uint8_t", + [CTLTYPE_U16] = "uint16_t", }; static void @@ -221,6 +225,8 @@ parse(const char *string, int lineno) int len, i, j; const void *newval; const char *newvalstr = NULL; + uint8_t u8val; + uint16_t u16val; int intval; unsigned int uintval; long longval; @@ -322,6 +328,8 @@ parse(const char *string, int lineno) } switch (kind & CTLTYPE) { + case CTLTYPE_U8: + case CTLTYPE_U16: case CTLTYPE_INT: case CTLTYPE_UINT: case CTLTYPE_LONG: @@ -345,6 +353,16 @@ parse(const char *string, int lineno) errno = 0; switch (kind & CTLTYPE) { + case CTLTYPE_U8: + u8val = (uint8_t)strtoul(newvalstr, &endptr, 0); + newval = &u8val; + newsize = sizeof(u8val); + break; + case CTLTYPE_U16: + u16val = (uint16_t)strtoul(newvalstr, &endptr, 0); + newval = &u16val; + newsize = sizeof(u16val); + break; case CTLTYPE_INT: if (strncmp(fmt, "IK", 2) == 0) intval = strIKtoi(newvalstr, &endptr, fmt); @@ -890,6 +908,8 @@ show_var(int *oid, int nlen) free(oval); return (0); + case CTLTYPE_U8: + case CTLTYPE_U16: case CTLTYPE_INT: case CTLTYPE_UINT: case CTLTYPE_LONG: @@ -902,6 +922,14 @@ show_var(int *oid, int nlen) sep1 = ""; while (len >= intlen) { switch (kind & CTLTYPE) { + case CTLTYPE_U8: + umv = *(uint8_t *)p; + mv = *(int8_t *)p; + break; + case CTLTYPE_U16: + umv = *(uint16_t *)p; + mv = *(int16_t *)p; + break; case CTLTYPE_INT: case CTLTYPE_UINT: umv = *(u_int *)p; Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Thu Oct 22 22:29:25 2015 (r289772) +++ head/sys/kern/kern_sysctl.c Thu Oct 22 23:03:06 2015 (r289773) @@ -1128,6 +1128,70 @@ static SYSCTL_NODE(_sysctl, 5, oiddescr, */ /* + * Handle an int8_t, signed or unsigned. + * Two cases: + * a variable: point arg1 at it. + * a constant: pass it in arg2. + */ + +int +sysctl_handle_8(SYSCTL_HANDLER_ARGS) +{ + int8_t tmpout; + int error = 0; + + /* + * Attempt to get a coherent snapshot by making a copy of the data. + */ + if (arg1) + tmpout = *(int8_t *)arg1; + else + tmpout = arg2; + error = SYSCTL_OUT(req, &tmpout, sizeof(tmpout)); + + if (error || !req->newptr) + return (error); + + if (!arg1) + error = EPERM; + else + error = SYSCTL_IN(req, arg1, sizeof(tmpout)); + return (error); +} + +/* + * Handle an int16_t, signed or unsigned. + * Two cases: + * a variable: point arg1 at it. + * a constant: pass it in arg2. + */ + +int +sysctl_handle_16(SYSCTL_HANDLER_ARGS) +{ + int16_t tmpout; + int error = 0; + + /* + * Attempt to get a coherent snapshot by making a copy of the data. + */ + if (arg1) + tmpout = *(int16_t *)arg1; + else + tmpout = arg2; + error = SYSCTL_OUT(req, &tmpout, sizeof(tmpout)); + + if (error || !req->newptr) + return (error); + + if (!arg1) + error = EPERM; + else + error = SYSCTL_IN(req, arg1, sizeof(tmpout)); + return (error); +} + +/* * Handle an int, signed or unsigned. * Two cases: * a variable: point arg1 at it. Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Thu Oct 22 22:29:25 2015 (r289772) +++ head/sys/sys/sysctl.h Thu Oct 22 23:03:06 2015 (r289773) @@ -73,6 +73,8 @@ struct ctlname { #define CTLTYPE_LONG 7 /* name describes a long */ #define CTLTYPE_ULONG 8 /* name describes an unsigned long */ #define CTLTYPE_U64 9 /* name describes an unsigned 64-bit number */ +#define CTLTYPE_U8 0xa /* name describes an unsigned 8-bit number */ +#define CTLTYPE_U16 0xb /* name describes an unsigned 16-bit number */ #define CTLFLAG_RD 0x80000000 /* Allow reads of variable */ #define CTLFLAG_WR 0x40000000 /* Allow writes to the variable */ @@ -188,6 +190,8 @@ struct sysctl_oid { #define SYSCTL_OUT(r, p, l) (r->oldfunc)(r, p, l) #define SYSCTL_OUT_STR(r, p) (r->oldfunc)(r, p, strlen(p) + 1) +int sysctl_handle_8(SYSCTL_HANDLER_ARGS); +int sysctl_handle_16(SYSCTL_HANDLER_ARGS); int sysctl_handle_int(SYSCTL_HANDLER_ARGS); int sysctl_msec_to_ticks(SYSCTL_HANDLER_ARGS); int sysctl_handle_long(SYSCTL_HANDLER_ARGS); @@ -319,6 +323,46 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e __arg, len, sysctl_handle_string, "A", __DESCR(descr)); \ }) +/* Oid for an unsigned 8-bit int. If ptr is NULL, val is returned. */ +#define SYSCTL_NULL_U8_PTR ((unsigned *)NULL) +#define SYSCTL_U8(parent, nbr, name, access, ptr, val, descr) \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_U8 | CTLFLAG_MPSAFE | (access), \ + ptr, val, sysctl_handle_8, "CU", descr); \ + CTASSERT((((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U8) && \ + sizeof(uint8_t) == sizeof(*(ptr))) + +#define SYSCTL_ADD_U8(ctx, parent, nbr, name, access, ptr, val, descr) \ +({ \ + uint8_t *__ptr = (ptr); \ + CTASSERT(((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U8); \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_U8 | CTLFLAG_MPSAFE | (access), \ + __ptr, val, sysctl_handle_8, "CU", __DESCR(descr)); \ +}) + +/* Oid for an unsigned 16-bit int. If ptr is NULL, val is returned. */ +#define SYSCTL_NULL_U16_PTR ((unsigned *)NULL) +#define SYSCTL_U16(parent, nbr, name, access, ptr, val, descr) \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_U16 | CTLFLAG_MPSAFE | (access), \ + ptr, val, sysctl_handle_16, "SU", descr); \ + CTASSERT((((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U16) && \ + sizeof(uint16_t) == sizeof(*(ptr))) + +#define SYSCTL_ADD_U16(ctx, parent, nbr, name, access, ptr, val, descr) \ +({ \ + uint16_t *__ptr = (ptr); \ + CTASSERT(((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U16); \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_U16 | CTLFLAG_MPSAFE | (access), \ + __ptr, val, sysctl_handle_16, "SU", __DESCR(descr)); \ +}) + /* Oid for an int. If ptr is SYSCTL_NULL_INT_PTR, val is returned. */ #define SYSCTL_NULL_INT_PTR ((int *)NULL) #define SYSCTL_INT(parent, nbr, name, access, ptr, val, descr) \ From owner-svn-src-all@freebsd.org Thu Oct 22 23:03: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 7DE37A1C3A8; Thu, 22 Oct 2015 23:03:17 +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 44D45376; Thu, 22 Oct 2015 23:03:17 +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 t9MN3Gft093915; Thu, 22 Oct 2015 23:03:16 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MN3GZK093912; Thu, 22 Oct 2015 23:03:16 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510222303.t9MN3GZK093912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 22 Oct 2015 23:03:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289774 - 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: Thu, 22 Oct 2015 23:03:17 -0000 Author: cem Date: Thu Oct 22 23:03:15 2015 New Revision: 289774 URL: https://svnweb.freebsd.org/changeset/base/289774 Log: NTB: Add device introspection sysctl hierarchy This should export all of the same information as the Linux ntb_hw_intel debugfs info file, but with a bit more structure, in the sysctl tree rooted at 'dev.ntb_hw..debug_info'. Raw registers are marked as OPAQUE because reading them on some hardware revisions may cause a hard lockup (NTB errata). They can be read with 'sysctl -x dev.ntb_hw..debug_info.registers'. On Xeon platforms, some additional registers are available under 'registers.xeon_stats' and 'registers.xeon_hw_err'. They are exported as big-endian values so that the 'sysctl -x' output is legible. Shrink the feature mask to 32 bits so we can use the %b formatter in 'debug_info.features'. 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 head/sys/dev/ntb/ntb_hw/ntb_regs.h Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Oct 22 23:03:06 2015 (r289773) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Oct 22 23:03:15 2015 (r289774) @@ -32,10 +32,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -168,7 +170,7 @@ struct ntb_b2b_addr { struct ntb_softc { device_t device; enum ntb_device_type type; - uint64_t features; + uint32_t features; struct ntb_pci_bar_info bar_info[NTB_MAX_BARS]; struct ntb_int_info int_info[MAX_MSIX_INTERRUPTS]; @@ -309,6 +311,10 @@ static void ntb_db_event(struct ntb_soft static void recover_atom_link(void *arg); static bool ntb_poll_link(struct ntb_softc *ntb); static void save_bar_parameters(struct ntb_pci_bar_info *bar); +static void ntb_sysctl_init(struct ntb_softc *); +static int sysctl_handle_features(SYSCTL_HANDLER_ARGS); +static int sysctl_handle_link_status(SYSCTL_HANDLER_ARGS); +static int sysctl_handle_register(SYSCTL_HANDLER_ARGS); static struct ntb_hw_info pci_ids[] = { /* XXX: PS/SS IDs left out until they are supported. */ @@ -528,6 +534,7 @@ ntb_attach(device_t device) error = ntb_init_isr(ntb); if (error) goto out; + ntb_sysctl_init(ntb); pci_enable_busmaster(ntb->device); @@ -1897,6 +1904,355 @@ ntb_link_sta_width(struct ntb_softc *ntb return (NTB_LNK_STA_WIDTH(ntb->lnk_sta)); } +SYSCTL_NODE(_hw_ntb, OID_AUTO, debug_info, CTLFLAG_RW, 0, + "Driver state, statistics, and HW registers"); + +#define NTB_REGSZ_MASK (3ul << 30) +#define NTB_REG_64 (1ul << 30) +#define NTB_REG_32 (2ul << 30) +#define NTB_REG_16 (3ul << 30) +#define NTB_REG_8 (0ul << 30) + +#define NTB_DB_READ (1ul << 29) +#define NTB_PCI_REG (1ul << 28) +#define NTB_REGFLAGS_MASK (NTB_REGSZ_MASK | NTB_DB_READ | NTB_PCI_REG) + +static void +ntb_sysctl_init(struct ntb_softc *ntb) +{ + struct sysctl_oid_list *tree_par, *regpar, *statpar, *errpar; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree, *tmptree; + + ctx = device_get_sysctl_ctx(ntb->device); + + tree = SYSCTL_ADD_NODE(ctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(ntb->device)), OID_AUTO, + "debug_info", CTLFLAG_RD, NULL, + "Driver state, statistics, and HW registers"); + tree_par = SYSCTL_CHILDREN(tree); + + SYSCTL_ADD_UINT(ctx, tree_par, OID_AUTO, "conn_type", CTLFLAG_RD, + &ntb->conn_type, 0, "0 - Transparent; 1 - B2B; 2 - Root Port"); + SYSCTL_ADD_UINT(ctx, tree_par, OID_AUTO, "dev_type", CTLFLAG_RD, + &ntb->dev_type, 0, "0 - USD; 1 - DSD"); + + if (ntb->b2b_mw_idx != B2B_MW_DISABLED) { + SYSCTL_ADD_U8(ctx, tree_par, OID_AUTO, "b2b_idx", CTLFLAG_RD, + &ntb->b2b_mw_idx, 0, + "Index of the MW used for B2B remote register access"); + SYSCTL_ADD_UQUAD(ctx, tree_par, OID_AUTO, "b2b_off", + CTLFLAG_RD, &ntb->b2b_off, + "If non-zero, offset of B2B register region in shared MW"); + } + + SYSCTL_ADD_PROC(ctx, tree_par, OID_AUTO, "features", + CTLFLAG_RD | CTLTYPE_STRING, ntb, 0, sysctl_handle_features, "A", + "Features/errata of this NTB device"); + + SYSCTL_ADD_UINT(ctx, tree_par, OID_AUTO, "ntb_ctl", CTLFLAG_RD, + &ntb->ntb_ctl, 0, "NTB CTL register (cached)"); + SYSCTL_ADD_UINT(ctx, tree_par, OID_AUTO, "lnk_sta", CTLFLAG_RD, + &ntb->lnk_sta, 0, "LNK STA register (cached)"); + + SYSCTL_ADD_PROC(ctx, tree_par, OID_AUTO, "link_status", + CTLFLAG_RD | CTLTYPE_STRING, ntb, 0, sysctl_handle_link_status, + "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)"); + 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, + &ntb->db_count, 0, "Doorbell count"); + SYSCTL_ADD_U8(ctx, tree_par, OID_AUTO, "db_vec_count", CTLFLAG_RD, + &ntb->db_vec_count, 0, "Doorbell vector count"); + SYSCTL_ADD_U8(ctx, tree_par, OID_AUTO, "db_vec_shift", CTLFLAG_RD, + &ntb->db_vec_shift, 0, "Doorbell vector shift"); + + SYSCTL_ADD_UQUAD(ctx, tree_par, OID_AUTO, "db_valid_mask", CTLFLAG_RD, + &ntb->db_valid_mask, "Doorbell valid mask"); + SYSCTL_ADD_UQUAD(ctx, tree_par, OID_AUTO, "db_link_mask", CTLFLAG_RD, + &ntb->db_link_mask, "Doorbell link mask"); + SYSCTL_ADD_UQUAD(ctx, tree_par, OID_AUTO, "db_mask", CTLFLAG_RD, + &ntb->db_mask, "Doorbell mask (cached)"); + + tmptree = SYSCTL_ADD_NODE(ctx, tree_par, OID_AUTO, "registers", + CTLFLAG_RD, NULL, "Raw HW registers (big-endian)"); + regpar = SYSCTL_CHILDREN(tmptree); + + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "db_mask", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_64 | NTB_DB_READ | ntb->self_reg->db_mask, + sysctl_handle_register, "QU", "Doorbell mask register"); + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "db_bell", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_64 | NTB_DB_READ | ntb->self_reg->db_bell, + sysctl_handle_register, "QU", "Doorbell register"); + + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "incoming_xlat23", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_64 | ntb->xlat_reg->bar2_xlat, + sysctl_handle_register, "QU", "Incoming XLAT23 register"); + if (HAS_FEATURE(NTB_SPLIT_BAR)) { + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "incoming_xlat4", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_32 | ntb->xlat_reg->bar4_xlat, + sysctl_handle_register, "IU", "Incoming XLAT4 register"); + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "incoming_xlat5", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_32 | ntb->xlat_reg->bar5_xlat, + sysctl_handle_register, "IU", "Incoming XLAT5 register"); + } else { + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "incoming_xlat45", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_64 | ntb->xlat_reg->bar4_xlat, + sysctl_handle_register, "QU", "Incoming XLAT45 register"); + } + + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "incoming_lmt23", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_64 | ntb->xlat_reg->bar2_limit, + sysctl_handle_register, "QU", "Incoming LMT23 register"); + if (HAS_FEATURE(NTB_SPLIT_BAR)) { + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "incoming_lmt4", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_32 | ntb->xlat_reg->bar4_limit, + sysctl_handle_register, "IU", "Incoming LMT4 register"); + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "incoming_lmt5", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_32 | ntb->xlat_reg->bar5_limit, + sysctl_handle_register, "IU", "Incoming LMT5 register"); + } else { + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "incoming_lmt45", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_64 | ntb->xlat_reg->bar4_limit, + sysctl_handle_register, "QU", "Incoming LMT45 register"); + } + + if (ntb->type == NTB_ATOM) + return; + + tmptree = SYSCTL_ADD_NODE(ctx, regpar, OID_AUTO, "xeon_stats", + CTLFLAG_RD, NULL, "Xeon HW statistics"); + statpar = SYSCTL_CHILDREN(tmptree); + SYSCTL_ADD_PROC(ctx, statpar, OID_AUTO, "upstream_mem_miss", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_16 | XEON_USMEMMISS_OFFSET, + sysctl_handle_register, "SU", "Upstream Memory Miss"); + + tmptree = SYSCTL_ADD_NODE(ctx, regpar, OID_AUTO, "xeon_hw_err", + CTLFLAG_RD, NULL, "Xeon HW errors"); + errpar = SYSCTL_CHILDREN(tmptree); + + SYSCTL_ADD_PROC(ctx, errpar, OID_AUTO, "devsts", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_16 | NTB_PCI_REG | XEON_DEVSTS_OFFSET, + sysctl_handle_register, "SU", "DEVSTS"); + SYSCTL_ADD_PROC(ctx, errpar, OID_AUTO, "lnksts", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_16 | NTB_PCI_REG | XEON_LINK_STATUS_OFFSET, + sysctl_handle_register, "SU", "LNKSTS"); + SYSCTL_ADD_PROC(ctx, errpar, OID_AUTO, "uncerrsts", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_32 | NTB_PCI_REG | XEON_UNCERRSTS_OFFSET, + sysctl_handle_register, "IU", "UNCERRSTS"); + SYSCTL_ADD_PROC(ctx, errpar, OID_AUTO, "corerrsts", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_32 | NTB_PCI_REG | XEON_CORERRSTS_OFFSET, + sysctl_handle_register, "IU", "CORERRSTS"); + + if (ntb->conn_type != NTB_CONN_B2B) + return; + + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "outgoing_xlat23", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_64 | ntb->bar_info[NTB_B2B_BAR_1].pbarxlat_off, + sysctl_handle_register, "QU", "Outgoing XLAT23 register"); + if (HAS_FEATURE(NTB_SPLIT_BAR)) { + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "outgoing_xlat4", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_32 | ntb->bar_info[NTB_B2B_BAR_2].pbarxlat_off, + sysctl_handle_register, "IU", "Outgoing XLAT4 register"); + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "outgoing_xlat5", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_32 | ntb->bar_info[NTB_B2B_BAR_3].pbarxlat_off, + sysctl_handle_register, "IU", "Outgoing XLAT5 register"); + } else { + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "outgoing_xlat45", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_64 | ntb->bar_info[NTB_B2B_BAR_2].pbarxlat_off, + sysctl_handle_register, "QU", "Outgoing XLAT45 register"); + } + + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "outgoing_lmt23", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_64 | XEON_PBAR2LMT_OFFSET, + sysctl_handle_register, "QU", "Outgoing LMT23 register"); + if (HAS_FEATURE(NTB_SPLIT_BAR)) { + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "outgoing_lmt4", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_32 | XEON_PBAR4LMT_OFFSET, + sysctl_handle_register, "IU", "Outgoing LMT4 register"); + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "outgoing_lmt5", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_32 | XEON_PBAR5LMT_OFFSET, + sysctl_handle_register, "IU", "Outgoing LMT5 register"); + } else { + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "outgoing_lmt45", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_64 | XEON_PBAR4LMT_OFFSET, + sysctl_handle_register, "QU", "Outgoing LMT45 register"); + } + + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "sbar01_base", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_64 | ntb->xlat_reg->bar0_base, + sysctl_handle_register, "QU", "Secondary BAR01 base register"); + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "sbar23_base", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_64 | ntb->xlat_reg->bar2_base, + sysctl_handle_register, "QU", "Secondary BAR23 base register"); + if (HAS_FEATURE(NTB_SPLIT_BAR)) { + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "sbar4_base", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_32 | ntb->xlat_reg->bar4_base, + sysctl_handle_register, "IU", + "Secondary BAR4 base register"); + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "sbar5_base", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_32 | ntb->xlat_reg->bar5_base, + sysctl_handle_register, "IU", + "Secondary BAR5 base register"); + } else { + SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "sbar45_base", + CTLFLAG_RD | CTLTYPE_OPAQUE, ntb, + NTB_REG_64 | ntb->xlat_reg->bar4_base, + sysctl_handle_register, "QU", + "Secondary BAR45 base register"); + } +} + +static int +sysctl_handle_features(SYSCTL_HANDLER_ARGS) +{ + struct ntb_softc *ntb; + struct sbuf sb; + int error; + + error = 0; + ntb = arg1; + + sbuf_new_for_sysctl(&sb, NULL, 256, req); + + sbuf_printf(&sb, "%b", ntb->features, NTB_FEATURES_STR); + error = sbuf_finish(&sb); + sbuf_delete(&sb); + + if (error || !req->newptr) + return (error); + return (EINVAL); +} + +static int +sysctl_handle_link_status(SYSCTL_HANDLER_ARGS) +{ + struct ntb_softc *ntb; + struct sbuf sb; + enum ntb_speed speed; + enum ntb_width width; + int error; + + error = 0; + ntb = arg1; + + sbuf_new_for_sysctl(&sb, NULL, 32, req); + + if (ntb_link_is_up(ntb, &speed, &width)) + sbuf_printf(&sb, "up / PCIe Gen %u / Width x%u", + (unsigned)speed, (unsigned)width); + else + sbuf_printf(&sb, "down"); + + error = sbuf_finish(&sb); + sbuf_delete(&sb); + + if (error || !req->newptr) + return (error); + return (EINVAL); +} + +static int +sysctl_handle_register(SYSCTL_HANDLER_ARGS) +{ + struct ntb_softc *ntb; + const void *outp; + uintptr_t sz; + uint64_t umv; + char be[sizeof(umv)]; + size_t outsz; + uint32_t reg; + bool db, pci; + int error; + + ntb = arg1; + reg = arg2 & ~NTB_REGFLAGS_MASK; + sz = arg2 & NTB_REGSZ_MASK; + db = (arg2 & NTB_DB_READ) != 0; + pci = (arg2 & NTB_PCI_REG) != 0; + + KASSERT(!(db && pci), ("bogus")); + + if (db) { + KASSERT(sz == NTB_REG_64, ("bogus")); + umv = db_ioread(ntb, reg); + outsz = sizeof(uint64_t); + } else { + switch (sz) { + case NTB_REG_64: + if (pci) + umv = pci_read_config(ntb->device, reg, 8); + else + umv = ntb_reg_read(8, reg); + outsz = sizeof(uint64_t); + break; + case NTB_REG_32: + if (pci) + umv = pci_read_config(ntb->device, reg, 4); + else + umv = ntb_reg_read(4, reg); + outsz = sizeof(uint32_t); + break; + case NTB_REG_16: + if (pci) + umv = pci_read_config(ntb->device, reg, 2); + else + umv = ntb_reg_read(2, reg); + outsz = sizeof(uint16_t); + break; + case NTB_REG_8: + if (pci) + umv = pci_read_config(ntb->device, reg, 1); + else + umv = ntb_reg_read(1, reg); + outsz = sizeof(uint8_t); + break; + default: + panic("bogus"); + break; + } + } + + /* Encode bigendian so that sysctl -x is legible. */ + be64enc(be, umv); + outp = ((char *)be) + sizeof(umv) - outsz; + + error = SYSCTL_OUT(req, outp, outsz); + if (error || !req->newptr) + return (error); + return (EINVAL); +} + /* * Public API to the rest of the OS */ @@ -2319,7 +2675,7 @@ ntb_get_device(struct ntb_softc *ntb) /* Export HW-specific errata information. */ bool -ntb_has_feature(struct ntb_softc *ntb, uint64_t feature) +ntb_has_feature(struct ntb_softc *ntb, uint32_t feature) { return (HAS_FEATURE(feature)); Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.h Thu Oct 22 23:03:06 2015 (r289773) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.h Thu Oct 22 23:03:15 2015 (r289774) @@ -99,13 +99,18 @@ uint64_t ntb_db_read(struct ntb_softc *) void ntb_db_set_mask(struct ntb_softc *, uint64_t bits); void ntb_peer_db_set(struct ntb_softc *, uint64_t bits); -/* Hardware owns the low 32 bits of features. */ +/* Hardware owns the low 16 bits of features. */ #define NTB_BAR_SIZE_4K (1 << 0) #define NTB_SDOORBELL_LOCKUP (1 << 1) #define NTB_SB01BASE_LOCKUP (1 << 2) #define NTB_B2BDOORBELL_BIT14 (1 << 3) -/* Software/configuration owns the top 32 bits. */ -#define NTB_SPLIT_BAR (1ull << 32) -bool ntb_has_feature(struct ntb_softc *, uint64_t); +/* Software/configuration owns the top 16 bits. */ +#define NTB_SPLIT_BAR (1ull << 16) + +#define NTB_FEATURES_STR \ + "\20\21SPLIT_BAR4\04B2B_DOORBELL_BIT14\03SB01BASE_LOCKUP" \ + "\02SDOORBELL_LOCKUP\01BAR_SIZE_4K" + +bool ntb_has_feature(struct ntb_softc *, uint32_t); #endif /* _NTB_HW_H_ */ Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_regs.h Thu Oct 22 23:03:06 2015 (r289773) +++ head/sys/dev/ntb/ntb_hw/ntb_regs.h Thu Oct 22 23:03:15 2015 (r289774) @@ -47,6 +47,7 @@ #define XEON_PCICMD_OFFSET 0x0504 #define XEON_DEVCTRL_OFFSET 0x0598 +#define XEON_DEVSTS_OFFSET 0x059a #define XEON_LINK_STATUS_OFFSET 0x01a2 #define XEON_SLINK_STATUS_OFFSET 0x05a2 @@ -72,10 +73,12 @@ #define XEON_PDBMSK_OFFSET 0x0062 #define XEON_SDOORBELL_OFFSET 0x0064 #define XEON_SDBMSK_OFFSET 0x0066 -#define XEON_USMEMMISS 0x0070 +#define XEON_USMEMMISS_OFFSET 0x0070 #define XEON_SPAD_OFFSET 0x0080 #define XEON_SPADSEMA4_OFFSET 0x00c0 #define XEON_WCCNTRL_OFFSET 0x00e0 +#define XEON_UNCERRSTS_OFFSET 0x014c +#define XEON_CORERRSTS_OFFSET 0x0158 #define XEON_B2B_SPAD_OFFSET 0x0100 #define XEON_B2B_DOORBELL_OFFSET 0x0140 #define XEON_B2B_XLAT_OFFSETL 0x0144 From owner-svn-src-all@freebsd.org Thu Oct 22 23:03: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 1534FA1C3DF; Thu, 22 Oct 2015 23:03:26 +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 D49AB6EB; Thu, 22 Oct 2015 23:03:25 +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 t9MN3O0h093982; Thu, 22 Oct 2015 23:03:24 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MN3Onh093981; Thu, 22 Oct 2015 23:03:24 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510222303.t9MN3Onh093981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 22 Oct 2015 23:03:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289775 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 23:03:26 -0000 Author: cem Date: Thu Oct 22 23:03:24 2015 New Revision: 289775 URL: https://svnweb.freebsd.org/changeset/base/289775 Log: if_ntb: Use ffsll() now that it is broadly available Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Thu Oct 22 23:03:15 2015 (r289774) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Thu Oct 22 23:03:24 2015 (r289775) @@ -1150,14 +1150,7 @@ ntb_transport_doorbell_callback(void *da vec_mask = ntb_db_vector_mask(nt->ntb, vector); while (vec_mask != 0) { - qp_num = ffsl(vec_mask); - /* i386 doesn't have ffsll(), fake it */ - if (qp_num == 0) { - qp_num = ffsl(vec_mask >> 32); - KASSERT(qp_num != 0, ("ffs")); - qp_num += 32; - } - qp_num--; + qp_num = ffsll(vec_mask) - 1; if (test_bit(qp_num, &db_bits)) { qp = &nt->qp_vec[qp_num]; From owner-svn-src-all@freebsd.org Thu Oct 22 23:03: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 0F91DA1C42C; Thu, 22 Oct 2015 23:03:35 +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 C7762895; Thu, 22 Oct 2015 23:03:34 +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 t9MN3XoM094046; Thu, 22 Oct 2015 23:03:33 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MN3XIm094043; Thu, 22 Oct 2015 23:03:33 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510222303.t9MN3XIm094043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 22 Oct 2015 23:03:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289776 - head/sys/dev/ioat X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 23:03:35 -0000 Author: cem Date: Thu Oct 22 23:03:33 2015 New Revision: 289776 URL: https://svnweb.freebsd.org/changeset/base/289776 Log: ioat: Clean up logging Replace custom Linux-like logging with a thin shim around device_printf(), when the softc is available. In ioat_test, shim around printf(9) instead. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat.c head/sys/dev/ioat/ioat_internal.h head/sys/dev/ioat/ioat_test.c Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Thu Oct 22 23:03:24 2015 (r289775) +++ head/sys/dev/ioat/ioat.c Thu Oct 22 23:03:33 2015 (r289776) @@ -80,6 +80,12 @@ static void ioat_comp_update_map(void *a static int ioat_reset_hw(struct ioat_softc *ioat); static void ioat_setup_sysctl(device_t device); +#define ioat_log_message(v, ...) do { \ + if ((v) <= g_ioat_debug_level) { \ + device_printf(ioat->device, __VA_ARGS__); \ + } \ +} while (0) + MALLOC_DEFINE(M_IOAT, "ioat", "ioat driver memory allocations"); SYSCTL_NODE(_hw, OID_AUTO, ioat, CTLFLAG_RD, 0, "ioat node"); @@ -87,7 +93,7 @@ static int g_force_legacy_interrupts; SYSCTL_INT(_hw_ioat, OID_AUTO, force_legacy_interrupts, CTLFLAG_RDTUN, &g_force_legacy_interrupts, 0, "Set to non-zero to force MSI-X disabled"); -static int g_ioat_debug_level = 0; +int g_ioat_debug_level = 0; SYSCTL_INT(_hw_ioat, OID_AUTO, debug_level, CTLFLAG_RWTUN, &g_ioat_debug_level, 0, "Set log level (0-3) for ioat(4). Higher is more verbose."); @@ -614,8 +620,8 @@ ioat_release(bus_dmaengine_t dmaengine) { struct ioat_softc *ioat; - ioat_log_message(3, "%s\n", __func__); ioat = to_ioat_softc(dmaengine); + ioat_log_message(3, "%s\n", __func__); ioat_write_2(ioat, IOAT_DMACOUNT_OFFSET, (uint16_t)ioat->head); mtx_unlock(&ioat->submit_lock); } @@ -1035,21 +1041,3 @@ ioat_setup_sysctl(device_t device) "tail", CTLFLAG_RD, &ioat->tail, 0, "HW descriptor tail pointer index"); } - -void -ioat_log_message(int verbosity, char *fmt, ...) -{ - va_list argp; - char buffer[512]; - struct timeval tv; - - if (verbosity > g_ioat_debug_level) - return; - - va_start(argp, fmt); - vsnprintf(buffer, sizeof(buffer) - 1, fmt, argp); - va_end(argp); - microuptime(&tv); - - printf("[%d:%06d] ioat: %s", (int)tv.tv_sec, (int)tv.tv_usec, buffer); -} Modified: head/sys/dev/ioat/ioat_internal.h ============================================================================== --- head/sys/dev/ioat/ioat_internal.h Thu Oct 22 23:03:24 2015 (r289775) +++ head/sys/dev/ioat/ioat_internal.h Thu Oct 22 23:03:33 2015 (r289776) @@ -119,7 +119,7 @@ MALLOC_DECLARE(M_IOAT); SYSCTL_DECL(_hw_ioat); -void ioat_log_message(int verbosity, char *fmt, ...); +extern int g_ioat_debug_level; struct ioat_dma_hw_descriptor { uint32_t size; Modified: head/sys/dev/ioat/ioat_test.c ============================================================================== --- head/sys/dev/ioat/ioat_test.c Thu Oct 22 23:03:24 2015 (r289775) +++ head/sys/dev/ioat/ioat_test.c Thu Oct 22 23:03:33 2015 (r289776) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -76,6 +77,9 @@ MTX_SYSINIT(ioat_test_lk, &ioat_test_lk, static int g_thread_index = 1; static struct cdev *g_ioat_cdev = NULL; +#define ioat_test_log(v, ...) _ioat_test_log((v), "ioat " __VA_ARGS__) +static inline void _ioat_test_log(int verbosity, const char *fmt, ...); + static void ioat_test_transaction_destroy(struct test_transaction *tx) { @@ -138,7 +142,7 @@ ioat_dma_test_callback(void *arg) test = tx->test; if (test->verify && !ioat_compare_ok(tx)) { - ioat_log_message(0, "miscompare found\n"); + ioat_test_log(0, "miscompare found\n"); atomic_add_32(&test->status[IOAT_TEST_MISCOMPARE], tx->depth); } else if (!test->too_late) atomic_add_32(&test->status[IOAT_TEST_OK], tx->depth); @@ -160,7 +164,7 @@ ioat_test_prealloc_memory(struct ioat_te tx = ioat_test_transaction_create(test->chain_depth * 2, test->buffer_size); if (tx == NULL) { - ioat_log_message(0, "tx == NULL - memory exhausted\n"); + ioat_test_log(0, "tx == NULL - memory exhausted\n"); test->status[IOAT_TEST_NO_MEMORY]++; return (ENOMEM); } @@ -248,13 +252,13 @@ ioat_dma_test(void *arg) memset(__DEVOLATILE(void *, test->status), 0, sizeof(test->status)); if (test->buffer_size > 1024 * 1024) { - ioat_log_message(0, "Buffer size too large >1MB\n"); + ioat_test_log(0, "Buffer size too large >1MB\n"); test->status[IOAT_TEST_NO_MEMORY]++; return; } if (test->chain_depth * 2 > IOAT_MAX_BUFS) { - ioat_log_message(0, "Depth too large (> %u)\n", + ioat_test_log(0, "Depth too large (> %u)\n", (unsigned)IOAT_MAX_BUFS / 2); test->status[IOAT_TEST_NO_MEMORY]++; return; @@ -262,14 +266,14 @@ ioat_dma_test(void *arg) if (btoc((uint64_t)test->buffer_size * test->chain_depth * test->transactions) > (physmem / 4)) { - ioat_log_message(0, "Sanity check failed -- test would " + ioat_test_log(0, "Sanity check failed -- test would " "use more than 1/4 of phys mem.\n"); test->status[IOAT_TEST_NO_MEMORY]++; return; } if ((uint64_t)test->transactions * test->chain_depth > (1<<16)) { - ioat_log_message(0, "Sanity check failed -- test would " + ioat_test_log(0, "Sanity check failed -- test would " "use more than available IOAT ring space.\n"); test->status[IOAT_TEST_NO_MEMORY]++; return; @@ -277,7 +281,7 @@ ioat_dma_test(void *arg) dmaengine = ioat_get_dmaengine(test->channel_index); if (dmaengine == NULL) { - ioat_log_message(0, "Couldn't acquire dmaengine\n"); + ioat_test_log(0, "Couldn't acquire dmaengine\n"); test->status[IOAT_TEST_NO_DMA_ENGINE]++; return; } @@ -287,14 +291,14 @@ ioat_dma_test(void *arg) TAILQ_INIT(&test->pend_q); if (test->duration == 0) - ioat_log_message(1, "Thread %d: num_loops remaining: 0x%08x\n", + ioat_test_log(1, "Thread %d: num_loops remaining: 0x%08x\n", index, test->transactions); else - ioat_log_message(1, "Thread %d: starting\n", index); + ioat_test_log(1, "Thread %d: starting\n", index); rc = ioat_test_prealloc_memory(test, index); if (rc != 0) { - ioat_log_message(0, "prealloc_memory: %d\n", rc); + ioat_test_log(0, "prealloc_memory: %d\n", rc); return; } wmb(); @@ -314,7 +318,7 @@ ioat_dma_test(void *arg) ioat_test_submit_1_tx(test, dmaengine); } - ioat_log_message(1, "Test Elapsed: %d ticks (overrun %d), %d sec.\n", + ioat_test_log(1, "Test Elapsed: %d ticks (overrun %d), %d sec.\n", ticks - start, ticks - end, (ticks - start) / hz); IT_LOCK(); @@ -322,7 +326,7 @@ ioat_dma_test(void *arg) msleep(&test->free_q, &ioat_test_lk, 0, "ioattestcompl", hz); IT_UNLOCK(); - ioat_log_message(1, "Test Elapsed2: %d ticks (overrun %d), %d sec.\n", + ioat_test_log(1, "Test Elapsed2: %d ticks (overrun %d), %d sec.\n", ticks - start, ticks - end, (ticks - start) / hz); ioat_test_release_memory(test); @@ -421,3 +425,16 @@ ioat_test_detach(void) enable_ioat_test(false); mtx_unlock(&Giant); } + +static inline void +_ioat_test_log(int verbosity, const char *fmt, ...) +{ + va_list argp; + + if (verbosity > g_ioat_debug_level) + return; + + va_start(argp, fmt); + vprintf(fmt, argp); + va_end(argp); +} From owner-svn-src-all@freebsd.org Thu Oct 22 23:08: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 F1EF9A1C5D5; Thu, 22 Oct 2015 23:08:09 +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 BD32EBCF; Thu, 22 Oct 2015 23:08: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 t9MN88vu094692; Thu, 22 Oct 2015 23:08:08 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MN88tE094691; Thu, 22 Oct 2015 23:08:08 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510222308.t9MN88tE094691@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 22 Oct 2015 23:08:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289777 - head/sys/dev/ioat X-SVN-Group: head MIME-Version: 1.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, 22 Oct 2015 23:08:10 -0000 Author: cem Date: Thu Oct 22 23:08:08 2015 New Revision: 289777 URL: https://svnweb.freebsd.org/changeset/base/289777 Log: ioat_test: Add a colon (':') for style Missed in r289776. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat_test.c Modified: head/sys/dev/ioat/ioat_test.c ============================================================================== --- head/sys/dev/ioat/ioat_test.c Thu Oct 22 23:03:33 2015 (r289776) +++ head/sys/dev/ioat/ioat_test.c Thu Oct 22 23:08:08 2015 (r289777) @@ -77,7 +77,7 @@ MTX_SYSINIT(ioat_test_lk, &ioat_test_lk, static int g_thread_index = 1; static struct cdev *g_ioat_cdev = NULL; -#define ioat_test_log(v, ...) _ioat_test_log((v), "ioat " __VA_ARGS__) +#define ioat_test_log(v, ...) _ioat_test_log((v), "ioat_test: " __VA_ARGS__) static inline void _ioat_test_log(int verbosity, const char *fmt, ...); static void From owner-svn-src-all@freebsd.org Thu Oct 22 23:41: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 7B920A1CC5B; Thu, 22 Oct 2015 23:41: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 4312F1A2E; Thu, 22 Oct 2015 23:41: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 t9MNfuQZ007466; Thu, 22 Oct 2015 23:41:56 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MNfuNK007465; Thu, 22 Oct 2015 23:41:56 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510222341.t9MNfuNK007465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 22 Oct 2015 23:41:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289778 - 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, 22 Oct 2015 23:41:57 -0000 Author: bdrewery Date: Thu Oct 22 23:41:56 2015 New Revision: 289778 URL: https://svnweb.freebsd.org/changeset/base/289778 Log: For SUBDIR_PARALLEL, when doing 'make clean*' or 'make obj' there is no need to respect SUBDIR_DEPEND_* or .WAIT. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Thu Oct 22 23:08:08 2015 (r289777) +++ head/share/mk/bsd.subdir.mk Thu Oct 22 23:41:56 2015 (r289778) @@ -83,6 +83,15 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE dir=${.TARGET}; \ ${_SUBDIR_SH}; +# .WAIT and dependencies can be skipped for some targets. +.if defined(SUBDIR_PARALLEL) +.if make(obj) || make(clean*) +_skip_subdir_ordering= 1 +SUBDIR:= ${SUBDIR:N.WAIT} +.else +_skip_subdir_ordering= 0 +.endif +.endif # defined(SUBDIR_PARALLEL) # Work around parsing of .if nested in .for by putting .WAIT string into a var. __wait= .WAIT .for __target in ${ALL_SUBDIR_TARGETS} @@ -94,9 +103,11 @@ __subdir_targets+= .WAIT .else __subdir_targets+= ${__target}_subdir_${__dir} __deps= +.if ${_skip_subdir_ordering} == 0 .for __dep in ${SUBDIR_DEPEND_${__dir}} __deps+= ${__target}_subdir_${__dep} .endfor +.endif ${__target}_subdir_${__dir}: .PHONY .MAKE ${__deps} .if !defined(NO_SUBDIR) @${_+_}target=${__target:realinstall=install}; \ From owner-svn-src-all@freebsd.org Thu Oct 22 23:59: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 DF743A1C0BF for ; Thu, 22 Oct 2015 23:59:54 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE48A1F0F for ; Thu, 22 Oct 2015 23:59:54 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound1.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Fri, 23 Oct 2015 00:00:02 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t9MNxkUG019789; Thu, 22 Oct 2015 17:59:46 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1445558386.14963.38.camel@freebsd.org> Subject: Re: svn commit: r289778 - head/share/mk From: Ian Lepore To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 22 Oct 2015 17:59:46 -0600 In-Reply-To: <201510222341.t9MNfuNK007465@repo.freebsd.org> References: <201510222341.t9MNfuNK007465@repo.freebsd.org> 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: Thu, 22 Oct 2015 23:59:55 -0000 On Thu, 2015-10-22 at 23:41 +0000, Bryan Drewery wrote: > Author: bdrewery > Date: Thu Oct 22 23:41:56 2015 > New Revision: 289778 > URL: https://svnweb.freebsd.org/changeset/base/289778 > > Log: > For SUBDIR_PARALLEL, when doing 'make clean*' or 'make obj' there > is no need to > respect SUBDIR_DEPEND_* or .WAIT. > > MFC after: 2 weeks > Sponsored by: EMC / Isilon Storage Division This doesn't feel so safe. People override these targets and do who -knows-what with them. The clean* seems especially risky since it will match targets in end-user makefiles that you don't even know about. -- Ian From owner-svn-src-all@freebsd.org Fri Oct 23 00:18: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 7BAC1A1C5E6; Fri, 23 Oct 2015 00:18:50 +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 623689F6; Fri, 23 Oct 2015 00:18:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 5BC7117C8; Fri, 23 Oct 2015 00:18:50 +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 1AB6D12194; Fri, 23 Oct 2015 00:18:50 +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 05DZ0BsvKeMW; Fri, 23 Oct 2015 00:18:43 +0000 (UTC) Content-Type: text/plain; charset=us-ascii DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 3FD5612191 Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r289778 - head/share/mk From: Bryan Drewery X-Mailer: iPhone Mail (12H143) In-Reply-To: <1445558386.14963.38.camel@freebsd.org> Date: Thu, 22 Oct 2015 17:18:39 -0700 Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <232D9171-D360-4110-8682-6B371D9F9CAC@FreeBSD.org> References: <201510222341.t9MNfuNK007465@repo.freebsd.org> <1445558386.14963.38.camel@freebsd.org> To: Ian Lepore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 00:18:50 -0000 > On Oct 22, 2015, at 16:59, Ian Lepore wrote: >=20 >> On Thu, 2015-10-22 at 23:41 +0000, Bryan Drewery wrote: >> Author: bdrewery >> Date: Thu Oct 22 23:41:56 2015 >> New Revision: 289778 >> URL: https://svnweb.freebsd.org/changeset/base/289778 >>=20 >> Log: >> For SUBDIR_PARALLEL, when doing 'make clean*' or 'make obj' there >> is no need to >> respect SUBDIR_DEPEND_* or .WAIT. >>=20 >> MFC after: 2 weeks >> Sponsored by: EMC / Isilon Storage Division >=20 > This doesn't feel so safe. People override these targets and do who > -knows-what with them. The clean* seems especially risky since it will > match targets in end-user makefiles that you don't even know about. >=20 > -- Ian >=20 >=20 I can limit it to src tree builds if you want. I cannot imagine any situation where "clean" depends on another d= irectory going first.=20 Similarly it makes sense to always build subdirs in parallel with 'obj' and I= would argue 'clean*' too, regardless of SUBDIR_PARALLEL. I only just realiz= ed that. Yes there are mkdir -p and rm -f races, but we have not added any d= ependencies because of these as is.= From owner-svn-src-all@freebsd.org Fri Oct 23 00:21: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 E3626A1C679; Fri, 23 Oct 2015 00:21:28 +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 CF4D0C83; Fri, 23 Oct 2015 00:21:28 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id C9559198F; Fri, 23 Oct 2015 00:21:28 +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 8C26C121A0; Fri, 23 Oct 2015 00:21:28 +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 wXNfhjuDJkvq; Fri, 23 Oct 2015 00:21:25 +0000 (UTC) Content-Type: text/plain; charset=us-ascii DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 817B41219C Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r289778 - head/share/mk From: Bryan Drewery X-Mailer: iPhone Mail (12H143) In-Reply-To: <232D9171-D360-4110-8682-6B371D9F9CAC@FreeBSD.org> Date: Thu, 22 Oct 2015 17:21:24 -0700 Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <6847681E-3E85-40B9-BF9D-2FF4C6DE4AC9@FreeBSD.org> References: <201510222341.t9MNfuNK007465@repo.freebsd.org> <1445558386.14963.38.camel@freebsd.org> <232D9171-D360-4110-8682-6B371D9F9CAC@FreeBSD.org> To: Ian Lepore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 00:21:29 -0000 > On Oct 22, 2015, at 17:18, Bryan Drewery wrote: >=20 >=20 >=20 >>> On Oct 22, 2015, at 16:59, Ian Lepore wrote: >>>=20 >>> On Thu, 2015-10-22 at 23:41 +0000, Bryan Drewery wrote: >>> Author: bdrewery >>> Date: Thu Oct 22 23:41:56 2015 >>> New Revision: 289778 >>> URL: https://svnweb.freebsd.org/changeset/base/289778 >>>=20 >>> Log: >>> For SUBDIR_PARALLEL, when doing 'make clean*' or 'make obj' there >>> is no need to >>> respect SUBDIR_DEPEND_* or .WAIT. >>>=20 >>> MFC after: 2 weeks >>> Sponsored by: EMC / Isilon Storage Division >>=20 >> This doesn't feel so safe. People override these targets and do who >> -knows-what with them. The clean* seems especially risky since it will >> match targets in end-user makefiles that you don't even know about. I can also not apply to SUBDIR_TARGETS which is the user-defined targets lis= t. (Misspelled and should be LOCAL_SUBDIR_TARGETS) >>=20 >> -- Ian >=20 > I can limit it to src tree builds if you want. >=20 > I cannot imagine any situation where "clean" depends on another= directory going first.=20 >=20 > Similarly it makes sense to always build subdirs in parallel with 'obj' an= d I would argue 'clean*' too, regardless of SUBDIR_PARALLEL. I only just rea= lized that. Yes there are mkdir -p and rm -f races, but we have not added an= y dependencies because of these as is. From owner-svn-src-all@freebsd.org Fri Oct 23 00:48: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 9E7BEA1CAED; Fri, 23 Oct 2015 00:48:01 +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 70EDC15E4; Fri, 23 Oct 2015 00:48:01 +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 t9N0m0e3032953; Fri, 23 Oct 2015 00:48:00 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N0m0jV032952; Fri, 23 Oct 2015 00:48:00 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510230048.t9N0m0jV032952@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 23 Oct 2015 00:48:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289779 - head/sys/dev/otus X-SVN-Group: head MIME-Version: 1.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, 23 Oct 2015 00:48:01 -0000 Author: adrian Date: Fri Oct 23 00:48:00 2015 New Revision: 289779 URL: https://svnweb.freebsd.org/changeset/base/289779 Log: otus(4): begin supporting raw transmit parameters in otus_tx() * Add a comment about the parameters I should support, stolen shamelessly from iwn(4); * Implement the rate bit for the raw transmit path; * Print out the host-order versions of each of the transmit bits, so I have a hope in heck of debugging why things are going wrong. This still doesn't fix 5GHz in the office but that's likely due to a lot of other configuration parameters being 2GHz-specific. That'll come next. Tested: * AR9170 + AR9103 (2/5GHz) 2x2, 5GHz association Modified: head/sys/dev/otus/if_otus.c Modified: head/sys/dev/otus/if_otus.c ============================================================================== --- head/sys/dev/otus/if_otus.c Thu Oct 22 23:41:56 2015 (r289778) +++ head/sys/dev/otus/if_otus.c Fri Oct 23 00:48:00 2015 (r289779) @@ -173,7 +173,8 @@ void otus_cmd_rxeof(struct otus_softc * void otus_sub_rxeof(struct otus_softc *, uint8_t *, int, struct mbufq *); static int otus_tx(struct otus_softc *, struct ieee80211_node *, - struct mbuf *, struct otus_data *); + struct mbuf *, struct otus_data *, + const struct ieee80211_bpf_params *); int otus_ioctl(struct ifnet *, u_long, caddr_t); int otus_set_multi(struct otus_softc *); static void otus_updateedca(struct otus_softc *sc); @@ -509,7 +510,7 @@ _otus_start(struct otus_softc *sc) ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; m->m_pkthdr.rcvif = NULL; - if (otus_tx(sc, ni, m, bf) != 0) { + if (otus_tx(sc, ni, m, bf, NULL) != 0) { OTUS_DPRINTF(sc, OTUS_DEBUG_XMIT, "%s: failed to transmit\n", __func__); if_inc_counter(ni->ni_vap->iv_ifp, @@ -554,10 +555,7 @@ otus_raw_xmit(struct ieee80211_node *ni, goto error; } - /* - * XXX TODO: support TX bpf params - */ - if (otus_tx(sc, ni, m, bf) != 0) { + if (otus_tx(sc, ni, m, bf, params) != 0) { error = EIO; goto error; } @@ -2178,10 +2176,20 @@ otus_tx_update_ratectl(struct otus_softc /* * XXX TODO: support tx bpf parameters for configuration! + * + * Relevant pieces: + * + * ac = params->ibp_pri & 3; + * rate = params->ibp_rate0; + * params->ibp_flags & IEEE80211_BPF_NOACK + * params->ibp_flags & IEEE80211_BPF_RTS + * params->ibp_flags & IEEE80211_BPF_CTS + * tx->rts_ntries = params->ibp_try1; + * tx->data_ntries = params->ibp_try0; */ static int otus_tx(struct otus_softc *sc, struct ieee80211_node *ni, struct mbuf *m, - struct otus_data *data) + struct otus_data *data, const struct ieee80211_bpf_params *params) { struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = ni->ni_vap; @@ -2230,7 +2238,9 @@ otus_tx(struct otus_softc *sc, struct ie } /* Pickup a rate index. */ - if (IEEE80211_IS_MULTICAST(wh->i_addr1) || + if (params != NULL) { + rate = otus_rate_to_hw_rate(sc, params->ibp_rate0); + } else if (IEEE80211_IS_MULTICAST(wh->i_addr1) || (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) != IEEE80211_FC0_TYPE_DATA) { /* Get lowest rate */ rate = otus_rate_to_hw_rate(sc, 0); @@ -2245,6 +2255,9 @@ otus_tx(struct otus_softc *sc, struct ie phyctl = 0; macctl = AR_TX_MAC_BACKOFF | AR_TX_MAC_HW_DUR | AR_TX_MAC_QID(qid); + /* + * XXX TODO: params for NOACK, ACK, RTS, CTS, etc + */ if (IEEE80211_IS_MULTICAST(wh->i_addr1) || (hasqos && ((qos & IEEE80211_QOS_ACKPOLICY) == IEEE80211_QOS_ACKPOLICY_NOACK))) @@ -2293,7 +2306,7 @@ otus_tx(struct otus_softc *sc, struct ie OTUS_DPRINTF(sc, OTUS_DEBUG_XMIT, "%s: tx: m=%p; data=%p; len=%d mac=0x%04x phy=0x%08x rate=0x%02x, ni_txrate=%d\n", - __func__, m, data, head->len, head->macctl, head->phyctl, + __func__, m, data, le16toh(head->len), macctl, phyctl, (int) rate, (int) ni->ni_txrate); /* Submit transfer */ From owner-svn-src-all@freebsd.org Fri Oct 23 01:10: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 07B32A1CDFA; Fri, 23 Oct 2015 01:10:04 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x232.google.com (mail-qk0-x232.google.com [IPv6:2607:f8b0:400d: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 B3BA61D27; Fri, 23 Oct 2015 01:10:03 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qkcy65 with SMTP id y65so62040938qkc.0; Thu, 22 Oct 2015 18:10:02 -0700 (PDT) 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=50cERTd5O8UtEs3DMM9DCanvIUJZKu4hwyQkRGKDhv8=; b=foFYKjCBzO7mCEZ1JCVZu2XN4nEh1ToyggqNAwO+2JeXmvzpY/2TGOYhl6eDG+MQM9 sNc09AdAD0OjMM/CU+4W6A7XR0WEet/vR9JhGSqqXizCiikpIJTUNIxa8G/O3zDcJFAb cV0U6v9fgkT50HIu/KUNAiReqaegFDr1stZppgh0t2WdAszT8a1+/pYe4nK1vXpMCzkw ybRzKKZSATZgu25HY/FYq6mFtByUEvtbDCnWHQzXpXYTTZ9AKWLhI48+UQ575XmzVLDU RRC+n4eJ8Zqc0atc6Y7lOYCIsva60qzDHjXeLATzw641JwcN0EjgSno8qyhEWDWaXkQb t32A== MIME-Version: 1.0 X-Received: by 10.55.198.20 with SMTP id b20mr22662183qkj.35.1445562602761; Thu, 22 Oct 2015 18:10:02 -0700 (PDT) Received: by 10.140.88.209 with HTTP; Thu, 22 Oct 2015 18:10:02 -0700 (PDT) In-Reply-To: <201510222303.t9MN37D2093845@repo.freebsd.org> References: <201510222303.t9MN37D2093845@repo.freebsd.org> Date: Thu, 22 Oct 2015 18:10:02 -0700 Message-ID: Subject: Re: svn commit: r289773 - in head: sbin/sysctl sys/kern sys/sys From: NGie Cooper To: "Conrad E. Meyer" Cc: "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: Fri, 23 Oct 2015 01:10:04 -0000 On Thu, Oct 22, 2015 at 4:03 PM, Conrad E. Meyer wrote: > Author: cem > Date: Thu Oct 22 23:03:06 2015 > New Revision: 289773 > URL: https://svnweb.freebsd.org/changeset/base/289773 > > Log: > Sysctl: Add common support for U8, U16 types > > Sponsored by: EMC / Isilon Storage Division - This is missing documentation in sysctl(9). - It probably deserves `Relnotes: yes`. - Shouldn't __FreeBSD_version be bumped for this change? Thanks! -NGie From owner-svn-src-all@freebsd.org Fri Oct 23 01:27: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 EAA18A1C1CE; Fri, 23 Oct 2015 01:27:46 +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 AAB9C3E9; Fri, 23 Oct 2015 01:27:46 +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 t9N1Rj7x048156; Fri, 23 Oct 2015 01:27:45 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N1Ri6h048146; Fri, 23 Oct 2015 01:27:44 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510230127.t9N1Ri6h048146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 23 Oct 2015 01:27:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289780 - in stable: 10/lib/libc/sys 10/sys/kern 10/sys/sys 10/tests/sys/kern 9/lib/libc/sys 9/sys/kern 9/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 01:27:47 -0000 Author: jhb Date: Fri Oct 23 01:27:44 2015 New Revision: 289780 URL: https://svnweb.freebsd.org/changeset/base/289780 Log: MFC 287386,288949,288993: Export current system call code and argument count for system call entry and exit events. To preserve the ABI, the new fields are moved to the end of struct thread in these branches (unlike HEAD) and explicitly copied when new threads are created. In addition, the new tests are only added in 10. r287386: Export current system call code and argument count for system call entry and exit events. procfs stop events for system call tracing report these values (argument count for system call entry and code for system call exit), but ptrace() does not provide this information. (Note that while the system call code can be determined in an ABI-specific manner during system call entry, it is not generally available during system call exit.) The values are exported via new fields at the end of struct ptrace_lwpinfo available via PT_LWPINFO. r288949: Fix various edge cases related to system call tracing. - Always set td_dbg_sc_* when P_TRACED is set on system call entry even if the debugger is not tracing system call entries. This ensures the fields are valid when reporting other stops that occur at system call boundaries such as for PT_FOLLOW_FORKS or when only tracing system call exits. - Set TDB_SCX when reporting the stop for a new child process in fork_return(). This causes the event to be reported as a system call exit. - Report a system call exit event in fork_return() for new threads in a traced process. - Copy td_dbg_sc_* to new threads instead of zeroing. This ensures that td_dbg_sc_code in particular will report the system call that created the new thread or process when it reports a system call exit event in fork_return(). - Add new ptrace tests to verify that new child processes and threads report system call exit events with a valid pl_syscall_code via PT_LWPINFO. r288993: Document the recently added pl_syscall_* fields in struct ptrace_lwpinfo. Modified: stable/10/lib/libc/sys/ptrace.2 stable/10/sys/kern/kern_fork.c stable/10/sys/kern/kern_thr.c stable/10/sys/kern/subr_syscall.c stable/10/sys/kern/sys_process.c stable/10/sys/sys/proc.h stable/10/sys/sys/ptrace.h stable/10/tests/sys/kern/Makefile stable/10/tests/sys/kern/ptrace_test.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/lib/libc/sys/ptrace.2 stable/9/sys/kern/kern_fork.c stable/9/sys/kern/kern_thr.c stable/9/sys/kern/subr_syscall.c stable/9/sys/kern/sys_process.c stable/9/sys/sys/proc.h stable/9/sys/sys/ptrace.h Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/10/lib/libc/sys/ptrace.2 ============================================================================== --- stable/10/lib/libc/sys/ptrace.2 Fri Oct 23 00:48:00 2015 (r289779) +++ stable/10/lib/libc/sys/ptrace.2 Fri Oct 23 01:27:44 2015 (r289780) @@ -2,7 +2,7 @@ .\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ .\" .\" This file is in the public domain. -.Dd July 3, 2015 +.Dd October 6, 2015 .Dt PTRACE 2 .Os .Sh NAME @@ -307,6 +307,8 @@ struct ptrace_lwpinfo { siginfo_t pl_siginfo; char pl_tdname[MAXCOMLEN + 1]; int pl_child_pid; + u_int pl_syscall_code; + u_int pl_syscall_narg; }; .Ed .Pp @@ -395,6 +397,27 @@ stop when .Dv PL_FLAG_FORKED is set in .Va pl_flags . +.It pl_syscall_code +The ABI-specific identifier of the current system call. +Note that for indirect system calls this field reports the indirected +system call. +Only valid when +.Dv PL_FLAG_SCE +or +.Dv PL_FLAG_SCX +is set in +.Va pl_flags. +.It pl_syscall_narg +The number of arguments passed to the current system call not counting +the system call identifier. +Note that for indirect system calls this field reports the arguments +passed to the indirected system call. +Only valid when +.Dv PL_FLAG_SCE +or +.Dv PL_FLAG_SCX +is set in +.Va pl_flags. .El .It PT_GETNUMLWPS This request returns the number of kernel threads associated with the Modified: stable/10/sys/kern/kern_fork.c ============================================================================== --- stable/10/sys/kern/kern_fork.c Fri Oct 23 00:48:00 2015 (r289779) +++ stable/10/sys/kern/kern_fork.c Fri Oct 23 01:27:44 2015 (r289780) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -478,6 +479,8 @@ do_fork(struct thread *td, int flags, st td2->td_sigstk = td->td_sigstk; td2->td_flags = TDF_INMEM; td2->td_lend_user_pri = PRI_MAX; + td2->td_dbg_sc_code = td->td_dbg_sc_code; + td2->td_dbg_sc_narg = td->td_dbg_sc_narg; #ifdef VIMAGE td2->td_vnet = NULL; @@ -1049,8 +1052,8 @@ fork_return(struct thread *td, struct tr { struct proc *p, *dbg; + p = td->td_proc; if (td->td_dbgflags & TDB_STOPATFORK) { - p = td->td_proc; sx_xlock(&proctree_lock); PROC_LOCK(p); if ((p->p_pptr->p_flag & (P_TRACED | P_FOLLOWFORK)) == @@ -1067,9 +1070,9 @@ fork_return(struct thread *td, struct tr p->p_pid, p->p_oppid); proc_reparent(p, dbg); sx_xunlock(&proctree_lock); - td->td_dbgflags |= TDB_CHILD; + td->td_dbgflags |= TDB_CHILD | TDB_SCX; ptracestop(td, SIGSTOP); - td->td_dbgflags &= ~TDB_CHILD; + td->td_dbgflags &= ~(TDB_CHILD | TDB_SCX); } else { /* * ... otherwise clear the request. @@ -1079,6 +1082,18 @@ fork_return(struct thread *td, struct tr cv_broadcast(&p->p_dbgwait); } PROC_UNLOCK(p); + } else if (p->p_flag & P_TRACED) { + /* + * This is the start of a new thread in a traced + * process. Report a system call exit event. + */ + PROC_LOCK(p); + td->td_dbgflags |= TDB_SCX; + _STOPEVENT(p, S_SCX, td->td_dbg_sc_code); + if ((p->p_stops & S_PT_SCX) != 0) + ptracestop(td, SIGTRAP); + td->td_dbgflags &= ~TDB_SCX; + PROC_UNLOCK(p); } userret(td, frame); Modified: stable/10/sys/kern/kern_thr.c ============================================================================== --- stable/10/sys/kern/kern_thr.c Fri Oct 23 00:48:00 2015 (r289779) +++ stable/10/sys/kern/kern_thr.c Fri Oct 23 01:27:44 2015 (r289780) @@ -240,6 +240,8 @@ thread_create(struct thread *td, struct __rangeof(struct thread, td_startcopy, td_endcopy)); newtd->td_proc = td->td_proc; newtd->td_ucred = crhold(td->td_ucred); + newtd->td_dbg_sc_code = td->td_dbg_sc_code; + newtd->td_dbg_sc_narg = td->td_dbg_sc_narg; error = initialize_thread(newtd, thunk); if (error != 0) { Modified: stable/10/sys/kern/subr_syscall.c ============================================================================== --- stable/10/sys/kern/subr_syscall.c Fri Oct 23 00:48:00 2015 (r289779) +++ stable/10/sys/kern/subr_syscall.c Fri Oct 23 01:27:44 2015 (r289780) @@ -84,9 +84,12 @@ syscallenter(struct thread *td, struct s if (error == 0) { STOPEVENT(p, S_SCE, sa->narg); - if (p->p_flag & P_TRACED && p->p_stops & S_PT_SCE) { + if (p->p_flag & P_TRACED) { PROC_LOCK(p); - ptracestop((td), SIGTRAP); + td->td_dbg_sc_code = sa->code; + td->td_dbg_sc_narg = sa->narg; + if (p->p_stops & S_PT_SCE) + ptracestop((td), SIGTRAP); PROC_UNLOCK(p); } if (td->td_dbgflags & TDB_USERWR) { @@ -95,6 +98,10 @@ syscallenter(struct thread *td, struct s * debugger modified registers or memory. */ error = (p->p_sysent->sv_fetch_syscall_args)(td, sa); + PROC_LOCK(p); + td->td_dbg_sc_code = sa->code; + td->td_dbg_sc_narg = sa->narg; + PROC_UNLOCK(p); #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) ktrsyscall(sa->code, sa->narg, sa->args); Modified: stable/10/sys/kern/sys_process.c ============================================================================== --- stable/10/sys/kern/sys_process.c Fri Oct 23 00:48:00 2015 (r289779) +++ stable/10/sys/kern/sys_process.c Fri Oct 23 01:27:44 2015 (r289780) @@ -96,6 +96,8 @@ struct ptrace_lwpinfo32 { struct siginfo32 pl_siginfo; /* siginfo for signal */ char pl_tdname[MAXCOMLEN + 1]; /* LWP name. */ int pl_child_pid; /* New child pid */ + u_int pl_syscall_code; + u_int pl_syscall_narg; }; #endif @@ -480,6 +482,8 @@ ptrace_lwpinfo_to32(const struct ptrace_ siginfo_to_siginfo32(&pl->pl_siginfo, &pl32->pl_siginfo); strcpy(pl32->pl_tdname, pl->pl_tdname); pl32->pl_child_pid = pl->pl_child_pid; + pl32->pl_syscall_code = pl->pl_syscall_code; + pl32->pl_syscall_narg = pl->pl_syscall_narg; } #endif /* COMPAT_FREEBSD32 */ @@ -1210,6 +1214,13 @@ kern_ptrace(struct thread *td, int req, pl->pl_sigmask = td2->td_sigmask; pl->pl_siglist = td2->td_siglist; strcpy(pl->pl_tdname, td2->td_name); + if ((td2->td_dbgflags & (TDB_SCE | TDB_SCX)) != 0) { + pl->pl_syscall_code = td2->td_dbg_sc_code; + pl->pl_syscall_narg = td2->td_dbg_sc_narg; + } else { + pl->pl_syscall_code = 0; + pl->pl_syscall_narg = 0; + } #ifdef COMPAT_FREEBSD32 if (wrap32) ptrace_lwpinfo_to32(pl, pl32); Modified: stable/10/sys/sys/proc.h ============================================================================== --- stable/10/sys/sys/proc.h Fri Oct 23 00:48:00 2015 (r289779) +++ stable/10/sys/sys/proc.h Fri Oct 23 01:27:44 2015 (r289780) @@ -170,6 +170,7 @@ struct procdesc; struct racct; struct sbuf; struct sleepqueue; +struct syscall_args; struct td_sched; struct thread; struct trapframe; @@ -320,6 +321,8 @@ struct thread { struct vm_page **td_ma; /* (k) uio pages held */ int td_ma_cnt; /* (k) size of *td_ma */ void *td_su; /* (k) FFS SU private */ + u_int td_dbg_sc_code; /* (c) Syscall code to debugger. */ + u_int td_dbg_sc_narg; /* (c) Syscall arg count to debugger.*/ }; struct mtx *thread_lock_block(struct thread *); @@ -934,7 +937,6 @@ void userret(struct thread *, struct tra void cpu_exit(struct thread *); void exit1(struct thread *, int) __dead2; -struct syscall_args; int cpu_fetch_syscall_args(struct thread *td, struct syscall_args *sa); void cpu_fork(struct thread *, struct proc *, struct thread *, int); void cpu_set_fork_handler(struct thread *, void (*)(void *), void *); Modified: stable/10/sys/sys/ptrace.h ============================================================================== --- stable/10/sys/sys/ptrace.h Fri Oct 23 00:48:00 2015 (r289779) +++ stable/10/sys/sys/ptrace.h Fri Oct 23 01:27:44 2015 (r289780) @@ -113,6 +113,8 @@ struct ptrace_lwpinfo { struct __siginfo pl_siginfo; /* siginfo for signal */ char pl_tdname[MAXCOMLEN + 1]; /* LWP name */ int pl_child_pid; /* New child pid */ + u_int pl_syscall_code; + u_int pl_syscall_narg; }; /* Argument structure for PT_VM_ENTRY. */ Modified: stable/10/tests/sys/kern/Makefile ============================================================================== --- stable/10/tests/sys/kern/Makefile Fri Oct 23 00:48:00 2015 (r289779) +++ stable/10/tests/sys/kern/Makefile Fri Oct 23 01:27:44 2015 (r289780) @@ -7,6 +7,7 @@ ATF_TESTS_C+= ptrace_test ATF_TESTS_C+= unix_seqpacket_test TEST_METADATA.unix_seqpacket_test+= timeout="15" +LDADD.ptrace_test+= -lpthread LDADD.unix_seqpacket_test+= -lpthread WARNS?= 5 Modified: stable/10/tests/sys/kern/ptrace_test.c ============================================================================== --- stable/10/tests/sys/kern/ptrace_test.c Fri Oct 23 00:48:00 2015 (r289779) +++ stable/10/tests/sys/kern/ptrace_test.c Fri Oct 23 01:27:44 2015 (r289780) @@ -29,10 +29,12 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include +#include #include #include #include @@ -409,12 +411,15 @@ ATF_TC_BODY(ptrace__parent_sees_exit_aft * debugger is attached to it. */ static __dead2 void -follow_fork_parent(void) +follow_fork_parent(bool use_vfork) { pid_t fpid, wpid; int status; - CHILD_REQUIRE((fpid = fork()) != -1); + if (use_vfork) + CHILD_REQUIRE((fpid = vfork()) != -1); + else + CHILD_REQUIRE((fpid = fork()) != -1); if (fpid == 0) /* Child */ @@ -434,7 +439,7 @@ follow_fork_parent(void) * child process. */ static pid_t -handle_fork_events(pid_t parent) +handle_fork_events(pid_t parent, struct ptrace_lwpinfo *ppl) { struct ptrace_lwpinfo pl; bool fork_reported[2]; @@ -469,6 +474,8 @@ handle_fork_events(pid_t parent) child = wpid; else ATF_REQUIRE(child == wpid); + if (ppl != NULL) + ppl[1] = pl; fork_reported[1] = true; } else { ATF_REQUIRE(wpid == parent); @@ -478,6 +485,8 @@ handle_fork_events(pid_t parent) child = pl.pl_child_pid; else ATF_REQUIRE(child == pl.pl_child_pid); + if (ppl != NULL) + ppl[0] = pl; fork_reported[0] = true; } } @@ -499,7 +508,7 @@ ATF_TC_BODY(ptrace__follow_fork_both_att ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { trace_me(); - follow_fork_parent(); + follow_fork_parent(false); } /* Parent process. */ @@ -516,7 +525,7 @@ ATF_TC_BODY(ptrace__follow_fork_both_att /* Continue the child ignoring the SIGSTOP. */ ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); - children[1] = handle_fork_events(children[0]); + children[1] = handle_fork_events(children[0], NULL); ATF_REQUIRE(children[1] > 0); ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); @@ -555,7 +564,7 @@ ATF_TC_BODY(ptrace__follow_fork_child_de ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { trace_me(); - follow_fork_parent(); + follow_fork_parent(false); } /* Parent process. */ @@ -572,7 +581,7 @@ ATF_TC_BODY(ptrace__follow_fork_child_de /* Continue the child ignoring the SIGSTOP. */ ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); - children[1] = handle_fork_events(children[0]); + children[1] = handle_fork_events(children[0], NULL); ATF_REQUIRE(children[1] > 0); ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); @@ -606,7 +615,7 @@ ATF_TC_BODY(ptrace__follow_fork_parent_d ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { trace_me(); - follow_fork_parent(); + follow_fork_parent(false); } /* Parent process. */ @@ -623,7 +632,7 @@ ATF_TC_BODY(ptrace__follow_fork_parent_d /* Continue the child ignoring the SIGSTOP. */ ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); - children[1] = handle_fork_events(children[0]); + children[1] = handle_fork_events(children[0], NULL); ATF_REQUIRE(children[1] > 0); ATF_REQUIRE(ptrace(PT_DETACH, children[0], (caddr_t)1, 0) != -1); @@ -688,7 +697,7 @@ ATF_TC_BODY(ptrace__follow_fork_both_att ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { attach_fork_parent(cpipe); - follow_fork_parent(); + follow_fork_parent(false); } /* Parent process. */ @@ -715,7 +724,7 @@ ATF_TC_BODY(ptrace__follow_fork_both_att /* Signal the fork parent to continue. */ close(cpipe[0]); - children[1] = handle_fork_events(children[0]); + children[1] = handle_fork_events(children[0], NULL); ATF_REQUIRE(children[1] > 0); ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); @@ -756,7 +765,7 @@ ATF_TC_BODY(ptrace__follow_fork_child_de ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { attach_fork_parent(cpipe); - follow_fork_parent(); + follow_fork_parent(false); } /* Parent process. */ @@ -783,7 +792,7 @@ ATF_TC_BODY(ptrace__follow_fork_child_de /* Signal the fork parent to continue. */ close(cpipe[0]); - children[1] = handle_fork_events(children[0]); + children[1] = handle_fork_events(children[0], NULL); ATF_REQUIRE(children[1] > 0); ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); @@ -819,7 +828,7 @@ ATF_TC_BODY(ptrace__follow_fork_parent_d ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { attach_fork_parent(cpipe); - follow_fork_parent(); + follow_fork_parent(false); } /* Parent process. */ @@ -846,7 +855,7 @@ ATF_TC_BODY(ptrace__follow_fork_parent_d /* Signal the fork parent to continue. */ close(cpipe[0]); - children[1] = handle_fork_events(children[0]); + children[1] = handle_fork_events(children[0], NULL); ATF_REQUIRE(children[1] > 0); ATF_REQUIRE(ptrace(PT_DETACH, children[0], (caddr_t)1, 0) != -1); @@ -866,6 +875,223 @@ ATF_TC_BODY(ptrace__follow_fork_parent_d ATF_REQUIRE(errno == ECHILD); } +/* + * Verify that pl_syscall_code in struct ptrace_lwpinfo for a new + * child process created via fork() reports the correct value. + */ +ATF_TC_WITHOUT_HEAD(ptrace__new_child_pl_syscall_code_fork); +ATF_TC_BODY(ptrace__new_child_pl_syscall_code_fork, tc) +{ + struct ptrace_lwpinfo pl[2]; + pid_t children[2], fpid, wpid; + int status; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + follow_fork_parent(false); + } + + /* Parent process. */ + children[0] = fpid; + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(children[0], &status, 0); + ATF_REQUIRE(wpid == children[0]); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + ATF_REQUIRE(ptrace(PT_FOLLOW_FORK, children[0], NULL, 1) != -1); + + /* Continue the child ignoring the SIGSTOP. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); + + /* Wait for both halves of the fork event to get reported. */ + children[1] = handle_fork_events(children[0], pl); + ATF_REQUIRE(children[1] > 0); + + ATF_REQUIRE((pl[0].pl_flags & PL_FLAG_SCX) != 0); + ATF_REQUIRE((pl[1].pl_flags & PL_FLAG_SCX) != 0); + ATF_REQUIRE(pl[0].pl_syscall_code == SYS_fork); + ATF_REQUIRE(pl[0].pl_syscall_code == pl[1].pl_syscall_code); + ATF_REQUIRE(pl[0].pl_syscall_narg == pl[1].pl_syscall_narg); + + ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); + ATF_REQUIRE(ptrace(PT_CONTINUE, children[1], (caddr_t)1, 0) != -1); + + /* + * The child can't exit until the grandchild reports status, so the + * grandchild should report its exit first to the debugger. + */ + wpid = wait(&status); + ATF_REQUIRE(wpid == children[1]); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 2); + + wpid = wait(&status); + ATF_REQUIRE(wpid == children[0]); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 1); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +/* + * Verify that pl_syscall_code in struct ptrace_lwpinfo for a new + * child process created via vfork() reports the correct value. + */ +ATF_TC_WITHOUT_HEAD(ptrace__new_child_pl_syscall_code_vfork); +ATF_TC_BODY(ptrace__new_child_pl_syscall_code_vfork, tc) +{ + struct ptrace_lwpinfo pl[2]; + pid_t children[2], fpid, wpid; + int status; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + follow_fork_parent(true); + } + + /* Parent process. */ + children[0] = fpid; + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(children[0], &status, 0); + ATF_REQUIRE(wpid == children[0]); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + ATF_REQUIRE(ptrace(PT_FOLLOW_FORK, children[0], NULL, 1) != -1); + + /* Continue the child ignoring the SIGSTOP. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); + + /* Wait for both halves of the fork event to get reported. */ + children[1] = handle_fork_events(children[0], pl); + ATF_REQUIRE(children[1] > 0); + + ATF_REQUIRE((pl[0].pl_flags & PL_FLAG_SCX) != 0); + ATF_REQUIRE((pl[1].pl_flags & PL_FLAG_SCX) != 0); + ATF_REQUIRE(pl[0].pl_syscall_code == SYS_vfork); + ATF_REQUIRE(pl[0].pl_syscall_code == pl[1].pl_syscall_code); + ATF_REQUIRE(pl[0].pl_syscall_narg == pl[1].pl_syscall_narg); + + ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); + ATF_REQUIRE(ptrace(PT_CONTINUE, children[1], (caddr_t)1, 0) != -1); + + /* + * The child can't exit until the grandchild reports status, so the + * grandchild should report its exit first to the debugger. + */ + wpid = wait(&status); + ATF_REQUIRE(wpid == children[1]); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 2); + + wpid = wait(&status); + ATF_REQUIRE(wpid == children[0]); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 1); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +static void * +simple_thread(void *arg __unused) +{ + + pthread_exit(NULL); +} + +/* + * Verify that pl_syscall_code in struct ptrace_lwpinfo for a new + * thread reports the correct value. + */ +ATF_TC_WITHOUT_HEAD(ptrace__new_child_pl_syscall_code_thread); +ATF_TC_BODY(ptrace__new_child_pl_syscall_code_thread, tc) +{ + struct ptrace_lwpinfo pl; + pid_t fpid, wpid; + lwpid_t main; + int status; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + pthread_t thread; + + trace_me(); + + CHILD_REQUIRE(pthread_create(&thread, NULL, simple_thread, + NULL) == 0); + CHILD_REQUIRE(pthread_join(thread, NULL) == 0); + exit(1); + } + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, + sizeof(pl)) != -1); + main = pl.pl_lwpid; + + /* + * Continue the child ignoring the SIGSTOP and tracing all + * system call exits. + */ + ATF_REQUIRE(ptrace(PT_TO_SCX, fpid, (caddr_t)1, 0) != -1); + + /* + * Wait for the new thread to arrive. pthread_create() might + * invoke any number of system calls. For now we just wait + * for the new thread to arrive and make sure it reports a + * valid system call code. If ptrace grows thread event + * reporting then this test can be made more precise. + */ + for (;;) { + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, + sizeof(pl)) != -1); + ATF_REQUIRE((pl.pl_flags & PL_FLAG_SCX) != 0); + ATF_REQUIRE(pl.pl_syscall_code != 0); + if (pl.pl_lwpid != main) + /* New thread seen. */ + break; + + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + } + + /* Wait for the child to exit. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + for (;;) { + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + if (WIFEXITED(status)) + break; + + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + } + + ATF_REQUIRE(WEXITSTATUS(status) == 1); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + ATF_TP_ADD_TCS(tp) { @@ -881,6 +1107,9 @@ ATF_TP_ADD_TCS(tp) ptrace__follow_fork_child_detached_unrelated_debugger); ATF_TP_ADD_TC(tp, ptrace__follow_fork_parent_detached_unrelated_debugger); + ATF_TP_ADD_TC(tp, ptrace__new_child_pl_syscall_code_fork); + ATF_TP_ADD_TC(tp, ptrace__new_child_pl_syscall_code_vfork); + ATF_TP_ADD_TC(tp, ptrace__new_child_pl_syscall_code_thread); return (atf_no_error()); } From owner-svn-src-all@freebsd.org Fri Oct 23 01:27: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 CFB7EA1C1D6; Fri, 23 Oct 2015 01:27:47 +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 8AFA13EB; Fri, 23 Oct 2015 01:27:47 +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 t9N1Rktx048171; Fri, 23 Oct 2015 01:27:46 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N1RjQE048161; Fri, 23 Oct 2015 01:27:45 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510230127.t9N1RjQE048161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 23 Oct 2015 01:27:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289780 - in stable: 10/lib/libc/sys 10/sys/kern 10/sys/sys 10/tests/sys/kern 9/lib/libc/sys 9/sys/kern 9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 01:27:47 -0000 Author: jhb Date: Fri Oct 23 01:27:44 2015 New Revision: 289780 URL: https://svnweb.freebsd.org/changeset/base/289780 Log: MFC 287386,288949,288993: Export current system call code and argument count for system call entry and exit events. To preserve the ABI, the new fields are moved to the end of struct thread in these branches (unlike HEAD) and explicitly copied when new threads are created. In addition, the new tests are only added in 10. r287386: Export current system call code and argument count for system call entry and exit events. procfs stop events for system call tracing report these values (argument count for system call entry and code for system call exit), but ptrace() does not provide this information. (Note that while the system call code can be determined in an ABI-specific manner during system call entry, it is not generally available during system call exit.) The values are exported via new fields at the end of struct ptrace_lwpinfo available via PT_LWPINFO. r288949: Fix various edge cases related to system call tracing. - Always set td_dbg_sc_* when P_TRACED is set on system call entry even if the debugger is not tracing system call entries. This ensures the fields are valid when reporting other stops that occur at system call boundaries such as for PT_FOLLOW_FORKS or when only tracing system call exits. - Set TDB_SCX when reporting the stop for a new child process in fork_return(). This causes the event to be reported as a system call exit. - Report a system call exit event in fork_return() for new threads in a traced process. - Copy td_dbg_sc_* to new threads instead of zeroing. This ensures that td_dbg_sc_code in particular will report the system call that created the new thread or process when it reports a system call exit event in fork_return(). - Add new ptrace tests to verify that new child processes and threads report system call exit events with a valid pl_syscall_code via PT_LWPINFO. r288993: Document the recently added pl_syscall_* fields in struct ptrace_lwpinfo. Modified: stable/9/lib/libc/sys/ptrace.2 stable/9/sys/kern/kern_fork.c stable/9/sys/kern/kern_thr.c stable/9/sys/kern/subr_syscall.c stable/9/sys/kern/sys_process.c stable/9/sys/sys/proc.h stable/9/sys/sys/ptrace.h Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libc/sys/ptrace.2 stable/10/sys/kern/kern_fork.c stable/10/sys/kern/kern_thr.c stable/10/sys/kern/subr_syscall.c stable/10/sys/kern/sys_process.c stable/10/sys/sys/proc.h stable/10/sys/sys/ptrace.h stable/10/tests/sys/kern/Makefile stable/10/tests/sys/kern/ptrace_test.c Directory Properties: stable/10/ (props changed) Modified: stable/9/lib/libc/sys/ptrace.2 ============================================================================== --- stable/9/lib/libc/sys/ptrace.2 Fri Oct 23 00:48:00 2015 (r289779) +++ stable/9/lib/libc/sys/ptrace.2 Fri Oct 23 01:27:44 2015 (r289780) @@ -2,7 +2,7 @@ .\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ .\" .\" This file is in the public domain. -.Dd February 7, 2013 +.Dd October 6, 2015 .Dt PTRACE 2 .Os .Sh NAME @@ -307,6 +307,8 @@ struct ptrace_lwpinfo { siginfo_t pl_siginfo; char pl_tdname[MAXCOMLEN + 1]; int pl_child_pid; + u_int pl_syscall_code; + u_int pl_syscall_narg; }; .Ed .Pp @@ -395,6 +397,27 @@ stop when .Dv PL_FLAG_FORKED is set in .Va pl_flags . +.It pl_syscall_code +The ABI-specific identifier of the current system call. +Note that for indirect system calls this field reports the indirected +system call. +Only valid when +.Dv PL_FLAG_SCE +or +.Dv PL_FLAG_SCX +is set in +.Va pl_flags. +.It pl_syscall_narg +The number of arguments passed to the current system call not counting +the system call identifier. +Note that for indirect system calls this field reports the arguments +passed to the indirected system call. +Only valid when +.Dv PL_FLAG_SCE +or +.Dv PL_FLAG_SCX +is set in +.Va pl_flags. .El .It PT_GETNUMLWPS This request returns the number of kernel threads associated with the Modified: stable/9/sys/kern/kern_fork.c ============================================================================== --- stable/9/sys/kern/kern_fork.c Fri Oct 23 00:48:00 2015 (r289779) +++ stable/9/sys/kern/kern_fork.c Fri Oct 23 01:27:44 2015 (r289780) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -477,6 +478,8 @@ do_fork(struct thread *td, int flags, st td2->td_sigmask = td->td_sigmask; td2->td_flags = TDF_INMEM; td2->td_lend_user_pri = PRI_MAX; + td2->td_dbg_sc_code = td->td_dbg_sc_code; + td2->td_dbg_sc_narg = td->td_dbg_sc_narg; #ifdef VIMAGE td2->td_vnet = NULL; @@ -1022,8 +1025,8 @@ fork_return(struct thread *td, struct tr { struct proc *p, *dbg; + p = td->td_proc; if (td->td_dbgflags & TDB_STOPATFORK) { - p = td->td_proc; sx_xlock(&proctree_lock); PROC_LOCK(p); if ((p->p_pptr->p_flag & (P_TRACED | P_FOLLOWFORK)) == @@ -1040,9 +1043,9 @@ fork_return(struct thread *td, struct tr p->p_pid, p->p_oppid); proc_reparent(p, dbg); sx_xunlock(&proctree_lock); - td->td_dbgflags |= TDB_CHILD; + td->td_dbgflags |= TDB_CHILD | TDB_SCX; ptracestop(td, SIGSTOP); - td->td_dbgflags &= ~TDB_CHILD; + td->td_dbgflags &= ~(TDB_CHILD | TDB_SCX); } else { /* * ... otherwise clear the request. @@ -1052,6 +1055,18 @@ fork_return(struct thread *td, struct tr cv_broadcast(&p->p_dbgwait); } PROC_UNLOCK(p); + } else if (p->p_flag & P_TRACED) { + /* + * This is the start of a new thread in a traced + * process. Report a system call exit event. + */ + PROC_LOCK(p); + td->td_dbgflags |= TDB_SCX; + _STOPEVENT(p, S_SCX, td->td_dbg_sc_code); + if ((p->p_stops & S_PT_SCX) != 0) + ptracestop(td, SIGTRAP); + td->td_dbgflags &= ~TDB_SCX; + PROC_UNLOCK(p); } userret(td, frame); Modified: stable/9/sys/kern/kern_thr.c ============================================================================== --- stable/9/sys/kern/kern_thr.c Fri Oct 23 00:48:00 2015 (r289779) +++ stable/9/sys/kern/kern_thr.c Fri Oct 23 01:27:44 2015 (r289780) @@ -227,6 +227,8 @@ create_thread(struct thread *td, mcontex __rangeof(struct thread, td_startcopy, td_endcopy)); newtd->td_proc = td->td_proc; newtd->td_ucred = crhold(td->td_ucred); + newtd->td_dbg_sc_code = td->td_dbg_sc_code; + newtd->td_dbg_sc_narg = td->td_dbg_sc_narg; if (ctx != NULL) { /* old way to set user context */ error = set_mcontext(newtd, ctx); Modified: stable/9/sys/kern/subr_syscall.c ============================================================================== --- stable/9/sys/kern/subr_syscall.c Fri Oct 23 00:48:00 2015 (r289779) +++ stable/9/sys/kern/subr_syscall.c Fri Oct 23 01:27:44 2015 (r289780) @@ -85,9 +85,12 @@ syscallenter(struct thread *td, struct s if (error == 0) { STOPEVENT(p, S_SCE, sa->narg); - if (p->p_flag & P_TRACED && p->p_stops & S_PT_SCE) { + if (p->p_flag & P_TRACED) { PROC_LOCK(p); - ptracestop((td), SIGTRAP); + td->td_dbg_sc_code = sa->code; + td->td_dbg_sc_narg = sa->narg; + if (p->p_stops & S_PT_SCE) + ptracestop((td), SIGTRAP); PROC_UNLOCK(p); } if (td->td_dbgflags & TDB_USERWR) { @@ -96,6 +99,10 @@ syscallenter(struct thread *td, struct s * debugger modified registers or memory. */ error = (p->p_sysent->sv_fetch_syscall_args)(td, sa); + PROC_LOCK(p); + td->td_dbg_sc_code = sa->code; + td->td_dbg_sc_narg = sa->narg; + PROC_UNLOCK(p); #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) ktrsyscall(sa->code, sa->narg, sa->args); Modified: stable/9/sys/kern/sys_process.c ============================================================================== --- stable/9/sys/kern/sys_process.c Fri Oct 23 00:48:00 2015 (r289779) +++ stable/9/sys/kern/sys_process.c Fri Oct 23 01:27:44 2015 (r289780) @@ -97,6 +97,8 @@ struct ptrace_lwpinfo32 { struct siginfo32 pl_siginfo; /* siginfo for signal */ char pl_tdname[MAXCOMLEN + 1]; /* LWP name. */ int pl_child_pid; /* New child pid */ + u_int pl_syscall_code; + u_int pl_syscall_narg; }; #endif @@ -483,6 +485,8 @@ ptrace_lwpinfo_to32(const struct ptrace_ siginfo_to_siginfo32(&pl->pl_siginfo, &pl32->pl_siginfo); strcpy(pl32->pl_tdname, pl->pl_tdname); pl32->pl_child_pid = pl->pl_child_pid; + pl32->pl_syscall_code = pl->pl_syscall_code; + pl32->pl_syscall_narg = pl->pl_syscall_narg; } #endif /* COMPAT_FREEBSD32 */ @@ -1212,6 +1216,13 @@ kern_ptrace(struct thread *td, int req, pl->pl_sigmask = td2->td_sigmask; pl->pl_siglist = td2->td_siglist; strcpy(pl->pl_tdname, td2->td_name); + if ((td2->td_dbgflags & (TDB_SCE | TDB_SCX)) != 0) { + pl->pl_syscall_code = td2->td_dbg_sc_code; + pl->pl_syscall_narg = td2->td_dbg_sc_narg; + } else { + pl->pl_syscall_code = 0; + pl->pl_syscall_narg = 0; + } #ifdef COMPAT_FREEBSD32 if (wrap32) ptrace_lwpinfo_to32(pl, pl32); Modified: stable/9/sys/sys/proc.h ============================================================================== --- stable/9/sys/sys/proc.h Fri Oct 23 00:48:00 2015 (r289779) +++ stable/9/sys/sys/proc.h Fri Oct 23 01:27:44 2015 (r289780) @@ -170,6 +170,7 @@ struct procdesc; struct racct; struct sbuf; struct sleepqueue; +struct syscall_args; struct td_sched; struct thread; struct trapframe; @@ -317,6 +318,8 @@ struct thread { int td_ma_cnt; /* (k) size of *td_ma */ struct rl_q_entry *td_rlqe; /* (k) Associated range lock entry. */ u_int td_vp_reserv; /* (k) Count of reserved vnodes. */ + u_int td_dbg_sc_code; /* (c) Syscall code to debugger. */ + u_int td_dbg_sc_narg; /* (c) Syscall arg count to debugger.*/ }; struct mtx *thread_lock_block(struct thread *); @@ -927,7 +930,6 @@ void userret(struct thread *, struct tra void cpu_exit(struct thread *); void exit1(struct thread *, int) __dead2; -struct syscall_args; int cpu_fetch_syscall_args(struct thread *td, struct syscall_args *sa); void cpu_fork(struct thread *, struct proc *, struct thread *, int); void cpu_set_fork_handler(struct thread *, void (*)(void *), void *); Modified: stable/9/sys/sys/ptrace.h ============================================================================== --- stable/9/sys/sys/ptrace.h Fri Oct 23 00:48:00 2015 (r289779) +++ stable/9/sys/sys/ptrace.h Fri Oct 23 01:27:44 2015 (r289780) @@ -113,6 +113,8 @@ struct ptrace_lwpinfo { struct __siginfo pl_siginfo; /* siginfo for signal */ char pl_tdname[MAXCOMLEN + 1]; /* LWP name */ int pl_child_pid; /* New child pid */ + u_int pl_syscall_code; + u_int pl_syscall_narg; }; /* Argument structure for PT_VM_ENTRY. */ From owner-svn-src-all@freebsd.org Fri Oct 23 02:08: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 F15CEA1C8F2; Fri, 23 Oct 2015 02:08:48 +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 C3F1412AC; Fri, 23 Oct 2015 02:08:48 +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 t9N28luS060907; Fri, 23 Oct 2015 02:08:47 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N28lAB060905; Fri, 23 Oct 2015 02:08:47 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510230208.t9N28lAB060905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 23 Oct 2015 02:08:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289781 - head/sys/dev/otus X-SVN-Group: head MIME-Version: 1.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, 23 Oct 2015 02:08:49 -0000 Author: adrian Date: Fri Oct 23 02:08:47 2015 New Revision: 289781 URL: https://svnweb.freebsd.org/changeset/base/289781 Log: otus(4) - demagicify register names. Obtained from: Linux carl9170 hw.h Modified: head/sys/dev/otus/if_otus.c head/sys/dev/otus/if_otusreg.h Modified: head/sys/dev/otus/if_otus.c ============================================================================== --- head/sys/dev/otus/if_otus.c Fri Oct 23 01:27:44 2015 (r289780) +++ head/sys/dev/otus/if_otus.c Fri Oct 23 02:08:47 2015 (r289781) @@ -2460,29 +2460,29 @@ otus_init_mac(struct otus_softc *sc) otus_write(sc, AR_MAC_REG_RX_PE_DELAY, 0x70); otus_write(sc, AR_MAC_REG_EIFS_AND_SIFS, 0xa144000); otus_write(sc, AR_MAC_REG_SLOT_TIME, 9 << 10); - otus_write(sc, 0x1c3b2c, 0x19000000); + otus_write(sc, AR_MAC_REG_TID_CFACK_CFEND_RATE, 0x19000000); /* NAV protects ACK only (in TXOP). */ - otus_write(sc, 0x1c3b38, 0x201); + otus_write(sc, AR_MAC_REG_TXOP_DURATION, 0x201); /* Set beacon Tx power to 0x7. */ otus_write(sc, AR_MAC_REG_BCN_HT1, 0x8000170); otus_write(sc, AR_MAC_REG_BACKOFF_PROTECT, 0x105); - otus_write(sc, 0x1c3b9c, 0x10000a); + otus_write(sc, AR_MAC_REG_AMPDU_FACTOR, 0x10000a); /* Filter any control frames, BAR is bit 24. */ - otus_write(sc, 0x1c368c, 0x0500ffff); - otus_write(sc, 0x1c3c40, 0x1); + otus_write(sc, AR_MAC_REG_FRAMETYPE_FILTER, 0x0500ffff); + otus_write(sc, AR_MAC_REG_RX_CONTROL, 0x1); otus_write(sc, AR_MAC_REG_BASIC_RATE, 0x150f); otus_write(sc, AR_MAC_REG_MANDATORY_RATE, 0x150f); otus_write(sc, AR_MAC_REG_RTS_CTS_RATE, 0x10b01bb); - otus_write(sc, 0x1c3694, 0x4003c1e); + otus_write(sc, AR_MAC_REG_ACK_TPC, 0x4003c1e); /* Enable LED0 and LED1. */ - otus_write(sc, 0x1d0100, 0x3); - otus_write(sc, 0x1d0104, 0x3); + otus_write(sc, AR_GPIO_REG_PORT_TYPE, 0x3); + otus_write(sc, AR_GPIO_REG_PORT_DATA, 0x3); /* Switch MAC to OTUS interface. */ otus_write(sc, 0x1c3600, 0x3); - otus_write(sc, 0x1c3c50, 0xffff); - otus_write(sc, 0x1c3680, 0xf00008); + otus_write(sc, AR_MAC_REG_AMPDU_RX_THRESH, 0xffff); + otus_write(sc, AR_MAC_REG_MISC_680, 0xf00008); /* Disable Rx timeout (workaround). */ - otus_write(sc, 0x1c362c, 0); + otus_write(sc, AR_MAC_REG_RX_TIMEOUT, 0); /* Set USB Rx stream mode maximum frame number to 2. */ otus_write(sc, 0x1e1110, 0x4); @@ -2490,14 +2490,14 @@ otus_init_mac(struct otus_softc *sc) otus_write(sc, 0x1e1114, 0x80); /* Set clock frequency to 88/80MHz. */ - otus_write(sc, 0x1d4008, 0x73); + otus_write(sc, AR_PWR_REG_CLOCK_SEL, 0x73); /* Set WLAN DMA interrupt mode: generate intr per packet. */ - otus_write(sc, 0x1c3d7c, 0x110011); - otus_write(sc, 0x1c3bb0, 0x4); + otus_write(sc, AR_MAC_REG_TXRX_MPI, 0x110011); + otus_write(sc, AR_MAC_REG_FCS_SELECT, 0x4); otus_write(sc, AR_MAC_REG_TXOP_NOT_ENOUGH_INDICATION, 0x141e0f48); /* Disable HW decryption for now. */ - otus_write(sc, 0x1c3678, 0x78); + otus_write(sc, AR_MAC_REG_ENCRYPTION, 0x78); if ((error = otus_write_barrier(sc)) != 0) return error; @@ -2649,9 +2649,9 @@ otus_program_phy(struct otus_softc *sc, otus_write(sc, AR_PHY_POWER_TX_RATE9, 0x3f3f3f3f); if (IEEE80211_IS_CHAN_2GHZ(c)) - otus_write(sc, 0x1d4014, 0x5163); + otus_write(sc, AR_PWR_REG_PLL_ADDAC, 0x5163); else - otus_write(sc, 0x1d4014, 0x5143); + otus_write(sc, AR_PWR_REG_PLL_ADDAC, 0x5143); return otus_write_barrier(sc); } @@ -2763,10 +2763,10 @@ otus_set_chan(struct otus_softc *sc, str OTUS_DPRINTF(sc, OTUS_DEBUG_RESET, "band switch\n"); /* Cold/Warm reset BB/ADDA. */ - otus_write(sc, 0x1d4004, sc->bb_reset ? 0x800 : 0x400); + otus_write(sc, AR_PWR_REG_RESET, sc->bb_reset ? 0x800 : 0x400); if ((error = otus_write_barrier(sc)) != 0) goto finish; - otus_write(sc, 0x1d4004, 0); + otus_write(sc, AR_PWR_REG_RESET, 0); if ((error = otus_write_barrier(sc)) != 0) goto finish; sc->bb_reset = 0; @@ -3062,7 +3062,7 @@ otus_led_newstate_type3(struct otus_soft state &= ~AR_LED0_ON; } if (state != sc->led_state) { - otus_write(sc, 0x1d0104, state); + otus_write(sc, AR_GPIO_REG_PORT_DATA, state); if (otus_write_barrier(sc) == 0) sc->led_state = state; } @@ -3097,18 +3097,18 @@ otus_init(struct otus_softc *sc) #ifdef notyet #ifndef IEEE80211_STA_ONLY case IEEE80211_M_HOSTAP: - otus_write(sc, 0x1c3700, 0x0f0000a1); - otus_write(sc, 0x1c3c40, 0x1); + otus_write(sc, AR_MAC_REG_CAM_MODE, 0x0f0000a1); + otus_write(sc, AR_MAC_REG_RX_CONTROL, 0x1); break; case IEEE80211_M_IBSS: - otus_write(sc, 0x1c3700, 0x0f000000); - otus_write(sc, 0x1c3c40, 0x1); + otus_write(sc, AR_MAC_REG_CAM_MODE, 0x0f000000); + otus_write(sc, AR_MAC_REG_RX_CONTROL, 0x1); break; #endif #endif case IEEE80211_M_STA: - otus_write(sc, 0x1c3700, 0x0f000002); - otus_write(sc, 0x1c3c40, 0x1); + otus_write(sc, AR_MAC_REG_CAM_MODE, 0x0f000002); + otus_write(sc, AR_MAC_REG_RX_CONTROL, 0x1); break; default: break; @@ -3117,11 +3117,12 @@ otus_init(struct otus_softc *sc) switch (ic->ic_opmode) { case IEEE80211_M_STA: - otus_write(sc, 0x1c3700, 0x0f000002); - otus_write(sc, 0x1c3c40, 0x1); + otus_write(sc, AR_MAC_REG_CAM_MODE, 0x0f000002); + otus_write(sc, AR_MAC_REG_RX_CONTROL, 0x1); + /* XXX set frametype filter? */ break; case IEEE80211_M_MONITOR: - otus_write(sc, 0x1c368c, 0xffffffff); + otus_write(sc, AR_MAC_REG_FRAMETYPE_FILTER, 0xffffffff); break; default: break; @@ -3143,7 +3144,7 @@ otus_init(struct otus_softc *sc) } /* Start Rx. */ - otus_write(sc, 0x1c3d30, 0x100); + otus_write(sc, AR_MAC_REG_DMA_TRIGGER, 0x100); (void)otus_write_barrier(sc); sc->sc_running = 1; @@ -3174,7 +3175,7 @@ otus_stop(struct otus_softc *sc) OTUS_LOCK(sc); sc->sc_running = 0; /* Stop Rx. */ - otus_write(sc, 0x1c3d30, 0); + otus_write(sc, AR_MAC_REG_DMA_TRIGGER, 0); (void)otus_write_barrier(sc); /* Drain any pending TX frames */ Modified: head/sys/dev/otus/if_otusreg.h ============================================================================== --- head/sys/dev/otus/if_otusreg.h Fri Oct 23 01:27:44 2015 (r289780) +++ head/sys/dev/otus/if_otusreg.h Fri Oct 23 02:08:47 2015 (r289781) @@ -43,12 +43,14 @@ * AR9170 MAC registers. */ #define AR_MAC_REG_BASE 0x1c3000 +#define AR_MAC_REG_DMA_TRIGGER (AR_MAC_REG_BASE + 0xd30) #define AR_MAC_REG_MAC_ADDR_L (AR_MAC_REG_BASE + 0x610) #define AR_MAC_REG_MAC_ADDR_H (AR_MAC_REG_BASE + 0x614) #define AR_MAC_REG_BSSID_L (AR_MAC_REG_BASE + 0x618) #define AR_MAC_REG_BSSID_H (AR_MAC_REG_BASE + 0x61c) #define AR_MAC_REG_GROUP_HASH_TBL_L (AR_MAC_REG_BASE + 0x624) #define AR_MAC_REG_GROUP_HASH_TBL_H (AR_MAC_REG_BASE + 0x628) +#define AR_MAC_REG_RX_TIMEOUT (AR_MAC_REG_BASE + 0x62c) #define AR_MAC_REG_BASIC_RATE (AR_MAC_REG_BASE + 0x630) #define AR_MAC_REG_MANDATORY_RATE (AR_MAC_REG_BASE + 0x634) #define AR_MAC_REG_RTS_CTS_RATE (AR_MAC_REG_BASE + 0x638) @@ -57,11 +59,16 @@ #define AR_MAC_REG_RX_PE_DELAY (AR_MAC_REG_BASE + 0x64c) #define AR_MAC_REG_DYNAMIC_SIFS_ACK (AR_MAC_REG_BASE + 0x658) #define AR_MAC_REG_SNIFFER (AR_MAC_REG_BASE + 0x674) +#define AR_MAC_REG_ENCRYPTION (AR_MAC_REG_BASE + 0x678) +#define AR_MAC_REG_MISC_680 (AR_MAC_REG_BASE + 0x680) +#define AR_MAC_REG_FRAMETYPE_FILTER (AR_MAC_REG_BASE + 0x68c) #define AR_MAC_REG_ACK_EXTENSION (AR_MAC_REG_BASE + 0x690) +#define AR_MAC_REG_ACK_TPC (AR_MAC_REG_BASE + 0x694) #define AR_MAC_REG_EIFS_AND_SIFS (AR_MAC_REG_BASE + 0x698) #define AR_MAC_REG_BUSY (AR_MAC_REG_BASE + 0x6e8) #define AR_MAC_REG_BUSY_EXT (AR_MAC_REG_BASE + 0x6ec) #define AR_MAC_REG_SLOT_TIME (AR_MAC_REG_BASE + 0x6f0) +#define AR_MAC_REG_CAM_MODE (AR_MAC_REG_BASE + 0x700) #define AR_MAC_REG_AC0_CW (AR_MAC_REG_BASE + 0xb00) #define AR_MAC_REG_AC1_CW (AR_MAC_REG_BASE + 0xb04) #define AR_MAC_REG_AC2_CW (AR_MAC_REG_BASE + 0xb08) @@ -70,12 +77,19 @@ #define AR_MAC_REG_AC1_AC0_AIFS (AR_MAC_REG_BASE + 0xb14) #define AR_MAC_REG_AC3_AC2_AIFS (AR_MAC_REG_BASE + 0xb18) #define AR_MAC_REG_RETRY_MAX (AR_MAC_REG_BASE + 0xb28) +#define AR_MAC_REG_TID_CFACK_CFEND_RATE (AR_MAC_REG_BASE + 0xb2c) #define AR_MAC_REG_TXOP_NOT_ENOUGH_INDICATION \ (AR_MAC_REG_BASE + 0xb30) +#define AR_MAC_REG_TXOP_DURATION (AR_MAC_REG_BASE + 0xb38) #define AR_MAC_REG_AC1_AC0_TXOP (AR_MAC_REG_BASE + 0xb44) #define AR_MAC_REG_AC3_AC2_TXOP (AR_MAC_REG_BASE + 0xb48) +#define AR_MAC_REG_AMPDU_FACTOR (AR_MAC_REG_BASE + 0xb9c) +#define AR_MAC_REG_FCS_SELECT (AR_MAC_REG_BASE + 0xbb0) +#define AR_MAC_REG_RX_CONTROL (AR_MAC_REG_BASE + 0xc40) +#define AR_MAC_REG_AMPDU_RX_THRESH (AR_MAC_REG_BASE + 0xc50) #define AR_MAC_REG_OFDM_PHY_ERRORS (AR_MAC_REG_BASE + 0xcb4) #define AR_MAC_REG_CCK_PHY_ERRORS (AR_MAC_REG_BASE + 0xcb8) +#define AR_MAC_REG_TXRX_MPI (AR_MAC_REG_BASE + 0xd7c) #define AR_MAC_REG_BCN_HT1 (AR_MAC_REG_BASE + 0xda0) /* Possible values for register AR_USB_MODE_CTRL. */ @@ -134,6 +148,32 @@ #define AR_BANK4_AMODE_REFSEL(x) ((x) << 2) #define AR_BANK4_ADDR(x) ((x) << 5) +/* + * Random number generator. + */ +#define AR_RAND_REG_BASE 0x1d0000 + +/* + * GPIO. + */ +#define AR_GPIO_REG_BASE 0x1d0100 + +#define AR_GPIO_REG_PORT_TYPE (AR_GPIO_REG_BASE + 0x000) +#define AR_GPIO_REG_PORT_DATA (AR_GPIO_REG_BASE + 0x004) +#define AR_GPIO_PORT_LED_0 1 +#define AR_GPIO_PORT_LED_1 2 +/* WPS Button GPIO for TP-Link TL-WN821N */ +#define AR_GPIO_PORT_WPS_BUTTON_PRESSED 4 + +/* + * Power Management. + */ +#define AR_PWR_REG_BASE 0x1d4000 + +#define AR_PWR_REG_RESET (AR_PWR_REG_BASE + 0x004) +#define AR_PWR_REG_CLOCK_SEL (AR_PWR_REG_BASE + 0x008) +#define AR_PWR_REG_PLL_ADDAC (AR_PWR_REG_BASE + 0x014) + /* Tx descriptor. */ struct ar_tx_head { uint16_t len; From owner-svn-src-all@freebsd.org Fri Oct 23 02:09: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 99D2FA1C93B; Fri, 23 Oct 2015 02:09:24 +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 65F40141A; Fri, 23 Oct 2015 02:09:24 +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 t9N29NnU060974; Fri, 23 Oct 2015 02:09:23 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N29Nvl060973; Fri, 23 Oct 2015 02:09:23 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510230209.t9N29Nvl060973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 23 Oct 2015 02:09:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289782 - head/sys/dev/otus X-SVN-Group: head MIME-Version: 1.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, 23 Oct 2015 02:09:24 -0000 Author: adrian Date: Fri Oct 23 02:09:23 2015 New Revision: 289782 URL: https://svnweb.freebsd.org/changeset/base/289782 Log: otus(4) - add missing ieee80211_free_node() call. Modified: head/sys/dev/otus/if_otus.c Modified: head/sys/dev/otus/if_otus.c ============================================================================== --- head/sys/dev/otus/if_otus.c Fri Oct 23 02:08:47 2015 (r289781) +++ head/sys/dev/otus/if_otus.c Fri Oct 23 02:09:23 2015 (r289782) @@ -1274,6 +1274,7 @@ otus_newstate(struct ieee80211vap *vap, taskqueue_enqueue_timeout(taskqueue_thread, &sc->calib_to, hz); } + ieee80211_free_node(ni); break; default: break; From owner-svn-src-all@freebsd.org Fri Oct 23 04:13: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 B0611A19202; Fri, 23 Oct 2015 04:13:49 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) by mx1.freebsd.org (Postfix) with ESMTP id 5C6C43B2; Fri, 23 Oct 2015 04:13:49 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id pTjbZnhKOT2vopTjcZvOsF; Thu, 22 Oct 2015 22:13:48 -0600 X-Authority-Analysis: v=2.1 cv=NrEbCZpJ c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=BWvPGDcYAAAA:8 a=VxmjJ2MpAAAA:8 a=kj9zAlcOel0A:10 a=5lJygRwiOn0A:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=7Qk2ozbKAAAA:8 a=PYnjg3YJAAAA:8 a=qyDxTJV7AAAA:8 a=85N1-lAfAAAA:8 a=zNd2u4x_AAAA:8 a=j4nzMFrpAAAA:8 a=2YJISZCgwiv1c8tSn1IA:9 a=6NgBo90sODkOxxAS:21 a=g5SHhca8wyJtcf8O:21 a=J6fp-VFun-6KRkJn:21 a=CjuIK1q_8ugA:10 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id E5DC79CF9; Thu, 22 Oct 2015 21:13:42 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id t9N4DbrT005724; Thu, 22 Oct 2015 21:13:37 -0700 (PDT) (envelope-from Cy.Schubert@komquats.com) Message-Id: <201510230413.t9N4DbrT005724@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: Cy Schubert cc: Warner Losh , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, David Malone , Ollivier Robert , Xin Li Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp In-Reply-To: Message from Cy Schubert of "Sat, 17 Oct 2015 19:00:20 -0700." <201510180200.t9I20KLI062531@slippy.cwsent.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 22 Oct 2015 21:13:37 -0700 X-CMAE-Envelope: MS4wfFJHodpyvvDaEeY5d+DOhnuj7lQrhK2Mm+cZBzYGMmRukBeENGyme9mtTcanCj09VjKMEUH4xPyALn3EcFBpM1f9ufZfOHhhOTtq54MpA4mm94C9pZVe+lnhlEbNuhiKgv2geGZCskMkwYpkz7mHPwvtVxrgdFRctRBzryEeT788rFl4nY8N6jcNJ98foJCX4yUOmVixb/sLmtCtAnR0W09bBzEepFYzE5/e9nGHzSjjGw01pr41XcpJEGWGSLUboejW+yoHeFUc4D5QBntk3aDwF1hYaSKpYdDxKvXph6mSEivELUBaaSHYfLbFVb1VxvS/NNqgYoXojkQdNZN7h07kakb9zbLmFYvaW74gk04rYxj7GJ/fE+cgGd4mxZtBulj5Ea37LCbnmIw8hYLIruMvb6oRqqnxo29uRZR2UTlv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 04:13:49 -0000 We already have an example to work from. The family of ports (ntp, ntp-devel) installs ${LOCALBASE}/sbin/update-leap. It would be fine except for the fact that it's written in Perl, not something we'd want to visit on FreeBSD again. I'm sure it could be rewritten in shell script or C/C++. -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. In message <201510180200.t9I20KLI062531@slippy.cwsent.com>, Cy Schubert writes: > Agreed, this would be best. There was a suggestion a GSoC person could do > it (though I'm willing to roll up my sleeves if necessary). > > > -- > Cheers, > Cy Schubert or > FreeBSD UNIX: Web: http://www.FreeBSD.org > > The need of the many outweighs the greed of the few. > > > > In message <8154492E-C29E-41B1-A13B-34E33586DEC6@bsdimp.com>, Warner Losh > write > s: > > > > > > --Apple-Mail=_60572A67-97E7-4200-AEF6-88DC6354712B > > Content-Transfer-Encoding: quoted-printable > > Content-Type: text/plain; > > charset=utf-8 > > > > Until the next leap second=E2=80=A6. It would be better to just > > always try to grab the latest one=E2=80=A6 Can we put something > > in periodic to do that so users that have releases > > that are older than 6 months aren=E2=80=99t screwed? > > > > Warner > > > > > On Oct 16, 2015, at 8:04 AM, Cy Schubert wrote: > > >=20 > > > Author: cy > > > Date: Fri Oct 16 14:04:16 2015 > > > New Revision: 289421 > > > URL: https://svnweb.freebsd.org/changeset/base/289421 > > >=20 > > > Log: > > > Add default leap-seconds file. This should help ntp networks get the > > > leap second date correct > > >=20 > > > Updates to the file can be obtained from ftp://time.nist.gov/pub/ or > > > ftp://tycho.usno.navy.mil/pub/ntp/. > > >=20 > > > Suggested by: dwmalone > > > Reviewed by: roberto, dwmalone, delphij > > > Approved by: roberto > > > MFC after: 1 week > > >=20 > > > Added: > > > head/etc/ntp/ > > > head/etc/ntp/Makefile (contents, props changed) > > > head/etc/ntp/leap-seconds (contents, props changed) > > > Modified: > > > head/etc/Makefile > > > head/etc/mtree/BSD.var.dist > > > head/etc/ntp.conf > > >=20 > > > Modified: head/etc/Makefile > > > = > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > = > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > = > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > = > > =3D=3D=3D > > > --- head/etc/Makefile Fri Oct 16 12:53:22 2015 (r289420) > > > +++ head/etc/Makefile Fri Oct 16 14:04:16 2015 (r289421) > > > @@ -240,6 +240,9 @@ distribution: > > > ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install > > > ${_+_}cd ${.CURDIR}/devd; ${MAKE} install > > > ${_+_}cd ${.CURDIR}/gss; ${MAKE} install > > > +.if ${MK_NTP} !=3D "no" > > > + ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install > > > +.endif > > > ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install > > > .if ${MK_PKGBOOTSTRAP} !=3D "no" > > > ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install > > >=20 > > > Modified: head/etc/mtree/BSD.var.dist > > > = > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > = > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > = > > =3D=3D=3D=3D=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/etc/mtree/BSD.var.dist Fri Oct 16 12:53:22 2015 = > > (r289420) > > > +++ head/etc/mtree/BSD.var.dist Fri Oct 16 14:04:16 2015 = > > (r289421) > > > @@ -46,6 +46,8 @@ > > > .. > > > ipf mode=3D0700 > > > .. > > > + ntp mode=3D0700 > > > + .. > > > pkg > > > .. > > > ports > > >=20 > > > Modified: head/etc/ntp.conf > > > = > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > = > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > = > > =3D=3D=3D=3D=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/etc/ntp.conf Fri Oct 16 12:53:22 2015 (r289420) > > > +++ head/etc/ntp.conf Fri Oct 16 14:04:16 2015 (r289421) > > > @@ -77,3 +77,8 @@ restrict 127.127.1.0 > > > # > > > #server 127.127.1.0 > > > #fudge 127.127.1.0 stratum 10 > > > + > > > +# See = > > http://support.ntp.org/bin/view/Support/ConfiguringNTP#Section_6.14. > > > +# for documentation regarding leapfile. Updates to the file can be = > > obtained > > > +# from ftp://time.nist.gov/pub/ or = > > ftp://tycho.usno.navy.mil/pub/ntp/. > > > +leapfile "/etc/ntp/leap-seconds" > > >=20 > > > Added: head/etc/ntp/Makefile > > > = > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > = > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > = > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > = > > =3D=3D=3D > > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > > +++ head/etc/ntp/Makefile Fri Oct 16 14:04:16 2015 = > > (r289421) > > > @@ -0,0 +1,10 @@ > > > +# $FreeBSD$ > > > + > > > +NO_OBJ=3D > > > + > > > +FILES=3D leap-seconds > > > + > > > +FILESDIR=3D /etc/ntp > > > +FILESMODE=3D 644 > > > + > > > +.include > > >=20 > > > Added: head/etc/ntp/leap-seconds > > > = > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > = > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > = > > =3D=3D=3D=3D=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/etc/ntp/leap-seconds Fri Oct 16 14:04:16 2015 = > > (r289421) > > > @@ -0,0 +1,119 @@ > > > +# > > > +# $FreeBSD$ > > > +# > > > +# ATOMIC TIME. > > > +# The Coordinated Universal Time (UTC) is the reference time scal > e = > > derived > > > +# from The "Temps Atomique International" (TAI) calculated by the > = > > Bureau > > > +# International des Poids et Mesures (BIPM) using a worldwide = > > network of atomic > > > +# clocks. UTC differs from TAI by an integer number of seconds; i > t = > > is the basis > > > +# of all activities in the world. > > > +# > > > +# > > > +# ASTRONOMICAL TIME (UT1) is the time scale based on the rate of > = > > rotation of the earth. > > > +# It is now mainly derived from Very Long Baseline Interferometry > = > > (VLBI). The various > > > +# irregular fluctuations progressively detected in the rotation = > > rate of the Earth lead > > > +# in 1972 to the replacement of UT1 by UTC as the reference time > = > > scale. > > > +# > > > +# > > > +# LEAP SECOND > > > +# Atomic clocks are more stable than the rate of the earth = > > rotatiob since the later > > > +# undergoes a full range of geophysical perturbations at various > = > > time scales (lunisolar > > > +# and core-mantle torques,atmospheric and oceanic effetcs, ...) > > > +# Leap seconds are needed to keep the two time scales in = > > agreement, i.e. UT1-UTC smaller > > > +# than 0.9 second. So, when necessary a "leap second" is = > > introduced in UTC. > > > +# Since the adoption of this system in 1972 it has been necessary > = > > to add 26 seconds to UTC, > > > +# firstly due to the initial choice of the value of the second = > > (1/86400 mean solar day of > > > +# the year 1820) and secondly to the general slowing down of the > = > > Earth's rotation. It is > > > +# theorically possible to have a negative leap second (a second = > > removed from UTC), but so far, > > > +# all leap seconds have been positive (a second has been added to > = > > UTC). Based on what we know about the earth's rotation, > > > +# it is unlikely that we will ever have a negative leap second. > > > +# > > > +# > > > +# HISTORY > > > +# The first leap second was added on June 30, 1972. Until 2000, i > t = > > was necessary in average to add a leap second at a rate > > > +# of 1 to 2 years. Since 2000, due to the fact that the earth rat > e = > > of rotation is accelerating, leap seconds are introduced > > > +# with an average frequency of 3 to 4 years. > > > +# > > > +# > > > +# RESPONSABILITY OF THE DECISION TO INTRODUCE A LEAP SECOND IN UT > C > > > +# The decision to introduce a leap second in UTC is the = > > responsibility of the Earth Orientation Center of > > > +# the International Earth Rotation and reference System Service = > > (IERS). This center is located at Paris > > > +# Observatory. According to international agreements, leap second > = > > date have to occur at fixed date : > > > +# first preference is given to the end of December and June, and > = > > second preference at the end of March > > > +# and September. Since the system was introduced in 1972, only = > > dates in June and December were used. > > > +# > > > +# Questions or comments to: > > > +# Daniel Gambis, daniel.gambis@obspm.fr > > > +# Christian Bizouard: christian.bizouard@obspm.f > r > > > +# Earth orientation Center of the IERS > > > +# Paris Observatory, France > > > +# > > > +# > > > +# > > > +# VALIDITY OF THE FILE > > > +# It is important to express the validity of the file. These next > = > > two dates are > > > +# given in units of seconds since 1900.0. > > > +# > > > +# 1) Last update of the file. > > > +# > > > +# Updated through IERS Bulletin C = > > (ftp://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat) > > > +# > > > +# The following line shows the last update of this file in NTP = > > timestamp: > > > +# > > > +#$ 3645216000 > > > +# > > > +# 2) Expiration date of the file given on a semi-annual basis: = > > last June or last December > > > +# > > > +# File expires on 28 December 2015 > > > +# > > > +# Expire date in NTP timestamp: > > > +# > > > +#@ 3660249600 > > > +# > > > +# > > > +# LIST OF LEAP SECONDS > > > +# NTP timestamp (X parameter) is the number of seconds since = > > 1900.0 > > > +# > > > +# MJD: The Modified Julian Day number. MJD =3D X/86400 + 15020 > > > +# > > > +# DTAI: The difference DTAI=3D TAI-UTC in units of seconds > > > +# It is the quantity to add to UTC to get the time in TAI > > > +# > > > +# Day Month Year : epoch in clear > > > +# > > > +#NTP Time DTAI Day Month Year > > > +# > > > +2272060800 10 # 1 Jan 1972 > > > +2287785600 11 # 1 Jul 1972 > > > +2303683200 12 # 1 Jan 1973 > > > +2335219200 13 # 1 Jan 1974 > > > +2366755200 14 # 1 Jan 1975 > > > +2398291200 15 # 1 Jan 1976 > > > +2429913600 16 # 1 Jan 1977 > > > +2461449600 17 # 1 Jan 1978 > > > +2492985600 18 # 1 Jan 1979 > > > +2524521600 19 # 1 Jan 1980 > > > +2571782400 20 # 1 Jul 1981 > > > +2603318400 21 # 1 Jul 1982 > > > +2634854400 22 # 1 Jul 1983 > > > +2698012800 23 # 1 Jul 1985 > > > +2776982400 24 # 1 Jan 1988 > > > +2840140800 25 # 1 Jan 1990 > > > +2871676800 26 # 1 Jan 1991 > > > +2918937600 27 # 1 Jul 1992 > > > +2950473600 28 # 1 Jul 1993 > > > +2982009600 29 # 1 Jul 1994 > > > +3029443200 30 # 1 Jan 1996 > > > +3076704000 31 # 1 Jul 1997 > > > +3124137600 32 # 1 Jan 1999 > > > +3345062400 33 # 1 Jan 2006 > > > +3439756800 34 # 1 Jan 2009 > > > +3550089600 35 # 1 Jul 2012 > > > +3644697600 36 # 1 Jul 2015 > > > +# > > > +# In order to verify the integrity of this file, a hash code > > > +# has been generated. For more information how to use > > > +# this hash code, please consult the README file under the > > > +# 'sha' repertory. > > > +# > > > +#h 620ba8af 37900668 95ac09ba d77640f9 6fd75493 > > >=20 > > > > > > --Apple-Mail=_60572A67-97E7-4200-AEF6-88DC6354712B > > Content-Transfer-Encoding: 7bit > > Content-Disposition: attachment; > > filename=signature.asc > > Content-Type: application/pgp-signature; > > name=signature.asc > > Content-Description: Message signed with OpenPGP using GPGMail > > > > -----BEGIN PGP SIGNATURE----- > > Comment: GPGTools - https://gpgtools.org > > > > iQIcBAEBCgAGBQJWIp9QAAoJEGwc0Sh9sBEA8GMP/RxMSBQvI0BKgbMfYZh7+x2w > > gGPNOl5FrDjv6R1QxM2alDe3sEZmhNsZ5o0Ekso4kA/uzz5hF9eElp2EA0wn2DMa > > 1IWJKbLUwLsKvN5bC2cMVmzlklqknm9R7EVyRwPB1Q9jgN8cQV4q01tN96XzbCmQ > > 1M2Tg8CccnpI9hpdOLjpZQB72kr+rTUm9YrIuiP+nq62NjP4u4UyquKOeUfyyZP1 > > WnpDNHNknvzlhCnXiexFHUtueL0bAjnSs0F9C7k661xtdt43q/zp0VWkTUeib8/y > > o64PLOmq3dRK+PLDwRLY94OSpe5QqDivyR4H0BAbKbV97GjC/9byhJenR2J+5GUC > > 2w54ddlW6rr7rE5kZYd8E5DSoMlmunpm1rMbEwHLHtRXxorZxDUMvj779VS4rj2b > > MDxVngI/H0/o3inpSZjsqyLqNut8h204r64m2W5MWTMUJ5z1Evb/Uj6Gewfu3rk2 > > kALtxq32we0Edt8VjYUAOOG/ZjTUWdBY0DPsDBeqjeYqkTNP7Ebgj0z0P69UYRsu > > XBuMd7ONzSDSAGYXHbyBa2eLhPxDpInBPZ/R4agybBQIJ1qKv6PtV0VH8VGYzADm > > DhrVGOsSc/yyou+YX7EzTT4F0S1gjPEgO4wopmZdOUFaNBzE8n8UVxTmT4jMlrTH > > SchUp801COK+osnNyG4c > > =3+ya > > -----END PGP SIGNATURE----- > > > > --Apple-Mail=_60572A67-97E7-4200-AEF6-88DC6354712B-- > > > > > From owner-svn-src-all@freebsd.org Fri Oct 23 05:03: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 B5E60A19F18; Fri, 23 Oct 2015 05:03:35 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D0E61598; Fri, 23 Oct 2015 05:03:35 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N53Yk0012276; Fri, 23 Oct 2015 05:03:34 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N53Yef012275; Fri, 23 Oct 2015 05:03:34 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201510230503.t9N53Yef012275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 23 Oct 2015 05:03:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289783 - head/usr.sbin/ntp X-SVN-Group: head MIME-Version: 1.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, 23 Oct 2015 05:03:35 -0000 Author: glebius Date: Fri Oct 23 05:03:34 2015 New Revision: 289783 URL: https://svnweb.freebsd.org/changeset/base/289783 Log: A miss from r289764. Modified: head/usr.sbin/ntp/config.h Modified: head/usr.sbin/ntp/config.h ============================================================================== --- head/usr.sbin/ntp/config.h Fri Oct 23 02:09:23 2015 (r289782) +++ head/usr.sbin/ntp/config.h Fri Oct 23 05:03:34 2015 (r289783) @@ -1418,7 +1418,7 @@ #define PACKAGE_NAME "ntp" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "ntp 4.2.8p3" +#define PACKAGE_STRING "ntp 4.2.8p4" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "ntp" @@ -1427,7 +1427,7 @@ #define PACKAGE_URL "http://www.ntp.org./" /* Define to the version of this package. */ -#define PACKAGE_VERSION "4.2.8p3" +#define PACKAGE_VERSION "4.2.8p4" /* data dir */ #define PERLLIBDIR "/usr/local/share/ntp/lib" @@ -1608,7 +1608,7 @@ typedef unsigned int uintptr_t; /* #undef USE_UDP_SIGPOLL */ /* Version number of package */ -#define VERSION "4.2.8p3" +#define VERSION "4.2.8p4" /* vsnprintf expands "%m" to strerror(errno) */ /* #undef VSNPRINTF_PERCENT_M */ From owner-svn-src-all@freebsd.org Fri Oct 23 05:13: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 19FD9A16129; Fri, 23 Oct 2015 05:13:11 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-yk0-x229.google.com (mail-yk0-x229.google.com [IPv6:2607:f8b0:4002:c07::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CEECC1AD2; Fri, 23 Oct 2015 05:13:10 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by ykaz22 with SMTP id z22so106580390yka.2; Thu, 22 Oct 2015 22:13:10 -0700 (PDT) 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=t9ORbveUSUg4aH9K91j5PYzOPFN9mdC8Ajlo/+H0fN0=; b=Jsj4feN3AqfeYPAbHrZd0DAiMjSpb45boEAKY2gu9zpVikA1QyO+LLOxUZWCFRD8TY TRaBijmgR35cw6NAF2omcHyXN/N+3Eljr9mak+VlC3V8jIoY5TBiLgNedim/vtNGsGi6 UOLgwvQGajqmbWuh3ngRqaH4+S0+T15wQ9rWCzkuGQlHV00Ots4PtJ/SUaOtM+MqssLn kARMBXAwDsVKfu4EUqu0wlVD25G3nq9yhrMPx0hfH/eR03VLnEOTSInwa6MYure/acbk puf3jejt9i82919hy+o1FwCih0YbxuWbkVmuMTuVYldLCRPw9ZCz2CHo/WKgr1tEMdfT 1iJw== MIME-Version: 1.0 X-Received: by 10.140.93.139 with SMTP id d11mr23652534qge.83.1445577190027; Thu, 22 Oct 2015 22:13:10 -0700 (PDT) Received: by 10.140.88.209 with HTTP; Thu, 22 Oct 2015 22:13:09 -0700 (PDT) In-Reply-To: <201510221942.t9MJgwUD016671@repo.freebsd.org> References: <201510221942.t9MJgwUD016671@repo.freebsd.org> Date: Thu, 22 Oct 2015 22:13:09 -0700 Message-ID: Subject: Re: svn commit: r289764 - in head: contrib/ntp contrib/ntp/adjtimed contrib/ntp/clockstuff contrib/ntp/html contrib/ntp/include contrib/ntp/include/isc contrib/ntp/kernel contrib/ntp/kernel/sys contrib... From: NGie Cooper To: Gleb Smirnoff Cc: "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: Fri, 23 Oct 2015 05:13:11 -0000 On Thu, Oct 22, 2015 at 12:42 PM, Gleb Smirnoff wrote: > Author: glebius > Date: Thu Oct 22 19:42:57 2015 > New Revision: 289764 > URL: https://svnweb.freebsd.org/changeset/base/289764 > > Log: > MFV ntp-4.2.8p4 (r289715) MFC after..? From owner-svn-src-all@freebsd.org Fri Oct 23 05:19: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 F218CA161C4; Fri, 23 Oct 2015 05:19:23 +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 7C35F1D13; Fri, 23 Oct 2015 05:19:22 +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 t9N5JInB006345 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 23 Oct 2015 08:19:18 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.15.2/8.15.2/Submit) id t9N5JHUU006344; Fri, 23 Oct 2015 08:19:17 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 23 Oct 2015 08:19:17 +0300 From: Gleb Smirnoff To: NGie Cooper Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r289764 - in head: contrib/ntp contrib/ntp/adjtimed contrib/ntp/clockstuff contrib/ntp/html contrib/ntp/include contrib/ntp/include/isc contrib/ntp/kernel contrib/ntp/kernel/sys contrib... Message-ID: <20151023051917.GM97830@FreeBSD.org> References: <201510221942.t9MJgwUD016671@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 05:19:24 -0000 On Thu, Oct 22, 2015 at 10:13:09PM -0700, NGie Cooper wrote: N> On Thu, Oct 22, 2015 at 12:42 PM, Gleb Smirnoff wrote: N> > Author: glebius N> > Date: Thu Oct 22 19:42:57 2015 N> > New Revision: 289764 N> > URL: https://svnweb.freebsd.org/changeset/base/289764 N> > N> > Log: N> > MFV ntp-4.2.8p4 (r289715) N> N> MFC after..? ASAP. Now testing builds and learning freebsd-update. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Fri Oct 23 05:21: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 C5FB4A1630E; Fri, 23 Oct 2015 05:21:05 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 8A6981ED6; Fri, 23 Oct 2015 05:21:05 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id D3B9A422887; Fri, 23 Oct 2015 16:21:01 +1100 (AEDT) Date: Fri, 23 Oct 2015 16:21:00 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Conrad E. Meyer" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289773 - in head: sbin/sysctl sys/kern sys/sys In-Reply-To: <201510222303.t9MN37D2093845@repo.freebsd.org> Message-ID: <20151023145159.W937@besplex.bde.org> References: <201510222303.t9MN37D2093845@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=cK4dyQqN c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=fprmH2DYPCcJMjTXhHkA:9 a=XyxJXbozhXr6ND9E:21 a=CbopKwBvR2axtTK3:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 05:21:05 -0000 On Thu, 22 Oct 2015, Conrad E. Meyer wrote: > Log: > Sysctl: Add common support for U8, U16 types > > Sponsored by: EMC / Isilon Storage Division This uses similar low-quality code to other sysctls, and more. > Modified: head/sbin/sysctl/sysctl.c > ============================================================================== > --- head/sbin/sysctl/sysctl.c Thu Oct 22 22:29:25 2015 (r289772) > +++ head/sbin/sysctl/sysctl.c Thu Oct 22 23:03:06 2015 (r289773) > @@ -96,6 +96,8 @@ static int ctl_size[CTLTYPE+1] = { > [CTLTYPE_ULONG] = sizeof(u_long), > [CTLTYPE_S64] = sizeof(int64_t), > [CTLTYPE_U64] = sizeof(uint64_t), > + [CTLTYPE_U8] = sizeof(uint8_t), > + [CTLTYPE_U16] = sizeof(uint16_t), > }; Unsorting. The table was sorted on size, then alphabetically. Alphabetical ordering also happens to give ordering on rank. (This ordering is the inverse of the ordering for declarations.) > > static const char *ctl_typename[CTLTYPE+1] = { > @@ -105,6 +107,8 @@ static const char *ctl_typename[CTLTYPE+ > [CTLTYPE_ULONG] = "unsigned long", > [CTLTYPE_S64] = "int64_t", > [CTLTYPE_U64] = "uint64_t", > + [CTLTYPE_U8] = "uint8_t", > + [CTLTYPE_U16] = "uint16_t", > }; Consistent unsorting. > > static void > @@ -221,6 +225,8 @@ parse(const char *string, int lineno) > int len, i, j; > const void *newval; > const char *newvalstr = NULL; > + uint8_t u8val; > + uint16_t u16val; > int intval; > unsigned int uintval; > long longval; Locally consistent, but backwards sorting. The *val variables were sorted on rank, and the addition matches this, but style(9) requires inverse sorting on rank. Other local variables are randomly ordered. > @@ -322,6 +328,8 @@ parse(const char *string, int lineno) > } > > switch (kind & CTLTYPE) { > + case CTLTYPE_U8: > + case CTLTYPE_U16: > case CTLTYPE_INT: > case CTLTYPE_UINT: > case CTLTYPE_LONG: Consistent sorting. The types are sorted on rank. Style(9) requires sorting case stylements alpahbetically, but it is good to break that here and sort on rank or inverse rank to match other orderings. > @@ -345,6 +353,16 @@ parse(const char *string, int lineno) > errno = 0; > > switch (kind & CTLTYPE) { > + case CTLTYPE_U8: > + u8val = (uint8_t)strtoul(newvalstr, &endptr, 0); > + newval = &u8val; > + newsize = sizeof(u8val); > + break; Bug: blind truncation gives overflow before overflow can be checked for. The overflow checking done by the subsequent errno check only checks for representability of the return value. Style bug: bogus cast to make the overflow more explicit and/or prevent the compiler from detecting the bug and misleading the reader into thinking that overflow is intentionally allowed. The cast usually has no other effect (the behaviour on conversion is only implementation-defined in the overflow case. Perhaps it can be different with the cast). The other assignments are mostly similarly broken: - CTLTYPE_INT: similar bogus cast to int - CTLTYPE_UINT: unsimilar bogus cast to int. The correct cast to u_int would have no effect, but casting to int gratuitously gives implementation defined behaviour even for representable values like UINT_MAX - CTLTYPE_LONG, CTLTYPE_ULONG: correct (null conversion with no cast) - CTLTYPE_S64: no cast, though overflow can occur if int64_t < intmax_t - CTLTYPE_U64: no cast. Correct since the type is unsigned - CTLTYPE_IMAX, CTLTYPE_UIMAX: unsupported. > + case CTLTYPE_U16: > + u16val = (uint16_t)strtoul(newvalstr, &endptr, 0); > + newval = &u16val; > + newsize = sizeof(u16val); > + break; As a bug, but another style bug from the cast (ling too long). > case CTLTYPE_INT: > if (strncmp(fmt, "IK", 2) == 0) > intval = strIKtoi(newvalstr, &endptr, fmt); The error handling is somewhat obfuscated by having general code after the switch statement to avoid almost repeating it for each case. It could be simplified by always assigning to uintmax_t uimaxval. Then do general error handling. Then do specific error handling (range checking for each case). The error handling also has a silly check for empty values before the main check. The general error handling finds empty values and much more as a special case of disallowing values with no digits (e.g., nonempty leading whitespace and/or sign before the empty value). So all the silly check does is give a special error message for empty values. Not worth it. Style bug: you forgot to add the new types to the silly check. > free(oval); > return (0); > > + case CTLTYPE_U8: > + case CTLTYPE_U16: > case CTLTYPE_INT: > case CTLTYPE_UINT: > case CTLTYPE_LONG: > @@ -902,6 +922,14 @@ show_var(int *oid, int nlen) > sep1 = ""; > while (len >= intlen) { > switch (kind & CTLTYPE) { > + case CTLTYPE_U8: > + umv = *(uint8_t *)p; > + mv = *(int8_t *)p; > + break; > + case CTLTYPE_U16: > + umv = *(uint16_t *)p; > + mv = *(int16_t *)p; > + break; CTLTYPE_I8 and CTLTYPE_I16 are not supported (nonexistent), so the assignments to mv are never used. They probably prevent the compiler warning about the missing support by detecting the bug as "mv possibly used uninitialized". > case CTLTYPE_INT: > case CTLTYPE_UINT: > umv = *(u_int *)p; > > Modified: head/sys/kern/kern_sysctl.c > ============================================================================== > --- head/sys/kern/kern_sysctl.c Thu Oct 22 22:29:25 2015 (r289772) > +++ head/sys/kern/kern_sysctl.c Thu Oct 22 23:03:06 2015 (r289773) > @@ -1128,6 +1128,70 @@ static SYSCTL_NODE(_sysctl, 5, oiddescr, > */ > > /* > + * Handle an int8_t, signed or unsigned. > + * Two cases: > + * a variable: point arg1 at it. > + * a constant: pass it in arg2. > + */ Only 1 case. Signed is not supported. The style of the comment matches the bad style of others. It is n-tuplicated ad nauseum. It has fancy formatting, but no indent protection. > + > +int > +sysctl_handle_8(SYSCTL_HANDLER_ARGS) > +{ > + int8_t tmpout; > + int error = 0; Style bugs copied. > + > + /* > + * Attempt to get a coherent snapshot by making a copy of the data. > + */ Bogus comment on probably unnecessary code. sysctl_int() might need to copy since int might not be atomic, although it is on all supported arches. But surely byte accesses are atomic? > + if (arg1) > + tmpout = *(int8_t *)arg1; > + else > + tmpout = arg2; Bogus cast. Only uint8_t is supported. This matches bugs in sysctl_handle_int(), except there both types are supported so the type pun saves space. sysctl(8) is more careful about making the types match exactly. > + error = SYSCTL_OUT(req, &tmpout, sizeof(tmpout)); > + > + if (error || !req->newptr) > + return (error); > + > + if (!arg1) > + error = EPERM; > + else > + error = SYSCTL_IN(req, arg1, sizeof(tmpout)); > + return (error); > +} This duplcates mounds of style bugs again: - blank lines to separate related code (error handling) - boolean checks on non-boolean > + > +/* > + * Handle an int16_t, signed or unsigned. > + * Two cases: > + * a variable: point arg1 at it. > + * a constant: pass it in arg2. > + */ > + > +int > +sysctl_handle_16(SYSCTL_HANDLER_ARGS) > +{ > + int16_t tmpout; > + int error = 0; > + > + /* > + * Attempt to get a coherent snapshot by making a copy of the data. > + */ > + if (arg1) > + tmpout = *(int16_t *)arg1; > + else > + tmpout = arg2; > + error = SYSCTL_OUT(req, &tmpout, sizeof(tmpout)); > + > + if (error || !req->newptr) > + return (error); > + > + if (!arg1) > + error = EPERM; > + else > + error = SYSCTL_IN(req, arg1, sizeof(tmpout)); > + return (error); > +} Similarly, except the copy might be needed even if int is atomic. > + > +/* > * Handle an int, signed or unsigned. > * Two cases: > * a variable: point arg1 at it. > > Modified: head/sys/sys/sysctl.h > ============================================================================== > --- head/sys/sys/sysctl.h Thu Oct 22 22:29:25 2015 (r289772) > +++ head/sys/sys/sysctl.h Thu Oct 22 23:03:06 2015 (r289773) > @@ -73,6 +73,8 @@ struct ctlname { > #define CTLTYPE_LONG 7 /* name describes a long */ > #define CTLTYPE_ULONG 8 /* name describes an unsigned long */ > #define CTLTYPE_U64 9 /* name describes an unsigned 64-bit number */ > +#define CTLTYPE_U8 0xa /* name describes an unsigned 8-bit number */ > +#define CTLTYPE_U16 0xb /* name describes an unsigned 16-bit number */ Style bug: spelling ids in hex. This should at least reserve values for the signed types. ISTR that the 4.4BSD version had null support for unsigned types. Then some hacks gave support for some unsigned types. S64 was spelled QUAD, and U64 was missing for a long time, but IIRC you could use a hack to print it though not input it. Indeed, the format was determined by the format string and not by CTLTYPE*, so you could print U64 using format "QU" to type pun a quad_t to uquad_t for printing. This was eventually cleaned up to remove the hacks. > @@ -319,6 +323,46 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e > __arg, len, sysctl_handle_string, "A", __DESCR(descr)); \ > }) > > +/* Oid for an unsigned 8-bit int. If ptr is NULL, val is returned. */ > +#define SYSCTL_NULL_U8_PTR ((unsigned *)NULL) > +#define SYSCTL_U8(parent, nbr, name, access, ptr, val, descr) \ > + SYSCTL_OID(parent, nbr, name, \ > + CTLTYPE_U8 | CTLFLAG_MPSAFE | (access), \ > + ptr, val, sysctl_handle_8, "CU", descr); \ "CU" looks like never-used garbage. "QU" is still in the initializer for U64, (and the macro is still named with UQUAD instead of U64), but sysctl(8) no longer uses even the "Q" part. I think only old sysctl binaries benefit from having "QU". But the new "C" format is not supported by anything. Old sysctl binaries would be confused by even the size. > ... > +/* Oid for an unsigned 16-bit int. If ptr is NULL, val is returned. */ > +#define SYSCTL_NULL_U16_PTR ((unsigned *)NULL) > +#define SYSCTL_U16(parent, nbr, name, access, ptr, val, descr) \ > + SYSCTL_OID(parent, nbr, name, \ > + CTLTYPE_U16 | CTLFLAG_MPSAFE | (access), \ > + ptr, val, sysctl_handle_16, "SU", descr); \ > + CTASSERT((((access) & CTLTYPE) == 0 || \ > + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_U16) && \ > + sizeof(uint16_t) == sizeof(*(ptr))) "S" for uint16_t is even less supported and a larger misspelling than "C" for uint8_t. POSIX now requires chars to be 8 bits and uint8_t to be u_char, but nothing requries uint16_t to be u_short. Spelling the name of uint16_t with an "S" is like the old mistake spelling the name of uint64_t with a "Q". Bruce From owner-svn-src-all@freebsd.org Fri Oct 23 05:42: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 5B886A1669A; Fri, 23 Oct 2015 05:42:47 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 220E0AFA; Fri, 23 Oct 2015 05:42:46 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (50-196-156-133-static.hfc.comcastbusiness.net [50.196.156.133]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id t9N5NRSd077400 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 22 Oct 2015 22:23:31 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r289728 - head To: Alexander Kabaev , Ed Maste References: <201510220132.t9M1WBW9087666@repo.freebsd.org> <20151021214550.70b25f13@kan> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Julian Elischer Message-ID: <5629C44A.8060205@freebsd.org> Date: Fri, 23 Oct 2015 13:23:22 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151021214550.70b25f13@kan> Content-Type: text/plain; charset=windows-1252; 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: Fri, 23 Oct 2015 05:42:47 -0000 On 10/22/15 9:45 AM, Alexander Kabaev wrote: > On Thu, 22 Oct 2015 01:32:11 +0000 (UTC) > Ed Maste wrote: > >> Author: emaste >> Date: Thu Oct 22 01:32:11 2015 >> New Revision: 289728 >> URL: https://svnweb.freebsd.org/changeset/base/289728 >> >> Log: >> Warn that NOCLEAN is deprecated - use NO_CLEAN instead >> >> NO_CLEAN has been the correct spelling for over a decade. >> >> Modified: >> head/Makefile.inc1 >> >> Modified: head/Makefile.inc1 >> ============================================================================== >> --- head/Makefile.inc1 Thu Oct 22 01:04:31 2015 >> (r289727) +++ head/Makefile.inc1 Thu Oct 22 01:32:11 >> 2015 (r289728) @@ -128,6 +128,7 @@ SUBDIR+=etc >> .endif # !empty(SUBDIR_OVERRIDE) >> >> .if defined(NOCLEAN) >> +.warning NOCLEAN option is deprecated. Use NO_CLEAN instead. >> NO_CLEAN= ${NOCLEAN} >> .endif >> .if defined(NO_CLEANDIR) > > For some definition of 'correct'. It definitely is not for those who > have -DNOCLEAN wired into their finger memory and above mentioned > decade did not help with that any. > > I think some of the common spellings were left as is in great NO_ > revolution for a reason and I see no reason why the sudden itch to > change that. I can never remember what the right way for WITHXXX WITH_XXX DO_XXX NO_XXX NOXXX etc. is.. I go look for examples every time. From owner-svn-src-all@freebsd.org Fri Oct 23 07:25: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 DF3B1A1A85A; Fri, 23 Oct 2015 07:25:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6A03C31; Fri, 23 Oct 2015 07:25:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7PE81064228; Fri, 23 Oct 2015 07:25:14 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7PEgu064227; Fri, 23 Oct 2015 07:25:14 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230725.t9N7PEgu064227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 07:25:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289784 - stable/10/sys/dev/drm2/radeon X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 07:25:16 -0000 Author: avg Date: Fri Oct 23 07:25:14 2015 New Revision: 289784 URL: https://svnweb.freebsd.org/changeset/base/289784 Log: MFC r287673: radeon_suspend_kms: don't mess with pci state Modified: stable/10/sys/dev/drm2/radeon/radeon_device.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/drm2/radeon/radeon_device.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/radeon_device.c Fri Oct 23 05:03:34 2015 (r289783) +++ stable/10/sys/dev/drm2/radeon/radeon_device.c Fri Oct 23 07:25:14 2015 (r289784) @@ -1342,14 +1342,10 @@ int radeon_suspend_kms(struct drm_device radeon_agp_suspend(rdev); - pci_save_state(device_get_parent(dev->dev)); #ifdef FREEBSD_WIP if (state.event == PM_EVENT_SUSPEND) { /* Shut down the device */ pci_disable_device(dev->pdev); -#endif /* FREEBSD_WIP */ - pci_set_powerstate(dev->dev, PCI_POWERSTATE_D3); -#ifdef FREEBSD_WIP } console_lock(); #endif /* FREEBSD_WIP */ @@ -1380,10 +1376,6 @@ int radeon_resume_kms(struct drm_device #ifdef FREEBSD_WIP console_lock(); -#endif /* FREEBSD_WIP */ - pci_set_powerstate(device_get_parent(dev->dev), PCI_POWERSTATE_D0); - pci_restore_state(device_get_parent(dev->dev)); -#ifdef FREEBSD_WIP if (pci_enable_device(dev->pdev)) { console_unlock(); return -1; From owner-svn-src-all@freebsd.org Fri Oct 23 07:29: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 5B688A1A9CF; Fri, 23 Oct 2015 07:29:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25A781037; Fri, 23 Oct 2015 07:29:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7TbxT064838; Fri, 23 Oct 2015 07:29:37 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7TbmS064837; Fri, 23 Oct 2015 07:29:37 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230729.t9N7TbmS064837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 07:29:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289785 - stable/9/sys/dev/drm2/radeon X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 07:29:38 -0000 Author: avg Date: Fri Oct 23 07:29:37 2015 New Revision: 289785 URL: https://svnweb.freebsd.org/changeset/base/289785 Log: MFC r287673: radeon_suspend_kms: don't mess with pci state Patch adjusted for FREEBSD_WIP vs DUMBBELL_WIP. Modified: stable/9/sys/dev/drm2/radeon/radeon_device.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/radeon/radeon_device.c ============================================================================== --- stable/9/sys/dev/drm2/radeon/radeon_device.c Fri Oct 23 07:25:14 2015 (r289784) +++ stable/9/sys/dev/drm2/radeon/radeon_device.c Fri Oct 23 07:29:37 2015 (r289785) @@ -1316,14 +1316,10 @@ int radeon_suspend_kms(struct drm_device radeon_agp_suspend(rdev); - pci_save_state(device_get_parent(rdev->dev)); #ifdef DUMBBELL_WIP if (state.event == PM_EVENT_SUSPEND) { /* Shut down the device */ pci_disable_device(dev->pdev); -#endif /* DUMBBELL_WIP */ - pci_set_powerstate(dev->device, PCI_POWERSTATE_D3); -#ifdef DUMBBELL_WIP } console_lock(); #endif /* DUMBBELL_WIP */ @@ -1354,10 +1350,6 @@ int radeon_resume_kms(struct drm_device #ifdef DUMBBELL_WIP console_lock(); -#endif /* DUMBBELL_WIP */ - pci_set_powerstate(dev->device, PCI_POWERSTATE_D0); - pci_restore_state(device_get_parent(rdev->dev)); -#ifdef DUMBBELL_WIP if (pci_enable_device(dev->pdev)) { console_unlock(); return -1; From owner-svn-src-all@freebsd.org Fri Oct 23 07:31: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 0CEAAA1AA85; Fri, 23 Oct 2015 07:31:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C823512AF; Fri, 23 Oct 2015 07:31:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7V4v3067017; Fri, 23 Oct 2015 07:31:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7V43C067015; Fri, 23 Oct 2015 07:31:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230731.t9N7V43C067015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 07:31:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289786 - in stable/10/sys/cddl/dev/dtrace: amd64 powerpc 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, 23 Oct 2015 07:31:06 -0000 Author: avg Date: Fri Oct 23 07:31:04 2015 New Revision: 289786 URL: https://svnweb.freebsd.org/changeset/base/289786 Log: MFC r288361: dtrace_getarg: remove stray return statement on amd64, powerpc Modified: stable/10/sys/cddl/dev/dtrace/amd64/dtrace_isa.c stable/10/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/dev/dtrace/amd64/dtrace_isa.c ============================================================================== --- stable/10/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Fri Oct 23 07:29:37 2015 (r289785) +++ stable/10/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Fri Oct 23 07:31:04 2015 (r289786) @@ -448,7 +448,6 @@ load: DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT); return (val); - return (0); } int Modified: stable/10/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c ============================================================================== --- stable/10/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c Fri Oct 23 07:29:37 2015 (r289785) +++ stable/10/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c Fri Oct 23 07:31:04 2015 (r289786) @@ -425,7 +425,6 @@ load: DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT); return (val); - return (0); } int From owner-svn-src-all@freebsd.org Fri Oct 23 07:32: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 7FDACA1ABCB; Fri, 23 Oct 2015 07:32:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B673151B; Fri, 23 Oct 2015 07:32:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7WFWH067710; Fri, 23 Oct 2015 07:32:15 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7WFlQ067709; Fri, 23 Oct 2015 07:32:15 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230732.t9N7WFlQ067709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 07:32:15 +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: r289787 - stable/9/sys/cddl/dev/dtrace/amd64 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, 23 Oct 2015 07:32:16 -0000 Author: avg Date: Fri Oct 23 07:32:15 2015 New Revision: 289787 URL: https://svnweb.freebsd.org/changeset/base/289787 Log: MFC r288361: dtrace_getarg: remove stray return statement on amd64 Note: no dtrace/powerpc in stable/9. Modified: stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c ============================================================================== --- stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Fri Oct 23 07:31:04 2015 (r289786) +++ stable/9/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Fri Oct 23 07:32:15 2015 (r289787) @@ -427,7 +427,6 @@ load: DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT); return (val); - return (0); } int From owner-svn-src-all@freebsd.org Fri Oct 23 07:33: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 C2D1DA1AC44; Fri, 23 Oct 2015 07:33:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FEAD17DE; Fri, 23 Oct 2015 07:33:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7XhWi067975; Fri, 23 Oct 2015 07:33:43 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7Xhdh067974; Fri, 23 Oct 2015 07:33:43 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230733.t9N7Xhdh067974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 07:33: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: r289788 - stable/10/sys/cddl/dev/sdt 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, 23 Oct 2015 07:33:44 -0000 Author: avg Date: Fri Oct 23 07:33:43 2015 New Revision: 289788 URL: https://svnweb.freebsd.org/changeset/base/289788 Log: MFC r288364: sdt module does not seem to actually use any symbol from opensolaris module Modified: stable/10/sys/cddl/dev/sdt/sdt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/dev/sdt/sdt.c ============================================================================== --- stable/10/sys/cddl/dev/sdt/sdt.c Fri Oct 23 07:32:15 2015 (r289787) +++ stable/10/sys/cddl/dev/sdt/sdt.c Fri Oct 23 07:33:43 2015 (r289788) @@ -398,4 +398,3 @@ sdt_modevent(module_t mod __unused, int DEV_MODULE(sdt, sdt_modevent, NULL); MODULE_VERSION(sdt, 1); MODULE_DEPEND(sdt, dtrace, 1, 1, 1); -MODULE_DEPEND(sdt, opensolaris, 1, 1, 1); From owner-svn-src-all@freebsd.org Fri Oct 23 07:33: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 DFE49A1ACA9; Fri, 23 Oct 2015 07:33:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC13E1936; Fri, 23 Oct 2015 07:33:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7XtdQ068049; Fri, 23 Oct 2015 07:33:55 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7XtDh068048; Fri, 23 Oct 2015 07:33:55 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230733.t9N7XtDh068048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 07:33:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289789 - stable/9/sys/cddl/dev/sdt 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, 23 Oct 2015 07:33:57 -0000 Author: avg Date: Fri Oct 23 07:33:55 2015 New Revision: 289789 URL: https://svnweb.freebsd.org/changeset/base/289789 Log: MFC r288364: sdt module does not seem to actually use any symbol from opensolaris module Modified: stable/9/sys/cddl/dev/sdt/sdt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/dev/sdt/sdt.c ============================================================================== --- stable/9/sys/cddl/dev/sdt/sdt.c Fri Oct 23 07:33:43 2015 (r289788) +++ stable/9/sys/cddl/dev/sdt/sdt.c Fri Oct 23 07:33:55 2015 (r289789) @@ -398,4 +398,3 @@ sdt_modevent(module_t mod __unused, int DEV_MODULE(sdt, sdt_modevent, NULL); MODULE_VERSION(sdt, 1); MODULE_DEPEND(sdt, dtrace, 1, 1, 1); -MODULE_DEPEND(sdt, opensolaris, 1, 1, 1); From owner-svn-src-all@freebsd.org Fri Oct 23 07:34: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 E59C5A1ADAB; Fri, 23 Oct 2015 07:34:58 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1EDE1AAA; Fri, 23 Oct 2015 07:34:58 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7YvWr068253; Fri, 23 Oct 2015 07:34:57 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7YvEH068252; Fri, 23 Oct 2015 07:34:57 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201510230734.t9N7YvEH068252@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Fri, 23 Oct 2015 07:34:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289790 - head/lib/libdpv X-SVN-Group: head MIME-Version: 1.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, 23 Oct 2015 07:34:59 -0000 Author: dteske Date: Fri Oct 23 07:34:57 2015 New Revision: 289790 URL: https://svnweb.freebsd.org/changeset/base/289790 Log: dpv(3) merged to stable/10 before release/10.2.0 MFC after: 3 days X-MFC-to: stable/10 Modified: head/lib/libdpv/dpv.3 Modified: head/lib/libdpv/dpv.3 ============================================================================== --- head/lib/libdpv/dpv.3 Fri Oct 23 07:33:55 2015 (r289789) +++ head/lib/libdpv/dpv.3 Fri Oct 23 07:34:57 2015 (r289790) @@ -441,7 +441,7 @@ or desired values. The .Nm library first appeared in -.Fx 11.0 . +.Fx 10.2 . .Sh AUTHORS .An Devin Teske Aq dteske@FreeBSD.org .Sh BUGS From owner-svn-src-all@freebsd.org Fri Oct 23 07:35: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 09E52A1AFAF; Fri, 23 Oct 2015 07:35:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6D3B1D76; Fri, 23 Oct 2015 07:35:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7ZmCC068460; Fri, 23 Oct 2015 07:35:48 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7ZmYC068459; Fri, 23 Oct 2015 07:35:48 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230735.t9N7ZmYC068459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 07:35:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289792 - stable/9/sys/cddl/dev/sdt 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, 23 Oct 2015 07:35:50 -0000 Author: avg Date: Fri Oct 23 07:35:48 2015 New Revision: 289792 URL: https://svnweb.freebsd.org/changeset/base/289792 Log: MFC r288365: sdt: static-ize couple of variables Modified: stable/9/sys/cddl/dev/sdt/sdt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/dev/sdt/sdt.c ============================================================================== --- stable/9/sys/cddl/dev/sdt/sdt.c Fri Oct 23 07:35:39 2015 (r289791) +++ stable/9/sys/cddl/dev/sdt/sdt.c Fri Oct 23 07:35:48 2015 (r289792) @@ -100,8 +100,8 @@ static dtrace_pops_t sdt_pops = { static TAILQ_HEAD(, sdt_provider) sdt_prov_list; -eventhandler_tag sdt_kld_load_tag; -eventhandler_tag sdt_kld_unload_try_tag; +static eventhandler_tag sdt_kld_load_tag; +static eventhandler_tag sdt_kld_unload_try_tag; static void sdt_create_provider(struct sdt_provider *prov) From owner-svn-src-all@freebsd.org Fri Oct 23 07:35: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 66961A1AF84; Fri, 23 Oct 2015 07:35:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 350D21C7E; Fri, 23 Oct 2015 07:35:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7ZdX5068395; Fri, 23 Oct 2015 07:35:39 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7ZdL4068393; Fri, 23 Oct 2015 07:35:39 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230735.t9N7ZdL4068393@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 07:35:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289791 - stable/10/sys/cddl/dev/sdt 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, 23 Oct 2015 07:35:40 -0000 Author: avg Date: Fri Oct 23 07:35:39 2015 New Revision: 289791 URL: https://svnweb.freebsd.org/changeset/base/289791 Log: MFC r288365: sdt: static-ize couple of variables Modified: stable/10/sys/cddl/dev/sdt/sdt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/dev/sdt/sdt.c ============================================================================== --- stable/10/sys/cddl/dev/sdt/sdt.c Fri Oct 23 07:34:57 2015 (r289790) +++ stable/10/sys/cddl/dev/sdt/sdt.c Fri Oct 23 07:35:39 2015 (r289791) @@ -100,8 +100,8 @@ static dtrace_pops_t sdt_pops = { static TAILQ_HEAD(, sdt_provider) sdt_prov_list; -eventhandler_tag sdt_kld_load_tag; -eventhandler_tag sdt_kld_unload_try_tag; +static eventhandler_tag sdt_kld_load_tag; +static eventhandler_tag sdt_kld_unload_try_tag; static void sdt_create_provider(struct sdt_provider *prov) From owner-svn-src-all@freebsd.org Fri Oct 23 07:36: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 61F5BA190DD; Fri, 23 Oct 2015 07:36:29 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29CEB1F78; Fri, 23 Oct 2015 07:36:29 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7aSHI068601; Fri, 23 Oct 2015 07:36:28 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7aSww068600; Fri, 23 Oct 2015 07:36:28 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201510230736.t9N7aSww068600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Fri, 23 Oct 2015 07:36:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289793 - head/lib/libdpv X-SVN-Group: head MIME-Version: 1.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, 23 Oct 2015 07:36:29 -0000 Author: dteske Date: Fri Oct 23 07:36:27 2015 New Revision: 289793 URL: https://svnweb.freebsd.org/changeset/base/289793 Log: Bump date/copyright after correcting HISTORY MFC after: 3 days X-MFC-to: stable/10 X-MFC-with: r289790 Modified: head/lib/libdpv/dpv.3 Modified: head/lib/libdpv/dpv.3 ============================================================================== --- head/lib/libdpv/dpv.3 Fri Oct 23 07:35:48 2015 (r289792) +++ head/lib/libdpv/dpv.3 Fri Oct 23 07:36:27 2015 (r289793) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013-2014 Devin Teske +.\" Copyright (c) 2013-2015 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Oct 24, 2014 +.Dd Oct 22, 2015 .Dt DPV 3 .Os .Sh NAME From owner-svn-src-all@freebsd.org Fri Oct 23 07:37: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 A323DA191AD; Fri, 23 Oct 2015 07:37:28 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DAD216B; Fri, 23 Oct 2015 07:37:28 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7bR3e068791; Fri, 23 Oct 2015 07:37:27 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7bRi4068790; Fri, 23 Oct 2015 07:37:27 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201510230737.t9N7bRi4068790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Fri, 23 Oct 2015 07:37:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289794 - head/lib/libfigpar X-SVN-Group: head MIME-Version: 1.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, 23 Oct 2015 07:37:28 -0000 Author: dteske Date: Fri Oct 23 07:37:27 2015 New Revision: 289794 URL: https://svnweb.freebsd.org/changeset/base/289794 Log: figpar(3) merged to stable/10 before release/10.2.0 MFC after: 3 days X-MFC-to: stable/10 Modified: head/lib/libfigpar/figpar.3 Modified: head/lib/libfigpar/figpar.3 ============================================================================== --- head/lib/libfigpar/figpar.3 Fri Oct 23 07:36:27 2015 (r289793) +++ head/lib/libfigpar/figpar.3 Fri Oct 23 07:37:27 2015 (r289794) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013-2014 Devin Teske +.\" Copyright (c) 2013-2015 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Oct 24, 2014 +.Dd Oct 22, 2015 .Dt FIGPAR 3 .Os .Sh NAME @@ -243,7 +243,7 @@ Convert a string to lower case. The .Nm library first appeared in -.Fx 11.0 . +.Fx 10.2 . .Sh AUTHORS .An Devin Teske Aq dteske@FreeBSD.org .Sh BUGS From owner-svn-src-all@freebsd.org Fri Oct 23 07:37: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 4181FA191EC; Fri, 23 Oct 2015 07:37:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07D052E3; Fri, 23 Oct 2015 07:37:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7biaU068874; Fri, 23 Oct 2015 07:37:44 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7bibS068873; Fri, 23 Oct 2015 07:37:44 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230737.t9N7bibS068873@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 07:37:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289795 - 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: Fri, 23 Oct 2015 07:37:46 -0000 Author: avg Date: Fri Oct 23 07:37:44 2015 New Revision: 289795 URL: https://svnweb.freebsd.org/changeset/base/289795 Log: MFC r288366: sdt.h: no need for argtype_list_head Modified: stable/10/sys/sys/sdt.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/sdt.h ============================================================================== --- stable/10/sys/sys/sdt.h Fri Oct 23 07:37:27 2015 (r289794) +++ stable/10/sys/sys/sdt.h Fri Oct 23 07:37:44 2015 (r289795) @@ -398,7 +398,7 @@ struct sdt_probe { struct sdt_provider *prov; /* Ptr to the provider structure. */ TAILQ_ENTRY(sdt_probe) probe_entry; /* SDT probe list entry. */ - TAILQ_HEAD(argtype_list_head, sdt_argtype) argtype_list; + TAILQ_HEAD(, sdt_argtype) argtype_list; const char *mod; const char *func; const char *name; From owner-svn-src-all@freebsd.org Fri Oct 23 07:37: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 46B62A19236; Fri, 23 Oct 2015 07:37:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0EB8A656; Fri, 23 Oct 2015 07:37:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7btWj068943; Fri, 23 Oct 2015 07:37:55 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7btvP068942; Fri, 23 Oct 2015 07:37:55 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230737.t9N7btvP068942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 07:37:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289796 - stable/9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 07:37:56 -0000 Author: avg Date: Fri Oct 23 07:37:54 2015 New Revision: 289796 URL: https://svnweb.freebsd.org/changeset/base/289796 Log: MFC r288366: sdt.h: no need for argtype_list_head Modified: stable/9/sys/sys/sdt.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/sys/sdt.h ============================================================================== --- stable/9/sys/sys/sdt.h Fri Oct 23 07:37:44 2015 (r289795) +++ stable/9/sys/sys/sdt.h Fri Oct 23 07:37:54 2015 (r289796) @@ -398,7 +398,7 @@ struct sdt_probe { struct sdt_provider *prov; /* Ptr to the provider structure. */ TAILQ_ENTRY(sdt_probe) probe_entry; /* SDT probe list entry. */ - TAILQ_HEAD(argtype_list_head, sdt_argtype) argtype_list; + TAILQ_HEAD(, sdt_argtype) argtype_list; const char *mod; const char *func; const char *name; From owner-svn-src-all@freebsd.org Fri Oct 23 07:38: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 E7D83A192A9; Fri, 23 Oct 2015 07:38:35 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4C73805; Fri, 23 Oct 2015 07:38:35 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7cY0o069083; Fri, 23 Oct 2015 07:38:34 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7cY6K069082; Fri, 23 Oct 2015 07:38:34 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201510230738.t9N7cY6K069082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Fri, 23 Oct 2015 07:38:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289797 - head/usr.bin/dpv X-SVN-Group: head MIME-Version: 1.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, 23 Oct 2015 07:38:36 -0000 Author: dteske Date: Fri Oct 23 07:38:34 2015 New Revision: 289797 URL: https://svnweb.freebsd.org/changeset/base/289797 Log: dpv(1) merged to stable/10 before release/10.2.0 MFC after: 3 days X-MFC-to: stable/10 Modified: head/usr.bin/dpv/dpv.1 Modified: head/usr.bin/dpv/dpv.1 ============================================================================== --- head/usr.bin/dpv/dpv.1 Fri Oct 23 07:37:54 2015 (r289796) +++ head/usr.bin/dpv/dpv.1 Fri Oct 23 07:38:34 2015 (r289797) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013-2014 Devin Teske +.\" Copyright (c) 2013-2015 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Sep 7, 2014 +.Dd Oct 22, 2015 .Dt DPV 1 .Os .Sh NAME @@ -366,7 +366,7 @@ dpv -o /dev/md42 < /dev/zero A .Nm utility first appeared in -.Fx 11.0 . +.Fx 10.2 . .Sh AUTHORS .An Devin Teske Aq dteske@FreeBSD.org .Sh BUGS From owner-svn-src-all@freebsd.org Fri Oct 23 07:40: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 EF633A19462; Fri, 23 Oct 2015 07:40:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7EABB28; Fri, 23 Oct 2015 07:40:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7ei87069441; Fri, 23 Oct 2015 07:40:44 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7ehGp069426; Fri, 23 Oct 2015 07:40:43 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230740.t9N7ehGp069426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 07:40: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: r289798 - in stable/10/sys: compat/linux kern 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: Fri, 23 Oct 2015 07:40:46 -0000 Author: avg Date: Fri Oct 23 07:40:43 2015 New Revision: 289798 URL: https://svnweb.freebsd.org/changeset/base/289798 Log: MFC r288336: save some bytes by using more concise SDT_PROBE Modified: stable/10/sys/compat/linux/linux_dtrace.h stable/10/sys/kern/kern_exec.c stable/10/sys/kern/kern_exit.c stable/10/sys/kern/kern_fork.c stable/10/sys/kern/kern_proc.c stable/10/sys/kern/kern_racct.c stable/10/sys/kern/kern_sig.c stable/10/sys/kern/kern_timeout.c stable/10/sys/kern/vfs_cache.c stable/10/sys/kern/vfs_lookup.c stable/10/sys/kern/vfs_syscalls.c stable/10/sys/tools/vnode_if.awk Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_dtrace.h ============================================================================== --- stable/10/sys/compat/linux/linux_dtrace.h Fri Oct 23 07:38:34 2015 (r289797) +++ stable/10/sys/compat/linux/linux_dtrace.h Fri Oct 23 07:40:43 2015 (r289798) @@ -82,7 +82,7 @@ c, d, e, f) #define LIN_SDT_PROBE4(a, b, c, d, e, f, g) SDT_PROBE4(LINUX_DTRACE, a, b, \ c, d, e, f, g) -#define _LIN_SDT_PROBE5(a, b, c, d, e, f, g, h, i) SDT_PROBE(a, b, c, d, \ +#define _LIN_SDT_PROBE5(a, b, c, d, e, f, g, h, i) SDT_PROBE5(a, b, c, d, \ e, f, g, h, i) #define LIN_SDT_PROBE5(a, b, c, d, e, f, g, h) _LIN_SDT_PROBE5(LINUX_DTRACE, \ a, b, c, d, e, f, g, h) Modified: stable/10/sys/kern/kern_exec.c ============================================================================== --- stable/10/sys/kern/kern_exec.c Fri Oct 23 07:38:34 2015 (r289797) +++ stable/10/sys/kern/kern_exec.c Fri Oct 23 07:40:43 2015 (r289798) @@ -416,7 +416,7 @@ do_execve(td, args, mac_p) | AUDITVNODE1, UIO_SYSSPACE, args->fname, td); } - SDT_PROBE(proc, kernel, , exec, args->fname, 0, 0, 0, 0 ); + SDT_PROBE1(proc, kernel, , exec, args->fname); interpret: if (args->fname != NULL) { @@ -838,7 +838,7 @@ interpret: vfs_mark_atime(imgp->vp, td->td_ucred); - SDT_PROBE(proc, kernel, , exec__success, args->fname, 0, 0, 0, 0); + SDT_PROBE1(proc, kernel, , exec__success, args->fname); VOP_UNLOCK(imgp->vp, 0); done1: @@ -909,7 +909,7 @@ exec_fail: p->p_flag &= ~P_INEXEC; PROC_UNLOCK(p); - SDT_PROBE(proc, kernel, , exec__failure, error, 0, 0, 0, 0); + SDT_PROBE1(proc, kernel, , exec__failure, error); done2: #ifdef MAC Modified: stable/10/sys/kern/kern_exit.c ============================================================================== --- stable/10/sys/kern/kern_exit.c Fri Oct 23 07:38:34 2015 (r289797) +++ stable/10/sys/kern/kern_exit.c Fri Oct 23 07:40:43 2015 (r289798) @@ -564,7 +564,7 @@ exit1(struct thread *td, int rv) reason = CLD_DUMPED; else if (WIFSIGNALED(rv)) reason = CLD_KILLED; - SDT_PROBE(proc, kernel, , exit, reason, 0, 0, 0, 0); + SDT_PROBE1(proc, kernel, , exit, reason); #endif /* Modified: stable/10/sys/kern/kern_fork.c ============================================================================== --- stable/10/sys/kern/kern_fork.c Fri Oct 23 07:38:34 2015 (r289797) +++ stable/10/sys/kern/kern_fork.c Fri Oct 23 07:40:43 2015 (r289798) @@ -753,7 +753,7 @@ do_fork(struct thread *td, int flags, st * Tell any interested parties about the new process. */ knote_fork(&p1->p_klist, p2->p_pid); - SDT_PROBE(proc, kernel, , create, p2, p1, flags, 0, 0); + SDT_PROBE3(proc, kernel, , create, p2, p1, flags); /* * Wait until debugger is attached to child. Modified: stable/10/sys/kern/kern_proc.c ============================================================================== --- stable/10/sys/kern/kern_proc.c Fri Oct 23 07:38:34 2015 (r289797) +++ stable/10/sys/kern/kern_proc.c Fri Oct 23 07:40:43 2015 (r289798) @@ -181,9 +181,9 @@ proc_ctor(void *mem, int size, void *arg struct proc *p; p = (struct proc *)mem; - SDT_PROBE(proc, kernel, ctor , entry, p, size, arg, flags, 0); + SDT_PROBE4(proc, kernel, ctor , entry, p, size, arg, flags); EVENTHANDLER_INVOKE(process_ctor, p); - SDT_PROBE(proc, kernel, ctor , return, p, size, arg, flags, 0); + SDT_PROBE4(proc, kernel, ctor , return, p, size, arg, flags); return (0); } @@ -199,7 +199,7 @@ proc_dtor(void *mem, int size, void *arg /* INVARIANTS checks go here */ p = (struct proc *)mem; td = FIRST_THREAD_IN_PROC(p); - SDT_PROBE(proc, kernel, dtor, entry, p, size, arg, td, 0); + SDT_PROBE4(proc, kernel, dtor, entry, p, size, arg, td); if (td != NULL) { #ifdef INVARIANTS KASSERT((p->p_numthreads == 1), @@ -212,7 +212,7 @@ proc_dtor(void *mem, int size, void *arg EVENTHANDLER_INVOKE(process_dtor, p); if (p->p_ksi != NULL) KASSERT(! KSI_ONQ(p->p_ksi), ("SIGCHLD queue")); - SDT_PROBE(proc, kernel, dtor, return, p, size, arg, 0, 0); + SDT_PROBE3(proc, kernel, dtor, return, p, size, arg); } /* @@ -224,7 +224,7 @@ proc_init(void *mem, int size, int flags struct proc *p; p = (struct proc *)mem; - SDT_PROBE(proc, kernel, init, entry, p, size, flags, 0, 0); + SDT_PROBE3(proc, kernel, init, entry, p, size, flags); p->p_sched = (struct p_sched *)&p[1]; bzero(&p->p_mtx, sizeof(struct mtx)); mtx_init(&p->p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK); @@ -234,7 +234,7 @@ proc_init(void *mem, int size, int flags TAILQ_INIT(&p->p_threads); /* all threads in proc */ EVENTHANDLER_INVOKE(process_init, p); p->p_stats = pstats_alloc(); - SDT_PROBE(proc, kernel, init, return, p, size, flags, 0, 0); + SDT_PROBE3(proc, kernel, init, return, p, size, flags); return (0); } Modified: stable/10/sys/kern/kern_racct.c ============================================================================== --- stable/10/sys/kern/kern_racct.c Fri Oct 23 07:38:34 2015 (r289797) +++ stable/10/sys/kern/kern_racct.c Fri Oct 23 07:40:43 2015 (r289798) @@ -447,7 +447,7 @@ racct_create(struct racct **racctp) if (!racct_enable) return; - SDT_PROBE(racct, kernel, racct, create, racctp, 0, 0, 0, 0); + SDT_PROBE1(racct, kernel, racct, create, racctp); KASSERT(*racctp == NULL, ("racct already allocated")); @@ -462,7 +462,7 @@ racct_destroy_locked(struct racct **racc ASSERT_RACCT_ENABLED(); - SDT_PROBE(racct, kernel, racct, destroy, racctp, 0, 0, 0, 0); + SDT_PROBE1(racct, kernel, racct, destroy, racctp); mtx_assert(&racct_lock, MA_OWNED); KASSERT(racctp != NULL, ("NULL racctp")); @@ -540,7 +540,7 @@ racct_add_locked(struct proc *p, int res ASSERT_RACCT_ENABLED(); - SDT_PROBE(racct, kernel, rusage, add, p, resource, amount, 0, 0); + SDT_PROBE3(racct, kernel, rusage, add, p, resource, amount); /* * We need proc lock to dereference p->p_ucred. @@ -550,8 +550,8 @@ racct_add_locked(struct proc *p, int res #ifdef RCTL error = rctl_enforce(p, resource, amount); if (error && RACCT_IS_DENIABLE(resource)) { - SDT_PROBE(racct, kernel, rusage, add__failure, p, resource, - amount, 0, 0); + SDT_PROBE3(racct, kernel, rusage, add__failure, p, resource, + amount); return (error); } #endif @@ -586,8 +586,7 @@ racct_add_cred_locked(struct ucred *cred ASSERT_RACCT_ENABLED(); - SDT_PROBE(racct, kernel, rusage, add__cred, cred, resource, amount, - 0, 0); + SDT_PROBE3(racct, kernel, rusage, add__cred, cred, resource, amount); racct_adjust_resource(cred->cr_ruidinfo->ui_racct, resource, amount); for (pr = cred->cr_prison; pr != NULL; pr = pr->pr_parent) @@ -625,7 +624,7 @@ racct_add_force(struct proc *p, int reso if (!racct_enable) return; - SDT_PROBE(racct, kernel, rusage, add__force, p, resource, amount, 0, 0); + SDT_PROBE3(racct, kernel, rusage, add__force, p, resource, amount); /* * We need proc lock to dereference p->p_ucred. @@ -649,7 +648,7 @@ racct_set_locked(struct proc *p, int res ASSERT_RACCT_ENABLED(); - SDT_PROBE(racct, kernel, rusage, set, p, resource, amount, 0, 0); + SDT_PROBE3(racct, kernel, rusage, set, p, resource, amount); /* * We need proc lock to dereference p->p_ucred. @@ -681,8 +680,8 @@ racct_set_locked(struct proc *p, int res if (diff_proc > 0) { error = rctl_enforce(p, resource, diff_proc); if (error && RACCT_IS_DENIABLE(resource)) { - SDT_PROBE(racct, kernel, rusage, set__failure, p, - resource, amount, 0, 0); + SDT_PROBE3(racct, kernel, rusage, set__failure, p, + resource, amount); return (error); } } @@ -725,7 +724,7 @@ racct_set_force_locked(struct proc *p, i ASSERT_RACCT_ENABLED(); - SDT_PROBE(racct, kernel, rusage, set, p, resource, amount, 0, 0); + SDT_PROBE3(racct, kernel, rusage, set, p, resource, amount); /* * We need proc lock to dereference p->p_ucred. @@ -836,7 +835,7 @@ racct_sub(struct proc *p, int resource, if (!racct_enable) return; - SDT_PROBE(racct, kernel, rusage, sub, p, resource, amount, 0, 0); + SDT_PROBE3(racct, kernel, rusage, sub, p, resource, amount); /* * We need proc lock to dereference p->p_ucred. @@ -863,8 +862,7 @@ racct_sub_cred_locked(struct ucred *cred ASSERT_RACCT_ENABLED(); - SDT_PROBE(racct, kernel, rusage, sub__cred, cred, resource, amount, - 0, 0); + SDT_PROBE3(racct, kernel, rusage, sub__cred, cred, resource, amount); #ifdef notyet KASSERT(RACCT_CAN_DROP(resource), Modified: stable/10/sys/kern/kern_sig.c ============================================================================== --- stable/10/sys/kern/kern_sig.c Fri Oct 23 07:38:34 2015 (r289797) +++ stable/10/sys/kern/kern_sig.c Fri Oct 23 07:40:43 2015 (r289798) @@ -1291,7 +1291,7 @@ kern_sigtimedwait(struct thread *td, sig reschedule_signals(p, new_block, 0); if (error == 0) { - SDT_PROBE(proc, kernel, , signal__clear, sig, ksi, 0, 0, 0); + SDT_PROBE2(proc, kernel, , signal__clear, sig, ksi); if (ksi->ksi_code == SI_TIMER) itimer_accept(p, ksi->ksi_timerid, ksi); @@ -2108,7 +2108,7 @@ tdsendsignal(struct proc *p, struct thre } else sigqueue = &td->td_sigqueue; - SDT_PROBE(proc, kernel, , signal__send, td, p, sig, 0, 0 ); + SDT_PROBE3(proc, kernel, , signal__send, td, p, sig); /* * If the signal is being ignored, @@ -2119,7 +2119,7 @@ tdsendsignal(struct proc *p, struct thre */ mtx_lock(&ps->ps_mtx); if (SIGISMEMBER(ps->ps_sigignore, sig)) { - SDT_PROBE(proc, kernel, , signal__discard, td, p, sig, 0, 0 ); + SDT_PROBE3(proc, kernel, , signal__discard, td, p, sig); mtx_unlock(&ps->ps_mtx); if (ksi && (ksi->ksi_flags & KSI_INS)) Modified: stable/10/sys/kern/kern_timeout.c ============================================================================== --- stable/10/sys/kern/kern_timeout.c Fri Oct 23 07:38:34 2015 (r289797) +++ stable/10/sys/kern/kern_timeout.c Fri Oct 23 07:40:43 2015 (r289798) @@ -681,9 +681,9 @@ softclock_call_cc(struct callout *c, str sbt1 = sbinuptime(); #endif THREAD_NO_SLEEPING(); - SDT_PROBE(callout_execute, kernel, , callout__start, c, 0, 0, 0, 0); + SDT_PROBE1(callout_execute, kernel, , callout__start, c); c_func(c_arg); - SDT_PROBE(callout_execute, kernel, , callout__end, c, 0, 0, 0, 0); + SDT_PROBE1(callout_execute, kernel, , callout__end, c); THREAD_SLEEPING_OK(); #if defined(DIAGNOSTIC) || defined(CALLOUT_PROFILING) sbt2 = sbinuptime(); Modified: stable/10/sys/kern/vfs_cache.c ============================================================================== --- stable/10/sys/kern/vfs_cache.c Fri Oct 23 07:38:34 2015 (r289797) +++ stable/10/sys/kern/vfs_cache.c Fri Oct 23 07:40:43 2015 (r289798) @@ -420,11 +420,11 @@ cache_zap(ncp) CTR2(KTR_VFS, "cache_zap(%p) vp %p", ncp, ncp->nc_vp); #ifdef KDTRACE_HOOKS if (ncp->nc_vp != NULL) { - SDT_PROBE(vfs, namecache, zap, done, ncp->nc_dvp, - nc_get_name(ncp), ncp->nc_vp, 0, 0); + SDT_PROBE3(vfs, namecache, zap, done, ncp->nc_dvp, + nc_get_name(ncp), ncp->nc_vp); } else { - SDT_PROBE(vfs, namecache, zap_negative, done, ncp->nc_dvp, - nc_get_name(ncp), 0, 0, 0); + SDT_PROBE2(vfs, namecache, zap_negative, done, ncp->nc_dvp, + nc_get_name(ncp)); } #endif vp = NULL; @@ -499,8 +499,7 @@ retry_wlocked: CTR2(KTR_VFS, "cache_lookup(%p, %s) found via .", dvp, cnp->cn_nameptr); dothits++; - SDT_PROBE(vfs, namecache, lookup, hit, dvp, ".", - *vpp, 0, 0); + SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ".", *vpp); if (tsp != NULL) timespecclear(tsp); if (ticksp != NULL) @@ -510,8 +509,8 @@ retry_wlocked: if (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.') { dotdothits++; if (dvp->v_cache_dd == NULL) { - SDT_PROBE(vfs, namecache, lookup, miss, dvp, - "..", NULL, 0, 0); + SDT_PROBE3(vfs, namecache, lookup, miss, dvp, + "..", NULL); goto unlock; } if ((cnp->cn_flags & MAKEENTRY) == 0) { @@ -533,8 +532,8 @@ retry_wlocked: goto negative_success; CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..", dvp, cnp->cn_nameptr, *vpp); - SDT_PROBE(vfs, namecache, lookup, hit, dvp, "..", - *vpp, 0, 0); + SDT_PROBE3(vfs, namecache, lookup, hit, dvp, "..", + *vpp); cache_out_ts(ncp, tsp, ticksp); if ((ncp->nc_flag & (NCF_ISDOTDOT | NCF_DTS)) == NCF_DTS && tsp != NULL) @@ -555,8 +554,8 @@ retry_wlocked: /* We failed to find an entry */ if (ncp == NULL) { - SDT_PROBE(vfs, namecache, lookup, miss, dvp, cnp->cn_nameptr, - NULL, 0, 0); + SDT_PROBE3(vfs, namecache, lookup, miss, dvp, cnp->cn_nameptr, + NULL); if ((cnp->cn_flags & MAKEENTRY) == 0) { nummisszap++; } else { @@ -584,8 +583,8 @@ retry_wlocked: *vpp = ncp->nc_vp; CTR4(KTR_VFS, "cache_lookup(%p, %s) found %p via ncp %p", dvp, cnp->cn_nameptr, *vpp, ncp); - SDT_PROBE(vfs, namecache, lookup, hit, dvp, nc_get_name(ncp), - *vpp, 0, 0); + SDT_PROBE3(vfs, namecache, lookup, hit, dvp, nc_get_name(ncp), + *vpp); cache_out_ts(ncp, tsp, ticksp); goto success; } @@ -616,8 +615,8 @@ negative_success: nchstats.ncs_neghits++; if (ncp->nc_flag & NCF_WHITE) cnp->cn_flags |= ISWHITEOUT; - SDT_PROBE(vfs, namecache, lookup, hit__negative, dvp, nc_get_name(ncp), - 0, 0, 0); + SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp, + nc_get_name(ncp)); cache_out_ts(ncp, tsp, ticksp); CACHE_WUNLOCK(); return (ENOENT); @@ -770,8 +769,7 @@ cache_enter_time(dvp, vp, cnp, tsp, dtsp return; } dvp->v_cache_dd = NULL; - SDT_PROBE(vfs, namecache, enter, done, dvp, "..", vp, - 0, 0); + SDT_PROBE3(vfs, namecache, enter, done, dvp, "..", vp); CACHE_WUNLOCK(); flag = NCF_ISDOTDOT; } @@ -891,12 +889,12 @@ cache_enter_time(dvp, vp, cnp, tsp, dtsp */ if (vp) { TAILQ_INSERT_HEAD(&vp->v_cache_dst, ncp, nc_dst); - SDT_PROBE(vfs, namecache, enter, done, dvp, nc_get_name(ncp), - vp, 0, 0); + SDT_PROBE3(vfs, namecache, enter, done, dvp, nc_get_name(ncp), + vp); } else { TAILQ_INSERT_TAIL(&ncneg, ncp, nc_dst); - SDT_PROBE(vfs, namecache, enter_negative, done, dvp, - nc_get_name(ncp), 0, 0, 0); + SDT_PROBE2(vfs, namecache, enter_negative, done, dvp, + nc_get_name(ncp)); } if (numneg * ncnegfactor > numcache) { ncp = TAILQ_FIRST(&ncneg); @@ -985,7 +983,7 @@ cache_purge(vp) { CTR1(KTR_VFS, "cache_purge(%p)", vp); - SDT_PROBE(vfs, namecache, purge, done, vp, 0, 0, 0, 0); + SDT_PROBE1(vfs, namecache, purge, done, vp); CACHE_WLOCK(); while (!LIST_EMPTY(&vp->v_cache_src)) cache_zap(LIST_FIRST(&vp->v_cache_src)); @@ -1010,7 +1008,7 @@ cache_purge_negative(vp) struct namecache *cp, *ncp; CTR1(KTR_VFS, "cache_purge_negative(%p)", vp); - SDT_PROBE(vfs, namecache, purge_negative, done, vp, 0, 0, 0, 0); + SDT_PROBE1(vfs, namecache, purge_negative, done, vp); CACHE_WLOCK(); LIST_FOREACH_SAFE(cp, &vp->v_cache_src, nc_src, ncp) { if (cp->nc_vp == NULL) @@ -1030,7 +1028,7 @@ cache_purgevfs(mp) struct namecache *ncp, *nnp; /* Scan hash tables for applicable entries */ - SDT_PROBE(vfs, namecache, purgevfs, done, mp, 0, 0, 0, 0); + SDT_PROBE1(vfs, namecache, purgevfs, done, mp); CACHE_WLOCK(); for (ncpp = &nchashtbl[nchash]; ncpp >= nchashtbl; ncpp--) { LIST_FOREACH_SAFE(ncp, ncpp, nc_hash, nnp) { @@ -1252,14 +1250,14 @@ vn_vptocnp_locked(struct vnode **vp, str vrele(*vp); numfullpathfail4++; error = ENOMEM; - SDT_PROBE(vfs, namecache, fullpath, return, error, - vp, NULL, 0, 0); + SDT_PROBE3(vfs, namecache, fullpath, return, error, + vp, NULL); return (error); } *buflen -= ncp->nc_nlen; memcpy(buf + *buflen, nc_get_name(ncp), ncp->nc_nlen); - SDT_PROBE(vfs, namecache, fullpath, hit, ncp->nc_dvp, - nc_get_name(ncp), vp, 0, 0); + SDT_PROBE3(vfs, namecache, fullpath, hit, ncp->nc_dvp, + nc_get_name(ncp), vp); dvp = *vp; *vp = ncp->nc_dvp; vref(*vp); @@ -1268,7 +1266,7 @@ vn_vptocnp_locked(struct vnode **vp, str CACHE_RLOCK(); return (0); } - SDT_PROBE(vfs, namecache, fullpath, miss, vp, 0, 0, 0, 0); + SDT_PROBE1(vfs, namecache, fullpath, miss, vp); CACHE_RUNLOCK(); vn_lock(*vp, LK_SHARED | LK_RETRY); @@ -1276,8 +1274,7 @@ vn_vptocnp_locked(struct vnode **vp, str vput(*vp); if (error) { numfullpathfail2++; - SDT_PROBE(vfs, namecache, fullpath, return, error, vp, - NULL, 0, 0); + SDT_PROBE3(vfs, namecache, fullpath, return, error, vp, NULL); return (error); } @@ -1288,8 +1285,7 @@ vn_vptocnp_locked(struct vnode **vp, str CACHE_RUNLOCK(); vrele(dvp); error = ENOENT; - SDT_PROBE(vfs, namecache, fullpath, return, error, vp, - NULL, 0, 0); + SDT_PROBE3(vfs, namecache, fullpath, return, error, vp, NULL); return (error); } /* @@ -1317,7 +1313,7 @@ vn_fullpath1(struct thread *td, struct v error = 0; slash_prefixed = 0; - SDT_PROBE(vfs, namecache, fullpath, entry, vp, 0, 0, 0, 0); + SDT_PROBE1(vfs, namecache, fullpath, entry, vp); numfullpathcalls++; vref(vp); CACHE_RLOCK(); @@ -1339,8 +1335,8 @@ vn_fullpath1(struct thread *td, struct v CACHE_RUNLOCK(); vrele(vp); error = ENOENT; - SDT_PROBE(vfs, namecache, fullpath, return, - error, vp, NULL, 0, 0); + SDT_PROBE3(vfs, namecache, fullpath, return, + error, vp, NULL); break; } vp1 = vp->v_mount->mnt_vnodecovered; @@ -1356,8 +1352,8 @@ vn_fullpath1(struct thread *td, struct v vrele(vp); numfullpathfail1++; error = ENOTDIR; - SDT_PROBE(vfs, namecache, fullpath, return, - error, vp, NULL, 0, 0); + SDT_PROBE3(vfs, namecache, fullpath, return, + error, vp, NULL); break; } error = vn_vptocnp_locked(&vp, td->td_ucred, buf, &buflen); @@ -1367,8 +1363,8 @@ vn_fullpath1(struct thread *td, struct v CACHE_RUNLOCK(); vrele(vp); error = ENOMEM; - SDT_PROBE(vfs, namecache, fullpath, return, error, - startvp, NULL, 0, 0); + SDT_PROBE3(vfs, namecache, fullpath, return, error, + startvp, NULL); break; } buf[--buflen] = '/'; @@ -1381,8 +1377,8 @@ vn_fullpath1(struct thread *td, struct v CACHE_RUNLOCK(); vrele(vp); numfullpathfail4++; - SDT_PROBE(vfs, namecache, fullpath, return, ENOMEM, - startvp, NULL, 0, 0); + SDT_PROBE3(vfs, namecache, fullpath, return, ENOMEM, + startvp, NULL); return (ENOMEM); } buf[--buflen] = '/'; @@ -1391,8 +1387,7 @@ vn_fullpath1(struct thread *td, struct v CACHE_RUNLOCK(); vrele(vp); - SDT_PROBE(vfs, namecache, fullpath, return, 0, startvp, buf + buflen, - 0, 0); + SDT_PROBE3(vfs, namecache, fullpath, return, 0, startvp, buf + buflen); *retbuf = buf + buflen; return (0); } Modified: stable/10/sys/kern/vfs_lookup.c ============================================================================== --- stable/10/sys/kern/vfs_lookup.c Fri Oct 23 07:38:34 2015 (r289797) +++ stable/10/sys/kern/vfs_lookup.c Fri Oct 23 07:40:43 2015 (r289798) @@ -273,8 +273,8 @@ namei(struct nameidata *ndp) if (ndp->ni_startdir != NULL) vrele(ndp->ni_startdir); } - SDT_PROBE(vfs, namei, lookup, entry, dp, cnp->cn_pnbuf, - cnp->cn_flags, 0, 0); + SDT_PROBE3(vfs, namei, lookup, entry, dp, cnp->cn_pnbuf, + cnp->cn_flags); for (;;) { /* * Check if root directory should replace current directory. @@ -302,8 +302,7 @@ namei(struct nameidata *ndp) error = lookup(ndp); if (error) { namei_cleanup_cnp(cnp); - SDT_PROBE(vfs, namei, lookup, return, error, NULL, 0, - 0, 0); + SDT_PROBE2(vfs, namei, lookup, return, error, NULL); return (error); } /* @@ -315,8 +314,7 @@ namei(struct nameidata *ndp) } else cnp->cn_flags |= HASBUF; - SDT_PROBE(vfs, namei, lookup, return, 0, ndp->ni_vp, - 0, 0, 0); + SDT_PROBE2(vfs, namei, lookup, return, 0, ndp->ni_vp); return (0); } if (ndp->ni_loopcnt++ >= MAXSYMLINKS) { @@ -377,7 +375,7 @@ namei(struct nameidata *ndp) vput(ndp->ni_vp); ndp->ni_vp = NULL; vrele(ndp->ni_dvp); - SDT_PROBE(vfs, namei, lookup, return, error, NULL, 0, 0, 0); + SDT_PROBE2(vfs, namei, lookup, return, error, NULL); return (error); } Modified: stable/10/sys/kern/vfs_syscalls.c ============================================================================== --- stable/10/sys/kern/vfs_syscalls.c Fri Oct 23 07:38:34 2015 (r289797) +++ stable/10/sys/kern/vfs_syscalls.c Fri Oct 23 07:40:43 2015 (r289798) @@ -2299,9 +2299,9 @@ kern_statat_vnhook(struct thread *td, in return (error); error = vn_stat(nd.ni_vp, &sb, td->td_ucred, NOCRED, td); if (error == 0) { - SDT_PROBE(vfs, , stat, mode, path, sb.st_mode, 0, 0, 0); + SDT_PROBE2(vfs, , stat, mode, path, sb.st_mode); if (S_ISREG(sb.st_mode)) - SDT_PROBE(vfs, , stat, reg, path, pathseg, 0, 0, 0); + SDT_PROBE2(vfs, , stat, reg, path, pathseg); if (__predict_false(hook != NULL)) hook(nd.ni_vp, &sb); } Modified: stable/10/sys/tools/vnode_if.awk ============================================================================== --- stable/10/sys/tools/vnode_if.awk Fri Oct 23 07:38:34 2015 (r289797) +++ stable/10/sys/tools/vnode_if.awk Fri Oct 23 07:40:43 2015 (r289798) @@ -361,7 +361,7 @@ while ((getline < srcfile) > 0) { printc("\t vop->"name" == NULL && vop->vop_bypass == NULL)") printc("\t\tvop = vop->vop_default;") printc("\tVNASSERT(vop != NULL, a->a_" args[0]", (\"No "name"(%p, %p)\", a->a_" args[0]", a));") - printc("\tSDT_PROBE(vfs, vop, " name ", entry, a->a_" args[0] ", a, 0, 0, 0);\n"); + printc("\tSDT_PROBE2(vfs, vop, " name ", entry, a->a_" args[0] ", a);\n"); for (i = 0; i < numargs; ++i) add_debug_code(name, args[i], "Entry", "\t"); printc("\tKTR_START" ctrstr); @@ -372,7 +372,7 @@ while ((getline < srcfile) > 0) { printc("\telse") printc("\t\trc = vop->vop_bypass(&a->a_gen);") printc("\tVFS_EPILOGUE(a->a_" args[0]"->v_mount);") - printc("\tSDT_PROBE(vfs, vop, " name ", return, a->a_" args[0] ", a, rc, 0, 0);\n"); + printc("\tSDT_PROBE3(vfs, vop, " name ", return, a->a_" args[0] ", a, rc);\n"); printc("\tif (rc == 0) {"); for (i = 0; i < numargs; ++i) add_debug_code(name, args[i], "OK", "\t\t"); From owner-svn-src-all@freebsd.org Fri Oct 23 07:42: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 A6049A1962C; Fri, 23 Oct 2015 07:42:57 +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 54EAEE8A; Fri, 23 Oct 2015 07:42:57 +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 t9N7guUF072281; Fri, 23 Oct 2015 07:42:56 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7guJR072278; Fri, 23 Oct 2015 07:42:56 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201510230742.t9N7guJR072278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 23 Oct 2015 07:42:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289799 - 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: Fri, 23 Oct 2015 07:42:57 -0000 Author: avos Date: Fri Oct 23 07:42:56 2015 New Revision: 289799 URL: https://svnweb.freebsd.org/changeset/base/289799 Log: urtwn(4): fix the RSSI calculation for RTL8188EU. This change also reverts r252405 (causes integer underflow). Reviewed by: kevlo Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D3820 Modified: head/sys/dev/usb/wlan/if_urtwn.c head/sys/dev/usb/wlan/if_urtwnreg.h Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Fri Oct 23 07:40:43 2015 (r289798) +++ head/sys/dev/usb/wlan/if_urtwn.c Fri Oct 23 07:42:56 2015 (r289799) @@ -86,7 +86,6 @@ SYSCTL_INT(_hw_usb_urtwn, OID_AUTO, debu "Debug level"); #endif -#define URTWN_RSSI(r) (r) - 110 #define IEEE80211_HAS_ADDR4(wh) IEEE80211_IS_DSTODS(wh) /* various supported device vendors/products */ @@ -641,11 +640,6 @@ urtwn_rx_frame(struct urtwn_softc *sc, u rssi = urtwn_get_rssi(sc, rate, &stat[1]); /* Update our average RSSI. */ urtwn_update_avgrssi(sc, rate, rssi); - /* - * Convert the RSSI to a range that will be accepted - * by net80211. - */ - rssi = URTWN_RSSI(rssi); } m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); @@ -792,10 +786,12 @@ tr_setup: (struct ieee80211_frame_min *)wh); nf = URTWN_NOISE_FLOOR; if (ni != NULL) { - (void)ieee80211_input(ni, m, rssi, nf); + (void)ieee80211_input(ni, m, rssi - nf, nf); ieee80211_free_node(ni); - } else - (void)ieee80211_input_all(ic, m, rssi, nf); + } else { + (void)ieee80211_input_all(ic, m, rssi - nf, + nf); + } m = next; } URTWN_LOCK(sc); Modified: head/sys/dev/usb/wlan/if_urtwnreg.h ============================================================================== --- head/sys/dev/usb/wlan/if_urtwnreg.h Fri Oct 23 07:40:43 2015 (r289798) +++ head/sys/dev/usb/wlan/if_urtwnreg.h Fri Oct 23 07:42:56 2015 (r289799) @@ -975,22 +975,22 @@ struct r92c_rx_cck { struct r88e_rx_cck { uint8_t path_agc[2]; + uint8_t chan; + uint8_t reserved1; uint8_t sig_qual; uint8_t agc_rpt; uint8_t rpt_b; - uint8_t reserved1; + uint8_t reserved2; uint8_t noise_power; uint8_t path_cfotail[2]; uint8_t pcts_mask[2]; uint8_t stream_rxevm[2]; uint8_t path_rxsnr[2]; uint8_t noise_power_db_lsb; - uint8_t reserved2[3]; + uint8_t reserved3[3]; uint8_t stream_csi[2]; uint8_t stream_target_csi[2]; uint8_t sig_evm; - uint8_t reserved3; - uint8_t reserved4; } __packed; /* Tx MAC descriptor. */ From owner-svn-src-all@freebsd.org Fri Oct 23 07:44: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 6BDDBA196D3; Fri, 23 Oct 2015 07:44:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3208B1048; Fri, 23 Oct 2015 07:44:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7i5Zw072507; Fri, 23 Oct 2015 07:44:05 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7i4kT072493; Fri, 23 Oct 2015 07:44:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230744.t9N7i4kT072493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 07:44:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289800 - in stable/9/sys: compat/linux kern tools 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, 23 Oct 2015 07:44:06 -0000 Author: avg Date: Fri Oct 23 07:44:03 2015 New Revision: 289800 URL: https://svnweb.freebsd.org/changeset/base/289800 Log: MFC r288336: save some bytes by using more concise SDT_PROBE Modified: stable/9/sys/compat/linux/linux_dtrace.h stable/9/sys/kern/kern_exec.c stable/9/sys/kern/kern_exit.c stable/9/sys/kern/kern_fork.c stable/9/sys/kern/kern_proc.c stable/9/sys/kern/kern_racct.c stable/9/sys/kern/kern_sig.c stable/9/sys/kern/kern_timeout.c stable/9/sys/kern/vfs_cache.c stable/9/sys/kern/vfs_lookup.c stable/9/sys/kern/vfs_syscalls.c stable/9/sys/tools/vnode_if.awk Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/compat/linux/linux_dtrace.h ============================================================================== --- stable/9/sys/compat/linux/linux_dtrace.h Fri Oct 23 07:42:56 2015 (r289799) +++ stable/9/sys/compat/linux/linux_dtrace.h Fri Oct 23 07:44:03 2015 (r289800) @@ -82,7 +82,7 @@ c, d, e, f) #define LIN_SDT_PROBE4(a, b, c, d, e, f, g) SDT_PROBE4(LINUX_DTRACE, a, b, \ c, d, e, f, g) -#define _LIN_SDT_PROBE5(a, b, c, d, e, f, g, h, i) SDT_PROBE(a, b, c, d, \ +#define _LIN_SDT_PROBE5(a, b, c, d, e, f, g, h, i) SDT_PROBE5(a, b, c, d, \ e, f, g, h, i) #define LIN_SDT_PROBE5(a, b, c, d, e, f, g, h) _LIN_SDT_PROBE5(LINUX_DTRACE, \ a, b, c, d, e, f, g, h) Modified: stable/9/sys/kern/kern_exec.c ============================================================================== --- stable/9/sys/kern/kern_exec.c Fri Oct 23 07:42:56 2015 (r289799) +++ stable/9/sys/kern/kern_exec.c Fri Oct 23 07:44:03 2015 (r289800) @@ -426,7 +426,7 @@ do_execve(td, args, mac_p) | MPSAFE | AUDITVNODE1, UIO_SYSSPACE, args->fname, td); } - SDT_PROBE(proc, kernel, , exec, args->fname, 0, 0, 0, 0 ); + SDT_PROBE1(proc, kernel, , exec, args->fname); interpret: if (args->fname != NULL) { @@ -848,7 +848,7 @@ interpret: vfs_mark_atime(imgp->vp, td->td_ucred); - SDT_PROBE(proc, kernel, , exec__success, args->fname, 0, 0, 0, 0); + SDT_PROBE1(proc, kernel, , exec__success, args->fname); done1: /* @@ -930,7 +930,7 @@ exec_fail: p->p_flag &= ~P_INEXEC; PROC_UNLOCK(p); - SDT_PROBE(proc, kernel, , exec__failure, error, 0, 0, 0, 0); + SDT_PROBE1(proc, kernel, , exec__failure, error); done2: #ifdef MAC Modified: stable/9/sys/kern/kern_exit.c ============================================================================== --- stable/9/sys/kern/kern_exit.c Fri Oct 23 07:42:56 2015 (r289799) +++ stable/9/sys/kern/kern_exit.c Fri Oct 23 07:44:03 2015 (r289800) @@ -533,7 +533,7 @@ exit1(struct thread *td, int rv) reason = CLD_DUMPED; else if (WIFSIGNALED(rv)) reason = CLD_KILLED; - SDT_PROBE(proc, kernel, , exit, reason, 0, 0, 0, 0); + SDT_PROBE1(proc, kernel, , exit, reason); #endif /* Modified: stable/9/sys/kern/kern_fork.c ============================================================================== --- stable/9/sys/kern/kern_fork.c Fri Oct 23 07:42:56 2015 (r289799) +++ stable/9/sys/kern/kern_fork.c Fri Oct 23 07:44:03 2015 (r289800) @@ -742,7 +742,7 @@ do_fork(struct thread *td, int flags, st * Tell any interested parties about the new process. */ knote_fork(&p1->p_klist, p2->p_pid); - SDT_PROBE(proc, kernel, , create, p2, p1, flags, 0, 0); + SDT_PROBE3(proc, kernel, , create, p2, p1, flags); /* * Wait until debugger is attached to child. Modified: stable/9/sys/kern/kern_proc.c ============================================================================== --- stable/9/sys/kern/kern_proc.c Fri Oct 23 07:42:56 2015 (r289799) +++ stable/9/sys/kern/kern_proc.c Fri Oct 23 07:44:03 2015 (r289800) @@ -180,9 +180,9 @@ proc_ctor(void *mem, int size, void *arg struct proc *p; p = (struct proc *)mem; - SDT_PROBE(proc, kernel, ctor , entry, p, size, arg, flags, 0); + SDT_PROBE4(proc, kernel, ctor , entry, p, size, arg, flags); EVENTHANDLER_INVOKE(process_ctor, p); - SDT_PROBE(proc, kernel, ctor , return, p, size, arg, flags, 0); + SDT_PROBE4(proc, kernel, ctor , return, p, size, arg, flags); return (0); } @@ -198,7 +198,7 @@ proc_dtor(void *mem, int size, void *arg /* INVARIANTS checks go here */ p = (struct proc *)mem; td = FIRST_THREAD_IN_PROC(p); - SDT_PROBE(proc, kernel, dtor, entry, p, size, arg, td, 0); + SDT_PROBE4(proc, kernel, dtor, entry, p, size, arg, td); if (td != NULL) { #ifdef INVARIANTS KASSERT((p->p_numthreads == 1), @@ -211,7 +211,7 @@ proc_dtor(void *mem, int size, void *arg EVENTHANDLER_INVOKE(process_dtor, p); if (p->p_ksi != NULL) KASSERT(! KSI_ONQ(p->p_ksi), ("SIGCHLD queue")); - SDT_PROBE(proc, kernel, dtor, return, p, size, arg, 0, 0); + SDT_PROBE3(proc, kernel, dtor, return, p, size, arg); } /* @@ -223,7 +223,7 @@ proc_init(void *mem, int size, int flags struct proc *p; p = (struct proc *)mem; - SDT_PROBE(proc, kernel, init, entry, p, size, flags, 0, 0); + SDT_PROBE3(proc, kernel, init, entry, p, size, flags); p->p_sched = (struct p_sched *)&p[1]; bzero(&p->p_mtx, sizeof(struct mtx)); mtx_init(&p->p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK); @@ -233,7 +233,7 @@ proc_init(void *mem, int size, int flags TAILQ_INIT(&p->p_threads); /* all threads in proc */ EVENTHANDLER_INVOKE(process_init, p); p->p_stats = pstats_alloc(); - SDT_PROBE(proc, kernel, init, return, p, size, flags, 0, 0); + SDT_PROBE3(proc, kernel, init, return, p, size, flags); return (0); } Modified: stable/9/sys/kern/kern_racct.c ============================================================================== --- stable/9/sys/kern/kern_racct.c Fri Oct 23 07:42:56 2015 (r289799) +++ stable/9/sys/kern/kern_racct.c Fri Oct 23 07:44:03 2015 (r289800) @@ -432,7 +432,7 @@ void racct_create(struct racct **racctp) { - SDT_PROBE(racct, kernel, racct, create, racctp, 0, 0, 0, 0); + SDT_PROBE1(racct, kernel, racct, create, racctp); KASSERT(*racctp == NULL, ("racct already allocated")); @@ -445,7 +445,7 @@ racct_destroy_locked(struct racct **racc int i; struct racct *racct; - SDT_PROBE(racct, kernel, racct, destroy, racctp, 0, 0, 0, 0); + SDT_PROBE1(racct, kernel, racct, destroy, racctp); mtx_assert(&racct_lock, MA_OWNED); KASSERT(racctp != NULL, ("NULL racctp")); @@ -517,7 +517,7 @@ racct_add_locked(struct proc *p, int res int error; #endif - SDT_PROBE(racct, kernel, rusage, add, p, resource, amount, 0, 0); + SDT_PROBE3(racct, kernel, rusage, add, p, resource, amount); /* * We need proc lock to dereference p->p_ucred. @@ -527,8 +527,8 @@ racct_add_locked(struct proc *p, int res #ifdef RCTL error = rctl_enforce(p, resource, amount); if (error && RACCT_IS_DENIABLE(resource)) { - SDT_PROBE(racct, kernel, rusage, add__failure, p, resource, - amount, 0, 0); + SDT_PROBE3(racct, kernel, rusage, add__failure, p, resource, + amount); return (error); } #endif @@ -558,8 +558,7 @@ racct_add_cred_locked(struct ucred *cred { struct prison *pr; - SDT_PROBE(racct, kernel, rusage, add__cred, cred, resource, amount, - 0, 0); + SDT_PROBE3(racct, kernel, rusage, add__cred, cred, resource, amount); racct_alloc_resource(cred->cr_ruidinfo->ui_racct, resource, amount); for (pr = cred->cr_prison; pr != NULL; pr = pr->pr_parent) @@ -591,7 +590,7 @@ void racct_add_force(struct proc *p, int resource, uint64_t amount) { - SDT_PROBE(racct, kernel, rusage, add__force, p, resource, amount, 0, 0); + SDT_PROBE3(racct, kernel, rusage, add__force, p, resource, amount); /* * We need proc lock to dereference p->p_ucred. @@ -613,7 +612,7 @@ racct_set_locked(struct proc *p, int res int error; #endif - SDT_PROBE(racct, kernel, rusage, set, p, resource, amount, 0, 0); + SDT_PROBE3(racct, kernel, rusage, set, p, resource, amount); /* * We need proc lock to dereference p->p_ucred. @@ -645,8 +644,8 @@ racct_set_locked(struct proc *p, int res if (diff_proc > 0) { error = rctl_enforce(p, resource, diff_proc); if (error && RACCT_IS_DENIABLE(resource)) { - SDT_PROBE(racct, kernel, rusage, set__failure, p, - resource, amount, 0, 0); + SDT_PROBE3(racct, kernel, rusage, set__failure, p, + resource, amount); return (error); } } @@ -684,7 +683,7 @@ racct_set_force_locked(struct proc *p, i int64_t old_amount, decayed_amount; int64_t diff_proc, diff_cred; - SDT_PROBE(racct, kernel, rusage, set, p, resource, amount, 0, 0); + SDT_PROBE3(racct, kernel, rusage, set, p, resource, amount); /* * We need proc lock to dereference p->p_ucred. @@ -780,7 +779,7 @@ void racct_sub(struct proc *p, int resource, uint64_t amount) { - SDT_PROBE(racct, kernel, rusage, sub, p, resource, amount, 0, 0); + SDT_PROBE3(racct, kernel, rusage, sub, p, resource, amount); /* * We need proc lock to dereference p->p_ucred. @@ -805,8 +804,7 @@ racct_sub_cred_locked(struct ucred *cred { struct prison *pr; - SDT_PROBE(racct, kernel, rusage, sub__cred, cred, resource, amount, - 0, 0); + SDT_PROBE3(racct, kernel, rusage, sub__cred, cred, resource, amount); #ifdef notyet KASSERT(RACCT_CAN_DROP(resource), Modified: stable/9/sys/kern/kern_sig.c ============================================================================== --- stable/9/sys/kern/kern_sig.c Fri Oct 23 07:42:56 2015 (r289799) +++ stable/9/sys/kern/kern_sig.c Fri Oct 23 07:44:03 2015 (r289800) @@ -1252,7 +1252,7 @@ kern_sigtimedwait(struct thread *td, sig reschedule_signals(p, new_block, 0); if (error == 0) { - SDT_PROBE(proc, kernel, , signal__clear, sig, ksi, 0, 0, 0); + SDT_PROBE2(proc, kernel, , signal__clear, sig, ksi); if (ksi->ksi_code == SI_TIMER) itimer_accept(p, ksi->ksi_timerid, ksi); @@ -2065,7 +2065,7 @@ tdsendsignal(struct proc *p, struct thre sigqueue = &td->td_sigqueue; } - SDT_PROBE(proc, kernel, , signal__send, td, p, sig, 0, 0 ); + SDT_PROBE3(proc, kernel, , signal__send, td, p, sig); /* * If the signal is being ignored, @@ -2076,7 +2076,7 @@ tdsendsignal(struct proc *p, struct thre */ mtx_lock(&ps->ps_mtx); if (SIGISMEMBER(ps->ps_sigignore, sig)) { - SDT_PROBE(proc, kernel, , signal__discard, td, p, sig, 0, 0 ); + SDT_PROBE3(proc, kernel, , signal__discard, td, p, sig); mtx_unlock(&ps->ps_mtx); if (ksi && (ksi->ksi_flags & KSI_INS)) Modified: stable/9/sys/kern/kern_timeout.c ============================================================================== --- stable/9/sys/kern/kern_timeout.c Fri Oct 23 07:42:56 2015 (r289799) +++ stable/9/sys/kern/kern_timeout.c Fri Oct 23 07:44:03 2015 (r289800) @@ -514,9 +514,9 @@ softclock_call_cc(struct callout *c, str binuptime(&bt1); #endif THREAD_NO_SLEEPING(); - SDT_PROBE(callout_execute, kernel, , callout__start, c, 0, 0, 0, 0); + SDT_PROBE1(callout_execute, kernel, , callout__start, c); c_func(c_arg); - SDT_PROBE(callout_execute, kernel, , callout__end, c, 0, 0, 0, 0); + SDT_PROBE1(callout_execute, kernel, , callout__end, c); THREAD_SLEEPING_OK(); #ifdef DIAGNOSTIC binuptime(&bt2); Modified: stable/9/sys/kern/vfs_cache.c ============================================================================== --- stable/9/sys/kern/vfs_cache.c Fri Oct 23 07:42:56 2015 (r289799) +++ stable/9/sys/kern/vfs_cache.c Fri Oct 23 07:44:03 2015 (r289800) @@ -418,11 +418,11 @@ cache_zap(ncp) CTR2(KTR_VFS, "cache_zap(%p) vp %p", ncp, ncp->nc_vp); #ifdef KDTRACE_HOOKS if (ncp->nc_vp != NULL) { - SDT_PROBE(vfs, namecache, zap, done, ncp->nc_dvp, - nc_get_name(ncp), ncp->nc_vp, 0, 0); + SDT_PROBE3(vfs, namecache, zap, done, ncp->nc_dvp, + nc_get_name(ncp), ncp->nc_vp); } else { - SDT_PROBE(vfs, namecache, zap_negative, done, ncp->nc_dvp, - nc_get_name(ncp), 0, 0, 0); + SDT_PROBE2(vfs, namecache, zap_negative, done, ncp->nc_dvp, + nc_get_name(ncp)); } #endif vp = NULL; @@ -497,8 +497,7 @@ retry_wlocked: CTR2(KTR_VFS, "cache_lookup(%p, %s) found via .", dvp, cnp->cn_nameptr); dothits++; - SDT_PROBE(vfs, namecache, lookup, hit, dvp, ".", - *vpp, 0, 0); + SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ".", *vpp); if (tsp != NULL) timespecclear(tsp); if (ticksp != NULL) @@ -508,8 +507,8 @@ retry_wlocked: if (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.') { dotdothits++; if (dvp->v_cache_dd == NULL) { - SDT_PROBE(vfs, namecache, lookup, miss, dvp, - "..", NULL, 0, 0); + SDT_PROBE3(vfs, namecache, lookup, miss, dvp, + "..", NULL); goto unlock; } if ((cnp->cn_flags & MAKEENTRY) == 0) { @@ -531,8 +530,8 @@ retry_wlocked: goto negative_success; CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..", dvp, cnp->cn_nameptr, *vpp); - SDT_PROBE(vfs, namecache, lookup, hit, dvp, "..", - *vpp, 0, 0); + SDT_PROBE3(vfs, namecache, lookup, hit, dvp, "..", + *vpp); cache_out_ts(ncp, tsp, ticksp); if ((ncp->nc_flag & (NCF_ISDOTDOT | NCF_DTS)) == NCF_DTS && tsp != NULL) @@ -553,8 +552,8 @@ retry_wlocked: /* We failed to find an entry */ if (ncp == NULL) { - SDT_PROBE(vfs, namecache, lookup, miss, dvp, cnp->cn_nameptr, - NULL, 0, 0); + SDT_PROBE3(vfs, namecache, lookup, miss, dvp, cnp->cn_nameptr, + NULL); if ((cnp->cn_flags & MAKEENTRY) == 0) { nummisszap++; } else { @@ -582,8 +581,8 @@ retry_wlocked: *vpp = ncp->nc_vp; CTR4(KTR_VFS, "cache_lookup(%p, %s) found %p via ncp %p", dvp, cnp->cn_nameptr, *vpp, ncp); - SDT_PROBE(vfs, namecache, lookup, hit, dvp, nc_get_name(ncp), - *vpp, 0, 0); + SDT_PROBE3(vfs, namecache, lookup, hit, dvp, nc_get_name(ncp), + *vpp); cache_out_ts(ncp, tsp, ticksp); goto success; } @@ -614,8 +613,8 @@ negative_success: nchstats.ncs_neghits++; if (ncp->nc_flag & NCF_WHITE) cnp->cn_flags |= ISWHITEOUT; - SDT_PROBE(vfs, namecache, lookup, hit__negative, dvp, nc_get_name(ncp), - 0, 0, 0); + SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp, + nc_get_name(ncp)); cache_out_ts(ncp, tsp, ticksp); CACHE_WUNLOCK(); return (ENOENT); @@ -768,8 +767,7 @@ cache_enter_time(dvp, vp, cnp, tsp, dtsp return; } dvp->v_cache_dd = NULL; - SDT_PROBE(vfs, namecache, enter, done, dvp, "..", vp, - 0, 0); + SDT_PROBE3(vfs, namecache, enter, done, dvp, "..", vp); CACHE_WUNLOCK(); flag = NCF_ISDOTDOT; } @@ -889,12 +887,12 @@ cache_enter_time(dvp, vp, cnp, tsp, dtsp */ if (vp) { TAILQ_INSERT_HEAD(&vp->v_cache_dst, ncp, nc_dst); - SDT_PROBE(vfs, namecache, enter, done, dvp, nc_get_name(ncp), - vp, 0, 0); + SDT_PROBE3(vfs, namecache, enter, done, dvp, nc_get_name(ncp), + vp); } else { TAILQ_INSERT_TAIL(&ncneg, ncp, nc_dst); - SDT_PROBE(vfs, namecache, enter_negative, done, dvp, - nc_get_name(ncp), 0, 0, 0); + SDT_PROBE2(vfs, namecache, enter_negative, done, dvp, + nc_get_name(ncp)); } if (numneg * ncnegfactor > numcache) { ncp = TAILQ_FIRST(&ncneg); @@ -945,7 +943,7 @@ cache_purge(vp) { CTR1(KTR_VFS, "cache_purge(%p)", vp); - SDT_PROBE(vfs, namecache, purge, done, vp, 0, 0, 0, 0); + SDT_PROBE1(vfs, namecache, purge, done, vp); CACHE_WLOCK(); while (!LIST_EMPTY(&vp->v_cache_src)) cache_zap(LIST_FIRST(&vp->v_cache_src)); @@ -970,7 +968,7 @@ cache_purge_negative(vp) struct namecache *cp, *ncp; CTR1(KTR_VFS, "cache_purge_negative(%p)", vp); - SDT_PROBE(vfs, namecache, purge_negative, done, vp, 0, 0, 0, 0); + SDT_PROBE1(vfs, namecache, purge_negative, done, vp); CACHE_WLOCK(); LIST_FOREACH_SAFE(cp, &vp->v_cache_src, nc_src, ncp) { if (cp->nc_vp == NULL) @@ -990,7 +988,7 @@ cache_purgevfs(mp) struct namecache *ncp, *nnp; /* Scan hash tables for applicable entries */ - SDT_PROBE(vfs, namecache, purgevfs, done, mp, 0, 0, 0, 0); + SDT_PROBE1(vfs, namecache, purgevfs, done, mp); CACHE_WLOCK(); for (ncpp = &nchashtbl[nchash]; ncpp >= nchashtbl; ncpp--) { LIST_FOREACH_SAFE(ncp, ncpp, nc_hash, nnp) { @@ -1220,14 +1218,14 @@ vn_vptocnp_locked(struct vnode **vp, str VFS_UNLOCK_GIANT(vfslocked); numfullpathfail4++; error = ENOMEM; - SDT_PROBE(vfs, namecache, fullpath, return, error, - vp, NULL, 0, 0); + SDT_PROBE3(vfs, namecache, fullpath, return, error, + vp, NULL); return (error); } *buflen -= ncp->nc_nlen; memcpy(buf + *buflen, nc_get_name(ncp), ncp->nc_nlen); - SDT_PROBE(vfs, namecache, fullpath, hit, ncp->nc_dvp, - nc_get_name(ncp), vp, 0, 0); + SDT_PROBE3(vfs, namecache, fullpath, hit, ncp->nc_dvp, + nc_get_name(ncp), vp); dvp = *vp; *vp = ncp->nc_dvp; vref(*vp); @@ -1238,7 +1236,7 @@ vn_vptocnp_locked(struct vnode **vp, str CACHE_RLOCK(); return (0); } - SDT_PROBE(vfs, namecache, fullpath, miss, vp, 0, 0, 0, 0); + SDT_PROBE1(vfs, namecache, fullpath, miss, vp); CACHE_RUNLOCK(); vfslocked = VFS_LOCK_GIANT((*vp)->v_mount); @@ -1248,8 +1246,7 @@ vn_vptocnp_locked(struct vnode **vp, str VFS_UNLOCK_GIANT(vfslocked); if (error) { numfullpathfail2++; - SDT_PROBE(vfs, namecache, fullpath, return, error, vp, - NULL, 0, 0); + SDT_PROBE3(vfs, namecache, fullpath, return, error, vp, NULL); return (error); } @@ -1262,8 +1259,7 @@ vn_vptocnp_locked(struct vnode **vp, str vrele(dvp); VFS_UNLOCK_GIANT(vfslocked); error = ENOENT; - SDT_PROBE(vfs, namecache, fullpath, return, error, vp, - NULL, 0, 0); + SDT_PROBE3(vfs, namecache, fullpath, return, error, vp, NULL); return (error); } /* @@ -1291,7 +1287,7 @@ vn_fullpath1(struct thread *td, struct v error = 0; slash_prefixed = 0; - SDT_PROBE(vfs, namecache, fullpath, entry, vp, 0, 0, 0, 0); + SDT_PROBE1(vfs, namecache, fullpath, entry, vp); numfullpathcalls++; vref(vp); CACHE_RLOCK(); @@ -1317,8 +1313,8 @@ vn_fullpath1(struct thread *td, struct v vrele(vp); VFS_UNLOCK_GIANT(vfslocked); error = ENOENT; - SDT_PROBE(vfs, namecache, fullpath, return, - error, vp, NULL, 0, 0); + SDT_PROBE3(vfs, namecache, fullpath, return, + error, vp, NULL); break; } vp1 = vp->v_mount->mnt_vnodecovered; @@ -1338,8 +1334,8 @@ vn_fullpath1(struct thread *td, struct v VFS_UNLOCK_GIANT(vfslocked); numfullpathfail1++; error = ENOTDIR; - SDT_PROBE(vfs, namecache, fullpath, return, - error, vp, NULL, 0, 0); + SDT_PROBE3(vfs, namecache, fullpath, return, + error, vp, NULL); break; } error = vn_vptocnp_locked(&vp, td->td_ucred, buf, &buflen); @@ -1351,8 +1347,8 @@ vn_fullpath1(struct thread *td, struct v vrele(vp); VFS_UNLOCK_GIANT(vfslocked); error = ENOMEM; - SDT_PROBE(vfs, namecache, fullpath, return, error, - startvp, NULL, 0, 0); + SDT_PROBE3(vfs, namecache, fullpath, return, error, + startvp, NULL); break; } buf[--buflen] = '/'; @@ -1367,8 +1363,8 @@ vn_fullpath1(struct thread *td, struct v vrele(vp); VFS_UNLOCK_GIANT(vfslocked); numfullpathfail4++; - SDT_PROBE(vfs, namecache, fullpath, return, ENOMEM, - startvp, NULL, 0, 0); + SDT_PROBE3(vfs, namecache, fullpath, return, ENOMEM, + startvp, NULL); return (ENOMEM); } buf[--buflen] = '/'; @@ -1379,8 +1375,7 @@ vn_fullpath1(struct thread *td, struct v vrele(vp); VFS_UNLOCK_GIANT(vfslocked); - SDT_PROBE(vfs, namecache, fullpath, return, 0, startvp, buf + buflen, - 0, 0); + SDT_PROBE3(vfs, namecache, fullpath, return, 0, startvp, buf + buflen); *retbuf = buf + buflen; return (0); } Modified: stable/9/sys/kern/vfs_lookup.c ============================================================================== --- stable/9/sys/kern/vfs_lookup.c Fri Oct 23 07:42:56 2015 (r289799) +++ stable/9/sys/kern/vfs_lookup.c Fri Oct 23 07:44:03 2015 (r289800) @@ -268,8 +268,8 @@ namei(struct nameidata *ndp) VFS_UNLOCK_GIANT(vfslocked); } } - SDT_PROBE(vfs, namei, lookup, entry, dp, cnp->cn_pnbuf, - cnp->cn_flags, 0, 0); + SDT_PROBE3(vfs, namei, lookup, entry, dp, cnp->cn_pnbuf, + cnp->cn_flags); vfslocked = VFS_LOCK_GIANT(dp->v_mount); for (;;) { /* @@ -298,8 +298,7 @@ namei(struct nameidata *ndp) error = lookup(ndp); if (error) { namei_cleanup_cnp(cnp); - SDT_PROBE(vfs, namei, lookup, return, error, NULL, 0, - 0, 0); + SDT_PROBE2(vfs, namei, lookup, return, error, NULL); return (error); } vfslocked = (ndp->ni_cnd.cn_flags & GIANTHELD) != 0; @@ -317,8 +316,7 @@ namei(struct nameidata *ndp) VFS_UNLOCK_GIANT(vfslocked); } else if (vfslocked) ndp->ni_cnd.cn_flags |= GIANTHELD; - SDT_PROBE(vfs, namei, lookup, return, 0, ndp->ni_vp, - 0, 0, 0); + SDT_PROBE2(vfs, namei, lookup, return, 0, ndp->ni_vp); return (0); } if (ndp->ni_loopcnt++ >= MAXSYMLINKS) { @@ -380,7 +378,7 @@ namei(struct nameidata *ndp) ndp->ni_vp = NULL; vrele(ndp->ni_dvp); VFS_UNLOCK_GIANT(vfslocked); - SDT_PROBE(vfs, namei, lookup, return, error, NULL, 0, 0, 0); + SDT_PROBE2(vfs, namei, lookup, return, error, NULL); return (error); } Modified: stable/9/sys/kern/vfs_syscalls.c ============================================================================== --- stable/9/sys/kern/vfs_syscalls.c Fri Oct 23 07:42:56 2015 (r289799) +++ stable/9/sys/kern/vfs_syscalls.c Fri Oct 23 07:44:03 2015 (r289800) @@ -2430,9 +2430,9 @@ kern_statat_vnhook(struct thread *td, in vfslocked = NDHASGIANT(&nd); error = vn_stat(nd.ni_vp, &sb, td->td_ucred, NOCRED, td); if (!error) { - SDT_PROBE(vfs, , stat, mode, path, sb.st_mode, 0, 0, 0); + SDT_PROBE2(vfs, , stat, mode, path, sb.st_mode); if (S_ISREG(sb.st_mode)) - SDT_PROBE(vfs, , stat, reg, path, pathseg, 0, 0, 0); + SDT_PROBE2(vfs, , stat, reg, path, pathseg); if (__predict_false(hook != NULL)) hook(nd.ni_vp, &sb); } Modified: stable/9/sys/tools/vnode_if.awk ============================================================================== --- stable/9/sys/tools/vnode_if.awk Fri Oct 23 07:42:56 2015 (r289799) +++ stable/9/sys/tools/vnode_if.awk Fri Oct 23 07:44:03 2015 (r289800) @@ -375,7 +375,7 @@ while ((getline < srcfile) > 0) { printc("\t vop->"name" == NULL && vop->vop_bypass == NULL)") printc("\t\tvop = vop->vop_default;") printc("\tVNASSERT(vop != NULL, a->a_" args[0]", (\"No "name"(%p, %p)\", a->a_" args[0]", a));") - printc("\tSDT_PROBE(vfs, vop, " name ", entry, a->a_" args[0] ", a, 0, 0, 0);\n"); + printc("\tSDT_PROBE2(vfs, vop, " name ", entry, a->a_" args[0] ", a);\n"); for (i = 0; i < numargs; ++i) add_debug_code(name, args[i], "Entry", "\t"); add_pre(name); @@ -386,7 +386,7 @@ while ((getline < srcfile) > 0) { printc("\t\trc = vop->vop_bypass(&a->a_gen);") printc("\tVFS_EPILOGUE(a->a_" args[0]"->v_mount);") printc(ctrstr); - printc("\tSDT_PROBE(vfs, vop, " name ", return, a->a_" args[0] ", a, rc, 0, 0);\n"); + printc("\tSDT_PROBE3(vfs, vop, " name ", return, a->a_" args[0] ", a, rc);\n"); printc("\tif (rc == 0) {"); for (i = 0; i < numargs; ++i) add_debug_code(name, args[i], "OK", "\t\t"); From owner-svn-src-all@freebsd.org Fri Oct 23 07: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 01161A19789; Fri, 23 Oct 2015 07:48:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2F1F1213; Fri, 23 Oct 2015 07:48:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7mSik073140; Fri, 23 Oct 2015 07:48:28 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7mSXb073139; Fri, 23 Oct 2015 07:48:28 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230748.t9N7mSXb073139@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 07:48:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289801 - stable/10/cddl/contrib/opensolaris/common/avl 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, 23 Oct 2015 07:48:30 -0000 Author: avg Date: Fri Oct 23 07:48:28 2015 New Revision: 289801 URL: https://svnweb.freebsd.org/changeset/base/289801 Log: MFC r288337: remove an extra copy of avl.c from illumos contrib code Deleted: stable/10/cddl/contrib/opensolaris/common/avl/avl.c Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-all@freebsd.org Fri Oct 23 07:48: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 EEC52A197DC; Fri, 23 Oct 2015 07:48:41 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9ECAC134E; Fri, 23 Oct 2015 07:48:41 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7medh073212; Fri, 23 Oct 2015 07:48:40 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7meWA073211; Fri, 23 Oct 2015 07:48:40 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230748.t9N7meWA073211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 07:48:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289802 - stable/9/cddl/contrib/opensolaris/common/avl 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, 23 Oct 2015 07:48:42 -0000 Author: avg Date: Fri Oct 23 07:48:40 2015 New Revision: 289802 URL: https://svnweb.freebsd.org/changeset/base/289802 Log: MFC r288337: remove an extra copy of avl.c from illumos contrib code Deleted: stable/9/cddl/contrib/opensolaris/common/avl/avl.c Modified: Directory Properties: stable/9/cddl/contrib/opensolaris/common/avl/ (props changed) From owner-svn-src-all@freebsd.org Fri Oct 23 07:57: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 3F4D9A199C6; Fri, 23 Oct 2015 07:57:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D7691888; Fri, 23 Oct 2015 07:57:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7vMgs076957; Fri, 23 Oct 2015 07:57:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7vMLB076956; Fri, 23 Oct 2015 07:57:22 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230757.t9N7vMLB076956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 07:57:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289803 - stable/10/sys/cddl/dev/sdt 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, 23 Oct 2015 07:57:23 -0000 Author: avg Date: Fri Oct 23 07:57:21 2015 New Revision: 289803 URL: https://svnweb.freebsd.org/changeset/base/289803 Log: MFC r288362: sdt: start checking version field when parsing probe definitions Modified: stable/10/sys/cddl/dev/sdt/sdt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/dev/sdt/sdt.c ============================================================================== --- stable/10/sys/cddl/dev/sdt/sdt.c Fri Oct 23 07:48:40 2015 (r289802) +++ stable/10/sys/cddl/dev/sdt/sdt.c Fri Oct 23 07:57:21 2015 (r289803) @@ -142,6 +142,12 @@ sdt_create_probe(struct sdt_probe *probe char *to; size_t len; + if (probe->version != (int)sizeof(*probe)) { + printf("ignoring probe %p, version %u expected %u\n", + probe, probe->version, (int)sizeof(*probe)); + return; + } + TAILQ_FOREACH(prov, &sdt_prov_list, prov_entry) if (strcmp(prov->name, probe->prov->name) == 0) break; From owner-svn-src-all@freebsd.org Fri Oct 23 07:57: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 34F1EA19A04; Fri, 23 Oct 2015 07:57:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02DD519BB; Fri, 23 Oct 2015 07:57:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N7vYRt077029; Fri, 23 Oct 2015 07:57:34 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N7vYD5077028; Fri, 23 Oct 2015 07:57:34 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230757.t9N7vYD5077028@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 07:57:34 +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: r289804 - stable/9/sys/cddl/dev/sdt 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, 23 Oct 2015 07:57:35 -0000 Author: avg Date: Fri Oct 23 07:57:33 2015 New Revision: 289804 URL: https://svnweb.freebsd.org/changeset/base/289804 Log: MFC r288362: sdt: start checking version field when parsing probe definitions Modified: stable/9/sys/cddl/dev/sdt/sdt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/dev/sdt/sdt.c ============================================================================== --- stable/9/sys/cddl/dev/sdt/sdt.c Fri Oct 23 07:57:21 2015 (r289803) +++ stable/9/sys/cddl/dev/sdt/sdt.c Fri Oct 23 07:57:33 2015 (r289804) @@ -142,6 +142,12 @@ sdt_create_probe(struct sdt_probe *probe char *to; size_t len; + if (probe->version != (int)sizeof(*probe)) { + printf("ignoring probe %p, version %u expected %u\n", + probe, probe->version, (int)sizeof(*probe)); + return; + } + TAILQ_FOREACH(prov, &sdt_prov_list, prov_entry) if (strcmp(prov->name, probe->prov->name) == 0) break; From owner-svn-src-all@freebsd.org Fri Oct 23 08:01: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 E41DEA19DC0; Fri, 23 Oct 2015 08:01:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91B361CF4; Fri, 23 Oct 2015 08:01:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N81kI1078270; Fri, 23 Oct 2015 08:01:46 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N81k76078267; Fri, 23 Oct 2015 08:01:46 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230801.t9N81k76078267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 08:01: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: r289805 - in stable/10: cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/lib/libzpool/common sys/cddl/contrib/opensolaris/common/nvpair 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, 23 Oct 2015 08:01:48 -0000 Author: avg Date: Fri Oct 23 08:01:46 2015 New Revision: 289805 URL: https://svnweb.freebsd.org/changeset/base/289805 Log: MFC r288340: define aok in libnvpair which is linked to all zfs libraries that need aok Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c stable/10/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Fri Oct 23 07:57:33 2015 (r289804) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Fri Oct 23 08:01:46 2015 (r289805) @@ -55,7 +55,6 @@ #include "zfs_prop.h" #include "zfeature_common.h" -int aok; int libzfs_errno(libzfs_handle_t *hdl) Modified: stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fri Oct 23 07:57:33 2015 (r289804) +++ stable/10/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fri Oct 23 08:01:46 2015 (r289805) @@ -45,7 +45,9 @@ * Emulation of kernel services in userland. */ +#ifndef __FreeBSD__ int aok; +#endif uint64_t physmem; vnode_t *rootdir = (vnode_t *)0xabcd1234; char hw_serial[HW_HOSTID_LEN]; Modified: stable/10/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Fri Oct 23 07:57:33 2015 (r289804) +++ stable/10/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Fri Oct 23 08:01:46 2015 (r289805) @@ -44,6 +44,14 @@ #endif #define skip_whitespace(p) while ((*(p) == ' ') || (*(p) == '\t')) p++ +#if defined(__FreeBSD__) && !defined(_KERNEL) +/* + * libnvpair is the lowest commen denominator for ZFS related libraries, + * defining aok here makes it usable by all ZFS related libraries + */ +int aok; +#endif + /* * nvpair.c - Provides kernel & userland interfaces for manipulating * name-value pairs. From owner-svn-src-all@freebsd.org Fri Oct 23 08: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 B2C65A19E49; Fri, 23 Oct 2015 08:05:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C1611EBC; Fri, 23 Oct 2015 08:05:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N84x5q080649; Fri, 23 Oct 2015 08:04:59 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N84x4b080646; Fri, 23 Oct 2015 08:04:59 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230804.t9N84x4b080646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 08:04: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: r289806 - in stable/9: cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/lib/libzpool/common sys/cddl/contrib/opensolaris/common/nvpair 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, 23 Oct 2015 08:05:00 -0000 Author: avg Date: Fri Oct 23 08:04:59 2015 New Revision: 289806 URL: https://svnweb.freebsd.org/changeset/base/289806 Log: MFC r288340: define aok in libnvpair which is linked to all zfs libraries that need aok Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c stable/9/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c stable/9/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libzfs/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Fri Oct 23 08:01:46 2015 (r289805) +++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c Fri Oct 23 08:04:59 2015 (r289806) @@ -55,7 +55,6 @@ #include "zfs_prop.h" #include "zfeature_common.h" -int aok; int libzfs_errno(libzfs_handle_t *hdl) Modified: stable/9/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fri Oct 23 08:01:46 2015 (r289805) +++ stable/9/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Fri Oct 23 08:04:59 2015 (r289806) @@ -44,7 +44,9 @@ * Emulation of kernel services in userland. */ +#ifndef __FreeBSD__ int aok; +#endif uint64_t physmem; vnode_t *rootdir = (vnode_t *)0xabcd1234; char hw_serial[HW_HOSTID_LEN]; Modified: stable/9/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Fri Oct 23 08:01:46 2015 (r289805) +++ stable/9/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Fri Oct 23 08:04:59 2015 (r289806) @@ -44,6 +44,14 @@ #endif #define skip_whitespace(p) while ((*(p) == ' ') || (*(p) == '\t')) p++ +#if defined(__FreeBSD__) && !defined(_KERNEL) +/* + * libnvpair is the lowest commen denominator for ZFS related libraries, + * defining aok here makes it usable by all ZFS related libraries + */ +int aok; +#endif + /* * nvpair.c - Provides kernel & userland interfaces for manipulating * name-value pairs. From owner-svn-src-all@freebsd.org Fri Oct 23 08:12: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 60319A1A144; Fri, 23 Oct 2015 08:12:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A3C035D; Fri, 23 Oct 2015 08:12:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N8C1fP084129; Fri, 23 Oct 2015 08:12:01 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N8C1Yb084126; Fri, 23 Oct 2015 08:12:01 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230812.t9N8C1Yb084126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 08:12: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: r289807 - in stable/10/cddl/lib: libzfs libzfs_core 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, 23 Oct 2015 08:12:02 -0000 Author: avg Date: Fri Oct 23 08:12:00 2015 New Revision: 289807 URL: https://svnweb.freebsd.org/changeset/base/289807 Log: MFC r284409: Fix circular dependency between libzfs and libzfs_core By bapt. Modified: stable/10/cddl/lib/libzfs/Makefile stable/10/cddl/lib/libzfs_core/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/lib/libzfs/Makefile ============================================================================== --- stable/10/cddl/lib/libzfs/Makefile Fri Oct 23 08:04:59 2015 (r289806) +++ stable/10/cddl/lib/libzfs/Makefile Fri Oct 23 08:12:00 2015 (r289807) @@ -37,7 +37,6 @@ SRCS+= libzfs_changelist.c \ zfs_comutil.c \ zfs_deleg.c \ zfs_fletcher.c \ - zfs_ioctl_compat.c \ zfs_namecheck.c \ zfs_prop.c \ zpool_prop.c \ Modified: stable/10/cddl/lib/libzfs_core/Makefile ============================================================================== --- stable/10/cddl/lib/libzfs_core/Makefile Fri Oct 23 08:04:59 2015 (r289806) +++ stable/10/cddl/lib/libzfs_core/Makefile Fri Oct 23 08:12:00 2015 (r289807) @@ -11,7 +11,8 @@ DPADD= ${LIBNVPAIR} LDADD= -lnvpair SRCS= libzfs_core.c \ - libzfs_core_compat.c + libzfs_core_compat.c \ + zfs_ioctl_compat.c SRCS+= libzfs_compat.c From owner-svn-src-all@freebsd.org Fri Oct 23 08:12: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 41A91A1A1E2; Fri, 23 Oct 2015 08:12:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C14878D; Fri, 23 Oct 2015 08:12:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N8Cik1084267; Fri, 23 Oct 2015 08:12:44 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N8Chw0084264; Fri, 23 Oct 2015 08:12:43 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230812.t9N8Chw0084264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 08:12:43 +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: r289808 - in stable/9/cddl/lib: libzfs libzfs_core 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, 23 Oct 2015 08:12:45 -0000 Author: avg Date: Fri Oct 23 08:12:43 2015 New Revision: 289808 URL: https://svnweb.freebsd.org/changeset/base/289808 Log: MFC r284409: Fix circular dependency between libzfs and libzfs_core By bapt. Modified: stable/9/cddl/lib/libzfs/Makefile stable/9/cddl/lib/libzfs_core/Makefile Directory Properties: stable/9/cddl/lib/libzfs/ (props changed) stable/9/cddl/lib/libzfs_core/ (props changed) Modified: stable/9/cddl/lib/libzfs/Makefile ============================================================================== --- stable/9/cddl/lib/libzfs/Makefile Fri Oct 23 08:12:00 2015 (r289807) +++ stable/9/cddl/lib/libzfs/Makefile Fri Oct 23 08:12:43 2015 (r289808) @@ -33,7 +33,6 @@ SRCS+= libzfs_changelist.c \ zfs_comutil.c \ zfs_deleg.c \ zfs_fletcher.c \ - zfs_ioctl_compat.c \ zfs_namecheck.c \ zfs_prop.c \ zpool_prop.c \ Modified: stable/9/cddl/lib/libzfs_core/Makefile ============================================================================== --- stable/9/cddl/lib/libzfs_core/Makefile Fri Oct 23 08:12:00 2015 (r289807) +++ stable/9/cddl/lib/libzfs_core/Makefile Fri Oct 23 08:12:43 2015 (r289808) @@ -11,7 +11,8 @@ DPADD= ${LIBNVPAIR} LDADD= -lnvpair SRCS= libzfs_core.c \ - libzfs_core_compat.c + libzfs_core_compat.c \ + zfs_ioctl_compat.c SRCS+= libzfs_compat.c From owner-svn-src-all@freebsd.org Fri Oct 23 08:15: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 85C6AA1A32C; Fri, 23 Oct 2015 08:15:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5258194E; Fri, 23 Oct 2015 08:15:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N8Fr7Q084743; Fri, 23 Oct 2015 08:15:53 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N8Frxp084742; Fri, 23 Oct 2015 08:15:53 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230815.t9N8Frxp084742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 08:15:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289809 - stable/10/sys/cddl/dev/sdt 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, 23 Oct 2015 08:15:54 -0000 Author: avg Date: Fri Oct 23 08:15:53 2015 New Revision: 289809 URL: https://svnweb.freebsd.org/changeset/base/289809 Log: MFC r288363: std: it is important that func name is never an empty string Modified: stable/10/sys/cddl/dev/sdt/sdt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/dev/sdt/sdt.c ============================================================================== --- stable/10/sys/cddl/dev/sdt/sdt.c Fri Oct 23 08:12:43 2015 (r289808) +++ stable/10/sys/cddl/dev/sdt/sdt.c Fri Oct 23 08:15:53 2015 (r289809) @@ -169,6 +169,8 @@ sdt_create_probe(struct sdt_probe *probe * in the C compiler, so we have to respect const vs non-const. */ strlcpy(func, probe->func, sizeof(func)); + if (func[0] == '\0') + strcpy(func, "none"); from = probe->name; to = name; From owner-svn-src-all@freebsd.org Fri Oct 23 08:16: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 0DE2CA1A381; Fri, 23 Oct 2015 08:16:12 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF79EA81; Fri, 23 Oct 2015 08:16:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N8GAZI084833; Fri, 23 Oct 2015 08:16:10 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N8GAHI084832; Fri, 23 Oct 2015 08:16:10 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230816.t9N8GAHI084832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 08:16:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289810 - stable/9/sys/cddl/dev/sdt 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, 23 Oct 2015 08:16:12 -0000 Author: avg Date: Fri Oct 23 08:16:10 2015 New Revision: 289810 URL: https://svnweb.freebsd.org/changeset/base/289810 Log: MFC r288363: std: it is important that func name is never an empty string Modified: stable/9/sys/cddl/dev/sdt/sdt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/dev/sdt/sdt.c ============================================================================== --- stable/9/sys/cddl/dev/sdt/sdt.c Fri Oct 23 08:15:53 2015 (r289809) +++ stable/9/sys/cddl/dev/sdt/sdt.c Fri Oct 23 08:16:10 2015 (r289810) @@ -169,6 +169,8 @@ sdt_create_probe(struct sdt_probe *probe * in the C compiler, so we have to respect const vs non-const. */ strlcpy(func, probe->func, sizeof(func)); + if (func[0] == '\0') + strcpy(func, "none"); from = probe->name; to = name; From owner-svn-src-all@freebsd.org Fri Oct 23 08:26: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 24696A1A666; Fri, 23 Oct 2015 08:26:28 +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 D3E08F40; Fri, 23 Oct 2015 08:26:27 +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 t9N8QQCG088759; Fri, 23 Oct 2015 08:26:26 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N8QQgU088757; Fri, 23 Oct 2015 08:26:26 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201510230826.t9N8QQgU088757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 23 Oct 2015 08:26:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289811 - 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: Fri, 23 Oct 2015 08:26:28 -0000 Author: avos Date: Fri Oct 23 08:26:26 2015 New Revision: 289811 URL: https://svnweb.freebsd.org/changeset/base/289811 Log: - Split one 4-byte R92C_CR register into 2-byte R92C_CR and 1-byte R92C_MSR registers (they are used for different purposes). - Wrap R92C_MSR modifications into urtwn_set_mode(). Reviewed by: kevlo Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D3838 Modified: head/sys/dev/usb/wlan/if_urtwn.c head/sys/dev/usb/wlan/if_urtwnreg.h Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Fri Oct 23 08:16:10 2015 (r289810) +++ head/sys/dev/usb/wlan/if_urtwn.c Fri Oct 23 08:26:26 2015 (r289811) @@ -222,6 +222,7 @@ static void urtwn_r88e_read_rom(struct static int urtwn_ra_init(struct urtwn_softc *); static void urtwn_tsf_sync_enable(struct urtwn_softc *); static void urtwn_set_led(struct urtwn_softc *, int, int); +static void urtwn_set_mode(struct urtwn_softc *, uint8_t); static int urtwn_newstate(struct ieee80211vap *, enum ieee80211_state, int); static void urtwn_watchdog(void *); @@ -1522,6 +1523,16 @@ urtwn_set_led(struct urtwn_softc *sc, in } } +static void +urtwn_set_mode(struct urtwn_softc *sc, uint8_t mode) +{ + uint8_t reg; + + reg = urtwn_read_1(sc, R92C_MSR); + reg = (reg & ~R92C_MSR_MASK) | mode; + urtwn_write_1(sc, R92C_MSR, reg); +} + static int urtwn_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { @@ -1530,7 +1541,6 @@ urtwn_newstate(struct ieee80211vap *vap, struct urtwn_softc *sc = ic->ic_softc; struct ieee80211_node *ni; enum ieee80211_state ostate; - uint32_t reg; ostate = vap->iv_state; DPRINTF("%s -> %s\n", ieee80211_state_name[ostate], @@ -1545,9 +1555,7 @@ urtwn_newstate(struct ieee80211vap *vap, urtwn_set_led(sc, URTWN_LED_LINK, 0); /* Set media status to 'No Link'. */ - reg = urtwn_read_4(sc, R92C_CR); - reg = RW(reg, R92C_CR_NETTYPE, R92C_CR_NETTYPE_NOLINK); - urtwn_write_4(sc, R92C_CR, reg); + urtwn_set_mode(sc, R92C_MSR_NOLINK); /* Stop Rx of data frames. */ urtwn_write_2(sc, R92C_RXFLTMAP2, 0); @@ -1632,9 +1640,7 @@ urtwn_newstate(struct ieee80211vap *vap, ni = ieee80211_ref_node(vap->iv_bss); /* Set media status to 'Associated'. */ - reg = urtwn_read_4(sc, R92C_CR); - reg = RW(reg, R92C_CR_NETTYPE, R92C_CR_NETTYPE_INFRA); - urtwn_write_4(sc, R92C_CR, reg); + urtwn_set_mode(sc, R92C_MSR_INFRA); /* Set BSSID. */ urtwn_write_4(sc, R92C_BSSID + 0, LE_READ_4(&ni->ni_bssid[0])); @@ -3294,9 +3300,7 @@ urtwn_init(struct urtwn_softc *sc) urtwn_write_region_1(sc, R92C_MACID, macaddr, IEEE80211_ADDR_LEN); /* Set initial network type. */ - reg = urtwn_read_4(sc, R92C_CR); - reg = RW(reg, R92C_CR_NETTYPE, R92C_CR_NETTYPE_INFRA); - urtwn_write_4(sc, R92C_CR, reg); + urtwn_set_mode(sc, R92C_MSR_INFRA); urtwn_rxfilter_init(sc); Modified: head/sys/dev/usb/wlan/if_urtwnreg.h ============================================================================== --- head/sys/dev/usb/wlan/if_urtwnreg.h Fri Oct 23 08:16:10 2015 (r289810) +++ head/sys/dev/usb/wlan/if_urtwnreg.h Fri Oct 23 08:26:26 2015 (r289811) @@ -96,6 +96,7 @@ #define R92C_SYS_CFG 0x0f0 /* MAC General Configuration. */ #define R92C_CR 0x100 +#define R92C_MSR 0x102 #define R92C_PBP 0x104 #define R92C_TRXDMA_CTRL 0x10c #define R92C_TRXFF_BNDY 0x114 @@ -377,22 +378,23 @@ #define R92C_SYS_CFG_TYPE_92C 0x08000000 /* Bits for R92C_CR. */ -#define R92C_CR_HCI_TXDMA_EN 0x00000001 -#define R92C_CR_HCI_RXDMA_EN 0x00000002 -#define R92C_CR_TXDMA_EN 0x00000004 -#define R92C_CR_RXDMA_EN 0x00000008 -#define R92C_CR_PROTOCOL_EN 0x00000010 -#define R92C_CR_SCHEDULE_EN 0x00000020 -#define R92C_CR_MACTXEN 0x00000040 -#define R92C_CR_MACRXEN 0x00000080 -#define R92C_CR_ENSEC 0x00000200 -#define R92C_CR_CALTMR_EN 0x00000400 -#define R92C_CR_NETTYPE_S 16 -#define R92C_CR_NETTYPE_M 0x00030000 -#define R92C_CR_NETTYPE_NOLINK 0 -#define R92C_CR_NETTYPE_ADHOC 1 -#define R92C_CR_NETTYPE_INFRA 2 -#define R92C_CR_NETTYPE_AP 3 +#define R92C_CR_HCI_TXDMA_EN 0x0001 +#define R92C_CR_HCI_RXDMA_EN 0x0002 +#define R92C_CR_TXDMA_EN 0x0004 +#define R92C_CR_RXDMA_EN 0x0008 +#define R92C_CR_PROTOCOL_EN 0x0010 +#define R92C_CR_SCHEDULE_EN 0x0020 +#define R92C_CR_MACTXEN 0x0040 +#define R92C_CR_MACRXEN 0x0080 +#define R92C_CR_ENSEC 0x0200 +#define R92C_CR_CALTMR_EN 0x0400 + +/* Bits for R92C_MSR. */ +#define R92C_MSR_NOLINK 0x00 +#define R92C_MSR_ADHOC 0x01 +#define R92C_MSR_INFRA 0x02 +#define R92C_MSR_AP 0x03 +#define R92C_MSR_MASK (R92C_MSR_AP) /* Bits for R92C_PBP. */ #define R92C_PBP_PSRX_M 0x0f From owner-svn-src-all@freebsd.org Fri Oct 23 08:26: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 D2AE8A1A724; Fri, 23 Oct 2015 08:26:47 +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 94B6510CA; Fri, 23 Oct 2015 08:26:47 +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 t9N8QkIE088851; Fri, 23 Oct 2015 08:26:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N8QkTP088843; Fri, 23 Oct 2015 08:26:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510230826.t9N8QkTP088843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 23 Oct 2015 08:26:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289812 - 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: Fri, 23 Oct 2015 08:26:47 -0000 Author: mav Date: Fri Oct 23 08:26:45 2015 New Revision: 289812 URL: https://svnweb.freebsd.org/changeset/base/289812 Log: Some polishing and unification in ISR code. Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_pci.c head/sys/dev/isp/isp_sbus.c head/sys/dev/isp/ispreg.h head/sys/dev/isp/ispvar.h Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Fri Oct 23 08:26:26 2015 (r289811) +++ head/sys/dev/isp/isp.c Fri Oct 23 08:26:45 2015 (r289812) @@ -5037,7 +5037,7 @@ isp_control(ispsoftc_t *isp, ispctl_t ct #endif void -isp_intr(ispsoftc_t *isp, uint32_t isr, uint16_t sema, uint16_t mbox) +isp_intr(ispsoftc_t *isp, uint16_t isr, uint16_t sema, uint16_t info) { XS_T *complist[MAX_REQUESTQ_COMPLETIONS], *xs; uint32_t iptr, optr, junk; @@ -5051,11 +5051,11 @@ again: */ if (sema) { fmbox: - if (mbox & MBOX_COMMAND_COMPLETE) { + if (info & MBOX_COMMAND_COMPLETE) { isp->isp_intmboxc++; if (isp->isp_mboxbsy) { int obits = isp->isp_obits; - isp->isp_mboxtmp[0] = mbox; + isp->isp_mboxtmp[0] = info; for (i = 1; i < ISP_NMBOX(isp); i++) { if ((obits & (1 << i)) == 0) { continue; @@ -5069,15 +5069,15 @@ again: } MBOX_NOTIFY_COMPLETE(isp); } else { - isp_prt(isp, ISP_LOGWARN, "mailbox cmd (0x%x) with no waiters", mbox); + isp_prt(isp, ISP_LOGWARN, "mailbox cmd (0x%x) with no waiters", info); } } else { - i = IS_FC(isp)? isp_parse_async_fc(isp, mbox) : isp_parse_async(isp, mbox); + i = IS_FC(isp)? isp_parse_async_fc(isp, info) : isp_parse_async(isp, info); if (i < 0) { return; } } - if ((IS_FC(isp) && mbox != ASYNC_RIOZIO_STALL) || isp->isp_state != ISP_RUNSTATE) { + if ((IS_FC(isp) && info != ASYNC_RIOZIO_STALL) || isp->isp_state != ISP_RUNSTATE) { goto out; } } @@ -5092,7 +5092,8 @@ again: if (isp->isp_mboxbsy && isp->isp_lastmbxcmd == MBOX_ABOUT_FIRMWARE) { goto fmbox; } - isp_prt(isp, ISP_LOGINFO, "interrupt (ISR=%x SEMA=%x) when not ready", isr, sema); + isp_prt(isp, ISP_LOGINFO, "interrupt (ISR=%x SEMA=%x INFO=%x) " + "when not ready", isr, sema, info); /* * Thank you very much! *Burrrp*! */ @@ -5110,8 +5111,8 @@ again: * Check for ATIO Queue entries. */ if (IS_24XX(isp) && - ((isr & BIU2400_R2HST_ISTAT_MASK) == ISP2400R2HST_ATIO_RSPQ_UPDATE || - (isr & BIU2400_R2HST_ISTAT_MASK) == ISP2400R2HST_ATIO_RQST_UPDATE)) { + (isr == ISPR2HST_ATIO_UPDATE || isr == ISPR2HST_ATIO_RSPQ_UPDATE || + isr == ISPR2HST_ATIO_UPDATE2)) { iptr = ISP_READ(isp, BIU2400_ATIO_RSPINP); optr = isp->isp_atioodx; @@ -5145,25 +5146,6 @@ again: #endif /* - * Get the current Response Queue Out Pointer. - * - * If we're a 2300 or 2400, we can ask what hardware what it thinks. - */ -#if 0 - if (IS_23XX(isp) || IS_24XX(isp)) { - optr = ISP_READ(isp, isp->isp_respoutrp); - /* - * Debug: to be taken out eventually - */ - if (isp->isp_resodx != optr) { - isp_prt(isp, ISP_LOGINFO, "isp_intr: hard optr=%x, soft optr %x", optr, isp->isp_resodx); - isp->isp_resodx = optr; - } - } else -#endif - optr = isp->isp_resodx; - - /* * You *must* read the Response Queue In Pointer * prior to clearing the RISC interrupt. * @@ -5184,6 +5166,7 @@ again: iptr = ISP_READ(isp, isp->isp_respinrp); } + optr = isp->isp_resodx; if (optr == iptr && sema == 0) { /* * There are a lot of these- reasons unknown- mostly on @@ -5207,8 +5190,8 @@ again: ; } else { sema = ISP_READ(isp, BIU_SEMA); - mbox = ISP_READ(isp, OUTMAILBOX0); - if ((sema & 0x3) && (mbox & 0x8000)) { + info = ISP_READ(isp, OUTMAILBOX0); + if ((sema & 0x3) && (info & 0x8000)) { goto again; } } Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Fri Oct 23 08:26:26 2015 (r289811) +++ head/sys/dev/isp/isp_freebsd.c Fri Oct 23 08:26:45 2015 (r289812) @@ -4514,12 +4514,10 @@ static void isp_poll(struct cam_sim *sim) { ispsoftc_t *isp = cam_sim_softc(sim); - uint32_t isr; - uint16_t sema, mbox; + uint16_t isr, sema, info; - if (ISP_READ_ISR(isp, &isr, &sema, &mbox)) { - isp_intr(isp, isr, sema, mbox); - } + if (ISP_READ_ISR(isp, &isr, &sema, &info)) + isp_intr(isp, isr, sema, info); } @@ -4538,11 +4536,9 @@ isp_watchdog(void *arg) * Hand crank the interrupt code just to be sure the command isn't stuck somewhere. */ if (handle != ISP_HANDLE_FREE) { - uint32_t isr; - uint16_t sema, mbox; - if (ISP_READ_ISR(isp, &isr, &sema, &mbox) != 0) { - isp_intr(isp, isr, sema, mbox); - } + uint16_t isr, sema, info; + if (ISP_READ_ISR(isp, &isr, &sema, &info) != 0) + isp_intr(isp, isr, sema, info); ohandle = handle; handle = isp_find_handle(isp, xs); } @@ -6269,13 +6265,12 @@ isp_mbox_wait_complete(ispsoftc_t *isp, } else { for (olim = 0; olim < max; olim++) { for (ilim = 0; ilim < usecs; ilim += 100) { - uint32_t isr; - uint16_t sema, mbox; + uint16_t isr, sema, info; if (isp->isp_osinfo.mboxcmd_done) { break; } - if (ISP_READ_ISR(isp, &isr, &sema, &mbox)) { - isp_intr(isp, isr, sema, mbox); + if (ISP_READ_ISR(isp, &isr, &sema, &info)) { + isp_intr(isp, isr, sema, info); if (isp->isp_osinfo.mboxcmd_done) { break; } @@ -6343,16 +6338,14 @@ void isp_platform_intr(void *arg) { ispsoftc_t *isp = arg; - uint32_t isr; - uint16_t sema, mbox; + uint16_t isr, sema, info; ISP_LOCK(isp); isp->isp_intcnt++; - if (ISP_READ_ISR(isp, &isr, &sema, &mbox) == 0) { + if (ISP_READ_ISR(isp, &isr, &sema, &info)) + isp_intr(isp, isr, sema, info); + else isp->isp_intbogus++; - } else { - isp_intr(isp, isr, sema, mbox); - } ISP_UNLOCK(isp); } Modified: head/sys/dev/isp/isp_pci.c ============================================================================== --- head/sys/dev/isp/isp_pci.c Fri Oct 23 08:26:26 2015 (r289811) +++ head/sys/dev/isp/isp_pci.c Fri Oct 23 08:26:45 2015 (r289812) @@ -59,9 +59,9 @@ static uint32_t isp_pci_rd_reg_1080(isps static void isp_pci_wr_reg_1080(ispsoftc_t *, int, uint32_t); static uint32_t isp_pci_rd_reg_2400(ispsoftc_t *, int); static void isp_pci_wr_reg_2400(ispsoftc_t *, int, uint32_t); -static int isp_pci_rd_isr(ispsoftc_t *, uint32_t *, uint16_t *, uint16_t *); -static int isp_pci_rd_isr_2300(ispsoftc_t *, uint32_t *, uint16_t *, uint16_t *); -static int isp_pci_rd_isr_2400(ispsoftc_t *, uint32_t *, uint16_t *, uint16_t *); +static int isp_pci_rd_isr(ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); +static int isp_pci_rd_isr_2300(ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); +static int isp_pci_rd_isr_2400(ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); static int isp_pci_mbxdma(ispsoftc_t *); static int isp_pci_dmasetup(ispsoftc_t *, XS_T *, void *); @@ -1112,7 +1112,7 @@ isp_pci_rd_debounced(ispsoftc_t *isp, in } static int -isp_pci_rd_isr(ispsoftc_t *isp, uint32_t *isrp, uint16_t *semap, uint16_t *mbp) +isp_pci_rd_isr(ispsoftc_t *isp, uint16_t *isrp, uint16_t *semap, uint16_t *info) { uint16_t isr, sema; @@ -1136,21 +1136,20 @@ isp_pci_rd_isr(ispsoftc_t *isp, uint32_t *isrp = isr; if ((*semap = sema) != 0) { if (IS_2100(isp)) { - if (isp_pci_rd_debounced(isp, OUTMAILBOX0, mbp)) { + if (isp_pci_rd_debounced(isp, OUTMAILBOX0, info)) { return (0); } } else { - *mbp = BXR2(isp, IspVirt2Off(isp, OUTMAILBOX0)); + *info = BXR2(isp, IspVirt2Off(isp, OUTMAILBOX0)); } } return (1); } static int -isp_pci_rd_isr_2300(ispsoftc_t *isp, uint32_t *isrp, uint16_t *semap, uint16_t *mbox0p) +isp_pci_rd_isr_2300(ispsoftc_t *isp, uint16_t *isrp, uint16_t *semap, uint16_t *info) { - uint32_t hccr; - uint32_t r2hisr; + uint32_t hccr, r2hisr; if (!(BXR2(isp, IspVirt2Off(isp, BIU_ISR) & BIU2100_ISR_RISC_INT))) { *isrp = 0; @@ -1162,36 +1161,29 @@ isp_pci_rd_isr_2300(ispsoftc_t *isp, uin *isrp = 0; return (0); } - switch (r2hisr & BIU_R2HST_ISTAT_MASK) { + switch ((*isrp = r2hisr & BIU_R2HST_ISTAT_MASK)) { case ISPR2HST_ROM_MBX_OK: case ISPR2HST_ROM_MBX_FAIL: case ISPR2HST_MBX_OK: case ISPR2HST_MBX_FAIL: case ISPR2HST_ASYNC_EVENT: - *isrp = r2hisr & 0xffff; - *mbox0p = (r2hisr >> 16); *semap = 1; - return (1); + break; case ISPR2HST_RIO_16: - *isrp = r2hisr & 0xffff; - *mbox0p = ASYNC_RIO16_1; + *info = ASYNC_RIO16_1; *semap = 1; return (1); case ISPR2HST_FPOST: - *isrp = r2hisr & 0xffff; - *mbox0p = ASYNC_CMD_CMPLT; + *info = ASYNC_CMD_CMPLT; *semap = 1; return (1); case ISPR2HST_FPOST_CTIO: - *isrp = r2hisr & 0xffff; - *mbox0p = ASYNC_CTIO_DONE; + *info = ASYNC_CTIO_DONE; *semap = 1; return (1); case ISPR2HST_RSPQ_UPDATE: - *isrp = r2hisr & 0xffff; - *mbox0p = 0; *semap = 0; - return (1); + break; default: hccr = ISP_READ(isp, HCCR); if (hccr & HCCR_PAUSE) { @@ -1203,41 +1195,43 @@ isp_pci_rd_isr_2300(ispsoftc_t *isp, uin } return (0); } + *info = (r2hisr >> 16); + return (1); } static int -isp_pci_rd_isr_2400(ispsoftc_t *isp, uint32_t *isrp, uint16_t *semap, uint16_t *mbox0p) +isp_pci_rd_isr_2400(ispsoftc_t *isp, uint16_t *isrp, uint16_t *semap, uint16_t *info) { uint32_t r2hisr; r2hisr = BXR4(isp, IspVirt2Off(isp, BIU2400_R2HSTSLO)); isp_prt(isp, ISP_LOGDEBUG3, "RISC2HOST ISR 0x%x", r2hisr); - if ((r2hisr & BIU2400_R2HST_INTR) == 0) { + if ((r2hisr & BIU_R2HST_INTR) == 0) { *isrp = 0; return (0); } - switch (r2hisr & BIU2400_R2HST_ISTAT_MASK) { - case ISP2400R2HST_ROM_MBX_OK: - case ISP2400R2HST_ROM_MBX_FAIL: - case ISP2400R2HST_MBX_OK: - case ISP2400R2HST_MBX_FAIL: - case ISP2400R2HST_ASYNC_EVENT: - *isrp = r2hisr & 0xffff; - *mbox0p = (r2hisr >> 16); + switch ((*isrp = r2hisr & BIU_R2HST_ISTAT_MASK)) { + case ISPR2HST_ROM_MBX_OK: + case ISPR2HST_ROM_MBX_FAIL: + case ISPR2HST_MBX_OK: + case ISPR2HST_MBX_FAIL: + case ISPR2HST_ASYNC_EVENT: *semap = 1; - return (1); - case ISP2400R2HST_RSPQ_UPDATE: - case ISP2400R2HST_ATIO_RSPQ_UPDATE: - case ISP2400R2HST_ATIO_RQST_UPDATE: - *isrp = r2hisr & 0xffff; - *mbox0p = 0; + break; + case ISPR2HST_RSPQ_UPDATE: + case ISPR2HST_RSPQ_UPDATE2: + case ISPR2HST_ATIO_UPDATE: + case ISPR2HST_ATIO_RSPQ_UPDATE: + case ISPR2HST_ATIO_UPDATE2: *semap = 0; - return (1); + break; default: ISP_WRITE(isp, BIU2400_HCCR, HCCR_2400_CMD_CLEAR_RISC_INT); isp_prt(isp, ISP_LOGERR, "unknown interrupt 0x%x\n", r2hisr); return (0); } + *info = (r2hisr >> 16); + return (1); } static uint32_t Modified: head/sys/dev/isp/isp_sbus.c ============================================================================== --- head/sys/dev/isp/isp_sbus.c Fri Oct 23 08:26:26 2015 (r289811) +++ head/sys/dev/isp/isp_sbus.c Fri Oct 23 08:26:45 2015 (r289812) @@ -388,7 +388,7 @@ isp_sbus_detach(device_t dev) bus_space_read_2(isp->isp_bus_tag, isp->isp_bus_handle, off) static int -isp_sbus_rd_isr(ispsoftc_t *isp, uint32_t *isrp, uint16_t *semap, uint16_t *mbp) +isp_sbus_rd_isr(ispsoftc_t *isp, uint16_t *isrp, uint16_t *semap, uint16_t *info) { uint16_t isr, sema; @@ -401,9 +401,8 @@ isp_sbus_rd_isr(ispsoftc_t *isp, uint32_ return (0); } *isrp = isr; - if ((*semap = sema) != 0) { - *mbp = BXR2(sbc, IspVirt2Off(isp, OUTMAILBOX0)); - } + if ((*semap = sema) != 0) + *info = BXR2(sbc, IspVirt2Off(isp, OUTMAILBOX0)); return (1); } Modified: head/sys/dev/isp/ispreg.h ============================================================================== --- head/sys/dev/isp/ispreg.h Fri Oct 23 08:26:26 2015 (r289811) +++ head/sys/dev/isp/ispreg.h Fri Oct 23 08:26:45 2015 (r289812) @@ -125,17 +125,20 @@ #define BIU_R2HST_INTR (1 << 15) /* RISC to Host Interrupt */ #define BIU_R2HST_PAUSED (1 << 8) /* RISC paused */ -#define BIU_R2HST_ISTAT_MASK 0x3f /* intr information && status */ +#define BIU_R2HST_ISTAT_MASK 0xff /* intr information && status */ #define ISPR2HST_ROM_MBX_OK 0x1 /* ROM mailbox cmd done ok */ #define ISPR2HST_ROM_MBX_FAIL 0x2 /* ROM mailbox cmd done fail */ #define ISPR2HST_MBX_OK 0x10 /* mailbox cmd done ok */ #define ISPR2HST_MBX_FAIL 0x11 /* mailbox cmd done fail */ #define ISPR2HST_ASYNC_EVENT 0x12 /* Async Event */ #define ISPR2HST_RSPQ_UPDATE 0x13 /* Response Queue Update */ -#define ISPR2HST_RQST_UPDATE 0x14 /* Resquest Queue Update */ +#define ISPR2HST_RSPQ_UPDATE2 0x14 /* Response Queue Update */ #define ISPR2HST_RIO_16 0x15 /* RIO 1-16 */ #define ISPR2HST_FPOST 0x16 /* Low 16 bits fast post */ #define ISPR2HST_FPOST_CTIO 0x17 /* Low 16 bits fast post ctio */ +#define ISPR2HST_ATIO_UPDATE 0x1C /* ATIO Queue Update */ +#define ISPR2HST_ATIO_RSPQ_UPDATE 0x1D /* ATIO & Request Update */ +#define ISPR2HST_ATIO_UPDATE2 0x1E /* ATIO Queue Update */ /* fifo command stuff- mostly for SPI */ #define DFIFO_COMMAND (BIU_BLOCK+0x60) /* RW : Command FIFO Port */ @@ -246,11 +249,6 @@ #define BIU2100_ISR_RXDMA_INT_PENDING 0x0002 /* Global interrupt pending */ #define BIU2100_ISR_TXDMA_INT_PENDING 0x0001 /* Global interrupt pending */ -#define INT_PENDING(isp, isr) \ - IS_FC(isp)? \ - (IS_24XX(isp)? (isr & BIU2400_ISR_RISC_INT) : (isr & BIU2100_ISR_RISC_INT)) :\ - (isr & BIU_ISR_RISC_INT) - #define INT_PENDING_MASK(isp) \ (IS_FC(isp)? (IS_24XX(isp)? BIU2400_ISR_RISC_INT : BIU2100_ISR_RISC_INT) : \ (BIU_ISR_RISC_INT)) @@ -398,19 +396,6 @@ /* BIU2400_ISR definitions */ #define BIU2400_ISR_RISC_INT 0x8 -#define BIU2400_R2HST_INTR BIU_R2HST_INTR -#define BIU2400_R2HST_PAUSED BIU_R2HST_PAUSED -#define BIU2400_R2HST_ISTAT_MASK 0x1f -/* interrupt status meanings */ -#define ISP2400R2HST_ROM_MBX_OK 0x1 /* ROM mailbox cmd done ok */ -#define ISP2400R2HST_ROM_MBX_FAIL 0x2 /* ROM mailbox cmd done fail */ -#define ISP2400R2HST_MBX_OK 0x10 /* mailbox cmd done ok */ -#define ISP2400R2HST_MBX_FAIL 0x11 /* mailbox cmd done fail */ -#define ISP2400R2HST_ASYNC_EVENT 0x12 /* Async Event */ -#define ISP2400R2HST_RSPQ_UPDATE 0x13 /* Response Queue Update */ -#define ISP2400R2HST_ATIO_RSPQ_UPDATE 0x1C /* ATIO Response Queue Update */ -#define ISP2400R2HST_ATIO_RQST_UPDATE 0x1D /* ATIO Request Queue Update */ - /* BIU2400_HCCR definitions */ #define HCCR_2400_CMD_NOP 0x00000000 Modified: head/sys/dev/isp/ispvar.h ============================================================================== --- head/sys/dev/isp/ispvar.h Fri Oct 23 08:26:26 2015 (r289811) +++ head/sys/dev/isp/ispvar.h Fri Oct 23 08:26:45 2015 (r289812) @@ -58,7 +58,7 @@ */ typedef struct ispsoftc ispsoftc_t; struct ispmdvec { - int (*dv_rd_isr) (ispsoftc_t *, uint32_t *, uint16_t *, uint16_t *); + int (*dv_rd_isr) (ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); uint32_t (*dv_rd_reg) (ispsoftc_t *, int); void (*dv_wr_reg) (ispsoftc_t *, int, uint32_t); int (*dv_mbxdma) (ispsoftc_t *); @@ -86,8 +86,8 @@ struct ispmdvec { * Macros to access ISP registers through bus specific layers- * mostly wrappers to vector through the mdvec structure. */ -#define ISP_READ_ISR(isp, isrp, semap, mbox0p) \ - (*(isp)->isp_mdvec->dv_rd_isr)(isp, isrp, semap, mbox0p) +#define ISP_READ_ISR(isp, isrp, semap, info) \ + (*(isp)->isp_mdvec->dv_rd_isr)(isp, isrp, semap, info) #define ISP_READ(isp, reg) \ (*(isp)->isp_mdvec->dv_rd_reg)((isp), (reg)) @@ -829,7 +829,7 @@ int isp_reinit(ispsoftc_t *, int); * semaphore register and first mailbox register (if appropriate). This also * means that most spurious/bogus interrupts not for us can be filtered first. */ -void isp_intr(ispsoftc_t *, uint32_t, uint16_t, uint16_t); +void isp_intr(ispsoftc_t *, uint16_t, uint16_t, uint16_t); /* From owner-svn-src-all@freebsd.org Fri Oct 23 08:35: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 7B0AFA1A948; Fri, 23 Oct 2015 08:35:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27C1E1512; Fri, 23 Oct 2015 08:35:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N8ZI3d092451; Fri, 23 Oct 2015 08:35:18 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N8ZHFl092447; Fri, 23 Oct 2015 08:35:17 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230835.t9N8ZHFl092447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 08:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289813 - in stable/10: . cddl/contrib/opensolaris/cmd/sgs cddl/usr.bin cddl/usr.bin/sgsmsg tools/build/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 08:35:19 -0000 Author: avg Date: Fri Oct 23 08:35:17 2015 New Revision: 289813 URL: https://svnweb.freebsd.org/changeset/base/289813 Log: MFC r288339: remove unused sgsmsg utility (originally imported from opensolaris) Deleted: stable/10/cddl/contrib/opensolaris/cmd/sgs/ stable/10/cddl/usr.bin/sgsmsg/ Modified: stable/10/Makefile.inc1 stable/10/ObsoleteFiles.inc stable/10/cddl/usr.bin/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Fri Oct 23 08:26:45 2015 (r289812) +++ stable/10/Makefile.inc1 Fri Oct 23 08:35:17 2015 (r289813) @@ -1311,7 +1311,7 @@ ${_bt}-usr.bin/clang/tblgen: ${_bt}-lib/ ((${BOOTSTRAPPING} < 1000034 && \ !(${BOOTSTRAPPING} >= 901505 && ${BOOTSTRAPPING} < 999999)) \ || (${MACHINE} != ${TARGET} || ${MACHINE_ARCH} != ${TARGET_ARCH})) -_dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \ +_dtrace_tools= cddl/lib/libctf lib/libelf \ lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge ${_bt}-cddl/usr.bin/ctfconvert: ${_bt}-lib/libelf ${_bt}-lib/libdwarf ${_bt}-cddl/lib/libctf Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Fri Oct 23 08:26:45 2015 (r289812) +++ stable/10/ObsoleteFiles.inc Fri Oct 23 08:35:17 2015 (r289813) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20151023: unused sgsmsg utility is removed +OLD_FILES+=usr/bin/sgsmsg # 20150506 OLD_FILES+=usr/share/man/man9/NDHASGIANT.9.gz # 20141223: remove in6_gif.h and in_gif.h Modified: stable/10/cddl/usr.bin/Makefile ============================================================================== --- stable/10/cddl/usr.bin/Makefile Fri Oct 23 08:26:45 2015 (r289812) +++ stable/10/cddl/usr.bin/Makefile Fri Oct 23 08:35:17 2015 (r289813) @@ -6,7 +6,6 @@ SUBDIR= \ ctfconvert \ ctfdump \ ctfmerge \ - sgsmsg \ ${_tests} \ ${_zinject} \ ${_zlook} \ Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri Oct 23 08:26:45 2015 (r289812) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri Oct 23 08:35:17 2015 (r289813) @@ -539,7 +539,6 @@ OLD_LIBS+=lib/libuutil.so.2 OLD_FILES+=usr/bin/ctfconvert OLD_FILES+=usr/bin/ctfdump OLD_FILES+=usr/bin/ctfmerge -OLD_FILES+=usr/bin/sgsmsg OLD_FILES+=usr/lib/dtrace/drti.o OLD_FILES+=usr/lib/dtrace/errno.d OLD_FILES+=usr/lib/dtrace/io.d From owner-svn-src-all@freebsd.org Fri Oct 23 08:35: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 16310A1A9BD; Fri, 23 Oct 2015 08:35:41 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C991C17B3; Fri, 23 Oct 2015 08:35:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N8Zdj0092546; Fri, 23 Oct 2015 08:35:39 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N8ZdnU092542; Fri, 23 Oct 2015 08:35:39 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230835.t9N8ZdnU092542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 08:35:39 +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: r289814 - in stable/9: . cddl/contrib/opensolaris/cmd/sgs cddl/usr.bin cddl/usr.bin/sgsmsg tools/build/mk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 08:35:41 -0000 Author: avg Date: Fri Oct 23 08:35:39 2015 New Revision: 289814 URL: https://svnweb.freebsd.org/changeset/base/289814 Log: MFC r288339: remove unused sgsmsg utility (originally imported from opensolaris) Deleted: stable/9/cddl/contrib/opensolaris/cmd/sgs/ stable/9/cddl/usr.bin/sgsmsg/ Modified: stable/9/Makefile.inc1 (contents, props changed) stable/9/ObsoleteFiles.inc (contents, props changed) stable/9/cddl/usr.bin/Makefile stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/ (props changed) stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/tools/build/ (props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Fri Oct 23 08:35:17 2015 (r289813) +++ stable/9/Makefile.inc1 Fri Oct 23 08:35:39 2015 (r289814) @@ -1171,7 +1171,7 @@ ${_bt}-usr.bin/clang/tblgen: ${_bt}-lib/ ((${BOOTSTRAPPING} < 1000034 && \ !(${BOOTSTRAPPING} >= 901505 && ${BOOTSTRAPPING} < 999999)) \ || (${MACHINE} != ${TARGET} || ${MACHINE_ARCH} != ${TARGET_ARCH})) -_dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \ +_dtrace_tools= cddl/lib/libctf lib/libelf \ lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge ${_bt}-cddl/usr.bin/ctfconvert: ${_bt}-lib/libelf ${_bt}-lib/libdwarf ${_bt}-cddl/lib/libctf Modified: stable/9/ObsoleteFiles.inc ============================================================================== --- stable/9/ObsoleteFiles.inc Fri Oct 23 08:35:17 2015 (r289813) +++ stable/9/ObsoleteFiles.inc Fri Oct 23 08:35:39 2015 (r289814) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20151023: unused sgsmsg utility is removed +OLD_FILES+=usr/bin/sgsmsg # 20140922: sleepq_calc_signal_retval.9 and sleepq_catch_signals.9 removed OLD_FILES+=usr/share/man/man9/sleepq_calc_signal_retval.9.gz OLD_FILES+=usr/share/man/man9/sleepq_catch_signals.9.gz Modified: stable/9/cddl/usr.bin/Makefile ============================================================================== --- stable/9/cddl/usr.bin/Makefile Fri Oct 23 08:35:17 2015 (r289813) +++ stable/9/cddl/usr.bin/Makefile Fri Oct 23 08:35:39 2015 (r289814) @@ -6,7 +6,6 @@ SUBDIR= \ ctfconvert \ ctfdump \ ctfmerge \ - sgsmsg \ ${_zinject} \ ${_zlook} \ ${_zstreamdump} \ Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Oct 23 08:35:17 2015 (r289813) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Oct 23 08:35:39 2015 (r289814) @@ -678,7 +678,6 @@ OLD_LIBS+=lib/libuutil.so.2 OLD_FILES+=usr/bin/ctfconvert OLD_FILES+=usr/bin/ctfdump OLD_FILES+=usr/bin/ctfmerge -OLD_FILES+=usr/bin/sgsmsg OLD_FILES+=usr/lib/dtrace/drti.o OLD_FILES+=usr/lib/dtrace/errno.d OLD_FILES+=usr/lib/dtrace/psinfo.d From owner-svn-src-all@freebsd.org Fri Oct 23 08:38: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 B9C62A1AAF5; Fri, 23 Oct 2015 08:38:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84DB71A97; Fri, 23 Oct 2015 08:38:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9N8cAhW092936; Fri, 23 Oct 2015 08:38:10 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N8cA3S092935; Fri, 23 Oct 2015 08:38:10 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510230838.t9N8cA3S092935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 08:38:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289815 - stable/9/sys/cddl/contrib/opensolaris/uts/common/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 08:38:11 -0000 Author: avg Date: Fri Oct 23 08:38:10 2015 New Revision: 289815 URL: https://svnweb.freebsd.org/changeset/base/289815 Log: MFC r284591: illums compat: use flsl/flsll for highbit/highbit64 Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Fri Oct 23 08:35:39 2015 (r289814) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Fri Oct 23 08:38:10 2015 (r289815) @@ -32,6 +32,9 @@ #include #include +#if defined(__FreeBSD__) && defined(_KERNEL) +#include +#endif #ifdef __cplusplus extern "C" { @@ -382,6 +385,9 @@ extern unsigned char bcd_to_byte[256]; static __inline int highbit(ulong_t i) { +#if defined(__FreeBSD__) && defined(_KERNEL) && defined(HAVE_INLINE_FLSL) + return (flsl(i)); +#else register int h = 1; if (i == 0) @@ -407,6 +413,7 @@ highbit(ulong_t i) h += 1; } return (h); +#endif } /* @@ -416,6 +423,9 @@ highbit(ulong_t i) static __inline int highbit64(uint64_t i) { +#if defined(__FreeBSD__) && defined(_KERNEL) && defined(HAVE_INLINE_FLSLL) + return (flsll(i)); +#else int h = 1; if (i == 0) @@ -439,6 +449,7 @@ highbit64(uint64_t i) h += 1; } return (h); +#endif } #ifdef __cplusplus From owner-svn-src-all@freebsd.org Fri Oct 23 08:44: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 5CC3FA1ACCA; Fri, 23 Oct 2015 08:44:42 +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 262641E34; Fri, 23 Oct 2015 08:44:42 +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 t9N8if3v096384; Fri, 23 Oct 2015 08:44:41 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N8ifSr096382; Fri, 23 Oct 2015 08:44:41 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201510230844.t9N8ifSr096382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 23 Oct 2015 08:44:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289816 - 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: Fri, 23 Oct 2015 08:44:42 -0000 Author: avos Date: Fri Oct 23 08:44:40 2015 New Revision: 289816 URL: https://svnweb.freebsd.org/changeset/base/289816 Log: urtwn(4): add DBM_ANTNOISE radiotap field Reviewed by: kevlo Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D3839 Modified: head/sys/dev/usb/wlan/if_urtwn.c 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 Fri Oct 23 08:38:10 2015 (r289815) +++ head/sys/dev/usb/wlan/if_urtwn.c Fri Oct 23 08:44:40 2015 (r289816) @@ -666,6 +666,7 @@ urtwn_rx_frame(struct urtwn_softc *sc, u tap->wr_rate = 0x80 | (rate - 12); } tap->wr_dbm_antsignal = rssi; + tap->wr_dbm_antnoise = URTWN_NOISE_FLOOR; tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); } Modified: head/sys/dev/usb/wlan/if_urtwnvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_urtwnvar.h Fri Oct 23 08:38:10 2015 (r289815) +++ head/sys/dev/usb/wlan/if_urtwnvar.h Fri Oct 23 08:44:40 2015 (r289816) @@ -37,14 +37,16 @@ struct urtwn_rx_radiotap_header { uint8_t wr_rate; uint16_t wr_chan_freq; uint16_t wr_chan_flags; - uint8_t wr_dbm_antsignal; + int8_t wr_dbm_antsignal; + int8_t wr_dbm_antnoise; } __packed __aligned(8); #define URTWN_RX_RADIOTAP_PRESENT \ (1 << IEEE80211_RADIOTAP_FLAGS | \ 1 << IEEE80211_RADIOTAP_RATE | \ 1 << IEEE80211_RADIOTAP_CHANNEL | \ - 1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) + 1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL | \ + 1 << IEEE80211_RADIOTAP_DBM_ANTNOISE) struct urtwn_tx_radiotap_header { struct ieee80211_radiotap_header wt_ihdr; From owner-svn-src-all@freebsd.org Fri Oct 23 08:53: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 CCD3DA1AED1; Fri, 23 Oct 2015 08:53:33 +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 A18683EB; Fri, 23 Oct 2015 08:53:33 +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 t9N8rWdh000195; Fri, 23 Oct 2015 08:53:32 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9N8rWao000192; Fri, 23 Oct 2015 08:53:32 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510230853.t9N8rWao000192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 23 Oct 2015 08:53:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289817 - 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: Fri, 23 Oct 2015 08:53:34 -0000 Author: mav Date: Fri Oct 23 08:53:32 2015 New Revision: 289817 URL: https://svnweb.freebsd.org/changeset/base/289817 Log: Disable full bus scan by CAM for FC adapters. FC port database code already notifies CAM about all devices. Additional full scan is just a waste of time, that by definition won't find anything that is not present in port database. Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h head/sys/dev/isp/isp_pci.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Fri Oct 23 08:44:40 2015 (r289816) +++ head/sys/dev/isp/isp_freebsd.c Fri Oct 23 08:53:32 2015 (r289817) @@ -54,7 +54,6 @@ 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 */ -int isp_autoconfig = 1; /* automatically attach/detach devices */ static const char prom3[] = "Chan %d [%u] PortID 0x%06x Departed because of %s"; static void isp_freeze_loopdown(ispsoftc_t *, int, char *); @@ -418,6 +417,9 @@ isp_freeze_loopdown(ispsoftc_t *isp, int if (fc->simqfrozen == 0) { isp_prt(isp, ISP_LOGDEBUG0, "%s: freeze simq (loopdown) chan %d", msg, chan); fc->simqfrozen = SIMQFRZ_LOOPDOWN; +#if __FreeBSD_version >= 1000039 + xpt_hold_boot(); +#endif xpt_freeze_simq(fc->sim, 1); } else { isp_prt(isp, ISP_LOGDEBUG0, "%s: mark frozen (loopdown) chan %d", msg, chan); @@ -436,6 +438,9 @@ isp_unfreeze_loopdown(ispsoftc_t *isp, i if (wasfrozen && fc->simqfrozen == 0) { isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "%s: Chan %d releasing simq", __func__, chan); xpt_release_simq(fc->sim, 1); +#if __FreeBSD_version >= 1000039 + xpt_release_boot(); +#endif } } } @@ -4596,10 +4601,6 @@ isp_make_here(ispsoftc_t *isp, fcportdb_ union ccb *ccb; struct isp_fc *fc = ISP_FC_PC(isp, chan); - if (isp_autoconfig == 0) { - return; - } - /* * Allocate a CCB, create a wildcard path for this target and schedule a rescan. */ @@ -4623,9 +4624,6 @@ isp_make_gone(ispsoftc_t *isp, fcportdb_ struct cam_path *tp; struct isp_fc *fc = ISP_FC_PC(isp, chan); - if (isp_autoconfig == 0) { - return; - } if (xpt_create_path(&tp, NULL, cam_sim_path(fc->sim), tgt, CAM_LUN_WILDCARD) == CAM_REQ_CMP) { xpt_async(AC_LOST_DEVICE, tp, NULL); xpt_free_path(tp); @@ -5510,6 +5508,9 @@ isp_action(struct cam_sim *sim, union cc fcparam *fcp = FCPARAM(isp, bus); cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED; +#if __FreeBSD_version >= 1000039 + cpi->hba_misc |= PIM_NOSCAN; +#endif /* * Because our loop ID can shift from time to time, Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Fri Oct 23 08:44:40 2015 (r289816) +++ head/sys/dev/isp/isp_freebsd.h Fri Oct 23 08:53:32 2015 (r289817) @@ -734,7 +734,6 @@ extern int isp_fabric_hysteresis; extern int isp_loop_down_limit; extern int isp_gone_device_time; extern int isp_quickboot_time; -extern int isp_autoconfig; /* * Platform private flags Modified: head/sys/dev/isp/isp_pci.c ============================================================================== --- head/sys/dev/isp/isp_pci.c Fri Oct 23 08:44:40 2015 (r289816) +++ head/sys/dev/isp/isp_pci.c Fri Oct 23 08:53:32 2015 (r289817) @@ -489,9 +489,6 @@ isp_get_generic_options(device_t dev, is if (tval > 0 && tval < 127) { isp_nvports = tval; } - tval = 1; - (void) resource_int_value(device_get_name(dev), device_get_unit(dev), "autoconfig", &tval); - isp_autoconfig = tval; tval = 7; (void) resource_int_value(device_get_name(dev), device_get_unit(dev), "quickboot_time", &tval); isp_quickboot_time = tval; From owner-svn-src-all@freebsd.org Fri Oct 23 10: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 B7126A1CDBE; Fri, 23 Oct 2015 10:02:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 4946824A; Fri, 23 Oct 2015 10:02:22 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 477701047678; Fri, 23 Oct 2015 21:02:19 +1100 (AEDT) Date: Fri, 23 Oct 2015 21:02:17 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Conrad E. Meyer" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289765 - in head/sys: conf libkern sys In-Reply-To: <201510222028.t9MKSbRu032869@repo.freebsd.org> Message-ID: <20151023200654.T1687@besplex.bde.org> References: <201510222028.t9MKSbRu032869@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=cK4dyQqN c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=CyL55EBp-NAS_l4vhTMA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 10:02:23 -0000 On Thu, 22 Oct 2015, Conrad E. Meyer wrote: > Log: > Add libkern ffsll() for parity with flsll() > > Sponsored by: EMC / Isilon Storage Division This fills a much needed gap, like the one filled by flsll(). It uses the long long abomination. uintmax_t has been Standard since 1999, but is still not supported by the ffs() family. It further expands the design error in ffs(). (ffs() only supports ints. Its behaviour on negative values is undocumented, but needs documentation more than for non-negative values because even in the 2's complement case, the sign bit can be anywhere). The bad BSD documented is for ffs() is duplicated in POSIX in at least old versions. I think this requires ffs() to operate on values, so it cannot work in the 1's complement case. The -0 has all bits 1 but value 0. ffs(-0) by value must be -1, and ABIs are probably allowed to pass -0 as +0 so ffs(-0) is probably -1 even if ffs() is by bits.) Due to this design error, it is not obvious that even u_char is directly supported by the ffs() family. It is supported because POSIX requires 8-bit chars so chars get promoted to non-negative ints when passed to ffs(). This doesn't happen for u_int, but you can promote u_int manually to long long to get correct and pessimal code. This doesn't work for u_foo that is already of larger rank than long long. > Added: head/sys/libkern/ffsll.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/libkern/ffsll.c Thu Oct 22 20:28:37 2015 (r289765) > + ... > +/* > + * Find First Set bit > + */ > +int > +ffsll(long long mask) > +{ > + int bit; > + > + if (mask == 0) > + return (0); > + for (bit = 1; !(mask & 1); bit++) > + mask = (unsigned long long)mask >> 1; > + return (bit); > +} This has the usual implementation for negative values. They are cast to the correct unsigned type to get defined behaviour for the shift. The cast itself gives implementation-defined behaviour. Even when the compiler was gcc so that it was documented in man pages and info pages, the documentation for this was hard to find. Whatever it is, it gives the undocumented behaviour of the function. This implementation is pessimal unless the compiler can convert it to special instructions. On i386, 2 32-bit ffs()'s are more portable and much faster, since each one uses a special instruction and it is not possible to do much better. (But fls64() can be done better in userland using the FPU or perhaps SSE.) clang optimizes similar simple loops for popcount() but doesn't optimize the ones used in libc for the ffs() family. If it did optimize these loops, 2 32-bit ffs()'s with asms inside them wouldn't be so good, but for bswap64() we arranged for compilers to good combining for even more complicated variations. (For bswap*, clang converts the complicated C expression giving the rearrangement to minimal bswap instruction(s), but we hard-code these instructions in asm because gcc can't do this in the old versions in FreeBSD, and then arrange so that clang can combine the asms efficiently on i386.) Efficiency of the ffs() family is rarely important. bitset.h uses ffsl() but bitstring.h uses a simple loop. Bruce From owner-svn-src-all@freebsd.org Fri Oct 23 10:05: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 9A66FA1CE1C; Fri, 23 Oct 2015 10:05:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6918E65E; Fri, 23 Oct 2015 10:05:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9NA5ich020505; Fri, 23 Oct 2015 10:05:44 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NA5hwr020494; Fri, 23 Oct 2015 10:05:43 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510231005.t9NA5hwr020494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 10:05: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: r289818 - in stable/10/sys: amd64/include conf i386/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 10:05:45 -0000 Author: avg Date: Fri Oct 23 10:05:43 2015 New Revision: 289818 URL: https://svnweb.freebsd.org/changeset/base/289818 Log: MFC r261891: provide fast versions of ffsl and flsl for i386; ffsll and flsll for amd64 Modified: stable/10/sys/amd64/include/cpufunc.h stable/10/sys/conf/files stable/10/sys/conf/files.arm stable/10/sys/conf/files.i386 stable/10/sys/conf/files.ia64 stable/10/sys/conf/files.mips stable/10/sys/conf/files.pc98 stable/10/sys/conf/files.powerpc stable/10/sys/conf/files.sparc64 stable/10/sys/i386/include/cpufunc.h Modified: stable/10/sys/amd64/include/cpufunc.h ============================================================================== --- stable/10/sys/amd64/include/cpufunc.h Fri Oct 23 08:53:32 2015 (r289817) +++ stable/10/sys/amd64/include/cpufunc.h Fri Oct 23 10:05:43 2015 (r289818) @@ -154,6 +154,14 @@ ffsl(long mask) return (mask == 0 ? mask : (int)bsfq((u_long)mask) + 1); } +#define HAVE_INLINE_FFSLL + +static __inline int +ffsll(long long mask) +{ + return (ffsl((long)mask)); +} + #define HAVE_INLINE_FLS static __inline int @@ -170,6 +178,14 @@ flsl(long mask) return (mask == 0 ? mask : (int)bsrq((u_long)mask) + 1); } +#define HAVE_INLINE_FLSLL + +static __inline int +flsll(long long mask) +{ + return (flsl((long)mask)); +} + #endif /* _KERNEL */ static __inline void Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Fri Oct 23 08:53:32 2015 (r289817) +++ stable/10/sys/conf/files Fri Oct 23 10:05:43 2015 (r289818) @@ -3219,7 +3219,6 @@ libkern/asprintf.c standard libkern/bcd.c standard libkern/bsearch.c standard libkern/crc32.c standard -libkern/flsll.c standard libkern/fnmatch.c standard libkern/iconv.c optional libiconv libkern/iconv_converter_if.m optional libiconv Modified: stable/10/sys/conf/files.arm ============================================================================== --- stable/10/sys/conf/files.arm Fri Oct 23 08:53:32 2015 (r289817) +++ stable/10/sys/conf/files.arm Fri Oct 23 10:05:43 2015 (r289818) @@ -92,6 +92,7 @@ libkern/divdi3.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +libkern/flsll.c standard libkern/lshrdi3.c standard libkern/moddi3.c standard libkern/qdivrem.c standard Modified: stable/10/sys/conf/files.i386 ============================================================================== --- stable/10/sys/conf/files.i386 Fri Oct 23 08:53:32 2015 (r289817) +++ stable/10/sys/conf/files.i386 Fri Oct 23 10:05:43 2015 (r289818) @@ -538,8 +538,7 @@ kern/imgact_aout.c optional compat_aout kern/imgact_binmisc.c optional imagact_binmisc kern/imgact_gzip.c optional gzip libkern/divdi3.c standard -libkern/ffsl.c standard -libkern/flsl.c standard +libkern/flsll.c standard libkern/memmove.c standard libkern/memset.c standard libkern/moddi3.c standard Modified: stable/10/sys/conf/files.ia64 ============================================================================== --- stable/10/sys/conf/files.ia64 Fri Oct 23 08:53:32 2015 (r289817) +++ stable/10/sys/conf/files.ia64 Fri Oct 23 10:05:43 2015 (r289818) @@ -121,6 +121,7 @@ libkern/bcmp.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +libkern/flsll.c standard libkern/ia64/__divdi3.S standard libkern/ia64/__divsi3.S standard libkern/ia64/__moddi3.S standard Modified: stable/10/sys/conf/files.mips ============================================================================== --- stable/10/sys/conf/files.mips Fri Oct 23 08:53:32 2015 (r289817) +++ stable/10/sys/conf/files.mips Fri Oct 23 10:05:43 2015 (r289818) @@ -56,6 +56,7 @@ kern/subr_dummy_vdso_tc.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +libkern/flsll.c standard libkern/memmove.c standard libkern/cmpdi2.c optional mips | mipsel libkern/ucmpdi2.c optional mips | mipsel Modified: stable/10/sys/conf/files.pc98 ============================================================================== --- stable/10/sys/conf/files.pc98 Fri Oct 23 08:53:32 2015 (r289817) +++ stable/10/sys/conf/files.pc98 Fri Oct 23 10:05:43 2015 (r289818) @@ -210,8 +210,7 @@ kern/kern_clocksource.c standard kern/imgact_aout.c optional compat_aout kern/imgact_gzip.c optional gzip libkern/divdi3.c standard -libkern/ffsl.c standard -libkern/flsl.c standard +libkern/flsll.c standard libkern/memmove.c standard libkern/memset.c standard libkern/moddi3.c standard Modified: stable/10/sys/conf/files.powerpc ============================================================================== --- stable/10/sys/conf/files.powerpc Fri Oct 23 08:53:32 2015 (r289817) +++ stable/10/sys/conf/files.powerpc Fri Oct 23 10:05:43 2015 (r289818) @@ -83,6 +83,7 @@ libkern/ffs.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +libkern/flsll.c standard libkern/lshrdi3.c optional powerpc libkern/memmove.c standard libkern/memset.c standard Modified: stable/10/sys/conf/files.sparc64 ============================================================================== --- stable/10/sys/conf/files.sparc64 Fri Oct 23 08:53:32 2015 (r289817) +++ stable/10/sys/conf/files.sparc64 Fri Oct 23 10:05:43 2015 (r289818) @@ -69,6 +69,7 @@ libkern/ffs.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +libkern/flsll.c standard libkern/memmove.c standard sparc64/central/central.c optional central sparc64/ebus/ebus.c optional ebus Modified: stable/10/sys/i386/include/cpufunc.h ============================================================================== --- stable/10/sys/i386/include/cpufunc.h Fri Oct 23 08:53:32 2015 (r289817) +++ stable/10/sys/i386/include/cpufunc.h Fri Oct 23 10:05:43 2015 (r289818) @@ -184,6 +184,14 @@ ffs(int mask) return (mask == 0 ? mask : (int)bsfl((u_int)mask) + 1); } +#define HAVE_INLINE_FFSL + +static __inline int +ffsl(long mask) +{ + return (ffs((int)mask)); +} + #define HAVE_INLINE_FLS static __inline int @@ -192,6 +200,14 @@ fls(int mask) return (mask == 0 ? mask : (int)bsrl((u_int)mask) + 1); } +#define HAVE_INLINE_FLSL + +static __inline int +flsl(long mask) +{ + return (fls((int)mask)); +} + #endif /* _KERNEL */ static __inline void From owner-svn-src-all@freebsd.org Fri Oct 23 10:19: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 D7965A1B190; Fri, 23 Oct 2015 10:19:53 +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 648D9C3A; Fri, 23 Oct 2015 10:19:52 +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 t9NAJoAS007819 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 23 Oct 2015 13:19:50 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.15.2/8.15.2/Submit) id t9NAJoxc007818; Fri, 23 Oct 2015 13:19:50 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 23 Oct 2015 13:19:50 +0300 From: Gleb Smirnoff To: Navdeep Parhar Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289633 - head/sys/ofed/include/linux Message-ID: <20151023101950.GP97830@FreeBSD.org> References: <201510201602.t9KG2BeA079785@repo.freebsd.org> <1878746.bHLk1ML9QM@ralph.baldwin.cx> <56268A5A.70103@selasky.org> <56268D43.6000209@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56268D43.6000209@gmail.com> 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: Fri, 23 Oct 2015 10:19:53 -0000 Navdeep, On Tue, Oct 20, 2015 at 11:51:47AM -0700, Navdeep Parhar wrote: N> cxgb's copy of jhash.h does have a blank line before the $FreeBSD$ tag. N> These days jenkins_hash is available in the kernel (see hash(9)) so N> there's no real need for cxgb to include this file, but I don't touch N> cxgb except for bug fixes. You can consider that a style bug :), so that you can fix it. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Fri Oct 23 10:39: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 E79BAA1B772; Fri, 23 Oct 2015 10:39:44 +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 B1F9B1864; Fri, 23 Oct 2015 10:39: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 t9NAdhI8029228; Fri, 23 Oct 2015 10:39:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NAdh2L029227; Fri, 23 Oct 2015 10:39:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510231039.t9NAdh2L029227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 23 Oct 2015 10:39:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289819 - 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, 23 Oct 2015 10:39:45 -0000 Author: mav Date: Fri Oct 23 10:39:43 2015 New Revision: 289819 URL: https://svnweb.freebsd.org/changeset/base/289819 Log: Fix LUN disable in CAM broken at r285155. MFC after: 1 week Modified: head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Fri Oct 23 10:05:43 2015 (r289818) +++ head/sys/cam/ctl/scsi_ctl.c Fri Oct 23 10:39:43 2015 (r289819) @@ -1879,7 +1879,7 @@ ctlfe_lun_disable(void *arg, int lun_id) path = lun_softc->periph->path; - if ((xpt_path_target_id(path) == 0) + if ((xpt_path_target_id(path) == softc->target_id) && (xpt_path_lun_id(path) == lun_id)) { break; } From owner-svn-src-all@freebsd.org Fri Oct 23 10:48: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 5DAD9A1B9B3; Fri, 23 Oct 2015 10:48:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D7AA1D77; Fri, 23 Oct 2015 10:48:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9NAmUuV032007; Fri, 23 Oct 2015 10:48:30 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NAmTkY031998; Fri, 23 Oct 2015 10:48:29 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510231048.t9NAmTkY031998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 10:48:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289820 - in stable/9/sys: amd64/include conf i386/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 10:48:31 -0000 Author: avg Date: Fri Oct 23 10:48:29 2015 New Revision: 289820 URL: https://svnweb.freebsd.org/changeset/base/289820 Log: MFC r261891: provide fast versions of ffsl and flsl for i386; ffsll and flsll for amd64 Modified: stable/9/sys/amd64/include/cpufunc.h stable/9/sys/conf/files.arm stable/9/sys/conf/files.i386 stable/9/sys/conf/files.ia64 stable/9/sys/conf/files.mips stable/9/sys/conf/files.pc98 stable/9/sys/conf/files.powerpc stable/9/sys/conf/files.sparc64 stable/9/sys/i386/include/cpufunc.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/amd64/include/cpufunc.h ============================================================================== --- stable/9/sys/amd64/include/cpufunc.h Fri Oct 23 10:39:43 2015 (r289819) +++ stable/9/sys/amd64/include/cpufunc.h Fri Oct 23 10:48:29 2015 (r289820) @@ -154,6 +154,14 @@ ffsl(long mask) return (mask == 0 ? mask : (int)bsfq((u_long)mask) + 1); } +#define HAVE_INLINE_FFSLL + +static __inline int +ffsll(long long mask) +{ + return (ffsl((long)mask)); +} + #define HAVE_INLINE_FLS static __inline int @@ -170,6 +178,14 @@ flsl(long mask) return (mask == 0 ? mask : (int)bsrq((u_long)mask) + 1); } +#define HAVE_INLINE_FLSLL + +static __inline int +flsll(long long mask) +{ + return (flsl((long)mask)); +} + #endif /* _KERNEL */ static __inline void Modified: stable/9/sys/conf/files.arm ============================================================================== --- stable/9/sys/conf/files.arm Fri Oct 23 10:39:43 2015 (r289819) +++ stable/9/sys/conf/files.arm Fri Oct 23 10:48:29 2015 (r289820) @@ -68,6 +68,7 @@ libkern/divdi3.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +libkern/flsll.c standard libkern/lshrdi3.c standard libkern/memchr.c optional fdt libkern/moddi3.c standard Modified: stable/9/sys/conf/files.i386 ============================================================================== --- stable/9/sys/conf/files.i386 Fri Oct 23 10:39:43 2015 (r289819) +++ stable/9/sys/conf/files.i386 Fri Oct 23 10:48:29 2015 (r289820) @@ -522,8 +522,7 @@ kern/kern_clocksource.c standard kern/imgact_aout.c optional compat_aout kern/imgact_gzip.c optional gzip libkern/divdi3.c standard -libkern/ffsl.c standard -libkern/flsl.c standard +libkern/flsll.c standard libkern/memmove.c standard libkern/memset.c standard libkern/moddi3.c standard Modified: stable/9/sys/conf/files.ia64 ============================================================================== --- stable/9/sys/conf/files.ia64 Fri Oct 23 10:39:43 2015 (r289819) +++ stable/9/sys/conf/files.ia64 Fri Oct 23 10:48:29 2015 (r289820) @@ -126,6 +126,7 @@ libkern/bcmp.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +libkern/flsll.c standard libkern/ia64/__divdi3.S standard libkern/ia64/__divsi3.S standard libkern/ia64/__moddi3.S standard Modified: stable/9/sys/conf/files.mips ============================================================================== --- stable/9/sys/conf/files.mips Fri Oct 23 10:39:43 2015 (r289819) +++ stable/9/sys/conf/files.mips Fri Oct 23 10:48:29 2015 (r289820) @@ -77,6 +77,7 @@ libkern/divdi3.c optional isa_mips32 libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +libkern/flsll.c standard libkern/lshrdi3.c standard libkern/memmove.c standard libkern/moddi3.c optional isa_mips32 Modified: stable/9/sys/conf/files.pc98 ============================================================================== --- stable/9/sys/conf/files.pc98 Fri Oct 23 10:39:43 2015 (r289819) +++ stable/9/sys/conf/files.pc98 Fri Oct 23 10:48:29 2015 (r289820) @@ -210,8 +210,7 @@ kern/kern_clocksource.c standard kern/imgact_aout.c optional compat_aout kern/imgact_gzip.c optional gzip libkern/divdi3.c standard -libkern/ffsl.c standard -libkern/flsl.c standard +libkern/flsll.c standard libkern/memmove.c standard libkern/memset.c standard libkern/moddi3.c standard Modified: stable/9/sys/conf/files.powerpc ============================================================================== --- stable/9/sys/conf/files.powerpc Fri Oct 23 10:39:43 2015 (r289819) +++ stable/9/sys/conf/files.powerpc Fri Oct 23 10:48:29 2015 (r289820) @@ -70,6 +70,7 @@ libkern/ffs.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +libkern/flsll.c standard libkern/lshrdi3.c optional powerpc libkern/memchr.c optional fdt libkern/memmove.c standard Modified: stable/9/sys/conf/files.sparc64 ============================================================================== --- stable/9/sys/conf/files.sparc64 Fri Oct 23 10:39:43 2015 (r289819) +++ stable/9/sys/conf/files.sparc64 Fri Oct 23 10:48:29 2015 (r289820) @@ -67,6 +67,7 @@ libkern/ffs.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard +libkern/flsll.c standard libkern/memmove.c standard sparc64/central/central.c optional central sparc64/ebus/ebus.c optional ebus Modified: stable/9/sys/i386/include/cpufunc.h ============================================================================== --- stable/9/sys/i386/include/cpufunc.h Fri Oct 23 10:39:43 2015 (r289819) +++ stable/9/sys/i386/include/cpufunc.h Fri Oct 23 10:48:29 2015 (r289820) @@ -184,6 +184,14 @@ ffs(int mask) return (mask == 0 ? mask : (int)bsfl((u_int)mask) + 1); } +#define HAVE_INLINE_FFSL + +static __inline int +ffsl(long mask) +{ + return (ffs((int)mask)); +} + #define HAVE_INLINE_FLS static __inline int @@ -192,6 +200,14 @@ fls(int mask) return (mask == 0 ? mask : (int)bsrl((u_int)mask) + 1); } +#define HAVE_INLINE_FLSL + +static __inline int +flsl(long mask) +{ + return (fls((int)mask)); +} + #endif /* _KERNEL */ static __inline void From owner-svn-src-all@freebsd.org Fri Oct 23 10:53: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 4D238A1BB49; Fri, 23 Oct 2015 10:53:51 +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 AC91F224; Fri, 23 Oct 2015 10:53:49 +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 t9NArlSL007997 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 23 Oct 2015 13:53:47 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.15.2/8.15.2/Submit) id t9NArln6007996; Fri, 23 Oct 2015 13:53:47 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 23 Oct 2015 13:53:47 +0300 From: Gleb Smirnoff To: Bryan Drewery Cc: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289700 - in head/sys/compat/linuxkpi: . common common/include common/include/asm common/include/linux common/src Message-ID: <20151023105347.GQ97830@FreeBSD.org> References: <201510211501.t9LF1phM000793@repo.freebsd.org> <5627AF01.8070501@FreeBSD.org> <5627B1B5.30607@selasky.org> <5627B24A.4010905@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5627B24A.4010905@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: Fri, 23 Oct 2015 10:53:51 -0000 On Wed, Oct 21, 2015 at 08:42:02AM -0700, Bryan Drewery wrote: B> >>> Log: B> >>> Start process of moving the LinuxKPI into the default kernel build by B> >>> creating an empty directory tree. B> >>> B> >>> Sponsored by: Mellanox Technologies B> >>> B> >>> Added: B> >>> head/sys/compat/linuxkpi/ B> >>> head/sys/compat/linuxkpi/common/ B> >>> head/sys/compat/linuxkpi/common/include/ B> >>> head/sys/compat/linuxkpi/common/include/asm/ B> >>> head/sys/compat/linuxkpi/common/include/linux/ B> >>> head/sys/compat/linuxkpi/common/src/ B> >>> B> >> B> >> This makes me think a branch should be used instead. B> >> B> > B> > Most of what will be done is "svn mv" out of "sys/ofed" and changing B> > some include paths in sys/modules and sys/conf . Can you explain why you B> > think a branch is required ? B> B> Because you're splitting commits up that should otherwise not be split B> up. There's no reason to commit empty directories before a 'svn mv' into B> them. +1 Any commit to head should be an atomic change that does something useful: fixes smth, adds something useful, or removes something obsoleted. You can either bring in the linuxkpi to head in a single commit, or, if you prefer to do a serie of commits, where intermediate state is rather meaningless, then you should do this serie in a separate branch, and then produce patch from the branch and commit it to head. There is no need to revert r289700. This is just a note for future. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Fri Oct 23 11:00: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 E29BDA1BCD5; Fri, 23 Oct 2015 11:00: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 B0F807F6; Fri, 23 Oct 2015 11:00:36 +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 t9NB0ZxR035357; Fri, 23 Oct 2015 11:00:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NB0ZvJ035356; Fri, 23 Oct 2015 11:00:35 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510231100.t9NB0ZvJ035356@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Oct 2015 11:00:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289821 - 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: Fri, 23 Oct 2015 11:00:37 -0000 Author: hselasky Date: Fri Oct 23 11:00:35 2015 New Revision: 289821 URL: https://svnweb.freebsd.org/changeset/base/289821 Log: Fix kernel build by restoring a temporary variable which was not yet ripe for removal. Modified: head/sys/dev/usb/wlan/if_urtwn.c Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Fri Oct 23 10:48:29 2015 (r289820) +++ head/sys/dev/usb/wlan/if_urtwn.c Fri Oct 23 11:00:35 2015 (r289821) @@ -1542,6 +1542,7 @@ urtwn_newstate(struct ieee80211vap *vap, struct urtwn_softc *sc = ic->ic_softc; struct ieee80211_node *ni; enum ieee80211_state ostate; + uint32_t reg; ostate = vap->iv_state; DPRINTF("%s -> %s\n", ieee80211_state_name[ostate], From owner-svn-src-all@freebsd.org Fri Oct 23 11: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 D27FBA1C085; Fri, 23 Oct 2015 11:11:47 +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 9A6031120; Fri, 23 Oct 2015 11:11:47 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id B022C1FE023; Fri, 23 Oct 2015 13:11:43 +0200 (CEST) Subject: Re: svn commit: r289811 - head/sys/dev/usb/wlan To: Andriy Voskoboinyk , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510230826.t9N8QQgU088757@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <562A1655.4030503@selasky.org> Date: Fri, 23 Oct 2015 13:13:25 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <201510230826.t9N8QQgU088757@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: Fri, 23 Oct 2015 11:11:47 -0000 On 10/23/15 10:26, Andriy Voskoboinyk wrote: > static int > urtwn_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) > { > @@ -1530,7 +1541,6 @@ urtwn_newstate(struct ieee80211vap *vap, > struct urtwn_softc *sc = ic->ic_softc; > struct ieee80211_node *ni; > enum ieee80211_state ostate; > - uint32_t reg; Hi Andriy, You can quickly test-build the USB kernel modules like this before commit, to avoid most cases of kernel build failures: make -m $PWD/share/mk -C sys/modules/usb/ clean cleandepend make -m $PWD/share/mk -C sys/modules/usb/ depend all make -m $PWD/share/mk -C sys/modules/usb/ clean cleandepend make -m $PWD/share/mk -C sys/modules/usb/ DEBUG_FLAGS="-DUSB_DEBUG" depend all I've simply restored a line you removed in r289811 in r289821 for now. If this was not correct or more changes should have been done, then please fix. Good luck with updating the USB WLAN drivers. --HPS From owner-svn-src-all@freebsd.org Fri Oct 23 11:15: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 AF1D2A1C251; Fri, 23 Oct 2015 11:15:29 +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 3036013CB; Fri, 23 Oct 2015 11:15:28 +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 t9NBFQjO008120 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 23 Oct 2015 14:15:26 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.15.2/8.15.2/Submit) id t9NBFQB7008119; Fri, 23 Oct 2015 14:15:26 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 23 Oct 2015 14:15:26 +0300 From: Gleb Smirnoff To: Andriy Voskoboinyk Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289762 - in head/tools/regression/net80211: ccmp tkip wep Message-ID: <20151023111526.GS97830@FreeBSD.org> References: <201510221708.t9MH8D5v062527@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201510221708.t9MH8D5v062527@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: Fri, 23 Oct 2015 11:15:29 -0000 Andriy, On Thu, Oct 22, 2015 at 05:08:13PM +0000, Andriy Voskoboinyk wrote: A> Log: A> Unbreak regression testing tools for net80211 crypto cipher modules A> A> Approved by: adrian (mentor) A> Differential Revision: https://reviews.freebsd.org/D3441 A> A> Modified: A> head/tools/regression/net80211/ccmp/test_ccmp.c A> head/tools/regression/net80211/tkip/test_tkip.c A> head/tools/regression/net80211/wep/test_wep.c A> A> Modified: head/tools/regression/net80211/ccmp/test_ccmp.c A> ============================================================================== A> --- head/tools/regression/net80211/ccmp/test_ccmp.c Thu Oct 22 16:46:30 2015 (r289761) A> +++ head/tools/regression/net80211/ccmp/test_ccmp.c Thu Oct 22 17:08:12 2015 (r289762) A> @@ -53,6 +53,7 @@ A> #include A> A> #include A> +#include A> #include What do you need if_var.h for? The change is quite long, and not obvious, so I can't find it myself. I cleansed up userland from using if_var.h recently, so I am surprised you need. In the projects/ifnet branch the if_var.h is all embraced into _KERNEL ifdef. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Fri Oct 23 11:24: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 6350CA1C5BF; Fri, 23 Oct 2015 11:24:48 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: from mail-lf0-x22b.google.com (mail-lf0-x22b.google.com [IPv6:2a00:1450:4010:c07::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 008031CF4; Fri, 23 Oct 2015 11:24:47 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: by lfbn126 with SMTP id n126so45391771lfb.2; Fri, 23 Oct 2015 04:24:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:to:cc:subject:references:date:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=4FbM/hPH1VazjCAdYF9EQFNtIZ718OriAZNxMdoS9AE=; b=bIeQ3JwJ7LGBwzVvLu3bE09x6JcoGFgDDC+5iBd5fgjUlLYWJeGSiYrdid5PDyiH13 ZrNDDh6gEQ5G5uYaDDPxrT19jIUJDzTzGoABIAu9PZmN+GKl/n/UWaSCm4s6N+kDk0/e jEWrp1b6f7CtsxRxi2aABhlmlk+HT/1rBHerjcebueoR2pjUrCl5Ipe6w7VyqiUEAk34 7wY5d0PJiNWDnlegjoe+5frtwd8rUZjHjR+zxP3wrd8OKSRRCw82qLczYl14Kp6qq4jk 2sndL2T669rPafhEnX/xWCNrZwEnkXN0fl1e3ktT48VhSJwFkp62WlnM5G3eOjzZdkml i5yA== X-Received: by 10.112.63.67 with SMTP id e3mr10844340lbs.92.1445599486119; Fri, 23 Oct 2015 04:24:46 -0700 (PDT) Received: from localhost (host-176-37-109-22.la.net.ua. [176.37.109.22]) by smtp.gmail.com with ESMTPSA id wj8sm3158352lbb.44.2015.10.23.04.24.45 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 23 Oct 2015 04:24:45 -0700 (PDT) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Gleb Smirnoff" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289762 - in head/tools/regression/net80211: ccmp tkip wep References: <201510221708.t9MH8D5v062527@repo.freebsd.org> <20151023111526.GS97830@FreeBSD.org> Date: Fri, 23 Oct 2015 14:24:44 +0300 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Andriy Voskoboinyk" Message-ID: In-Reply-To: <20151023111526.GS97830@FreeBSD.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 11:24:48 -0000 > Andriy, > > On Thu, Oct 22, 2015 at 05:08:13PM +0000, Andriy Voskoboinyk wrote: > A> Log: > A> Unbreak regression testing tools for net80211 crypto cipher modules > A> > A> Approved by: adrian (mentor) > A> Differential Revision: https://reviews.freebsd.org/D3441 > A> > A> Modified: > A> head/tools/regression/net80211/ccmp/test_ccmp.c > A> head/tools/regression/net80211/tkip/test_tkip.c > A> head/tools/regression/net80211/wep/test_wep.c > A> > A> Modified: head/tools/regression/net80211/ccmp/test_ccmp.c > A> > ============================================================================== > A> --- head/tools/regression/net80211/ccmp/test_ccmp.c Thu Oct 22 > 16:46:30 2015 (r289761) > A> +++ head/tools/regression/net80211/ccmp/test_ccmp.c Thu Oct 22 > 17:08:12 2015 (r289762) > A> @@ -53,6 +53,7 @@ > A> #include > A> > A> #include > A> +#include > A> #include > > What do you need if_var.h for? The change is quite long, and not obvious, > so I can't find it myself. > > I cleansed up userland from using if_var.h recently, so I am surprised > you need. > > In the projects/ifnet branch the if_var.h is all embraced into _KERNEL > ifdef. > This is not userland (every folder contains one source file for one kernel module). From owner-svn-src-all@freebsd.org Fri Oct 23 11:36: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 BE459A1C8D6; Fri, 23 Oct 2015 11:36:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 6550A3A7; Fri, 23 Oct 2015 11:36:12 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA09712; Fri, 23 Oct 2015 14:36:11 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Zpadn-000A2q-2K; Fri, 23 Oct 2015 14:36:11 +0300 Subject: Re: svn commit: r289457 - head/sys/x86/x86 To: "Jason A. Harmening" , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201510171458.t9HEwtYS067933@repo.freebsd.org> From: Andriy Gapon X-Enigmail-Draft-Status: N1110 Message-ID: <562A1B73.5040205@FreeBSD.org> Date: Fri, 23 Oct 2015 14:35:15 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510171458.t9HEwtYS067933@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 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: Fri, 23 Oct 2015 11:36:14 -0000 On 17/10/2015 17:58, Jason A. Harmening wrote: > Author: jah > Date: Sat Oct 17 14:58:55 2015 > New Revision: 289457 > URL: https://svnweb.freebsd.org/changeset/base/289457 > > Log: > Don't page-align the physical address when calling PHYS_TO_VM_PAGE(). > > M busdma_bounce.c > > Modified: > head/sys/x86/x86/busdma_bounce.c > > Modified: head/sys/x86/x86/busdma_bounce.c > ============================================================================== > --- head/sys/x86/x86/busdma_bounce.c Sat Oct 17 14:48:39 2015 (r289456) > +++ head/sys/x86/x86/busdma_bounce.c Sat Oct 17 14:58:55 2015 (r289457) > @@ -1006,7 +1006,8 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ > bpage->busaddr |= addr & PAGE_MASK; > } > bpage->datavaddr = vaddr; > - bpage->datapage = PHYS_TO_VM_PAGE(addr & ~PAGE_MASK); > + /* PHYS_TO_VM_PAGE() will truncate unaligned addresses. */ > + bpage->datapage = PHYS_TO_VM_PAGE(addr); > bpage->dataoffs = addr & PAGE_MASK; > bpage->datacount = size; > STAILQ_INSERT_TAIL(&(map->bpages), bpage, links); > I agree with the essence of the change - applying the page mask was completely redundant. But I do not agree with the comment. I know what you want say there, but what the comment is actually saying is more confusing than having no comment at all (IMO, of course). Consider this description of PHYS_TO_VM_PAGE: PHYS_TO_VM_PAGE() returns a vm_page_t object that represents a memory page to which the given physical address belongs. Why is the truncation needed? What does it do? What's the problem with unaligned addresses? It looks like the comment talks about a (possible) minor implementation detail of PHYS_TO_VM_PAGE(). It seems that the comment has proliferated into more code since this commit. P.S. It would be better, of course, if PHYS_TO_VM_PAGE had a manual page or at least a comment near its declaration. -- Andriy Gapon From owner-svn-src-all@freebsd.org Fri Oct 23 11:41: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 AB5BEA1CA55; Fri, 23 Oct 2015 11:41:56 +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 7898EB11; Fri, 23 Oct 2015 11:41:56 +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 t9NBfttV049341; Fri, 23 Oct 2015 11:41:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NBftVi049340; Fri, 23 Oct 2015 11:41:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510231141.t9NBftVi049340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 23 Oct 2015 11:41:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289822 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 11:41:56 -0000 Author: kib Date: Fri Oct 23 11:41:55 2015 New Revision: 289822 URL: https://svnweb.freebsd.org/changeset/base/289822 Log: Fix build for the KTR-enabled kernels. Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/linux/linux_misc.c Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Fri Oct 23 11:00:35 2015 (r289821) +++ head/sys/compat/linux/linux_misc.c Fri Oct 23 11:41:55 2015 (r289822) @@ -2356,7 +2356,13 @@ linux_ppoll(struct thread *td, struct li #if defined(DEBUG) || defined(KTR) /* XXX: can be removed when every ldebug(...) and KTR stuff are removed. */ -u_char linux_debug_map[howmany(LINUX_SYS_MAXSYSCALL, sizeof(u_char))]; +#ifdef COMPAT_LINUX32 +#define L_MAXSYSCALL LINUX32_SYS_MAXSYSCALL +#else +#define L_MAXSYSCALL LINUX_SYS_MAXSYSCALL +#endif + +u_char linux_debug_map[howmany(L_MAXSYSCALL, sizeof(u_char))]; static int linux_debug(int syscall, int toggle, int global) @@ -2368,7 +2374,7 @@ linux_debug(int syscall, int toggle, int memset(linux_debug_map, c, sizeof(linux_debug_map)); return (0); } - if (syscall < 0 || syscall >= LINUX_SYS_MAXSYSCALL) + if (syscall < 0 || syscall >= L_MAXSYSCALL) return (EINVAL); if (toggle) clrbit(linux_debug_map, syscall); @@ -2376,6 +2382,7 @@ linux_debug(int syscall, int toggle, int setbit(linux_debug_map, syscall); return (0); } +#undef L_MAXSYSCALL /* * Usage: sysctl linux.debug=.<0/1> From owner-svn-src-all@freebsd.org Fri Oct 23 11:43: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 AC766A1CBE9; Fri, 23 Oct 2015 11:43:57 +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 78486D4B; Fri, 23 Oct 2015 11:43:57 +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 t9NBhurH050064; Fri, 23 Oct 2015 11:43:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NBhuhC050063; Fri, 23 Oct 2015 11:43:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510231143.t9NBhuhC050063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 23 Oct 2015 11:43:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289823 - 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: Fri, 23 Oct 2015 11:43:57 -0000 Author: kib Date: Fri Oct 23 11:43:56 2015 New Revision: 289823 URL: https://svnweb.freebsd.org/changeset/base/289823 Log: Decode new values for CPUID leaf 2 cache and TLB descriptors, from the Intel SDM revision 56. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/x86/identcpu.c Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Fri Oct 23 11:41:55 2015 (r289822) +++ head/sys/x86/x86/identcpu.c Fri Oct 23 11:43:56 2015 (r289823) @@ -1883,6 +1883,18 @@ print_INTEL_TLB(u_int data) case 0x68: printf("1st-level data cache: 32 KB, 4 way set associative, sectored cache, 64 byte line size\n"); break; + case 0x6a: + printf("uTLB: 4KByte pages, 8-way set associative, 64 entries\n"); + break; + case 0x6b: + 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"); + break; + case 0x6d: + printf("DTLB: 1 GByte pages, fully associative, 16 entries\n"); + break; case 0x70: printf("Trace cache: 12K-uops, 8-way set associative\n"); break; From owner-svn-src-all@freebsd.org Fri Oct 23 11:45: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 942D6A1CC4B; Fri, 23 Oct 2015 11:45:39 +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 5F621EBE; Fri, 23 Oct 2015 11:45:39 +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 t9NBjcdp050186; Fri, 23 Oct 2015 11:45:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NBjcrP050184; Fri, 23 Oct 2015 11:45:38 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510231145.t9NBjcrP050184@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 23 Oct 2015 11:45:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289824 - in head/sys: amd64/include i386/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, 23 Oct 2015 11:45:39 -0000 Author: kib Date: Fri Oct 23 11:45:38 2015 New Revision: 289824 URL: https://svnweb.freebsd.org/changeset/base/289824 Log: Add CLFLUSHOPT instruction wrappers. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/include/cpufunc.h head/sys/i386/include/cpufunc.h Modified: head/sys/amd64/include/cpufunc.h ============================================================================== --- head/sys/amd64/include/cpufunc.h Fri Oct 23 11:43:56 2015 (r289823) +++ head/sys/amd64/include/cpufunc.h Fri Oct 23 11:45:38 2015 (r289824) @@ -107,6 +107,13 @@ clflush(u_long addr) } static __inline void +clflushopt(u_long addr) +{ + + __asm __volatile(".byte 0x66;clflush %0" : : "m" (*(char *)addr)); +} + +static __inline void clts(void) { Modified: head/sys/i386/include/cpufunc.h ============================================================================== --- head/sys/i386/include/cpufunc.h Fri Oct 23 11:43:56 2015 (r289823) +++ head/sys/i386/include/cpufunc.h Fri Oct 23 11:45:38 2015 (r289824) @@ -86,6 +86,13 @@ clflush(u_long addr) } static __inline void +clflushopt(u_long addr) +{ + + __asm __volatile(".byte 66;clflush %0" : : "m" (*(char *)addr)); +} + +static __inline void clts(void) { From owner-svn-src-all@freebsd.org Fri Oct 23 12: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 6A56CA1C843; Fri, 23 Oct 2015 12:03:27 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 444271D5E; Fri, 23 Oct 2015 12:03:27 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9NC3Q9M056047; Fri, 23 Oct 2015 12:03:26 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NC3Pge056042; Fri, 23 Oct 2015 12:03:25 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201510231203.t9NC3Pge056042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Fri, 23 Oct 2015 12:03:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289825 - in head/sys: arm/arm arm64/arm64 vm 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: Fri, 23 Oct 2015 12:03:27 -0000 Author: jah Date: Fri Oct 23 12:03:25 2015 New Revision: 289825 URL: https://svnweb.freebsd.org/changeset/base/289825 Log: Remove unclear comment about address truncation in busdma. Add (hopefully much clearer) comment at declaration of PHYS_TO_VM_PAGE(). Noted by: avg 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/vm/vm_page.h head/sys/x86/x86/busdma_bounce.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Fri Oct 23 11:45:38 2015 (r289824) +++ head/sys/arm/arm/busdma_machdep-v6.c Fri Oct 23 12:03:25 2015 (r289825) @@ -1089,10 +1089,6 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat sl++; sl->vaddr = 0; sl->datacount = sgsize; - /* - * PHYS_TO_VM_PAGE() will truncate - * unaligned addresses. - */ sl->pages = PHYS_TO_VM_PAGE(curaddr); sl->dataoffs = curaddr & PAGE_MASK; } else @@ -1214,10 +1210,6 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm sl++; sl->vaddr = kvaddr; sl->datacount = sgsize; - /* - * PHYS_TO_VM_PAGE() will truncate - * unaligned addresses. - */ sl->pages = PHYS_TO_VM_PAGE(curaddr); sl->dataoffs = curaddr & PAGE_MASK; } else @@ -1687,7 +1679,6 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ bpage->busaddr |= addr & PAGE_MASK; } bpage->datavaddr = vaddr; - /* PHYS_TO_VM_PAGE() will truncate unaligned addresses. */ bpage->datapage = PHYS_TO_VM_PAGE(addr); bpage->dataoffs = addr & PAGE_MASK; bpage->datacount = size; Modified: head/sys/arm/arm/busdma_machdep.c ============================================================================== --- head/sys/arm/arm/busdma_machdep.c Fri Oct 23 11:45:38 2015 (r289824) +++ head/sys/arm/arm/busdma_machdep.c Fri Oct 23 12:03:25 2015 (r289825) @@ -993,10 +993,6 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat sl++; sl->vaddr = 0; sl->datacount = sgsize; - /* - * PHYS_TO_VM_PAGE() will truncate - * unaligned addresses. - */ sl->pages = PHYS_TO_VM_PAGE(curaddr); sl->dataoffs = curaddr & PAGE_MASK; } else @@ -1108,10 +1104,6 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm sl++; sl->vaddr = kvaddr; sl->datacount = sgsize; - /* - * PHYS_TO_VM_PAGE() will truncate - * unaligned addresses. - */ sl->pages = PHYS_TO_VM_PAGE(curaddr); sl->dataoffs = curaddr & PAGE_MASK; } else @@ -1541,7 +1533,6 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ bpage->busaddr |= addr & PAGE_MASK; } bpage->datavaddr = vaddr; - /* PHYS_TO_VM_PAGE() will truncate unaligned addresses. */ bpage->datapage = PHYS_TO_VM_PAGE(addr); bpage->dataoffs = addr & PAGE_MASK; bpage->datacount = size; Modified: head/sys/arm64/arm64/busdma_bounce.c ============================================================================== --- head/sys/arm64/arm64/busdma_bounce.c Fri Oct 23 11:45:38 2015 (r289824) +++ head/sys/arm64/arm64/busdma_bounce.c Fri Oct 23 12:03:25 2015 (r289825) @@ -1009,7 +1009,6 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ bpage->busaddr |= addr & PAGE_MASK; } bpage->datavaddr = vaddr; - /* PHYS_TO_VM_PAGE() will truncate unaligned addresses. */ bpage->datapage = PHYS_TO_VM_PAGE(addr); bpage->dataoffs = addr & PAGE_MASK; bpage->datacount = size; Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Fri Oct 23 11:45:38 2015 (r289824) +++ head/sys/vm/vm_page.h Fri Oct 23 12:03:25 2015 (r289825) @@ -375,6 +375,11 @@ extern long first_page; /* first physi #define VM_PAGE_TO_PHYS(entry) ((entry)->phys_addr) +/* + * PHYS_TO_VM_PAGE() Returns the vm_page_t object that represents a memory + * page to which the given physical address belongs. The correct vm_page_t + * object is returned for addresses that are not page-aligned. + */ vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); /* Modified: head/sys/x86/x86/busdma_bounce.c ============================================================================== --- head/sys/x86/x86/busdma_bounce.c Fri Oct 23 11:45:38 2015 (r289824) +++ head/sys/x86/x86/busdma_bounce.c Fri Oct 23 12:03:25 2015 (r289825) @@ -1006,7 +1006,6 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ bpage->busaddr |= addr & PAGE_MASK; } bpage->datavaddr = vaddr; - /* PHYS_TO_VM_PAGE() will truncate unaligned addresses. */ bpage->datapage = PHYS_TO_VM_PAGE(addr); bpage->dataoffs = addr & PAGE_MASK; bpage->datacount = size; From owner-svn-src-all@freebsd.org Fri Oct 23 12:06: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 25C02A1C943; Fri, 23 Oct 2015 12:06:08 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4E731FCB; Fri, 23 Oct 2015 12:06:07 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9NC66HC056187; Fri, 23 Oct 2015 12:06:06 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NC6602056186; Fri, 23 Oct 2015 12:06:06 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201510231206.t9NC6602056186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Fri, 23 Oct 2015 12:06:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289826 - 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, 23 Oct 2015 12:06:08 -0000 Author: jah Date: Fri Oct 23 12:06:06 2015 New Revision: 289826 URL: https://svnweb.freebsd.org/changeset/base/289826 Log: Fix capitalization Modified: head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Fri Oct 23 12:03:25 2015 (r289825) +++ head/sys/vm/vm_page.h Fri Oct 23 12:06:06 2015 (r289826) @@ -376,7 +376,7 @@ extern long first_page; /* first physi #define VM_PAGE_TO_PHYS(entry) ((entry)->phys_addr) /* - * PHYS_TO_VM_PAGE() Returns the vm_page_t object that represents a memory + * PHYS_TO_VM_PAGE() returns the vm_page_t object that represents a memory * page to which the given physical address belongs. The correct vm_page_t * object is returned for addresses that are not page-aligned. */ From owner-svn-src-all@freebsd.org Fri Oct 23 12:20: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 2BF2CA1CD32; Fri, 23 Oct 2015 12:20:37 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFE4DA48; Fri, 23 Oct 2015 12:20:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9NCKZLS059280; Fri, 23 Oct 2015 12:20:35 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NCKZJF059279; Fri, 23 Oct 2015 12:20:35 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510231220.t9NCKZJF059279@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 12:20:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289827 - 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: Fri, 23 Oct 2015 12:20:37 -0000 Author: avg Date: Fri Oct 23 12:20:35 2015 New Revision: 289827 URL: https://svnweb.freebsd.org/changeset/base/289827 Log: mergeinfo for r289818 (MFC r261891 ...) Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-all@freebsd.org Fri Oct 23 12:23: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 F0195A1CEDE; Fri, 23 Oct 2015 12:23:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 95D9FE48; Fri, 23 Oct 2015 12:23:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA10400; Fri, 23 Oct 2015 15:23:53 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ZpbNx-000A6t-6v; Fri, 23 Oct 2015 15:23:53 +0300 Subject: Re: svn commit: r289825 - in head/sys: arm/arm arm64/arm64 vm x86/x86 To: "Jason A. Harmening" , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201510231203.t9NC3Pge056042@repo.freebsd.org> From: Andriy Gapon Message-ID: <562A26A1.4080103@FreeBSD.org> Date: Fri, 23 Oct 2015 15:22:57 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510231203.t9NC3Pge056042@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 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: Fri, 23 Oct 2015 12:23:57 -0000 On 23/10/2015 15:03, Jason A. Harmening wrote: > Author: jah > Date: Fri Oct 23 12:03:25 2015 > New Revision: 289825 > URL: https://svnweb.freebsd.org/changeset/base/289825 > > Log: > Remove unclear comment about address truncation in busdma. Add (hopefully much clearer) comment at declaration of PHYS_TO_VM_PAGE(). > > Noted by: avg Thank you very much! That was very fast :-) -- Andriy Gapon From owner-svn-src-all@freebsd.org Fri Oct 23 12:59: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 018C9A1D71A; Fri, 23 Oct 2015 12:59:56 +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 B2BAF9BA; Fri, 23 Oct 2015 12:59:55 +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 t9NCxsmA071456; Fri, 23 Oct 2015 12:59:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NCxsC3071455; Fri, 23 Oct 2015 12:59:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510231259.t9NCxsC3071455@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 23 Oct 2015 12:59:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289828 - head/sys/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 12:59:56 -0000 Author: emaste Date: Fri Oct 23 12:59:54 2015 New Revision: 289828 URL: https://svnweb.freebsd.org/changeset/base/289828 Log: Move dtrace/opensolaris/zfs module option to common section These are not target-specific modules, so the logic to build them should be common. This also enables them for arm64. Sponsored by: The FreeBSD Foundation Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Fri Oct 23 12:20:35 2015 (r289827) +++ head/sys/modules/Makefile Fri Oct 23 12:59:54 2015 (r289828) @@ -98,7 +98,6 @@ SUBDIR= \ ${_dpt} \ ${_drm} \ ${_drm2} \ - ${_dtrace} \ dummynet \ ${_ed} \ ${_elink} \ @@ -268,7 +267,6 @@ SUBDIR= \ ${_nvme} \ ${_nvram} \ ${_nxge} \ - ${_opensolaris} \ oce \ otus \ otusfw \ @@ -394,13 +392,20 @@ SUBDIR= \ ${_x86bios} \ ${_xe} \ xl \ - ${_zfs} \ zlib .if ${MK_AUTOFS} != "no" || defined(ALL_MODULES) _autofs= autofs .endif +.if ${MK_CDDL} != "no" || defined(ALL_MODULES) +.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" && \ + ${MACHINE_CPUARCH} != "sparc64" +SUBDIR+= dtrace +.endif +SUBDIR+= opensolaris +.endif + .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) .if exists(${.CURDIR}/../opencrypto) _crypto= crypto @@ -479,6 +484,10 @@ _txp= txp _cxgbe= cxgbe .endif +.if ${MK_ZFS} != "no" || defined(ALL_MODULES) +SUBDIR+= zfs +.endif + .if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \ ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "powerpc" _syscons= syscons @@ -509,9 +518,6 @@ _cs= cs _dpms= dpms _drm= drm _drm2= drm2 -.if ${MK_CDDL} != "no" || defined(ALL_MODULES) -_dtrace= dtrace -.endif _ed= ed _em= em _ep= ep @@ -537,9 +543,6 @@ _linux= linux _linuxkpi= linuxkpi .endif _ndis= ndis -.if ${MK_CDDL} != "no" || defined(ALL_MODULES) -_opensolaris= opensolaris -.endif _pccard= pccard .if ${MK_OFED} != "no" || defined(ALL_MODULES) _rdma= rdma @@ -555,9 +558,6 @@ _vxge= vxge _wbwd= wbwd _wi= wi _xe= xe -.if ${MK_ZFS} != "no" || defined(ALL_MODULES) -_zfs= zfs -.endif .if ${MACHINE} != "pc98" _aac= aac _aacraid= aacraid @@ -716,23 +716,14 @@ _cbb= cbb _cfi= cfi _cpufreq= cpufreq _drm= drm -.if ${MK_CDDL} != "no" || defined(ALL_MODULES) -_dtrace= dtrace -.endif _exca= exca _nvram= powermac_nvram -.if ${MK_CDDL} != "no" || defined(ALL_MODULES) -_opensolaris= opensolaris -.endif _pccard= pccard _wi= wi .endif .if ${MACHINE_ARCH} == "powerpc64" _drm2= drm2 -.if ${MK_ZFS} != "no" || defined(ALL_MODULES) -_zfs= zfs -.endif .endif .if ${MACHINE_CPUARCH} == "sparc64" @@ -740,12 +731,6 @@ _auxio= auxio _em= em _epic= epic _igb= igb -.if ${MK_CDDL} != "no" || defined(ALL_MODULES) -_opensolaris= opensolaris -.endif -.if ${MK_ZFS} != "no" || defined(ALL_MODULES) -_zfs= zfs -.endif .endif .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" From owner-svn-src-all@freebsd.org Fri Oct 23 14:25: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 A7FDAA1D6E9 for ; Fri, 23 Oct 2015 14:25:54 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83641155B for ; Fri, 23 Oct 2015 14:25:54 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound1.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Fri, 23 Oct 2015 14:26:07 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t9NEPpNb021237; Fri, 23 Oct 2015 08:25:51 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1445610351.91534.1.camel@freebsd.org> Subject: Re: svn commit: r289778 - head/share/mk From: Ian Lepore To: Bryan Drewery Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Fri, 23 Oct 2015 08:25:51 -0600 In-Reply-To: <6847681E-3E85-40B9-BF9D-2FF4C6DE4AC9@FreeBSD.org> References: <201510222341.t9MNfuNK007465@repo.freebsd.org> <1445558386.14963.38.camel@freebsd.org> <232D9171-D360-4110-8682-6B371D9F9CAC@FreeBSD.org> <6847681E-3E85-40B9-BF9D-2FF4C6DE4AC9@FreeBSD.org> 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: Fri, 23 Oct 2015 14:25:54 -0000 On Thu, 2015-10-22 at 17:21 -0700, Bryan Drewery wrote: > > On Oct 22, 2015, at 17:18, Bryan Drewery > > wrote: > > > > > > > > > > On Oct 22, 2015, at 16:59, Ian Lepore wrote: > > > > > > > > On Thu, 2015-10-22 at 23:41 +0000, Bryan Drewery wrote: > > > > Author: bdrewery > > > > Date: Thu Oct 22 23:41:56 2015 > > > > New Revision: 289778 > > > > URL: https://svnweb.freebsd.org/changeset/base/289778 > > > > > > > > Log: > > > > For SUBDIR_PARALLEL, when doing 'make clean*' or 'make obj' > > > > there > > > > is no need to > > > > respect SUBDIR_DEPEND_* or .WAIT. > > > > > > > > MFC after: 2 weeks > > > > Sponsored by: EMC / Isilon Storage Division > > > > > > This doesn't feel so safe. People override these targets and do > > > who > > > -knows-what with them. The clean* seems especially risky since > > > it will > > > match targets in end-user makefiles that you don't even know > > > about. > > I can also not apply to SUBDIR_TARGETS which is the user-defined > targets list. (Misspelled and should be LOCAL_SUBDIR_TARGETS) > That might be a good idea. When I grepped our devel/mk directory, SUBDIR_TARGETS was where I saw a number of things that would match clean* (I didn't look into exactly what they do). -- Ian > > > > > > -- Ian > > > > I can limit it to src tree builds if you want. > > > > I cannot imagine any situation where "clean" depends on > > another directory going first. > > > > Similarly it makes sense to always build subdirs in parallel with > > 'obj' and I would argue 'clean*' too, regardless of > > SUBDIR_PARALLEL. I only just realized that. Yes there are mkdir -p > > and rm -f races, but we have not added any dependencies because of > > these as is. > > From owner-svn-src-all@freebsd.org Fri Oct 23 14:26: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 5EEE9A1D711; Fri, 23 Oct 2015 14:26:08 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25F6017B0; Fri, 23 Oct 2015 14:26:08 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9NEQ73g097638; Fri, 23 Oct 2015 14:26:07 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NEQ79f097636; Fri, 23 Oct 2015 14:26:07 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201510231426.t9NEQ79f097636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Fri, 23 Oct 2015 14:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r289829 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 14:26:08 -0000 Author: rpaulo Date: Fri Oct 23 14:26:06 2015 New Revision: 289829 URL: https://svnweb.freebsd.org/changeset/base/289829 Log: Please welcome Kurt Lidl to the rank of src committers. Adrian is also mentoring. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Fri Oct 23 12:59:54 2015 (r289828) +++ svnadmin/conf/access Fri Oct 23 14:26:06 2015 (r289829) @@ -142,6 +142,7 @@ kevlo kib kp kuriyama +lidl loos lstewart luigi Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Fri Oct 23 12:59:54 2015 (r289828) +++ svnadmin/conf/mentors Fri Oct 23 14:26:06 2015 (r289829) @@ -31,6 +31,7 @@ monthadar adrian peterj jhb Co-mentor: grog slm ken Co-mentor: scottl, ambrisko snb dwmalone +lidl rpaulo Co-mentor: adrian torek rpaulo venkat delphij Co-mentor: luigi, jhb versus gavin Co-mentor: fjoe From owner-svn-src-all@freebsd.org Fri Oct 23 14:52: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 ED85CA1DCA0; Fri, 23 Oct 2015 14:52:06 +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 B0DA3375; Fri, 23 Oct 2015 14:52:06 +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 t9NEq5Yu005722; Fri, 23 Oct 2015 14:52:05 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NEq5LP005721; Fri, 23 Oct 2015 14:52:05 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510231452.t9NEq5LP005721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 23 Oct 2015 14:52:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289830 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 14:52:07 -0000 Author: hselasky Date: Fri Oct 23 14:52:05 2015 New Revision: 289830 URL: https://svnweb.freebsd.org/changeset/base/289830 Log: Build fix for non-i386 and non-amd64 platforms. Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/linux_compat.c Modified: head/sys/ofed/include/linux/linux_compat.c ============================================================================== --- head/sys/ofed/include/linux/linux_compat.c Fri Oct 23 14:26:06 2015 (r289829) +++ head/sys/ofed/include/linux/linux_compat.c Fri Oct 23 14:52:05 2015 (r289830) @@ -663,7 +663,11 @@ _ioremap_attr(vm_paddr_t phys_addr, unsi { void *addr; +#if defined(__i386__) || defined(__amd64__) addr = pmap_mapdev_attr(phys_addr, size, attr); +#else + addr = NULL; +#endif if (addr == NULL) return (NULL); vmmap_add(addr, size); @@ -679,7 +683,9 @@ iounmap(void *addr) vmmap = vmmap_remove(addr); if (vmmap == NULL) return; +#if defined(__i386__) || defined(__amd64__) pmap_unmapdev((vm_offset_t)addr, vmmap->vm_size); +#endif kfree(vmmap); } From owner-svn-src-all@freebsd.org Fri Oct 23 15:08: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 D55E6A1DF2D; Fri, 23 Oct 2015 15:08:17 +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 A422ECFF; Fri, 23 Oct 2015 15:08:17 +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 t9NF8Ghl009431; Fri, 23 Oct 2015 15:08:16 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NF8GQp009429; Fri, 23 Oct 2015 15:08:16 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510231508.t9NF8GQp009429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Fri, 23 Oct 2015 15:08:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289831 - 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: Fri, 23 Oct 2015 15:08:18 -0000 Author: cem Date: Fri Oct 23 15:08:16 2015 New Revision: 289831 URL: https://svnweb.freebsd.org/changeset/base/289831 Log: sysctl(9): Document U8/U16 types from r289773 Suggested by: ngie Sponsored by: EMC / Isilon Storage Division Modified: head/share/man/man9/Makefile head/share/man/man9/sysctl.9 Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Fri Oct 23 14:52:05 2015 (r289830) +++ head/share/man/man9/Makefile Fri Oct 23 15:08:16 2015 (r289831) @@ -1629,6 +1629,8 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \ sysctl.9 SYSCTL_ADD_ROOT_NODE.9 \ sysctl.9 SYSCTL_ADD_STRING.9 \ sysctl.9 SYSCTL_ADD_STRUCT.9 \ + sysctl.9 SYSCTL_ADD_U8.9 \ + sysctl.9 SYSCTL_ADD_U16.9 \ sysctl.9 SYSCTL_ADD_UAUTO.9 \ sysctl.9 SYSCTL_ADD_UINT.9 \ sysctl.9 SYSCTL_ADD_ULONG.9 \ @@ -1646,6 +1648,8 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \ sysctl.9 SYSCTL_ROOT_NODE.9 \ sysctl.9 SYSCTL_STRING.9 \ sysctl.9 SYSCTL_STRUCT.9 \ + sysctl.9 SYSCTL_U8.9 \ + sysctl.9 SYSCTL_U16.9 \ sysctl.9 SYSCTL_UINT.9 \ sysctl.9 SYSCTL_ULONG.9 \ sysctl.9 SYSCTL_UQUAD.9 Modified: head/share/man/man9/sysctl.9 ============================================================================== --- head/share/man/man9/sysctl.9 Fri Oct 23 14:52:05 2015 (r289830) +++ head/share/man/man9/sysctl.9 Fri Oct 23 15:08:16 2015 (r289831) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 20, 2014 +.Dd October 23, 2015 .Dt SYSCTL 9 .Os .Sh NAME @@ -39,6 +39,8 @@ .Nm SYSCTL_ADD_ROOT_NODE , .Nm SYSCTL_ADD_STRING , .Nm SYSCTL_ADD_STRUCT , +.Nm SYSCTL_ADD_U8 , +.Nm SYSCTL_ADD_U16 , .Nm SYSCTL_ADD_UAUTO , .Nm SYSCTL_ADD_UINT , .Nm SYSCTL_ADD_ULONG , @@ -56,6 +58,8 @@ .Nm SYSCTL_ROOT_NODE , .Nm SYSCTL_STRING , .Nm SYSCTL_STRUCT , +.Nm SYSCTL_U8 , +.Nm SYSCTL_U16 , .Nm SYSCTL_UINT , .Nm SYSCTL_ULONG , .Nm SYSCTL_UQUAD @@ -162,6 +166,28 @@ .Fa "const char *descr" .Fc .Ft struct sysctl_oid * +.Fo SYSCTL_ADD_U8 +.Fa "struct sysctl_ctx_list *ctx" +.Fa "struct sysctl_oid_list *parent" +.Fa "int number" +.Fa "const char *name" +.Fa "int ctlflags" +.Fa "unsigned int *ptr" +.Fa "intptr_t val" +.Fa "const char *descr" +.Fc +.Ft struct sysctl_oid * +.Fo SYSCTL_ADD_U16 +.Fa "struct sysctl_ctx_list *ctx" +.Fa "struct sysctl_oid_list *parent" +.Fa "int number" +.Fa "const char *name" +.Fa "int ctlflags" +.Fa "unsigned int *ptr" +.Fa "intptr_t val" +.Fa "const char *descr" +.Fc +.Ft struct sysctl_oid * .Fo SYSCTL_ADD_UINT .Fa "struct sysctl_ctx_list *ctx" .Fa "struct sysctl_oid_list *parent" @@ -228,6 +254,8 @@ .Fn SYSCTL_STRING parent number name ctlflags arg len descr .Fn SYSCTL_STRUCT parent number name ctlflags ptr struct_type descr .Fn SYSCTL_ROOT_NODE number name ctlflags handler descr +.Fn SYSCTL_U8 parent number name ctlflags ptr val descr +.Fn SYSCTL_U16 parent number name ctlflags ptr val descr .Fn SYSCTL_UINT parent number name ctlflags ptr val descr .Fn SYSCTL_ULONG parent number name ctlflags ptr val descr .Fn SYSCTL_UQUAD parent number name ctlflags ptr val descr @@ -413,6 +441,8 @@ Static sysctls are declared using one of .Fn SYSCTL_ROOT_NODE , .Fn SYSCTL_STRING , .Fn SYSCTL_STRUCT , +.Fn SYSCTL_U8 , +.Fn SYSCTL_U16 , .Fn SYSCTL_UINT , .Fn SYSCTL_ULONG or @@ -429,6 +459,8 @@ Dynamic nodes are created using one of t .Fn SYSCTL_ADD_ROOT_NODE , .Fn SYSCTL_ADD_STRING , .Fn SYSCTL_ADD_STRUCT , +.Fn SYSCTL_ADD_U8 , +.Fn SYSCTL_ADD_U16 , .Fn SYSCTL_ADD_UAUTO , .Fn SYSCTL_ADD_UINT , .Fn SYSCTL_ADD_ULONG , @@ -459,6 +491,10 @@ This is an opaque data structure. .It Dv CTLTYPE_STRUCT Alias for .Dv CTLTYPE_OPAQUE . +.It Dv CTLTYPE_U8 +This is an 8-bit unsigned integer. +.It Dv CTLTYPE_U16 +This is a 16-bit unsigned integer. .It Dv CTLTYPE_UINT This is an unsigned integer. .It Dv CTLTYPE_LONG From owner-svn-src-all@freebsd.org Fri Oct 23 15: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 69B56A1DFD8; Fri, 23 Oct 2015 15:09:37 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f182.google.com (mail-yk0-f182.google.com [209.85.160.182]) (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 2B963EFF; Fri, 23 Oct 2015 15:09:36 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykdr3 with SMTP id r3so122726211ykd.1; Fri, 23 Oct 2015 08:09:35 -0700 (PDT) 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=4Ts8mW+bupb4bLU6ZA4WpSotVTNb60UR66uIysO6+nc=; b=JppvCk07AkvEz0ukeU5x2YUUrCBULq9kdy/D6koFM9kxGYeikAupX+dKYWtWlCeC3z TCneDobdu5FIOpI6fumoTgcT0VyGve2qiXGdOUWp34eq4rSt7PYjoTxzTUhR8OdB9W+/ qtBC4JKBylJjz2DEVDiXa6JfEVNt3PZYmX2MgFZ8G/Nu4jW+OJ/fzBlIw/6HHe1qmISO XTt1k8SnrjIM9zx28QfyxPo2/hx05D5VEue8OJVY7WdtOVv8c8OGODDCMJDw2JWppeAX NKlqaqOtn25J2yjHnIT7sDKLUYAf8/XzcuOW8lA7EimvBiskLWxuGwtfbNaNjHnCXG+9 C/Aw== X-Received: by 10.129.94.132 with SMTP id s126mr9228795ywb.268.1445612975747; Fri, 23 Oct 2015 08:09:35 -0700 (PDT) Received: from mail-yk0-f175.google.com (mail-yk0-f175.google.com. [209.85.160.175]) by smtp.gmail.com with ESMTPSA id q62sm14088085ywe.49.2015.10.23.08.09.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Oct 2015 08:09:35 -0700 (PDT) Received: by ykdr3 with SMTP id r3so122725836ykd.1; Fri, 23 Oct 2015 08:09:35 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.129.97.65 with SMTP id v62mr14727429ywb.262.1445612975272; Fri, 23 Oct 2015 08:09:35 -0700 (PDT) Reply-To: cem@FreeBSD.org Received: by 10.37.203.75 with HTTP; Fri, 23 Oct 2015 08:09:35 -0700 (PDT) In-Reply-To: References: <201510222303.t9MN37D2093845@repo.freebsd.org> Date: Fri, 23 Oct 2015 08:09:35 -0700 Message-ID: Subject: Re: svn commit: r289773 - in head: sbin/sysctl sys/kern sys/sys From: Conrad Meyer To: NGie Cooper Cc: "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: Fri, 23 Oct 2015 15:09:37 -0000 On Thu, Oct 22, 2015 at 6:10 PM, NGie Cooper wrote: > On Thu, Oct 22, 2015 at 4:03 PM, Conrad E. Meyer wrote: >> URL: https://svnweb.freebsd.org/changeset/base/289773 >> >> Log: >> Sysctl: Add common support for U8, U16 types > > - This is missing documentation in sysctl(9). r289831, thanks. > - It probably deserves `Relnotes: yes`. I don't think so. > - Shouldn't __FreeBSD_version be bumped for this change? What is __FreeBSD_version and why would it be bumped? Best, Conrad From owner-svn-src-all@freebsd.org Fri Oct 23 15: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 8AD80A1D174; Fri, 23 Oct 2015 15:14:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FD7012EC; Fri, 23 Oct 2015 15:14:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9NFEbnZ012101; Fri, 23 Oct 2015 15:14:37 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NFEb1a012099; Fri, 23 Oct 2015 15:14:37 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201510231514.t9NFEb1a012099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 23 Oct 2015 15:14:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r289832 - in stable/9/sys: libkern sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 15:14:38 -0000 Author: avg Date: Fri Oct 23 15:14:37 2015 New Revision: 289832 URL: https://svnweb.freebsd.org/changeset/base/289832 Log: Partial MFC r253719: add flsll to libkern Original commit description: Fix watchdog pretimeout. ... Only flsll bits of that commit are needed. This should fix the build broken in r289820 for !amd64. Pointyhat to: avg Added: stable/9/sys/libkern/flsll.c - copied unchanged from r253719, head/sys/libkern/flsll.c Modified: stable/9/sys/sys/libkern.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Copied: stable/9/sys/libkern/flsll.c (from r253719, head/sys/libkern/flsll.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/libkern/flsll.c Fri Oct 23 15:14:37 2015 (r289832, copy of r253719, head/sys/libkern/flsll.c) @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +__FBSDID("$FreeBSD$"); + +/* + * Find Last Set bit + */ +int +flsll(long long mask) +{ + int bit; + + if (mask == 0) + return (0); + for (bit = 1; mask != 1; bit++) + mask = (unsigned long long)mask >> 1; + return (bit); +} Modified: stable/9/sys/sys/libkern.h ============================================================================== --- stable/9/sys/sys/libkern.h Fri Oct 23 15:08:16 2015 (r289831) +++ stable/9/sys/sys/libkern.h Fri Oct 23 15:14:37 2015 (r289832) @@ -94,6 +94,10 @@ int fls(int); #ifndef HAVE_INLINE_FLSL int flsl(long); #endif +#ifndef HAVE_INLINE_FLSLL +int flsll(long long); +#endif + #define bitcount64(x) __bitcount64((uint64_t)(x)) #define bitcount32(x) __bitcount32((uint32_t)(x)) #define bitcount16(x) __bitcount16((uint16_t)(x)) From owner-svn-src-all@freebsd.org Fri Oct 23 15:24: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 5BABDA1D4DF; Fri, 23 Oct 2015 15:24:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 279361B31; Fri, 23 Oct 2015 15:24: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 t9NFO0Gl015052; Fri, 23 Oct 2015 15:24:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NFO0K7015051; Fri, 23 Oct 2015 15:24:00 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510231524.t9NFO0K7015051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 23 Oct 2015 15:24:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289833 - 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: Fri, 23 Oct 2015 15:24:01 -0000 Author: emaste Date: Fri Oct 23 15:24:00 2015 New Revision: 289833 URL: https://svnweb.freebsd.org/changeset/base/289833 Log: arm64: remove exception instruction length assertion From the (now removed) comment: * It is unclear in some cases if the bit is implementation defined. * The Foundation Model and QEMU disagree on if the IL bit should * be set when we are in a data fault from the same EL and the ISV * bit (bit 24) is also set. Instead of adding even more special cases just remove the assertion. Approved by: andrew Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/trap.c Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Fri Oct 23 15:14:37 2015 (r289832) +++ head/sys/arm64/arm64/trap.c Fri Oct 23 15:24:00 2015 (r289833) @@ -263,20 +263,6 @@ do_el1h_sync(struct trapframe *frame) return; #endif - /* - * Sanity check we are in an exception er can handle. The IL bit - * is used to indicate the instruction length, except in a few - * exceptions described in the ARMv8 ARM. - * - * It is unclear in some cases if the bit is implementation defined. - * The Foundation Model and QEMU disagree on if the IL bit should - * be set when we are in a data fault from the same EL and the ISV - * bit (bit 24) is also set. - */ - KASSERT((esr & ESR_ELx_IL) == ESR_ELx_IL || - (exception == EXCP_DATA_ABORT && ((esr & ISS_DATA_ISV) == 0)), - ("Invalid instruction length in exception, esr %lx", esr)); - CTR4(KTR_TRAP, "do_el1_sync: curthread: %p, esr %lx, elr: %lx, frame: %p", curthread, esr, frame->tf_elr, frame); From owner-svn-src-all@freebsd.org Fri Oct 23 15:40: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 CB669A1D7C3; Fri, 23 Oct 2015 15:40:00 +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 A2A4022E; Fri, 23 Oct 2015 15:40:00 +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 t9NFdxFL018131; Fri, 23 Oct 2015 15:39:59 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NFdxPe018130; Fri, 23 Oct 2015 15:39:59 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201510231539.t9NFdxPe018130@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: Fri, 23 Oct 2015 15:39:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289834 - 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: Fri, 23 Oct 2015 15:40:01 -0000 Author: royger Date: Fri Oct 23 15:39:59 2015 New Revision: 289834 URL: https://svnweb.freebsd.org/changeset/base/289834 Log: x86/dma_bounce: rework _bus_dmamap_load_ma implementation The implementation of bus_dmamap_load_ma_triv currently calls _bus_dmamap_load_phys on each page that is part of the passed in buffer. Since each page is treated as an individual buffer, the resulting behaviour is different from the behaviour of _bus_dmamap_load_buffer. This breaks certain drivers, like Xen blkfront. If an unmapped buffer of size 4096 that starts at offset 13 into the first page is passed to the current _bus_dmamap_load_ma implementation (so the ma array contains two pages), the result is that two segments are created, one with a size of 4083 and the other with size 13 (because two independant calls to _bus_dmamap_load_phys are performed, one for each physical page). If the same is done with a mapped buffer and calling _bus_dmamap_load_buffer the result is that only one segment is created, with a size of 4096. This patch relegates the usage of bus_dmamap_load_ma_triv in x86 bounce buffer code to drivers requesting BUS_DMA_KEEP_PG_OFFSET and implements _bus_dmamap_load_ma so that it's behaviour is the same as the mapped version (_bus_dmamap_load_buffer). This patch only modifies the x86 bounce buffer code, other arches are left untouched. Reviewed by: kib, jah Differential Revision: https://reviews.freebsd.org/D888 Sponsored by: Citrix Systems R&D Modified: head/sys/x86/x86/busdma_bounce.c Modified: head/sys/x86/x86/busdma_bounce.c ============================================================================== --- head/sys/x86/x86/busdma_bounce.c Fri Oct 23 15:24:00 2015 (r289833) +++ head/sys/x86/x86/busdma_bounce.c Fri Oct 23 15:39:59 2015 (r289834) @@ -79,8 +79,8 @@ struct bounce_page { vm_offset_t vaddr; /* kva of bounce buffer */ bus_addr_t busaddr; /* Physical address */ vm_offset_t datavaddr; /* kva of client data */ - vm_page_t datapage; /* physical page of client data */ vm_offset_t dataoffs; /* page offset of client data */ + vm_page_t datapage[2]; /* physical page(s) of client data */ bus_size_t datacount; /* client data count */ STAILQ_ENTRY(bounce_page) links; }; @@ -135,8 +135,8 @@ static int alloc_bounce_pages(bus_dma_ta static int reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int commit); static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, - vm_offset_t vaddr, bus_addr_t addr, - bus_size_t size); + vm_offset_t vaddr, bus_addr_t addr1, + bus_addr_t addr2, bus_size_t size); static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr); static void _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, @@ -527,6 +527,51 @@ _bus_dmamap_count_pages(bus_dma_tag_t dm } } +static void +_bus_dmamap_count_ma(bus_dma_tag_t dmat, bus_dmamap_t map, struct vm_page **ma, + int ma_offs, bus_size_t buflen, int flags) +{ + bus_size_t sg_len, max_sgsize; + int page_index; + vm_paddr_t paddr; + + if ((map != &nobounce_dmamap && map->pagesneeded == 0)) { + CTR4(KTR_BUSDMA, "lowaddr= %d Maxmem= %d, boundary= %d, " + "alignment= %d", dmat->common.lowaddr, + ptoa((vm_paddr_t)Maxmem), + dmat->common.boundary, dmat->common.alignment); + CTR3(KTR_BUSDMA, "map= %p, nobouncemap= %p, pagesneeded= %d", + map, &nobounce_dmamap, map->pagesneeded); + + /* + * Count the number of bounce pages + * needed in order to complete this transfer + */ + page_index = 0; + while (buflen > 0) { + paddr = ma[page_index]->phys_addr + ma_offs; + sg_len = PAGE_SIZE - ma_offs; + max_sgsize = MIN(buflen, dmat->common.maxsegsz); + sg_len = MIN(sg_len, max_sgsize); + if (bus_dma_run_filter(&dmat->common, paddr) != 0) { + sg_len = roundup2(sg_len, + dmat->common.alignment); + sg_len = MIN(sg_len, max_sgsize); + KASSERT((sg_len & (dmat->common.alignment - 1)) + == 0, ("Segment size is not aligned")); + map->pagesneeded++; + } + if (((ma_offs + sg_len) & ~PAGE_MASK) != 0) + page_index++; + ma_offs = (ma_offs + sg_len) & PAGE_MASK; + KASSERT(buflen >= sg_len, + ("Segment length overruns original buffer")); + buflen -= sg_len; + } + CTR1(KTR_BUSDMA, "pagesneeded= %d\n", map->pagesneeded); + } +} + static int _bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int flags) { @@ -632,7 +677,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_ map->pagesneeded != 0 && bus_dma_run_filter(&dmat->common, curaddr)) { sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK)); - curaddr = add_bounce_page(dmat, map, 0, curaddr, + curaddr = add_bounce_page(dmat, map, 0, curaddr, 0, sgsize); } sgsize = _bus_dmamap_addseg(dmat, map, curaddr, sgsize, segs, @@ -701,7 +746,7 @@ bounce_bus_dmamap_load_buffer(bus_dma_ta bus_dma_run_filter(&dmat->common, curaddr)) { sgsize = roundup2(sgsize, dmat->common.alignment); sgsize = MIN(sgsize, max_sgsize); - curaddr = add_bounce_page(dmat, map, kvaddr, curaddr, + curaddr = add_bounce_page(dmat, map, kvaddr, curaddr, 0, sgsize); } else { sgsize = MIN(sgsize, max_sgsize); @@ -720,6 +765,90 @@ bounce_bus_dmamap_load_buffer(bus_dma_ta return (buflen != 0 ? EFBIG : 0); /* XXX better return value here? */ } +static int +bounce_bus_dmamap_load_ma(bus_dma_tag_t dmat, bus_dmamap_t map, + struct vm_page **ma, bus_size_t buflen, int ma_offs, int flags, + bus_dma_segment_t *segs, int *segp) +{ + vm_paddr_t paddr, next_paddr; + int error, page_index; + struct vm_page *page; + bus_size_t sgsize, max_sgsize; + + if (dmat->common.flags & BUS_DMA_KEEP_PG_OFFSET) { + /* + * If we have to keep the offset of each page this function + * is not suitable, switch back to bus_dmamap_load_ma_triv + * which is going to do the right thing in this case. + */ + error = bus_dmamap_load_ma_triv(dmat, map, ma, buflen, ma_offs, + flags, segs, segp); + return (error); + } + + if (map == NULL) + map = &nobounce_dmamap; + + if (segs == NULL) + segs = dmat->segments; + + if ((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) { + _bus_dmamap_count_ma(dmat, map, ma, ma_offs, buflen, flags); + if (map->pagesneeded != 0) { + error = _bus_dmamap_reserve_pages(dmat, map, flags); + if (error) + return (error); + } + } + + page_index = 0; + page = ma[0]; + while (buflen > 0) { + /* + * Compute the segment size, and adjust counts. + */ + page = ma[page_index]; + paddr = page->phys_addr + ma_offs; + max_sgsize = MIN(buflen, dmat->common.maxsegsz); + sgsize = PAGE_SIZE - ma_offs; + if (((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) && + map->pagesneeded != 0 && + bus_dma_run_filter(&dmat->common, paddr)) { + sgsize = roundup2(sgsize, dmat->common.alignment); + sgsize = MIN(sgsize, max_sgsize); + KASSERT((sgsize & (dmat->common.alignment - 1)) == 0, + ("Segment size is not aligned")); + /* + * Check if two pages of the user provided buffer + * are used. + */ + if (((ma_offs + sgsize) & ~PAGE_MASK) != 0) + next_paddr = ma[page_index + 1]->phys_addr; + else + next_paddr = 0; + paddr = add_bounce_page(dmat, map, 0, paddr, + next_paddr, sgsize); + } else { + sgsize = MIN(sgsize, max_sgsize); + } + sgsize = _bus_dmamap_addseg(dmat, map, paddr, sgsize, segs, + segp); + if (sgsize == 0) + break; + KASSERT(buflen >= sgsize, + ("Segment length overruns original buffer")); + buflen -= sgsize; + if (((ma_offs + sgsize) & ~PAGE_MASK) != 0) + page_index++; + ma_offs = (ma_offs + sgsize) & PAGE_MASK; + } + + /* + * Did we fit? + */ + return (buflen != 0 ? EFBIG : 0); /* XXX better return value here? */ +} + static void bounce_bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map, struct memdesc *mem, bus_dmamap_callback_t *callback, void *callback_arg) @@ -763,6 +892,7 @@ bounce_bus_dmamap_sync(bus_dma_tag_t dma { struct bounce_page *bpage; vm_offset_t datavaddr, tempvaddr; + bus_size_t datacount1, datacount2; if ((bpage = STAILQ_FIRST(&map->bpages)) == NULL) return; @@ -778,17 +908,35 @@ bounce_bus_dmamap_sync(bus_dma_tag_t dma while (bpage != NULL) { tempvaddr = 0; datavaddr = bpage->datavaddr; + datacount1 = bpage->datacount; if (datavaddr == 0) { tempvaddr = - pmap_quick_enter_page(bpage->datapage); + pmap_quick_enter_page(bpage->datapage[0]); datavaddr = tempvaddr | bpage->dataoffs; + datacount1 = min(PAGE_SIZE - bpage->dataoffs, + datacount1); } bcopy((void *)datavaddr, - (void *)bpage->vaddr, bpage->datacount); + (void *)bpage->vaddr, datacount1); if (tempvaddr != 0) pmap_quick_remove_page(tempvaddr); + + if (bpage->datapage[1] == 0) + goto next_w; + + /* + * We are dealing with an unmapped buffer that expands + * over two pages. + */ + datavaddr = pmap_quick_enter_page(bpage->datapage[1]); + datacount2 = bpage->datacount - datacount1; + bcopy((void *)datavaddr, + (void *)(bpage->vaddr + datacount1), datacount2); + pmap_quick_remove_page(datavaddr); + +next_w: bpage = STAILQ_NEXT(bpage, links); } dmat->bounce_zone->total_bounced++; @@ -798,17 +946,35 @@ bounce_bus_dmamap_sync(bus_dma_tag_t dma while (bpage != NULL) { tempvaddr = 0; datavaddr = bpage->datavaddr; + datacount1 = bpage->datacount; if (datavaddr == 0) { tempvaddr = - pmap_quick_enter_page(bpage->datapage); + pmap_quick_enter_page(bpage->datapage[0]); datavaddr = tempvaddr | bpage->dataoffs; + datacount1 = min(PAGE_SIZE - bpage->dataoffs, + datacount1); } - bcopy((void *)bpage->vaddr, - (void *)datavaddr, bpage->datacount); + bcopy((void *)bpage->vaddr, (void *)datavaddr, + datacount1); if (tempvaddr != 0) pmap_quick_remove_page(tempvaddr); + + if (bpage->datapage[1] == 0) + goto next_r; + + /* + * We are dealing with an unmapped buffer that expands + * over two pages. + */ + datavaddr = pmap_quick_enter_page(bpage->datapage[1]); + datacount2 = bpage->datacount - datacount1; + bcopy((void *)(bpage->vaddr + datacount1), + (void *)datavaddr, datacount2); + pmap_quick_remove_page(datavaddr); + +next_r: bpage = STAILQ_NEXT(bpage, links); } dmat->bounce_zone->total_bounced++; @@ -972,7 +1138,7 @@ reserve_bounce_pages(bus_dma_tag_t dmat, static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, vm_offset_t vaddr, - bus_addr_t addr, bus_size_t size) + bus_addr_t addr1, bus_addr_t addr2, bus_size_t size) { struct bounce_zone *bz; struct bounce_page *bpage; @@ -1002,12 +1168,16 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ if (dmat->common.flags & BUS_DMA_KEEP_PG_OFFSET) { /* Page offset needs to be preserved. */ - bpage->vaddr |= addr & PAGE_MASK; - bpage->busaddr |= addr & PAGE_MASK; + bpage->vaddr |= addr1 & PAGE_MASK; + bpage->busaddr |= addr1 & PAGE_MASK; + KASSERT(addr2 == 0, + ("Trying to bounce multiple pages with BUS_DMA_KEEP_PG_OFFSET")); } bpage->datavaddr = vaddr; - bpage->datapage = PHYS_TO_VM_PAGE(addr); - bpage->dataoffs = addr & PAGE_MASK; + bpage->datapage[0] = PHYS_TO_VM_PAGE(addr1); + KASSERT((addr2 & PAGE_MASK) == 0, ("Second page is not aligned")); + bpage->datapage[1] = PHYS_TO_VM_PAGE(addr2); + bpage->dataoffs = addr1 & PAGE_MASK; bpage->datacount = size; STAILQ_INSERT_TAIL(&(map->bpages), bpage, links); return (bpage->busaddr); @@ -1079,7 +1249,7 @@ struct bus_dma_impl bus_dma_bounce_impl .mem_free = bounce_bus_dmamem_free, .load_phys = bounce_bus_dmamap_load_phys, .load_buffer = bounce_bus_dmamap_load_buffer, - .load_ma = bus_dmamap_load_ma_triv, + .load_ma = bounce_bus_dmamap_load_ma, .map_waitok = bounce_bus_dmamap_waitok, .map_complete = bounce_bus_dmamap_complete, .map_unload = bounce_bus_dmamap_unload, From owner-svn-src-all@freebsd.org Fri Oct 23 15:40: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 7A32EA1D80F; Fri, 23 Oct 2015 15:40:45 +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 46C363EC; Fri, 23 Oct 2015 15:40:45 +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 t9NFei3G020124; Fri, 23 Oct 2015 15:40:44 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NFeiQj020123; Fri, 23 Oct 2015 15:40:44 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510231540.t9NFeiQj020123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Fri, 23 Oct 2015 15:40:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289835 - head/sbin/sysctl X-SVN-Group: head MIME-Version: 1.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, 23 Oct 2015 15:40:45 -0000 Author: cem Date: Fri Oct 23 15:40:44 2015 New Revision: 289835 URL: https://svnweb.freebsd.org/changeset/base/289835 Log: sysctl(8): Fix style nits Suggested by: bde Sponsored by: EMC / Isilon Storage Division Modified: head/sbin/sysctl/sysctl.c Modified: head/sbin/sysctl/sysctl.c ============================================================================== --- head/sbin/sysctl/sysctl.c Fri Oct 23 15:39:59 2015 (r289834) +++ head/sbin/sysctl/sysctl.c Fri Oct 23 15:40:44 2015 (r289835) @@ -90,25 +90,25 @@ static int ctl_sign[CTLTYPE+1] = { }; static int ctl_size[CTLTYPE+1] = { + [CTLTYPE_U8] = sizeof(uint8_t), + [CTLTYPE_U16] = sizeof(uint16_t), [CTLTYPE_INT] = sizeof(int), [CTLTYPE_UINT] = sizeof(u_int), [CTLTYPE_LONG] = sizeof(long), [CTLTYPE_ULONG] = sizeof(u_long), [CTLTYPE_S64] = sizeof(int64_t), [CTLTYPE_U64] = sizeof(uint64_t), - [CTLTYPE_U8] = sizeof(uint8_t), - [CTLTYPE_U16] = sizeof(uint16_t), }; static const char *ctl_typename[CTLTYPE+1] = { + [CTLTYPE_U8] = "uint8_t", + [CTLTYPE_U16] = "uint16_t", [CTLTYPE_INT] = "integer", [CTLTYPE_UINT] = "unsigned integer", [CTLTYPE_LONG] = "long integer", [CTLTYPE_ULONG] = "unsigned long", [CTLTYPE_S64] = "int64_t", [CTLTYPE_U64] = "uint64_t", - [CTLTYPE_U8] = "uint8_t", - [CTLTYPE_U16] = "uint16_t", }; static void @@ -359,7 +359,8 @@ parse(const char *string, int lineno) newsize = sizeof(u8val); break; case CTLTYPE_U16: - u16val = (uint16_t)strtoul(newvalstr, &endptr, 0); + u16val = (uint16_t)strtoul(newvalstr, &endptr, + 0); newval = &u16val; newsize = sizeof(u16val); break; From owner-svn-src-all@freebsd.org Fri Oct 23 15:46: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 B3B9FA1D9AA; Fri, 23 Oct 2015 15:46:32 +0000 (UTC) (envelope-from prvs=731ed1d6e=roger.pau@citrix.com) Received: from SMTP02.CITRIX.COM (smtp02.citrix.com [66.165.176.63]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "mail.citrix.com", Issuer "Verizon Public SureServer CA G14-SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EF9E0AB9; Fri, 23 Oct 2015 15:46:31 +0000 (UTC) (envelope-from prvs=731ed1d6e=roger.pau@citrix.com) X-IronPort-AV: E=Sophos;i="5.20,187,1444694400"; d="scan'208";a="312620684" Subject: Re: svn commit: r289834 - head/sys/x86/x86 To: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , , , References: <201510231539.t9NFdxPe018130@repo.freebsd.org> From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Message-ID: <562A564D.9080703@citrix.com> Date: Fri, 23 Oct 2015 17:46:21 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510231539.t9NFdxPe018130@repo.freebsd.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-DLP: MIA1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 15:46:32 -0000 El 23/10/15 a les 17.39, Roger Pau Monné ha escrit: > Author: royger > Date: Fri Oct 23 15:39:59 2015 > New Revision: 289834 > URL: https://svnweb.freebsd.org/changeset/base/289834 > > Log: > x86/dma_bounce: rework _bus_dmamap_load_ma implementation > > The implementation of bus_dmamap_load_ma_triv currently calls > _bus_dmamap_load_phys on each page that is part of the passed in buffer. > Since each page is treated as an individual buffer, the resulting behaviour > is different from the behaviour of _bus_dmamap_load_buffer. This breaks > certain drivers, like Xen blkfront. > > If an unmapped buffer of size 4096 that starts at offset 13 into the first > page is passed to the current _bus_dmamap_load_ma implementation (so the ma > array contains two pages), the result is that two segments are created, one > with a size of 4083 and the other with size 13 (because two independant > calls to _bus_dmamap_load_phys are performed, one for each physical page). > If the same is done with a mapped buffer and calling _bus_dmamap_load_buffer > the result is that only one segment is created, with a size of 4096. > > This patch relegates the usage of bus_dmamap_load_ma_triv in x86 bounce > buffer code to drivers requesting BUS_DMA_KEEP_PG_OFFSET and implements > _bus_dmamap_load_ma so that it's behaviour is the same as the mapped version > (_bus_dmamap_load_buffer). This patch only modifies the x86 bounce buffer > code, other arches are left untouched. > > Reviewed by: kib, jah > Differential Revision: https://reviews.freebsd.org/D888 > Sponsored by: Citrix Systems R&D Forgot to add: MFC after: 2 weeks Roger. From owner-svn-src-all@freebsd.org Fri Oct 23 15:46: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 D9329A1D9D3; Fri, 23 Oct 2015 15:46:43 +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 8CC35C0F; Fri, 23 Oct 2015 15:46:43 +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 t9NFkg9F020962; Fri, 23 Oct 2015 15:46:42 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NFkggN020961; Fri, 23 Oct 2015 15:46:42 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201510231546.t9NFkggN020961@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: Fri, 23 Oct 2015 15:46:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289836 - head/sys/dev/xen/blkfront X-SVN-Group: head MIME-Version: 1.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, 23 Oct 2015 15:46:43 -0000 Author: royger Date: Fri Oct 23 15:46:42 2015 New Revision: 289836 URL: https://svnweb.freebsd.org/changeset/base/289836 Log: blkfront: add support for unmapped IO Using unmapped IO is really beneficial when running inside of a VM, since it avoids IPIs to other vCPUs in order to invalidate the mappings. This patch adds unmapped IO support to blkfront. The following tests results have been obtained when running on a Xen host without HAP: PVHVM 3165.84 real 6354.17 user 4483.32 sys PVHVM with unmapped IO 2099.46 real 4624.52 user 2967.38 sys This is because when running using shadow page tables TLB flushes and range invalidations are much more expensive, so using unmapped IO provides a very important performance boost. Sponsored by: Citrix Systems R&D MFC after: 2 weeks X-MFC-with: r289834 Modified: head/sys/dev/xen/blkfront/blkfront.c Modified: head/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- head/sys/dev/xen/blkfront/blkfront.c Fri Oct 23 15:40:44 2015 (r289835) +++ head/sys/dev/xen/blkfront/blkfront.c Fri Oct 23 15:46:42 2015 (r289836) @@ -293,8 +293,12 @@ xbd_queue_request(struct xbd_softc *sc, { int error; - error = bus_dmamap_load(sc->xbd_io_dmat, cm->cm_map, cm->cm_data, - cm->cm_datalen, xbd_queue_cb, cm, 0); + if (cm->cm_bp != NULL) + error = bus_dmamap_load_bio(sc->xbd_io_dmat, cm->cm_map, + cm->cm_bp, xbd_queue_cb, cm, 0); + else + error = bus_dmamap_load(sc->xbd_io_dmat, cm->cm_map, + cm->cm_data, cm->cm_datalen, xbd_queue_cb, cm, 0); if (error == EINPROGRESS) { /* * Maintain queuing order by freezing the queue. The next @@ -354,8 +358,6 @@ xbd_bio_command(struct xbd_softc *sc) } cm->cm_bp = bp; - cm->cm_data = bp->bio_data; - cm->cm_datalen = bp->bio_bcount; cm->cm_sector_number = (blkif_sector_t)bp->bio_pblkno; switch (bp->bio_cmd) { @@ -1009,7 +1011,7 @@ xbd_instance_create(struct xbd_softc *sc sc->xbd_disk->d_mediasize = sectors * sector_size; sc->xbd_disk->d_maxsize = sc->xbd_max_request_size; - sc->xbd_disk->d_flags = 0; + sc->xbd_disk->d_flags = DISKFLAG_UNMAPPED_BIO; if ((sc->xbd_flags & (XBDF_FLUSH|XBDF_BARRIER)) != 0) { sc->xbd_disk->d_flags |= DISKFLAG_CANFLUSHCACHE; device_printf(sc->xbd_dev, From owner-svn-src-all@freebsd.org Fri Oct 23 15:56: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 0BE8EA1DC1F; Fri, 23 Oct 2015 15:56:19 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD65521B; Fri, 23 Oct 2015 15:56:18 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9NFuHwd023952; Fri, 23 Oct 2015 15:56:17 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NFuHoD023951; Fri, 23 Oct 2015 15:56:17 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201510231556.t9NFuHoD023951@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 23 Oct 2015 15:56:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289837 - head/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: Fri, 23 Oct 2015 15:56:19 -0000 Author: vangyzen Date: Fri Oct 23 15:56:17 2015 New Revision: 289837 URL: https://svnweb.freebsd.org/changeset/base/289837 Log: resolver: abuse _res a little less In the past, _res was a global variable. Now, it's multiple function calls. Several functions in the resolver use _res multiple times and therefore call the function(s) far more than necessary. Fix those callers to store the result of _res in a local variable. Add __noinline to the definition of res_init() to avoid the code bloat that these changes would have otherwise incurred. Thanks to jilles for noticing this. Reviewed by: jilles MFC after: 1 week Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D3887 Modified: head/lib/libc/resolv/res_data.c Modified: head/lib/libc/resolv/res_data.c ============================================================================== --- head/lib/libc/resolv/res_data.c Fri Oct 23 15:46:42 2015 (r289836) +++ head/lib/libc/resolv/res_data.c Fri Oct 23 15:56:17 2015 (r289837) @@ -77,9 +77,10 @@ const char *_res_sectioncodes[] = { int res_ourserver_p(const res_state, const struct sockaddr_in *); -int +__noinline int res_init(void) { extern int __res_vinit(res_state, int); + res_state statp = &_res; /* * These three fields used to be statically initialized. This made @@ -100,14 +101,14 @@ res_init(void) { * set in RES_DEFAULT). Our solution is to declare such applications * "broken". They could fool us by setting RES_INIT but none do (yet). */ - if (!_res.retrans) - _res.retrans = RES_TIMEOUT; - if (!_res.retry) - _res.retry = RES_DFLRETRY; - if (!(_res.options & RES_INIT)) - _res.options = RES_DEFAULT; + if (!statp->retrans) + statp->retrans = RES_TIMEOUT; + if (!statp->retry) + statp->retry = RES_DFLRETRY; + if (!(statp->options & RES_INIT)) + statp->options = RES_DEFAULT; - return (__res_vinit(&_res, 1)); + return (__res_vinit(statp, 1)); } void @@ -122,10 +123,11 @@ fp_query(const u_char *msg, FILE *file) void fp_nquery(const u_char *msg, int len, FILE *file) { - if ((_res.options & RES_INIT) == 0U && res_init() == -1) + res_state statp = &_res; + if ((statp->options & RES_INIT) == 0U && res_init() == -1) return; - res_pquery(&_res, msg, len, file); + res_pquery(statp, msg, len, file); } int @@ -138,23 +140,25 @@ res_mkquery(int op, /*!< opcode of que u_char *buf, /*!< buffer to put query */ int buflen) /*!< size of buffer */ { - if ((_res.options & RES_INIT) == 0U && res_init() == -1) { - RES_SET_H_ERRNO(&_res, NETDB_INTERNAL); + res_state statp = &_res; + if ((statp->options & RES_INIT) == 0U && res_init() == -1) { + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); return (-1); } - return (res_nmkquery(&_res, op, dname, class, type, + return (res_nmkquery(statp, op, dname, class, type, data, datalen, newrr_in, buf, buflen)); } int res_mkupdate(ns_updrec *rrecp_in, u_char *buf, int buflen) { - if ((_res.options & RES_INIT) == 0U && res_init() == -1) { - RES_SET_H_ERRNO(&_res, NETDB_INTERNAL); + res_state statp = &_res; + if ((statp->options & RES_INIT) == 0U && res_init() == -1) { + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); return (-1); } - return (res_nmkupdate(&_res, rrecp_in, buf, buflen)); + return (res_nmkupdate(statp, rrecp_in, buf, buflen)); } int @@ -163,11 +167,12 @@ res_query(const char *name, /*!< domain u_char *answer, /*!< buffer to put answer */ int anslen) /*!< size of answer buffer */ { - if ((_res.options & RES_INIT) == 0U && res_init() == -1) { - RES_SET_H_ERRNO(&_res, NETDB_INTERNAL); + res_state statp = &_res; + if ((statp->options & RES_INIT) == 0U && res_init() == -1) { + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); return (-1); } - return (res_nquery(&_res, name, class, type, answer, anslen)); + return (res_nquery(statp, name, class, type, answer, anslen)); } #ifndef _LIBC @@ -189,12 +194,13 @@ res_isourserver(const struct sockaddr_in int res_send(const u_char *buf, int buflen, u_char *ans, int anssiz) { - if ((_res.options & RES_INIT) == 0U && res_init() == -1) { + res_state statp = &_res; + if ((statp->options & RES_INIT) == 0U && res_init() == -1) { /* errno should have been set by res_init() in this case. */ return (-1); } - return (res_nsend(&_res, buf, buflen, ans, anssiz)); + return (res_nsend(statp, buf, buflen, ans, anssiz)); } #ifndef _LIBC @@ -202,12 +208,13 @@ int res_sendsigned(const u_char *buf, int buflen, ns_tsig_key *key, u_char *ans, int anssiz) { - if ((_res.options & RES_INIT) == 0U && res_init() == -1) { + res_state statp = &_res; + if ((statp->options & RES_INIT) == 0U && res_init() == -1) { /* errno should have been set by res_init() in this case. */ return (-1); } - return (res_nsendsigned(&_res, buf, buflen, key, ans, anssiz)); + return (res_nsendsigned(statp, buf, buflen, key, ans, anssiz)); } #endif @@ -218,12 +225,13 @@ res_close(void) { int res_update(ns_updrec *rrecp_in) { - if ((_res.options & RES_INIT) == 0U && res_init() == -1) { - RES_SET_H_ERRNO(&_res, NETDB_INTERNAL); + res_state statp = &_res; + if ((statp->options & RES_INIT) == 0U && res_init() == -1) { + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); return (-1); } - return (res_nupdate(&_res, rrecp_in, NULL)); + return (res_nupdate(statp, rrecp_in, NULL)); } int @@ -232,12 +240,13 @@ res_search(const char *name, /*!< domain u_char *answer, /*!< buffer to put answer */ int anslen) /*!< size of answer */ { - if ((_res.options & RES_INIT) == 0U && res_init() == -1) { - RES_SET_H_ERRNO(&_res, NETDB_INTERNAL); + res_state statp = &_res; + if ((statp->options & RES_INIT) == 0U && res_init() == -1) { + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); return (-1); } - return (res_nsearch(&_res, name, class, type, answer, anslen)); + return (res_nsearch(statp, name, class, type, answer, anslen)); } int @@ -247,24 +256,26 @@ res_querydomain(const char *name, u_char *answer, /*!< buffer to put answer */ int anslen) /*!< size of answer */ { - if ((_res.options & RES_INIT) == 0U && res_init() == -1) { - RES_SET_H_ERRNO(&_res, NETDB_INTERNAL); + res_state statp = &_res; + if ((statp->options & RES_INIT) == 0U && res_init() == -1) { + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); return (-1); } - return (res_nquerydomain(&_res, name, domain, + return (res_nquerydomain(statp, name, domain, class, type, answer, anslen)); } u_int res_randomid(void) { - if ((_res.options & RES_INIT) == 0U && res_init() == -1) { - RES_SET_H_ERRNO(&_res, NETDB_INTERNAL); + res_state statp = &_res; + if ((statp->options & RES_INIT) == 0U && res_init() == -1) { + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); return (-1); } - return (res_nrandomid(&_res)); + return (res_nrandomid(statp)); } int @@ -284,13 +295,15 @@ hostalias(const char *name) { int local_hostname_length(const char *hostname) { int len_host, len_domain; + res_state statp; - if (!*_res.defdname) + statp = &_res; + if (!*statp->defdname) res_init(); len_host = strlen(hostname); - len_domain = strlen(_res.defdname); + len_domain = strlen(statp->defdname); if (len_host > len_domain && - !strcasecmp(hostname + len_host - len_domain, _res.defdname) && + !strcasecmp(hostname + len_host - len_domain, statp->defdname) && hostname[len_host - len_domain - 1] == '.') return (len_host - len_domain - 1); return (0); From owner-svn-src-all@freebsd.org Fri Oct 23 16:54: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 DBB50A1CB98; Fri, 23 Oct 2015 16:54:25 +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 A54F1C46; Fri, 23 Oct 2015 16:54:25 +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 t9NGsOeq042196; Fri, 23 Oct 2015 16:54:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NGsO59042191; Fri, 23 Oct 2015 16:54:24 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510231654.t9NGsO59042191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 23 Oct 2015 16:54:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289838 - 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: Fri, 23 Oct 2015 16:54:26 -0000 Author: mav Date: Fri Oct 23 16:54:24 2015 New Revision: 289838 URL: https://svnweb.freebsd.org/changeset/base/289838 Log: Improve INOTs handling for 24xx and above chips. Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_library.c head/sys/dev/isp/isp_library.h head/sys/dev/isp/isp_target.c head/sys/dev/isp/ispmbox.h Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Fri Oct 23 15:56:17 2015 (r289837) +++ head/sys/dev/isp/isp_freebsd.c Fri Oct 23 16:54:24 2015 (r289838) @@ -2480,12 +2480,13 @@ isp_handle_platform_atio2(ispsoftc_t *is else { if ((isp_find_pdb_by_handle(isp, 0, nphdl, &lp) == 0 || lp->state == FC_PORTDB_STATE_ZOMBIE)) { - uint64_t iid = + uint64_t wwpn = (((uint64_t) aep->at_wwpn[0]) << 48) | (((uint64_t) aep->at_wwpn[1]) << 32) | (((uint64_t) aep->at_wwpn[2]) << 16) | (((uint64_t) aep->at_wwpn[3]) << 0); - isp_add_wwn_entry(isp, 0, iid, nphdl, PORT_ANY, 0); + isp_add_wwn_entry(isp, 0, wwpn, INI_NONE, + nphdl, PORT_ANY, 0); isp_find_pdb_by_handle(isp, 0, nphdl, &lp); } atiop->init_id = FC_PORTDB_TGT(isp, 0, lp); @@ -3195,8 +3196,9 @@ isp_handle_platform_notify_24xx(ispsoftc uint16_t prli_options = 0; uint32_t portid; fcportdb_t *lp; - uint8_t *ptr = NULL; - uint64_t wwn; + char *msg = NULL; + uint8_t *ptr = (uint8_t *)inot; + uint64_t wwpn = INI_NONE, wwnn = INI_NONE; nphdl = inot->in_nphdl; if (nphdl != NIL_HANDLE) { @@ -3208,7 +3210,7 @@ isp_handle_platform_notify_24xx(ispsoftc switch (inot->in_status) { case IN24XX_ELS_RCVD: { - char buf[16], *msg; + char buf[16]; int chan = ISP_GET_VPIDX(isp, inot->in_vpidx); /* @@ -3219,49 +3221,27 @@ isp_handle_platform_notify_24xx(ispsoftc switch (inot->in_status_subcode) { case LOGO: msg = "LOGO"; - if (ISP_FW_NEWER_THAN(isp, 4, 0, 25)) { - ptr = (uint8_t *)inot; /* point to unswizzled entry! */ - wwn = (((uint64_t) ptr[IN24XX_LOGO_WWPN_OFF]) << 56) | - (((uint64_t) ptr[IN24XX_LOGO_WWPN_OFF+1]) << 48) | - (((uint64_t) ptr[IN24XX_LOGO_WWPN_OFF+2]) << 40) | - (((uint64_t) ptr[IN24XX_LOGO_WWPN_OFF+3]) << 32) | - (((uint64_t) ptr[IN24XX_LOGO_WWPN_OFF+4]) << 24) | - (((uint64_t) ptr[IN24XX_LOGO_WWPN_OFF+5]) << 16) | - (((uint64_t) ptr[IN24XX_LOGO_WWPN_OFF+6]) << 8) | - (((uint64_t) ptr[IN24XX_LOGO_WWPN_OFF+7])); - } else { - wwn = INI_ANY; - } - isp_del_wwn_entry(isp, chan, wwn, nphdl, portid); + wwpn = be64dec(&ptr[IN24XX_PLOGI_WWPN_OFF]); + isp_del_wwn_entry(isp, chan, wwpn, nphdl, portid); break; case PRLO: msg = "PRLO"; break; case PLOGI: + msg = "PLOGI"; + wwnn = be64dec(&ptr[IN24XX_PLOGI_WWNN_OFF]); + wwpn = be64dec(&ptr[IN24XX_PLOGI_WWPN_OFF]); + isp_add_wwn_entry(isp, chan, wwpn, wwnn, + nphdl, portid, prli_options); + break; case PRLI: - /* - * Treat PRLI the same as PLOGI and make a database entry for it. - */ - if (inot->in_status_subcode == PLOGI) { - msg = "PLOGI"; - } else { - prli_options = inot->in_prli_options; - msg = "PRLI"; - } - if (ISP_FW_NEWER_THAN(isp, 4, 0, 25)) { - ptr = (uint8_t *)inot; /* point to unswizzled entry! */ - wwn = (((uint64_t) ptr[IN24XX_PLOGI_WWPN_OFF]) << 56) | - (((uint64_t) ptr[IN24XX_PLOGI_WWPN_OFF+1]) << 48) | - (((uint64_t) ptr[IN24XX_PLOGI_WWPN_OFF+2]) << 40) | - (((uint64_t) ptr[IN24XX_PLOGI_WWPN_OFF+3]) << 32) | - (((uint64_t) ptr[IN24XX_PLOGI_WWPN_OFF+4]) << 24) | - (((uint64_t) ptr[IN24XX_PLOGI_WWPN_OFF+5]) << 16) | - (((uint64_t) ptr[IN24XX_PLOGI_WWPN_OFF+6]) << 8) | - (((uint64_t) ptr[IN24XX_PLOGI_WWPN_OFF+7])); - } else { - wwn = INI_NONE; - } - isp_add_wwn_entry(isp, chan, wwn, nphdl, portid, prli_options); + msg = "PRLI"; + prli_options = inot->in_prli_options; + if (inot->in_flags & IN24XX_FLAG_PN_NN_VALID) + wwnn = be64dec(&ptr[IN24XX_PRLI_WWNN_OFF]); + wwpn = be64dec(&ptr[IN24XX_PRLI_WWPN_OFF]); + isp_add_wwn_entry(isp, chan, wwpn, wwnn, + nphdl, portid, prli_options); break; case PDISC: msg = "PDISC"; @@ -3285,21 +3265,19 @@ isp_handle_platform_notify_24xx(ispsoftc } case IN24XX_PORT_LOGOUT: - ptr = "PORT LOGOUT"; + msg = "PORT LOGOUT"; if (isp_find_pdb_by_handle(isp, ISP_GET_VPIDX(isp, inot->in_vpidx), nphdl, &lp)) { isp_del_wwn_entry(isp, ISP_GET_VPIDX(isp, inot->in_vpidx), lp->port_wwn, nphdl, lp->portid); } /* FALLTHROUGH */ case IN24XX_PORT_CHANGED: - if (ptr == NULL) { - ptr = "PORT CHANGED"; - } + if (msg == NULL) + msg = "PORT CHANGED"; /* FALLTHROUGH */ - case IN24XX_LIP_RESET: - if (ptr == NULL) { - ptr = "LIP RESET"; - } - isp_prt(isp, ISP_LOGINFO, "Chan %d %s (sub-status 0x%x) for N-port handle 0x%x", ISP_GET_VPIDX(isp, inot->in_vpidx), ptr, inot->in_status_subcode, nphdl); + case IN24XX_LIP_RESET: + if (msg == NULL) + msg = "LIP RESET"; + isp_prt(isp, ISP_LOGINFO, "Chan %d %s (sub-status 0x%x) for N-port handle 0x%x", ISP_GET_VPIDX(isp, inot->in_vpidx), msg, inot->in_status_subcode, nphdl); /* * All subcodes here are irrelevant. What is relevant @@ -3315,21 +3293,18 @@ isp_handle_platform_notify_24xx(ispsoftc isp_handle_srr_notify(isp, inot); break; #else - if (ptr == NULL) { - ptr = "SRR RCVD"; - } + if (msg == NULL) + msg = "SRR RCVD"; /* FALLTHROUGH */ #endif case IN24XX_LINK_RESET: - if (ptr == NULL) { - ptr = "LINK RESET"; - } + if (msg == NULL) + msg = "LINK RESET"; case IN24XX_LINK_FAILED: - if (ptr == NULL) { - ptr = "LINK FAILED"; - } + if (msg == NULL) + msg = "LINK FAILED"; default: - isp_prt(isp, ISP_LOGWARN, "Chan %d %s", ISP_GET_VPIDX(isp, inot->in_vpidx), ptr); + isp_prt(isp, ISP_LOGWARN, "Chan %d %s", ISP_GET_VPIDX(isp, inot->in_vpidx), msg); isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inot); break; } @@ -5698,20 +5673,17 @@ isp_async(ispsoftc_t *isp, ispasync_t cm break; } case ISPASYNC_LIP: - if (msg == NULL) { + if (msg == NULL) msg = "LIP Received"; - } /* FALLTHROUGH */ case ISPASYNC_LOOP_RESET: - if (msg == NULL) { + if (msg == NULL) msg = "LOOP Reset"; - } /* FALLTHROUGH */ case ISPASYNC_LOOP_DOWN: { - if (msg == NULL) { + if (msg == NULL) msg = "LOOP Down"; - } va_start(ap, cmd); bus = va_arg(ap, int); va_end(ap); Modified: head/sys/dev/isp/isp_library.c ============================================================================== --- head/sys/dev/isp/isp_library.c Fri Oct 23 15:56:17 2015 (r289837) +++ head/sys/dev/isp/isp_library.c Fri Oct 23 16:54:24 2015 (r289838) @@ -2421,7 +2421,8 @@ isp_find_chan_by_did(ispsoftc_t *isp, ui * Add an initiator device to the port database */ void -isp_add_wwn_entry(ispsoftc_t *isp, int chan, uint64_t ini, uint16_t nphdl, uint32_t s_id, uint16_t prli_params) +isp_add_wwn_entry(ispsoftc_t *isp, int chan, uint64_t wwpn, uint64_t wwnn, + uint16_t nphdl, uint32_t s_id, uint16_t prli_params) { char buf[64]; fcparam *fcp; @@ -2432,7 +2433,7 @@ isp_add_wwn_entry(ispsoftc_t *isp, int c if (nphdl >= MAX_NPORT_HANDLE) { isp_prt(isp, ISP_LOGTINFO|ISP_LOGWARN, "Chan %d WWPN 0x%016llx " "PortID 0x%06x handle 0x%x -- bad handle", - chan, (unsigned long long) ini, s_id, nphdl); + chan, (unsigned long long) wwpn, s_id, nphdl); return; } @@ -2441,7 +2442,7 @@ isp_add_wwn_entry(ispsoftc_t *isp, int c * with new parameters. Some cases of update can be suspicious, * so log them verbosely and dump the whole port database. */ - if ((VALID_INI(ini) && isp_find_pdb_by_wwn(isp, chan, ini, &lp)) || + if ((VALID_INI(wwpn) && isp_find_pdb_by_wwn(isp, chan, wwpn, &lp)) || (s_id != PORT_NONE && isp_find_pdb_by_sid(isp, chan, s_id, &lp))) { change = 0; lp->new_portid = lp->portid; @@ -2465,24 +2466,42 @@ isp_add_wwn_entry(ispsoftc_t *isp, int c lp->new_portid = s_id; change++; } - if (VALID_INI(ini) && lp->port_wwn != ini) { + if (VALID_INI(wwpn) && lp->port_wwn != wwpn) { if (!VALID_INI(lp->port_wwn)) { isp_prt(isp, ISP_LOGTINFO, "Chan %d PortID 0x%06x handle 0x%x " - "gets WWN 0x%016llxx", + "gets WWPN 0x%016llxx", chan, lp->portid, nphdl, - (unsigned long long) ini); - } else if (lp->port_wwn != ini) { + (unsigned long long) wwpn); + } else if (lp->port_wwn != wwpn) { isp_prt(isp, ISP_LOGTINFO|ISP_LOGWARN, "Chan %d PortID 0x%06x handle 0x%x " - "changes WWN 0x%016llx to 0x%016llx", + "changes WWPN 0x%016llx to 0x%016llx", chan, lp->portid, nphdl, (unsigned long long) lp->port_wwn, - (unsigned long long) ini); + (unsigned long long) wwpn); if (isp->isp_dblev & (ISP_LOGTINFO|ISP_LOGWARN)) isp_dump_portdb(isp, chan); } - lp->port_wwn = ini; + lp->port_wwn = wwpn; + change++; + } + if (VALID_INI(wwnn) && lp->node_wwn != wwnn) { + if (!VALID_INI(lp->node_wwn)) { + isp_prt(isp, ISP_LOGTINFO, + "Chan %d PortID 0x%06x handle 0x%x " + "gets WWNN 0x%016llxx", + chan, lp->portid, nphdl, + (unsigned long long) wwnn); + } else if (lp->port_wwn != wwnn) { + isp_prt(isp, ISP_LOGTINFO, + "Chan %d PortID 0x%06x handle 0x%x " + "changes WWNN 0x%016llx to 0x%016llx", + chan, lp->portid, nphdl, + (unsigned long long) lp->node_wwn, + (unsigned long long) wwnn); + } + lp->node_wwn = wwnn; change++; } if (prli_params != 0 && lp->prli_word3 != prli_params) { @@ -2531,7 +2550,7 @@ isp_add_wwn_entry(ispsoftc_t *isp, int c isp_prt(isp, ISP_LOGTINFO|ISP_LOGWARN, "Chan %d WWPN 0x%016llx PortID 0x%06x handle 0x%x " "-- no room in port database", - chan, (unsigned long long) ini, s_id, nphdl); + chan, (unsigned long long) wwpn, s_id, nphdl); if (isp->isp_dblev & (ISP_LOGTINFO|ISP_LOGWARN)) isp_dump_portdb(isp, chan); return; @@ -2542,14 +2561,15 @@ isp_add_wwn_entry(ispsoftc_t *isp, int c ISP_MEMZERO(lp, sizeof (fcportdb_t)); lp->handle = nphdl; lp->portid = s_id; - lp->port_wwn = ini; + lp->port_wwn = wwpn; + lp->node_wwn = wwnn; lp->prli_word3 = (prli_params != 0) ? prli_params : PRLI_WD3_INITIATOR_FUNCTION; lp->state = FC_PORTDB_STATE_VALID; isp_gen_role_str(buf, sizeof (buf), lp->prli_word3); isp_prt(isp, ISP_LOGTINFO, "Chan %d WWPN 0x%016llx " "PortID 0x%06x handle 0x%x vtgt %d %s added", chan, - (unsigned long long) ini, s_id, nphdl, i, buf); + (unsigned long long) wwpn, s_id, nphdl, i, buf); /* Notify above levels about new port arrival. */ isp_async(isp, ISPASYNC_DEV_ARRIVED, chan, lp); @@ -2559,21 +2579,21 @@ isp_add_wwn_entry(ispsoftc_t *isp, int c * Remove a target device to the port database */ void -isp_del_wwn_entry(ispsoftc_t *isp, int chan, uint64_t ini, uint16_t nphdl, uint32_t s_id) +isp_del_wwn_entry(ispsoftc_t *isp, int chan, uint64_t wwpn, uint16_t nphdl, uint32_t s_id) { fcparam *fcp; fcportdb_t *lp; if (nphdl >= MAX_NPORT_HANDLE) { isp_prt(isp, ISP_LOGWARN, "Chan %d WWPN 0x%016llx PortID 0x%06x bad handle 0x%x", - chan, (unsigned long long) ini, s_id, nphdl); + chan, (unsigned long long) wwpn, s_id, nphdl); return; } fcp = FCPARAM(isp, chan); if (isp_find_pdb_by_handle(isp, chan, nphdl, &lp) == 0) { isp_prt(isp, ISP_LOGWARN, "Chan %d WWPN 0x%016llx PortID 0x%06x handle 0x%x cannot be found to be deleted", - chan, (unsigned long long) ini, s_id, nphdl); + chan, (unsigned long long) wwpn, s_id, nphdl); isp_dump_portdb(isp, chan); return; } @@ -3468,7 +3488,7 @@ isp_put_notify_24xx(ispsoftc_t *isp, in_ ISP_IOXPUT_16(isp, src->in_srr_rxid, &dst->in_srr_rxid); ISP_IOXPUT_16(isp, src->in_status, &dst->in_status); ISP_IOXPUT_8(isp, src->in_status_subcode, &dst->in_status_subcode); - ISP_IOXPUT_16(isp, src->in_reserved2, &dst->in_reserved2); + ISP_IOXPUT_8(isp, src->in_fwhandle, &dst->in_fwhandle); ISP_IOXPUT_32(isp, src->in_rxid, &dst->in_rxid); ISP_IOXPUT_16(isp, src->in_srr_reloff_hi, &dst->in_srr_reloff_hi); ISP_IOXPUT_16(isp, src->in_srr_reloff_lo, &dst->in_srr_reloff_lo); @@ -3531,7 +3551,7 @@ isp_get_notify_24xx(ispsoftc_t *isp, in_ ISP_IOXGET_16(isp, &src->in_srr_rxid, dst->in_srr_rxid); ISP_IOXGET_16(isp, &src->in_status, dst->in_status); ISP_IOXGET_8(isp, &src->in_status_subcode, dst->in_status_subcode); - ISP_IOXGET_16(isp, &src->in_reserved2, dst->in_reserved2); + ISP_IOXGET_8(isp, &src->in_fwhandle, dst->in_fwhandle); ISP_IOXGET_32(isp, &src->in_rxid, dst->in_rxid); ISP_IOXGET_16(isp, &src->in_srr_reloff_hi, dst->in_srr_reloff_hi); ISP_IOXGET_16(isp, &src->in_srr_reloff_lo, dst->in_srr_reloff_lo); @@ -3650,7 +3670,7 @@ isp_put_notify_24xx_ack(ispsoftc_t *isp, ISP_IOXPUT_16(isp, src->na_srr_rxid, &dst->na_srr_rxid); ISP_IOXPUT_16(isp, src->na_status, &dst->na_status); ISP_IOXPUT_8(isp, src->na_status_subcode, &dst->na_status_subcode); - ISP_IOXPUT_16(isp, src->na_reserved2, &dst->na_reserved2); + ISP_IOXPUT_8(isp, src->na_fwhandle, &dst->na_fwhandle); ISP_IOXPUT_32(isp, src->na_rxid, &dst->na_rxid); ISP_IOXPUT_16(isp, src->na_srr_reloff_hi, &dst->na_srr_reloff_hi); ISP_IOXPUT_16(isp, src->na_srr_reloff_lo, &dst->na_srr_reloff_lo); @@ -3721,7 +3741,7 @@ isp_get_notify_ack_24xx(ispsoftc_t *isp, ISP_IOXGET_16(isp, &src->na_srr_rxid, dst->na_srr_rxid); ISP_IOXGET_16(isp, &src->na_status, dst->na_status); ISP_IOXGET_8(isp, &src->na_status_subcode, dst->na_status_subcode); - ISP_IOXGET_16(isp, &src->na_reserved2, dst->na_reserved2); + ISP_IOXGET_8(isp, &src->na_fwhandle, dst->na_fwhandle); ISP_IOXGET_32(isp, &src->na_rxid, dst->na_rxid); ISP_IOXGET_16(isp, &src->na_srr_reloff_hi, dst->na_srr_reloff_hi); ISP_IOXGET_16(isp, &src->na_srr_reloff_lo, dst->na_srr_reloff_lo); Modified: head/sys/dev/isp/isp_library.h ============================================================================== --- head/sys/dev/isp/isp_library.h Fri Oct 23 15:56:17 2015 (r289837) +++ head/sys/dev/isp/isp_library.h Fri Oct 23 16:54:24 2015 (r289838) @@ -171,7 +171,7 @@ int isp_find_pdb_by_wwn(ispsoftc_t *, in int isp_find_pdb_by_handle(ispsoftc_t *, int, uint32_t, fcportdb_t **); int isp_find_pdb_by_sid(ispsoftc_t *, int, uint32_t, fcportdb_t **); void isp_find_chan_by_did(ispsoftc_t *, uint32_t, uint16_t *); -void isp_add_wwn_entry(ispsoftc_t *, int, uint64_t, uint16_t, uint32_t, uint16_t); +void isp_add_wwn_entry(ispsoftc_t *, int, uint64_t, uint64_t, uint16_t, uint32_t, uint16_t); void isp_del_wwn_entry(ispsoftc_t *, int, uint64_t, uint16_t, uint32_t); void isp_del_all_wwn_entries(ispsoftc_t *, int); void isp_del_wwn_entries(ispsoftc_t *, isp_notify_t *); Modified: head/sys/dev/isp/isp_target.c ============================================================================== --- head/sys/dev/isp/isp_target.c Fri Oct 23 15:56:17 2015 (r289837) +++ head/sys/dev/isp/isp_target.c Fri Oct 23 16:54:24 2015 (r289838) @@ -1079,6 +1079,7 @@ isp_notify_ack(ispsoftc_t *isp, void *ar na->na_flags = in->in_flags; na->na_status = in->in_status; na->na_status_subcode = in->in_status_subcode; + na->na_fwhandle = in->in_fwhandle; na->na_rxid = in->in_rxid; na->na_oxid = in->in_oxid; na->na_vpidx = in->in_vpidx; Modified: head/sys/dev/isp/ispmbox.h ============================================================================== --- head/sys/dev/isp/ispmbox.h Fri Oct 23 15:56:17 2015 (r289837) +++ head/sys/dev/isp/ispmbox.h Fri Oct 23 16:54:24 2015 (r289838) @@ -1812,7 +1812,7 @@ typedef struct { uint16_t in_srr_rxid; uint16_t in_status; uint8_t in_status_subcode; - uint8_t in_reserved2; + uint8_t in_fwhandle; uint32_t in_rxid; uint16_t in_srr_reloff_lo; uint16_t in_srr_reloff_hi; @@ -1845,6 +1845,8 @@ typedef struct { #define IN24XX_FLAG_PUREX_IOCB 0x1 #define IN24XX_FLAG_GLOBAL_LOGOUT 0x2 #define IN24XX_FLAG_NPHDL_VALID 0x4 +#define IN24XX_FLAG_N2N_PRLI 0x8 +#define IN24XX_FLAG_PN_NN_VALID 0x10 #define IN24XX_LIP_RESET 0x0E #define IN24XX_LINK_RESET 0x0F @@ -1862,6 +1864,8 @@ typedef struct { * the WWNN/WWPN if the ELS is PLOGI, PDISC or ADISC. The WWN is in * Big Endian format. */ +#define IN24XX_PRLI_WWNN_OFF 0x18 +#define IN24XX_PRLI_WWPN_OFF 0x28 #define IN24XX_PLOGI_WWNN_OFF 0x20 #define IN24XX_PLOGI_WWPN_OFF 0x28 @@ -1965,7 +1969,7 @@ typedef struct { uint16_t na_srr_rxid; uint16_t na_status; uint8_t na_status_subcode; - uint8_t na_reserved2; + uint8_t na_fwhandle; uint32_t na_rxid; uint16_t na_srr_reloff_lo; uint16_t na_srr_reloff_hi; From owner-svn-src-all@freebsd.org Fri Oct 23 17:24: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 89F45A1D14A; Fri, 23 Oct 2015 17:24:35 +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 53267E43; Fri, 23 Oct 2015 17:24:35 +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 t9NHOYF2051013; Fri, 23 Oct 2015 17:24:34 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NHOYcs051012; Fri, 23 Oct 2015 17:24:34 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510231724.t9NHOYcs051012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Oct 2015 17:24:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289839 - head/usr.bin X-SVN-Group: head MIME-Version: 1.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, 23 Oct 2015 17:24:35 -0000 Author: bdrewery Date: Fri Oct 23 17:24:34 2015 New Revision: 289839 URL: https://svnweb.freebsd.org/changeset/base/289839 Log: dtc needs to be installed if MK_GPL_DTC is not set, which doesn't fit into the SUBDIR.yes pattern well. This fixes installation of the BSDL dtc after r288904. Reported by: jhibbits Discussed with: imp Sponsored by: EMC / Isilon Storage Division Modified: head/usr.bin/Makefile Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Fri Oct 23 16:54:24 2015 (r289838) +++ head/usr.bin/Makefile Fri Oct 23 17:24:34 2015 (r289839) @@ -209,7 +209,9 @@ SUBDIR.${MK_GAMES}+= number SUBDIR.${MK_GAMES}+= pom SUBDIR.${MK_GAMES}+= primes SUBDIR.${MK_GAMES}+= random -SUBDIR.${MK_GPL_DTC}+= dtc +.if ${MK_GPL_DTC} != "yes" +SUBDIR+= dtc +.endif SUBDIR.${MK_GROFF}+= vgrind SUBDIR.${MK_HESIOD}+= hesinfo SUBDIR.${MK_ICONV}+= iconv From owner-svn-src-all@freebsd.org Fri Oct 23 17: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 3EEDEA1D240; Fri, 23 Oct 2015 17:30:43 +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 0E881169; Fri, 23 Oct 2015 17:30:42 +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 t9NHUgeD051362; Fri, 23 Oct 2015 17:30:42 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NHUgee051361; Fri, 23 Oct 2015 17:30:42 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510231730.t9NHUgee051361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 23 Oct 2015 17:30:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289840 - head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 17:30:43 -0000 Author: emaste Date: Fri Oct 23 17:30:41 2015 New Revision: 289840 URL: https://svnweb.freebsd.org/changeset/base/289840 Log: lldb: Add arm64 FreeBSD ProcessMonitor register context This is an adaptation of upstream LLDB commit r251088. Sponsored by: The FreeBSD Foundation Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/POSIXThread.cpp Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/POSIXThread.cpp ============================================================================== --- head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/POSIXThread.cpp Fri Oct 23 17:24:34 2015 (r289839) +++ head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/POSIXThread.cpp Fri Oct 23 17:30:41 2015 (r289840) @@ -36,6 +36,7 @@ #include "RegisterContextPOSIXProcessMonitor_powerpc.h" #include "RegisterContextPOSIXProcessMonitor_x86.h" #include "Plugins/Process/Utility/RegisterContextFreeBSD_arm.h" +#include "Plugins/Process/Utility/RegisterContextFreeBSD_arm64.h" #include "Plugins/Process/Utility/RegisterContextFreeBSD_i386.h" #include "Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h" #include "Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.h" @@ -160,6 +161,9 @@ POSIXThread::GetRegisterContext() case llvm::Triple::FreeBSD: switch (target_arch.GetMachine()) { + case llvm::Triple::aarch64: + reg_interface = new RegisterContextFreeBSD_arm64(target_arch); + break; case llvm::Triple::arm: reg_interface = new RegisterContextFreeBSD_arm(target_arch); break; From owner-svn-src-all@freebsd.org Fri Oct 23 17:35: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 D2B15A1D3AD; Fri, 23 Oct 2015 17:35:04 +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 9E1247A1; Fri, 23 Oct 2015 17:35:04 +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 t9NHZ3Bm054064; Fri, 23 Oct 2015 17:35:03 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NHZ3Gh054063; Fri, 23 Oct 2015 17:35:03 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201510231735.t9NHZ3Gh054063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 23 Oct 2015 17:35:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289841 - 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: Fri, 23 Oct 2015 17:35:04 -0000 Author: avos Date: Fri Oct 23 17:35:03 2015 New Revision: 289841 URL: https://svnweb.freebsd.org/changeset/base/289841 Log: run(4): convert to ieee80211_tx_complete() Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D3992 Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Fri Oct 23 17:30:41 2015 (r289840) +++ head/sys/dev/usb/wlan/if_run.c Fri Oct 23 17:35:03 2015 (r289841) @@ -3030,20 +3030,11 @@ static void run_tx_free(struct run_endpoint_queue *pq, struct run_tx_data *data, int txerr) { - if (data->m != NULL) { - if (data->m->m_flags & M_TXCB) - ieee80211_process_callback(data->ni, data->m, - txerr ? ETIMEDOUT : 0); - m_freem(data->m); - data->m = NULL; - if (data->ni == NULL) { - DPRINTF("no node\n"); - } else { - ieee80211_free_node(data->ni); - data->ni = NULL; - } - } + ieee80211_tx_complete(data->ni, data->m, txerr); + + data->m = NULL; + data->ni = NULL; STAILQ_INSERT_TAIL(&pq->tx_fh, data, next); pq->tx_nfree++; From owner-svn-src-all@freebsd.org Fri Oct 23 17:38: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 4CA80A1D443; Fri, 23 Oct 2015 17:38:05 +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 D0F9D989; Fri, 23 Oct 2015 17:38:04 +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 t9NHc3fJ054258; Fri, 23 Oct 2015 17:38:03 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NHc2k3054238; Fri, 23 Oct 2015 17:38:02 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201510231738.t9NHc2k3054238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Fri, 23 Oct 2015 17:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289842 - in head: contrib/bmake contrib/bmake/mk contrib/bmake/unit-tests usr.bin/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: Fri, 23 Oct 2015 17:38:05 -0000 Author: sjg Date: Fri Oct 23 17:38:01 2015 New Revision: 289842 URL: https://svnweb.freebsd.org/changeset/base/289842 Log: Merge bmake 20151020 Added: head/contrib/bmake/metachar.c - copied unchanged from r289724, vendor/NetBSD/bmake/dist/metachar.c head/contrib/bmake/metachar.h - copied unchanged from r289724, vendor/NetBSD/bmake/dist/metachar.h Modified: head/contrib/bmake/ChangeLog head/contrib/bmake/FILES head/contrib/bmake/Makefile head/contrib/bmake/arch.c head/contrib/bmake/compat.c head/contrib/bmake/cond.c head/contrib/bmake/configure.in head/contrib/bmake/for.c head/contrib/bmake/job.c head/contrib/bmake/main.c head/contrib/bmake/make-bootstrap.sh.in head/contrib/bmake/make.c head/contrib/bmake/make.h head/contrib/bmake/meta.c head/contrib/bmake/mk/ChangeLog head/contrib/bmake/mk/auto.obj.mk head/contrib/bmake/mk/dirdeps.mk head/contrib/bmake/mk/doc.mk head/contrib/bmake/mk/gendirdeps.mk head/contrib/bmake/mk/host-target.mk head/contrib/bmake/mk/install-mk head/contrib/bmake/mk/meta.autodep.mk head/contrib/bmake/mk/meta.stage.mk head/contrib/bmake/mk/meta.sys.mk head/contrib/bmake/mk/own.mk head/contrib/bmake/mk/rst2htm.mk head/contrib/bmake/nonints.h head/contrib/bmake/os.sh head/contrib/bmake/parse.c head/contrib/bmake/suff.c head/contrib/bmake/unit-tests/varmisc.exp head/contrib/bmake/unit-tests/varmisc.mk head/contrib/bmake/var.c head/usr.bin/bmake/Makefile Directory Properties: head/contrib/bmake/ (props changed) Modified: head/contrib/bmake/ChangeLog ============================================================================== --- head/contrib/bmake/ChangeLog Fri Oct 23 17:35:03 2015 (r289841) +++ head/contrib/bmake/ChangeLog Fri Oct 23 17:38:01 2015 (r289842) @@ -1,3 +1,40 @@ +2015-10-20 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20151020 + Merge with NetBSD make, pick up + o var.c: fix uninitialized var + +2015-10-12 Simon J. Gerraty + + * var.c: the conditional expressions used with ':?' can be + expensive, if already discarding do not evaluate or expand + anything. + +2015-10-10 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20151010 + Merge with NetBSD make, pick up + o Add Boolean wantit flag to Var_Subst and Var_Parse + when FALSE we know we are discarding the result and can + skip operations like Cmd_Exec. + +2015-10-09 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20151009 + Merge with NetBSD make, pick up + o var.c: don't check for NULL before free() + o meta.c: meta_oodate, do not hard code ignore of makeDependfile + +2015-09-10 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150910 + Merge with NetBSD make, pick up + o main.c: with -w print Enter/Leaving messages for objdir too + if necessary. + o centralize shell metachar handling + + * FILES: add metachar.[ch] + 2015-06-06 Simon J. Gerraty * Makefile (MAKE_VERSION): 20150606 Modified: head/contrib/bmake/FILES ============================================================================== --- head/contrib/bmake/FILES Fri Oct 23 17:35:03 2015 (r289841) +++ head/contrib/bmake/FILES Fri Oct 23 17:38:01 2015 (r289842) @@ -71,6 +71,8 @@ make_malloc.h makefile.in meta.c meta.h +metachar.c +metachar.h missing/sys/cdefs.h mkdeps.sh nonints.h Modified: head/contrib/bmake/Makefile ============================================================================== --- head/contrib/bmake/Makefile Fri Oct 23 17:35:03 2015 (r289841) +++ head/contrib/bmake/Makefile Fri Oct 23 17:38:01 2015 (r289842) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.39 2015/06/07 15:54:37 sjg Exp $ +# $Id: Makefile,v 1.44 2015/10/20 21:41:40 sjg Exp $ # Base version on src date -MAKE_VERSION= 20150606 +MAKE_VERSION= 20151020 PROG= bmake @@ -18,6 +18,7 @@ SRCS= \ make.c \ make_malloc.c \ meta.c \ + metachar.c \ parse.c \ str.c \ strlist.c \ Modified: head/contrib/bmake/arch.c ============================================================================== --- head/contrib/bmake/arch.c Fri Oct 23 17:35:03 2015 (r289841) +++ head/contrib/bmake/arch.c Fri Oct 23 17:38:01 2015 (r289842) @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.63 2012/06/12 19:21:50 joerg Exp $ */ +/* $NetBSD: arch.c,v 1.64 2015/10/11 04:51:24 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: arch.c,v 1.63 2012/06/12 19:21:50 joerg Exp $"; +static char rcsid[] = "$NetBSD: arch.c,v 1.64 2015/10/11 04:51:24 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: arch.c,v 1.63 2012/06/12 19:21:50 joerg Exp $"); +__RCSID("$NetBSD: arch.c,v 1.64 2015/10/11 04:51:24 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -310,7 +310,7 @@ Arch_ParseArchive(char **linePtr, Lst no void *freeIt; char *result; - result = Var_Parse(cp, ctxt, TRUE, &length, &freeIt); + result = Var_Parse(cp, ctxt, TRUE, TRUE, &length, &freeIt); if (freeIt) free(freeIt); if (result == var_Error) { @@ -325,7 +325,7 @@ Arch_ParseArchive(char **linePtr, Lst no *cp++ = '\0'; if (subLibName) { - libName = Var_Subst(NULL, libName, ctxt, TRUE); + libName = Var_Subst(NULL, libName, ctxt, TRUE, TRUE); } @@ -351,7 +351,7 @@ Arch_ParseArchive(char **linePtr, Lst no void *freeIt; char *result; - result = Var_Parse(cp, ctxt, TRUE, &length, &freeIt); + result = Var_Parse(cp, ctxt, TRUE, TRUE, &length, &freeIt); if (freeIt) free(freeIt); if (result == var_Error) { @@ -404,7 +404,7 @@ Arch_ParseArchive(char **linePtr, Lst no char *oldMemName = memName; size_t sz; - memName = Var_Subst(NULL, memName, ctxt, TRUE); + memName = Var_Subst(NULL, memName, ctxt, TRUE, TRUE); /* * Now form an archive spec and recurse to deal with nested Modified: head/contrib/bmake/compat.c ============================================================================== --- head/contrib/bmake/compat.c Fri Oct 23 17:35:03 2015 (r289841) +++ head/contrib/bmake/compat.c Fri Oct 23 17:38:01 2015 (r289842) @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $ */ +/* $NetBSD: compat.c,v 1.101 2015/10/11 04:51:24 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.101 2015/10/11 04:51:24 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $"); +__RCSID("$NetBSD: compat.c,v 1.101 2015/10/11 04:51:24 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -111,37 +111,14 @@ __RCSID("$NetBSD: compat.c,v 1.96 2014/0 #include "hash.h" #include "dir.h" #include "job.h" +#include "metachar.h" #include "pathnames.h" -/* - * The following array is used to make a fast determination of which - * characters are interpreted specially by the shell. If a command - * contains any of these characters, it is executed by the shell, not - * directly by us. - */ - -static char meta[256]; static GNode *curTarg = NULL; static GNode *ENDNode; static void CompatInterrupt(int); -static void -Compat_Init(void) -{ - const char *cp; - - Shell_Init(); /* setup default shell */ - - for (cp = "~#=|^(){};&<>*?[]:$`\\\n"; *cp != '\0'; cp++) { - meta[(unsigned char) *cp] = 1; - } - /* - * The null character serves as a sentinel in the string. - */ - meta[0] = 1; -} - /*- *----------------------------------------------------------------------- * CompatInterrupt -- @@ -236,7 +213,7 @@ CompatRunCommand(void *cmdp, void *gnp) doIt = FALSE; cmdNode = Lst_Member(gn->commands, cmd); - cmdStart = Var_Subst(NULL, cmd, gn, FALSE); + cmdStart = Var_Subst(NULL, cmd, gn, FALSE, TRUE); /* * brk_string will return an argv with a NULL in av[0], thus causing @@ -271,8 +248,8 @@ CompatRunCommand(void *cmdp, void *gnp) break; case '+': doIt = TRUE; - if (!meta[0]) /* we came here from jobs */ - Compat_Init(); + if (!shellName) /* we came here from jobs */ + Shell_Init(); break; } cmd++; @@ -300,11 +277,13 @@ CompatRunCommand(void *cmdp, void *gnp) * Search for meta characters in the command. If there are no meta * characters, there's no need to execute a shell to execute the * command. + * + * Additionally variable assignments and empty commands + * go to the shell. Therefore treat '=' and ':' like shell + * meta characters as documented in make(1). */ - for (cp = cmd; !meta[(unsigned char)*cp]; cp++) { - continue; - } - useShell = (*cp != '\0'); + + useShell = needshell(cmd, FALSE); #endif /* @@ -512,8 +491,8 @@ Compat_Make(void *gnp, void *pgnp) GNode *gn = (GNode *)gnp; GNode *pgn = (GNode *)pgnp; - if (!meta[0]) /* we came here from jobs */ - Compat_Init(); + if (!shellName) /* we came here from jobs */ + Shell_Init(); if (gn->made == UNMADE && (gn == pgn || (pgn->type & OP_MADE) == 0)) { /* * First mark ourselves to be made, then apply whatever transformations @@ -693,7 +672,8 @@ Compat_Run(Lst targs) GNode *gn = NULL;/* Current root target */ int errors; /* Number of targets not remade due to errors */ - Compat_Init(); + if (!shellName) + Shell_Init(); if (bmake_signal(SIGINT, SIG_IGN) != SIG_IGN) { bmake_signal(SIGINT, CompatInterrupt); Modified: head/contrib/bmake/cond.c ============================================================================== --- head/contrib/bmake/cond.c Fri Oct 23 17:35:03 2015 (r289841) +++ head/contrib/bmake/cond.c Fri Oct 23 17:38:01 2015 (r289842) @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.68 2015/05/05 21:51:09 sjg Exp $ */ +/* $NetBSD: cond.c,v 1.69 2015/10/11 04:51:24 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: cond.c,v 1.68 2015/05/05 21:51:09 sjg Exp $"; +static char rcsid[] = "$NetBSD: cond.c,v 1.69 2015/10/11 04:51:24 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: cond.c,v 1.68 2015/05/05 21:51:09 sjg Exp $"); +__RCSID("$NetBSD: cond.c,v 1.69 2015/10/11 04:51:24 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -289,7 +289,7 @@ CondGetArg(char **linePtr, char **argPtr int len; void *freeIt; - cp2 = Var_Parse(cp, VAR_CMD, TRUE, &len, &freeIt); + cp2 = Var_Parse(cp, VAR_CMD, TRUE, TRUE, &len, &freeIt); Buf_AddBytes(&buf, strlen(cp2), cp2); if (freeIt) free(freeIt); @@ -571,7 +571,7 @@ CondGetString(Boolean doEval, Boolean *q case '$': /* if we are in quotes, then an undefined variable is ok */ str = Var_Parse(condExpr, VAR_CMD, (qt ? 0 : doEval), - &len, freeIt); + TRUE, &len, freeIt); if (str == var_Error) { if (*freeIt) { free(*freeIt); @@ -823,7 +823,7 @@ get_mpt_arg(char **linePtr, char **argPt /* We do all the work here and return the result as the length */ *argPtr = NULL; - val = Var_Parse(cp - 1, VAR_CMD, FALSE, &length, &freeIt); + val = Var_Parse(cp - 1, VAR_CMD, FALSE, TRUE, &length, &freeIt); /* * Advance *linePtr to beyond the closing ). Note that * we subtract one because 'length' is calculated from 'cp - 1'. Modified: head/contrib/bmake/configure.in ============================================================================== --- head/contrib/bmake/configure.in Fri Oct 23 17:35:03 2015 (r289841) +++ head/contrib/bmake/configure.in Fri Oct 23 17:38:01 2015 (r289842) @@ -1,11 +1,11 @@ dnl dnl RCSid: -dnl $Id: configure.in,v 1.53 2014/11/06 01:49:40 sjg Exp $ +dnl $Id: configure.in,v 1.54 2015/10/10 04:17:10 sjg Exp $ dnl dnl Process this file with autoconf to produce a configure script dnl AC_PREREQ(2.50) -AC_INIT([bmake], [20140214], [sjg@NetBSD.org]) +AC_INIT([bmake], [20151009], [sjg@NetBSD.org]) AC_CONFIG_HEADERS(config.h) dnl make srcdir absolute @@ -105,6 +105,7 @@ AC_CHECK_HEADERS( \ ar.h \ err.h \ fcntl.h \ + limits.h \ paths.h \ poll.h \ ranlib.h \ Modified: head/contrib/bmake/for.c ============================================================================== --- head/contrib/bmake/for.c Fri Oct 23 17:35:03 2015 (r289841) +++ head/contrib/bmake/for.c Fri Oct 23 17:38:01 2015 (r289842) @@ -1,4 +1,4 @@ -/* $NetBSD: for.c,v 1.49 2012/06/03 04:29:40 sjg Exp $ */ +/* $NetBSD: for.c,v 1.50 2015/10/11 04:51:24 sjg Exp $ */ /* * Copyright (c) 1992, The Regents of the University of California. @@ -30,14 +30,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: for.c,v 1.49 2012/06/03 04:29:40 sjg Exp $"; +static char rcsid[] = "$NetBSD: for.c,v 1.50 2015/10/11 04:51:24 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)for.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: for.c,v 1.49 2012/06/03 04:29:40 sjg Exp $"); +__RCSID("$NetBSD: for.c,v 1.50 2015/10/11 04:51:24 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -216,7 +216,7 @@ For_Eval(char *line) * We can't do the escapes here - because we don't know whether * we are substuting into ${...} or $(...). */ - sub = Var_Subst(NULL, ptr, VAR_GLOBAL, FALSE); + sub = Var_Subst(NULL, ptr, VAR_GLOBAL, FALSE, TRUE); /* * Split into words allowing for quoted strings. Modified: head/contrib/bmake/job.c ============================================================================== --- head/contrib/bmake/job.c Fri Oct 23 17:35:03 2015 (r289841) +++ head/contrib/bmake/job.c Fri Oct 23 17:38:01 2015 (r289842) @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.180 2015/04/16 13:31:03 joerg Exp $ */ +/* $NetBSD: job.c,v 1.181 2015/10/11 04:51:24 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.180 2015/04/16 13:31:03 joerg Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.181 2015/10/11 04:51:24 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.180 2015/04/16 13:31:03 joerg Exp $"); +__RCSID("$NetBSD: job.c,v 1.181 2015/10/11 04:51:24 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -731,7 +731,7 @@ JobPrintCommand(void *cmdp, void *jobp) numCommands += 1; - cmdStart = cmd = Var_Subst(NULL, cmd, job->node, FALSE); + cmdStart = cmd = Var_Subst(NULL, cmd, job->node, FALSE, TRUE); cmdTemplate = "%s\n"; @@ -919,7 +919,7 @@ JobPrintCommand(void *cmdp, void *jobp) static int JobSaveCommand(void *cmd, void *gn) { - cmd = Var_Subst(NULL, (char *)cmd, (GNode *)gn, FALSE); + cmd = Var_Subst(NULL, (char *)cmd, (GNode *)gn, FALSE, TRUE); (void)Lst_AtEnd(postCommands->commands, cmd); return(0); } @@ -2211,7 +2211,8 @@ Job_SetPrefix(void) Var_Set(MAKE_JOB_PREFIX, "---", VAR_GLOBAL, 0); } - targPrefix = Var_Subst(NULL, "${" MAKE_JOB_PREFIX "}", VAR_GLOBAL, 0); + targPrefix = Var_Subst(NULL, "${" MAKE_JOB_PREFIX "}", + VAR_GLOBAL, FALSE, TRUE); } /*- Modified: head/contrib/bmake/main.c ============================================================================== --- head/contrib/bmake/main.c Fri Oct 23 17:35:03 2015 (r289841) +++ head/contrib/bmake/main.c Fri Oct 23 17:38:01 2015 (r289842) @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.232 2015/03/26 22:20:42 sjg Exp $ */ +/* $NetBSD: main.c,v 1.234 2015/10/11 04:51:24 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.232 2015/03/26 22:20:42 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.234 2015/10/11 04:51:24 sjg Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.232 2015/03/26 22:20:42 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.234 2015/10/11 04:51:24 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -172,6 +172,7 @@ Boolean keepgoing; /* -k flag */ Boolean queryFlag; /* -q flag */ Boolean touchFlag; /* -t flag */ Boolean enterFlag; /* -w flag */ +Boolean enterFlagObj; /* -w and objdir != srcdir */ Boolean ignoreErrors; /* -i flag */ Boolean beSilent; /* -s flag */ Boolean oldVars; /* variable substitution style */ @@ -722,7 +723,7 @@ Main_SetObjdir(const char *path) /* expand variable substitutions */ if (strchr(path, '$') != 0) { snprintf(buf, MAXPATHLEN, "%s", path); - path = p = Var_Subst(NULL, buf, VAR_GLOBAL, 0); + path = p = Var_Subst(NULL, buf, VAR_GLOBAL, FALSE, TRUE); } if (path[0] != '/') { @@ -741,6 +742,8 @@ Main_SetObjdir(const char *path) setenv("PWD", objdir, 1); Dir_InitDot(); rc = TRUE; + if (enterFlag && strcmp(objdir, curdir) != 0) + enterFlagObj = TRUE; } } @@ -803,7 +806,8 @@ MakeMode(const char *mode) char *mp = NULL; if (!mode) - mode = mp = Var_Subst(NULL, "${" MAKE_MODE ":tl}", VAR_GLOBAL, 0); + mode = mp = Var_Subst(NULL, "${" MAKE_MODE ":tl}", + VAR_GLOBAL, FALSE, TRUE); if (mode && *mode) { if (strstr(mode, "compat")) { @@ -1249,7 +1253,7 @@ main(int argc, char **argv) (char *)Lst_Datum(ln)); } else { p1 = Var_Subst(NULL, "${" MAKEFILE_PREFERENCE "}", - VAR_CMD, 0); + VAR_CMD, FALSE, TRUE); if (p1) { (void)str2Lst_Append(makefiles, p1, NULL); (void)Lst_Find(makefiles, NULL, ReadMakefile); @@ -1260,12 +1264,15 @@ main(int argc, char **argv) /* In particular suppress .depend for '-r -V .OBJDIR -f /dev/null' */ if (!noBuiltins || !printVars) { makeDependfile = Var_Subst(NULL, "${.MAKE.DEPENDFILE:T}", - VAR_CMD, 0); + VAR_CMD, FALSE, TRUE); doing_depend = TRUE; (void)ReadMakefile(makeDependfile, NULL); doing_depend = FALSE; } + if (enterFlagObj) + printf("%s: Entering directory `%s'\n", progname, objdir); + MakeMode(NULL); Var_Append("MFLAGS", Var_Value(MAKEFLAGS, VAR_GLOBAL, &p1), VAR_GLOBAL); @@ -1295,7 +1302,7 @@ main(int argc, char **argv) */ static char VPATH[] = "${VPATH}"; - vpath = Var_Subst(NULL, VPATH, VAR_CMD, FALSE); + vpath = Var_Subst(NULL, VPATH, VAR_CMD, FALSE, TRUE); path = vpath; do { /* skip to end of directory */ @@ -1342,14 +1349,16 @@ main(int argc, char **argv) char *value; if (strchr(var, '$')) { - value = p1 = Var_Subst(NULL, var, VAR_GLOBAL, 0); + value = p1 = Var_Subst(NULL, var, VAR_GLOBAL, + FALSE, TRUE); } else if (expandVars) { char tmp[128]; if (snprintf(tmp, sizeof(tmp), "${%s}", var) >= (int)(sizeof(tmp))) Fatal("%s: variable name too big: %s", progname, var); - value = p1 = Var_Subst(NULL, tmp, VAR_GLOBAL, 0); + value = p1 = Var_Subst(NULL, tmp, VAR_GLOBAL, + FALSE, TRUE); } else { value = Var_Value(var, VAR_GLOBAL, &p1); } @@ -1406,6 +1415,8 @@ main(int argc, char **argv) Trace_Log(MAKEEND, 0); + if (enterFlagObj) + printf("%s: Leaving directory `%s'\n", progname, objdir); if (enterFlag) printf("%s: Leaving directory `%s'\n", progname, curdir); @@ -1885,7 +1896,7 @@ PrintOnError(GNode *gn, const char *s) } strncpy(tmp, "${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'\n@}", sizeof(tmp) - 1); - cp = Var_Subst(NULL, tmp, VAR_GLOBAL, 0); + cp = Var_Subst(NULL, tmp, VAR_GLOBAL, FALSE, TRUE); if (cp) { if (*cp) printf("%s", cp); @@ -1914,7 +1925,7 @@ Main_ExportMAKEFLAGS(Boolean first) strncpy(tmp, "${.MAKEFLAGS} ${.MAKEOVERRIDES:O:u:@v@$v=${$v:Q}@}", sizeof(tmp)); - s = Var_Subst(NULL, tmp, VAR_CMD, 0); + s = Var_Subst(NULL, tmp, VAR_CMD, FALSE, TRUE); if (s && *s) { #ifdef POSIX setenv("MAKEFLAGS", s, 1); @@ -1936,7 +1947,8 @@ getTmpdir(void) * Honor $TMPDIR but only if it is valid. * Ensure it ends with /. */ - tmpdir = Var_Subst(NULL, "${TMPDIR:tA:U" _PATH_TMP "}/", VAR_GLOBAL, 0); + tmpdir = Var_Subst(NULL, "${TMPDIR:tA:U" _PATH_TMP "}/", VAR_GLOBAL, + FALSE, TRUE); if (stat(tmpdir, &st) < 0 || !S_ISDIR(st.st_mode)) { free(tmpdir); tmpdir = bmake_strdup(_PATH_TMP); @@ -1991,7 +2003,7 @@ getBoolean(const char *name, Boolean bf) char *cp; if (snprintf(tmp, sizeof(tmp), "${%s:tl}", name) < (int)(sizeof(tmp))) { - cp = Var_Subst(NULL, tmp, VAR_GLOBAL, 0); + cp = Var_Subst(NULL, tmp, VAR_GLOBAL, FALSE, TRUE); if (cp) { switch(*cp) { Modified: head/contrib/bmake/make-bootstrap.sh.in ============================================================================== --- head/contrib/bmake/make-bootstrap.sh.in Fri Oct 23 17:35:03 2015 (r289841) +++ head/contrib/bmake/make-bootstrap.sh.in Fri Oct 23 17:38:01 2015 (r289842) @@ -52,7 +52,7 @@ do_link() { } BASE_OBJECTS="arch.o buf.o compat.o cond.o dir.o for.o getopt hash.o \ -job.o make.o make_malloc.o parse.o sigcompat.o str.o strlist.o \ +job.o make.o make_malloc.o metachar.o parse.o sigcompat.o str.o strlist.o \ suff.o targ.o trace.o var.o util.o" LST_OBJECTS="lstAppend.o lstDupl.o lstInit.o lstOpen.o \ Modified: head/contrib/bmake/make.c ============================================================================== --- head/contrib/bmake/make.c Fri Oct 23 17:35:03 2015 (r289841) +++ head/contrib/bmake/make.c Fri Oct 23 17:38:01 2015 (r289842) @@ -1,4 +1,4 @@ -/* $NetBSD: make.c,v 1.91 2014/10/18 08:33:30 snj Exp $ */ +/* $NetBSD: make.c,v 1.92 2015/10/11 04:51:24 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: make.c,v 1.91 2014/10/18 08:33:30 snj Exp $"; +static char rcsid[] = "$NetBSD: make.c,v 1.92 2015/10/11 04:51:24 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)make.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: make.c,v 1.91 2014/10/18 08:33:30 snj Exp $"); +__RCSID("$NetBSD: make.c,v 1.92 2015/10/11 04:51:24 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -485,7 +485,7 @@ Make_HandleUse(GNode *cgn, GNode *pgn) if (gn->name) free(gn->name); } - gn->name = Var_Subst(NULL, gn->uname, pgn, FALSE); + gn->name = Var_Subst(NULL, gn->uname, pgn, FALSE, TRUE); if (gn->name && gn->uname && strcmp(gn->name, gn->uname) != 0) { /* See if we have a target for this node. */ tgn = Targ_FindNode(gn->name, TARG_NOCREATE); Modified: head/contrib/bmake/make.h ============================================================================== --- head/contrib/bmake/make.h Fri Oct 23 17:35:03 2015 (r289841) +++ head/contrib/bmake/make.h Fri Oct 23 17:38:01 2015 (r289842) @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.95 2014/09/07 20:55:34 joerg Exp $ */ +/* $NetBSD: make.h,v 1.96 2015/09/21 21:50:16 pooka Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -519,8 +519,15 @@ int str2Lst_Append(Lst, char *, const ch #define MAX(a, b) ((a > b) ? a : b) #endif +/* At least GNU/Hurd systems lack hardcoded MAXPATHLEN/PATH_MAX */ +#ifdef HAVE_LIMITS_H +#include +#endif #ifndef MAXPATHLEN -#define MAXPATHLEN BMAKE_PATH_MAX +#define MAXPATHLEN BMAKE_PATH_MAX +#endif +#ifndef PATH_MAX +#define PATH_MAX MAXPATHLEN #endif #endif /* _MAKE_H_ */ Modified: head/contrib/bmake/meta.c ============================================================================== --- head/contrib/bmake/meta.c Fri Oct 23 17:35:03 2015 (r289841) +++ head/contrib/bmake/meta.c Fri Oct 23 17:38:01 2015 (r289842) @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.38 2015/04/11 05:24:30 sjg Exp $ */ +/* $NetBSD: meta.c,v 1.40 2015/10/11 04:51:24 sjg Exp $ */ /* * Implement 'meta' mode. @@ -324,7 +324,7 @@ is_submake(void *cmdp, void *gnp) } cp = strchr(cmd, '$'); if ((cp)) { - mp = Var_Subst(NULL, cmd, gn, FALSE); + mp = Var_Subst(NULL, cmd, gn, FALSE, TRUE); cmd = mp; } cp2 = strstr(cmd, p_make); @@ -367,7 +367,7 @@ printCMD(void *cmdp, void *mfpp) char *cp = NULL; if (strchr(cmd, '$')) { - cmd = cp = Var_Subst(NULL, cmd, mfp->gn, FALSE); + cmd = cp = Var_Subst(NULL, cmd, mfp->gn, FALSE, TRUE); } fprintf(mfp->fp, "CMD %s\n", cmd); if (cp) @@ -462,7 +462,7 @@ meta_create(BuildMon *pbm, GNode *gn) char *mp; /* Describe the target we are building */ - mp = Var_Subst(NULL, "${" MAKE_META_PREFIX "}", gn, 0); + mp = Var_Subst(NULL, "${" MAKE_META_PREFIX "}", gn, FALSE, TRUE); if (*mp) fprintf(stdout, "%s\n", mp); free(mp); @@ -605,7 +605,8 @@ meta_mode_init(const char *make_mode) * We consider ourselves master of all within ${.MAKE.META.BAILIWICK} */ metaBailiwick = Lst_Init(FALSE); - cp = Var_Subst(NULL, "${.MAKE.META.BAILIWICK:O:u:tA}", VAR_GLOBAL, 0); + cp = Var_Subst(NULL, "${.MAKE.META.BAILIWICK:O:u:tA}", VAR_GLOBAL, + FALSE, TRUE); if (cp) { str2Lst_Append(metaBailiwick, cp, NULL); } @@ -616,7 +617,8 @@ meta_mode_init(const char *make_mode) Var_Append(MAKE_META_IGNORE_PATHS, "/dev /etc /proc /tmp /var/run /var/tmp ${TMPDIR}", VAR_GLOBAL); cp = Var_Subst(NULL, - "${" MAKE_META_IGNORE_PATHS ":O:u:tA}", VAR_GLOBAL, 0); + "${" MAKE_META_IGNORE_PATHS ":O:u:tA}", VAR_GLOBAL, + FALSE, TRUE); if (cp) { str2Lst_Append(metaIgnorePaths, cp, NULL); } @@ -727,7 +729,8 @@ meta_job_output(Job *job, char *cp, cons if (!meta_prefix) { char *cp2; - meta_prefix = Var_Subst(NULL, "${" MAKE_META_PREFIX "}", VAR_GLOBAL, 0); + meta_prefix = Var_Subst(NULL, "${" MAKE_META_PREFIX "}", + VAR_GLOBAL, FALSE, TRUE); if ((cp2 = strchr(meta_prefix, '$'))) meta_prefix_len = cp2 - meta_prefix; else @@ -1209,16 +1212,6 @@ meta_oodate(GNode *gn, Boolean oodate) break; } - if ((cp = strrchr(p, '/'))) { - cp++; - /* - * We don't normally expect to see this, - * but we do expect it to change. - */ - if (strcmp(cp, makeDependfile) == 0) - break; - } - /* * The rest of the record is the file name. * Check if it's not an absolute path. @@ -1322,7 +1315,7 @@ meta_oodate(GNode *gn, Boolean oodate) if (DEBUG(META)) fprintf(debug_file, "%s: %d: cannot compare command using .OODATE\n", fname, lineno); } - cmd = Var_Subst(NULL, cmd, gn, TRUE); + cmd = Var_Subst(NULL, cmd, gn, TRUE, TRUE); if ((cp = strchr(cmd, '\n'))) { int n; Copied: head/contrib/bmake/metachar.c (from r289724, vendor/NetBSD/bmake/dist/metachar.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/bmake/metachar.c Fri Oct 23 17:38:01 2015 (r289842, copy of r289724, vendor/NetBSD/bmake/dist/metachar.c) @@ -0,0 +1,88 @@ +/* $NetBSD: metachar.c,v 1.5 2015/06/19 08:03:35 mlelstv Exp $ */ + +/*- + * Copyright (c) 2015 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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. + */ + +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +#endif + +#if defined(MAKE_NATIVE) || defined(HAVE_NBTOOL_CONFIG_H) +#include +#endif + +#if defined(__RCSID) && !defined(lint) +__RCSID("$NetBSD: metachar.c,v 1.5 2015/06/19 08:03:35 mlelstv Exp $"); +#endif + +#include "metachar.h" +/* + * The following array is used to make a fast determination of which + * characters are interpreted specially by the shell. If a command + * contains any of these characters, it is executed by the shell, not + * directly by us. + * + * perhaps move it to ctype? + */ + +unsigned char _metachar[128] = { +// nul soh stx etx eot enq ack bel + 1, 0, 0, 0, 0, 0, 0, 0, +// bs ht nl vt np cr so si + 0, 0, 1, 0, 0, 0, 0, 0, +// dle dc1 dc2 dc3 dc4 nak syn etb + 0, 0, 0, 0, 0, 0, 0, 0, +// can em sub esc fs gs rs us + 0, 0, 0, 0, 0, 0, 0, 0, +// sp ! " # $ % & ' + 0, 1, 1, 1, 1, 0, 1, 1, +// ( ) * + , - . / + 1, 1, 1, 0, 0, 0, 0, 0, +// 0 1 2 3 4 5 6 7 + 0, 0, 0, 0, 0, 0, 0, 0, +// 8 9 : ; < = > ? + 0, 0, 0, 1, 1, 0, 1, 1, +// @ A B C D E F G + 0, 0, 0, 0, 0, 0, 0, 0, +// H I J K L M N O + 0, 0, 0, 0, 0, 0, 0, 0, +// P Q R S T U V W + 0, 0, 0, 0, 0, 0, 0, 0, +// X Y Z [ \ ] ^ _ + 0, 0, 0, 1, 1, 1, 1, 0, +// ` a b c d e f g + 1, 0, 0, 0, 0, 0, 0, 0, +// h i j k l m n o + 0, 0, 0, 0, 0, 0, 0, 0, +// p q r s t u v w + 0, 0, 0, 0, 0, 0, 0, 0, +// x y z { | } ~ del + 0, 0, 0, 1, 1, 1, 1, 0, +}; + Copied: head/contrib/bmake/metachar.h (from r289724, vendor/NetBSD/bmake/dist/metachar.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/bmake/metachar.h Fri Oct 23 17:38:01 2015 (r289842, copy of r289724, vendor/NetBSD/bmake/dist/metachar.h) @@ -0,0 +1,61 @@ +/* $NetBSD: metachar.h,v 1.4 2015/06/21 20:26:02 christos Exp $ */ + +/*- + * Copyright (c) 2015 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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. + */ +#ifndef _METACHAR_H +#define _METACHAR_H + +#include + +extern unsigned char _metachar[]; + +#define ismeta(c) _metachar[(c) & 0x7f] + +static inline int +hasmeta(const char *cmd) +{ + while (!ismeta(*cmd)) + cmd++; + + return *cmd != '\0'; +} + +static inline int +needshell(const char *cmd, int white) +{ + while (!ismeta(*cmd) && *cmd != ':' && *cmd != '=') { + if (white && isspace((unsigned char)*cmd)) + break; + cmd++; + } + + return *cmd != '\0'; +} + +#endif /* _METACHAR_H */ Modified: head/contrib/bmake/mk/ChangeLog ============================================================================== --- head/contrib/bmake/mk/ChangeLog Fri Oct 23 17:35:03 2015 (r289841) +++ head/contrib/bmake/mk/ChangeLog Fri Oct 23 17:38:01 2015 (r289842) @@ -1,3 +1,48 @@ +2015-10-20 Simon J. Gerraty + + * install-mk (MK_VERSION): 20151020 + + * dirdeps.mk: Add logic for + make -f dirdeps.mk some/dir.${TARGET_SPEC} + +2015-10-14 Simon J. Gerraty + + * install-mk (MK_VERSION): 20151010 + +2015-10-02 Simon J. Gerraty + + * meta.stage.mk: use staging: ${STAGE_TARGETS:... + to have stage_lins run last in non-jobs mode. + Use .ORDER only for jobs mode. + +2015-09-02 Simon J. Gerraty + + * rst2htm.mk: allow for per target flags etc. + +2015-09-01 Simon J. Gerraty + + * install-mk (MK_VERSION): 20150901 + + * doc.mk: create dir if needed use DOC_INSTALL_OWN + +2015-06-15 Simon J. Gerraty + + * install-mk (MK_VERSION): 20150615 + + * auto.obj.mk: allow use of MAKEOBJDIRPREFIX too. + Follow make's normal precedence rules. + + * gendirdeps.mk: allow customization of the header. + eg. for FreeBSD: + GENDIRDEPS_HEADER= echo '\# ${FreeBSD:L:@v@$$$v$$ @:M*F*}'; + + * meta.autodep.mk: ignore dirdeps.cache* + + * meta.stage.mk: when bootstrapping options it can be handy to + throw warnings rather than errors for staging conflicts. + + * meta.sys.mk: include local.meta.sys.mk for customization + 2015-06-06 Simon J. Gerraty * install-mk (MK_VERSION): 20150606 Modified: head/contrib/bmake/mk/auto.obj.mk ============================================================================== --- head/contrib/bmake/mk/auto.obj.mk Fri Oct 23 17:35:03 2015 (r289841) +++ head/contrib/bmake/mk/auto.obj.mk Fri Oct 23 17:38:01 2015 (r289842) @@ -1,4 +1,4 @@ -# $Id: auto.obj.mk,v 1.10 2015/04/16 16:59:00 sjg Exp $ +# $Id: auto.obj.mk,v 1.11 2015/06/16 06:28:21 sjg Exp $ # # @(#) Copyright (c) 2004, Simon J. Gerraty # @@ -40,7 +40,10 @@ MKOBJDIRS= auto .if !defined(NOOBJ) && !defined(NO_OBJ) && ${MKOBJDIRS:Uno} == auto # Use __objdir here so it is easier to tweak without impacting # the logic. -__objdir?= ${MAKEOBJDIR} +.if !empty(MAKEOBJDIRPREFIX) && exists(${MAKEOBJDIRPREFIX}) +__objdir?= ${MAKEOBJDIRPREFIX}${.CURDIR} +.endif +__objdir?= ${MAKEOBJDIR:Uobj} __objdir:= ${__objdir:tA} .if ${.OBJDIR} != ${__objdir} # We need to chdir, make the directory if needed Modified: head/contrib/bmake/mk/dirdeps.mk ============================================================================== --- head/contrib/bmake/mk/dirdeps.mk Fri Oct 23 17:35:03 2015 (r289841) +++ head/contrib/bmake/mk/dirdeps.mk Fri Oct 23 17:38:01 2015 (r289842) @@ -1,4 +1,4 @@ -# $Id: dirdeps.mk,v 1.54 2015/06/08 20:55:11 sjg Exp $ +# $Id: dirdeps.mk,v 1.55 2015/10/20 22:04:53 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -242,6 +242,21 @@ DEP_${TARGET_SPEC_VARS:[$i]} := ${_tspec DEP_MACHINE := ${_DEP_TARGET_SPEC} .endif +.if ${MAKEFILE:T} == ${.PARSEFILE} && empty(DIRDEPS) && ${.TARGETS:Uall:M*/*} != "" +# This little trick let's us do +# +# mk -f dirdeps.mk some/dir.${TARGET_SPEC} +# +all: +${.TARGETS:Nall}: all +DIRDEPS := ${.TARGETS:M*/*} +# so that -DNO_DIRDEPS works +DEP_RELDIR := ${DIRDEPS:R:[1]} +# disable DIRDEPS_CACHE as it does not like this trick +MK_DIRDEPS_CACHE = no +.endif + + # pickup customizations # as below you can use !target(_DIRDEP_USE) to protect things # which should only be done once. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Oct 23 18:34: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 04B12A1D040; Fri, 23 Oct 2015 18:34: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 CF5D7BE2; Fri, 23 Oct 2015 18:34:19 +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 t9NIYImK071466; Fri, 23 Oct 2015 18:34:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NIYIlT071459; Fri, 23 Oct 2015 18:34:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510231834.t9NIYIlT071459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 23 Oct 2015 18:34:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289843 - in head/sys: cam/ctl cam/scsi 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: Fri, 23 Oct 2015 18:34:20 -0000 Author: mav Date: Fri Oct 23 18:34:18 2015 New Revision: 289843 URL: https://svnweb.freebsd.org/changeset/base/289843 Log: Add partial support for QUERY TMF to CAM and isp(4). This change allows to decode respective functions in isp(4) in target mode and pass them through CAM to CTL. Unfortunately neither CAM nor isp(4) support returning response info for those task management functions now. On the other side I just have no initiator to test this functionality. Modified: head/sys/cam/ctl/scsi_ctl.c head/sys/cam/scsi/scsi_message.h head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_stds.h head/sys/dev/isp/isp_target.c head/sys/dev/isp/isp_target.h Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Fri Oct 23 17:38:01 2015 (r289842) +++ head/sys/cam/ctl/scsi_ctl.c Fri Oct 23 18:34:18 2015 (r289843) @@ -1459,24 +1459,31 @@ ctlfedone(struct cam_periph *periph, uni CTL_TASK_ABORT_TASK_SET; break; case MSG_TARGET_RESET: - io->taskio.task_action = - CTL_TASK_TARGET_RESET; + io->taskio.task_action = CTL_TASK_TARGET_RESET; break; case MSG_ABORT_TASK: - io->taskio.task_action = - CTL_TASK_ABORT_TASK; + io->taskio.task_action = CTL_TASK_ABORT_TASK; break; case MSG_LOGICAL_UNIT_RESET: - io->taskio.task_action = - CTL_TASK_LUN_RESET; + io->taskio.task_action = CTL_TASK_LUN_RESET; break; case MSG_CLEAR_TASK_SET: io->taskio.task_action = - CTL_TASK_CLEAR_TASK_SET; + CTL_TASK_CLEAR_TASK_SET; break; case MSG_CLEAR_ACA: + io->taskio.task_action = CTL_TASK_CLEAR_ACA; + break; + case MSG_QUERY_TASK: + io->taskio.task_action = CTL_TASK_QUERY_TASK; + break; + case MSG_QUERY_TASK_SET: + io->taskio.task_action = + CTL_TASK_QUERY_TASK_SET; + break; + case MSG_QUERY_ASYNC_EVENT: io->taskio.task_action = - CTL_TASK_CLEAR_ACA; + CTL_TASK_QUERY_ASYNC_EVENT; break; case MSG_NOOP: send_ctl_io = 0; Modified: head/sys/cam/scsi/scsi_message.h ============================================================================== --- head/sys/cam/scsi/scsi_message.h Fri Oct 23 17:38:01 2015 (r289842) +++ head/sys/cam/scsi/scsi_message.h Fri Oct 23 18:34:18 2015 (r289843) @@ -68,3 +68,9 @@ #define MSG_EXT_PPR_QAS_REQ 0x04 #define MSG_EXT_PPR_DT_REQ 0x02 #define MSG_EXT_PPR_IU_REQ 0x01 + +/* Fake messages not defined for SPI, but needed for other transports */ +#define MSG_QUERY_TASK 0x100 +#define MSG_QUERY_TASK_SET 0x101 +#define MSG_QUERY_ASYNC_EVENT 0x102 + Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Fri Oct 23 17:38:01 2015 (r289842) +++ head/sys/dev/isp/isp_freebsd.c Fri Oct 23 18:34:18 2015 (r289843) @@ -3484,6 +3484,12 @@ isp_handle_platform_target_tmf(ispsoftc_ case NT_TARGET_RESET: inot->arg = MSG_TARGET_RESET; break; + case NT_QUERY_TASK_SET: + inot->arg = MSG_QUERY_TASK_SET; + break; + case NT_QUERY_ASYNC_EVENT: + inot->arg = MSG_QUERY_ASYNC_EVENT; + break; default: isp_prt(isp, ISP_LOGWARN, "%s: unknown TMF code 0x%x for chan %d lun %#jx", __func__, notify->nt_ncode, notify->nt_channel, (uintmax_t)lun); goto bad; @@ -5877,6 +5883,8 @@ changed: case NT_CLEAR_TASK_SET: case NT_LUN_RESET: case NT_TARGET_RESET: + case NT_QUERY_TASK_SET: + case NT_QUERY_ASYNC_EVENT: /* * These are task management functions. */ Modified: head/sys/dev/isp/isp_stds.h ============================================================================== --- head/sys/dev/isp/isp_stds.h Fri Oct 23 17:38:01 2015 (r289842) +++ head/sys/dev/isp/isp_stds.h Fri Oct 23 18:34:18 2015 (r289843) @@ -97,8 +97,10 @@ typedef struct { #define FCP_CMND_TMF_CLEAR_ACA 0x40 #define FCP_CMND_TMF_TGT_RESET 0x20 #define FCP_CMND_TMF_LUN_RESET 0x10 +#define FCP_CMND_TMF_QUERY_ASYNC_EVENT 0x08 #define FCP_CMND_TMF_CLEAR_TASK_SET 0x04 #define FCP_CMND_TMF_ABORT_TASK_SET 0x02 +#define FCP_CMND_TMF_QUERY_TASK_SET 0x01 /* * Basic CT IU Header Modified: head/sys/dev/isp/isp_target.c ============================================================================== --- head/sys/dev/isp/isp_target.c Fri Oct 23 17:38:01 2015 (r289842) +++ head/sys/dev/isp/isp_target.c Fri Oct 23 18:34:18 2015 (r289843) @@ -1024,12 +1024,18 @@ isp_got_tmf_24xx(ispsoftc_t *isp, at7_en notify.nt_sid = sid; notify.nt_did = did; notify.nt_channel = chan; - if (aep->at_cmnd.fcp_cmnd_task_management & FCP_CMND_TMF_ABORT_TASK_SET) { + if (aep->at_cmnd.fcp_cmnd_task_management & FCP_CMND_TMF_QUERY_TASK_SET) { + isp_prt(isp, ISP_LOGINFO, f1, "QUERY TASK SET", sid, notify.nt_lun, aep->at_rxid); + notify.nt_ncode = NT_QUERY_TASK_SET; + } else if (aep->at_cmnd.fcp_cmnd_task_management & FCP_CMND_TMF_ABORT_TASK_SET) { isp_prt(isp, ISP_LOGINFO, f1, "ABORT TASK SET", sid, notify.nt_lun, aep->at_rxid); notify.nt_ncode = NT_ABORT_TASK_SET; } else if (aep->at_cmnd.fcp_cmnd_task_management & FCP_CMND_TMF_CLEAR_TASK_SET) { isp_prt(isp, ISP_LOGINFO, f1, "CLEAR TASK SET", sid, notify.nt_lun, aep->at_rxid); notify.nt_ncode = NT_CLEAR_TASK_SET; + } else if (aep->at_cmnd.fcp_cmnd_task_management & FCP_CMND_TMF_QUERY_ASYNC_EVENT) { + isp_prt(isp, ISP_LOGINFO, f1, "QUERY ASYNC EVENT", sid, notify.nt_lun, aep->at_rxid); + notify.nt_ncode = NT_QUERY_ASYNC_EVENT; } else if (aep->at_cmnd.fcp_cmnd_task_management & FCP_CMND_TMF_LUN_RESET) { isp_prt(isp, ISP_LOGINFO, f1, "LUN RESET", sid, notify.nt_lun, aep->at_rxid); notify.nt_ncode = NT_LUN_RESET; Modified: head/sys/dev/isp/isp_target.h ============================================================================== --- head/sys/dev/isp/isp_target.h Fri Oct 23 17:38:01 2015 (r289842) +++ head/sys/dev/isp/isp_target.h Fri Oct 23 18:34:18 2015 (r289843) @@ -51,7 +51,9 @@ typedef enum { NT_LOGOUT, NT_GLOBAL_LOGOUT, NT_CHANGED, - NT_HBA_RESET + NT_HBA_RESET, + NT_QUERY_TASK_SET, + NT_QUERY_ASYNC_EVENT } isp_ncode_t; typedef struct isp_notify { From owner-svn-src-all@freebsd.org Fri Oct 23 19:28: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 CC4EFA1D86B; Fri, 23 Oct 2015 19:28:16 +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 7D817271; Fri, 23 Oct 2015 19:28:16 +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 t9NJSFHi086446; Fri, 23 Oct 2015 19:28:15 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NJSFpL086445; Fri, 23 Oct 2015 19:28:15 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201510231928.t9NJSFpL086445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 23 Oct 2015 19:28:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289844 - vendor-crypto/openssl/dist-1.0.1 X-SVN-Group: vendor-crypto MIME-Version: 1.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, 23 Oct 2015 19:28:16 -0000 Author: jkim Date: Fri Oct 23 19:28:15 2015 New Revision: 289844 URL: https://svnweb.freebsd.org/changeset/base/289844 Log: Copy over r285327 to create new vendor branch for OpenSSL 1.0.1 maintenance. Added: vendor-crypto/openssl/dist-1.0.1/ - copied from r289843, vendor-crypto/openssl/dist/ From owner-svn-src-all@freebsd.org Fri Oct 23 19: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 43B25A1D88F; Fri, 23 Oct 2015 19:28:26 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC6A33E0; Fri, 23 Oct 2015 19:28:25 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9NJSPrY086496; Fri, 23 Oct 2015 19:28:25 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NJSPqA086495; Fri, 23 Oct 2015 19:28:25 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201510231928.t9NJSPqA086495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 23 Oct 2015 19:28:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289845 - head/sbin/savecore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 19:28:26 -0000 Author: asomers Date: Fri Oct 23 19:28:24 2015 New Revision: 289845 URL: https://svnweb.freebsd.org/changeset/base/289845 Log: Fix various Coverity issues in sbin/savecore/savecore.c: CID1009429: Fix unchecked return value from lseek while clearing dump CID1007781: Fix file descriptor leak in DoFile CID1007261: Don't send potentially unterminated string to syslog(3) Coverity CID: 1009429 Coverity CID: 1007781 Coverity CID: 1007261 MFC after: 2 weeks Sponsored by: Spectra Logic Differential Revision: https://reviews.freebsd.org/D3991 Modified: head/sbin/savecore/savecore.c Modified: head/sbin/savecore/savecore.c ============================================================================== --- head/sbin/savecore/savecore.c Fri Oct 23 19:28:15 2015 (r289844) +++ head/sbin/savecore/savecore.c Fri Oct 23 19:28:24 2015 (r289845) @@ -606,7 +606,8 @@ DoFile(const char *savedir, const char * } if (kdhl.panicstring[0]) - syslog(LOG_ALERT, "reboot after panic: %s", kdhl.panicstring); + syslog(LOG_ALERT, "reboot after panic: %*s", + (int)sizeof(kdhl.panicstring), kdhl.panicstring); else syslog(LOG_ALERT, "reboot"); @@ -657,7 +658,7 @@ DoFile(const char *savedir, const char * if (info == NULL) { syslog(LOG_ERR, "fdopen failed: %m"); nerr++; - goto closefd; + goto closeall; } xostyle = xo_get_style(NULL); @@ -665,7 +666,7 @@ DoFile(const char *savedir, const char * if (xoinfo == NULL) { syslog(LOG_ERR, "%s: %m", infoname); nerr++; - goto closefd; + goto closeall; } xo_open_container_h(xoinfo, "crashdump"); @@ -726,9 +727,8 @@ nuke: if (verbose) printf("clearing dump header\n"); memcpy(kdhl.magic, KERNELDUMPMAGIC_CLEARED, sizeof kdhl.magic); - lseek(fd, lasthd, SEEK_SET); - error = write(fd, &kdhl, sizeof kdhl); - if (error != sizeof kdhl) + if (lseek(fd, lasthd, SEEK_SET) != lasthd || + write(fd, &kdhl, sizeof(kdhl)) != sizeof(kdhl)) syslog(LOG_ERR, "error while clearing the dump header: %m"); } From owner-svn-src-all@freebsd.org Fri Oct 23 19:42: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 EE44EA1DB60; Fri, 23 Oct 2015 19:41:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9787D4F; Fri, 23 Oct 2015 19:41: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 t9NJfwCO091890; Fri, 23 Oct 2015 19:41:58 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NJfwhb091889; Fri, 23 Oct 2015 19:41:58 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510231941.t9NJfwhb091889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Oct 2015 19:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289846 - 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: Fri, 23 Oct 2015 19:42:00 -0000 Author: bdrewery Date: Fri Oct 23 19:41:58 2015 New Revision: 289846 URL: https://svnweb.freebsd.org/changeset/base/289846 Log: Fix regression from r289734 that caused crunchgen "subdirs" to not be properly recursed. The .for loop was defining a ${__dir} variable that was being set at a different evaluation time than the target itself, so every 'cd ${__dir}' became the last value that was in ${__dir}. This resulted in 'make obj' not properly being ran in the tree that would leave .depend files scattered around when 'make all' was ran in rescue/. To fix this, define a CRUNCH_SRCDIR_* for every prog if it does not already have one and then use that variable in every relevant place. This allows simplifying some logic as well. Reported by: emaste X-MFC-With: r289734 MFC after: 3 weeks 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 Fri Oct 23 19:28:24 2015 (r289845) +++ head/share/mk/bsd.crunchgen.mk Fri Oct 23 19:41:58 2015 (r289846) @@ -50,15 +50,18 @@ CLEANFILES+= ${CONF} *.o *.lo *.c *.mk * # Don't try to extract debug info from ${PROG}. MK_DEBUG_FILES= no +# Set a default SRCDIR for each for simpler handling below. +.for D in ${CRUNCH_SRCDIRS} +.for P in ${CRUNCH_PROGS_${D}} +CRUNCH_SRCDIR_${P}?= ${.CURDIR}/../../${D}/${P} +.endfor +.endfor + # Program names and their aliases contribute hardlinks to 'rescue' executable, # except for those that get suppressed. .for D in ${CRUNCH_SRCDIRS} .for P in ${CRUNCH_PROGS_${D}} -.ifdef CRUNCH_SRCDIR_${P} ${OUTPUTS}: ${CRUNCH_SRCDIR_${P}}/Makefile -.else -${OUTPUTS}: ${.CURDIR}/../../${D}/${P}/Makefile -.endif .if ${CRUNCH_GENERATE_LINKS} == "yes" .ifndef CRUNCH_SUPPRESS_LINK_${P} LINKS+= ${BINDIR}/${PROG} ${BINDIR}/${P} @@ -89,11 +92,7 @@ ${CONF}: Makefile .for D in ${CRUNCH_SRCDIRS} .for P in ${CRUNCH_PROGS_${D}} echo progs ${P} >>${.TARGET} -.ifdef CRUNCH_SRCDIR_${P} echo special ${P} srcdir ${CRUNCH_SRCDIR_${P}} >>${.TARGET} -.else - echo special ${P} srcdir ${.CURDIR}/../../${D}/${P} >>${.TARGET} -.endif .ifdef CRUNCH_BUILDOPTS_${P} echo special ${P} buildopts DIRPRFX=${DIRPRFX}${P}/ \ ${CRUNCH_BUILDOPTS_${P}} >>${.TARGET} @@ -138,13 +137,8 @@ build-tools: build-tools-${_tool} .for __target in clean cleandepend cleandir obj objlink .for D in ${CRUNCH_SRCDIRS} .for P in ${CRUNCH_PROGS_${D}} -.ifdef CRUNCH_SRCDIR_${P} -__dir= ${CRUNCH_SRCDIR_${P}} -.else -__dir= ${.CURDIR}/../../${D}/${P} -.endif ${__target}_crunchdir_${P}: .PHONY .MAKE - ${_+_}cd ${__dir} && \ + ${_+_}cd ${CRUNCH_SRCDIR_${P}} && \ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${__target} ${__target}: ${__target}_crunchdir_${P} From owner-svn-src-all@freebsd.org Fri Oct 23 19:44: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 52FF1A1DC85; Fri, 23 Oct 2015 19:44:08 +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 3C8F2F1C; Fri, 23 Oct 2015 19:44:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 3567215B5; Fri, 23 Oct 2015 19:44:08 +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 E531313CC0; Fri, 23 Oct 2015 19:44:07 +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 fQfWgKFToxwk; Fri, 23 Oct 2015 19:44:05 +0000 (UTC) Subject: Re: svn commit: r289846 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com BF13013CB4 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510231941.t9NJfwhb091889@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <562A8E02.1090208@FreeBSD.org> Date: Fri, 23 Oct 2015 12:44:02 -0700 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: <201510231941.t9NJfwhb091889@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fu5EBVgewpcQ6MfdevVhl8HTv1I90DVWe" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 19:44:08 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fu5EBVgewpcQ6MfdevVhl8HTv1I90DVWe Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/23/2015 12:41 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Fri Oct 23 19:41:58 2015 > New Revision: 289846 > URL: https://svnweb.freebsd.org/changeset/base/289846 >=20 > Log: > Fix regression from r289734 that caused crunchgen "subdirs" to not be= > properly recursed. > =20 =2E.. > This resulted in 'make obj' > not properly being ran in the tree that would leave .depend files > scattered around when 'make all' was ran in rescue/. Sorry about this. It mostly only impacted 'make universe'. If you've been running one or ran one since 10/21 then you may have .depend or object files in your src tree to cleanup. 'make cleandepend' and 'make clean' from the top-level do work to clean this up, you just lose objects too. --=20 Regards, Bryan Drewery --fu5EBVgewpcQ6MfdevVhl8HTv1I90DVWe 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 iQEcBAEBAgAGBQJWKo4FAAoJEDXXcbtuRpfPwLMH/2KQDjIWA18QM1j7EpCnuPxI lej6BA2IY8WWm6ylpD2QlE2vdkWZ4l32vPOFH+3oCFuUr8iYBpCgHlr0Oo4ktfRx sjU23ScEz4xBfl3OCZcXXdMtrow8qin1E1j+WsQ8Yqkz4u9cA/K65MFYUl6qvRJN bcVm7NV7v2BPWf3iId2ij2gC9UWJKgUbqAg9xrEJiky2wqvAelmeK/9MeFyOr2Ul fSk/NSu/i/ivYwxgEXAofs+nn131Af2OXOg4rT/VmEtemDxmdPZ6osZzs+DjfM1N oIfx7AhLDwefrPCifuZi3V1kRpmjUsZ0CLaqxyaTCEAMrM+XYBJYyNGWpsyWd3Y= =W6zo -----END PGP SIGNATURE----- --fu5EBVgewpcQ6MfdevVhl8HTv1I90DVWe-- From owner-svn-src-all@freebsd.org Fri Oct 23 19:45: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 8ABFCA1DCDB; Fri, 23 Oct 2015 19:45:23 +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 57179CB; Fri, 23 Oct 2015 19:45:23 +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 t9NJjMSo092074; Fri, 23 Oct 2015 19:45:22 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NJjMVp092073; Fri, 23 Oct 2015 19:45:22 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201510231945.t9NJjMVp092073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 23 Oct 2015 19:45:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r289847 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 19:45:23 -0000 Author: jkim Date: Fri Oct 23 19:45:22 2015 New Revision: 289847 URL: https://svnweb.freebsd.org/changeset/base/289847 Log: Temporarily remove size limit restriction in order to import OpenSSL 1.0.2d. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Fri Oct 23 19:41:58 2015 (r289846) +++ svnadmin/conf/sizelimit.conf Fri Oct 23 19:45:22 2015 (r289847) @@ -33,7 +33,7 @@ gonzo imp jb jeff -#jkim +jkim kmacy lstewart #ngie From owner-svn-src-all@freebsd.org Fri Oct 23 19:46: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 7985FA1DD16; Fri, 23 Oct 2015 19:46:04 +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 E993A20C; Fri, 23 Oct 2015 19:46:03 +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 t9NJk3wq092147; Fri, 23 Oct 2015 19:46:03 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NJk2XX092143; Fri, 23 Oct 2015 19:46:02 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201510231946.t9NJk2XX092143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 23 Oct 2015 19:46:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289848 - in vendor-crypto/openssl/dist: . apps crypto crypto/aes crypto/aes/asm crypto/asn1 crypto/bio crypto/bn crypto/bn/asm crypto/buffer crypto/camellia crypto/camellia/asm crypto/... X-SVN-Group: vendor-crypto MIME-Version: 1.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, 23 Oct 2015 19:46:04 -0000 Author: jkim Date: Fri Oct 23 19:46:02 2015 New Revision: 289848 URL: https://svnweb.freebsd.org/changeset/base/289848 Log: Import OpenSSL 1.0.2d. Added: vendor-crypto/openssl/dist/crypto/aes/asm/aesni-mb-x86_64.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/aes/asm/aesni-sha256-x86_64.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/aes/asm/aesp8-ppc.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/aes/asm/aest4-sparcv9.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/aes/asm/aesv8-armx.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/aes/asm/bsaes-armv7.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/aes/asm/vpaes-ppc.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/arm64cpuid.S (contents, props changed) vendor-crypto/openssl/dist/crypto/bn/asm/mips3.s (contents, props changed) vendor-crypto/openssl/dist/crypto/bn/asm/rsaz-avx2.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/bn/asm/rsaz-x86_64.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/bn/asm/sparct4-mont.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/bn/asm/sparcv9-gf2m.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/bn/asm/vis3-mont.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/bn/rsaz_exp.c (contents, props changed) vendor-crypto/openssl/dist/crypto/bn/rsaz_exp.h (contents, props changed) vendor-crypto/openssl/dist/crypto/camellia/asm/cmllt4-sparcv9.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/cms/cms_kari.c (contents, props changed) vendor-crypto/openssl/dist/crypto/des/asm/dest4-sparcv9.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/dh/dh_kdf.c (contents, props changed) vendor-crypto/openssl/dist/crypto/dh/dh_rfc5114.c (contents, props changed) vendor-crypto/openssl/dist/crypto/ec/asm/ vendor-crypto/openssl/dist/crypto/ec/asm/ecp_nistz256-avx2.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/ec/asm/ecp_nistz256-x86_64.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/ec/ecp_nistz256.c (contents, props changed) vendor-crypto/openssl/dist/crypto/ec/ecp_nistz256_table.c (contents, props changed) vendor-crypto/openssl/dist/crypto/ecdh/ech_kdf.c (contents, props changed) vendor-crypto/openssl/dist/crypto/evp/e_aes_cbc_hmac_sha256.c (contents, props changed) vendor-crypto/openssl/dist/crypto/md5/asm/md5-sparcv9.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/modes/asm/aesni-gcm-x86_64.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/modes/asm/ghashp8-ppc.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/modes/asm/ghashv8-armx.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/modes/wrap128.c (contents, props changed) vendor-crypto/openssl/dist/crypto/perlasm/sparcv9_modes.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/ppc_arch.h (contents, props changed) vendor-crypto/openssl/dist/crypto/sha/asm/sha1-armv8.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/sha/asm/sha1-mb-x86_64.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/sha/asm/sha256-mb-x86_64.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/sha/asm/sha512-armv8.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/sha/asm/sha512p8-ppc.pl (contents, props changed) vendor-crypto/openssl/dist/crypto/sparc_arch.h (contents, props changed) vendor-crypto/openssl/dist/crypto/x509/vpm_int.h (contents, props changed) vendor-crypto/openssl/dist/crypto/x509v3/v3_scts.c (contents, props changed) vendor-crypto/openssl/dist/crypto/x509v3/v3nametest.c (contents, props changed) vendor-crypto/openssl/dist/doc/crypto/ASN1_TIME_set.pod vendor-crypto/openssl/dist/doc/crypto/EC_GFp_simple_method.pod vendor-crypto/openssl/dist/doc/crypto/EC_GROUP_copy.pod vendor-crypto/openssl/dist/doc/crypto/EC_GROUP_new.pod vendor-crypto/openssl/dist/doc/crypto/EC_KEY_new.pod vendor-crypto/openssl/dist/doc/crypto/EC_POINT_add.pod vendor-crypto/openssl/dist/doc/crypto/EC_POINT_new.pod vendor-crypto/openssl/dist/doc/crypto/OPENSSL_instrument_bus.pod vendor-crypto/openssl/dist/doc/crypto/SSLeay_version.pod vendor-crypto/openssl/dist/doc/crypto/X509_check_host.pod vendor-crypto/openssl/dist/doc/crypto/d2i_ECPKParameters.pod vendor-crypto/openssl/dist/doc/crypto/ec.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CONF_CTX_new.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CONF_CTX_set1_prefix.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CONF_CTX_set_flags.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CONF_CTX_set_ssl_ctx.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CONF_cmd.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CONF_cmd_argv.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_add1_chain_cert.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_get0_param.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_set1_curves.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_set1_verify_cert_store.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_set_cert_cb.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_set_custom_cli_ext.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_use_serverinfo.pod vendor-crypto/openssl/dist/ssl/ssl_conf.c (contents, props changed) vendor-crypto/openssl/dist/ssl/t1_ext.c (contents, props changed) vendor-crypto/openssl/dist/ssl/t1_trce.c (contents, props changed) vendor-crypto/openssl/dist/util/copy-if-different.pl (contents, props changed) Deleted: vendor-crypto/openssl/dist/crypto/bn/asm/modexp512-x86_64.pl vendor-crypto/openssl/dist/crypto/engine/eng_rsax.c vendor-crypto/openssl/dist/crypto/evp/evp_fips.c vendor-crypto/openssl/dist/ssl/d1_enc.c Modified: vendor-crypto/openssl/dist/CHANGES vendor-crypto/openssl/dist/Configure vendor-crypto/openssl/dist/FAQ vendor-crypto/openssl/dist/FREEBSD-Xlist vendor-crypto/openssl/dist/FREEBSD-upgrade vendor-crypto/openssl/dist/Makefile vendor-crypto/openssl/dist/Makefile.org vendor-crypto/openssl/dist/NEWS vendor-crypto/openssl/dist/README vendor-crypto/openssl/dist/apps/apps.c vendor-crypto/openssl/dist/apps/apps.h vendor-crypto/openssl/dist/apps/ca.c vendor-crypto/openssl/dist/apps/ciphers.c vendor-crypto/openssl/dist/apps/cms.c vendor-crypto/openssl/dist/apps/crl.c vendor-crypto/openssl/dist/apps/dgst.c vendor-crypto/openssl/dist/apps/dhparam.c vendor-crypto/openssl/dist/apps/ecparam.c vendor-crypto/openssl/dist/apps/genrsa.c vendor-crypto/openssl/dist/apps/ocsp.c vendor-crypto/openssl/dist/apps/openssl.cnf vendor-crypto/openssl/dist/apps/pkcs8.c vendor-crypto/openssl/dist/apps/s_apps.h vendor-crypto/openssl/dist/apps/s_cb.c vendor-crypto/openssl/dist/apps/s_client.c vendor-crypto/openssl/dist/apps/s_server.c vendor-crypto/openssl/dist/apps/s_socket.c vendor-crypto/openssl/dist/apps/smime.c vendor-crypto/openssl/dist/apps/speed.c vendor-crypto/openssl/dist/apps/verify.c vendor-crypto/openssl/dist/apps/x509.c vendor-crypto/openssl/dist/config vendor-crypto/openssl/dist/crypto/Makefile vendor-crypto/openssl/dist/crypto/aes/Makefile vendor-crypto/openssl/dist/crypto/aes/aes_wrap.c vendor-crypto/openssl/dist/crypto/aes/aes_x86core.c vendor-crypto/openssl/dist/crypto/aes/asm/aes-586.pl vendor-crypto/openssl/dist/crypto/aes/asm/aes-armv4.pl vendor-crypto/openssl/dist/crypto/aes/asm/aes-mips.pl vendor-crypto/openssl/dist/crypto/aes/asm/aes-ppc.pl vendor-crypto/openssl/dist/crypto/aes/asm/aes-x86_64.pl vendor-crypto/openssl/dist/crypto/aes/asm/aesni-sha1-x86_64.pl vendor-crypto/openssl/dist/crypto/aes/asm/aesni-x86.pl vendor-crypto/openssl/dist/crypto/aes/asm/aesni-x86_64.pl vendor-crypto/openssl/dist/crypto/aes/asm/bsaes-x86_64.pl vendor-crypto/openssl/dist/crypto/aes/asm/vpaes-x86.pl vendor-crypto/openssl/dist/crypto/aes/asm/vpaes-x86_64.pl vendor-crypto/openssl/dist/crypto/arm_arch.h vendor-crypto/openssl/dist/crypto/armcap.c vendor-crypto/openssl/dist/crypto/armv4cpuid.S vendor-crypto/openssl/dist/crypto/asn1/Makefile vendor-crypto/openssl/dist/crypto/asn1/a_gentm.c vendor-crypto/openssl/dist/crypto/asn1/a_time.c vendor-crypto/openssl/dist/crypto/asn1/a_utctm.c vendor-crypto/openssl/dist/crypto/asn1/ameth_lib.c vendor-crypto/openssl/dist/crypto/asn1/asn1.h vendor-crypto/openssl/dist/crypto/asn1/asn1_locl.h vendor-crypto/openssl/dist/crypto/asn1/t_x509.c vendor-crypto/openssl/dist/crypto/asn1/x_crl.c vendor-crypto/openssl/dist/crypto/asn1/x_x509.c vendor-crypto/openssl/dist/crypto/bio/b_dump.c vendor-crypto/openssl/dist/crypto/bio/b_sock.c vendor-crypto/openssl/dist/crypto/bio/bio.h vendor-crypto/openssl/dist/crypto/bio/bio_err.c vendor-crypto/openssl/dist/crypto/bio/bss_acpt.c vendor-crypto/openssl/dist/crypto/bio/bss_conn.c vendor-crypto/openssl/dist/crypto/bio/bss_dgram.c vendor-crypto/openssl/dist/crypto/bio/bss_fd.c vendor-crypto/openssl/dist/crypto/bn/Makefile vendor-crypto/openssl/dist/crypto/bn/asm/armv4-gf2m.pl vendor-crypto/openssl/dist/crypto/bn/asm/armv4-mont.pl vendor-crypto/openssl/dist/crypto/bn/asm/mips-mont.pl vendor-crypto/openssl/dist/crypto/bn/asm/mips.pl vendor-crypto/openssl/dist/crypto/bn/asm/ppc-mont.pl vendor-crypto/openssl/dist/crypto/bn/asm/ppc.pl vendor-crypto/openssl/dist/crypto/bn/asm/ppc64-mont.pl vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-gcc.c vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-mont.pl vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-mont5.pl vendor-crypto/openssl/dist/crypto/bn/bn.h vendor-crypto/openssl/dist/crypto/bn/bn_asm.c vendor-crypto/openssl/dist/crypto/bn/bn_exp.c vendor-crypto/openssl/dist/crypto/bn/bn_gf2m.c vendor-crypto/openssl/dist/crypto/bn/bn_lcl.h vendor-crypto/openssl/dist/crypto/bn/bntest.c vendor-crypto/openssl/dist/crypto/buffer/buf_str.c vendor-crypto/openssl/dist/crypto/buffer/buffer.h vendor-crypto/openssl/dist/crypto/camellia/Makefile vendor-crypto/openssl/dist/crypto/camellia/asm/cmll-x86_64.pl vendor-crypto/openssl/dist/crypto/cast/cast_lcl.h vendor-crypto/openssl/dist/crypto/cms/Makefile vendor-crypto/openssl/dist/crypto/cms/cms.h vendor-crypto/openssl/dist/crypto/cms/cms_asn1.c vendor-crypto/openssl/dist/crypto/cms/cms_env.c vendor-crypto/openssl/dist/crypto/cms/cms_err.c vendor-crypto/openssl/dist/crypto/cms/cms_lcl.h vendor-crypto/openssl/dist/crypto/cms/cms_lib.c vendor-crypto/openssl/dist/crypto/cms/cms_sd.c vendor-crypto/openssl/dist/crypto/cms/cms_smime.c vendor-crypto/openssl/dist/crypto/cryptlib.c vendor-crypto/openssl/dist/crypto/cversion.c vendor-crypto/openssl/dist/crypto/des/Makefile vendor-crypto/openssl/dist/crypto/des/asm/des-586.pl vendor-crypto/openssl/dist/crypto/des/asm/des_enc.m4 vendor-crypto/openssl/dist/crypto/des/des_locl.h vendor-crypto/openssl/dist/crypto/des/read_pwd.c vendor-crypto/openssl/dist/crypto/dh/Makefile vendor-crypto/openssl/dist/crypto/dh/dh.h vendor-crypto/openssl/dist/crypto/dh/dh_ameth.c vendor-crypto/openssl/dist/crypto/dh/dh_asn1.c vendor-crypto/openssl/dist/crypto/dh/dh_check.c vendor-crypto/openssl/dist/crypto/dh/dh_err.c vendor-crypto/openssl/dist/crypto/dh/dh_key.c vendor-crypto/openssl/dist/crypto/dh/dh_pmeth.c vendor-crypto/openssl/dist/crypto/dh/dhtest.c vendor-crypto/openssl/dist/crypto/dsa/dsa.h vendor-crypto/openssl/dist/crypto/dsa/dsa_ameth.c vendor-crypto/openssl/dist/crypto/dsa/dsa_err.c vendor-crypto/openssl/dist/crypto/dsa/dsa_gen.c vendor-crypto/openssl/dist/crypto/dsa/dsa_locl.h vendor-crypto/openssl/dist/crypto/dsa/dsa_ossl.c vendor-crypto/openssl/dist/crypto/dsa/dsa_pmeth.c vendor-crypto/openssl/dist/crypto/ebcdic.c vendor-crypto/openssl/dist/crypto/ec/Makefile vendor-crypto/openssl/dist/crypto/ec/ec.h vendor-crypto/openssl/dist/crypto/ec/ec_ameth.c vendor-crypto/openssl/dist/crypto/ec/ec_curve.c vendor-crypto/openssl/dist/crypto/ec/ec_cvt.c vendor-crypto/openssl/dist/crypto/ec/ec_err.c vendor-crypto/openssl/dist/crypto/ec/ec_lcl.h vendor-crypto/openssl/dist/crypto/ec/ec_lib.c vendor-crypto/openssl/dist/crypto/ec/ec_pmeth.c vendor-crypto/openssl/dist/crypto/ec/eck_prn.c vendor-crypto/openssl/dist/crypto/ec/ecp_nistp521.c vendor-crypto/openssl/dist/crypto/ecdh/Makefile vendor-crypto/openssl/dist/crypto/ecdh/ecdh.h vendor-crypto/openssl/dist/crypto/ecdh/ecdhtest.c vendor-crypto/openssl/dist/crypto/ecdh/ech_ossl.c vendor-crypto/openssl/dist/crypto/ecdsa/ecdsa.h vendor-crypto/openssl/dist/crypto/ecdsa/ecs_err.c vendor-crypto/openssl/dist/crypto/ecdsa/ecs_lib.c vendor-crypto/openssl/dist/crypto/ecdsa/ecs_locl.h vendor-crypto/openssl/dist/crypto/ecdsa/ecs_ossl.c vendor-crypto/openssl/dist/crypto/engine/Makefile vendor-crypto/openssl/dist/crypto/engine/eng_all.c vendor-crypto/openssl/dist/crypto/engine/eng_cryptodev.c vendor-crypto/openssl/dist/crypto/engine/engine.h vendor-crypto/openssl/dist/crypto/evp/Makefile vendor-crypto/openssl/dist/crypto/evp/c_allc.c vendor-crypto/openssl/dist/crypto/evp/digest.c vendor-crypto/openssl/dist/crypto/evp/e_aes.c vendor-crypto/openssl/dist/crypto/evp/e_aes_cbc_hmac_sha1.c vendor-crypto/openssl/dist/crypto/evp/e_camellia.c vendor-crypto/openssl/dist/crypto/evp/e_des.c vendor-crypto/openssl/dist/crypto/evp/e_des3.c vendor-crypto/openssl/dist/crypto/evp/e_null.c vendor-crypto/openssl/dist/crypto/evp/encode.c vendor-crypto/openssl/dist/crypto/evp/evp.h vendor-crypto/openssl/dist/crypto/evp/evp_enc.c vendor-crypto/openssl/dist/crypto/evp/evp_err.c vendor-crypto/openssl/dist/crypto/evp/evp_extra_test.c vendor-crypto/openssl/dist/crypto/evp/evp_lib.c vendor-crypto/openssl/dist/crypto/evp/evp_locl.h vendor-crypto/openssl/dist/crypto/evp/evp_test.c vendor-crypto/openssl/dist/crypto/evp/evptests.txt vendor-crypto/openssl/dist/crypto/evp/m_dss.c vendor-crypto/openssl/dist/crypto/evp/m_dss1.c vendor-crypto/openssl/dist/crypto/evp/m_ecdsa.c vendor-crypto/openssl/dist/crypto/evp/m_sha1.c vendor-crypto/openssl/dist/crypto/evp/m_sigver.c vendor-crypto/openssl/dist/crypto/evp/p_lib.c vendor-crypto/openssl/dist/crypto/evp/pmeth_lib.c vendor-crypto/openssl/dist/crypto/hmac/hm_ameth.c vendor-crypto/openssl/dist/crypto/hmac/hmac.c vendor-crypto/openssl/dist/crypto/hmac/hmactest.c vendor-crypto/openssl/dist/crypto/jpake/jpake.c vendor-crypto/openssl/dist/crypto/md32_common.h vendor-crypto/openssl/dist/crypto/md5/Makefile vendor-crypto/openssl/dist/crypto/md5/md5_locl.h vendor-crypto/openssl/dist/crypto/modes/Makefile vendor-crypto/openssl/dist/crypto/modes/asm/ghash-armv4.pl vendor-crypto/openssl/dist/crypto/modes/asm/ghash-s390x.pl vendor-crypto/openssl/dist/crypto/modes/asm/ghash-sparcv9.pl vendor-crypto/openssl/dist/crypto/modes/asm/ghash-x86.pl vendor-crypto/openssl/dist/crypto/modes/asm/ghash-x86_64.pl vendor-crypto/openssl/dist/crypto/modes/cbc128.c vendor-crypto/openssl/dist/crypto/modes/gcm128.c vendor-crypto/openssl/dist/crypto/modes/modes.h vendor-crypto/openssl/dist/crypto/modes/modes_lcl.h vendor-crypto/openssl/dist/crypto/o_str.c vendor-crypto/openssl/dist/crypto/o_time.c vendor-crypto/openssl/dist/crypto/o_time.h vendor-crypto/openssl/dist/crypto/objects/obj_dat.h vendor-crypto/openssl/dist/crypto/objects/obj_mac.h vendor-crypto/openssl/dist/crypto/objects/obj_mac.num vendor-crypto/openssl/dist/crypto/objects/obj_xref.h vendor-crypto/openssl/dist/crypto/objects/obj_xref.txt vendor-crypto/openssl/dist/crypto/objects/objects.txt vendor-crypto/openssl/dist/crypto/objects/objxref.pl vendor-crypto/openssl/dist/crypto/ocsp/ocsp.h vendor-crypto/openssl/dist/crypto/ocsp/ocsp_ht.c vendor-crypto/openssl/dist/crypto/ocsp/ocsp_lib.c vendor-crypto/openssl/dist/crypto/opensslconf.h vendor-crypto/openssl/dist/crypto/opensslv.h vendor-crypto/openssl/dist/crypto/ossl_typ.h vendor-crypto/openssl/dist/crypto/pem/Makefile vendor-crypto/openssl/dist/crypto/pem/pem.h vendor-crypto/openssl/dist/crypto/pem/pem_all.c vendor-crypto/openssl/dist/crypto/pem/pem_err.c vendor-crypto/openssl/dist/crypto/pem/pem_lib.c vendor-crypto/openssl/dist/crypto/pem/pem_pkey.c vendor-crypto/openssl/dist/crypto/perlasm/ppc-xlate.pl vendor-crypto/openssl/dist/crypto/perlasm/x86_64-xlate.pl vendor-crypto/openssl/dist/crypto/perlasm/x86asm.pl vendor-crypto/openssl/dist/crypto/perlasm/x86gas.pl vendor-crypto/openssl/dist/crypto/perlasm/x86masm.pl vendor-crypto/openssl/dist/crypto/perlasm/x86nasm.pl vendor-crypto/openssl/dist/crypto/pkcs12/p12_decr.c vendor-crypto/openssl/dist/crypto/pkcs12/p12_p8e.c vendor-crypto/openssl/dist/crypto/ppccap.c vendor-crypto/openssl/dist/crypto/ppccpuid.pl vendor-crypto/openssl/dist/crypto/rc4/Makefile vendor-crypto/openssl/dist/crypto/rc4/asm/rc4-586.pl vendor-crypto/openssl/dist/crypto/rc4/rc4_enc.c vendor-crypto/openssl/dist/crypto/rc5/rc5_locl.h vendor-crypto/openssl/dist/crypto/rsa/Makefile vendor-crypto/openssl/dist/crypto/rsa/rsa.h vendor-crypto/openssl/dist/crypto/rsa/rsa_ameth.c vendor-crypto/openssl/dist/crypto/rsa/rsa_asn1.c vendor-crypto/openssl/dist/crypto/rsa/rsa_err.c vendor-crypto/openssl/dist/crypto/rsa/rsa_oaep.c vendor-crypto/openssl/dist/crypto/rsa/rsa_pmeth.c vendor-crypto/openssl/dist/crypto/rsa/rsa_sign.c vendor-crypto/openssl/dist/crypto/sha/Makefile vendor-crypto/openssl/dist/crypto/sha/asm/sha1-586.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha1-armv4-large.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha1-mips.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha1-ppc.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha1-sparcv9.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha1-x86_64.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha256-586.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha256-armv4.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha512-586.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha512-armv4.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha512-ia64.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha512-mips.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha512-ppc.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha512-sparcv9.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha512-x86_64.pl vendor-crypto/openssl/dist/crypto/sha/sha512.c vendor-crypto/openssl/dist/crypto/sparccpuid.S vendor-crypto/openssl/dist/crypto/sparcv9cap.c vendor-crypto/openssl/dist/crypto/srp/Makefile vendor-crypto/openssl/dist/crypto/srp/srptest.c vendor-crypto/openssl/dist/crypto/stack/safestack.h vendor-crypto/openssl/dist/crypto/stack/stack.c vendor-crypto/openssl/dist/crypto/stack/stack.h vendor-crypto/openssl/dist/crypto/symhacks.h vendor-crypto/openssl/dist/crypto/ts/ts_rsp_sign.c vendor-crypto/openssl/dist/crypto/ts/ts_rsp_verify.c vendor-crypto/openssl/dist/crypto/ui/ui_openssl.c vendor-crypto/openssl/dist/crypto/whrlpool/asm/wp-mmx.pl vendor-crypto/openssl/dist/crypto/whrlpool/asm/wp-x86_64.pl vendor-crypto/openssl/dist/crypto/x509/Makefile vendor-crypto/openssl/dist/crypto/x509/verify_extra_test.c vendor-crypto/openssl/dist/crypto/x509/x509.h vendor-crypto/openssl/dist/crypto/x509/x509_cmp.c vendor-crypto/openssl/dist/crypto/x509/x509_err.c vendor-crypto/openssl/dist/crypto/x509/x509_lu.c vendor-crypto/openssl/dist/crypto/x509/x509_set.c vendor-crypto/openssl/dist/crypto/x509/x509_trs.c vendor-crypto/openssl/dist/crypto/x509/x509_txt.c vendor-crypto/openssl/dist/crypto/x509/x509_vfy.c vendor-crypto/openssl/dist/crypto/x509/x509_vfy.h vendor-crypto/openssl/dist/crypto/x509/x509_vpm.c vendor-crypto/openssl/dist/crypto/x509/x_all.c vendor-crypto/openssl/dist/crypto/x509v3/Makefile vendor-crypto/openssl/dist/crypto/x509v3/ext_dat.h vendor-crypto/openssl/dist/crypto/x509v3/v3_lib.c vendor-crypto/openssl/dist/crypto/x509v3/v3_purp.c vendor-crypto/openssl/dist/crypto/x509v3/v3_utl.c vendor-crypto/openssl/dist/crypto/x509v3/v3err.c vendor-crypto/openssl/dist/crypto/x509v3/x509v3.h vendor-crypto/openssl/dist/crypto/x86_64cpuid.pl vendor-crypto/openssl/dist/crypto/x86cpuid.pl vendor-crypto/openssl/dist/doc/apps/c_rehash.pod vendor-crypto/openssl/dist/doc/apps/ciphers.pod vendor-crypto/openssl/dist/doc/apps/cms.pod vendor-crypto/openssl/dist/doc/apps/genpkey.pod vendor-crypto/openssl/dist/doc/apps/ocsp.pod vendor-crypto/openssl/dist/doc/apps/pkcs8.pod vendor-crypto/openssl/dist/doc/apps/req.pod vendor-crypto/openssl/dist/doc/apps/s_client.pod vendor-crypto/openssl/dist/doc/apps/s_server.pod vendor-crypto/openssl/dist/doc/apps/smime.pod vendor-crypto/openssl/dist/doc/apps/verify.pod vendor-crypto/openssl/dist/doc/apps/x509.pod vendor-crypto/openssl/dist/doc/crypto/ASN1_STRING_length.pod vendor-crypto/openssl/dist/doc/crypto/ASN1_STRING_print_ex.pod vendor-crypto/openssl/dist/doc/crypto/BIO_f_ssl.pod vendor-crypto/openssl/dist/doc/crypto/BIO_find_type.pod vendor-crypto/openssl/dist/doc/crypto/BIO_s_accept.pod vendor-crypto/openssl/dist/doc/crypto/BIO_s_connect.pod vendor-crypto/openssl/dist/doc/crypto/BN_BLINDING_new.pod vendor-crypto/openssl/dist/doc/crypto/BN_CTX_new.pod vendor-crypto/openssl/dist/doc/crypto/BN_generate_prime.pod vendor-crypto/openssl/dist/doc/crypto/BN_rand.pod vendor-crypto/openssl/dist/doc/crypto/CMS_add0_cert.pod vendor-crypto/openssl/dist/doc/crypto/CMS_get0_RecipientInfos.pod vendor-crypto/openssl/dist/doc/crypto/CMS_get0_SignerInfos.pod vendor-crypto/openssl/dist/doc/crypto/CMS_verify.pod vendor-crypto/openssl/dist/doc/crypto/DH_generate_parameters.pod vendor-crypto/openssl/dist/doc/crypto/DSA_generate_parameters.pod vendor-crypto/openssl/dist/doc/crypto/ERR_remove_state.pod vendor-crypto/openssl/dist/doc/crypto/EVP_BytesToKey.pod vendor-crypto/openssl/dist/doc/crypto/EVP_DigestInit.pod vendor-crypto/openssl/dist/doc/crypto/EVP_DigestVerifyInit.pod vendor-crypto/openssl/dist/doc/crypto/EVP_EncryptInit.pod vendor-crypto/openssl/dist/doc/crypto/EVP_PKEY_CTX_ctrl.pod vendor-crypto/openssl/dist/doc/crypto/EVP_PKEY_cmp.pod vendor-crypto/openssl/dist/doc/crypto/OPENSSL_VERSION_NUMBER.pod vendor-crypto/openssl/dist/doc/crypto/OPENSSL_config.pod vendor-crypto/openssl/dist/doc/crypto/OPENSSL_ia32cap.pod vendor-crypto/openssl/dist/doc/crypto/OPENSSL_load_builtin_modules.pod vendor-crypto/openssl/dist/doc/crypto/OpenSSL_add_all_algorithms.pod vendor-crypto/openssl/dist/doc/crypto/PKCS7_verify.pod vendor-crypto/openssl/dist/doc/crypto/RAND_egd.pod vendor-crypto/openssl/dist/doc/crypto/RSA_generate_key.pod vendor-crypto/openssl/dist/doc/crypto/X509_NAME_add_entry_by_txt.pod vendor-crypto/openssl/dist/doc/crypto/X509_STORE_CTX_get_error.pod vendor-crypto/openssl/dist/doc/crypto/X509_VERIFY_PARAM_set_flags.pod vendor-crypto/openssl/dist/doc/crypto/crypto.pod vendor-crypto/openssl/dist/doc/crypto/d2i_DSAPublicKey.pod vendor-crypto/openssl/dist/doc/crypto/d2i_X509.pod vendor-crypto/openssl/dist/doc/crypto/d2i_X509_CRL.pod vendor-crypto/openssl/dist/doc/crypto/ecdsa.pod vendor-crypto/openssl/dist/doc/crypto/evp.pod vendor-crypto/openssl/dist/doc/crypto/hmac.pod vendor-crypto/openssl/dist/doc/crypto/i2d_PKCS7_bio_stream.pod vendor-crypto/openssl/dist/doc/crypto/rand.pod vendor-crypto/openssl/dist/doc/crypto/sha.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CIPHER_get_name.pod vendor-crypto/openssl/dist/doc/ssl/SSL_COMP_add_compression_method.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_add_extra_chain_cert.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_sess_set_cache_size.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_set_cert_store.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_set_cipher_list.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_set_tmp_rsa_callback.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_use_certificate.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_use_psk_identity_hint.pod vendor-crypto/openssl/dist/doc/ssl/SSL_accept.pod vendor-crypto/openssl/dist/doc/ssl/SSL_do_handshake.pod vendor-crypto/openssl/dist/doc/ssl/SSL_shutdown.pod vendor-crypto/openssl/dist/doc/ssl/ssl.pod vendor-crypto/openssl/dist/doc/ssleay.txt vendor-crypto/openssl/dist/e_os.h vendor-crypto/openssl/dist/e_os2.h vendor-crypto/openssl/dist/engines/Makefile vendor-crypto/openssl/dist/engines/ccgost/Makefile vendor-crypto/openssl/dist/engines/ccgost/gost89.c vendor-crypto/openssl/dist/engines/ccgost/gost_crypt.c vendor-crypto/openssl/dist/engines/ccgost/gost_pmeth.c vendor-crypto/openssl/dist/engines/e_capi.c vendor-crypto/openssl/dist/engines/vendor_defns/hwcryptohook.h vendor-crypto/openssl/dist/ssl/Makefile vendor-crypto/openssl/dist/ssl/d1_both.c vendor-crypto/openssl/dist/ssl/d1_clnt.c vendor-crypto/openssl/dist/ssl/d1_lib.c vendor-crypto/openssl/dist/ssl/d1_meth.c vendor-crypto/openssl/dist/ssl/d1_pkt.c vendor-crypto/openssl/dist/ssl/d1_srtp.c vendor-crypto/openssl/dist/ssl/d1_srvr.c vendor-crypto/openssl/dist/ssl/dtls1.h vendor-crypto/openssl/dist/ssl/heartbeat_test.c vendor-crypto/openssl/dist/ssl/s23_clnt.c vendor-crypto/openssl/dist/ssl/s23_srvr.c vendor-crypto/openssl/dist/ssl/s2_clnt.c vendor-crypto/openssl/dist/ssl/s2_lib.c vendor-crypto/openssl/dist/ssl/s3_both.c vendor-crypto/openssl/dist/ssl/s3_cbc.c vendor-crypto/openssl/dist/ssl/s3_clnt.c vendor-crypto/openssl/dist/ssl/s3_enc.c vendor-crypto/openssl/dist/ssl/s3_lib.c vendor-crypto/openssl/dist/ssl/s3_pkt.c vendor-crypto/openssl/dist/ssl/s3_srvr.c vendor-crypto/openssl/dist/ssl/srtp.h vendor-crypto/openssl/dist/ssl/ssl.h vendor-crypto/openssl/dist/ssl/ssl3.h vendor-crypto/openssl/dist/ssl/ssl_algs.c vendor-crypto/openssl/dist/ssl/ssl_cert.c vendor-crypto/openssl/dist/ssl/ssl_ciph.c vendor-crypto/openssl/dist/ssl/ssl_err.c vendor-crypto/openssl/dist/ssl/ssl_lib.c vendor-crypto/openssl/dist/ssl/ssl_locl.h vendor-crypto/openssl/dist/ssl/ssl_rsa.c vendor-crypto/openssl/dist/ssl/ssl_sess.c vendor-crypto/openssl/dist/ssl/ssl_txt.c vendor-crypto/openssl/dist/ssl/ssltest.c vendor-crypto/openssl/dist/ssl/t1_clnt.c vendor-crypto/openssl/dist/ssl/t1_enc.c vendor-crypto/openssl/dist/ssl/t1_lib.c vendor-crypto/openssl/dist/ssl/t1_meth.c vendor-crypto/openssl/dist/ssl/t1_srvr.c vendor-crypto/openssl/dist/ssl/tls1.h vendor-crypto/openssl/dist/util/files.pl vendor-crypto/openssl/dist/util/libeay.num vendor-crypto/openssl/dist/util/mk1mf.pl vendor-crypto/openssl/dist/util/mkdef.pl vendor-crypto/openssl/dist/util/mkerr.pl vendor-crypto/openssl/dist/util/mkstack.pl vendor-crypto/openssl/dist/util/pl/BC-32.pl vendor-crypto/openssl/dist/util/pl/VC-32.pl vendor-crypto/openssl/dist/util/pl/unix.pl vendor-crypto/openssl/dist/util/ssleay.num Modified: vendor-crypto/openssl/dist/CHANGES ============================================================================== --- vendor-crypto/openssl/dist/CHANGES Fri Oct 23 19:45:22 2015 (r289847) +++ vendor-crypto/openssl/dist/CHANGES Fri Oct 23 19:46:02 2015 (r289848) @@ -2,7 +2,7 @@ OpenSSL CHANGES _______________ - Changes between 1.0.1o and 1.0.1p [9 Jul 2015] + Changes between 1.0.2c and 1.0.2d [9 Jul 2015] *) Alternate chains certificate forgery @@ -17,13 +17,13 @@ (Google/BoringSSL). [Matt Caswell] - Changes between 1.0.1n and 1.0.1o [12 Jun 2015] + Changes between 1.0.2b and 1.0.2c [12 Jun 2015] *) Fix HMAC ABI incompatibility. The previous version introduced an ABI incompatibility in the handling of HMAC. The previous ABI has now been restored. - Changes between 1.0.1m and 1.0.1n [11 Jun 2015] + Changes between 1.0.2a and 1.0.2b [11 Jun 2015] *) Malformed ECParameters causes infinite loop @@ -91,10 +91,65 @@ (CVE-2015-1791) [Matt Caswell] + *) Removed support for the two export grade static DH ciphersuites + EXP-DH-RSA-DES-CBC-SHA and EXP-DH-DSS-DES-CBC-SHA. These two ciphersuites + were newly added (along with a number of other static DH ciphersuites) to + 1.0.2. However the two export ones have *never* worked since they were + introduced. It seems strange in any case to be adding new export + ciphersuites, and given "logjam" it also does not seem correct to fix them. + [Matt Caswell] + + *) Only support 256-bit or stronger elliptic curves with the + 'ecdh_auto' setting (server) or by default (client). Of supported + curves, prefer P-256 (both). + [Emilia Kasper] + *) Reject DH handshakes with parameters shorter than 768 bits. [Kurt Roeckx and Emilia Kasper] - Changes between 1.0.1l and 1.0.1m [19 Mar 2015] + Changes between 1.0.2 and 1.0.2a [19 Mar 2015] + + *) ClientHello sigalgs DoS fix + + If a client connects to an OpenSSL 1.0.2 server and renegotiates with an + invalid signature algorithms extension a NULL pointer dereference will + occur. This can be exploited in a DoS attack against the server. + + This issue was was reported to OpenSSL by David Ramos of Stanford + University. + (CVE-2015-0291) + [Stephen Henson and Matt Caswell] + + *) Multiblock corrupted pointer fix + + OpenSSL 1.0.2 introduced the "multiblock" performance improvement. This + feature only applies on 64 bit x86 architecture platforms that support AES + NI instructions. A defect in the implementation of "multiblock" can cause + OpenSSL's internal write buffer to become incorrectly set to NULL when + using non-blocking IO. Typically, when the user application is using a + socket BIO for writing, this will only result in a failed connection. + However if some other BIO is used then it is likely that a segmentation + fault will be triggered, thus enabling a potential DoS attack. + + This issue was reported to OpenSSL by Daniel Danner and Rainer Mueller. + (CVE-2015-0290) + [Matt Caswell] + + *) Segmentation fault in DTLSv1_listen fix + + The DTLSv1_listen function is intended to be stateless and processes the + initial ClientHello from many peers. It is common for user code to loop + over the call to DTLSv1_listen until a valid ClientHello is received with + an associated cookie. A defect in the implementation of DTLSv1_listen means + that state is preserved in the SSL object from one invocation to the next + that can lead to a segmentation fault. Errors processing the initial + ClientHello can trigger this scenario. An example of such an error could be + that a DTLS1.0 only client is attempting to connect to a DTLS1.2 only + server. + + This issue was reported to OpenSSL by Per Allansson. + (CVE-2015-0207) + [Matt Caswell] *) Segmentation fault in ASN1_TYPE_cmp fix @@ -107,6 +162,20 @@ (CVE-2015-0286) [Stephen Henson] + *) Segmentation fault for invalid PSS parameters fix + + The signature verification routines will crash with a NULL pointer + dereference if presented with an ASN.1 signature using the RSA PSS + algorithm and invalid parameters. Since these routines are used to verify + certificate signature algorithms this can be used to crash any + certificate verification operation and exploited in a DoS attack. Any + application which performs certificate verification is vulnerable including + OpenSSL clients and servers which enable client authentication. + + This issue was was reported to OpenSSL by Brian Carpenter. + (CVE-2015-0208) + [Stephen Henson] + *) ASN.1 structure reuse memory corruption fix Reusing a structure in ASN.1 parsing may allow an attacker to cause @@ -145,6 +214,36 @@ (CVE-2015-0293) [Emilia Käsper] + *) Empty CKE with client auth and DHE fix + + If client auth is used then a server can seg fault in the event of a DHE + ciphersuite being selected and a zero length ClientKeyExchange message + being sent by the client. This could be exploited in a DoS attack. + (CVE-2015-1787) + [Matt Caswell] + + *) Handshake with unseeded PRNG fix + + Under certain conditions an OpenSSL 1.0.2 client can complete a handshake + with an unseeded PRNG. The conditions are: + - The client is on a platform where the PRNG has not been seeded + automatically, and the user has not seeded manually + - A protocol specific client method version has been used (i.e. not + SSL_client_methodv23) + - A ciphersuite is used that does not require additional random data from + the PRNG beyond the initial ClientHello client random (e.g. PSK-RC4-SHA). + + If the handshake succeeds then the client random that has been used will + have been generated from a PRNG with insufficient entropy and therefore the + output may be predictable. + + For example using the following command with an unseeded openssl will + succeed on an unpatched platform: + + openssl s_client -psk 1a2b3c4d -tls1_2 -cipher PSK-RC4-SHA + (CVE-2015-0285) + [Matt Caswell] + *) Use After Free following d2i_ECPrivatekey error fix A malformed EC private key file consumed via the d2i_ECPrivateKey function @@ -171,6 +270,336 @@ *) Removed the export ciphers from the DEFAULT ciphers [Kurt Roeckx] + Changes between 1.0.1l and 1.0.2 [22 Jan 2015] + + *) Facilitate "universal" ARM builds targeting range of ARM ISAs, e.g. + ARMv5 through ARMv8, as opposite to "locking" it to single one. + So far those who have to target multiple plaforms would compromise + and argue that binary targeting say ARMv5 would still execute on + ARMv8. "Universal" build resolves this compromise by providing + near-optimal performance even on newer platforms. + [Andy Polyakov] + + *) Accelerated NIST P-256 elliptic curve implementation for x86_64 + (other platforms pending). + [Shay Gueron & Vlad Krasnov (Intel Corp), Andy Polyakov] + + *) Add support for the SignedCertificateTimestampList certificate and + OCSP response extensions from RFC6962. + [Rob Stradling] + + *) Fix ec_GFp_simple_points_make_affine (thus, EC_POINTs_mul etc.) + for corner cases. (Certain input points at infinity could lead to + bogus results, with non-infinity inputs mapped to infinity too.) + [Bodo Moeller] + + *) Initial support for PowerISA 2.0.7, first implemented in POWER8. + This covers AES, SHA256/512 and GHASH. "Initial" means that most + common cases are optimized and there still is room for further + improvements. Vector Permutation AES for Altivec is also added. + [Andy Polyakov] + + *) Add support for little-endian ppc64 Linux target. + [Marcelo Cerri (IBM)] + + *) Initial support for AMRv8 ISA crypto extensions. This covers AES, + SHA1, SHA256 and GHASH. "Initial" means that most common cases + are optimized and there still is room for further improvements. + Both 32- and 64-bit modes are supported. + [Andy Polyakov, Ard Biesheuvel (Linaro)] + + *) Improved ARMv7 NEON support. + [Andy Polyakov] + + *) Support for SPARC Architecture 2011 crypto extensions, first + implemented in SPARC T4. This covers AES, DES, Camellia, SHA1, + SHA256/512, MD5, GHASH and modular exponentiation. + [Andy Polyakov, David Miller] + + *) Accelerated modular exponentiation for Intel processors, a.k.a. + RSAZ. + [Shay Gueron & Vlad Krasnov (Intel Corp)] + + *) Support for new and upcoming Intel processors, including AVX2, + BMI and SHA ISA extensions. This includes additional "stitched" + implementations, AESNI-SHA256 and GCM, and multi-buffer support + for TLS encrypt. + + This work was sponsored by Intel Corp. + [Andy Polyakov] + + *) Support for DTLS 1.2. This adds two sets of DTLS methods: DTLS_*_method() + supports both DTLS 1.2 and 1.0 and should use whatever version the peer + supports and DTLSv1_2_*_method() which supports DTLS 1.2 only. + [Steve Henson] + + *) Use algorithm specific chains in SSL_CTX_use_certificate_chain_file(): + this fixes a limiation in previous versions of OpenSSL. + [Steve Henson] + + *) Extended RSA OAEP support via EVP_PKEY API. Options to specify digest, + MGF1 digest and OAEP label. + [Steve Henson] + + *) Add EVP support for key wrapping algorithms, to avoid problems with + existing code the flag EVP_CIPHER_CTX_WRAP_ALLOW has to be set in + the EVP_CIPHER_CTX or an error is returned. Add AES and DES3 wrap + algorithms and include tests cases. + [Steve Henson] + + *) Add functions to allocate and set the fields of an ECDSA_METHOD + structure. + [Douglas E. Engert, Steve Henson] + + *) New functions OPENSSL_gmtime_diff and ASN1_TIME_diff to find the + difference in days and seconds between two tm or ASN1_TIME structures. + [Steve Henson] + + *) Add -rev test option to s_server to just reverse order of characters + received by client and send back to server. Also prints an abbreviated + summary of the connection parameters. + [Steve Henson] + + *) New option -brief for s_client and s_server to print out a brief summary + of connection parameters. + [Steve Henson] + + *) Add callbacks for arbitrary TLS extensions. + [Trevor Perrin and Ben Laurie] + + *) New option -crl_download in several openssl utilities to download CRLs + from CRLDP extension in certificates. + [Steve Henson] + + *) New options -CRL and -CRLform for s_client and s_server for CRLs. + [Steve Henson] + + *) New function X509_CRL_diff to generate a delta CRL from the difference + of two full CRLs. Add support to "crl" utility. + [Steve Henson] + + *) New functions to set lookup_crls function and to retrieve + X509_STORE from X509_STORE_CTX. + [Steve Henson] + + *) Print out deprecated issuer and subject unique ID fields in + certificates. + [Steve Henson] + + *) Extend OCSP I/O functions so they can be used for simple general purpose + HTTP as well as OCSP. New wrapper function which can be used to download + CRLs using the OCSP API. + [Steve Henson] + + *) Delegate command line handling in s_client/s_server to SSL_CONF APIs. + [Steve Henson] + + *) SSL_CONF* functions. These provide a common framework for application + configuration using configuration files or command lines. + [Steve Henson] + + *) SSL/TLS tracing code. This parses out SSL/TLS records using the + message callback and prints the results. Needs compile time option + "enable-ssl-trace". New options to s_client and s_server to enable + tracing. + [Steve Henson] + + *) New ctrl and macro to retrieve supported points extensions. + Print out extension in s_server and s_client. + [Steve Henson] + + *) New functions to retrieve certificate signature and signature + OID NID. + [Steve Henson] + + *) Add functions to retrieve and manipulate the raw cipherlist sent by a + client to OpenSSL. + [Steve Henson] + + *) New Suite B modes for TLS code. These use and enforce the requirements + of RFC6460: restrict ciphersuites, only permit Suite B algorithms and + only use Suite B curves. The Suite B modes can be set by using the + strings "SUITEB128", "SUITEB192" or "SUITEB128ONLY" for the cipherstring. + [Steve Henson] + + *) New chain verification flags for Suite B levels of security. Check + algorithms are acceptable when flags are set in X509_verify_cert. + [Steve Henson] + + *) Make tls1_check_chain return a set of flags indicating checks passed + by a certificate chain. Add additional tests to handle client + certificates: checks for matching certificate type and issuer name + comparison. + [Steve Henson] + + *) If an attempt is made to use a signature algorithm not in the peer + preference list abort the handshake. If client has no suitable + signature algorithms in response to a certificate request do not + use the certificate. + [Steve Henson] + + *) If server EC tmp key is not in client preference list abort handshake. + [Steve Henson] + + *) Add support for certificate stores in CERT structure. This makes it + possible to have different stores per SSL structure or one store in + the parent SSL_CTX. Include distint stores for certificate chain + verification and chain building. New ctrl SSL_CTRL_BUILD_CERT_CHAIN + to build and store a certificate chain in CERT structure: returing + an error if the chain cannot be built: this will allow applications + to test if a chain is correctly configured. + + Note: if the CERT based stores are not set then the parent SSL_CTX + store is used to retain compatibility with existing behaviour. + + [Steve Henson] + + *) New function ssl_set_client_disabled to set a ciphersuite disabled + mask based on the current session, check mask when sending client + hello and checking the requested ciphersuite. + [Steve Henson] + + *) New ctrls to retrieve and set certificate types in a certificate + request message. Print out received values in s_client. If certificate + types is not set with custom values set sensible values based on + supported signature algorithms. + [Steve Henson] + + *) Support for distinct client and server supported signature algorithms. + [Steve Henson] + + *) Add certificate callback. If set this is called whenever a certificate + is required by client or server. An application can decide which + certificate chain to present based on arbitrary criteria: for example + supported signature algorithms. Add very simple example to s_server. + This fixes many of the problems and restrictions of the existing client + certificate callback: for example you can now clear an existing + certificate and specify the whole chain. + [Steve Henson] + + *) Add new "valid_flags" field to CERT_PKEY structure which determines what + the certificate can be used for (if anything). Set valid_flags field + in new tls1_check_chain function. Simplify ssl_set_cert_masks which used + to have similar checks in it. + + Add new "cert_flags" field to CERT structure and include a "strict mode". + This enforces some TLS certificate requirements (such as only permitting + certificate signature algorithms contained in the supported algorithms + extension) which some implementations ignore: this option should be used + with caution as it could cause interoperability issues. + [Steve Henson] + + *) Update and tidy signature algorithm extension processing. Work out + shared signature algorithms based on preferences and peer algorithms + and print them out in s_client and s_server. Abort handshake if no + shared signature algorithms. + [Steve Henson] + + *) Add new functions to allow customised supported signature algorithms + for SSL and SSL_CTX structures. Add options to s_client and s_server + to support them. + [Steve Henson] + + *) New function SSL_certs_clear() to delete all references to certificates + from an SSL structure. Before this once a certificate had been added + it couldn't be removed. + [Steve Henson] + + *) Integrate hostname, email address and IP address checking with certificate + verification. New verify options supporting checking in opensl utility. + [Steve Henson] + + *) Fixes and wildcard matching support to hostname and email checking + functions. Add manual page. + [Florian Weimer (Red Hat Product Security Team)] + + *) New functions to check a hostname email or IP address against a + certificate. Add options x509 utility to print results of checks against + a certificate. + [Steve Henson] + + *) Fix OCSP checking. + [Rob Stradling and Ben Laurie] + + *) Initial experimental support for explicitly trusted non-root CAs. + OpenSSL still tries to build a complete chain to a root but if an + intermediate CA has a trust setting included that is used. The first + setting is used: whether to trust (e.g., -addtrust option to the x509 + utility) or reject. + [Steve Henson] + + *) Add -trusted_first option which attempts to find certificates in the + trusted store even if an untrusted chain is also supplied. + [Steve Henson] + + *) MIPS assembly pack updates: support for MIPS32r2 and SmartMIPS ASE, + platform support for Linux and Android. + [Andy Polyakov] + + *) Support for linux-x32, ILP32 environment in x86_64 framework. + [Andy Polyakov] + + *) Experimental multi-implementation support for FIPS capable OpenSSL. + When in FIPS mode the approved implementations are used as normal, + when not in FIPS mode the internal unapproved versions are used instead. + This means that the FIPS capable OpenSSL isn't forced to use the + (often lower perfomance) FIPS implementations outside FIPS mode. + [Steve Henson] + + *) Transparently support X9.42 DH parameters when calling + PEM_read_bio_DHparameters. This means existing applications can handle + the new parameter format automatically. + [Steve Henson] + + *) Initial experimental support for X9.42 DH parameter format: mainly + to support use of 'q' parameter for RFC5114 parameters. + [Steve Henson] + + *) Add DH parameters from RFC5114 including test data to dhtest. + [Steve Henson] + + *) Support for automatic EC temporary key parameter selection. If enabled + the most preferred EC parameters are automatically used instead of + hardcoded fixed parameters. Now a server just has to call: + SSL_CTX_set_ecdh_auto(ctx, 1) and the server will automatically + support ECDH and use the most appropriate parameters. + [Steve Henson] + + *) Enhance and tidy EC curve and point format TLS extension code. Use + static structures instead of allocation if default values are used. + New ctrls to set curves we wish to support and to retrieve shared curves. + Print out shared curves in s_server. New options to s_server and s_client + to set list of supported curves. + [Steve Henson] + + *) New ctrls to retrieve supported signature algorithms and + supported curve values as an array of NIDs. Extend openssl utility + to print out received values. + [Steve Henson] + + *) Add new APIs EC_curve_nist2nid and EC_curve_nid2nist which convert + between NIDs and the more common NIST names such as "P-256". Enhance + ecparam utility and ECC method to recognise the NIST names for curves. + [Steve Henson] + + *) Enhance SSL/TLS certificate chain handling to support different + chains for each certificate instead of one chain in the parent SSL_CTX. + [Steve Henson] + + *) Support for fixed DH ciphersuite client authentication: where both + server and client use DH certificates with common parameters. + [Steve Henson] + + *) Support for fixed DH ciphersuites: those requiring DH server + certificates. + [Steve Henson] + + *) New function i2d_re_X509_tbs for re-encoding the TBS portion of + the certificate. + Note: Related 1.0.2-beta specific macros X509_get_cert_info, + X509_CINF_set_modified, X509_CINF_get_issuer, X509_CINF_get_extensions and + X509_CINF_get_signature were reverted post internal team review. + Changes between 1.0.1k and 1.0.1l [15 Jan 2015] *) Build fixes for the Windows and OpenVMS platforms Modified: vendor-crypto/openssl/dist/Configure ============================================================================== --- vendor-crypto/openssl/dist/Configure Fri Oct 23 19:45:22 2015 (r289847) +++ vendor-crypto/openssl/dist/Configure Fri Oct 23 19:46:02 2015 (r289848) @@ -105,6 +105,25 @@ my $usage="Usage: Configure [no- my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED"; +# TODO(openssl-team): fix problems and investigate if (at least) the following +# warnings can also be enabled: +# -Wconditional-uninitialized, -Wswitch-enum, -Wunused-macros, +# -Wmissing-field-initializers, -Wmissing-variable-declarations, +# -Wincompatible-pointer-types-discards-qualifiers, -Wcast-align, +# -Wunreachable-code -Wunused-parameter -Wlanguage-extension-token +# -Wextended-offsetof +my $clang_disabled_warnings = "-Wno-unused-parameter -Wno-missing-field-initializers -Wno-language-extension-token -Wno-extended-offsetof"; + +# These are used in addition to $gcc_devteam_warn when the compiler is clang. +# TODO(openssl-team): fix problems and investigate if (at least) the +# following warnings can also be enabled: -Wconditional-uninitialized, +# -Wswitch-enum, -Wunused-macros, -Wmissing-field-initializers, +# -Wmissing-variable-declarations, +# -Wincompatible-pointer-types-discards-qualifiers, -Wcast-align, +# -Wunreachable-code -Wunused-parameter -Wlanguage-extension-token +# -Wextended-offsetof +my $clang_devteam_warn = "-Wno-unused-parameter -Wno-missing-field-initializers -Wno-language-extension-token -Wno-extended-offsetof -Qunused-arguments"; + my $strict_warnings = 0; my $x86_gcc_des="DES_PTR DES_RISC1 DES_UNROLL"; @@ -124,24 +143,25 @@ my $tlib="-lnsl -lsocket"; my $bits1="THIRTY_TWO_BIT "; my $bits2="SIXTY_FOUR_BIT "; -my $x86_asm="x86cpuid.o:bn-586.o co-586.o x86-mont.o x86-gf2m.o:des-586.o crypt586.o:aes-586.o vpaes-x86.o aesni-x86.o:bf-586.o:md5-586.o:sha1-586.o sha256-586.o sha512-586.o:cast-586.o:rc4-586.o:rmd-586.o:rc5-586.o:wp_block.o wp-mmx.o:cmll-x86.o:ghash-x86.o:"; +my $x86_asm="x86cpuid.o:bn-586.o co-586.o x86-mont.o x86-gf2m.o::des-586.o crypt586.o:aes-586.o vpaes-x86.o aesni-x86.o:bf-586.o:md5-586.o:sha1-586.o sha256-586.o sha512-586.o:cast-586.o:rc4-586.o:rmd-586.o:rc5-586.o:wp_block.o wp-mmx.o:cmll-x86.o:ghash-x86.o:"; my $x86_elf_asm="$x86_asm:elf"; -my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o x86_64-mont.o x86_64-mont5.o x86_64-gf2m.o modexp512-x86_64.o::aes-x86_64.o vpaes-x86_64.o bsaes-x86_64.o aesni-x86_64.o aesni-sha1-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o rc4-md5-x86_64.o:::wp-x86_64.o:cmll-x86_64.o cmll_misc.o:ghash-x86_64.o:"; -my $ia64_asm="ia64cpuid.o:bn-ia64.o ia64-mont.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o rc4_skey.o:::::ghash-ia64.o::void"; -my $sparcv9_asm="sparcv9cap.o sparccpuid.o:bn-sparcv9.o sparcv9-mont.o sparcv9a-mont.o:des_enc-sparc.o fcrypt_b.o:aes_core.o aes_cbc.o aes-sparcv9.o:::sha1-sparcv9.o sha256-sparcv9.o sha512-sparcv9.o:::::::ghash-sparcv9.o::void"; -my $sparcv8_asm=":sparcv8.o:des_enc-sparc.o fcrypt_b.o:::::::::::::void"; -my $alpha_asm="alphacpuid.o:bn_asm.o alpha-mont.o:::::sha1-alpha.o:::::::ghash-alpha.o::void"; -my $mips32_asm=":bn-mips.o::aes_cbc.o aes-mips.o:::sha1-mips.o sha256-mips.o::::::::"; -my $mips64_asm=":bn-mips.o mips-mont.o::aes_cbc.o aes-mips.o:::sha1-mips.o sha256-mips.o sha512-mips.o::::::::"; -my $s390x_asm="s390xcap.o s390xcpuid.o:bn-s390x.o s390x-mont.o s390x-gf2m.o::aes-s390x.o aes-ctr.o aes-xts.o:::sha1-s390x.o sha256-s390x.o sha512-s390x.o::rc4-s390x.o:::::ghash-s390x.o:"; -my $armv4_asm="armcap.o armv4cpuid.o:bn_asm.o armv4-mont.o armv4-gf2m.o::aes_cbc.o aes-armv4.o:::sha1-armv4-large.o sha256-armv4.o sha512-armv4.o:::::::ghash-armv4.o::void"; -my $parisc11_asm="pariscid.o:bn_asm.o parisc-mont.o::aes_core.o aes_cbc.o aes-parisc.o:::sha1-parisc.o sha256-parisc.o sha512-parisc.o::rc4-parisc.o:::::ghash-parisc.o::32"; -my $parisc20_asm="pariscid.o:pa-risc2W.o parisc-mont.o::aes_core.o aes_cbc.o aes-parisc.o:::sha1-parisc.o sha256-parisc.o sha512-parisc.o::rc4-parisc.o:::::ghash-parisc.o::64"; -my $ppc32_asm="ppccpuid.o ppccap.o:bn-ppc.o ppc-mont.o ppc64-mont.o::aes_core.o aes_cbc.o aes-ppc.o:::sha1-ppc.o sha256-ppc.o::::::::"; -my $ppc64_asm="ppccpuid.o ppccap.o:bn-ppc.o ppc-mont.o ppc64-mont.o::aes_core.o aes_cbc.o aes-ppc.o:::sha1-ppc.o sha256-ppc.o sha512-ppc.o::::::::"; -my $no_asm=":::::::::::::::void"; +my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o x86_64-mont.o x86_64-mont5.o x86_64-gf2m.o rsaz_exp.o rsaz-x86_64.o rsaz-avx2.o:ecp_nistz256.o ecp_nistz256-x86_64.o::aes-x86_64.o vpaes-x86_64.o bsaes-x86_64.o aesni-x86_64.o aesni-sha1-x86_64.o aesni-sha256-x86_64.o aesni-mb-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o sha1-mb-x86_64.o sha256-mb-x86_64.o::rc4-x86_64.o rc4-md5-x86_64.o:::wp-x86_64.o:cmll-x86_64.o cmll_misc.o:ghash-x86_64.o aesni-gcm-x86_64.o:"; +my $ia64_asm="ia64cpuid.o:bn-ia64.o ia64-mont.o:::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o rc4_skey.o:::::ghash-ia64.o::void"; +my $sparcv9_asm="sparcv9cap.o sparccpuid.o:bn-sparcv9.o sparcv9-mont.o sparcv9a-mont.o vis3-mont.o sparct4-mont.o sparcv9-gf2m.o::des_enc-sparc.o fcrypt_b.o dest4-sparcv9.o:aes_core.o aes_cbc.o aes-sparcv9.o aest4-sparcv9.o::md5-sparcv9.o:sha1-sparcv9.o sha256-sparcv9.o sha512-sparcv9.o::::::camellia.o cmll_misc.o cmll_cbc.o cmllt4-sparcv9.o:ghash-sparcv9.o::void"; +my $sparcv8_asm=":sparcv8.o::des_enc-sparc.o fcrypt_b.o:::::::::::::void"; +my $alpha_asm="alphacpuid.o:bn_asm.o alpha-mont.o::::::sha1-alpha.o:::::::ghash-alpha.o::void"; +my $mips64_asm=":bn-mips.o mips-mont.o:::aes_cbc.o aes-mips.o:::sha1-mips.o sha256-mips.o sha512-mips.o::::::::"; +my $mips32_asm=$mips64_asm; $mips32_asm =~ s/\s*sha512\-mips\.o//; +my $s390x_asm="s390xcap.o s390xcpuid.o:bn-s390x.o s390x-mont.o s390x-gf2m.o:::aes-s390x.o aes-ctr.o aes-xts.o:::sha1-s390x.o sha256-s390x.o sha512-s390x.o::rc4-s390x.o:::::ghash-s390x.o:"; +my $armv4_asm="armcap.o armv4cpuid.o:bn_asm.o armv4-mont.o armv4-gf2m.o:::aes_cbc.o aes-armv4.o bsaes-armv7.o aesv8-armx.o:::sha1-armv4-large.o sha256-armv4.o sha512-armv4.o:::::::ghash-armv4.o ghashv8-armx.o::void"; +my $aarch64_asm="armcap.o arm64cpuid.o mem_clr.o::::aes_core.o aes_cbc.o aesv8-armx.o:::sha1-armv8.o sha256-armv8.o sha512-armv8.o:::::::ghashv8-armx.o:"; +my $parisc11_asm="pariscid.o:bn_asm.o parisc-mont.o:::aes_core.o aes_cbc.o aes-parisc.o:::sha1-parisc.o sha256-parisc.o sha512-parisc.o::rc4-parisc.o:::::ghash-parisc.o::32"; +my $parisc20_asm="pariscid.o:pa-risc2W.o parisc-mont.o:::aes_core.o aes_cbc.o aes-parisc.o:::sha1-parisc.o sha256-parisc.o sha512-parisc.o::rc4-parisc.o:::::ghash-parisc.o::64"; +my $ppc64_asm="ppccpuid.o ppccap.o:bn-ppc.o ppc-mont.o ppc64-mont.o:::aes_core.o aes_cbc.o aes-ppc.o vpaes-ppc.o aesp8-ppc.o:::sha1-ppc.o sha256-ppc.o sha512-ppc.o sha256p8-ppc.o sha512p8-ppc.o:::::::ghashp8-ppc.o:"; +my $ppc32_asm=$ppc64_asm; +my $no_asm="::::::::::::::::void"; # As for $BSDthreads. Idea is to maintain "collective" set of flags, # which would cover all BSD flavors. -pthread applies to them all, @@ -152,7 +172,7 @@ my $no_asm=":::::::::::::::void"; # seems to be sufficient? my $BSDthreads="-pthread -D_THREAD_SAFE -D_REENTRANT"; -#config-string $cc : $cflags : $unistd : $thread_cflag : $sys_id : $lflags : $bn_ops : $cpuid_obj : $bn_obj : $des_obj : $aes_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $wp_obj : $cmll_obj : $modes_obj : $engines_obj : $dso_scheme : $shared_target : $shared_cflag : $shared_ldflag : $shared_extension : $ranlib : $arflags : $multilib +#config-string $cc : $cflags : $unistd : $thread_cflag : $sys_id : $lflags : $bn_ops : $cpuid_obj : $bn_obj : $ec_obj : $des_obj : $aes_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $wp_obj : $cmll_obj : $modes_obj : $engines_obj : $dso_scheme : $shared_target : $shared_cflag : $shared_ldflag : $shared_extension : $ranlib : $arflags : $multilib my %table=( # File 'TABLE' (created by 'make TABLE') contains the data from this list, @@ -174,14 +194,14 @@ my %table=( "debug-ben-debug-64", "gcc:$gcc_devteam_warn -Wno-error=overlength-strings -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -g3 -O3 -pipe::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-ben-macos", "cc:$gcc_devteam_warn -arch i386 -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -O3 -DL_ENDIAN -g3 -pipe::(unknown)::-Wl,-search_paths_first::::", "debug-ben-macos-gcc46", "gcc-mp-4.6:$gcc_devteam_warn -Wconversion -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -O3 -DL_ENDIAN -g3 -pipe::(unknown)::::::", -"debug-ben-darwin64","cc:$gcc_devteam_warn -Wno-language-extension-token -Wno-extended-offsetof -arch x86_64 -O3 -DL_ENDIAN -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:".eval{my $asm=$x86_64_asm;$asm=~s/rc4\-[^:]+//;$asm}.":macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", +"debug-ben-darwin64","cc:$gcc_devteam_warn -g -Wno-language-extension-token -Wno-extended-offsetof -arch x86_64 -O3 -DL_ENDIAN -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:".eval{my $asm=$x86_64_asm;$asm=~s/rc4\-[^:]+//;$asm}.":macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", +"debug-ben-debug-64-clang", "clang:$gcc_devteam_warn -Wno-error=overlength-strings -Wno-error=extended-offsetof -Qunused-arguments -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -g3 -O3 -pipe::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-ben-no-opt", "gcc: -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG -Werror -DL_ENDIAN -DTERMIOS -Wall -g3::(unknown)::::::", "debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::", "debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", "debug-bodo", "gcc:$gcc_devteam_warn -Wno-error=overlength-strings -DBN_DEBUG -DBN_DEBUG_RAND -DCONF_DEBUG -DBIO_PAIR_DEBUG -m64 -DL_ENDIAN -DTERMIO -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", -"debug-ulf", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DBN_DEBUG_RAND -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations:::CYGWIN32:::${no_asm}:win32:cygwin-shared:::.dll", "debug-steve64", "gcc:$gcc_devteam_warn -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -Wno-overlength-strings -g::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-steve32", "gcc:$gcc_devteam_warn -m32 -DL_ENDIAN -DCONF_DEBUG -DDEBUG_SAFESTACK -g -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-steve32", "gcc:$gcc_devteam_warn -m32 -DL_ENDIAN -DCONF_DEBUG -DDEBUG_SAFESTACK -Wno-overlength-strings -g -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-steve-opt", "gcc:$gcc_devteam_warn -m64 -O3 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -ggdb -g3 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -ggdb -g3 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -193,9 +213,9 @@ my %table=( "debug-linux-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -g -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", "debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -g -march=i486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-linux-ia32-aes", "gcc:-DAES_EXPERIMENTAL -DL_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:x86cpuid.o:bn-586.o co-586.o x86-mont.o:des-586.o crypt586.o:aes_x86core.o aes_cbc.o aesni-x86.o:bf-586.o:md5-586.o:sha1-586.o sha256-586.o sha512-586.o:cast-586.o:rc4-586.o:rmd-586.o:rc5-586.o:wp_block.o wp-mmx.o::ghash-x86.o::elf:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-linux-ia32-aes", "gcc:-DAES_EXPERIMENTAL -DL_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:x86cpuid.o:bn-586.o co-586.o x86-mont.o::des-586.o crypt586.o:aes_x86core.o aes_cbc.o aesni-x86.o:bf-586.o:md5-586.o:sha1-586.o sha256-586.o sha512-586.o:cast-586.o:rc4-586.o:rmd-586.o:rc5-586.o:wp_block.o wp-mmx.o::ghash-x86.o::elf:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-linux-generic32","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-linux-generic64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-linux-generic64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-linux-x86_64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", "dist", "cc:-O::(unknown)::::::", @@ -225,7 +245,7 @@ my %table=( "solaris64-x86_64-gcc","gcc:-m64 -O3 -Wall -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:solaris-shared:-fPIC:-m64 -shared -static-libgcc:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/64", #### Solaris x86 with Sun C setups -"solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"solaris-x86-cc","cc:-fast -xarch=generic -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-KPIC:-G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "solaris64-x86_64-cc","cc:-fast -xarch=amd64 -xstrconst -Xa -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:solaris-shared:-KPIC:-xarch=amd64 -G -dy -z text:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/64", #### SPARC Solaris with GNU C setups @@ -300,7 +320,7 @@ my %table=( "hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1:${no_asm}:dl:hpux-shared:-fPIC:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "hpux-parisc1_1-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-Wl,+s -ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1:${parisc11_asm}:dl:hpux-shared:-fPIC:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/pa1.1", "hpux-parisc2-gcc","gcc:-march=2.0 -O3 -DB_ENDIAN -D_REENTRANT::::-Wl,+s -ldld:SIXTY_FOUR_BIT RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL DES_RISC1:".eval{my $asm=$parisc20_asm;$asm=~s/2W\./2\./;$asm=~s/:64/:32/;$asm}.":dl:hpux-shared:-fPIC:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/pa20_32", -"hpux64-parisc2-gcc","gcc:-O3 -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::pa-risc2W.o::::::::::::::void:dlfcn:hpux-shared:-fpic:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/pa20_64", +"hpux64-parisc2-gcc","gcc:-O3 -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::pa-risc2W.o:::::::::::::::void:dlfcn:hpux-shared:-fpic:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/pa20_64", # More attempts at unified 10.X and 11.X targets for HP C compiler. # @@ -347,20 +367,57 @@ my %table=( # throw in -D[BL]_ENDIAN, whichever appropriate... "linux-generic32","gcc:-O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-ppc", "gcc:-DB_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -# It's believed that majority of ARM toolchains predefine appropriate -march. -# If you compiler does not, do complement config command line with one! -"linux-armv4", "gcc:-O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + +####################################################################### +# Note that -march is not among compiler options in below linux-armv4 +# target line. Not specifying one is intentional to give you choice to: +# +# a) rely on your compiler default by not specifying one; +# b) specify your target platform explicitly for optimal performance, +# e.g. -march=armv6 or -march=armv7-a; +# c) build "universal" binary that targets *range* of platforms by +# specifying minimum and maximum supported architecture; +# +# As for c) option. It actually makes no sense to specify maximum to be +# less than ARMv7, because it's the least requirement for run-time +# switch between platform-specific code paths. And without run-time +# switch performance would be equivalent to one for minimum. Secondly, +# there are some natural limitations that you'd have to accept and +# respect. Most notably you can *not* build "universal" binary for +# big-endian platform. This is because ARMv7 processor always picks +# instructions in little-endian order. Another similar limitation is +# that -mthumb can't "cross" -march=armv6t2 boundary, because that's +# where it became Thumb-2. Well, this limitation is a bit artificial, +# because it's not really impossible, but it's deemed too tricky to +# support. And of course you have to be sure that your binutils are +# actually up to the task of handling maximum target platform. With all +# this in mind here is an example of how to configure "universal" build: +# +# ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8 +# +"linux-armv4", "gcc: -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-aarch64","gcc: -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +# Configure script adds minimally required -march for assembly support, +# if no -march was specified at command line. mips32 and mips64 below +# refer to contemporary MIPS Architecture specifications, MIPS32 and +# MIPS64, rather than to kernel bitness. +"linux-mips32", "gcc:-mabi=32 -O3 -Wall -DBN_DIV3W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-mips64", "gcc:-mabi=n32 -O3 -Wall -DBN_DIV3W::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips64_asm}:n32:dlfcn:linux-shared:-fPIC:-mabi=n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::32", +"linux64-mips64", "gcc:-mabi=64 -O3 -Wall -DBN_DIV3W::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips64_asm}:64:dlfcn:linux-shared:-fPIC:-mabi=64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", #### IA-32 targets... -"linux-ia32-icc", "icc:-DL_ENDIAN -O2 -no_cpprt::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-ia32-icc", "icc:-DL_ENDIAN -O2::-D_REENTRANT::-ldl -no_cpprt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-elf", "gcc:-DL_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-aout", "gcc:-DL_ENDIAN -O3 -fomit-frame-pointer -march=i486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out", #### "linux-generic64","gcc:-O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-ppc64", "gcc:-m64 -DB_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", -"linux-ia64", "gcc:-DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-ia64-ecc","ecc:-DL_ENDIAN -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"linux-ia64-icc","icc:-DL_ENDIAN -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-ppc64le","gcc:-m64 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:$ppc64_asm:linux64le:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::", +"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-ia64-icc","icc:-DL_ENDIAN -O2 -Wall::-D_REENTRANT::-ldl -no_cpprt:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-x86_64", "gcc:-m64 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"linux-x86_64-clang", "clang: -m64 -DL_ENDIAN -O3 -Wall -Wextra $clang_disabled_warnings -Qunused-arguments::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"linux-x86_64-icc", "icc:-DL_ENDIAN -O2::-D_REENTRANT::-ldl -no_cpprt:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"linux-x32", "gcc:-mx32 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::x32", "linux64-s390x", "gcc:-m64 -DB_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", #### So called "highgprs" target for z/Architecture CPUs # "Highgprs" is kernel feature first implemented in Linux 2.6.32, see @@ -407,6 +464,7 @@ my %table=( "android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "android-x86","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "android-armv7","gcc:-march=armv7-a -mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"android-mips","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", #### *BSD [do see comment about ${BSDthreads} above!] "BSD-generic32","gcc:-O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -421,7 +479,7 @@ my %table=( # triggered by RIPEMD160 code. "BSD-sparc64", "gcc:-DB_ENDIAN -O3 -DMD32_REG_T=int -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC2 BF_PTR:${sparcv9_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "BSD-ia64", "gcc:-DL_ENDIAN -O3 -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"BSD-x86_64", "gcc:-DL_ENDIAN -O3 -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"BSD-x86_64", "cc:-DL_ENDIAN -O3 -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -454,11 +512,11 @@ my %table=( # UnixWare 2.0x fails destest with -O. "unixware-2.0","cc:-DFILIO_H -DNO_STRINGS_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::", "unixware-2.1","cc:-O -DFILIO_H::-Kthread::-lsocket -lnsl -lresolv -lx:${x86_gcc_des} ${x86_gcc_opts}:::", -"unixware-7","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}:dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"unixware-7-gcc","gcc:-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -march=pentium -Wall::-D_REENTRANT::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:gnu-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"unixware-7","cc:-O -DFILIO_H -Kalloca::-Kthread::-lsocket -lnsl:BN_LLONG MD2_CHAR RC4_INDEX ${x86_gcc_des}:${x86_elf_asm}-1:dlfcn:svr5-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"unixware-7-gcc","gcc:-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -march=pentium -Wall::-D_REENTRANT::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}-1:dlfcn:gnu-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", # SCO 5 - Ben Laurie says the -O breaks the SCO cc. -"sco5-cc", "cc:-belf::(unknown)::-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"sco5-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:svr3-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"sco5-cc", "cc:-belf::(unknown)::-lsocket -lnsl:${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}-1:dlfcn:svr3-shared:-Kpic::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"sco5-gcc", "gcc:-O3 -fomit-frame-pointer::(unknown)::-lsocket -lnsl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}-1:dlfcn:svr3-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", #### IBM's AIX. "aix3-cc", "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::", @@ -518,9 +576,9 @@ my %table=( # Visual C targets # # Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64 -"VC-WIN64I","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64I::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:ia64cpuid.o:ia64.o ia64-mont.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o:::::::ghash-ia64.o::ias:win32", +"VC-WIN64I","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64I::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:ia64cpuid.o:ia64.o ia64-mont.o:::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o:::::::ghash-ia64.o::ias:win32", "VC-WIN64A","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:".eval{my $asm=$x86_64_asm;$asm=~s/x86_64-gcc\.o/bn_asm.o/;$asm}.":auto:win32", -"debug-VC-WIN64I","cl:-W3 -Gs0 -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64I::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:ia64cpuid.o:ia64.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o:::::::ghash-ia64.o::ias:win32", +"debug-VC-WIN64I","cl:-W3 -Gs0 -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64I::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:ia64cpuid.o:ia64.o:::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o:::::::ghash-ia64.o::ias:win32", "debug-VC-WIN64A","cl:-W3 -Gs0 -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:".eval{my $asm=$x86_64_asm;$asm=~s/x86_64-gcc\.o/bn_asm.o/;$asm}.":auto:win32", # x86 Win32 target defaults to ANSI API, if you want UNICODE, complement # 'perl Configure VC-WIN32' with '-DUNICODE -D_UNICODE' @@ -547,9 +605,8 @@ my %table=( "UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32", # Cygwin -"Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32", -"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:coff:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a", -"debug-Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror:::CYGWIN32:::${no_asm}:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a", +"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:coff:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a", +"Cygwin-x86_64", "gcc:-DTERMIOS -DL_ENDIAN -O3 -Wall:::CYGWIN::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:mingw64:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a", # NetWare from David Ward (dsward@novell.com) # requires either MetroWerks NLM development tools, or gcc / nlmconv @@ -581,7 +638,8 @@ my %table=( "darwin64-ppc-cc","cc:-arch ppc64 -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc64_asm}:osx64:dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", "darwin-i386-cc","cc:-arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:".eval{my $asm=$x86_asm;$asm=~s/cast\-586\.o//;$asm}.":macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", "debug-darwin-i386-cc","cc:-arch i386 -g3 -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:${x86_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", -"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -DL_ENDIAN -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:".eval{my $asm=$x86_64_asm;$asm=~s/rc4\-[^:]+//;$asm}.":macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", +"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -DL_ENDIAN -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:".eval{my $asm=$x86_64_asm;$asm=~s/rc4\-[^:]+//;$asm}.":macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", +"debug-darwin64-x86_64-cc","cc:-arch x86_64 -ggdb -g2 -O0 -DL_ENDIAN -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:".eval{my $asm=$x86_64_asm;$asm=~s/rc4\-[^:]+//;$asm}.":macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", "debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc32_asm}:osx32:dlfcn:darwin-shared:-fPIC:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", # iPhoneOS/iOS "iphoneos-cross","llvm-gcc:-O3 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fomit-frame-pointer -fno-common::-D_REENTRANT:iOS:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", @@ -634,6 +692,7 @@ my $idx_lflags = $idx++; my $idx_bn_ops = $idx++; my $idx_cpuid_obj = $idx++; my $idx_bn_obj = $idx++; +my $idx_ec_obj = $idx++; my $idx_des_obj = $idx++; my $idx_aes_obj = $idx++; my $idx_bf_obj = $idx++; @@ -714,11 +773,13 @@ my %disabled = ( # "what" => "co "ec_nistp_64_gcc_128" => "default", "gmp" => "default", "jpake" => "experimental", + "libunbound" => "experimental", "md2" => "default", "rc5" => "default", "rfc3779" => "default", "sctp" => "default", "shared" => "default", + "ssl-trace" => "default", "store" => "experimental", "unit-test" => "default", "zlib" => "default", @@ -728,7 +789,7 @@ my @experimental = (); # This is what $depflags will look like with the above defaults # (we need this to see if we should advise the user to run "make depend"): -my $default_depflags = " -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST"; +my $default_depflags = " -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_LIBUNBOUND -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_SSL_TRACE -DOPENSSL_NO_STORE -DOPENSSL_NO_UNIT_TEST"; # Explicit "no-..." options will be collected in %disabled along with the defaults. # To remove something from %disabled, use "enable-foo" (unless it's experimental). @@ -873,16 +934,7 @@ PROCESS_ARGS: } elsif (/^[-+]/) { - if (/^-[lL](.*)$/ or /^-Wl,/) - { - $libs.=$_." "; - } - elsif (/^-[^-]/ or /^\+/) - { - $_ =~ s/%([0-9a-f]{1,2})/chr(hex($1))/gei; - $flags.=$_." "; - } - elsif (/^--prefix=(.*)$/) + if (/^--prefix=(.*)$/) { $prefix=$1; } @@ -926,10 +978,14 @@ PROCESS_ARGS: { $cross_compile_prefix=$1; } - else + elsif (/^-[lL](.*)$/ or /^-Wl,/) + { + $libs.=$_." "; + } + else # common if (/^[-+]/), just pass down... { - print STDERR $usage; - exit(1); + $_ =~ s/%([0-9a-f]{1,2})/chr(hex($1))/gei; + $flags.=$_." "; } } elsif ($_ =~ /^([^:]+):(.+)$/) @@ -1156,6 +1212,7 @@ my $cc = $fields[$idx_cc]; if($ENV{CC}) { $cc = $ENV{CC}; } + my $cflags = $fields[$idx_cflags]; my $unistd = $fields[$idx_unistd]; my $thread_cflag = $fields[$idx_thread_cflag]; @@ -1164,6 +1221,7 @@ my $lflags = $fields[$idx_lflags]; my $bn_ops = $fields[$idx_bn_ops]; my $cpuid_obj = $fields[$idx_cpuid_obj]; my $bn_obj = $fields[$idx_bn_obj]; +my $ec_obj = $fields[$idx_ec_obj]; my $des_obj = $fields[$idx_des_obj]; my $aes_obj = $fields[$idx_aes_obj]; my $bf_obj = $fields[$idx_bf_obj]; @@ -1209,6 +1267,12 @@ if ($target =~ /^mingw/ && `$cc --target $shared_ldflag =~ s/\-mno\-cygwin\s*//; } +if ($target =~ /linux.*\-mips/ && !$no_asm && $flags !~ /\-m(ips|arch=)/) { + # minimally required architecture flags for assembly modules + $cflags="-mips2 $cflags" if ($target =~ /mips32/); + $cflags="-mips3 $cflags" if ($target =~ /mips64/); +} + my $no_shared_warn=0; my $no_user_cflags=0; @@ -1335,7 +1399,7 @@ $lflags="$libs$lflags" if ($libs ne ""); if ($no_asm) { - $cpuid_obj=$bn_obj= + $cpuid_obj=$bn_obj=$ec_obj= $des_obj=$aes_obj=$bf_obj=$cast_obj=$rc4_obj=$rc5_obj=$cmll_obj= $modes_obj=$sha1_obj=$md5_obj=$rmd160_obj=$wp_obj=$engines_obj=""; } @@ -1416,6 +1480,7 @@ if ($target =~ /\-icc$/) # Intel C compi } if ($iccver>=8) { + $cflags=~s/\-KPIC/-fPIC/; # Eliminate unnecessary dependency from libirc.a. This is # essential for shared library support, as otherwise # apps/openssl can end up in endless loop upon startup... @@ -1423,12 +1488,17 @@ if ($target =~ /\-icc$/) # Intel C compi } if ($iccver>=9) { - $cflags.=" -i-static"; - $cflags=~s/\-no_cpprt/-no-cpprt/; + $lflags.=" -i-static"; + $lflags=~s/\-no_cpprt/-no-cpprt/; } if ($iccver>=10) { - $cflags=~s/\-i\-static/-static-intel/; + $lflags=~s/\-i\-static/-static-intel/; + } + if ($iccver>=11) + { + $cflags.=" -no-intel-extensions"; # disable Cilk + $lflags=~s/\-no\-cpprt/-no-cxxlib/; } } @@ -1509,7 +1579,7 @@ if ($rmd160_obj =~ /\.o$/) } if ($aes_obj =~ /\.o$/) { - $cflags.=" -DAES_ASM"; + $cflags.=" -DAES_ASM" if ($aes_obj =~ m/\baes\-/);; # aes-ctr.o is not a real file, only indication that assembler # module implements AES_ctr32_encrypt... $cflags.=" -DAES_CTR_ASM" if ($aes_obj =~ s/\s*aes\-ctr\.o//); @@ -1531,10 +1601,14 @@ else { $wp_obj="wp_block.o"; } $cmll_obj=$cmll_enc unless ($cmll_obj =~ /.o$/); -if ($modes_obj =~ /ghash/) +if ($modes_obj =~ /ghash\-/) { $cflags.=" -DGHASH_ASM"; } +if ($ec_obj =~ /ecp_nistz256/) + { + $cflags.=" -DECP_NISTZ256_ASM"; + } # "Stringify" the C flags string. This permits it to be made part of a string # and works as well on command lines. @@ -1574,12 +1648,21 @@ if ($shlib_version_number =~ /(^[0-9]*)\ if ($strict_warnings) { + my $ecc = $cc; + $ecc = "clang" if `$cc --version 2>&1` =~ /clang/; my $wopt; - die "ERROR --strict-warnings requires gcc" unless ($cc =~ /gcc$/); + die "ERROR --strict-warnings requires gcc or clang" unless ($ecc =~ /gcc$/ or $ecc =~ /clang$/); foreach $wopt (split /\s+/, $gcc_devteam_warn) { $cflags .= " $wopt" unless ($cflags =~ /$wopt/) } + if ($ecc eq "clang") + { + foreach $wopt (split /\s+/, $clang_devteam_warn) + { + $cflags .= " $wopt" unless ($cflags =~ /$wopt/) + } + } } open(IN,') s/^EXE_EXT=.*$/EXE_EXT= $exe_ext/; s/^CPUID_OBJ=.*$/CPUID_OBJ= $cpuid_obj/; s/^BN_ASM=.*$/BN_ASM= $bn_obj/; + s/^EC_ASM=.*$/EC_ASM= $ec_obj/; s/^DES_ENC=.*$/DES_ENC= $des_obj/; s/^AES_ENC=.*$/AES_ENC= $aes_obj/; s/^BF_ENC=.*$/BF_ENC= $bf_obj/; @@ -1699,6 +1783,7 @@ print "CFLAG =$cflags\n"; print "EX_LIBS =$lflags\n"; print "CPUID_OBJ =$cpuid_obj\n"; print "BN_ASM =$bn_obj\n"; +print "EC_ASM =$ec_obj\n"; print "DES_ENC =$des_obj\n"; print "AES_ENC =$aes_obj\n"; print "BF_ENC =$bf_obj\n"; @@ -1997,7 +2082,7 @@ BEGIN VALUE "ProductVersion", "$version\\0" // Optional: //VALUE "Comments", "\\0" - VALUE "LegalCopyright", "Copyright © 1998-2005 The OpenSSL Project. Copyright © 1995-1998 Eric A. Young, Tim J. Hudson. All rights reserved.\\0" + VALUE "LegalCopyright", "Copyright © 1998-2005 The OpenSSL Project. Copyright © 1995-1998 Eric A. Young, Tim J. Hudson. All rights reserved.\\0" //VALUE "LegalTrademarks", "\\0" //VALUE "PrivateBuild", "\\0" //VALUE "SpecialBuild", "\\0" @@ -2106,12 +2191,12 @@ sub print_table_entry { my $target = shift; - (my $cc,my $cflags,my $unistd,my $thread_cflag,my $sys_id,my $lflags, - my $bn_ops,my $cpuid_obj,my $bn_obj,my $des_obj,my $aes_obj, my $bf_obj, - my $md5_obj,my $sha1_obj,my $cast_obj,my $rc4_obj,my $rmd160_obj, - my $rc5_obj,my $wp_obj,my $cmll_obj,my $modes_obj, my $engines_obj, - my $perlasm_scheme,my $dso_scheme,my $shared_target,my $shared_cflag, - my $shared_ldflag,my $shared_extension,my $ranlib,my $arflags,my $multilib)= + my ($cc, $cflags, $unistd, $thread_cflag, $sys_id, $lflags, + $bn_ops, $cpuid_obj, $bn_obj, $ec_obj, $des_obj, $aes_obj, $bf_obj, + $md5_obj, $sha1_obj, $cast_obj, $rc4_obj, $rmd160_obj, + $rc5_obj, $wp_obj, $cmll_obj, $modes_obj, $engines_obj, + $perlasm_scheme, $dso_scheme, $shared_target, $shared_cflag, + $shared_ldflag, $shared_extension, $ranlib, $arflags, $multilib)= split(/\s*:\s*/,$table{$target} . ":" x 30 , -1); print <. -OpenSSL 1.0.1e was released on Feb 11th, 2013. +OpenSSL 1.0.1a was released on Apr 19th, 2012. In addition to the current stable release, you can also access daily snapshots of the OpenSSL development version at Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 491BAA1DD72; Fri, 23 Oct 2015 19:48:33 +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 EA0CA38F; Fri, 23 Oct 2015 19:48:32 +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 t9NJmV4Q092268; Fri, 23 Oct 2015 19:48:31 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NJmVlu092267; Fri, 23 Oct 2015 19:48:31 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201510231948.t9NJmVlu092267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 23 Oct 2015 19:48:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r289849 - vendor-crypto/openssl/1.0.2d X-SVN-Group: vendor-crypto MIME-Version: 1.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, 23 Oct 2015 19:48:33 -0000 Author: jkim Date: Fri Oct 23 19:48:31 2015 New Revision: 289849 URL: https://svnweb.freebsd.org/changeset/base/289849 Log: Tag OpenSSL 1.0.2d. Added: vendor-crypto/openssl/1.0.2d/ - copied from r289848, vendor-crypto/openssl/dist/ From owner-svn-src-all@freebsd.org Fri Oct 23 19:49: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 523FEA1DDB0; Fri, 23 Oct 2015 19:49:43 +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 1AB6D74A; Fri, 23 Oct 2015 19:49:43 +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 t9NJngec092347; Fri, 23 Oct 2015 19:49:42 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NJngft092346; Fri, 23 Oct 2015 19:49:42 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201510231949.t9NJngft092346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 23 Oct 2015 19:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r289850 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 19:49:43 -0000 Author: jkim Date: Fri Oct 23 19:49:41 2015 New Revision: 289850 URL: https://svnweb.freebsd.org/changeset/base/289850 Log: OpenSSL 1.0.2d vendor import is complete. Revert to normal ceiling. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Fri Oct 23 19:48:31 2015 (r289849) +++ svnadmin/conf/sizelimit.conf Fri Oct 23 19:49:41 2015 (r289850) @@ -33,7 +33,7 @@ gonzo imp jb jeff -jkim +#jkim kmacy lstewart #ngie From owner-svn-src-all@freebsd.org Fri Oct 23 20:49: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 C2D36A1D88F; Fri, 23 Oct 2015 20:49:35 +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 8BD9F9AB; Fri, 23 Oct 2015 20:49:35 +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 t9NKnYHP010374; Fri, 23 Oct 2015 20:49:34 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NKnYcD010372; Fri, 23 Oct 2015 20:49:34 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510232049.t9NKnYcD010372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 23 Oct 2015 20:49:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289851 - 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: Fri, 23 Oct 2015 20:49:36 -0000 Author: ian Date: Fri Oct 23 20:49:34 2015 New Revision: 289851 URL: https://svnweb.freebsd.org/changeset/base/289851 Log: Whitespace and style nits, no functional changes. The goal is to make these two files cosmetically alike so that the actual implementation differences are visible. The only changes which aren't spaces<->tabs and rewrapping and reindenting lines are a couple fields shuffled around in the tag and map structs so that everything is in the same order in both versions (which should amount to no functional change). Modified: head/sys/arm/arm/busdma_machdep-v6.c head/sys/arm/arm/busdma_machdep.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Fri Oct 23 19:49:41 2015 (r289850) +++ head/sys/arm/arm/busdma_machdep-v6.c Fri Oct 23 20:49:34 2015 (r289851) @@ -64,32 +64,32 @@ __FBSDID("$FreeBSD$"); #include #include -#define MAX_BPAGES 64 -#define MAX_DMA_SEGMENTS 4096 -#define BUS_DMA_EXCL_BOUNCE BUS_DMA_BUS2 -#define BUS_DMA_ALIGN_BOUNCE BUS_DMA_BUS3 -#define BUS_DMA_COULD_BOUNCE (BUS_DMA_EXCL_BOUNCE | BUS_DMA_ALIGN_BOUNCE) -#define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4 +#define MAX_BPAGES 64 +#define MAX_DMA_SEGMENTS 4096 +#define BUS_DMA_EXCL_BOUNCE BUS_DMA_BUS2 +#define BUS_DMA_ALIGN_BOUNCE BUS_DMA_BUS3 +#define BUS_DMA_COULD_BOUNCE (BUS_DMA_EXCL_BOUNCE | BUS_DMA_ALIGN_BOUNCE) +#define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4 struct bounce_zone; struct bus_dma_tag { - bus_dma_tag_t parent; - bus_size_t alignment; - bus_size_t boundary; - bus_addr_t lowaddr; - bus_addr_t highaddr; - bus_dma_filter_t *filter; - void *filterarg; - bus_size_t maxsize; - u_int nsegments; - bus_size_t maxsegsz; - int flags; - int ref_count; - int map_count; - bus_dma_lock_t *lockfunc; - void *lockfuncarg; - struct bounce_zone *bounce_zone; + bus_dma_tag_t parent; + bus_size_t alignment; + bus_size_t boundary; + bus_addr_t lowaddr; + bus_addr_t highaddr; + bus_dma_filter_t *filter; + void *filterarg; + bus_size_t maxsize; + u_int nsegments; + bus_size_t maxsegsz; + int flags; + int ref_count; + int map_count; + bus_dma_lock_t *lockfunc; + void *lockfuncarg; + struct bounce_zone *bounce_zone; /* * DMA range for this tag. If the page doesn't fall within * one of these ranges, an error is returned. The caller @@ -178,21 +178,21 @@ SYSCTL_INT(_hw_busdma, OID_AUTO, total_b "Total bounce pages"); struct bus_dmamap { - struct bp_list bpages; - int pagesneeded; - int pagesreserved; - bus_dma_tag_t dmat; - struct memdesc mem; - bus_dmamap_callback_t *callback; - void *callback_arg; - int flags; -#define DMAMAP_COHERENT (1 << 0) -#define DMAMAP_DMAMEM_ALLOC (1 << 1) -#define DMAMAP_MBUF (1 << 2) + struct bp_list bpages; + int pagesneeded; + int pagesreserved; + bus_dma_tag_t dmat; + struct memdesc mem; + bus_dmamap_callback_t *callback; + void *callback_arg; + int flags; +#define DMAMAP_COHERENT (1 << 0) +#define DMAMAP_DMAMEM_ALLOC (1 << 1) +#define DMAMAP_MBUF (1 << 2) STAILQ_ENTRY(bus_dmamap) links; bus_dma_segment_t *segments; - int sync_count; - struct sync_list slist[]; + int sync_count; + struct sync_list slist[]; }; static STAILQ_HEAD(, bus_dmamap) bounce_map_waitinglist; @@ -202,10 +202,9 @@ static void init_bounce_pages(void *dumm static int alloc_bounce_zone(bus_dma_tag_t dmat); static int alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages); static int reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t map, - int commit); + int commit); static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, - vm_offset_t vaddr, bus_addr_t addr, - bus_size_t size); + vm_offset_t vaddr, bus_addr_t addr, bus_size_t size); static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); static void _bus_dmamap_count_pages(bus_dma_tag_t dmat, pmap_t pmap, bus_dmamap_t map, void *buf, bus_size_t buflen, int flags); @@ -457,11 +456,10 @@ dflt_lock(void *arg, bus_dma_lock_op_t o */ int bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, - bus_size_t boundary, bus_addr_t lowaddr, - bus_addr_t highaddr, bus_dma_filter_t *filter, - void *filterarg, bus_size_t maxsize, int nsegments, - bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc, - void *lockfuncarg, bus_dma_tag_t *dmat) + bus_size_t boundary, bus_addr_t lowaddr, bus_addr_t highaddr, + bus_dma_filter_t *filter, void *filterarg, bus_size_t maxsize, + int nsegments, bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc, + void *lockfuncarg, bus_dma_tag_t *dmat) { bus_dma_tag_t newtag; int error = 0; @@ -762,7 +760,7 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, b */ int bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, - bus_dmamap_t *mapp) + bus_dmamap_t *mapp) { busdma_bufalloc_t ba; struct busdma_bufzone *bufzone; @@ -977,7 +975,7 @@ _bus_dmamap_reserve_pages(bus_dma_tag_t */ static int _bus_dmamap_addseg(bus_dma_tag_t dmat, bus_dmamap_t map, bus_addr_t curaddr, - bus_size_t sgsize, bus_dma_segment_t *segs, int *segp) + bus_size_t sgsize, bus_dma_segment_t *segs, int *segp) { bus_addr_t baddr, bmask; int seg; @@ -1021,7 +1019,7 @@ _bus_dmamap_addseg(bus_dma_tag_t dmat, b if (curaddr == segs[seg].ds_addr + segs[seg].ds_len && (segs[seg].ds_len + sgsize) <= dmat->maxsegsz && (dmat->boundary == 0 || - (segs[seg].ds_addr & bmask) == (curaddr & bmask))) + (segs[seg].ds_addr & bmask) == (curaddr & bmask))) segs[seg].ds_len += sgsize; else { if (++seg >= dmat->nsegments) @@ -1039,12 +1037,8 @@ _bus_dmamap_addseg(bus_dma_tag_t dmat, b * the starting segment on entrace, and the ending segment on exit. */ int -_bus_dmamap_load_phys(bus_dma_tag_t dmat, - bus_dmamap_t map, - vm_paddr_t buf, bus_size_t buflen, - int flags, - bus_dma_segment_t *segs, - int *segp) +_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf, + bus_size_t buflen, int flags, bus_dma_segment_t *segs, int *segp) { bus_addr_t curaddr; bus_addr_t sl_end = 0; @@ -1124,16 +1118,12 @@ _bus_dmamap_load_ma(bus_dma_tag_t dmat, /* * Utility function to load a linear buffer. segp contains - * the starting segment on entrace, and the ending segment on exit. + * the starting segment on entrance, and the ending segment on exit. */ int -_bus_dmamap_load_buffer(bus_dma_tag_t dmat, - bus_dmamap_t map, - void *buf, bus_size_t buflen, - pmap_t pmap, - int flags, - bus_dma_segment_t *segs, - int *segp) +_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf, + bus_size_t buflen, pmap_t pmap, int flags, bus_dma_segment_t *segs, + int *segp) { bus_size_t sgsize; bus_addr_t curaddr; @@ -1216,7 +1206,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm sl->datacount += sgsize; } sgsize = _bus_dmamap_addseg(dmat, map, curaddr, sgsize, segs, - segp); + segp); if (sgsize == 0) break; vaddr += sgsize; @@ -1234,11 +1224,9 @@ cleanup: return (0); } - void -__bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map, - struct memdesc *mem, bus_dmamap_callback_t *callback, - void *callback_arg) +__bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map, struct memdesc *mem, + bus_dmamap_callback_t *callback, void *callback_arg) { map->mem = *mem; @@ -1249,7 +1237,7 @@ __bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dma_segment_t * _bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t map, - bus_dma_segment_t *segs, int nsegs, int error) + bus_dma_segment_t *segs, int nsegs, int error) { if (segs == NULL) @@ -1645,14 +1633,13 @@ reserve_bounce_pages(bus_dma_tag_t dmat, static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, vm_offset_t vaddr, - bus_addr_t addr, bus_size_t size) + bus_addr_t addr, bus_size_t size) { struct bounce_zone *bz; struct bounce_page *bpage; KASSERT(dmat->bounce_zone != NULL, ("no bounce zone in dma tag")); - KASSERT(map != NULL, - ("add_bounce_page: bad map %p", map)); + KASSERT(map != NULL, ("add_bounce_page: bad map %p", map)); bz = dmat->bounce_zone; if (map->pagesneeded == 0) Modified: head/sys/arm/arm/busdma_machdep.c ============================================================================== --- head/sys/arm/arm/busdma_machdep.c Fri Oct 23 19:49:41 2015 (r289850) +++ head/sys/arm/arm/busdma_machdep.c Fri Oct 23 20:49:34 2015 (r289851) @@ -80,9 +80,9 @@ __FBSDID("$FreeBSD$"); #include #include -#define MAX_BPAGES 64 -#define BUS_DMA_COULD_BOUNCE BUS_DMA_BUS3 -#define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4 +#define MAX_BPAGES 64 +#define BUS_DMA_COULD_BOUNCE BUS_DMA_BUS3 +#define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4 struct bounce_zone; @@ -102,6 +102,7 @@ struct bus_dma_tag { int map_count; bus_dma_lock_t *lockfunc; void *lockfuncarg; + struct bounce_zone *bounce_zone; /* * DMA range for this tag. If the page doesn't fall within * one of these ranges, an error is returned. The caller @@ -110,7 +111,6 @@ struct bus_dma_tag { */ struct arm32_dma_range *ranges; int _nranges; - struct bounce_zone *bounce_zone; /* * Most tags need one or two segments, and can use the local tagsegs * array. For tags with a larger limit, we'll allocate a bigger array @@ -166,21 +166,20 @@ static SYSCTL_NODE(_hw, OID_AUTO, busdma SYSCTL_INT(_hw_busdma, OID_AUTO, total_bpages, CTLFLAG_RD, &total_bpages, 0, "Total bounce pages"); -#define DMAMAP_COHERENT 0x8 -#define DMAMAP_CACHE_ALIGNED 0x10 - struct bus_dmamap { - struct bp_list bpages; - int pagesneeded; - int pagesreserved; - bus_dma_tag_t dmat; - struct memdesc mem; - int flags; + struct bp_list bpages; + int pagesneeded; + int pagesreserved; + bus_dma_tag_t dmat; + struct memdesc mem; + bus_dmamap_callback_t *callback; + void *callback_arg; + int flags; +#define DMAMAP_COHERENT 0x8 +#define DMAMAP_CACHE_ALIGNED 0x10 STAILQ_ENTRY(bus_dmamap) links; - bus_dmamap_callback_t *callback; - void *callback_arg; - int sync_count; - struct sync_list *slist; + int sync_count; + struct sync_list *slist; }; static STAILQ_HEAD(, bus_dmamap) bounce_map_waitinglist; @@ -194,13 +193,12 @@ static void init_bounce_pages(void *dumm static int alloc_bounce_zone(bus_dma_tag_t dmat); static int alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages); static int reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t map, - int commit); + int commit); static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, - vm_offset_t vaddr, bus_addr_t addr, - bus_size_t size); + vm_offset_t vaddr, bus_addr_t addr, bus_size_t size); static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); static void bus_dmamap_sync_sl(struct sync_list *sl, bus_dmasync_op_t op, - int bufaligned); + int bufaligned); /* Default tag, as most drivers provide no parent tag. */ bus_dma_tag_t arm_root_dma_tag; @@ -361,6 +359,7 @@ _bus_dma_inrange(struct arm32_dma_range return (NULL); } + /* * Convenience function for manipulating driver locks from busdma (during * busdma_swi, for example). Drivers that don't provide their own locks @@ -408,11 +407,10 @@ dflt_lock(void *arg, bus_dma_lock_op_t o int bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, - bus_addr_t boundary, bus_addr_t lowaddr, - bus_addr_t highaddr, bus_dma_filter_t *filter, - void *filterarg, bus_size_t maxsize, int nsegments, - bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc, - void *lockfuncarg, bus_dma_tag_t *dmat) + bus_addr_t boundary, bus_addr_t lowaddr, bus_addr_t highaddr, + bus_dma_filter_t *filter, void *filterarg, bus_size_t maxsize, + int nsegments, bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc, + void *lockfuncarg, bus_dma_tag_t *dmat) { bus_dma_tag_t newtag; int error = 0; @@ -435,8 +433,8 @@ bus_dma_tag_create(bus_dma_tag_t parent, newtag->highaddr = trunc_page((vm_offset_t)highaddr) + (PAGE_SIZE - 1); newtag->filter = filter; newtag->filterarg = filterarg; - newtag->maxsize = maxsize; - newtag->nsegments = nsegments; + newtag->maxsize = maxsize; + newtag->nsegments = nsegments; newtag->maxsegsz = maxsegsz; newtag->flags = flags; newtag->ref_count = 1; /* Count ourself */ @@ -465,25 +463,25 @@ bus_dma_tag_create(bus_dma_tag_t parent, /* * Take into account any restrictions imposed by our parent tag */ - if (parent != NULL) { - newtag->lowaddr = MIN(parent->lowaddr, newtag->lowaddr); - newtag->highaddr = MAX(parent->highaddr, newtag->highaddr); + if (parent != NULL) { + newtag->lowaddr = MIN(parent->lowaddr, newtag->lowaddr); + newtag->highaddr = MAX(parent->highaddr, newtag->highaddr); if (newtag->boundary == 0) newtag->boundary = parent->boundary; else if (parent->boundary != 0) - newtag->boundary = MIN(parent->boundary, + newtag->boundary = MIN(parent->boundary, newtag->boundary); if ((newtag->filter != NULL) || ((parent->flags & BUS_DMA_COULD_BOUNCE) != 0)) newtag->flags |= BUS_DMA_COULD_BOUNCE; - if (newtag->filter == NULL) { - /* - * Short circuit looking at our parent directly - * since we have encapsulated all of its information - */ - newtag->filter = parent->filter; - newtag->filterarg = parent->filterarg; - newtag->parent = parent->parent; + if (newtag->filter == NULL) { + /* + * Short circuit looking at our parent directly + * since we have encapsulated all of its information + */ + newtag->filter = parent->filter; + newtag->filterarg = parent->filterarg; + newtag->parent = parent->parent; } if (newtag->parent != NULL) atomic_add_int(&parent->ref_count, 1); @@ -536,32 +534,32 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) if (dmat != NULL) { - if (dmat->map_count != 0) - return (EBUSY); + if (dmat->map_count != 0) + return (EBUSY); - while (dmat != NULL) { - bus_dma_tag_t parent; + while (dmat != NULL) { + bus_dma_tag_t parent; - parent = dmat->parent; - atomic_subtract_int(&dmat->ref_count, 1); - if (dmat->ref_count == 0) { + parent = dmat->parent; + atomic_subtract_int(&dmat->ref_count, 1); + if (dmat->ref_count == 0) { if (dmat->segments != NULL && dmat->segments != dmat->tagsegs) free(dmat->segments, M_DEVBUF); - free(dmat, M_DEVBUF); - /* - * Last reference count, so - * release our reference - * count on our parent. - */ - dmat = parent; - } else - dmat = NULL; - } - } + free(dmat, M_DEVBUF); + /* + * Last reference count, so + * release our reference + * count on our parent. + */ + dmat = parent; + } else + dmat = NULL; + } + } CTR2(KTR_BUSDMA, "%s tag %p", __func__, dmat_copy); - return (0); + return (0); } #include @@ -686,7 +684,7 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, b */ int bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddrp, int flags, - bus_dmamap_t *mapp) + bus_dmamap_t *mapp) { struct sync_list *slist; void * vaddr; @@ -934,7 +932,7 @@ _bus_dmamap_addseg(bus_dma_tag_t dmat, b curaddr == segs[seg].ds_addr + segs[seg].ds_len && (segs[seg].ds_len + sgsize) <= dmat->maxsegsz && (dmat->boundary == 0 || - (segs[seg].ds_addr & bmask) == (curaddr & bmask))) { + (segs[seg].ds_addr & bmask) == (curaddr & bmask))) { segs[seg].ds_len += sgsize; } else { if (++seg >= dmat->nsegments) @@ -1129,9 +1127,8 @@ cleanup: } void -__bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map, - struct memdesc *mem, bus_dmamap_callback_t *callback, - void *callback_arg) +__bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map, struct memdesc *mem, + bus_dmamap_callback_t *callback, void *callback_arg) { KASSERT(dmat != NULL, ("dmatag is NULL")); @@ -1143,7 +1140,7 @@ __bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dma_segment_t * _bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t map, - bus_dma_segment_t *segs, int nsegs, int error) + bus_dma_segment_t *segs, int nsegs, int error) { if (segs == NULL) @@ -1164,7 +1161,6 @@ _bus_dmamap_unload(bus_dma_tag_t dmat, b free_bounce_page(dmat, bpage); } map->sync_count = 0; - return; } static void @@ -1358,12 +1354,14 @@ SYSINIT(bpages, SI_SUB_LOCK, SI_ORDER_AN static struct sysctl_ctx_list * busdma_sysctl_tree(struct bounce_zone *bz) { + return (&bz->sysctl_tree); } static struct sysctl_oid * busdma_sysctl_tree_top(struct bounce_zone *bz) { + return (bz->sysctl_tree_top); } @@ -1374,8 +1372,8 @@ alloc_bounce_zone(bus_dma_tag_t dmat) /* Check to see if we already have a suitable zone */ STAILQ_FOREACH(bz, &bounce_zone_list, links) { - if ((dmat->alignment <= bz->alignment) - && (dmat->lowaddr >= bz->lowaddr)) { + if ((dmat->alignment <= bz->alignment) && + (dmat->lowaddr >= bz->lowaddr)) { dmat->bounce_zone = bz; return (0); } @@ -1426,7 +1424,7 @@ alloc_bounce_zone(bus_dma_tag_t dmat) SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "total_bounced", CTLFLAG_RD, &bz->total_bounced, 0, - "Total bounce requests"); + "Total bounce requests (pages bounced)"); SYSCTL_ADD_INT(busdma_sysctl_tree(bz), SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, "total_deferred", CTLFLAG_RD, &bz->total_deferred, 0, @@ -1453,15 +1451,12 @@ alloc_bounce_pages(bus_dma_tag_t dmat, u struct bounce_page *bpage; bpage = (struct bounce_page *)malloc(sizeof(*bpage), M_DEVBUF, - M_NOWAIT | M_ZERO); + M_NOWAIT | M_ZERO); if (bpage == NULL) break; bpage->vaddr = (vm_offset_t)contigmalloc(PAGE_SIZE, M_DEVBUF, - M_NOWAIT, 0ul, - bz->lowaddr, - PAGE_SIZE, - 0); + M_NOWAIT, 0ul, bz->lowaddr, PAGE_SIZE, 0); if (bpage->vaddr == 0) { free(bpage, M_DEVBUF); break; @@ -1500,7 +1495,7 @@ reserve_bounce_pages(bus_dma_tag_t dmat, static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, vm_offset_t vaddr, - bus_addr_t addr, bus_size_t size) + bus_addr_t addr, bus_size_t size) { struct bounce_zone *bz; struct bounce_page *bpage; @@ -1567,7 +1562,7 @@ free_bounce_page(bus_dma_tag_t dmat, str if (reserve_bounce_pages(map->dmat, map, 1) == 0) { STAILQ_REMOVE_HEAD(&bounce_map_waitinglist, links); STAILQ_INSERT_TAIL(&bounce_map_callbacklist, - map, links); + map, links); busdma_swi_pending = 1; bz->total_deferred++; swi_sched(vm_ih, 0); @@ -1587,10 +1582,10 @@ busdma_swi(void) STAILQ_REMOVE_HEAD(&bounce_map_callbacklist, links); mtx_unlock(&bounce_lock); dmat = map->dmat; - (dmat->lockfunc)(dmat->lockfuncarg, BUS_DMA_LOCK); - bus_dmamap_load_mem(map->dmat, map, &map->mem, - map->callback, map->callback_arg, BUS_DMA_WAITOK); - (dmat->lockfunc)(dmat->lockfuncarg, BUS_DMA_UNLOCK); + dmat->lockfunc(dmat->lockfuncarg, BUS_DMA_LOCK); + bus_dmamap_load_mem(map->dmat, map, &map->mem, map->callback, + map->callback_arg, BUS_DMA_WAITOK); + dmat->lockfunc(dmat->lockfuncarg, BUS_DMA_UNLOCK); mtx_lock(&bounce_lock); } mtx_unlock(&bounce_lock); From owner-svn-src-all@freebsd.org Fri Oct 23 21:01: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 A211DA1DC12; Fri, 23 Oct 2015 21:01:47 +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 60C2EF6; Fri, 23 Oct 2015 21:01:47 +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 t9NL1kbo013836; Fri, 23 Oct 2015 21:01:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NL1kZY013835; Fri, 23 Oct 2015 21:01:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510232101.t9NL1kZY013835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 23 Oct 2015 21:01:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289852 - 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: Fri, 23 Oct 2015 21:01:47 -0000 Author: mav Date: Fri Oct 23 21:01:46 2015 New Revision: 289852 URL: https://svnweb.freebsd.org/changeset/base/289852 Log: Missed addition for r289812. Modified: head/sys/dev/isp/isp_sbus.c Modified: head/sys/dev/isp/isp_sbus.c ============================================================================== --- head/sys/dev/isp/isp_sbus.c Fri Oct 23 20:49:34 2015 (r289851) +++ head/sys/dev/isp/isp_sbus.c Fri Oct 23 21:01:46 2015 (r289852) @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); static uint32_t isp_sbus_rd_reg(ispsoftc_t *, int); static void isp_sbus_wr_reg(ispsoftc_t *, int, uint32_t); -static int isp_sbus_rd_isr(ispsoftc_t *, uint32_t *, uint16_t *, uint16_t *); +static int isp_sbus_rd_isr(ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); static int isp_sbus_mbxdma(ispsoftc_t *); static int isp_sbus_dmasetup(ispsoftc_t *, XS_T *, void *); From owner-svn-src-all@freebsd.org Fri Oct 23 21:06: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 C309CA1DC6E; Fri, 23 Oct 2015 21:06:12 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [66.135.54.68]) by mx1.freebsd.org (Postfix) with ESMTP id 9C5B4336; Fri, 23 Oct 2015 21:06:12 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: by mail.soaustin.net (Postfix, from userid 502) id F21545618B; Fri, 23 Oct 2015 16:06:05 -0500 (CDT) Date: Fri, 23 Oct 2015 16:06:05 -0500 From: Mark Linimon To: Conrad Meyer Cc: NGie Cooper , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r289773 - in head: sbin/sysctl sys/kern sys/sys Message-ID: <20151023210604.GA12348@lonesome.com> References: <201510222303.t9MN37D2093845@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 21:06:12 -0000 On Fri, Oct 23, 2015 at 08:09:35AM -0700, Conrad Meyer wrote: > What is __FreeBSD_version and why would it be bumped? __FreeBSD_version was introduced in the following commit: https://svnweb.freebsd.org/base/head/sys/sys/param.h?r1=34924&r2=36260 where it has been ever since: https://svnweb.freebsd.org/base/head/sys/sys/param.h?view=log This variable exists to tell the Ports Collection, among others, that "something has changed that may require you to patch and/or recompile." The historical values are documented in https://www.freebsd.org/doc/en/books/porters-handbook/versions.html#freebsd-versions-table Your mentor should have shown you this information. mcl From owner-svn-src-all@freebsd.org Fri Oct 23 21:09: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 6180FA1DDFA; Fri, 23 Oct 2015 21:09:29 +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 2A8E2895; Fri, 23 Oct 2015 21:09:29 +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 t9NL9SP4016128; Fri, 23 Oct 2015 21:09:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NL9SDU016127; Fri, 23 Oct 2015 21:09:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201510232109.t9NL9SDU016127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 23 Oct 2015 21:09:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289853 - head/sys/modules/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2015 21:09:29 -0000 Author: emaste Date: Fri Oct 23 21:09:28 2015 New Revision: 289853 URL: https://svnweb.freebsd.org/changeset/base/289853 Log: Add aarch64 files to the hwpmc(4) module build This was probably missed because FreeBSD/arm64 did not yet support modules when aarch64 support was added to hwpmc(4). Submitted by: andrew Modified: head/sys/modules/hwpmc/Makefile Modified: head/sys/modules/hwpmc/Makefile ============================================================================== --- head/sys/modules/hwpmc/Makefile Fri Oct 23 21:01:46 2015 (r289852) +++ head/sys/modules/hwpmc/Makefile Fri Oct 23 21:09:28 2015 (r289853) @@ -8,6 +8,10 @@ KMOD= hwpmc SRCS= hwpmc_mod.c hwpmc_logging.c hwpmc_soft.c vnode_if.h +.if ${MACHINE_CPUARCH} == "aarch64" +SRCS+= hwpmc_arm64.c hwpmc_arm64_md.c +.endif + .if ${MACHINE_CPUARCH} == "amd64" SRCS+= hwpmc_amd.c hwpmc_core.c hwpmc_intel.c hwpmc_piv.c hwpmc_tsc.c SRCS+= hwpmc_x86.c hwpmc_uncore.c From owner-svn-src-all@freebsd.org Fri Oct 23 21: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 BEBABA1C0C0; Fri, 23 Oct 2015 21:21:38 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qg0-x232.google.com (mail-qg0-x232.google.com [IPv6:2607:f8b0:400d:c04::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 7A1A7E5C; Fri, 23 Oct 2015 21:21:38 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qgbb65 with SMTP id b65so77128453qgb.2; Fri, 23 Oct 2015 14:21:37 -0700 (PDT) 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=rjDBBckcSaeXmEf2O23aEReRQpFn5rT+IrcLld0TrD8=; b=Y5WcX4gD35EOu6YbJbXi9CEyuyBuhE3wMRwIo38oy1Lav0rYa5Y2T1X8cWWru/dLqO TgZAoiil2qQQdRIYW2tKSK5+BNaCBGD173mQK2CbgA9chzrd0/ikk9l3hN7n51OFRrPZ h1YRkSeUsOZzwhZcYBVhNYPoApmFUIvFK5cXQKqmTko4NZDtb28IZjFpMtB0Vk3Yv5GS Zri1RKyAakoWofT168JSj9x4bili8aIkH36z4ycXDkP4c5LndfkDTJQOnl1Ngoer93Ue xJDNLbrmkWMfFY5OZbhEm+2YlXdB1Nr1AEhyOKQ/lAzV8HGWAE5l7d1IWgn+U6fXOUlN qWjg== MIME-Version: 1.0 X-Received: by 10.140.216.211 with SMTP id m202mr29629212qhb.80.1445635297559; Fri, 23 Oct 2015 14:21:37 -0700 (PDT) Received: by 10.140.88.209 with HTTP; Fri, 23 Oct 2015 14:21:37 -0700 (PDT) In-Reply-To: <20151023210604.GA12348@lonesome.com> References: <201510222303.t9MN37D2093845@repo.freebsd.org> <20151023210604.GA12348@lonesome.com> Date: Fri, 23 Oct 2015 14:21:37 -0700 Message-ID: Subject: Re: svn commit: r289773 - in head: sbin/sysctl sys/kern sys/sys From: NGie Cooper To: Mark Linimon Cc: Conrad Meyer , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@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: Fri, 23 Oct 2015 21:21:38 -0000 On Fri, Oct 23, 2015 at 2:06 PM, Mark Linimon wrote: > On Fri, Oct 23, 2015 at 08:09:35AM -0700, Conrad Meyer wrote: >> What is __FreeBSD_version and why would it be bumped? > > __FreeBSD_version was introduced in the following commit: > > https://svnweb.freebsd.org/base/head/sys/sys/param.h?r1=34924&r2=36260 > > where it has been ever since: > > https://svnweb.freebsd.org/base/head/sys/sys/param.h?view=log > > This variable exists to tell the Ports Collection, among others, > that "something has changed that may require you to patch and/or > recompile." > > The historical values are documented in > > https://www.freebsd.org/doc/en/books/porters-handbook/versions.html#freebsd-versions-table > > Your mentor should have shown you this information. It's also really handy if you know that a KPI exists after `#if __FreeBSD_version > XYZ`. It doesn't work for folks who cherry-pick (like we do at $work, iXsystems with "NextBSD"/"TrueOS", etc), but it works for some upstream folks -- especially when you have something that uses a KPI in flux on a CURRENT branch for instance... *cough* see open-vm-tools and breakage due to vm(4) APIs being in flux ( :/..). From owner-svn-src-all@freebsd.org Fri Oct 23 21:29: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 A8A6DA1C26A; Fri, 23 Oct 2015 21:29:38 +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 73A8412D6; Fri, 23 Oct 2015 21:29:38 +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 t9NLTbdk021825; Fri, 23 Oct 2015 21:29:37 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NLTbnp021824; Fri, 23 Oct 2015 21:29:37 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510232129.t9NLTbnp021824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 23 Oct 2015 21:29:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289854 - 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: Fri, 23 Oct 2015 21:29:38 -0000 Author: ian Date: Fri Oct 23 21:29:37 2015 New Revision: 289854 URL: https://svnweb.freebsd.org/changeset/base/289854 Log: Catch up to r232356: change the boundary constraint type to bus_addr_t. This code lived in the projects/armv6 branch when that change got applied to all the other arches. Modified: head/sys/arm/arm/busdma_machdep-v6.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Fri Oct 23 21:09:28 2015 (r289853) +++ head/sys/arm/arm/busdma_machdep-v6.c Fri Oct 23 21:29:37 2015 (r289854) @@ -76,7 +76,7 @@ struct bounce_zone; struct bus_dma_tag { bus_dma_tag_t parent; bus_size_t alignment; - bus_size_t boundary; + bus_addr_t boundary; bus_addr_t lowaddr; bus_addr_t highaddr; bus_dma_filter_t *filter; @@ -456,7 +456,7 @@ dflt_lock(void *arg, bus_dma_lock_op_t o */ int bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, - bus_size_t boundary, bus_addr_t lowaddr, bus_addr_t highaddr, + bus_addr_t boundary, bus_addr_t lowaddr, bus_addr_t highaddr, bus_dma_filter_t *filter, void *filterarg, bus_size_t maxsize, int nsegments, bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc, void *lockfuncarg, bus_dma_tag_t *dmat) From owner-svn-src-all@freebsd.org Fri Oct 23 21:30: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 383CCA1C2E2; Fri, 23 Oct 2015 21:30: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 E0A3C1462; Fri, 23 Oct 2015 21:30:19 +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 t9NLUJut021907; Fri, 23 Oct 2015 21:30:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NLUIbF021905; Fri, 23 Oct 2015 21:30:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510232130.t9NLUIbF021905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 23 Oct 2015 21:30:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289855 - 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: Fri, 23 Oct 2015 21:30:20 -0000 Author: mav Date: Fri Oct 23 21:30:18 2015 New Revision: 289855 URL: https://svnweb.freebsd.org/changeset/base/289855 Log: Minor additions to Status Type 0 IOCB. Modified: head/sys/dev/isp/isp_library.c head/sys/dev/isp/ispmbox.h Modified: head/sys/dev/isp/isp_library.c ============================================================================== --- head/sys/dev/isp/isp_library.c Fri Oct 23 21:29:37 2015 (r289854) +++ head/sys/dev/isp/isp_library.c Fri Oct 23 21:30:18 2015 (r289855) @@ -1158,7 +1158,7 @@ isp_get_24xx_response(ispsoftc_t *isp, i ISP_IOXGET_32(isp, &src->req_resid, dst->req_resid); ISP_IOXGET_16(isp, &src->req_reserved0, dst->req_reserved0); ISP_IOXGET_16(isp, &src->req_state_flags, dst->req_state_flags); - ISP_IOXGET_16(isp, &src->req_reserved1, dst->req_reserved1); + ISP_IOXGET_16(isp, &src->req_retry_delay, dst->req_retry_delay); ISP_IOXGET_16(isp, &src->req_scsi_status, dst->req_scsi_status); ISP_IOXGET_32(isp, &src->req_fcp_residual, dst->req_fcp_residual); ISP_IOXGET_32(isp, &src->req_sense_len, dst->req_sense_len); Modified: head/sys/dev/isp/ispmbox.h ============================================================================== --- head/sys/dev/isp/ispmbox.h Fri Oct 23 21:29:37 2015 (r289854) +++ head/sys/dev/isp/ispmbox.h Fri Oct 23 21:30:18 2015 (r289855) @@ -632,7 +632,7 @@ typedef struct { uint32_t req_resid; uint16_t req_reserved0; uint16_t req_state_flags; - uint16_t req_reserved1; + uint16_t req_retry_delay; /* aka Status Qualifier */ uint16_t req_scsi_status; uint32_t req_fcp_residual; uint32_t req_sense_len; @@ -644,11 +644,12 @@ typedef struct { * For Qlogic 2X00, the high order byte of SCSI status has * additional meaning. */ -#define RQCS_RU 0x800 /* Residual Under */ -#define RQCS_RO 0x400 /* Residual Over */ +#define RQCS_CR 0x1000 /* Confirmation Request */ +#define RQCS_RU 0x0800 /* Residual Under */ +#define RQCS_RO 0x0400 /* Residual Over */ #define RQCS_RESID (RQCS_RU|RQCS_RO) -#define RQCS_SV 0x200 /* Sense Length Valid */ -#define RQCS_RV 0x100 /* FCP Response Length Valid */ +#define RQCS_SV 0x0200 /* Sense Length Valid */ +#define RQCS_RV 0x0100 /* FCP Response Length Valid */ /* * CT Passthru IOCB From owner-svn-src-all@freebsd.org Fri Oct 23 21:30: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 6C120A1C314; Fri, 23 Oct 2015 21:30: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 25BB315ED; Fri, 23 Oct 2015 21:30: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 t9NLUSlJ021954; Fri, 23 Oct 2015 21:30:28 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NLUSVL021953; Fri, 23 Oct 2015 21:30:28 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510232130.t9NLUSVL021953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Oct 2015 21:30:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289856 - 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: Fri, 23 Oct 2015 21:30:29 -0000 Author: bdrewery Date: Fri Oct 23 21:30:27 2015 New Revision: 289856 URL: https://svnweb.freebsd.org/changeset/base/289856 Log: Rework r289778 to always parallelize known targets, without ordering. - Rather than allow 'make clean*' to ignore dependencies, make a static list of targets in STANDALONE_SUBDIR_TARGETS that are known to be safe. This allows a user to override them if needed and avoids adding this feature to user-defined targets that are in ${SUBDIR_TARGETS}. [1] - This now also allows to force SUBDIR_PARALLEL when calling these targets, since no dependencies are needed. Reported by: ian [1] Sponsored by: EMC / Isilon Storage Division MFC after: 3 weeks X-MFC-With: r289778 Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Fri Oct 23 21:30:18 2015 (r289855) +++ head/share/mk/bsd.subdir.mk Fri Oct 23 21:30:27 2015 (r289856) @@ -28,6 +28,10 @@ # See ALL_SUBDIR_TARGETS for list of targets that will recurse. # Custom targets can be added to SUBDIR_TARGETS in src.conf. # +# Targets defined in STANDALONE_SUBDIR_TARGETS will always be ran +# with SUBDIR_PARALLEL and will not respect .WAIT or SUBDIR_DEPEND_ +# values. +# .if !target(____) ____: @@ -38,6 +42,10 @@ ALL_SUBDIR_TARGETS= all all-man buildcon realinstall regress tags \ ${SUBDIR_TARGETS} +# Described above. +STANDALONE_SUBDIR_TARGETS?= obj checkdpadd clean cleandepend cleandir \ + cleanilinks cleanobj + .include .if !defined(NEED_SUBDIR) @@ -83,19 +91,17 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE dir=${.TARGET}; \ ${_SUBDIR_SH}; -# .WAIT and dependencies can be skipped for some targets. -.if defined(SUBDIR_PARALLEL) -.if make(obj) || make(clean*) -_skip_subdir_ordering= 1 -SUBDIR:= ${SUBDIR:N.WAIT} -.else -_skip_subdir_ordering= 0 -.endif -.endif # defined(SUBDIR_PARALLEL) # Work around parsing of .if nested in .for by putting .WAIT string into a var. __wait= .WAIT .for __target in ${ALL_SUBDIR_TARGETS} -.ifdef SUBDIR_PARALLEL +# Can ordering be skipped for this and SUBDIR_PARALLEL forced? +.if make(${__target}) && ${STANDALONE_SUBDIR_TARGETS:M${__target}} +_is_standalone_target= 1 +SUBDIR:= ${SUBDIR:N.WAIT} +.else +_is_standalone_target= 0 +.endif +.if defined(SUBDIR_PARALLEL) || ${_is_standalone_target} == 1 __subdir_targets= .for __dir in ${SUBDIR} .if ${__wait} == ${__dir} @@ -103,7 +109,7 @@ __subdir_targets+= .WAIT .else __subdir_targets+= ${__target}_subdir_${__dir} __deps= -.if ${_skip_subdir_ordering} == 0 +.if ${_is_standalone_target} == 0 .for __dep in ${SUBDIR_DEPEND_${__dir}} __deps+= ${__target}_subdir_${__dep} .endfor @@ -115,12 +121,12 @@ ${__target}_subdir_${__dir}: .PHONY .MAK ${_SUBDIR_SH}; .endif .endif -.endfor +.endfor # __dir in ${SUBDIR} ${__target}: ${__subdir_targets} .else ${__target}: _SUBDIR -.endif -.endfor +.endif # SUBDIR_PARALLEL || _is_standalone_target +.endfor # __target in ${ALL_SUBDIR_TARGETS} # This is to support 'make includes' calling 'make buildincludes' and # 'make installincludes' in the proper order, and to support these From owner-svn-src-all@freebsd.org Fri Oct 23 21:43: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 228F1A1C707; Fri, 23 Oct 2015 21:43:26 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f182.google.com (mail-yk0-f182.google.com [209.85.160.182]) (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 D95DB1EA3; Fri, 23 Oct 2015 21:43:25 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by yknn9 with SMTP id n9so133751429ykn.0; Fri, 23 Oct 2015 14:43:24 -0700 (PDT) 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=99hlKqTuKwoWIpU5lphPPDxq4UWkaSfz3+twtcTRrv4=; b=Xt2lLFlV+6R4xeYZru6gwbcyyyEPCVt69xN9dA8rH3cXwVCaQfr67a7PIaK/6ParqW zq35efDk3yOhcAMj0UPQQk8LR9dDx5NxY+c9ZMRHvS4gahQUnlZmIO5k0Y/uVWYnD7z+ lfptot/YFFIBU5TVMBdzfD/jAxWaUzWEOM3u1EJQ593oAvBy9wibTYvKjHB3rHqHEf3Q TRu5fALmcQwPj23ki/Uzb2hKe20pqCwmXvYHGNh8uG3VnBi5Q1hvcgFac/qZ/c53EBbh reKorBXiJXOHSXB8NlDbdeybvW5lRiSi2fT3692udd5vB3R4n1RrF6ohXICXdmOIX2DV C5cA== X-Received: by 10.13.250.69 with SMTP id k66mr7955621ywf.107.1445636604280; Fri, 23 Oct 2015 14:43:24 -0700 (PDT) Received: from mail-yk0-f177.google.com (mail-yk0-f177.google.com. [209.85.160.177]) by smtp.gmail.com with ESMTPSA id c71sm6204264ywb.42.2015.10.23.14.43.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Oct 2015 14:43:24 -0700 (PDT) Received: by ykba4 with SMTP id a4so127885922ykb.3; Fri, 23 Oct 2015 14:43:23 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.129.31.195 with SMTP id f186mr13989188ywf.204.1445636603721; Fri, 23 Oct 2015 14:43:23 -0700 (PDT) Reply-To: cem@FreeBSD.org Received: by 10.37.203.75 with HTTP; Fri, 23 Oct 2015 14:43:23 -0700 (PDT) In-Reply-To: <20151023210604.GA12348@lonesome.com> References: <201510222303.t9MN37D2093845@repo.freebsd.org> <20151023210604.GA12348@lonesome.com> Date: Fri, 23 Oct 2015 14:43:23 -0700 Message-ID: Subject: Re: svn commit: r289773 - in head: sbin/sysctl sys/kern sys/sys From: Conrad Meyer To: Mark Linimon Cc: NGie Cooper , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@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: Fri, 23 Oct 2015 21:43:26 -0000 On Fri, Oct 23, 2015 at 2:06 PM, Mark Linimon wrote: > On Fri, Oct 23, 2015 at 08:09:35AM -0700, Conrad Meyer wrote: >> What is __FreeBSD_version and why would it be bumped? > > > > This variable exists to tell the Ports Collection, among others, > that "something has changed that may require you to patch and/or > recompile." Ok. Nothing has changed that may require ports to patch and/or recompile, so I don't think this needs to be bumped. Best, Conrad From owner-svn-src-all@freebsd.org Fri Oct 23 21:56: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 A0A79A1C99D for ; Fri, 23 Oct 2015 21:56:15 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7907A6A3 for ; Fri, 23 Oct 2015 21:56:15 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound1.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Fri, 23 Oct 2015 21:56:29 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t9NLuC4o021911; Fri, 23 Oct 2015 15:56:12 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1445637372.91534.38.camel@freebsd.org> Subject: Re: svn commit: r289773 - in head: sbin/sysctl sys/kern sys/sys From: Ian Lepore To: cem@FreeBSD.org, Mark Linimon Cc: NGie Cooper , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Date: Fri, 23 Oct 2015 15:56:12 -0600 In-Reply-To: References: <201510222303.t9MN37D2093845@repo.freebsd.org> <20151023210604.GA12348@lonesome.com> 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: Fri, 23 Oct 2015 21:56:15 -0000 On Fri, 2015-10-23 at 14:43 -0700, Conrad Meyer wrote: > On Fri, Oct 23, 2015 at 2:06 PM, Mark Linimon > wrote: > > On Fri, Oct 23, 2015 at 08:09:35AM -0700, Conrad Meyer wrote: > > > What is __FreeBSD_version and why would it be bumped? > > > > > > > > This variable exists to tell the Ports Collection, among others, > > that "something has changed that may require you to patch and/or > > recompile." > > Ok. Nothing has changed that may require ports to patch and/or > recompile, so I don't think this needs to be bumped. > > Best, > Conrad > "ports need recompile" is only one of several reasons to bump the version. Another is making it possible to test for new features that arrived with a given version, and that's what you've done. Suppose I maintain an out-of-tree driver that has to build on several versions, and uint16 is really the right type for its sysctl but it also has to work on versions that don't have that support. That tends to get handled with things like #if __FreeBSD_version < NNNNNNNN. (Contrived example here maybe, since if uint32 worked on one version, I'd likely use it on all of versions.) One of the implications of the feature-availability testing is that when you MFC your change, you also have to bump the version number on that branch (independently, not via MFC). -- Ian From owner-svn-src-all@freebsd.org Fri Oct 23 22:06: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 10F2CA1CB51; Fri, 23 Oct 2015 22:06:30 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f174.google.com (mail-yk0-f174.google.com [209.85.160.174]) (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 BA886ABF; Fri, 23 Oct 2015 22:06:29 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykdr3 with SMTP id r3so134425541ykd.1; Fri, 23 Oct 2015 15:06:22 -0700 (PDT) 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:content-transfer-encoding; bh=hj0k/njBf4QjtAKTQQ9FR5ovErt4Atcj9XkbF47lruk=; b=RXiJeIepYE+rrKuOX77TDLSEN3R2nD+9dxTHxZSHnmX8Me662IE8JQqQ5BT2Rbgg1p PC/s9UFBD18fDFElxk5lqXKjQ2q2Z4w4xYaVvJNHzECRr8y+LjZx1Imptyv7XI5PK0OH Hm2Y8QvG8GugbXDK6CBY0576a4zdV8cQyby8kHdEsejicUdpogD8ijHfbqB/qUg6h5Cl UC/RsBqJ8lcuNxFLhTQbNvKMHGZ9Gv+ToYrSRttZYU9pFha2EREwbC9LmGpd3xqw5iFj oNldz9mPhSj2EfpCrFyIG2C0MxkHOeXB3ZLC/Bze93GeU4/RkakOC3XvZt+p2O7fLJbP uF5Q== X-Received: by 10.129.75.208 with SMTP id y199mr19123587ywa.48.1445637982609; Fri, 23 Oct 2015 15:06:22 -0700 (PDT) Received: from mail-yk0-f178.google.com (mail-yk0-f178.google.com. [209.85.160.178]) by smtp.gmail.com with ESMTPSA id l188sm15494711ywd.3.2015.10.23.15.06.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Oct 2015 15:06:22 -0700 (PDT) Received: by yknn9 with SMTP id n9so134228676ykn.0; Fri, 23 Oct 2015 15:06:22 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.13.237.199 with SMTP id w190mr16778865ywe.338.1445637982170; Fri, 23 Oct 2015 15:06:22 -0700 (PDT) Reply-To: cem@FreeBSD.org Received: by 10.37.203.75 with HTTP; Fri, 23 Oct 2015 15:06:22 -0700 (PDT) In-Reply-To: <1445637372.91534.38.camel@freebsd.org> References: <201510222303.t9MN37D2093845@repo.freebsd.org> <20151023210604.GA12348@lonesome.com> <1445637372.91534.38.camel@freebsd.org> Date: Fri, 23 Oct 2015 15:06:22 -0700 Message-ID: Subject: Re: svn commit: r289773 - in head: sbin/sysctl sys/kern sys/sys From: Conrad Meyer To: Ian Lepore Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" 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: Fri, 23 Oct 2015 22:06:30 -0000 On Fri, Oct 23, 2015 at 2:56 PM, Ian Lepore wrote: > On Fri, 2015-10-23 at 14:43 -0700, Conrad Meyer wrote: >> On Fri, Oct 23, 2015 at 2:06 PM, Mark Linimon >> wrote: >> > On Fri, Oct 23, 2015 at 08:09:35AM -0700, Conrad Meyer wrote: >> > > What is __FreeBSD_version and why would it be bumped? >> > >> > >> > >> > This variable exists to tell the Ports Collection, among others, >> > that "something has changed that may require you to patch and/or >> > recompile." > > Another is making it possible to test for new features that > arrived with a given version, and that's what you've done. > > Suppose I maintain an out-of-tree driver that has to build on several > versions, and uint16 is really the right type for its sysctl but it > also has to work on versions that don't have that support. That tends > to get handled with things like #if __FreeBSD_version < NNNNNNNN. > (Contrived example here maybe, since if uint32 worked on one version, > I'd likely use it on all of versions.) Suppose you did. The change lends itself to "#ifdef CTLTYPE_U16" =E2=80=94 = in this truly contrived scenario. Any other check is redundant or less specific. (As Ngie points out, checking an absolute version doesn't do you a lot of good in the face of backports/cherry-picks.) > One of the implications of the feature-availability testing is that > when you MFC your change, you also have to bump the version number on > that branch (independently, not via MFC). Not a problem =E2=80=94 the MFC After field was intentionally omitted (i.e.= , "MFC After: never"). This is only intended for CURRENT. Best, Conrad From owner-svn-src-all@freebsd.org Fri Oct 23 22:51: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 51424A1D2FF; Fri, 23 Oct 2015 22:51:49 +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 29EFFD5B; Fri, 23 Oct 2015 22:51:49 +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 t9NMpmcn047551; Fri, 23 Oct 2015 22:51:48 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NMpmNE047550; Fri, 23 Oct 2015 22:51:48 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510232251.t9NMpmNE047550@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 23 Oct 2015 22:51:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289857 - 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: Fri, 23 Oct 2015 22:51:49 -0000 Author: ian Date: Fri Oct 23 22:51:48 2015 New Revision: 289857 URL: https://svnweb.freebsd.org/changeset/base/289857 Log: Instead of all memory allocations using M_DEVBUF, use new categories M_BUSDMA for allocations of metadata (tags, maps, segment tracking lists), and M_BOUNCE for bounce pages. Modified: head/sys/arm/arm/busdma_machdep.c Modified: head/sys/arm/arm/busdma_machdep.c ============================================================================== --- head/sys/arm/arm/busdma_machdep.c Fri Oct 23 21:30:27 2015 (r289856) +++ head/sys/arm/arm/busdma_machdep.c Fri Oct 23 22:51:48 2015 (r289857) @@ -213,6 +213,9 @@ static uma_zone_t dmamap_zone; /* Cache static busdma_bufalloc_t coherent_allocator; /* Cache of coherent buffers */ static busdma_bufalloc_t standard_allocator; /* Cache of standard buffers */ +MALLOC_DEFINE(M_BUSDMA, "busdma", "busdma metadata"); +MALLOC_DEFINE(M_BOUNCE, "bounce", "busdma bounce pages"); + /* * This is the ctor function passed to uma_zcreate() for the pool of dma maps. * It'll need platform-specific changes if this code is copied. @@ -277,7 +280,7 @@ busdma_init(void *dummy) /* * This init historically used SI_SUB_VM, but now the init code requires - * malloc(9) using M_DEVBUF memory, which is set up later than SI_SUB_VM, by + * malloc(9) using M_BUSDMA memory, which is set up later than SI_SUB_VM, by * SI_SUB_KMEM and SI_ORDER_THIRD, so we'll go right after that by using * SI_SUB_KMEM and SI_ORDER_FOURTH. */ @@ -419,7 +422,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, if (!parent) parent = arm_root_dma_tag; - newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_DEVBUF, M_NOWAIT); + newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_BUSDMA, M_NOWAIT); if (newtag == NULL) { CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d", __func__, newtag, 0, error); @@ -497,7 +500,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, /* Must bounce */ if ((error = alloc_bounce_zone(newtag)) != 0) { - free(newtag, M_DEVBUF); + free(newtag, M_BUSDMA); return (error); } bz = newtag->bounce_zone; @@ -516,7 +519,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, } else newtag->bounce_zone = NULL; if (error != 0) - free(newtag, M_DEVBUF); + free(newtag, M_BUSDMA); else *dmat = newtag; CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d", @@ -545,8 +548,8 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) if (dmat->ref_count == 0) { if (dmat->segments != NULL && dmat->segments != dmat->tagsegs) - free(dmat->segments, M_DEVBUF); - free(dmat, M_DEVBUF); + free(dmat->segments, M_BUSDMA); + free(dmat, M_BUSDMA); /* * Last reference count, so * release our reference @@ -574,14 +577,14 @@ bus_dmamap_create(bus_dma_tag_t dmat, in bus_dmamap_t map; int error = 0; - slist = malloc(sizeof(*slist) * dmat->nsegments, M_DEVBUF, M_NOWAIT); + slist = malloc(sizeof(*slist) * dmat->nsegments, M_BUSDMA, M_NOWAIT); if (slist == NULL) return (ENOMEM); map = uma_zalloc_arg(dmamap_zone, dmat, M_NOWAIT); *mapp = map; if (map == NULL) { - free(slist, M_DEVBUF); + free(slist, M_BUSDMA); return (ENOMEM); } @@ -591,9 +594,9 @@ bus_dmamap_create(bus_dma_tag_t dmat, in */ if (dmat->segments == NULL) { dmat->segments = malloc(dmat->nsegments * - sizeof(*dmat->segments), M_DEVBUF, M_NOWAIT); + sizeof(*dmat->segments), M_BUSDMA, M_NOWAIT); if (dmat->segments == NULL) { - free(slist, M_DEVBUF); + free(slist, M_BUSDMA); uma_zfree(dmamap_zone, map); *mapp = NULL; return (ENOMEM); @@ -613,7 +616,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, in if (dmat->bounce_zone == NULL) { if ((error = alloc_bounce_zone(dmat)) != 0) { - free(slist, M_DEVBUF); + free(slist, M_BUSDMA); uma_zfree(dmamap_zone, map); *mapp = NULL; return (error); @@ -669,7 +672,7 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, b __func__, dmat, EBUSY); return (EBUSY); } - free(map->slist, M_DEVBUF); + free(map->slist, M_BUSDMA); uma_zfree(dmamap_zone, map); if (dmat->bounce_zone) dmat->bounce_zone->map_count--; @@ -704,14 +707,14 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi */ if (dmat->segments == NULL) dmat->segments = malloc(dmat->nsegments * - sizeof(*dmat->segments), M_DEVBUF, mflags); + sizeof(*dmat->segments), M_BUSDMA, mflags); - slist = malloc(sizeof(*slist) * dmat->nsegments, M_DEVBUF, M_NOWAIT); + slist = malloc(sizeof(*slist) * dmat->nsegments, M_BUSDMA, M_NOWAIT); if (slist == NULL) return (ENOMEM); map = uma_zalloc_arg(dmamap_zone, dmat, mflags); if (map == NULL) { - free(slist, M_DEVBUF); + free(slist, M_BUSDMA); return (ENOMEM); } if (flags & BUS_DMA_COHERENT) { @@ -761,7 +764,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi memattr); } if (vaddr == NULL) { - free(slist, M_DEVBUF); + free(slist, M_BUSDMA); uma_zfree(dmamap_zone, map); map = NULL; } else { @@ -789,7 +792,7 @@ bus_dmamem_free(bus_dma_tag_t dmat, void else ba = standard_allocator; - free(map->slist, M_DEVBUF); + free(map->slist, M_BUSDMA); uma_zfree(dmamap_zone, map); bufzone = busdma_bufalloc_findzone(ba, dmat->maxsize); @@ -1379,7 +1382,7 @@ alloc_bounce_zone(bus_dma_tag_t dmat) } } - if ((bz = (struct bounce_zone *)malloc(sizeof(*bz), M_DEVBUF, + if ((bz = (struct bounce_zone *)malloc(sizeof(*bz), M_BUSDMA, M_NOWAIT | M_ZERO)) == NULL) return (ENOMEM); @@ -1450,15 +1453,15 @@ alloc_bounce_pages(bus_dma_tag_t dmat, u while (numpages > 0) { struct bounce_page *bpage; - bpage = (struct bounce_page *)malloc(sizeof(*bpage), M_DEVBUF, + bpage = (struct bounce_page *)malloc(sizeof(*bpage), M_BUSDMA, M_NOWAIT | M_ZERO); if (bpage == NULL) break; - bpage->vaddr = (vm_offset_t)contigmalloc(PAGE_SIZE, M_DEVBUF, + bpage->vaddr = (vm_offset_t)contigmalloc(PAGE_SIZE, M_BOUNCE, M_NOWAIT, 0ul, bz->lowaddr, PAGE_SIZE, 0); if (bpage->vaddr == 0) { - free(bpage, M_DEVBUF); + free(bpage, M_BUSDMA); break; } bpage->busaddr = pmap_kextract(bpage->vaddr); From owner-svn-src-all@freebsd.org Fri Oct 23 22:52: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 54A37A1D3EF; Fri, 23 Oct 2015 22:52:02 +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 103CBEBA; Fri, 23 Oct 2015 22:52:01 +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 t9NMq1BQ047602; Fri, 23 Oct 2015 22:52:01 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NMq13R047601; Fri, 23 Oct 2015 22:52:01 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510232252.t9NMq13R047601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 23 Oct 2015 22:52:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289858 - 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: Fri, 23 Oct 2015 22:52:02 -0000 Author: ian Date: Fri Oct 23 22:52:00 2015 New Revision: 289858 URL: https://svnweb.freebsd.org/changeset/base/289858 Log: Instead of all memory allocations using M_DEVBUF, use new categories M_BUSDMA for allocations of metadata (tags, maps, segment tracking lists), and M_BOUNCE for bounce pages. Modified: head/sys/arm/arm/busdma_machdep-v6.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Fri Oct 23 22:51:48 2015 (r289857) +++ head/sys/arm/arm/busdma_machdep-v6.c Fri Oct 23 22:52:00 2015 (r289858) @@ -217,6 +217,10 @@ static void dma_dcache_sync(struct sync_ static busdma_bufalloc_t coherent_allocator; /* Cache of coherent buffers */ static busdma_bufalloc_t standard_allocator; /* Cache of standard buffers */ + +MALLOC_DEFINE(M_BUSDMA, "busdma", "busdma metadata"); +MALLOC_DEFINE(M_BOUNCE, "bounce", "busdma bounce pages"); + static void busdma_init(void *dummy) { @@ -260,7 +264,7 @@ busdma_init(void *dummy) /* * This init historically used SI_SUB_VM, but now the init code requires - * malloc(9) using M_DEVBUF memory and the pcpu zones for counter(9), which get + * malloc(9) using M_BUSDMA memory and the pcpu zones for counter(9), which get * set up by SI_SUB_KMEM and SI_ORDER_LAST, so we'll go right after that by * using SI_SUB_KMEM+1. */ @@ -481,7 +485,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, /* Return a NULL tag on failure */ *dmat = NULL; - newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_DEVBUF, + newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_BUSDMA, M_ZERO | M_NOWAIT); if (newtag == NULL) { CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d", @@ -557,7 +561,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, maxsize = roundup2(maxsize, PAGE_SIZE) + PAGE_SIZE; if ((error = alloc_bounce_zone(newtag)) != 0) { - free(newtag, M_DEVBUF); + free(newtag, M_BUSDMA); return (error); } bz = newtag->bounce_zone; @@ -577,7 +581,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, newtag->bounce_zone = NULL; if (error != 0) { - free(newtag, M_DEVBUF); + free(newtag, M_BUSDMA); } else { atomic_add_32(&tags_total, 1); *dmat = newtag; @@ -610,7 +614,7 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) atomic_subtract_int(&dmat->ref_count, 1); if (dmat->ref_count == 0) { atomic_subtract_32(&tags_total, 1); - free(dmat, M_DEVBUF); + free(dmat, M_BUSDMA); /* * Last reference count, so * release our reference @@ -683,7 +687,7 @@ allocate_map(bus_dma_tag_t dmat, int mfl dmat->nsegments, MAX_DMA_SEGMENTS)); segsize = sizeof(struct bus_dma_segment) * dmat->nsegments; mapsize = sizeof(*map) + sizeof(struct sync_list) * dmat->nsegments; - map = malloc(mapsize + segsize, M_DEVBUF, mflags | M_ZERO); + map = malloc(mapsize + segsize, M_BUSDMA, mflags | M_ZERO); if (map == NULL) { CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, ENOMEM); return (NULL); @@ -717,7 +721,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, in */ error = allocate_bz_and_pages(dmat, map); if (error != 0) { - free(map, M_DEVBUF); + free(map, M_BUSDMA); *mapp = NULL; return (error); } @@ -746,7 +750,7 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, b if (map->flags & DMAMAP_COHERENT) atomic_subtract_32(&maps_coherent, 1); atomic_subtract_32(&maps_total, 1); - free(map, M_DEVBUF); + free(map, M_BUSDMA); dmat->map_count--; CTR2(KTR_BUSDMA, "%s: tag %p error 0", __func__, dmat); return (0); @@ -830,7 +834,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi if (*vaddr == NULL) { CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->flags, ENOMEM); - free(map, M_DEVBUF); + free(map, M_BUSDMA); *mapp = NULL; return (ENOMEM); } @@ -873,7 +877,7 @@ bus_dmamem_free(bus_dma_tag_t dmat, void atomic_subtract_32(&maps_coherent, 1); atomic_subtract_32(&maps_total, 1); atomic_subtract_32(&maps_dmamem, 1); - free(map, M_DEVBUF); + free(map, M_BUSDMA); CTR3(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat, dmat->flags); } @@ -1517,7 +1521,7 @@ alloc_bounce_zone(bus_dma_tag_t dmat) } } - if ((bz = (struct bounce_zone *)malloc(sizeof(*bz), M_DEVBUF, + if ((bz = (struct bounce_zone *)malloc(sizeof(*bz), M_BUSDMA, M_NOWAIT | M_ZERO)) == NULL) return (ENOMEM); @@ -1588,15 +1592,15 @@ alloc_bounce_pages(bus_dma_tag_t dmat, u while (numpages > 0) { struct bounce_page *bpage; - bpage = (struct bounce_page *)malloc(sizeof(*bpage), M_DEVBUF, + bpage = (struct bounce_page *)malloc(sizeof(*bpage), M_BUSDMA, M_NOWAIT | M_ZERO); if (bpage == NULL) break; - bpage->vaddr = (vm_offset_t)contigmalloc(PAGE_SIZE, M_DEVBUF, + bpage->vaddr = (vm_offset_t)contigmalloc(PAGE_SIZE, M_BOUNCE, M_NOWAIT, 0ul, bz->lowaddr, PAGE_SIZE, 0); if (bpage->vaddr == 0) { - free(bpage, M_DEVBUF); + free(bpage, M_BUSDMA); break; } bpage->busaddr = pmap_kextract(bpage->vaddr); From owner-svn-src-all@freebsd.org Fri Oct 23 23:07: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 3C431A1D704; Fri, 23 Oct 2015 23:07: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 0758C17E7; Fri, 23 Oct 2015 23:07: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 t9NN7kOk050743; Fri, 23 Oct 2015 23:07:46 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NN7k6K050742; Fri, 23 Oct 2015 23:07:46 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510232307.t9NN7k6K050742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Oct 2015 23:07:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289859 - 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: Fri, 23 Oct 2015 23:07:47 -0000 Author: bdrewery Date: Fri Oct 23 23:07:45 2015 New Revision: 289859 URL: https://svnweb.freebsd.org/changeset/base/289859 Log: native-xtools: Fix build with WITH_DEBUG_FILES. Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Oct 23 22:52:00 2015 (r289858) +++ head/Makefile.inc1 Fri Oct 23 23:07:45 2015 (r289859) @@ -1657,6 +1657,10 @@ native-xtools: .PHONY -p ${OBJTREE}/nxb-bin/usr >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${OBJTREE}/nxb-bin/usr/include >/dev/null +.if ${MK_DEBUG_FILES} != "no" + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ + -p ${OBJTREE}/nxb-bin/usr/lib >/dev/null +.endif .for _tool in \ bin/cat \ bin/chmod \ From owner-svn-src-all@freebsd.org Sat Oct 24 01:39: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 989BCA13996; Sat, 24 Oct 2015 01:39:32 +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 4D362E04; Sat, 24 Oct 2015 01:39: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 t9O1dV4W097083; Sat, 24 Oct 2015 01:39:31 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9O1dVWi097082; Sat, 24 Oct 2015 01:39:31 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510240139.t9O1dVWi097082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 24 Oct 2015 01:39:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289861 - 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: Sat, 24 Oct 2015 01:39:32 -0000 Author: bdrewery Date: Sat Oct 24 01:39:31 2015 New Revision: 289861 URL: https://svnweb.freebsd.org/changeset/base/289861 Log: native-xtools: Replace common path with NXBDESTDIR. Also combine some mkdir calls. Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Oct 23 23:24:03 2015 (r289860) +++ head/Makefile.inc1 Sat Oct 24 01:39:31 2015 (r289861) @@ -1620,12 +1620,13 @@ cross-tools: .MAKE .PHONY ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install .endfor +NXBDESTDIR= ${OBJTREE}/nxb-bin NXBENV= MAKEOBJDIRPREFIX=${OBJTREE}/nxb \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${PATH}:${OBJTREE}/gperf_for_gcc/usr/bin NXBMAKE= ${NXBENV} ${MAKE} \ - TBLGEN=${OBJTREE}/nxb-bin/usr/bin/tblgen \ - CLANG_TBLGEN=${OBJTREE}/nxb-bin/usr/bin/clang-tblgen \ + TBLGEN=${NXBDESTDIR}/usr/bin/tblgen \ + CLANG_TBLGEN=${NXBDESTDIR}/usr/bin/clang-tblgen \ MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} \ MK_GDB=no MK_TESTS=no \ SSP_CFLAGS= \ @@ -1650,16 +1651,14 @@ native-xtools: .PHONY ${NXBMAKE} DIRPRFX=${_gperf}/ all && \ ${NXBMAKE} DIRPRFX=${_gperf}/ DESTDIR=${OBJTREE}/gperf_for_gcc install .endif - mkdir -p ${OBJTREE}/nxb-bin/bin - mkdir -p ${OBJTREE}/nxb-bin/sbin - mkdir -p ${OBJTREE}/nxb-bin/usr + mkdir -p ${NXBDESTDIR}/bin ${NXBDESTDIR}/sbin ${NXBDESTDIR}/usr mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ - -p ${OBJTREE}/nxb-bin/usr >/dev/null + -p ${NXBDESTDIR}/usr >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ - -p ${OBJTREE}/nxb-bin/usr/include >/dev/null + -p ${NXBDESTDIR}/usr/include >/dev/null .if ${MK_DEBUG_FILES} != "no" mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ - -p ${OBJTREE}/nxb-bin/usr/lib >/dev/null + -p ${NXBDESTDIR}/usr/lib >/dev/null .endif .for _tool in \ bin/cat \ @@ -1725,7 +1724,7 @@ native-xtools: .PHONY ${NXBMAKE} DIRPRFX=${_tool}/ obj && \ ${NXBMAKE} DIRPRFX=${_tool}/ depend && \ ${NXBMAKE} DIRPRFX=${_tool}/ all && \ - ${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${OBJTREE}/nxb-bin install + ${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${NXBDESTDIR} install .endfor # From owner-svn-src-all@freebsd.org Sat Oct 24 02:18: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 67ABEA18363; Sat, 24 Oct 2015 02:18:15 +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 2A0E31B7F; Sat, 24 Oct 2015 02:18:15 +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 t9O2IEan008806; Sat, 24 Oct 2015 02:18:14 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9O2IEVr008805; Sat, 24 Oct 2015 02:18:14 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510240218.t9O2IEVr008805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 24 Oct 2015 02:18:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289862 - 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, 24 Oct 2015 02:18:15 -0000 Author: ian Date: Sat Oct 24 02:18:14 2015 New Revision: 289862 URL: https://svnweb.freebsd.org/changeset/base/289862 Log: Change the preallocation of a busdma segment mapping array from per-tag to per-map. The per-tag scheme is not safe, and a mutex can't be used to protect it because the mapping routines can't sleep. Code brought in from armv6 implementation. Modified: head/sys/arm/arm/busdma_machdep.c Modified: head/sys/arm/arm/busdma_machdep.c ============================================================================== --- head/sys/arm/arm/busdma_machdep.c Sat Oct 24 01:39:31 2015 (r289861) +++ head/sys/arm/arm/busdma_machdep.c Sat Oct 24 02:18:14 2015 (r289862) @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$"); #include #define MAX_BPAGES 64 +#define MAX_DMA_SEGMENTS 4096 #define BUS_DMA_COULD_BOUNCE BUS_DMA_BUS3 #define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4 @@ -111,13 +112,6 @@ struct bus_dma_tag { */ struct arm32_dma_range *ranges; int _nranges; - /* - * Most tags need one or two segments, and can use the local tagsegs - * array. For tags with a larger limit, we'll allocate a bigger array - * on first use. - */ - bus_dma_segment_t *segments; - bus_dma_segment_t tagsegs[2]; }; struct bounce_page { @@ -175,20 +169,19 @@ struct bus_dmamap { bus_dmamap_callback_t *callback; void *callback_arg; int flags; -#define DMAMAP_COHERENT 0x8 -#define DMAMAP_CACHE_ALIGNED 0x10 +#define DMAMAP_COHERENT (1 << 0) +#define DMAMAP_DMAMEM_ALLOC (1 << 1) +#define DMAMAP_MBUF (1 << 2) +#define DMAMAP_CACHE_ALIGNED (1 << 3) STAILQ_ENTRY(bus_dmamap) links; + bus_dma_segment_t *segments; int sync_count; - struct sync_list *slist; + struct sync_list slist[]; }; static STAILQ_HEAD(, bus_dmamap) bounce_map_waitinglist; static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist; -static struct mtx busdma_mtx; - -MTX_SYSINIT(busdma_mtx, &busdma_mtx, "busdma lock", MTX_DEF); - static void init_bounce_pages(void *dummy); static int alloc_bounce_zone(bus_dma_tag_t dmat); static int alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages); @@ -208,57 +201,16 @@ bus_dma_tag_t arm_root_dma_tag; * Begin block of code useful to transplant to other implementations. */ -static uma_zone_t dmamap_zone; /* Cache of struct bus_dmamap items */ - static busdma_bufalloc_t coherent_allocator; /* Cache of coherent buffers */ static busdma_bufalloc_t standard_allocator; /* Cache of standard buffers */ MALLOC_DEFINE(M_BUSDMA, "busdma", "busdma metadata"); MALLOC_DEFINE(M_BOUNCE, "bounce", "busdma bounce pages"); -/* - * This is the ctor function passed to uma_zcreate() for the pool of dma maps. - * It'll need platform-specific changes if this code is copied. - */ -static int -dmamap_ctor(void *mem, int size, void *arg, int flags) -{ - bus_dmamap_t map; - bus_dma_tag_t dmat; - - map = (bus_dmamap_t)mem; - dmat = (bus_dma_tag_t)arg; - - dmat->map_count++; - - map->dmat = dmat; - map->flags = 0; - STAILQ_INIT(&map->bpages); - - return (0); -} - -/* - * This is the dtor function passed to uma_zcreate() for the pool of dma maps. - * It may need platform-specific changes if this code is copied . - */ -static void -dmamap_dtor(void *mem, int size, void *arg) -{ - bus_dmamap_t map; - - map = (bus_dmamap_t)mem; - - map->dmat->map_count--; -} - static void busdma_init(void *dummy) { - /* Create a cache of maps for bus_dmamap_create(). */ - dmamap_zone = uma_zcreate("dma maps", sizeof(struct bus_dmamap), - dmamap_ctor, dmamap_dtor, NULL, NULL, UMA_ALIGN_PTR, 0); /* Create a cache of buffers in standard (cacheable) memory. */ standard_allocator = busdma_bufalloc_create("buffer", @@ -280,11 +232,11 @@ busdma_init(void *dummy) /* * This init historically used SI_SUB_VM, but now the init code requires - * malloc(9) using M_BUSDMA memory, which is set up later than SI_SUB_VM, by - * SI_SUB_KMEM and SI_ORDER_THIRD, so we'll go right after that by using - * SI_SUB_KMEM and SI_ORDER_FOURTH. + * malloc(9) using M_BUSDMA memory and the pcpu zones for counter(9), which get + * set up by SI_SUB_KMEM and SI_ORDER_LAST, so we'll go right after that by + * using SI_SUB_KMEM+1. */ -SYSINIT(busdma, SI_SUB_KMEM, SI_ORDER_FOURTH, busdma_init, NULL); +SYSINIT(busdma, SI_SUB_KMEM+1, SI_ORDER_FIRST, busdma_init, NULL); /* * End block of code useful to transplant to other implementations. @@ -406,8 +358,6 @@ dflt_lock(void *arg, bus_dma_lock_op_t o /* * Allocate a device specific dma_tag. */ -#define SEG_NB 1024 - int bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, bus_addr_t boundary, bus_addr_t lowaddr, bus_addr_t highaddr, @@ -451,21 +401,8 @@ bus_dma_tag_create(bus_dma_tag_t parent, newtag->lockfunc = dflt_lock; newtag->lockfuncarg = NULL; } - /* - * If all the segments we need fit into the local tagsegs array, set the - * pointer now. Otherwise NULL the pointer and an array of segments - * will be allocated later, on first use. We don't pre-allocate now - * because some tags exist just to pass contraints to children in the - * device hierarchy, and they tend to use BUS_SPACE_UNRESTRICTED and we - * sure don't want to try to allocate an array for that. - */ - if (newtag->nsegments <= nitems(newtag->tagsegs)) - newtag->segments = newtag->tagsegs; - else - newtag->segments = NULL; - /* - * Take into account any restrictions imposed by our parent tag - */ + + /* Take into account any restrictions imposed by our parent tag */ if (parent != NULL) { newtag->lowaddr = MIN(parent->lowaddr, newtag->lowaddr); newtag->highaddr = MAX(parent->highaddr, newtag->highaddr); @@ -546,9 +483,6 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) parent = dmat->parent; atomic_subtract_int(&dmat->ref_count, 1); if (dmat->ref_count == 0) { - if (dmat->segments != NULL && - dmat->segments != dmat->tagsegs) - free(dmat->segments, M_BUSDMA); free(dmat, M_BUSDMA); /* * Last reference count, so @@ -565,7 +499,31 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) return (0); } -#include +static bus_dmamap_t +allocate_map(bus_dma_tag_t dmat, int mflags) +{ + int mapsize, segsize; + bus_dmamap_t map; + + /* + * Allocate the map. The map structure ends with an embedded + * variable-sized array of sync_list structures. Following that + * we allocate enough extra space to hold the array of bus_dma_segments. + */ + KASSERT(dmat->nsegments <= MAX_DMA_SEGMENTS, + ("cannot allocate %u dma segments (max is %u)", + dmat->nsegments, MAX_DMA_SEGMENTS)); + segsize = sizeof(struct bus_dma_segment) * dmat->nsegments; + mapsize = sizeof(*map) + sizeof(struct sync_list) * dmat->nsegments; + map = malloc(mapsize + segsize, M_BUSDMA, mflags | M_ZERO); + if (map == NULL) { + CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, ENOMEM); + return (NULL); + } + map->segments = (bus_dma_segment_t *)((uintptr_t)map + mapsize); + return (map); +} + /* * Allocate a handle for mapping from kva/uva/physical * address space into bus device space. @@ -573,40 +531,21 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) int bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp) { - struct sync_list *slist; bus_dmamap_t map; int error = 0; - slist = malloc(sizeof(*slist) * dmat->nsegments, M_BUSDMA, M_NOWAIT); - if (slist == NULL) - return (ENOMEM); - - map = uma_zalloc_arg(dmamap_zone, dmat, M_NOWAIT); - *mapp = map; + *mapp = map = allocate_map(dmat, M_NOWAIT); if (map == NULL) { - free(slist, M_BUSDMA); + CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, ENOMEM); return (ENOMEM); } /* - * If the tag's segments haven't been allocated yet we need to do it - * now, because we can't sleep for resources at map load time. - */ - if (dmat->segments == NULL) { - dmat->segments = malloc(dmat->nsegments * - sizeof(*dmat->segments), M_BUSDMA, M_NOWAIT); - if (dmat->segments == NULL) { - free(slist, M_BUSDMA); - uma_zfree(dmamap_zone, map); - *mapp = NULL; - return (ENOMEM); - } - } - - /* - * Bouncing might be required if the driver asks for an active - * exclusion region, a data alignment that is stricter than 1, and/or - * an active address boundary. + * Bouncing might be required if the driver asks for an exclusion + * region, a data alignment that is stricter than 1, or DMA that begins + * or ends with a partial cacheline. Whether bouncing will actually + * happen can't be known until mapping time, but we need to pre-allocate + * resources now because we might not be allowed to at mapping time. */ if (dmat->flags & BUS_DMA_COULD_BOUNCE) { @@ -616,8 +555,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, in if (dmat->bounce_zone == NULL) { if ((error = alloc_bounce_zone(dmat)) != 0) { - free(slist, M_BUSDMA); - uma_zfree(dmamap_zone, map); + free(map, M_BUSDMA); *mapp = NULL; return (error); } @@ -652,7 +590,6 @@ bus_dmamap_create(bus_dma_tag_t dmat, in bz->map_count++; } map->sync_count = 0; - map->slist = slist; CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->flags, error); @@ -672,12 +609,12 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, b __func__, dmat, EBUSY); return (EBUSY); } - free(map->slist, M_BUSDMA); - uma_zfree(dmamap_zone, map); if (dmat->bounce_zone) dmat->bounce_zone->map_count--; + free(map, M_BUSDMA); + dmat->map_count--; CTR2(KTR_BUSDMA, "%s: tag %p error 0", __func__, dmat); - return (0); + return (0); } /* @@ -686,37 +623,31 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, b * the allocated memory, and a pointer to an associated bus_dmamap. */ int -bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddrp, int flags, +bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int flags, bus_dmamap_t *mapp) { - struct sync_list *slist; - void * vaddr; - struct busdma_bufzone *bufzone; busdma_bufalloc_t ba; + struct busdma_bufzone *bufzone; bus_dmamap_t map; - int mflags; vm_memattr_t memattr; + int mflags; if (flags & BUS_DMA_NOWAIT) mflags = M_NOWAIT; else mflags = M_WAITOK; - /* - * If the tag's segments haven't been allocated yet we need to do it - * now, because we can't sleep for resources at map load time. - */ - if (dmat->segments == NULL) - dmat->segments = malloc(dmat->nsegments * - sizeof(*dmat->segments), M_BUSDMA, mflags); + if (flags & BUS_DMA_ZERO) + mflags |= M_ZERO; - slist = malloc(sizeof(*slist) * dmat->nsegments, M_BUSDMA, M_NOWAIT); - if (slist == NULL) - return (ENOMEM); - map = uma_zalloc_arg(dmamap_zone, dmat, mflags); + *mapp = map = allocate_map(dmat, mflags); if (map == NULL) { - free(slist, M_BUSDMA); + CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", + __func__, dmat, dmat->flags, ENOMEM); return (ENOMEM); } + map->flags = DMAMAP_DMAMEM_ALLOC; + + /* Choose a busdma buffer allocator based on memory type flags. */ if (flags & BUS_DMA_COHERENT) { memattr = VM_MEMATTR_UNCACHEABLE; ba = coherent_allocator; @@ -725,11 +656,6 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi memattr = VM_MEMATTR_DEFAULT; ba = standard_allocator; } - /* All buffers we allocate are cache-aligned. */ - map->flags |= DMAMAP_CACHE_ALIGNED; - - if (flags & BUS_DMA_ZERO) - mflags |= M_ZERO; /* * Try to find a bufzone in the allocator that holds a cache of buffers @@ -753,28 +679,28 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi */ if (bufzone != NULL && dmat->alignment <= bufzone->size && !_bus_dma_can_bounce(dmat->lowaddr, dmat->highaddr)) { - vaddr = uma_zalloc(bufzone->umazone, mflags); + *vaddr = uma_zalloc(bufzone->umazone, mflags); } else if (dmat->nsegments >= btoc(dmat->maxsize) && dmat->alignment <= PAGE_SIZE && dmat->boundary == 0) { - vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->maxsize, + *vaddr = (void *)kmem_alloc_attr(kernel_arena, dmat->maxsize, mflags, 0, dmat->lowaddr, memattr); } else { - vaddr = (void *)kmem_alloc_contig(kernel_arena, dmat->maxsize, + *vaddr = (void *)kmem_alloc_contig(kernel_arena, dmat->maxsize, mflags, 0, dmat->lowaddr, dmat->alignment, dmat->boundary, memattr); } - if (vaddr == NULL) { - free(slist, M_BUSDMA); - uma_zfree(dmamap_zone, map); - map = NULL; - } else { - map->slist = slist; - map->sync_count = 0; + if (*vaddr == NULL) { + CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", + __func__, dmat, dmat->flags, ENOMEM); + free(map, M_BUSDMA); + *mapp = NULL; + return (ENOMEM); } - *vaddrp = vaddr; - *mapp = map; + dmat->map_count++; - return (vaddr == NULL ? ENOMEM : 0); + CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", + __func__, dmat, dmat->flags, 0); + return (0); } /* @@ -792,9 +718,6 @@ bus_dmamem_free(bus_dma_tag_t dmat, void else ba = standard_allocator; - free(map->slist, M_BUSDMA); - uma_zfree(dmamap_zone, map); - bufzone = busdma_bufalloc_findzone(ba, dmat->maxsize); if (bufzone != NULL && dmat->alignment <= bufzone->size && @@ -802,6 +725,10 @@ bus_dmamem_free(bus_dma_tag_t dmat, void uma_zfree(bufzone->umazone, vaddr); else kmem_free(kernel_arena, (vm_offset_t)vaddr, dmat->maxsize); + + dmat->map_count--; + free(map, M_BUSDMA); + CTR3(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat, dmat->flags); } static void @@ -962,7 +889,7 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat int error; if (segs == NULL) - segs = dmat->segments; + segs = map->segments; if ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) { _bus_dmamap_count_phys(dmat, map, buf, buflen, flags); @@ -1046,7 +973,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm int error = 0; if (segs == NULL) - segs = dmat->segments; + segs = map->segments; if ((flags & BUS_DMA_LOAD_MBUF) != 0) map->flags |= DMAMAP_CACHE_ALIGNED; @@ -1147,7 +1074,7 @@ _bus_dmamap_complete(bus_dma_tag_t dmat, { if (segs == NULL) - segs = dmat->segments; + segs = map->segments; return (segs); } @@ -1158,12 +1085,22 @@ void _bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map) { struct bounce_page *bpage; + struct bounce_zone *bz; + + if ((bz = dmat->bounce_zone) != NULL) { + while ((bpage = STAILQ_FIRST(&map->bpages)) != NULL) { + STAILQ_REMOVE_HEAD(&map->bpages, links); + free_bounce_page(dmat, bpage); + } - while ((bpage = STAILQ_FIRST(&map->bpages)) != NULL) { - STAILQ_REMOVE_HEAD(&map->bpages, links); - free_bounce_page(dmat, bpage); + bz = dmat->bounce_zone; + bz->free_bpages += map->pagesreserved; + bz->reserved_bpages -= map->pagesreserved; + map->pagesreserved = 0; + map->pagesneeded = 0; } map->sync_count = 0; + map->flags &= ~DMAMAP_MBUF; } static void From owner-svn-src-all@freebsd.org Sat Oct 24 02: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 C6CC0A1850A; Sat, 24 Oct 2015 02:23:16 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95CC31ED4; Sat, 24 Oct 2015 02:23:16 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9O2NFM6011541; Sat, 24 Oct 2015 02:23:15 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9O2NFiY011536; Sat, 24 Oct 2015 02:23:15 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201510240223.t9O2NFiY011536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Sat, 24 Oct 2015 02:23:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289863 - 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: Sat, 24 Oct 2015 02:23:16 -0000 Author: ache Date: Sat Oct 24 02:23:15 2015 New Revision: 289863 URL: https://svnweb.freebsd.org/changeset/base/289863 Log: Since no room left in the _flags, reuse __SALC for O_APPEND. It helps to remove _fcntl() call from _ftello() and optimize seek position calculation in _swrite(). MFC after: 3 weeks Modified: head/lib/libc/stdio/fdopen.c head/lib/libc/stdio/fopen.c head/lib/libc/stdio/freopen.c head/lib/libc/stdio/ftell.c head/lib/libc/stdio/stdio.c Modified: head/lib/libc/stdio/fdopen.c ============================================================================== --- head/lib/libc/stdio/fdopen.c Sat Oct 24 02:18:14 2015 (r289862) +++ head/lib/libc/stdio/fdopen.c Sat Oct 24 02:23:15 2015 (r289863) @@ -91,7 +91,10 @@ fdopen(int fd, const char *mode) * O_APPEND bit set, assert __SAPP so that __swrite() caller * will _sseek() to the end before write. */ - if ((oflags & O_APPEND) && !(fdflags & O_APPEND)) + /* XXX: Reuse __SALC for O_APPEND. */ + if (fdflags & O_APPEND) + fp->_flags |= __SALC; + else if (oflags & O_APPEND) fp->_flags |= __SAPP; fp->_file = fd; fp->_cookie = fp; Modified: head/lib/libc/stdio/fopen.c ============================================================================== --- head/lib/libc/stdio/fopen.c Sat Oct 24 02:18:14 2015 (r289862) +++ head/lib/libc/stdio/fopen.c Sat Oct 24 02:23:15 2015 (r289863) @@ -91,7 +91,10 @@ fopen(const char * __restrict file, cons * we can do about this. (We could set __SAPP and check in * fseek and ftell.) */ - if (oflags & O_APPEND) + if (oflags & O_APPEND) { + /* XXX: Reuse __SALC for O_APPEND. */ + fp->_flags |= __SALC; (void)_sseek(fp, (fpos_t)0, SEEK_END); + } return (fp); } Modified: head/lib/libc/stdio/freopen.c ============================================================================== --- head/lib/libc/stdio/freopen.c Sat Oct 24 02:18:14 2015 (r289862) +++ head/lib/libc/stdio/freopen.c Sat Oct 24 02:23:15 2015 (r289863) @@ -240,8 +240,11 @@ finish: * we can do about this. (We could set __SAPP and check in * fseek and ftell.) */ - if (oflags & O_APPEND) + if (oflags & O_APPEND) { + /* XXX: Reuse __SALC for O_APPEND. */ + fp->_flags |= __SALC; (void) _sseek(fp, (fpos_t)0, SEEK_END); + } FUNLOCKFILE(fp); return (fp); } Modified: head/lib/libc/stdio/ftell.c ============================================================================== --- head/lib/libc/stdio/ftell.c Sat Oct 24 02:18:14 2015 (r289862) +++ head/lib/libc/stdio/ftell.c Sat Oct 24 02:23:15 2015 (r289863) @@ -88,7 +88,6 @@ _ftello(FILE *fp, fpos_t *offset) { fpos_t pos; size_t n; - int dflags; if (fp->_seek == NULL) { errno = ESPIPE; /* historic practice */ @@ -120,21 +119,24 @@ _ftello(FILE *fp, fpos_t *offset) if (HASUB(fp)) pos -= fp->_r; /* Can be negative at this point. */ } else if ((fp->_flags & __SWR) && fp->_p != NULL) { - dflags = 0; - if (fp->_flags & __SAPP) - dflags = O_APPEND; - else if (fp->_file != -1 && - (dflags = _fcntl(fp->_file, F_GETFL)) < 0) - return (1); - if ((dflags & O_APPEND) && - (pos = _sseek(fp, (fpos_t)0, SEEK_END)) == -1) { - if ((fp->_flags & __SOPT) || __sflush(fp) || - (pos = _sseek(fp, (fpos_t)0, SEEK_CUR)) == -1) - return (1); - else { - *offset = pos; - return (0); + /* XXX: Reuse __SALC for O_APPEND. */ + if (fp->_flags & (__SAPP|__SALC)) { + int serrno = errno; + + errno = 0; + if ((pos = _sseek(fp, (fpos_t)0, SEEK_END)) == -1) { + if (errno == ESPIPE || + (fp->_flags & __SOPT) || __sflush(fp) || + (pos = + _sseek(fp, (fpos_t)0, SEEK_CUR)) == -1) + return (1); + else { + errno = serrno; + *offset = pos; + return (0); + } } + errno = serrno; } /* * Writing. Any buffered characters cause the Modified: head/lib/libc/stdio/stdio.c ============================================================================== --- head/lib/libc/stdio/stdio.c Sat Oct 24 02:18:14 2015 (r289862) +++ head/lib/libc/stdio/stdio.c Sat Oct 24 02:23:15 2015 (r289863) @@ -117,7 +117,8 @@ _swrite(FILE *fp, char const *buf, int n ret = (*fp->_write)(fp->_cookie, buf, n); /* __SOFF removed even on success in case O_APPEND mode is set. */ if (ret >= 0) { - if ((fp->_flags & (__SAPP|__SOFF)) == (__SAPP|__SOFF) && + /* XXX: Reuse __SALC for O_APPEND. */ + if ((fp->_flags & __SOFF) && !(fp->_flags & __SALC) && fp->_offset <= OFF_MAX - ret) fp->_offset += ret; else From owner-svn-src-all@freebsd.org Sat Oct 24 02:44: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 6407DA1898E; Sat, 24 Oct 2015 02:44:15 +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 183F0B54; Sat, 24 Oct 2015 02:44:15 +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 t9O2iEM9017867; Sat, 24 Oct 2015 02:44:14 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9O2iE1s017866; Sat, 24 Oct 2015 02:44:14 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510240244.t9O2iE1s017866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 24 Oct 2015 02:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289864 - 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, 24 Oct 2015 02:44:15 -0000 Author: ian Date: Sat Oct 24 02:44:13 2015 New Revision: 289864 URL: https://svnweb.freebsd.org/changeset/base/289864 Log: Bring in all the new(-ish) statistics code from armv6. Modified: head/sys/arm/arm/busdma_machdep.c Modified: head/sys/arm/arm/busdma_machdep.c ============================================================================== --- head/sys/arm/arm/busdma_machdep.c Sat Oct 24 02:23:15 2015 (r289863) +++ head/sys/arm/arm/busdma_machdep.c Sat Oct 24 02:44:13 2015 (r289864) @@ -58,22 +58,22 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include +#include #include -#include #include +#include #include -#include -#include #include #include -#include #include -#include -#include #include #include +#include +#include #include #include @@ -154,11 +154,42 @@ struct bounce_zone { static struct mtx bounce_lock; static int total_bpages; static int busdma_zonecount; +static uint32_t tags_total; +static uint32_t maps_total; +static uint32_t maps_dmamem; +static uint32_t maps_coherent; +static counter_u64_t maploads_total; +static counter_u64_t maploads_bounced; +static counter_u64_t maploads_coherent; +static counter_u64_t maploads_dmamem; +static counter_u64_t maploads_mbuf; +static counter_u64_t maploads_physmem; + static STAILQ_HEAD(, bounce_zone) bounce_zone_list; -static SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters"); +SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters"); +SYSCTL_UINT(_hw_busdma, OID_AUTO, tags_total, CTLFLAG_RD, &tags_total, 0, + "Number of active tags"); +SYSCTL_UINT(_hw_busdma, OID_AUTO, maps_total, CTLFLAG_RD, &maps_total, 0, + "Number of active maps"); +SYSCTL_UINT(_hw_busdma, OID_AUTO, maps_dmamem, CTLFLAG_RD, &maps_dmamem, 0, + "Number of active maps for bus_dmamem_alloc buffers"); +SYSCTL_UINT(_hw_busdma, OID_AUTO, maps_coherent, CTLFLAG_RD, &maps_coherent, 0, + "Number of active maps with BUS_DMA_COHERENT flag set"); +SYSCTL_COUNTER_U64(_hw_busdma, OID_AUTO, maploads_total, CTLFLAG_RD, + &maploads_total, "Number of load operations performed"); +SYSCTL_COUNTER_U64(_hw_busdma, OID_AUTO, maploads_bounced, CTLFLAG_RD, + &maploads_bounced, "Number of load operations that used bounce buffers"); +SYSCTL_COUNTER_U64(_hw_busdma, OID_AUTO, maploads_coherent, CTLFLAG_RD, + &maploads_dmamem, "Number of load operations on BUS_DMA_COHERENT memory"); +SYSCTL_COUNTER_U64(_hw_busdma, OID_AUTO, maploads_dmamem, CTLFLAG_RD, + &maploads_dmamem, "Number of load operations on bus_dmamem_alloc buffers"); +SYSCTL_COUNTER_U64(_hw_busdma, OID_AUTO, maploads_mbuf, CTLFLAG_RD, + &maploads_mbuf, "Number of load operations for mbufs"); +SYSCTL_COUNTER_U64(_hw_busdma, OID_AUTO, maploads_physmem, CTLFLAG_RD, + &maploads_physmem, "Number of load operations on physical buffers"); SYSCTL_INT(_hw_busdma, OID_AUTO, total_bpages, CTLFLAG_RD, &total_bpages, 0, - "Total bounce pages"); + "Total bounce pages"); struct bus_dmamap { struct bp_list bpages; @@ -211,6 +242,12 @@ static void busdma_init(void *dummy) { + maploads_total = counter_u64_alloc(M_WAITOK); + maploads_bounced = counter_u64_alloc(M_WAITOK); + maploads_coherent = counter_u64_alloc(M_WAITOK); + maploads_dmamem = counter_u64_alloc(M_WAITOK); + maploads_mbuf = counter_u64_alloc(M_WAITOK); + maploads_physmem = counter_u64_alloc(M_WAITOK); /* Create a cache of buffers in standard (cacheable) memory. */ standard_allocator = busdma_bufalloc_create("buffer", @@ -455,27 +492,33 @@ bus_dma_tag_create(bus_dma_tag_t parent, newtag->flags |= BUS_DMA_MIN_ALLOC_COMP; } else newtag->bounce_zone = NULL; - if (error != 0) + + if (error != 0) { free(newtag, M_BUSDMA); - else + } else { + atomic_add_32(&tags_total, 1); *dmat = newtag; + } CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d", __func__, newtag, (newtag != NULL ? newtag->flags : 0), error); - return (error); } int bus_dma_tag_destroy(bus_dma_tag_t dmat) { -#ifdef KTR - bus_dma_tag_t dmat_copy = dmat; -#endif + bus_dma_tag_t dmat_copy; + int error; + + error = 0; + dmat_copy = dmat; if (dmat != NULL) { - if (dmat->map_count != 0) - return (EBUSY); + if (dmat->map_count != 0) { + error = EBUSY; + goto out; + } while (dmat != NULL) { bus_dma_tag_t parent; @@ -483,6 +526,7 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) parent = dmat->parent; atomic_subtract_int(&dmat->ref_count, 1); if (dmat->ref_count == 0) { + atomic_subtract_32(&tags_total, 1); free(dmat, M_BUSDMA); /* * Last reference count, so @@ -494,8 +538,57 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) dmat = NULL; } } - CTR2(KTR_BUSDMA, "%s tag %p", __func__, dmat_copy); +out: + CTR3(KTR_BUSDMA, "%s tag %p error %d", __func__, dmat_copy, error); + return (error); +} + +static int +allocate_bz_and_pages(bus_dma_tag_t dmat, bus_dmamap_t map) +{ + int error; + + /* + * Bouncing might be required if the driver asks for an active + * exclusion region, a data alignment that is stricter than 1, and/or + * an active address boundary. + */ + if (dmat->flags & BUS_DMA_COULD_BOUNCE) { + + /* Must bounce */ + struct bounce_zone *bz; + int maxpages; + + if (dmat->bounce_zone == NULL) { + if ((error = alloc_bounce_zone(dmat)) != 0) { + return (error); + } + } + bz = dmat->bounce_zone; + + /* Initialize the new map */ + STAILQ_INIT(&(map->bpages)); + + /* + * Attempt to add pages to our pool on a per-instance + * 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)) { + int pages; + + pages = MAX(atop(dmat->maxsize), 1); + pages = MIN(maxpages - bz->total_bpages, pages); + pages = MAX(pages, 1); + if (alloc_bounce_pages(dmat, pages) < pages) + return (ENOMEM); + if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0) + dmat->flags |= BUS_DMA_MIN_ALLOC_COMP; + } + bz->map_count++; + } return (0); } @@ -547,51 +640,16 @@ bus_dmamap_create(bus_dma_tag_t dmat, in * happen can't be known until mapping time, but we need to pre-allocate * resources now because we might not be allowed to at mapping time. */ - if (dmat->flags & BUS_DMA_COULD_BOUNCE) { - - /* Must bounce */ - struct bounce_zone *bz; - int maxpages; - - if (dmat->bounce_zone == NULL) { - if ((error = alloc_bounce_zone(dmat)) != 0) { - free(map, M_BUSDMA); - *mapp = NULL; - return (error); - } - } - bz = dmat->bounce_zone; - - /* Initialize the new map */ - STAILQ_INIT(&((*mapp)->bpages)); - - /* - * Attempt to add pages to our pool on a per-instance - * 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)) { - int pages; - - pages = MAX(atop(dmat->maxsize), 1); - pages = MIN(maxpages - bz->total_bpages, pages); - pages = MAX(pages, 1); - if (alloc_bounce_pages(dmat, pages) < pages) - error = ENOMEM; - - if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0) { - if (error == 0) - dmat->flags |= BUS_DMA_MIN_ALLOC_COMP; - } else { - error = 0; - } - } - bz->map_count++; + error = allocate_bz_and_pages(dmat, map); + if (error != 0) { + free(map, M_BUSDMA); + *mapp = NULL; + return (error); } - map->sync_count = 0; - CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", - __func__, dmat, dmat->flags, error); + if (map->flags & DMAMAP_COHERENT) + atomic_add_32(&maps_coherent, 1); + atomic_add_32(&maps_total, 1); + dmat->map_count++; return (0); } @@ -611,6 +669,9 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, b } if (dmat->bounce_zone) dmat->bounce_zone->map_count--; + if (map->flags & DMAMAP_COHERENT) + atomic_subtract_32(&maps_coherent, 1); + atomic_subtract_32(&maps_total, 1); free(map, M_BUSDMA); dmat->map_count--; CTR2(KTR_BUSDMA, "%s: tag %p error 0", __func__, dmat); @@ -696,6 +757,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi *mapp = NULL; return (ENOMEM); } + if (map->flags & DMAMAP_COHERENT) + atomic_add_32(&maps_coherent, 1); + atomic_add_32(&maps_dmamem, 1); + atomic_add_32(&maps_total, 1); dmat->map_count++; CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", @@ -727,6 +792,10 @@ bus_dmamem_free(bus_dma_tag_t dmat, void kmem_free(kernel_arena, (vm_offset_t)vaddr, dmat->maxsize); dmat->map_count--; + if (map->flags & DMAMAP_COHERENT) + atomic_subtract_32(&maps_coherent, 1); + atomic_subtract_32(&maps_total, 1); + atomic_subtract_32(&maps_dmamem, 1); free(map, M_BUSDMA); CTR3(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat, dmat->flags); } @@ -882,18 +951,22 @@ int _bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf, bus_size_t buflen, int flags, bus_dma_segment_t *segs, int *segp) { - struct sync_list *sl; - bus_size_t sgsize; bus_addr_t curaddr; bus_addr_t sl_end = 0; + bus_size_t sgsize; + struct sync_list *sl; int error; if (segs == NULL) segs = map->segments; + counter_u64_add(maploads_total, 1); + counter_u64_add(maploads_physmem, 1); + if ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) { _bus_dmamap_count_phys(dmat, map, buf, buflen, flags); if (map->pagesneeded != 0) { + counter_u64_add(maploads_bounced, 1); error = _bus_dmamap_reserve_pages(dmat, map, flags); if (error) return (error); @@ -972,14 +1045,23 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm vm_offset_t sl_vend = 0; int error = 0; + counter_u64_add(maploads_total, 1); + if (map->flags & DMAMAP_COHERENT) + counter_u64_add(maploads_coherent, 1); + if (map->flags & DMAMAP_DMAMEM_ALLOC) + counter_u64_add(maploads_dmamem, 1); + if (segs == NULL) segs = map->segments; - if ((flags & BUS_DMA_LOAD_MBUF) != 0) + if (flags & BUS_DMA_LOAD_MBUF) { + counter_u64_add(maploads_mbuf, 1); map->flags |= DMAMAP_CACHE_ALIGNED; + } if ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) { _bus_dmamap_count_pages(dmat, map, pmap, buf, buflen, flags); if (map->pagesneeded != 0) { + counter_u64_add(maploads_bounced, 1); error = _bus_dmamap_reserve_pages(dmat, map, flags); if (error) return (error); From owner-svn-src-all@freebsd.org Sat Oct 24 03:01: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 A3858A18D21; Sat, 24 Oct 2015 03:01:48 +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 5F44B14BF; Sat, 24 Oct 2015 03:01:48 +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 t9O31l5h024032; Sat, 24 Oct 2015 03:01:47 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9O31lFh024031; Sat, 24 Oct 2015 03:01:47 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510240301.t9O31lFh024031@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 24 Oct 2015 03:01:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289865 - 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, 24 Oct 2015 03:01:48 -0000 Author: ian Date: Sat Oct 24 03:01:47 2015 New Revision: 289865 URL: https://svnweb.freebsd.org/changeset/base/289865 Log: A few more whitespace, style, and comment cleanups. No functional changes. Modified: head/sys/arm/arm/busdma_machdep-v6.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Sat Oct 24 02:44:13 2015 (r289864) +++ head/sys/arm/arm/busdma_machdep-v6.c Sat Oct 24 03:01:47 2015 (r289865) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012-2014 Ian Lepore + * Copyright (c) 2012-2015 Ian Lepore * Copyright (c) 2010 Mark Tinguely * Copyright (c) 2004 Olivier Houchard * Copyright (c) 2002 Peter Grehan @@ -35,9 +35,6 @@ __FBSDID("$FreeBSD$"); #define _ARM32_BUS_DMA_PRIVATE #include -#include -#include -#include #include #include #include @@ -740,6 +737,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, in int bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map) { + if (STAILQ_FIRST(&map->bpages) != NULL || map->sync_count != 0) { CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, EBUSY); @@ -756,14 +754,13 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, b return (0); } - /* - * Allocate a piece of memory that can be efficiently mapped into - * bus device space based on the constraints lited in the dma tag. - * A dmamap to for use with dmamap_load is also allocated. + * Allocate a piece of memory that can be efficiently mapped into bus device + * space based on the constraints listed in the dma tag. Returns a pointer to + * the allocated memory, and a pointer to an associated bus_dmamap. */ int -bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, +bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int flags, bus_dmamap_t *mapp) { busdma_bufalloc_t ba; @@ -829,8 +826,6 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi mflags, 0, dmat->lowaddr, dmat->alignment, dmat->boundary, memattr); } - - if (*vaddr == NULL) { CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->flags, ENOMEM); @@ -850,8 +845,8 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi } /* - * Free a piece of memory and it's allociated dmamap, that was allocated - * via bus_dmamem_alloc. Make the same choice for free/contigfree. + * Free a piece of memory that was allocated via bus_dmamem_alloc, along with + * its associated map. */ void bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map) @@ -1075,7 +1070,7 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat sgsize)) { sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK)); curaddr = add_bounce_page(dmat, map, 0, curaddr, - sgsize); + sgsize); } else { if (map->sync_count > 0) sl_end = VM_PAGE_TO_PHYS(sl->pages) + @@ -1187,7 +1182,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm if (map->pagesneeded != 0 && must_bounce(dmat, map, curaddr, sgsize)) { curaddr = add_bounce_page(dmat, map, kvaddr, curaddr, - sgsize); + sgsize); } else { if (map->sync_count > 0) { sl_pend = VM_PAGE_TO_PHYS(sl->pages) + From owner-svn-src-all@freebsd.org Sat Oct 24 03:14: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 9D18FA1B13C; Sat, 24 Oct 2015 03:14:37 +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 6AA9D1CA1; Sat, 24 Oct 2015 03:14:37 +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 t9O3EaPc026901; Sat, 24 Oct 2015 03:14:36 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9O3EaH2026899; Sat, 24 Oct 2015 03:14:36 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201510240314.t9O3EaH2026899@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 24 Oct 2015 03:14:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289866 - head/cddl/contrib/opensolaris/tools/ctf/cvt X-SVN-Group: head MIME-Version: 1.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, 24 Oct 2015 03:14:37 -0000 Author: markj Date: Sat Oct 24 03:14:36 2015 New Revision: 289866 URL: https://svnweb.freebsd.org/changeset/base/289866 Log: DWARF emitted by clang 3.7 encodes array sizes using the DW_AT_count attribute rather than DW_AT_upper_bound. Teach ctfconvert about this so that array type sizes are encoded correctly. PR: 203772 MFC after: 1 week Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c ============================================================================== --- head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Sat Oct 24 03:01:47 2015 (r289865) +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Sat Oct 24 03:14:36 2015 (r289866) @@ -683,6 +683,10 @@ tdesc_array_create(dwarf_t *dw, Dwarf_Di ar->ad_nelems = uval + 1; else if (die_signed(dw, dim, DW_AT_upper_bound, &sval, 0)) ar->ad_nelems = sval + 1; + else if (die_unsigned(dw, dim, DW_AT_count, &uval, 0)) + ar->ad_nelems = uval; + else if (die_signed(dw, dim, DW_AT_count, &sval, 0)) + ar->ad_nelems = sval; else ar->ad_nelems = 0; From owner-svn-src-all@freebsd.org Sat Oct 24 03:16: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 8D10AA1B19C; Sat, 24 Oct 2015 03:16:41 +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 5D22D1E08; Sat, 24 Oct 2015 03:16:41 +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 t9O3GeWR027022; Sat, 24 Oct 2015 03:16:40 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9O3GeaL027021; Sat, 24 Oct 2015 03:16:40 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201510240316.t9O3GeaL027021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 24 Oct 2015 03:16:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289867 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2015 03:16:41 -0000 Author: markj Date: Sat Oct 24 03:16:40 2015 New Revision: 289867 URL: https://svnweb.freebsd.org/changeset/base/289867 Log: Remove an erroneous semicolon. MFC after: 3 days Modified: head/sys/sys/_bitset.h Modified: head/sys/sys/_bitset.h ============================================================================== --- head/sys/sys/_bitset.h Sat Oct 24 03:14:36 2015 (r289866) +++ head/sys/sys/_bitset.h Sat Oct 24 03:16:40 2015 (r289867) @@ -50,7 +50,7 @@ #define BITSET_DEFINE(t, _s) \ struct t { \ long __bits[__bitset_words((_s))]; \ -}; +} #define BITSET_T_INITIALIZER(x) \ { .__bits = { x } } From owner-svn-src-all@freebsd.org Sat Oct 24 04:03: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 4D711A1BB29; Sat, 24 Oct 2015 04:03: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 1D940123E; Sat, 24 Oct 2015 04:03: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 t9O43T4d044671; Sat, 24 Oct 2015 04:03:29 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9O43TDh044670; Sat, 24 Oct 2015 04:03:29 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510240403.t9O43TDh044670@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 24 Oct 2015 04:03:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289868 - 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: Sat, 24 Oct 2015 04:03:30 -0000 Author: bdrewery Date: Sat Oct 24 04:03:29 2015 New Revision: 289868 URL: https://svnweb.freebsd.org/changeset/base/289868 Log: Configs should not be under MK_INCLUDES control. 'buildconfig' is connected to 'all', but 'installconfig' is only called manually. There is not much need to conditionalize this file right now due to how it is hooked up and its impact on various build phases. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.confs.mk Modified: head/share/mk/bsd.confs.mk ============================================================================== --- head/share/mk/bsd.confs.mk Sat Oct 24 03:16:40 2015 (r289867) +++ head/share/mk/bsd.confs.mk Sat Oct 24 04:03:29 2015 (r289868) @@ -4,7 +4,6 @@ .error bsd.conf.mk cannot be included directly. .endif -.if ${MK_INCLUDES} != "no" CONFGROUPS?= CONFS .if !target(buildconfig) @@ -83,5 +82,3 @@ _${group}INS: ${_${group}CONFS} STAGE_TARGETS+= stage_config .endif .endif - -.endif # ${MK_INCLUDES} != "no" From owner-svn-src-all@freebsd.org Sat Oct 24 04:03: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 7448FA1BB4B; Sat, 24 Oct 2015 04:03:34 +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 23CD01266; Sat, 24 Oct 2015 04:03:34 +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 t9O43X9p044725; Sat, 24 Oct 2015 04:03:33 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9O43XqM044724; Sat, 24 Oct 2015 04:03:33 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510240403.t9O43XqM044724@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 24 Oct 2015 04:03:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289869 - 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: Sat, 24 Oct 2015 04:03:34 -0000 Author: bdrewery Date: Sat Oct 24 04:03:32 2015 New Revision: 289869 URL: https://svnweb.freebsd.org/changeset/base/289869 Log: Slightly rework the comments and logic for default Clang/GCC. This is because the previous version was very obscure about the fact that despite having Clang "on by default" for architectures such as powerpc, it does not actually build due to the GCC it uses not having C++11 support. Using an external compiler that supports C++11 does allow this to work. This whole block should be rethought more given "on by default" is not really default without extra work which could actually be surprising for why Clang is showing up when using a newer GCC. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sat Oct 24 04:03:29 2015 (r289868) +++ head/share/mk/src.opts.mk Sat Oct 24 04:03:32 2015 (r289869) @@ -210,21 +210,22 @@ __TT=${MACHINE} .endif .include -.if !${COMPILER_FEATURES:Mc++11} -# If the compiler is not C++11 capable, disable clang and use gcc instead. -__DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX -__DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC -.elif ${__T} == "aarch64" || ${__T} == "amd64" || ${__TT} == "arm" || \ - ${__T} == "i386" -# On x86 and arm, clang is enabled, and will be installed as the default cc. +# If the compiler is not C++11 capable, disable Clang and use GCC instead. +# This means that architectures that have GCC 4.2 as default can not +# build Clang without using an external compiler. + +.if ${COMPILER_FEATURES:Mc++11} && (${__T} == "aarch64" || \ + ${__T} == "amd64" || ${__TT} == "arm" || ${__T} == "i386") +# Clang is enabled, and will be installed as the default /usr/bin/cc. __DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX -.elif ${__T:Mpowerpc*} -# On powerpc, clang is enabled, but gcc is installed as the default cc. +.elif ${COMPILER_FEATURES:Mc++11} && ${__T:Mpowerpc*} +# On powerpc, if an external compiler that supports C++11 is used as ${CC}, +# then Clang is enabled, but GCC is installed as the default /usr/bin/cc. __DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX __DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC .else -# Everything else disables clang, and uses gcc instead. +# Everything else disables Clang, and uses GCC instead. __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC .endif From owner-svn-src-all@freebsd.org Sat Oct 24 04:55: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 20FBCA1C69E; Sat, 24 Oct 2015 04:55:19 +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 DAC6AF4B; Sat, 24 Oct 2015 04:55: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 t9O4tHqi068630; Sat, 24 Oct 2015 04:55:17 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9O4tHt3068628; Sat, 24 Oct 2015 04:55:17 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510240455.t9O4tHt3068628@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 24 Oct 2015 04:55:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289870 - 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: Sat, 24 Oct 2015 04:55:19 -0000 Author: bdrewery Date: Sat Oct 24 04:55:17 2015 New Revision: 289870 URL: https://svnweb.freebsd.org/changeset/base/289870 Log: Add bsd.crunchgen.mk to bsd.README. MFC after: 1 week Modified: head/share/mk/bsd.README head/share/mk/bsd.crunchgen.mk Modified: head/share/mk/bsd.README ============================================================================== --- head/share/mk/bsd.README Sat Oct 24 04:03:32 2015 (r289869) +++ head/share/mk/bsd.README Sat Oct 24 04:55:17 2015 (r289870) @@ -17,6 +17,7 @@ files. In most cases it is only interes bsd.lib.mk. bsd.arch.inc.mk - includes arch-specific Makefile.$arch +bsd.crunchgen.mk - building crunched binaries using crunchgen(1) bsd.compiler.mk - defined based on current compiler bsd.confs.mk - install of configuration files bsd.cpu.mk - sets CPU/arch-related variables (included from sys.mk) Modified: head/share/mk/bsd.crunchgen.mk ============================================================================== --- head/share/mk/bsd.crunchgen.mk Sat Oct 24 04:03:32 2015 (r289869) +++ head/share/mk/bsd.crunchgen.mk Sat Oct 24 04:55:17 2015 (r289870) @@ -1,5 +1,7 @@ ################################################################# # +# Generate crunched binaries using crunchgen(1). +# # General notes: # # A number of Make variables are used to generate the crunchgen config file. From owner-svn-src-all@freebsd.org Sat Oct 24 05:00: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 E76DAA1C7A0; Sat, 24 Oct 2015 05:00: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 B21F91240; Sat, 24 Oct 2015 05:00: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 t9O50K33069434; Sat, 24 Oct 2015 05:00:20 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9O50K5p069433; Sat, 24 Oct 2015 05:00:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510240500.t9O50K5p069433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 24 Oct 2015 05:00:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289871 - 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: Sat, 24 Oct 2015 05:00:22 -0000 Author: bdrewery Date: Sat Oct 24 05:00:20 2015 New Revision: 289871 URL: https://svnweb.freebsd.org/changeset/base/289871 Log: Sort properly. MFC after: 1 week X-MFC-With: r289870 Modified: head/share/mk/bsd.README Modified: head/share/mk/bsd.README ============================================================================== --- head/share/mk/bsd.README Sat Oct 24 04:55:17 2015 (r289870) +++ head/share/mk/bsd.README Sat Oct 24 05:00:20 2015 (r289871) @@ -17,10 +17,10 @@ files. In most cases it is only interes bsd.lib.mk. bsd.arch.inc.mk - includes arch-specific Makefile.$arch -bsd.crunchgen.mk - building crunched binaries using crunchgen(1) bsd.compiler.mk - defined based on current compiler bsd.confs.mk - install of configuration files bsd.cpu.mk - sets CPU/arch-related variables (included from sys.mk) +bsd.crunchgen.mk - building crunched binaries using crunchgen(1) bsd.dep.mk - handle Makefile dependencies bsd.doc.mk - building troff system documents bsd.endian.mk - TARGET_ENDIAN=1234(little) or 4321 (big) for target From owner-svn-src-all@freebsd.org Sat Oct 24 05:16: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 EBA11A1CBC0; Sat, 24 Oct 2015 05:16:31 +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 B14A41B14; Sat, 24 Oct 2015 05:16:31 +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 t9O5GUol076454; Sat, 24 Oct 2015 05:16:30 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9O5GUg2076453; Sat, 24 Oct 2015 05:16:30 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510240516.t9O5GUg2076453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 24 Oct 2015 05:16:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289872 - head/usr.bin/mkdep X-SVN-Group: head MIME-Version: 1.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, 24 Oct 2015 05:16:32 -0000 Author: bdrewery Date: Sat Oct 24 05:16:30 2015 New Revision: 289872 URL: https://svnweb.freebsd.org/changeset/base/289872 Log: Replace gcc reference with 'cc' and document the default ${CC}. MFC after: 1 week Modified: head/usr.bin/mkdep/mkdep.1 Modified: head/usr.bin/mkdep/mkdep.1 ============================================================================== --- head/usr.bin/mkdep/mkdep.1 Sat Oct 24 05:00:20 2015 (r289871) +++ head/usr.bin/mkdep/mkdep.1 Sat Oct 24 05:16:30 2015 (r289872) @@ -28,7 +28,7 @@ .\" @(#)mkdep.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 6, 1993 +.Dd October 23, 2015 .Dt MKDEP 1 .Os .Sh NAME @@ -60,11 +60,13 @@ CFLAGS is the list of flags for the C co .Pp The user has the ability to change the preprocessor and preprocessor options used. -For instance, to use gcc as the preprocessor and to ignore system +For instance, to use +.Sy cc +as the preprocessor and to ignore system headers, one would use .Bd -literal -offset indent depend: - env MKDEP_CPP="gcc -E" MKDEP_CPP_OPTS=-MM mkdep \\ + env MKDEP_CPP="cc -E" MKDEP_CPP_OPTS=-MM mkdep \\ ${CFLAGS} ${SRCS} .Ed .Pp @@ -101,6 +103,8 @@ module. Specifies the C compiler to use. The specified compiler is expected to have options consistent with the GNU C compiler. +The default is +.Sy cc . .It Ev MKDEP_CPP Specifies the preprocessor to use. The default is "${CC} -E". From owner-svn-src-all@freebsd.org Sat Oct 24 09:34: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 B12F6A1CC9B; Sat, 24 Oct 2015 09:34: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 78656161D; Sat, 24 Oct 2015 09:34: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 t9O9YfpP061225; Sat, 24 Oct 2015 09:34:41 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9O9YfKY061220; Sat, 24 Oct 2015 09:34:41 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201510240934.t9O9YfKY061220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 24 Oct 2015 09:34:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289873 - head/usr.bin/systat X-SVN-Group: head MIME-Version: 1.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, 24 Oct 2015 09:34:42 -0000 Author: tuexen Date: Sat Oct 24 09:34:40 2015 New Revision: 289873 URL: https://svnweb.freebsd.org/changeset/base/289873 Log: Add support to systat to display SCTP statistics. MFC after: 1 week Added: head/usr.bin/systat/sctp.c (contents, props changed) Modified: head/usr.bin/systat/Makefile head/usr.bin/systat/cmdtab.c head/usr.bin/systat/extern.h head/usr.bin/systat/systat.1 Modified: head/usr.bin/systat/Makefile ============================================================================== --- head/usr.bin/systat/Makefile Sat Oct 24 05:16:30 2015 (r289872) +++ head/usr.bin/systat/Makefile Sat Oct 24 09:34:40 2015 (r289873) @@ -6,7 +6,7 @@ PROG= systat SRCS= cmds.c cmdtab.c devs.c fetch.c iostat.c keyboard.c main.c \ netcmds.c netstat.c pigs.c swap.c icmp.c \ - mode.c ip.c tcp.c zarc.c \ + mode.c ip.c sctp.c tcp.c zarc.c \ vmstat.c convtbl.c ifcmds.c ifstat.c .if ${MK_INET6_SUPPORT} != "no" Modified: head/usr.bin/systat/cmdtab.c ============================================================================== --- head/usr.bin/systat/cmdtab.c Sat Oct 24 05:16:30 2015 (r289872) +++ head/usr.bin/systat/cmdtab.c Sat Oct 24 09:34:40 2015 (r289873) @@ -69,6 +69,9 @@ struct cmdtab cmdtab[] = { initip6, openip6, closeip6, cmdmode, resetip6, CF_LOADAV }, #endif + { "sctp", showsctp, fetchsctp, labelsctp, + initsctp, opensctp, closesctp, cmdmode, + resetsctp, CF_LOADAV }, { "tcp", showtcp, fetchtcp, labeltcp, inittcp, opentcp, closetcp, cmdmode, resettcp, CF_LOADAV }, Modified: head/usr.bin/systat/extern.h ============================================================================== --- head/usr.bin/systat/extern.h Sat Oct 24 05:16:30 2015 (r289872) +++ head/usr.bin/systat/extern.h Sat Oct 24 09:34:40 2015 (r289873) @@ -174,3 +174,4 @@ char *sysctl_dynread(const char *, size_ void show ## name(void) SYSTAT_CMD( zarc ); +SYSTAT_CMD ( sctp ); Added: head/usr.bin/systat/sctp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/systat/sctp.c Sat Oct 24 09:34:40 2015 (r289873) @@ -0,0 +1,362 @@ +/*- + * Copyright (c) 2015 + * The Regents of the University of California. All rights reserved. + * Michael Tuexen. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include + +#include +#include + +#include "systat.h" +#include "extern.h" +#include "mode.h" + +static struct sctpstat curstat, initstat, oldstat; + +/*- +--0 1 2 3 4 5 6 7 +--0123456789012345678901234567890123456789012345678901234567890123456789012345 +00 SCTP Associations SCTP Packets +01999999999999 associations initiated 999999999999 packets sent +02999999999999 associations accepted 999999999999 packets received +03999999999999 associations established 999999999999 - out of the blue +04999999999999 associations restarted 999999999999 - bad vtag +05999999999999 associations terminated 999999999999 - bad crc32c +06999999999999 associations aborted +07 +08 SCTP Timers SCTP Chunks +09999999999999 init timeouts 999999999999 control chunks sent +10999999999999 cookie timeouts 999999999999 data chunks sent +11999999999999 data timeouts 999999999999 - ordered +12999999999999 delayed sack timeouts 999999999999 - unordered +13999999999999 shutdown timeouts 999999999999 control chunks received +14999999999999 shutdown-ack timeouts 999999999999 data chunks received +15999999999999 shutdown guard timeouts 999999999999 - ordered +16999999999999 heartbeat timeouts 999999999999 - unordered +17999999999999 path MTU timeouts +18999999999999 autoclose timeouts SCTP user messages +19999999999999 asconf timeouts 999999999999 fragmented +20999999999999 stream reset timeouts 999999999999 reassembled +--0123456789012345678901234567890123456789012345678901234567890123456789012345 +--0 1 2 3 4 5 6 7 +*/ + +WINDOW * +opensctp(void) +{ + return (subwin(stdscr, LINES-3-1, 0, MAINWIN_ROW, 0)); +} + +void +closesctp(WINDOW *w) +{ + if (w != NULL) { + wclear(w); + wrefresh(w); + delwin(w); + } +} + +void +labelsctp(void) +{ + wmove(wnd, 0, 0); wclrtoeol(wnd); +#define L(row, str) mvwprintw(wnd, row, 13, str) +#define R(row, str) mvwprintw(wnd, row, 51, str); + L(0, "SCTP Associations"); R(0, "SCTP Packets"); + L(1, "associations initiated"); R(1, "packets sent"); + L(2, "associations accepted"); R(2, "packets received"); + L(3, "associations established"); R(3, "- out of the blue"); + L(4, "associations restarted"); R(4, "- bad vtag"); + L(5, "associations terminated"); R(5, "- bad crc32c"); + L(6, "associations aborted"); + + L(8, "SCTP Timers"); R(8, "SCTP Chunks"); + L(9, "init timeouts"); R(9, "control chunks sent"); + L(10, "cookie timeouts"); R(10, "data chunks sent"); + L(11, "data timeouts"); R(11, "- ordered"); + L(12, "delayed sack timeouts"); R(12, "- unordered"); + L(13, "shutdown timeouts"); R(13, "control chunks received"); + L(14, "shutdown-ack timeouts"); R(14, "data chunks received"); + L(15, "shutdown guard timeouts"); R(15, "- ordered"); + L(16, "heartbeat timeouts"); R(16, "- unordered"); + L(17, "path MTU timeouts"); + L(18, "autoclose timeouts"); R(18, "SCTP User Messages"); + L(19, "asconf timeouts"); R(19, "fragmented"); + L(20, "stream reset timeouts"); R(20, "reassembled"); +#undef L +#undef R +} + +static void +domode(struct sctpstat *ret) +{ + const struct sctpstat *sub; + int divisor = 1; + + switch(currentmode) { + case display_RATE: + sub = &oldstat; + divisor = (delay > 1000000) ? delay / 1000000 : 1; + break; + case display_DELTA: + sub = &oldstat; + break; + case display_SINCE: + sub = &initstat; + break; + default: + *ret = curstat; + return; + } +#define DO(stat) ret->stat = (curstat.stat - sub->stat) / divisor + DO(sctps_currestab); + DO(sctps_activeestab); + DO(sctps_restartestab); + DO(sctps_collisionestab); + DO(sctps_passiveestab); + DO(sctps_aborted); + DO(sctps_shutdown); + DO(sctps_outoftheblue); + DO(sctps_checksumerrors); + DO(sctps_outcontrolchunks); + DO(sctps_outorderchunks); + DO(sctps_outunorderchunks); + DO(sctps_incontrolchunks); + DO(sctps_inorderchunks); + DO(sctps_inunorderchunks); + DO(sctps_fragusrmsgs); + DO(sctps_reasmusrmsgs); + DO(sctps_outpackets); + DO(sctps_inpackets); + + DO(sctps_recvpackets); + DO(sctps_recvdatagrams); + DO(sctps_recvpktwithdata); + DO(sctps_recvsacks); + DO(sctps_recvdata); + DO(sctps_recvdupdata); + DO(sctps_recvheartbeat); + DO(sctps_recvheartbeatack); + DO(sctps_recvecne); + DO(sctps_recvauth); + DO(sctps_recvauthmissing); + DO(sctps_recvivalhmacid); + DO(sctps_recvivalkeyid); + DO(sctps_recvauthfailed); + DO(sctps_recvexpress); + DO(sctps_recvexpressm); + DO(sctps_recvnocrc); + DO(sctps_recvswcrc); + DO(sctps_recvhwcrc); + + DO(sctps_sendpackets); + DO(sctps_sendsacks); + DO(sctps_senddata); + DO(sctps_sendretransdata); + DO(sctps_sendfastretrans); + DO(sctps_sendmultfastretrans); + DO(sctps_sendheartbeat); + DO(sctps_sendecne); + DO(sctps_sendauth); + DO(sctps_senderrors); + DO(sctps_sendnocrc); + DO(sctps_sendswcrc); + DO(sctps_sendhwcrc); + + DO(sctps_pdrpfmbox); + DO(sctps_pdrpfehos); + DO(sctps_pdrpmbda); + DO(sctps_pdrpmbct); + DO(sctps_pdrpbwrpt); + DO(sctps_pdrpcrupt); + DO(sctps_pdrpnedat); + DO(sctps_pdrppdbrk); + DO(sctps_pdrptsnnf); + DO(sctps_pdrpdnfnd); + DO(sctps_pdrpdiwnp); + DO(sctps_pdrpdizrw); + DO(sctps_pdrpbadd); + DO(sctps_pdrpmark); + + DO(sctps_timoiterator); + DO(sctps_timodata); + DO(sctps_timowindowprobe); + DO(sctps_timoinit); + DO(sctps_timosack); + DO(sctps_timoshutdown); + DO(sctps_timoheartbeat); + DO(sctps_timocookie); + DO(sctps_timosecret); + DO(sctps_timopathmtu); + DO(sctps_timoshutdownack); + DO(sctps_timoshutdownguard); + DO(sctps_timostrmrst); + DO(sctps_timoearlyfr); + DO(sctps_timoasconf); + DO(sctps_timodelprim); + DO(sctps_timoautoclose); + DO(sctps_timoassockill); + DO(sctps_timoinpkill); + + DO(sctps_hdrops); + DO(sctps_badsum); + DO(sctps_noport); + DO(sctps_badvtag); + DO(sctps_badsid); + DO(sctps_nomem); + DO(sctps_fastretransinrtt); + DO(sctps_markedretrans); + DO(sctps_naglesent); + DO(sctps_naglequeued); + DO(sctps_maxburstqueued); + DO(sctps_ifnomemqueued); + DO(sctps_windowprobed); + DO(sctps_lowlevelerr); + DO(sctps_lowlevelerrusr); + DO(sctps_datadropchklmt); + DO(sctps_datadroprwnd); + DO(sctps_ecnereducedcwnd); + DO(sctps_vtagexpress); + DO(sctps_vtagbogus); + DO(sctps_primary_randry); + DO(sctps_cmt_randry); + DO(sctps_slowpath_sack); + DO(sctps_wu_sacks_sent); + DO(sctps_sends_with_flags); + DO(sctps_sends_with_unord); + DO(sctps_sends_with_eof); + DO(sctps_sends_with_abort); + DO(sctps_protocol_drain_calls); + DO(sctps_protocol_drains_done); + DO(sctps_read_peeks); + DO(sctps_cached_chk); + DO(sctps_cached_strmoq); + DO(sctps_left_abandon); + DO(sctps_send_burst_avoid); + DO(sctps_send_cwnd_avoid); + DO(sctps_fwdtsn_map_over); + DO(sctps_queue_upd_ecne); +#undef DO +} + +void +showsctp(void) +{ + struct sctpstat stats; + + memset(&stats, 0, sizeof stats); + domode(&stats); + +#define DO(stat, row, col) \ + mvwprintw(wnd, row, col, "%12lu", stats.stat) +#define L(row, stat) DO(stat, row, 0) +#define R(row, stat) DO(stat, row, 38) + L(1, sctps_activeestab); R(1, sctps_outpackets); + L(2, sctps_passiveestab); R(2, sctps_inpackets); + L(3, sctps_currestab); R(3, sctps_outoftheblue); + L(4, sctps_restartestab); R(4, sctps_badvtag); + L(5, sctps_shutdown); R(5, sctps_checksumerrors); + L(6, sctps_aborted); + + + L(9, sctps_timoinit); R(9, sctps_outcontrolchunks); + L(10, sctps_timocookie); R(10, sctps_senddata); + L(11, sctps_timodata); R(11, sctps_outorderchunks); + L(12, sctps_timosack); R(12, sctps_outunorderchunks); + L(13, sctps_timoshutdown); R(13, sctps_incontrolchunks); + L(14, sctps_timoshutdownack); R(14, sctps_recvdata); + L(15, sctps_timoshutdownguard); R(15, sctps_inorderchunks); + L(16, sctps_timoheartbeat); R(16, sctps_inunorderchunks); + L(17, sctps_timopathmtu); + L(18, sctps_timoautoclose); + L(19, sctps_timoasconf); R(19, sctps_fragusrmsgs); + L(20, sctps_timostrmrst); R(20, sctps_reasmusrmsgs); +#undef DO +#undef L +#undef R +} + +int +initsctp(void) +{ + size_t len; + const char *name = "net.inet.sctp.stats"; + + len = 0; + if (sysctlbyname(name, NULL, &len, NULL, 0) < 0) { + error("sysctl getting sctpstat size failed"); + return 0; + } + if (len > sizeof curstat) { + error("sctpstat structure has grown--recompile systat!"); + return 0; + } + if (sysctlbyname(name, &initstat, &len, NULL, 0) < 0) { + error("sysctl getting sctpstat failed"); + return 0; + } + oldstat = initstat; + return 1; +} + +void +resetsctp(void) +{ + size_t len; + const char *name = "net.inet.sctp.stats"; + + len = sizeof initstat; + if (sysctlbyname(name, &initstat, &len, NULL, 0) < 0) { + error("sysctl getting sctpstat failed"); + } + oldstat = initstat; +} + +void +fetchsctp(void) +{ + size_t len; + const char *name = "net.inet.sctp.stats"; + + oldstat = curstat; + len = sizeof curstat; + if (sysctlbyname(name, &curstat, &len, NULL, 0) < 0) { + error("sysctl getting sctpstat failed"); + } + return; +} Modified: head/usr.bin/systat/systat.1 ============================================================================== --- head/usr.bin/systat/systat.1 Sat Oct 24 05:16:30 2015 (r289872) +++ head/usr.bin/systat/systat.1 Sat Oct 24 09:34:40 2015 (r289873) @@ -96,6 +96,7 @@ to be one of: .Ic ip6 , .Ic netstat , .Ic pigs , +.Ic sctp , .Ic swap , .Ic tcp , .Ic vmstat , @@ -242,6 +243,12 @@ except that it displays statistics. It does not display .Tn UDP statistics. +.It Ic sctp +Like +.Ic icmp , +but with +.Tn SCTP +statistics. .It Ic tcp Like .Ic icmp , From owner-svn-src-all@freebsd.org Sat Oct 24 09:41: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 327FEA1CEF6; Sat, 24 Oct 2015 09:41:45 +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 F11E11A74; Sat, 24 Oct 2015 09:41:44 +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 t9O9fi6b064004; Sat, 24 Oct 2015 09:41:44 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9O9fiPi064003; Sat, 24 Oct 2015 09:41:44 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201510240941.t9O9fiPi064003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 24 Oct 2015 09:41:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289874 - head/usr.bin/systat X-SVN-Group: head MIME-Version: 1.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, 24 Oct 2015 09:41:45 -0000 Author: tuexen Date: Sat Oct 24 09:41:43 2015 New Revision: 289874 URL: https://svnweb.freebsd.org/changeset/base/289874 Log: Bump date. Missed in r289873. MFC after: 1 week X-MFC with: r289873 Modified: head/usr.bin/systat/systat.1 Modified: head/usr.bin/systat/systat.1 ============================================================================== --- head/usr.bin/systat/systat.1 Sat Oct 24 09:34:40 2015 (r289873) +++ head/usr.bin/systat/systat.1 Sat Oct 24 09:41:43 2015 (r289874) @@ -28,7 +28,7 @@ .\" @(#)systat.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd July 15, 2013 +.Dd October 24, 2015 .Dt SYSTAT 1 .Os .Sh NAME From owner-svn-src-all@freebsd.org Sat Oct 24 10:01: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 7A0A3A1B35C; Sat, 24 Oct 2015 10:01: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 2AFA2847; Sat, 24 Oct 2015 10:01: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 t9OA14oB068325; Sat, 24 Oct 2015 10:01:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9OA14BO068324; Sat, 24 Oct 2015 10:01:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510241001.t9OA14BO068324@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 24 Oct 2015 10:01:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289875 - 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: Sat, 24 Oct 2015 10:01:05 -0000 Author: mav Date: Sat Oct 24 10:01:04 2015 New Revision: 289875 URL: https://svnweb.freebsd.org/changeset/base/289875 Log: Decode few more response info codes. Though CAM still does not send any requests that would require those. Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sat Oct 24 09:41:43 2015 (r289874) +++ head/sys/dev/isp/isp.c Sat Oct 24 10:01:04 2015 (r289875) @@ -5443,24 +5443,32 @@ again: if (resp && rlen >= 4 && resp[FCP_RSPNS_CODE_OFFSET] != 0) { const char *ptr; char lb[64]; - const char *rnames[6] = { - "Task Management Function Done", - "Data Length Differs From Burst Length", - "Invalid FCP Cmnd", - "FCP DATA RO mismatch with FCP DATA_XFR_RDY RO", - "Task Management Function Rejected", - "Task Management Function Failed", + const char *rnames[10] = { + "Task Management function complete", + "FCP_DATA length different than FCP_BURST_LEN", + "FCP_CMND fields invalid", + "FCP_DATA parameter mismatch with FCP_DATA_RO", + "Task Management function rejected", + "Task Management function failed", + NULL, + NULL, + "Task Management function succeeded", + "Task Management function incorrect logical unit number", }; - if (resp[FCP_RSPNS_CODE_OFFSET] > 5) { - ISP_SNPRINTF(lb, sizeof lb, "Unknown FCP Response Code 0x%x", resp[FCP_RSPNS_CODE_OFFSET]); + uint8_t code = resp[FCP_RSPNS_CODE_OFFSET]; + if (code >= 10 || rnames[code] == NULL) { + ISP_SNPRINTF(lb, sizeof(lb), + "Unknown FCP Response Code 0x%x", + code); ptr = lb; } else { - ptr = rnames[resp[FCP_RSPNS_CODE_OFFSET]]; + ptr = rnames[code]; } - isp_xs_prt(isp, xs, ISP_LOGWARN, "FCP RESPONSE, LENGTH %u: %s CDB0=0x%02x", rlen, ptr, XS_CDBP(xs)[0] & 0xff); - if (resp[FCP_RSPNS_CODE_OFFSET] != 0) { + isp_xs_prt(isp, xs, ISP_LOGWARN, + "FCP RESPONSE, LENGTH %u: %s CDB0=0x%02x", + rlen, ptr, XS_CDBP(xs)[0] & 0xff); + if (code != 0 && code != 8) XS_SETERR(xs, HBA_BOTCH); - } } if (IS_24XX(isp)) { isp_parse_status_24xx(isp, (isp24xx_statusreq_t *)sp, xs, &resid); From owner-svn-src-all@freebsd.org Sat Oct 24 10: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 1649FA1B9E5; Sat, 24 Oct 2015 10:31:44 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C96E014D3; Sat, 24 Oct 2015 10:31:43 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 1C15425D3A02; Sat, 24 Oct 2015 10:31:30 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id E5361C7705F; Sat, 24 Oct 2015 10:31:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 59zyFJeXM6h2; Sat, 24 Oct 2015 10:31:28 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:e5ab:ebfb:e904:2055] (unknown [IPv6:fde9:577b:c1a9:4410:e5ab:ebfb:e904:2055]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 60D84C76FE9; Sat, 24 Oct 2015 10:31:26 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r289350 - head/sys/netinet From: "Bjoern A. Zeeb" In-Reply-To: <20151016123139.GX1023@FreeBSD.org> Date: Sat, 24 Oct 2015 10:31:07 +0000 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201510150144.t9F1iWdo089946@repo.freebsd.org> <20151016123139.GX1023@FreeBSD.org> To: Gleb Smirnoff 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: Sat, 24 Oct 2015 10:31:44 -0000 > On 16 Oct 2015, at 12:31 , Gleb Smirnoff wrote: >=20 > On Thu, Oct 15, 2015 at 01:44:32AM +0000, Bjoern A. Zeeb wrote: > B> Author: bz > B> Date: Thu Oct 15 01:44:32 2015 > B> New Revision: 289350 > B> URL: https://svnweb.freebsd.org/changeset/base/289350 > B>=20 > B> Log: > B> Hopefully also unbreak VIMAGE kernels replacing the &V_... with > B> &VNET_NAME(...). > B> Everything else is just a whitespace wrapping change. > B>=20 > B> Modified: > B> head/sys/netinet/tcp_pcap.c > B>=20 > B> Modified: head/sys/netinet/tcp_pcap.c > B> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > B> --- head/sys/netinet/tcp_pcap.c Thu Oct 15 01:09:14 2015 = (r289349) > B> +++ head/sys/netinet/tcp_pcap.c Thu Oct 15 01:44:32 2015 = (r289350) > B> @@ -70,9 +70,9 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcp_ > B> =20 > B> VNET_DEFINE(int, tcp_pcap_packets) =3D 0; > B> #define V_tcp_pcap_packets VNET(tcp_pcap_packets) > B> -SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcp_pcap_packets, CTLFLAG_RW, > B> - &V_tcp_pcap_packets, 0, "Default number of packets saved per = direction " > B> - "per TCPCB"); > B> +SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcp_pcap_packets, > B> + CTLFLAG_RW, &VNET_NAME(tcp_pcap_packets), 0, > B> + "Default number of packets saved per direction per TCPCB"); >=20 > It also lacks CTLFLAG_VNET flag. Will panic on write now. Yeah, I had followed up on that in PB (not checked what happened since = yet). The real question is whether this should be allowed to be changed from = within a VNET as that opens the machine up to a local DoS if you ask me. The above was just to make it compile again and make GENERIC work. Bjoern= From owner-svn-src-all@freebsd.org Sat Oct 24 13:43: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 7582CA1D595; Sat, 24 Oct 2015 13:43:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5104B1C98; Sat, 24 Oct 2015 13:43:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9ODhAe2036642; Sat, 24 Oct 2015 13:43:10 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ODhAMQ036641; Sat, 24 Oct 2015 13:43:10 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510241343.t9ODhAMQ036641@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 24 Oct 2015 13:43:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289876 - head/usr.bin/sort X-SVN-Group: head MIME-Version: 1.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, 24 Oct 2015 13:43:11 -0000 Author: bapt Date: Sat Oct 24 13:43:10 2015 New Revision: 289876 URL: https://svnweb.freebsd.org/changeset/base/289876 Log: Fix some mdoc(7) issues Obtained from: DragonflyBSD Modified: head/usr.bin/sort/sort.1.in Modified: head/usr.bin/sort/sort.1.in ============================================================================== --- head/usr.bin/sort/sort.1.in Sat Oct 24 10:01:04 2015 (r289875) +++ head/usr.bin/sort/sort.1.in Sat Oct 24 13:43:10 2015 (r289876) @@ -33,14 +33,14 @@ .\" .\" @(#)sort.1 8.1 (Berkeley) 6/6/93 .\" -.Dd March 19 2015 +.Dd March 19, 2015 .Dt SORT 1 .Os .Sh NAME .Nm sort .Nd sort or merge records (lines) of text and binary files .Sh SYNOPSIS -.Nm sort +.Nm .Bk -words .Op Fl bcCdfghiRMmnrsuVz .Sm off @@ -52,9 +52,9 @@ .Op Fl t Ar char .Op Fl o Ar output .Op Ar file ... -.Nm sort +.Nm .Fl Fl help -.Nm sort +.Nm .Fl Fl version .Sh DESCRIPTION The @@ -74,7 +74,7 @@ uses entire lines for comparison. .Pp The command line options are as follows: .Bl -tag -width Ds -.It Fl c, Fl Fl check, Fl C, Fl Fl check=silent|quiet +.It Fl c , Fl Fl check , Fl C , Fl Fl check=silent|quiet Check that the single input file is sorted. If the file is not sorted, .Nm @@ -88,7 +88,7 @@ is specified, .Nm produces no output. This is a "silent" version of -.Fl c. +.Fl c . .It Fl m , Fl Fl merge Merge only. The input files are assumed to be pre-sorted. @@ -97,7 +97,7 @@ If they are not sorted the output order Print the output to the .Ar output file instead of the standard output. -.It Fl S Ar size, Fl Fl buffer-size Ns = Ns Ar size +.It Fl S Ar size , Fl Fl buffer-size Ns = Ns Ar size Use .Ar size for the maximum size of the memory buffer. @@ -149,14 +149,14 @@ When attached to a specific key (see the ordering options override all global ordering options for the key they are attached to. .Bl -tag -width indent -.It Fl b, Fl Fl ignore-leading-blanks +.It Fl b , Fl Fl ignore-leading-blanks Ignore leading blank characters when comparing lines. .It Fl d , Fl Fl dictionary-order Consider only blank spaces and alphanumeric characters in comparisons. .It Fl f , Fl Fl ignore-case Convert all lowercase characters to their uppercase equivalent before comparison, that is, perform case-independent sorting. -.It Fl g, Fl Fl general-numeric-sort, Fl Fl sort=general-numeric +.It Fl g , Fl Fl general-numeric-sort , Fl Fl sort=general-numeric Sort by general numerical value. As opposed to .Fl n , @@ -165,7 +165,7 @@ It has a more permissive format than that allowed by .Fl n but it has a significant performance drawback. -.It Fl h, Fl Fl human-numeric-sort, Fl Fl sort=human-numeric +.It Fl h , Fl Fl human-numeric-sort , Fl Fl sort=human-numeric Sort by numerical value, but take into account the SI suffix, if present. Sort first by numeric sign (negative, zero, or @@ -181,15 +181,15 @@ or options (human-readable). .It Fl i , Fl Fl ignore-nonprinting Ignore all non-printable characters. -.It Fl M, Fl Fl month-sort, Fl Fl sort=month +.It Fl M , Fl Fl month-sort , Fl Fl sort=month Sort by month abbreviations. Unknown strings are considered smaller than the month names. -.It Fl n , Fl Fl numeric-sort, Fl Fl sort=numeric +.It Fl n , Fl Fl numeric-sort , Fl Fl sort=numeric Sort fields numerically by arithmetic value. Fields are supposed to have optional blanks in the beginning, an optional minus sign, zero or more digits (including decimal point and possible thousand separators). -.It Fl R, Fl Fl random-sort, Fl Fl sort=random +.It Fl R , Fl Fl random-sort , Fl Fl sort=random Sort by a random order. This is a random permutation of the inputs except that the equal keys sort together. @@ -204,7 +204,7 @@ Even if multiple sort fields are specifi the same random hash function is used for all of them. .It Fl r , Fl Fl reverse Sort in reverse order. -.It Fl V, Fl Fl version-sort +.It Fl V , Fl Fl version-sort Sort version numbers. The input lines are treated as file names in form PREFIX VERSION SUFFIX, where SUFFIX matches the regular expression @@ -234,8 +234,7 @@ The treatment of field separators can be .It Fl b , Fl Fl ignore-leading-blanks Ignore leading blank space when determining the start and end of a restricted sort key (see -.Fl k -). +.Fl k ) . If .Fl b is specified before the first @@ -623,7 +622,7 @@ The performance depends highly on locale efficient choice of sort keys and key complexity. The fastest sort is with locale C, on whole lines, with option -.Fl s. +.Fl s . In general, locale C is the fastest, then single-byte locales follow and multi-byte locales as the slowest but the correct collation order is always respected. From owner-svn-src-all@freebsd.org Sat Oct 24 13:45: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 82C39A1D637; Sat, 24 Oct 2015 13:45:46 +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 466A31E08; Sat, 24 Oct 2015 13:45:46 +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 t9ODjjcf036892; Sat, 24 Oct 2015 13:45:45 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ODjjHF036889; Sat, 24 Oct 2015 13:45:45 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510241345.t9ODjjHF036889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 24 Oct 2015 13:45:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289877 - 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: Sat, 24 Oct 2015 13:45:46 -0000 Author: mav Date: Sat Oct 24 13:45:45 2015 New Revision: 289877 URL: https://svnweb.freebsd.org/changeset/base/289877 Log: Remove ISP_INTERNAL_TARGET code. We have CTL now, which is real and much more functional then this joke. Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sat Oct 24 13:43:10 2015 (r289876) +++ head/sys/dev/isp/isp_freebsd.c Sat Oct 24 13:45:45 2015 (r289877) @@ -68,10 +68,6 @@ 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 *); -#ifdef ISP_INTERNAL_TARGET -static void isp_target_thread_pi(void *); -static void isp_target_thread_fc(void *); -#endif static int isp_timer_count; static void isp_timer(void *); @@ -159,14 +155,6 @@ isp_attach_chan(ispsoftc_t *isp, struct struct isp_spi *spi = ISP_SPI_PC(isp, chan); spi->sim = sim; spi->path = path; -#ifdef ISP_INTERNAL_TARGET - ISP_SET_PC(isp, chan, proc_active, 1); - if (THREAD_CREATE(isp_target_thread_pi, spi, &spi->target_proc, 0, 0, "%s: isp_test_tgt%d", device_get_nameunit(isp->isp_osinfo.dev), chan)) { - ISP_SET_PC(isp, chan, proc_active, 0); - isp_prt(isp, ISP_LOGERR, "cannot create test target thread"); - } - ISP_SPI_PC(isp, chan)->num_threads += 1; -#endif } else { fcparam *fcp = FCPARAM(isp, chan); struct isp_fc *fc = ISP_FC_PC(isp, chan); @@ -205,14 +193,6 @@ isp_attach_chan(ispsoftc_t *isp, struct return (ENOMEM); } fc->num_threads += 1; -#ifdef ISP_INTERNAL_TARGET - ISP_SET_PC(isp, chan, proc_active, 1); - if (THREAD_CREATE(isp_target_thread_fc, fc, &fc->target_proc, 0, 0, "%s: isp_test_tgt%d", device_get_nameunit(isp->isp_osinfo.dev), chan)) { - ISP_SET_PC(isp, chan, proc_active, 0); - isp_prt(isp, ISP_LOGERR, "cannot create test target thread"); - } - fc->num_threads += 1; -#endif if (chan > 0) { snprintf(name, sizeof(name), "chan%d", chan); tree = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(tree), @@ -258,18 +238,6 @@ isp_attach_chan(ispsoftc_t *isp, struct } static void -isp_detach_internal_target(ispsoftc_t *isp, int chan) -{ -#ifdef ISP_INTERNAL_TARGET - void *wchan; - - ISP_GET_PC(isp, chan, target_proc, wchan); - ISP_SET_PC(isp, chan, proc_active, 0); - wakeup(wchan); -#endif -} - -static void isp_detach_chan(ispsoftc_t *isp, int chan) { struct cam_sim *sim; @@ -293,7 +261,6 @@ isp_detach_chan(ispsoftc_t *isp, int cha /* Wait for the channel's spawned threads to exit. */ wakeup(isp->isp_osinfo.pc.ptr); - isp_detach_internal_target(isp, chan); while (*num_threads != 0) mtx_sleep(isp, &isp->isp_osinfo.lock, PRIBIO, "isp_reap", 100); } @@ -3598,859 +3565,6 @@ isp_target_mark_aborted_early(ispsoftc_t } } } - - -#ifdef ISP_INTERNAL_TARGET -//#define ISP_SEPARATE_STATUS 1 -#define ISP_MULTI_CCBS 1 -#if defined(ISP_MULTI_CCBS) && !defined(ISP_SEPARATE_STATUS) -#define ISP_SEPARATE_STATUS 1 -#endif - -typedef struct periph_private_data_t { - union ccb *ccb; /* original ATIO or Immediate Notify */ - unsigned long offset; /* current offset */ - int sequence; /* current CTIO sequence */ - int ctio_cnt; /* current # of ctio's outstanding */ - int - status_sent : 1, - on_queue : 1; /* on restart queue */ -} ppd_t; -/* - * Each ATIO we allocate will have periph private data associated with it - * that maintains per-command state. This private to each ATIO. - */ -#define ATIO_PPD(ccb) ((ppd_t *)(((struct ccb_hdr *)ccb)->ppriv_ptr0)) -/* - * Each CTIO we send downstream will get a pointer to the ATIO itself - * so that on completion we can retrieve that pointer. - */ -#define ccb_atio ppriv_ptr1 -#define ccb_inot ppriv_ptr1 - -/* - * Each CTIO we send downstream will contain a sequence number - */ -#define CTIO_SEQ(ccb) ccb->ccb_h.ppriv_field0 - -#define MAX_ISP_TARG_TRANSFER (2 << 20) -#define NISP_TARG_CMDS 64 -#define NISP_TARG_NOTIFIES 64 -#define DISK_SHIFT 9 -#define JUNK_SIZE 256 -#define MULTI_CCB_DATA_LIM 8192 -//#define MULTI_CCB_DATA_CNT 64 -#define MULTI_CCB_DATA_CNT 8 - -extern u_int vm_kmem_size; -static int ca; -static uint32_t disk_size; -static uint8_t *disk_data = NULL; -static uint8_t *junk_data; -static MALLOC_DEFINE(M_ISPTARG, "ISPTARG", "ISP TARGET data"); -struct isptarg_softc { - /* CCBs (CTIOs, ATIOs, INOTs) pending on the controller */ - struct isp_ccbq work_queue; - struct isp_ccbq rework_queue; - struct isp_ccbq running_queue; - struct isp_ccbq inot_queue; - struct cam_periph *periph; - struct cam_path *path; - ispsoftc_t *isp; -}; -static periph_ctor_t isptargctor; -static periph_dtor_t isptargdtor; -static periph_start_t isptargstart; -static periph_init_t isptarginit; -static void isptarg_done(struct cam_periph *, union ccb *); -static void isptargasync(void *, u_int32_t, struct cam_path *, void *); - - -static int isptarg_rwparm(uint8_t *, uint8_t *, uint64_t, uint32_t, uint8_t **, uint32_t *, int *); - -static struct periph_driver isptargdriver = -{ - isptarginit, "isptarg", TAILQ_HEAD_INITIALIZER(isptargdriver.units), 0 -}; - -static void -isptarginit(void) -{ -} - -static void -isptargnotify(ispsoftc_t *isp, union ccb *iccb, struct ccb_immediate_notify *inot) -{ - struct ccb_notify_acknowledge *ack = &iccb->cna2; - - ISP_PATH_PRT(isp, ISP_LOGTDEBUG0, inot->ccb_h.path, "%s: [0x%x] immediate notify for 0x%x from 0x%x status 0x%x arg 0x%x\n", __func__, - inot->tag_id, inot->initiator_id, inot->seq_id, inot->ccb_h.status, inot->arg); - ack->ccb_h.func_code = XPT_NOTIFY_ACKNOWLEDGE; - ack->ccb_h.flags = 0; - ack->ccb_h.retry_count = 0; - ack->ccb_h.cbfcnp = isptarg_done; - ack->ccb_h.timeout = 0; - ack->ccb_h.ccb_inot = inot; - ack->tag_id = inot->tag_id; - ack->seq_id = inot->seq_id; - ack->initiator_id = inot->initiator_id; - xpt_action(iccb); -} - -static void -isptargstart(struct cam_periph *periph, union ccb *iccb) -{ - const uint8_t niliqd[SHORT_INQUIRY_LENGTH] = { - 0x7f, 0x0, 0x5, 0x2, 32, 0, 0, 0x32, - 'F', 'R', 'E', 'E', 'B', 'S', 'D', ' ', - 'S', 'C', 'S', 'I', ' ', 'N', 'U', 'L', - 'L', ' ', 'D', 'E', 'V', 'I', 'C', 'E', - '0', '0', '0', '1' - }; - const uint8_t iqd[SHORT_INQUIRY_LENGTH] = { - 0, 0x0, 0x5, 0x2, 32, 0, 0, 0x32, - 'F', 'R', 'E', 'E', 'B', 'S', 'D', ' ', - 'S', 'C', 'S', 'I', ' ', 'M', 'E', 'M', - 'O', 'R', 'Y', ' ', 'D', 'I', 'S', 'K', - '0', '0', '0', '1' - }; - int r, i, more = 0, last, is_data_cmd = 0, is_write; - char *queue; - struct isptarg_softc *softc = periph->softc; - struct ccb_scsiio *csio; - lun_id_t return_lun; - struct ccb_accept_tio *atio; - uint8_t *cdb, *ptr, status; - uint8_t *data_ptr; - uint32_t data_len, flags; - struct ccb_hdr *ccbh; - - mtx_assert(periph->sim->mtx, MA_OWNED); - ISP_PATH_PRT(softc->isp, ISP_LOGTDEBUG1, iccb->ccb_h.path, "%s: function code 0x%x INOTQ=%c WORKQ=%c REWORKQ=%c\n", __func__, iccb->ccb_h.func_code, - TAILQ_FIRST(&softc->inot_queue)? 'y' : 'n', TAILQ_FIRST(&softc->work_queue)? 'y' : 'n', TAILQ_FIRST(&softc->rework_queue)? 'y' : 'n'); - /* - * Check for immediate notifies first - */ - ccbh = TAILQ_FIRST(&softc->inot_queue); - if (ccbh) { - TAILQ_REMOVE(&softc->inot_queue, ccbh, periph_links.tqe); - if (TAILQ_FIRST(&softc->inot_queue) || TAILQ_FIRST(&softc->work_queue) || TAILQ_FIRST(&softc->rework_queue)) { - xpt_schedule(periph, 1); - } - isptargnotify(softc->isp, iccb, (struct ccb_immediate_notify *)ccbh); - return; - } - - /* - * Check the rework (continuation) work queue first. - */ - ccbh = TAILQ_FIRST(&softc->rework_queue); - if (ccbh) { - atio = (struct ccb_accept_tio *)ccbh; - TAILQ_REMOVE(&softc->rework_queue, ccbh, periph_links.tqe); - more = TAILQ_FIRST(&softc->work_queue) || TAILQ_FIRST(&softc->rework_queue); - queue = "rework"; - } else { - ccbh = TAILQ_FIRST(&softc->work_queue); - if (ccbh == NULL) { - xpt_release_ccb(iccb); - return; - } - atio = (struct ccb_accept_tio *)ccbh; - TAILQ_REMOVE(&softc->work_queue, ccbh, periph_links.tqe); - more = TAILQ_FIRST(&softc->work_queue) != NULL; - queue = "work"; - } - ATIO_PPD(atio)->on_queue = 0; - - if (atio->tag_id == 0xffffffff || atio->ccb_h.func_code != XPT_ACCEPT_TARGET_IO) { - panic("BAD ATIO"); - } - - data_len = is_write = 0; - data_ptr = NULL; - csio = &iccb->csio; - status = SCSI_STATUS_OK; - flags = CAM_SEND_STATUS; - memset(&atio->sense_data, 0, sizeof (atio->sense_data)); - cdb = atio->cdb_io.cdb_bytes; - ISP_PATH_PRT(softc->isp, ISP_LOGTDEBUG0, ccbh->path, "%s: [0x%x] processing ATIO from %s queue initiator 0x%x CDB=0x%x data_offset=%u\n", __func__, atio->tag_id, - queue, atio->init_id, cdb[0], ATIO_PPD(atio)->offset); - - return_lun = XS_LUN(atio); - if (return_lun != 0) { - xpt_print(atio->ccb_h.path, "[0x%x] Non-Zero Lun %d: cdb0=0x%x\n", atio->tag_id, return_lun, cdb[0]); - if (cdb[0] != INQUIRY && cdb[0] != REPORT_LUNS && cdb[0] != REQUEST_SENSE) { - status = SCSI_STATUS_CHECK_COND; - SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR; - SDFIXED(atio->sense_data)->flags = SSD_KEY_ILLEGAL_REQUEST; - SDFIXED(atio->sense_data)->add_sense_code = 0x25; /* LOGICAL UNIT NOT SUPPORTED */ - atio->sense_len = SSD_MIN_SIZE; - } - return_lun = CAM_LUN_WILDCARD; - } - - switch (cdb[0]) { - case REQUEST_SENSE: - flags |= CAM_DIR_IN; - data_len = sizeof (atio->sense_data); - junk_data[0] = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_NO_SENSE; - memset(junk_data+1, 0, data_len-1); - if (data_len > cdb[4]) { - data_len = cdb[4]; - } - if (data_len) { - data_ptr = junk_data; - } - break; - case WRITE_6: - case WRITE_10: - case WRITE_12: - case WRITE_16: - is_write = 1; - /* FALLTHROUGH */ - case READ_6: - case READ_10: - case READ_12: - case READ_16: - is_data_cmd = 1; - r = isptarg_rwparm(cdb, disk_data, disk_size, ATIO_PPD(atio)->offset, &data_ptr, &data_len, &last); - if (r != 0) { - status = SCSI_STATUS_CHECK_COND; - SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR; - SDFIXED(atio->sense_data)->flags = SSD_KEY_ILLEGAL_REQUEST; - if (r == -1) { - SDFIXED(atio->sense_data)->add_sense_code = 0x21; /* LOGICAL BLOCK ADDRESS OUT OF RANGE */ - } else { - SDFIXED(atio->sense_data)->add_sense_code = 0x20; /* INVALID COMMAND OPERATION CODE */ - } - atio->sense_len = SSD_MIN_SIZE; - } else { -#ifdef ISP_SEPARATE_STATUS - if (last && data_len) { - last = 0; - } -#endif - if (last == 0) { - flags &= ~CAM_SEND_STATUS; - } - if (data_len) { - ATIO_PPD(atio)->offset += data_len; - if (is_write) - flags |= CAM_DIR_OUT; - else - flags |= CAM_DIR_IN; - } else { - flags |= CAM_DIR_NONE; - } - } - break; - case INQUIRY: - flags |= CAM_DIR_IN; - if (cdb[1] || cdb[2] || cdb[3]) { - status = SCSI_STATUS_CHECK_COND; - SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR; - SDFIXED(atio->sense_data)->flags = SSD_KEY_UNIT_ATTENTION; - SDFIXED(atio->sense_data)->add_sense_code = 0x24; /* INVALID FIELD IN CDB */ - atio->sense_len = SSD_MIN_SIZE; - break; - } - data_len = sizeof (iqd); - if (data_len > cdb[4]) { - data_len = cdb[4]; - } - if (data_len) { - if (XS_LUN(iccb) != 0) { - memcpy(junk_data, niliqd, sizeof (iqd)); - } else { - memcpy(junk_data, iqd, sizeof (iqd)); - } - data_ptr = junk_data; - } - break; - case TEST_UNIT_READY: - flags |= CAM_DIR_NONE; - if (ca) { - ca = 0; - status = SCSI_STATUS_CHECK_COND; - SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR; - SDFIXED(atio->sense_data)->flags = SSD_KEY_UNIT_ATTENTION; - SDFIXED(atio->sense_data)->add_sense_code = 0x29; /* POWER ON, RESET, OR BUS DEVICE RESET OCCURRED */ - atio->sense_len = SSD_MIN_SIZE; - } - break; - case SYNCHRONIZE_CACHE: - case START_STOP: - case RESERVE: - case RELEASE: - case VERIFY_10: - flags |= CAM_DIR_NONE; - break; - - case READ_CAPACITY: - flags |= CAM_DIR_IN; - if (cdb[2] || cdb[3] || cdb[4] || cdb[5]) { - status = SCSI_STATUS_CHECK_COND; - SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR; - SDFIXED(atio->sense_data)->flags = SSD_KEY_ILLEGAL_REQUEST; - SDFIXED(atio->sense_data)->add_sense_code = 0x24; /* INVALID FIELD IN CDB */ - atio->sense_len = SSD_MIN_SIZE; - break; - } - if (cdb[8] & 0x1) { /* PMI */ - junk_data[0] = 0xff; - junk_data[1] = 0xff; - junk_data[2] = 0xff; - junk_data[3] = 0xff; - } else { - uint64_t last_blk = (disk_size >> DISK_SHIFT) - 1; - if (last_blk < 0xffffffffULL) { - junk_data[0] = (last_blk >> 24) & 0xff; - junk_data[1] = (last_blk >> 16) & 0xff; - junk_data[2] = (last_blk >> 8) & 0xff; - junk_data[3] = (last_blk) & 0xff; - } else { - junk_data[0] = 0xff; - junk_data[1] = 0xff; - junk_data[2] = 0xff; - junk_data[3] = 0xff; - } - } - junk_data[4] = ((1 << DISK_SHIFT) >> 24) & 0xff; - junk_data[5] = ((1 << DISK_SHIFT) >> 16) & 0xff; - junk_data[6] = ((1 << DISK_SHIFT) >> 8) & 0xff; - junk_data[7] = ((1 << DISK_SHIFT)) & 0xff; - data_ptr = junk_data; - data_len = 8; - break; - case REPORT_LUNS: - flags |= CAM_DIR_IN; - memset(junk_data, 0, JUNK_SIZE); - junk_data[0] = (1 << 3) >> 24; - junk_data[1] = (1 << 3) >> 16; - junk_data[2] = (1 << 3) >> 8; - junk_data[3] = (1 << 3); - ptr = NULL; - for (i = 0; i < 1; i++) { - ptr = &junk_data[8 + (i << 3)]; - if (i >= 256) { - ptr[0] = 0x40 | ((i >> 8) & 0x3f); - } - ptr[1] = i; - } - data_ptr = junk_data; - data_len = (ptr + 8) - junk_data; - break; - - default: - flags |= CAM_DIR_NONE; - status = SCSI_STATUS_CHECK_COND; - SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR; - SDFIXED(atio->sense_data)->flags = SSD_KEY_ILLEGAL_REQUEST; - SDFIXED(atio->sense_data)->add_sense_code = 0x20; /* INVALID COMMAND OPERATION CODE */ - atio->sense_len = SSD_MIN_SIZE; - break; - } - - /* - * If we are done with the transaction, tell the - * controller to send status and perform a CMD_CMPLT. - * If we have associated sense data, see if we can - * send that too. - */ - if (status == SCSI_STATUS_CHECK_COND) { - flags |= CAM_SEND_SENSE; - csio->sense_len = atio->sense_len; - csio->sense_data = atio->sense_data; - flags &= ~CAM_DIR_MASK; - data_len = 0; - data_ptr = NULL; - } - cam_fill_ctio(csio, 0, isptarg_done, flags, MSG_SIMPLE_Q_TAG, atio->tag_id, atio->init_id, status, data_ptr, data_len, 30 * hz); - iccb->ccb_h.target_id = atio->ccb_h.target_id; - iccb->ccb_h.target_lun = return_lun; - iccb->ccb_h.ccb_atio = atio; - CTIO_SEQ(iccb) = ATIO_PPD(atio)->sequence++; - ATIO_PPD(atio)->ctio_cnt++; - if (flags & CAM_SEND_STATUS) { - KASSERT((ATIO_PPD(atio)->status_sent == 0), ("we have already sent status for 0x%x in %s", atio->tag_id, __func__)); - ATIO_PPD(atio)->status_sent = 1; - } - ISP_PATH_PRT(softc->isp, ISP_LOGTDEBUG0, atio->ccb_h.path, "%s: sending downstream for 0x%x sequence %u len %u flags %x\n", __func__, atio->tag_id, CTIO_SEQ(iccb), data_len, flags); - xpt_action(iccb); - - if ((atio->ccb_h.status & CAM_DEV_QFRZN) != 0) { - cam_release_devq(periph->path, 0, 0, 0, 0); - atio->ccb_h.status &= ~CAM_DEV_QFRZN; - } -#ifdef ISP_MULTI_CCBS - if (is_data_cmd && ATIO_PPD(atio)->status_sent == 0 && ATIO_PPD(atio)->ctio_cnt < MULTI_CCB_DATA_CNT && ATIO_PPD(atio)->on_queue == 0) { - ISP_PATH_PRT(softc->isp, ISP_LOGTDEBUG0, atio->ccb_h.path, "%s: more still to do for 0x%x\n", __func__, atio->tag_id); - TAILQ_INSERT_TAIL(&softc->rework_queue, &atio->ccb_h, periph_links.tqe); - ATIO_PPD(atio)->on_queue = 1; - more = 1; - } -#endif - if (more) { - xpt_schedule(periph, 1); - } -} - -static cam_status -isptargctor(struct cam_periph *periph, void *arg) -{ - struct isptarg_softc *softc; - - softc = (struct isptarg_softc *)arg; - periph->softc = softc; - softc->periph = periph; - softc->path = periph->path; - ISP_PATH_PRT(softc->isp, ISP_LOGTDEBUG1, periph->path, "%s called\n", __func__); - return (CAM_REQ_CMP); -} - -static void -isptargdtor(struct cam_periph *periph) -{ - struct isptarg_softc *softc; - softc = (struct isptarg_softc *)periph->softc; - ISP_PATH_PRT(softc->isp, ISP_LOGTDEBUG1, periph->path, "%s called\n", __func__); - softc->periph = NULL; - softc->path = NULL; - periph->softc = NULL; -} - -static void -isptarg_done(struct cam_periph *periph, union ccb *ccb) -{ - struct isptarg_softc *softc; - ispsoftc_t *isp; - uint32_t newoff; - struct ccb_accept_tio *atio; - struct ccb_immediate_notify *inot; - cam_status status; - - softc = (struct isptarg_softc *)periph->softc; - isp = softc->isp; - status = ccb->ccb_h.status & CAM_STATUS_MASK; - - switch (ccb->ccb_h.func_code) { - case XPT_ACCEPT_TARGET_IO: - atio = (struct ccb_accept_tio *) ccb; - ISP_PATH_PRT(isp, ISP_LOGTDEBUG0, ccb->ccb_h.path, "[0x%x] ATIO seen in %s\n", atio->tag_id, __func__); - memset(ATIO_PPD(atio), 0, sizeof (ppd_t)); - TAILQ_INSERT_TAIL(&softc->work_queue, &ccb->ccb_h, periph_links.tqe); - ATIO_PPD(atio)->on_queue = 1; - xpt_schedule(periph, 1); - break; - case XPT_IMMEDIATE_NOTIFY: - inot = (struct ccb_immediate_notify *) ccb; - ISP_PATH_PRT(isp, ISP_LOGTDEBUG0, ccb->ccb_h.path, "[0x%x] INOT for 0x%x seen in %s\n", inot->tag_id, inot->seq_id, __func__); - TAILQ_INSERT_TAIL(&softc->inot_queue, &ccb->ccb_h, periph_links.tqe); - xpt_schedule(periph, 1); - break; - case XPT_CONT_TARGET_IO: - atio = ccb->ccb_h.ccb_atio; - KASSERT((ATIO_PPD(atio)->ctio_cnt != 0), ("ctio zero when finishing a CTIO")); - ATIO_PPD(atio)->ctio_cnt--; - if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { - switch (ccb->ccb_h.status & CAM_STATUS_MASK) { - case CAM_MESSAGE_RECV: - newoff = (ccb->csio.msg_ptr[3] << 24) | (ccb->csio.msg_ptr[4] << 16) | (ccb->csio.msg_ptr[5] << 8) | (ccb->csio.msg_ptr[6]); - ISP_PATH_PRT(isp, ISP_LOGWARN, ccb->ccb_h.path, "[0x%x] got message to return to reset offset to 0x%x at sequence %u\n", atio->tag_id, newoff, CTIO_SEQ(ccb)); - ATIO_PPD(atio)->offset = newoff; - ATIO_PPD(atio)->status_sent = 0; - if (ATIO_PPD(atio)->on_queue == 0) { - TAILQ_INSERT_TAIL(&softc->rework_queue, &atio->ccb_h, periph_links.tqe); - ATIO_PPD(atio)->on_queue = 1; - } - xpt_schedule(periph, 1); - break; - default: - cam_error_print(ccb, CAM_ESF_ALL, CAM_EPF_ALL); - xpt_action((union ccb *)atio); - break; - } - } else if ((ccb->ccb_h.flags & CAM_SEND_STATUS) == 0) { - ISP_PATH_PRT(isp, ISP_LOGTDEBUG0, ccb->ccb_h.path, "[0x%x] MID CTIO sequence %u seen in %s\n", atio->tag_id, CTIO_SEQ(ccb), __func__); - if (ATIO_PPD(atio)->status_sent == 0 && ATIO_PPD(atio)->on_queue == 0) { - TAILQ_INSERT_TAIL(&softc->rework_queue, &atio->ccb_h, periph_links.tqe); - ATIO_PPD(atio)->on_queue = 1; - } - xpt_schedule(periph, 1); - } else { - KASSERT((ATIO_PPD(atio)->ctio_cnt == 0), ("ctio count still %d when we think we've sent the STATUS ctio", ATIO_PPD(atio)->ctio_cnt)); - ISP_PATH_PRT(isp, ISP_LOGTDEBUG0, ccb->ccb_h.path, "[0x%x] FINAL CTIO sequence %u seen in %s\n", atio->tag_id, CTIO_SEQ(ccb), __func__); - xpt_action((union ccb *)atio); - } - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { - cam_release_devq(ccb->ccb_h.path, 0, 0, 0, 0); - ccb->ccb_h.status &= ~CAM_DEV_QFRZN; - } - xpt_release_ccb(ccb); - break; - case XPT_NOTIFY_ACKNOWLEDGE: - if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { - cam_release_devq(ccb->ccb_h.path, 0, 0, 0, 0); - ccb->ccb_h.status &= ~CAM_DEV_QFRZN; - } - inot = ccb->ccb_h.ccb_inot; - ISP_PATH_PRT(isp, ISP_LOGTDEBUG1, inot->ccb_h.path, "[0x%x] recycle notify for tag 0x%x\n", inot->tag_id, inot->seq_id); - xpt_release_ccb(ccb); - xpt_action((union ccb *)inot); - break; - default: - xpt_print(ccb->ccb_h.path, "unexpected code 0x%x\n", ccb->ccb_h.func_code); - break; - } -} - -static void -isptargasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg) -{ - struct ac_contract *acp = arg; - struct ac_device_changed *fc = (struct ac_device_changed *) acp->contract_data; - - if (code != AC_CONTRACT) { - return; - } - xpt_print(path, "0x%016llx Port ID 0x%06x %s\n", (unsigned long long) fc->wwpn, fc->port, fc->arrived? "arrived" : "departed"); -} - -static void -isp_target_thread(ispsoftc_t *isp, int chan) -{ - union ccb *ccb = NULL; - int i; - void *wchan; - cam_status status; - struct isptarg_softc *softc = NULL; - struct cam_periph *periph = NULL, *wperiph = NULL; - struct cam_path *path, *wpath; - struct cam_sim *sim; - - if (disk_data == NULL) { - disk_size = roundup2(vm_kmem_size >> 1, (1ULL << 20)); - if (disk_size < (50 << 20)) { - disk_size = 50 << 20; - } - disk_data = malloc(disk_size, M_ISPTARG, M_WAITOK | M_ZERO); - if (disk_data == NULL) { - isp_prt(isp, ISP_LOGERR, "%s: could not allocate disk data", __func__); - goto out; - } - isp_prt(isp, ISP_LOGINFO, "allocated a %ju MiB disk", (uintmax_t) (disk_size >> 20)); - } - junk_data = malloc(JUNK_SIZE, M_ISPTARG, M_WAITOK | M_ZERO); - if (junk_data == NULL) { - isp_prt(isp, ISP_LOGERR, "%s: could not allocate junk", __func__); - goto out; - } - - - softc = malloc(sizeof (*softc), M_ISPTARG, M_WAITOK | M_ZERO); - if (softc == NULL) { - isp_prt(isp, ISP_LOGERR, "%s: could not allocate softc", __func__); - goto out; - } - TAILQ_INIT(&softc->work_queue); - TAILQ_INIT(&softc->rework_queue); - TAILQ_INIT(&softc->running_queue); - TAILQ_INIT(&softc->inot_queue); - softc->isp = isp; - - periphdriver_register(&isptargdriver); - ISP_GET_PC(isp, chan, sim, sim); - ISP_GET_PC(isp, chan, path, path); - status = xpt_create_path(&wpath, NULL, cam_sim_path(sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); - if (status != CAM_REQ_CMP) { - isp_prt(isp, ISP_LOGERR, "%s: could not allocate wildcard path", __func__); - return; - } - status = xpt_create_path(&path, NULL, cam_sim_path(sim), 0, 0); - if (status != CAM_REQ_CMP) { - xpt_free_path(wpath); - isp_prt(isp, ISP_LOGERR, "%s: could not allocate path", __func__); - return; - } - - ISP_LOCK(isp); - status = cam_periph_alloc(isptargctor, NULL, isptargdtor, isptargstart, "isptarg", CAM_PERIPH_BIO, wpath, NULL, 0, softc); - if (status != CAM_REQ_CMP) { - ISP_UNLOCK(isp); - isp_prt(isp, ISP_LOGERR, "%s: cam_periph_alloc for wildcard failed", __func__); - goto out; - } - wperiph = cam_periph_find(wpath, "isptarg"); - if (wperiph == NULL) { - ISP_UNLOCK(isp); - isp_prt(isp, ISP_LOGERR, "%s: wildcard periph already allocated but doesn't exist", __func__); - goto out; - } - - status = cam_periph_alloc(isptargctor, NULL, isptargdtor, isptargstart, "isptarg", CAM_PERIPH_BIO, path, NULL, 0, softc); - if (status != CAM_REQ_CMP) { - ISP_UNLOCK(isp); - isp_prt(isp, ISP_LOGERR, "%s: cam_periph_alloc failed", __func__); - goto out; - } - - periph = cam_periph_find(path, "isptarg"); - if (periph == NULL) { - ISP_UNLOCK(isp); - isp_prt(isp, ISP_LOGERR, "%s: periph already allocated but doesn't exist", __func__); - goto out; - } - - status = xpt_register_async(AC_CONTRACT, isptargasync, isp, wpath); - if (status != CAM_REQ_CMP) { - ISP_UNLOCK(isp); - isp_prt(isp, ISP_LOGERR, "%s: xpt_register_async failed", __func__); - goto out; - } - - ISP_UNLOCK(isp); - - ccb = xpt_alloc_ccb(); - - /* - * Make sure role is none. - */ - xpt_setup_ccb(&ccb->ccb_h, periph->path, 10); - ccb->ccb_h.func_code = XPT_SET_SIM_KNOB; - ccb->knob.xport_specific.fc.role = KNOB_ROLE_NONE; - ccb->knob.xport_specific.fc.valid = KNOB_VALID_ROLE; - - ISP_LOCK(isp); - xpt_action(ccb); - ISP_UNLOCK(isp); - - /* - * Now enable luns - */ - xpt_setup_ccb(&ccb->ccb_h, periph->path, 10); - ccb->ccb_h.func_code = XPT_EN_LUN; - ccb->cel.enable = 1; - ISP_LOCK(isp); - xpt_action(ccb); - ISP_UNLOCK(isp); - if (ccb->ccb_h.status != CAM_REQ_CMP) { - xpt_free_ccb(ccb); - xpt_print(periph->path, "failed to enable lun (0x%x)\n", ccb->ccb_h.status); - goto out; - } - - xpt_setup_ccb(&ccb->ccb_h, wperiph->path, 10); - ccb->ccb_h.func_code = XPT_EN_LUN; - ccb->cel.enable = 1; - ISP_LOCK(isp); - xpt_action(ccb); - ISP_UNLOCK(isp); - if (ccb->ccb_h.status != CAM_REQ_CMP) { - xpt_free_ccb(ccb); - xpt_print(wperiph->path, "failed to enable lun (0x%x)\n", ccb->ccb_h.status); - goto out; - } - xpt_free_ccb(ccb); - - /* - * Add resources - */ - ISP_GET_PC(isp, chan, target_proc, wchan); - for (i = 0; i < 4; i++) { - ccb = malloc(sizeof (*ccb), M_ISPTARG, M_WAITOK | M_ZERO); - xpt_setup_ccb(&ccb->ccb_h, wperiph->path, 1); - ccb->ccb_h.func_code = XPT_ACCEPT_TARGET_IO; - ccb->ccb_h.cbfcnp = isptarg_done; - ccb->ccb_h.ppriv_ptr0 = malloc(sizeof (ppd_t), M_ISPTARG, M_WAITOK | M_ZERO); - ISP_LOCK(isp); - xpt_action(ccb); - ISP_UNLOCK(isp); - } - for (i = 0; i < NISP_TARG_CMDS; i++) { - ccb = malloc(sizeof (*ccb), M_ISPTARG, M_WAITOK | M_ZERO); - xpt_setup_ccb(&ccb->ccb_h, periph->path, 1); - ccb->ccb_h.func_code = XPT_ACCEPT_TARGET_IO; - ccb->ccb_h.cbfcnp = isptarg_done; - ccb->ccb_h.ppriv_ptr0 = malloc(sizeof (ppd_t), M_ISPTARG, M_WAITOK | M_ZERO); - ISP_LOCK(isp); - xpt_action(ccb); - ISP_UNLOCK(isp); - } - for (i = 0; i < 4; i++) { - ccb = malloc(sizeof (*ccb), M_ISPTARG, M_WAITOK | M_ZERO); - xpt_setup_ccb(&ccb->ccb_h, wperiph->path, 1); - ccb->ccb_h.func_code = XPT_IMMEDIATE_NOTIFY; - ccb->ccb_h.cbfcnp = isptarg_done; - ISP_LOCK(isp); - xpt_action(ccb); - ISP_UNLOCK(isp); - } - for (i = 0; i < NISP_TARG_NOTIFIES; i++) { - ccb = malloc(sizeof (*ccb), M_ISPTARG, M_WAITOK | M_ZERO); - xpt_setup_ccb(&ccb->ccb_h, periph->path, 1); - ccb->ccb_h.func_code = XPT_IMMEDIATE_NOTIFY; - ccb->ccb_h.cbfcnp = isptarg_done; - ISP_LOCK(isp); - xpt_action(ccb); - ISP_UNLOCK(isp); - } - - /* - * Now turn it all back on - */ - xpt_setup_ccb(&ccb->ccb_h, periph->path, 10); - ccb->ccb_h.func_code = XPT_SET_SIM_KNOB; - ccb->knob.xport_specific.fc.valid = KNOB_VALID_ROLE; - ccb->knob.xport_specific.fc.role = KNOB_ROLE_TARGET; - ISP_LOCK(isp); - xpt_action(ccb); - ISP_UNLOCK(isp); - - /* - * Okay, while things are still active, sleep... - */ - ISP_LOCK(isp); - for (;;) { - ISP_GET_PC(isp, chan, proc_active, i); - if (i == 0) { - break; - } - msleep(wchan, &isp->isp_lock, PUSER, "tsnooze", 0); - } - ISP_UNLOCK(isp); - -out: - if (wperiph) { - cam_periph_invalidate(wperiph); - } - if (periph) { - cam_periph_invalidate(periph); - } - if (junk_data) { - free(junk_data, M_ISPTARG); - } - if (disk_data) { - free(disk_data, M_ISPTARG); - } - if (softc) { - free(softc, M_ISPTARG); - } - xpt_free_path(path); - xpt_free_path(wpath); -} - -static void -isp_target_thread_pi(void *arg) -{ - struct isp_spi *pi = arg; - ispsoftc_t *isp = cam_sim_softc(pi->sim); - int chan = cam_sim_bus(pi->sim); - - isp_target_thread(isp, chan); - ISP_SPI_PC(isp, chan)->num_threads -= 1; - kthread_exit(); -} - -static void -isp_target_thread_fc(void *arg) -{ - struct isp_fc *fc = arg; - ispsoftc_t *isp = cam_sim_softc(pi->sim); - int chan = cam_sim_bus(pi->sim); - - isp_target_thread(isp, chan); - ISP_FC_PC(isp, chan)->num_threads -= 1; - kthread_exit(); -} - -static int -isptarg_rwparm(uint8_t *cdb, uint8_t *dp, uint64_t dl, uint32_t offset, uint8_t **kp, uint32_t *tl, int *lp) -{ - uint32_t cnt, curcnt; - uint64_t lba; - - switch (cdb[0]) { - case WRITE_16: - case READ_16: - cnt = (((uint32_t)cdb[10]) << 24) | - (((uint32_t)cdb[11]) << 16) | - (((uint32_t)cdb[12]) << 8) | - ((uint32_t)cdb[13]); - - lba = (((uint64_t)cdb[2]) << 56) | - (((uint64_t)cdb[3]) << 48) | - (((uint64_t)cdb[4]) << 40) | - (((uint64_t)cdb[5]) << 32) | - (((uint64_t)cdb[6]) << 24) | - (((uint64_t)cdb[7]) << 16) | - (((uint64_t)cdb[8]) << 8) | - ((uint64_t)cdb[9]); - break; - case WRITE_12: - case READ_12: - cnt = (((uint32_t)cdb[6]) << 16) | - (((uint32_t)cdb[7]) << 8) | - ((u_int32_t)cdb[8]); - - lba = (((uint32_t)cdb[2]) << 24) | - (((uint32_t)cdb[3]) << 16) | - (((uint32_t)cdb[4]) << 8) | - ((uint32_t)cdb[5]); - break; - case WRITE_10: - case READ_10: - cnt = (((uint32_t)cdb[7]) << 8) | - ((u_int32_t)cdb[8]); - - lba = (((uint32_t)cdb[2]) << 24) | - (((uint32_t)cdb[3]) << 16) | - (((uint32_t)cdb[4]) << 8) | - ((uint32_t)cdb[5]); - break; - case WRITE_6: - case READ_6: - cnt = cdb[4]; - if (cnt == 0) { - cnt = 256; - } - lba = (((uint32_t)cdb[1] & 0x1f) << 16) | - (((uint32_t)cdb[2]) << 8) | - ((uint32_t)cdb[3]); - break; - default: - return (-1); - } - - cnt <<= DISK_SHIFT; - lba <<= DISK_SHIFT; - - if (offset == cnt) { - *lp = 1; - return (0); - } - - if (lba + cnt > dl) { - return (-2); - } - - curcnt = MAX_ISP_TARG_TRANSFER; - if (offset + curcnt >= cnt) { - curcnt = cnt - offset; - *lp = 1; - } else { - *lp = 0; - } -#ifdef ISP_MULTI_CCBS - if (curcnt > MULTI_CCB_DATA_LIM) - curcnt = MULTI_CCB_DATA_LIM; -#endif - *tl = curcnt; - *kp = &dp[lba + offset]; - return (0); -} - -#endif #endif static void Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Sat Oct 24 13:43:10 2015 (r289876) +++ head/sys/dev/isp/isp_freebsd.h Sat Oct 24 13:45:45 2015 (r289877) @@ -242,9 +242,6 @@ struct isp_fc { struct isp_nexus *nexus_free_list; uint32_t #ifdef ISP_TARGET_MODE -#ifdef ISP_INTERNAL_TARGET - proc_active : 1, -#endif tm_luns_enabled : 1, tm_enable_defer : 1, tm_enabled : 1, @@ -263,9 +260,6 @@ struct isp_fc { struct task gtask; #ifdef ISP_TARGET_MODE struct tslist lun_hash[LUN_HASH_SIZE]; -#ifdef ISP_INTERNAL_TARGET - struct proc * target_proc; -#endif #if defined(DEBUG) unsigned int inject_lost_data_frame; #endif @@ -278,9 +272,6 @@ struct isp_spi { struct cam_path *path; uint32_t #ifdef ISP_TARGET_MODE -#ifdef ISP_INTERNAL_TARGET - proc_active : 1, -#endif tm_luns_enabled : 1, tm_enable_defer : 1, tm_enabled : 1, @@ -290,9 +281,6 @@ struct isp_spi { iid : 4; #ifdef ISP_TARGET_MODE struct tslist lun_hash[LUN_HASH_SIZE]; -#ifdef ISP_INTERNAL_TARGET - struct proc * target_proc; -#endif #endif int num_threads; }; From owner-svn-src-all@freebsd.org Sat Oct 24 13:47: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 B35D7A1D673; Sat, 24 Oct 2015 13:47:04 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81BCF1F66; Sat, 24 Oct 2015 13:47:04 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9ODl3SB037033; Sat, 24 Oct 2015 13:47:03 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ODl3tP037032; Sat, 24 Oct 2015 13:47:03 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510241347.t9ODl3tP037032@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 24 Oct 2015 13:47:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289878 - head/usr.bin/timeout X-SVN-Group: head MIME-Version: 1.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, 24 Oct 2015 13:47:04 -0000 Author: bapt Date: Sat Oct 24 13:47:03 2015 New Revision: 289878 URL: https://svnweb.freebsd.org/changeset/base/289878 Log: timeout(1): fix the acceptable range values for parse_signal() Before both 0 and sys_nsig would be successfully returned by parse_signal() although being invalid signal numbers. PR: Alexandre Perrin MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D3990 Modified: head/usr.bin/timeout/timeout.c Modified: head/usr.bin/timeout/timeout.c ============================================================================== --- head/usr.bin/timeout/timeout.c Sat Oct 24 13:45:45 2015 (r289877) +++ head/usr.bin/timeout/timeout.c Sat Oct 24 13:47:03 2015 (r289878) @@ -105,7 +105,7 @@ parse_signal(const char *str) int sig, i; const char *errstr; - sig = strtonum(str, 0, sys_nsig, &errstr); + sig = strtonum(str, 1, sys_nsig - 1, &errstr); if (errstr == NULL) return (sig); From owner-svn-src-all@freebsd.org Sat Oct 24 13: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 D63ADA1D847; Sat, 24 Oct 2015 13:55:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6A67385; Sat, 24 Oct 2015 13:55:13 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9ODtChP039887; Sat, 24 Oct 2015 13:55:12 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ODtCnp039885; Sat, 24 Oct 2015 13:55:12 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510241355.t9ODtCnp039885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 24 Oct 2015 13:55:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289879 - head/usr.sbin/newsyslog X-SVN-Group: head MIME-Version: 1.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, 24 Oct 2015 13:55:14 -0000 Author: bapt Date: Sat Oct 24 13:55:12 2015 New Revision: 289879 URL: https://svnweb.freebsd.org/changeset/base/289879 Log: newsyslog.conf: allow to configure the signal using the signal name. Submitted by: Alexandre Perrin MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D3961 Modified: head/usr.sbin/newsyslog/newsyslog.c head/usr.sbin/newsyslog/newsyslog.conf.5 Modified: head/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.c Sat Oct 24 13:47:03 2015 (r289878) +++ head/usr.sbin/newsyslog/newsyslog.c Sat Oct 24 13:55:12 2015 (r289879) @@ -280,6 +280,7 @@ static int age_old_log(const char *file) static void savelog(char *from, char *to); static void createdir(const struct conf_entry *ent, char *dirpart); static void createlog(const struct conf_entry *ent); +static int parse_signal(const char *str); /* * All the following take a parameter of 'int', but expect values in the @@ -1338,12 +1339,13 @@ no_trimat: if (q && *q) { if (*q == '/') working->pid_cmd_file = strdup(q); - else if (isdigit(*q)) + else if (isalnum(*q)) goto got_sig; - else + else { errx(1, - "illegal pid file or signal number in config file:\n%s", + "illegal pid file or signal in config file:\n%s", errline); + } } if (eol) q = NULL; @@ -1354,17 +1356,13 @@ no_trimat: working->sig = SIGHUP; if (q && *q) { - if (isdigit(*q)) { - got_sig: - working->sig = atoi(q); - } else { - err_sig: +got_sig: + working->sig = parse_signal(q); + if (working->sig < 1 || working->sig >= sys_nsig) { errx(1, - "illegal signal number in config file:\n%s", + "illegal signal in config file:\n%s", errline); } - if (working->sig < 1 || working->sig >= NSIG) - goto err_sig; } /* @@ -2662,3 +2660,28 @@ change_attrs(const char *fname, const st warn("can't chflags %s NODUMP", fname); } } + +/* + * Parse a signal number or signal name. Returns the signal number parsed or -1 + * on failure. + */ +static int +parse_signal(const char *str) +{ + int sig, i; + const char *errstr; + + sig = strtonum(str, 1, sys_nsig - 1, &errstr); + + if (errstr == NULL) + return (sig); + if (strncasecmp(str, "SIG", 3) == 0) + str += 3; + + for (i = 1; i < sys_nsig; i++) { + if (strcasecmp(str, sys_signame[i]) == 0) + return (i); + } + + return (-1); +} Modified: head/usr.sbin/newsyslog/newsyslog.conf.5 ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.conf.5 Sat Oct 24 13:47:03 2015 (r289878) +++ head/usr.sbin/newsyslog/newsyslog.conf.5 Sat Oct 24 13:55:12 2015 (r289879) @@ -21,7 +21,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd March 21, 2012 +.Dd October 24, 2015 .Dt NEWSYSLOG.CONF 5 .Os .Sh NAME @@ -337,7 +337,7 @@ process ID or to find a group process ID .Cm U flag was specified. If this field is present, a -.Ar signal_number +.Ar signal is sent to the process ID contained in this file. If this field is not present and the .Cm N @@ -358,14 +358,23 @@ flag, the file is treated as a path to a by the .Xr newsyslog 8 after rotation instead of sending the signal out. -.It Ar signal_number -This optional field specifies the signal number that will be sent -to the daemon process (or to all processes in a process group, if the +.It Ar signal +This optional field specifies the signal that will be sent to the daemon +process (or to all processes in a process group, if the .Cm U flag was specified). If this field is not present, then a .Dv SIGHUP signal will be sent. +Signal names +must start with +.Dq SIG +and be the signal name, e.g., +.Dv SIGUSR1 . +Alternatively, +.Ar signal +can be the signal number, e.g., 30 for +.Dv SIGUSR1 . .El .Sh EXAMPLES The following is an example of the From owner-svn-src-all@freebsd.org Sat Oct 24 15:31: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 2AD05A1DE47; Sat, 24 Oct 2015 15:31:13 +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 1816E1293; Sat, 24 Oct 2015 15:31:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 110DE10E1; Sat, 24 Oct 2015 15:31:13 +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 BCB2C15D70; Sat, 24 Oct 2015 15:31:12 +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 KTrha_VlRfWw; Sat, 24 Oct 2015 15:31:10 +0000 (UTC) Subject: Re: svn commit: r289879 - head/usr.sbin/newsyslog DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 64BFB15D6A To: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510241355.t9ODtCnp039885@repo.freebsd.org> From: Bryan Drewery Organization: FreeBSD Message-ID: <562BA43A.50806@FreeBSD.org> Date: Sat, 24 Oct 2015 08:31:06 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510241355.t9ODtCnp039885@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 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: Sat, 24 Oct 2015 15:31:13 -0000 On 10/24/15 6:55 AM, Baptiste Daroussin wrote: > +static int > +parse_signal(const char *str) Maybe this and the timeout(1) version should move to libc or libutil. We do have strsignal(3) and psignal(3) too. -- Regards, Bryan Drewery From owner-svn-src-all@freebsd.org Sat Oct 24 15:39: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 7960AA1DF77; Sat, 24 Oct 2015 15:39:51 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 238541793; Sat, 24 Oct 2015 15:39:51 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wicll6 with SMTP id ll6so64492494wic.0; Sat, 24 Oct 2015 08:39:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=5UJhXyzIP+T/aIYaVVeD4/ul+zGmR1o3y1BwqVrSAzY=; b=bzod/rdA/vTIglb6eyQdfDoWciIDXdLfc0Rcedk6VawZFrJi616TNeyumoBJ3lQyGj 4HJC3wifKc77JOb+6LladtkbCwHZkzshtF1T4jL9ukDAzM0uXKjTdkJ+gT6OsNu2So+Y pUS1NukhnxqSEAatqmW6b5lmeDAyWJx7/p3WHDGlztFexljC0nqTLZ0s725d0wFagqvW Z2C7XrfmvzF3+F9oD/xoDvFxV9yn0QjFdgN41UExFJBFw8wif7i4MzzY8pW5jos9bTwO ZOnocXwPvNfVxS0Qk0uVa4RtNiS75FDpe7arxMMp8Dkls7t3tV3aSNVk6bFl5tVhc6/L wCEQ== X-Received: by 10.195.12.39 with SMTP id en7mr10519543wjd.126.1445701189475; Sat, 24 Oct 2015 08:39:49 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id h4sm8791558wjx.41.2015.10.24.08.39.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Oct 2015 08:39:48 -0700 (PDT) Sender: Baptiste Daroussin Date: Sat, 24 Oct 2015 17:39:47 +0200 From: Baptiste Daroussin To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289879 - head/usr.sbin/newsyslog Message-ID: <20151024153946.GD40371@ivaldir.etoilebsd.net> References: <201510241355.t9ODtCnp039885@repo.freebsd.org> <562BA43A.50806@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="11Y7aswkeuHtSBEs" Content-Disposition: inline In-Reply-To: <562BA43A.50806@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: Sat, 24 Oct 2015 15:39:51 -0000 --11Y7aswkeuHtSBEs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 24, 2015 at 08:31:06AM -0700, Bryan Drewery wrote: > On 10/24/15 6:55 AM, Baptiste Daroussin wrote: > > +static int > > +parse_signal(const char *str) >=20 > Maybe this and the timeout(1) version should move to libc or libutil. We > do have strsignal(3) and psignal(3) too. >=20 I was thinking about moving parse_signal to libutil yes. Best regards, Bapt --11Y7aswkeuHtSBEs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlYrpkIACgkQ8kTtMUmk6ExaiwCfXyypAoxQkGQAvlkztgIXAJ68 pl0An1KWizRkPAI59xB3ZXzZS2mTYtlS =ixYk -----END PGP SIGNATURE----- --11Y7aswkeuHtSBEs-- From owner-svn-src-all@freebsd.org Sat Oct 24 15:55: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 B1724A1D347; Sat, 24 Oct 2015 15:55:09 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 51CD71F33; Sat, 24 Oct 2015 15:55:09 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id E918C358C67; Sat, 24 Oct 2015 17:55:05 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id CAC7028494; Sat, 24 Oct 2015 17:55:05 +0200 (CEST) Date: Sat, 24 Oct 2015 17:55:05 +0200 From: Jilles Tjoelker To: Baptiste Daroussin Cc: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289879 - head/usr.sbin/newsyslog Message-ID: <20151024155505.GA39162@stack.nl> References: <201510241355.t9ODtCnp039885@repo.freebsd.org> <562BA43A.50806@FreeBSD.org> <20151024153946.GD40371@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151024153946.GD40371@ivaldir.etoilebsd.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2015 15:55:09 -0000 On Sat, Oct 24, 2015 at 05:39:47PM +0200, Baptiste Daroussin wrote: > On Sat, Oct 24, 2015 at 08:31:06AM -0700, Bryan Drewery wrote: > > On 10/24/15 6:55 AM, Baptiste Daroussin wrote: > > > +static int > > > +parse_signal(const char *str) > > Maybe this and the timeout(1) version should move to libc or libutil. We > > do have strsignal(3) and psignal(3) too. > I was thinking about moving parse_signal to libutil yes. There is similar code in sh(1) (for trap) and kill(1). In either case, "0", "00", etc. are valid, unlike in timeout(1) and newsyslog(8). In kill(1)'s case, the error messages are more detailed. I'm not going to add a dependency on libutil in such basic utilities though. In my humble opinion, depending on another DSO is more expensive than having a small piece of duplicated code. -- Jilles Tjoelker From owner-svn-src-all@freebsd.org Sat Oct 24 17:24: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 63C2DA1E5CE; Sat, 24 Oct 2015 17:24: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 33775A45; Sat, 24 Oct 2015 17:24: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 t9OHOK58001523; Sat, 24 Oct 2015 17:24:20 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9OHOJo4001518; Sat, 24 Oct 2015 17:24:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510241724.t9OHOJo4001518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 24 Oct 2015 17:24:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289881 - 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: Sat, 24 Oct 2015 17:24:21 -0000 Author: mav Date: Sat Oct 24 17:24:19 2015 New Revision: 289881 URL: https://svnweb.freebsd.org/changeset/base/289881 Log: Give CTL support for PIM_EXTLUNS when talking to CAM. CTL itself still lives in flat LUN space, but it can generate extended numbers if CAM SIM reports such capability. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl.h head/sys/cam/ctl/ctl_frontend_cam_sim.c head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sat Oct 24 15:23:44 2015 (r289880) +++ head/sys/cam/ctl/ctl.c Sat Oct 24 17:24:19 2015 (r289881) @@ -3533,6 +3533,67 @@ ctl_lun_map_to_port(struct ctl_port *por return (UINT32_MAX); } +uint32_t +ctl_decode_lun(uint64_t encoded) +{ + uint8_t lun[8]; + uint32_t result = 0xffffffff; + + be64enc(lun, encoded); + switch (lun[0] & RPL_LUNDATA_ATYP_MASK) { + case RPL_LUNDATA_ATYP_PERIPH: + if ((lun[0] & 0x3f) == 0 && lun[2] == 0 && lun[3] == 0 && + lun[4] == 0 && lun[5] == 0 && lun[6] == 0 && lun[7] == 0) + result = lun[1]; + break; + case RPL_LUNDATA_ATYP_FLAT: + if (lun[2] == 0 && lun[3] == 0 && lun[4] == 0 && lun[5] == 0 && + lun[6] == 0 && lun[7] == 0) + result = ((lun[0] & 0x3f) << 8) + lun[1]; + break; + case RPL_LUNDATA_ATYP_EXTLUN: + switch (lun[0] & RPL_LUNDATA_EXT_EAM_MASK) { + case 0x02: + switch (lun[0] & RPL_LUNDATA_EXT_LEN_MASK) { + case 0x00: + result = lun[1]; + break; + case 0x10: + result = (lun[1] << 16) + (lun[2] << 8) + + lun[3]; + break; + case 0x20: + if (lun[1] == 0 && lun[6] == 0 && lun[7] == 0) + result = (lun[2] << 24) + + (lun[3] << 16) + (lun[4] << 8) + + lun[5]; + break; + } + break; + case RPL_LUNDATA_EXT_EAM_NOT_SPEC: + result = 0xffffffff; + break; + } + break; + } + return (result); +} + +uint64_t +ctl_encode_lun(uint32_t decoded) +{ + uint64_t l = decoded; + + if (l <= 0xff) + return (((uint64_t)RPL_LUNDATA_ATYP_PERIPH << 56) | (l << 48)); + if (l <= 0x3fff) + return (((uint64_t)RPL_LUNDATA_ATYP_FLAT << 56) | (l << 48)); + if (l <= 0xffffff) + return (((uint64_t)(RPL_LUNDATA_ATYP_EXTLUN | 0x12) << 56) | + (l << 32)); + return ((((uint64_t)RPL_LUNDATA_ATYP_EXTLUN | 0x22) << 56) | (l << 16)); +} + static struct ctl_port * ctl_io_port(struct ctl_io_hdr *io_hdr) { @@ -9056,36 +9117,9 @@ ctl_report_luns(struct ctl_scsiio *ctsio if (lun == NULL) continue; - if (targ_lun_id <= 0xff) { - /* - * Peripheral addressing method, bus number 0. - */ - lun_data->luns[num_filled].lundata[0] = - RPL_LUNDATA_ATYP_PERIPH; - lun_data->luns[num_filled].lundata[1] = targ_lun_id; - num_filled++; - } else if (targ_lun_id <= 0x3fff) { - /* - * Flat addressing method. - */ - lun_data->luns[num_filled].lundata[0] = - RPL_LUNDATA_ATYP_FLAT | (targ_lun_id >> 8); - lun_data->luns[num_filled].lundata[1] = - (targ_lun_id & 0xff); - num_filled++; - } else if (targ_lun_id <= 0xffffff) { - /* - * Extended flat addressing method. - */ - lun_data->luns[num_filled].lundata[0] = - RPL_LUNDATA_ATYP_EXTLUN | 0x12; - scsi_ulto3b(targ_lun_id, - &lun_data->luns[num_filled].lundata[1]); - num_filled++; - } else { - printf("ctl_report_luns: bogus LUN number %jd, " - "skipping\n", (intmax_t)targ_lun_id); - } + be64enc(lun_data->luns[num_filled++].lundata, + ctl_encode_lun(targ_lun_id)); + /* * According to SPC-3, rev 14 section 6.21: * Modified: head/sys/cam/ctl/ctl.h ============================================================================== --- head/sys/cam/ctl/ctl.h Sat Oct 24 15:23:44 2015 (r289880) +++ head/sys/cam/ctl/ctl.h Sat Oct 24 17:24:19 2015 (r289881) @@ -191,6 +191,9 @@ void ctl_clr_ua_all(struct ctl_lun *lun, void ctl_clr_ua_allluns(struct ctl_softc *ctl_softc, uint32_t initidx, ctl_ua_type ua_type); +uint32_t ctl_decode_lun(uint64_t encoded); +uint64_t ctl_encode_lun(uint32_t decoded); + void ctl_isc_announce_lun(struct ctl_lun *lun); void ctl_isc_announce_port(struct ctl_port *port); void ctl_isc_announce_iid(struct ctl_port *port, int iid); Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_cam_sim.c Sat Oct 24 15:23:44 2015 (r289880) +++ head/sys/cam/ctl/ctl_frontend_cam_sim.c Sat Oct 24 17:24:19 2015 (r289881) @@ -549,7 +549,8 @@ cfcs_action(struct cam_sim *sim, union c io->io_hdr.io_type = CTL_IO_SCSI; io->io_hdr.nexus.initid = 1; io->io_hdr.nexus.targ_port = softc->port.targ_port; - io->io_hdr.nexus.targ_lun = ccb->ccb_h.target_lun; + io->io_hdr.nexus.targ_lun = ctl_decode_lun( + CAM_EXTLUN_BYTE_SWIZZLE(ccb->ccb_h.target_lun)); /* * This tag scheme isn't the best, since we could in theory * have a very long-lived I/O and tag collision, especially @@ -638,7 +639,8 @@ cfcs_action(struct cam_sim *sim, union c io->io_hdr.io_type = CTL_IO_TASK; io->io_hdr.nexus.initid = 1; io->io_hdr.nexus.targ_port = softc->port.targ_port; - io->io_hdr.nexus.targ_lun = ccb->ccb_h.target_lun; + io->io_hdr.nexus.targ_lun = ctl_decode_lun( + CAM_EXTLUN_BYTE_SWIZZLE(ccb->ccb_h.target_lun)); io->taskio.task_action = CTL_TASK_ABORT_TASK; io->taskio.tag_num = abort_ccb->csio.tag_id; switch (abort_ccb->csio.tag_action) { @@ -733,7 +735,8 @@ cfcs_action(struct cam_sim *sim, union c io->io_hdr.io_type = CTL_IO_TASK; io->io_hdr.nexus.initid = 1; io->io_hdr.nexus.targ_port = softc->port.targ_port; - io->io_hdr.nexus.targ_lun = ccb->ccb_h.target_lun; + io->io_hdr.nexus.targ_lun = ctl_decode_lun( + CAM_EXTLUN_BYTE_SWIZZLE(ccb->ccb_h.target_lun)); if (ccb->ccb_h.func_code == XPT_RESET_BUS) io->taskio.task_action = CTL_TASK_BUS_RESET; else @@ -760,7 +763,7 @@ cfcs_action(struct cam_sim *sim, union c cpi->version_num = 0; cpi->hba_inquiry = PI_TAG_ABLE; cpi->target_sprt = 0; - cpi->hba_misc = 0; + cpi->hba_misc = PIM_EXTLUNS; cpi->hba_eng_cnt = 0; cpi->max_target = 1; cpi->max_lun = 1024; Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Sat Oct 24 15:23:44 2015 (r289880) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Sat Oct 24 17:24:19 2015 (r289881) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -416,62 +417,6 @@ cfiscsi_pdu_queue(struct icl_pdu *respon CFISCSI_SESSION_UNLOCK(cs); } -static uint32_t -cfiscsi_decode_lun(uint64_t encoded) -{ - uint8_t lun[8]; - uint32_t result; - - /* - * The LUN field in iSCSI PDUs may look like an ordinary 64 bit number, - * but is in fact an evil, multidimensional structure defined - * in SCSI Architecture Model 5 (SAM-5), section 4.6. - */ - memcpy(lun, &encoded, sizeof(lun)); - switch (lun[0] & 0xC0) { - case 0x00: - if ((lun[0] & 0x3f) != 0 || lun[2] != 0 || lun[3] != 0 || - lun[4] != 0 || lun[5] != 0 || lun[6] != 0 || lun[7] != 0) { - CFISCSI_WARN("malformed LUN " - "(peripheral device addressing method): 0x%jx", - (uintmax_t)encoded); - result = 0xffffffff; - break; - } - result = lun[1]; - break; - case 0x40: - if (lun[2] != 0 || lun[3] != 0 || lun[4] != 0 || lun[5] != 0 || - lun[6] != 0 || lun[7] != 0) { - CFISCSI_WARN("malformed LUN " - "(flat address space addressing method): 0x%jx", - (uintmax_t)encoded); - result = 0xffffffff; - break; - } - result = ((lun[0] & 0x3f) << 8) + lun[1]; - break; - case 0xC0: - if (lun[0] != 0xD2 || lun[4] != 0 || lun[5] != 0 || - lun[6] != 0 || lun[7] != 0) { - CFISCSI_WARN("malformed LUN (extended flat " - "address space addressing method): 0x%jx", - (uintmax_t)encoded); - result = 0xffffffff; - break; - } - result = (lun[1] << 16) + (lun[2] << 8) + lun[3]; - break; - default: - CFISCSI_WARN("unsupported LUN format 0x%jx", - (uintmax_t)encoded); - result = 0xffffffff; - break; - } - - return (result); -} - static void cfiscsi_pdu_handle_nop_out(struct icl_pdu *request) { @@ -566,7 +511,7 @@ cfiscsi_pdu_handle_scsi_command(struct i io->io_hdr.io_type = CTL_IO_SCSI; io->io_hdr.nexus.initid = cs->cs_ctl_initid; io->io_hdr.nexus.targ_port = cs->cs_target->ct_port.targ_port; - io->io_hdr.nexus.targ_lun = cfiscsi_decode_lun(bhssc->bhssc_lun); + io->io_hdr.nexus.targ_lun = ctl_decode_lun(be64toh(bhssc->bhssc_lun)); io->scsiio.tag_num = bhssc->bhssc_initiator_task_tag; switch ((bhssc->bhssc_flags & BHSSC_FLAGS_ATTR)) { case BHSSC_FLAGS_ATTR_UNTAGGED: @@ -622,7 +567,7 @@ cfiscsi_pdu_handle_task_request(struct i io->io_hdr.io_type = CTL_IO_TASK; io->io_hdr.nexus.initid = cs->cs_ctl_initid; io->io_hdr.nexus.targ_port = cs->cs_target->ct_port.targ_port; - io->io_hdr.nexus.targ_lun = cfiscsi_decode_lun(bhstmr->bhstmr_lun); + io->io_hdr.nexus.targ_lun = ctl_decode_lun(be64toh(bhstmr->bhstmr_lun)); io->taskio.tag_type = CTL_TAG_SIMPLE; /* XXX */ switch (bhstmr->bhstmr_function & ~0x80) { Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Sat Oct 24 15:23:44 2015 (r289880) +++ head/sys/cam/ctl/scsi_ctl.c Sat Oct 24 17:24:19 2015 (r289881) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2008, 2009 Silicon Graphics International Corp. + * Copyright (c) 2014-2015 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -73,13 +74,14 @@ __FBSDID("$FreeBSD$"); #include struct ctlfe_softc { - struct ctl_port port; - path_id_t path_id; - target_id_t target_id; - u_int maxio; + struct ctl_port port; + path_id_t path_id; + target_id_t target_id; + uint32_t hba_misc; + u_int maxio; struct cam_sim *sim; - char port_name[DEV_IDLEN]; - struct mtx lun_softc_mtx; + char port_name[DEV_IDLEN]; + struct mtx lun_softc_mtx; STAILQ_HEAD(, ctlfe_lun_softc) lun_softc_list; STAILQ_ENTRY(ctlfe_softc) links; }; @@ -355,6 +357,7 @@ ctlfeasync(void *callback_arg, uint32_t softc->path_id = cpi->ccb_h.path_id; softc->target_id = cpi->initiator_id; softc->sim = xpt_path_sim(path); + softc->hba_misc = cpi->hba_misc; if (cpi->maxio != 0) softc->maxio = cpi->maxio; else @@ -1166,7 +1169,12 @@ ctlfedone(struct cam_periph *periph, uni io->io_hdr.io_type = CTL_IO_SCSI; io->io_hdr.nexus.initid = atio->init_id; io->io_hdr.nexus.targ_port = bus_softc->port.targ_port; - io->io_hdr.nexus.targ_lun = atio->ccb_h.target_lun; + if (bus_softc->hba_misc & PIM_EXTLUNS) { + io->io_hdr.nexus.targ_lun = ctl_decode_lun( + CAM_EXTLUN_BYTE_SWIZZLE(atio->ccb_h.target_lun)); + } else { + io->io_hdr.nexus.targ_lun = atio->ccb_h.target_lun; + } io->scsiio.tag_num = atio->tag_id; switch (atio->tag_action) { case CAM_TAG_ACTION_NONE: @@ -1440,7 +1448,12 @@ ctlfedone(struct cam_periph *periph, uni inot->ccb_h.io_ptr = io; io->io_hdr.nexus.initid = inot->initiator_id; io->io_hdr.nexus.targ_port = bus_softc->port.targ_port; - io->io_hdr.nexus.targ_lun = inot->ccb_h.target_lun; + if (bus_softc->hba_misc & PIM_EXTLUNS) { + io->io_hdr.nexus.targ_lun = ctl_decode_lun( + CAM_EXTLUN_BYTE_SWIZZLE(inot->ccb_h.target_lun)); + } else { + io->io_hdr.nexus.targ_lun = inot->ccb_h.target_lun; + } /* XXX KDM should this be the tag_id? */ io->taskio.tag_num = inot->seq_id; @@ -1820,9 +1833,11 @@ ctlfe_lun_enable(void *arg, int lun_id) cam_status status; bus_softc = (struct ctlfe_softc *)arg; + if (bus_softc->hba_misc & PIM_EXTLUNS) + lun_id = CAM_EXTLUN_BYTE_SWIZZLE(ctl_encode_lun(lun_id)); status = xpt_create_path(&path, /*periph*/ NULL, - bus_softc->path_id, bus_softc->target_id, lun_id); + bus_softc->path_id, bus_softc->target_id, lun_id); /* XXX KDM need some way to return status to CTL here? */ if (status != CAM_REQ_CMP) { printf("%s: could not create path, status %#x\n", __func__, @@ -1879,6 +1894,8 @@ ctlfe_lun_disable(void *arg, int lun_id) struct ctlfe_lun_softc *lun_softc; softc = (struct ctlfe_softc *)arg; + if (softc->hba_misc & PIM_EXTLUNS) + lun_id = CAM_EXTLUN_BYTE_SWIZZLE(ctl_encode_lun(lun_id)); mtx_lock(&softc->lun_softc_mtx); STAILQ_FOREACH(lun_softc, &softc->lun_softc_list, links) { From owner-svn-src-all@freebsd.org Sat Oct 24 17:34: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 D103DA1E6F0; Sat, 24 Oct 2015 17:34:41 +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 9339DDFB; Sat, 24 Oct 2015 17:34:41 +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 t9OHYe5i004327; Sat, 24 Oct 2015 17:34:40 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9OHYe7K004323; Sat, 24 Oct 2015 17:34:40 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510241734.t9OHYe7K004323@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 24 Oct 2015 17:34:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289882 - 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: Sat, 24 Oct 2015 17:34:41 -0000 Author: mav Date: Sat Oct 24 17:34:40 2015 New Revision: 289882 URL: https://svnweb.freebsd.org/changeset/base/289882 Log: Add PIM_EXTLUNS support to isp(4) driver. Now 24xx and above chips support full 8-byte LUN address space. Older FC chips may support up to 16K LUNs when firmware allows. Tested in both initiator and target modes for 23xx, 24xx and 25xx. 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_target.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sat Oct 24 17:24:19 2015 (r289881) +++ head/sys/dev/isp/isp.c Sat Oct 24 17:34:40 2015 (r289882) @@ -1319,7 +1319,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d } } else { if (ISP_CAP_SCCFW(isp)) { - isp->isp_maxluns = 16384; + isp->isp_maxluns = 0; /* No limit -- 2/8 bytes */ } else { isp->isp_maxluns = 16; } @@ -4380,7 +4380,9 @@ isp_start(XS_T *xs) fcparam *fcp = FCPARAM(isp, XS_CHANNEL(xs)); if ((fcp->role & ISP_ROLE_INITIATOR) == 0) { - isp_prt(isp, ISP_LOG_WARN1, "%d.%d.%d I am not an initiator", XS_CHANNEL(xs), target, XS_LUN(xs)); + isp_prt(isp, ISP_LOG_WARN1, + "%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); } @@ -4400,18 +4402,24 @@ isp_start(XS_T *xs) return (CMD_COMPLETE); } if (lp->state == FC_PORTDB_STATE_ZOMBIE) { - isp_prt(isp, ISP_LOGDEBUG1, "%d.%d.%d target zombie", XS_CHANNEL(xs), target, XS_LUN(xs)); + isp_prt(isp, ISP_LOGDEBUG1, + "%d.%d.%jx target zombie", + XS_CHANNEL(xs), target, (uintmax_t)XS_LUN(xs)); return (CMD_RQLATER); } if (lp->state != FC_PORTDB_STATE_VALID) { - isp_prt(isp, ISP_LOGDEBUG1, "%d.%d.%d bad db port state 0x%x", XS_CHANNEL(xs), target, XS_LUN(xs), lp->state); + isp_prt(isp, ISP_LOGDEBUG1, + "%d.%d.%jx bad db port state 0x%x", + XS_CHANNEL(xs), target, (uintmax_t)XS_LUN(xs), lp->state); XS_SETERR(xs, HBA_SELTIMEOUT); return (CMD_COMPLETE); } } else { sdparam *sdp = SDPARAM(isp, XS_CHANNEL(xs)); if ((sdp->role & ISP_ROLE_INITIATOR) == 0) { - isp_prt(isp, ISP_LOGDEBUG1, "%d.%d.%d I am not an initiator", XS_CHANNEL(xs), target, XS_LUN(xs)); + 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); } @@ -4561,14 +4569,20 @@ isp_start(XS_T *xs) t7->req_tidlo = lp->portid; t7->req_tidhi = lp->portid >> 16; t7->req_vpidx = ISP_GET_VPIDX(isp, XS_CHANNEL(xs)); - if (XS_LUN(xs) > 256) { +#if __FreeBSD_version >= 1000700 + be64enc(t7->req_lun, CAM_EXTLUN_BYTE_SWIZZLE(XS_LUN(xs))); +#else + if (XS_LUN(xs) >= 256) { t7->req_lun[0] = XS_LUN(xs) >> 8; t7->req_lun[0] |= 0x40; } t7->req_lun[1] = XS_LUN(xs); +#endif if (FCPARAM(isp, XS_CHANNEL(xs))->fctape_enabled && (lp->prli_word3 & PRLI_WD3_RETRY)) { if (FCP_NEXT_CRN(isp, &t7->req_crn, xs)) { - isp_prt(isp, ISP_LOG_WARN1, "%d.%d.%d cannot generate next CRN", XS_CHANNEL(xs), target, XS_LUN(xs)); + isp_prt(isp, ISP_LOG_WARN1, + "%d.%d.%jx cannot generate next CRN", + XS_CHANNEL(xs), target, (uintmax_t)XS_LUN(xs)); XS_SETERR(xs, HBA_BOTCH); return (CMD_EAGAIN); } @@ -4585,7 +4599,9 @@ isp_start(XS_T *xs) } if (FCPARAM(isp, XS_CHANNEL(xs))->fctape_enabled && (lp->prli_word3 & PRLI_WD3_RETRY)) { if (FCP_NEXT_CRN(isp, &t2->req_crn, xs)) { - isp_prt(isp, ISP_LOG_WARN1, "%d.%d.%d cannot generate next CRN", XS_CHANNEL(xs), target, XS_LUN(xs)); + isp_prt(isp, ISP_LOG_WARN1, + "%d.%d.%jx cannot generate next CRN", + XS_CHANNEL(xs), target, (uintmax_t)XS_LUN(xs)); XS_SETERR(xs, HBA_BOTCH); return (CMD_EAGAIN); } @@ -4594,11 +4610,19 @@ isp_start(XS_T *xs) ispreqt2e_t *t2e = (ispreqt2e_t *)local; t2e->req_target = lp->handle; t2e->req_scclun = XS_LUN(xs); +#if __FreeBSD_version < 1000700 + if (XS_LUN(xs) >= 256) + t2e->req_scclun |= 0x4000; +#endif cdbp = t2e->req_cdb; } else if (ISP_CAP_SCCFW(isp)) { ispreqt2_t *t2 = (ispreqt2_t *)local; t2->req_target = lp->handle; t2->req_scclun = XS_LUN(xs); +#if __FreeBSD_version < 1000700 + if (XS_LUN(xs) >= 256) + t2->req_scclun |= 0x4000; +#endif cdbp = t2->req_cdb; } else { t2->req_target = lp->handle; @@ -5386,12 +5410,14 @@ again: continue; } if (req_status_flags & RQSTF_BUS_RESET) { - isp_prt(isp, ISP_LOG_WARN1, "%d.%d.%d bus was reset", XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_prt(isp, ISP_LOG_WARN1, "%d.%d.%jx bus was reset", + XS_CHANNEL(xs), XS_TGT(xs), (uintmax_t)XS_LUN(xs)); XS_SETERR(xs, HBA_BUSRESET); ISP_SET_SENDMARKER(isp, XS_CHANNEL(xs), 1); } if (buddaboom) { - isp_prt(isp, ISP_LOG_WARN1, "%d.%d.%d buddaboom", XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_prt(isp, ISP_LOG_WARN1, "%d.%d.%jx buddaboom", + XS_CHANNEL(xs), XS_TGT(xs), (uintmax_t)XS_LUN(xs)); XS_SETERR(xs, HBA_BOTCH); } @@ -5535,7 +5561,11 @@ again: *XS_STSP(xs) = SCSI_QFULL; XS_SETERR(xs, HBA_NOERROR); } else if (XS_NOERR(xs)) { - isp_prt(isp, ISP_LOG_WARN1, "%d.%d.%d badness at %s:%u", XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs), __func__, __LINE__); + isp_prt(isp, ISP_LOG_WARN1, + "%d.%d.%jx badness at %s:%u", + XS_CHANNEL(xs), XS_TGT(xs), + (uintmax_t)XS_LUN(xs), + __func__, __LINE__); XS_SETERR(xs, HBA_BOTCH); } XS_SET_RESID(xs, XS_XFRLEN(xs)); @@ -5947,7 +5977,11 @@ isp_parse_async_fc(ispsoftc_t *isp, uint continue; } j++; - isp_prt(isp, ISP_LOG_WARN1, "%d.%d.%d bus reset set at %s:%u", XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs), __func__, __LINE__); + isp_prt(isp, ISP_LOG_WARN1, + "%d.%d.%jx bus reset set at %s:%u", + XS_CHANNEL(xs), XS_TGT(xs), + (uintmax_t)XS_LUN(xs), + __func__, __LINE__); XS_SETERR(xs, HBA_BUSRESET); } if (j) { @@ -6426,7 +6460,9 @@ isp_parse_status(ispsoftc_t *isp, ispsta break; case RQCS_XACT_ERR2: - isp_xs_prt(isp, xs, ISP_LOGERR, "HBA attempted queued transaction to target routine %d", XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, + "HBA attempted queued transaction to target routine %jx", + (uintmax_t)XS_LUN(xs)); break; case RQCS_XACT_ERR3: Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sat Oct 24 17:24:19 2015 (r289881) +++ head/sys/dev/isp/isp_freebsd.c Sat Oct 24 17:34:40 2015 (r289882) @@ -1153,7 +1153,7 @@ create_lun_state(ispsoftc_t *isp, int bu lun = xpt_path_lun_id(path); if (lun != CAM_LUN_WILDCARD) { - if (lun >= ISP_MAX_LUNS(isp)) { + if (ISP_MAX_LUNS(isp) > 0 && lun >= ISP_MAX_LUNS(isp)) { return (CAM_LUN_INVALID); } } @@ -1238,7 +1238,8 @@ isp_enable_lun(ispsoftc_t *isp, union cc 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 %u\n", 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); @@ -1251,7 +1252,8 @@ isp_enable_lun(ispsoftc_t *isp, union cc return; } if (isp->isp_dblev & ISP_LOGTDEBUG0) { - xpt_print(ccb->ccb_h.path, "enabling lun 0x%x on channel %d\n", lun, bus); + xpt_print(ccb->ccb_h.path, + "enabling lun 0x%jx on channel %d\n", (uintmax_t)lun, bus); } /* @@ -1450,7 +1452,8 @@ isp_disable_lun(ispsoftc_t *isp, union c 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, "disabling lun %u\n", 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) { ccb->ccb_h.status = CAM_LUN_INVALID; xpt_done(ccb); @@ -2181,6 +2184,10 @@ isp_target_putback_atio(union ccb *ccb) 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; +#endif } else { at->at_lun = (uint8_t) ccb->ccb_h.target_lun; } @@ -2366,6 +2373,9 @@ isp_handle_platform_atio2(ispsoftc_t *is if (ISP_CAP_SCCFW(isp)) { lun = aep->at_scclun; +#if __FreeBSD_version < 1000700 + lun &= 0x3fff; +#endif } else { lun = aep->at_lun; } @@ -2512,7 +2522,8 @@ static void isp_handle_platform_atio7(ispsoftc_t *isp, at7_entry_t *aep) { int cdbxlen; - uint16_t lun, chan, nphdl = NIL_HANDLE; + lun_id_t lun; + uint16_t chan, nphdl = NIL_HANDLE; uint32_t did, sid; fcportdb_t *lp; tstate_t *tptr; @@ -2523,7 +2534,12 @@ isp_handle_platform_atio7(ispsoftc_t *is did = (aep->at_hdr.d_id[0] << 16) | (aep->at_hdr.d_id[1] << 8) | aep->at_hdr.d_id[2]; sid = (aep->at_hdr.s_id[0] << 16) | (aep->at_hdr.s_id[1] << 8) | aep->at_hdr.s_id[2]; - lun = (aep->at_cmnd.fcp_cmnd_lun[0] << 8) | aep->at_cmnd.fcp_cmnd_lun[1]; +#if __FreeBSD_version >= 1000700 + lun = CAM_EXTLUN_BYTE_SWIZZLE(be64dec(aep->at_cmnd.fcp_cmnd_lun)); +#else + lun = (aep->at_cmnd.fcp_cmnd_lun[0] & 0x3f << 8) | + aep->at_cmnd.fcp_cmnd_lun[1]; +#endif /* * Find the N-port handle, and Virtual Port Index for this command. @@ -2589,7 +2605,9 @@ isp_handle_platform_atio7(ispsoftc_t *is if (tptr == NULL) { tptr = get_lun_statep(isp, chan, CAM_LUN_WILDCARD); if (tptr == NULL) { - isp_prt(isp, ISP_LOGWARN, "%s: [0x%x] no state pointer for lun %d or wildcard", __func__, aep->at_rxid, lun); + isp_prt(isp, ISP_LOGWARN, + "%s: [0x%x] no state pointer for lun %jx or wildcard", + __func__, aep->at_rxid, (uintmax_t)lun); if (lun == 0) { isp_endcmd(isp, aep, nphdl, SCSI_STATUS_BUSY, 0); } else { @@ -2711,7 +2729,8 @@ isp_handle_platform_atio7(ispsoftc_t *is atp->cdb0 = atiop->cdb_io.cdb_bytes[0]; atp->tattr = aep->at_cmnd.fcp_cmnd_task_attribute & FCP_CMND_TASK_ATTR_MASK; atp->state = ATPD_STATE_CAM; - isp_prt(isp, ISP_LOGTDEBUG0, "ATIO7[0x%x] CDB=0x%x lun %d datalen %u", aep->at_rxid, atp->cdb0, lun, atp->orig_datalen); + isp_prt(isp, ISP_LOGTDEBUG0, "ATIO7[0x%x] CDB=0x%x lun %jx datalen %u", + aep->at_rxid, atp->cdb0, (uintmax_t)lun, atp->orig_datalen); xpt_done((union ccb *)atiop); rls_lun_statep(isp, tptr); return; @@ -2999,7 +3018,7 @@ isp_handle_platform_ctio(ispsoftc_t *isp resid = ct->ct_resid; moved_data = data_requested - resid; } - isp_prt(isp, ISP_LOGTDEBUG0, "%s: CTIO[%x] seq %u nc %d tag %x S_ID 0x%x lun %d sts %x flg %x resid %d %s", __func__, ct->ct_fwhandle, ATPD_GET_SEQNO(ct), + isp_prt(isp, ISP_LOGTDEBUG0, "%s: CTIO[%x] seq %u nc %d tag %x S_ID 0x%x lun %x sts %x flg %x resid %d %s", __func__, ct->ct_fwhandle, ATPD_GET_SEQNO(ct), notify_cam, ct->ct_tag_val, ct->ct_iid, ct->ct_lun, ct->ct_status, ct->ct_flags, resid, sentstatus? "FIN" : "MID"); } if (ok) { @@ -3090,6 +3109,9 @@ isp_handle_platform_notify_fc(ispsoftc_t if (ISP_CAP_SCCFW(isp)) { lun = inp->in_scclun; +#if __FreeBSD_version < 1000700 + lun &= 0x3fff; +#endif } else { lun = inp->in_lun; } @@ -3849,8 +3871,9 @@ isp_ldt_task(void *arg, int pending) if (dbidx != XS_TGT(xs)) { continue; } - isp_prt(isp, ISP_LOGWARN, "command handle 0x%x for %d.%d.%d orphaned by loop down timeout", - isp->isp_xflist[i].handle, chan, XS_TGT(xs), XS_LUN(xs)); + isp_prt(isp, ISP_LOGWARN, "command handle 0x%x for %d.%d.%jx orphaned by loop down timeout", + isp->isp_xflist[i].handle, chan, XS_TGT(xs), + (uintmax_t)XS_LUN(xs)); } isp_prt(isp, ISP_LOGCONFIG, prom3, chan, dbidx, lp->portid, "Loop Down Timeout"); @@ -4034,10 +4057,11 @@ isp_action(struct cam_sim *sim, union cc } ccb->csio.req_map = NULL; #ifdef DIAGNOSTIC - if (ccb->ccb_h.target_id > (ISP_MAX_TARGETS(isp) - 1)) { + if (ccb->ccb_h.target_id >= ISP_MAX_TARGETS(isp)) { xpt_print(ccb->ccb_h.path, "invalid target\n"); ccb->ccb_h.status = CAM_PATH_INVALID; - } else if (ccb->ccb_h.target_lun > (ISP_MAX_LUNS(isp) - 1)) { + } else if (ISP_MAX_LUNS(isp) > 0 && + ccb->ccb_h.target_lun >= ISP_MAX_LUNS(isp)) { xpt_print(ccb->ccb_h.path, "invalid lun\n"); ccb->ccb_h.status = CAM_PATH_INVALID; } @@ -4080,15 +4104,23 @@ isp_action(struct cam_sim *sim, union cc 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.%d loop not seen yet @ %lu", XS_TGT(ccb), XS_LUN(ccb), (unsigned long) time_uptime); + 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.%d downtime (%d) > lim (%d)", XS_TGT(ccb), XS_LUN(ccb), ISP_FC_PC(isp, bus)->loop_down_time, lim); + 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); } ccb->ccb_h.status = CAM_SEL_TIMEOUT; isp_done((struct ccb_scsiio *) ccb); break; } - isp_prt(isp, ISP_LOGDEBUG0, "%d.%d retry later", XS_TGT(ccb), XS_LUN(ccb)); + isp_prt(isp, ISP_LOGDEBUG0, "%d.%jx retry later", + XS_TGT(ccb), (uintmax_t)XS_LUN(ccb)); cam_freeze_devq(ccb->ccb_h.path); cam_release_devq(ccb->ccb_h.path, RELSIM_RELEASE_AFTER_TIMEOUT, 0, 1000, 0); ccb->ccb_h.status = CAM_REQUEUE_REQ; @@ -4591,7 +4623,8 @@ isp_action(struct cam_sim *sim, union cc #endif cpi->hba_eng_cnt = 0; cpi->max_target = ISP_MAX_TARGETS(isp) - 1; - cpi->max_lun = ISP_MAX_LUNS(isp) - 1; + cpi->max_lun = ISP_MAX_LUNS(isp) == 0 ? + 255 : ISP_MAX_LUNS(isp) - 1; cpi->bus_id = cam_sim_bus(sim); if (isp->isp_osinfo.sixtyfourbit) cpi->maxio = (ISP_NSEG64_MAX - 1) * PAGE_SIZE; @@ -4603,6 +4636,9 @@ isp_action(struct cam_sim *sim, union cc fcparam *fcp = FCPARAM(isp, bus); cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED; +#if __FreeBSD_version >= 1000700 + cpi->hba_misc |= PIM_EXTLUNS; +#endif #if __FreeBSD_version >= 1000039 cpi->hba_misc |= PIM_NOSCAN; #endif @@ -4682,7 +4718,10 @@ isp_done(XS_T *sccb) status = sccb->ccb_h.status & CAM_STATUS_MASK; if (status != CAM_REQ_CMP) { if (status != CAM_SEL_TIMEOUT) - isp_prt(isp, ISP_LOGDEBUG0, "target %d lun %d CAM status 0x%x SCSI status 0x%x", XS_TGT(sccb), XS_LUN(sccb), sccb->ccb_h.status, sccb->scsi_status); + isp_prt(isp, ISP_LOGDEBUG0, + "target %d lun %jx CAM status 0x%x SCSI status 0x%x", + XS_TGT(sccb), (uintmax_t)XS_LUN(sccb), + sccb->ccb_h.status, sccb->scsi_status); else if ((IS_FC(isp)) && (XS_TGT(sccb) < MAX_FC_TARG)) { fcparam *fcp; @@ -5485,7 +5524,8 @@ isp_fcp_reset_crn(struct isp_fc *fc, uin int isp_fcp_next_crn(ispsoftc_t *isp, uint8_t *crnp, XS_T *cmd) { - uint32_t chan, tgt, lun; + lun_id_t lun; + uint32_t chan, tgt; struct isp_fc *fc; struct isp_nexus *nxp; int idx; Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Sat Oct 24 17:24:19 2015 (r289881) +++ head/sys/dev/isp/isp_freebsd.h Sat Oct 24 17:34:40 2015 (r289882) @@ -207,12 +207,10 @@ struct isp_pcmd { * Per nexus info. */ struct isp_nexus { - struct isp_nexus * next; - uint32_t - crnseed : 8; /* next command reference number */ - uint32_t - tgt : 16, /* TGT for target */ - lun : 16; /* LUN for target */ + uint64_t lun; /* LUN for target */ + uint32_t tgt; /* TGT for target */ + uint8_t crnseed; /* next command reference number */ + struct isp_nexus *next; }; #define NEXUS_HASH_WIDTH 32 #define INITIAL_NEXUS_COUNT MAX_FC_TARG @@ -532,7 +530,7 @@ default: \ #define XS_ISP(ccb) cam_sim_softc(xpt_path_sim((ccb)->ccb_h.path)) #define XS_CHANNEL(ccb) cam_sim_bus(xpt_path_sim((ccb)->ccb_h.path)) #define XS_TGT(ccb) (ccb)->ccb_h.target_id -#define XS_LUN(ccb) (uint32_t)((ccb)->ccb_h.target_lun) +#define XS_LUN(ccb) (ccb)->ccb_h.target_lun #define XS_CDBP(ccb) \ (((ccb)->ccb_h.flags & CAM_CDB_POINTER)? \ Modified: head/sys/dev/isp/isp_target.c ============================================================================== --- head/sys/dev/isp/isp_target.c Sat Oct 24 17:24:19 2015 (r289881) +++ head/sys/dev/isp/isp_target.c Sat Oct 24 17:34:40 2015 (r289882) @@ -953,6 +953,9 @@ isp_got_msg_fc(ispsoftc_t *isp, in_fcent /* nt_tgt set in outer layers */ if (ISP_CAP_SCCFW(isp)) { notify.nt_lun = inp->in_scclun; +#if __FreeBSD_version < 1000700 + notify.nt_lun &= 0x3fff; +#endif } else { notify.nt_lun = inp->in_lun; } @@ -1330,6 +1333,9 @@ isp_handle_atio2(ispsoftc_t *isp, at2_en if (ISP_CAP_SCCFW(isp)) { lun = aep->at_scclun; +#if __FreeBSD_version < 1000700 + lun &= 0x3fff; +#endif } else { lun = aep->at_lun; } @@ -1357,7 +1363,7 @@ isp_handle_atio2(ispsoftc_t *isp, at2_en /* * ATIO rejected by the firmware due to disabled lun. */ - isp_prt(isp, ISP_LOGERR, "rejected ATIO2 for disabled lun %d", lun); + isp_prt(isp, ISP_LOGERR, "rejected ATIO2 for disabled lun %x", lun); break; case AT_NOCAP: /* @@ -1365,7 +1371,7 @@ isp_handle_atio2(ispsoftc_t *isp, at2_en * We sent an ATIO that overflowed the firmware's * command resource count. */ - isp_prt(isp, ISP_LOGERR, "rejected ATIO2 for lun %d- command count overflow", lun); + isp_prt(isp, ISP_LOGERR, "rejected ATIO2 for lun %x- command count overflow", lun); break; case AT_BDR_MSG: @@ -1402,7 +1408,7 @@ isp_handle_atio2(ispsoftc_t *isp, at2_en default: - isp_prt(isp, ISP_LOGERR, "Unknown ATIO2 status 0x%x from loopid %d for lun %d", aep->at_status, iid, lun); + isp_prt(isp, ISP_LOGERR, "Unknown ATIO2 status 0x%x from loopid %d for lun %x", aep->at_status, iid, lun); (void) isp_target_put_atio(isp, aep); break; } From owner-svn-src-all@freebsd.org Sat Oct 24 19:04: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 72B29A1D4A3; Sat, 24 Oct 2015 19:04:56 +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 39BFB179F; Sat, 24 Oct 2015 19:04:56 +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 t9OJ4tX1030730; Sat, 24 Oct 2015 19:04:55 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9OJ4taO030729; Sat, 24 Oct 2015 19:04:55 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510241904.t9OJ4taO030729@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 24 Oct 2015 19:04:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289884 - head/sys/x86/xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2015 19:04:56 -0000 Author: cem Date: Sat Oct 24 19:04:55 2015 New Revision: 289884 URL: https://svnweb.freebsd.org/changeset/base/289884 Log: xen: Add missing semi-colon for BITSET_DEFINE() Broken when it was removed from the macro in r289867. Pointy-hat: markj Sponsored by: EMC / Isilon Storage Division Modified: head/sys/x86/xen/xen_intr.c Modified: head/sys/x86/xen/xen_intr.c ============================================================================== --- head/sys/x86/xen/xen_intr.c Sat Oct 24 18:53:22 2015 (r289883) +++ head/sys/x86/xen/xen_intr.c Sat Oct 24 19:04:55 2015 (r289884) @@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_XENINTR, "xen_intr", "Xen Interrupt Services"); #define ENABLED_SETSIZE (sizeof(u_long) * 8) -BITSET_DEFINE(enabledbits, ENABLED_SETSIZE) +BITSET_DEFINE(enabledbits, ENABLED_SETSIZE); /** * Per-cpu event channel processing state. From owner-svn-src-all@freebsd.org Sat Oct 24 19:05: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 5719CA1D4DA; Sat, 24 Oct 2015 19:05:21 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B2311907; Sat, 24 Oct 2015 19:05:21 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9OJ5JTS030800; Sat, 24 Oct 2015 19:05:19 GMT (envelope-from avatar@FreeBSD.org) Received: (from avatar@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9OJ5J4g030799; Sat, 24 Oct 2015 19:05:19 GMT (envelope-from avatar@FreeBSD.org) Message-Id: <201510241905.t9OJ5J4g030799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avatar set sender to avatar@FreeBSD.org using -f From: Tai-hwa Liang Date: Sat, 24 Oct 2015 19:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r289885 - stable/8/sys/gnu/fs/reiserfs 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: Sat, 24 Oct 2015 19:05:21 -0000 Author: avatar Date: Sat Oct 24 19:05:19 2015 New Revision: 289885 URL: https://svnweb.freebsd.org/changeset/base/289885 Log: MFC r287698: Fixing a memory leak on module unloading. Modified: stable/8/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/gnu/ (props changed) Modified: stable/8/sys/gnu/fs/reiserfs/reiserfs_vfsops.c ============================================================================== --- stable/8/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Sat Oct 24 19:04:55 2015 (r289884) +++ stable/8/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Sat Oct 24 19:05:19 2015 (r289885) @@ -1050,6 +1050,7 @@ uint32_t find_hash_out(struct reiserfs_m } } while (0); + free(ip, M_REISERFSNODE); pathrelse(&path); return (hash); } From owner-svn-src-all@freebsd.org Sat Oct 24 19: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 0A01FA1D548; Sat, 24 Oct 2015 19:05:57 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f170.google.com (mail-yk0-f170.google.com [209.85.160.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C6E6B1A5C; Sat, 24 Oct 2015 19:05:56 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykaz22 with SMTP id z22so151075415yka.2; Sat, 24 Oct 2015 12:05:49 -0700 (PDT) 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=7cDOLQ1C4jqeI+Iu1KI7wpNC7LEexAmQ4XTMDQjsfck=; b=GGZNoYCNF53gBcIwboe8jwOFBPs/XNDyiQqaj8EpDyGryXdeVDdxGuqia2fA3Q8OdJ YGRSEuYV0dp/u5KeND2ghQLOXEwYO+Mv6/MrPLkk6NrcWZQFUi7y5T3q+3KVWdouBfIL MdXOuIt6xoo8gwPgZEWTqB3SD5ha2SLfcSYwh/yJNt4f4Tbf7gmXl87UKsbaZz3IkVTK RcfFRmW7/Ex5RZpLr8bp7Qa7bx+IAme5jld9AWKG3UwhTTev33P6IWgDRn4Sr4drWGrG 9rQB9MH/Wmxfgy5r/jHkVjhE6JfPzKgpZPz7KdCixmScb9iXXyefBgKodmMtOfjgFjTx vxJA== X-Received: by 10.13.216.141 with SMTP id a135mr20268051ywe.12.1445713549693; Sat, 24 Oct 2015 12:05:49 -0700 (PDT) Received: from mail-yk0-f169.google.com (mail-yk0-f169.google.com. [209.85.160.169]) by smtp.gmail.com with ESMTPSA id i132sm7728658ywb.9.2015.10.24.12.05.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Oct 2015 12:05:49 -0700 (PDT) Received: by ykaz22 with SMTP id z22so151075310yka.2; Sat, 24 Oct 2015 12:05:49 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.129.70.139 with SMTP id t133mr19973849ywa.115.1445713549283; Sat, 24 Oct 2015 12:05:49 -0700 (PDT) Reply-To: cem@FreeBSD.org Received: by 10.37.203.75 with HTTP; Sat, 24 Oct 2015 12:05:49 -0700 (PDT) In-Reply-To: <201510240316.t9O3GeaL027021@repo.freebsd.org> References: <201510240316.t9O3GeaL027021@repo.freebsd.org> Date: Sat, 24 Oct 2015 12:05:49 -0700 Message-ID: Subject: Re: svn commit: r289867 - head/sys/sys From: Conrad Meyer To: Mark Johnston Cc: 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: Sat, 24 Oct 2015 19:05:57 -0000 This broke the build (xen_intr.c used BITSET_DEFINE() without a semi-colon). Fixed in and X-MFC-With: r289884. Best, Conrad On Fri, Oct 23, 2015 at 8:16 PM, Mark Johnston wrote: > Author: markj > Date: Sat Oct 24 03:16:40 2015 > New Revision: 289867 > URL: https://svnweb.freebsd.org/changeset/base/289867 > > Log: > Remove an erroneous semicolon. > > MFC after: 3 days > > Modified: > head/sys/sys/_bitset.h > > Modified: head/sys/sys/_bitset.h > ============================================================================== > --- head/sys/sys/_bitset.h Sat Oct 24 03:14:36 2015 (r289866) > +++ head/sys/sys/_bitset.h Sat Oct 24 03:16:40 2015 (r289867) > @@ -50,7 +50,7 @@ > #define BITSET_DEFINE(t, _s) \ > struct t { \ > long __bits[__bitset_words((_s))]; \ > -}; > +} > > #define BITSET_T_INITIALIZER(x) \ > { .__bits = { x } } > From owner-svn-src-all@freebsd.org Sat Oct 24 19:08: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 E10ADA1D64A; Sat, 24 Oct 2015 19:08:02 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pa0-x234.google.com (mail-pa0-x234.google.com [IPv6:2607:f8b0:400e:c03::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B54811D88; Sat, 24 Oct 2015 19:08:02 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by pasz6 with SMTP id z6so147193085pas.2; Sat, 24 Oct 2015 12:08:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=uGMXxnXAURvuC5UV3rTeCVdnbg5wKc0Cz10jz4LPkos=; b=KeL1RXLQDW21jk767x2vgdZc38Yqf5VhrjO1YF/yjh38RbAPxB3HZCZ5yH4S8ghoeZ MtR1pqHlIe4buiPV/WaD7+/q4M8DGATcaHN78vFUfLyPA13mjkOn74uCbaYx09j3io9J sX2lOiiiDmlMKi/Gr/fOg2w5TiPdx7zpHOAt8AWDG/l0cDxDmJTfUx7W6tmY5j4YDvnw Nrvs4Oe92FOD6yunagrgKXj0Kdzdx0MgGj+3SBEcW34iIiViycb6B8wx7+JumELXm6pP 6NNlNAu2OxiwOKaBgYK+eYuRgnqFvgfDceRYPlnw7bZTXncEiNrq/2GpcutI9W7JOp87 J3ug== X-Received: by 10.66.90.198 with SMTP id by6mr12428726pab.78.1445713682369; Sat, 24 Oct 2015 12:08:02 -0700 (PDT) Received: from raichu ([104.232.114.184]) by smtp.gmail.com with ESMTPSA id z12sm25431863pbt.30.2015.10.24.12.08.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Oct 2015 12:08:01 -0700 (PDT) Sender: Mark Johnston Date: Sat, 24 Oct 2015 12:07:53 -0700 From: Mark Johnston To: Conrad Meyer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289867 - head/sys/sys Message-ID: <20151024190753.GA20161@raichu> References: <201510240316.t9O3GeaL027021@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: Sat, 24 Oct 2015 19:08:03 -0000 On Sat, Oct 24, 2015 at 12:05:49PM -0700, Conrad Meyer wrote: > This broke the build (xen_intr.c used BITSET_DEFINE() without a semi-colon). > > Fixed in and X-MFC-With: r289884. Thanks, and sorry for the breakage. > > Best, > Conrad > > On Fri, Oct 23, 2015 at 8:16 PM, Mark Johnston wrote: > > Author: markj > > Date: Sat Oct 24 03:16:40 2015 > > New Revision: 289867 > > URL: https://svnweb.freebsd.org/changeset/base/289867 > > > > Log: > > Remove an erroneous semicolon. > > > > MFC after: 3 days > > > > Modified: > > head/sys/sys/_bitset.h > > > > Modified: head/sys/sys/_bitset.h > > ============================================================================== > > --- head/sys/sys/_bitset.h Sat Oct 24 03:14:36 2015 (r289866) > > +++ head/sys/sys/_bitset.h Sat Oct 24 03:16:40 2015 (r289867) > > @@ -50,7 +50,7 @@ > > #define BITSET_DEFINE(t, _s) \ > > struct t { \ > > long __bits[__bitset_words((_s))]; \ > > -}; > > +} > > > > #define BITSET_T_INITIALIZER(x) \ > > { .__bits = { x } } > > From owner-svn-src-all@freebsd.org Sat Oct 24 19:38: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 A993AA1DD75; Sat, 24 Oct 2015 19:38:07 +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 786D1D09; Sat, 24 Oct 2015 19:38:07 +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 t9OJc6B4039567; Sat, 24 Oct 2015 19:38:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9OJc6tu039565; Sat, 24 Oct 2015 19:38:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510241938.t9OJc6tu039565@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 24 Oct 2015 19:38:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289886 - 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: Sat, 24 Oct 2015 19:38:07 -0000 Author: mav Date: Sat Oct 24 19:38:06 2015 New Revision: 289886 URL: https://svnweb.freebsd.org/changeset/base/289886 Log: Add new field to Abort IOCB. Modified: head/sys/dev/isp/isp_library.c head/sys/dev/isp/ispmbox.h Modified: head/sys/dev/isp/isp_library.c ============================================================================== --- head/sys/dev/isp/isp_library.c Sat Oct 24 19:05:19 2015 (r289885) +++ head/sys/dev/isp/isp_library.c Sat Oct 24 19:38:06 2015 (r289886) @@ -1071,6 +1071,7 @@ isp_put_24xx_abrt(ispsoftc_t *isp, isp24 ISP_IOXPUT_16(isp, src->abrt_nphdl, &dst->abrt_nphdl); ISP_IOXPUT_16(isp, src->abrt_options, &dst->abrt_options); ISP_IOXPUT_32(isp, src->abrt_cmd_handle, &dst->abrt_cmd_handle); + ISP_IOXPUT_16(isp, src->abrt_queue_number, &dst->abrt_queue_number); for (i = 0; i < ASIZE(src->abrt_reserved); i++) { ISP_IOXPUT_8(isp, src->abrt_reserved[i], &dst->abrt_reserved[i]); } @@ -1179,6 +1180,7 @@ isp_get_24xx_abrt(ispsoftc_t *isp, isp24 ISP_IOXGET_16(isp, &src->abrt_nphdl, dst->abrt_nphdl); ISP_IOXGET_16(isp, &src->abrt_options, dst->abrt_options); ISP_IOXGET_32(isp, &src->abrt_cmd_handle, dst->abrt_cmd_handle); + ISP_IOXGET_16(isp, &src->abrt_queue_number, dst->abrt_queue_number); for (i = 0; i < ASIZE(src->abrt_reserved); i++) { ISP_IOXGET_8(isp, &src->abrt_reserved[i], dst->abrt_reserved[i]); } Modified: head/sys/dev/isp/ispmbox.h ============================================================================== --- head/sys/dev/isp/ispmbox.h Sat Oct 24 19:05:19 2015 (r289885) +++ head/sys/dev/isp/ispmbox.h Sat Oct 24 19:38:06 2015 (r289886) @@ -574,7 +574,8 @@ typedef struct { uint16_t abrt_nphdl; uint16_t abrt_options; uint32_t abrt_cmd_handle; - uint8_t abrt_reserved[32]; + uint16_t abrt_queue_number; + uint8_t abrt_reserved[30]; uint16_t abrt_tidlo; uint8_t abrt_tidhi; uint8_t abrt_vpidx; From owner-svn-src-all@freebsd.org Sat Oct 24 19:39: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 9CC8DA1DDE6; Sat, 24 Oct 2015 19:39:42 +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 4E0C5E62; Sat, 24 Oct 2015 19:39:42 +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 t9OJdfoS039675; Sat, 24 Oct 2015 19:39:41 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9OJdfEh039673; Sat, 24 Oct 2015 19:39:41 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510241939.t9OJdfEh039673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 24 Oct 2015 19:39:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289887 - 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, 24 Oct 2015 19:39:42 -0000 Author: ian Date: Sat Oct 24 19:39:41 2015 New Revision: 289887 URL: https://svnweb.freebsd.org/changeset/base/289887 Log: Rename dcache_dma_preread() to dcache_inv_poc_dma() to make it clear that it is a dcache invalidate to point of coherency just like dcache_inv_poc(), but a slightly different version specific to dma operations. Elaborate the comment about how and why it's different. Modified: head/sys/arm/arm/busdma_machdep-v6.c head/sys/arm/include/cpu-v6.h Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Sat Oct 24 19:38:06 2015 (r289886) +++ head/sys/arm/arm/busdma_machdep-v6.c Sat Oct 24 19:39:41 2015 (r289887) @@ -1284,7 +1284,7 @@ dma_preread_safe(vm_offset_t va, vm_padd if ((va + size) & cpuinfo.dcache_line_mask) dcache_wb_poc(va + size, pa + size, 1); - dcache_dma_preread(va, pa, size); + dcache_inv_poc_dma(va, pa, size); } static void @@ -1406,7 +1406,7 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus if ((op & BUS_DMASYNC_PREREAD) && !(op & BUS_DMASYNC_PREWRITE)) { bpage = STAILQ_FIRST(&map->bpages); while (bpage != NULL) { - dcache_dma_preread(bpage->vaddr, bpage->busaddr, + dcache_inv_poc_dma(bpage->vaddr, bpage->busaddr, bpage->datacount); bpage = STAILQ_NEXT(bpage, links); } Modified: head/sys/arm/include/cpu-v6.h ============================================================================== --- head/sys/arm/include/cpu-v6.h Sat Oct 24 19:38:06 2015 (r289886) +++ head/sys/arm/include/cpu-v6.h Sat Oct 24 19:39:41 2015 (r289887) @@ -471,15 +471,17 @@ dcache_inv_poc(vm_offset_t va, vm_paddr_ } /* - * Discard D-cache lines to PoC, prior to overwrite by DMA engine + * Discard D-cache lines to PoC, prior to overwrite by DMA engine. * - * Invalidate caches, discarding data in dirty lines. This is useful - * if the memory is about to be overwritten, e.g. by a DMA engine. - * Invalidate caches from innermost to outermost to follow the flow - * of dirty cachelines. + * Normal invalidation does L2 then L1 to ensure that stale data from L2 doesn't + * flow into L1 while invalidating. This routine is intended to be used only + * when invalidating a buffer before a DMA operation loads new data into memory. + * The concern in this case is that dirty lines are not evicted to main memory, + * overwriting the DMA data. For that reason, the L1 is done first to ensure + * that an evicted L1 line doesn't flow to L2 after the L2 has been cleaned. */ static __inline void -dcache_dma_preread(vm_offset_t va, vm_paddr_t pa, vm_size_t size) +dcache_inv_poc_dma(vm_offset_t va, vm_paddr_t pa, vm_size_t size) { vm_offset_t eva = va + size; From owner-svn-src-all@freebsd.org Sat Oct 24 19:40: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 E0329A1DE7B; Sat, 24 Oct 2015 19:40:04 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FE0E104C; Sat, 24 Oct 2015 19:40:04 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9OJe3B7039795; Sat, 24 Oct 2015 19:40:03 GMT (envelope-from avatar@FreeBSD.org) Received: (from avatar@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9OJe3LE039794; Sat, 24 Oct 2015 19:40:03 GMT (envelope-from avatar@FreeBSD.org) Message-Id: <201510241940.t9OJe3LE039794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avatar set sender to avatar@FreeBSD.org using -f From: Tai-hwa Liang Date: Sat, 24 Oct 2015 19:40:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289888 - head/sys/dev/sound/midi X-SVN-Group: head MIME-Version: 1.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, 24 Oct 2015 19:40:05 -0000 Author: avatar Date: Sat Oct 24 19:40:03 2015 New Revision: 289888 URL: https://svnweb.freebsd.org/changeset/base/289888 Log: - Plugging a memory leak when malloc() failed during initialisation; - Plugging another memory leak inside the destructor. Reviewed by: matk MFC after: 3 weeks Modified: head/sys/dev/sound/midi/midi.c Modified: head/sys/dev/sound/midi/midi.c ============================================================================== --- head/sys/dev/sound/midi/midi.c Sat Oct 24 19:39:41 2015 (r289887) +++ head/sys/dev/sound/midi/midi.c Sat Oct 24 19:40:03 2015 (r289888) @@ -319,6 +319,8 @@ midi_init(kobj_class_t cls, int unit, in goto err0; m->synth = malloc(sizeof(*m->synth), M_MIDI, M_NOWAIT | M_ZERO); + if (m->synth == NULL) + goto err1; kobj_init((kobj_t)m->synth, &midisynth_class); m->synth->m = m; kobj_init((kobj_t)m, cls); @@ -327,7 +329,7 @@ midi_init(kobj_class_t cls, int unit, in MIDI_DEBUG(1, printf("midiinit queues %d/%d.\n", inqsize, outqsize)); if (!inqsize && !outqsize) - goto err1; + goto err2; mtx_init(&m->lock, "raw midi", NULL, 0); mtx_init(&m->qlock, "q raw midi", NULL, 0); @@ -352,7 +354,7 @@ midi_init(kobj_class_t cls, int unit, in if ((inqsize && !MIDIQ_BUF(m->inq)) || (outqsize && !MIDIQ_BUF(m->outq))) - goto err2; + goto err3; m->busy = 0; @@ -362,7 +364,7 @@ midi_init(kobj_class_t cls, int unit, in m->cookie = cookie; if (MPU_INIT(m, cookie)) - goto err2; + goto err3; mtx_unlock(&m->lock); mtx_unlock(&m->qlock); @@ -378,13 +380,14 @@ midi_init(kobj_class_t cls, int unit, in return m; -err2: mtx_destroy(&m->qlock); +err3: mtx_destroy(&m->qlock); mtx_destroy(&m->lock); if (MIDIQ_BUF(m->inq)) free(MIDIQ_BUF(m->inq), M_MIDI); if (MIDIQ_BUF(m->outq)) free(MIDIQ_BUF(m->outq), M_MIDI); +err2: free(m->synth, M_MIDI); err1: free(m, M_MIDI); err0: mtx_unlock(&midistat_lock); MIDI_DEBUG(1, printf("midi_init ended in error\n")); @@ -1388,6 +1391,7 @@ midi_destroy(struct snd_midi *m, int mid free(MIDIQ_BUF(m->outq), M_MIDI); mtx_destroy(&m->qlock); mtx_destroy(&m->lock); + free(m->synth, M_MIDI); free(m, M_MIDI); return 0; } From owner-svn-src-all@freebsd.org Sat Oct 24 19:40: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 9AD27A1DEC9; Sat, 24 Oct 2015 19:40:28 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 523A111A4; Sat, 24 Oct 2015 19:40:28 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9OJeRfT039855; Sat, 24 Oct 2015 19:40:27 GMT (envelope-from avatar@FreeBSD.org) Received: (from avatar@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9OJeRhr039854; Sat, 24 Oct 2015 19:40:27 GMT (envelope-from avatar@FreeBSD.org) Message-Id: <201510241940.t9OJeRhr039854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avatar set sender to avatar@FreeBSD.org using -f From: Tai-hwa Liang Date: Sat, 24 Oct 2015 19:40:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r289889 - stable/7/sys/gnu/fs/reiserfs X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2015 19:40:28 -0000 Author: avatar Date: Sat Oct 24 19:40:27 2015 New Revision: 289889 URL: https://svnweb.freebsd.org/changeset/base/289889 Log: MFC r238980: Just like the other file systems found in /sys/fs, g_vfs_open() should be paried with g_vfs_close(). Though g_vfs_close() is a wrapper around g_wither_geom_close(), r206130 added the following test in g_vfs_open(): if (bo->bo_private != vp) return (EBUSY); Which will cause a 'Device busy' error inside reiserfs_mountfs() if the same file system is re-mounted again after umount or mounting failure: (case 1, /dev/ad4s3 is not a valid REISERFS partition) # mount -t reiserfs -o ro /dev/ad4s3 /mnt mount: /dev/ad4s3: Invalid argument # mount -t msdosfs -o ro /dev/ad4s3 /mnt mount: /dev/ad4s3: Device busy (case 2, /dev/ad4s3 is a valid REISERFS partition) # mount -t reiserfs -o ro /dev/ad4s3 /mnt # umount /mnt # mount -t reiserfs -o ro /dev/ad4s3 /mnt mount: /dev/ad4s3: Device busy On the other hand, g_vfs_close() 'fixed' the above cases by doing an extra step to keep 'sc->sc_bo->bo_private' and 'cp->private' pointers synchronised. Reviewed by: kib Modified: stable/7/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/gnu/fs/reiserfs/reiserfs_vfsops.c ============================================================================== --- stable/7/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Sat Oct 24 19:40:03 2015 (r289888) +++ stable/7/sys/gnu/fs/reiserfs/reiserfs_vfsops.c Sat Oct 24 19:40:27 2015 (r289889) @@ -223,7 +223,7 @@ reiserfs_unmount(struct mount *mp, int m DROP_GIANT(); g_topology_lock(); - g_wither_geom_close(rmp->rm_cp->geom, ENXIO); + g_vfs_close(rmp->rm_cp, td); g_topology_unlock(); PICKUP_GIANT(); vrele(rmp->rm_devvp); @@ -635,7 +635,7 @@ out: if (cp != NULL) { DROP_GIANT(); g_topology_lock(); - g_wither_geom_close(cp->geom, ENXIO); + g_vfs_close(cp, td); g_topology_unlock(); PICKUP_GIANT(); } From owner-svn-src-all@freebsd.org Sat Oct 24 19:47: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 D9522A1E079; Sat, 24 Oct 2015 19:47:55 +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 A6EBB15CF; Sat, 24 Oct 2015 19:47: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 t9OJls2h042558; Sat, 24 Oct 2015 19:47:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9OJlsf9042556; Sat, 24 Oct 2015 19:47:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510241947.t9OJlsf9042556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 24 Oct 2015 19:47:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289890 - 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: Sat, 24 Oct 2015 19:47:55 -0000 Author: mav Date: Sat Oct 24 19:47:54 2015 New Revision: 289890 URL: https://svnweb.freebsd.org/changeset/base/289890 Log: Skip reserved IP Broadcast handle from using. Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/ispvar.h Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sat Oct 24 19:40:27 2015 (r289889) +++ head/sys/dev/isp/isp.c Sat Oct 24 19:47:54 2015 (r289890) @@ -3164,7 +3164,7 @@ isp_scan_loop(ispsoftc_t *isp, int chan) continue; } if (ISP_CAP_2KLOGIN(isp)) { - if (handle >= NPH_RESERVED && handle <= NPH_FL_ID) { + if (handle >= NPH_RESERVED && handle <= NPH_IP_BCST) { continue; } } @@ -4301,8 +4301,8 @@ isp_nxt_handle(ispsoftc_t *isp, int chan if (handle >= FL_ID && handle <= SNS_ID) { handle = SNS_ID+1; } - if (handle >= NPH_RESERVED && handle <= NPH_FL_ID) { - handle = NPH_FL_ID+1; + if (handle >= NPH_RESERVED && handle <= NPH_IP_BCST) { + handle = NPH_IP_BCST + 1; } if (ISP_CAP_2KLOGIN(isp)) { if (handle == NPH_MAX_2K) { Modified: head/sys/dev/isp/ispvar.h ============================================================================== --- head/sys/dev/isp/ispvar.h Sat Oct 24 19:40:27 2015 (r289889) +++ head/sys/dev/isp/ispvar.h Sat Oct 24 19:47:54 2015 (r289890) @@ -253,7 +253,7 @@ typedef struct { #define NPH_SNS_ID 0x7FC /* SNS Server Special ID */ #define NPH_FABRIC_CTLR 0x7FD /* Fabric Controller (0xFFFFFD) */ #define NPH_FL_ID 0x7FE /* F Port Special ID (0xFFFFFE) */ -#define NPH_IP_BCST 0x7ff /* IP Broadcast Special ID (0xFFFFFF) */ +#define NPH_IP_BCST 0x7FF /* IP Broadcast Special ID (0xFFFFFF) */ #define NPH_MAX_2K 0x800 /* From owner-svn-src-all@freebsd.org Sat Oct 24 19:59: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 A41C0A1E326; Sat, 24 Oct 2015 19:59:16 +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 4A4641BD8; Sat, 24 Oct 2015 19:59:16 +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 t9OJxF2m045490; Sat, 24 Oct 2015 19:59:15 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9OJxF55045489; Sat, 24 Oct 2015 19:59:15 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201510241959.t9OJxF55045489@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sat, 24 Oct 2015 19:59:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289891 - 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: Sat, 24 Oct 2015 19:59:16 -0000 Author: avos Date: Sat Oct 24 19:59:15 2015 New Revision: 289891 URL: https://svnweb.freebsd.org/changeset/base/289891 Log: urtwn(4): fix mbuf leak in the TX path Reviewed by: kevlo Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D3988 Modified: head/sys/dev/usb/wlan/if_urtwn.c Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Sat Oct 24 19:47:54 2015 (r289890) +++ head/sys/dev/usb/wlan/if_urtwn.c Sat Oct 24 19:59:15 2015 (r289891) @@ -183,7 +183,8 @@ static struct mbuf * urtwn_rx_frame(stru int *); static struct mbuf * urtwn_rxeof(struct usb_xfer *, struct urtwn_data *, int *, int8_t *); -static void urtwn_txeof(struct usb_xfer *, struct urtwn_data *); +static void urtwn_txeof(struct urtwn_softc *, struct urtwn_data *, + int); static int urtwn_alloc_list(struct urtwn_softc *, struct urtwn_data[], int, int); static int urtwn_alloc_rx_list(struct urtwn_softc *); @@ -815,16 +816,19 @@ tr_setup: } static void -urtwn_txeof(struct usb_xfer *xfer, struct urtwn_data *data) +urtwn_txeof(struct urtwn_softc *sc, struct urtwn_data *data, int status) { - struct urtwn_softc *sc = usbd_xfer_softc(xfer); URTWN_ASSERT_LOCKED(sc); - /* XXX status? */ - ieee80211_tx_complete(data->ni, data->m, 0); + + ieee80211_tx_complete(data->ni, data->m, status); + data->ni = NULL; data->m = NULL; + sc->sc_txtimer = 0; + + STAILQ_INSERT_TAIL(&sc->sc_tx_inactive, data, next); } static int @@ -937,8 +941,7 @@ urtwn_bulk_tx_callback(struct usb_xfer * if (data == NULL) goto tr_setup; STAILQ_REMOVE_HEAD(&sc->sc_tx_active, next); - urtwn_txeof(xfer, data); - STAILQ_INSERT_TAIL(&sc->sc_tx_inactive, data, next); + urtwn_txeof(sc, data, 0); /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: @@ -956,12 +959,8 @@ tr_setup: data = STAILQ_FIRST(&sc->sc_tx_active); if (data == NULL) goto tr_setup; - if (data->ni != NULL) { - if_inc_counter(data->ni->ni_vap->iv_ifp, - IFCOUNTER_OERRORS, 1); - ieee80211_free_node(data->ni); - data->ni = NULL; - } + STAILQ_REMOVE_HEAD(&sc->sc_tx_active, next); + urtwn_txeof(sc, data, 1); if (error != USB_ERR_CANCELLED) { usbd_xfer_set_stall(xfer); goto tr_setup; From owner-svn-src-all@freebsd.org Sat Oct 24 21:25: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 5E859A1D1C1; Sat, 24 Oct 2015 21:25:55 +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 09CA6181; Sat, 24 Oct 2015 21:25:54 +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 t9OLPsMU071009; Sat, 24 Oct 2015 21:25:54 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9OLPsct071008; Sat, 24 Oct 2015 21:25:54 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510242125.t9OLPsct071008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 24 Oct 2015 21:25:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289892 - 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, 24 Oct 2015 21:25:55 -0000 Author: ian Date: Sat Oct 24 21:25:53 2015 New Revision: 289892 URL: https://svnweb.freebsd.org/changeset/base/289892 Log: Provide armv4/v5 implementations of several of the armv6 cache maintenance functions. This will make it possible to use the same busdma code for all arm platforms v4 thru v7. Modified: head/sys/arm/include/cpu-v6.h Modified: head/sys/arm/include/cpu-v6.h ============================================================================== --- head/sys/arm/include/cpu-v6.h Sat Oct 24 19:59:15 2015 (r289891) +++ head/sys/arm/include/cpu-v6.h Sat Oct 24 21:25:53 2015 (r289892) @@ -34,6 +34,7 @@ #error Only include this file in the kernel #else +#include #include "machine/atomic.h" #include "machine/cpufunc.h" #include "machine/cpuinfo.h" @@ -263,6 +264,12 @@ _W64F1(cp15_cnthp_cval_set, CP15_CNTHP_C #undef _WF0 #undef _WF1 +#if __ARM_ARCH >= 6 +/* + * Cache and TLB maintenance operations for armv6+ code. The #else block + * provides armv4/v5 implementations for a few of these used in common code. + */ + /* * TLB maintenance operations. */ @@ -558,6 +565,47 @@ cp15_ttbr_set(uint32_t reg) tlb_flush_all_ng_local(); } +#else /* ! __ARM_ARCH >= 6 */ + +/* + * armv4/5 compatibility shims. + * + * These functions provide armv4 cache maintenance using the new armv6 names. + * Included here are just the functions actually used now in common code; it may + * be necessary to add things here over time. + * + * The callers of the dcache functions expect these routines to handle address + * and size values which are not aligned to cacheline boundaries; the armv4 and + * armv5 asm code handles that. + */ + +static __inline void +dcache_inv_poc(vm_offset_t va, vm_paddr_t pa, vm_size_t size) +{ + + cpu_dcache_inv_range(va, size); + cpu_l2cache_inv_range(va, size); +} + +static __inline void +dcache_inv_poc_dma(vm_offset_t va, vm_paddr_t pa, vm_size_t size) +{ + + /* See armv6 code, above, for why we do L2 before L1 in this case. */ + cpu_l2cache_inv_range(va, size); + cpu_dcache_inv_range(va, size); +} + +static __inline void +dcache_wb_poc(vm_offset_t va, vm_paddr_t pa, vm_size_t size) +{ + + cpu_dcache_wb_range(va, size); + cpu_l2cache_wb_range(va, size); +} + +#endif /* __ARM_ARCH >= 6 */ + #endif /* _KERNEL */ #endif /* !MACHINE_CPU_V6_H */ From owner-svn-src-all@freebsd.org Sat Oct 24 21:27: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 86D51A1D25B; Sat, 24 Oct 2015 21:27:10 +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 39C67626; Sat, 24 Oct 2015 21:27:10 +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 t9OLR9UI071195; Sat, 24 Oct 2015 21:27:09 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9OLR9dv071194; Sat, 24 Oct 2015 21:27:09 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201510242127.t9OLR9dv071194@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 24 Oct 2015 21:27:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289893 - 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, 24 Oct 2015 21:27:10 -0000 Author: ian Date: Sat Oct 24 21:27:09 2015 New Revision: 289893 URL: https://svnweb.freebsd.org/changeset/base/289893 Log: Define a couple macros to access cacheline size/mask in an arch-dependent way. This code should now work for all arm versions v4 thru v7. Modified: head/sys/arm/arm/busdma_machdep-v6.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Sat Oct 24 21:25:53 2015 (r289892) +++ head/sys/arm/arm/busdma_machdep-v6.c Sat Oct 24 21:27:09 2015 (r289893) @@ -61,6 +61,14 @@ __FBSDID("$FreeBSD$"); #include #include +#if __ARM_ARCH < 6 +#define BUSDMA_DCACHE_ALIGN arm_dcache_align +#define BUSDMA_DCACHE_MASK arm_dcache_align_mask +#else +#define BUSDMA_DCACHE_ALIGN cpuinfo.dcache_line_size +#define BUSDMA_DCACHE_MASK cpuinfo.dcache_line_mask +#endif + #define MAX_BPAGES 64 #define MAX_DMA_SEGMENTS 4096 #define BUS_DMA_EXCL_BOUNCE BUS_DMA_BUS2 @@ -234,7 +242,7 @@ busdma_init(void *dummy) /* Create a cache of buffers in standard (cacheable) memory. */ standard_allocator = busdma_bufalloc_create("buffer", - arm_dcache_align, /* minimum_alignment */ + BUSDMA_DCACHE_ALIGN,/* minimum_alignment */ NULL, /* uma_alloc func */ NULL, /* uma_free func */ uma_flags); /* uma_zcreate_flags */ @@ -253,7 +261,7 @@ busdma_init(void *dummy) * BUS_DMA_COHERENT (and potentially BUS_DMA_NOCACHE) flag. */ coherent_allocator = busdma_bufalloc_create("coherent", - arm_dcache_align, /* minimum_alignment */ + BUSDMA_DCACHE_ALIGN,/* minimum_alignment */ busdma_bufalloc_alloc_uncacheable, busdma_bufalloc_free_uncacheable, uma_flags); /* uma_zcreate_flags */ @@ -1279,9 +1287,9 @@ dma_preread_safe(vm_offset_t va, vm_padd * as dcache_wb_poc() will do the rounding for us and works * at cacheline granularity. */ - if (va & cpuinfo.dcache_line_mask) + if (va & BUSDMA_DCACHE_MASK) dcache_wb_poc(va, pa, 1); - if ((va + size) & cpuinfo.dcache_line_mask) + if ((va + size) & BUSDMA_DCACHE_MASK) dcache_wb_poc(va + size, pa + size, 1); dcache_inv_poc_dma(va, pa, size); From owner-svn-src-all@freebsd.org Sat Oct 24 21:37: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 8DC85A1D497; Sat, 24 Oct 2015 21:37:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48576C64; Sat, 24 Oct 2015 21:37:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9OLbmWX074114; Sat, 24 Oct 2015 21:37:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9OLbmrj074110; Sat, 24 Oct 2015 21:37:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510242137.t9OLbmrj074110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 24 Oct 2015 21:37:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289894 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head MIME-Version: 1.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, 24 Oct 2015 21:37:49 -0000 Author: kib Date: Sat Oct 24 21:37:47 2015 New Revision: 289894 URL: https://svnweb.freebsd.org/changeset/base/289894 Log: Intel SDM before revision 56 described the CLFLUSH instruction as only ordered with the MFENCE instruction. Similar weak guarantees are also specified by the AMD APM vol. 3 rev. 3.22. x86 pmap methods pmap_invalidate_cache_range() and pmap_invalidate_cache_pages() braced CLFLUSH loop with MFENCE both before and after the loop. In the revision 56 of SDM, Intel stated that all existing implementations of CLFLUSH are strict, CLFLUSH instructions execution is ordered WRT other CLFLUSH and writes. Also, the strict behaviour is made architectural. A new instruction CLFLUSHOPT (which was documented for some time in the Instruction Set Extensions Programming Reference) provides the weak behaviour which was previously attributed to CLFLUSH. Use CLFLUSHOPT when available. When CLFLUSH is used on Intel CPUs, do not execute MFENCE before and after the flushing loop. Reviewed by: alc Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/amd64/initcpu.c head/sys/amd64/amd64/pmap.c head/sys/i386/i386/initcpu.c head/sys/i386/i386/pmap.c Modified: head/sys/amd64/amd64/initcpu.c ============================================================================== --- head/sys/amd64/amd64/initcpu.c Sat Oct 24 21:27:09 2015 (r289893) +++ head/sys/amd64/amd64/initcpu.c Sat Oct 24 21:37:47 2015 (r289894) @@ -211,12 +211,17 @@ initializecpucache(void) * CPUID_SS feature even though the native CPU supports it. */ TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable); - if (vm_guest != VM_GUEST_NO && hw_clflush_disable == -1) + if (vm_guest != VM_GUEST_NO && hw_clflush_disable == -1) { cpu_feature &= ~CPUID_CLFSH; + cpu_stdext_feature &= ~CPUID_STDEXT_CLFLUSHOPT; + } + /* - * Allow to disable CLFLUSH feature manually by - * hw.clflush_disable tunable. + * The kernel's use of CLFLUSH{,OPT} can be disabled manually + * by setting the hw.clflush_disable tunable. */ - if (hw_clflush_disable == 1) + if (hw_clflush_disable == 1) { cpu_feature &= ~CPUID_CLFSH; + cpu_stdext_feature &= ~CPUID_STDEXT_CLFLUSHOPT; + } } Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat Oct 24 21:27:09 2015 (r289893) +++ head/sys/amd64/amd64/pmap.c Sat Oct 24 21:37:47 2015 (r289894) @@ -1710,9 +1710,8 @@ pmap_invalidate_cache_range(vm_offset_t if ((cpu_feature & CPUID_SS) != 0 && !force) ; /* If "Self Snoop" is supported and allowed, do nothing. */ - else if ((cpu_feature & CPUID_CLFSH) != 0 && + else if ((cpu_stdext_feature & CPUID_STDEXT_CLFLUSHOPT) != 0 && eva - sva < PMAP_CLFLUSH_THRESHOLD) { - /* * XXX: Some CPUs fault, hang, or trash the local APIC * registers if we use CLFLUSH on the local APIC @@ -1731,8 +1730,21 @@ pmap_invalidate_cache_range(vm_offset_t */ mfence(); for (; sva < eva; sva += cpu_clflush_line_size) - clflush(sva); + clflushopt(sva); mfence(); + } else if ((cpu_feature & CPUID_CLFSH) != 0 && + eva - sva < PMAP_CLFLUSH_THRESHOLD) { + if (pmap_kextract(sva) == lapic_paddr) + return; + /* + * Writes are ordered by CLFLUSH on Intel CPUs. + */ + if (cpu_vendor_id != CPU_VENDOR_INTEL) + mfence(); + for (; sva < eva; sva += cpu_clflush_line_size) + clflush(sva); + if (cpu_vendor_id != CPU_VENDOR_INTEL) + mfence(); } else { /* @@ -1756,19 +1768,27 @@ pmap_invalidate_cache_pages(vm_page_t *p { vm_offset_t daddr, eva; int i; + bool useclflushopt; + useclflushopt = (cpu_stdext_feature & CPUID_STDEXT_CLFLUSHOPT) != 0; if (count >= PMAP_CLFLUSH_THRESHOLD / PAGE_SIZE || - (cpu_feature & CPUID_CLFSH) == 0) + ((cpu_feature & CPUID_CLFSH) == 0 && !useclflushopt)) pmap_invalidate_cache(); else { - mfence(); + if (useclflushopt || cpu_vendor_id != CPU_VENDOR_INTEL) + mfence(); for (i = 0; i < count; i++) { daddr = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pages[i])); eva = daddr + PAGE_SIZE; - for (; daddr < eva; daddr += cpu_clflush_line_size) - clflush(daddr); + for (; daddr < eva; daddr += cpu_clflush_line_size) { + if (useclflushopt) + clflushopt(daddr); + else + clflush(daddr); + } } - mfence(); + if (useclflushopt || cpu_vendor_id != CPU_VENDOR_INTEL) + mfence(); } } Modified: head/sys/i386/i386/initcpu.c ============================================================================== --- head/sys/i386/i386/initcpu.c Sat Oct 24 21:27:09 2015 (r289893) +++ head/sys/i386/i386/initcpu.c Sat Oct 24 21:37:47 2015 (r289894) @@ -826,14 +826,18 @@ initializecpucache(void) * CPUID_SS feature even though the native CPU supports it. */ TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable); - if (vm_guest != VM_GUEST_NO && hw_clflush_disable == -1) + if (vm_guest != VM_GUEST_NO && hw_clflush_disable == -1) { cpu_feature &= ~CPUID_CLFSH; + cpu_stdext_feature &= ~CPUID_STDEXT_CLFLUSHOPT; + } /* - * Allow to disable CLFLUSH feature manually by - * hw.clflush_disable tunable. + * The kernel's use of CLFLUSH{,OPT} can be disabled manually + * by setting the hw.clflush_disable tunable. */ - if (hw_clflush_disable == 1) + if (hw_clflush_disable == 1) { cpu_feature &= ~CPUID_CLFSH; + cpu_stdext_feature &= ~CPUID_STDEXT_CLFLUSHOPT; + } #if defined(PC98) && !defined(CPU_UPGRADE_HW_CACHE) /* Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sat Oct 24 21:27:09 2015 (r289893) +++ head/sys/i386/i386/pmap.c Sat Oct 24 21:37:47 2015 (r289894) @@ -1234,9 +1234,8 @@ pmap_invalidate_cache_range(vm_offset_t if ((cpu_feature & CPUID_SS) != 0 && !force) ; /* If "Self Snoop" is supported and allowed, do nothing. */ - else if ((cpu_feature & CPUID_CLFSH) != 0 && + else if ((cpu_stdext_feature & CPUID_STDEXT_CLFLUSHOPT) != 0 && eva - sva < PMAP_CLFLUSH_THRESHOLD) { - #ifdef DEV_APIC /* * XXX: Some CPUs fault, hang, or trash the local APIC @@ -1256,8 +1255,21 @@ pmap_invalidate_cache_range(vm_offset_t */ mfence(); for (; sva < eva; sva += cpu_clflush_line_size) - clflush(sva); + clflushopt(sva); mfence(); + } else if ((cpu_feature & CPUID_CLFSH) != 0 && + eva - sva < PMAP_CLFLUSH_THRESHOLD) { + if (pmap_kextract(sva) == lapic_paddr) + return; + /* + * Writes are ordered by CLFLUSH on Intel CPUs. + */ + if (cpu_vendor_id != CPU_VENDOR_INTEL) + mfence(); + for (; sva < eva; sva += cpu_clflush_line_size) + clflush(sva); + if (cpu_vendor_id != CPU_VENDOR_INTEL) + mfence(); } else { /* @@ -5224,8 +5236,10 @@ pmap_flush_page(vm_page_t m) { struct sysmaps *sysmaps; vm_offset_t sva, eva; + bool useclflushopt; - if ((cpu_feature & CPUID_CLFSH) != 0) { + useclflushopt = (cpu_stdext_feature & CPUID_STDEXT_CLFLUSHOPT) != 0; + if (useclflushopt || (cpu_feature & CPUID_CLFSH) != 0) { sysmaps = &sysmaps_pcpu[PCPU_GET(cpuid)]; mtx_lock(&sysmaps->lock); if (*sysmaps->CMAP2) @@ -5239,13 +5253,20 @@ pmap_flush_page(vm_page_t m) /* * Use mfence despite the ordering implied by - * mtx_{un,}lock() because clflush is not guaranteed - * to be ordered by any other instruction. + * mtx_{un,}lock() because clflush on non-Intel CPUs + * and clflushopt are not guaranteed to be ordered by + * any other instruction. */ - mfence(); - for (; sva < eva; sva += cpu_clflush_line_size) - clflush(sva); - mfence(); + if (useclflushopt || cpu_vendor_id != CPU_VENDOR_INTEL) + mfence(); + for (; sva < eva; sva += cpu_clflush_line_size) { + if (useclflushopt) + clflushopt(sva); + else + clflush(sva); + } + if (useclflushopt || cpu_vendor_id != CPU_VENDOR_INTEL) + mfence(); *sysmaps->CMAP2 = 0; sched_unpin(); mtx_unlock(&sysmaps->lock); From owner-svn-src-all@freebsd.org Sat Oct 24 21:59: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 86B5AA1D96C; Sat, 24 Oct 2015 21:59: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 5685D187F; Sat, 24 Oct 2015 21:59:23 +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 t9OLxMls079799; Sat, 24 Oct 2015 21:59:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9OLxMFq079798; Sat, 24 Oct 2015 21:59:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510242159.t9OLxMFq079798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 24 Oct 2015 21:59:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289895 - 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: Sat, 24 Oct 2015 21:59:23 -0000 Author: kib Date: Sat Oct 24 21:59:22 2015 New Revision: 289895 URL: https://svnweb.freebsd.org/changeset/base/289895 Log: Reduce the amount of calls to VOP_BMAP() made from the local vnode pager. It is enough to execute VOP_BMAP() once to obtain both the disk block address for the requested page, and the before/after limits for the contiguous run. The clipping of the vm_page_t array passed to the vnode_pager_generic_getpages() and the disk address for the first page in the clipped array can be deduced from the call results. While there, remove some noise (like if (1) {...}) and adjust nearby code. Reviewed by: alc Discussed with: glebius Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Modified: head/sys/vm/vnode_pager.c Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Sat Oct 24 21:37:47 2015 (r289894) +++ head/sys/vm/vnode_pager.c Sat Oct 24 21:59:22 2015 (r289895) @@ -767,26 +767,21 @@ vnode_pager_generic_getpages(struct vnod int reqpage, vop_getpages_iodone_t iodone, void *arg) { vm_object_t object; - off_t foff; - int i, j, size, bsize, first, *freecnt; - daddr_t firstaddr, reqblock; struct bufobj *bo; - int runpg; - int runend; struct buf *bp; - int count; - int error; - - object = vp->v_object; - count = bytecount / PAGE_SIZE; + daddr_t firstaddr, reqblock; + off_t foff; + int pbefore, pafter, i, size, bsize, first, last, *freecnt; + int count, error, before, after, secmask; KASSERT(vp->v_type != VCHR && vp->v_type != VBLK, ("vnode_pager_generic_getpages does not support devices")); if (vp->v_iflag & VI_DOOMED) - return VM_PAGER_BAD; + return (VM_PAGER_BAD); + object = vp->v_object; + count = bytecount / PAGE_SIZE; bsize = vp->v_mount->mnt_stat.f_iosize; - foff = IDX_TO_OFF(m[reqpage]->pindex); /* * Synchronous and asynchronous paging operations use different @@ -805,7 +800,8 @@ vnode_pager_generic_getpages(struct vnod * If the file system doesn't support VOP_BMAP, use old way of * getting pages via VOP_READ. */ - error = VOP_BMAP(vp, foff / bsize, &bo, &reqblock, NULL, NULL); + error = VOP_BMAP(vp, IDX_TO_OFF(m[reqpage]->pindex) / bsize, &bo, + &reqblock, &after, &before); if (error == EOPNOTSUPP) { relpbuf(bp, freecnt); VM_OBJECT_WLOCK(object); @@ -836,7 +832,7 @@ vnode_pager_generic_getpages(struct vnod vm_pager_free_nonreq(object, m, reqpage, count, FALSE); PCPU_INC(cnt.v_vnodein); PCPU_INC(cnt.v_vnodepgsin); - return vnode_pager_input_smlfs(object, m[reqpage]); + return (vnode_pager_input_smlfs(object, m[reqpage])); } /* @@ -870,75 +866,39 @@ vnode_pager_generic_getpages(struct vnod VM_OBJECT_WUNLOCK(object); } - /* - * here on direct device I/O - */ - firstaddr = -1; - - /* - * calculate the run that includes the required page - */ - for (first = 0, i = 0; i < count; i = runend) { - if (vnode_pager_addr(vp, IDX_TO_OFF(m[i]->pindex), &firstaddr, - &runpg) != 0) { - relpbuf(bp, freecnt); - /* The requested page may be out of range. */ - vm_pager_free_nonreq(object, m + i, reqpage - i, - count - i, FALSE); - return (VM_PAGER_ERROR); - } - if (firstaddr == -1) { - VM_OBJECT_WLOCK(object); - if (i == reqpage && foff < object->un_pager.vnp.vnp_size) { - panic("vnode_pager_getpages: unexpected missing page: firstaddr: %jd, foff: 0x%jx%08jx, vnp_size: 0x%jx%08jx", - (intmax_t)firstaddr, (uintmax_t)(foff >> 32), - (uintmax_t)foff, - (uintmax_t) - (object->un_pager.vnp.vnp_size >> 32), - (uintmax_t)object->un_pager.vnp.vnp_size); - } + pbefore = (daddr_t)before * bsize / PAGE_SIZE; + pafter = (daddr_t)after * bsize / PAGE_SIZE; + first = reqpage < pbefore ? 0 : reqpage - pbefore; + last = reqpage + pafter >= count ? count - 1 : reqpage + pafter; + if (first > 0 || last + 1 < count) { + VM_OBJECT_WLOCK(object); + for (i = 0; i < first; i++) { vm_page_lock(m[i]); vm_page_free(m[i]); vm_page_unlock(m[i]); - VM_OBJECT_WUNLOCK(object); - runend = i + 1; - first = runend; - continue; } - runend = i + runpg; - if (runend <= reqpage) { - VM_OBJECT_WLOCK(object); - for (j = i; j < runend; j++) { - vm_page_lock(m[j]); - vm_page_free(m[j]); - vm_page_unlock(m[j]); - } - VM_OBJECT_WUNLOCK(object); - } else { - if (runpg < (count - first)) { - VM_OBJECT_WLOCK(object); - for (i = first + runpg; i < count; i++) { - vm_page_lock(m[i]); - vm_page_free(m[i]); - vm_page_unlock(m[i]); - } - VM_OBJECT_WUNLOCK(object); - count = first + runpg; - } - break; + for (i = last + 1; i < count; i++) { + vm_page_lock(m[i]); + vm_page_free(m[i]); + vm_page_unlock(m[i]); } - first = runend; + VM_OBJECT_WUNLOCK(object); } /* - * the first and last page have been calculated now, move input pages - * to be zero based... + * here on direct device I/O */ - if (first != 0) { - m += first; - count -= first; - reqpage -= first; - } + firstaddr = reqblock; + firstaddr += (IDX_TO_OFF(m[reqpage]->pindex) % bsize) / DEV_BSIZE; + firstaddr -= IDX_TO_OFF(reqpage - first) / DEV_BSIZE; + + /* + * The first and last page have been calculated now, move + * input pages to be zero based, and adjust the count. + */ + m += first; + reqpage -= first; + count = last - first + 1; /* * calculate the file virtual address for the transfer @@ -957,13 +917,11 @@ vnode_pager_generic_getpages(struct vnod /* * round up physical size for real devices. */ - if (1) { - int secmask = bo->bo_bsize - 1; - KASSERT(secmask < PAGE_SIZE && secmask > 0, - ("vnode_pager_generic_getpages: sector size %d too large", - secmask + 1)); - size = (size + secmask) & ~secmask; - } + secmask = bo->bo_bsize - 1; + KASSERT(secmask < PAGE_SIZE && secmask > 0, + ("vnode_pager_generic_getpages: sector size %d too large", + secmask + 1)); + size = (size + secmask) & ~secmask; /* * and map the pages to be read into the kva, if the filesystem From owner-svn-src-all@freebsd.org Sat Oct 24 22:00: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 35883A1D9BF; Sat, 24 Oct 2015 22:00: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 EE37F19D4; Sat, 24 Oct 2015 21:59:59 +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 t9OLxwmD079862; Sat, 24 Oct 2015 21:59:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9OLxwUZ079861; Sat, 24 Oct 2015 21:59:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510242159.t9OLxwUZ079861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 24 Oct 2015 21:59:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289896 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2015 22:00:00 -0000 Author: ngie Date: Sat Oct 24 21:59:58 2015 New Revision: 289896 URL: https://svnweb.freebsd.org/changeset/base/289896 Log: Make vers.c creation atomic by using a temporary file, then moving the temporary file to vers.c at the end of the script The previous logic wrote out to vers.c multiple times, so the file could be incorrectly interpreted as being completely written out after one of the echo calls with recursive make, when in reality it was only partially written. Also, in the event the build was interrupted when creating vers.c (small race window), it would have a leftover file that needed to be cleaned up before resuming the build. MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/sys/boot/common/newvers.sh Modified: head/sys/boot/common/newvers.sh ============================================================================== --- head/sys/boot/common/newvers.sh Sat Oct 24 21:59:22 2015 (r289895) +++ head/sys/boot/common/newvers.sh Sat Oct 24 21:59:58 2015 (r289896) @@ -32,12 +32,16 @@ # # @(#)newvers.sh 8.1 (Berkeley) 4/20/94 +tempfile=$(mktemp tmp.XXXXXX) || exit +trap "rm -f $tempfile" EXIT INT TERM + LC_ALL=C; export LC_ALL u=${USER-root} h=${HOSTNAME-`hostname`} t=`date` #r=`head -n 6 $1 | tail -n 1 | awk -F: ' { print $1 } '` r=`awk -F: ' /^[0-9]\.[0-9]+:/ { print $1; exit }' $1` -echo "char bootprog_name[] = \"FreeBSD/${3} ${2}\";" > vers.c -echo "char bootprog_rev[] = \"${r}\";" >> vers.c -echo "char bootprog_date[] = \"${t}\";" >> vers.c -echo "char bootprog_maker[] = \"${u}@${h}\";" >> vers.c +echo "char bootprog_name[] = \"FreeBSD/${3} ${2}\";" > $tempfile +echo "char bootprog_rev[] = \"${r}\";" >> $tempfile +echo "char bootprog_date[] = \"${t}\";" >> $tempfile +echo "char bootprog_maker[] = \"${u}@${h}\";" >> $tempfile +mv $tempfile vers.c From owner-svn-src-all@freebsd.org Sat Oct 24 22:12: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 C6B6CA1DC44; Sat, 24 Oct 2015 22:12: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 7EBFBDE; Sat, 24 Oct 2015 22:12: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 t9OMCNRF085389; Sat, 24 Oct 2015 22:12:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9OMCNKt085386; Sat, 24 Oct 2015 22:12:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510242212.t9OMCNKt085386@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 24 Oct 2015 22:12:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289897 - head/usr.sbin/makefs/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: Sat, 24 Oct 2015 22:12:24 -0000 Author: ngie Date: Sat Oct 24 22:12:23 2015 New Revision: 289897 URL: https://svnweb.freebsd.org/changeset/base/289897 Log: Add more cd9660/FFS makefs testcases General changes: - Parameterize out the mount command. - Use mtree to verify the contents of an image (check_image_contents) instead of using diff (diff verifies content, but not file metadata). - Move common logic out to functions (common_cleanup, mount_image, check_image_contents) - Add stub testcases for makefs -D (crashes with SIGBUS, similar to bug # 192839) - Add a note about the ISO-9660 and rockridge specs - Add testcases that exercise: -- Creating disk images from an mtree and multiple directories. -- -F flag use (not really an extensive testcase right now) cd9660-specific test changes: - Remove an XXX comment about symlinks; I forgot that non-rockridge images turn symlinks into hardlinks. - Add testcases that exercise: -- -o allow-deep-trees -- -o allow-max-name stub testcase (doesn't seem to be implemented in makefs) -- -o preparer (existence in image; not conformance to spec) -- -o publisher (existence in image; not conformance to spec) -- -o rockridge (basic) MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh head/usr.sbin/makefs/tests/makefs_ffs_tests.sh head/usr.sbin/makefs/tests/makefs_tests_common.sh Modified: head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh ============================================================================== --- head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Sat Oct 24 21:59:58 2015 (r289896) +++ head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Sat Oct 24 22:12:23 2015 (r289897) @@ -27,40 +27,262 @@ # $FreeBSD$ # -. "$(dirname "$0")/makefs_tests_common.sh" +# A note on specs: +# - A copy of the ISO-9660 spec can be found here: +# http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-119.pdf +# - Any references to `rockridge` are referring to the `Rock Ridge` extensions +# of the ISO-9660 spec. A copy of the draft `IEEE-P1282` spec can be found +# here: +# http://www.ymi.com/ymi/sites/default/files/pdf/Rockridge.pdf MAKEFS="makefs -t cd9660" +MOUNT="mount_cd9660" + +. "$(dirname "$0")/makefs_tests_common.sh" + +common_cleanup() +{ + if ! test_md_device=$(cat $TEST_MD_DEVICE_FILE); then + echo "$TEST_MD_DEVICE_FILE could not be opened; has an md(4) device been attached?" + return + fi + + umount -f /dev/$test_md_device || : + mdconfig -d -u $test_md_device || : +} + +check_base_iso9660_image_contents() +{ + # Symlinks are treated like files when rockridge support isn't + # specified + check_image_contents "$@" -X c + + atf_check -e empty -o empty -s exit:0 test -L $TEST_INPUTS_DIR/c + atf_check -e empty -o empty -s exit:0 test -f $TEST_MOUNT_DIR/c +} + +atf_test_case D_flag cleanup +D_flag_body() +{ + atf_skip "makefs crashes with SIGBUS with dupe mtree entries; see FreeBSD bug # 192839" + + create_test_inputs + + atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ + mtree -cp $TEST_INPUTS_DIR + atf_check -e empty -o not-empty -s exit:0 \ + $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR + + atf_check -e empty -o empty -s exit:0 \ + cp $TEST_SPEC_FILE spec2.mtree + atf_check -e empty -o save:dupe_$TEST_SPEC_FILE -s exit:0 \ + cat $TEST_SPEC_FILE spec2.mtree + + atf_check -e empty -o not-empty -s not-exit:0 \ + $MAKEFS -F dupe_$TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR + atf_check -e empty -o not-empty -s exit:0 \ + $MAKEFS -D -F dupe_$TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR +} +D_flag_cleanup() +{ + common_cleanup +} + +atf_test_case F_flag cleanup +F_flag_body() +{ + create_test_inputs + + atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ + mtree -cp $TEST_INPUTS_DIR + + atf_check -e empty -o empty -s exit:0 \ + $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR + + mount_image + check_base_iso9660_image_contents +} +F_flag_cleanup() +{ + common_cleanup +} + +atf_test_case from_mtree_spec_file cleanup +from_mtree_spec_file_body() +{ + create_test_inputs + + atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ + mtree -c -k type,link,size -p $TEST_INPUTS_DIR + cd $TEST_INPUTS_DIR + atf_check -e empty -o empty -s exit:0 \ + $MAKEFS $TEST_IMAGE $TEST_SPEC_FILE + cd - + + mount_image + check_base_iso9660_image_contents +} +from_mtree_spec_file_cleanup() +{ + common_cleanup +} + +atf_test_case from_multiple_dirs cleanup +from_multiple_dirs_body() +{ + test_inputs_dir2=$TMPDIR/inputs2 + + create_test_inputs + + atf_check -e empty -o empty -s exit:0 mkdir -p $test_inputs_dir2 + atf_check -e empty -o empty -s exit:0 \ + touch $test_inputs_dir2/multiple_dirs_test_file + + atf_check -e empty -o empty -s exit:0 \ + $MAKEFS $TEST_IMAGE $TEST_INPUTS_DIR $test_inputs_dir2 + + mount_image + check_base_iso9660_image_contents -d $test_inputs_dir2 +} +from_multiple_dirs_cleanup() +{ + common_cleanup +} -atf_test_case basic_cd9660 cleanup -basic_cd9660_body() +atf_test_case from_single_dir cleanup +from_single_dir_body() { create_test_inputs atf_check -e empty -o empty -s exit:0 \ $MAKEFS $TEST_IMAGE $TEST_INPUTS_DIR - atf_check -e empty -o save:$TEST_MD_DEVICE_FILE -s exit:0 \ - mdconfig -a -f $TEST_IMAGE + + mount_image + check_base_iso9660_image_contents +} +from_single_dir_cleanup() +{ + common_cleanup +} + +atf_test_case o_flag_allow_deep_trees cleanup +o_flag_allow_deep_trees_body() +{ + create_test_inputs + + # Make sure the "more than 8 levels deep" requirement is met. atf_check -e empty -o empty -s exit:0 \ - mount_cd9660 /dev/$(cat $TEST_MD_DEVICE_FILE) $TEST_MOUNT_DIR - # diffutils doesn't feature --no-dereference until v3.3, so - # $TEST_INPUTS_DIR/c will mismatch with $TEST_MOUNT_DIR/c (the - # former will look like a directory; the latter like a file). - # - # XXX: the latter behavior seems suspect; seems like it should be a - # symlink; need to verify this with mkisofs, etc + mkdir -p $TEST_INPUTS_DIR/a/b/c/d/e/f/g/h/i/j + atf_check -e empty -o empty -s exit:0 \ - diff --exclude c -Naur $TEST_INPUTS_DIR $TEST_MOUNT_DIR + $MAKEFS -o allow-deep-trees $TEST_IMAGE $TEST_INPUTS_DIR + + mount_image + check_base_iso9660_image_contents } -basic_cd9660_cleanup() +o_flag_allow_deep_trees_cleanup() { - test_md_device=$(cat $TEST_MD_DEVICE_FILE) || return + common_cleanup +} + +atf_test_case o_flag_allow_max_name cleanup +o_flag_allow_max_name_body() +{ + atf_expect_fail "-o allow-max-name doesn't appear to be implemented on FreeBSD's copy of makefs [yet]" + + create_test_inputs + + long_path=$TEST_INPUTS_DIR/$(jot -s '' -b 0 37) + + # Make sure the "37 char name" limit requirement is met. + atf_check -e empty -o empty -s exit:0 touch $long_path - umount -f /dev/$test_md_device - mdconfig -d -u $test_md_device + atf_check -e empty -o empty -s exit:0 \ + $MAKEFS -o allow-max-name $TEST_IMAGE $TEST_INPUTS_DIR + + mount_image + check_base_iso9660_image_contents +} +o_flag_allow_max_name_cleanup() +{ + common_cleanup +} + +atf_test_case o_flag_preparer +o_flag_preparer_body() +{ + create_test_dirs + + preparer='My Very First ISO' + preparer_uppercase="$(echo $preparer | tr '[[:lower:]]' '[[:upper:]]')" + + atf_check -e empty -o empty -s exit:0 touch $TEST_INPUTS_DIR/dummy_file + atf_check -e empty -o empty -s exit:0 \ + $MAKEFS -o preparer="$preparer" $TEST_IMAGE $TEST_INPUTS_DIR + atf_check -e empty -o match:"$preparer_uppercase" -s exit:0 \ + strings $TEST_IMAGE +} + +atf_test_case o_flag_publisher +o_flag_publisher_body() +{ + create_test_dirs + + publisher='My Super Awesome Publishing Company LTD' + publisher_uppercase="$(echo $publisher | tr '[[:lower:]]' '[[:upper:]]')" + + atf_check -e empty -o empty -s exit:0 touch $TEST_INPUTS_DIR/dummy_file + atf_check -e empty -o empty -s exit:0 \ + $MAKEFS -o publisher="$publisher" $TEST_IMAGE $TEST_INPUTS_DIR + atf_check -e empty -o match:"$publisher_uppercase" -s exit:0 \ + strings $TEST_IMAGE +} + +atf_test_case o_flag_rockridge cleanup +o_flag_rockridge_body() +{ + create_test_dirs + + # Make sure the "more than 8 levels deep" requirement is met. + atf_check -e empty -o empty -s exit:0 \ + mkdir -p $TEST_INPUTS_DIR/a/b/c/d/e/f/g/h/i/j + + # Make sure the "pathname larger than 255 chars" requirement is met. + # + # $long_path's needs to be nested in a directory, as creating it + # outright as a 256 char filename via touch will fail with ENAMETOOLONG + long_path=$TEST_INPUTS_DIR/$(jot -s '/' -b "$(jot -s '' -b 0 64)" 4) + atf_check -e empty -o empty -s exit:0 mkdir -p "$(dirname $long_path)" + atf_check -e empty -o empty -s exit:0 touch "$long_path" + + atf_check -e empty -o empty -s exit:0 \ + $MAKEFS -o rockridge $TEST_IMAGE $TEST_INPUTS_DIR + + mount_image + check_image_contents -X .rr_moved + + # .rr_moved is a special directory created when you have deep directory + # trees with rock ridge extensions on + atf_check -e empty -o empty -s exit:0 \ + test -d $TEST_MOUNT_DIR/.rr_moved +} +o_flag_rockridge_cleanup() +{ + common_cleanup } atf_init_test_cases() { + atf_add_test_case D_flag + atf_add_test_case F_flag + + atf_add_test_case from_mtree_spec_file + atf_add_test_case from_multiple_dirs + atf_add_test_case from_single_dir - atf_add_test_case basic_cd9660 + atf_add_test_case o_flag_allow_deep_trees + atf_add_test_case o_flag_allow_max_name + atf_add_test_case o_flag_preparer + atf_add_test_case o_flag_publisher + atf_add_test_case o_flag_rockridge } Modified: head/usr.sbin/makefs/tests/makefs_ffs_tests.sh ============================================================================== --- head/usr.sbin/makefs/tests/makefs_ffs_tests.sh Sat Oct 24 21:59:58 2015 (r289896) +++ head/usr.sbin/makefs/tests/makefs_ffs_tests.sh Sat Oct 24 22:12:23 2015 (r289897) @@ -27,36 +27,146 @@ # $FreeBSD$ # +MAKEFS="makefs -t ffs" +MOUNT="mount" + . "$(dirname "$0")/makefs_tests_common.sh" -MAKEFS="makefs -t ffs" +TEST_TUNEFS_OUTPUT=$TMPDIR/tunefs.output + +common_cleanup() +{ + if ! test_md_device=$(cat $TEST_MD_DEVICE_FILE); then + echo "$TEST_MD_DEVICE_FILE could not be opened; has an md(4) device been attached?" + return + fi + + umount -f /dev/$test_md_device || : + mdconfig -d -u $test_md_device || : +} + +check_ffs_image_contents() +{ + atf_check -e save:$TEST_TUNEFS_OUTPUT -o empty -s exit:0 \ + tunefs -p /dev/$(cat $TEST_MD_DEVICE_FILE) + + check_image_contents "$@" +} -atf_test_case basic_ffs cleanup -basic_ffs_body() +atf_test_case D_flag cleanup +D_flag_body() { + atf_skip "makefs crashes with SIGBUS with dupe mtree entries; see FreeBSD bug # 192839" + create_test_inputs + atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ + mtree -cp $TEST_INPUTS_DIR atf_check -e empty -o not-empty -s exit:0 \ - $MAKEFS -M 1m $TEST_IMAGE $TEST_INPUTS_DIR - atf_check -e empty -o save:$TEST_MD_DEVICE_FILE -s exit:0 \ - mdconfig -a -f $TEST_IMAGE - atf_check -e save:$ATF_TMPDIR/tunefs.output -o empty -s exit:0 \ - tunefs -p /dev/$(cat $TEST_MD_DEVICE_FILE) + $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR + atf_check -e empty -o empty -s exit:0 \ - mount /dev/$(cat $TEST_MD_DEVICE_FILE) $TEST_MOUNT_DIR + cp $TEST_SPEC_FILE spec2.mtree + atf_check -e empty -o save:dupe_$TEST_SPEC_FILE -s exit:0 \ + cat $TEST_SPEC_FILE spec2.mtree + + atf_check -e empty -o not-empty -s not-exit:0 \ + $MAKEFS -F dupe_$TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR + atf_check -e empty -o not-empty -s exit:0 \ + $MAKEFS -D -F dupe_$TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR +} +D_flag_cleanup() +{ + common_cleanup +} + +atf_test_case F_flag cleanup +F_flag_body() +{ + create_test_inputs + + atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ + mtree -cp $TEST_INPUTS_DIR + + atf_check -e empty -o not-empty -s exit:0 \ + $MAKEFS -F $TEST_SPEC_FILE -M 1m $TEST_IMAGE $TEST_INPUTS_DIR + + mount_image + check_ffs_image_contents +} +F_flag_cleanup() +{ + common_cleanup +} + +atf_test_case from_mtree_spec_file cleanup +from_mtree_spec_file_body() +{ + create_test_inputs + + atf_check -e empty -o save:$TEST_SPEC_FILE -s exit:0 \ + mtree -c -k type,link,size -p $TEST_INPUTS_DIR + + cd $TEST_INPUTS_DIR + atf_check -e empty -o not-empty -s exit:0 \ + $MAKEFS $TEST_IMAGE $TEST_SPEC_FILE + cd - + + mount_image + check_ffs_image_contents +} +from_mtree_spec_file_cleanup() +{ + common_cleanup +} + +atf_test_case from_multiple_dirs cleanup +from_multiple_dirs_body() +{ + test_inputs_dir2=$TMPDIR/inputs2 + + create_test_inputs + + atf_check -e empty -o empty -s exit:0 mkdir -p $test_inputs_dir2 atf_check -e empty -o empty -s exit:0 \ - diff -Naur $TEST_INPUTS_DIR $TEST_MOUNT_DIR + touch $test_inputs_dir2/multiple_dirs_test_file + + atf_check -e empty -o not-empty -s exit:0 \ + $MAKEFS $TEST_IMAGE $TEST_INPUTS_DIR $test_inputs_dir2 + + mount_image + check_image_contents -d $test_inputs_dir2 +} +from_multiple_dirs_cleanup() +{ + common_cleanup } -basic_ffs_cleanup() + +atf_test_case from_single_dir cleanup +from_single_dir_body() { - test_md_device=$(cat $TEST_MD_DEVICE_FILE) || return + create_test_inputs - umount -f /dev/$test_md_device - mdconfig -d -u $test_md_device + atf_check -e empty -o not-empty -s exit:0 \ + $MAKEFS -M 1m $TEST_IMAGE $TEST_INPUTS_DIR + + mount_image + check_ffs_image_contents +} +from_single_dir_cleanup() +{ + common_cleanup } atf_init_test_cases() { - atf_add_test_case basic_ffs + atf_add_test_case D_flag + atf_add_test_case F_flag + + atf_add_test_case from_mtree_spec_file + atf_add_test_case from_multiple_dirs + atf_add_test_case from_single_dir + + } Modified: head/usr.sbin/makefs/tests/makefs_tests_common.sh ============================================================================== --- head/usr.sbin/makefs/tests/makefs_tests_common.sh Sat Oct 24 21:59:58 2015 (r289896) +++ head/usr.sbin/makefs/tests/makefs_tests_common.sh Sat Oct 24 22:12:23 2015 (r289897) @@ -28,10 +28,60 @@ # KB=1024 -TEST_IMAGE="test.img" -TEST_INPUTS_DIR="inputs" -TEST_MD_DEVICE_FILE="md.output" -TEST_MOUNT_DIR="mnt" +: ${TMPDIR=/tmp} +TEST_IMAGE="$TMPDIR/test.img" +TEST_INPUTS_DIR="$TMPDIR/inputs" +TEST_MD_DEVICE_FILE="$TMPDIR/md.output" +TEST_MOUNT_DIR="$TMPDIR/mnt" +TEST_SPEC_FILE="$TMPDIR/mtree.spec" + +check_image_contents() +{ + local directories=$TEST_INPUTS_DIR + local excludes mtree_excludes_arg mtree_file + local mtree_keywords="type,link,size" + + while getopts "d:f:m:X:" flag; do + case "$flag" in + d) + directories="$directories $OPTARG" + ;; + f) + mtree_file=$OPTARG + ;; + m) + mtree_keywords=$OPTARG + ;; + X) + excludes="$excludes $OPTARG" + ;; + *) + echo "usage: check_image_contents [-d directory ...] [-f mtree-file] [-m mtree-keywords] [-X exclude]" + atf_fail "unhandled option: $flag" + ;; + esac + done + + if [ -n "$excludes" ]; then + echo "$excludes" | tr ' ' '\n' > excludes.txt + mtree_excludes_arg="-X excludes.txt" + fi + + if [ -z "$mtree_file" ]; then + mtree_file=input_spec.mtree + for directory in $directories; do + mtree -c -k $mtree_keywords -p $directory $mtree_excludes_arg + done > $mtree_file + fi + + echo "<---- Input spec BEGIN ---->" + cat $mtree_file + echo "<---- Input spec END ---->" + atf_check -e empty -o empty -s exit:0 \ + mtree -UW -f $mtree_file \ + -p $TEST_MOUNT_DIR \ + $mtree_excludes_arg +} create_test_dirs() { @@ -84,3 +134,13 @@ create_test_inputs() cd - } + +mount_image() +{ + ls -l $TEST_IMAGE + atf_check -e empty -o save:$TEST_MD_DEVICE_FILE -s exit:0 \ + mdconfig -a -f $TEST_IMAGE + atf_check -e empty -o empty -s exit:0 \ + $MOUNT /dev/$(cat $TEST_MD_DEVICE_FILE) $TEST_MOUNT_DIR +} + From owner-svn-src-all@freebsd.org Sat Oct 24 22:14: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 24A6CA1DDB0; Sat, 24 Oct 2015 22:14:03 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x233.google.com (mail-pa0-x233.google.com [IPv6:2607:f8b0:400e:c03::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EB0F1275; Sat, 24 Oct 2015 22:14:02 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pasz6 with SMTP id z6so149374492pas.2; Sat, 24 Oct 2015 15:14:02 -0700 (PDT) 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=+H+1GflzywobyXJomaAu5ccd2jQB03fSIE8v3g+/eWI=; b=E8w+Uy5lVpi5AjjTrW+1kiejqrUZB/J+GHOMcjesovVqXQjPNSsk5Ltor68fNAMkBc HX3sexUSSF66UDpgtuNd6cNBzhnJKSxOJvGDkzRejqC8QUhrc4E0mOtByj5MlGCxtVJz itWs68EJVDjZMWT3rZ4AeH7lowgqMiIi40rZP/3eRxK2qM9YLRstnZk8HYhCS8wu2De3 ze6HGsMAY8IYApKJdGwRHidJbBszKdWMdERkWr4wU+P6gyIGIQ+ekprNlf3pagiW6+hQ XC/LKgKylk7oc0tFPvN1siiIOyDUF1R+2POhGpDw2AZT4RMzmtF/UUf+LfUyRICoOpNt UQuw== X-Received: by 10.66.185.129 with SMTP id fc1mr13018953pac.137.1445724841141; Sat, 24 Oct 2015 15:14:01 -0700 (PDT) Received: from ?IPv6:2601:601:800:126d:6c5b:a5fd:aec8:13bf? ([2601:601:800:126d:6c5b:a5fd:aec8:13bf]) by smtp.gmail.com with ESMTPSA id sz9sm25920084pab.13.2015.10.24.15.14.00 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 24 Oct 2015 15:14:00 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r289897 - head/usr.sbin/makefs/tests From: NGie Cooper In-Reply-To: <201510242212.t9OMCNKt085386@repo.freebsd.org> Date: Sat, 24 Oct 2015 15:13:58 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201510242212.t9OMCNKt085386@repo.freebsd.org> To: Garrett Cooper 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: Sat, 24 Oct 2015 22:14:03 -0000 > On Oct 24, 2015, at 15:12, Garrett Cooper wrote: >=20 > Author: ngie > Date: Sat Oct 24 22:12:23 2015 > New Revision: 289897 > URL: https://svnweb.freebsd.org/changeset/base/289897 >=20 > Log: > Add more cd9660/FFS makefs testcases >=20 > General changes: > - Parameterize out the mount command. > - Use mtree to verify the contents of an image (check_image_contents) = instead > of using diff (diff verifies content, but not file metadata). > - Move common logic out to functions (common_cleanup, mount_image, > check_image_contents) > - Add stub testcases for makefs -D (crashes with SIGBUS, similar to = bug # 192839) > - Add a note about the ISO-9660 and rockridge specs > - Add testcases that exercise: > -- Creating disk images from an mtree and multiple directories. > -- -F flag use (not really an extensive testcase right now) >=20 > cd9660-specific test changes: >=20 > - Remove an XXX comment about symlinks; I forgot that non-rockridge = images turn > symlinks into hard links. I meant =E2=80=9Cregular files=E2=80=9D, not =E2=80=9Chard links" From owner-svn-src-all@freebsd.org Sat Oct 24 22:38: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 ECF70A1E0E9; Sat, 24 Oct 2015 22:38: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 BAFE2B7F; Sat, 24 Oct 2015 22:38:00 +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 t9OMbx3Z091423; Sat, 24 Oct 2015 22:37:59 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9OMbxhc091422; Sat, 24 Oct 2015 22:37:59 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510242237.t9OMbxhc091422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 24 Oct 2015 22:37:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289898 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2015 22:38:01 -0000 Author: adrian Date: Sat Oct 24 22:37:59 2015 New Revision: 289898 URL: https://svnweb.freebsd.org/changeset/base/289898 Log: arge(4): flip this on for AR9344 SoCs. I couldn't test arge0->arge1 bridging, only arge0 VLAN bridging. The DIR-825C1 only hooks up arge0 to the switch GMAC0 and so you need to abuse VLANs to test. Tested: * DIR-825C1 (AR9344) Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Sat Oct 24 22:12:23 2015 (r289897) +++ head/sys/mips/atheros/if_arge.c Sat Oct 24 22:37:59 2015 (r289898) @@ -655,6 +655,9 @@ arge_attach(device_t dev) switch (ar71xx_soc) { case AR71XX_SOC_AR9330: case AR71XX_SOC_AR9331: + case AR71XX_SOC_AR9341: + case AR71XX_SOC_AR9342: + case AR71XX_SOC_AR9344: case AR71XX_SOC_QCA9556: case AR71XX_SOC_QCA9558: /* Arbitrary alignment */ From owner-svn-src-all@freebsd.org Sat Oct 24 23:16: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 069D2A1E5C9; Sat, 24 Oct 2015 23:16: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 C703318DE; Sat, 24 Oct 2015 23:16:14 +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 t9ONGDnX003102; Sat, 24 Oct 2015 23:16:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ONGDJf003101; Sat, 24 Oct 2015 23:16:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510242316.t9ONGDJf003101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 24 Oct 2015 23:16:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289899 - head/usr.sbin/makefs/cd9660 X-SVN-Group: head MIME-Version: 1.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, 24 Oct 2015 23:16:15 -0000 Author: ngie Date: Sat Oct 24 23:16:13 2015 New Revision: 289899 URL: https://svnweb.freebsd.org/changeset/base/289899 Log: Import the fix from NetBSD kern/48852 (sic) to fix rockridge encoding of device nodes In particular, use st_rdev (the device type), not st_dev (the device inode), and fix the comparison to be correct with the st_rdev field Bug 203648 MFC after: 2 weeks Submitted by: Thomas Schmitt Coverity CID: 1008927 Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/makefs/cd9660/iso9660_rrip.c Modified: head/usr.sbin/makefs/cd9660/iso9660_rrip.c ============================================================================== --- head/usr.sbin/makefs/cd9660/iso9660_rrip.c Sat Oct 24 22:37:59 2015 (r289898) +++ head/usr.sbin/makefs/cd9660/iso9660_rrip.c Sat Oct 24 23:16:13 2015 (r289899) @@ -1,4 +1,4 @@ -/* $NetBSD: iso9660_rrip.c,v 1.11 2012/04/29 13:32:21 joerg Exp $ */ +/* $NetBSD: iso9660_rrip.c,v 1.14 2014/05/30 13:14:47 martin Exp $ */ /* * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan @@ -656,13 +656,14 @@ cd9660node_rrip_pn(struct ISO_SUSP_ATTRI pn_field->attr.rr_entry.PN.h.length[0] = 20; pn_field->attr.rr_entry.PN.h.version[0] = 1; - if (sizeof (fnode->inode->st.st_dev) > 32) - cd9660_bothendian_dword((uint64_t)fnode->inode->st.st_dev >> 32, + if (sizeof (fnode->inode->st.st_rdev) > 4) + cd9660_bothendian_dword( + (uint64_t)fnode->inode->st.st_rdev >> 32, pn_field->attr.rr_entry.PN.high); else cd9660_bothendian_dword(0, pn_field->attr.rr_entry.PN.high); - cd9660_bothendian_dword(fnode->inode->st.st_dev & 0xffffffff, + cd9660_bothendian_dword(fnode->inode->st.st_rdev & 0xffffffff, pn_field->attr.rr_entry.PN.low); return 1; } From owner-svn-src-all@freebsd.org Sat Oct 24 23:18: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 CE10DA1E62E; Sat, 24 Oct 2015 23:18:07 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9843E1A47; Sat, 24 Oct 2015 23:18:07 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9ONI6KH003219; Sat, 24 Oct 2015 23:18:06 GMT (envelope-from jasone@FreeBSD.org) Received: (from jasone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ONI5f2003208; Sat, 24 Oct 2015 23:18:05 GMT (envelope-from jasone@FreeBSD.org) Message-Id: <201510242318.t9ONI5f2003208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jasone set sender to jasone@FreeBSD.org using -f From: Jason Evans Date: Sat, 24 Oct 2015 23:18:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289900 - in head/contrib/jemalloc: . doc include/jemalloc include/jemalloc/internal src X-SVN-Group: head MIME-Version: 1.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, 24 Oct 2015 23:18:08 -0000 Author: jasone Date: Sat Oct 24 23:18:05 2015 New Revision: 289900 URL: https://svnweb.freebsd.org/changeset/base/289900 Log: Update jemalloc to version 4.0.4. Modified: head/contrib/jemalloc/ChangeLog head/contrib/jemalloc/FREEBSD-diffs head/contrib/jemalloc/VERSION head/contrib/jemalloc/doc/jemalloc.3 head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h head/contrib/jemalloc/include/jemalloc/jemalloc.h head/contrib/jemalloc/src/arena.c head/contrib/jemalloc/src/huge.c head/contrib/jemalloc/src/prof.c head/contrib/jemalloc/src/tsd.c Modified: head/contrib/jemalloc/ChangeLog ============================================================================== --- head/contrib/jemalloc/ChangeLog Sat Oct 24 23:16:13 2015 (r289899) +++ head/contrib/jemalloc/ChangeLog Sat Oct 24 23:18:05 2015 (r289900) @@ -4,6 +4,32 @@ brevity. Much more detail can be found https://github.com/jemalloc/jemalloc +* 4.0.4 (October 24, 2015) + + This bugfix release fixes another xallocx() regression. No other regressions + have come to light in over a month, so this is likely a good starting point + for people who prefer to wait for "dot one" releases with all the major issues + shaken out. + + Bug fixes: + - Fix xallocx(..., MALLOCX_ZERO to zero the last full trailing page of large + allocations that have been randomly assigned an offset of 0 when + --enable-cache-oblivious configure option is enabled. + +* 4.0.3 (September 24, 2015) + + This bugfix release continues the trend of xallocx() and heap profiling fixes. + + Bug fixes: + - Fix xallocx(..., MALLOCX_ZERO) to zero all trailing bytes of large + allocations when --enable-cache-oblivious configure option is enabled. + - Fix xallocx(..., MALLOCX_ZERO) to zero trailing bytes of huge allocations + when resizing from/to a size class that is not a multiple of the chunk size. + - Fix prof_tctx_dump_iter() to filter out nodes that were created after heap + profile dumping started. + - Work around a potentially bad thread-specific data initialization + interaction with NPTL (glibc's pthreads implementation). + * 4.0.2 (September 21, 2015) This bugfix release addresses a few bugs specific to heap profiling. Modified: head/contrib/jemalloc/FREEBSD-diffs ============================================================================== --- head/contrib/jemalloc/FREEBSD-diffs Sat Oct 24 23:16:13 2015 (r289899) +++ head/contrib/jemalloc/FREEBSD-diffs Sat Oct 24 23:18:05 2015 (r289900) @@ -1,5 +1,5 @@ diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in -index 8fc774b..fdbef95 100644 +index 26a5e14..2a801b7 100644 --- a/doc/jemalloc.xml.in +++ b/doc/jemalloc.xml.in @@ -53,11 +53,23 @@ @@ -47,7 +47,7 @@ index 8fc774b..fdbef95 100644 + diff --git a/include/jemalloc/internal/jemalloc_internal.h.in b/include/jemalloc/internal/jemalloc_internal.h.in -index 8536a3e..0c2a81f 100644 +index 654cd08..ad5382d 100644 --- a/include/jemalloc/internal/jemalloc_internal.h.in +++ b/include/jemalloc/internal/jemalloc_internal.h.in @@ -8,6 +8,9 @@ Modified: head/contrib/jemalloc/VERSION ============================================================================== --- head/contrib/jemalloc/VERSION Sat Oct 24 23:16:13 2015 (r289899) +++ head/contrib/jemalloc/VERSION Sat Oct 24 23:18:05 2015 (r289900) @@ -1 +1 @@ -4.0.2-0-g486d249fb4715fd3de679b6c2a04f7e657883111 +4.0.4-0-g91010a9e2ebfc84b1ac1ed7fdde3bfed4f65f180 Modified: head/contrib/jemalloc/doc/jemalloc.3 ============================================================================== --- head/contrib/jemalloc/doc/jemalloc.3 Sat Oct 24 23:16:13 2015 (r289899) +++ head/contrib/jemalloc/doc/jemalloc.3 Sat Oct 24 23:18:05 2015 (r289900) @@ -2,12 +2,12 @@ .\" Title: JEMALLOC .\" Author: Jason Evans .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 09/21/2015 +.\" Date: 10/24/2015 .\" Manual: User Manual -.\" Source: jemalloc 4.0.2-0-g486d249fb4715fd3de679b6c2a04f7e657883111 +.\" Source: jemalloc 4.0.4-0-g91010a9e2ebfc84b1ac1ed7fdde3bfed4f65f180 .\" Language: English .\" -.TH "JEMALLOC" "3" "09/21/2015" "jemalloc 4.0.2-0-g486d249fb471" "User Manual" +.TH "JEMALLOC" "3" "10/24/2015" "jemalloc 4.0.4-0-g91010a9e2ebf" "User Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,7 +31,7 @@ jemalloc \- general purpose memory allocation functions .SH "LIBRARY" .PP -This manual describes jemalloc 4\&.0\&.2\-0\-g486d249fb4715fd3de679b6c2a04f7e657883111\&. More information can be found at the +This manual describes jemalloc 4\&.0\&.4\-0\-g91010a9e2ebfc84b1ac1ed7fdde3bfed4f65f180\&. More information can be found at the \m[blue]\fBjemalloc website\fR\m[]\&\s-2\u[1]\d\s+2\&. .PP The following configuration options are enabled in libc\*(Aqs built\-in jemalloc: @@ -1041,7 +1041,7 @@ Flush calling thread\*(Aqs thread\-speci .PP "thread\&.prof\&.name" (\fBconst char *\fR) r\- or \-w [\fB\-\-enable\-prof\fR] .RS 4 -Get/set the descriptive name associated with the calling thread in memory profile dumps\&. An internal copy of the name string is created, so the input string need not be maintained after this interface completes execution\&. The output string of this interface should be copied for non\-ephemeral uses, because multiple implementation details can cause asynchronous string deallocation\&. Furthermore, each invocation of this interface can only read or write; simultaneous read/write is not supported due to string lifetime limitations\&. The name string must nil\-terminated and comprised only of characters in the sets recognized by +Get/set the descriptive name associated with the calling thread in memory profile dumps\&. An internal copy of the name string is created, so the input string need not be maintained after this interface completes execution\&. The output string of this interface should be copied for non\-ephemeral uses, because multiple implementation details can cause asynchronous string deallocation\&. Furthermore, each invocation of this interface can only read or write; simultaneous read/write is not supported due to string lifetime limitations\&. The name string must be nil\-terminated and comprised only of characters in the sets recognized by \fBisgraph\fR(3) and \fBisblank\fR(3)\&. Modified: head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h Sat Oct 24 23:16:13 2015 (r289899) +++ head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h Sat Oct 24 23:18:05 2015 (r289900) @@ -314,6 +314,10 @@ typedef unsigned szind_t; #define PAGE ((size_t)(1U << LG_PAGE)) #define PAGE_MASK ((size_t)(PAGE - 1)) +/* Return the page base address for the page containing address a. */ +#define PAGE_ADDR2BASE(a) \ + ((void *)((uintptr_t)(a) & ~PAGE_MASK)) + /* Return the smallest pagesize multiple that is >= s. */ #define PAGE_CEILING(s) \ (((s) + PAGE_MASK) & ~PAGE_MASK) Modified: head/contrib/jemalloc/include/jemalloc/jemalloc.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/jemalloc.h Sat Oct 24 23:16:13 2015 (r289899) +++ head/contrib/jemalloc/include/jemalloc/jemalloc.h Sat Oct 24 23:18:05 2015 (r289900) @@ -79,12 +79,12 @@ extern "C" { #include #include -#define JEMALLOC_VERSION "4.0.2-0-g486d249fb4715fd3de679b6c2a04f7e657883111" +#define JEMALLOC_VERSION "4.0.4-0-g91010a9e2ebfc84b1ac1ed7fdde3bfed4f65f180" #define JEMALLOC_VERSION_MAJOR 4 #define JEMALLOC_VERSION_MINOR 0 -#define JEMALLOC_VERSION_BUGFIX 2 +#define JEMALLOC_VERSION_BUGFIX 4 #define JEMALLOC_VERSION_NREV 0 -#define JEMALLOC_VERSION_GID "486d249fb4715fd3de679b6c2a04f7e657883111" +#define JEMALLOC_VERSION_GID "91010a9e2ebfc84b1ac1ed7fdde3bfed4f65f180" # define MALLOCX_LG_ALIGN(la) (la) # if LG_SIZEOF_PTR == 2 Modified: head/contrib/jemalloc/src/arena.c ============================================================================== --- head/contrib/jemalloc/src/arena.c Sat Oct 24 23:16:13 2015 (r289899) +++ head/contrib/jemalloc/src/arena.c Sat Oct 24 23:18:05 2015 (r289900) @@ -2679,6 +2679,22 @@ arena_ralloc_large_grow(arena_t *arena, if (arena_run_split_large(arena, run, splitsize, zero)) goto label_fail; + if (config_cache_oblivious && zero) { + /* + * Zero the trailing bytes of the original allocation's + * last page, since they are in an indeterminate state. + * There will always be trailing bytes, because ptr's + * offset from the beginning of the run is a multiple of + * CACHELINE in [0 .. PAGE). + */ + void *zbase = (void *)((uintptr_t)ptr + oldsize); + void *zpast = PAGE_ADDR2BASE((void *)((uintptr_t)zbase + + PAGE)); + size_t nzero = (uintptr_t)zpast - (uintptr_t)zbase; + assert(nzero > 0); + memset(zbase, 0, nzero); + } + size = oldsize + splitsize; npages = (size + large_pad) >> LG_PAGE; Modified: head/contrib/jemalloc/src/huge.c ============================================================================== --- head/contrib/jemalloc/src/huge.c Sat Oct 24 23:16:13 2015 (r289899) +++ head/contrib/jemalloc/src/huge.c Sat Oct 24 23:18:05 2015 (r289900) @@ -133,7 +133,7 @@ huge_ralloc_no_move_similar(void *ptr, s extent_node_t *node; arena_t *arena; chunk_hooks_t chunk_hooks = CHUNK_HOOKS_INITIALIZER; - bool zeroed; + bool pre_zeroed, post_zeroed; /* Increase usize to incorporate extra. */ for (usize = usize_min; usize < usize_max && (usize_next = s2u(usize+1)) @@ -145,26 +145,27 @@ huge_ralloc_no_move_similar(void *ptr, s node = huge_node_get(ptr); arena = extent_node_arena_get(node); + pre_zeroed = extent_node_zeroed_get(node); /* Fill if necessary (shrinking). */ if (oldsize > usize) { size_t sdiff = oldsize - usize; if (config_fill && unlikely(opt_junk_free)) { memset((void *)((uintptr_t)ptr + usize), 0x5a, sdiff); - zeroed = false; + post_zeroed = false; } else { - zeroed = !chunk_purge_wrapper(arena, &chunk_hooks, ptr, - CHUNK_CEILING(oldsize), usize, sdiff); + post_zeroed = !chunk_purge_wrapper(arena, &chunk_hooks, + ptr, CHUNK_CEILING(oldsize), usize, sdiff); } } else - zeroed = true; + post_zeroed = pre_zeroed; malloc_mutex_lock(&arena->huge_mtx); /* Update the size of the huge allocation. */ assert(extent_node_size_get(node) != usize); extent_node_size_set(node, usize); - /* Clear node's zeroed field if zeroing failed above. */ - extent_node_zeroed_set(node, extent_node_zeroed_get(node) && zeroed); + /* Update zeroed. */ + extent_node_zeroed_set(node, post_zeroed); malloc_mutex_unlock(&arena->huge_mtx); arena_chunk_ralloc_huge_similar(arena, ptr, oldsize, usize); @@ -172,7 +173,7 @@ huge_ralloc_no_move_similar(void *ptr, s /* Fill if necessary (growing). */ if (oldsize < usize) { if (zero || (config_fill && unlikely(opt_zero))) { - if (!zeroed) { + if (!pre_zeroed) { memset((void *)((uintptr_t)ptr + oldsize), 0, usize - oldsize); } @@ -190,10 +191,11 @@ huge_ralloc_no_move_shrink(void *ptr, si arena_t *arena; chunk_hooks_t chunk_hooks; size_t cdiff; - bool zeroed; + bool pre_zeroed, post_zeroed; node = huge_node_get(ptr); arena = extent_node_arena_get(node); + pre_zeroed = extent_node_zeroed_get(node); chunk_hooks = chunk_hooks_get(arena); assert(oldsize > usize); @@ -209,21 +211,21 @@ huge_ralloc_no_move_shrink(void *ptr, si if (config_fill && unlikely(opt_junk_free)) { huge_dalloc_junk((void *)((uintptr_t)ptr + usize), sdiff); - zeroed = false; + post_zeroed = false; } else { - zeroed = !chunk_purge_wrapper(arena, &chunk_hooks, + post_zeroed = !chunk_purge_wrapper(arena, &chunk_hooks, CHUNK_ADDR2BASE((uintptr_t)ptr + usize), CHUNK_CEILING(oldsize), CHUNK_ADDR2OFFSET((uintptr_t)ptr + usize), sdiff); } } else - zeroed = true; + post_zeroed = pre_zeroed; malloc_mutex_lock(&arena->huge_mtx); /* Update the size of the huge allocation. */ extent_node_size_set(node, usize); - /* Clear node's zeroed field if zeroing failed above. */ - extent_node_zeroed_set(node, extent_node_zeroed_get(node) && zeroed); + /* Update zeroed. */ + extent_node_zeroed_set(node, post_zeroed); malloc_mutex_unlock(&arena->huge_mtx); /* Zap the excess chunks. */ Modified: head/contrib/jemalloc/src/prof.c ============================================================================== --- head/contrib/jemalloc/src/prof.c Sat Oct 24 23:16:13 2015 (r289899) +++ head/contrib/jemalloc/src/prof.c Sat Oct 24 23:18:05 2015 (r289900) @@ -1102,11 +1102,23 @@ prof_tctx_dump_iter(prof_tctx_tree_t *tc { bool propagate_err = *(bool *)arg; - if (prof_dump_printf(propagate_err, - " t%"FMTu64": %"FMTu64": %"FMTu64" [%"FMTu64": %"FMTu64"]\n", - tctx->thr_uid, tctx->dump_cnts.curobjs, tctx->dump_cnts.curbytes, - tctx->dump_cnts.accumobjs, tctx->dump_cnts.accumbytes)) - return (tctx); + switch (tctx->state) { + case prof_tctx_state_initializing: + case prof_tctx_state_nominal: + /* Not captured by this dump. */ + break; + case prof_tctx_state_dumping: + case prof_tctx_state_purgatory: + if (prof_dump_printf(propagate_err, + " t%"FMTu64": %"FMTu64": %"FMTu64" [%"FMTu64": " + "%"FMTu64"]\n", tctx->thr_uid, tctx->dump_cnts.curobjs, + tctx->dump_cnts.curbytes, tctx->dump_cnts.accumobjs, + tctx->dump_cnts.accumbytes)) + return (tctx); + break; + default: + not_reached(); + } return (NULL); } Modified: head/contrib/jemalloc/src/tsd.c ============================================================================== --- head/contrib/jemalloc/src/tsd.c Sat Oct 24 23:16:13 2015 (r289899) +++ head/contrib/jemalloc/src/tsd.c Sat Oct 24 23:18:05 2015 (r289900) @@ -73,6 +73,9 @@ tsd_cleanup(void *arg) tsd_t *tsd = (tsd_t *)arg; switch (tsd->state) { + case tsd_state_uninitialized: + /* Do nothing. */ + break; case tsd_state_nominal: #define O(n, t) \ n##_cleanup(tsd); From owner-svn-src-all@freebsd.org Sat Oct 24 23:19: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 42041A1E676; Sat, 24 Oct 2015 23:19: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 0D6A61BCA; Sat, 24 Oct 2015 23:19:25 +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 t9ONJP0Z003306; Sat, 24 Oct 2015 23:19:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ONJPbR003305; Sat, 24 Oct 2015 23:19:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510242319.t9ONJPbR003305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 24 Oct 2015 23:19:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289901 - head/usr.sbin/makefs/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: Sat, 24 Oct 2015 23:19:26 -0000 Author: ngie Date: Sat Oct 24 23:19:24 2015 New Revision: 289901 URL: https://svnweb.freebsd.org/changeset/base/289901 Log: Remove an ls -l I was using for debugging MFC after: 2 weeks X-MFC with: r289897 Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/makefs/tests/makefs_tests_common.sh Modified: head/usr.sbin/makefs/tests/makefs_tests_common.sh ============================================================================== --- head/usr.sbin/makefs/tests/makefs_tests_common.sh Sat Oct 24 23:18:05 2015 (r289900) +++ head/usr.sbin/makefs/tests/makefs_tests_common.sh Sat Oct 24 23:19:24 2015 (r289901) @@ -137,7 +137,6 @@ create_test_inputs() mount_image() { - ls -l $TEST_IMAGE atf_check -e empty -o save:$TEST_MD_DEVICE_FILE -s exit:0 \ mdconfig -a -f $TEST_IMAGE atf_check -e empty -o empty -s exit:0 \ From owner-svn-src-all@freebsd.org Sat Oct 24 23:21: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 9E42EA1E778; Sat, 24 Oct 2015 23:21:09 +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 6693E1D96; Sat, 24 Oct 2015 23:21:09 +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 t9ONL8hB003424; Sat, 24 Oct 2015 23:21:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ONL8wC003423; Sat, 24 Oct 2015 23:21:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510242321.t9ONL8wC003423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 24 Oct 2015 23:21:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289902 - head/usr.sbin/makefs/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: Sat, 24 Oct 2015 23:21:09 -0000 Author: ngie Date: Sat Oct 24 23:21:08 2015 New Revision: 289902 URL: https://svnweb.freebsd.org/changeset/base/289902 Log: Add a regression test for r289899 to validate rockridge encoding of device types X-MFC with: r289899 MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Modified: head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh ============================================================================== --- head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Sat Oct 24 23:19:24 2015 (r289901) +++ head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Sat Oct 24 23:21:08 2015 (r289902) @@ -271,6 +271,32 @@ o_flag_rockridge_cleanup() common_cleanup } +atf_test_case o_flag_rockridge_dev_nodes cleanup +o_flag_rockridge_dev_nodes_head() +{ + atf_set "descr" "Functional tests to ensure that dev nodes are handled properly with rockridge extensions (NetBSD kern/48852; FreeBSD bug 203648)" +} +o_flag_rockridge_dev_nodes_body() +{ + create_test_dirs + + (tar -cvf - -C /dev null && touch .tar_ok) | \ + atf_check -e not-empty -o empty -s exit:0 tar -xvf - -C "$TEST_INPUTS_DIR" + + atf_check -e empty -o empty -s exit:0 test -c $TEST_INPUTS_DIR/null + atf_check -e empty -o empty -s exit:0 test -f .tar_ok + + atf_check -e empty -o empty -s exit:0 \ + $MAKEFS -o rockridge $TEST_IMAGE $TEST_INPUTS_DIR + + mount_image + check_image_contents +} +o_flag_rockridge_dev_nodes_cleanup() +{ + common_cleanup +} + atf_init_test_cases() { atf_add_test_case D_flag @@ -285,4 +311,5 @@ atf_init_test_cases() atf_add_test_case o_flag_preparer atf_add_test_case o_flag_publisher atf_add_test_case o_flag_rockridge + atf_add_test_case o_flag_rockridge_dev_nodes } From owner-svn-src-all@freebsd.org Sat Oct 24 23:25: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 4F50FA1E7E8; Sat, 24 Oct 2015 23:25: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 19106FB; Sat, 24 Oct 2015 23:25: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 t9ONPiM7006031; Sat, 24 Oct 2015 23:25:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ONPigD006030; Sat, 24 Oct 2015 23:25:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201510242325.t9ONPigD006030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 24 Oct 2015 23:25:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289903 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2015 23:25:45 -0000 Author: ngie Date: Sat Oct 24 23:25:43 2015 New Revision: 289903 URL: https://svnweb.freebsd.org/changeset/base/289903 Log: Add libvmmapi to OptionalObsoleteFiles.inc when MK_BHYVE == no MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Oct 24 23:21:08 2015 (r289902) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Oct 24 23:25:43 2015 (r289903) @@ -173,6 +173,10 @@ OLD_DIRS+=etc/autofs .endif .if ${MK_BHYVE} == no +OLD_FILES+=usr/lib/libvmmapi.a +OLD_FILES+=usr/lib/libvmmapi.so +OLD_LIBS+=usr/lib/libvmmapi.so.5 +OLD_FILES+=usr/include/vmmapi.h OLD_FILES+=usr/sbin/bhyve OLD_FILES+=usr/sbin/bhyvectl OLD_FILES+=usr/sbin/bhyveload From owner-svn-src-all@freebsd.org Sat Oct 24 23: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 4E950A1EBD9; Sat, 24 Oct 2015 23:45:00 +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 F2B69BEF; Sat, 24 Oct 2015 23:44:59 +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 t9ONixLo011753; Sat, 24 Oct 2015 23:44:59 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ONixdx011752; Sat, 24 Oct 2015 23:44:59 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510242344.t9ONixdx011752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 24 Oct 2015 23:44:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289904 - head/sys/dev/ioat X-SVN-Group: head MIME-Version: 1.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, 24 Oct 2015 23:45:00 -0000 Author: cem Date: Sat Oct 24 23:44:58 2015 New Revision: 289904 URL: https://svnweb.freebsd.org/changeset/base/289904 Log: ioat: Pull out timer callout delay into a constant Pull out the timer callout delay into IOAT_INTR_TIMO and shorten it considerably (5s -> 100ms). Single operations do not take 5-10 seconds and when interrupts aren't working, waiting 100ms sucks a lot less than 5s. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat.c Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Sat Oct 24 23:25:43 2015 (r289903) +++ head/sys/dev/ioat/ioat.c Sat Oct 24 23:44:58 2015 (r289904) @@ -50,6 +50,8 @@ __FBSDID("$FreeBSD$"); #include "ioat_hw.h" #include "ioat_internal.h" +#define IOAT_INTR_TIMO (hz / 10) + static int ioat_probe(device_t device); static int ioat_attach(device_t device); static int ioat_detach(device_t device); @@ -271,6 +273,8 @@ ioat_detach(device_t device) ioat = DEVICE2SOFTC(device); ioat_test_detach(); + + ioat_teardown_intr(ioat); callout_drain(&ioat->timer); pci_disable_busmaster(device); @@ -294,8 +298,6 @@ ioat_detach(device_t device) bus_dma_tag_destroy(ioat->hw_desc_tag); - ioat_teardown_intr(ioat); - return (0); } @@ -586,7 +588,8 @@ ioat_process_events(struct ioat_softc *i if (ioat->head == ioat->tail) { ioat->is_completion_pending = FALSE; - callout_reset(&ioat->timer, 5 * hz, ioat_timer_callback, ioat); + callout_reset(&ioat->timer, IOAT_INTR_TIMO, + ioat_timer_callback, ioat); } ioat_write_chanctrl(ioat, IOAT_CHANCTRL_RUN); @@ -902,7 +905,7 @@ ioat_timer_callback(void *arg) uint32_t chanerr; ioat = arg; - ioat_log_message(2, "%s\n", __func__); + ioat_log_message(1, "%s\n", __func__); if (ioat->is_completion_pending) { status = ioat_get_chansts(ioat); @@ -934,7 +937,7 @@ ioat_timer_callback(void *arg) mtx_unlock(&ioat->submit_lock); if (ioat->ring_size_order > IOAT_MIN_ORDER) - callout_reset(&ioat->timer, 5 * hz, + callout_reset(&ioat->timer, IOAT_INTR_TIMO, ioat_timer_callback, ioat); } } @@ -950,8 +953,8 @@ ioat_submit_single(struct ioat_softc *io if (!ioat->is_completion_pending) { ioat->is_completion_pending = TRUE; - callout_reset(&ioat->timer, 10 * hz, ioat_timer_callback, - ioat); + callout_reset(&ioat->timer, IOAT_INTR_TIMO, + ioat_timer_callback, ioat); } } From owner-svn-src-all@freebsd.org Sat Oct 24 23:45: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 840D7A1EC06; Sat, 24 Oct 2015 23:45:11 +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 4DE44D83; Sat, 24 Oct 2015 23:45:11 +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 t9ONjAGE011812; Sat, 24 Oct 2015 23:45:10 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ONjAt7011811; Sat, 24 Oct 2015 23:45:10 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510242345.t9ONjAt7011811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 24 Oct 2015 23:45:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289905 - head/sys/dev/ioat X-SVN-Group: head MIME-Version: 1.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, 24 Oct 2015 23:45:11 -0000 Author: cem Date: Sat Oct 24 23:45:10 2015 New Revision: 289905 URL: https://svnweb.freebsd.org/changeset/base/289905 Log: ioat: Don't use sleeping allocation in lock path This is still the worst possible way to allocate memory if it will ever be under pressure, but at least it won't deadlock. Suggested by: WITNESS Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat.c Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Sat Oct 24 23:44:58 2015 (r289904) +++ head/sys/dev/ioat/ioat.c Sat Oct 24 23:45:10 2015 (r289905) @@ -738,22 +738,33 @@ ioat_alloc_ring_entry(struct ioat_softc { struct ioat_dma_hw_descriptor *hw_desc; struct ioat_descriptor *desc; + int error; - desc = malloc(sizeof(struct ioat_descriptor), M_IOAT, M_NOWAIT); - if (desc == NULL) - return (NULL); + error = ENOMEM; + hw_desc = NULL; - bus_dmamem_alloc(ioat->hw_desc_tag, (void **)&hw_desc, BUS_DMA_ZERO, - &ioat->hw_desc_map); - if (hw_desc == NULL) { - free(desc, M_IOAT); - return (NULL); - } + desc = malloc(sizeof(*desc), M_IOAT, M_NOWAIT); + if (desc == NULL) + goto out; - bus_dmamap_load(ioat->hw_desc_tag, ioat->hw_desc_map, hw_desc, - sizeof(*hw_desc), ioat_dmamap_cb, &desc->hw_desc_bus_addr, 0); + bus_dmamem_alloc(ioat->hw_desc_tag, (void **)&hw_desc, + BUS_DMA_ZERO | BUS_DMA_NOWAIT, &ioat->hw_desc_map); + if (hw_desc == NULL) + goto out; desc->u.dma = hw_desc; + + error = bus_dmamap_load(ioat->hw_desc_tag, ioat->hw_desc_map, hw_desc, + sizeof(*hw_desc), ioat_dmamap_cb, &desc->hw_desc_bus_addr, + BUS_DMA_NOWAIT); + if (error) + goto out; + +out: + if (error) { + ioat_free_ring_entry(ioat, desc); + return (NULL); + } return (desc); } From owner-svn-src-all@freebsd.org Sat Oct 24 23:45: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 E32CEA1EC49; Sat, 24 Oct 2015 23:45:22 +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 A9C79ECF; Sat, 24 Oct 2015 23:45:22 +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 t9ONjLea011862; Sat, 24 Oct 2015 23:45:21 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ONjL52011861; Sat, 24 Oct 2015 23:45:21 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510242345.t9ONjL52011861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 24 Oct 2015 23:45:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289906 - head/sys/dev/ioat X-SVN-Group: head MIME-Version: 1.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, 24 Oct 2015 23:45:23 -0000 Author: cem Date: Sat Oct 24 23:45:21 2015 New Revision: 289906 URL: https://svnweb.freebsd.org/changeset/base/289906 Log: ioat: When queueing operations, assert the submit lock Callers should have acquired this lock when they invoked ioat_acquire() before issuing operations. Assert it is held. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat.c Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Sat Oct 24 23:45:10 2015 (r289905) +++ head/sys/dev/ioat/ioat.c Sat Oct 24 23:45:21 2015 (r289906) @@ -641,6 +641,7 @@ ioat_null(bus_dmaengine_t dmaengine, bus flags & ~DMA_ALL_FLAGS)); ioat = to_ioat_softc(dmaengine); + mtx_assert(&ioat->submit_lock, MA_OWNED); if (ioat_reserve_space_and_lock(ioat, 1) != 0) return (NULL); @@ -681,6 +682,7 @@ ioat_copy(bus_dmaengine_t dmaengine, bus flags & ~DMA_ALL_FLAGS)); ioat = to_ioat_softc(dmaengine); + mtx_assert(&ioat->submit_lock, MA_OWNED); if (len > ioat->max_xfer_size) { ioat_log_message(0, "%s: max_xfer_size = %d, requested = %d\n", From owner-svn-src-all@freebsd.org Sat Oct 24 23:45: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 47C01A1EC85; Sat, 24 Oct 2015 23:45:35 +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 0721A105C; Sat, 24 Oct 2015 23:45:34 +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 t9ONjYih011916; Sat, 24 Oct 2015 23:45:34 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ONjXKF011912; Sat, 24 Oct 2015 23:45:33 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510242345.t9ONjXKF011912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 24 Oct 2015 23:45:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289907 - head/sys/dev/ioat X-SVN-Group: head MIME-Version: 1.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, 24 Oct 2015 23:45:35 -0000 Author: cem Date: Sat Oct 24 23:45:33 2015 New Revision: 289907 URL: https://svnweb.freebsd.org/changeset/base/289907 Log: ioat: refcnt users so we can drain them at detach We only need to borrow a mutex for the drain sleep and the 0->1 transition, so just reuse an existing one for now. The wchan is arbitrary. Using refcount itself would have required __DEVOLATILE(), so use the lock's address instead. Different uses are tagged by kind, although we only do anything with that information in INVARIANTS builds. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat.c head/sys/dev/ioat/ioat.h head/sys/dev/ioat/ioat_internal.h head/sys/dev/ioat/ioat_test.c Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Sat Oct 24 23:45:21 2015 (r289906) +++ head/sys/dev/ioat/ioat.c Sat Oct 24 23:45:33 2015 (r289907) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include "ioat_internal.h" #define IOAT_INTR_TIMO (hz / 10) +#define IOAT_REFLK (&ioat->submit_lock) static int ioat_probe(device_t device); static int ioat_attach(device_t device); @@ -69,9 +70,9 @@ static inline uint32_t ioat_get_active(s static inline uint32_t ioat_get_ring_space(struct ioat_softc *ioat); static void ioat_free_ring_entry(struct ioat_softc *ioat, struct ioat_descriptor *desc); -static struct ioat_descriptor * ioat_alloc_ring_entry(struct ioat_softc *ioat); +static struct ioat_descriptor *ioat_alloc_ring_entry(struct ioat_softc *ioat); static int ioat_reserve_space_and_lock(struct ioat_softc *ioat, int num_descs); -static struct ioat_descriptor * ioat_get_ring_entry(struct ioat_softc *ioat, +static struct ioat_descriptor *ioat_get_ring_entry(struct ioat_softc *ioat, uint32_t index); static boolean_t resize_ring(struct ioat_softc *ioat, int order); static void ioat_timer_callback(void *arg); @@ -81,6 +82,12 @@ static void ioat_comp_update_map(void *a int error); static int ioat_reset_hw(struct ioat_softc *ioat); static void ioat_setup_sysctl(device_t device); +static inline struct ioat_softc *ioat_get(struct ioat_softc *, + enum ioat_ref_kind); +static inline void ioat_put(struct ioat_softc *, enum ioat_ref_kind); +static inline void ioat_putn(struct ioat_softc *, uint32_t, + enum ioat_ref_kind); +static void ioat_drain(struct ioat_softc *); #define ioat_log_message(v, ...) do { \ if ((v) <= g_ioat_debug_level) { \ @@ -236,10 +243,6 @@ ioat_attach(device_t device) goto err; } - error = ioat_setup_intr(ioat); - if (error != 0) - return (error); - error = ioat3_attach(device); if (error != 0) goto err; @@ -248,9 +251,13 @@ ioat_attach(device_t device) if (error != 0) goto err; + error = ioat_setup_intr(ioat); + if (error != 0) + goto err; + error = ioat3_selftest(ioat); if (error != 0) - return (error); + goto err; ioat_process_events(ioat); ioat_setup_sysctl(device); @@ -273,6 +280,7 @@ ioat_detach(device_t device) ioat = DEVICE2SOFTC(device); ioat_test_detach(); + ioat_drain(ioat); ioat_teardown_intr(ioat); callout_drain(&ioat->timer); @@ -579,6 +587,7 @@ ioat_process_events(struct ioat_softc *i if (dmadesc->callback_fn) (*dmadesc->callback_fn)(dmadesc->callback_arg); + completed++; ioat->tail++; if (desc->hw_desc_bus_addr == status) break; @@ -594,6 +603,8 @@ ioat_process_events(struct ioat_softc *i ioat_write_chanctrl(ioat, IOAT_CHANCTRL_RUN); mtx_unlock(&ioat->cleanup_lock); + + ioat_putn(ioat, completed, IOAT_ACTIVE_DESCR_REF); } /* @@ -603,9 +614,18 @@ bus_dmaengine_t ioat_get_dmaengine(uint32_t index) { - if (index < ioat_channel_index) - return (&ioat_channel[index]->dmaengine); - return (NULL); + if (index >= ioat_channel_index) + return (NULL); + return (&ioat_get(ioat_channel[index], IOAT_DMAENGINE_REF)->dmaengine); +} + +void +ioat_put_dmaengine(bus_dmaengine_t dmaengine) +{ + struct ioat_softc *ioat; + + ioat = to_ioat_softc(dmaengine); + ioat_put(ioat, IOAT_DMAENGINE_REF); } void @@ -962,6 +982,7 @@ static void ioat_submit_single(struct ioat_softc *ioat) { + ioat_get(ioat, IOAT_ACTIVE_DESCR_REF); atomic_add_rel_int(&ioat->head, 1); if (!ioat->is_completion_pending) { @@ -1057,3 +1078,71 @@ ioat_setup_sysctl(device_t device) "tail", CTLFLAG_RD, &ioat->tail, 0, "HW descriptor tail pointer index"); } + +static inline struct ioat_softc * +ioat_get(struct ioat_softc *ioat, enum ioat_ref_kind kind) +{ + uint32_t old; + + KASSERT(kind < IOAT_NUM_REF_KINDS, ("bogus")); + + old = atomic_fetchadd_32(&ioat->refcnt, 1); + KASSERT(old < UINT32_MAX, ("refcnt overflow")); + +#ifdef INVARIANTS + old = atomic_fetchadd_32(&ioat->refkinds[kind], 1); + KASSERT(old < UINT32_MAX, ("refcnt kind overflow")); +#endif + + return (ioat); +} + +static inline void +ioat_putn(struct ioat_softc *ioat, uint32_t n, enum ioat_ref_kind kind) +{ + uint32_t old; + + KASSERT(kind < IOAT_NUM_REF_KINDS, ("bogus")); + + if (n == 0) + return; + +#ifdef INVARIANTS + old = atomic_fetchadd_32(&ioat->refkinds[kind], -n); + KASSERT(old >= n, ("refcnt kind underflow")); +#endif + + /* Skip acquiring the lock if resulting refcnt > 0. */ + for (;;) { + old = ioat->refcnt; + if (old <= n) + break; + if (atomic_cmpset_32(&ioat->refcnt, old, old - n)) + return; + } + + mtx_lock(IOAT_REFLK); + old = atomic_fetchadd_32(&ioat->refcnt, -n); + KASSERT(old >= n, ("refcnt error")); + + if (old == n) + wakeup(IOAT_REFLK); + mtx_unlock(IOAT_REFLK); +} + +static inline void +ioat_put(struct ioat_softc *ioat, enum ioat_ref_kind kind) +{ + + ioat_putn(ioat, 1, kind); +} + +static void +ioat_drain(struct ioat_softc *ioat) +{ + + mtx_lock(IOAT_REFLK); + while (ioat->refcnt > 0) + msleep(IOAT_REFLK, IOAT_REFLK, 0, "ioat_drain", 0); + mtx_unlock(IOAT_REFLK); +} Modified: head/sys/dev/ioat/ioat.h ============================================================================== --- head/sys/dev/ioat/ioat.h Sat Oct 24 23:45:21 2015 (r289906) +++ head/sys/dev/ioat/ioat.h Sat Oct 24 23:45:33 2015 (r289907) @@ -52,6 +52,9 @@ typedef void (*bus_dmaengine_callback_t) */ bus_dmaengine_t ioat_get_dmaengine(uint32_t channel_index); +/* Release the DMA channel */ +void ioat_put_dmaengine(bus_dmaengine_t dmaengine); + /* * Acquire must be called before issuing an operation to perform. Release is * called after. Multiple operations can be issued within the context of one Modified: head/sys/dev/ioat/ioat_internal.h ============================================================================== --- head/sys/dev/ioat/ioat_internal.h Sat Oct 24 23:45:21 2015 (r289906) +++ head/sys/dev/ioat/ioat_internal.h Sat Oct 24 23:45:33 2015 (r289907) @@ -313,6 +313,12 @@ struct ioat_descriptor { bus_addr_t hw_desc_bus_addr; }; +enum ioat_ref_kind { + IOAT_DMAENGINE_REF = 0, + IOAT_ACTIVE_DESCR_REF, + IOAT_NUM_REF_KINDS +}; + /* One of these per allocated PCI device. */ struct ioat_softc { bus_dmaengine_t dmaengine; @@ -364,6 +370,10 @@ struct ioat_softc { struct ioat_descriptor **ring; struct mtx cleanup_lock; + volatile uint32_t refcnt; +#ifdef INVARIANTS + volatile uint32_t refkinds[IOAT_NUM_REF_KINDS]; +#endif }; void ioat_test_attach(void); Modified: head/sys/dev/ioat/ioat_test.c ============================================================================== --- head/sys/dev/ioat/ioat_test.c Sat Oct 24 23:45:21 2015 (r289906) +++ head/sys/dev/ioat/ioat_test.c Sat Oct 24 23:45:33 2015 (r289907) @@ -299,7 +299,7 @@ ioat_dma_test(void *arg) rc = ioat_test_prealloc_memory(test, index); if (rc != 0) { ioat_test_log(0, "prealloc_memory: %d\n", rc); - return; + goto out; } wmb(); @@ -330,6 +330,8 @@ ioat_dma_test(void *arg) ticks - start, ticks - end, (ticks - start) / hz); ioat_test_release_memory(test); +out: + ioat_put_dmaengine(dmaengine); } static int From owner-svn-src-all@freebsd.org Sat Oct 24 23:45: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 8613FA1ECC8; Sat, 24 Oct 2015 23:45:46 +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 5CE9511BC; Sat, 24 Oct 2015 23:45:46 +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 t9ONjjcj011964; Sat, 24 Oct 2015 23:45:45 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ONjjYo011963; Sat, 24 Oct 2015 23:45:45 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510242345.t9ONjjYo011963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 24 Oct 2015 23:45:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289908 - head/sys/dev/ioat X-SVN-Group: head MIME-Version: 1.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, 24 Oct 2015 23:45:46 -0000 Author: cem Date: Sat Oct 24 23:45:45 2015 New Revision: 289908 URL: https://svnweb.freebsd.org/changeset/base/289908 Log: ioat: Add sysctl to force hw reset To enable controlled testing. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat.c Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Sat Oct 24 23:45:33 2015 (r289907) +++ head/sys/dev/ioat/ioat.c Sat Oct 24 23:45:45 2015 (r289908) @@ -82,6 +82,7 @@ static void ioat_comp_update_map(void *a int error); static int ioat_reset_hw(struct ioat_softc *ioat); static void ioat_setup_sysctl(device_t device); +static int sysctl_handle_reset(SYSCTL_HANDLER_ARGS); static inline struct ioat_softc *ioat_get(struct ioat_softc *, enum ioat_ref_kind); static inline void ioat_put(struct ioat_softc *, enum ioat_ref_kind); @@ -1028,8 +1029,10 @@ ioat_reset_hw(struct ioat_softc *ioat) * BDXDE and BWD models reset MSI-X registers on device reset. * Save/restore their contents manually. */ - if (ioat_model_resets_msix(ioat)) + if (ioat_model_resets_msix(ioat)) { + ioat_log_message(1, "device resets MSI-X registers; saving\n"); pci_save_state(ioat->device); + } ioat_reset(ioat); @@ -1039,12 +1042,37 @@ ioat_reset_hw(struct ioat_softc *ioat) if (timeout == 20) return (ETIMEDOUT); - if (ioat_model_resets_msix(ioat)) + if (ioat_model_resets_msix(ioat)) { + ioat_log_message(1, "device resets registers; restored\n"); pci_restore_state(ioat->device); + } return (0); } +static int +sysctl_handle_reset(SYSCTL_HANDLER_ARGS) +{ + struct ioat_softc *ioat; + int error, arg; + + ioat = arg1; + + arg = 0; + error = SYSCTL_OUT(req, &arg, sizeof(arg)); + if (error != 0 || req->newptr == NULL) + return (error); + + error = SYSCTL_IN(req, &arg, sizeof(arg)); + if (error != 0) + return (error); + + if (arg != 0) + error = ioat_reset_hw(ioat); + + return (error); +} + static void dump_descriptor(void *hw_desc) { @@ -1060,23 +1088,26 @@ dump_descriptor(void *hw_desc) static void ioat_setup_sysctl(device_t device) { - struct sysctl_ctx_list *sysctl_ctx; - struct sysctl_oid *sysctl_tree; + struct sysctl_oid_list *par; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree; struct ioat_softc *ioat; ioat = DEVICE2SOFTC(device); - sysctl_ctx = device_get_sysctl_ctx(device); - sysctl_tree = device_get_sysctl_tree(device); - - SYSCTL_ADD_UINT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, - "ring_size_order", CTLFLAG_RD, &ioat->ring_size_order, - 0, "HW descriptor ring size order"); - SYSCTL_ADD_UINT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, - "head", CTLFLAG_RD, &ioat->head, - 0, "HW descriptor head pointer index"); - SYSCTL_ADD_UINT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, - "tail", CTLFLAG_RD, &ioat->tail, - 0, "HW descriptor tail pointer index"); + ctx = device_get_sysctl_ctx(device); + tree = device_get_sysctl_tree(device); + par = SYSCTL_CHILDREN(tree); + + SYSCTL_ADD_UINT(ctx, par, OID_AUTO, "ring_size_order", CTLFLAG_RD, + &ioat->ring_size_order, 0, "HW descriptor ring size order"); + SYSCTL_ADD_UINT(ctx, par, OID_AUTO, "head", CTLFLAG_RD, &ioat->head, 0, + "HW descriptor head pointer index"); + SYSCTL_ADD_UINT(ctx, par, OID_AUTO, "tail", CTLFLAG_RD, &ioat->tail, 0, + "HW descriptor tail pointer index"); + + SYSCTL_ADD_PROC(ctx, par, OID_AUTO, "force_hw_reset", + CTLTYPE_INT | CTLFLAG_RW, ioat, 0, sysctl_handle_reset, "I", + "Set to non-zero to reset the hardware"); } static inline struct ioat_softc * From owner-svn-src-all@freebsd.org Sat Oct 24 23:45: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 C6C7AA1ECFB; Sat, 24 Oct 2015 23:45:57 +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 950A1130D; Sat, 24 Oct 2015 23:45:57 +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 t9ONjuvZ012015; Sat, 24 Oct 2015 23:45:56 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ONjucZ012014; Sat, 24 Oct 2015 23:45:56 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510242345.t9ONjucZ012014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 24 Oct 2015 23:45:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289909 - head/sys/dev/ioat X-SVN-Group: head MIME-Version: 1.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, 24 Oct 2015 23:45:57 -0000 Author: cem Date: Sat Oct 24 23:45:56 2015 New Revision: 289909 URL: https://svnweb.freebsd.org/changeset/base/289909 Log: ioat: Always re-arm interrupts in process_events It doesn't hurt, even if there is nothing to do. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat.c Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Sat Oct 24 23:45:45 2015 (r289908) +++ head/sys/dev/ioat/ioat.c Sat Oct 24 23:45:56 2015 (r289909) @@ -575,10 +575,8 @@ ioat_process_events(struct ioat_softc *i ioat_log_message(3, "%s\n", __func__); - if (status == ioat->last_seen) { - mtx_unlock(&ioat->cleanup_lock); - return; - } + if (status == ioat->last_seen) + goto out; while (1) { desc = ioat_get_ring_entry(ioat, ioat->tail); @@ -602,6 +600,7 @@ ioat_process_events(struct ioat_softc *i ioat_timer_callback, ioat); } +out: ioat_write_chanctrl(ioat, IOAT_CHANCTRL_RUN); mtx_unlock(&ioat->cleanup_lock); From owner-svn-src-all@freebsd.org Sat Oct 24 23:46: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 06517A1ED3A; Sat, 24 Oct 2015 23:46: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 C5F6714B9; Sat, 24 Oct 2015 23:46: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 t9ONk80r012069; Sat, 24 Oct 2015 23:46:08 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ONk8VA012068; Sat, 24 Oct 2015 23:46:08 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510242346.t9ONk8VA012068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 24 Oct 2015 23:46:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289910 - head/sys/dev/ioat X-SVN-Group: head MIME-Version: 1.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, 24 Oct 2015 23:46:10 -0000 Author: cem Date: Sat Oct 24 23:46:08 2015 New Revision: 289910 URL: https://svnweb.freebsd.org/changeset/base/289910 Log: ioat: Extract halted error-debugging to a function Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat.c Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Sat Oct 24 23:45:56 2015 (r289909) +++ head/sys/dev/ioat/ioat.c Sat Oct 24 23:46:08 2015 (r289910) @@ -930,9 +930,24 @@ resize_ring(struct ioat_softc *ioat, int } static void -ioat_timer_callback(void *arg) +ioat_halted_debug(struct ioat_softc *ioat, uint32_t chanerr) { struct ioat_descriptor *desc; + + ioat_log_message(0, "Channel halted (%x)\n", chanerr); + if (chanerr == 0) + return; + + desc = ioat_get_ring_entry(ioat, ioat->tail + 0); + dump_descriptor(desc->u.raw); + + desc = ioat_get_ring_entry(ioat, ioat->tail + 1); + dump_descriptor(desc->u.raw); +} + +static void +ioat_timer_callback(void *arg) +{ struct ioat_softc *ioat; uint64_t status; uint32_t chanerr; @@ -949,13 +964,7 @@ ioat_timer_callback(void *arg) */ if (is_ioat_halted(status)) { chanerr = ioat_read_4(ioat, IOAT_CHANERR_OFFSET); - ioat_log_message(0, "Channel halted (%x)\n", chanerr); - - desc = ioat_get_ring_entry(ioat, ioat->tail + 0); - dump_descriptor(desc->u.raw); - - desc = ioat_get_ring_entry(ioat, ioat->tail + 1); - dump_descriptor(desc->u.raw); + ioat_halted_debug(ioat, chanerr); } ioat_process_events(ioat); } else { From owner-svn-src-all@freebsd.org Sat Oct 24 23:46: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 AC4F2A1ED81; Sat, 24 Oct 2015 23:46:21 +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 769BC1643; Sat, 24 Oct 2015 23:46:21 +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 t9ONkKf5012120; Sat, 24 Oct 2015 23:46:20 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ONkKTC012119; Sat, 24 Oct 2015 23:46:20 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510242346.t9ONkKTC012119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 24 Oct 2015 23:46:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289911 - head/sys/dev/ioat X-SVN-Group: head MIME-Version: 1.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, 24 Oct 2015 23:46:21 -0000 Author: cem Date: Sat Oct 24 23:46:20 2015 New Revision: 289911 URL: https://svnweb.freebsd.org/changeset/base/289911 Log: ioat: Use bus_alloc_resource_any(9) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat.c Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Sat Oct 24 23:46:08 2015 (r289910) +++ head/sys/dev/ioat/ioat.c Sat Oct 24 23:46:20 2015 (r289911) @@ -451,8 +451,8 @@ ioat_map_pci_bar(struct ioat_softc *ioat { ioat->pci_resource_id = PCIR_BAR(0); - ioat->pci_resource = bus_alloc_resource(ioat->device, SYS_RES_MEMORY, - &ioat->pci_resource_id, 0, ~0, 1, RF_ACTIVE); + ioat->pci_resource = bus_alloc_resource_any(ioat->device, + SYS_RES_MEMORY, &ioat->pci_resource_id, RF_ACTIVE); if (ioat->pci_resource == NULL) { ioat_log_message(0, "unable to allocate pci resource\n"); From owner-svn-src-all@freebsd.org Sat Oct 24 23:46: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 D09F9A1EDC2; Sat, 24 Oct 2015 23:46:33 +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 9223E18C4; Sat, 24 Oct 2015 23:46:33 +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 t9ONkWU8012170; Sat, 24 Oct 2015 23:46:32 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9ONkWxx012168; Sat, 24 Oct 2015 23:46:32 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510242346.t9ONkWxx012168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 24 Oct 2015 23:46:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289912 - head/sys/dev/ioat X-SVN-Group: head MIME-Version: 1.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, 24 Oct 2015 23:46:33 -0000 Author: cem Date: Sat Oct 24 23:46:32 2015 New Revision: 289912 URL: https://svnweb.freebsd.org/changeset/base/289912 Log: ioat: Actually bring the hardware back online after reset We need to reset the chancmp and chainaddr MMIO registers to bring the device back to a working state. Name the chanerr bits while we're here. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat.c head/sys/dev/ioat/ioat_hw.h Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Sat Oct 24 23:46:20 2015 (r289911) +++ head/sys/dev/ioat/ioat.c Sat Oct 24 23:46:32 2015 (r289912) @@ -59,7 +59,7 @@ static int ioat_detach(device_t device); static int ioat_setup_intr(struct ioat_softc *ioat); static int ioat_teardown_intr(struct ioat_softc *ioat); static int ioat3_attach(device_t device); -static int ioat3_selftest(struct ioat_softc *ioat); +static int ioat_start_channel(struct ioat_softc *ioat); static int ioat_map_pci_bar(struct ioat_softc *ioat); static void ioat_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error); @@ -256,7 +256,7 @@ ioat_attach(device_t device) if (error != 0) goto err; - error = ioat3_selftest(ioat); + error = ioat_reset_hw(ioat); if (error != 0) goto err; @@ -326,7 +326,7 @@ ioat_teardown_intr(struct ioat_softc *io } static int -ioat3_selftest(struct ioat_softc *ioat) +ioat_start_channel(struct ioat_softc *ioat) { uint64_t status; uint32_t chanerr; @@ -435,14 +435,6 @@ ioat3_attach(device_t device) ioat->head = 0; ioat->tail = 0; ioat->last_seen = 0; - - error = ioat_reset_hw(ioat); - if (error != 0) - return (error); - - ioat_write_chanctrl(ioat, IOAT_CHANCTRL_RUN); - ioat_write_chancmp(ioat, ioat->comp_update_bus_addr); - ioat_write_chainaddr(ioat, ring[0]->hw_desc_bus_addr); return (0); } @@ -469,6 +461,7 @@ ioat_comp_update_map(void *arg, bus_dma_ { struct ioat_softc *ioat = arg; + KASSERT(error == 0, ("%s: error:%d", __func__, error)); ioat->comp_update_bus_addr = seg[0].ds_addr; } @@ -477,6 +470,7 @@ ioat_dmamap_cb(void *arg, bus_dma_segmen { bus_addr_t *baddr; + KASSERT(error == 0, ("%s: error:%d", __func__, error)); baddr = arg; *baddr = segs->ds_addr; } @@ -1006,7 +1000,7 @@ ioat_reset_hw(struct ioat_softc *ioat) { uint64_t status; uint32_t chanerr; - int timeout; + unsigned timeout; status = ioat_get_chansts(ioat); if (is_ioat_active(status) || is_ioat_idle(status)) @@ -1021,6 +1015,8 @@ ioat_reset_hw(struct ioat_softc *ioat) if (timeout == 20) return (ETIMEDOUT); + KASSERT(ioat_get_active(ioat) == 0, ("active after quiesce")); + chanerr = ioat_read_4(ioat, IOAT_CHANERR_OFFSET); ioat_write_4(ioat, IOAT_CHANERR_OFFSET, chanerr); @@ -1055,7 +1051,34 @@ ioat_reset_hw(struct ioat_softc *ioat) pci_restore_state(ioat->device); } - return (0); + /* Reset attempts to return the hardware to "halted." */ + status = ioat_get_chansts(ioat); + if (is_ioat_active(status) || is_ioat_idle(status)) { + /* So this really shouldn't happen... */ + ioat_log_message(0, "Device is active after a reset?\n"); + ioat_write_chanctrl(ioat, IOAT_CHANCTRL_RUN); + return (0); + } + + chanerr = ioat_read_4(ioat, IOAT_CHANERR_OFFSET); + ioat_halted_debug(ioat, chanerr); + if (chanerr != 0) + return (EIO); + + /* + * Bring device back online after reset. Writing CHAINADDR brings the + * device back to active. + * + * The internal ring counter resets to zero, so we have to start over + * at zero as well. + */ + ioat->tail = ioat->head = 0; + ioat->last_seen = 0; + + ioat_write_chanctrl(ioat, IOAT_CHANCTRL_RUN); + ioat_write_chancmp(ioat, ioat->comp_update_bus_addr); + ioat_write_chainaddr(ioat, ioat->ring[0]->hw_desc_bus_addr); + return (ioat_start_channel(ioat)); } static int Modified: head/sys/dev/ioat/ioat_hw.h ============================================================================== --- head/sys/dev/ioat/ioat_hw.h Sat Oct 24 23:46:20 2015 (r289911) +++ head/sys/dev/ioat/ioat_hw.h Sat Oct 24 23:46:32 2015 (r289912) @@ -97,6 +97,35 @@ __FBSDID("$FreeBSD$"); #define IOAT_CHANERR_OFFSET 0xA8 +#define IOAT_CHANERR_XSADDERR (1 << 0) +#define IOAT_CHANERR_XDADDERR (1 << 1) +#define IOAT_CHANERR_NDADDERR (1 << 2) +#define IOAT_CHANERR_DERR (1 << 3) +#define IOAT_CHANERR_CHADDERR (1 << 4) +#define IOAT_CHANERR_CCMDERR (1 << 5) +#define IOAT_CHANERR_CUNCORERR (1 << 6) +#define IOAT_CHANERR_DUNCORERR (1 << 7) +#define IOAT_CHANERR_RDERR (1 << 8) +#define IOAT_CHANERR_WDERR (1 << 9) +#define IOAT_CHANERR_DCERR (1 << 10) +#define IOAT_CHANERR_DXSERR (1 << 11) +#define IOAT_CHANERR_CMPADDERR (1 << 12) +#define IOAT_CHANERR_INTCFGERR (1 << 13) +#define IOAT_CHANERR_SEDERR (1 << 14) +#define IOAT_CHANERR_UNAFFERR (1 << 15) +#define IOAT_CHANERR_CXPERR (1 << 16) +/* Reserved. (1 << 17) */ +#define IOAT_CHANERR_DCNTERR (1 << 18) +#define IOAT_CHANERR_DIFFERR (1 << 19) +#define IOAT_CHANERR_GTVERR (1 << 20) +#define IOAT_CHANERR_ATVERR (1 << 21) +#define IOAT_CHANERR_RTVERR (1 << 22) +#define IOAT_CHANERR_BBERR (1 << 23) +#define IOAT_CHANERR_RDIFFERR (1 << 24) +#define IOAT_CHANERR_RGTVERR (1 << 25) +#define IOAT_CHANERR_RATVERR (1 << 26) +#define IOAT_CHANERR_RRTVERR (1 << 27) + #define IOAT_CFG_CHANERR_INT_OFFSET 0x180 #define IOAT_CFG_CHANERRMASK_INT_OFFSET 0x184