From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 00:43:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B610C106564A; Sun, 22 Apr 2012 00:43:32 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 967888FC0A; Sun, 22 Apr 2012 00:43:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M0hWi9011798; Sun, 22 Apr 2012 00:43:32 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M0hWT7011795; Sun, 22 Apr 2012 00:43:32 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201204220043.q3M0hWT7011795@svn.freebsd.org> From: Marius Strobl Date: Sun, 22 Apr 2012 00:43:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234560 - head/sys/arm/at91 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 00:43:32 -0000 Author: marius Date: Sun Apr 22 00:43:32 2012 New Revision: 234560 URL: http://svn.freebsd.org/changeset/base/234560 Log: - Add support for MCI1 revision 2xx controllers and a work-around for their "Data Write Operation and number of bytes" erratum. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Modified: head/sys/arm/at91/at91_mci.c head/sys/arm/at91/at91_mcireg.h Modified: head/sys/arm/at91/at91_mci.c ============================================================================== --- head/sys/arm/at91/at91_mci.c Sat Apr 21 20:22:02 2012 (r234559) +++ head/sys/arm/at91/at91_mci.c Sun Apr 22 00:43:32 2012 (r234560) @@ -113,6 +113,7 @@ static void at91_mci_intr(void *); /* helper routines */ static int at91_mci_activate(device_t dev); static void at91_mci_deactivate(device_t dev); +static int at91_mci_is_mci1rev2xx(void); #define AT91_MCI_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define AT91_MCI_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) @@ -141,11 +142,16 @@ static void at91_mci_init(device_t dev) { struct at91_mci_softc *sc = device_get_softc(dev); + uint32_t val; WR4(sc, MCI_CR, MCI_CR_MCIEN); /* Enable controller */ WR4(sc, MCI_IDR, 0xffffffff); /* Turn off interrupts */ WR4(sc, MCI_DTOR, MCI_DTOR_DTOMUL_1M | 1); - WR4(sc, MCI_MR, 0x834a); // XXX GROSS HACK FROM LINUX + val = MCI_MR_PDCMODE; + val |= 0x34a; /* PWSDIV = 3; CLKDIV = 74 */ + if (at91_mci_is_mci1rev2xx()) + val |= MCI_MR_RDPROOF | MCI_MR_WRPROOF; + WR4(sc, MCI_MR, val); #ifndef AT91_MCI_SLOT_B WR4(sc, MCI_SDCR, 0); /* SLOT A, 1 bit bus */ #else @@ -303,6 +309,29 @@ at91_mci_deactivate(device_t dev) return; } +static int +at91_mci_is_mci1rev2xx(void) +{ + + switch (AT91_CPU(at91_chip_id)) { + case AT91_CPU_SAM9260: + case AT91_CPU_SAM9263: +#ifdef notyet + case AT91_CPU_CAP9: +#endif + case AT91_CPU_SAM9G10: + case AT91_CPU_SAM9G20: +#ifdef notyet + case AT91_CPU_SAM9RL: +#endif + case AT91_CPU_SAM9XE128: + case AT91_CPU_SAM9XE256: + case AT91_CPU_SAM9XE512: + return(1); + } + return (0); +} + static void at91_mci_getaddr(void *arg, bus_dma_segment_t *segs, int nsegs, int error) { @@ -346,6 +375,7 @@ at91_mci_update_ios(device_t brdev, devi static void at91_mci_start_cmd(struct at91_mci_softc *sc, struct mmc_command *cmd) { + size_t len; uint32_t cmdr, ier = 0, mr; uint32_t *src, *dst; int i; @@ -397,6 +427,7 @@ at91_mci_start_cmd(struct at91_mci_softc WR4(sc, MCI_MR, mr | (data->len << 16) | MCI_MR_PDCMODE); WR4(sc, PDC_PTCR, PDC_PTCR_RXTDIS | PDC_PTCR_TXTDIS); if (cmdr & MCI_CMDR_TRCMD_START) { + len = data->len; if (cmdr & MCI_CMDR_TRDIR) vaddr = cmd->data->data; else { @@ -411,6 +442,15 @@ at91_mci_start_cmd(struct at91_mci_softc vaddr = sc->bounce_buffer; src = (uint32_t *)cmd->data->data; dst = (uint32_t *)vaddr; + /* + * If this is MCI1 revision 2xx controller, apply + * a work-around for the "Data Write Operation and + * number of bytes" erratum. + */ + if (at91_mci_is_mci1rev2xx() && data->len < 12) { + len = 12; + memset(dst, 0, 12); + } if (sc->sc_cap & CAP_NEEDS_BYTESWAP) { for (i = 0; i < data->len / 4; i++) dst[i] = bswap32(src[i]); @@ -418,7 +458,7 @@ at91_mci_start_cmd(struct at91_mci_softc memcpy(dst, src, data->len); } data->xfer_len = 0; - if (bus_dmamap_load(sc->dmatag, sc->map, vaddr, data->len, + if (bus_dmamap_load(sc->dmatag, sc->map, vaddr, len, at91_mci_getaddr, &paddr, 0) != 0) { cmd->error = MMC_ERR_NO_MEMORY; sc->req = NULL; @@ -430,12 +470,12 @@ at91_mci_start_cmd(struct at91_mci_softc if (cmdr & MCI_CMDR_TRDIR) { bus_dmamap_sync(sc->dmatag, sc->map, BUS_DMASYNC_PREREAD); WR4(sc, PDC_RPR, paddr); - WR4(sc, PDC_RCR, data->len / 4); + WR4(sc, PDC_RCR, len / 4); ier = MCI_SR_ENDRX; } else { bus_dmamap_sync(sc->dmatag, sc->map, BUS_DMASYNC_PREWRITE); WR4(sc, PDC_TPR, paddr); - WR4(sc, PDC_TCR, data->len / 4); + WR4(sc, PDC_TCR, len / 4); ier = MCI_SR_TXBUFE; } } @@ -769,7 +809,7 @@ static device_method_t at91_mci_methods[ DEVMETHOD(mmcbr_acquire_host, at91_mci_acquire_host), DEVMETHOD(mmcbr_release_host, at91_mci_release_host), - {0, 0}, + DEVMETHOD_END }; static driver_t at91_mci_driver = { @@ -777,7 +817,8 @@ static driver_t at91_mci_driver = { at91_mci_methods, sizeof(struct at91_mci_softc), }; -static devclass_t at91_mci_devclass; +static devclass_t at91_mci_devclass; -DRIVER_MODULE(at91_mci, atmelarm, at91_mci_driver, at91_mci_devclass, 0, 0); +DRIVER_MODULE(at91_mci, atmelarm, at91_mci_driver, at91_mci_devclass, NULL, + NULL); Modified: head/sys/arm/at91/at91_mcireg.h ============================================================================== --- head/sys/arm/at91/at91_mcireg.h Sat Apr 21 20:22:02 2012 (r234559) +++ head/sys/arm/at91/at91_mcireg.h Sun Apr 22 00:43:32 2012 (r234560) @@ -54,6 +54,9 @@ /* -------- MCI_MR : (MCI Offset: 0x4) MCI Mode Register -------- */ #define MCI_MR_CLKDIV (0xffu << 0) /* (MCI) Clock Divider */ #define MCI_MR_PWSDIV (0x3fu << 8) /* (MCI) Power Saving Divider */ +#define MCI_MR_RDPROOF (0x1u << 11) /* (MCI) Read Proof Enable */ +#define MCI_MR_WRPROOF (0x1u << 12) /* (MCI) Write Proof Enable */ +#define MCI_MR_PDCFBYTE (0x1u << 13) /* (MCI) PDC Force Byte Transfer */ #define MCI_MR_PDCPADV (0x1u << 14) /* (MCI) PDC Padding Value */ #define MCI_MR_PDCMODE (0x1u << 15) /* (MCI) PDC Oriented Mode */ #define MCI_MR_BLKLEN 0x3fff0000ul /* (MCI) Data Block Length */ From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 00:58:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71F2D106566C; Sun, 22 Apr 2012 00:58:05 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 534A08FC17; Sun, 22 Apr 2012 00:58:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M0w5K8012264; Sun, 22 Apr 2012 00:58:05 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M0w5nd012262; Sun, 22 Apr 2012 00:58:05 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201204220058.q3M0w5nd012262@svn.freebsd.org> From: Marius Strobl Date: Sun, 22 Apr 2012 00:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234561 - head/sys/arm/arm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 00:58:05 -0000 Author: marius Date: Sun Apr 22 00:58:04 2012 New Revision: 234561 URL: http://svn.freebsd.org/changeset/base/234561 Log: Interrupts must be disabled while handling a partial cache line flush, as otherwise the interrupt handling code may modify data in the non-DMA part of the cache line while we have it stashed away in the temporary stack buffer, then we end up restoring a stale value. PR: 160431 Submitted by: Ian Lepore MFC after: 1 week Modified: head/sys/arm/arm/busdma_machdep.c Modified: head/sys/arm/arm/busdma_machdep.c ============================================================================== --- head/sys/arm/arm/busdma_machdep.c Sun Apr 22 00:43:32 2012 (r234560) +++ head/sys/arm/arm/busdma_machdep.c Sun Apr 22 00:58:04 2012 (r234561) @@ -1091,14 +1091,16 @@ static void bus_dmamap_sync_buf(void *buf, int len, bus_dmasync_op_t op) { char _tmp_cl[arm_dcache_align], _tmp_clend[arm_dcache_align]; + register_t s; + int partial; if ((op & BUS_DMASYNC_PREWRITE) && !(op & BUS_DMASYNC_PREREAD)) { cpu_dcache_wb_range((vm_offset_t)buf, len); cpu_l2cache_wb_range((vm_offset_t)buf, len); } + partial = (((vm_offset_t)buf) | len) & arm_dcache_align_mask; if (op & BUS_DMASYNC_PREREAD) { - if (!(op & BUS_DMASYNC_PREWRITE) && - ((((vm_offset_t)(buf) | len) & arm_dcache_align_mask) == 0)) { + if (!(op & BUS_DMASYNC_PREWRITE) && !partial) { cpu_dcache_inv_range((vm_offset_t)buf, len); cpu_l2cache_inv_range((vm_offset_t)buf, len); } else { @@ -1107,27 +1109,32 @@ bus_dmamap_sync_buf(void *buf, int len, } } if (op & BUS_DMASYNC_POSTREAD) { - if ((vm_offset_t)buf & arm_dcache_align_mask) { - memcpy(_tmp_cl, (void *)((vm_offset_t)buf & ~ - arm_dcache_align_mask), - (vm_offset_t)buf & arm_dcache_align_mask); - } - if (((vm_offset_t)buf + len) & arm_dcache_align_mask) { - memcpy(_tmp_clend, (void *)((vm_offset_t)buf + len), - arm_dcache_align - (((vm_offset_t)(buf) + len) & - arm_dcache_align_mask)); + if (partial) { + s = intr_disable(); + if ((vm_offset_t)buf & arm_dcache_align_mask) + memcpy(_tmp_cl, (void *)((vm_offset_t)buf & + ~arm_dcache_align_mask), + (vm_offset_t)buf & arm_dcache_align_mask); + if (((vm_offset_t)buf + len) & arm_dcache_align_mask) + memcpy(_tmp_clend, + (void *)((vm_offset_t)buf + len), + arm_dcache_align - (((vm_offset_t)(buf) + + len) & arm_dcache_align_mask)); } cpu_dcache_inv_range((vm_offset_t)buf, len); cpu_l2cache_inv_range((vm_offset_t)buf, len); - - if ((vm_offset_t)buf & arm_dcache_align_mask) - memcpy((void *)((vm_offset_t)buf & - ~arm_dcache_align_mask), _tmp_cl, - (vm_offset_t)buf & arm_dcache_align_mask); - if (((vm_offset_t)buf + len) & arm_dcache_align_mask) - memcpy((void *)((vm_offset_t)buf + len), _tmp_clend, - arm_dcache_align - (((vm_offset_t)(buf) + len) & - arm_dcache_align_mask)); + if (partial) { + if ((vm_offset_t)buf & arm_dcache_align_mask) + memcpy((void *)((vm_offset_t)buf & + ~arm_dcache_align_mask), _tmp_cl, + (vm_offset_t)buf & arm_dcache_align_mask); + if (((vm_offset_t)buf + len) & arm_dcache_align_mask) + memcpy((void *)((vm_offset_t)buf + len), + _tmp_clend, arm_dcache_align - + (((vm_offset_t)(buf) + len) & + arm_dcache_align_mask)); + intr_restore(s); + } } } From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 03:53:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ACA91106566C; Sun, 22 Apr 2012 03:53:12 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DF7D8FC08; Sun, 22 Apr 2012 03:53:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M3rCwS018154; Sun, 22 Apr 2012 03:53:12 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M3rCFr018152; Sun, 22 Apr 2012 03:53:12 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201204220353.q3M3rCFr018152@svn.freebsd.org> From: Takahashi Yoshihiro Date: Sun, 22 Apr 2012 03:53:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234562 - stable/9/sys/boot/pc98/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 03:53:12 -0000 Author: nyan Date: Sun Apr 22 03:53:11 2012 New Revision: 234562 URL: http://svn.freebsd.org/changeset/base/234562 Log: MFC: revision 232784 MFi386: revisions 232570 and 232754 Fix boot2 to handle boot config files that only contain a custom path to a loader or kernel. Modified: stable/9/sys/boot/pc98/boot2/boot2.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/pc98/boot2/boot2.c ============================================================================== --- stable/9/sys/boot/pc98/boot2/boot2.c Sun Apr 22 00:58:04 2012 (r234561) +++ stable/9/sys/boot/pc98/boot2/boot2.c Sun Apr 22 03:53:11 2012 (r234562) @@ -130,9 +130,9 @@ static struct dsk { unsigned part; unsigned start; } dsk; -static char cmd[512], cmddup[512]; +static char cmd[512], cmddup[512], knamebuf[1024]; static const char *kname = NULL; -static uint32_t opts; +static uint32_t opts = 0; static int comspeed = SIOSPD; static struct bootinfo bootinfo; static uint8_t ioctrl = IO_KEYBOARD; @@ -352,6 +352,7 @@ main(void) #endif uint8_t autoboot; ino_t ino; + size_t nbyte; dmadat = (void *)(roundup2(__base + (int32_t)&_end, 0x10000) - __base); v86.ctl = V86_FLAGS; @@ -378,8 +379,10 @@ main(void) autoboot = 1; if ((ino = lookup(PATH_CONFIG)) || - (ino = lookup(PATH_DOTCONFIG))) - fsread(ino, cmd, sizeof(cmd)); + (ino = lookup(PATH_DOTCONFIG))) { + nbyte = fsread(ino, cmd, sizeof(cmd) - 1); + cmd[nbyte] = '\0'; + } if (*cmd) { memcpy(cmddup, cmd, sizeof(cmd)); @@ -396,9 +399,9 @@ main(void) * or in case of failure, try to load a kernel directly instead. */ - if (autoboot && !kname) { + if (!kname) { kname = PATH_BOOT3; - if (!keyhit(3*SECOND)) { + if (autoboot && !keyhit(3*SECOND)) { load(); kname = PATH_KERNEL; } @@ -595,7 +598,12 @@ parse() dsk.daua = dsk.disk | dsk.unit; dsk_meta = 0; } - kname = arg; + if ((i = ep - arg)) { + if ((size_t)i >= sizeof(knamebuf)) + return -1; + memcpy(knamebuf, arg, i + 1); + kname = knamebuf; + } } arg = p; } From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 03:57:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74EFE106566C; Sun, 22 Apr 2012 03:57:34 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 46E748FC0A; Sun, 22 Apr 2012 03:57:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M3vYp2018345; Sun, 22 Apr 2012 03:57:34 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M3vYlY018343; Sun, 22 Apr 2012 03:57:34 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201204220357.q3M3vYlY018343@svn.freebsd.org> From: Takahashi Yoshihiro Date: Sun, 22 Apr 2012 03:57:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234563 - stable/8/sys/boot/pc98/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 03:57:34 -0000 Author: nyan Date: Sun Apr 22 03:57:33 2012 New Revision: 234563 URL: http://svn.freebsd.org/changeset/base/234563 Log: MFC: revision 232784 MFi386: revisions 232570 and 232754 Fix boot2 to handle boot config files that only contain a custom path to a loader or kernel. Modified: stable/8/sys/boot/pc98/boot2/boot2.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/boot/ (props changed) Modified: stable/8/sys/boot/pc98/boot2/boot2.c ============================================================================== --- stable/8/sys/boot/pc98/boot2/boot2.c Sun Apr 22 03:53:11 2012 (r234562) +++ stable/8/sys/boot/pc98/boot2/boot2.c Sun Apr 22 03:57:33 2012 (r234563) @@ -130,9 +130,9 @@ static struct dsk { unsigned part; unsigned start; } dsk; -static char cmd[512], cmddup[512]; +static char cmd[512], cmddup[512], knamebuf[1024]; static const char *kname = NULL; -static uint32_t opts; +static uint32_t opts = 0; static int comspeed = SIOSPD; static struct bootinfo bootinfo; static uint8_t ioctrl = IO_KEYBOARD; @@ -352,6 +352,7 @@ main(void) #endif uint8_t autoboot; ino_t ino; + size_t nbyte; dmadat = (void *)(roundup2(__base + (int32_t)&_end, 0x10000) - __base); v86.ctl = V86_FLAGS; @@ -378,8 +379,10 @@ main(void) autoboot = 1; if ((ino = lookup(PATH_CONFIG)) || - (ino = lookup(PATH_DOTCONFIG))) - fsread(ino, cmd, sizeof(cmd)); + (ino = lookup(PATH_DOTCONFIG))) { + nbyte = fsread(ino, cmd, sizeof(cmd) - 1); + cmd[nbyte] = '\0'; + } if (*cmd) { memcpy(cmddup, cmd, sizeof(cmd)); @@ -396,9 +399,9 @@ main(void) * or in case of failure, try to load a kernel directly instead. */ - if (autoboot && !kname) { + if (!kname) { kname = PATH_BOOT3; - if (!keyhit(3*SECOND)) { + if (autoboot && !keyhit(3*SECOND)) { load(); kname = PATH_KERNEL; } @@ -595,7 +598,12 @@ parse() dsk.daua = dsk.disk | dsk.unit; dsk_meta = 0; } - kname = arg; + if ((i = ep - arg)) { + if ((size_t)i >= sizeof(knamebuf)) + return -1; + memcpy(knamebuf, arg, i + 1); + kname = knamebuf; + } } arg = p; } From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 04:36:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B513D1065670; Sun, 22 Apr 2012 04:36:25 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A02108FC0C; Sun, 22 Apr 2012 04:36:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M4aP9c020197; Sun, 22 Apr 2012 04:36:25 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M4aPwA020195; Sun, 22 Apr 2012 04:36:25 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201204220436.q3M4aPwA020195@svn.freebsd.org> From: Takahashi Yoshihiro Date: Sun, 22 Apr 2012 04:36:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234564 - head/sys/pc98/pc98 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 04:36:25 -0000 Author: nyan Date: Sun Apr 22 04:36:25 2012 New Revision: 234564 URL: http://svn.freebsd.org/changeset/base/234564 Log: MFi386: revisions 234074 and 234105 - Adding the BSP as an interrupt target directly in cpu_startup(). Modified: head/sys/pc98/pc98/machdep.c Modified: head/sys/pc98/pc98/machdep.c ============================================================================== --- head/sys/pc98/pc98/machdep.c Sun Apr 22 03:57:33 2012 (r234563) +++ head/sys/pc98/pc98/machdep.c Sun Apr 22 04:36:25 2012 (r234564) @@ -271,6 +271,13 @@ cpu_startup(dummy) bufinit(); vm_pager_bufferinit(); cpu_setregs(); + +#ifdef SMP + /* + * Add BSP as an interrupt target. + */ + intr_add_cpu(0); +#endif } /* From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 07:42:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8F9841065670; Sun, 22 Apr 2012 07:42:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7AB598FC08; Sun, 22 Apr 2012 07:42:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M7gjEg025927; Sun, 22 Apr 2012 07:42:45 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M7gjsF025925; Sun, 22 Apr 2012 07:42:45 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201204220742.q3M7gjsF025925@svn.freebsd.org> From: Xin LI Date: Sun, 22 Apr 2012 07:42:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234565 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 07:42:45 -0000 Author: delphij Date: Sun Apr 22 07:42:44 2012 New Revision: 234565 URL: http://svn.freebsd.org/changeset/base/234565 Log: Use 10.0 instead of 10 for FreeBSD version number. The latter undefined. Modified: head/share/man/man4/carp.4 Modified: head/share/man/man4/carp.4 ============================================================================== --- head/share/man/man4/carp.4 Sun Apr 22 04:36:25 2012 (r234564) +++ head/share/man/man4/carp.4 Sun Apr 22 07:42:44 2012 (r234565) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 26, 2012 +.Dd April 22, 2012 .Dt CARP 4 .Os .Sh NAME @@ -295,7 +295,7 @@ The device was imported into .Fx 5.4 . In -.Fx 10 +.Fx 10.0 the .Nm was significantly rewritten, and is no longer a pseudo-interface. From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 07:50:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58B15106564A; Sun, 22 Apr 2012 07:50:25 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43A108FC0A; Sun, 22 Apr 2012 07:50:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M7oPIt026206; Sun, 22 Apr 2012 07:50:25 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M7oPpA026204; Sun, 22 Apr 2012 07:50:25 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201204220750.q3M7oPpA026204@svn.freebsd.org> From: Xin LI Date: Sun, 22 Apr 2012 07:50:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234566 - head/cddl/contrib/opensolaris/cmd/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 07:50:25 -0000 Author: delphij Date: Sun Apr 22 07:50:24 2012 New Revision: 234566 URL: http://svn.freebsd.org/changeset/base/234566 Log: - Correct a typo which prevents 'lzjb' be displayed; - Use quotes when tab is used. Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Apr 22 07:42:44 2012 (r234565) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Apr 22 07:50:24 2012 (r234566) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 26, 2012 +.Dd April 22, 2012 .Dt ZFS 8 .Os .Sh NAME @@ -833,7 +833,7 @@ disables integrity checking on user data a recommended practice. .It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | Cm zle Controls the compression algorithm used for this dataset. The -.CM lzjb +.Cm lzjb compression algorithm is optimized for performance while providing decent data compression. Setting compression to .Cm on @@ -1275,11 +1275,11 @@ for legacy mounts or the command for normal file systems, its mount options are set according to its properties. The correlation between properties and mount options is as follows: .Bl -column -offset 4n "PROPERTY" "MOUNT OPTION" -.It PROPERTY MOUNT OPTION -.It atime atime/noatime -.It exec exec/noexec -.It readonly ro/rw -.It setuid suid/nosuid +.It "PROPERTY MOUNT OPTION" +.It "atime atime/noatime" +.It "exec exec/noexec" +.It "readonly ro/rw" +.It "setuid suid/nosuid" .El .Pp In addition, these options can be set on a per-mount basis using the From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 07:51:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 97D57106566C; Sun, 22 Apr 2012 07:51:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83D808FC0A; Sun, 22 Apr 2012 07:51:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M7po3M026285; Sun, 22 Apr 2012 07:51:50 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M7po6h026283; Sun, 22 Apr 2012 07:51:50 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201204220751.q3M7po6h026283@svn.freebsd.org> From: Xin LI Date: Sun, 22 Apr 2012 07:51:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234567 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 07:51:50 -0000 Author: delphij Date: Sun Apr 22 07:51:49 2012 New Revision: 234567 URL: http://svn.freebsd.org/changeset/base/234567 Log: - Use quote when tab is used; - Follow the same macros used in device driver manual pages. Modified: head/lib/libc/sys/setfib.2 Modified: head/lib/libc/sys/setfib.2 ============================================================================== --- head/lib/libc/sys/setfib.2 Sun Apr 22 07:50:24 2012 (r234566) +++ head/lib/libc/sys/setfib.2 Sun Apr 22 07:51:49 2012 (r234567) @@ -51,8 +51,9 @@ may be retrieved by the .Va net.fibs sysctl. The system maximum is set in the kernel configuration file with -.Pp -.Dl options ROUTETABLES= Ns Em N +.Bd -ragged -offset indent +.Cd "options ROUTETABLES=" Ns Em N +.Ed .Pp or in .Pa /boot/loader.conf From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 07:55:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57FC8106566B; Sun, 22 Apr 2012 07:55:57 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 410238FC08; Sun, 22 Apr 2012 07:55:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M7tvYC026456; Sun, 22 Apr 2012 07:55:57 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M7tue6026454; Sun, 22 Apr 2012 07:55:56 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201204220755.q3M7tue6026454@svn.freebsd.org> From: Xin LI Date: Sun, 22 Apr 2012 07:55:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234568 - head/usr.bin/rctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 07:55:57 -0000 Author: delphij Date: Sun Apr 22 07:55:56 2012 New Revision: 234568 URL: http://svn.freebsd.org/changeset/base/234568 Log: The .Fx macro needs the version number be in its own word separated by a space. This change have no visible effect for rendering. Modified: head/usr.bin/rctl/rctl.8 Modified: head/usr.bin/rctl/rctl.8 ============================================================================== --- head/usr.bin/rctl/rctl.8 Sun Apr 22 07:51:49 2012 (r234567) +++ head/usr.bin/rctl/rctl.8 Sun Apr 22 07:55:56 2012 (r234568) @@ -186,7 +186,7 @@ Display all the rules applicable to proc The .Nm command appeared in -.Fx 9.0. +.Fx 9.0 . .Sh AUTHORS .An -nosplit The From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 08:35:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82EA6106564A; Sun, 22 Apr 2012 08:35:31 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx07.syd.optusnet.com.au (fallbackmx07.syd.optusnet.com.au [211.29.132.9]) by mx1.freebsd.org (Postfix) with ESMTP id F368E8FC12; Sun, 22 Apr 2012 08:35:30 +0000 (UTC) Received: from mail26.syd.optusnet.com.au (mail26.syd.optusnet.com.au [211.29.133.167]) by fallbackmx07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q3M8ZNLQ013588; Sun, 22 Apr 2012 18:35:23 +1000 Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail26.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q3M8ZDEo019262 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 22 Apr 2012 18:35:15 +1000 Date: Sun, 22 Apr 2012 18:35:13 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh In-Reply-To: <201204211745.q3LHjeHx098154@svn.freebsd.org> Message-ID: <20120422182554.S901@besplex.bde.org> References: <201204211745.q3LHjeHx098154@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234549 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 08:35:31 -0000 On Sat, 21 Apr 2012, Warner Losh wrote: > Log: > Fix partially merged patch from my external compiler tree in r234546. > Define NM except when we're in strict POSIX mode. > > Modified: > head/share/mk/sys.mk > > Modified: head/share/mk/sys.mk > ============================================================================== > --- head/share/mk/sys.mk Sat Apr 21 16:27:50 2012 (r234548) > +++ head/share/mk/sys.mk Sat Apr 21 17:45:40 2012 (r234549) > @@ -141,6 +141,10 @@ YFLAGS ?= > YFLAGS ?= -d > .endif > > +.if !defined(%POSIX) > +NM ?= nm > +.endif > + > .if defined(%POSIX) > > # Posix 1003.2 mandated rules Any chance of defining NM in order? The existing list was sorted except for RANLIB being grouped with AR, CPP after CXX*, LD after LEX, LINTL* after LINTO* (flags are grouped with commands so the combined sorting is not fully alphabetical). Only NM is totally disordered (added at the end instead of inserted). The unsorted macros are associated with more namespace pollution than the sorted ones. Bruce From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 08:49:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8D168106566B; Sun, 22 Apr 2012 08:49:14 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 750788FC0A; Sun, 22 Apr 2012 08:49:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M8nEZU028238; Sun, 22 Apr 2012 08:49:14 GMT (envelope-from jasone@svn.freebsd.org) Received: (from jasone@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M8nEgb028222; Sun, 22 Apr 2012 08:49:14 GMT (envelope-from jasone@svn.freebsd.org) Message-Id: <201204220849.q3M8nEgb028222@svn.freebsd.org> From: Jason Evans Date: Sun, 22 Apr 2012 08:49:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234569 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 08:49:14 -0000 Author: jasone Date: Sun Apr 22 08:49:13 2012 New Revision: 234569 URL: http://svn.freebsd.org/changeset/base/234569 Log: Import jemalloc a8f8d7540d66ddee7337db80c92890916e1063ca (dev branch, prior to 3.0.0 release). This fixes several bugs related to memory initialization. Mangle __jemalloc_a0{malloc,calloc,free}() just like all the other library-internal symbols in jemalloc, and adjust the tls allocation code in libc to use the mangled names. 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/chunk.h head/contrib/jemalloc/include/jemalloc/internal/chunk_mmap.h head/contrib/jemalloc/include/jemalloc/internal/private_namespace.h head/contrib/jemalloc/include/jemalloc/internal/tsd.h head/contrib/jemalloc/include/jemalloc/jemalloc.h head/contrib/jemalloc/src/chunk.c head/contrib/jemalloc/src/chunk_dss.c head/contrib/jemalloc/src/chunk_mmap.c head/contrib/jemalloc/src/huge.c head/contrib/jemalloc/src/jemalloc.c head/lib/libc/gen/tls.c Modified: head/contrib/jemalloc/ChangeLog ============================================================================== --- head/contrib/jemalloc/ChangeLog Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/ChangeLog Sun Apr 22 08:49:13 2012 (r234569) @@ -70,6 +70,8 @@ found in the git revision history: invalid statistics and crashes. - Work around TLS dallocation via free() on Linux. This bug could cause write-after-free memory corruption. + - Fix chunk_alloc_dss() to stop claiming memory is zeroed. This bug could + cause memory corruption and crashes with --enable-dss specified. - Fix malloc_stats_print() to honor 'b' and 'l' in the opts parameter. - Fix realloc(p, 0) to act like free(p). - Do not enforce minimum alignment in memalign(). Modified: head/contrib/jemalloc/FREEBSD-diffs ============================================================================== --- head/contrib/jemalloc/FREEBSD-diffs Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/FREEBSD-diffs Sun Apr 22 08:49:13 2012 (r234569) @@ -1,5 +1,5 @@ diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in -index f78f423..ce6df80 100644 +index e8a5722..cec85b5 100644 --- a/doc/jemalloc.xml.in +++ b/doc/jemalloc.xml.in @@ -51,12 +51,23 @@ @@ -82,17 +82,10 @@ index 8837ef5..d7133f4 100644 bool malloc_mutex_init(malloc_mutex_t *mutex); diff --git a/include/jemalloc/internal/private_namespace.h b/include/jemalloc/internal/private_namespace.h -index 15fe3c5..be94eb8 100644 +index bb1b63e..00eb169 100644 --- a/include/jemalloc/internal/private_namespace.h +++ b/include/jemalloc/internal/private_namespace.h -@@ -1,6 +1,3 @@ --#define a0calloc JEMALLOC_N(a0calloc) --#define a0free JEMALLOC_N(a0free) --#define a0malloc JEMALLOC_N(a0malloc) - #define arena_alloc_junk_small JEMALLOC_N(arena_alloc_junk_small) - #define arena_bin_index JEMALLOC_N(arena_bin_index) - #define arena_bin_info JEMALLOC_N(arena_bin_info) -@@ -167,7 +164,6 @@ +@@ -165,7 +165,6 @@ #define iqalloc JEMALLOC_N(iqalloc) #define iralloc JEMALLOC_N(iralloc) #define isalloc JEMALLOC_N(isalloc) @@ -195,7 +188,7 @@ index 0000000..2c5797f +#define pthread_mutex_lock _pthread_mutex_lock +#define pthread_mutex_unlock _pthread_mutex_unlock diff --git a/src/jemalloc.c b/src/jemalloc.c -index 00c2b23..729f4e1 100644 +index f9c8916..8e24a5a 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -8,6 +8,9 @@ malloc_tsd_data(, arenas, arena_t *, NULL) Modified: head/contrib/jemalloc/VERSION ============================================================================== --- head/contrib/jemalloc/VERSION Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/VERSION Sun Apr 22 08:49:13 2012 (r234569) @@ -1 +1 @@ -1.0.0-283-g606f1fdc3cdbc700717133ca56685313caea24bb +1.0.0-286-ga8f8d7540d66ddee7337db80c92890916e1063ca Modified: head/contrib/jemalloc/doc/jemalloc.3 ============================================================================== --- head/contrib/jemalloc/doc/jemalloc.3 Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/doc/jemalloc.3 Sun Apr 22 08:49:13 2012 (r234569) @@ -2,12 +2,12 @@ .\" Title: JEMALLOC .\" Author: Jason Evans .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 04/20/2012 +.\" Date: 04/21/2012 .\" Manual: User Manual -.\" Source: jemalloc 1.0.0-283-g606f1fdc3cdbc700717133ca56685313caea24bb +.\" Source: jemalloc 1.0.0-286-ga8f8d7540d66ddee7337db80c92890916e1063ca .\" Language: English .\" -.TH "JEMALLOC" "3" "04/20/2012" "jemalloc 1.0.0-283-g606f1fdc3c" "User Manual" +.TH "JEMALLOC" "3" "04/21/2012" "jemalloc 1.0.0-286-ga8f8d7540d" "User Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,7 +31,7 @@ jemalloc \- general purpose memory allocation functions .SH "LIBRARY" .PP -This manual describes jemalloc 1\&.0\&.0\-283\-g606f1fdc3cdbc700717133ca56685313caea24bb\&. More information can be found at the +This manual describes jemalloc 1\&.0\&.0\-286\-ga8f8d7540d66ddee7337db80c92890916e1063ca\&. 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: @@ -404,9 +404,9 @@ Traditionally, allocators have used to obtain memory, which is suboptimal for several reasons, including race conditions, increased fragmentation, and artificial limitations on maximum usable memory\&. If \fB\-\-enable\-dss\fR is specified during configuration, this allocator uses both -\fBsbrk\fR(2) +\fBmmap\fR(2) and -\fBmmap\fR(2), in that order of preference; otherwise only +\fBsbrk\fR(2), in that order of preference; otherwise only \fBmmap\fR(2) is used\&. .PP Modified: head/contrib/jemalloc/include/jemalloc/internal/chunk.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/chunk.h Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/include/jemalloc/internal/chunk.h Sun Apr 22 08:49:13 2012 (r234569) @@ -44,8 +44,7 @@ extern size_t arena_maxclass; /* Max si void *chunk_alloc(size_t size, size_t alignment, bool base, bool *zero); void chunk_dealloc(void *chunk, size_t size, bool unmap); -bool chunk_boot0(void); -bool chunk_boot1(void); +bool chunk_boot(void); #endif /* JEMALLOC_H_EXTERNS */ /******************************************************************************/ Modified: head/contrib/jemalloc/include/jemalloc/internal/chunk_mmap.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/chunk_mmap.h Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/include/jemalloc/internal/chunk_mmap.h Sun Apr 22 08:49:13 2012 (r234569) @@ -11,11 +11,9 @@ void pages_purge(void *addr, size_t length); -void *chunk_alloc_mmap(size_t size, size_t alignment); +void *chunk_alloc_mmap(size_t size, size_t alignment, bool *zero); bool chunk_dealloc_mmap(void *chunk, size_t size); -bool chunk_mmap_boot(void); - #endif /* JEMALLOC_H_EXTERNS */ /******************************************************************************/ #ifdef JEMALLOC_H_INLINES Modified: head/contrib/jemalloc/include/jemalloc/internal/private_namespace.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/private_namespace.h Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/include/jemalloc/internal/private_namespace.h Sun Apr 22 08:49:13 2012 (r234569) @@ -1,3 +1,6 @@ +#define a0calloc JEMALLOC_N(a0calloc) +#define a0free JEMALLOC_N(a0free) +#define a0malloc JEMALLOC_N(a0malloc) #define arena_alloc_junk_small JEMALLOC_N(arena_alloc_junk_small) #define arena_bin_index JEMALLOC_N(arena_bin_index) #define arena_bin_info JEMALLOC_N(arena_bin_info) @@ -71,8 +74,7 @@ #define chunk_alloc JEMALLOC_N(chunk_alloc) #define chunk_alloc_dss JEMALLOC_N(chunk_alloc_dss) #define chunk_alloc_mmap JEMALLOC_N(chunk_alloc_mmap) -#define chunk_boot0 JEMALLOC_N(chunk_boot0) -#define chunk_boot1 JEMALLOC_N(chunk_boot1) +#define chunk_boot JEMALLOC_N(chunk_boot) #define chunk_dealloc JEMALLOC_N(chunk_dealloc) #define chunk_dealloc_mmap JEMALLOC_N(chunk_dealloc_mmap) #define chunk_dss_boot JEMALLOC_N(chunk_dss_boot) @@ -80,7 +82,6 @@ #define chunk_dss_postfork_parent JEMALLOC_N(chunk_dss_postfork_parent) #define chunk_dss_prefork JEMALLOC_N(chunk_dss_prefork) #define chunk_in_dss JEMALLOC_N(chunk_in_dss) -#define chunk_mmap_boot JEMALLOC_N(chunk_mmap_boot) #define chunk_npages JEMALLOC_N(chunk_npages) #define chunks_mtx JEMALLOC_N(chunks_mtx) #define chunks_rtree JEMALLOC_N(chunks_rtree) @@ -188,10 +189,6 @@ #define malloc_write JEMALLOC_N(malloc_write) #define map_bias JEMALLOC_N(map_bias) #define mb_write JEMALLOC_N(mb_write) -#define mmap_unaligned_tsd_boot JEMALLOC_N(mmap_unaligned_tsd_boot) -#define mmap_unaligned_tsd_cleanup_wrapper JEMALLOC_N(mmap_unaligned_tsd_cleanup_wrapper) -#define mmap_unaligned_tsd_get JEMALLOC_N(mmap_unaligned_tsd_get) -#define mmap_unaligned_tsd_set JEMALLOC_N(mmap_unaligned_tsd_set) #define mutex_boot JEMALLOC_N(mutex_boot) #define narenas JEMALLOC_N(narenas) #define ncpus JEMALLOC_N(ncpus) Modified: head/contrib/jemalloc/include/jemalloc/internal/tsd.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/tsd.h Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/include/jemalloc/internal/tsd.h Sun Apr 22 08:49:13 2012 (r234569) @@ -111,7 +111,7 @@ a_name##_tsd_cleanup_wrapper(void) \ \ if (a_name##_initialized) { \ a_name##_initialized = false; \ - a_cleanup(&a_name##_tls); \ + a_cleanup(&a_name##_tls); \ } \ return (a_name##_initialized); \ } \ Modified: head/contrib/jemalloc/include/jemalloc/jemalloc.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/jemalloc.h Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/include/jemalloc/jemalloc.h Sun Apr 22 08:49:13 2012 (r234569) @@ -7,12 +7,12 @@ extern "C" { #include #include -#define JEMALLOC_VERSION "1.0.0-283-g606f1fdc3cdbc700717133ca56685313caea24bb" +#define JEMALLOC_VERSION "1.0.0-286-ga8f8d7540d66ddee7337db80c92890916e1063ca" #define JEMALLOC_VERSION_MAJOR 1 #define JEMALLOC_VERSION_MINOR 0 #define JEMALLOC_VERSION_BUGFIX 0 -#define JEMALLOC_VERSION_NREV 283 -#define JEMALLOC_VERSION_GID "606f1fdc3cdbc700717133ca56685313caea24bb" +#define JEMALLOC_VERSION_NREV 286 +#define JEMALLOC_VERSION_GID "a8f8d7540d66ddee7337db80c92890916e1063ca" #include "jemalloc_defs.h" #include "jemalloc_FreeBSD.h" Modified: head/contrib/jemalloc/src/chunk.c ============================================================================== --- head/contrib/jemalloc/src/chunk.c Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/src/chunk.c Sun Apr 22 08:49:13 2012 (r234569) @@ -98,7 +98,10 @@ chunk_recycle(size_t size, size_t alignm if (node != NULL) base_node_dealloc(node); -#ifdef JEMALLOC_PURGE_MADVISE_FREE +#ifdef JEMALLOC_PURGE_MADVISE_DONTNEED + /* Pages are zeroed as a side effect of pages_purge(). */ + *zero = true; +#else if (*zero) { VALGRIND_MAKE_MEM_UNDEFINED(ret, size); memset(ret, 0, size); @@ -125,16 +128,16 @@ chunk_alloc(size_t size, size_t alignmen ret = chunk_recycle(size, alignment, zero); if (ret != NULL) goto label_return; + + ret = chunk_alloc_mmap(size, alignment, zero); + if (ret != NULL) + goto label_return; + if (config_dss) { ret = chunk_alloc_dss(size, alignment, zero); if (ret != NULL) goto label_return; } - ret = chunk_alloc_mmap(size, alignment); - if (ret != NULL) { - *zero = true; - goto label_return; - } /* All strategies for allocation failed. */ ret = NULL; @@ -161,7 +164,13 @@ label_return: if (config_prof && opt_prof && opt_prof_gdump && gdump) prof_gdump(); } + if (config_debug && *zero && ret != NULL) { + size_t i; + size_t *p = (size_t *)(uintptr_t)ret; + for (i = 0; i < size / sizeof(size_t); i++) + assert(p[i] == 0); + } assert(CHUNK_ADDR2BASE(ret) == ret); return (ret); } @@ -258,14 +267,14 @@ chunk_dealloc(void *chunk, size_t size, } if (unmap) { - if (chunk_dealloc_mmap(chunk, size) == false) - return; - chunk_record(chunk, size); + if ((config_dss && chunk_in_dss(chunk)) || + chunk_dealloc_mmap(chunk, size)) + chunk_record(chunk, size); } } bool -chunk_boot0(void) +chunk_boot(void) { /* Set variables according to the value of opt_lg_chunk. */ @@ -292,13 +301,3 @@ chunk_boot0(void) return (false); } - -bool -chunk_boot1(void) -{ - - if (chunk_mmap_boot()) - return (true); - - return (false); -} Modified: head/contrib/jemalloc/src/chunk_dss.c ============================================================================== --- head/contrib/jemalloc/src/chunk_dss.c Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/src/chunk_dss.c Sun Apr 22 08:49:13 2012 (r234569) @@ -89,7 +89,10 @@ chunk_alloc_dss(size_t size, size_t alig malloc_mutex_unlock(&dss_mtx); if (cpad_size != 0) chunk_dealloc(cpad, cpad_size, true); - *zero = true; + if (*zero) { + VALGRIND_MAKE_MEM_UNDEFINED(ret, size); + memset(ret, 0, size); + } return (ret); } } while (dss_prev != (void *)-1); Modified: head/contrib/jemalloc/src/chunk_mmap.c ============================================================================== --- head/contrib/jemalloc/src/chunk_mmap.c Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/src/chunk_mmap.c Sun Apr 22 08:49:13 2012 (r234569) @@ -2,23 +2,12 @@ #include "jemalloc/internal/jemalloc_internal.h" /******************************************************************************/ -/* Data. */ - -/* - * Used by chunk_alloc_mmap() to decide whether to attempt the fast path and - * potentially avoid some system calls. - */ -malloc_tsd_data(static, mmap_unaligned, bool, false) -malloc_tsd_funcs(JEMALLOC_INLINE, mmap_unaligned, bool, false, - malloc_tsd_no_cleanup) - -/******************************************************************************/ /* Function prototypes for non-inline static functions. */ static void *pages_map(void *addr, size_t size); static void pages_unmap(void *addr, size_t size); static void *chunk_alloc_mmap_slow(size_t size, size_t alignment, - bool unaligned); + bool unaligned, bool *zero); /******************************************************************************/ @@ -87,7 +76,7 @@ pages_purge(void *addr, size_t length) } static void * -chunk_alloc_mmap_slow(size_t size, size_t alignment, bool unaligned) +chunk_alloc_mmap_slow(size_t size, size_t alignment, bool unaligned, bool *zero) { void *ret, *pages; size_t alloc_size, leadsize, trailsize; @@ -112,23 +101,16 @@ chunk_alloc_mmap_slow(size_t size, size_ if (trailsize != 0) pages_unmap((void *)((uintptr_t)ret + size), trailsize); - /* - * If mmap() returned an aligned mapping, reset mmap_unaligned so that - * the next chunk_alloc_mmap() execution tries the fast allocation - * method. - */ - if (unaligned == false && mmap_unaligned_booted) { - bool mu = false; - mmap_unaligned_tsd_set(&mu); - } - + assert(ret != NULL); + *zero = true; return (ret); } void * -chunk_alloc_mmap(size_t size, size_t alignment) +chunk_alloc_mmap(size_t size, size_t alignment, bool *zero) { void *ret; + size_t offset; /* * Ideally, there would be a way to specify alignment to mmap() (like @@ -150,45 +132,37 @@ chunk_alloc_mmap(size_t size, size_t ali * * Another possible confounding factor is address space layout * randomization (ASLR), which causes mmap(2) to disregard the - * requested address. mmap_unaligned tracks whether the previous - * chunk_alloc_mmap() execution received any unaligned or relocated - * mappings, and if so, the current execution will immediately fall - * back to the slow method. However, we keep track of whether the fast - * method would have succeeded, and if so, we make a note to try the - * fast method next time. + * requested address. As such, repeatedly trying to extend unaligned + * mappings could result in an infinite loop, so if extension fails, + * immediately fall back to the reliable method of over-allocation + * followed by trimming. */ - if (mmap_unaligned_booted && *mmap_unaligned_tsd_get() == false) { - size_t offset; + ret = pages_map(NULL, size); + if (ret == NULL) + return (NULL); - ret = pages_map(NULL, size); - if (ret == NULL) - return (NULL); - - offset = ALIGNMENT_ADDR2OFFSET(ret, alignment); - if (offset != 0) { - bool mu = true; - mmap_unaligned_tsd_set(&mu); - /* Try to extend chunk boundary. */ - if (pages_map((void *)((uintptr_t)ret + size), - chunksize - offset) == NULL) { - /* - * Extension failed. Clean up, then revert to - * the reliable-but-expensive method. - */ - pages_unmap(ret, size); - ret = chunk_alloc_mmap_slow(size, alignment, - true); - } else { - /* Clean up unneeded leading space. */ - pages_unmap(ret, chunksize - offset); - ret = (void *)((uintptr_t)ret + (chunksize - - offset)); - } + offset = ALIGNMENT_ADDR2OFFSET(ret, alignment); + if (offset != 0) { + /* Try to extend chunk boundary. */ + if (pages_map((void *)((uintptr_t)ret + size), chunksize - + offset) == NULL) { + /* + * Extension failed. Clean up, then fall back to the + * reliable-but-expensive method. + */ + pages_unmap(ret, size); + return (chunk_alloc_mmap_slow(size, alignment, true, + zero)); + } else { + /* Clean up unneeded leading space. */ + pages_unmap(ret, chunksize - offset); + ret = (void *)((uintptr_t)ret + (chunksize - offset)); } - } else - ret = chunk_alloc_mmap_slow(size, alignment, false); + } + assert(ret != NULL); + *zero = true; return (ret); } @@ -201,21 +175,3 @@ chunk_dealloc_mmap(void *chunk, size_t s return (config_munmap == false); } - -bool -chunk_mmap_boot(void) -{ - - /* - * XXX For the non-TLS implementation of tsd, the first access from - * each thread causes memory allocation. The result is a bootstrapping - * problem for this particular use case, so for now just disable it by - * leaving it in an unbooted state. - */ -#ifdef JEMALLOC_TLS - if (mmap_unaligned_tsd_boot()) - return (true); -#endif - - return (false); -} Modified: head/contrib/jemalloc/src/huge.c ============================================================================== --- head/contrib/jemalloc/src/huge.c Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/src/huge.c Sun Apr 22 08:49:13 2012 (r234569) @@ -28,6 +28,7 @@ huge_palloc(size_t size, size_t alignmen void *ret; size_t csize; extent_node_t *node; + bool is_zeroed; /* Allocate one or more contiguous chunks for this request. */ @@ -42,7 +43,12 @@ huge_palloc(size_t size, size_t alignmen if (node == NULL) return (NULL); - ret = chunk_alloc(csize, alignment, false, &zero); + /* + * Copy zero into is_zeroed and pass the copy to chunk_alloc(), so that + * it is possible to make correct junk/zero fill decisions below. + */ + is_zeroed = zero; + ret = chunk_alloc(csize, alignment, false, &is_zeroed); if (ret == NULL) { base_node_dealloc(node); return (NULL); @@ -64,7 +70,7 @@ huge_palloc(size_t size, size_t alignmen if (config_fill && zero == false) { if (opt_junk) memset(ret, 0xa5, csize); - else if (opt_zero) + else if (opt_zero && is_zeroed == false) memset(ret, 0, csize); } Modified: head/contrib/jemalloc/src/jemalloc.c ============================================================================== --- head/contrib/jemalloc/src/jemalloc.c Sun Apr 22 07:55:56 2012 (r234568) +++ head/contrib/jemalloc/src/jemalloc.c Sun Apr 22 08:49:13 2012 (r234569) @@ -638,7 +638,7 @@ malloc_init_hard(void) return (true); } - if (chunk_boot0()) { + if (chunk_boot()) { malloc_mutex_unlock(&init_lock); return (true); } @@ -715,11 +715,6 @@ malloc_init_hard(void) ncpus = malloc_ncpus(); malloc_mutex_lock(&init_lock); - if (chunk_boot1()) { - malloc_mutex_unlock(&init_lock); - return (true); - } - if (mutex_boot()) { malloc_mutex_unlock(&init_lock); return (true); Modified: head/lib/libc/gen/tls.c ============================================================================== --- head/lib/libc/gen/tls.c Sun Apr 22 07:55:56 2012 (r234568) +++ head/lib/libc/gen/tls.c Sun Apr 22 08:49:13 2012 (r234569) @@ -40,9 +40,9 @@ #include "libc_private.h" /* Provided by jemalloc to avoid bootstrapping issues. */ -void *a0malloc(size_t size); -void *a0calloc(size_t num, size_t size); -void a0free(void *ptr); +void *__jemalloc_a0malloc(size_t size); +void *__jemalloc_a0calloc(size_t num, size_t size); +void __jemalloc_a0free(void *ptr); __weak_reference(__libc_allocate_tls, _rtld_allocate_tls); __weak_reference(__libc_free_tls, _rtld_free_tls); @@ -125,8 +125,8 @@ __libc_free_tls(void *tcb, size_t tcbsiz tls = (Elf_Addr **)((Elf_Addr)tcb + tcbsize - TLS_TCB_SIZE); dtv = tls[0]; - a0free(dtv); - a0free(tcb); + __jemalloc_a0free(dtv); + __jemalloc_a0free(tcb); } /* @@ -142,18 +142,18 @@ __libc_allocate_tls(void *oldtcb, size_t if (oldtcb != NULL && tcbsize == TLS_TCB_SIZE) return (oldtcb); - tcb = a0calloc(1, tls_static_space + tcbsize - TLS_TCB_SIZE); + tcb = __jemalloc_a0calloc(1, tls_static_space + tcbsize - TLS_TCB_SIZE); tls = (Elf_Addr **)(tcb + tcbsize - TLS_TCB_SIZE); if (oldtcb != NULL) { memcpy(tls, oldtcb, tls_static_space); - a0free(oldtcb); + __jemalloc_a0free(oldtcb); /* Adjust the DTV. */ dtv = tls[0]; dtv[2] = (Elf_Addr)tls + TLS_TCB_SIZE; } else { - dtv = a0malloc(3 * sizeof(Elf_Addr)); + dtv = __jemalloc_a0malloc(3 * sizeof(Elf_Addr)); tls[0] = dtv; dtv[0] = 1; dtv[1] = 1; @@ -194,8 +194,8 @@ __libc_free_tls(void *tcb, size_t tcbsiz dtv = ((Elf_Addr**)tcb)[1]; tlsend = (Elf_Addr) tcb; tlsstart = tlsend - size; - a0free((void*) tlsstart); - a0free(dtv); + __jemalloc_a0free((void*) tlsstart); + __jemalloc_a0free(dtv); } /* @@ -213,8 +213,8 @@ __libc_allocate_tls(void *oldtls, size_t if (tcbsize < 2 * sizeof(Elf_Addr)) tcbsize = 2 * sizeof(Elf_Addr); - tls = a0calloc(1, size + tcbsize); - dtv = a0malloc(3 * sizeof(Elf_Addr)); + tls = __jemalloc_a0calloc(1, size + tcbsize); + dtv = __jemalloc_a0malloc(3 * sizeof(Elf_Addr)); segbase = (Elf_Addr)(tls + size); ((Elf_Addr*)segbase)[0] = segbase; From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 09:19:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 43D721065672; Sun, 22 Apr 2012 09:19:11 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E4118FC17; Sun, 22 Apr 2012 09:19:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M9JB04029185; Sun, 22 Apr 2012 09:19:11 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M9JAuF029180; Sun, 22 Apr 2012 09:19:10 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201204220919.q3M9JAuF029180@svn.freebsd.org> From: Bernhard Schmidt Date: Sun, 22 Apr 2012 09:19:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234570 - in stable/9/sys/dev: ipw iwi iwn wpi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 09:19:11 -0000 Author: bschmidt Date: Sun Apr 22 09:19:10 2012 New Revision: 234570 URL: http://svn.freebsd.org/changeset/base/234570 Log: MFC r233387: Use suspend/resume methods provided by net80211. This ensures that the appropriate state handling takes place, not doing so results in the device doing nothing until manual intervention. Modified: stable/9/sys/dev/ipw/if_ipw.c stable/9/sys/dev/iwi/if_iwi.c stable/9/sys/dev/iwn/if_iwn.c stable/9/sys/dev/wpi/if_wpi.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/ipw/if_ipw.c ============================================================================== --- stable/9/sys/dev/ipw/if_ipw.c Sun Apr 22 08:49:13 2012 (r234569) +++ stable/9/sys/dev/ipw/if_ipw.c Sun Apr 22 09:19:10 2012 (r234570) @@ -835,9 +835,9 @@ static int ipw_suspend(device_t dev) { struct ipw_softc *sc = device_get_softc(dev); + struct ieee80211com *ic = sc->sc_ifp->if_l2com; - ipw_stop(sc); - + ieee80211_suspend_all(ic); return 0; } @@ -845,13 +845,11 @@ static int ipw_resume(device_t dev) { struct ipw_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = sc->sc_ifp->if_l2com; pci_write_config(dev, 0x41, 0, 1); - if (ifp->if_flags & IFF_UP) - ipw_init(sc); - + ieee80211_resume_all(ic); return 0; } Modified: stable/9/sys/dev/iwi/if_iwi.c ============================================================================== --- stable/9/sys/dev/iwi/if_iwi.c Sun Apr 22 08:49:13 2012 (r234569) +++ stable/9/sys/dev/iwi/if_iwi.c Sun Apr 22 09:19:10 2012 (r234570) @@ -863,9 +863,9 @@ static int iwi_suspend(device_t dev) { struct iwi_softc *sc = device_get_softc(dev); + struct ieee80211com *ic = sc->sc_ifp->if_l2com; - iwi_stop(sc); - + ieee80211_suspend_all(ic); return 0; } @@ -873,13 +873,11 @@ static int iwi_resume(device_t dev) { struct iwi_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = sc->sc_ifp->if_l2com; pci_write_config(dev, 0x41, 0, 1); - if (ifp->if_flags & IFF_UP) - iwi_init(sc); - + ieee80211_resume_all(ic); return 0; } Modified: stable/9/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/9/sys/dev/iwn/if_iwn.c Sun Apr 22 08:49:13 2012 (r234569) +++ stable/9/sys/dev/iwn/if_iwn.c Sun Apr 22 09:19:10 2012 (r234570) @@ -947,13 +947,9 @@ static int iwn_suspend(device_t dev) { struct iwn_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; - struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + struct ieee80211com *ic = sc->sc_ifp->if_l2com; - iwn_stop(sc); - if (vap != NULL) - ieee80211_stop(vap); + ieee80211_suspend_all(ic); return 0; } @@ -961,20 +957,12 @@ static int iwn_resume(device_t dev) { struct iwn_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; - struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + struct ieee80211com *ic = sc->sc_ifp->if_l2com; /* Clear device-specific "PCI retry timeout" register (41h). */ pci_write_config(dev, 0x41, 0, 1); - if (ifp->if_flags & IFF_UP) { - iwn_init(sc); - if (vap != NULL) - ieee80211_init(vap); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - iwn_start(ifp); - } + ieee80211_resume_all(ic); return 0; } Modified: stable/9/sys/dev/wpi/if_wpi.c ============================================================================== --- stable/9/sys/dev/wpi/if_wpi.c Sun Apr 22 08:49:13 2012 (r234569) +++ stable/9/sys/dev/wpi/if_wpi.c Sun Apr 22 09:19:10 2012 (r234570) @@ -1218,8 +1218,9 @@ static int wpi_suspend(device_t dev) { struct wpi_softc *sc = device_get_softc(dev); + struct ieee80211com *ic = sc->sc_ifp->if_l2com; - wpi_stop(sc); + ieee80211_suspend_all(ic); return 0; } @@ -1227,15 +1228,11 @@ static int wpi_resume(device_t dev) { struct wpi_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = sc->sc_ifp->if_l2com; pci_write_config(dev, 0x41, 0, 1); - if (ifp->if_flags & IFF_UP) { - wpi_init(ifp->if_softc); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - wpi_start(ifp); - } + ieee80211_resume_all(ic); return 0; } From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 09:19:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FE80106567D; Sun, 22 Apr 2012 09:19:20 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A8B78FC19; Sun, 22 Apr 2012 09:19:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M9JKY3029227; Sun, 22 Apr 2012 09:19:20 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M9JKjq029222; Sun, 22 Apr 2012 09:19:20 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201204220919.q3M9JKjq029222@svn.freebsd.org> From: Bernhard Schmidt Date: Sun, 22 Apr 2012 09:19:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234571 - in stable/8/sys/dev: ipw iwi iwn wpi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 09:19:20 -0000 Author: bschmidt Date: Sun Apr 22 09:19:19 2012 New Revision: 234571 URL: http://svn.freebsd.org/changeset/base/234571 Log: MFC r233387: Use suspend/resume methods provided by net80211. This ensures that the appropriate state handling takes place, not doing so results in the device doing nothing until manual intervention. Modified: stable/8/sys/dev/ipw/if_ipw.c stable/8/sys/dev/iwi/if_iwi.c stable/8/sys/dev/iwn/if_iwn.c stable/8/sys/dev/wpi/if_wpi.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/ipw/if_ipw.c ============================================================================== --- stable/8/sys/dev/ipw/if_ipw.c Sun Apr 22 09:19:10 2012 (r234570) +++ stable/8/sys/dev/ipw/if_ipw.c Sun Apr 22 09:19:19 2012 (r234571) @@ -833,9 +833,9 @@ static int ipw_suspend(device_t dev) { struct ipw_softc *sc = device_get_softc(dev); + struct ieee80211com *ic = sc->sc_ifp->if_l2com; - ipw_stop(sc); - + ieee80211_suspend_all(ic); return 0; } @@ -843,13 +843,11 @@ static int ipw_resume(device_t dev) { struct ipw_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = sc->sc_ifp->if_l2com; pci_write_config(dev, 0x41, 0, 1); - if (ifp->if_flags & IFF_UP) - ipw_init(sc); - + ieee80211_resume_all(ic); return 0; } Modified: stable/8/sys/dev/iwi/if_iwi.c ============================================================================== --- stable/8/sys/dev/iwi/if_iwi.c Sun Apr 22 09:19:10 2012 (r234570) +++ stable/8/sys/dev/iwi/if_iwi.c Sun Apr 22 09:19:19 2012 (r234571) @@ -861,9 +861,9 @@ static int iwi_suspend(device_t dev) { struct iwi_softc *sc = device_get_softc(dev); + struct ieee80211com *ic = sc->sc_ifp->if_l2com; - iwi_stop(sc); - + ieee80211_suspend_all(ic); return 0; } @@ -871,13 +871,11 @@ static int iwi_resume(device_t dev) { struct iwi_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = sc->sc_ifp->if_l2com; pci_write_config(dev, 0x41, 0, 1); - if (ifp->if_flags & IFF_UP) - iwi_init(sc); - + ieee80211_resume_all(ic); return 0; } Modified: stable/8/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/8/sys/dev/iwn/if_iwn.c Sun Apr 22 09:19:10 2012 (r234570) +++ stable/8/sys/dev/iwn/if_iwn.c Sun Apr 22 09:19:19 2012 (r234571) @@ -958,13 +958,9 @@ static int iwn_suspend(device_t dev) { struct iwn_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; - struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + struct ieee80211com *ic = sc->sc_ifp->if_l2com; - iwn_stop(sc); - if (vap != NULL) - ieee80211_stop(vap); + ieee80211_suspend_all(ic); return 0; } @@ -972,20 +968,12 @@ static int iwn_resume(device_t dev) { struct iwn_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; - struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + struct ieee80211com *ic = sc->sc_ifp->if_l2com; /* Clear device-specific "PCI retry timeout" register (41h). */ pci_write_config(dev, 0x41, 0, 1); - if (ifp->if_flags & IFF_UP) { - iwn_init(sc); - if (vap != NULL) - ieee80211_init(vap); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - iwn_start(ifp); - } + ieee80211_resume_all(ic); return 0; } Modified: stable/8/sys/dev/wpi/if_wpi.c ============================================================================== --- stable/8/sys/dev/wpi/if_wpi.c Sun Apr 22 09:19:10 2012 (r234570) +++ stable/8/sys/dev/wpi/if_wpi.c Sun Apr 22 09:19:19 2012 (r234571) @@ -1216,8 +1216,9 @@ static int wpi_suspend(device_t dev) { struct wpi_softc *sc = device_get_softc(dev); + struct ieee80211com *ic = sc->sc_ifp->if_l2com; - wpi_stop(sc); + ieee80211_suspend_all(ic); return 0; } @@ -1225,15 +1226,11 @@ static int wpi_resume(device_t dev) { struct wpi_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = sc->sc_ifp->if_l2com; pci_write_config(dev, 0x41, 0, 1); - if (ifp->if_flags & IFF_UP) { - wpi_init(ifp->if_softc); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - wpi_start(ifp); - } + ieee80211_resume_all(ic); return 0; } From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 16:13:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F3275106566C; Sun, 22 Apr 2012 16:13:23 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD60A8FC12; Sun, 22 Apr 2012 16:13:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MGDNMd047132; Sun, 22 Apr 2012 16:13:23 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MGDNcj047130; Sun, 22 Apr 2012 16:13:23 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201204221613.q3MGDNcj047130@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Sun, 22 Apr 2012 16:13:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234572 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 16:13:24 -0000 Author: melifaro Date: Sun Apr 22 16:13:23 2012 New Revision: 234572 URL: http://svn.freebsd.org/changeset/base/234572 Log: Do not require radix write lock to be held while dumping route table via sysctl(4) interface. This permits router not to stop forwarding packets while route table is being written to user-supplied buffer. Reported by: Pawel Tyll Approved by: kib(mentor) MFC after: 1 week Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Sun Apr 22 09:19:19 2012 (r234571) +++ head/sys/net/rtsock.c Sun Apr 22 16:13:23 2012 (r234572) @@ -1884,10 +1884,10 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) for (error = 0; error == 0 && i <= lim; i++) { rnh = rt_tables_get_rnh(req->td->td_proc->p_fibnum, i); if (rnh != NULL) { - RADIX_NODE_HEAD_LOCK(rnh); + RADIX_NODE_HEAD_RLOCK(rnh); error = rnh->rnh_walktree(rnh, sysctl_dumpentry, &w); - RADIX_NODE_HEAD_UNLOCK(rnh); + RADIX_NODE_HEAD_RUNLOCK(rnh); } else if (af != 0) error = EAFNOSUPPORT; } From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 16:58:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A856106564A; Sun, 22 Apr 2012 16:58:15 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04D8D8FC0A; Sun, 22 Apr 2012 16:58:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MGwEXT048538; Sun, 22 Apr 2012 16:58:14 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MGwETN048536; Sun, 22 Apr 2012 16:58:14 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201204221658.q3MGwETN048536@svn.freebsd.org> From: David Chisnall Date: Sun, 22 Apr 2012 16:58:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234573 - head/include/xlocale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 16:58:15 -0000 Author: theraven Date: Sun Apr 22 16:58:14 2012 New Revision: 234573 URL: http://svn.freebsd.org/changeset/base/234573 Log: Fix a bug caused by some misplaced brackets. Reported by: das Modified: head/include/xlocale/_ctype.h Modified: head/include/xlocale/_ctype.h ============================================================================== --- head/include/xlocale/_ctype.h Sun Apr 22 16:13:23 2012 (r234572) +++ head/include/xlocale/_ctype.h Sun Apr 22 16:58:14 2012 (r234573) @@ -78,8 +78,8 @@ __maskrune_l(__ct_rune_t __c, unsigned l { int __limit; _RuneLocale *runes = __runes_for_locale(__loc, &__limit); - return (__c < 0 || __c >= _CACHED_RUNES) ? ___runetype_l(__c, __loc) : - runes->__runetype[__c] & __f; + return ((__c < 0 || __c >= _CACHED_RUNES) ? ___runetype_l(__c, __loc) : + runes->__runetype[__c]) & __f; } _XLOCALE_INLINE int From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 17:00:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B288106566C; Sun, 22 Apr 2012 17:00:53 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3638B8FC0A; Sun, 22 Apr 2012 17:00:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MH0r17048667; Sun, 22 Apr 2012 17:00:53 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MH0rDt048665; Sun, 22 Apr 2012 17:00:53 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201204221700.q3MH0rDt048665@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Sun, 22 Apr 2012 17:00:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234574 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 17:00:53 -0000 Author: melifaro Date: Sun Apr 22 17:00:52 2012 New Revision: 234574 URL: http://svn.freebsd.org/changeset/base/234574 Log: Fix panic in ng_patch(4) caused by checksum flags being added to mbuf flags. Tested by: Maxim Ignatenko Approved by: kib(mentor) MFC after: 3 days Modified: head/sys/netgraph/ng_patch.c Modified: head/sys/netgraph/ng_patch.c ============================================================================== --- head/sys/netgraph/ng_patch.c Sun Apr 22 16:58:14 2012 (r234573) +++ head/sys/netgraph/ng_patch.c Sun Apr 22 17:00:52 2012 (r234574) @@ -517,7 +517,7 @@ ng_patch_rcvdata(hook_p hook, item_p ite return (ENOMEM); } do_patch(priv, m); - m->m_flags |= priv->config->csum_flags; + m->m_pkthdr.csum_flags |= priv->config->csum_flags; } target = NULL; From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 17:10:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7D73A106566B; Sun, 22 Apr 2012 17:10:29 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 255448FC14; Sun, 22 Apr 2012 17:10:29 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 5E384305; Sun, 22 Apr 2012 19:10:21 +0200 (CEST) Date: Sun, 22 Apr 2012 19:08:43 +0200 From: Pawel Jakub Dawidek To: Kirk McKusick Message-ID: <20120422170842.GA18403@garage.freebsd.pl> References: <201204200650.q3K6oiqO026673@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WIyZ46R2i8wDzkSu" Content-Disposition: inline In-Reply-To: <201204200650.q3K6oiqO026673@svn.freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234482 - in head/sys: fs/msdosfs fs/nfsserver kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 17:10:29 -0000 --WIyZ46R2i8wDzkSu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 20, 2012 at 06:50:44AM +0000, Kirk McKusick wrote: > Author: mckusick > Date: Fri Apr 20 06:50:44 2012 > New Revision: 234482 > URL: http://svn.freebsd.org/changeset/base/234482 >=20 > Log: > This change creates a new list of active vnodes associated with > a mount point. Active vnodes are those with a non-zero use or hold > count, e.g., those vnodes that are not on the free list. Note that > this list is in addition to the list of all the vnodes associated > with a mount point. > =20 > To avoid adding another set of linkage pointers to the vnode > structure, the active list uses the existing linkage pointers > used by the free list (previously named v_freelist, now renamed > v_actfreelist). > =20 > This update adds the MNT_VNODE_FOREACH_ACTIVE interface that loops > over just the active vnodes associated with a mount point (typically > less than 1% of the vnodes associated with the mount point). [...] > @@ -1099,6 +1128,14 @@ insmntque1(struct vnode *vp, struct moun > VNASSERT(mp->mnt_nvnodelistsize >=3D 0, vp, > ("neg mount point vnode list size")); > mp->mnt_nvnodelistsize++; > + KASSERT((vp->v_iflag & VI_ACTIVE) =3D=3D 0, > + ("Activating already active vnode")); > + vp->v_iflag |=3D VI_ACTIVE; > + mtx_lock(&vnode_free_list_mtx); > + TAILQ_INSERT_HEAD(&mp->mnt_activevnodelist, vp, v_actfreelist); > + mp->mnt_activevnodelistsize++; > + mtx_unlock(&vnode_free_list_mtx); > + VI_UNLOCK(vp); > MNT_IUNLOCK(mp); > return (0); > } Now, for every vnode that is activated, it has to go through global mutex, which seems like scalability issue to me. With ZFS it is typical to have a lot of file systems and this global mutex was not needed before (well, it was needed, but only to get vnode from the free list). If we require vnode interlock to be held during v_actfreelist manipulation then why can't we use interlock+vnode_free_list_mtx when operating on the free list and interlock+per-mountpoint-lock when operating on mnt_activevnodelist? --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --WIyZ46R2i8wDzkSu Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk+UOxoACgkQForvXbEpPzQcEgCdH9HqdUGwVAV2AzaqSYbZO+lk yo4AoJBykS7Df3yDmlcPVn18J+J0YABX =Yjmx -----END PGP SIGNATURE----- --WIyZ46R2i8wDzkSu-- From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 17:14:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBA79106564A; Sun, 22 Apr 2012 17:14:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B63C68FC08; Sun, 22 Apr 2012 17:14:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MHEBTj049105; Sun, 22 Apr 2012 17:14:11 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MHEBF2049103; Sun, 22 Apr 2012 17:14:11 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201204221714.q3MHEBF2049103@svn.freebsd.org> From: Warner Losh Date: Sun, 22 Apr 2012 17:14:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234575 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 17:14:11 -0000 Author: imp Date: Sun Apr 22 17:14:11 2012 New Revision: 234575 URL: http://svn.freebsd.org/changeset/base/234575 Log: Sort nm in order. Submitted by: bde Modified: head/share/mk/sys.mk Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Sun Apr 22 17:00:52 2012 (r234574) +++ head/share/mk/sys.mk Sun Apr 22 17:14:11 2012 (r234575) @@ -123,6 +123,10 @@ LINTLIBFLAGS ?= -cghapbxu -C ${LIB} MAKE ?= make +.if !defined(%POSIX) +NM ?= nm +.endif + OBJC ?= cc OBJCFLAGS ?= ${OBJCINCLUDES} ${CFLAGS} -Wno-import @@ -141,10 +145,6 @@ YFLAGS ?= YFLAGS ?= -d .endif -.if !defined(%POSIX) -NM ?= nm -.endif - .if defined(%POSIX) # Posix 1003.2 mandated rules From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 17:18:35 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50921106564A; Sun, 22 Apr 2012 17:18:35 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id F07CB8FC16; Sun, 22 Apr 2012 17:18:34 +0000 (UTC) Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id q3MHGCv1046479 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 22 Apr 2012 11:16:12 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20120422182554.S901@besplex.bde.org> Date: Sun, 22 Apr 2012 11:16:12 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <020867DB-8DDD-4A5F-9CC1-02D1A4864D11@bsdimp.com> References: <201204211745.q3LHjeHx098154@svn.freebsd.org> <20120422182554.S901@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sun, 22 Apr 2012 11:16:12 -0600 (MDT) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Warner Losh Subject: Re: svn commit: r234549 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 17:18:35 -0000 On Apr 22, 2012, at 2:35 AM, Bruce Evans wrote: > On Sat, 21 Apr 2012, Warner Losh wrote: >> Log: >> Fix partially merged patch from my external compiler tree in r234546. >> Define NM except when we're in strict POSIX mode. >>=20 >> Modified: >> head/share/mk/sys.mk >>=20 >> Modified: head/share/mk/sys.mk >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/share/mk/sys.mk Sat Apr 21 16:27:50 2012 = (r234548) >> +++ head/share/mk/sys.mk Sat Apr 21 17:45:40 2012 = (r234549) >> @@ -141,6 +141,10 @@ YFLAGS ?=3D >> YFLAGS ?=3D -d >> .endif >>=20 >> +.if !defined(%POSIX) >> +NM ?=3D nm >> +.endif >> + >> .if defined(%POSIX) >>=20 >> # Posix 1003.2 mandated rules >=20 > Any chance of defining NM in order? >=20 > The existing list was sorted except for RANLIB being grouped with AR, > CPP after CXX*, LD after LEX, LINTL* after LINTO* (flags are grouped > with commands so the combined sorting is not fully alphabetical). >=20 > Only NM is totally disordered (added at the end instead of inserted). >=20 > The unsorted macros are associated with more namespace pollution than > the sorted ones. Yea, I added NM quickly after I discovered I'd forgotten it when I = converted the bare nm's in libgcc. Since my external cc tree was = different, I did this by hand. In that tree, it was sorted... But I've gone ahead and moved it until I can get the external compiler = stuff committed. Warner= From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 17:58:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15675106566C; Sun, 22 Apr 2012 17:58:31 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9FC18FC08; Sun, 22 Apr 2012 17:58:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MHwUWH050605; Sun, 22 Apr 2012 17:58:30 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MHwUXM050602; Sun, 22 Apr 2012 17:58:30 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204221758.q3MHwUXM050602@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 Apr 2012 17:58:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234576 - in head/sys: powerpc/aim vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 17:58:31 -0000 Author: nwhitehorn Date: Sun Apr 22 17:58:30 2012 New Revision: 234576 URL: http://svn.freebsd.org/changeset/base/234576 Log: Avoid a lock order reversal in pmap_extract_and_hold() from relocking the page. This PMAP requires an additional lock besides the PMAP lock in pmap_extract_and_hold(), which vm_page_pa_tryrelock() did not release. Suggested by: kib MFC after: 4 days Modified: head/sys/powerpc/aim/mmu_oea64.c head/sys/vm/vm_page.c Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Sun Apr 22 17:14:11 2012 (r234575) +++ head/sys/powerpc/aim/mmu_oea64.c Sun Apr 22 17:58:30 2012 (r234576) @@ -1333,6 +1333,37 @@ moea64_extract(mmu_t mmu, pmap_t pm, vm_ * pmap and virtual address pair if that mapping permits the given * protection. */ + +extern int pa_tryrelock_restart; + +static int +vm_page_pa_tryrelock_moea64(pmap_t pmap, vm_paddr_t pa, vm_paddr_t *locked) +{ + /* + * This is a duplicate of vm_page_pa_tryrelock(), but with proper + * handling of the table lock + */ + vm_paddr_t lockpa; + + lockpa = *locked; + *locked = pa; + if (lockpa) { + PA_LOCK_ASSERT(lockpa, MA_OWNED); + if (PA_LOCKPTR(pa) == PA_LOCKPTR(lockpa)) + return (0); + PA_UNLOCK(lockpa); + } + if (PA_TRYLOCK(pa)) + return (0); + UNLOCK_TABLE_RD(); + PMAP_UNLOCK(pmap); + atomic_add_int(&pa_tryrelock_restart, 1); + PA_LOCK(pa); + LOCK_TABLE_RD(); + PMAP_LOCK(pmap); + return (EAGAIN); +} + vm_page_t moea64_extract_and_hold(mmu_t mmu, pmap_t pmap, vm_offset_t va, vm_prot_t prot) { @@ -1349,7 +1380,7 @@ retry: if (pvo != NULL && (pvo->pvo_pte.lpte.pte_hi & LPTE_VALID) && ((pvo->pvo_pte.lpte.pte_lo & LPTE_PP) == LPTE_RW || (prot & VM_PROT_WRITE) == 0)) { - if (vm_page_pa_tryrelock(pmap, + if (vm_page_pa_tryrelock_moea64(pmap, pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN, &pa)) goto retry; m = PHYS_TO_VM_PAGE(pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN); Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sun Apr 22 17:14:11 2012 (r234575) +++ head/sys/vm/vm_page.c Sun Apr 22 17:58:30 2012 (r234576) @@ -131,7 +131,7 @@ TUNABLE_INT("vm.boot_pages", &boot_pages SYSCTL_INT(_vm, OID_AUTO, boot_pages, CTLFLAG_RD, &boot_pages, 0, "number of pages allocated for bootstrapping the VM system"); -static int pa_tryrelock_restart; +int pa_tryrelock_restart; SYSCTL_INT(_vm, OID_AUTO, tryrelock_restart, CTLFLAG_RD, &pa_tryrelock_restart, 0, "Number of tryrelock restarts"); From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 18:18:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0A9A106566B; Sun, 22 Apr 2012 18:18:49 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC7918FC08; Sun, 22 Apr 2012 18:18:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MIInIV051315; Sun, 22 Apr 2012 18:18:49 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MIIn4Y051313; Sun, 22 Apr 2012 18:18:49 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201204221818.q3MIIn4Y051313@svn.freebsd.org> From: Christian Brueffer Date: Sun, 22 Apr 2012 18:18:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234577 - head/usr.bin/stat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 18:18:50 -0000 Author: brueffer Date: Sun Apr 22 18:18:49 2012 New Revision: 234577 URL: http://svn.freebsd.org/changeset/base/234577 Log: Remove duplicate -l description. Submitted by: Rainer Hurling MFC after: 1 week Modified: head/usr.bin/stat/stat.1 Modified: head/usr.bin/stat/stat.1 ============================================================================== --- head/usr.bin/stat/stat.1 Sun Apr 22 17:58:30 2012 (r234576) +++ head/usr.bin/stat/stat.1 Sun Apr 22 18:18:49 2012 (r234577) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 5, 2010 +.Dd April 22, 2012 .Dt STAT 1 .Os .Sh NAME @@ -140,10 +140,6 @@ If the link is broken or the target does fall back on .Xr lstat 2 and report information about the link. -.It Fl l -Display output in -.Ic ls Fl lT -format. .It Fl n Do not force a newline to appear at the end of each piece of output. .It Fl q From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 18:45:54 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 561FC106564A; Sun, 22 Apr 2012 18:45:54 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id 192C08FC12; Sun, 22 Apr 2012 18:45:54 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id q3MIjrdY085398; Sun, 22 Apr 2012 11:45:53 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id q3MIjrTx085397; Sun, 22 Apr 2012 11:45:53 -0700 (PDT) (envelope-from sgk) Date: Sun, 22 Apr 2012 11:45:53 -0700 From: Steve Kargl To: Christian Brueffer Message-ID: <20120422184553.GA85374@troutmask.apl.washington.edu> References: <201204221818.q3MIIn4Y051313@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201204221818.q3MIIn4Y051313@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r234577 - head/usr.bin/stat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 18:45:54 -0000 On Sun, Apr 22, 2012 at 06:18:49PM +0000, Christian Brueffer wrote: > Author: brueffer > Date: Sun Apr 22 18:18:49 2012 > New Revision: 234577 > URL: http://svn.freebsd.org/changeset/base/234577 > > Log: > Remove duplicate -l description. > > Submitted by: Rainer Hurling > MFC after: 1 week The patch should have also fixed the misordering of the -n, -qi, and -x options. -- Steve From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 18:51:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BBB2F1065674; Sun, 22 Apr 2012 18:51:38 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A696C8FC1A; Sun, 22 Apr 2012 18:51:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MIpcK0052308; Sun, 22 Apr 2012 18:51:38 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MIpc52052306; Sun, 22 Apr 2012 18:51:38 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201204221851.q3MIpc52052306@svn.freebsd.org> From: David Chisnall Date: Sun, 22 Apr 2012 18:51:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234578 - head/lib/libc/locale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 18:51:38 -0000 Author: theraven Date: Sun Apr 22 18:51:38 2012 New Revision: 234578 URL: http://svn.freebsd.org/changeset/base/234578 Log: Fix some incorrect symbol versions. Reported by: das Modified: head/lib/libc/locale/Symbol.map Modified: head/lib/libc/locale/Symbol.map ============================================================================== --- head/lib/libc/locale/Symbol.map Sun Apr 22 18:18:49 2012 (r234577) +++ head/lib/libc/locale/Symbol.map Sun Apr 22 18:51:38 2012 (r234578) @@ -60,13 +60,9 @@ FBSD_1.0 { nextwctype; nl_langinfo; __maskrune; - __maskrune_l; __sbmaskrune; - __sbmaskrune_l; __istype; - __istype_l; __sbistype; - __sbistype_l; __isctype; __toupper; __sbtoupper; @@ -197,6 +193,10 @@ FBSD_1.3 { wcstoul_l; wcstoull_l; wcstoumax_l; + __sbistype_l; + __maskrune_l; + __sbmaskrune_l; + __istype_l; __runes_for_locale; _ThreadRuneLocale; }; From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 18:54:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 501B9106566B; Sun, 22 Apr 2012 18:54:52 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3931B8FC12; Sun, 22 Apr 2012 18:54:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MIsq4Z052445; Sun, 22 Apr 2012 18:54:52 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MIsqPg052441; Sun, 22 Apr 2012 18:54:52 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204221854.q3MIsqPg052441@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 Apr 2012 18:54:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234579 - in head/sys/powerpc: include mpc85xx powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 18:54:52 -0000 Author: nwhitehorn Date: Sun Apr 22 18:54:51 2012 New Revision: 234579 URL: http://svn.freebsd.org/changeset/base/234579 Log: Replace eieio; sync for creating bus-space memory barriers with sync. sync performs a strict superset of the functions of eieio, so using both is redundant. While here, expand bus barriers to all bus_space operations, since many drivers do not correctly use bus_space_barrier(). In principle, we can also replace sync just with eieio, for a significant performance increase, but it remains to be seen whether any poorly-written drivers currently depend on the side effects of sync to properly function. MFC after: 1 week Modified: head/sys/powerpc/include/pio.h head/sys/powerpc/mpc85xx/mpc85xx.c head/sys/powerpc/powerpc/bus_machdep.c Modified: head/sys/powerpc/include/pio.h ============================================================================== --- head/sys/powerpc/include/pio.h Sun Apr 22 18:51:38 2012 (r234578) +++ head/sys/powerpc/include/pio.h Sun Apr 22 18:54:51 2012 (r234579) @@ -39,46 +39,52 @@ * I/O macros. */ +/* + * Note: this should be eieio, but many drivers expect ordering with + * main storage too. + */ +#define powerpc_iomb() __asm __volatile("sync" : : : "memory") + static __inline void __outb(volatile u_int8_t *a, u_int8_t v) { *a = v; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void __outw(volatile u_int16_t *a, u_int16_t v) { *a = v; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void __outl(volatile u_int32_t *a, u_int32_t v) { *a = v; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void __outll(volatile u_int64_t *a, u_int64_t v) { *a = v; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void __outwrb(volatile u_int16_t *a, u_int16_t v) { __asm__ volatile("sthbrx %0, 0, %1" :: "r"(v), "r"(a)); - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void __outlrb(volatile u_int32_t *a, u_int32_t v) { __asm__ volatile("stwbrx %0, 0, %1" :: "r"(v), "r"(a)); - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline u_int8_t @@ -87,7 +93,7 @@ __inb(volatile u_int8_t *a) u_int8_t _v_; _v_ = *a; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); return _v_; } @@ -97,7 +103,7 @@ __inw(volatile u_int16_t *a) u_int16_t _v_; _v_ = *a; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); return _v_; } @@ -107,7 +113,7 @@ __inl(volatile u_int32_t *a) u_int32_t _v_; _v_ = *a; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); return _v_; } @@ -117,7 +123,7 @@ __inll(volatile u_int64_t *a) u_int64_t _v_; _v_ = *a; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); return _v_; } @@ -127,7 +133,7 @@ __inwrb(volatile u_int16_t *a) u_int16_t _v_; __asm__ volatile("lhbrx %0, 0, %1" : "=r"(_v_) : "r"(a)); - __asm__ volatile("eieio; sync"); + powerpc_iomb(); return _v_; } @@ -137,7 +143,7 @@ __inlrb(volatile u_int32_t *a) u_int32_t _v_; __asm__ volatile("lwbrx %0, 0, %1" : "=r"(_v_) : "r"(a)); - __asm__ volatile("eieio; sync"); + powerpc_iomb(); return _v_; } @@ -175,7 +181,7 @@ __outsb(volatile u_int8_t *a, const u_in { while (c--) *a = *s++; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -183,7 +189,7 @@ __outsw(volatile u_int16_t *a, const u_i { while (c--) *a = *s++; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -191,7 +197,7 @@ __outsl(volatile u_int32_t *a, const u_i { while (c--) *a = *s++; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -199,7 +205,7 @@ __outsll(volatile u_int64_t *a, const u_ { while (c--) *a = *s++; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -207,7 +213,7 @@ __outswrb(volatile u_int16_t *a, const u { while (c--) __asm__ volatile("sthbrx %0, 0, %1" :: "r"(*s++), "r"(a)); - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -215,7 +221,7 @@ __outslrb(volatile u_int32_t *a, const u { while (c--) __asm__ volatile("stwbrx %0, 0, %1" :: "r"(*s++), "r"(a)); - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -223,7 +229,7 @@ __insb(volatile u_int8_t *a, u_int8_t *d { while (c--) *d++ = *a; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -231,7 +237,7 @@ __insw(volatile u_int16_t *a, u_int16_t { while (c--) *d++ = *a; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -239,7 +245,7 @@ __insl(volatile u_int32_t *a, u_int32_t { while (c--) *d++ = *a; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -247,7 +253,7 @@ __insll(volatile u_int64_t *a, u_int64_t { while (c--) *d++ = *a; - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -255,7 +261,7 @@ __inswrb(volatile u_int16_t *a, u_int16_ { while (c--) __asm__ volatile("lhbrx %0, 0, %1" : "=r"(*d++) : "r"(a)); - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } static __inline void @@ -263,7 +269,7 @@ __inslrb(volatile u_int32_t *a, u_int32_ { while (c--) __asm__ volatile("lwbrx %0, 0, %1" : "=r"(*d++) : "r"(a)); - __asm__ volatile("eieio; sync"); + powerpc_iomb(); } #define outsb(a,s,c) (__outsb((volatile u_int8_t *)(a), s, c)) Modified: head/sys/powerpc/mpc85xx/mpc85xx.c ============================================================================== --- head/sys/powerpc/mpc85xx/mpc85xx.c Sun Apr 22 18:51:38 2012 (r234578) +++ head/sys/powerpc/mpc85xx/mpc85xx.c Sun Apr 22 18:54:51 2012 (r234579) @@ -60,7 +60,7 @@ ccsr_write4(uintptr_t addr, uint32_t val volatile uint32_t *ptr = (void *)addr; *ptr = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } int Modified: head/sys/powerpc/powerpc/bus_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/bus_machdep.c Sun Apr 22 18:51:38 2012 (r234578) +++ head/sys/powerpc/powerpc/bus_machdep.c Sun Apr 22 18:54:51 2012 (r234579) @@ -169,7 +169,8 @@ static void bs_gen_barrier(bus_space_handle_t bsh __unused, bus_size_t ofs __unused, bus_size_t size __unused, int flags __unused) { - __asm __volatile("eieio; sync" : : : "memory"); + + powerpc_iomb(); } /* @@ -183,6 +184,7 @@ bs_be_rs_1(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); res = *addr; + powerpc_iomb(); CTR4(KTR_BE_IO, "%s(bsh=%#x, ofs=%#x) = %#x", __func__, bsh, ofs, res); return (res); } @@ -195,6 +197,7 @@ bs_be_rs_2(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); res = *addr; + powerpc_iomb(); CTR4(KTR_BE_IO, "%s(bsh=%#x, ofs=%#x) = %#x", __func__, bsh, ofs, res); return (res); } @@ -207,6 +210,7 @@ bs_be_rs_4(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); res = *addr; + powerpc_iomb(); CTR4(KTR_BE_IO, "%s(bsh=%#x, ofs=%#x) = %#x", __func__, bsh, ofs, res); return (res); } @@ -219,6 +223,7 @@ bs_be_rs_8(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); res = *addr; + powerpc_iomb(); return (res); } @@ -253,7 +258,7 @@ bs_be_rr_1(bus_space_handle_t bsh, bus_s while (cnt--) *addr++ = *s++; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -263,7 +268,7 @@ bs_be_rr_2(bus_space_handle_t bsh, bus_s while (cnt--) *addr++ = *s++; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -273,7 +278,7 @@ bs_be_rr_4(bus_space_handle_t bsh, bus_s while (cnt--) *addr++ = *s++; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -283,7 +288,7 @@ bs_be_rr_8(bus_space_handle_t bsh, bus_s while (cnt--) *addr++ = *s++; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -293,7 +298,7 @@ bs_be_ws_1(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); *addr = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); CTR4(KTR_BE_IO, "%s(bsh=%#x, ofs=%#x, val=%#x)", __func__, bsh, ofs, val); } @@ -304,7 +309,7 @@ bs_be_ws_2(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); *addr = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); CTR4(KTR_BE_IO, "%s(bsh=%#x, ofs=%#x, val=%#x)", __func__, bsh, ofs, val); } @@ -315,7 +320,7 @@ bs_be_ws_4(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); *addr = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); CTR4(KTR_BE_IO, "%s(bsh=%#x, ofs=%#x, val=%#x)", __func__, bsh, ofs, val); } @@ -326,7 +331,7 @@ bs_be_ws_8(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); *addr = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -365,7 +370,7 @@ bs_be_wr_1(bus_space_handle_t bsh, bus_s while (cnt--) *d++ = *addr++; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -376,7 +381,7 @@ bs_be_wr_2(bus_space_handle_t bsh, bus_s while (cnt--) *d++ = *addr++; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -387,7 +392,7 @@ bs_be_wr_4(bus_space_handle_t bsh, bus_s while (cnt--) *d++ = *addr++; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -398,7 +403,7 @@ bs_be_wr_8(bus_space_handle_t bsh, bus_s while (cnt--) *d++ = *addr++; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -408,7 +413,7 @@ bs_be_sm_1(bus_space_handle_t bsh, bus_s while (cnt--) *d = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -418,7 +423,7 @@ bs_be_sm_2(bus_space_handle_t bsh, bus_s while (cnt--) *d = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -428,7 +433,7 @@ bs_be_sm_4(bus_space_handle_t bsh, bus_s while (cnt--) *d = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -438,7 +443,7 @@ bs_be_sm_8(bus_space_handle_t bsh, bus_s while (cnt--) *d = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -448,7 +453,7 @@ bs_be_sr_1(bus_space_handle_t bsh, bus_s while (cnt--) *d++ = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -458,7 +463,7 @@ bs_be_sr_2(bus_space_handle_t bsh, bus_s while (cnt--) *d++ = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -468,7 +473,7 @@ bs_be_sr_4(bus_space_handle_t bsh, bus_s while (cnt--) *d++ = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -478,7 +483,7 @@ bs_be_sr_8(bus_space_handle_t bsh, bus_s while (cnt--) *d++ = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } /* @@ -492,7 +497,7 @@ bs_le_rs_1(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); res = *addr; - __asm __volatile("eieio; sync"); + powerpc_iomb(); CTR4(KTR_LE_IO, "%s(bsh=%#x, ofs=%#x) = %#x", __func__, bsh, ofs, res); return (res); } @@ -505,7 +510,7 @@ bs_le_rs_2(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); __asm __volatile("lhbrx %0, 0, %1" : "=r"(res) : "r"(addr)); - __asm __volatile("eieio; sync"); + powerpc_iomb(); CTR4(KTR_LE_IO, "%s(bsh=%#x, ofs=%#x) = %#x", __func__, bsh, ofs, res); return (res); } @@ -518,7 +523,7 @@ bs_le_rs_4(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); __asm __volatile("lwbrx %0, 0, %1" : "=r"(res) : "r"(addr)); - __asm __volatile("eieio; sync"); + powerpc_iomb(); CTR4(KTR_LE_IO, "%s(bsh=%#x, ofs=%#x) = %#x", __func__, bsh, ofs, res); return (res); } @@ -560,7 +565,7 @@ bs_le_rr_1(bus_space_handle_t bsh, bus_s while (cnt--) *addr++ = *s++; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -570,7 +575,7 @@ bs_le_rr_2(bus_space_handle_t bsh, bus_s while (cnt--) *addr++ = in16rb(s++); - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -580,7 +585,7 @@ bs_le_rr_4(bus_space_handle_t bsh, bus_s while (cnt--) *addr++ = in32rb(s++); - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -596,6 +601,7 @@ bs_le_ws_1(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); *addr = val; + powerpc_iomb(); CTR4(KTR_LE_IO, "%s(bsh=%#x, ofs=%#x, val=%#x)", __func__, bsh, ofs, val); } @@ -606,6 +612,7 @@ bs_le_ws_2(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); __asm __volatile("sthbrx %0, 0, %1" :: "r"(val), "r"(addr)); + powerpc_iomb(); CTR4(KTR_LE_IO, "%s(bsh=%#x, ofs=%#x, val=%#x)", __func__, bsh, ofs, val); } @@ -616,6 +623,7 @@ bs_le_ws_4(bus_space_handle_t bsh, bus_s addr = __ppc_ba(bsh, ofs); __asm __volatile("stwbrx %0, 0, %1" :: "r"(val), "r"(addr)); + powerpc_iomb(); CTR4(KTR_LE_IO, "%s(bsh=%#x, ofs=%#x, val=%#x)", __func__, bsh, ofs, val); } @@ -661,7 +669,7 @@ bs_le_wr_1(bus_space_handle_t bsh, bus_s while (cnt--) *d++ = *addr++; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -672,7 +680,7 @@ bs_le_wr_2(bus_space_handle_t bsh, bus_s while (cnt--) out16rb(d++, *addr++); - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -683,7 +691,7 @@ bs_le_wr_4(bus_space_handle_t bsh, bus_s while (cnt--) out32rb(d++, *addr++); - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -700,7 +708,7 @@ bs_le_sm_1(bus_space_handle_t bsh, bus_s while (cnt--) *d = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -710,7 +718,7 @@ bs_le_sm_2(bus_space_handle_t bsh, bus_s while (cnt--) out16rb(d, val); - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -720,7 +728,7 @@ bs_le_sm_4(bus_space_handle_t bsh, bus_s while (cnt--) out32rb(d, val); - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -736,7 +744,7 @@ bs_le_sr_1(bus_space_handle_t bsh, bus_s while (cnt--) *d++ = val; - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -746,7 +754,7 @@ bs_le_sr_2(bus_space_handle_t bsh, bus_s while (cnt--) out16rb(d++, val); - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void @@ -756,7 +764,7 @@ bs_le_sr_4(bus_space_handle_t bsh, bus_s while (cnt--) out32rb(d++, val); - __asm __volatile("eieio; sync"); + powerpc_iomb(); } static void From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 18:56:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9C2D1106564A; Sun, 22 Apr 2012 18:56:56 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 869A28FC16; Sun, 22 Apr 2012 18:56:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MIuuC4052558; Sun, 22 Apr 2012 18:56:56 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MIuuZU052555; Sun, 22 Apr 2012 18:56:56 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204221856.q3MIuuZU052555@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 Apr 2012 18:56:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234580 - in head/sys: conf powerpc/include powerpc/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 18:56:56 -0000 Author: nwhitehorn Date: Sun Apr 22 18:56:56 2012 New Revision: 234580 URL: http://svn.freebsd.org/changeset/base/234580 Log: Remove dead code. The routines in atomic.S did not work properly anyway, and were everywhere unused. If we turn out to need them, they should be reimplemented. MFC after: 2 weeks Deleted: head/sys/powerpc/powerpc/atomic.S Modified: head/sys/conf/files.powerpc head/sys/powerpc/include/cpufunc.h Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Sun Apr 22 18:54:51 2012 (r234579) +++ head/sys/conf/files.powerpc Sun Apr 22 18:56:56 2012 (r234580) @@ -170,7 +170,6 @@ powerpc/powermac/uninorthpci.c optional powerpc/powermac/vcoregpio.c optional powermac powerpc/powermac/windtunnel.c optional powermac windtunnel powerpc/powerpc/altivec.c optional aim -powerpc/powerpc/atomic.S standard powerpc/powerpc/autoconf.c standard powerpc/powerpc/bcopy.c standard powerpc/powerpc/bus_machdep.c standard Modified: head/sys/powerpc/include/cpufunc.h ============================================================================== --- head/sys/powerpc/include/cpufunc.h Sun Apr 22 18:54:51 2012 (r234579) +++ head/sys/powerpc/include/cpufunc.h Sun Apr 22 18:56:56 2012 (r234580) @@ -29,16 +29,6 @@ #ifndef _MACHINE_CPUFUNC_H_ #define _MACHINE_CPUFUNC_H_ -/* - * Required for user-space atomic.h includes - */ -static __inline void -powerpc_mb(void) -{ - - __asm __volatile("eieio; sync" : : : "memory"); -} - #ifdef _KERNEL #include From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 19:00:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1174F106566B; Sun, 22 Apr 2012 19:00:52 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6E338FC08; Sun, 22 Apr 2012 19:00:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MJ0p5h052729; Sun, 22 Apr 2012 19:00:51 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MJ0p2k052726; Sun, 22 Apr 2012 19:00:51 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204221900.q3MJ0p2k052726@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 Apr 2012 19:00:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234581 - in head/sys/powerpc: aim include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 19:00:52 -0000 Author: nwhitehorn Date: Sun Apr 22 19:00:51 2012 New Revision: 234581 URL: http://svn.freebsd.org/changeset/base/234581 Log: Use lwsync to provide memory barriers on systems that support it instead of sync (lwsync is an alternate encoding of sync on systems that do not support it, providing graceful fallback). This provides more than an order of magnitude reduction in the time required to acquire or release a mutex. MFC after: 2 months Modified: head/sys/powerpc/aim/slb.c head/sys/powerpc/include/atomic.h Modified: head/sys/powerpc/aim/slb.c ============================================================================== --- head/sys/powerpc/aim/slb.c Sun Apr 22 18:56:56 2012 (r234580) +++ head/sys/powerpc/aim/slb.c Sun Apr 22 19:00:51 2012 (r234581) @@ -139,7 +139,7 @@ make_new_leaf(uint64_t esid, uint64_t sl * that a lockless searcher always sees a valid path through * the tree. */ - powerpc_sync(); + mb(); idx = esid2idx(esid, parent->ua_level); parent->u.ua_child[idx] = child; @@ -187,7 +187,7 @@ make_intermediate(uint64_t esid, struct idx = esid2idx(child->ua_base, inter->ua_level); inter->u.ua_child[idx] = child; setbit(&inter->ua_alloc, idx); - powerpc_sync(); + mb(); /* Set up parent to point to intermediate node ... */ idx = esid2idx(inter->ua_base, parent->ua_level); Modified: head/sys/powerpc/include/atomic.h ============================================================================== --- head/sys/powerpc/include/atomic.h Sun Apr 22 18:56:56 2012 (r234580) +++ head/sys/powerpc/include/atomic.h Sun Apr 22 19:00:51 2012 (r234581) @@ -36,12 +36,10 @@ #error this file needs sys/cdefs.h as a prerequisite #endif -#define __ATOMIC_BARRIER \ - __asm __volatile("sync" : : : "memory") - -#define mb() __ATOMIC_BARRIER -#define wmb() mb() -#define rmb() mb() +/* NOTE: lwsync is equivalent to sync on systems without lwsync */ +#define mb() __asm __volatile("lwsync" : : : "memory") +#define wmb() __asm __volatile("lwsync" : : : "memory") +#define rmb() __asm __volatile("lwsync" : : : "memory") /* * atomic_add(p, v) @@ -94,13 +92,13 @@ atomic_add_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_add_##type(p, v, t); \ - __ATOMIC_BARRIER; \ + rmb(); \ } \ \ static __inline void \ atomic_add_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - __ATOMIC_BARRIER; \ + wmb(); \ __atomic_add_##type(p, v, t); \ } \ /* _ATOMIC_ADD */ @@ -180,13 +178,13 @@ _ATOMIC_ADD(long) atomic_clear_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_clear_##type(p, v, t); \ - __ATOMIC_BARRIER; \ + rmb(); \ } \ \ static __inline void \ atomic_clear_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - __ATOMIC_BARRIER; \ + wmb(); \ __atomic_clear_##type(p, v, t); \ } \ /* _ATOMIC_CLEAR */ @@ -282,13 +280,13 @@ _ATOMIC_CLEAR(long) atomic_set_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_set_##type(p, v, t); \ - __ATOMIC_BARRIER; \ + rmb(); \ } \ \ static __inline void \ atomic_set_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - __ATOMIC_BARRIER; \ + wmb(); \ __atomic_set_##type(p, v, t); \ } \ /* _ATOMIC_SET */ @@ -368,13 +366,13 @@ _ATOMIC_SET(long) atomic_subtract_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_subtract_##type(p, v, t); \ - __ATOMIC_BARRIER; \ + rmb(); \ } \ \ static __inline void \ atomic_subtract_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - __ATOMIC_BARRIER; \ + wmb(); \ __atomic_subtract_##type(p, v, t); \ } \ /* _ATOMIC_SUBTRACT */ @@ -481,14 +479,14 @@ atomic_load_acq_##TYPE(volatile u_##TYPE u_##TYPE v; \ \ v = *p; \ - __ATOMIC_BARRIER; \ + rmb(); \ return (v); \ } \ \ static __inline void \ atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v) \ { \ - __ATOMIC_BARRIER; \ + wmb(); \ *p = v; \ } @@ -598,14 +596,14 @@ atomic_cmpset_acq_int(volatile u_int *p, int retval; retval = atomic_cmpset_int(p, cmpval, newval); - __ATOMIC_BARRIER; + rmb(); return (retval); } static __inline int atomic_cmpset_rel_int(volatile u_int *p, u_int cmpval, u_int newval) { - __ATOMIC_BARRIER; + wmb(); return (atomic_cmpset_int(p, cmpval, newval)); } @@ -615,14 +613,14 @@ atomic_cmpset_acq_long(volatile u_long * u_long retval; retval = atomic_cmpset_long(p, cmpval, newval); - __ATOMIC_BARRIER; + rmb(); return (retval); } static __inline int atomic_cmpset_rel_long(volatile u_long *p, u_long cmpval, u_long newval) { - __ATOMIC_BARRIER; + wmb(); return (atomic_cmpset_long(p, cmpval, newval)); } From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 20:23:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 946031065677; Sun, 22 Apr 2012 20:23:35 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F8768FC16; Sun, 22 Apr 2012 20:23:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MKNZmn055283; Sun, 22 Apr 2012 20:23:35 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MKNZ0X055281; Sun, 22 Apr 2012 20:23:35 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204222023.q3MKNZ0X055281@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 Apr 2012 20:23:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234583 - head/sys/powerpc/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 20:23:35 -0000 Author: nwhitehorn Date: Sun Apr 22 20:23:34 2012 New Revision: 234583 URL: http://svn.freebsd.org/changeset/base/234583 Log: On non-64-bit systems (which generally don't have lwsync), use eieio and isync to implement read and write barriers, following Appendix B.2 of Book II of the architecture manual. This provides a 25% speed increase to fork() on the PowerPC G4. Modified: head/sys/powerpc/include/atomic.h Modified: head/sys/powerpc/include/atomic.h ============================================================================== --- head/sys/powerpc/include/atomic.h Sun Apr 22 20:14:33 2012 (r234582) +++ head/sys/powerpc/include/atomic.h Sun Apr 22 20:23:34 2012 (r234583) @@ -38,8 +38,13 @@ /* NOTE: lwsync is equivalent to sync on systems without lwsync */ #define mb() __asm __volatile("lwsync" : : : "memory") +#ifdef __powerpc64__ #define wmb() __asm __volatile("lwsync" : : : "memory") #define rmb() __asm __volatile("lwsync" : : : "memory") +#else +#define wmb() __asm __volatile("eieio" : : : "memory") +#define rmb() __asm __volatile("isync" : : : "memory") +#endif /* * atomic_add(p, v) From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 20:41:59 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B137C1065676; Sun, 22 Apr 2012 20:41:59 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id 40AA98FC12; Sun, 22 Apr 2012 20:41:58 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id q3MKfmZo087338; Sun, 22 Apr 2012 22:41:51 +0200 (CEST) (envelope-from andreast@FreeBSD.org) Message-ID: <4F946D0C.9000900@FreeBSD.org> Date: Sun, 22 Apr 2012 22:41:48 +0200 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Dimitry Andric References: <201204162136.q3GLaurU051667@svn.freebsd.org> In-Reply-To: <201204162136.q3GLaurU051667@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r234356 - in head: gnu/lib/csu lib/clang lib/csu/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 20:41:59 -0000 On 16.04.12 23:36, Dimitry Andric wrote: > Author: dim > Date: Mon Apr 16 21:36:55 2012 > New Revision: 234356 > URL: http://svn.freebsd.org/changeset/base/234356 > > Log: > Work around an issue on 32-bit PowerPC, where clang executable can get > too big, causing 'relocation truncated to fit' errors at link time. > > Reviewed by: nwhitehorn Did you build and boot a 32-bit world with gcc? I get an unusable install with this commit, every command segfaults. This is on a G5 SMP with 32-bit OS, gcc built. 64-bit world/kernel did boot. Andreas From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 21:11:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C23C51065670; Sun, 22 Apr 2012 21:11:01 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC0B18FC14; Sun, 22 Apr 2012 21:11:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MLB1hj057708; Sun, 22 Apr 2012 21:11:01 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MLB1t3057705; Sun, 22 Apr 2012 21:11:01 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204222111.q3MLB1t3057705@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 Apr 2012 21:11:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234584 - head/sys/powerpc/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 21:11:01 -0000 Author: nwhitehorn Date: Sun Apr 22 21:11:01 2012 New Revision: 234584 URL: http://svn.freebsd.org/changeset/base/234584 Log: Clarify what we are doing in r234583 a little better: eieio and isync do not provide general barriers, but only barriers in the context of the atomic sequences here. As such, make them private and keep the global *mb() routines using a variant of sync. Modified: head/sys/powerpc/include/atomic.h Modified: head/sys/powerpc/include/atomic.h ============================================================================== --- head/sys/powerpc/include/atomic.h Sun Apr 22 20:23:34 2012 (r234583) +++ head/sys/powerpc/include/atomic.h Sun Apr 22 21:11:01 2012 (r234584) @@ -37,13 +37,21 @@ #endif /* NOTE: lwsync is equivalent to sync on systems without lwsync */ -#define mb() __asm __volatile("lwsync" : : : "memory") +#define mb() __asm __volatile("lwsync" : : : "memory") +#define wmb() __asm __volatile("lwsync" : : : "memory") +#define rmb() __asm __volatile("lwsync" : : : "memory") + +/* + * The __ATOMIC_XMB() macros provide memory barriers only in conjunction + * with the atomic lXarx/stXcx. sequences below. See Appendix B.2 of Book II + * of the architecture manual. + */ #ifdef __powerpc64__ -#define wmb() __asm __volatile("lwsync" : : : "memory") -#define rmb() __asm __volatile("lwsync" : : : "memory") +#define __ATOMIC_WMB() __asm __volatile("lwsync" : : : "memory") +#define __ATOMIC_RMB() __asm __volatile("lwsync" : : : "memory") #else -#define wmb() __asm __volatile("eieio" : : : "memory") -#define rmb() __asm __volatile("isync" : : : "memory") +#define __ATOMIC_WMB() __asm __volatile("eieio" : : : "memory") +#define __ATOMIC_RMB() __asm __volatile("isync" : : : "memory") #endif /* @@ -97,13 +105,13 @@ atomic_add_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_add_##type(p, v, t); \ - rmb(); \ + __ATOMIC_RMB(); \ } \ \ static __inline void \ atomic_add_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - wmb(); \ + __ATOMIC_WMB(); \ __atomic_add_##type(p, v, t); \ } \ /* _ATOMIC_ADD */ @@ -183,13 +191,13 @@ _ATOMIC_ADD(long) atomic_clear_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_clear_##type(p, v, t); \ - rmb(); \ + __ATOMIC_RMB(); \ } \ \ static __inline void \ atomic_clear_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - wmb(); \ + __ATOMIC_WMB(); \ __atomic_clear_##type(p, v, t); \ } \ /* _ATOMIC_CLEAR */ @@ -285,13 +293,13 @@ _ATOMIC_CLEAR(long) atomic_set_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_set_##type(p, v, t); \ - rmb(); \ + __ATOMIC_RMB(); \ } \ \ static __inline void \ atomic_set_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - wmb(); \ + __ATOMIC_WMB(); \ __atomic_set_##type(p, v, t); \ } \ /* _ATOMIC_SET */ @@ -371,13 +379,13 @@ _ATOMIC_SET(long) atomic_subtract_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_subtract_##type(p, v, t); \ - rmb(); \ + __ATOMIC_RMB(); \ } \ \ static __inline void \ atomic_subtract_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - wmb(); \ + __ATOMIC_WMB(); \ __atomic_subtract_##type(p, v, t); \ } \ /* _ATOMIC_SUBTRACT */ @@ -601,7 +609,7 @@ atomic_cmpset_acq_int(volatile u_int *p, int retval; retval = atomic_cmpset_int(p, cmpval, newval); - rmb(); + __ATOMIC_RMB(); return (retval); } @@ -618,7 +626,7 @@ atomic_cmpset_acq_long(volatile u_long * u_long retval; retval = atomic_cmpset_long(p, cmpval, newval); - rmb(); + __ATOMIC_RMB(); return (retval); } From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 21:18:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CBBE11065672; Sun, 22 Apr 2012 21:18:41 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5FB28FC0C; Sun, 22 Apr 2012 21:18:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MLIfP2058641; Sun, 22 Apr 2012 21:18:41 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MLIftC058638; Sun, 22 Apr 2012 21:18:41 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201204222118.q3MLIftC058638@svn.freebsd.org> From: David Schultz Date: Sun, 22 Apr 2012 21:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234585 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 21:18:41 -0000 Author: das Date: Sun Apr 22 21:18:41 2012 New Revision: 234585 URL: http://svn.freebsd.org/changeset/base/234585 Log: Refactor scanf to improve modularity. Conversions are now performed by separate conversion functions. This will hopefully make bugs more noticeable (I noticed several already) and provide opportunities to reduce code duplication. Modified: head/lib/libc/stdio/vfscanf.c head/lib/libc/stdio/vfwscanf.c Modified: head/lib/libc/stdio/vfscanf.c ============================================================================== --- head/lib/libc/stdio/vfscanf.c Sun Apr 22 21:11:01 2012 (r234584) +++ head/lib/libc/stdio/vfscanf.c Sun Apr 22 21:18:41 2012 (r234585) @@ -107,6 +107,418 @@ static int parsefloat(FILE *, char *, ch __weak_reference(__vfscanf, vfscanf); /* + * Conversion functions are passed a pointer to this object instead of + * a real parameter to indicate that the assignment-suppression (*) + * flag was specified. We could use a NULL pointer to indicate this, + * but that would mask bugs in applications that call scanf() with a + * NULL pointer. + */ +static const int suppress; +#define SUPPRESS_PTR ((void *)&suppress) + +static const mbstate_t initial_mbs; + +/* + * The following conversion functions return the number of characters consumed, + * or -1 on input failure. Character class conversion returns 0 on match + * failure. + */ + +static __inline int +convert_char(FILE *fp, char * __restrict p, int width) +{ + int n, nread; + + nread = 0; + if (p == SUPPRESS_PTR) { + size_t sum = 0; + for (;;) { + if ((n = fp->_r) < width) { + sum += n; + width -= n; + fp->_p += n; + if (__srefill(fp)) { + if (sum == 0) + return (-1); + break; + } + } else { + sum += width; + fp->_r -= width; + fp->_p += width; + break; + } + } + nread += sum; + } else { + size_t r = __fread(p, 1, width, fp); + + if (r == 0) + return (-1); + nread += r; + } + return (nread); +} + +static __inline int +convert_wchar(FILE *fp, wchar_t *wcp, int width) +{ + mbstate_t mbs; + size_t nconv; + int n, nread; + char buf[MB_CUR_MAX]; + + nread = 0; + n = 0; + while (width != 0) { + if (n == MB_CUR_MAX) { + fp->_flags |= __SERR; + return (-1); + } + buf[n++] = *fp->_p; + fp->_p++; + fp->_r--; + mbs = initial_mbs; + nconv = mbrtowc(wcp, buf, n, &mbs); + if (nconv == (size_t)-1) { + fp->_flags |= __SERR; + return (-1); + } + if (nconv == 0 && wcp != SUPPRESS_PTR) + *wcp = L'\0'; + if (nconv != (size_t)-2) { + nread += n; + width--; + if (wcp != SUPPRESS_PTR) + wcp++; + n = 0; + } + if (fp->_r <= 0 && __srefill(fp)) { + if (n != 0) { + fp->_flags |= __SERR; + return (-1); + } + break; + } + } + return (nread); +} + +static __inline int +convert_ccl(FILE *fp, char * __restrict p, int width, const char *ccltab) +{ + char *p0; + int n; + + if (p == SUPPRESS_PTR) { + n = 0; + while (ccltab[*fp->_p]) { + n++, fp->_r--, fp->_p++; + if (--width == 0) + break; + if (fp->_r <= 0 && __srefill(fp)) { + if (n == 0) + return (-1); + break; + } + } + } else { + p0 = p; + while (ccltab[*fp->_p]) { + fp->_r--; + *p++ = *fp->_p++; + if (--width == 0) + break; + if (fp->_r <= 0 && __srefill(fp)) { + if (p == p0) + return (-1); + break; + } + } + n = p - p0; + if (n == 0) + return (0); + *p = 0; + } + return (n); +} + +static __inline int +convert_wccl(FILE *fp, wchar_t *wcp, int width, const char *ccltab) +{ + mbstate_t mbs; + wchar_t twc; + int n, nchars, nconv, nread; + char buf[MB_CUR_MAX]; + + if (wcp == SUPPRESS_PTR) + wcp = &twc; + n = nread = 0; + nchars = 0; + while (width != 0) { + if (n == MB_CUR_MAX) { + fp->_flags |= __SERR; + return (-1); + } + buf[n++] = *fp->_p; + fp->_p++; + fp->_r--; + mbs = initial_mbs; + nconv = mbrtowc(wcp, buf, n, &mbs); + if (nconv == (size_t)-1) { + fp->_flags |= __SERR; + return (-1); + } + if (nconv == 0) + *wcp = L'\0'; + if (nconv != (size_t)-2) { + if (wctob(*wcp) != EOF && !ccltab[wctob(*wcp)]) { + while (n != 0) { + n--; + __ungetc(buf[n], fp); + } + break; + } + nread += n; + width--; + if (wcp != &twc) + wcp++; + nchars++; + n = 0; + } + if (fp->_r <= 0 && __srefill(fp)) { + if (n != 0) { + fp->_flags |= __SERR; + return (-1); + } + break; + } + } + if (n != 0) { + fp->_flags |= __SERR; + return (-1); + } + n = nchars; + if (n == 0) + return (0); + *wcp = L'\0'; + /* XXX This matches historical behavior, but it's wrong. */ + return (nread + n); +} + +static __inline int +convert_string(FILE *fp, char * __restrict p, int width) +{ + char *p0; + int n; + + if (p == SUPPRESS_PTR) { + n = 0; + while (!isspace(*fp->_p)) { + n++, fp->_r--, fp->_p++; + if (--width == 0) + break; + if (fp->_r <= 0 && __srefill(fp)) + break; + } + } else { + p0 = p; + while (!isspace(*fp->_p)) { + fp->_r--; + *p++ = *fp->_p++; + if (--width == 0) + break; + if (fp->_r <= 0 && __srefill(fp)) + break; + } + *p = 0; + n = p - p0; + } + return (n); +} + +static __inline int +convert_wstring(FILE *fp, wchar_t *wcp, int width) +{ + mbstate_t mbs; + wchar_t twc; + int n, nconv, nread; + char buf[MB_CUR_MAX]; + + if (wcp == SUPPRESS_PTR) + wcp = &twc; + n = nread = 0; + while (!isspace(*fp->_p) && width != 0) { + if (n == MB_CUR_MAX) { + fp->_flags |= __SERR; + return (-1); + } + buf[n++] = *fp->_p; + fp->_p++; + fp->_r--; + mbs = initial_mbs; + nconv = mbrtowc(wcp, buf, n, &mbs); + if (nconv == (size_t)-1) { + fp->_flags |= __SERR; + return (-1); + } + if (nconv == 0) + *wcp = L'\0'; + if (nconv != (size_t)-2) { + if (iswspace(*wcp)) { + while (n != 0) { + n--; + __ungetc(buf[n], fp); + } + break; + } + nread += n; + width--; + if (wcp != &twc) + wcp++; + n = 0; + } + if (fp->_r <= 0 && __srefill(fp)) { + if (n != 0) { + fp->_flags |= __SERR; + return (-1); + } + break; + } + } + *wcp = L'\0'; + return (nread); +} + +/* + * Read an integer, storing it in buf. The only relevant bit in the + * flags argument is PFXOK. + * + * Return 0 on a match failure, and the number of characters read + * otherwise. + */ +static __inline int +parseint(FILE *fp, char * __restrict buf, int width, int base, int flags) +{ + /* `basefix' is used to avoid `if' tests */ + static const short basefix[17] = + { 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; + char *p; + int c; + + flags |= SIGNOK | NDIGITS | NZDIGITS; + for (p = buf; width; width--) { + c = *fp->_p; + /* + * Switch on the character; `goto ok' if we accept it + * as a part of number. + */ + switch (c) { + + /* + * The digit 0 is always legal, but is special. For + * %i conversions, if no digits (zero or nonzero) have + * been scanned (only signs), we will have base==0. + * In that case, we should set it to 8 and enable 0x + * prefixing. Also, if we have not scanned zero + * digits before this, do not turn off prefixing + * (someone else will turn it off if we have scanned + * any nonzero digits). + */ + case '0': + if (base == 0) { + base = 8; + flags |= PFXOK; + } + if (flags & NZDIGITS) + flags &= ~(SIGNOK|NZDIGITS|NDIGITS); + else + flags &= ~(SIGNOK|PFXOK|NDIGITS); + goto ok; + + /* 1 through 7 always legal */ + case '1': case '2': case '3': + case '4': case '5': case '6': case '7': + base = basefix[base]; + flags &= ~(SIGNOK | PFXOK | NDIGITS); + goto ok; + + /* digits 8 and 9 ok iff decimal or hex */ + case '8': case '9': + base = basefix[base]; + if (base <= 8) + break; /* not legal here */ + flags &= ~(SIGNOK | PFXOK | NDIGITS); + goto ok; + + /* letters ok iff hex */ + case 'A': case 'B': case 'C': + case 'D': case 'E': case 'F': + case 'a': case 'b': case 'c': + case 'd': case 'e': case 'f': + /* no need to fix base here */ + if (base <= 10) + break; /* not legal here */ + flags &= ~(SIGNOK | PFXOK | NDIGITS); + goto ok; + + /* sign ok only as first character */ + case '+': case '-': + if (flags & SIGNOK) { + flags &= ~SIGNOK; + flags |= HAVESIGN; + goto ok; + } + break; + + /* + * x ok iff flag still set & 2nd char (or 3rd char if + * we have a sign). + */ + case 'x': case 'X': + if (flags & PFXOK && p == + buf + 1 + !!(flags & HAVESIGN)) { + base = 16; /* if %i */ + flags &= ~PFXOK; + goto ok; + } + break; + } + + /* + * If we got here, c is not a legal character for a + * number. Stop accumulating digits. + */ + break; + ok: + /* + * c is legal: store it and look at the next. + */ + *p++ = c; + if (--fp->_r > 0) + fp->_p++; + else if (__srefill(fp)) + break; /* EOF */ + } + /* + * If we had only a sign, it is no good; push back the sign. + * If the number ends in `x', it was [sign] '0' 'x', so push + * back the x and treat it as [sign] '0'. + */ + if (flags & NDIGITS) { + if (p > buf) + (void) __ungetc(*(u_char *)--p, fp); + return (0); + } + c = ((u_char *)p)[-1]; + if (c == 'x' || c == 'X') { + --p; + (void) __ungetc(c, fp); + } + return (p - buf); +} + +/* * __vfscanf - MT-safe version */ int @@ -137,27 +549,18 @@ vfscanf_l(FILE *fp, locale_t locale, cha int __svfscanf(FILE *fp, locale_t locale, const char *fmt0, va_list ap) { +#define GETARG(type) ((flags & SUPPRESS) ? SUPPRESS_PTR : va_arg(ap, type)) const u_char *fmt = (const u_char *)fmt0; int c; /* character from format, or conversion */ size_t width; /* field width, or 0 */ - char *p; /* points into all kinds of strings */ - int n; /* handy integer */ int flags; /* flags as defined above */ - char *p0; /* saves original value of p when necessary */ int nassigned; /* number of fields assigned */ int nconversions; /* number of conversions */ + int nr; /* characters read by the current conversion */ int nread; /* number of characters consumed from fp */ int base; /* base argument to conversion function */ char ccltab[256]; /* character class table for %[...] */ - char buf[BUF]; /* buffer for numeric and mb conversions */ - wchar_t *wcp; /* handy wide character pointer */ - size_t nconv; /* length of multibyte sequence converted */ - static const mbstate_t initial; - mbstate_t mbs; - - /* `basefix' is used to avoid `if' tests in the integer scanner */ - static short basefix[17] = - { 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; + char buf[BUF]; /* buffer for numeric conversions */ ORIENT(fp, -1); @@ -366,178 +769,32 @@ literal: if (width == 0) width = 1; if (flags & LONG) { - if ((flags & SUPPRESS) == 0) - wcp = va_arg(ap, wchar_t *); - else - wcp = NULL; - n = 0; - while (width != 0) { - if (n == MB_CUR_MAX) { - fp->_flags |= __SERR; - goto input_failure; - } - buf[n++] = *fp->_p; - fp->_p++; - fp->_r--; - mbs = initial; - nconv = mbrtowc(wcp, buf, n, &mbs); - if (nconv == (size_t)-1) { - fp->_flags |= __SERR; - goto input_failure; - } - if (nconv == 0 && !(flags & SUPPRESS)) - *wcp = L'\0'; - if (nconv != (size_t)-2) { - nread += n; - width--; - if (!(flags & SUPPRESS)) - wcp++; - n = 0; - } - if (fp->_r <= 0 && __srefill(fp)) { - if (n != 0) { - fp->_flags |= __SERR; - goto input_failure; - } - break; - } - } - if (!(flags & SUPPRESS)) - nassigned++; - } else if (flags & SUPPRESS) { - size_t sum = 0; - for (;;) { - if ((n = fp->_r) < width) { - sum += n; - width -= n; - fp->_p += n; - if (__srefill(fp)) { - if (sum == 0) - goto input_failure; - break; - } - } else { - sum += width; - fp->_r -= width; - fp->_p += width; - break; - } - } - nread += sum; + nr = convert_wchar(fp, GETARG(wchar_t *), + width); } else { - size_t r = __fread((void *)va_arg(ap, char *), 1, - width, fp); - - if (r == 0) - goto input_failure; - nread += r; - nassigned++; + nr = convert_char(fp, GETARG(char *), width); } - nconversions++; + if (nr < 0) + goto input_failure; break; case CT_CCL: /* scan a (nonempty) character class (sets NOSKIP) */ if (width == 0) width = (size_t)~0; /* `infinity' */ - /* take only those things in the class */ if (flags & LONG) { - wchar_t twc; - int nchars; - - if ((flags & SUPPRESS) == 0) - wcp = va_arg(ap, wchar_t *); - else - wcp = &twc; - n = 0; - nchars = 0; - while (width != 0) { - if (n == MB_CUR_MAX) { - fp->_flags |= __SERR; - goto input_failure; - } - buf[n++] = *fp->_p; - fp->_p++; - fp->_r--; - mbs = initial; - nconv = mbrtowc(wcp, buf, n, &mbs); - if (nconv == (size_t)-1) { - fp->_flags |= __SERR; - goto input_failure; - } - if (nconv == 0) - *wcp = L'\0'; - if (nconv != (size_t)-2) { - if (wctob(*wcp) != EOF && - !ccltab[wctob(*wcp)]) { - while (n != 0) { - n--; - __ungetc(buf[n], - fp); - } - break; - } - nread += n; - width--; - if (!(flags & SUPPRESS)) - wcp++; - nchars++; - n = 0; - } - if (fp->_r <= 0 && __srefill(fp)) { - if (n != 0) { - fp->_flags |= __SERR; - goto input_failure; - } - break; - } - } - if (n != 0) { - fp->_flags |= __SERR; - goto input_failure; - } - n = nchars; - if (n == 0) - goto match_failure; - if (!(flags & SUPPRESS)) { - *wcp = L'\0'; - nassigned++; - } - } else if (flags & SUPPRESS) { - n = 0; - while (ccltab[*fp->_p]) { - n++, fp->_r--, fp->_p++; - if (--width == 0) - break; - if (fp->_r <= 0 && __srefill(fp)) { - if (n == 0) - goto input_failure; - break; - } - } - if (n == 0) - goto match_failure; + nr = convert_wccl(fp, GETARG(wchar_t *), width, + ccltab); } else { - p0 = p = va_arg(ap, char *); - while (ccltab[*fp->_p]) { - fp->_r--; - *p++ = *fp->_p++; - if (--width == 0) - break; - if (fp->_r <= 0 && __srefill(fp)) { - if (p == p0) - goto input_failure; - break; - } - } - n = p - p0; - if (n == 0) + nr = convert_ccl(fp, GETARG(char *), width, + ccltab); + } + if (nr <= 0) { + if (nr < 0) + goto input_failure; + else /* nr == 0 */ goto match_failure; - *p = 0; - nassigned++; } - nread += n; - nconversions++; break; case CT_STRING: @@ -545,82 +802,14 @@ literal: if (width == 0) width = (size_t)~0; if (flags & LONG) { - wchar_t twc; - - if ((flags & SUPPRESS) == 0) - wcp = va_arg(ap, wchar_t *); - else - wcp = &twc; - n = 0; - while (!isspace(*fp->_p) && width != 0) { - if (n == MB_CUR_MAX) { - fp->_flags |= __SERR; - goto input_failure; - } - buf[n++] = *fp->_p; - fp->_p++; - fp->_r--; - mbs = initial; - nconv = mbrtowc(wcp, buf, n, &mbs); - if (nconv == (size_t)-1) { - fp->_flags |= __SERR; - goto input_failure; - } - if (nconv == 0) - *wcp = L'\0'; - if (nconv != (size_t)-2) { - if (iswspace(*wcp)) { - while (n != 0) { - n--; - __ungetc(buf[n], - fp); - } - break; - } - nread += n; - width--; - if (!(flags & SUPPRESS)) - wcp++; - n = 0; - } - if (fp->_r <= 0 && __srefill(fp)) { - if (n != 0) { - fp->_flags |= __SERR; - goto input_failure; - } - break; - } - } - if (!(flags & SUPPRESS)) { - *wcp = L'\0'; - nassigned++; - } - } else if (flags & SUPPRESS) { - n = 0; - while (!isspace(*fp->_p)) { - n++, fp->_r--, fp->_p++; - if (--width == 0) - break; - if (fp->_r <= 0 && __srefill(fp)) - break; - } - nread += n; + nr = convert_wstring(fp, GETARG(wchar_t *), + width); } else { - p0 = p = va_arg(ap, char *); - while (!isspace(*fp->_p)) { - fp->_r--; - *p++ = *fp->_p++; - if (--width == 0) - break; - if (fp->_r <= 0 && __srefill(fp)) - break; - } - *p = 0; - nread += p - p0; - nassigned++; + nr = convert_string(fp, GETARG(char *), width); } - nconversions++; - continue; + if (nr < 0) + goto input_failure; + break; case CT_INT: /* scan an integer as if by the conversion function */ @@ -633,122 +822,13 @@ literal: width = sizeof(buf) - 2; width++; #endif - flags |= SIGNOK | NDIGITS | NZDIGITS; - for (p = buf; width; width--) { - c = *fp->_p; - /* - * Switch on the character; `goto ok' - * if we accept it as a part of number. - */ - switch (c) { - - /* - * The digit 0 is always legal, but is - * special. For %i conversions, if no - * digits (zero or nonzero) have been - * scanned (only signs), we will have - * base==0. In that case, we should set - * it to 8 and enable 0x prefixing. - * Also, if we have not scanned zero digits - * before this, do not turn off prefixing - * (someone else will turn it off if we - * have scanned any nonzero digits). - */ - case '0': - if (base == 0) { - base = 8; - flags |= PFXOK; - } - if (flags & NZDIGITS) - flags &= ~(SIGNOK|NZDIGITS|NDIGITS); - else - flags &= ~(SIGNOK|PFXOK|NDIGITS); - goto ok; - - /* 1 through 7 always legal */ - case '1': case '2': case '3': - case '4': case '5': case '6': case '7': - base = basefix[base]; - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* digits 8 and 9 ok iff decimal or hex */ - case '8': case '9': - base = basefix[base]; - if (base <= 8) - break; /* not legal here */ - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* letters ok iff hex */ - case 'A': case 'B': case 'C': - case 'D': case 'E': case 'F': - case 'a': case 'b': case 'c': - case 'd': case 'e': case 'f': - /* no need to fix base here */ - if (base <= 10) - break; /* not legal here */ - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* sign ok only as first character */ - case '+': case '-': - if (flags & SIGNOK) { - flags &= ~SIGNOK; - flags |= HAVESIGN; - goto ok; - } - break; - - /* - * x ok iff flag still set & 2nd char (or - * 3rd char if we have a sign). - */ - case 'x': case 'X': - if (flags & PFXOK && p == - buf + 1 + !!(flags & HAVESIGN)) { - base = 16; /* if %i */ - flags &= ~PFXOK; - goto ok; - } - break; - } - - /* - * If we got here, c is not a legal character - * for a number. Stop accumulating digits. - */ - break; - ok: - /* - * c is legal: store it and look at the next. - */ - *p++ = c; - if (--fp->_r > 0) - fp->_p++; - else if (__srefill(fp)) - break; /* EOF */ - } - /* - * If we had only a sign, it is no good; push - * back the sign. If the number ends in `x', - * it was [sign] '0' 'x', so push back the x - * and treat it as [sign] '0'. - */ - if (flags & NDIGITS) { - if (p > buf) - (void) __ungetc(*(u_char *)--p, fp); + nr = parseint(fp, buf, width, base, flags); + if (nr == 0) goto match_failure; - } - c = ((u_char *)p)[-1]; - if (c == 'x' || c == 'X') { - --p; - (void) __ungetc(c, fp); - } if ((flags & SUPPRESS) == 0) { uintmax_t res; - *p = 0; + buf[nr] = '\0'; if ((flags & UNSIGNED) == 0) res = strtoimax_l(buf, (char **)NULL, base, locale); else @@ -772,10 +852,7 @@ literal: *va_arg(ap, size_t *) = res; else *va_arg(ap, int *) = res; - nassigned++; } - nread += p - buf; - nconversions++; break; #ifndef NO_FLOATING_POINT @@ -783,26 +860,30 @@ literal: /* scan a floating point number as if by strtod */ if (width == 0 || width > sizeof(buf) - 1) width = sizeof(buf) - 1; - if ((width = parsefloat(fp, buf, buf + width, locale)) == 0) + nr = parsefloat(fp, buf, buf + width, locale); + if (nr == 0) goto match_failure; if ((flags & SUPPRESS) == 0) { if (flags & LONGDBL) { - long double res = strtold_l(buf, &p, locale); + long double res = strtold_l(buf, NULL, + locale); *va_arg(ap, long double *) = res; } else if (flags & LONG) { - double res = strtod_l(buf, &p, locale); + double res = strtod_l(buf, NULL, + locale); *va_arg(ap, double *) = res; } else { - float res = strtof_l(buf, &p, locale); + float res = strtof_l(buf, NULL, locale); *va_arg(ap, float *) = res; } - nassigned++; } - nread += width; - nconversions++; break; #endif /* !NO_FLOATING_POINT */ } + if (!(flags & SUPPRESS)) + nassigned++; + nread += nr; + nconversions++; } input_failure: return (nconversions != 0 ? nassigned : EOF); Modified: head/lib/libc/stdio/vfwscanf.c ============================================================================== --- head/lib/libc/stdio/vfwscanf.c Sun Apr 22 21:11:01 2012 (r234584) +++ head/lib/libc/stdio/vfwscanf.c Sun Apr 22 21:18:41 2012 (r234585) @@ -101,13 +101,359 @@ __FBSDID("$FreeBSD$"); static int parsefloat(FILE *, wchar_t *, wchar_t *, locale_t); #endif -#define INCCL(_c) \ - (cclcompl ? (wmemchr(ccls, (_c), ccle - ccls) == NULL) : \ - (wmemchr(ccls, (_c), ccle - ccls) != NULL)) +struct ccl { + const wchar_t *start; /* character class start */ + const wchar_t *end; /* character class end */ + int compl; /* ccl is complemented? */ +}; + +static __inline int +inccl(const struct ccl *ccl, wint_t wi) +{ + + if (ccl->compl) { + return (wmemchr(ccl->start, wi, ccl->end - ccl->start) + == NULL); + } else { + return (wmemchr(ccl->start, wi, ccl->end - ccl->start) != NULL); + } +} + +/* + * Conversion functions are passed a pointer to this object instead of + * a real parameter to indicate that the assignment-suppression (*) + * flag was specified. We could use a NULL pointer to indicate this, + * but that would mask bugs in applications that call scanf() with a + * NULL pointer. + */ +static const int suppress; +#define SUPPRESS_PTR ((void *)&suppress) static const mbstate_t initial_mbs; /* + * The following conversion functions return the number of characters consumed, + * or -1 on input failure. Character class conversion returns 0 on match + * failure. + */ + +static __inline int +convert_char(FILE *fp, char * __restrict mbp, int width, locale_t locale) +{ + mbstate_t mbs; + size_t nconv; + wint_t wi; + int n; + char mbbuf[MB_LEN_MAX]; + + n = 0; + mbs = initial_mbs; + while (width != 0 && (wi = __fgetwc(fp, locale)) != WEOF) { + if (width >= MB_CUR_MAX && mbp != SUPPRESS_PTR) { + nconv = wcrtomb(mbp, wi, &mbs); + if (nconv == (size_t)-1) + return (-1); + } else { + nconv = wcrtomb(mbbuf, wi, &mbs); + if (nconv == (size_t)-1) + return (-1); + if (nconv > width) { + __ungetwc(wi, fp, locale); + break; + } + if (mbp != SUPPRESS_PTR) + memcpy(mbp, mbbuf, nconv); + } + if (mbp != SUPPRESS_PTR) + mbp += nconv; + width -= nconv; + n++; + } + if (n == 0) + return (-1); + return (n); +} + +static __inline int +convert_wchar(FILE *fp, wchar_t *wcp, int width, locale_t locale) +{ + wint_t wi; + int n; + + n = 0; + while (width-- != 0 && (wi = __fgetwc(fp, locale)) != WEOF) { + if (wcp != SUPPRESS_PTR) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 21:22:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A28821065672; Sun, 22 Apr 2012 21:22:14 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E6648FC1C; Sun, 22 Apr 2012 21:22:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MLMEwK059107; Sun, 22 Apr 2012 21:22:14 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MLME3L059104; Sun, 22 Apr 2012 21:22:14 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201204222122.q3MLME3L059104@svn.freebsd.org> From: David Schultz Date: Sun, 22 Apr 2012 21:22:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234586 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 21:22:14 -0000 Author: das Date: Sun Apr 22 21:22:14 2012 New Revision: 234586 URL: http://svn.freebsd.org/changeset/base/234586 Log: Bugfix: %n doesn't count as a conversion, so sscanf("abc", "ab%ncd", &i) returns EOF, not 0. Modified: head/lib/libc/stdio/vfscanf.c head/lib/libc/stdio/vfwscanf.c Modified: head/lib/libc/stdio/vfscanf.c ============================================================================== --- head/lib/libc/stdio/vfscanf.c Sun Apr 22 21:18:41 2012 (r234585) +++ head/lib/libc/stdio/vfscanf.c Sun Apr 22 21:22:14 2012 (r234586) @@ -703,7 +703,6 @@ literal: break; case 'n': - nconversions++; if (flags & SUPPRESS) /* ??? */ continue; if (flags & SHORTSHORT) Modified: head/lib/libc/stdio/vfwscanf.c ============================================================================== --- head/lib/libc/stdio/vfwscanf.c Sun Apr 22 21:18:41 2012 (r234585) +++ head/lib/libc/stdio/vfwscanf.c Sun Apr 22 21:22:14 2012 (r234586) @@ -650,7 +650,6 @@ literal: break; case 'n': - nconversions++; if (flags & SUPPRESS) /* ??? */ continue; if (flags & SHORTSHORT) From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 21:28:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2C3941065672; Sun, 22 Apr 2012 21:28:15 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 183588FC12; Sun, 22 Apr 2012 21:28:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MLSE5x059847; Sun, 22 Apr 2012 21:28:14 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MLSENU059845; Sun, 22 Apr 2012 21:28:14 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201204222128.q3MLSENU059845@svn.freebsd.org> From: David Schultz Date: Sun, 22 Apr 2012 21:28:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234587 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 21:28:15 -0000 Author: das Date: Sun Apr 22 21:28:14 2012 New Revision: 234587 URL: http://svn.freebsd.org/changeset/base/234587 Log: Bugfix: Correctly count the number of characters read for %l[ conversions. Modified: head/lib/libc/stdio/vfscanf.c Modified: head/lib/libc/stdio/vfscanf.c ============================================================================== --- head/lib/libc/stdio/vfscanf.c Sun Apr 22 21:22:14 2012 (r234586) +++ head/lib/libc/stdio/vfscanf.c Sun Apr 22 21:28:14 2012 (r234587) @@ -248,12 +248,12 @@ convert_wccl(FILE *fp, wchar_t *wcp, int { mbstate_t mbs; wchar_t twc; - int n, nchars, nconv, nread; + int n, nchars, nconv; char buf[MB_CUR_MAX]; if (wcp == SUPPRESS_PTR) wcp = &twc; - n = nread = 0; + n = 0; nchars = 0; while (width != 0) { if (n == MB_CUR_MAX) { @@ -279,7 +279,6 @@ convert_wccl(FILE *fp, wchar_t *wcp, int } break; } - nread += n; width--; if (wcp != &twc) wcp++; @@ -298,12 +297,10 @@ convert_wccl(FILE *fp, wchar_t *wcp, int fp->_flags |= __SERR; return (-1); } - n = nchars; - if (n == 0) + if (nchars == 0) return (0); *wcp = L'\0'; - /* XXX This matches historical behavior, but it's wrong. */ - return (nread + n); + return (nchars); } static __inline int From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 21:28:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E234010657C2; Sun, 22 Apr 2012 21:28:33 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE0508FC0A; Sun, 22 Apr 2012 21:28:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MLSXt3059920; Sun, 22 Apr 2012 21:28:33 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MLSXR4059918; Sun, 22 Apr 2012 21:28:33 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201204222128.q3MLSXR4059918@svn.freebsd.org> From: David Schultz Date: Sun, 22 Apr 2012 21:28:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234588 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 21:28:34 -0000 Author: das Date: Sun Apr 22 21:28:33 2012 New Revision: 234588 URL: http://svn.freebsd.org/changeset/base/234588 Log: Bugfix: Include whitespace characters in the count of the number of characters read. Modified: head/lib/libc/stdio/vfwscanf.c Modified: head/lib/libc/stdio/vfwscanf.c ============================================================================== --- head/lib/libc/stdio/vfwscanf.c Sun Apr 22 21:28:14 2012 (r234587) +++ head/lib/libc/stdio/vfwscanf.c Sun Apr 22 21:28:33 2012 (r234588) @@ -506,7 +506,7 @@ __vfwscanf(FILE * __restrict fp, locale_ if (iswspace(c)) { while ((c = __fgetwc(fp, locale)) != WEOF && iswspace_l(c, locale)) - ; + nread++; if (c != WEOF) __ungetwc(c, fp, locale); continue; From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 21:55:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 533B4106566C; Sun, 22 Apr 2012 21:55:20 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3EA3B8FC0A; Sun, 22 Apr 2012 21:55:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MLtK4K062187; Sun, 22 Apr 2012 21:55:20 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MLtKkN062185; Sun, 22 Apr 2012 21:55:20 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204222155.q3MLtKkN062185@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 Apr 2012 21:55:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234589 - head/sys/powerpc/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 21:55:20 -0000 Author: nwhitehorn Date: Sun Apr 22 21:55:19 2012 New Revision: 234589 URL: http://svn.freebsd.org/changeset/base/234589 Log: Correctly specify assembler constrains for synchronization instructions. MFC after: 3 days Modified: head/sys/powerpc/include/cpufunc.h Modified: head/sys/powerpc/include/cpufunc.h ============================================================================== --- head/sys/powerpc/include/cpufunc.h Sun Apr 22 21:28:33 2012 (r234588) +++ head/sys/powerpc/include/cpufunc.h Sun Apr 22 21:55:19 2012 (r234589) @@ -166,21 +166,21 @@ static __inline void eieio(void) { - __asm __volatile ("eieio"); + __asm __volatile ("eieio" : : : "memory"); } static __inline void isync(void) { - __asm __volatile ("isync"); + __asm __volatile ("isync" : : : "memory"); } static __inline void powerpc_sync(void) { - __asm __volatile ("sync"); + __asm __volatile ("sync" : : : "memory"); } static __inline register_t From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 22:27:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F68C106564A; Sun, 22 Apr 2012 22:27:36 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 206678FC08; Sun, 22 Apr 2012 22:27:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MMRZFh063180; Sun, 22 Apr 2012 22:27:35 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MMRZ9T063178; Sun, 22 Apr 2012 22:27:35 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204222227.q3MMRZ9T063178@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 Apr 2012 22:27:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234590 - head/sys/powerpc/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 22:27:36 -0000 Author: nwhitehorn Date: Sun Apr 22 22:27:35 2012 New Revision: 234590 URL: http://svn.freebsd.org/changeset/base/234590 Log: Provide a clearer split between read/write and acquire/release barriers. This should really, actually be correct now. Modified: head/sys/powerpc/include/atomic.h Modified: head/sys/powerpc/include/atomic.h ============================================================================== --- head/sys/powerpc/include/atomic.h Sun Apr 22 21:55:19 2012 (r234589) +++ head/sys/powerpc/include/atomic.h Sun Apr 22 22:27:35 2012 (r234590) @@ -38,20 +38,25 @@ /* NOTE: lwsync is equivalent to sync on systems without lwsync */ #define mb() __asm __volatile("lwsync" : : : "memory") +#ifdef __powerpc64__ +#define rmb() __asm __volatile("lwsync" : : : "memory") #define wmb() __asm __volatile("lwsync" : : : "memory") +#else #define rmb() __asm __volatile("lwsync" : : : "memory") +#define wmb() __asm __volatile("eieio" : : : "memory") +#endif /* - * The __ATOMIC_XMB() macros provide memory barriers only in conjunction + * The __ATOMIC_REL/ACQ() macros provide memory barriers only in conjunction * with the atomic lXarx/stXcx. sequences below. See Appendix B.2 of Book II * of the architecture manual. */ #ifdef __powerpc64__ -#define __ATOMIC_WMB() __asm __volatile("lwsync" : : : "memory") -#define __ATOMIC_RMB() __asm __volatile("lwsync" : : : "memory") +#define __ATOMIC_REL() __asm __volatile("lwsync" : : : "memory") +#define __ATOMIC_ACQ() __asm __volatile("lwsync" : : : "memory") #else -#define __ATOMIC_WMB() __asm __volatile("eieio" : : : "memory") -#define __ATOMIC_RMB() __asm __volatile("isync" : : : "memory") +#define __ATOMIC_REL() __asm __volatile("lwsync" : : : "memory") +#define __ATOMIC_ACQ() __asm __volatile("isync" : : : "memory") #endif /* @@ -105,13 +110,13 @@ atomic_add_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_add_##type(p, v, t); \ - __ATOMIC_RMB(); \ + __ATOMIC_ACQ(); \ } \ \ static __inline void \ atomic_add_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - __ATOMIC_WMB(); \ + __ATOMIC_REL(); \ __atomic_add_##type(p, v, t); \ } \ /* _ATOMIC_ADD */ @@ -191,13 +196,13 @@ _ATOMIC_ADD(long) atomic_clear_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_clear_##type(p, v, t); \ - __ATOMIC_RMB(); \ + __ATOMIC_ACQ(); \ } \ \ static __inline void \ atomic_clear_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - __ATOMIC_WMB(); \ + __ATOMIC_REL(); \ __atomic_clear_##type(p, v, t); \ } \ /* _ATOMIC_CLEAR */ @@ -293,13 +298,13 @@ _ATOMIC_CLEAR(long) atomic_set_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_set_##type(p, v, t); \ - __ATOMIC_RMB(); \ + __ATOMIC_ACQ(); \ } \ \ static __inline void \ atomic_set_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - __ATOMIC_WMB(); \ + __ATOMIC_REL(); \ __atomic_set_##type(p, v, t); \ } \ /* _ATOMIC_SET */ @@ -379,13 +384,13 @@ _ATOMIC_SET(long) atomic_subtract_acq_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ __atomic_subtract_##type(p, v, t); \ - __ATOMIC_RMB(); \ + __ATOMIC_ACQ(); \ } \ \ static __inline void \ atomic_subtract_rel_##type(volatile u_##type *p, u_##type v) { \ u_##type t; \ - __ATOMIC_WMB(); \ + __ATOMIC_REL(); \ __atomic_subtract_##type(p, v, t); \ } \ /* _ATOMIC_SUBTRACT */ @@ -492,14 +497,14 @@ atomic_load_acq_##TYPE(volatile u_##TYPE u_##TYPE v; \ \ v = *p; \ - rmb(); \ + mb(); \ return (v); \ } \ \ static __inline void \ atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v) \ { \ - wmb(); \ + mb(); \ *p = v; \ } @@ -609,14 +614,14 @@ atomic_cmpset_acq_int(volatile u_int *p, int retval; retval = atomic_cmpset_int(p, cmpval, newval); - __ATOMIC_RMB(); + __ATOMIC_ACQ(); return (retval); } static __inline int atomic_cmpset_rel_int(volatile u_int *p, u_int cmpval, u_int newval) { - wmb(); + __ATOMIC_REL(); return (atomic_cmpset_int(p, cmpval, newval)); } @@ -626,14 +631,14 @@ atomic_cmpset_acq_long(volatile u_long * u_long retval; retval = atomic_cmpset_long(p, cmpval, newval); - __ATOMIC_RMB(); + __ATOMIC_ACQ(); return (retval); } static __inline int atomic_cmpset_rel_long(volatile u_long *p, u_long cmpval, u_long newval) { - wmb(); + __ATOMIC_REL(); return (atomic_cmpset_long(p, cmpval, newval)); } From owner-svn-src-all@FreeBSD.ORG Sun Apr 22 22:39:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 31CD01065673; Sun, 22 Apr 2012 22:39:25 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1CE078FC12; Sun, 22 Apr 2012 22:39:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3MMdOHl063568; Sun, 22 Apr 2012 22:39:24 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3MMdOFt063566; Sun, 22 Apr 2012 22:39:24 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201204222239.q3MMdOFt063566@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 22 Apr 2012 22:39:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234591 - stable/8/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 22:39:25 -0000 Author: bz Date: Sun Apr 22 22:39:24 2012 New Revision: 234591 URL: http://svn.freebsd.org/changeset/base/234591 Log: 8.3-RELEASE was announced; call this STABLE again. Reported by: Adrian Wontroba (aw1 stade.co.uk) on stable Modified: stable/8/sys/conf/newvers.sh Modified: stable/8/sys/conf/newvers.sh ============================================================================== --- stable/8/sys/conf/newvers.sh Sun Apr 22 22:27:35 2012 (r234590) +++ stable/8/sys/conf/newvers.sh Sun Apr 22 22:39:24 2012 (r234591) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="8.3" -BRANCH="PRERELEASE" +BRANCH="STABLE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 00:54:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A932C1065672; Mon, 23 Apr 2012 00:54:06 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94FA68FC0A; Mon, 23 Apr 2012 00:54:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3N0s62n067702; Mon, 23 Apr 2012 00:54:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3N0s6Ep067700; Mon, 23 Apr 2012 00:54:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204230054.q3N0s6Ep067700@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 23 Apr 2012 00:54:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234592 - head/libexec/rtld-elf/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 00:54:06 -0000 Author: nwhitehorn Date: Mon Apr 23 00:54:06 2012 New Revision: 234592 URL: http://svn.freebsd.org/changeset/base/234592 Log: Fix a missed file in r234580: replace the now-obsolete powerpc_mb() with regular mb(). Modified: head/libexec/rtld-elf/powerpc/reloc.c Modified: head/libexec/rtld-elf/powerpc/reloc.c ============================================================================== --- head/libexec/rtld-elf/powerpc/reloc.c Sun Apr 22 22:39:24 2012 (r234591) +++ head/libexec/rtld-elf/powerpc/reloc.c Mon Apr 23 00:54:06 2012 (r234592) @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include "debug.h" @@ -499,7 +499,7 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr jmptab = obj->pltgot + JMPTAB_BASE(N); jmptab[reloff] = target; - powerpc_mb(); /* Order jmptab update before next changes */ + mb(); /* Order jmptab update before next changes */ if (reloff < PLT_EXTENDED_BEGIN) { /* for extended PLT entries, we keep the old code */ From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 00:55:09 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 878A8106566B; Mon, 23 Apr 2012 00:55:09 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id 54F228FC21; Mon, 23 Apr 2012 00:55:09 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0M2W00100QJRSP00@smtpauth1.wiscmail.wisc.edu>; Sun, 22 Apr 2012 19:55:03 -0500 (CDT) Received: from comporellon.tachypleus.net ([unknown] [76.210.67.9]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0M2W00GN0QJP5P10@smtpauth1.wiscmail.wisc.edu>; Sun, 22 Apr 2012 19:55:02 -0500 (CDT) Date: Sun, 22 Apr 2012 19:55:00 -0500 From: Nathan Whitehorn In-reply-to: <4F946D0C.9000900@FreeBSD.org> To: Andreas Tobler Message-id: <4F94A864.1000401@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.210.67.9 X-Spam-PmxInfo: Server=avs-13, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.4.23.4522, SenderIP=76.210.67.9 References: <201204162136.q3GLaurU051667@svn.freebsd.org> <4F946D0C.9000900@FreeBSD.org> User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120418 Thunderbird/10.0.3 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Dimitry Andric Subject: Re: svn commit: r234356 - in head: gnu/lib/csu lib/clang lib/csu/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 00:55:09 -0000 On 04/22/12 15:41, Andreas Tobler wrote: > On 16.04.12 23:36, Dimitry Andric wrote: >> Author: dim >> Date: Mon Apr 16 21:36:55 2012 >> New Revision: 234356 >> URL: http://svn.freebsd.org/changeset/base/234356 >> >> Log: >> Work around an issue on 32-bit PowerPC, where clang executable can >> get >> too big, causing 'relocation truncated to fit' errors at link time. >> >> Reviewed by: nwhitehorn > > > Did you build and boot a 32-bit world with gcc? > > I get an unusable install with this commit, every command segfaults. > This is on a G5 SMP with 32-bit OS, gcc built. > > 64-bit world/kernel did boot. I hadn't tested it before acking the review request. This does appear to break everything for 32-bit PPC. Have you looked into why? Can this be reverted in the interim? -Nathan From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 03:38:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 721E4106564A; Mon, 23 Apr 2012 03:38:41 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B59D8FC0A; Mon, 23 Apr 2012 03:38:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3N3cf3N073044; Mon, 23 Apr 2012 03:38:41 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3N3cf7u073041; Mon, 23 Apr 2012 03:38:41 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201204230338.q3N3cf7u073041@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 23 Apr 2012 03:38:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234593 - in stable/9/sys: dev/bce i386/conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 03:38:41 -0000 Author: yongari Date: Mon Apr 23 03:38:40 2012 New Revision: 234593 URL: http://svn.freebsd.org/changeset/base/234593 Log: MFC r234121: Back out r228476. r228476 fixed superfluous link UP/DOWN messages but broke IPMI access during boot. It's not clear why r228476 breaks IPMI and should be revisited. Reported by: Paul Guyot ieee dot org > Modified: stable/9/sys/dev/bce/if_bce.c stable/9/sys/dev/bce/if_bcereg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/dev/bce/if_bce.c ============================================================================== --- stable/9/sys/dev/bce/if_bce.c Mon Apr 23 00:54:06 2012 (r234592) +++ stable/9/sys/dev/bce/if_bce.c Mon Apr 23 03:38:40 2012 (r234593) @@ -1982,7 +1982,6 @@ static void bce_miibus_statchg(device_t dev) { struct bce_softc *sc; - struct ifnet *ifp; struct mii_data *mii; int val; @@ -1990,57 +1989,42 @@ bce_miibus_statchg(device_t dev) DBENTER(BCE_VERBOSE_PHY); - ifp = sc->bce_ifp; mii = device_get_softc(sc->bce_miibus); - if (mii == NULL || ifp == NULL || - (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) - return; - sc->bce_link_up = FALSE; val = REG_RD(sc, BCE_EMAC_MODE); val &= ~(BCE_EMAC_MODE_PORT | BCE_EMAC_MODE_HALF_DUPLEX | BCE_EMAC_MODE_MAC_LOOP | BCE_EMAC_MODE_FORCE_LINK | BCE_EMAC_MODE_25G); /* Set MII or GMII interface based on the PHY speed. */ - if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == - (IFM_ACTIVE | IFM_AVALID)) { - switch (IFM_SUBTYPE(mii->mii_media_active)) { - case IFM_10_T: - if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { - DBPRINT(sc, BCE_INFO_PHY, - "Enabling 10Mb interface.\n"); - val |= BCE_EMAC_MODE_PORT_MII_10; - sc->bce_link_up = TRUE; - break; - } - /* FALLTHROUGH */ - case IFM_100_TX: - DBPRINT(sc, BCE_INFO_PHY, "Enabling MII interface.\n"); - val |= BCE_EMAC_MODE_PORT_MII; - sc->bce_link_up = TRUE; - break; - case IFM_2500_SX: - DBPRINT(sc, BCE_INFO_PHY, "Enabling 2.5G MAC mode.\n"); - val |= BCE_EMAC_MODE_25G; - /* FALLTHROUGH */ - case IFM_1000_T: - case IFM_1000_SX: - DBPRINT(sc, BCE_INFO_PHY, "Enabling GMII interface.\n"); - val |= BCE_EMAC_MODE_PORT_GMII; - sc->bce_link_up = TRUE; - if (bce_verbose || bootverbose) - BCE_PRINTF("Gigabit link up!\n"); - break; - default: - DBPRINT(sc, BCE_INFO_PHY, "Unknown link speed.\n"); + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_10_T: + if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { + DBPRINT(sc, BCE_INFO_PHY, + "Enabling 10Mb interface.\n"); + val |= BCE_EMAC_MODE_PORT_MII_10; break; } + /* fall-through */ + case IFM_100_TX: + DBPRINT(sc, BCE_INFO_PHY, "Enabling MII interface.\n"); + val |= BCE_EMAC_MODE_PORT_MII; + break; + case IFM_2500_SX: + DBPRINT(sc, BCE_INFO_PHY, "Enabling 2.5G MAC mode.\n"); + val |= BCE_EMAC_MODE_25G; + /* fall-through */ + case IFM_1000_T: + case IFM_1000_SX: + DBPRINT(sc, BCE_INFO_PHY, "Enabling GMII interface.\n"); + val |= BCE_EMAC_MODE_PORT_GMII; + break; + default: + DBPRINT(sc, BCE_INFO_PHY, "Unknown link speed, enabling " + "default GMII interface.\n"); + val |= BCE_EMAC_MODE_PORT_GMII; } - if (sc->bce_link_up == FALSE) - return; - /* Set half or full duplex based on PHY settings. */ if ((mii->mii_media_active & IFM_GMASK) == IFM_HDX) { DBPRINT(sc, BCE_INFO_PHY, @@ -2052,7 +2036,7 @@ bce_miibus_statchg(device_t dev) REG_WR(sc, BCE_EMAC_MODE, val); - if ((mii->mii_media_active & IFM_ETH_RXPAUSE) != 0) { + if ((mii->mii_media_active & IFM_ETH_RXPAUSE) != 0) { DBPRINT(sc, BCE_INFO_PHY, "%s(): Enabling RX flow control.\n", __FUNCTION__); BCE_SETBIT(sc, BCE_EMAC_RX_MODE, BCE_EMAC_RX_MODE_FLOW_EN); @@ -2062,7 +2046,7 @@ bce_miibus_statchg(device_t dev) BCE_CLRBIT(sc, BCE_EMAC_RX_MODE, BCE_EMAC_RX_MODE_FLOW_EN); } - if ((mii->mii_media_active & IFM_ETH_TXPAUSE) != 0) { + if ((mii->mii_media_active & IFM_ETH_TXPAUSE) != 0) { DBPRINT(sc, BCE_INFO_PHY, "%s(): Enabling TX flow control.\n", __FUNCTION__); BCE_SETBIT(sc, BCE_EMAC_TX_MODE, BCE_EMAC_TX_MODE_FLOW_EN); @@ -6222,11 +6206,15 @@ bce_phy_intr(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_PHY, "%s(): Link is now DOWN.\n", __FUNCTION__); } + /* - * Link state changed, allow tick routine to update - * the state baased on actual media state. + * Assume link is down and allow + * tick routine to update the state + * based on the actual media state. */ - sc->bce_link_tick = TRUE; + sc->bce_link_up = FALSE; + callout_stop(&sc->bce_tick_callout); + bce_tick(sc); } /* Acknowledge the link change interrupt. */ @@ -6910,13 +6898,12 @@ bce_init_locked(struct bce_softc *sc) /* Enable host interrupts. */ bce_enable_intr(sc, 1); + bce_ifmedia_upd_locked(ifp); + /* Let the OS know the driver is up and running. */ ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - sc->bce_link_tick = TRUE; - bce_ifmedia_upd_locked(ifp); - callout_reset(&sc->bce_tick_callout, hz, bce_tick, sc); bce_init_locked_exit: @@ -8212,19 +8199,31 @@ bce_tick(void *xsc) bce_watchdog(sc); /* If link is up already up then we're done. */ - if (sc->bce_link_tick == FALSE && sc->bce_link_up == TRUE) + if (sc->bce_link_up == TRUE) goto bce_tick_exit; /* Link is down. Check what the PHY's doing. */ mii = device_get_softc(sc->bce_miibus); mii_tick(mii); - sc->bce_link_tick = FALSE; - /* Now that link is up, handle any outstanding TX traffic. */ - if (sc->bce_link_up == TRUE && !IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + /* Check if the link has come up. */ + if ((mii->mii_media_status & IFM_ACTIVE) && + (IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE)) { DBPRINT(sc, BCE_VERBOSE_MISC, - "%s(): Found pending TX traffic.\n", __FUNCTION__); - bce_start_locked(ifp); + "%s(): Link up!\n", __FUNCTION__); + sc->bce_link_up = TRUE; + if ((IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T || + IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX || + IFM_SUBTYPE(mii->mii_media_active) == IFM_2500_SX) && + (bce_verbose || bootverbose)) + BCE_PRINTF("Gigabit link up!\n"); + + /* Now that link is up, handle any outstanding TX traffic. */ + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + DBPRINT(sc, BCE_VERBOSE_MISC, "%s(): Found " + "pending TX traffic.\n", __FUNCTION__); + bce_start_locked(ifp); + } } bce_tick_exit: Modified: stable/9/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/9/sys/dev/bce/if_bcereg.h Mon Apr 23 00:54:06 2012 (r234592) +++ stable/9/sys/dev/bce/if_bcereg.h Mon Apr 23 03:38:40 2012 (r234593) @@ -6560,7 +6560,6 @@ struct bce_softc u16 pg_prod; u16 pg_cons; - int bce_link_tick; int bce_link_up; struct callout bce_tick_callout; struct callout bce_pulse_callout; From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 03:40:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4E7D3106566C; Mon, 23 Apr 2012 03:40:40 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37E928FC15; Mon, 23 Apr 2012 03:40:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3N3eevP073144; Mon, 23 Apr 2012 03:40:40 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3N3edxi073141; Mon, 23 Apr 2012 03:40:39 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201204230340.q3N3edxi073141@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 23 Apr 2012 03:40:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234594 - in stable/8/sys: dev/bce i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 03:40:40 -0000 Author: yongari Date: Mon Apr 23 03:40:39 2012 New Revision: 234594 URL: http://svn.freebsd.org/changeset/base/234594 Log: MFC r234121: Back out r228476. r228476 fixed superfluous link UP/DOWN messages but broke IPMI access during boot. It's not clear why r228476 breaks IPMI and should be revisited. Reported by: Paul Guyot ieee dot org > Modified: stable/8/sys/dev/bce/if_bce.c stable/8/sys/dev/bce/if_bcereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/dev/bce/if_bce.c ============================================================================== --- stable/8/sys/dev/bce/if_bce.c Mon Apr 23 03:38:40 2012 (r234593) +++ stable/8/sys/dev/bce/if_bce.c Mon Apr 23 03:40:39 2012 (r234594) @@ -1982,7 +1982,6 @@ static void bce_miibus_statchg(device_t dev) { struct bce_softc *sc; - struct ifnet *ifp; struct mii_data *mii; int val; @@ -1990,57 +1989,42 @@ bce_miibus_statchg(device_t dev) DBENTER(BCE_VERBOSE_PHY); - ifp = sc->bce_ifp; mii = device_get_softc(sc->bce_miibus); - if (mii == NULL || ifp == NULL || - (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) - return; - sc->bce_link_up = FALSE; val = REG_RD(sc, BCE_EMAC_MODE); val &= ~(BCE_EMAC_MODE_PORT | BCE_EMAC_MODE_HALF_DUPLEX | BCE_EMAC_MODE_MAC_LOOP | BCE_EMAC_MODE_FORCE_LINK | BCE_EMAC_MODE_25G); /* Set MII or GMII interface based on the PHY speed. */ - if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == - (IFM_ACTIVE | IFM_AVALID)) { - switch (IFM_SUBTYPE(mii->mii_media_active)) { - case IFM_10_T: - if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { - DBPRINT(sc, BCE_INFO_PHY, - "Enabling 10Mb interface.\n"); - val |= BCE_EMAC_MODE_PORT_MII_10; - sc->bce_link_up = TRUE; - break; - } - /* FALLTHROUGH */ - case IFM_100_TX: - DBPRINT(sc, BCE_INFO_PHY, "Enabling MII interface.\n"); - val |= BCE_EMAC_MODE_PORT_MII; - sc->bce_link_up = TRUE; - break; - case IFM_2500_SX: - DBPRINT(sc, BCE_INFO_PHY, "Enabling 2.5G MAC mode.\n"); - val |= BCE_EMAC_MODE_25G; - /* FALLTHROUGH */ - case IFM_1000_T: - case IFM_1000_SX: - DBPRINT(sc, BCE_INFO_PHY, "Enabling GMII interface.\n"); - val |= BCE_EMAC_MODE_PORT_GMII; - sc->bce_link_up = TRUE; - if (bce_verbose || bootverbose) - BCE_PRINTF("Gigabit link up!\n"); - break; - default: - DBPRINT(sc, BCE_INFO_PHY, "Unknown link speed.\n"); + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_10_T: + if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { + DBPRINT(sc, BCE_INFO_PHY, + "Enabling 10Mb interface.\n"); + val |= BCE_EMAC_MODE_PORT_MII_10; break; } + /* fall-through */ + case IFM_100_TX: + DBPRINT(sc, BCE_INFO_PHY, "Enabling MII interface.\n"); + val |= BCE_EMAC_MODE_PORT_MII; + break; + case IFM_2500_SX: + DBPRINT(sc, BCE_INFO_PHY, "Enabling 2.5G MAC mode.\n"); + val |= BCE_EMAC_MODE_25G; + /* fall-through */ + case IFM_1000_T: + case IFM_1000_SX: + DBPRINT(sc, BCE_INFO_PHY, "Enabling GMII interface.\n"); + val |= BCE_EMAC_MODE_PORT_GMII; + break; + default: + DBPRINT(sc, BCE_INFO_PHY, "Unknown link speed, enabling " + "default GMII interface.\n"); + val |= BCE_EMAC_MODE_PORT_GMII; } - if (sc->bce_link_up == FALSE) - return; - /* Set half or full duplex based on PHY settings. */ if ((mii->mii_media_active & IFM_GMASK) == IFM_HDX) { DBPRINT(sc, BCE_INFO_PHY, @@ -2052,7 +2036,7 @@ bce_miibus_statchg(device_t dev) REG_WR(sc, BCE_EMAC_MODE, val); - if ((mii->mii_media_active & IFM_ETH_RXPAUSE) != 0) { + if ((mii->mii_media_active & IFM_ETH_RXPAUSE) != 0) { DBPRINT(sc, BCE_INFO_PHY, "%s(): Enabling RX flow control.\n", __FUNCTION__); BCE_SETBIT(sc, BCE_EMAC_RX_MODE, BCE_EMAC_RX_MODE_FLOW_EN); @@ -2062,7 +2046,7 @@ bce_miibus_statchg(device_t dev) BCE_CLRBIT(sc, BCE_EMAC_RX_MODE, BCE_EMAC_RX_MODE_FLOW_EN); } - if ((mii->mii_media_active & IFM_ETH_TXPAUSE) != 0) { + if ((mii->mii_media_active & IFM_ETH_TXPAUSE) != 0) { DBPRINT(sc, BCE_INFO_PHY, "%s(): Enabling TX flow control.\n", __FUNCTION__); BCE_SETBIT(sc, BCE_EMAC_TX_MODE, BCE_EMAC_TX_MODE_FLOW_EN); @@ -6222,11 +6206,15 @@ bce_phy_intr(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_PHY, "%s(): Link is now DOWN.\n", __FUNCTION__); } + /* - * Link state changed, allow tick routine to update - * the state baased on actual media state. + * Assume link is down and allow + * tick routine to update the state + * based on the actual media state. */ - sc->bce_link_tick = TRUE; + sc->bce_link_up = FALSE; + callout_stop(&sc->bce_tick_callout); + bce_tick(sc); } /* Acknowledge the link change interrupt. */ @@ -6910,13 +6898,12 @@ bce_init_locked(struct bce_softc *sc) /* Enable host interrupts. */ bce_enable_intr(sc, 1); + bce_ifmedia_upd_locked(ifp); + /* Let the OS know the driver is up and running. */ ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - sc->bce_link_tick = TRUE; - bce_ifmedia_upd_locked(ifp); - callout_reset(&sc->bce_tick_callout, hz, bce_tick, sc); bce_init_locked_exit: @@ -8212,19 +8199,31 @@ bce_tick(void *xsc) bce_watchdog(sc); /* If link is up already up then we're done. */ - if (sc->bce_link_tick == FALSE && sc->bce_link_up == TRUE) + if (sc->bce_link_up == TRUE) goto bce_tick_exit; /* Link is down. Check what the PHY's doing. */ mii = device_get_softc(sc->bce_miibus); mii_tick(mii); - sc->bce_link_tick = FALSE; - /* Now that link is up, handle any outstanding TX traffic. */ - if (sc->bce_link_up == TRUE && !IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + /* Check if the link has come up. */ + if ((mii->mii_media_status & IFM_ACTIVE) && + (IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE)) { DBPRINT(sc, BCE_VERBOSE_MISC, - "%s(): Found pending TX traffic.\n", __FUNCTION__); - bce_start_locked(ifp); + "%s(): Link up!\n", __FUNCTION__); + sc->bce_link_up = TRUE; + if ((IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T || + IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX || + IFM_SUBTYPE(mii->mii_media_active) == IFM_2500_SX) && + (bce_verbose || bootverbose)) + BCE_PRINTF("Gigabit link up!\n"); + + /* Now that link is up, handle any outstanding TX traffic. */ + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + DBPRINT(sc, BCE_VERBOSE_MISC, "%s(): Found " + "pending TX traffic.\n", __FUNCTION__); + bce_start_locked(ifp); + } } bce_tick_exit: Modified: stable/8/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/8/sys/dev/bce/if_bcereg.h Mon Apr 23 03:38:40 2012 (r234593) +++ stable/8/sys/dev/bce/if_bcereg.h Mon Apr 23 03:40:39 2012 (r234594) @@ -6560,7 +6560,6 @@ struct bce_softc u16 pg_prod; u16 pg_cons; - int bce_link_tick; int bce_link_up; struct callout bce_tick_callout; struct callout bce_pulse_callout; From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 03:42:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CFEC1065670; Mon, 23 Apr 2012 03:42:24 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0FFDD8FC1E; Mon, 23 Apr 2012 03:42:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3N3gN2W073233; Mon, 23 Apr 2012 03:42:23 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3N3gNE2073230; Mon, 23 Apr 2012 03:42:23 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201204230342.q3N3gNE2073230@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 23 Apr 2012 03:42:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234595 - stable/7/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 03:42:24 -0000 Author: yongari Date: Mon Apr 23 03:42:23 2012 New Revision: 234595 URL: http://svn.freebsd.org/changeset/base/234595 Log: MFC r234121: Back out r228476. r228476 fixed superfluous link UP/DOWN messages but broke IPMI access during boot. It's not clear why r228476 breaks IPMI and should be revisited. Reported by: Paul Guyot ieee dot org > Modified: stable/7/sys/dev/bce/if_bce.c stable/7/sys/dev/bce/if_bcereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/bce/if_bce.c ============================================================================== --- stable/7/sys/dev/bce/if_bce.c Mon Apr 23 03:40:39 2012 (r234594) +++ stable/7/sys/dev/bce/if_bce.c Mon Apr 23 03:42:23 2012 (r234595) @@ -1986,7 +1986,6 @@ static void bce_miibus_statchg(device_t dev) { struct bce_softc *sc; - struct ifnet *ifp; struct mii_data *mii; int val; @@ -1994,57 +1993,42 @@ bce_miibus_statchg(device_t dev) DBENTER(BCE_VERBOSE_PHY); - ifp = sc->bce_ifp; mii = device_get_softc(sc->bce_miibus); - if (mii == NULL || ifp == NULL || - (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) - return; - sc->bce_link_up = FALSE; val = REG_RD(sc, BCE_EMAC_MODE); val &= ~(BCE_EMAC_MODE_PORT | BCE_EMAC_MODE_HALF_DUPLEX | BCE_EMAC_MODE_MAC_LOOP | BCE_EMAC_MODE_FORCE_LINK | BCE_EMAC_MODE_25G); /* Set MII or GMII interface based on the PHY speed. */ - if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == - (IFM_ACTIVE | IFM_AVALID)) { - switch (IFM_SUBTYPE(mii->mii_media_active)) { - case IFM_10_T: - if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { - DBPRINT(sc, BCE_INFO_PHY, - "Enabling 10Mb interface.\n"); - val |= BCE_EMAC_MODE_PORT_MII_10; - sc->bce_link_up = TRUE; - break; - } - /* FALLTHROUGH */ - case IFM_100_TX: - DBPRINT(sc, BCE_INFO_PHY, "Enabling MII interface.\n"); - val |= BCE_EMAC_MODE_PORT_MII; - sc->bce_link_up = TRUE; - break; - case IFM_2500_SX: - DBPRINT(sc, BCE_INFO_PHY, "Enabling 2.5G MAC mode.\n"); - val |= BCE_EMAC_MODE_25G; - /* FALLTHROUGH */ - case IFM_1000_T: - case IFM_1000_SX: - DBPRINT(sc, BCE_INFO_PHY, "Enabling GMII interface.\n"); - val |= BCE_EMAC_MODE_PORT_GMII; - sc->bce_link_up = TRUE; - if (bce_verbose || bootverbose) - BCE_PRINTF("Gigabit link up!\n"); - break; - default: - DBPRINT(sc, BCE_INFO_PHY, "Unknown link speed.\n"); + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_10_T: + if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { + DBPRINT(sc, BCE_INFO_PHY, + "Enabling 10Mb interface.\n"); + val |= BCE_EMAC_MODE_PORT_MII_10; break; } + /* fall-through */ + case IFM_100_TX: + DBPRINT(sc, BCE_INFO_PHY, "Enabling MII interface.\n"); + val |= BCE_EMAC_MODE_PORT_MII; + break; + case IFM_2500_SX: + DBPRINT(sc, BCE_INFO_PHY, "Enabling 2.5G MAC mode.\n"); + val |= BCE_EMAC_MODE_25G; + /* fall-through */ + case IFM_1000_T: + case IFM_1000_SX: + DBPRINT(sc, BCE_INFO_PHY, "Enabling GMII interface.\n"); + val |= BCE_EMAC_MODE_PORT_GMII; + break; + default: + DBPRINT(sc, BCE_INFO_PHY, "Unknown link speed, enabling " + "default GMII interface.\n"); + val |= BCE_EMAC_MODE_PORT_GMII; } - if (sc->bce_link_up == FALSE) - return; - /* Set half or full duplex based on PHY settings. */ if ((mii->mii_media_active & IFM_GMASK) == IFM_HDX) { DBPRINT(sc, BCE_INFO_PHY, @@ -2056,7 +2040,7 @@ bce_miibus_statchg(device_t dev) REG_WR(sc, BCE_EMAC_MODE, val); - if ((mii->mii_media_active & IFM_ETH_RXPAUSE) != 0) { + if ((mii->mii_media_active & IFM_ETH_RXPAUSE) != 0) { DBPRINT(sc, BCE_INFO_PHY, "%s(): Enabling RX flow control.\n", __FUNCTION__); BCE_SETBIT(sc, BCE_EMAC_RX_MODE, BCE_EMAC_RX_MODE_FLOW_EN); @@ -2066,7 +2050,7 @@ bce_miibus_statchg(device_t dev) BCE_CLRBIT(sc, BCE_EMAC_RX_MODE, BCE_EMAC_RX_MODE_FLOW_EN); } - if ((mii->mii_media_active & IFM_ETH_TXPAUSE) != 0) { + if ((mii->mii_media_active & IFM_ETH_TXPAUSE) != 0) { DBPRINT(sc, BCE_INFO_PHY, "%s(): Enabling TX flow control.\n", __FUNCTION__); BCE_SETBIT(sc, BCE_EMAC_TX_MODE, BCE_EMAC_TX_MODE_FLOW_EN); @@ -6226,11 +6210,15 @@ bce_phy_intr(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_PHY, "%s(): Link is now DOWN.\n", __FUNCTION__); } + /* - * Link state changed, allow tick routine to update - * the state baased on actual media state. + * Assume link is down and allow + * tick routine to update the state + * based on the actual media state. */ - sc->bce_link_tick = TRUE; + sc->bce_link_up = FALSE; + callout_stop(&sc->bce_tick_callout); + bce_tick(sc); } /* Acknowledge the link change interrupt. */ @@ -6914,13 +6902,12 @@ bce_init_locked(struct bce_softc *sc) /* Enable host interrupts. */ bce_enable_intr(sc, 1); + bce_ifmedia_upd_locked(ifp); + /* Let the OS know the driver is up and running. */ ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - sc->bce_link_tick = TRUE; - bce_ifmedia_upd_locked(ifp); - callout_reset(&sc->bce_tick_callout, hz, bce_tick, sc); bce_init_locked_exit: @@ -8216,19 +8203,31 @@ bce_tick(void *xsc) bce_watchdog(sc); /* If link is up already up then we're done. */ - if (sc->bce_link_tick == FALSE && sc->bce_link_up == TRUE) + if (sc->bce_link_up == TRUE) goto bce_tick_exit; /* Link is down. Check what the PHY's doing. */ mii = device_get_softc(sc->bce_miibus); mii_tick(mii); - sc->bce_link_tick = FALSE; - /* Now that link is up, handle any outstanding TX traffic. */ - if (sc->bce_link_up == TRUE && !IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + /* Check if the link has come up. */ + if ((mii->mii_media_status & IFM_ACTIVE) && + (IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE)) { DBPRINT(sc, BCE_VERBOSE_MISC, - "%s(): Found pending TX traffic.\n", __FUNCTION__); - bce_start_locked(ifp); + "%s(): Link up!\n", __FUNCTION__); + sc->bce_link_up = TRUE; + if ((IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T || + IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX || + IFM_SUBTYPE(mii->mii_media_active) == IFM_2500_SX) && + (bce_verbose || bootverbose)) + BCE_PRINTF("Gigabit link up!\n"); + + /* Now that link is up, handle any outstanding TX traffic. */ + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + DBPRINT(sc, BCE_VERBOSE_MISC, "%s(): Found " + "pending TX traffic.\n", __FUNCTION__); + bce_start_locked(ifp); + } } bce_tick_exit: Modified: stable/7/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/7/sys/dev/bce/if_bcereg.h Mon Apr 23 03:40:39 2012 (r234594) +++ stable/7/sys/dev/bce/if_bcereg.h Mon Apr 23 03:42:23 2012 (r234595) @@ -6557,7 +6557,6 @@ struct bce_softc u16 pg_prod; u16 pg_cons; - int bce_link_tick; int bce_link_up; struct callout bce_tick_callout; struct callout bce_pulse_callout; From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 05:08:53 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A81E106564A; Mon, 23 Apr 2012 05:08:53 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id 9C3018FC16; Mon, 23 Apr 2012 05:08:52 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id q3N58hmu029151; Mon, 23 Apr 2012 07:08:46 +0200 (CEST) (envelope-from andreast@FreeBSD.org) Message-ID: <4F94E3DB.4000209@FreeBSD.org> Date: Mon, 23 Apr 2012 07:08:43 +0200 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Nathan Whitehorn References: <201204162136.q3GLaurU051667@svn.freebsd.org> <4F946D0C.9000900@FreeBSD.org> <4F94A864.1000401@freebsd.org> In-Reply-To: <4F94A864.1000401@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Dimitry Andric Subject: Re: svn commit: r234356 - in head: gnu/lib/csu lib/clang lib/csu/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 05:08:53 -0000 On 23.04.12 02:55, Nathan Whitehorn wrote: > On 04/22/12 15:41, Andreas Tobler wrote: >> On 16.04.12 23:36, Dimitry Andric wrote: >>> Author: dim >>> Date: Mon Apr 16 21:36:55 2012 >>> New Revision: 234356 >>> URL: http://svn.freebsd.org/changeset/base/234356 >>> >>> Log: >>> Work around an issue on 32-bit PowerPC, where clang executable can >>> get >>> too big, causing 'relocation truncated to fit' errors at link time. >>> >>> Reviewed by: nwhitehorn >> >> >> Did you build and boot a 32-bit world with gcc? >> >> I get an unusable install with this commit, every command segfaults. >> This is on a G5 SMP with 32-bit OS, gcc built. >> >> 64-bit world/kernel did boot. > > I hadn't tested it before acking the review request. This does appear to > break everything for 32-bit PPC. Have you looked into why? Can this be > reverted in the interim? I noticed this last night. It took some time to bisect. And my target is unbootable atm. I will investigate later this evening. Andreas From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 06:33:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE94B106566B; Mon, 23 Apr 2012 06:33:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C03D68FC08; Mon, 23 Apr 2012 06:33:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3N6XRNR078598; Mon, 23 Apr 2012 06:33:27 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3N6XRsB078594; Mon, 23 Apr 2012 06:33:27 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201204230633.q3N6XRsB078594@svn.freebsd.org> From: Dimitry Andric Date: Mon, 23 Apr 2012 06:33:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234596 - in head: gnu/lib/csu lib/clang lib/csu/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 06:33:28 -0000 Author: dim Date: Mon Apr 23 06:33:27 2012 New Revision: 234596 URL: http://svn.freebsd.org/changeset/base/234596 Log: Revert r234356 for now, as it leads to run-time problems on 32-bit PowerPC. Note this will break world. Reported by: andreast Pointy hat to: dim Modified: head/gnu/lib/csu/Makefile head/lib/clang/clang.build.mk head/lib/csu/powerpc/Makefile Modified: head/gnu/lib/csu/Makefile ============================================================================== --- head/gnu/lib/csu/Makefile Mon Apr 23 03:42:23 2012 (r234595) +++ head/gnu/lib/csu/Makefile Mon Apr 23 06:33:27 2012 (r234596) @@ -34,7 +34,6 @@ CFLAGS+= -include osreldate.h .if ${MACHINE_CPUARCH} == "powerpc" TGTOBJS= crtsavres.o SRCS+= crtsavres.asm -CFLAGS+= -mlongcall .endif .if ${MACHINE_CPUARCH} == "sparc64" TGTOBJS= crtfastmath.o Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Mon Apr 23 03:42:23 2012 (r234595) +++ head/lib/clang/clang.build.mk Mon Apr 23 06:33:27 2012 (r234596) @@ -11,12 +11,6 @@ CFLAGS+=-I${LLVM_SRCS}/include -I${CLANG # LLVM is not strict aliasing safe as of 12/31/2011 CFLAGS+= -fno-strict-aliasing -# Work around an issue on 32-bit PowerPC, where the clang executable can get -# too big, causing 'relocation truncated to fit' errors at link time. -.if ${MACHINE_ARCH} == "powerpc" -CFLAGS+=-mlongcall -.endif - TARGET_ARCH?= ${MACHINE_ARCH} CFLAGS+=-DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0\" Modified: head/lib/csu/powerpc/Makefile ============================================================================== --- head/lib/csu/powerpc/Makefile Mon Apr 23 03:42:23 2012 (r234595) +++ head/lib/csu/powerpc/Makefile Mon Apr 23 06:33:27 2012 (r234596) @@ -6,8 +6,7 @@ SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include \ - -mlongcall + -I${.CURDIR}/../../libc/include all: ${OBJS} From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 06:34:47 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E055C1065675; Mon, 23 Apr 2012 06:34:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 99F1B8FC16; Mon, 23 Apr 2012 06:34:47 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:60a9:25db:2120:9de1] (unknown [IPv6:2001:7b8:3a7:0:60a9:25db:2120:9de1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id DE4525C37; Mon, 23 Apr 2012 08:34:46 +0200 (CEST) Message-ID: <4F94F807.5040209@FreeBSD.org> Date: Mon, 23 Apr 2012 08:34:47 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120410 Thunderbird/12.0 MIME-Version: 1.0 To: Nathan Whitehorn References: <201204162136.q3GLaurU051667@svn.freebsd.org> <4F946D0C.9000900@FreeBSD.org> <4F94A864.1000401@freebsd.org> In-Reply-To: <4F94A864.1000401@freebsd.org> X-Enigmail-Version: 1.4.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Andreas Tobler Subject: Re: svn commit: r234356 - in head: gnu/lib/csu lib/clang lib/csu/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 06:34:48 -0000 On 2012-04-23 02:55, Nathan Whitehorn wrote: > On 04/22/12 15:41, Andreas Tobler wrote: >> On 16.04.12 23:36, Dimitry Andric wrote: >>> Author: dim >>> Date: Mon Apr 16 21:36:55 2012 >>> New Revision: 234356 >>> URL: http://svn.freebsd.org/changeset/base/234356 >>> >>> Log: >>> Work around an issue on 32-bit PowerPC, where clang executable can >>> get >>> too big, causing 'relocation truncated to fit' errors at link time. >>> >>> Reviewed by: nwhitehorn >> >> >> Did you build and boot a 32-bit world with gcc? >> >> I get an unusable install with this commit, every command segfaults. >> This is on a G5 SMP with 32-bit OS, gcc built. >> >> 64-bit world/kernel did boot. > > I hadn't tested it before acking the review request. This does appear to > break everything for 32-bit PPC. Have you looked into why? Can this be > reverted in the interim? Reverted in r234596. Sorry for the breakage. Now world won't build for powrpc, but WITHOUT_CLANG should solve that. From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 07:15:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BC4E11065670; Mon, 23 Apr 2012 07:15:15 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3FBC8FC08; Mon, 23 Apr 2012 07:15:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3N7FFWu079915; Mon, 23 Apr 2012 07:15:15 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3N7FFl4079907; Mon, 23 Apr 2012 07:15:15 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201204230715.q3N7FFl4079907@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Mon, 23 Apr 2012 07:15:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234597 - in stable/9: sbin/ipfw sys/netinet sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 07:15:15 -0000 Author: melifaro Date: Mon Apr 23 07:15:15 2012 New Revision: 234597 URL: http://svn.freebsd.org/changeset/base/234597 Log: MFC r232865, r232868, r233478 - Add ipfw eXtended tables permitting radix to be used for any kind of keys. - Add support for IPv6 and interface extended tables - Make number of tables to be changed in runtime in range 0..65534. - Use IP_FW3 opcode for all new extended table cmds No ABI changes are introduced. Old userland will see valid tables for IPv4 tables and no entries otherwise. Flush works for any table. IP_FW3 socket option is used to encapsulate all new opcodes: /* IP_FW3 header/opcodes */ typedef struct _ip_fw3_opheader { uint16_t opcode; /* Operation opcode */ uint16_t reserved[3]; /* Align to 64-bit boundary */ } ip_fw3_opheader; New opcodes added: IP_FW_TABLE_XADD, IP_FW_TABLE_XDEL, IP_FW_TABLE_XGETSIZE, IP_FW_TABLE_XLIST ipfw(8) table argument parsing behavior is changed: 'ipfw table 999 add host' now assumes 'host' to be interface name instead of hostname. New tunable: net.inet.ip.fw.tables_max controls number of table supported by ipfw in given VNET instance. 128 is still the default value. Sysctl change: net.inet.ip.fw.tables_max is now read-write. New syntax: ipfw add skipto tablearg ip from any to any via table(42) in ipfw add skipto tablearg ip from any to any via table(4242) out This is a bit hackish, special interface name '\1' is used to signal interface table number is passed in p.glob field. Sponsored by Yandex LLC Approved by: kib(mentor) Modified: stable/9/sbin/ipfw/ipfw.8 stable/9/sbin/ipfw/ipfw2.c stable/9/sys/netinet/ip_fw.h stable/9/sys/netinet/ipfw/ip_fw2.c stable/9/sys/netinet/ipfw/ip_fw_private.h stable/9/sys/netinet/ipfw/ip_fw_sockopt.c stable/9/sys/netinet/ipfw/ip_fw_table.c Directory Properties: stable/9/sbin/ipfw/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sbin/ipfw/ipfw.8 ============================================================================== --- stable/9/sbin/ipfw/ipfw.8 Mon Apr 23 06:33:27 2012 (r234596) +++ stable/9/sbin/ipfw/ipfw.8 Mon Apr 23 07:15:15 2012 (r234597) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 6, 2012 +.Dd March 9, 2012 .Dt IPFW 8 .Os .Sh NAME @@ -1539,7 +1539,7 @@ and they are always printed as hexadecim option is used, in which case symbolic resolution will be attempted). .It Cm proto Ar protocol Matches packets with the corresponding IP protocol. -.It Cm recv | xmit | via Brq Ar ifX | Ar if Ns Cm * | Ar ipno | Ar any +.It Cm recv | xmit | via Brq Ar ifX | Ar if Ns Cm * | Ar table Ns Pq Ar number Ns Op , Ns Ar value | Ar ipno | Ar any Matches packets received, transmitted or going through, respectively, the interface specified by exact name .Ns No ( Ar ifX Ns No ), @@ -1738,22 +1738,21 @@ connected networks instead of all source .El .Sh LOOKUP TABLES Lookup tables are useful to handle large sparse sets of -addresses or other search keys (e.g. ports, jail IDs). -In the rest of this section we will use the term ``address'' -to mean any unsigned value of up to 32-bit. -There may be up to 128 different lookup tables, numbered 0 to 127. +addresses or other search keys (e.g. ports, jail IDs, interface names). +In the rest of this section we will use the term ``address''. +There may be up to 4096 different lookup tables, numbered 0 to 4095. .Pp Each entry is represented by an .Ar addr Ns Op / Ns Ar masklen and will match all addresses with base .Ar addr -(specified as an IP address, a hostname or an unsigned integer) +(specified as an IPv4/IPv6 address, a hostname or an unsigned integer) and mask width of .Ar masklen bits. If .Ar masklen -is not specified, it defaults to 32. +is not specified, it defaults to 32 for IPv4 and 128 for IPv6. When looking up an IP address in a table, the most specific entry will match. Associated with each entry is a 32-bit unsigned @@ -1776,7 +1775,8 @@ Internally, each table is stored in a Ra the routing table (see .Xr route 4 ) . .Pp -Lookup tables currently support only ports, jail IDs and IPv4 addresses. +Lookup tables currently support only ports, jail IDs, IPv4/IPv6 addresses +and interface names. Wildcards is not supported for interface names. .Pp The .Cm tablearg @@ -2579,6 +2579,22 @@ instances. See .Sx SYSCTL VARIABLES for more info. +.Sh LOADER TUNABLES +Tunables can be set in +.Xr loader 8 +prompt, +.Xr loader.conf 5 +or +.Xr kenv 1 +before ipfw module gets loaded. +.Bl -tag -width indent +.It Va net.inet.ip.fw.default_to_accept: No 0 +Defines ipfw last rule behavior. This value overrides +.Cd "options IPFW_DEFAULT_TO_(ACCEPT|DENY)" +from kernel configuration file. +.It Va net.inet.ip.fw.tables_max: No 128 +Defines number of tables available in ipfw. Number cannot exceed 65534. +.El .Sh SYSCTL VARIABLES A set of .Xr sysctl 8 @@ -2837,7 +2853,7 @@ node is not passed though the firewall a Otherwise, after an action, the packet is reinjected into the firewall at the next rule. .It Va net.inet.ip.fw.tables_max : No 128 -Maximum number of tables (read-only). +Maximum number of tables. .It Va net.inet.ip.fw.verbose : No 1 Enables verbose messages. .It Va net.inet.ip.fw.verbose_limit : No 0 @@ -3112,6 +3128,16 @@ action, the table entries may include ho .Dl "ipfw table 1 add 192.168.0.0/27 router1.dmz" .Dl "..." .Dl "ipfw add 100 fwd tablearg ip from any to table(1)" +.Pp +In the following example per-interface firewall is created: +.Pp +.Dl "ipfw table 10 add vlan20 12000" +.Dl "ipfw table 10 add vlan30 13000" +.Dl "ipfw table 20 add vlan20 22000" +.Dl "ipfw table 20 add vlan30 23000" +.Dl ".." +.Dl "ipfw add 100 ipfw skipto tablearg ip from any to any recv 'table(10)' in" +.Dl "ipfw add 200 ipfw skipto tablearg ip from any to any xmit 'table(10)' out" .Ss SETS OF RULES To add a set of rules atomically, e.g.\& set 18: .Pp Modified: stable/9/sbin/ipfw/ipfw2.c ============================================================================== --- stable/9/sbin/ipfw/ipfw2.c Mon Apr 23 06:33:27 2012 (r234596) +++ stable/9/sbin/ipfw/ipfw2.c Mon Apr 23 07:15:15 2012 (r234597) @@ -42,6 +42,7 @@ #include /* _long_to_time */ #include #include +#include /* offsetof */ #include #include /* only IFNAMSIZ */ @@ -57,6 +58,12 @@ struct cmdline_opts co; /* global option int resvd_set_number = RESVD_SET; +int ipfw_socket = -1; + +#ifndef s6_addr32 +#define s6_addr32 __u6_addr.__u6_addr32 +#endif + #define GET_UINT_ARG(arg, min, max, tok, s_x) do { \ if (!av[0]) \ errx(EX_USAGE, "%s: missing argument", match_value(s_x, tok)); \ @@ -370,33 +377,65 @@ safe_realloc(void *ptr, size_t size) int do_cmd(int optname, void *optval, uintptr_t optlen) { - static int s = -1; /* the socket */ int i; if (co.test_only) return 0; - if (s == -1) - s = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); - if (s < 0) + if (ipfw_socket == -1) + ipfw_socket = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); + if (ipfw_socket < 0) err(EX_UNAVAILABLE, "socket"); if (optname == IP_FW_GET || optname == IP_DUMMYNET_GET || - optname == IP_FW_ADD || optname == IP_FW_TABLE_LIST || - optname == IP_FW_TABLE_GETSIZE || + optname == IP_FW_ADD || optname == IP_FW3 || optname == IP_FW_NAT_GET_CONFIG || optname < 0 || optname == IP_FW_NAT_GET_LOG) { if (optname < 0) optname = -optname; - i = getsockopt(s, IPPROTO_IP, optname, optval, + i = getsockopt(ipfw_socket, IPPROTO_IP, optname, optval, (socklen_t *)optlen); } else { - i = setsockopt(s, IPPROTO_IP, optname, optval, optlen); + i = setsockopt(ipfw_socket, IPPROTO_IP, optname, optval, optlen); } return i; } +/* + * do_setcmd3 - pass ipfw control cmd to kernel + * @optname: option name + * @optval: pointer to option data + * @optlen: option length + * + * Function encapsulates option value in IP_FW3 socket option + * and calls setsockopt(). + * Function returns 0 on success or -1 otherwise. + */ +int +do_setcmd3(int optname, void *optval, socklen_t optlen) +{ + socklen_t len; + ip_fw3_opheader *op3; + + if (co.test_only) + return (0); + + if (ipfw_socket == -1) + ipfw_socket = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); + if (ipfw_socket < 0) + err(EX_UNAVAILABLE, "socket"); + + len = sizeof(ip_fw3_opheader) + optlen; + op3 = alloca(len); + /* Zero reserved fields */ + memset(op3, 0, sizeof(ip_fw3_opheader)); + memcpy(op3 + 1, optval, optlen); + op3->opcode = optname; + + return setsockopt(ipfw_socket, IPPROTO_IP, IP_FW3, op3, len); +} + /** * match_token takes a table and a string, returns the value associated * with the string (-1 in case of failure). @@ -1411,6 +1450,8 @@ show_ipfw(struct ip_fw *rule, int pcwidt if (cmdif->name[0] == '\0') printf(" %s %s", s, inet_ntoa(cmdif->p.ip)); + else if (cmdif->name[0] == '\1') /* interface table */ + printf(" %s table(%d)", s, cmdif->p.glob); else printf(" %s %s", s, cmdif->name); @@ -2332,7 +2373,13 @@ fill_iface(ipfw_insn_if *cmd, char *arg) /* Parse the interface or address */ if (strcmp(arg, "any") == 0) cmd->o.len = 0; /* effectively ignore this command */ - else if (!isdigit(*arg)) { + else if (strncmp(arg, "table(", 6) == 0) { + char *p = strchr(arg + 6, ','); + if (p) + *p++ = '\0'; + cmd->name[0] = '\1'; /* Special value indicating table */ + cmd->p.glob = strtoul(arg + 6, NULL, 0); + } else if (!isdigit(*arg)) { strlcpy(cmd->name, arg, sizeof(cmd->name)); cmd->p.glob = strpbrk(arg, "*?[") != NULL ? 1 : 0; } else if (!inet_aton(arg, &cmd->p.ip)) @@ -3863,7 +3910,7 @@ ipfw_flush(int force) } -static void table_list(ipfw_table_entry ent, int need_header); +static void table_list(uint16_t num, int need_header); /* * This one handles all table-related commands @@ -3875,38 +3922,34 @@ static void table_list(ipfw_table_entry void ipfw_table_handler(int ac, char *av[]) { - ipfw_table_entry ent; + ipfw_table_xentry xent; int do_add; int is_all; size_t len; char *p; - uint32_t a; + uint32_t a, type, mask, addrlen; uint32_t tables_max; len = sizeof(tables_max); if (sysctlbyname("net.inet.ip.fw.tables_max", &tables_max, &len, - NULL, 0) == -1) { -#ifdef IPFW_TABLES_MAX - warn("Warn: Failed to get the max tables number via sysctl. " - "Using the compiled in defaults. \nThe reason was"); - tables_max = IPFW_TABLES_MAX; -#else - errx(1, "Failed sysctlbyname(\"net.inet.ip.fw.tables_max\")"); -#endif - } + NULL, 0) == -1) + errx(1, "Can't determine maximum number of ipfw tables. " + "Perhaps you forgot to load ipfw module?"); + + memset(&xent, 0, sizeof(xent)); ac--; av++; if (ac && isdigit(**av)) { - ent.tbl = atoi(*av); + xent.tbl = atoi(*av); is_all = 0; ac--; av++; } else if (ac && _substrcmp(*av, "all") == 0) { - ent.tbl = 0; + xent.tbl = 0; is_all = 1; ac--; av++; } else errx(EX_USAGE, "table number or 'all' keyword required"); - if (ent.tbl >= tables_max) + if (xent.tbl >= tables_max) errx(EX_USAGE, "The table number exceeds the maximum allowed " "value (%d)", tables_max - 1); NEED1("table needs command"); @@ -3919,104 +3962,181 @@ ipfw_table_handler(int ac, char *av[]) do_add = **av == 'a'; ac--; av++; if (!ac) - errx(EX_USAGE, "IP address required"); - p = strchr(*av, '/'); - if (p) { - *p++ = '\0'; - ent.masklen = atoi(p); - if (ent.masklen > 32) - errx(EX_DATAERR, "bad width ``%s''", p); - } else - ent.masklen = 32; - if (lookup_host(*av, (struct in_addr *)&ent.addr) != 0) - errx(EX_NOHOST, "hostname ``%s'' unknown", *av); + errx(EX_USAGE, "address required"); + /* + * Let's try to guess type by agrument. + * Possible types: + * 1) IPv4[/mask] + * 2) IPv6[/mask] + * 3) interface name + * 4) port ? + */ + type = 0; + if (ishexnumber(*av[0])) { + /* Remove / if exists */ + if ((p = strchr(*av, '/')) != NULL) { + *p = '\0'; + mask = atoi(p + 1); + } + + if (inet_pton(AF_INET, *av, &xent.k.addr6) == 1) { + type = IPFW_TABLE_CIDR; + if ((p != NULL) && (mask > 32)) + errx(EX_DATAERR, "bad IPv4 mask width: %s", p + 1); + xent.masklen = p ? mask : 32; + addrlen = sizeof(struct in_addr); + } else if (inet_pton(AF_INET6, *av, &xent.k.addr6) == 1) { + type = IPFW_TABLE_CIDR; + if ((p != NULL) && (mask > 128)) + errx(EX_DATAERR, "bad IPv6 mask width: %s", p + 1); + xent.masklen = p ? mask : 128; + addrlen = sizeof(struct in6_addr); + } + } + + if ((type == 0) && (strchr(*av, '.') == NULL)) { + /* Assume interface name. Copy significant data only */ + mask = MIN(strlen(*av), IF_NAMESIZE - 1); + memcpy(xent.k.iface, *av, mask); + /* Set mask to exact match */ + xent.masklen = 8 * IF_NAMESIZE; + type = IPFW_TABLE_INTERFACE; + addrlen = IF_NAMESIZE; + } + + if (type == 0) { + if (lookup_host(*av, (struct in_addr *)&xent.k.addr6) != 0) + errx(EX_NOHOST, "hostname ``%s'' unknown", *av); + xent.masklen = 32; + type = IPFW_TABLE_CIDR; + addrlen = sizeof(struct in_addr); + } + + xent.type = type; + xent.len = offsetof(ipfw_table_xentry, k) + addrlen; + ac--; av++; if (do_add && ac) { unsigned int tval; /* isdigit is a bit of a hack here.. */ if (strchr(*av, (int)'.') == NULL && isdigit(**av)) { - ent.value = strtoul(*av, NULL, 0); + xent.value = strtoul(*av, NULL, 0); } else { if (lookup_host(*av, (struct in_addr *)&tval) == 0) { /* The value must be stored in host order * * so that the values < 65k can be distinguished */ - ent.value = ntohl(tval); + xent.value = ntohl(tval); } else { errx(EX_NOHOST, "hostname ``%s'' unknown", *av); } } } else - ent.value = 0; - if (do_cmd(do_add ? IP_FW_TABLE_ADD : IP_FW_TABLE_DEL, - &ent, sizeof(ent)) < 0) { + xent.value = 0; + if (do_setcmd3(do_add ? IP_FW_TABLE_XADD : IP_FW_TABLE_XDEL, + &xent, xent.len) < 0) { /* If running silent, don't bomb out on these errors. */ if (!(co.do_quiet && (errno == (do_add ? EEXIST : ESRCH)))) err(EX_OSERR, "setsockopt(IP_FW_TABLE_%s)", - do_add ? "ADD" : "DEL"); + do_add ? "XADD" : "XDEL"); /* In silent mode, react to a failed add by deleting */ if (do_add) { - do_cmd(IP_FW_TABLE_DEL, &ent, sizeof(ent)); - if (do_cmd(IP_FW_TABLE_ADD, - &ent, sizeof(ent)) < 0) + do_setcmd3(IP_FW_TABLE_XDEL, &xent, xent.len); + if (do_setcmd3(IP_FW_TABLE_XADD, &xent, xent.len) < 0) err(EX_OSERR, - "setsockopt(IP_FW_TABLE_ADD)"); + "setsockopt(IP_FW_TABLE_XADD)"); } } } else if (_substrcmp(*av, "flush") == 0) { - a = is_all ? tables_max : (uint32_t)(ent.tbl + 1); + a = is_all ? tables_max : (uint32_t)(xent.tbl + 1); do { - if (do_cmd(IP_FW_TABLE_FLUSH, &ent.tbl, - sizeof(ent.tbl)) < 0) + if (do_cmd(IP_FW_TABLE_FLUSH, &xent.tbl, + sizeof(xent.tbl)) < 0) err(EX_OSERR, "setsockopt(IP_FW_TABLE_FLUSH)"); - } while (++ent.tbl < a); + } while (++xent.tbl < a); } else if (_substrcmp(*av, "list") == 0) { - a = is_all ? tables_max : (uint32_t)(ent.tbl + 1); + a = is_all ? tables_max : (uint32_t)(xent.tbl + 1); do { - table_list(ent, is_all); - } while (++ent.tbl < a); + table_list(xent.tbl, is_all); + } while (++xent.tbl < a); } else errx(EX_USAGE, "invalid table command %s", *av); } static void -table_list(ipfw_table_entry ent, int need_header) +table_list(uint16_t num, int need_header) { - ipfw_table *tbl; + ipfw_xtable *tbl; + ipfw_table_xentry *xent; socklen_t l; - uint32_t a; - - a = ent.tbl; - l = sizeof(a); - if (do_cmd(IP_FW_TABLE_GETSIZE, &a, (uintptr_t)&l) < 0) - err(EX_OSERR, "getsockopt(IP_FW_TABLE_GETSIZE)"); + uint32_t *a, sz, tval; + char tbuf[128]; + struct in6_addr *addr6; + ip_fw3_opheader *op3; + + /* Prepend value with IP_FW3 header */ + l = sizeof(ip_fw3_opheader) + sizeof(uint32_t); + op3 = alloca(l); + /* Zero reserved fields */ + memset(op3, 0, sizeof(ip_fw3_opheader)); + a = (uint32_t *)(op3 + 1); + *a = num; + op3->opcode = IP_FW_TABLE_XGETSIZE; + if (do_cmd(IP_FW3, op3, (uintptr_t)&l) < 0) + err(EX_OSERR, "getsockopt(IP_FW_TABLE_XGETSIZE)"); /* If a is zero we have nothing to do, the table is empty. */ - if (a == 0) + if (*a == 0) return; - l = sizeof(*tbl) + a * sizeof(ipfw_table_entry); + l = *a; tbl = safe_calloc(1, l); - tbl->tbl = ent.tbl; - if (do_cmd(IP_FW_TABLE_LIST, tbl, (uintptr_t)&l) < 0) - err(EX_OSERR, "getsockopt(IP_FW_TABLE_LIST)"); + tbl->opheader.opcode = IP_FW_TABLE_XLIST; + tbl->tbl = num; + if (do_cmd(IP_FW3, tbl, (uintptr_t)&l) < 0) + err(EX_OSERR, "getsockopt(IP_FW_TABLE_XLIST)"); if (tbl->cnt && need_header) printf("---table(%d)---\n", tbl->tbl); - for (a = 0; a < tbl->cnt; a++) { - unsigned int tval; - tval = tbl->ent[a].value; - if (co.do_value_as_ip) { - char tbuf[128]; - strncpy(tbuf, inet_ntoa(*(struct in_addr *) - &tbl->ent[a].addr), 127); - /* inet_ntoa expects network order */ - tval = htonl(tval); - printf("%s/%u %s\n", tbuf, tbl->ent[a].masklen, - inet_ntoa(*(struct in_addr *)&tval)); - } else { - printf("%s/%u %u\n", - inet_ntoa(*(struct in_addr *)&tbl->ent[a].addr), - tbl->ent[a].masklen, tval); + sz = tbl->size - sizeof(ipfw_xtable); + xent = &tbl->xent[0]; + while (sz > 0) { + switch (tbl->type) { + case IPFW_TABLE_CIDR: + /* IPv4 or IPv6 prefixes */ + tval = xent->value; + addr6 = &xent->k.addr6; + + if ((addr6->s6_addr32[0] == 0) && (addr6->s6_addr32[1] == 0) && + (addr6->s6_addr32[2] == 0)) { + /* IPv4 address */ + inet_ntop(AF_INET, &addr6->s6_addr32[3], tbuf, sizeof(tbuf)); + } else { + /* IPv6 address */ + inet_ntop(AF_INET6, addr6, tbuf, sizeof(tbuf)); + } + + if (co.do_value_as_ip) { + tval = htonl(tval); + printf("%s/%u %s\n", tbuf, xent->masklen, + inet_ntoa(*(struct in_addr *)&tval)); + } else + printf("%s/%u %u\n", tbuf, xent->masklen, tval); + break; + case IPFW_TABLE_INTERFACE: + /* Interface names */ + tval = xent->value; + if (co.do_value_as_ip) { + tval = htonl(tval); + printf("%s %s\n", xent->k.iface, + inet_ntoa(*(struct in_addr *)&tval)); + } else + printf("%s %u\n", xent->k.iface, tval); } + + if (sz < xent->len) + break; + sz -= xent->len; + xent = (void *)xent + xent->len; } + free(tbl); } Modified: stable/9/sys/netinet/ip_fw.h ============================================================================== --- stable/9/sys/netinet/ip_fw.h Mon Apr 23 06:33:27 2012 (r234596) +++ stable/9/sys/netinet/ip_fw.h Mon Apr 23 07:15:15 2012 (r234597) @@ -37,10 +37,10 @@ #define IPFW_DEFAULT_RULE 65535 /* - * The number of ipfw tables. The maximum allowed table number is the - * (IPFW_TABLES_MAX - 1). + * Default number of ipfw tables. */ -#define IPFW_TABLES_MAX 128 +#define IPFW_TABLES_MAX 65535 +#define IPFW_TABLES_DEFAULT 128 /* * Most commands (queue, pipe, tag, untag, limit...) can have a 16-bit @@ -62,6 +62,19 @@ */ #define IPFW_CALLSTACK_SIZE 16 +/* IP_FW3 header/opcodes */ +typedef struct _ip_fw3_opheader { + uint16_t opcode; /* Operation opcode */ + uint16_t reserved[3]; /* Align to 64-bit boundary */ +} ip_fw3_opheader; + + +/* IPFW extented tables support */ +#define IP_FW_TABLE_XADD 86 /* add entry */ +#define IP_FW_TABLE_XDEL 87 /* delete entry */ +#define IP_FW_TABLE_XGETSIZE 88 /* get table size */ +#define IP_FW_TABLE_XLIST 89 /* list table contents */ + /* * The kernel representation of ipfw rules is made of a list of * 'instructions' (for all practical purposes equivalent to BPF @@ -581,6 +594,11 @@ struct _ipfw_dyn_rule { /* * These are used for lookup tables. */ + +#define IPFW_TABLE_CIDR 1 /* Table for holding IPv4/IPv6 prefixes */ +#define IPFW_TABLE_INTERFACE 2 /* Table for holding interface names */ +#define IPFW_TABLE_MAXTYPE 2 /* Maximum valid number */ + typedef struct _ipfw_table_entry { in_addr_t addr; /* network address */ u_int32_t value; /* value */ @@ -588,6 +606,19 @@ typedef struct _ipfw_table_entry { u_int8_t masklen; /* mask length */ } ipfw_table_entry; +typedef struct _ipfw_table_xentry { + uint16_t len; /* Total entry length */ + uint8_t type; /* entry type */ + uint8_t masklen; /* mask length */ + uint16_t tbl; /* table number */ + uint32_t value; /* value */ + union { + /* Longest field needs to be aligned by 4-byte boundary */ + struct in6_addr addr6; /* IPv6 address */ + char iface[IF_NAMESIZE]; /* interface name */ + } k; +} ipfw_table_xentry; + typedef struct _ipfw_table { u_int32_t size; /* size of entries in bytes */ u_int32_t cnt; /* # of entries */ @@ -595,4 +626,13 @@ typedef struct _ipfw_table { ipfw_table_entry ent[0]; /* entries */ } ipfw_table; +typedef struct _ipfw_xtable { + ip_fw3_opheader opheader; /* eXtended tables are controlled via IP_FW3 */ + uint32_t size; /* size of entries in bytes */ + uint32_t cnt; /* # of entries */ + uint16_t tbl; /* table number */ + uint8_t type; /* table type */ + ipfw_table_xentry xent[0]; /* entries */ +} ipfw_xtable; + #endif /* _IPFW2_H */ Modified: stable/9/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- stable/9/sys/netinet/ipfw/ip_fw2.c Mon Apr 23 06:33:27 2012 (r234596) +++ stable/9/sys/netinet/ipfw/ip_fw2.c Mon Apr 23 07:15:15 2012 (r234597) @@ -116,6 +116,10 @@ static int default_to_accept; VNET_DEFINE(int, autoinc_step); VNET_DEFINE(int, fw_one_pass) = 1; +VNET_DEFINE(unsigned int, fw_tables_max); +/* Use 128 tables by default */ +static unsigned int default_fw_tables = IPFW_TABLES_DEFAULT; + /* * Each rule belongs to one of 32 different sets (0..31). * The variable set_disable contains one bit per set. @@ -145,7 +149,7 @@ ipfw_nat_cfg_t *ipfw_nat_get_log_ptr; #ifdef SYSCTL_NODE uint32_t dummy_def = IPFW_DEFAULT_RULE; -uint32_t dummy_tables_max = IPFW_TABLES_MAX; +static int sysctl_ipfw_table_num(SYSCTL_HANDLER_ARGS); SYSBEGIN(f3) @@ -165,13 +169,14 @@ SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUT SYSCTL_UINT(_net_inet_ip_fw, OID_AUTO, default_rule, CTLFLAG_RD, &dummy_def, 0, "The default/max possible rule number."); -SYSCTL_UINT(_net_inet_ip_fw, OID_AUTO, tables_max, CTLFLAG_RD, - &dummy_tables_max, 0, - "The maximum number of tables."); +SYSCTL_VNET_PROC(_net_inet_ip_fw, OID_AUTO, tables_max, + CTLTYPE_UINT|CTLFLAG_RW, 0, 0, sysctl_ipfw_table_num, "IU", + "Maximum number of tables"); SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, default_to_accept, CTLFLAG_RDTUN, &default_to_accept, 0, "Make the default rule accept all packets."); TUNABLE_INT("net.inet.ip.fw.default_to_accept", &default_to_accept); +TUNABLE_INT("net.inet.ip.fw.tables_max", &default_fw_tables); SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, static_count, CTLFLAG_RD, &VNET_NAME(layer3_chain.n_rules), 0, "Number of static rules"); @@ -341,12 +346,15 @@ tcpopts_match(struct tcphdr *tcp, ipfw_i } static int -iface_match(struct ifnet *ifp, ipfw_insn_if *cmd) +iface_match(struct ifnet *ifp, ipfw_insn_if *cmd, struct ip_fw_chain *chain, uint32_t *tablearg) { if (ifp == NULL) /* no iface with this packet, match fails */ return 0; /* Check by name or by IP address */ if (cmd->name[0] != '\0') { /* match by name */ + if (cmd->name[0] == '\1') /* use tablearg to match */ + return ipfw_lookup_table_extended(chain, cmd->p.glob, + ifp->if_xname, tablearg, IPFW_TABLE_INTERFACE); /* Check name */ if (cmd->p.glob) { if (fnmatch(cmd->name, ifp->if_xname, 0) == 0) @@ -1312,16 +1320,18 @@ do { \ case O_RECV: match = iface_match(m->m_pkthdr.rcvif, - (ipfw_insn_if *)cmd); + (ipfw_insn_if *)cmd, chain, &tablearg); break; case O_XMIT: - match = iface_match(oif, (ipfw_insn_if *)cmd); + match = iface_match(oif, (ipfw_insn_if *)cmd, + chain, &tablearg); break; case O_VIA: match = iface_match(oif ? oif : - m->m_pkthdr.rcvif, (ipfw_insn_if *)cmd); + m->m_pkthdr.rcvif, (ipfw_insn_if *)cmd, + chain, &tablearg); break; case O_MACADDR2: @@ -1448,6 +1458,17 @@ do { \ ((ipfw_insn_u32 *)cmd)->d[0] == v; else tablearg = v; + } else if (is_ipv6) { + uint32_t v = 0; + void *pkey = (cmd->opcode == O_IP_DST_LOOKUP) ? + &args->f_id.dst_ip6: &args->f_id.src_ip6; + match = ipfw_lookup_table_extended(chain, + cmd->arg1, pkey, &v, + IPFW_TABLE_CIDR); + if (cmdlen == F_INSN_SIZE(ipfw_insn_u32)) + match = ((ipfw_insn_u32 *)cmd)->d[0] == v; + if (match) + tablearg = v; } break; @@ -2469,6 +2490,26 @@ pullup_failed: } /* + * Set maximum number of tables that can be used in given VNET ipfw instance. + */ +#ifdef SYSCTL_NODE +static int +sysctl_ipfw_table_num(SYSCTL_HANDLER_ARGS) +{ + int error; + unsigned int ntables; + + ntables = V_fw_tables_max; + + error = sysctl_handle_int(oidp, &ntables, 0, req); + /* Read operation or some error */ + if ((error != 0) || (req->newptr == NULL)) + return (error); + + return (ipfw_resize_tables(&V_layer3_chain, ntables)); +} +#endif +/* * Module and VNET glue */ @@ -2524,6 +2565,10 @@ ipfw_init(void) printf("limited to %d packets/entry by default\n", V_verbose_limit); + /* Check user-supplied table count for validness */ + if (default_fw_tables > IPFW_TABLES_MAX) + default_fw_tables = IPFW_TABLES_MAX; + ipfw_log_bpf(1); /* init */ return (error); } @@ -2569,19 +2614,18 @@ vnet_ipfw_init(const void *unused) /* insert the default rule and create the initial map */ chain->n_rules = 1; chain->static_len = sizeof(struct ip_fw); - chain->map = malloc(sizeof(struct ip_fw *), M_IPFW, M_NOWAIT | M_ZERO); + chain->map = malloc(sizeof(struct ip_fw *), M_IPFW, M_WAITOK | M_ZERO); if (chain->map) - rule = malloc(chain->static_len, M_IPFW, M_NOWAIT | M_ZERO); - if (rule == NULL) { - if (chain->map) - free(chain->map, M_IPFW); - printf("ipfw2: ENOSPC initializing default rule " - "(support disabled)\n"); - return (ENOSPC); - } + rule = malloc(chain->static_len, M_IPFW, M_WAITOK | M_ZERO); + + /* Set initial number of tables */ + V_fw_tables_max = default_fw_tables; error = ipfw_init_tables(chain); if (error) { - panic("init_tables"); /* XXX Marko fix this ! */ + printf("ipfw2: setting up tables failed\n"); + free(chain->map, M_IPFW); + free(rule, M_IPFW); + return (ENOSPC); } /* fill and insert the default rule */ @@ -2644,12 +2688,12 @@ vnet_ipfw_uninit(const void *unused) IPFW_UH_WLOCK(chain); IPFW_WLOCK(chain); + ipfw_dyn_uninit(0); /* run the callout_drain */ IPFW_WUNLOCK(chain); - IPFW_WLOCK(chain); - ipfw_dyn_uninit(0); /* run the callout_drain */ ipfw_destroy_tables(chain); reap = NULL; + IPFW_WLOCK(chain); for (i = 0; i < chain->n_rules; i++) { rule = chain->map[i]; rule->x_next = reap; Modified: stable/9/sys/netinet/ipfw/ip_fw_private.h ============================================================================== --- stable/9/sys/netinet/ipfw/ip_fw_private.h Mon Apr 23 06:33:27 2012 (r234596) +++ stable/9/sys/netinet/ipfw/ip_fw_private.h Mon Apr 23 07:15:15 2012 (r234597) @@ -209,6 +209,9 @@ VNET_DECLARE(u_int32_t, set_disable); VNET_DECLARE(int, autoinc_step); #define V_autoinc_step VNET(autoinc_step) +VNET_DECLARE(unsigned int, fw_tables_max); +#define V_fw_tables_max VNET(fw_tables_max) + struct ip_fw_chain { struct ip_fw *rules; /* list of rules */ struct ip_fw *reap; /* list of rules to reap */ @@ -217,7 +220,9 @@ struct ip_fw_chain { int static_len; /* total len of static rules */ struct ip_fw **map; /* array of rule ptrs to ease lookup */ LIST_HEAD(nat_list, cfg_nat) nat; /* list of nat entries */ - struct radix_node_head *tables[IPFW_TABLES_MAX]; + struct radix_node_head **tables; /* IPv4 tables */ + struct radix_node_head **xtables; /* extended tables */ + uint8_t *tabletype; /* Array of table types */ #if defined( __linux__ ) || defined( _WIN32 ) spinlock_t rwmtx; spinlock_t uh_lock; @@ -273,16 +278,21 @@ int ipfw_check_hook(void *arg, struct mb struct radix_node; int ipfw_lookup_table(struct ip_fw_chain *ch, uint16_t tbl, in_addr_t addr, uint32_t *val); +int ipfw_lookup_table_extended(struct ip_fw_chain *ch, uint16_t tbl, void *paddr, + uint32_t *val, int type); int ipfw_init_tables(struct ip_fw_chain *ch); void ipfw_destroy_tables(struct ip_fw_chain *ch); int ipfw_flush_table(struct ip_fw_chain *ch, uint16_t tbl); -int ipfw_add_table_entry(struct ip_fw_chain *ch, uint16_t tbl, in_addr_t addr, - uint8_t mlen, uint32_t value); -int ipfw_dump_table_entry(struct radix_node *rn, void *arg); -int ipfw_del_table_entry(struct ip_fw_chain *ch, uint16_t tbl, in_addr_t addr, - uint8_t mlen); +int ipfw_add_table_entry(struct ip_fw_chain *ch, uint16_t tbl, void *paddr, + uint8_t plen, uint8_t mlen, uint8_t type, uint32_t value); +int ipfw_del_table_entry(struct ip_fw_chain *ch, uint16_t tbl, void *paddr, + uint8_t plen, uint8_t mlen, uint8_t type); int ipfw_count_table(struct ip_fw_chain *ch, uint32_t tbl, uint32_t *cnt); +int ipfw_dump_table_entry(struct radix_node *rn, void *arg); int ipfw_dump_table(struct ip_fw_chain *ch, ipfw_table *tbl); +int ipfw_count_xtable(struct ip_fw_chain *ch, uint32_t tbl, uint32_t *cnt); +int ipfw_dump_xtable(struct ip_fw_chain *ch, ipfw_xtable *tbl); +int ipfw_resize_tables(struct ip_fw_chain *ch, unsigned int ntables); /* In ip_fw_nat.c -- XXX to be moved to ip_var.h */ Modified: stable/9/sys/netinet/ipfw/ip_fw_sockopt.c ============================================================================== --- stable/9/sys/netinet/ipfw/ip_fw_sockopt.c Mon Apr 23 06:33:27 2012 (r234596) +++ stable/9/sys/netinet/ipfw/ip_fw_sockopt.c Mon Apr 23 07:15:15 2012 (r234597) @@ -667,7 +667,6 @@ check_ipfw_struct(struct ip_fw *rule, in cmdlen != F_INSN_SIZE(ipfw_insn_u32)) goto bad_size; break; - case O_MACADDR2: if (cmdlen != F_INSN_SIZE(ipfw_insn_mac)) goto bad_size; @@ -941,6 +940,7 @@ ipfw_getrules(struct ip_fw_chain *chain, } +#define IP_FW3_OPLENGTH(x) ((x)->sopt_valsize - sizeof(ip_fw3_opheader)) /** * {set|get}sockopt parser. */ @@ -949,10 +949,13 @@ ipfw_ctl(struct sockopt *sopt) { #define RULE_MAXSIZE (256*sizeof(u_int32_t)) int error; - size_t size; + size_t size, len, valsize; struct ip_fw *buf, *rule; struct ip_fw_chain *chain; u_int32_t rulenum[2]; + uint32_t opt; + char xbuf[128]; + ip_fw3_opheader *op3 = NULL; error = priv_check(sopt->sopt_td, PRIV_NETINET_IPFW); if (error) @@ -972,7 +975,21 @@ ipfw_ctl(struct sockopt *sopt) chain = &V_layer3_chain; error = 0; - switch (sopt->sopt_name) { + /* Save original valsize before it is altered via sooptcopyin() */ + valsize = sopt->sopt_valsize; + if ((opt = sopt->sopt_name) == IP_FW3) { + /* + * Copy not less than sizeof(ip_fw3_opheader). + * We hope any IP_FW3 command will fit into 128-byte buffer. + */ + if ((error = sooptcopyin(sopt, xbuf, sizeof(xbuf), + sizeof(ip_fw3_opheader))) != 0) + return (error); + op3 = (ip_fw3_opheader *)xbuf; + opt = op3->opcode; + } + + switch (opt) { case IP_FW_GET: /* * pass up a copy of the current rules. Static rules @@ -1111,7 +1128,8 @@ ipfw_ctl(struct sockopt *sopt) if (error) break; error = ipfw_add_table_entry(chain, ent.tbl, - ent.addr, ent.masklen, ent.value); + &ent.addr, sizeof(ent.addr), ent.masklen, + IPFW_TABLE_CIDR, ent.value); } break; @@ -1124,7 +1142,34 @@ ipfw_ctl(struct sockopt *sopt) if (error) break; error = ipfw_del_table_entry(chain, ent.tbl, - ent.addr, ent.masklen); + &ent.addr, sizeof(ent.addr), ent.masklen, IPFW_TABLE_CIDR); + } + break; + + case IP_FW_TABLE_XADD: /* IP_FW3 */ + case IP_FW_TABLE_XDEL: /* IP_FW3 */ + { + ipfw_table_xentry *xent = (ipfw_table_xentry *)(op3 + 1); + + /* Check minimum header size */ + if (IP_FW3_OPLENGTH(sopt) < offsetof(ipfw_table_xentry, k)) { + error = EINVAL; + break; + } + + /* Check if len field is valid */ + if (xent->len > sizeof(ipfw_table_xentry)) { + error = EINVAL; + break; + } + + len = xent->len - offsetof(ipfw_table_xentry, k); + + error = (opt == IP_FW_TABLE_XADD) ? + ipfw_add_table_entry(chain, xent->tbl, &xent->k, + len, xent->masklen, xent->type, xent->value) : + ipfw_del_table_entry(chain, xent->tbl, &xent->k, + len, xent->masklen, xent->type); } break; @@ -1136,9 +1181,7 @@ ipfw_ctl(struct sockopt *sopt) sizeof(tbl), sizeof(tbl)); if (error) break; - IPFW_WLOCK(chain); error = ipfw_flush_table(chain, tbl); - IPFW_WUNLOCK(chain); } break; @@ -1187,6 +1230,62 @@ ipfw_ctl(struct sockopt *sopt) } break; + case IP_FW_TABLE_XGETSIZE: /* IP_FW3 */ + { + uint32_t *tbl; + + if (IP_FW3_OPLENGTH(sopt) < sizeof(uint32_t)) { + error = EINVAL; + break; + } + + tbl = (uint32_t *)(op3 + 1); + + IPFW_RLOCK(chain); + error = ipfw_count_xtable(chain, *tbl, tbl); + IPFW_RUNLOCK(chain); + if (error) + break; + error = sooptcopyout(sopt, op3, sopt->sopt_valsize); + } + break; + + case IP_FW_TABLE_XLIST: /* IP_FW3 */ + { + ipfw_xtable *tbl; + + if ((size = valsize) < sizeof(ipfw_xtable)) { + error = EINVAL; + break; + } + + tbl = malloc(size, M_TEMP, M_ZERO | M_WAITOK); + memcpy(tbl, op3, sizeof(ipfw_xtable)); + + /* Get maximum number of entries we can store */ + tbl->size = (size - sizeof(ipfw_xtable)) / + sizeof(ipfw_table_xentry); + IPFW_RLOCK(chain); + error = ipfw_dump_xtable(chain, tbl); + IPFW_RUNLOCK(chain); + if (error) { + free(tbl, M_TEMP); + break; + } + + /* Revert size field back to bytes */ + tbl->size = tbl->size * sizeof(ipfw_table_xentry) + + sizeof(ipfw_table); + /* + * Since we call sooptcopyin() with small buffer, sopt_valsize is + * decreased to reflect supplied buffer size. Set it back to original value *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 08:58:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 96A531065670; Mon, 23 Apr 2012 08:58:02 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 822FE8FC0A; Mon, 23 Apr 2012 08:58:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3N8w22a083137; Mon, 23 Apr 2012 08:58:02 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3N8w2A8083134; Mon, 23 Apr 2012 08:58:02 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201204230858.q3N8w2A8083134@svn.freebsd.org> From: Fabien Thomas Date: Mon, 23 Apr 2012 08:58:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234598 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 08:58:02 -0000 Author: fabient Date: Mon Apr 23 08:58:01 2012 New Revision: 234598 URL: http://svn.freebsd.org/changeset/base/234598 Log: Fix class malloc init for mips and powerpc that was not converted by r233628. Found by: monthadar, adrian MFC after: 1 week Modified: head/sys/dev/hwpmc/hwpmc_mips.c head/sys/dev/hwpmc/hwpmc_powerpc.c Modified: head/sys/dev/hwpmc/hwpmc_mips.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mips.c Mon Apr 23 07:15:15 2012 (r234597) +++ head/sys/dev/hwpmc/hwpmc_mips.c Mon Apr 23 08:58:01 2012 (r234598) @@ -431,11 +431,9 @@ pmc_mips_initialize() M_WAITOK|M_ZERO); /* Just one class */ - pmc_mdep = malloc(sizeof(struct pmc_mdep) + sizeof(struct pmc_classdep), - M_PMC, M_WAITOK|M_ZERO); + pmc_mdep = pmc_mdep_alloc(1); pmc_mdep->pmd_cputype = mips_pmc_spec.ps_cputype; - pmc_mdep->pmd_nclass = 1; pcd = &pmc_mdep->pmd_classdep[PMC_MDEP_CLASS_INDEX_MIPS]; pcd->pcd_caps = mips_pmc_spec.ps_capabilities; Modified: head/sys/dev/hwpmc/hwpmc_powerpc.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_powerpc.c Mon Apr 23 07:15:15 2012 (r234597) +++ head/sys/dev/hwpmc/hwpmc_powerpc.c Mon Apr 23 08:58:01 2012 (r234598) @@ -803,11 +803,9 @@ pmc_md_initialize() M_WAITOK|M_ZERO); /* Just one class */ - pmc_mdep = malloc(sizeof(struct pmc_mdep) + sizeof(struct pmc_classdep), - M_PMC, M_WAITOK|M_ZERO); + pmc_mdep = pmc_mdep_alloc(1); pmc_mdep->pmd_cputype = PMC_CPU_PPC_7450; - pmc_mdep->pmd_nclass = 1; pcd = &pmc_mdep->pmd_classdep[PMC_MDEP_CLASS_INDEX_PPC7450]; pcd->pcd_caps = POWERPC_PMC_CAPS; From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 09:16:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 386FB106566B; Mon, 23 Apr 2012 09:16:57 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 239238FC0C; Mon, 23 Apr 2012 09:16:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3N9GuvU083765; Mon, 23 Apr 2012 09:16:56 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3N9GuLu083763; Mon, 23 Apr 2012 09:16:56 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201204230916.q3N9GuLu083763@svn.freebsd.org> From: Jeremie Le Hen Date: Mon, 23 Apr 2012 09:16:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234599 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 09:16:57 -0000 Author: jlh Date: Mon Apr 23 09:16:56 2012 New Revision: 234599 URL: http://svn.freebsd.org/changeset/base/234599 Log: Add my informations. Approved by: kib (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Mon Apr 23 08:58:01 2012 (r234598) +++ head/share/misc/committers-src.dot Mon Apr 23 09:16:56 2012 (r234599) @@ -169,6 +169,7 @@ jimharris [label="Jim Harris\njimharris@ jinmei [label="JINMEI Tatuya\njinmei@FreeBSD.org\n2007/03/17"] jkim [label="Jung-uk Kim\njkim@FreeBSD.org\n2005/07/06"] jkoshy [label="A. Joseph Koshy\njkoshy@FreeBSD.org\n1998/05/13"] +jlh [label="Jeremie Le Hen\njlh@FreeBSD.org\n2012/04/22"] jls [label="Jordan Sissel\njls@FreeBSD.org\n2006/12/06"] joerg [label="Joerg Wunsch\njoerg@FreeBSD.org\n1993/11/14"] jon [label="Jonathan Chen\njon@FreeBSD.org\n2000/10/17"] @@ -462,6 +463,7 @@ kan -> kib kib -> ae kib -> dchagin +kib -> jlh kib -> jpaetzel kib -> lulf kib -> melifaro From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 09:18:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C58CE1065672; Mon, 23 Apr 2012 09:18:05 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AEA388FC0C; Mon, 23 Apr 2012 09:18:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3N9I5Q8083851; Mon, 23 Apr 2012 09:18:05 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3N9I51a083848; Mon, 23 Apr 2012 09:18:05 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201204230918.q3N9I51a083848@svn.freebsd.org> From: Jeremie Le Hen Date: Mon, 23 Apr 2012 09:18:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234600 - head/usr.bin/calendar/calendars X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 09:18:05 -0000 Author: jlh Date: Mon Apr 23 09:18:05 2012 New Revision: 234600 URL: http://svn.freebsd.org/changeset/base/234600 Log: Add my birthday and place of birth. Approved by: kib (mentor) Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Apr 23 09:16:56 2012 (r234599) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Apr 23 09:18:05 2012 (r234600) @@ -316,6 +316,7 @@ 11/09 Antoine Brodin born in Bagnolet, France, 1981 11/10 Gregory Neil Shapiro born in Providence, Rhode Island, United States, 1970 11/13 John Baldwin born in Stuart, Virginia, United States, 1977 +11/14 Jeremie Le Hen born in Nancy, France, 1980 11/15 Lars Engels born in Hilden, Nordrhein-Westfalen, Germany, 1980 11/15 Tijl Coosemans born in Duffel, Belgium, 1983 11/16 Jose Maria Alcaide Salinas born in Madrid, Spain, 1962 From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 09:39:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 342BD1065672; Mon, 23 Apr 2012 09:39:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 061248FC17; Mon, 23 Apr 2012 09:39:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3N9ddB7085432; Mon, 23 Apr 2012 09:39:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3N9ddbI085426; Mon, 23 Apr 2012 09:39:39 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201204230939.q3N9ddbI085426@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Apr 2012 09:39:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234601 - head/sys/geom/raid X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 09:39:40 -0000 Author: mav Date: Mon Apr 23 09:39:39 2012 New Revision: 234601 URL: http://svn.freebsd.org/changeset/base/234601 Log: Add sos@ copyrights to RAID metadata modules, respecting his efforts in decoding metadata formats in ataraid(4) code. Modified: head/sys/geom/raid/md_intel.c head/sys/geom/raid/md_jmicron.c head/sys/geom/raid/md_nvidia.c head/sys/geom/raid/md_promise.c head/sys/geom/raid/md_sii.c Modified: head/sys/geom/raid/md_intel.c ============================================================================== --- head/sys/geom/raid/md_intel.c Mon Apr 23 09:18:05 2012 (r234600) +++ head/sys/geom/raid/md_intel.c Mon Apr 23 09:39:39 2012 (r234601) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2010 Alexander Motin + * Copyright (c) 2000 - 2008 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/geom/raid/md_jmicron.c ============================================================================== --- head/sys/geom/raid/md_jmicron.c Mon Apr 23 09:18:05 2012 (r234600) +++ head/sys/geom/raid/md_jmicron.c Mon Apr 23 09:39:39 2012 (r234601) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2010 Alexander Motin + * Copyright (c) 2000 - 2008 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/geom/raid/md_nvidia.c ============================================================================== --- head/sys/geom/raid/md_nvidia.c Mon Apr 23 09:18:05 2012 (r234600) +++ head/sys/geom/raid/md_nvidia.c Mon Apr 23 09:39:39 2012 (r234601) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2011 Alexander Motin + * Copyright (c) 2000 - 2008 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/geom/raid/md_promise.c ============================================================================== --- head/sys/geom/raid/md_promise.c Mon Apr 23 09:18:05 2012 (r234600) +++ head/sys/geom/raid/md_promise.c Mon Apr 23 09:39:39 2012 (r234601) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2011 Alexander Motin + * Copyright (c) 2000 - 2008 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/geom/raid/md_sii.c ============================================================================== --- head/sys/geom/raid/md_sii.c Mon Apr 23 09:18:05 2012 (r234600) +++ head/sys/geom/raid/md_sii.c Mon Apr 23 09:39:39 2012 (r234601) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2011 Alexander Motin + * Copyright (c) 2000 - 2008 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 12:18:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6BC6D106564A; Mon, 23 Apr 2012 12:18:39 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 55A5B8FC16; Mon, 23 Apr 2012 12:18:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NCIdRF097246; Mon, 23 Apr 2012 12:18:39 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NCIdS8097244; Mon, 23 Apr 2012 12:18:39 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201204231218.q3NCIdS8097244@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 23 Apr 2012 12:18:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234602 - stable/9/usr.bin/vmstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 12:18:39 -0000 Author: pluknet Date: Mon Apr 23 12:18:38 2012 New Revision: 234602 URL: http://svn.freebsd.org/changeset/base/234602 Log: MFC r233298: Garbage collect defunct nlist(3) symbols. Modified: stable/9/usr.bin/vmstat/vmstat.c Directory Properties: stable/9/usr.bin/vmstat/ (props changed) Modified: stable/9/usr.bin/vmstat/vmstat.c ============================================================================== --- stable/9/usr.bin/vmstat/vmstat.c Mon Apr 23 09:39:39 2012 (r234601) +++ stable/9/usr.bin/vmstat/vmstat.c Mon Apr 23 12:18:38 2012 (r234602) @@ -81,26 +81,20 @@ static char da[] = "da"; static struct nlist namelist[] = { #define X_SUM 0 { "_cnt" }, -#define X_BOOTTIME 1 - { "_boottime" }, -#define X_HZ 2 +#define X_HZ 1 { "_hz" }, -#define X_STATHZ 3 +#define X_STATHZ 2 { "_stathz" }, -#define X_NCHSTATS 4 +#define X_NCHSTATS 3 { "_nchstats" }, -#define X_INTRNAMES 5 +#define X_INTRNAMES 4 { "_intrnames" }, -#define X_SINTRNAMES 6 +#define X_SINTRNAMES 5 { "_sintrnames" }, -#define X_INTRCNT 7 +#define X_INTRCNT 6 { "_intrcnt" }, -#define X_SINTRCNT 8 +#define X_SINTRCNT 7 { "_sintrcnt" }, -#define X_KMEMSTATS 9 - { "_kmemstatistics" }, -#define X_KMEMZONES 10 - { "_kmemzones" }, #ifdef notyet #define X_DEFICIT XXX { "_deficit" }, @@ -112,7 +106,7 @@ static struct nlist namelist[] = { { "_xstats" }, #define X_END XXX #else -#define X_END 11 +#define X_END 8 #endif { "" }, }; From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 13:04:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B11B5106564A; Mon, 23 Apr 2012 13:04:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B1DF8FC0C; Mon, 23 Apr 2012 13:04:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3ND43Qi098753; Mon, 23 Apr 2012 13:04:03 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3ND43Yg098748; Mon, 23 Apr 2012 13:04:03 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201204231304.q3ND43Yg098748@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Apr 2012 13:04:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234603 - head/sys/geom/raid X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 13:04:03 -0000 Author: mav Date: Mon Apr 23 13:04:02 2012 New Revision: 234603 URL: http://svn.freebsd.org/changeset/base/234603 Log: Add names for all primary RAID levels defined by DDF 2.0 specification. Modified: head/sys/geom/raid/g_raid.c head/sys/geom/raid/g_raid.h head/sys/geom/raid/tr_raid1.c head/sys/geom/raid/tr_raid1e.c Modified: head/sys/geom/raid/g_raid.c ============================================================================== --- head/sys/geom/raid/g_raid.c Mon Apr 23 12:18:38 2012 (r234602) +++ head/sys/geom/raid/g_raid.c Mon Apr 23 13:04:02 2012 (r234603) @@ -277,31 +277,87 @@ g_raid_volume_level2str(int level, int q case G_RAID_VOLUME_RL_RAID1: return ("RAID1"); case G_RAID_VOLUME_RL_RAID3: + if (qual == G_RAID_VOLUME_RLQ_R3P0) + return ("RAID3-P0"); + if (qual == G_RAID_VOLUME_RLQ_R3PN) + return ("RAID3-PN"); return ("RAID3"); case G_RAID_VOLUME_RL_RAID4: + if (qual == G_RAID_VOLUME_RLQ_R4P0) + return ("RAID3-P0"); + if (qual == G_RAID_VOLUME_RLQ_R4PN) + return ("RAID3-PN"); return ("RAID4"); case G_RAID_VOLUME_RL_RAID5: if (qual == G_RAID_VOLUME_RLQ_R5RA) - return ("RAID5RA"); + return ("RAID5-RA"); if (qual == G_RAID_VOLUME_RLQ_R5RS) - return ("RAID5RS"); + return ("RAID5-RS"); if (qual == G_RAID_VOLUME_RLQ_R5LA) - return ("RAID5LA"); + return ("RAID5-LA"); if (qual == G_RAID_VOLUME_RLQ_R5LS) - return ("RAID5LS"); + return ("RAID5-LS"); return ("RAID5"); case G_RAID_VOLUME_RL_RAID6: + if (qual == G_RAID_VOLUME_RLQ_R6RA) + return ("RAID6-RA"); + if (qual == G_RAID_VOLUME_RLQ_R6RS) + return ("RAID6-RS"); + if (qual == G_RAID_VOLUME_RLQ_R6LA) + return ("RAID6-LA"); + if (qual == G_RAID_VOLUME_RLQ_R6LS) + return ("RAID6-LS"); return ("RAID6"); + case G_RAID_VOLUME_RL_RAIDMDF: + if (qual == G_RAID_VOLUME_RLQ_RMDFRA) + return ("RAIDMDF-RA"); + if (qual == G_RAID_VOLUME_RLQ_RMDFRS) + return ("RAIDMDF-RS"); + if (qual == G_RAID_VOLUME_RLQ_RMDFLA) + return ("RAIDMDF-LA"); + if (qual == G_RAID_VOLUME_RLQ_RMDFLS) + return ("RAIDMDF-LS"); + return ("RAIDMDF"); case G_RAID_VOLUME_RL_RAID1E: + if (qual == G_RAID_VOLUME_RLQ_R1EA) + return ("RAID1E-A"); + if (qual == G_RAID_VOLUME_RLQ_R1EO) + return ("RAID1E-O"); return ("RAID1E"); case G_RAID_VOLUME_RL_SINGLE: return ("SINGLE"); case G_RAID_VOLUME_RL_CONCAT: return ("CONCAT"); case G_RAID_VOLUME_RL_RAID5E: + if (qual == G_RAID_VOLUME_RLQ_R5ERA) + return ("RAID5E-RA"); + if (qual == G_RAID_VOLUME_RLQ_R5ERS) + return ("RAID5E-RS"); + if (qual == G_RAID_VOLUME_RLQ_R5ELA) + return ("RAID5E-LA"); + if (qual == G_RAID_VOLUME_RLQ_R5ELS) + return ("RAID5E-LS"); return ("RAID5E"); case G_RAID_VOLUME_RL_RAID5EE: + if (qual == G_RAID_VOLUME_RLQ_R5EERA) + return ("RAID5EE-RA"); + if (qual == G_RAID_VOLUME_RLQ_R5EERS) + return ("RAID5EE-RS"); + if (qual == G_RAID_VOLUME_RLQ_R5EELA) + return ("RAID5EE-LA"); + if (qual == G_RAID_VOLUME_RLQ_R5EELS) + return ("RAID5EE-LS"); return ("RAID5EE"); + case G_RAID_VOLUME_RL_RAID5R: + if (qual == G_RAID_VOLUME_RLQ_R5RRA) + return ("RAID5R-RA"); + if (qual == G_RAID_VOLUME_RLQ_R5RRS) + return ("RAID5R-RS"); + if (qual == G_RAID_VOLUME_RLQ_R5RLA) + return ("RAID5R-LA"); + if (qual == G_RAID_VOLUME_RLQ_R5RLS) + return ("RAID5R-LS"); + return ("RAID5E"); default: return ("UNKNOWN"); } @@ -317,37 +373,111 @@ g_raid_volume_str2level(const char *str, *level = G_RAID_VOLUME_RL_RAID0; else if (strcasecmp(str, "RAID1") == 0) *level = G_RAID_VOLUME_RL_RAID1; - else if (strcasecmp(str, "RAID3") == 0) + else if (strcasecmp(str, "RAID3-P0") == 0) { + *level = G_RAID_VOLUME_RL_RAID3; + *qual = G_RAID_VOLUME_RLQ_R3P0; + } else if (strcasecmp(str, "RAID3-PN") == 0 && + strcasecmp(str, "RAID3") == 0) { *level = G_RAID_VOLUME_RL_RAID3; - else if (strcasecmp(str, "RAID4") == 0) + *qual = G_RAID_VOLUME_RLQ_R3P0; + } else if (strcasecmp(str, "RAID4-P0") == 0) { *level = G_RAID_VOLUME_RL_RAID4; - else if (strcasecmp(str, "RAID5RA") == 0) { + *qual = G_RAID_VOLUME_RLQ_R4P0; + } else if (strcasecmp(str, "RAID4-PN") == 0 && + strcasecmp(str, "RAID4") == 0) { + *level = G_RAID_VOLUME_RL_RAID4; + *qual = G_RAID_VOLUME_RLQ_R4P0; + } else if (strcasecmp(str, "RAID5-RA") == 0) { *level = G_RAID_VOLUME_RL_RAID5; *qual = G_RAID_VOLUME_RLQ_R5RA; - } else if (strcasecmp(str, "RAID5RS") == 0) { + } else if (strcasecmp(str, "RAID5-RS") == 0) { *level = G_RAID_VOLUME_RL_RAID5; *qual = G_RAID_VOLUME_RLQ_R5RS; } else if (strcasecmp(str, "RAID5") == 0 || - strcasecmp(str, "RAID5LA") == 0) { + strcasecmp(str, "RAID5-LA") == 0) { *level = G_RAID_VOLUME_RL_RAID5; *qual = G_RAID_VOLUME_RLQ_R5LA; - } else if (strcasecmp(str, "RAID5LS") == 0) { + } else if (strcasecmp(str, "RAID5-LS") == 0) { *level = G_RAID_VOLUME_RL_RAID5; *qual = G_RAID_VOLUME_RLQ_R5LS; - } else if (strcasecmp(str, "RAID6") == 0) + } else if (strcasecmp(str, "RAID6-RA") == 0) { + *level = G_RAID_VOLUME_RL_RAID6; + *qual = G_RAID_VOLUME_RLQ_R6RA; + } else if (strcasecmp(str, "RAID6-RS") == 0) { *level = G_RAID_VOLUME_RL_RAID6; - else if (strcasecmp(str, "RAID10") == 0 || - strcasecmp(str, "RAID1E") == 0) + *qual = G_RAID_VOLUME_RLQ_R6RS; + } else if (strcasecmp(str, "RAID6") == 0 || + strcasecmp(str, "RAID6-LA") == 0) { + *level = G_RAID_VOLUME_RL_RAID6; + *qual = G_RAID_VOLUME_RLQ_R6LA; + } else if (strcasecmp(str, "RAID6-LS") == 0) { + *level = G_RAID_VOLUME_RL_RAID6; + *qual = G_RAID_VOLUME_RLQ_R6LS; + } else if (strcasecmp(str, "RAIDMDF-RA") == 0) { + *level = G_RAID_VOLUME_RL_RAIDMDF; + *qual = G_RAID_VOLUME_RLQ_RMDFRA; + } else if (strcasecmp(str, "RAIDMDF-RS") == 0) { + *level = G_RAID_VOLUME_RL_RAIDMDF; + *qual = G_RAID_VOLUME_RLQ_RMDFRS; + } else if (strcasecmp(str, "RAIDMDF") == 0 || + strcasecmp(str, "RAIDMDF-LA") == 0) { + *level = G_RAID_VOLUME_RL_RAIDMDF; + *qual = G_RAID_VOLUME_RLQ_RMDFLA; + } else if (strcasecmp(str, "RAIDMDF-LS") == 0) { + *level = G_RAID_VOLUME_RL_RAIDMDF; + *qual = G_RAID_VOLUME_RLQ_RMDFLS; + } else if (strcasecmp(str, "RAID10") == 0 || + strcasecmp(str, "RAID1E") == 0 || + strcasecmp(str, "RAID1E-A") == 0) { *level = G_RAID_VOLUME_RL_RAID1E; - else if (strcasecmp(str, "SINGLE") == 0) + *qual = G_RAID_VOLUME_RLQ_R1EA; + } else if (strcasecmp(str, "RAID1E-O") == 0) { + *level = G_RAID_VOLUME_RL_RAID1E; + *qual = G_RAID_VOLUME_RLQ_R1EO; + } else if (strcasecmp(str, "SINGLE") == 0) *level = G_RAID_VOLUME_RL_SINGLE; else if (strcasecmp(str, "CONCAT") == 0) *level = G_RAID_VOLUME_RL_CONCAT; - else if (strcasecmp(str, "RAID5E") == 0) + else if (strcasecmp(str, "RAID5E-RA") == 0) { + *level = G_RAID_VOLUME_RL_RAID5E; + *qual = G_RAID_VOLUME_RLQ_R5ERA; + } else if (strcasecmp(str, "RAID5E-RS") == 0) { *level = G_RAID_VOLUME_RL_RAID5E; - else if (strcasecmp(str, "RAID5EE") == 0) + *qual = G_RAID_VOLUME_RLQ_R5ERS; + } else if (strcasecmp(str, "RAID5E") == 0 || + strcasecmp(str, "RAID5E-LA") == 0) { + *level = G_RAID_VOLUME_RL_RAID5E; + *qual = G_RAID_VOLUME_RLQ_R5ELA; + } else if (strcasecmp(str, "RAID5E-LS") == 0) { + *level = G_RAID_VOLUME_RL_RAID5E; + *qual = G_RAID_VOLUME_RLQ_R5ELS; + } else if (strcasecmp(str, "RAID5EE-RA") == 0) { *level = G_RAID_VOLUME_RL_RAID5EE; - else + *qual = G_RAID_VOLUME_RLQ_R5EERA; + } else if (strcasecmp(str, "RAID5EE-RS") == 0) { + *level = G_RAID_VOLUME_RL_RAID5EE; + *qual = G_RAID_VOLUME_RLQ_R5EERS; + } else if (strcasecmp(str, "RAID5EE") == 0 || + strcasecmp(str, "RAID5EE-LA") == 0) { + *level = G_RAID_VOLUME_RL_RAID5EE; + *qual = G_RAID_VOLUME_RLQ_R5EELA; + } else if (strcasecmp(str, "RAID5EE-LS") == 0) { + *level = G_RAID_VOLUME_RL_RAID5EE; + *qual = G_RAID_VOLUME_RLQ_R5EELS; + } else if (strcasecmp(str, "RAID5R-RA") == 0) { + *level = G_RAID_VOLUME_RL_RAID5R; + *qual = G_RAID_VOLUME_RLQ_R5RRA; + } else if (strcasecmp(str, "RAID5R-RS") == 0) { + *level = G_RAID_VOLUME_RL_RAID5R; + *qual = G_RAID_VOLUME_RLQ_R5RRS; + } else if (strcasecmp(str, "RAID5R") == 0 || + strcasecmp(str, "RAID5R-LA") == 0) { + *level = G_RAID_VOLUME_RL_RAID5R; + *qual = G_RAID_VOLUME_RLQ_R5RLA; + } else if (strcasecmp(str, "RAID5R-LS") == 0) { + *level = G_RAID_VOLUME_RL_RAID5R; + *qual = G_RAID_VOLUME_RLQ_R5RLS; + } else return (-1); return (0); } Modified: head/sys/geom/raid/g_raid.h ============================================================================== --- head/sys/geom/raid/g_raid.h Mon Apr 23 12:18:38 2012 (r234602) +++ head/sys/geom/raid/g_raid.h Mon Apr 23 13:04:02 2012 (r234603) @@ -219,18 +219,48 @@ struct g_raid_subdisk { #define G_RAID_VOLUME_RL_RAID4 0x04 #define G_RAID_VOLUME_RL_RAID5 0x05 #define G_RAID_VOLUME_RL_RAID6 0x06 +#define G_RAID_VOLUME_RL_RAIDMDF 0x07 #define G_RAID_VOLUME_RL_RAID1E 0x11 #define G_RAID_VOLUME_RL_SINGLE 0x0f #define G_RAID_VOLUME_RL_CONCAT 0x1f #define G_RAID_VOLUME_RL_RAID5E 0x15 #define G_RAID_VOLUME_RL_RAID5EE 0x25 +#define G_RAID_VOLUME_RL_RAID5R 0x35 #define G_RAID_VOLUME_RL_UNKNOWN 0xff #define G_RAID_VOLUME_RLQ_NONE 0x00 +#define G_RAID_VOLUME_RLQ_R1SM 0x00 +#define G_RAID_VOLUME_RLQ_R1MM 0x01 +#define G_RAID_VOLUME_RLQ_R3P0 0x00 +#define G_RAID_VOLUME_RLQ_R3PN 0x01 +#define G_RAID_VOLUME_RLQ_R4P0 0x00 +#define G_RAID_VOLUME_RLQ_R4PN 0x01 #define G_RAID_VOLUME_RLQ_R5RA 0x00 #define G_RAID_VOLUME_RLQ_R5RS 0x01 #define G_RAID_VOLUME_RLQ_R5LA 0x02 #define G_RAID_VOLUME_RLQ_R5LS 0x03 +#define G_RAID_VOLUME_RLQ_R6RA 0x00 +#define G_RAID_VOLUME_RLQ_R6RS 0x01 +#define G_RAID_VOLUME_RLQ_R6LA 0x02 +#define G_RAID_VOLUME_RLQ_R6LS 0x03 +#define G_RAID_VOLUME_RLQ_RMDFRA 0x00 +#define G_RAID_VOLUME_RLQ_RMDFRS 0x01 +#define G_RAID_VOLUME_RLQ_RMDFLA 0x02 +#define G_RAID_VOLUME_RLQ_RMDFLS 0x03 +#define G_RAID_VOLUME_RLQ_R1EA 0x00 +#define G_RAID_VOLUME_RLQ_R1EO 0x01 +#define G_RAID_VOLUME_RLQ_R5ERA 0x00 +#define G_RAID_VOLUME_RLQ_R5ERS 0x01 +#define G_RAID_VOLUME_RLQ_R5ELA 0x02 +#define G_RAID_VOLUME_RLQ_R5ELS 0x03 +#define G_RAID_VOLUME_RLQ_R5EERA 0x00 +#define G_RAID_VOLUME_RLQ_R5EERS 0x01 +#define G_RAID_VOLUME_RLQ_R5EELA 0x02 +#define G_RAID_VOLUME_RLQ_R5EELS 0x03 +#define G_RAID_VOLUME_RLQ_R5RRA 0x00 +#define G_RAID_VOLUME_RLQ_R5RRS 0x01 +#define G_RAID_VOLUME_RLQ_R5RLA 0x02 +#define G_RAID_VOLUME_RLQ_R5RLS 0x03 #define G_RAID_VOLUME_RLQ_UNKNOWN 0xff struct g_raid_volume; Modified: head/sys/geom/raid/tr_raid1.c ============================================================================== --- head/sys/geom/raid/tr_raid1.c Mon Apr 23 12:18:38 2012 (r234602) +++ head/sys/geom/raid/tr_raid1.c Mon Apr 23 13:04:02 2012 (r234603) @@ -145,7 +145,8 @@ g_raid_tr_taste_raid1(struct g_raid_tr_o trs = (struct g_raid_tr_raid1_object *)tr; if (tr->tro_volume->v_raid_level != G_RAID_VOLUME_RL_RAID1 || - tr->tro_volume->v_raid_level_qualifier != G_RAID_VOLUME_RLQ_NONE) + (tr->tro_volume->v_raid_level_qualifier != G_RAID_VOLUME_RLQ_R1SM && + tr->tro_volume->v_raid_level_qualifier != G_RAID_VOLUME_RLQ_R1MM)) return (G_RAID_TR_TASTE_FAIL); trs->trso_starting = 1; return (G_RAID_TR_TASTE_SUCCEED); Modified: head/sys/geom/raid/tr_raid1e.c ============================================================================== --- head/sys/geom/raid/tr_raid1e.c Mon Apr 23 12:18:38 2012 (r234602) +++ head/sys/geom/raid/tr_raid1e.c Mon Apr 23 13:04:02 2012 (r234603) @@ -187,7 +187,7 @@ g_raid_tr_taste_raid1e(struct g_raid_tr_ trs = (struct g_raid_tr_raid1e_object *)tr; if (tr->tro_volume->v_raid_level != G_RAID_VOLUME_RL_RAID1E || - tr->tro_volume->v_raid_level_qualifier != G_RAID_VOLUME_RLQ_NONE) + tr->tro_volume->v_raid_level_qualifier != G_RAID_VOLUME_RLQ_R1EA) return (G_RAID_TR_TASTE_FAIL); trs->trso_starting = 1; return (G_RAID_TR_TASTE_SUCCEED); From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 13:13:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB79B106564A; Mon, 23 Apr 2012 13:13:46 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D636F8FC19; Mon, 23 Apr 2012 13:13:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NDDk3H099095; Mon, 23 Apr 2012 13:13:46 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NDDkcZ099093; Mon, 23 Apr 2012 13:13:46 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201204231313.q3NDDkcZ099093@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 23 Apr 2012 13:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234604 - stable/8/usr.bin/vmstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 13:13:47 -0000 Author: pluknet Date: Mon Apr 23 13:13:46 2012 New Revision: 234604 URL: http://svn.freebsd.org/changeset/base/234604 Log: MFC r233298: Garbage collect defunct nlist(3) symbols. Modified: stable/8/usr.bin/vmstat/vmstat.c Directory Properties: stable/8/usr.bin/vmstat/ (props changed) Modified: stable/8/usr.bin/vmstat/vmstat.c ============================================================================== --- stable/8/usr.bin/vmstat/vmstat.c Mon Apr 23 13:04:02 2012 (r234603) +++ stable/8/usr.bin/vmstat/vmstat.c Mon Apr 23 13:13:46 2012 (r234604) @@ -84,26 +84,20 @@ static char da[] = "da"; static struct nlist namelist[] = { #define X_SUM 0 { "_cnt" }, -#define X_BOOTTIME 1 - { "_boottime" }, -#define X_HZ 2 +#define X_HZ 1 { "_hz" }, -#define X_STATHZ 3 +#define X_STATHZ 2 { "_stathz" }, -#define X_NCHSTATS 4 +#define X_NCHSTATS 3 { "_nchstats" }, -#define X_INTRNAMES 5 +#define X_INTRNAMES 4 { "_intrnames" }, -#define X_EINTRNAMES 6 +#define X_EINTRNAMES 5 { "_eintrnames" }, -#define X_INTRCNT 7 +#define X_INTRCNT 6 { "_intrcnt" }, -#define X_EINTRCNT 8 +#define X_EINTRCNT 7 { "_eintrcnt" }, -#define X_KMEMSTATS 9 - { "_kmemstatistics" }, -#define X_KMEMZONES 10 - { "_kmemzones" }, #ifdef notyet #define X_DEFICIT XXX { "_deficit" }, @@ -115,7 +109,7 @@ static struct nlist namelist[] = { { "_xstats" }, #define X_END XXX #else -#define X_END 11 +#define X_END 8 #endif { "" }, }; From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 13:21:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C9DA106564A; Mon, 23 Apr 2012 13:21:29 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3347C8FC0C; Mon, 23 Apr 2012 13:21:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NDLTjk099383; Mon, 23 Apr 2012 13:21:29 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NDLS5O099364; Mon, 23 Apr 2012 13:21:28 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201204231321.q3NDLS5O099364@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 23 Apr 2012 13:21:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234605 - in head/sys: fs/ext2fs fs/hpfs fs/msdosfs fs/nfsclient kern nfsclient sys ufs/ffs ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 13:21:29 -0000 Author: trasz Date: Mon Apr 23 13:21:28 2012 New Revision: 234605 URL: http://svn.freebsd.org/changeset/base/234605 Log: Remove unused thread argument from vtruncbuf(). Reviewed by: kib Modified: head/sys/fs/ext2fs/ext2_inode.c head/sys/fs/hpfs/hpfs_vnops.c head/sys/fs/msdosfs/denode.h head/sys/fs/msdosfs/msdosfs_denode.c head/sys/fs/msdosfs/msdosfs_lookup.c head/sys/fs/msdosfs/msdosfs_vnops.c head/sys/fs/nfsclient/nfs_clbio.c head/sys/kern/vfs_subr.c head/sys/nfsclient/nfs_bio.c head/sys/sys/vnode.h head/sys/ufs/ffs/ffs_extern.h head/sys/ufs/ffs/ffs_inode.c head/sys/ufs/ffs/ffs_snapshot.c head/sys/ufs/ffs/ffs_vnops.c head/sys/ufs/ufs/ufs_inode.c head/sys/ufs/ufs/ufs_lookup.c head/sys/ufs/ufs/ufs_vnops.c head/sys/ufs/ufs/ufsmount.h Modified: head/sys/fs/ext2fs/ext2_inode.c ============================================================================== --- head/sys/fs/ext2fs/ext2_inode.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/fs/ext2fs/ext2_inode.c Mon Apr 23 13:21:28 2012 (r234605) @@ -249,7 +249,7 @@ ext2_truncate(vp, length, flags, cred, t bcopy((caddr_t)&oip->i_db[0], (caddr_t)newblks, sizeof(newblks)); bcopy((caddr_t)oldblks, (caddr_t)&oip->i_db[0], sizeof(oldblks)); oip->i_size = osize; - error = vtruncbuf(ovp, cred, td, length, (int)fs->e2fs_bsize); + error = vtruncbuf(ovp, cred, length, (int)fs->e2fs_bsize); if (error && (allerror == 0)) allerror = error; vnode_pager_setsize(ovp, length); Modified: head/sys/fs/hpfs/hpfs_vnops.c ============================================================================== --- head/sys/fs/hpfs/hpfs_vnops.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/fs/hpfs/hpfs_vnops.c Mon Apr 23 13:21:28 2012 (r234605) @@ -528,7 +528,7 @@ hpfs_setattr(ap) } if (vap->va_size < hp->h_fn.fn_size) { - error = vtruncbuf(vp, cred, td, vap->va_size, DEV_BSIZE); + error = vtruncbuf(vp, cred, vap->va_size, DEV_BSIZE); if (error) return (error); error = hpfs_truncate(hp, vap->va_size); Modified: head/sys/fs/msdosfs/denode.h ============================================================================== --- head/sys/fs/msdosfs/denode.h Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/fs/msdosfs/denode.h Mon Apr 23 13:21:28 2012 (r234605) @@ -276,6 +276,6 @@ int dosdirempty(struct denode *dep); int createde(struct denode *dep, struct denode *ddep, struct denode **depp, struct componentname *cnp); int deupdat(struct denode *dep, int waitfor); int removede(struct denode *pdep, struct denode *dep); -int detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred, struct thread *td); +int detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred); int doscheckpath( struct denode *source, struct denode *target); #endif /* _KERNEL */ Modified: head/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_denode.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/fs/msdosfs/msdosfs_denode.c Mon Apr 23 13:21:28 2012 (r234605) @@ -326,12 +326,11 @@ deupdat(dep, waitfor) * Truncate the file described by dep to the length specified by length. */ int -detrunc(dep, length, flags, cred, td) +detrunc(dep, length, flags, cred) struct denode *dep; u_long length; int flags; struct ucred *cred; - struct thread *td; { int error; int allerror; @@ -426,7 +425,7 @@ detrunc(dep, length, flags, cred, td) dep->de_FileSize = length; if (!isadir) dep->de_flag |= DE_UPDATE | DE_MODIFIED; - allerror = vtruncbuf(DETOV(dep), cred, td, length, pmp->pm_bpcluster); + allerror = vtruncbuf(DETOV(dep), cred, length, pmp->pm_bpcluster); #ifdef MSDOSFS_DEBUG if (allerror) printf("detrunc(): vtruncbuf error %d\n", allerror); @@ -504,7 +503,7 @@ deextend(dep, length, cred) error = extendfile(dep, count, NULL, NULL, DE_CLEAR); if (error) { /* truncate the added clusters away again */ - (void) detrunc(dep, dep->de_FileSize, 0, cred, NULL); + (void) detrunc(dep, dep->de_FileSize, 0, cred); return (error); } } @@ -607,7 +606,7 @@ msdosfs_inactive(ap) dep, dep->de_refcnt, vp->v_mount->mnt_flag, MNT_RDONLY); #endif if (dep->de_refcnt <= 0 && (vp->v_mount->mnt_flag & MNT_RDONLY) == 0) { - error = detrunc(dep, (u_long) 0, 0, NOCRED, td); + error = detrunc(dep, (u_long) 0, 0, NOCRED); dep->de_flag |= DE_UPDATE; dep->de_Name[0] = SLOT_DELETED; } Modified: head/sys/fs/msdosfs/msdosfs_lookup.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_lookup.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/fs/msdosfs/msdosfs_lookup.c Mon Apr 23 13:21:28 2012 (r234605) @@ -649,7 +649,7 @@ createde(dep, ddep, depp, cnp) dirclust = de_clcount(pmp, diroffset); error = extendfile(ddep, dirclust, 0, 0, DE_CLEAR); if (error) { - (void)detrunc(ddep, ddep->de_FileSize, 0, NOCRED, NULL); + (void)detrunc(ddep, ddep->de_FileSize, 0, NOCRED); return error; } Modified: head/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vnops.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/fs/msdosfs/msdosfs_vnops.c Mon Apr 23 13:21:28 2012 (r234605) @@ -476,7 +476,7 @@ msdosfs_setattr(ap) */ break; } - error = detrunc(dep, vap->va_size, 0, cred, td); + error = detrunc(dep, vap->va_size, 0, cred); if (error) return error; } @@ -835,11 +835,11 @@ msdosfs_write(ap) errexit: if (error) { if (ioflag & IO_UNIT) { - detrunc(dep, osize, ioflag & IO_SYNC, NOCRED, NULL); + detrunc(dep, osize, ioflag & IO_SYNC, NOCRED); uio->uio_offset -= resid - uio->uio_resid; uio->uio_resid = resid; } else { - detrunc(dep, dep->de_FileSize, ioflag & IO_SYNC, NOCRED, NULL); + detrunc(dep, dep->de_FileSize, ioflag & IO_SYNC, NOCRED); if (uio->uio_resid != resid) error = 0; } @@ -1429,7 +1429,6 @@ msdosfs_rmdir(ap) struct vnode *dvp = ap->a_dvp; struct componentname *cnp = ap->a_cnp; struct denode *ip, *dp; - struct thread *td = cnp->cn_thread; int error; ip = VTODE(vp); @@ -1467,7 +1466,7 @@ msdosfs_rmdir(ap) /* * Truncate the directory that is being deleted. */ - error = detrunc(ip, (u_long)0, IO_SYNC, cnp->cn_cred, td); + error = detrunc(ip, (u_long)0, IO_SYNC, cnp->cn_cred); cache_purge(vp); out: Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/fs/nfsclient/nfs_clbio.c Mon Apr 23 13:21:28 2012 (r234605) @@ -1817,7 +1817,7 @@ ncl_meta_setsize(struct vnode *vp, struc * truncation point. We may have a B_DELWRI and/or B_CACHE * buffer that now needs to be truncated. */ - error = vtruncbuf(vp, cred, td, nsize, biosize); + error = vtruncbuf(vp, cred, nsize, biosize); lbn = nsize / biosize; bufsize = nsize & (biosize - 1); bp = nfs_getcacheblk(vp, lbn, bufsize, td); Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/kern/vfs_subr.c Mon Apr 23 13:21:28 2012 (r234605) @@ -1327,8 +1327,7 @@ flushbuflist(struct bufv *bufv, int flag * sync activity. */ int -vtruncbuf(struct vnode *vp, struct ucred *cred, struct thread *td, - off_t length, int blksize) +vtruncbuf(struct vnode *vp, struct ucred *cred, off_t length, int blksize) { struct buf *bp, *nbp; int anyfreed; Modified: head/sys/nfsclient/nfs_bio.c ============================================================================== --- head/sys/nfsclient/nfs_bio.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/nfsclient/nfs_bio.c Mon Apr 23 13:21:28 2012 (r234605) @@ -1796,7 +1796,7 @@ nfs_meta_setsize(struct vnode *vp, struc * truncation point. We may have a B_DELWRI and/or B_CACHE * buffer that now needs to be truncated. */ - error = vtruncbuf(vp, cred, td, nsize, biosize); + error = vtruncbuf(vp, cred, nsize, biosize); lbn = nsize / biosize; bufsize = nsize & (biosize - 1); bp = nfs_getcacheblk(vp, lbn, bufsize, td); Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/sys/vnode.h Mon Apr 23 13:21:28 2012 (r234605) @@ -634,8 +634,8 @@ void vhold(struct vnode *); void vholdl(struct vnode *); void vinactive(struct vnode *, struct thread *); int vinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo); -int vtruncbuf(struct vnode *vp, struct ucred *cred, struct thread *td, - off_t length, int blksize); +int vtruncbuf(struct vnode *vp, struct ucred *cred, off_t length, + int blksize); void vunref(struct vnode *); void vn_printf(struct vnode *vp, const char *fmt, ...) __printflike(2,3); #define vprint(label, vp) vn_printf((vp), "%s\n", (label)) Modified: head/sys/ufs/ffs/ffs_extern.h ============================================================================== --- head/sys/ufs/ffs/ffs_extern.h Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/ufs/ffs/ffs_extern.h Mon Apr 23 13:21:28 2012 (r234605) @@ -93,7 +93,7 @@ void ffs_snapshot_unmount(struct mount * void process_deferred_inactive(struct mount *mp); void ffs_sync_snap(struct mount *, int); int ffs_syncvnode(struct vnode *vp, int waitfor, int flags); -int ffs_truncate(struct vnode *, off_t, int, struct ucred *, struct thread *); +int ffs_truncate(struct vnode *, off_t, int, struct ucred *); int ffs_update(struct vnode *, int); int ffs_valloc(struct vnode *, int, struct ucred *, struct vnode **); Modified: head/sys/ufs/ffs/ffs_inode.c ============================================================================== --- head/sys/ufs/ffs/ffs_inode.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/ufs/ffs/ffs_inode.c Mon Apr 23 13:21:28 2012 (r234605) @@ -170,12 +170,11 @@ loop: * disk blocks. */ int -ffs_truncate(vp, length, flags, cred, td) +ffs_truncate(vp, length, flags, cred) struct vnode *vp; off_t length; int flags; struct ucred *cred; - struct thread *td; { struct inode *ip; ufs2_daddr_t bn, lbn, lastblock, lastiblock[NIADDR], indir_lbn[NIADDR]; @@ -449,7 +448,7 @@ ffs_truncate(vp, length, flags, cred, td ip->i_size = osize; DIP_SET(ip, i_size, osize); - error = vtruncbuf(vp, cred, td, length, fs->fs_bsize); + error = vtruncbuf(vp, cred, length, fs->fs_bsize); if (error && (allerror == 0)) allerror = error; Modified: head/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- head/sys/ufs/ffs/ffs_snapshot.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/ufs/ffs/ffs_snapshot.c Mon Apr 23 13:21:28 2012 (r234605) @@ -850,7 +850,7 @@ out: mp->mnt_flag = (mp->mnt_flag & MNT_QUOTA) | (flag & ~MNT_QUOTA); MNT_IUNLOCK(mp); if (error) - (void) ffs_truncate(vp, (off_t)0, 0, NOCRED, td); + (void) ffs_truncate(vp, (off_t)0, 0, NOCRED); (void) ffs_syncvnode(vp, MNT_WAIT, 0); if (error) vput(vp); @@ -1989,7 +1989,7 @@ ffs_snapshot_mount(mp) reason = "non-snapshot"; } else { reason = "old format snapshot"; - (void)ffs_truncate(vp, (off_t)0, 0, NOCRED, td); + (void)ffs_truncate(vp, (off_t)0, 0, NOCRED); (void)ffs_syncvnode(vp, MNT_WAIT, 0); } printf("ffs_snapshot_mount: %s inode %d\n", Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/ufs/ffs/ffs_vnops.c Mon Apr 23 13:21:28 2012 (r234605) @@ -812,8 +812,7 @@ ffs_write(ap) if (error) { if (ioflag & IO_UNIT) { (void)ffs_truncate(vp, osize, - IO_NORMAL | (ioflag & IO_SYNC), - ap->a_cred, uio->uio_td); + IO_NORMAL | (ioflag & IO_SYNC), ap->a_cred); uio->uio_offset -= resid - uio->uio_resid; uio->uio_resid = resid; } @@ -1135,7 +1134,7 @@ ffs_extwrite(struct vnode *vp, struct ui if (error) { if (ioflag & IO_UNIT) { (void)ffs_truncate(vp, osize, - IO_EXT | (ioflag&IO_SYNC), ucred, uio->uio_td); + IO_EXT | (ioflag&IO_SYNC), ucred); uio->uio_offset -= resid - uio->uio_resid; uio->uio_resid = resid; } @@ -1326,7 +1325,7 @@ ffs_close_ea(struct vnode *vp, int commi luio.uio_td = td; /* XXX: I'm not happy about truncating to zero size */ if (ip->i_ea_len < dp->di_extsize) - error = ffs_truncate(vp, 0, IO_EXT, cred, td); + error = ffs_truncate(vp, 0, IO_EXT, cred); error = ffs_extwrite(vp, &luio, IO_EXT | IO_SYNC, cred); } if (--ip->i_ea_refs == 0) { Modified: head/sys/ufs/ufs/ufs_inode.c ============================================================================== --- head/sys/ufs/ufs/ufs_inode.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/ufs/ufs/ufs_inode.c Mon Apr 23 13:21:28 2012 (r234605) @@ -129,8 +129,7 @@ ufs_inactive(ap) if (ip->i_ump->um_fstype == UFS2) isize += ip->i_din2->di_extsize; if (ip->i_effnlink <= 0 && isize && !UFS_RDONLY(ip)) - error = UFS_TRUNCATE(vp, (off_t)0, IO_EXT | IO_NORMAL, - NOCRED, td); + error = UFS_TRUNCATE(vp, (off_t)0, IO_EXT | IO_NORMAL, NOCRED); if (ip->i_nlink <= 0 && ip->i_mode && !UFS_RDONLY(ip)) { #ifdef QUOTA if (!getinoquota(ip)) Modified: head/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- head/sys/ufs/ufs/ufs_lookup.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/ufs/ufs/ufs_lookup.c Mon Apr 23 13:21:28 2012 (r234605) @@ -1133,7 +1133,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir ufsdirhash_dirtrunc(dp, dp->i_endoff); #endif (void) UFS_TRUNCATE(dvp, (off_t)dp->i_endoff, - IO_NORMAL | IO_SYNC, cr, td); + IO_NORMAL | IO_SYNC, cr); if (tvp != NULL) vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY); } Modified: head/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vnops.c Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/ufs/ufs/ufs_vnops.c Mon Apr 23 13:21:28 2012 (r234605) @@ -621,7 +621,7 @@ ufs_setattr(ap) return (0); } if ((error = UFS_TRUNCATE(vp, vap->va_size, IO_NORMAL, - cred, td)) != 0) + cred)) != 0) return (error); } if (vap->va_atime.tv_sec != VNOVAL || @@ -1567,8 +1567,7 @@ unlockout: if (tdp->i_dirhash != NULL) ufsdirhash_dirtrunc(tdp, endoff); #endif - UFS_TRUNCATE(tdvp, endoff, IO_NORMAL | IO_SYNC, tcnp->cn_cred, - td); + UFS_TRUNCATE(tdvp, endoff, IO_NORMAL | IO_SYNC, tcnp->cn_cred); } if (error == 0 && tdp->i_flag & IN_NEEDSYNC) error = VOP_FSYNC(tdvp, MNT_WAIT, td); Modified: head/sys/ufs/ufs/ufsmount.h ============================================================================== --- head/sys/ufs/ufs/ufsmount.h Mon Apr 23 13:13:46 2012 (r234604) +++ head/sys/ufs/ufs/ufsmount.h Mon Apr 23 13:21:28 2012 (r234605) @@ -100,7 +100,7 @@ struct ufsmount { int um_candelete; /* devvp supports TRIM */ int (*um_balloc)(struct vnode *, off_t, int, struct ucred *, int, struct buf **); int (*um_blkatoff)(struct vnode *, off_t, char **, struct buf **); - int (*um_truncate)(struct vnode *, off_t, int, struct ucred *, struct thread *); + int (*um_truncate)(struct vnode *, off_t, int, struct ucred *); int (*um_update)(struct vnode *, int); int (*um_valloc)(struct vnode *, int, struct ucred *, struct vnode **); int (*um_vfree)(struct vnode *, ino_t, int); @@ -111,7 +111,7 @@ struct ufsmount { #define UFS_BALLOC(aa, bb, cc, dd, ee, ff) VFSTOUFS((aa)->v_mount)->um_balloc(aa, bb, cc, dd, ee, ff) #define UFS_BLKATOFF(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_blkatoff(aa, bb, cc, dd) -#define UFS_TRUNCATE(aa, bb, cc, dd, ee) VFSTOUFS((aa)->v_mount)->um_truncate(aa, bb, cc, dd, ee) +#define UFS_TRUNCATE(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_truncate(aa, bb, cc, dd) #define UFS_UPDATE(aa, bb) VFSTOUFS((aa)->v_mount)->um_update(aa, bb) #define UFS_VALLOC(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_valloc(aa, bb, cc, dd) #define UFS_VFREE(aa, bb, cc) VFSTOUFS((aa)->v_mount)->um_vfree(aa, bb, cc) From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 13:23:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0031C1065674; Mon, 23 Apr 2012 13:23:26 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6374A8FC15; Mon, 23 Apr 2012 13:23:26 +0000 (UTC) Received: by qcsg15 with SMTP id g15so8295460qcs.13 for ; Mon, 23 Apr 2012 06:23:20 -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:x-mailer :mime-version:content-type; bh=ZizSvRyk3q1aW+K3HB0MgPw12XTulQUZrjAWZ6JXb4s=; b=m1bQggWPyir5yI5I0aOPQI4ZFYq4RN35P7r/wc353UpXMhAZ+epidhL1R8QxO8wVV2 pQ/B8NIHJmPWZE80oNeb1t+Rrn1yG3SUdNTsm9JoM/qFI/LDmKOBKsTxjjLH6GH/AbSm Cm3Y9up/I3PHuP/j96fMkhX2STotEq0Bi+HJw6xRnocW9r63E//7IUVKCwfCuuO0Q44g 3bujSGfsCFC4ifZXGCpEYvA9R9dR4BGAAttSU5Mns0VoeGfNzA9CBwPD76DKicQF7sli tE6svAVHNCjQW6qmAxHlGp7bCFo/+U8JaInHYsl0xNFmb8vvFQIbhfGO7fj7DBGuXUIh 7eGw== Received: by 10.224.202.193 with SMTP id ff1mr13713793qab.36.1335187400371; Mon, 23 Apr 2012 06:23:20 -0700 (PDT) Received: from kan.dyndns.org (c-24-63-226-98.hsd1.ma.comcast.net. [24.63.226.98]) by mx.google.com with ESMTPS id o7sm21663757qan.15.2012.04.23.06.23.18 (version=SSLv3 cipher=OTHER); Mon, 23 Apr 2012 06:23:18 -0700 (PDT) Date: Mon, 23 Apr 2012 09:23:11 -0400 From: Alexander Kabaev To: Alexander Motin Message-ID: <20120423092311.2be21b71@kan.dyndns.org> In-Reply-To: <201204231304.q3ND43Yg098748@svn.freebsd.org> References: <201204231304.q3ND43Yg098748@svn.freebsd.org> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/8kjeteoBYR9yJQpiR8+3/Nf"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234603 - head/sys/geom/raid X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 13:23:27 -0000 --Sig_/8kjeteoBYR9yJQpiR8+3/Nf Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 23 Apr 2012 13:04:03 +0000 (UTC) Alexander Motin wrote: > Author: mav > Date: Mon Apr 23 13:04:02 2012 > New Revision: 234603 > URL: http://svn.freebsd.org/changeset/base/234603 >=20 > Log: > Add names for all primary RAID levels defined by DDF 2.0 > specification. >=20 > Modified: > head/sys/geom/raid/g_raid.c > head/sys/geom/raid/g_raid.h > head/sys/geom/raid/tr_raid1.c > head/sys/geom/raid/tr_raid1e.c >=20 > Modified: head/sys/geom/raid/g_raid.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/geom/raid/g_raid.c Mon Apr 23 12:18:38 > 2012 (r234602) +++ head/sys/geom/raid/g_raid.c Mon Apr > 23 13:04:02 2012 (r234603) @@ -277,31 +277,87 @@ > g_raid_volume_level2str(int level, int q case G_RAID_VOLUME_RL_RAID1: > return ("RAID1"); > case G_RAID_VOLUME_RL_RAID3: > + if (qual =3D=3D G_RAID_VOLUME_RLQ_R3P0) > + return ("RAID3-P0"); > + if (qual =3D=3D G_RAID_VOLUME_RLQ_R3PN) > + return ("RAID3-PN"); > return ("RAID3"); > case G_RAID_VOLUME_RL_RAID4: > + if (qual =3D=3D G_RAID_VOLUME_RLQ_R4P0) > + return ("RAID3-P0"); > + if (qual =3D=3D G_RAID_VOLUME_RLQ_R4PN) > + return ("RAID3-PN"); > return ("RAID4"); Copy & paste from raid-3 above? --=20 Alexander Kabaev --Sig_/8kjeteoBYR9yJQpiR8+3/Nf Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iD8DBQFPlVfFQ6z1jMm+XZYRApeoAKDNGCqlMedsIttUgDhBCeI2TUbBigCfd0h2 Bh32i3jzf11kY2iAZ5lnQcQ= =BYgO -----END PGP SIGNATURE----- --Sig_/8kjeteoBYR9yJQpiR8+3/Nf-- From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 14:10:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 626821065673; Mon, 23 Apr 2012 14:10:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 493F78FC17; Mon, 23 Apr 2012 14:10:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NEAZri001162; Mon, 23 Apr 2012 14:10:35 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NEAYhB001146; Mon, 23 Apr 2012 14:10:34 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201204231410.q3NEAYhB001146@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 23 Apr 2012 14:10:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234607 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/cd9660 fs/ext2fs fs/hpfs fs/msdosfs fs/nullfs fs/smbfs fs/tmpfs fs/unionfs gnu/fs/reiserfs kern sys ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 14:10:35 -0000 Author: trasz Date: Mon Apr 23 14:10:34 2012 New Revision: 234607 URL: http://svn.freebsd.org/changeset/base/234607 Log: Remove unused thread argument to vrecycle(). Reviewed by: kib Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c head/sys/fs/cd9660/cd9660_node.c head/sys/fs/ext2fs/ext2_inode.c head/sys/fs/hpfs/hpfs_vnops.c head/sys/fs/msdosfs/msdosfs_denode.c head/sys/fs/nullfs/null_vnops.c head/sys/fs/smbfs/smbfs_node.c head/sys/fs/tmpfs/tmpfs_vnops.c head/sys/fs/unionfs/union_vnops.c head/sys/gnu/fs/reiserfs/reiserfs_inode.c head/sys/kern/uipc_mqueue.c head/sys/kern/vfs_subr.c head/sys/sys/vnode.h head/sys/ufs/ufs/ufs_inode.c 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 Apr 23 13:34:12 2012 (r234606) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Apr 23 14:10:34 2012 (r234607) @@ -4556,7 +4556,7 @@ zfs_inactive(vnode_t *vp, cred_t *cr, ca ASSERT(vp->v_count <= 1); vp->v_count = 0; VI_UNLOCK(vp); - vrecycle(vp, curthread); + vrecycle(vp); rw_exit(&zfsvfs->z_teardown_inactive_lock); return; } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Apr 23 14:10:34 2012 (r234607) @@ -1428,7 +1428,7 @@ zfs_zinactive(znode_t *zp) mutex_exit(&zp->z_lock); ZFS_OBJ_HOLD_EXIT(zfsvfs, z_id); ASSERT(vp->v_count == 0); - vrecycle(vp, curthread); + vrecycle(vp); vfslocked = VFS_LOCK_GIANT(zfsvfs->z_vfs); zfs_rmnode(zp); VFS_UNLOCK_GIANT(vfslocked); Modified: head/sys/fs/cd9660/cd9660_node.c ============================================================================== --- head/sys/fs/cd9660/cd9660_node.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/fs/cd9660/cd9660_node.c Mon Apr 23 14:10:34 2012 (r234607) @@ -65,7 +65,6 @@ cd9660_inactive(ap) } */ *ap; { struct vnode *vp = ap->a_vp; - struct thread *td = ap->a_td; struct iso_node *ip = VTOI(vp); int error = 0; @@ -74,7 +73,7 @@ cd9660_inactive(ap) * so that it can be reused immediately. */ if (ip->inode.iso_mode == 0) - vrecycle(vp, td); + vrecycle(vp); return error; } Modified: head/sys/fs/ext2fs/ext2_inode.c ============================================================================== --- head/sys/fs/ext2fs/ext2_inode.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/fs/ext2fs/ext2_inode.c Mon Apr 23 14:10:34 2012 (r234607) @@ -498,7 +498,7 @@ out: * so that it can be reused immediately. */ if (ip->i_mode == 0) - vrecycle(vp, td); + vrecycle(vp); return (error); } Modified: head/sys/fs/hpfs/hpfs_vnops.c ============================================================================== --- head/sys/fs/hpfs/hpfs_vnops.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/fs/hpfs/hpfs_vnops.c Mon Apr 23 14:10:34 2012 (r234607) @@ -576,7 +576,7 @@ hpfs_inactive(ap) } if (hp->h_flag & H_INVAL) { - vrecycle(vp, ap->a_td); + vrecycle(vp); return (0); } Modified: head/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_denode.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/fs/msdosfs/msdosfs_denode.c Mon Apr 23 14:10:34 2012 (r234607) @@ -583,7 +583,6 @@ msdosfs_inactive(ap) { struct vnode *vp = ap->a_vp; struct denode *dep = VTODE(vp); - struct thread *td = ap->a_td; int error = 0; #ifdef MSDOSFS_DEBUG @@ -622,6 +621,6 @@ out: vrefcnt(vp), dep->de_Name[0]); #endif if (dep->de_Name[0] == SLOT_DELETED || dep->de_Name[0] == SLOT_EMPTY) - vrecycle(vp, td); + vrecycle(vp); return (error); } Modified: head/sys/fs/nullfs/null_vnops.c ============================================================================== --- head/sys/fs/nullfs/null_vnops.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/fs/nullfs/null_vnops.c Mon Apr 23 14:10:34 2012 (r234607) @@ -678,7 +678,6 @@ static int null_inactive(struct vop_inactive_args *ap) { struct vnode *vp = ap->a_vp; - struct thread *td = ap->a_td; vp->v_object = NULL; @@ -686,7 +685,7 @@ null_inactive(struct vop_inactive_args * * If this is the last reference, then free up the vnode * so as not to tie up the lower vnodes. */ - vrecycle(vp, td); + vrecycle(vp); return (0); } Modified: head/sys/fs/smbfs/smbfs_node.c ============================================================================== --- head/sys/fs/smbfs/smbfs_node.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/fs/smbfs/smbfs_node.c Mon Apr 23 14:10:34 2012 (r234607) @@ -373,7 +373,7 @@ smbfs_inactive(ap) smbfs_attr_cacheremove(vp); } if (np->n_flag & NGONE) - vrecycle(vp, td); + vrecycle(vp); return (0); } /* Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Mon Apr 23 14:10:34 2012 (r234607) @@ -1577,7 +1577,6 @@ static int tmpfs_inactive(struct vop_inactive_args *v) { struct vnode *vp = v->a_vp; - struct thread *l = v->a_td; struct tmpfs_node *node; @@ -1586,7 +1585,7 @@ tmpfs_inactive(struct vop_inactive_args node = VP_TO_TMPFS_NODE(vp); if (node->tn_links == 0) - vrecycle(vp, l); + vrecycle(vp); return 0; } Modified: head/sys/fs/unionfs/union_vnops.c ============================================================================== --- head/sys/fs/unionfs/union_vnops.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/fs/unionfs/union_vnops.c Mon Apr 23 14:10:34 2012 (r234607) @@ -1702,7 +1702,7 @@ static int unionfs_inactive(struct vop_inactive_args *ap) { ap->a_vp->v_object = NULL; - vrecycle(ap->a_vp, ap->a_td); + vrecycle(ap->a_vp); return (0); } Modified: head/sys/gnu/fs/reiserfs/reiserfs_inode.c ============================================================================== --- head/sys/gnu/fs/reiserfs/reiserfs_inode.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/gnu/fs/reiserfs/reiserfs_inode.c Mon Apr 23 14:10:34 2012 (r234607) @@ -104,12 +104,10 @@ reiserfs_inactive(struct vop_inactive_ar { int error; struct vnode *vp; - struct thread *td; struct reiserfs_node *ip; error = 0; vp = ap->a_vp; - td = ap->a_td; ip = VTOI(vp); reiserfs_log(LOG_DEBUG, "deactivating inode used %d times\n", @@ -129,7 +127,7 @@ out: */ if (ip->i_mode == 0) { reiserfs_log(LOG_DEBUG, "recyling\n"); - vrecycle(vp, td); + vrecycle(vp); } return (error); Modified: head/sys/kern/uipc_mqueue.c ============================================================================== --- head/sys/kern/uipc_mqueue.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/kern/uipc_mqueue.c Mon Apr 23 14:10:34 2012 (r234607) @@ -703,7 +703,7 @@ do_recycle(void *context, int pending __ { struct vnode *vp = (struct vnode *)context; - vrecycle(vp, curthread); + vrecycle(vp); vdrop(vp); } @@ -1065,7 +1065,7 @@ mqfs_inactive(struct vop_inactive_args * struct mqfs_node *pn = VTON(ap->a_vp); if (pn->mn_deleted) - vrecycle(ap->a_vp, ap->a_td); + vrecycle(ap->a_vp); return (0); } Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/kern/vfs_subr.c Mon Apr 23 14:10:34 2012 (r234607) @@ -2659,7 +2659,7 @@ loop: * Recycle an unused vnode to the front of the free list. */ int -vrecycle(struct vnode *vp, struct thread *td) +vrecycle(struct vnode *vp) { int recycled; Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/sys/vnode.h Mon Apr 23 14:10:34 2012 (r234607) @@ -639,7 +639,7 @@ int vtruncbuf(struct vnode *vp, struct u void vunref(struct vnode *); void vn_printf(struct vnode *vp, const char *fmt, ...) __printflike(2,3); #define vprint(label, vp) vn_printf((vp), "%s\n", (label)) -int vrecycle(struct vnode *vp, struct thread *td); +int vrecycle(struct vnode *vp); int vn_close(struct vnode *vp, int flags, struct ucred *file_cred, struct thread *td); void vn_finished_write(struct mount *mp); Modified: head/sys/ufs/ufs/ufs_inode.c ============================================================================== --- head/sys/ufs/ufs/ufs_inode.c Mon Apr 23 13:34:12 2012 (r234606) +++ head/sys/ufs/ufs/ufs_inode.c Mon Apr 23 14:10:34 2012 (r234607) @@ -73,7 +73,6 @@ ufs_inactive(ap) { struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); - struct thread *td = ap->a_td; mode_t mode; int error = 0; off_t isize; @@ -172,7 +171,7 @@ out: * so that it can be reused immediately. */ if (ip->i_mode == 0) - vrecycle(vp, td); + vrecycle(vp); if (mp != NULL) vn_finished_secondary_write(mp); return (error); From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 14:44:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2CCE11065672; Mon, 23 Apr 2012 14:44:19 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F23CD8FC17; Mon, 23 Apr 2012 14:44:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NEiIvo002221; Mon, 23 Apr 2012 14:44:18 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NEiIu8002219; Mon, 23 Apr 2012 14:44:18 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201204231444.q3NEiIu8002219@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 23 Apr 2012 14:44:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234608 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 14:44:19 -0000 Author: trasz Date: Mon Apr 23 14:44:18 2012 New Revision: 234608 URL: http://svn.freebsd.org/changeset/base/234608 Log: Remove unused thread argument from clear_inodeps() and clear_remove(). Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Mon Apr 23 14:10:34 2012 (r234607) +++ head/sys/ufs/ffs/ffs_softdep.c Mon Apr 23 14:44:18 2012 (r234608) @@ -773,8 +773,8 @@ struct bmsafemap_hashhead; static void softdep_error(char *, int); static void drain_output(struct vnode *); static struct buf *getdirtybuf(struct buf *, struct mtx *, int); -static void clear_remove(struct thread *); -static void clear_inodedeps(struct thread *); +static void clear_remove(void); +static void clear_inodedeps(void); static void unlinked_inodedep(struct mount *, struct inodedep *); static void clear_unlinked_inodedep(struct inodedep *); static struct inodedep *first_unlinked_inodedep(struct ufsmount *); @@ -1351,12 +1351,12 @@ softdep_flush(void) * If requested, try removing inode or removal dependencies. */ if (req_clear_inodedeps) { - clear_inodedeps(td); + clear_inodedeps(); req_clear_inodedeps -= 1; wakeup_one(&proc_waiting); } if (req_clear_remove) { - clear_remove(td); + clear_remove(); req_clear_remove -= 1; wakeup_one(&proc_waiting); } @@ -1499,7 +1499,6 @@ softdep_process_worklist(mp, full) struct mount *mp; int full; { - struct thread *td = curthread; int cnt, matchcnt; struct ufsmount *ump; long starttime; @@ -1523,12 +1522,12 @@ softdep_process_worklist(mp, full) * If requested, try removing inode or removal dependencies. */ if (req_clear_inodedeps) { - clear_inodedeps(td); + clear_inodedeps(); req_clear_inodedeps -= 1; wakeup_one(&proc_waiting); } if (req_clear_remove) { - clear_remove(td); + clear_remove(); req_clear_remove -= 1; wakeup_one(&proc_waiting); } @@ -12785,8 +12784,7 @@ pause_timer(arg) * reduce the number of dirrem, freefile, and freeblks dependency structures. */ static void -clear_remove(td) - struct thread *td; +clear_remove(void) { struct pagedep_hashhead *pagedephd; struct pagedep *pagedep; @@ -12845,8 +12843,7 @@ clear_remove(td) * the number of inodedep dependency structures. */ static void -clear_inodedeps(td) - struct thread *td; +clear_inodedeps(void) { struct inodedep_hashhead *inodedephd; struct inodedep *inodedep; From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 15:47:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BD75106566B; Mon, 23 Apr 2012 15:47:08 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36E9E8FC17; Mon, 23 Apr 2012 15:47:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NFl8cJ004310; Mon, 23 Apr 2012 15:47:08 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NFl88N004308; Mon, 23 Apr 2012 15:47:08 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204231547.q3NFl88N004308@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 23 Apr 2012 15:47:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234609 - head/sys/powerpc/mpc85xx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 15:47:08 -0000 Author: nwhitehorn Date: Mon Apr 23 15:47:07 2012 New Revision: 234609 URL: http://svn.freebsd.org/changeset/base/234609 Log: Fix missing header for powerpc_iomb(). Pointy hat to: me Modified: head/sys/powerpc/mpc85xx/mpc85xx.c Modified: head/sys/powerpc/mpc85xx/mpc85xx.c ============================================================================== --- head/sys/powerpc/mpc85xx/mpc85xx.c Mon Apr 23 14:44:18 2012 (r234608) +++ head/sys/powerpc/mpc85xx/mpc85xx.c Mon Apr 23 15:47:07 2012 (r234609) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 16:35:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D9077106564A; Mon, 23 Apr 2012 16:35:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C46FB8FC0C; Mon, 23 Apr 2012 16:35:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NGZJwv005887; Mon, 23 Apr 2012 16:35:19 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NGZJTD005885; Mon, 23 Apr 2012 16:35:19 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201204231635.q3NGZJTD005885@svn.freebsd.org> From: Alexander Motin Date: Mon, 23 Apr 2012 16:35:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234610 - head/sys/geom/raid X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 16:35:19 -0000 Author: mav Date: Mon Apr 23 16:35:19 2012 New Revision: 234610 URL: http://svn.freebsd.org/changeset/base/234610 Log: Fix copy-paste typo in r234603. Submitted by: kan Modified: head/sys/geom/raid/g_raid.c Modified: head/sys/geom/raid/g_raid.c ============================================================================== --- head/sys/geom/raid/g_raid.c Mon Apr 23 15:47:07 2012 (r234609) +++ head/sys/geom/raid/g_raid.c Mon Apr 23 16:35:19 2012 (r234610) @@ -284,9 +284,9 @@ g_raid_volume_level2str(int level, int q return ("RAID3"); case G_RAID_VOLUME_RL_RAID4: if (qual == G_RAID_VOLUME_RLQ_R4P0) - return ("RAID3-P0"); + return ("RAID4-P0"); if (qual == G_RAID_VOLUME_RLQ_R4PN) - return ("RAID3-PN"); + return ("RAID4-PN"); return ("RAID4"); case G_RAID_VOLUME_RL_RAID5: if (qual == G_RAID_VOLUME_RLQ_R5RA) From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 16:36:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1474A106564A; Mon, 23 Apr 2012 16:36:55 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2C4BB8FC0C; Mon, 23 Apr 2012 16:36:53 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so12024869bkc.13 for ; Mon, 23 Apr 2012 09:36:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Tankahyo9zNYYDeig4Jq31PMLimjL9ZnJRRNYZ5dyP0=; b=yf8Pslke7cBNHKb+753JdT7csHwOtvSzFr/HLFATXROWAvje6qiQQ650/TgZo6zpEz vK+XY1rZDd1PpwZzDjxZe1eMdknSKRj4TmNerPse752fJI2Z7QO2BdSeGRb2QyqSxOb7 RpECr+krVtmLaQMjPj/TcJWtCVcnyvU3AEMYlNlvZOQ/Hljbx2vzbQVbBGYaQucTLGUJ ffupKD+MgX8fW69H49UEMlDPi871mUK00IJ6Ua62mLYbTUS56Lye8jBVVJoLZL+B8EIU pPAB/ip/YSRuEesHDA3qG8PvZ3F3Z22snI+KyLzqHcYkV7+87+p6NRx7arjSPj4Eexx5 QRrA== Received: by 10.204.152.88 with SMTP id f24mr5000079bkw.121.1335199013143; Mon, 23 Apr 2012 09:36:53 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id g8sm2051984bkt.9.2012.04.23.09.36.51 (version=SSLv3 cipher=OTHER); Mon, 23 Apr 2012 09:36:52 -0700 (PDT) Sender: Alexander Motin Message-ID: <4F958522.20506@FreeBSD.org> Date: Mon, 23 Apr 2012 19:36:50 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120328 Thunderbird/10.0.3 MIME-Version: 1.0 To: Alexander Kabaev References: <201204231304.q3ND43Yg098748@svn.freebsd.org> <20120423092311.2be21b71@kan.dyndns.org> In-Reply-To: <20120423092311.2be21b71@kan.dyndns.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234603 - head/sys/geom/raid X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 16:36:55 -0000 On 04/23/12 16:23, Alexander Kabaev wrote: > On Mon, 23 Apr 2012 13:04:03 +0000 (UTC) > Alexander Motin wrote: > >> Author: mav >> Date: Mon Apr 23 13:04:02 2012 >> New Revision: 234603 >> URL: http://svn.freebsd.org/changeset/base/234603 >> >> Log: >> Add names for all primary RAID levels defined by DDF 2.0 >> specification. >> >> Modified: >> head/sys/geom/raid/g_raid.c >> head/sys/geom/raid/g_raid.h >> head/sys/geom/raid/tr_raid1.c >> head/sys/geom/raid/tr_raid1e.c >> >> Modified: head/sys/geom/raid/g_raid.c >> ============================================================================== >> --- head/sys/geom/raid/g_raid.c Mon Apr 23 12:18:38 >> 2012 (r234602) +++ head/sys/geom/raid/g_raid.c Mon Apr >> 23 13:04:02 2012 (r234603) @@ -277,31 +277,87 @@ >> g_raid_volume_level2str(int level, int q case G_RAID_VOLUME_RL_RAID1: >> return ("RAID1"); >> case G_RAID_VOLUME_RL_RAID3: >> + if (qual == G_RAID_VOLUME_RLQ_R3P0) >> + return ("RAID3-P0"); >> + if (qual == G_RAID_VOLUME_RLQ_R3PN) >> + return ("RAID3-PN"); >> return ("RAID3"); >> case G_RAID_VOLUME_RL_RAID4: >> + if (qual == G_RAID_VOLUME_RLQ_R4P0) >> + return ("RAID3-P0"); >> + if (qual == G_RAID_VOLUME_RLQ_R4PN) >> + return ("RAID3-PN"); >> return ("RAID4"); > > Copy& paste from raid-3 above? Fixed at r234603. Thanks. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 17:15:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7EC2106566B; Mon, 23 Apr 2012 17:15:06 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD1E58FC08; Mon, 23 Apr 2012 17:15:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NHF6WV007114; Mon, 23 Apr 2012 17:15:06 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NHF63u007112; Mon, 23 Apr 2012 17:15:06 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201204231715.q3NHF63u007112@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 23 Apr 2012 17:15:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234611 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 17:15:07 -0000 Author: marcel Date: Mon Apr 23 17:15:06 2012 New Revision: 234611 URL: http://svn.freebsd.org/changeset/base/234611 Log: Update the bugs section. We don't consider tmpfs as experimental, though we do not claim to support all mount options equally well. Approved by: delphij@ MFC after: 3 days Modified: head/share/man/man5/tmpfs.5 Modified: head/share/man/man5/tmpfs.5 ============================================================================== --- head/share/man/man5/tmpfs.5 Mon Apr 23 16:35:19 2012 (r234610) +++ head/share/man/man5/tmpfs.5 Mon Apr 23 17:15:06 2012 (r234611) @@ -49,7 +49,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 16, 2010 +.Dd April 23, 2012 .Dt TMPFS 5 .Os .Sh NAME @@ -141,9 +141,4 @@ to This manual page was written by .An Xin LI Aq delphij@FreeBSD.org . .Sh BUGS -The -.Nm -kernel implementation is currently considered as -an experimental feature. -Some file system mount -time options are not well supported. +Some file system mount time options may not be well-supported. From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 17:54:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2BA44106566B; Mon, 23 Apr 2012 17:54:50 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 166E58FC0C; Mon, 23 Apr 2012 17:54:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NHsnM4008418; Mon, 23 Apr 2012 17:54:49 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NHsn7Z008416; Mon, 23 Apr 2012 17:54:49 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201204231754.q3NHsn7Z008416@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 23 Apr 2012 17:54:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234612 - head/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 17:54:50 -0000 Author: trasz Date: Mon Apr 23 17:54:49 2012 New Revision: 234612 URL: http://svn.freebsd.org/changeset/base/234612 Log: Fix build. Modified: head/sys/ufs/ufs/ufs_inode.c Modified: head/sys/ufs/ufs/ufs_inode.c ============================================================================== --- head/sys/ufs/ufs/ufs_inode.c Mon Apr 23 17:15:06 2012 (r234611) +++ head/sys/ufs/ufs/ufs_inode.c Mon Apr 23 17:54:49 2012 (r234612) @@ -135,7 +135,7 @@ ufs_inactive(ap) (void)chkiq(ip, -1, NOCRED, FORCE); #endif #ifdef UFS_EXTATTR - ufs_extattr_vnode_inactive(vp, td); + ufs_extattr_vnode_inactive(vp, ap->a_td); #endif /* * Setting the mode to zero needs to wait for the inode From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 17:56:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 151C71065686; Mon, 23 Apr 2012 17:56:36 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F36168FC08; Mon, 23 Apr 2012 17:56:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NHuZ9p008530; Mon, 23 Apr 2012 17:56:35 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NHuZ3k008528; Mon, 23 Apr 2012 17:56:35 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201204231756.q3NHuZ3k008528@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 23 Apr 2012 17:56:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234613 - head/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 17:56:36 -0000 Author: trasz Date: Mon Apr 23 17:56:35 2012 New Revision: 234613 URL: http://svn.freebsd.org/changeset/base/234613 Log: Remove unused thread argument from ufs_extattr_uepm_lock()/ufs_extattr_uepm_unlock(). Modified: head/sys/ufs/ufs/ufs_extattr.c Modified: head/sys/ufs/ufs/ufs_extattr.c ============================================================================== --- head/sys/ufs/ufs/ufs_extattr.c Mon Apr 23 17:54:49 2012 (r234612) +++ head/sys/ufs/ufs/ufs_extattr.c Mon Apr 23 17:56:35 2012 (r234613) @@ -108,14 +108,14 @@ static int ufs_extattr_start_locked(stru * backing file anyway. */ static void -ufs_extattr_uepm_lock(struct ufsmount *ump, struct thread *td) +ufs_extattr_uepm_lock(struct ufsmount *ump) { sx_xlock(&ump->um_extattr.uepm_lock); } static void -ufs_extattr_uepm_unlock(struct ufsmount *ump, struct thread *td) +ufs_extattr_uepm_unlock(struct ufsmount *ump) { sx_xunlock(&ump->um_extattr.uepm_lock); @@ -213,9 +213,9 @@ ufs_extattr_start(struct mount *mp, stru ump = VFSTOUFS(mp); - ufs_extattr_uepm_lock(ump, td); + ufs_extattr_uepm_lock(ump); error = ufs_extattr_start_locked(ump, td); - ufs_extattr_uepm_unlock(ump, td); + ufs_extattr_uepm_unlock(ump); return (error); } @@ -458,9 +458,9 @@ ufs_extattr_autostart(struct mount *mp, int error; ump = VFSTOUFS(mp); - ufs_extattr_uepm_lock(ump, td); + ufs_extattr_uepm_lock(ump); error = ufs_extattr_autostart_locked(mp, td); - ufs_extattr_uepm_unlock(ump, td); + ufs_extattr_uepm_unlock(ump); return (error); } @@ -566,7 +566,7 @@ ufs_extattr_stop(struct mount *mp, struc struct ufsmount *ump = VFSTOUFS(mp); int error = 0; - ufs_extattr_uepm_lock(ump, td); + ufs_extattr_uepm_lock(ump); if (!(ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_STARTED)) { error = EOPNOTSUPP; @@ -584,7 +584,7 @@ ufs_extattr_stop(struct mount *mp, struc ump->um_extattr.uepm_ucred = NULL; unlock: - ufs_extattr_uepm_unlock(ump, td); + ufs_extattr_uepm_unlock(ump); return (error); } @@ -783,10 +783,10 @@ ufs_extattrctl(struct mount *mp, int cmd * ufs_extattr_enable_with_open() will always unlock the * vnode, regardless of failure. */ - ufs_extattr_uepm_lock(ump, td); + ufs_extattr_uepm_lock(ump); error = ufs_extattr_enable_with_open(ump, filename_vp, attrnamespace, attrname, td); - ufs_extattr_uepm_unlock(ump, td); + ufs_extattr_uepm_unlock(ump); return (error); @@ -799,10 +799,10 @@ ufs_extattrctl(struct mount *mp, int cmd if (attrname == NULL) return (EINVAL); - ufs_extattr_uepm_lock(ump, td); + ufs_extattr_uepm_lock(ump); error = ufs_extattr_disable(ump, attrnamespace, attrname, td); - ufs_extattr_uepm_unlock(ump, td); + ufs_extattr_uepm_unlock(ump); return (error); @@ -832,12 +832,12 @@ vop_getextattr { struct ufsmount *ump = VFSTOUFS(mp); int error; - ufs_extattr_uepm_lock(ump, ap->a_td); + ufs_extattr_uepm_lock(ump); error = ufs_extattr_get(ap->a_vp, ap->a_attrnamespace, ap->a_name, ap->a_uio, ap->a_size, ap->a_cred, ap->a_td); - ufs_extattr_uepm_unlock(ump, ap->a_td); + ufs_extattr_uepm_unlock(ump); return (error); } @@ -1002,13 +1002,13 @@ vop_deleteextattr { struct ufsmount *ump = VFSTOUFS(mp); int error; - ufs_extattr_uepm_lock(ump, ap->a_td); + ufs_extattr_uepm_lock(ump); error = ufs_extattr_rm(ap->a_vp, ap->a_attrnamespace, ap->a_name, ap->a_cred, ap->a_td); - ufs_extattr_uepm_unlock(ump, ap->a_td); + ufs_extattr_uepm_unlock(ump); return (error); } @@ -1039,12 +1039,12 @@ vop_setextattr { if (ap->a_uio == NULL) return (EINVAL); - ufs_extattr_uepm_lock(ump, ap->a_td); + ufs_extattr_uepm_lock(ump); error = ufs_extattr_set(ap->a_vp, ap->a_attrnamespace, ap->a_name, ap->a_uio, ap->a_cred, ap->a_td); - ufs_extattr_uepm_unlock(ump, ap->a_td); + ufs_extattr_uepm_unlock(ump); return (error); } @@ -1295,10 +1295,10 @@ ufs_extattr_vnode_inactive(struct vnode if (!(ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_INITIALIZED)) return; - ufs_extattr_uepm_lock(ump, td); + ufs_extattr_uepm_lock(ump); if (!(ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_STARTED)) { - ufs_extattr_uepm_unlock(ump, td); + ufs_extattr_uepm_unlock(ump); return; } @@ -1306,7 +1306,7 @@ ufs_extattr_vnode_inactive(struct vnode ufs_extattr_rm(vp, uele->uele_attrnamespace, uele->uele_attrname, NULL, td); - ufs_extattr_uepm_unlock(ump, td); + ufs_extattr_uepm_unlock(ump); } #endif /* !UFS_EXTATTR */ From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 20:45:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B4D5106564A; Mon, 23 Apr 2012 20:45:32 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D22DA8FC08; Mon, 23 Apr 2012 20:45:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NKjVUp014877; Mon, 23 Apr 2012 20:45:31 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NKjVtN014874; Mon, 23 Apr 2012 20:45:31 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201204232045.q3NKjVtN014874@svn.freebsd.org> From: Michael Tuexen Date: Mon, 23 Apr 2012 20:45:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234614 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 20:45:32 -0000 Author: tuexen Date: Mon Apr 23 20:45:31 2012 New Revision: 234614 URL: http://svn.freebsd.org/changeset/base/234614 Log: Use the flags defined in RFC 6525 in the stream reset event. Modified: head/sys/netinet/sctp_uio.h head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Mon Apr 23 17:56:35 2012 (r234613) +++ head/sys/netinet/sctp_uio.h Mon Apr 23 20:45:31 2012 (r234614) @@ -449,9 +449,11 @@ struct sctp_stream_reset_event { }; /* flags in stream_reset_event (strreset_flags) */ -#define SCTP_STREAM_RESET_DENIED 0x0004 /* SCTP_STRRESET_FAILED */ -#define SCTP_STREAM_RESET_FAILED 0x0008 /* SCTP_STRRESET_FAILED */ -#define SCTP_STREAM_CHANGED_DENIED 0x0010 +#define SCTP_STREAM_RESET_INCOMING_SSN 0x0001 +#define SCTP_STREAM_RESET_OUTGOING_SSN 0x0002 +#define SCTP_STREAM_RESET_DENIED 0x0004 +#define SCTP_STREAM_RESET_FAILED 0x0008 +#define SCTP_STREAM_CHANGED_DENIED 0x0010 /* * Assoc reset event - subscribe to SCTP_ASSOC_RESET_EVENT Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Mon Apr 23 17:56:35 2012 (r234613) +++ head/sys/netinet/sctputil.c Mon Apr 23 20:45:31 2012 (r234614) @@ -3498,18 +3498,18 @@ sctp_ulp_notify(uint32_t notification, s case SCTP_NOTIFY_HB_RESP: break; case SCTP_NOTIFY_STR_RESET_SEND: - sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), SCTP_STREAM_RESET_INCOMING); + sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), SCTP_STREAM_RESET_OUTGOING_SSN); break; case SCTP_NOTIFY_STR_RESET_RECV: - sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), SCTP_STREAM_RESET_OUTGOING); + sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), SCTP_STREAM_RESET_INCOMING); break; case SCTP_NOTIFY_STR_RESET_FAILED_OUT: sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), - (SCTP_STREAM_RESET_OUTGOING | SCTP_STREAM_RESET_INCOMING)); + (SCTP_STREAM_RESET_OUTGOING_SSN | SCTP_STREAM_RESET_FAILED)); break; case SCTP_NOTIFY_STR_RESET_FAILED_IN: sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), - (SCTP_STREAM_RESET_OUTGOING | SCTP_STREAM_RESET_INCOMING)); + (SCTP_STREAM_RESET_INCOMING | SCTP_STREAM_RESET_FAILED)); break; case SCTP_NOTIFY_ASCONF_ADD_IP: sctp_notify_peer_addr_change(stcb, SCTP_ADDR_ADDED, data, From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 20:53:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 738361065678; Mon, 23 Apr 2012 20:53:51 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EB968FC1F; Mon, 23 Apr 2012 20:53:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NKrpS3015155; Mon, 23 Apr 2012 20:53:51 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NKrpvl015153; Mon, 23 Apr 2012 20:53:51 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204232053.q3NKrpvl015153@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 23 Apr 2012 20:53:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234615 - head/sys/powerpc/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 20:53:51 -0000 Author: nwhitehorn Date: Mon Apr 23 20:53:50 2012 New Revision: 234615 URL: http://svn.freebsd.org/changeset/base/234615 Log: Fix copy-and-paste error in r230400. MFC after: 3 days Modified: head/sys/powerpc/include/profile.h Modified: head/sys/powerpc/include/profile.h ============================================================================== --- head/sys/powerpc/include/profile.h Mon Apr 23 20:45:31 2012 (r234614) +++ head/sys/powerpc/include/profile.h Mon Apr 23 20:53:50 2012 (r234615) @@ -85,7 +85,7 @@ __asm( " .text \n" \ "_mcount: \n" \ " .quad .L._mcount,.TOC.@tocbase,0\n" \ " .previous \n" \ - " .size main,24 \n" \ + " .size _mcount,24 \n" \ " .type _mcount,@function \n" \ " .align 4 \n" \ ".L._mcount: \n" \ From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 20:56:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB5BF106566B; Mon, 23 Apr 2012 20:56:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DB648FC12; Mon, 23 Apr 2012 20:56:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NKu6ok015279; Mon, 23 Apr 2012 20:56:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NKu6hU015276; Mon, 23 Apr 2012 20:56:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204232056.q3NKu6hU015276@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 23 Apr 2012 20:56:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234616 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 20:56:06 -0000 Author: kib Date: Mon Apr 23 20:56:05 2012 New Revision: 234616 URL: http://svn.freebsd.org/changeset/base/234616 Log: Allow for the process information sysctls to accept a thread id in addition to the process id. It follows the ptrace(2) interface and allows debugging libraries to use thread ids directly, without slow and verbose conversion of thread id into pid. The PGET_NOTID flag is provided to allow a specific sysctl to disallow this behaviour. All current callers of pget(9) have useful semantic to operate on tid and do not need this flag. Reviewed by: jhb, trocini MFC after: 1 week Modified: head/sys/kern/kern_proc.c head/sys/sys/proc.h Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Mon Apr 23 20:53:50 2012 (r234615) +++ head/sys/kern/kern_proc.c Mon Apr 23 20:56:05 2012 (r234616) @@ -309,6 +309,30 @@ pfind(pid) return (p); } +static struct proc * +pfind_tid(pid_t tid) +{ + struct proc *p; + struct thread *td; + + sx_slock(&allproc_lock); + FOREACH_PROC_IN_SYSTEM(p) { + PROC_LOCK(p); + if (p->p_state == PRS_NEW) { + PROC_UNLOCK(p); + continue; + } + FOREACH_THREAD_IN_PROC(p, td) { + if (td->td_tid == tid) + goto found; + } + PROC_UNLOCK(p); + } +found: + sx_sunlock(&allproc_lock); + return (p); +} + /* * Locate a process group by number. * The caller must hold proctree_lock. @@ -339,7 +363,12 @@ pget(pid_t pid, int flags, struct proc * struct proc *p; int error; - p = pfind(pid); + if (pid <= PID_MAX) + p = pfind(pid); + else if ((flags & PGET_NOTID) == 0) + p = pfind_tid(pid); + else + p = NULL; if (p == NULL) return (ESRCH); if ((flags & PGET_CANSEE) != 0) { Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Mon Apr 23 20:53:50 2012 (r234615) +++ head/sys/sys/proc.h Mon Apr 23 20:56:05 2012 (r234616) @@ -840,6 +840,7 @@ struct proc *zpfind(pid_t); /* Find zom #define PGET_ISCURRENT 0x00008 /* Check that the found process is current. */ #define PGET_NOTWEXIT 0x00010 /* Check that the process is not in P_WEXIT. */ #define PGET_NOTINEXEC 0x00020 /* Check that the process is not in P_INEXEC. */ +#define PGET_NOTID 0x00040 /* Do not assume tid if pid > PID_MAX. */ #define PGET_WANTREAD (PGET_HOLD | PGET_CANDEBUG | PGET_NOTWEXIT) From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 21:49:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE2961065670; Mon, 23 Apr 2012 21:49:11 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA17B8FC0A; Mon, 23 Apr 2012 21:49:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NLnBL4016980; Mon, 23 Apr 2012 21:49:11 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NLnBGw016978; Mon, 23 Apr 2012 21:49:11 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201204232149.q3NLnBGw016978@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 23 Apr 2012 21:49:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234617 - head/sys/dev/qlxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 21:49:12 -0000 Author: bz Date: Mon Apr 23 21:49:11 2012 New Revision: 234617 URL: http://svn.freebsd.org/changeset/base/234617 Log: Do not announce IPv6 TSO support yet. The in-tree driver does not seem to fully handle this yet. Reviewed by: davidcs MFC after: 1 week Modified: head/sys/dev/qlxgb/qla_os.c Modified: head/sys/dev/qlxgb/qla_os.c ============================================================================== --- head/sys/dev/qlxgb/qla_os.c Mon Apr 23 20:56:05 2012 (r234616) +++ head/sys/dev/qlxgb/qla_os.c Mon Apr 23 21:49:11 2012 (r234617) @@ -677,7 +677,6 @@ qla_init_ifnet(device_t dev, qla_host_t ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_TSO4 | - IFCAP_TSO6 | IFCAP_JUMBO_MTU; ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 21:50:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F9E51065694; Mon, 23 Apr 2012 21:50:12 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D8F78FC20; Mon, 23 Apr 2012 21:50:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NLoBTd017053; Mon, 23 Apr 2012 21:50:11 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NLoAAf017051; Mon, 23 Apr 2012 21:50:10 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201204232150.q3NLoAAf017051@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 23 Apr 2012 21:50:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234618 - head/sys/ofed/drivers/net/mlx4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 21:50:12 -0000 Author: bz Date: Mon Apr 23 21:50:10 2012 New Revision: 234618 URL: http://svn.freebsd.org/changeset/base/234618 Log: Do not announce IPv6 TSO support yet. The driver seems to make assumptions based on IPv4 header parsing only. MFC after: 1 week Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Mon Apr 23 21:49:11 2012 (r234617) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Mon Apr 23 21:50:10 2012 (r234618) @@ -1569,7 +1569,7 @@ int mlx4_en_init_netdev(struct mlx4_en_d dev->if_capabilities |= IFCAP_VLAN_HWCSUM | IFCAP_VLAN_HWFILTER; dev->if_capabilities |= IFCAP_LINKSTATE | IFCAP_JUMBO_MTU; if (mdev->LSO_support) - dev->if_capabilities |= IFCAP_TSO | IFCAP_VLAN_HWTSO; + dev->if_capabilities |= IFCAP_TSO4 | IFCAP_VLAN_HWTSO; if (mdev->profile.num_lro) dev->if_capabilities |= IFCAP_LRO; dev->if_capenable = dev->if_capabilities; From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 22:03:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72AB01065675; Mon, 23 Apr 2012 22:03:57 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E1818FC12; Mon, 23 Apr 2012 22:03:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NM3v8X017535; Mon, 23 Apr 2012 22:03:57 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NM3vGn017533; Mon, 23 Apr 2012 22:03:57 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201204232203.q3NM3vGn017533@svn.freebsd.org> From: Rick Macklem Date: Mon, 23 Apr 2012 22:03:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234619 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 22:03:57 -0000 Author: rmacklem Date: Mon Apr 23 22:03:56 2012 New Revision: 234619 URL: http://svn.freebsd.org/changeset/base/234619 Log: Re-enable the commit bit for John W. De Boskey, since he has volunteered to do some work on the new NFS server and already has a couple of good patches in progress. Approved by: core Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Mon Apr 23 21:50:10 2012 (r234618) +++ svnadmin/conf/access Mon Apr 23 22:03:56 2012 (r234619) @@ -135,6 +135,7 @@ jon jonathan jpaetzel julian +jwd kaiw kan kargl From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 22:05:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B42E0106566B; Mon, 23 Apr 2012 22:05:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F5AE8FC1D; Mon, 23 Apr 2012 22:05:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NM599j017614; Mon, 23 Apr 2012 22:05:09 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NM59Sl017612; Mon, 23 Apr 2012 22:05:09 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201204232205.q3NM59Sl017612@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 23 Apr 2012 22:05:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234620 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 22:05:09 -0000 Author: bz Date: Mon Apr 23 22:05:09 2012 New Revision: 234620 URL: http://svn.freebsd.org/changeset/base/234620 Log: If we pass down 64k - L2 hdr size + 1 to 64K L3+ data adding an ether header will make the data go over the 64k limits announced to busdma as maxsize and the transaction will fail. With TSO this can result in a TCP regression due to the lost packet. According to the data sheets ixgbe(4) 82598 and 82599 can handle up to 256k so increase the maximum. Reported by: Jon Kåre Hellan, UNINETT (jon.kare.hellan uninett.no) Tested by: Jon Kåre Hellan, UNINETT (jon.kare.hellan uninett.no) MFC after: 1 week Modified: head/sys/dev/ixgbe/ixgbe.h Modified: head/sys/dev/ixgbe/ixgbe.h ============================================================================== --- head/sys/dev/ixgbe/ixgbe.h Mon Apr 23 22:03:56 2012 (r234619) +++ head/sys/dev/ixgbe/ixgbe.h Mon Apr 23 22:05:09 2012 (r234620) @@ -179,7 +179,7 @@ #define IXGBE_82599_SCATTER 32 #define MSIX_82598_BAR 3 #define MSIX_82599_BAR 4 -#define IXGBE_TSO_SIZE 65535 +#define IXGBE_TSO_SIZE 262140 #define IXGBE_TX_BUFFER_SIZE ((u32) 1514) #define IXGBE_RX_HDR 128 #define IXGBE_VFTA_SIZE 128 From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 22:06:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 74A7E1065670; Mon, 23 Apr 2012 22:06:58 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5FB5B8FC12; Mon, 23 Apr 2012 22:06:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NM6w89017700; Mon, 23 Apr 2012 22:06:58 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NM6wdR017698; Mon, 23 Apr 2012 22:06:58 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201204232206.q3NM6wdR017698@svn.freebsd.org> From: Rick Macklem Date: Mon, 23 Apr 2012 22:06:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234621 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 22:06:58 -0000 Author: rmacklem Date: Mon Apr 23 22:06:57 2012 New Revision: 234621 URL: http://svn.freebsd.org/changeset/base/234621 Log: John W. De Boskey's commit bit has been re-enabled with rmacklem@ as mentor, to do some work on the new NFS server. Approved by: core Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Mon Apr 23 22:05:09 2012 (r234620) +++ svnadmin/conf/mentors Mon Apr 23 22:06:57 2012 (r234621) @@ -23,6 +23,7 @@ jimharris scottl Co-mentor: sbruno jinmei gnn jlh kib jonathan rwatson +jwd rmacklem kargl das melifaro ae Co-mentor: kib miwi rwatson From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 22:37:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02BA7106566B; Mon, 23 Apr 2012 22:37:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E12978FC12; Mon, 23 Apr 2012 22:37:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NMbmLp018676; Mon, 23 Apr 2012 22:37:48 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NMbmT9018674; Mon, 23 Apr 2012 22:37:48 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201204232237.q3NMbmT9018674@svn.freebsd.org> From: Eitan Adler Date: Mon, 23 Apr 2012 22:37:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234622 - stable/9/lib/libcrypt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 22:37:49 -0000 Author: eadler Date: Mon Apr 23 22:37:48 2012 New Revision: 234622 URL: http://svn.freebsd.org/changeset/base/234622 Log: MFC r234132: Make the item numbers match the crypt magic number PR: kern/161553 Approved by: cperciva (implicit) Modified: stable/9/lib/libcrypt/crypt.3 Directory Properties: stable/9/lib/libcrypt/ (props changed) Modified: stable/9/lib/libcrypt/crypt.3 ============================================================================== --- stable/9/lib/libcrypt/crypt.3 Mon Apr 23 22:06:57 2012 (r234621) +++ stable/9/lib/libcrypt/crypt.3 Mon Apr 23 22:37:48 2012 (r234622) @@ -189,6 +189,8 @@ Blowfish .It NT-Hash .It +(unused) +.It SHA-256 .It SHA-512 From owner-svn-src-all@FreeBSD.ORG Mon Apr 23 23:05:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6692D1065672; Mon, 23 Apr 2012 23:05:15 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CB7A8FC0A; Mon, 23 Apr 2012 23:05:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3NN5FD8019603; Mon, 23 Apr 2012 23:05:15 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3NN5FSh019595; Mon, 23 Apr 2012 23:05:15 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201204232305.q3NN5FSh019595@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 23 Apr 2012 23:05:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234623 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/components/events sys/contrib/dev/acpica/comp... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2012 23:05:15 -0000 Author: jkim Date: Mon Apr 23 23:05:14 2012 New Revision: 234623 URL: http://svn.freebsd.org/changeset/base/234623 Log: Merge ACPICA 20120420. Added: head/sys/contrib/dev/acpica/compiler/aslsupport.l - copied unchanged from r234519, vendor-sys/acpica/dist/source/compiler/aslsupport.l Modified: head/sys/contrib/dev/acpica/acpica_prep.sh head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/compiler/aslcompile.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslcompiler.l head/sys/contrib/dev/acpica/compiler/aslcompiler.y head/sys/contrib/dev/acpica/compiler/aslerror.c head/sys/contrib/dev/acpica/compiler/aslfiles.c head/sys/contrib/dev/acpica/compiler/aslglobal.h head/sys/contrib/dev/acpica/compiler/aslmain.c head/sys/contrib/dev/acpica/compiler/aslmap.c head/sys/contrib/dev/acpica/compiler/aslrestype1.c head/sys/contrib/dev/acpica/compiler/aslstartup.c head/sys/contrib/dev/acpica/compiler/dtio.c head/sys/contrib/dev/acpica/compiler/preprocess.h head/sys/contrib/dev/acpica/compiler/prscan.c head/sys/contrib/dev/acpica/compiler/prutils.c head/sys/contrib/dev/acpica/components/debugger/dbcmds.c head/sys/contrib/dev/acpica/components/debugger/dbdisply.c head/sys/contrib/dev/acpica/components/debugger/dbstats.c head/sys/contrib/dev/acpica/components/debugger/dbutils.c head/sys/contrib/dev/acpica/components/events/evmisc.c head/sys/contrib/dev/acpica/components/events/evxface.c head/sys/contrib/dev/acpica/components/executer/exdump.c head/sys/contrib/dev/acpica/components/hardware/hwesleep.c head/sys/contrib/dev/acpica/components/utilities/utdelete.c head/sys/contrib/dev/acpica/components/utilities/utglobal.c head/sys/contrib/dev/acpica/components/utilities/uttrack.c head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acobject.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/actypes.h head/usr.sbin/acpi/iasl/Makefile Directory Properties: head/sys/contrib/dev/acpica/ (props changed) head/sys/contrib/dev/acpica/compiler/ (props changed) head/sys/contrib/dev/acpica/components/debugger/ (props changed) head/sys/contrib/dev/acpica/components/events/ (props changed) head/sys/contrib/dev/acpica/components/executer/ (props changed) head/sys/contrib/dev/acpica/components/hardware/ (props changed) head/sys/contrib/dev/acpica/components/utilities/ (props changed) head/sys/contrib/dev/acpica/include/ (props changed) Modified: head/sys/contrib/dev/acpica/acpica_prep.sh ============================================================================== --- head/sys/contrib/dev/acpica/acpica_prep.sh Mon Apr 23 22:37:48 2012 (r234622) +++ head/sys/contrib/dev/acpica/acpica_prep.sh Mon Apr 23 23:05:14 2012 (r234623) @@ -31,7 +31,7 @@ src_headers="acapps.h accommon.h acconfi actbl2.h actbl3.h actypes.h acutils.h amlcode.h amlresrc.h \ platform/acenv.h platform/acfreebsd.h platform/acgcc.h" comp_headers="aslcompiler.h asldefine.h aslglobal.h aslmessages.h \ - asltypes.h dtcompiler.h dttemplate.h preprocess.h" + aslsupport.l asltypes.h dtcompiler.h dttemplate.h preprocess.h" platform_headers="acfreebsd.h acgcc.h" # pre-clean Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Mon Apr 23 22:37:48 2012 (r234622) +++ head/sys/contrib/dev/acpica/changes.txt Mon Apr 23 23:05:14 2012 (r234623) @@ -1,4 +1,71 @@ ---------------------------------------- +20 April 2012. Summary of changes for version 20120420: + +This release is available at www.acpica.org/downloads. +The ACPI 5.0 specification is available at www.acpi.info. + +1) ACPICA Core Subsystem: + +Implemented support for multiple notify handlers. This change adds support to +allow multiple system and device notify handlers on Device, Thermal Zone, and +Processor objects. This can simplify the host OS notification implementation. +Also re-worked and restructured the entire notify support code to simplify +handler installation, handler removal, notify event queuing, and notify +dispatch to handler(s). Note: there can still only be two global notify +handlers - one for system notifies and one for device notifies. There are no +changes to the existing handler install/remove interfaces. Lin Ming, Bob +Moore, Rafael Wysocki. + +Fixed a regression in the package repair code where the object reference +count was calculated incorrectly. Regression was introduced in the commit +"Support to add Package wrappers". + +Fixed a couple possible memory leaks in the AML parser, in the error recovery +path. Jesper Juhl, Lin Ming. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 92.9K Code, 25.0K Data, 117.9K Total + Debug Version: 172.5K Code, 73.2K Data, 245.7K Total + Current Release: + Non-Debug Version: 92.9K Code, 25.0K Data, 117.9K Total + Debug Version: 172.6K Code, 73.4K Data, 246.0K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Fixed a problem with the resource descriptor support where the length +of the StartDependentFn and StartDependentFnNoPrio descriptors were not +included in cumulative descriptor offset, resulting in incorrect values for +resource tags within resource descriptors appearing after a StartDependent* +descriptor. Reported by Petr Vandrovec. ACPICA BZ 949. + +iASL and Preprocessor: Implemented full support for the #line directive to +correctly track original source file line numbers through the .i preprocessor +output file - for error and warning messages. + +iASL: Expand the allowable byte constants for address space IDs. Previously, +the allowable range was 0x80-0xFF (user-defined spaces), now the range is +0x0A-0xFF to allow for custom and new IDs without changing the compiler. + +iASL: Add option to treat all warnings as errors (-we). ACPICA BZ 948. + +iASL: Add option to completely disable the preprocessor (-Pn). + +iASL: Now emit all error/warning messages to standard error (stderr) by +default (instead of the previous stdout). + +ASL Test Suite (ASLTS): Reduce iASL warnings due to use of Switch(). Update +for resource descriptor offset fix above. Update/cleanup error output +routines. Enable and send iASL errors/warnings to an error logfile +(error.txt). Send all other iASL output to a logfile (compiler.txt). Fixed +several extraneous "unrecognized operator" messages. + +---------------------------------------- 20 March 2012. Summary of changes for version 20120320: This release is available at www.acpica.org/downloads. Modified: head/sys/contrib/dev/acpica/compiler/aslcompile.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompile.c Mon Apr 23 22:37:48 2012 (r234622) +++ head/sys/contrib/dev/acpica/compiler/aslcompile.c Mon Apr 23 23:05:14 2012 (r234623) @@ -242,10 +242,10 @@ CmFlushSourceCode ( while (FlReadFile (ASL_FILE_INPUT, &Buffer, 1) != AE_ERROR) { - InsertLineBuffer ((int) Buffer); + AslInsertLineBuffer ((int) Buffer); } - ResetCurrentLineBuffer (); + AslResetCurrentLineBuffer (); } @@ -457,16 +457,20 @@ CmDoCompile ( Event = UtBeginEvent ("Open input and output files"); UtEndEvent (Event); - /* Preprocessor */ - Event = UtBeginEvent ("Preprocess input file"); - PrDoPreprocess (); - UtEndEvent (Event); - if (Gbl_PreprocessOnly) + if (Gbl_PreprocessFlag) { - CmCleanupAndExit (); - return 0; + /* Preprocessor */ + + PrDoPreprocess (); + if (Gbl_PreprocessOnly) + { + UtEndEvent (Event); + CmCleanupAndExit (); + return 0; + } } + UtEndEvent (Event); /* Build the parse tree */ @@ -483,8 +487,17 @@ CmDoCompile ( if (!RootNode) { - AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, - NULL, "- Could not resolve parse tree root node"); + /* + * If there are no errors, then we have some sort of + * internal problem. + */ + Status = AslCheckForErrorExit (); + if (Status == AE_OK) + { + AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, + NULL, "- Could not resolve parse tree root node"); + } + goto ErrorExit; } @@ -553,14 +566,14 @@ CmDoCompile ( if (Gbl_ParseOnlyFlag) { - AePrintErrorLog (ASL_FILE_STDOUT); - UtDisplaySummary (ASL_FILE_STDOUT); + AePrintErrorLog (ASL_FILE_STDERR); + UtDisplaySummary (ASL_FILE_STDERR); if (Gbl_DebugFlag) { - /* Print error summary to the debug file */ + /* Print error summary to the stdout also */ - AePrintErrorLog (ASL_FILE_STDERR); - UtDisplaySummary (ASL_FILE_STDERR); + AePrintErrorLog (ASL_FILE_STDOUT); + UtDisplaySummary (ASL_FILE_STDOUT); } UtEndEvent (FullCompile); return 0; @@ -756,12 +769,12 @@ CmCleanupAndExit ( UINT32 i; - AePrintErrorLog (ASL_FILE_STDOUT); + AePrintErrorLog (ASL_FILE_STDERR); if (Gbl_DebugFlag) { - /* Print error summary to the debug file */ + /* Print error summary to stdout also */ - AePrintErrorLog (ASL_FILE_STDERR); + AePrintErrorLog (ASL_FILE_STDOUT); } DbgPrint (ASL_DEBUG_OUTPUT, "\n\nElapsed time for major events\n\n"); @@ -837,7 +850,9 @@ CmCleanupAndExit ( /* Delete the preprocessor output file (.i) unless -li flag is set */ - if (!Gbl_PreprocessorOutputFlag && Gbl_Files[ASL_FILE_PREPROCESSOR].Filename) + if (!Gbl_PreprocessorOutputFlag && + Gbl_PreprocessFlag && + Gbl_Files[ASL_FILE_PREPROCESSOR].Filename) { if (remove (Gbl_Files[ASL_FILE_PREPROCESSOR].Filename)) { Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.h Mon Apr 23 22:37:48 2012 (r234622) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.h Mon Apr 23 23:05:14 2012 (r234623) @@ -100,11 +100,11 @@ AslCompilerlex( void); void -ResetCurrentLineBuffer ( +AslResetCurrentLineBuffer ( void); void -InsertLineBuffer ( +AslInsertLineBuffer ( int SourceChar); int @@ -136,6 +136,11 @@ ACPI_STATUS AslDoOneFile ( char *Filename); +ACPI_STATUS +AslCheckForErrorExit ( + void); + + /* * aslcompile - compile mainline */ @@ -645,7 +650,11 @@ FlPrintFile ( void FlSetLineNumber ( - ACPI_PARSE_OBJECT *Op); + UINT32 LineNumber); + +void +FlSetFilename ( + char *Filename); ACPI_STATUS FlOpenInputFile ( Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.l ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.l Mon Apr 23 22:37:48 2012 (r234622) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.l Mon Apr 23 23:05:14 2012 (r234623) @@ -58,20 +58,26 @@ YYSTYPE AslCompilerlval; */ #define _COMPONENT ACPI_COMPILER - ACPI_MODULE_NAME ("aslscan") + ACPI_MODULE_NAME ("aslscanner") + /* Local prototypes */ -char -comment (void); -char -comment2 (void); -void +static void +AslDoLineDirective (void); + +static char +AslDoComment (void); + +static char +AslDoCommentType2 (void); + +static char +AslDoStringLiteral (void); + +static void count (int type); -char -literal (void); -void -copy (void); + /*! [Begin] no source code translation */ @@ -104,10 +110,10 @@ NamePathTail [.]{NameSeg} [ \t] { count (0); } -"/*" { if (!comment ()) yyterminate (); } -"//" { if (!comment2 ()) yyterminate (); } +"/*" { if (!AslDoComment ()) yyterminate (); } +"//" { if (!AslDoCommentType2 ()) yyterminate (); } -"\"" { if (literal ()) return (PARSEOP_STRING_LITERAL); else yyterminate (); } +"\"" { if (AslDoStringLiteral ()) return (PARSEOP_STRING_LITERAL); else yyterminate (); } ";" { count (0); return(';'); } @@ -116,10 +122,16 @@ NamePathTail [.]{NameSeg} count (1); return (PARSEOP_INTEGER); } "Include" { count (1); return (PARSEOP_INCLUDE); } -"#include" { count (1); return (PARSEOP_INCLUDE_CSTYLE); } -"#line" { count (1); return (PARSEOP_LINE_CSTYLE); } "External" { count (1); return (PARSEOP_EXTERNAL); } + /* + * The #line directive is emitted by the preprocessor and handled + * here in the main iASL lexer - simply set the line number and + * optionally the current filename. + */ +"#line" { AslDoLineDirective ();} + + /**************************************************************************** * * Main ASL operators @@ -634,668 +646,7 @@ NamePathTail [.]{NameSeg} /*! [End] no source code translation !*/ -typedef struct asl_file_node -{ - FILE *File; - UINT32 CurrentLineNumber; - YY_BUFFER_STATE State; - char *Filename; - struct asl_file_node *Next; - -} ASL_FILE_NODE; - -ASL_FILE_NODE *InputStack = NULL; - - -/******************************************************************************* - * - * FUNCTION: AslPopInputFileStack - * - * PARAMETERS: None - * - * RETURN: 0 if a node was popped, -1 otherwise - * - * DESCRIPTION: Pop the top of the input file stack and point the parser to - * the saved parse buffer contained in the fnode. Also, set the - * global line counters to the saved values. This function is - * called when an include file reaches EOF. - * - ******************************************************************************/ - -int -AslPopInputFileStack ( - void) -{ - ASL_FILE_NODE *Fnode; - - - Fnode = InputStack; - DbgPrint (ASL_PARSE_OUTPUT, "\nPop InputFile Stack, Fnode %p\n\n", Fnode); - - - if (!Fnode) - { - return -1; - } - - /* Close the current include file */ - - fclose (yyin); - - /* Update the top-of-stack */ - - InputStack = Fnode->Next; - - /* Reset global line counter and filename */ - - Gbl_Files[ASL_FILE_INPUT].Filename = Fnode->Filename; - Gbl_CurrentLineNumber = Fnode->CurrentLineNumber; - - /* Point the parser to the popped file */ - - yy_delete_buffer (YY_CURRENT_BUFFER); - yy_switch_to_buffer (Fnode->State); - - /* All done with this node */ - - ACPI_FREE (Fnode); - return 0; -} - - -/******************************************************************************* - * - * FUNCTION: AslPushInputFileStack - * - * PARAMETERS: InputFile - Open file pointer - * Filename - Name of the file - * - * RETURN: None - * - * DESCRIPTION: Push the InputFile onto the file stack, and point the parser - * to this file. Called when an include file is successfully - * opened. - * - ******************************************************************************/ - -void -AslPushInputFileStack ( - FILE *InputFile, - char *Filename) -{ - ASL_FILE_NODE *Fnode; - YY_BUFFER_STATE State; - - - /* Save the current state in an Fnode */ - - Fnode = UtLocalCalloc (sizeof (ASL_FILE_NODE)); - - Fnode->File = yyin; - Fnode->Next = InputStack; - Fnode->State = YY_CURRENT_BUFFER; - Fnode->CurrentLineNumber = Gbl_CurrentLineNumber; - Fnode->Filename = Gbl_Files[ASL_FILE_INPUT].Filename; - - /* Push it on the stack */ - - InputStack = Fnode; - - /* Point the parser to this file */ - - State = yy_create_buffer (InputFile, YY_BUF_SIZE); - yy_switch_to_buffer (State); - - DbgPrint (ASL_PARSE_OUTPUT, "\nPush InputFile Stack, returning %p\n\n", InputFile); - - /* Reset the global line count and filename */ - - Gbl_Files[ASL_FILE_INPUT].Filename = Filename; - Gbl_CurrentLineNumber = 1; - yyin = InputFile; -} - - -/******************************************************************************* - * - * FUNCTION: ResetCurrentLineBuffer - * - * PARAMETERS: None - * - * RETURN: None - * - * DESCRIPTION: Reset the Line Buffer to zero, increment global line numbers. - * - ******************************************************************************/ - -void -ResetCurrentLineBuffer ( - void) -{ - - if (Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Handle) - { - FlWriteFile (ASL_FILE_SOURCE_OUTPUT, Gbl_CurrentLineBuffer, - Gbl_LineBufPtr - Gbl_CurrentLineBuffer); - } - - Gbl_CurrentLineOffset += Gbl_CurrentColumn; - Gbl_CurrentColumn = 0; - - Gbl_CurrentLineNumber++; - Gbl_LogicalLineNumber++; - Gbl_LineBufPtr = Gbl_CurrentLineBuffer; -} - - -/******************************************************************************* - * - * FUNCTION: InsertLineBuffer - * - * PARAMETERS: SourceChar - One char from the input ASL source file - * - * RETURN: None - * - * DESCRIPTION: Put one character of the source file into the temp line buffer - * - ******************************************************************************/ - -#define ASL_SPACES_PER_TAB 4 - -void -InsertLineBuffer ( - int SourceChar) -{ - UINT32 i; - UINT32 Count = 1; - - - if (SourceChar == EOF) - { - return; - } - - Gbl_InputByteCount++; - - /* Handle tabs. Convert to spaces */ - - if (SourceChar == '\t') - { - SourceChar = ' '; - Count = ASL_SPACES_PER_TAB - - (Gbl_CurrentColumn & (ASL_SPACES_PER_TAB-1)); - } - - - for (i = 0; i < Count; i++) - { - Gbl_CurrentColumn++; - - /* Insert the character into the line buffer */ - - *Gbl_LineBufPtr = (UINT8) SourceChar; - Gbl_LineBufPtr++; - - if (Gbl_LineBufPtr > (Gbl_CurrentLineBuffer + (ASL_LINE_BUFFER_SIZE - 1))) - { -#if 0 - /* - * Warning if we have split a long source line. - * - */ - sprintf (MsgBuffer, "Max %u", ASL_LINE_BUFFER_SIZE); - AslCommonError (ASL_WARNING, ASL_MSG_LONG_LINE, - Gbl_CurrentLineNumber, Gbl_LogicalLineNumber, - Gbl_CurrentLineOffset, Gbl_CurrentColumn, - Gbl_Files[ASL_FILE_INPUT].Filename, MsgBuffer); -#endif - - ResetCurrentLineBuffer (); - } - else if (SourceChar == '\n') - { - /* End of line */ - - ResetCurrentLineBuffer (); - } - } -} - - -/******************************************************************************* - * - * FUNCTION: count - * - * PARAMETERS: yytext - Contains the matched keyword. - * Type - Keyword/Character type: - * 0 = anything except a keyword - * 1 = pseudo-keywords - * 2 = non-executable ASL keywords - * 3 = executable ASL keywords - * - * RETURN: None - * - * DESCRIPTION: Count keywords and put them into the line buffer - * - ******************************************************************************/ - -void -count ( - int Type) -{ - int i; - - - switch (Type) - { - case 2: - TotalKeywords++; - TotalNamedObjects++; - break; - - case 3: - TotalKeywords++; - TotalExecutableOpcodes++; - break; - } - - for (i = 0; (yytext[i] != 0) && (yytext[i] != EOF); i++) - { - InsertLineBuffer (yytext[i]); - *Gbl_LineBufPtr = 0; - } -} - - -/******************************************************************************* - * - * FUNCTION: comment - * - * PARAMETERS: none - * - * RETURN: none - * - * DESCRIPTION: Process a standard comment. - * - ******************************************************************************/ - -char -comment (void) -{ - char c; - char c1 = 0; - - - InsertLineBuffer ('/'); - InsertLineBuffer ('*'); - -loop: - - /* Eat chars until end-of-comment */ - - while ((c = (char) input()) != '*' && c != EOF) - { - InsertLineBuffer (c); - c1 = c; - } - - if (c == EOF) - { - goto EarlyEOF; - } - - /* - * Check for nested comment -- can help catch cases where a previous - * comment was accidently left unterminated - */ - if ((c1 == '/') && (c == '*')) - { - AslCommonError (ASL_WARNING, ASL_MSG_NESTED_COMMENT, - Gbl_CurrentLineNumber, Gbl_LogicalLineNumber, - Gbl_InputByteCount, Gbl_CurrentColumn, - Gbl_Files[ASL_FILE_INPUT].Filename, NULL); - } - - /* Comment is closed only if the NEXT character is a slash */ - - InsertLineBuffer (c); - - if ((c1 = (char) input()) != '/' && c1 != EOF) - { - unput(c1); - goto loop; - } - - if (c1 == EOF) - { - goto EarlyEOF; - } - - InsertLineBuffer (c1); - return TRUE; - - -EarlyEOF: - /* - * Premature End-Of-File - */ - AslCommonError (ASL_ERROR, ASL_MSG_EARLY_EOF, - Gbl_CurrentLineNumber, Gbl_LogicalLineNumber, - Gbl_CurrentLineOffset, Gbl_CurrentColumn, - Gbl_Files[ASL_FILE_INPUT].Filename, NULL); - return (FALSE); -} - - -/******************************************************************************* - * - * FUNCTION: comment - * - * PARAMETERS: none - * - * RETURN: none - * - * DESCRIPTION: Process a new "//" comment. - * - ******************************************************************************/ - -char -comment2 (void) -{ - char c; - - - InsertLineBuffer ('/'); - InsertLineBuffer ('/'); - - while ((c = (char) input()) != '\n' && c != EOF) - { - InsertLineBuffer (c); - } - - if (c == EOF) - { - /* End of file is OK, change to newline. Let parser detect EOF later */ - - c = '\n'; - } - - InsertLineBuffer (c); - return (TRUE); -} - - -/******************************************************************************* - * - * FUNCTION: literal - * - * PARAMETERS: none - * - * RETURN: none - * - * DESCRIPTION: Process a string literal (surrounded by quotes) - * - ******************************************************************************/ - -#define ASL_NORMAL_CHAR 0 -#define ASL_ESCAPE_SEQUENCE 1 -#define ASL_OCTAL_CONSTANT 2 -#define ASL_HEX_CONSTANT 3 - -char -literal (void) -{ - char *StringBuffer = MsgBuffer; - char *EndBuffer = MsgBuffer + ASL_MSG_BUFFER_SIZE; - char *CleanString; - char StringChar; - UINT32 State = ASL_NORMAL_CHAR; - UINT32 i = 0; - UINT8 Digit; - char ConvertBuffer[4]; - - - /* - * Eat chars until end-of-literal. - * NOTE: Put back the original surrounding quotes into the - * source line buffer. - */ - InsertLineBuffer ('\"'); - while ((StringChar = (char) input()) != EOF) - { - InsertLineBuffer (StringChar); - -DoCharacter: - - switch (State) - { - case ASL_NORMAL_CHAR: - - switch (StringChar) - { - case '\\': - /* - * Special handling for backslash-escape sequence. We will - * toss the backslash and translate the escape char(s). - */ - State = ASL_ESCAPE_SEQUENCE; - continue; - - case '\"': - - /* String terminator */ - - goto CompletedString; - } - break; - - - case ASL_ESCAPE_SEQUENCE: - - State = ASL_NORMAL_CHAR; - switch (StringChar) - { - case 'a': - StringChar = 0x07; /* BELL */ - break; - - case 'b': - StringChar = 0x08; /* BACKSPACE */ - break; - - case 'f': - StringChar = 0x0C; /* FORMFEED */ - break; - - case 'n': - StringChar = 0x0A; /* LINEFEED */ - break; - - case 'r': - StringChar = 0x0D; /* CARRIAGE RETURN*/ - break; - - case 't': - StringChar = 0x09; /* HORIZONTAL TAB */ - break; - - case 'v': - StringChar = 0x0B; /* VERTICAL TAB */ - break; - - case 'x': - State = ASL_HEX_CONSTANT; - i = 0; - continue; - - case '\'': /* Single Quote */ - case '\"': /* Double Quote */ - case '\\': /* Backslash */ - break; - - default: - - /* Check for an octal digit (0-7) */ - - if (ACPI_IS_OCTAL_DIGIT (StringChar)) - { - State = ASL_OCTAL_CONSTANT; - ConvertBuffer[0] = StringChar; - i = 1; - continue; - } - - /* Unknown escape sequence issue warning, but use the character */ - - AslCommonError (ASL_WARNING, ASL_MSG_INVALID_ESCAPE, - Gbl_CurrentLineNumber, Gbl_LogicalLineNumber, - Gbl_CurrentLineOffset, Gbl_CurrentColumn, - Gbl_Files[ASL_FILE_INPUT].Filename, NULL); - break; - } - break; - - - case ASL_OCTAL_CONSTANT: - - /* Up to three octal digits allowed */ - - if (!ACPI_IS_OCTAL_DIGIT (StringChar) || - (i > 2)) - { - /* - * Reached end of the constant. Convert the assembled ASCII - * string and resume processing of the next character - */ - ConvertBuffer[i] = 0; - Digit = (UINT8) ACPI_STRTOUL (ConvertBuffer, NULL, 8); - - /* Check for NULL or non-ascii character (ignore if so) */ - - if ((Digit == 0) || (Digit > ACPI_ASCII_MAX)) - { - AslCommonError (ASL_WARNING, ASL_MSG_INVALID_STRING, - Gbl_CurrentLineNumber, Gbl_LogicalLineNumber, - Gbl_CurrentLineOffset, Gbl_CurrentColumn, - Gbl_Files[ASL_FILE_INPUT].Filename, NULL); - } - else - { - *StringBuffer = (char) Digit; - StringBuffer++; - if (StringBuffer >= EndBuffer) - { - goto BufferOverflow; - } - } - - State = ASL_NORMAL_CHAR; - goto DoCharacter; - break; - } - - /* Append another digit of the constant */ - - ConvertBuffer[i] = StringChar; - i++; - continue; - - - case ASL_HEX_CONSTANT: - - /* Up to two hex digits allowed */ - - if (!ACPI_IS_XDIGIT (StringChar) || - (i > 1)) - { - /* - * Reached end of the constant. Convert the assembled ASCII - * string and resume processing of the next character - */ - ConvertBuffer[i] = 0; - Digit = (UINT8) ACPI_STRTOUL (ConvertBuffer, NULL, 16); - - /* Check for NULL or non-ascii character (ignore if so) */ - - if ((Digit == 0) || (Digit > ACPI_ASCII_MAX)) - { - AslCommonError (ASL_WARNING, ASL_MSG_INVALID_STRING, - Gbl_CurrentLineNumber, Gbl_LogicalLineNumber, - Gbl_CurrentLineOffset, Gbl_CurrentColumn, - Gbl_Files[ASL_FILE_INPUT].Filename, NULL); - } - else - { - *StringBuffer = (char) Digit; - StringBuffer++; - if (StringBuffer >= EndBuffer) - { - goto BufferOverflow; - } - } - - State = ASL_NORMAL_CHAR; - goto DoCharacter; - break; - } - - /* Append another digit of the constant */ - - ConvertBuffer[i] = StringChar; - i++; - continue; - } - - /* Save the finished character */ - - *StringBuffer = StringChar; - StringBuffer++; - if (StringBuffer >= EndBuffer) - { - goto BufferOverflow; - } - } - - /* - * Premature End-Of-File - */ - AslCommonError (ASL_ERROR, ASL_MSG_EARLY_EOF, - Gbl_CurrentLineNumber, Gbl_LogicalLineNumber, - Gbl_CurrentLineOffset, Gbl_CurrentColumn, - Gbl_Files[ASL_FILE_INPUT].Filename, NULL); - return (FALSE); - - -CompletedString: - /* - * Null terminate the input string and copy string to a new buffer - */ - *StringBuffer = 0; - - CleanString = UtGetStringBuffer (strlen (MsgBuffer) + 1); - if (!CleanString) - { - AslCommonError (ASL_ERROR, ASL_MSG_MEMORY_ALLOCATION, - Gbl_CurrentLineNumber, Gbl_LogicalLineNumber, - Gbl_CurrentLineOffset, Gbl_CurrentColumn, - Gbl_Files[ASL_FILE_INPUT].Filename, NULL); - return (FALSE); - } - - ACPI_STRCPY (CleanString, MsgBuffer); - AslCompilerlval.s = CleanString; - return (TRUE); - - -BufferOverflow: - - /* Literal was too long */ - - AslCommonError (ASL_ERROR, ASL_MSG_STRING_LENGTH, - Gbl_CurrentLineNumber, Gbl_LogicalLineNumber, - Gbl_CurrentLineOffset, Gbl_CurrentColumn, - Gbl_Files[ASL_FILE_INPUT].Filename, "Max length 4096"); - return (FALSE); -} - - +/* + * Bring in the scanner support routines + */ +#include Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.y Mon Apr 23 22:37:48 2012 (r234622) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.y Mon Apr 23 23:05:14 2012 (r234623) @@ -236,7 +236,6 @@ void * AslLocalAllo %token PARSEOP_I2C_SERIALBUS %token PARSEOP_IF %token PARSEOP_INCLUDE -%token PARSEOP_INCLUDE_CSTYLE %token PARSEOP_INCLUDE_END %token PARSEOP_INCREMENT %token PARSEOP_INDEX @@ -261,7 +260,6 @@ void * AslLocalAllo %token PARSEOP_LEQUAL %token PARSEOP_LGREATER %token PARSEOP_LGREATEREQUAL -%token PARSEOP_LINE_CSTYLE %token PARSEOP_LLESS %token PARSEOP_LLESSEQUAL %token PARSEOP_LNOT @@ -504,9 +502,7 @@ void * AslLocalAllo *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 03:27:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 90D23106566B; Tue, 24 Apr 2012 03:27:28 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B9B68FC16; Tue, 24 Apr 2012 03:27:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3O3RSoU028137; Tue, 24 Apr 2012 03:27:28 GMT (envelope-from bjk@svn.freebsd.org) Received: (from bjk@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3O3RSZi028135; Tue, 24 Apr 2012 03:27:28 GMT (envelope-from bjk@svn.freebsd.org) Message-Id: <201204240327.q3O3RSZi028135@svn.freebsd.org> From: Benjamin Kaduk Date: Tue, 24 Apr 2012 03:27:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234628 - stable/9/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 03:27:28 -0000 Author: bjk (doc committer) Date: Tue Apr 24 03:27:27 2012 New Revision: 234628 URL: http://svn.freebsd.org/changeset/base/234628 Log: MFC r233160: Expound a bit more about the system maximum number of FIBs, how it may be set, and current limitations on the value. PR: docs/157453 Approved by: hrs (mentor) Modified: stable/9/lib/libc/sys/setfib.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/sys/setfib.2 ============================================================================== --- stable/9/lib/libc/sys/setfib.2 Tue Apr 24 01:12:43 2012 (r234627) +++ stable/9/lib/libc/sys/setfib.2 Tue Apr 24 03:27:27 2012 (r234628) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 8, 2008 +.Dd March 19, 2012 .Dt SETFIB 2 .Os .Sh NAME @@ -45,10 +45,28 @@ subsequent to the call, to be that of th The .Fa fib argument -may be between 0 and the current system maximum which +must be greater than or equal to 0 +and less than the current system maximum which may be retrieved by the .Va net.fibs sysctl. +The system maximum is set in the kernel configuration file with +.Pp +.Dl options ROUTETABLES= Ns Em N +.Pp +or in +.Pa /boot/loader.conf +with +.Pp +.Dl net.fibs= Ns Qq Em N +.Pp +where +.Em N +is an integer. +However, this maximum is capped at 16 due to the implementation storing +the fib number in a 4-bit field in +.Xr mbuf 9 +flags. The default fib of the process will be applied to all protocol families that support multiple fibs, and ignored by those that do not. The default fib for a process may be overridden for a socket with the use From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 03:29:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FA841065670; Tue, 24 Apr 2012 03:29:11 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A4238FC08; Tue, 24 Apr 2012 03:29:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3O3TBNw028224; Tue, 24 Apr 2012 03:29:11 GMT (envelope-from bjk@svn.freebsd.org) Received: (from bjk@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3O3TBqV028222; Tue, 24 Apr 2012 03:29:11 GMT (envelope-from bjk@svn.freebsd.org) Message-Id: <201204240329.q3O3TBqV028222@svn.freebsd.org> From: Benjamin Kaduk Date: Tue, 24 Apr 2012 03:29:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234629 - stable/8/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 03:29:11 -0000 Author: bjk (doc committer) Date: Tue Apr 24 03:29:10 2012 New Revision: 234629 URL: http://svn.freebsd.org/changeset/base/234629 Log: MFC r233160: Expound a bit more about the system maximum number of FIBs, how it may be set, and current limitations on the value. PR: docs/157453 Approved by: hrs (mentor) Modified: stable/8/lib/libc/sys/setfib.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/sys/setfib.2 ============================================================================== --- stable/8/lib/libc/sys/setfib.2 Tue Apr 24 03:27:27 2012 (r234628) +++ stable/8/lib/libc/sys/setfib.2 Tue Apr 24 03:29:10 2012 (r234629) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 8, 2008 +.Dd March 19, 2012 .Dt SETFIB 2 .Os .Sh NAME @@ -45,10 +45,28 @@ subsequent to the call, to be that of th The .Fa fib argument -may be between 0 and the current system maximum which +must be greater than or equal to 0 +and less than the current system maximum which may be retrieved by the .Va net.fibs sysctl. +The system maximum is set in the kernel configuration file with +.Pp +.Dl options ROUTETABLES= Ns Em N +.Pp +or in +.Pa /boot/loader.conf +with +.Pp +.Dl net.fibs= Ns Qq Em N +.Pp +where +.Em N +is an integer. +However, this maximum is capped at 16 due to the implementation storing +the fib number in a 4-bit field in +.Xr mbuf 9 +flags. The default fib of the process will be applied to all protocol families that support multiple fibs, and ignored by those that do not. The default fib for a process may be overridden for a socket with the use From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 03:30:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A1D91065675; Tue, 24 Apr 2012 03:30:27 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4543A8FC0C; Tue, 24 Apr 2012 03:30:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3O3URov028309; Tue, 24 Apr 2012 03:30:27 GMT (envelope-from bjk@svn.freebsd.org) Received: (from bjk@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3O3UROH028307; Tue, 24 Apr 2012 03:30:27 GMT (envelope-from bjk@svn.freebsd.org) Message-Id: <201204240330.q3O3UROH028307@svn.freebsd.org> From: Benjamin Kaduk Date: Tue, 24 Apr 2012 03:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234630 - stable/7/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 03:30:27 -0000 Author: bjk (doc committer) Date: Tue Apr 24 03:30:26 2012 New Revision: 234630 URL: http://svn.freebsd.org/changeset/base/234630 Log: MFC r233160: Expound a bit more about the system maximum number of FIBs, how it may be set, and current limitations on the value. PR: docs/157453 Approved by: hrs (mentor) Modified: stable/7/lib/libc/sys/setfib.2 Directory Properties: stable/7/lib/libc/ (props changed) Modified: stable/7/lib/libc/sys/setfib.2 ============================================================================== --- stable/7/lib/libc/sys/setfib.2 Tue Apr 24 03:29:10 2012 (r234629) +++ stable/7/lib/libc/sys/setfib.2 Tue Apr 24 03:30:26 2012 (r234630) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 9, 2008 +.Dd March 19, 2012 .Dt SETFIB 2 .Os .Sh NAME @@ -44,10 +44,28 @@ subsequent to the call, to be that of th The .Fa fib argument -may be between 0 and the current system maximum which +must be greater than or equal to 0 +and less than the current system maximum which may be retrieved by the .Em net.fibs sysctl. +The system maximum is set in the kernel configuration file with +.Pp +.Dl options ROUTETABLES= Ns Em N +.Pp +or in +.Pa /boot/loader.conf +with +.Pp +.Dl net.fibs= Ns Qq Em N +.Pp +where +.Em N +is an integer. +However, this maximum is capped at 16 due to the implementation storing +the fib number in a 4-bit field in +.Xr mbuf 9 +flags. The default fib of the process will be applied to all protocol families that support multiple fibs, and ignored by those that do not. The default fib for a process may be overidden for a socket with the use From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 03:56:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CE0F1065672; Tue, 24 Apr 2012 03:56:40 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 87BC88FC0A; Tue, 24 Apr 2012 03:56:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3O3ueHj029144; Tue, 24 Apr 2012 03:56:40 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3O3ueci029142; Tue, 24 Apr 2012 03:56:40 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201204240356.q3O3ueci029142@svn.freebsd.org> From: David Schultz Date: Tue, 24 Apr 2012 03:56:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234631 - stable/8/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 03:56:40 -0000 Author: das Date: Tue Apr 24 03:56:39 2012 New Revision: 234631 URL: http://svn.freebsd.org/changeset/base/234631 Log: MFC r234528, r234536: Fix an infinite loop in fputws(). Modified: stable/8/lib/libc/stdio/fputws.c Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/stdio/fputws.c ============================================================================== --- stable/8/lib/libc/stdio/fputws.c Tue Apr 24 03:30:26 2012 (r234630) +++ stable/8/lib/libc/stdio/fputws.c Tue Apr 24 03:56:39 2012 (r234631) @@ -54,8 +54,8 @@ fputws(const wchar_t * __restrict ws, FI uio.uio_iov = &iov; uio.uio_iovcnt = 1; iov.iov_base = buf; + wsp = ws; do { - wsp = ws; nbytes = __wcsnrtombs(buf, &wsp, SIZE_T_MAX, sizeof(buf), &fp->_mbstate); if (nbytes == (size_t)-1) @@ -63,7 +63,7 @@ fputws(const wchar_t * __restrict ws, FI iov.iov_len = uio.uio_resid = nbytes; if (__sfvwrite(fp, &uio) != 0) goto error; - } while (ws != NULL); + } while (wsp != NULL); FUNLOCKFILE(fp); return (0); From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 03:56:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CF2A01065748; Tue, 24 Apr 2012 03:56:46 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 23D808FC0C; Tue, 24 Apr 2012 03:56:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3O3ujog029183; Tue, 24 Apr 2012 03:56:45 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3O3uj3j029181; Tue, 24 Apr 2012 03:56:45 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201204240356.q3O3uj3j029181@svn.freebsd.org> From: David Schultz Date: Tue, 24 Apr 2012 03:56:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234632 - stable/9/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 03:56:47 -0000 Author: das Date: Tue Apr 24 03:56:45 2012 New Revision: 234632 URL: http://svn.freebsd.org/changeset/base/234632 Log: MFC r234528, r234536: Fix an infinite loop in fputws(). Modified: stable/9/lib/libc/stdio/fputws.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/stdio/fputws.c ============================================================================== --- stable/9/lib/libc/stdio/fputws.c Tue Apr 24 03:56:39 2012 (r234631) +++ stable/9/lib/libc/stdio/fputws.c Tue Apr 24 03:56:45 2012 (r234632) @@ -54,8 +54,8 @@ fputws(const wchar_t * __restrict ws, FI uio.uio_iov = &iov; uio.uio_iovcnt = 1; iov.iov_base = buf; + wsp = ws; do { - wsp = ws; nbytes = __wcsnrtombs(buf, &wsp, SIZE_T_MAX, sizeof(buf), &fp->_mbstate); if (nbytes == (size_t)-1) @@ -63,7 +63,7 @@ fputws(const wchar_t * __restrict ws, FI iov.iov_len = uio.uio_resid = nbytes; if (__sfvwrite(fp, &uio) != 0) goto error; - } while (ws != NULL); + } while (wsp != NULL); FUNLOCKFILE(fp); return (0); From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 03:59:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A9AE1065673; Tue, 24 Apr 2012 03:59:14 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 059858FC1A; Tue, 24 Apr 2012 03:59:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3O3xDe6029351; Tue, 24 Apr 2012 03:59:13 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3O3xDg4029349; Tue, 24 Apr 2012 03:59:13 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201204240359.q3O3xDg4029349@svn.freebsd.org> From: David Schultz Date: Tue, 24 Apr 2012 03:59:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234633 - stable/7/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 03:59:14 -0000 Author: das Date: Tue Apr 24 03:59:13 2012 New Revision: 234633 URL: http://svn.freebsd.org/changeset/base/234633 Log: MFC r234529: Ensure that the {,v}swprintf functions always null-terminate the output string, even if an encoding error or malloc failure occurs. Modified: stable/7/lib/libc/stdio/vswprintf.c Directory Properties: stable/7/lib/libc/ (props changed) Modified: stable/7/lib/libc/stdio/vswprintf.c ============================================================================== --- stable/7/lib/libc/stdio/vswprintf.c Tue Apr 24 03:56:45 2012 (r234632) +++ stable/7/lib/libc/stdio/vswprintf.c Tue Apr 24 03:59:13 2012 (r234633) @@ -61,6 +61,7 @@ vswprintf(wchar_t * __restrict s, size_t f._bf._base = f._p = (unsigned char *)malloc(128); if (f._bf._base == NULL) { errno = ENOMEM; + *s = L'\0'; return (-1); } f._bf._size = f._w = 127; /* Leave room for the NUL */ @@ -71,6 +72,7 @@ vswprintf(wchar_t * __restrict s, size_t sverrno = errno; free(f._bf._base); errno = sverrno; + *s = L'\0'; return (-1); } *f._p = '\0'; @@ -84,6 +86,7 @@ vswprintf(wchar_t * __restrict s, size_t free(f._bf._base); if (nwc == (size_t)-1) { errno = EILSEQ; + *s = L'\0'; return (-1); } if (nwc == n) { From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 03:59:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B66C7106567A; Tue, 24 Apr 2012 03:59:18 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A14058FC12; Tue, 24 Apr 2012 03:59:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3O3xInO029390; Tue, 24 Apr 2012 03:59:18 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3O3xIlk029388; Tue, 24 Apr 2012 03:59:18 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201204240359.q3O3xIlk029388@svn.freebsd.org> From: David Schultz Date: Tue, 24 Apr 2012 03:59:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234634 - stable/8/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 03:59:18 -0000 Author: das Date: Tue Apr 24 03:59:18 2012 New Revision: 234634 URL: http://svn.freebsd.org/changeset/base/234634 Log: MFC r234529: Ensure that the {,v}swprintf functions always null-terminate the output string, even if an encoding error or malloc failure occurs. Modified: stable/8/lib/libc/stdio/vswprintf.c Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/stdio/vswprintf.c ============================================================================== --- stable/8/lib/libc/stdio/vswprintf.c Tue Apr 24 03:59:13 2012 (r234633) +++ stable/8/lib/libc/stdio/vswprintf.c Tue Apr 24 03:59:18 2012 (r234634) @@ -59,6 +59,7 @@ vswprintf(wchar_t * __restrict s, size_t f._bf._base = f._p = (unsigned char *)malloc(128); if (f._bf._base == NULL) { errno = ENOMEM; + *s = L'\0'; return (-1); } f._bf._size = f._w = 127; /* Leave room for the NUL */ @@ -67,6 +68,7 @@ vswprintf(wchar_t * __restrict s, size_t sverrno = errno; free(f._bf._base); errno = sverrno; + *s = L'\0'; return (-1); } *f._p = '\0'; @@ -80,6 +82,7 @@ vswprintf(wchar_t * __restrict s, size_t free(f._bf._base); if (nwc == (size_t)-1) { errno = EILSEQ; + *s = L'\0'; return (-1); } if (nwc == n) { From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 03:59:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7B561106566B; Tue, 24 Apr 2012 03:59:22 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 668998FC14; Tue, 24 Apr 2012 03:59:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3O3xMNI029429; Tue, 24 Apr 2012 03:59:22 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3O3xMP2029427; Tue, 24 Apr 2012 03:59:22 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201204240359.q3O3xMP2029427@svn.freebsd.org> From: David Schultz Date: Tue, 24 Apr 2012 03:59:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234635 - stable/9/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 03:59:22 -0000 Author: das Date: Tue Apr 24 03:59:21 2012 New Revision: 234635 URL: http://svn.freebsd.org/changeset/base/234635 Log: MFC r234529: Ensure that the {,v}swprintf functions always null-terminate the output string, even if an encoding error or malloc failure occurs. Modified: stable/9/lib/libc/stdio/vswprintf.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/stdio/vswprintf.c ============================================================================== --- stable/9/lib/libc/stdio/vswprintf.c Tue Apr 24 03:59:18 2012 (r234634) +++ stable/9/lib/libc/stdio/vswprintf.c Tue Apr 24 03:59:21 2012 (r234635) @@ -59,6 +59,7 @@ vswprintf(wchar_t * __restrict s, size_t f._bf._base = f._p = (unsigned char *)malloc(128); if (f._bf._base == NULL) { errno = ENOMEM; + *s = L'\0'; return (-1); } f._bf._size = f._w = 127; /* Leave room for the NUL */ @@ -67,6 +68,7 @@ vswprintf(wchar_t * __restrict s, size_t sverrno = errno; free(f._bf._base); errno = sverrno; + *s = L'\0'; return (-1); } *f._p = '\0'; @@ -80,6 +82,7 @@ vswprintf(wchar_t * __restrict s, size_t free(f._bf._base); if (nwc == (size_t)-1) { errno = EILSEQ; + *s = L'\0'; return (-1); } if (nwc == n) { From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 06:26:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BE2FC106566C; Tue, 24 Apr 2012 06:26:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9E358FC15; Tue, 24 Apr 2012 06:26:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3O6QEJh033901; Tue, 24 Apr 2012 06:26:14 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3O6QEbU033898; Tue, 24 Apr 2012 06:26:14 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201204240626.q3O6QEbU033898@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 24 Apr 2012 06:26:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234636 - head/usr.sbin/usbdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 06:26:14 -0000 Author: hselasky Date: Tue Apr 24 06:26:14 2012 New Revision: 234636 URL: http://svn.freebsd.org/changeset/base/234636 Log: Improve support for USB packet filtering also when reading dumps, and allow filtered data to be dumped to a binary file. MFC after: 1 week Modified: head/usr.sbin/usbdump/usbdump.8 head/usr.sbin/usbdump/usbdump.c Modified: head/usr.sbin/usbdump/usbdump.8 ============================================================================== --- head/usr.sbin/usbdump/usbdump.8 Tue Apr 24 03:59:21 2012 (r234635) +++ head/usr.sbin/usbdump/usbdump.8 Tue Apr 24 06:26:14 2012 (r234636) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 16, 2012 +.Dd April 24, 2012 .Dt USBDUMP 8 .Os .Sh NAME @@ -39,6 +39,7 @@ .Op Fl v .Op Fl w Ar file .Op Fl f Ar filter +.Op Fl b Ar file .Sh DESCRIPTION The .Nm @@ -46,12 +47,17 @@ utility provides a way to dump USB packe .Pp The following options are accepted: .Bl -tag -width ".Fl f Ar file" +.It Fl b Ar file +Store data part of the USB trace in binary format to the given +.Ar file . +This option also works with the -r and -f options. .It Fl i Ar ifname Listen on USB bus interface .Ar ifname . .It Fl r Ar file Read the raw packets from .Ar file . +This option also works with the -f option. .It Fl s Ar snaplen Snapshot .Ar snaplen @@ -62,6 +68,7 @@ When defined multiple times the verbosit .It Fl w Ar file Write the raw packets to .Ar file . +This option also works with the -s and -v options. .It Fl f Ar filter The filter argument consists of either one or two numbers separated by a dot. The first indicates the device unit number which should be traced. Modified: head/usr.sbin/usbdump/usbdump.c ============================================================================== --- head/usr.sbin/usbdump/usbdump.c Tue Apr 24 03:59:21 2012 (r234635) +++ head/usr.sbin/usbdump/usbdump.c Tue Apr 24 06:26:14 2012 (r234636) @@ -82,6 +82,8 @@ struct usbcap { int wfd; /* for -r option */ int rfd; + /* for -b option */ + int bfd; }; struct usbcap_filehdr { @@ -112,6 +114,8 @@ static int uf_minor; static const char *i_arg = "usbus0"; static const char *r_arg = NULL; static const char *w_arg = NULL; +static const char *b_arg = NULL; +static struct usbcap uc; static const char *errstr_table[USB_ERR_MAX] = { [USB_ERR_NORMAL_COMPLETION] = "0", [USB_ERR_PENDING_REQUESTS] = "PENDING_REQUESTS", @@ -255,6 +259,22 @@ done: pprog->bf_insns = dynamic_insn; } +static int +match_filter(int unit, int endpoint) +{ + struct usb_filt *puf; + + if (STAILQ_FIRST(&usb_filt_head) == NULL) + return (1); + + STAILQ_FOREACH(puf, &usb_filt_head, entry) { + if ((puf->unit == -1 || puf->unit == unit) && + (puf->endpoint == -1 || puf->endpoint == endpoint)) + return (1); + } + return (0); +} + static void free_filter(struct bpf_program *pprog) { @@ -462,28 +482,33 @@ print_apacket(const struct header_32 *hd up->up_packet_count = le32toh(up->up_packet_count); up->up_endpoint = le32toh(up->up_endpoint); + if (!match_filter(up->up_address, up->up_endpoint)) + return; + tv.tv_sec = hdr->ts_sec; tv.tv_usec = hdr->ts_usec; tm = localtime(&tv.tv_sec); len = strftime(buf, sizeof(buf), "%H:%M:%S", tm); - printf("%.*s.%06ld usbus%d.%d %s-%s-EP=%08x,SPD=%s,NFR=%d,SLEN=%d,IVAL=%d%s%s\n", - (int)len, buf, tv.tv_usec, - (int)up->up_busunit, (int)up->up_address, - (up->up_type == USBPF_XFERTAP_SUBMIT) ? "SUBM" : "DONE", - xfertype_table[up->up_xfertype], - (unsigned int)up->up_endpoint, - usb_speedstr(up->up_speed), - (int)up->up_frames, - (int)(up->up_totlen - USBPF_HDR_LEN - - (USBPF_FRAME_HDR_LEN * up->up_frames)), - (int)up->up_interval, - (up->up_type == USBPF_XFERTAP_DONE) ? ",ERR=" : "", - (up->up_type == USBPF_XFERTAP_DONE) ? - usb_errstr(up->up_error) : ""); + if (verbose >= 0) { + printf("%.*s.%06ld usbus%d.%d %s-%s-EP=%08x,SPD=%s,NFR=%d,SLEN=%d,IVAL=%d%s%s\n", + (int)len, buf, tv.tv_usec, + (int)up->up_busunit, (int)up->up_address, + (up->up_type == USBPF_XFERTAP_SUBMIT) ? "SUBM" : "DONE", + xfertype_table[up->up_xfertype], + (unsigned int)up->up_endpoint, + usb_speedstr(up->up_speed), + (int)up->up_frames, + (int)(up->up_totlen - USBPF_HDR_LEN - + (USBPF_FRAME_HDR_LEN * up->up_frames)), + (int)up->up_interval, + (up->up_type == USBPF_XFERTAP_DONE) ? ",ERR=" : "", + (up->up_type == USBPF_XFERTAP_DONE) ? + usb_errstr(up->up_error) : ""); + } - if (verbose >= 1) { + if (verbose >= 1 || b_arg != NULL) { for (x = 0; x != up->up_frames; x++) { const struct usbpf_framehdr *uf; uint32_t framelen; @@ -498,10 +523,12 @@ print_apacket(const struct header_32 *hd framelen = le32toh(uf->length); flags = le32toh(uf->flags); - printf(" frame[%u] %s %d bytes\n", - (unsigned int)x, - (flags & USBPF_FRAMEFLAG_READ) ? "READ" : "WRITE", - (int)framelen); + if (verbose >= 1) { + printf(" frame[%u] %s %d bytes\n", + (unsigned int)x, + (flags & USBPF_FRAMEFLAG_READ) ? "READ" : "WRITE", + (int)framelen); + } if (flags & USBPF_FRAMEFLAG_DATA_FOLLOWS) { @@ -515,7 +542,15 @@ print_apacket(const struct header_32 *hd (int)framelen < 0 || (int)ptr_len < 0) break; - hexdump(ptr, framelen); + if (b_arg != NULL) { + struct usbcap *p = &uc; + int ret; + ret = write(p->bfd, ptr, framelen); + if (ret != (int)framelen) + err(EXIT_FAILURE, "Could not write binary data"); + } + if (verbose >= 1) + hexdump(ptr, framelen); ptr += tot_frame_len; } @@ -592,7 +627,7 @@ print_packets(uint8_t *data, const int d if (next <= ptr) err(EXIT_FAILURE, "Invalid length"); - if (w_arg == NULL || r_arg != NULL) { + if (verbose >= 0 || r_arg != NULL || b_arg != NULL) { print_apacket(&temp, ptr + temp.hdrlen, temp.caplen); } @@ -738,6 +773,7 @@ usage(void) fprintf(stderr, FMT, "-r ", "Read the raw packets from file"); fprintf(stderr, FMT, "-s ", "Snapshot bytes from each packet"); fprintf(stderr, FMT, "-v", "Increase the verbose level"); + fprintf(stderr, FMT, "-b ", "Save raw version of all recorded data to file"); fprintf(stderr, FMT, "-w ", "Write the raw packets to file"); #undef FMT exit(EX_USAGE); @@ -750,7 +786,7 @@ main(int argc, char *argv[]) struct bpf_program total_prog; struct bpf_stat us; struct bpf_version bv; - struct usbcap uc, *p = &uc; + struct usbcap *p = &uc; struct ifreq ifr; long snapshot = 192; uint32_t v; @@ -761,9 +797,7 @@ main(int argc, char *argv[]) const char *optstring; char *pp; - memset(&uc, 0, sizeof(struct usbcap)); - - optstring = "i:r:s:vw:f:"; + optstring = "b:i:r:s:vw:f:"; while ((o = getopt(argc, argv, optstring)) != -1) { switch (o) { case 'i': @@ -784,6 +818,9 @@ main(int argc, char *argv[]) if (snapshot == 0) snapshot = -1; break; + case 'b': + b_arg = optarg; + break; case 'v': verbose++; break; @@ -811,6 +848,22 @@ main(int argc, char *argv[]) } } + if (b_arg != NULL) { + p->bfd = open(b_arg, O_CREAT | O_TRUNC | + O_WRONLY, S_IRUSR | S_IWUSR); + if (p->bfd < 0) { + err(EXIT_FAILURE, "Could not open " + "'%s' for write", b_arg); + } + } + + /* + * Require more verbosity to print anything when -w or -b is + * specified on the command line: + */ + if (w_arg != NULL || b_arg != NULL) + verbose--; + if (r_arg != NULL) { read_file(p); exit(EXIT_SUCCESS); @@ -882,6 +935,8 @@ main(int argc, char *argv[]) close(p->rfd); if (p->wfd > 0) close(p->wfd); + if (p->bfd > 0) + close(p->bfd); return (EXIT_SUCCESS); } From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 07:01:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EFC96106566B; Tue, 24 Apr 2012 07:01:34 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6FB08FC14; Tue, 24 Apr 2012 07:01:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3O71YX6035065; Tue, 24 Apr 2012 07:01:34 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3O71YES035057; Tue, 24 Apr 2012 07:01:34 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201204240701.q3O71YES035057@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Tue, 24 Apr 2012 07:01:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234637 - in stable/8: sbin/ipfw sys/netinet sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 07:01:35 -0000 Author: melifaro Date: Tue Apr 24 07:01:34 2012 New Revision: 234637 URL: http://svn.freebsd.org/changeset/base/234637 Log: MFC r232865, r232868, r233478 - Add ipfw eXtended tables permitting radix to be used for any kind of keys. - Add support for IPv6 and interface extended tables - Make number of tables to be changed in runtime in range 0..65534. - Use IP_FW3 opcode for all new extended table cmds No ABI changes are introduced. Old userland will see valid tables for IPv4 tables and no entries otherwise. Flush works for any table. IP_FW3 socket option is used to encapsulate all new opcodes: /* IP_FW3 header/opcodes */ typedef struct _ip_fw3_opheader { uint16_t opcode; /* Operation opcode */ uint16_t reserved[3]; /* Align to 64-bit boundary */ } ip_fw3_opheader; New opcodes added: IP_FW_TABLE_XADD, IP_FW_TABLE_XDEL, IP_FW_TABLE_XGETSIZE, IP_FW_TABLE_XLIST ipfw(8) table argument parsing behavior is changed: 'ipfw table 999 add some-unqualified-host' now assumes 'some-unqualified-host' to be interface name instead of hostname. New tunable: net.inet.ip.fw.tables_max controls number of table supported by ipfw in given VNET instance. 128 is still the default value. Sysctl change: net.inet.ip.fw.tables_max is now read-write. New syntax: ipfw add skipto tablearg ip from any to any via table(42) in ipfw add skipto tablearg ip from any to any via table(4242) out This is a bit hackish, special interface name '\1' is used to signal interface table number is passed in p.glob field. Sponsored by Yandex LLC Approved by: kib(mentor) Modified: stable/8/sbin/ipfw/ipfw.8 stable/8/sbin/ipfw/ipfw2.c stable/8/sys/netinet/ip_fw.h stable/8/sys/netinet/ipfw/ip_fw2.c stable/8/sys/netinet/ipfw/ip_fw_private.h stable/8/sys/netinet/ipfw/ip_fw_sockopt.c stable/8/sys/netinet/ipfw/ip_fw_table.c Directory Properties: stable/8/sbin/ipfw/ (props changed) stable/8/sys/ (props changed) Modified: stable/8/sbin/ipfw/ipfw.8 ============================================================================== --- stable/8/sbin/ipfw/ipfw.8 Tue Apr 24 06:26:14 2012 (r234636) +++ stable/8/sbin/ipfw/ipfw.8 Tue Apr 24 07:01:34 2012 (r234637) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 29, 2011 +.Dd March 9, 2012 .Dt IPFW 8 .Os .Sh NAME @@ -1536,7 +1536,7 @@ and they are always printed as hexadecim option is used, in which case symbolic resolution will be attempted). .It Cm proto Ar protocol Matches packets with the corresponding IP protocol. -.It Cm recv | xmit | via Brq Ar ifX | Ar if Ns Cm * | Ar ipno | Ar any +.It Cm recv | xmit | via Brq Ar ifX | Ar if Ns Cm * | Ar table Ns Pq Ar number Ns Op , Ns Ar value | Ar ipno | Ar any Matches packets received, transmitted or going through, respectively, the interface specified by exact name .Ns No ( Ar ifX Ns No ), @@ -1722,22 +1722,21 @@ connected networks instead of all source .El .Sh LOOKUP TABLES Lookup tables are useful to handle large sparse sets of -addresses or other search keys (e.g. ports, jail IDs). -In the rest of this section we will use the term ``address'' -to mean any unsigned value of up to 32-bit. -There may be up to 128 different lookup tables, numbered 0 to 127. +addresses or other search keys (e.g. ports, jail IDs, interface names). +In the rest of this section we will use the term ``address''. +There may be up to 4096 different lookup tables, numbered 0 to 4095. .Pp Each entry is represented by an .Ar addr Ns Op / Ns Ar masklen and will match all addresses with base .Ar addr -(specified as an IP address, a hostname or an unsigned integer) +(specified as an IPv4/IPv6 address, a hostname or an unsigned integer) and mask width of .Ar masklen bits. If .Ar masklen -is not specified, it defaults to 32. +is not specified, it defaults to 32 for IPv4 and 128 for IPv6. When looking up an IP address in a table, the most specific entry will match. Associated with each entry is a 32-bit unsigned @@ -1760,7 +1759,8 @@ Internally, each table is stored in a Ra the routing table (see .Xr route 4 ) . .Pp -Lookup tables currently support only ports, jail IDs and IPv4 addresses. +Lookup tables currently support only ports, jail IDs, IPv4/IPv6 addresses +and interface names. Wildcards is not supported for interface names. .Pp The .Cm tablearg @@ -2564,6 +2564,22 @@ instances. See .Sx SYSCTL VARIABLES for more info. +.Sh LOADER TUNABLES +Tunables can be set in +.Xr loader 8 +prompt, +.Xr loader.conf 5 +or +.Xr kenv 1 +before ipfw module gets loaded. +.Bl -tag -width indent +.It Va net.inet.ip.fw.default_to_accept: No 0 +Defines ipfw last rule behavior. This value overrides +.Cd "options IPFW_DEFAULT_TO_(ACCEPT|DENY)" +from kernel configuration file. +.It Va net.inet.ip.fw.tables_max: No 128 +Defines number of tables available in ipfw. Number cannot exceed 65534. +.El .Sh SYSCTL VARIABLES A set of .Xr sysctl 8 @@ -3097,6 +3113,16 @@ action, the table entries may include ho .Dl "ipfw table 1 add 192.168.0.0/27 router1.dmz" .Dl "..." .Dl "ipfw add 100 fwd tablearg ip from any to table(1)" +.Pp +In the following example per-interface firewall is created: +.Pp +.Dl "ipfw table 10 add vlan20 12000" +.Dl "ipfw table 10 add vlan30 13000" +.Dl "ipfw table 20 add vlan20 22000" +.Dl "ipfw table 20 add vlan30 23000" +.Dl ".." +.Dl "ipfw add 100 ipfw skipto tablearg ip from any to any recv 'table(10)' in" +.Dl "ipfw add 200 ipfw skipto tablearg ip from any to any xmit 'table(10)' out" .Ss SETS OF RULES To add a set of rules atomically, e.g.\& set 18: .Pp Modified: stable/8/sbin/ipfw/ipfw2.c ============================================================================== --- stable/8/sbin/ipfw/ipfw2.c Tue Apr 24 06:26:14 2012 (r234636) +++ stable/8/sbin/ipfw/ipfw2.c Tue Apr 24 07:01:34 2012 (r234637) @@ -21,6 +21,7 @@ */ #include +#include #include #include #include @@ -41,6 +42,7 @@ #include /* _long_to_time */ #include #include +#include /* offsetof */ #include #include /* only IFNAMSIZ */ @@ -56,6 +58,12 @@ struct cmdline_opts co; /* global option int resvd_set_number = RESVD_SET; +int ipfw_socket = -1; + +#ifndef s6_addr32 +#define s6_addr32 __u6_addr.__u6_addr32 +#endif + #define GET_UINT_ARG(arg, min, max, tok, s_x) do { \ if (!av[0]) \ errx(EX_USAGE, "%s: missing argument", match_value(s_x, tok)); \ @@ -361,33 +369,65 @@ safe_realloc(void *ptr, size_t size) int do_cmd(int optname, void *optval, uintptr_t optlen) { - static int s = -1; /* the socket */ int i; if (co.test_only) return 0; - if (s == -1) - s = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); - if (s < 0) + if (ipfw_socket == -1) + ipfw_socket = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); + if (ipfw_socket < 0) err(EX_UNAVAILABLE, "socket"); if (optname == IP_FW_GET || optname == IP_DUMMYNET_GET || - optname == IP_FW_ADD || optname == IP_FW_TABLE_LIST || - optname == IP_FW_TABLE_GETSIZE || + optname == IP_FW_ADD || optname == IP_FW3 || optname == IP_FW_NAT_GET_CONFIG || optname < 0 || optname == IP_FW_NAT_GET_LOG) { if (optname < 0) optname = -optname; - i = getsockopt(s, IPPROTO_IP, optname, optval, + i = getsockopt(ipfw_socket, IPPROTO_IP, optname, optval, (socklen_t *)optlen); } else { - i = setsockopt(s, IPPROTO_IP, optname, optval, optlen); + i = setsockopt(ipfw_socket, IPPROTO_IP, optname, optval, optlen); } return i; } +/* + * do_setcmd3 - pass ipfw control cmd to kernel + * @optname: option name + * @optval: pointer to option data + * @optlen: option length + * + * Function encapsulates option value in IP_FW3 socket option + * and calls setsockopt(). + * Function returns 0 on success or -1 otherwise. + */ +int +do_setcmd3(int optname, void *optval, socklen_t optlen) +{ + socklen_t len; + ip_fw3_opheader *op3; + + if (co.test_only) + return (0); + + if (ipfw_socket == -1) + ipfw_socket = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); + if (ipfw_socket < 0) + err(EX_UNAVAILABLE, "socket"); + + len = sizeof(ip_fw3_opheader) + optlen; + op3 = alloca(len); + /* Zero reserved fields */ + memset(op3, 0, sizeof(ip_fw3_opheader)); + memcpy(op3 + 1, optval, optlen); + op3->opcode = optname; + + return setsockopt(ipfw_socket, IPPROTO_IP, IP_FW3, op3, len); +} + /** * match_token takes a table and a string, returns the value associated * with the string (-1 in case of failure). @@ -1385,6 +1425,8 @@ show_ipfw(struct ip_fw *rule, int pcwidt if (cmdif->name[0] == '\0') printf(" %s %s", s, inet_ntoa(cmdif->p.ip)); + else if (cmdif->name[0] == '\1') /* interface table */ + printf(" %s table(%d)", s, cmdif->p.glob); else printf(" %s %s", s, cmdif->name); @@ -2304,7 +2346,13 @@ fill_iface(ipfw_insn_if *cmd, char *arg) /* Parse the interface or address */ if (strcmp(arg, "any") == 0) cmd->o.len = 0; /* effectively ignore this command */ - else if (!isdigit(*arg)) { + else if (strncmp(arg, "table(", 6) == 0) { + char *p = strchr(arg + 6, ','); + if (p) + *p++ = '\0'; + cmd->name[0] = '\1'; /* Special value indicating table */ + cmd->p.glob = strtoul(arg + 6, NULL, 0); + } else if (!isdigit(*arg)) { strlcpy(cmd->name, arg, sizeof(cmd->name)); cmd->p.glob = strpbrk(arg, "*?[") != NULL ? 1 : 0; } else if (!inet_aton(arg, &cmd->p.ip)) @@ -3772,7 +3820,7 @@ ipfw_flush(int force) } -static void table_list(ipfw_table_entry ent, int need_header); +static void table_list(uint16_t num, int need_header); /* * This one handles all table-related commands @@ -3784,12 +3832,12 @@ static void table_list(ipfw_table_entry void ipfw_table_handler(int ac, char *av[]) { - ipfw_table_entry ent; + ipfw_table_xentry xent; int do_add; int is_all; size_t len; char *p; - uint32_t a; + uint32_t a, type, mask, addrlen; uint32_t tables_max; len = sizeof(tables_max); @@ -3804,18 +3852,20 @@ ipfw_table_handler(int ac, char *av[]) #endif } + memset(&xent, 0, sizeof(xent)); + ac--; av++; if (ac && isdigit(**av)) { - ent.tbl = atoi(*av); + xent.tbl = atoi(*av); is_all = 0; ac--; av++; } else if (ac && _substrcmp(*av, "all") == 0) { - ent.tbl = 0; + xent.tbl = 0; is_all = 1; ac--; av++; } else errx(EX_USAGE, "table number or 'all' keyword required"); - if (ent.tbl >= tables_max) + if (xent.tbl >= tables_max) errx(EX_USAGE, "The table number exceeds the maximum allowed " "value (%d)", tables_max - 1); NEED1("table needs command"); @@ -3828,104 +3878,181 @@ ipfw_table_handler(int ac, char *av[]) do_add = **av == 'a'; ac--; av++; if (!ac) - errx(EX_USAGE, "IP address required"); - p = strchr(*av, '/'); - if (p) { - *p++ = '\0'; - ent.masklen = atoi(p); - if (ent.masklen > 32) - errx(EX_DATAERR, "bad width ``%s''", p); - } else - ent.masklen = 32; - if (lookup_host(*av, (struct in_addr *)&ent.addr) != 0) - errx(EX_NOHOST, "hostname ``%s'' unknown", *av); + errx(EX_USAGE, "address required"); + /* + * Let's try to guess type by agrument. + * Possible types: + * 1) IPv4[/mask] + * 2) IPv6[/mask] + * 3) interface name + * 4) port ? + */ + type = 0; + if (ishexnumber(*av[0])) { + /* Remove / if exists */ + if ((p = strchr(*av, '/')) != NULL) { + *p = '\0'; + mask = atoi(p + 1); + } + + if (inet_pton(AF_INET, *av, &xent.k.addr6) == 1) { + type = IPFW_TABLE_CIDR; + if ((p != NULL) && (mask > 32)) + errx(EX_DATAERR, "bad IPv4 mask width: %s", p + 1); + xent.masklen = p ? mask : 32; + addrlen = sizeof(struct in_addr); + } else if (inet_pton(AF_INET6, *av, &xent.k.addr6) == 1) { + type = IPFW_TABLE_CIDR; + if ((p != NULL) && (mask > 128)) + errx(EX_DATAERR, "bad IPv6 mask width: %s", p + 1); + xent.masklen = p ? mask : 128; + addrlen = sizeof(struct in6_addr); + } + } + + if ((type == 0) && (strchr(*av, '.') == NULL)) { + /* Assume interface name. Copy significant data only */ + mask = MIN(strlen(*av), IF_NAMESIZE - 1); + memcpy(xent.k.iface, *av, mask); + /* Set mask to exact match */ + xent.masklen = 8 * IF_NAMESIZE; + type = IPFW_TABLE_INTERFACE; + addrlen = IF_NAMESIZE; + } + + if (type == 0) { + if (lookup_host(*av, (struct in_addr *)&xent.k.addr6) != 0) + errx(EX_NOHOST, "hostname ``%s'' unknown", *av); + xent.masklen = 32; + type = IPFW_TABLE_CIDR; + addrlen = sizeof(struct in_addr); + } + + xent.type = type; + xent.len = offsetof(ipfw_table_xentry, k) + addrlen; + ac--; av++; if (do_add && ac) { unsigned int tval; /* isdigit is a bit of a hack here.. */ if (strchr(*av, (int)'.') == NULL && isdigit(**av)) { - ent.value = strtoul(*av, NULL, 0); + xent.value = strtoul(*av, NULL, 0); } else { if (lookup_host(*av, (struct in_addr *)&tval) == 0) { /* The value must be stored in host order * * so that the values < 65k can be distinguished */ - ent.value = ntohl(tval); + xent.value = ntohl(tval); } else { errx(EX_NOHOST, "hostname ``%s'' unknown", *av); } } } else - ent.value = 0; - if (do_cmd(do_add ? IP_FW_TABLE_ADD : IP_FW_TABLE_DEL, - &ent, sizeof(ent)) < 0) { + xent.value = 0; + if (do_setcmd3(do_add ? IP_FW_TABLE_XADD : IP_FW_TABLE_XDEL, + &xent, xent.len) < 0) { /* If running silent, don't bomb out on these errors. */ if (!(co.do_quiet && (errno == (do_add ? EEXIST : ESRCH)))) err(EX_OSERR, "setsockopt(IP_FW_TABLE_%s)", - do_add ? "ADD" : "DEL"); + do_add ? "XADD" : "XDEL"); /* In silent mode, react to a failed add by deleting */ if (do_add) { - do_cmd(IP_FW_TABLE_DEL, &ent, sizeof(ent)); - if (do_cmd(IP_FW_TABLE_ADD, - &ent, sizeof(ent)) < 0) + do_setcmd3(IP_FW_TABLE_XDEL, &xent, xent.len); + if (do_setcmd3(IP_FW_TABLE_XADD, &xent, xent.len) < 0) err(EX_OSERR, - "setsockopt(IP_FW_TABLE_ADD)"); + "setsockopt(IP_FW_TABLE_XADD)"); } } } else if (_substrcmp(*av, "flush") == 0) { - a = is_all ? tables_max : (uint32_t)(ent.tbl + 1); + a = is_all ? tables_max : (uint32_t)(xent.tbl + 1); do { - if (do_cmd(IP_FW_TABLE_FLUSH, &ent.tbl, - sizeof(ent.tbl)) < 0) + if (do_cmd(IP_FW_TABLE_FLUSH, &xent.tbl, + sizeof(xent.tbl)) < 0) err(EX_OSERR, "setsockopt(IP_FW_TABLE_FLUSH)"); - } while (++ent.tbl < a); + } while (++xent.tbl < a); } else if (_substrcmp(*av, "list") == 0) { - a = is_all ? tables_max : (uint32_t)(ent.tbl + 1); + a = is_all ? tables_max : (uint32_t)(xent.tbl + 1); do { - table_list(ent, is_all); - } while (++ent.tbl < a); + table_list(xent.tbl, is_all); + } while (++xent.tbl < a); } else errx(EX_USAGE, "invalid table command %s", *av); } static void -table_list(ipfw_table_entry ent, int need_header) +table_list(uint16_t num, int need_header) { - ipfw_table *tbl; + ipfw_xtable *tbl; + ipfw_table_xentry *xent; socklen_t l; - uint32_t a; - - a = ent.tbl; - l = sizeof(a); - if (do_cmd(IP_FW_TABLE_GETSIZE, &a, (uintptr_t)&l) < 0) - err(EX_OSERR, "getsockopt(IP_FW_TABLE_GETSIZE)"); + uint32_t *a, sz, tval; + char tbuf[128]; + struct in6_addr *addr6; + ip_fw3_opheader *op3; + + /* Prepend value with IP_FW3 header */ + l = sizeof(ip_fw3_opheader) + sizeof(uint32_t); + op3 = alloca(l); + /* Zero reserved fields */ + memset(op3, 0, sizeof(ip_fw3_opheader)); + a = (uint32_t *)(op3 + 1); + *a = num; + op3->opcode = IP_FW_TABLE_XGETSIZE; + if (do_cmd(IP_FW3, op3, (uintptr_t)&l) < 0) + err(EX_OSERR, "getsockopt(IP_FW_TABLE_XGETSIZE)"); /* If a is zero we have nothing to do, the table is empty. */ - if (a == 0) + if (*a == 0) return; - l = sizeof(*tbl) + a * sizeof(ipfw_table_entry); + l = *a; tbl = safe_calloc(1, l); - tbl->tbl = ent.tbl; - if (do_cmd(IP_FW_TABLE_LIST, tbl, (uintptr_t)&l) < 0) - err(EX_OSERR, "getsockopt(IP_FW_TABLE_LIST)"); + tbl->opheader.opcode = IP_FW_TABLE_XLIST; + tbl->tbl = num; + if (do_cmd(IP_FW3, tbl, (uintptr_t)&l) < 0) + err(EX_OSERR, "getsockopt(IP_FW_TABLE_XLIST)"); if (tbl->cnt && need_header) printf("---table(%d)---\n", tbl->tbl); - for (a = 0; a < tbl->cnt; a++) { - unsigned int tval; - tval = tbl->ent[a].value; - if (co.do_value_as_ip) { - char tbuf[128]; - strncpy(tbuf, inet_ntoa(*(struct in_addr *) - &tbl->ent[a].addr), 127); - /* inet_ntoa expects network order */ - tval = htonl(tval); - printf("%s/%u %s\n", tbuf, tbl->ent[a].masklen, - inet_ntoa(*(struct in_addr *)&tval)); - } else { - printf("%s/%u %u\n", - inet_ntoa(*(struct in_addr *)&tbl->ent[a].addr), - tbl->ent[a].masklen, tval); + sz = tbl->size - sizeof(ipfw_xtable); + xent = &tbl->xent[0]; + while (sz > 0) { + switch (tbl->type) { + case IPFW_TABLE_CIDR: + /* IPv4 or IPv6 prefixes */ + tval = xent->value; + addr6 = &xent->k.addr6; + + if ((addr6->s6_addr32[0] == 0) && (addr6->s6_addr32[1] == 0) && + (addr6->s6_addr32[2] == 0)) { + /* IPv4 address */ + inet_ntop(AF_INET, &addr6->s6_addr32[3], tbuf, sizeof(tbuf)); + } else { + /* IPv6 address */ + inet_ntop(AF_INET6, addr6, tbuf, sizeof(tbuf)); + } + + if (co.do_value_as_ip) { + tval = htonl(tval); + printf("%s/%u %s\n", tbuf, xent->masklen, + inet_ntoa(*(struct in_addr *)&tval)); + } else + printf("%s/%u %u\n", tbuf, xent->masklen, tval); + break; + case IPFW_TABLE_INTERFACE: + /* Interface names */ + tval = xent->value; + if (co.do_value_as_ip) { + tval = htonl(tval); + printf("%s %s\n", xent->k.iface, + inet_ntoa(*(struct in_addr *)&tval)); + } else + printf("%s %u\n", xent->k.iface, tval); } + + if (sz < xent->len) + break; + sz -= xent->len; + xent = (void *)xent + xent->len; } + free(tbl); } Modified: stable/8/sys/netinet/ip_fw.h ============================================================================== --- stable/8/sys/netinet/ip_fw.h Tue Apr 24 06:26:14 2012 (r234636) +++ stable/8/sys/netinet/ip_fw.h Tue Apr 24 07:01:34 2012 (r234637) @@ -37,10 +37,10 @@ #define IPFW_DEFAULT_RULE 65535 /* - * The number of ipfw tables. The maximum allowed table number is the - * (IPFW_TABLES_MAX - 1). + * Default number of ipfw tables. */ -#define IPFW_TABLES_MAX 128 +#define IPFW_TABLES_MAX 65535 +#define IPFW_TABLES_DEFAULT 128 /* * Most commands (queue, pipe, tag, untag, limit...) can have a 16-bit @@ -62,6 +62,19 @@ */ #define IPFW_CALLSTACK_SIZE 16 +/* IP_FW3 header/opcodes */ +typedef struct _ip_fw3_opheader { + uint16_t opcode; /* Operation opcode */ + uint16_t reserved[3]; /* Align to 64-bit boundary */ +} ip_fw3_opheader; + + +/* IPFW extented tables support */ +#define IP_FW_TABLE_XADD 86 /* add entry */ +#define IP_FW_TABLE_XDEL 87 /* delete entry */ +#define IP_FW_TABLE_XGETSIZE 88 /* get table size */ +#define IP_FW_TABLE_XLIST 89 /* list table contents */ + /* * The kernel representation of ipfw rules is made of a list of * 'instructions' (for all practical purposes equivalent to BPF @@ -568,6 +581,11 @@ struct _ipfw_dyn_rule { /* * These are used for lookup tables. */ + +#define IPFW_TABLE_CIDR 1 /* Table for holding IPv4/IPv6 prefixes */ +#define IPFW_TABLE_INTERFACE 2 /* Table for holding interface names */ +#define IPFW_TABLE_MAXTYPE 2 /* Maximum valid number */ + typedef struct _ipfw_table_entry { in_addr_t addr; /* network address */ u_int32_t value; /* value */ @@ -575,6 +593,19 @@ typedef struct _ipfw_table_entry { u_int8_t masklen; /* mask length */ } ipfw_table_entry; +typedef struct _ipfw_table_xentry { + uint16_t len; /* Total entry length */ + uint8_t type; /* entry type */ + uint8_t masklen; /* mask length */ + uint16_t tbl; /* table number */ + uint32_t value; /* value */ + union { + /* Longest field needs to be aligned by 4-byte boundary */ + struct in6_addr addr6; /* IPv6 address */ + char iface[IF_NAMESIZE]; /* interface name */ + } k; +} ipfw_table_xentry; + typedef struct _ipfw_table { u_int32_t size; /* size of entries in bytes */ u_int32_t cnt; /* # of entries */ @@ -582,4 +613,13 @@ typedef struct _ipfw_table { ipfw_table_entry ent[0]; /* entries */ } ipfw_table; +typedef struct _ipfw_xtable { + ip_fw3_opheader opheader; /* eXtended tables are controlled via IP_FW3 */ + uint32_t size; /* size of entries in bytes */ + uint32_t cnt; /* # of entries */ + uint16_t tbl; /* table number */ + uint8_t type; /* table type */ + ipfw_table_xentry xent[0]; /* entries */ +} ipfw_xtable; + #endif /* _IPFW2_H */ Modified: stable/8/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_fw2.c Tue Apr 24 06:26:14 2012 (r234636) +++ stable/8/sys/netinet/ipfw/ip_fw2.c Tue Apr 24 07:01:34 2012 (r234637) @@ -114,6 +114,10 @@ static int default_to_accept; VNET_DEFINE(int, autoinc_step); +VNET_DEFINE(unsigned int, fw_tables_max); +/* Use 128 tables by default */ +static unsigned int default_fw_tables = IPFW_TABLES_DEFAULT; + /* * Each rule belongs to one of 32 different sets (0..31). * The variable set_disable contains one bit per set. @@ -143,7 +147,7 @@ ipfw_nat_cfg_t *ipfw_nat_get_log_ptr; #ifdef SYSCTL_NODE uint32_t dummy_def = IPFW_DEFAULT_RULE; -uint32_t dummy_tables_max = IPFW_TABLES_MAX; +static int sysctl_ipfw_table_num(SYSCTL_HANDLER_ARGS); SYSBEGIN(f3) @@ -163,13 +167,14 @@ SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUT SYSCTL_UINT(_net_inet_ip_fw, OID_AUTO, default_rule, CTLFLAG_RD, &dummy_def, 0, "The default/max possible rule number."); -SYSCTL_UINT(_net_inet_ip_fw, OID_AUTO, tables_max, CTLFLAG_RD, - &dummy_tables_max, 0, - "The maximum number of tables."); +SYSCTL_VNET_PROC(_net_inet_ip_fw, OID_AUTO, tables_max, + CTLTYPE_UINT|CTLFLAG_RW, 0, 0, sysctl_ipfw_table_num, "IU", + "Maximum number of tables"); SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, default_to_accept, CTLFLAG_RDTUN, &default_to_accept, 0, "Make the default rule accept all packets."); TUNABLE_INT("net.inet.ip.fw.default_to_accept", &default_to_accept); +TUNABLE_INT("net.inet.ip.fw.tables_max", &default_fw_tables); SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, static_count, CTLFLAG_RD, &VNET_NAME(layer3_chain.n_rules), 0, "Number of static rules"); @@ -339,12 +344,15 @@ tcpopts_match(struct tcphdr *tcp, ipfw_i } static int -iface_match(struct ifnet *ifp, ipfw_insn_if *cmd) +iface_match(struct ifnet *ifp, ipfw_insn_if *cmd, struct ip_fw_chain *chain, uint32_t *tablearg) { if (ifp == NULL) /* no iface with this packet, match fails */ return 0; /* Check by name or by IP address */ if (cmd->name[0] != '\0') { /* match by name */ + if (cmd->name[0] == '\1') /* use tablearg to match */ + return ipfw_lookup_table_extended(chain, cmd->p.glob, + ifp->if_xname, tablearg, IPFW_TABLE_INTERFACE); /* Check name */ if (cmd->p.glob) { if (fnmatch(cmd->name, ifp->if_xname, 0) == 0) @@ -1286,16 +1294,18 @@ do { \ case O_RECV: match = iface_match(m->m_pkthdr.rcvif, - (ipfw_insn_if *)cmd); + (ipfw_insn_if *)cmd, chain, &tablearg); break; case O_XMIT: - match = iface_match(oif, (ipfw_insn_if *)cmd); + match = iface_match(oif, (ipfw_insn_if *)cmd, + chain, &tablearg); break; case O_VIA: match = iface_match(oif ? oif : - m->m_pkthdr.rcvif, (ipfw_insn_if *)cmd); + m->m_pkthdr.rcvif, (ipfw_insn_if *)cmd, + chain, &tablearg); break; case O_MACADDR2: @@ -1425,6 +1435,17 @@ do { \ ((ipfw_insn_u32 *)cmd)->d[0] == v; else tablearg = v; + } else if (is_ipv6) { + uint32_t v = 0; + void *pkey = (cmd->opcode == O_IP_DST_LOOKUP) ? + &args->f_id.dst_ip6: &args->f_id.src_ip6; + match = ipfw_lookup_table_extended(chain, + cmd->arg1, pkey, &v, + IPFW_TABLE_CIDR); + if (cmdlen == F_INSN_SIZE(ipfw_insn_u32)) + match = ((ipfw_insn_u32 *)cmd)->d[0] == v; + if (match) + tablearg = v; } break; @@ -2375,6 +2396,26 @@ pullup_failed: } /* + * Set maximum number of tables that can be used in given VNET ipfw instance. + */ +#ifdef SYSCTL_NODE +static int +sysctl_ipfw_table_num(SYSCTL_HANDLER_ARGS) +{ + int error; + unsigned int ntables; + + ntables = V_fw_tables_max; + + error = sysctl_handle_int(oidp, &ntables, 0, req); + /* Read operation or some error */ + if ((error != 0) || (req->newptr == NULL)) + return (error); + + return (ipfw_resize_tables(&V_layer3_chain, ntables)); +} +#endif +/* * Module and VNET glue */ @@ -2430,6 +2471,10 @@ ipfw_init(void) printf("limited to %d packets/entry by default\n", V_verbose_limit); + /* Check user-supplied table count for validness */ + if (default_fw_tables > IPFW_TABLES_MAX) + default_fw_tables = IPFW_TABLES_MAX; + ipfw_log_bpf(1); /* init */ return (error); } @@ -2475,19 +2520,18 @@ vnet_ipfw_init(const void *unused) /* insert the default rule and create the initial map */ chain->n_rules = 1; chain->static_len = sizeof(struct ip_fw); - chain->map = malloc(sizeof(struct ip_fw *), M_IPFW, M_NOWAIT | M_ZERO); + chain->map = malloc(sizeof(struct ip_fw *), M_IPFW, M_WAITOK | M_ZERO); if (chain->map) - rule = malloc(chain->static_len, M_IPFW, M_NOWAIT | M_ZERO); - if (rule == NULL) { - if (chain->map) - free(chain->map, M_IPFW); - printf("ipfw2: ENOSPC initializing default rule " - "(support disabled)\n"); - return (ENOSPC); - } + rule = malloc(chain->static_len, M_IPFW, M_WAITOK | M_ZERO); + + /* Set initial number of tables */ + V_fw_tables_max = default_fw_tables; error = ipfw_init_tables(chain); if (error) { - panic("init_tables"); /* XXX Marko fix this ! */ + printf("ipfw2: setting up tables failed\n"); + free(chain->map, M_IPFW); + free(rule, M_IPFW); + return (ENOSPC); } /* fill and insert the default rule */ @@ -2550,12 +2594,12 @@ vnet_ipfw_uninit(const void *unused) IPFW_UH_WLOCK(chain); IPFW_WLOCK(chain); + ipfw_dyn_uninit(0); /* run the callout_drain */ IPFW_WUNLOCK(chain); - IPFW_WLOCK(chain); - ipfw_dyn_uninit(0); /* run the callout_drain */ ipfw_destroy_tables(chain); reap = NULL; + IPFW_WLOCK(chain); for (i = 0; i < chain->n_rules; i++) { rule = chain->map[i]; rule->x_next = reap; Modified: stable/8/sys/netinet/ipfw/ip_fw_private.h ============================================================================== --- stable/8/sys/netinet/ipfw/ip_fw_private.h Tue Apr 24 06:26:14 2012 (r234636) +++ stable/8/sys/netinet/ipfw/ip_fw_private.h Tue Apr 24 07:01:34 2012 (r234637) @@ -208,6 +208,9 @@ VNET_DECLARE(u_int32_t, set_disable); VNET_DECLARE(int, autoinc_step); #define V_autoinc_step VNET(autoinc_step) +VNET_DECLARE(unsigned int, fw_tables_max); +#define V_fw_tables_max VNET(fw_tables_max) + struct ip_fw_chain { struct ip_fw *rules; /* list of rules */ struct ip_fw *reap; /* list of rules to reap */ @@ -216,7 +219,9 @@ struct ip_fw_chain { int static_len; /* total len of static rules */ struct ip_fw **map; /* array of rule ptrs to ease lookup */ LIST_HEAD(nat_list, cfg_nat) nat; /* list of nat entries */ - struct radix_node_head *tables[IPFW_TABLES_MAX]; + struct radix_node_head **tables; /* IPv4 tables */ + struct radix_node_head **xtables; /* extended tables */ + uint8_t *tabletype; /* Array of table types */ #if defined( __linux__ ) || defined( _WIN32 ) spinlock_t rwmtx; spinlock_t uh_lock; @@ -272,16 +277,21 @@ int ipfw_check_hook(void *arg, struct mb struct radix_node; int ipfw_lookup_table(struct ip_fw_chain *ch, uint16_t tbl, in_addr_t addr, uint32_t *val); +int ipfw_lookup_table_extended(struct ip_fw_chain *ch, uint16_t tbl, void *paddr, + uint32_t *val, int type); int ipfw_init_tables(struct ip_fw_chain *ch); void ipfw_destroy_tables(struct ip_fw_chain *ch); int ipfw_flush_table(struct ip_fw_chain *ch, uint16_t tbl); -int ipfw_add_table_entry(struct ip_fw_chain *ch, uint16_t tbl, in_addr_t addr, - uint8_t mlen, uint32_t value); -int ipfw_dump_table_entry(struct radix_node *rn, void *arg); -int ipfw_del_table_entry(struct ip_fw_chain *ch, uint16_t tbl, in_addr_t addr, - uint8_t mlen); +int ipfw_add_table_entry(struct ip_fw_chain *ch, uint16_t tbl, void *paddr, + uint8_t plen, uint8_t mlen, uint8_t type, uint32_t value); +int ipfw_del_table_entry(struct ip_fw_chain *ch, uint16_t tbl, void *paddr, + uint8_t plen, uint8_t mlen, uint8_t type); int ipfw_count_table(struct ip_fw_chain *ch, uint32_t tbl, uint32_t *cnt); +int ipfw_dump_table_entry(struct radix_node *rn, void *arg); int ipfw_dump_table(struct ip_fw_chain *ch, ipfw_table *tbl); +int ipfw_count_xtable(struct ip_fw_chain *ch, uint32_t tbl, uint32_t *cnt); +int ipfw_dump_xtable(struct ip_fw_chain *ch, ipfw_xtable *tbl); +int ipfw_resize_tables(struct ip_fw_chain *ch, unsigned int ntables); /* In ip_fw_nat.c -- XXX to be moved to ip_var.h */ Modified: stable/8/sys/netinet/ipfw/ip_fw_sockopt.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_fw_sockopt.c Tue Apr 24 06:26:14 2012 (r234636) +++ stable/8/sys/netinet/ipfw/ip_fw_sockopt.c Tue Apr 24 07:01:34 2012 (r234637) @@ -667,7 +667,6 @@ check_ipfw_struct(struct ip_fw *rule, in cmdlen != F_INSN_SIZE(ipfw_insn_u32)) goto bad_size; break; - case O_MACADDR2: if (cmdlen != F_INSN_SIZE(ipfw_insn_mac)) goto bad_size; @@ -929,6 +928,7 @@ ipfw_getrules(struct ip_fw_chain *chain, } +#define IP_FW3_OPLENGTH(x) ((x)->sopt_valsize - sizeof(ip_fw3_opheader)) /** * {set|get}sockopt parser. */ @@ -937,10 +937,13 @@ ipfw_ctl(struct sockopt *sopt) { #define RULE_MAXSIZE (256*sizeof(u_int32_t)) int error; - size_t size; + size_t size, len, valsize; struct ip_fw *buf, *rule; struct ip_fw_chain *chain; u_int32_t rulenum[2]; + uint32_t opt; + char xbuf[128]; + ip_fw3_opheader *op3 = NULL; error = priv_check(sopt->sopt_td, PRIV_NETINET_IPFW); if (error) @@ -960,7 +963,21 @@ ipfw_ctl(struct sockopt *sopt) chain = &V_layer3_chain; error = 0; - switch (sopt->sopt_name) { + /* Save original valsize before it is altered via sooptcopyin() */ + valsize = sopt->sopt_valsize; + if ((opt = sopt->sopt_name) == IP_FW3) { + /* + * Copy not less than sizeof(ip_fw3_opheader). + * We hope any IP_FW3 command will fit into 128-byte buffer. + */ + if ((error = sooptcopyin(sopt, xbuf, sizeof(xbuf), + sizeof(ip_fw3_opheader))) != 0) + return (error); + op3 = (ip_fw3_opheader *)xbuf; + opt = op3->opcode; + } + + switch (opt) { case IP_FW_GET: /* * pass up a copy of the current rules. Static rules @@ -1099,7 +1116,8 @@ ipfw_ctl(struct sockopt *sopt) if (error) break; error = ipfw_add_table_entry(chain, ent.tbl, - ent.addr, ent.masklen, ent.value); + &ent.addr, sizeof(ent.addr), ent.masklen, + IPFW_TABLE_CIDR, ent.value); } break; @@ -1112,7 +1130,34 @@ ipfw_ctl(struct sockopt *sopt) if (error) break; error = ipfw_del_table_entry(chain, ent.tbl, - ent.addr, ent.masklen); + &ent.addr, sizeof(ent.addr), ent.masklen, IPFW_TABLE_CIDR); + } + break; + + case IP_FW_TABLE_XADD: /* IP_FW3 */ + case IP_FW_TABLE_XDEL: /* IP_FW3 */ + { + ipfw_table_xentry *xent = (ipfw_table_xentry *)(op3 + 1); + + /* Check minimum header size */ + if (IP_FW3_OPLENGTH(sopt) < offsetof(ipfw_table_xentry, k)) { + error = EINVAL; + break; + } + + /* Check if len field is valid */ + if (xent->len > sizeof(ipfw_table_xentry)) { + error = EINVAL; + break; + } + + len = xent->len - offsetof(ipfw_table_xentry, k); + + error = (opt == IP_FW_TABLE_XADD) ? + ipfw_add_table_entry(chain, xent->tbl, &xent->k, + len, xent->masklen, xent->type, xent->value) : + ipfw_del_table_entry(chain, xent->tbl, &xent->k, + len, xent->masklen, xent->type); } break; @@ -1124,9 +1169,7 @@ ipfw_ctl(struct sockopt *sopt) sizeof(tbl), sizeof(tbl)); if (error) break; - IPFW_WLOCK(chain); error = ipfw_flush_table(chain, tbl); - IPFW_WUNLOCK(chain); } break; @@ -1175,6 +1218,62 @@ ipfw_ctl(struct sockopt *sopt) } break; + case IP_FW_TABLE_XGETSIZE: /* IP_FW3 */ + { + uint32_t *tbl; + + if (IP_FW3_OPLENGTH(sopt) < sizeof(uint32_t)) { + error = EINVAL; + break; + } + + tbl = (uint32_t *)(op3 + 1); + + IPFW_RLOCK(chain); + error = ipfw_count_xtable(chain, *tbl, tbl); + IPFW_RUNLOCK(chain); + if (error) + break; + error = sooptcopyout(sopt, op3, sopt->sopt_valsize); + } + break; + + case IP_FW_TABLE_XLIST: /* IP_FW3 */ + { + ipfw_xtable *tbl; + + if ((size = valsize) < sizeof(ipfw_xtable)) { + error = EINVAL; + break; + } + + tbl = malloc(size, M_TEMP, M_ZERO | M_WAITOK); + memcpy(tbl, op3, sizeof(ipfw_xtable)); + + /* Get maximum number of entries we can store */ + tbl->size = (size - sizeof(ipfw_xtable)) / + sizeof(ipfw_table_xentry); + IPFW_RLOCK(chain); + error = ipfw_dump_xtable(chain, tbl); + IPFW_RUNLOCK(chain); + if (error) { + free(tbl, M_TEMP); + break; + } + + /* Revert size field back to bytes */ + tbl->size = tbl->size * sizeof(ipfw_table_xentry) + + sizeof(ipfw_table); + /* + * Since we call sooptcopyin() with small buffer, sopt_valsize is + * decreased to reflect supplied buffer size. Set it back to original value + */ + sopt->sopt_valsize = valsize; + error = sooptcopyout(sopt, tbl, size); + free(tbl, M_TEMP); + } + break; + /*--- NAT operations are protected by the IPFW_LOCK ---*/ case IP_FW_NAT_CFG: if (IPFW_NAT_LOADED) Modified: stable/8/sys/netinet/ipfw/ip_fw_table.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_fw_table.c Tue Apr 24 06:26:14 2012 (r234636) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 07:27:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 25C97106566B; Tue, 24 Apr 2012 07:27:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 106948FC14; Tue, 24 Apr 2012 07:27:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3O7RulT035908; Tue, 24 Apr 2012 07:27:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3O7RugO035906; Tue, 24 Apr 2012 07:27:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201204240727.q3O7RugO035906@svn.freebsd.org> From: Alexander Motin Date: Tue, 24 Apr 2012 07:27:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234638 - stable/9/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 07:27:57 -0000 Author: mav Date: Tue Apr 24 07:27:56 2012 New Revision: 234638 URL: http://svn.freebsd.org/changeset/base/234638 Log: MFC r234376: Add some more SCSI mode pages from SPC-4 spec. Modified: stable/9/share/misc/scsi_modes Directory Properties: stable/9/share/misc/ (props changed) Modified: stable/9/share/misc/scsi_modes ============================================================================== --- stable/9/share/misc/scsi_modes Tue Apr 24 07:01:34 2012 (r234637) +++ stable/9/share/misc/scsi_modes Tue Apr 24 07:27:56 2012 (r234638) @@ -92,6 +92,25 @@ {Reserved} *i1 } +0x15 "Extended Page"; + +0x16 "Extended Device-Type Specific Page"; + +0x1c "Informational Exceptions Control Page" { + {PERF} t1 + {Reserved} *t1 + {EBF} t1 + {EWasc} t1 + {DExcpt} t1 + {TEST} t1 + {EBACKERR} t1 + {LogErr} t1 + {Reserved} *t4 + {MRIE} b4 + {Interval Timer} i4 + {Report Count} i4 +} + 0x09 "Peripheral Device Page" { {Interface Identifier} i2 {Reserved} *i1 @@ -100,7 +119,7 @@ {Reserved} *i1 } -0x1a "Power Control" { +0x1a "Power Condition Page" { {Reserved} *i1 {Reserved} *t6 {Idle} t1 @@ -109,6 +128,10 @@ {Standby Condition Timer} i4 } +0x18 "Protocol-Specific LUN Page"; + +0x19 "Protocol-Specific Port Page"; + # DIRECT ACCESS DEVICES 0x08 "Caching Page" { {IC} t1 From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 07:28:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2610A1065678; Tue, 24 Apr 2012 07:28:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 112698FC1C; Tue, 24 Apr 2012 07:28:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3O7SrIe035990; Tue, 24 Apr 2012 07:28:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3O7SrD0035988; Tue, 24 Apr 2012 07:28:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201204240728.q3O7SrD0035988@svn.freebsd.org> From: Alexander Motin Date: Tue, 24 Apr 2012 07:28:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234639 - stable/8/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 07:28:54 -0000 Author: mav Date: Tue Apr 24 07:28:53 2012 New Revision: 234639 URL: http://svn.freebsd.org/changeset/base/234639 Log: MFC r234376: Add some more SCSI mode pages from SPC-4 spec. Modified: stable/8/share/misc/scsi_modes Directory Properties: stable/8/share/misc/ (props changed) Modified: stable/8/share/misc/scsi_modes ============================================================================== --- stable/8/share/misc/scsi_modes Tue Apr 24 07:27:56 2012 (r234638) +++ stable/8/share/misc/scsi_modes Tue Apr 24 07:28:53 2012 (r234639) @@ -79,6 +79,25 @@ {Reserved} *i1 } +0x15 "Extended Page"; + +0x16 "Extended Device-Type Specific Page"; + +0x1c "Informational Exceptions Control Page" { + {PERF} t1 + {Reserved} *t1 + {EBF} t1 + {EWasc} t1 + {DExcpt} t1 + {TEST} t1 + {EBACKERR} t1 + {LogErr} t1 + {Reserved} *t4 + {MRIE} b4 + {Interval Timer} i4 + {Report Count} i4 +} + 0x09 "Peripheral Device Page" { {Interface Identifier} i2 {Reserved} *i1 @@ -87,7 +106,7 @@ {Reserved} *i1 } -0x1a "Power Control" { +0x1a "Power Condition Page" { {Reserved} *i1 {Reserved} *t6 {Idle} t1 @@ -96,6 +115,10 @@ {Standby Condition Timer} i4 } +0x18 "Protocol-Specific LUN Page"; + +0x19 "Protocol-Specific Port Page"; + # DIRECT ACCESS DEVICES 0x08 "Caching Page" { {IC} t1 From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 08:30:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B329106566C; Tue, 24 Apr 2012 08:30:56 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 467C08FC0A; Tue, 24 Apr 2012 08:30:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3O8UuML038041; Tue, 24 Apr 2012 08:30:56 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3O8Uugp038039; Tue, 24 Apr 2012 08:30:56 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201204240830.q3O8Uugp038039@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 24 Apr 2012 08:30:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234643 - head/sys/dev/re X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 08:30:56 -0000 Author: bz Date: Tue Apr 24 08:30:55 2012 New Revision: 234643 URL: http://svn.freebsd.org/changeset/base/234643 Log: Do not toggle IFCAP_TSO4 if we would also do TSO6. Given the driver does not currently announce/support TSO6 that cannot happen. Clean it up anyway for consistency. Reviewed by: yongari MFC after: 1 week Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Tue Apr 24 08:30:36 2012 (r234642) +++ head/sys/dev/re/if_re.c Tue Apr 24 08:30:55 2012 (r234643) @@ -3432,7 +3432,7 @@ re_ioctl(struct ifnet *ifp, u_long comma reinit = 1; } if ((mask & IFCAP_TSO4) != 0 && - (ifp->if_capabilities & IFCAP_TSO) != 0) { + (ifp->if_capabilities & IFCAP_TSO4) != 0) { ifp->if_capenable ^= IFCAP_TSO4; if ((IFCAP_TSO4 & ifp->if_capenable) != 0) ifp->if_hwassist |= CSUM_TSO; From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 10:20:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C014106566C; Tue, 24 Apr 2012 10:20:25 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 05BDB8FC0C; Tue, 24 Apr 2012 10:20:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3OAKO59041485; Tue, 24 Apr 2012 10:20:24 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3OAKOco041483; Tue, 24 Apr 2012 10:20:24 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201204241020.q3OAKOco041483@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Tue, 24 Apr 2012 10:20:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234645 - stable/8/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 10:20:25 -0000 Author: melifaro Date: Tue Apr 24 10:20:24 2012 New Revision: 234645 URL: http://svn.freebsd.org/changeset/base/234645 Log: MFC r226186 Free mbuf in case when protocol in unknown in ng_ipfw_rcvdata(). This change fixes (theoretically) possible mbuf leak introduced in r225586. Reorder code a bit and change return codes to be more specific Approved by: ae(mentor) Modified: stable/8/sys/netgraph/ng_ipfw.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/netgraph/ng_ipfw.c ============================================================================== --- stable/8/sys/netgraph/ng_ipfw.c Tue Apr 24 09:07:30 2012 (r234644) +++ stable/8/sys/netgraph/ng_ipfw.c Tue Apr 24 10:20:24 2012 (r234645) @@ -242,7 +242,7 @@ ng_ipfw_rcvdata(hook_p hook, item_p item if (m->m_len < sizeof(struct ip) && (m = m_pullup(m, sizeof(struct ip))) == NULL) - return (EINVAL); + return (ENOBUFS); ip = mtod(m, struct ip *); @@ -252,18 +252,14 @@ ng_ipfw_rcvdata(hook_p hook, item_p item #ifdef INET case IPVERSION: ip_input(m); - break; + return (0); #endif #ifdef INET6 case IPV6_VERSION >> 4: ip6_input(m); - break; + return (0); #endif - default: - NG_FREE_M(m); - return (EINVAL); } - return (0); } else { switch (ip->ip_v) { #ifdef INET @@ -277,10 +273,12 @@ ng_ipfw_rcvdata(hook_p hook, item_p item return (ip6_output(m, NULL, NULL, 0, NULL, NULL, NULL)); #endif - default: - return (EINVAL); } } + + /* unknown IP protocol version */ + NG_FREE_M(m); + return (EPROTONOSUPPORT); } static int From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 11:42:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3D9231065672; Tue, 24 Apr 2012 11:42:49 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 286B08FC08; Tue, 24 Apr 2012 11:42:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3OBgnd0046971; Tue, 24 Apr 2012 11:42:49 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3OBgmck046969; Tue, 24 Apr 2012 11:42:48 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201204241142.q3OBgmck046969@svn.freebsd.org> From: "Jayachandran C." Date: Tue, 24 Apr 2012 11:42:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234646 - head/contrib/jemalloc/include/jemalloc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 11:42:49 -0000 Author: jchandra Date: Tue Apr 24 11:42:48 2012 New Revision: 234646 URL: http://svn.freebsd.org/changeset/base/234646 Log: jemalloc: pointer size definition for 64-bit mips platforms LG_SIZEOF_PTR has to be defined as 3 when jemalloc is compiled for 64 bit platforms. Reviewed by: juli Approved by: jasone Modified: head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Modified: head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Tue Apr 24 10:20:24 2012 (r234645) +++ head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Tue Apr 24 11:42:48 2012 (r234646) @@ -41,8 +41,12 @@ # define LG_SIZEOF_PTR 2 #endif #ifdef __mips__ +#ifdef __mips_n64 +# define LG_SIZEOF_PTR 3 +#else # define LG_SIZEOF_PTR 2 #endif +#endif #ifdef __powerpc64__ # define LG_SIZEOF_PTR 3 #elif defined(__powerpc__) From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 13:36:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5075E1065676; Tue, 24 Apr 2012 13:36:42 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C0A08FC0A; Tue, 24 Apr 2012 13:36:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3ODagcZ050708; Tue, 24 Apr 2012 13:36:42 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3ODagrq050706; Tue, 24 Apr 2012 13:36:42 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204241336.q3ODagrq050706@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 24 Apr 2012 13:36:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234652 - head/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 13:36:42 -0000 Author: nwhitehorn Date: Tue Apr 24 13:36:41 2012 New Revision: 234652 URL: http://svn.freebsd.org/changeset/base/234652 Log: Revert r234581 for this file. The lockless SLB tree code does in fact need a heavyweight sync instead of a lightweight sync to function properly. Thanks to mdf for the clarification. Modified: head/sys/powerpc/aim/slb.c Modified: head/sys/powerpc/aim/slb.c ============================================================================== --- head/sys/powerpc/aim/slb.c Tue Apr 24 13:13:42 2012 (r234651) +++ head/sys/powerpc/aim/slb.c Tue Apr 24 13:36:41 2012 (r234652) @@ -139,7 +139,7 @@ make_new_leaf(uint64_t esid, uint64_t sl * that a lockless searcher always sees a valid path through * the tree. */ - mb(); + powerpc_sync(); idx = esid2idx(esid, parent->ua_level); parent->u.ua_child[idx] = child; @@ -187,7 +187,7 @@ make_intermediate(uint64_t esid, struct idx = esid2idx(child->ua_base, inter->ua_level); inter->u.ua_child[idx] = child; setbit(&inter->ua_alloc, idx); - mb(); + powerpc_sync(); /* Set up parent to point to intermediate node ... */ idx = esid2idx(inter->ua_base, parent->ua_level); From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 13:37:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88EC4106564A; Tue, 24 Apr 2012 13:37:44 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73DF28FC19; Tue, 24 Apr 2012 13:37:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3ODbijm050780; Tue, 24 Apr 2012 13:37:44 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3ODbiFi050778; Tue, 24 Apr 2012 13:37:44 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204241337.q3ODbiFi050778@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 24 Apr 2012 13:37:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234653 - head/sys/powerpc/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 13:37:44 -0000 Author: nwhitehorn Date: Tue Apr 24 13:37:43 2012 New Revision: 234653 URL: http://svn.freebsd.org/changeset/base/234653 Log: Switch the default I/O memory barrier to eieio, as it should be. This does not appear to cause any problems due to fixes elsewhere. MFC after: 2 months Modified: head/sys/powerpc/include/pio.h Modified: head/sys/powerpc/include/pio.h ============================================================================== --- head/sys/powerpc/include/pio.h Tue Apr 24 13:36:41 2012 (r234652) +++ head/sys/powerpc/include/pio.h Tue Apr 24 13:37:43 2012 (r234653) @@ -39,11 +39,7 @@ * I/O macros. */ -/* - * Note: this should be eieio, but many drivers expect ordering with - * main storage too. - */ -#define powerpc_iomb() __asm __volatile("sync" : : : "memory") +#define powerpc_iomb() __asm __volatile("eieio" : : : "memory") static __inline void __outb(volatile u_int8_t *a, u_int8_t v) From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 13:44:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B1D51065677; Tue, 24 Apr 2012 13:44:47 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 459AD8FC1D; Tue, 24 Apr 2012 13:44:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3ODilSk051051; Tue, 24 Apr 2012 13:44:47 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3ODilS8051048; Tue, 24 Apr 2012 13:44:47 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201204241344.q3ODilS8051048@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 24 Apr 2012 13:44:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234654 - head/cddl/contrib/opensolaris/cmd/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 13:44:47 -0000 Author: pjd Date: Tue Apr 24 13:44:46 2012 New Revision: 234654 URL: http://svn.freebsd.org/changeset/base/234654 Log: Add -u option to 'zfs create' that prevents file system from being automatically mounted. This is similar to the 'zfs receive -u'. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Apr 24 13:37:43 2012 (r234653) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Apr 24 13:44:46 2012 (r234654) @@ -35,7 +35,7 @@ .Op Fl \&? .Nm .Cm create -.Op Fl p +.Op Fl pu .Op Fl o Ar property Ns = Ns Ar value .Ar ... filesystem .Nm @@ -1354,7 +1354,7 @@ Displays a help message. .It Xo .Nm .Cm create -.Op Fl p +.Op Fl pu .Op Fl o Ar property Ns = Ns Ar value .Ar ... filesystem .Xc @@ -1374,6 +1374,8 @@ line using the .Fl o option is ignored. If the target filesystem already exists, the operation completes successfully. +.It Fl u +Newly created file system is not mounted. .It Fl o Ar property Ns = Ns Ar value Sets the specified property as if the command .Qq Nm Cm set Ar property Ns = Ns Ar value Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue Apr 24 13:37:43 2012 (r234653) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue Apr 24 13:44:46 2012 (r234654) @@ -217,7 +217,7 @@ get_usage(zfs_help_t idx) return (gettext("\tclone [-p] [-o property=value] ... " " \n")); case HELP_CREATE: - return (gettext("\tcreate [-p] [-o property=value] ... " + return (gettext("\tcreate [-pu] [-o property=value] ... " "\n" "\tcreate [-ps] [-b blocksize] [-o property=value] ... " "-V \n")); @@ -681,7 +681,7 @@ usage: } /* - * zfs create [-p] [-o prop=value] ... fs + * zfs create [-pu] [-o prop=value] ... fs * zfs create [-ps] [-b blocksize] [-o prop=value] ... -V vol size * * Create a new dataset. This command can be used to create filesystems @@ -694,6 +694,8 @@ usage: * SPA_VERSION_REFRESERVATION, we set a refreservation instead. * * The '-p' flag creates all the non-existing ancestors of the target first. + * + * The '-u' flag prevents mounting of newly created file system. */ static int zfs_do_create(int argc, char **argv) @@ -705,6 +707,7 @@ zfs_do_create(int argc, char **argv) boolean_t noreserve = B_FALSE; boolean_t bflag = B_FALSE; boolean_t parents = B_FALSE; + boolean_t nomount = B_FALSE; int ret = 1; nvlist_t *props; uint64_t intval; @@ -714,7 +717,7 @@ zfs_do_create(int argc, char **argv) nomem(); /* check options */ - while ((c = getopt(argc, argv, ":V:b:so:p")) != -1) { + while ((c = getopt(argc, argv, ":V:b:so:pu")) != -1) { switch (c) { case 'V': type = ZFS_TYPE_VOLUME; @@ -754,6 +757,9 @@ zfs_do_create(int argc, char **argv) case 's': noreserve = B_TRUE; break; + case 'u': + nomount = B_TRUE; + break; case ':': (void) fprintf(stderr, gettext("missing size " "argument\n")); @@ -771,6 +777,11 @@ zfs_do_create(int argc, char **argv) "used when creating a volume\n")); goto badusage; } + if (nomount && type != ZFS_TYPE_FILESYSTEM) { + (void) fprintf(stderr, gettext("'-u' can only be " + "used when creating a file system\n")); + goto badusage; + } argc -= optind; argv += optind; @@ -853,7 +864,7 @@ zfs_do_create(int argc, char **argv) * 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 (canmount == ZFS_CANMOUNT_ON) { + if (!nomount && canmount == ZFS_CANMOUNT_ON) { 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 Tue Apr 24 14:06:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D16061065674; Tue, 24 Apr 2012 14:06:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC82C8FC14; Tue, 24 Apr 2012 14:06:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3OE672w051753; Tue, 24 Apr 2012 14:06:07 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3OE67ZX051750; Tue, 24 Apr 2012 14:06:07 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201204241406.q3OE67ZX051750@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 24 Apr 2012 14:06:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234655 - head/usr.sbin/usbdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 14:06:07 -0000 Author: hselasky Date: Tue Apr 24 14:06:07 2012 New Revision: 234655 URL: http://svn.freebsd.org/changeset/base/234655 Log: Add missing and probably also mandatory -h option. MFC after: 1 week Modified: head/usr.sbin/usbdump/usbdump.8 head/usr.sbin/usbdump/usbdump.c Modified: head/usr.sbin/usbdump/usbdump.8 ============================================================================== --- head/usr.sbin/usbdump/usbdump.8 Tue Apr 24 13:44:46 2012 (r234654) +++ head/usr.sbin/usbdump/usbdump.8 Tue Apr 24 14:06:07 2012 (r234655) @@ -40,6 +40,7 @@ .Op Fl w Ar file .Op Fl f Ar filter .Op Fl b Ar file +.Op Fl h .Sh DESCRIPTION The .Nm @@ -79,6 +80,8 @@ If 128 is added to the endpoint number t A device unit or endpoint value of -1 means ignore this field. If no filters are specified, all packets are passed through using the default -1,-1 filter. This option can be specified multiple times. +.It Fl h +This option displays a summary of the command line options. .El .Sh EXAMPLES Capture the USB raw packets on usbus2: Modified: head/usr.sbin/usbdump/usbdump.c ============================================================================== --- head/usr.sbin/usbdump/usbdump.c Tue Apr 24 13:44:46 2012 (r234654) +++ head/usr.sbin/usbdump/usbdump.c Tue Apr 24 14:06:07 2012 (r234655) @@ -775,6 +775,7 @@ usage(void) fprintf(stderr, FMT, "-v", "Increase the verbose level"); fprintf(stderr, FMT, "-b ", "Save raw version of all recorded data to file"); fprintf(stderr, FMT, "-w ", "Write the raw packets to file"); + fprintf(stderr, FMT, "-h", "Display summary of command line options"); #undef FMT exit(EX_USAGE); } @@ -797,7 +798,7 @@ main(int argc, char *argv[]) const char *optstring; char *pp; - optstring = "b:i:r:s:vw:f:"; + optstring = "b:hi:r:s:vw:f:"; while ((o = getopt(argc, argv, optstring)) != -1) { switch (o) { case 'i': From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 15:50:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 82F9A1065670; Tue, 24 Apr 2012 15:50:20 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id 046818FC0C; Tue, 24 Apr 2012 15:50:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id q3OFoCBK040855; Tue, 24 Apr 2012 19:50:12 +0400 (MSK) (envelope-from marck@rinet.ru) Date: Tue, 24 Apr 2012 19:50:12 +0400 (MSK) From: Dmitry Morozovsky To: Peter Holm In-Reply-To: <201203082034.q28KYDwq063702@svn.freebsd.org> Message-ID: References: <201203082034.q28KYDwq063702@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (woozle.rinet.ru [0.0.0.0]); Tue, 24 Apr 2012 19:50:12 +0400 (MSK) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232702 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 15:50:20 -0000 Dear Peter, On Thu, 8 Mar 2012, Peter Holm wrote: > Author: pho > Date: Thu Mar 8 20:34:13 2012 > New Revision: 232702 > URL: http://svn.freebsd.org/changeset/base/232702 > > Log: > Free up allocated memory used by posix_fadvise(2). Time to MFC this? We've found huge kernel memory leaks in massive rrdtool usage without this change. Thanks! -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 17:00:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 566931065676; Tue, 24 Apr 2012 17:00:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 432E98FC0C; Tue, 24 Apr 2012 17:00:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3OH0ViV057139; Tue, 24 Apr 2012 17:00:31 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3OH0Vdg057137; Tue, 24 Apr 2012 17:00:31 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201204241700.q3OH0Vdg057137@svn.freebsd.org> From: Dimitry Andric Date: Tue, 24 Apr 2012 17:00:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234656 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 17:00:31 -0000 Author: dim Date: Tue Apr 24 17:00:30 2012 New Revision: 234656 URL: http://svn.freebsd.org/changeset/base/234656 Log: After r234596, temporarily disable building clang on 32-bit PowerPC, until we are able to fix the binutils bug that makes linking clang fail with "relocation truncated to fit: R_PPC_REL24" errors. This should fix the tinderboxes for now. Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Tue Apr 24 14:06:07 2012 (r234655) +++ head/share/mk/bsd.own.mk Tue Apr 24 17:00:30 2012 (r234656) @@ -441,7 +441,8 @@ __T=${TARGET_ARCH} __T=${MACHINE_ARCH} .endif # Clang is only for x86 and powerpc right now, by default. -.if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*} +# XXX: Temporarily disabled for 32-bit powerpc, due to a binutils bug. +.if ${__T} == "amd64" || ${__T} == "i386" || ${__T} == "powerpc64" __DEFAULT_YES_OPTIONS+=CLANG .else __DEFAULT_NO_OPTIONS+=CLANG From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 17:25:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BAC71065680 for ; Tue, 24 Apr 2012 17:25:54 +0000 (UTC) (envelope-from pho@holm.cc) Received: from relay03.pair.com (relay03.pair.com [209.68.5.17]) by mx1.freebsd.org (Postfix) with SMTP id 04F3C8FC15 for ; Tue, 24 Apr 2012 17:25:53 +0000 (UTC) Received: (qmail 86877 invoked from network); 24 Apr 2012 17:24:46 -0000 Received: from 87.58.144.241 (HELO x2.osted.lan) (87.58.144.241) by relay03.pair.com with SMTP; 24 Apr 2012 17:24:46 -0000 X-pair-Authenticated: 87.58.144.241 Received: from x2.osted.lan (localhost [127.0.0.1]) by x2.osted.lan (8.14.4/8.14.4) with ESMTP id q3OHPj4w062368; Tue, 24 Apr 2012 19:25:45 +0200 (CEST) (envelope-from pho@x2.osted.lan) Received: (from pho@localhost) by x2.osted.lan (8.14.4/8.14.4/Submit) id q3OHPjM2062367; Tue, 24 Apr 2012 19:25:45 +0200 (CEST) (envelope-from pho) Date: Tue, 24 Apr 2012 19:25:45 +0200 From: Peter Holm To: Dmitry Morozovsky Message-ID: <20120424172545.GA60959@x2.osted.lan> References: <201203082034.q28KYDwq063702@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232702 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 17:25:54 -0000 On Tue, Apr 24, 2012 at 07:50:12PM +0400, Dmitry Morozovsky wrote: > Dear Peter, > > On Thu, 8 Mar 2012, Peter Holm wrote: > > > Author: pho > > Date: Thu Mar 8 20:34:13 2012 > > New Revision: 232702 > > URL: http://svn.freebsd.org/changeset/base/232702 > > > > Log: > > Free up allocated memory used by posix_fadvise(2). > > Time to MFC this? We've found huge kernel memory leaks in massive rrdtool > usage without this change. > Yes, you are right. Thank you for reminding me. - Peter > Thanks! > > > -- > Sincerely, > D.Marck [DM5020, MCK-RIPE, DM3-RIPN] > [ FreeBSD committer: marck@FreeBSD.org ] > ------------------------------------------------------------------------ > *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** > ------------------------------------------------------------------------ From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 17:51:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A4431065670; Tue, 24 Apr 2012 17:51:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E95318FC1C; Tue, 24 Apr 2012 17:51:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3OHpa2q058688; Tue, 24 Apr 2012 17:51:36 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3OHpaih058684; Tue, 24 Apr 2012 17:51:36 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204241751.q3OHpaih058684@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 24 Apr 2012 17:51:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234657 - in head/lib/libc: include stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 17:51:37 -0000 Author: kib Date: Tue Apr 24 17:51:36 2012 New Revision: 234657 URL: http://svn.freebsd.org/changeset/base/234657 Log: Take the spinlock around clearing of the fp->_flags in fclose(3), which indicates the avaliability of FILE, to prevent possible reordering of the writes as seen by other CPUs. Reported by: Fengwei yin Reviewed by: jhb MFC after: 1 week Modified: head/lib/libc/include/libc_private.h head/lib/libc/stdio/fclose.c head/lib/libc/stdio/findfp.c Modified: head/lib/libc/include/libc_private.h ============================================================================== --- head/lib/libc/include/libc_private.h Tue Apr 24 17:00:30 2012 (r234656) +++ head/lib/libc/include/libc_private.h Tue Apr 24 17:51:36 2012 (r234657) @@ -81,6 +81,19 @@ void _rtld_error(const char *fmt, ...); #define FLOCKFILE(fp) if (__isthreaded) _FLOCKFILE(fp) #define FUNLOCKFILE(fp) if (__isthreaded) _funlockfile(fp) +struct _spinlock; +extern struct _spinlock __stdio_thread_lock; +#define STDIO_THREAD_LOCK() \ +do { \ + if (__isthreaded) \ + _SPINLOCK(&__stdio_thread_lock); \ +} while (0) +#define STDIO_THREAD_UNLOCK() \ +do { \ + if (__isthreaded) \ + _SPINUNLOCK(&__stdio_thread_lock); \ +} while (0) + /* * Indexes into the pthread jump table. * Modified: head/lib/libc/stdio/fclose.c ============================================================================== --- head/lib/libc/stdio/fclose.c Tue Apr 24 17:00:30 2012 (r234656) +++ head/lib/libc/stdio/fclose.c Tue Apr 24 17:51:36 2012 (r234657) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include "un-namespace.h" +#include #include "libc_private.h" #include "local.h" @@ -65,7 +66,20 @@ fclose(FILE *fp) FREELB(fp); fp->_file = -1; fp->_r = fp->_w = 0; /* Mess up if reaccessed. */ + + /* + * Lock the spinlock used to protect __sglue list walk in + * __sfp(). The __sfp() uses fp->_flags == 0 test as an + * indication of the unused FILE. + * + * Taking the lock prevents possible compiler or processor + * reordering of the writes performed before the final _flags + * cleanup, making sure that we are done with the FILE before + * it is considered available. + */ + STDIO_THREAD_LOCK(); fp->_flags = 0; /* Release this FILE for reuse. */ + STDIO_THREAD_UNLOCK(); FUNLOCKFILE(fp); return (r); } Modified: head/lib/libc/stdio/findfp.c ============================================================================== --- head/lib/libc/stdio/findfp.c Tue Apr 24 17:00:30 2012 (r234656) +++ head/lib/libc/stdio/findfp.c Tue Apr 24 17:51:36 2012 (r234657) @@ -82,9 +82,7 @@ static struct glue *lastglue = &uglue; static struct glue * moreglue(int); -static spinlock_t thread_lock = _SPINLOCK_INITIALIZER; -#define THREAD_LOCK() if (__isthreaded) _SPINLOCK(&thread_lock) -#define THREAD_UNLOCK() if (__isthreaded) _SPINUNLOCK(&thread_lock) +spinlock_t __stdio_thread_lock = _SPINLOCK_INITIALIZER; #if NOT_YET #define SET_GLUE_PTR(ptr, val) atomic_set_rel_ptr(&(ptr), (uintptr_t)(val)) @@ -127,22 +125,22 @@ __sfp() /* * The list must be locked because a FILE may be updated. */ - THREAD_LOCK(); + STDIO_THREAD_LOCK(); for (g = &__sglue; g != NULL; g = g->next) { for (fp = g->iobs, n = g->niobs; --n >= 0; fp++) if (fp->_flags == 0) goto found; } - THREAD_UNLOCK(); /* don't hold lock while malloc()ing. */ + STDIO_THREAD_UNLOCK(); /* don't hold lock while malloc()ing. */ if ((g = moreglue(NDYNAMIC)) == NULL) return (NULL); - THREAD_LOCK(); /* reacquire the lock */ + STDIO_THREAD_LOCK(); /* reacquire the lock */ SET_GLUE_PTR(lastglue->next, g); /* atomically append glue to list */ lastglue = g; /* not atomic; only accessed when locked */ fp = g->iobs; found: fp->_flags = 1; /* reserve this slot; caller sets real flags */ - THREAD_UNLOCK(); + STDIO_THREAD_UNLOCK(); fp->_p = NULL; /* no current pointer */ fp->_w = 0; /* nothing to read or write */ fp->_r = 0; @@ -183,10 +181,10 @@ f_prealloc(void) for (g = &__sglue; (n -= g->niobs) > 0 && g->next; g = g->next) /* void */; if ((n > 0) && ((g = moreglue(n)) != NULL)) { - THREAD_LOCK(); + STDIO_THREAD_LOCK(); SET_GLUE_PTR(lastglue->next, g); lastglue = g; - THREAD_UNLOCK(); + STDIO_THREAD_UNLOCK(); } } From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 18:41:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BFF7C106566B; Tue, 24 Apr 2012 18:41:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AAEFA8FC08; Tue, 24 Apr 2012 18:41:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3OIfHdK060307; Tue, 24 Apr 2012 18:41:17 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3OIfHsV060305; Tue, 24 Apr 2012 18:41:17 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201204241841.q3OIfHsV060305@svn.freebsd.org> From: Dimitry Andric Date: Tue, 24 Apr 2012 18:41:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234658 - head/contrib/jemalloc/src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 18:41:17 -0000 Author: dim Date: Tue Apr 24 18:41:17 2012 New Revision: 234658 URL: http://svn.freebsd.org/changeset/base/234658 Log: Work around llvm PR 12623, which makes variables declared with .symver sometimes disappear from the resulting object file, if compiled with clang. In particular, this can lead to errors when building world with clang and -g, similar to: /usr/obj/usr/src/tmp/usr/lib/libc.so: undefined reference to `_malloc_options' Reported by: Conrad J. Sabatier Reviewed by: jasone Modified: head/contrib/jemalloc/src/jemalloc.c Modified: head/contrib/jemalloc/src/jemalloc.c ============================================================================== --- head/contrib/jemalloc/src/jemalloc.c Tue Apr 24 17:51:36 2012 (r234657) +++ head/contrib/jemalloc/src/jemalloc.c Tue Apr 24 18:41:17 2012 (r234658) @@ -8,7 +8,8 @@ malloc_tsd_data(, arenas, arena_t *, NUL malloc_tsd_data(, thread_allocated, thread_allocated_t, THREAD_ALLOCATED_INITIALIZER) -const char *__malloc_options_1_0; +/* Work around : */ +const char *__malloc_options_1_0 = NULL; __sym_compat(_malloc_options, __malloc_options_1_0, FBSD_1.0); /* Runtime configuration options. */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 19:00:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 95C891065673; Tue, 24 Apr 2012 19:00:43 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 810C58FC12; Tue, 24 Apr 2012 19:00:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3OJ0hsL061055; Tue, 24 Apr 2012 19:00:43 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3OJ0hNT061052; Tue, 24 Apr 2012 19:00:43 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201204241900.q3OJ0hNT061052@svn.freebsd.org> From: Peter Holm Date: Tue, 24 Apr 2012 19:00:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234659 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 19:00:43 -0000 Author: pho Date: Tue Apr 24 19:00:42 2012 New Revision: 234659 URL: http://svn.freebsd.org/changeset/base/234659 Log: MFC: r232702 Free up allocated memory used by posix_fadvise(2). Modified: stable/9/sys/kern/kern_descrip.c stable/9/sys/kern/vfs_syscalls.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_descrip.c ============================================================================== --- stable/9/sys/kern/kern_descrip.c Tue Apr 24 18:41:17 2012 (r234658) +++ stable/9/sys/kern/kern_descrip.c Tue Apr 24 19:00:42 2012 (r234659) @@ -104,6 +104,8 @@ static MALLOC_DEFINE(M_FILEDESC_TO_LEADE "file desc to leader structures"); static MALLOC_DEFINE(M_SIGIO, "sigio", "sigio structures"); +MALLOC_DECLARE(M_FADVISE); + static uma_zone_t file_zone; @@ -2577,6 +2579,7 @@ _fdrop(struct file *fp, struct thread *t error = fo_close(fp, td); atomic_subtract_int(&openfiles, 1); crfree(fp->f_cred); + free(fp->f_advice, M_FADVISE); uma_zfree(file_zone, fp); return (error); Modified: stable/9/sys/kern/vfs_syscalls.c ============================================================================== --- stable/9/sys/kern/vfs_syscalls.c Tue Apr 24 18:41:17 2012 (r234658) +++ stable/9/sys/kern/vfs_syscalls.c Tue Apr 24 19:00:42 2012 (r234659) @@ -88,7 +88,7 @@ __FBSDID("$FreeBSD$"); #include -static MALLOC_DEFINE(M_FADVISE, "fadvise", "posix_fadvise(2) information"); +MALLOC_DEFINE(M_FADVISE, "fadvise", "posix_fadvise(2) information"); SDT_PROVIDER_DEFINE(vfs); SDT_PROBE_DEFINE(vfs, , stat, mode, mode); From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 19:08:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B61A1065670; Tue, 24 Apr 2012 19:08:41 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E96358FC18; Tue, 24 Apr 2012 19:08:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3OJ8ern061346; Tue, 24 Apr 2012 19:08:40 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3OJ8eu3061340; Tue, 24 Apr 2012 19:08:40 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201204241908.q3OJ8eu3061340@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 24 Apr 2012 19:08:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234660 - in stable/9: . sys/kern sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 19:08:41 -0000 Author: trociny Date: Tue Apr 24 19:08:40 2012 New Revision: 234660 URL: http://svn.freebsd.org/changeset/base/234660 Log: MFC r232317: Introduce VOP_UNP_BIND(), VOP_UNP_CONNECT(), and VOP_UNP_DETACH() operations for setting and accessing vnode's v_socket field. The operations are necessary to implement proper unix socket handling on layered file systems like nullfs(5). This change fixes the long standing issue with nullfs(5) being in that unix sockets did not work between lower and upper layers: if we bound to a socket on the lower layer we could connect only to the lower path; if we bound to the upper layer we could connect only to the upper path. The new behavior is one can connect to both the lower and the upper paths regardless what layer path one binds to. PR: kern/51583, kern/159663 Suggested by: kib Reviewed by: arch Modified: stable/9/UPDATING (contents, props changed) stable/9/sys/kern/uipc_usrreq.c stable/9/sys/kern/vfs_default.c stable/9/sys/kern/vnode_if.src stable/9/sys/sys/vnode.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/UPDATING ============================================================================== --- stable/9/UPDATING Tue Apr 24 19:00:42 2012 (r234659) +++ stable/9/UPDATING Tue Apr 24 19:08:40 2012 (r234660) @@ -9,6 +9,14 @@ handbook. Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20120422: + Now unix domain sockets behave "as expected" on nullfs(5). Previously + nullfs(5) did not pass through all behaviours to the underlying layer, + as a result if we bound to a socket on the lower layer we could connect + only to the lower path; if we bound to the upper layer we could connect + only to the upper path. The new behavior is one can connect to both the + lower and the upper paths regardless what layer path one binds to. + 20120109: The acpi_wmi(4) status device /dev/wmistat has been renamed to /dev/wmistat0. Modified: stable/9/sys/kern/uipc_usrreq.c ============================================================================== --- stable/9/sys/kern/uipc_usrreq.c Tue Apr 24 19:00:42 2012 (r234659) +++ stable/9/sys/kern/uipc_usrreq.c Tue Apr 24 19:08:40 2012 (r234660) @@ -541,7 +541,7 @@ restart: UNP_LINK_WLOCK(); UNP_PCB_LOCK(unp); - vp->v_socket = unp->unp_socket; + VOP_UNP_BIND(vp, unp->unp_socket); unp->unp_vnode = vp; unp->unp_addr = soun; unp->unp_flags &= ~UNP_BINDING; @@ -637,7 +637,7 @@ uipc_detach(struct socket *so) * XXXRW: Should assert vp->v_socket == so. */ if ((vp = unp->unp_vnode) != NULL) { - unp->unp_vnode->v_socket = NULL; + VOP_UNP_DETACH(vp); unp->unp_vnode = NULL; } unp2 = unp->unp_conn; @@ -1307,7 +1307,7 @@ unp_connect(struct socket *so, struct so * and to protect simultaneous locking of multiple pcbs. */ UNP_LINK_WLOCK(); - so2 = vp->v_socket; + VOP_UNP_CONNECT(vp, &so2); if (so2 == NULL) { error = ECONNREFUSED; goto bad2; @@ -2317,17 +2317,15 @@ vfs_unp_reclaim(struct vnode *vp) active = 0; UNP_LINK_WLOCK(); - so = vp->v_socket; + VOP_UNP_CONNECT(vp, &so); if (so == NULL) goto done; unp = sotounpcb(so); if (unp == NULL) goto done; UNP_PCB_LOCK(unp); - if (unp->unp_vnode != NULL) { - KASSERT(unp->unp_vnode == vp, - ("vfs_unp_reclaim: vp != unp->unp_vnode")); - vp->v_socket = NULL; + if (unp->unp_vnode == vp) { + VOP_UNP_DETACH(vp); unp->unp_vnode = NULL; active = 1; } Modified: stable/9/sys/kern/vfs_default.c ============================================================================== --- stable/9/sys/kern/vfs_default.c Tue Apr 24 19:00:42 2012 (r234659) +++ stable/9/sys/kern/vfs_default.c Tue Apr 24 19:08:40 2012 (r234660) @@ -123,6 +123,9 @@ struct vop_vector default_vnodeops = { .vop_unlock = vop_stdunlock, .vop_vptocnp = vop_stdvptocnp, .vop_vptofh = vop_stdvptofh, + .vop_unp_bind = vop_stdunp_bind, + .vop_unp_connect = vop_stdunp_connect, + .vop_unp_detach = vop_stdunp_detach, }; /* @@ -1037,6 +1040,30 @@ vop_stdadvise(struct vop_advise_args *ap return (error); } +int +vop_stdunp_bind(struct vop_unp_bind_args *ap) +{ + + ap->a_vp->v_socket = ap->a_socket; + return (0); +} + +int +vop_stdunp_connect(struct vop_unp_connect_args *ap) +{ + + *ap->a_socket = ap->a_vp->v_socket; + return (0); +} + +int +vop_stdunp_detach(struct vop_unp_detach_args *ap) +{ + + ap->a_vp->v_socket = NULL; + return (0); +} + /* * vfs default ops * used to fill the vfs function table to get reasonable default return values. Modified: stable/9/sys/kern/vnode_if.src ============================================================================== --- stable/9/sys/kern/vnode_if.src Tue Apr 24 19:00:42 2012 (r234659) +++ stable/9/sys/kern/vnode_if.src Tue Apr 24 19:08:40 2012 (r234660) @@ -640,23 +640,31 @@ vop_advise { IN int advice; }; -# The VOPs below are spares at the end of the table to allow new VOPs to be -# added in stable branches without breaking the KBI. New VOPs in HEAD should -# be added above these spares. When merging a new VOP to a stable branch, -# the new VOP should replace one of the spares. +%% unp_bind vp E E E -vop_spare1 { +vop_unp_bind { IN struct vnode *vp; + IN struct socket *socket; }; -vop_spare2 { +%% unp_connect vp L L L + +vop_unp_connect { IN struct vnode *vp; + OUT struct socket **socket; }; -vop_spare3 { +%% unp_detach vp = = = + +vop_unp_detach { IN struct vnode *vp; }; +# The VOPs below are spares at the end of the table to allow new VOPs to be +# added in stable branches without breaking the KBI. New VOPs in HEAD should +# be added above these spares. When merging a new VOP to a stable branch, +# the new VOP should replace one of the spares. + vop_spare4 { IN struct vnode *vp; }; Modified: stable/9/sys/sys/vnode.h ============================================================================== --- stable/9/sys/sys/vnode.h Tue Apr 24 19:00:42 2012 (r234659) +++ stable/9/sys/sys/vnode.h Tue Apr 24 19:08:40 2012 (r234660) @@ -707,6 +707,9 @@ int vop_stdpathconf(struct vop_pathconf_ int vop_stdpoll(struct vop_poll_args *); int vop_stdvptocnp(struct vop_vptocnp_args *ap); int vop_stdvptofh(struct vop_vptofh_args *ap); +int vop_stdunp_bind(struct vop_unp_bind_args *ap); +int vop_stdunp_connect(struct vop_unp_connect_args *ap); +int vop_stdunp_detach(struct vop_unp_detach_args *ap); int vop_eopnotsupp(struct vop_generic_args *ap); int vop_ebadf(struct vop_generic_args *ap); int vop_einval(struct vop_generic_args *ap); From owner-svn-src-all@FreeBSD.ORG Tue Apr 24 20:27:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA6C21065674; Tue, 24 Apr 2012 20:27:31 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4FDA8FC14; Tue, 24 Apr 2012 20:27:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3OKRVgw063739; Tue, 24 Apr 2012 20:27:31 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3OKRVih063736; Tue, 24 Apr 2012 20:27:31 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201204242027.q3OKRVih063736@svn.freebsd.org> From: Peter Holm Date: Tue, 24 Apr 2012 20:27:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234661 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2012 20:27:31 -0000 Author: pho Date: Tue Apr 24 20:27:31 2012 New Revision: 234661 URL: http://svn.freebsd.org/changeset/base/234661 Log: MFC: r232702 Free up allocated memory used by posix_fadvise(2). Modified: stable/8/sys/kern/kern_descrip.c stable/8/sys/kern/vfs_syscalls.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/kern/kern_descrip.c ============================================================================== --- stable/8/sys/kern/kern_descrip.c Tue Apr 24 19:08:40 2012 (r234660) +++ stable/8/sys/kern/kern_descrip.c Tue Apr 24 20:27:31 2012 (r234661) @@ -91,6 +91,8 @@ static MALLOC_DEFINE(M_FILEDESC_TO_LEADE "file desc to leader structures"); static MALLOC_DEFINE(M_SIGIO, "sigio", "sigio structures"); +MALLOC_DECLARE(M_FADVISE); + static uma_zone_t file_zone; @@ -2361,6 +2363,7 @@ _fdrop(struct file *fp, struct thread *t error = fo_close(fp, td); atomic_subtract_int(&openfiles, 1); crfree(fp->f_cred); + free(fp->f_advice, M_FADVISE); uma_zfree(file_zone, fp); return (error); Modified: stable/8/sys/kern/vfs_syscalls.c ============================================================================== --- stable/8/sys/kern/vfs_syscalls.c Tue Apr 24 19:08:40 2012 (r234660) +++ stable/8/sys/kern/vfs_syscalls.c Tue Apr 24 20:27:31 2012 (r234661) @@ -84,7 +84,7 @@ __FBSDID("$FreeBSD$"); #include #include -static MALLOC_DEFINE(M_FADVISE, "fadvise", "posix_fadvise(2) information"); +MALLOC_DEFINE(M_FADVISE, "fadvise", "posix_fadvise(2) information"); SDT_PROVIDER_DEFINE(vfs); SDT_PROBE_DEFINE(vfs, , stat, mode, mode); From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 01:24:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 204E0106564A; Wed, 25 Apr 2012 01:24:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BBC78FC0A; Wed, 25 Apr 2012 01:24:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P1OdXu073383; Wed, 25 Apr 2012 01:24:39 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P1OdZh073381; Wed, 25 Apr 2012 01:24:39 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204250124.q3P1OdZh073381@svn.freebsd.org> From: Adrian Chadd Date: Wed, 25 Apr 2012 01:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234663 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 01:24:40 -0000 Author: adrian Date: Wed Apr 25 01:24:39 2012 New Revision: 234663 URL: http://svn.freebsd.org/changeset/base/234663 Log: Add a note that explains what the current state of the register byte order macros are. Modified: head/sys/dev/ath/ah_osdep.h Modified: head/sys/dev/ath/ah_osdep.h ============================================================================== --- head/sys/dev/ath/ah_osdep.h Tue Apr 24 21:38:41 2012 (r234662) +++ head/sys/dev/ath/ah_osdep.h Wed Apr 25 01:24:39 2012 (r234663) @@ -75,6 +75,10 @@ struct ath_hal; * domain registers are not byte swapped! Thus, on big-endian * platforms we have to explicitly byte-swap those registers. * OS_REG_UNSWAPPED identifies the registers that need special handling. + * + * This is not currently used by the FreeBSD HAL osdep code; the HAL + * currently does not configure hardware byteswapping for register space + * accesses and instead does it through the FreeBSD bus space code. */ #if _BYTE_ORDER == _BIG_ENDIAN #define OS_REG_UNSWAPPED(_reg) \ From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 01:42:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96E691065670; Wed, 25 Apr 2012 01:42:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68BF48FC0A; Wed, 25 Apr 2012 01:42:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P1gNWM073938; Wed, 25 Apr 2012 01:42:23 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P1gNXt073935; Wed, 25 Apr 2012 01:42:23 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204250142.q3P1gNXt073935@svn.freebsd.org> From: Adrian Chadd Date: Wed, 25 Apr 2012 01:42:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234664 - in head/sys/dev/ath: . ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 01:42:23 -0000 Author: adrian Date: Wed Apr 25 01:42:22 2012 New Revision: 234664 URL: http://svn.freebsd.org/changeset/base/234664 Log: Add placeholder methods for WMI command access (USB, perhaps SDIO later) which will be needed for AR7010 and AR9287 USB access. The names differ slightly from Linux and Atheros, for the sake of consistency. A lot more work is required in order to convert the 11n HAL support to fully support USB. Modified: head/sys/dev/ath/ah_osdep.h head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Modified: head/sys/dev/ath/ah_osdep.h ============================================================================== --- head/sys/dev/ath/ah_osdep.h Wed Apr 25 01:24:39 2012 (r234663) +++ head/sys/dev/ath/ah_osdep.h Wed Apr 25 01:42:22 2012 (r234664) @@ -89,6 +89,20 @@ struct ath_hal; #endif /* _BYTE_ORDER */ /* + * For USB/SDIO support (where access latencies are quite high); + * some write accesses may be buffered and then flushed when + * either a read is done, or an explicit flush is done. + * + * These are simply placeholders for now. + */ +#define OS_REG_WRITE_BUFFER_ENABLE(_ah) \ + do { } while (0) +#define OS_REG_WRITE_BUFFER_DISABLE(_ah) \ + do { } while (0) +#define OS_REG_WRITE_BUFFER_FLUSH(_ah) \ + do { } while (0) + +/* * Register read/write operations are either handled through * platform-dependent routines (or when debugging is enabled * with AH_DEBUG); or they are inline expanded using the macros Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Wed Apr 25 01:24:39 2012 (r234663) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Wed Apr 25 01:42:22 2012 (r234664) @@ -581,6 +581,8 @@ ar5416SpurMitigate(struct ath_hal *ah, c AR_PHY_TIMING_CTRL4_ENABLE_CHAN_MASK | AR_PHY_TIMING_CTRL4_ENABLE_PILOT_MASK); + OS_REG_WRITE_BUFFER_ENABLE(ah); + OS_REG_WRITE(ah, AR_PHY_TIMING_CTRL4_CHAIN(0), new); new = (AR_PHY_SPUR_REG_MASK_RATE_CNTL | @@ -765,6 +767,9 @@ ar5416SpurMitigate(struct ath_hal *ah, c | (mask_p[47] << 2) | (mask_p[46] << 0); OS_REG_WRITE(ah, AR_PHY_BIN_MASK2_4, tmp_mask); OS_REG_WRITE(ah, AR_PHY_MASK2_P_61_45, tmp_mask); + + OS_REG_WRITE_BUFFER_FLUSH(ah); + OS_REG_WRITE_BUFFER_DISABLE(ah); } /* From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 02:05:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEAD4106566C; Wed, 25 Apr 2012 02:05:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 601FA8FC0A; Wed, 25 Apr 2012 02:05:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P25Fe5074748; Wed, 25 Apr 2012 02:05:15 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P25FiN074746; Wed, 25 Apr 2012 02:05:15 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201204250205.q3P25FiN074746@svn.freebsd.org> From: Ed Maste Date: Wed, 25 Apr 2012 02:05:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234665 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 02:05:15 -0000 Author: emaste Date: Wed Apr 25 02:05:14 2012 New Revision: 234665 URL: http://svn.freebsd.org/changeset/base/234665 Log: Fix cut-and-paste comment error Submitted by: sbruno Modified: head/sys/dev/e1000/if_igb.h Modified: head/sys/dev/e1000/if_igb.h ============================================================================== --- head/sys/dev/e1000/if_igb.h Wed Apr 25 01:42:22 2012 (r234664) +++ head/sys/dev/e1000/if_igb.h Wed Apr 25 02:05:14 2012 (r234665) @@ -52,7 +52,7 @@ #define IGB_MAX_TXD 4096 /* - * IGB_RXD: Maximum number of Transmit Descriptors + * IGB_RXD: Maximum number of Receive Descriptors * * This value is the number of receive descriptors allocated by the driver. * Increasing this value allows the driver to buffer more incoming packets. From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 02:46:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C5A3106564A; Wed, 25 Apr 2012 02:46:14 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37CE78FC1D; Wed, 25 Apr 2012 02:46:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P2kErd075987; Wed, 25 Apr 2012 02:46:14 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P2kE8f075985; Wed, 25 Apr 2012 02:46:14 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201204250246.q3P2kE8f075985@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 25 Apr 2012 02:46:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234666 - head/sys/dev/msk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 02:46:14 -0000 Author: yongari Date: Wed Apr 25 02:46:13 2012 New Revision: 234666 URL: http://svn.freebsd.org/changeset/base/234666 Log: For Yukon II controllers that implement optional temperature sensor and voltage sensor, TWSI is used to get sensor data. msk(4) does not monitor these sensors and interrupt for TWSI completion is disabled by default. However, due to unknown reason, the TWSI completion interrupt fires and it resulted in interrupt storm. To fix it, acknowledges the TWSI completion interrupt if driver see the event. Given that not all Yukon II controllers show the issue it could be a silicon bug which does not honor interrupt masking. Probably the right way to address the issue is disabling automatic TWSI cycle initiation against these sensors. It would be even better to implement reading voltage/temperature from the NIC but it requires access to National LM80 through TWSI and documentation to do that is not available yet(probably will never happen). Reported by: jhb Tested by: jhb MFC after: 2 weeks Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Wed Apr 25 02:05:14 2012 (r234665) +++ head/sys/dev/msk/if_msk.c Wed Apr 25 02:46:13 2012 (r234666) @@ -3734,6 +3734,9 @@ msk_intr(void *xsc) if ((status & Y2_IS_STAT_BMU) != 0 && domore == 0) CSR_WRITE_4(sc, STAT_CTRL, SC_STAT_CLR_IRQ); + /* Clear TWSI IRQ. */ + if ((status & Y2_IS_TWSI_RDY) != 0) + CSR_WRITE_4(sc, B2_I2C_IRQ, 1); /* Reenable interrupts. */ CSR_WRITE_4(sc, B0_Y2_SP_ICR, 2); From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 04:53:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AE48106566B; Wed, 25 Apr 2012 04:53:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 55CA88FC18; Wed, 25 Apr 2012 04:53:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P4r5wB080291; Wed, 25 Apr 2012 04:53:05 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P4r5RR080289; Wed, 25 Apr 2012 04:53:05 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204250453.q3P4r5RR080289@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 25 Apr 2012 04:53:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234667 - stable/9/usr.bin/top X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 04:53:05 -0000 Author: kib Date: Wed Apr 25 04:53:04 2012 New Revision: 234667 URL: http://svn.freebsd.org/changeset/base/234667 Log: MFC r234416: Fix string buffer overflow when preparing the line of output. PR: bin/161739 Modified: stable/9/usr.bin/top/machine.c Directory Properties: stable/9/usr.bin/top/ (props changed) Modified: stable/9/usr.bin/top/machine.c ============================================================================== --- stable/9/usr.bin/top/machine.c Wed Apr 25 02:46:13 2012 (r234666) +++ stable/9/usr.bin/top/machine.c Wed Apr 25 04:53:04 2012 (r234667) @@ -933,7 +933,7 @@ format_next_process(caddr_t handle, char p_tot = rup->ru_inblock + rup->ru_oublock + rup->ru_majflt; s_tot = total_inblock + total_oublock + total_majflt; - sprintf(fmt, io_Proc_format, + snprintf(fmt, sizeof(fmt), io_Proc_format, pp->ki_pid, jid_buf, namelength, namelength, (*get_userid)(pp->ki_ruid), @@ -961,7 +961,7 @@ format_next_process(caddr_t handle, char snprintf(thr_buf, sizeof(thr_buf), "%*d ", sizeof(thr_buf) - 2, pp->ki_numthreads); - sprintf(fmt, proc_fmt, + snprintf(fmt, sizeof(fmt), proc_fmt, pp->ki_pid, jid_buf, namelength, namelength, (*get_userid)(pp->ki_ruid), From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 04:57:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4B9B71065670; Wed, 25 Apr 2012 04:57:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 369EE8FC08; Wed, 25 Apr 2012 04:57:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P4vUuw080491; Wed, 25 Apr 2012 04:57:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P4vUEF080487; Wed, 25 Apr 2012 04:57:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204250457.q3P4vUEF080487@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 25 Apr 2012 04:57:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234668 - stable/8/usr.bin/top X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 04:57:30 -0000 Author: kib Date: Wed Apr 25 04:57:29 2012 New Revision: 234668 URL: http://svn.freebsd.org/changeset/base/234668 Log: MFC r234416: Fix string buffer overflow when preparing the line of output. PR: bin/161739 Modified: stable/8/usr.bin/top/machine.c Directory Properties: stable/8/usr.bin/top/ (props changed) Modified: stable/8/usr.bin/top/machine.c ============================================================================== --- stable/8/usr.bin/top/machine.c Wed Apr 25 04:53:04 2012 (r234667) +++ stable/8/usr.bin/top/machine.c Wed Apr 25 04:57:29 2012 (r234668) @@ -932,7 +932,7 @@ format_next_process(caddr_t handle, char p_tot = rup->ru_inblock + rup->ru_oublock + rup->ru_majflt; s_tot = total_inblock + total_oublock + total_majflt; - sprintf(fmt, io_Proc_format, + snprintf(fmt, sizeof(fmt), io_Proc_format, pp->ki_pid, jid_buf, namelength, namelength, (*get_userid)(pp->ki_ruid), @@ -960,7 +960,7 @@ format_next_process(caddr_t handle, char snprintf(thr_buf, sizeof(thr_buf), "%*d ", sizeof(thr_buf) - 2, pp->ki_numthreads); - sprintf(fmt, proc_fmt, + snprintf(fmt, sizeof(fmt), proc_fmt, pp->ki_pid, jid_buf, namelength, namelength, (*get_userid)(pp->ki_ruid), From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 06:18:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D9CF106564A; Wed, 25 Apr 2012 06:18:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77C578FC08; Wed, 25 Apr 2012 06:18:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P6Iob8083133; Wed, 25 Apr 2012 06:18:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P6IoXW083131; Wed, 25 Apr 2012 06:18:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201204250618.q3P6IoXW083131@svn.freebsd.org> From: Alexander Motin Date: Wed, 25 Apr 2012 06:18:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234669 - stable/9/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 06:18:50 -0000 Author: mav Date: Wed Apr 25 06:18:49 2012 New Revision: 234669 URL: http://svn.freebsd.org/changeset/base/234669 Log: MFC r234414: Alike to SCSI make adaclose() to not return error if device gone. This fixes KASSERT panic inside GEOM if kernel built with INVARIANTS. Modified: stable/9/sys/cam/ata/ata_da.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ata/ata_da.c ============================================================================== --- stable/9/sys/cam/ata/ata_da.c Wed Apr 25 04:57:29 2012 (r234668) +++ stable/9/sys/cam/ata/ata_da.c Wed Apr 25 06:18:49 2012 (r234669) @@ -456,17 +456,16 @@ adaclose(struct disk *dp) struct cam_periph *periph; struct ada_softc *softc; union ccb *ccb; - int error; periph = (struct cam_periph *)dp->d_drv1; if (periph == NULL) return (ENXIO); cam_periph_lock(periph); - if ((error = cam_periph_hold(periph, PRIBIO)) != 0) { + if (cam_periph_hold(periph, PRIBIO) != 0) { cam_periph_unlock(periph); cam_periph_release(periph); - return (error); + return (0); } softc = (struct ada_softc *)periph->softc; From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 06:22:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD762106564A; Wed, 25 Apr 2012 06:22:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7BAD8FC18; Wed, 25 Apr 2012 06:22:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P6MMCY083302; Wed, 25 Apr 2012 06:22:22 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P6MMf5083300; Wed, 25 Apr 2012 06:22:22 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201204250622.q3P6MMf5083300@svn.freebsd.org> From: Alexander Motin Date: Wed, 25 Apr 2012 06:22:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234670 - stable/8/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 06:22:22 -0000 Author: mav Date: Wed Apr 25 06:22:22 2012 New Revision: 234670 URL: http://svn.freebsd.org/changeset/base/234670 Log: MFC r234414: Alike to SCSI make adaclose() to not return error if device gone. This fixes KASSERT panic inside GEOM if kernel built with INVARIANTS. Modified: stable/8/sys/cam/ata/ata_da.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/cam/ata/ata_da.c ============================================================================== --- stable/8/sys/cam/ata/ata_da.c Wed Apr 25 06:18:49 2012 (r234669) +++ stable/8/sys/cam/ata/ata_da.c Wed Apr 25 06:22:22 2012 (r234670) @@ -432,17 +432,16 @@ adaclose(struct disk *dp) struct cam_periph *periph; struct ada_softc *softc; union ccb *ccb; - int error; periph = (struct cam_periph *)dp->d_drv1; if (periph == NULL) return (ENXIO); cam_periph_lock(periph); - if ((error = cam_periph_hold(periph, PRIBIO)) != 0) { + if (cam_periph_hold(periph, PRIBIO) != 0) { cam_periph_unlock(periph); cam_periph_release(periph); - return (error); + return (0); } softc = (struct ada_softc *)periph->softc; From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 06:43:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DCC8106566C; Wed, 25 Apr 2012 06:43:41 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E16C8FC0A; Wed, 25 Apr 2012 06:43:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P6he5C084001; Wed, 25 Apr 2012 06:43:40 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P6heSB083998; Wed, 25 Apr 2012 06:43:40 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201204250643.q3P6heSB083998@svn.freebsd.org> From: Andriy Gapon Date: Wed, 25 Apr 2012 06:43:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234671 - in stable/9/sys: amd64/include i386/conf i386/include kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 06:43:41 -0000 Author: avg Date: Wed Apr 25 06:43:40 2012 New Revision: 234671 URL: http://svn.freebsd.org/changeset/base/234671 Log: MFC r234207: bump INTRCNT_COUNT values to reflect actual numbers of IPI counters Modified: stable/9/sys/amd64/include/intr_machdep.h stable/9/sys/i386/include/intr_machdep.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/amd64/include/intr_machdep.h ============================================================================== --- stable/9/sys/amd64/include/intr_machdep.h Wed Apr 25 06:22:22 2012 (r234670) +++ stable/9/sys/amd64/include/intr_machdep.h Wed Apr 25 06:43:40 2012 (r234671) @@ -60,10 +60,10 @@ * - 1 ??? dummy counter. * - 2 counters for each I/O interrupt. * - 1 counter for each CPU for lapic timer. - * - 7 counters for each CPU for IPI counters for SMP. + * - 8 counters for each CPU for IPI counters for SMP. */ #ifdef SMP -#define INTRCNT_COUNT (1 + NUM_IO_INTS * 2 + (1 + 7) * MAXCPU) +#define INTRCNT_COUNT (1 + NUM_IO_INTS * 2 + (1 + 8) * MAXCPU) #else #define INTRCNT_COUNT (1 + NUM_IO_INTS * 2 + 1) #endif Modified: stable/9/sys/i386/include/intr_machdep.h ============================================================================== --- stable/9/sys/i386/include/intr_machdep.h Wed Apr 25 06:22:22 2012 (r234670) +++ stable/9/sys/i386/include/intr_machdep.h Wed Apr 25 06:43:40 2012 (r234671) @@ -60,10 +60,10 @@ * - 1 ??? dummy counter. * - 2 counters for each I/O interrupt. * - 1 counter for each CPU for lapic timer. - * - 7 counters for each CPU for IPI counters for SMP. + * - 9 counters for each CPU for IPI counters for SMP. */ #ifdef SMP -#define INTRCNT_COUNT (1 + NUM_IO_INTS * 2 + (1 + 7) * MAXCPU) +#define INTRCNT_COUNT (1 + NUM_IO_INTS * 2 + (1 + 9) * MAXCPU) #else #define INTRCNT_COUNT (1 + NUM_IO_INTS * 2 + 1) #endif From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 06:48:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 17354106566C; Wed, 25 Apr 2012 06:48:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB8A38FC17; Wed, 25 Apr 2012 06:48:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P6mvkT084231; Wed, 25 Apr 2012 06:48:57 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P6mv8j084228; Wed, 25 Apr 2012 06:48:57 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201204250648.q3P6mv8j084228@svn.freebsd.org> From: Andriy Gapon Date: Wed, 25 Apr 2012 06:48:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234672 - in stable/8/sys: amd64/include i386/conf i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 06:48:58 -0000 Author: avg Date: Wed Apr 25 06:48:57 2012 New Revision: 234672 URL: http://svn.freebsd.org/changeset/base/234672 Log: MFC r234207: bump INTRCNT_COUNT values to reflect actual numbers of IPI counters Modified: stable/8/sys/amd64/include/intr_machdep.h stable/8/sys/i386/include/intr_machdep.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/amd64/include/intr_machdep.h ============================================================================== --- stable/8/sys/amd64/include/intr_machdep.h Wed Apr 25 06:43:40 2012 (r234671) +++ stable/8/sys/amd64/include/intr_machdep.h Wed Apr 25 06:48:57 2012 (r234672) @@ -60,10 +60,10 @@ * - 1 ??? dummy counter. * - 2 counters for each I/O interrupt. * - 1 counter for each CPU for lapic timer. - * - 7 counters for each CPU for IPI counters for SMP. + * - 8 counters for each CPU for IPI counters for SMP. */ #ifdef SMP -#define INTRCNT_COUNT (1 + NUM_IO_INTS * 2 + (1 + 7) * MAXCPU) +#define INTRCNT_COUNT (1 + NUM_IO_INTS * 2 + (1 + 8) * MAXCPU) #else #define INTRCNT_COUNT (1 + NUM_IO_INTS * 2 + 1) #endif Modified: stable/8/sys/i386/include/intr_machdep.h ============================================================================== --- stable/8/sys/i386/include/intr_machdep.h Wed Apr 25 06:43:40 2012 (r234671) +++ stable/8/sys/i386/include/intr_machdep.h Wed Apr 25 06:48:57 2012 (r234672) @@ -60,10 +60,10 @@ * - 1 ??? dummy counter. * - 2 counters for each I/O interrupt. * - 1 counter for each CPU for lapic timer. - * - 7 counters for each CPU for IPI counters for SMP. + * - 9 counters for each CPU for IPI counters for SMP. */ #ifdef SMP -#define INTRCNT_COUNT (1 + NUM_IO_INTS * 2 + (1 + 7) * MAXCPU) +#define INTRCNT_COUNT (1 + NUM_IO_INTS * 2 + (1 + 9) * MAXCPU) #else #define INTRCNT_COUNT (1 + NUM_IO_INTS * 2 + 1) #endif From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 06:52:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E953D106564A; Wed, 25 Apr 2012 06:52:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B9F1E8FC12; Wed, 25 Apr 2012 06:52:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P6qQHh084395; Wed, 25 Apr 2012 06:52:26 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P6qQiY084392; Wed, 25 Apr 2012 06:52:26 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201204250652.q3P6qQiY084392@svn.freebsd.org> From: Andriy Gapon Date: Wed, 25 Apr 2012 06:52:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234673 - in stable/9/sys: amd64/amd64 i386/conf i386/i386 kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 06:52:27 -0000 Author: avg Date: Wed Apr 25 06:52:26 2012 New Revision: 234673 URL: http://svn.freebsd.org/changeset/base/234673 Log: MFC r234208: add actual interrupt counters to back ipi_invlcache_counts Modified: stable/9/sys/amd64/amd64/mp_machdep.c stable/9/sys/i386/i386/mp_machdep.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/9/sys/amd64/amd64/mp_machdep.c Wed Apr 25 06:48:57 2012 (r234672) +++ stable/9/sys/amd64/amd64/mp_machdep.c Wed Apr 25 06:52:26 2012 (r234673) @@ -1475,6 +1475,8 @@ mp_ipi_intrcnt(void *dummy) intrcnt_add(buf, &ipi_invlrng_counts[i]); snprintf(buf, sizeof(buf), "cpu%d:invlpg", i); intrcnt_add(buf, &ipi_invlpg_counts[i]); + snprintf(buf, sizeof(buf), "cpu%d:invlcache", i); + intrcnt_add(buf, &ipi_invlcache_counts[i]); snprintf(buf, sizeof(buf), "cpu%d:preempt", i); intrcnt_add(buf, &ipi_preempt_counts[i]); snprintf(buf, sizeof(buf), "cpu%d:ast", i); Modified: stable/9/sys/i386/i386/mp_machdep.c ============================================================================== --- stable/9/sys/i386/i386/mp_machdep.c Wed Apr 25 06:48:57 2012 (r234672) +++ stable/9/sys/i386/i386/mp_machdep.c Wed Apr 25 06:52:26 2012 (r234673) @@ -1541,6 +1541,8 @@ mp_ipi_intrcnt(void *dummy) intrcnt_add(buf, &ipi_invlrng_counts[i]); snprintf(buf, sizeof(buf), "cpu%d:invlpg", i); intrcnt_add(buf, &ipi_invlpg_counts[i]); + snprintf(buf, sizeof(buf), "cpu%d:invlcache", i); + intrcnt_add(buf, &ipi_invlcache_counts[i]); snprintf(buf, sizeof(buf), "cpu%d:preempt", i); intrcnt_add(buf, &ipi_preempt_counts[i]); snprintf(buf, sizeof(buf), "cpu%d:ast", i); From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 07:04:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3C5C4106564A; Wed, 25 Apr 2012 07:04:49 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DA518FC14; Wed, 25 Apr 2012 07:04:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P74mYT084852; Wed, 25 Apr 2012 07:04:48 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P74mQO084849; Wed, 25 Apr 2012 07:04:48 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201204250704.q3P74mQO084849@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 25 Apr 2012 07:04:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234674 - stable/9/usr.sbin/newsyslog X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 07:04:49 -0000 Author: glebius Date: Wed Apr 25 07:04:48 2012 New Revision: 234674 URL: http://svn.freebsd.org/changeset/base/234674 Log: Merge r233257, r233258 from head: Don't run through time checks when entry is definitely oversized. This leads to newsyslog rotating on (size OR time) if both are specified. Fix a sentence in a paragraph that describes time and interval based trimming. This sentence vaguely can be interpreted as if it was speaking about time and size interaction, while it wasn't about it. PR: 100018, 160432 Modified: stable/9/usr.sbin/newsyslog/newsyslog.c stable/9/usr.sbin/newsyslog/newsyslog.conf.5 Directory Properties: stable/9/usr.sbin/newsyslog/ (props changed) Modified: stable/9/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- stable/9/usr.sbin/newsyslog/newsyslog.c Wed Apr 25 06:52:26 2012 (r234673) +++ stable/9/usr.sbin/newsyslog/newsyslog.c Wed Apr 25 07:04:48 2012 (r234674) @@ -484,12 +484,14 @@ do_entry(struct conf_entry * ent) fk_entry free_or_keep; double diffsecs; char temp_reason[REASON_MAX]; + int oversized; free_or_keep = FREE_ENT; if (verbose) printf("%s <%d%s>: ", ent->log, ent->numlogs, compress_type[ent->compress].flag); ent->fsize = sizefile(ent->log); + oversized = ((ent->trsize > 0) && (ent->fsize >= ent->trsize)); modtime = age_old_log(ent->log); ent->rotate = 0; ent->firstcreate = 0; @@ -518,7 +520,8 @@ do_entry(struct conf_entry * ent) printf("does not exist, skipped%s.\n", temp_reason); } } else { - if (ent->flags & CE_TRIMAT && !force && !rotatereq) { + if (ent->flags & CE_TRIMAT && !force && !rotatereq && + !oversized) { diffsecs = ptimeget_diff(timenow, ent->trim_at); if (diffsecs < 0.0) { /* trim_at is some time in the future. */ @@ -574,7 +577,7 @@ do_entry(struct conf_entry * ent) } else if (force) { ent->rotate = 1; snprintf(temp_reason, REASON_MAX, " due to -F request"); - } else if ((ent->trsize > 0) && (ent->fsize >= ent->trsize)) { + } else if (oversized) { ent->rotate = 1; snprintf(temp_reason, REASON_MAX, " due to size>%dK", ent->trsize); Modified: stable/9/usr.sbin/newsyslog/newsyslog.conf.5 ============================================================================== --- stable/9/usr.sbin/newsyslog/newsyslog.conf.5 Wed Apr 25 06:52:26 2012 (r234673) +++ stable/9/usr.sbin/newsyslog/newsyslog.conf.5 Wed Apr 25 07:04:48 2012 (r234674) @@ -21,7 +21,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd February 25, 2011 +.Dd March 21, 2012 .Dt NEWSYSLOG.CONF 5 .Os .Sh NAME @@ -130,7 +130,7 @@ Additionally, the format may also be con sign along with a rotation time specification of once a day, once a week, or once a month. .Pp -If a time is specified, the log file will only be trimmed if +Time based trimming happens only if .Xr newsyslog 8 is run within one hour of the specified time. If an interval is specified, the log file will be trimmed if that many From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 07:09:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4CCD7106564A; Wed, 25 Apr 2012 07:09:03 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 376318FC0C; Wed, 25 Apr 2012 07:09:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P793PT085030; Wed, 25 Apr 2012 07:09:03 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P793Nm085028; Wed, 25 Apr 2012 07:09:03 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201204250709.q3P793Nm085028@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 25 Apr 2012 07:09:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234675 - stable/9/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 07:09:03 -0000 Author: glebius Date: Wed Apr 25 07:09:02 2012 New Revision: 234675 URL: http://svn.freebsd.org/changeset/base/234675 Log: Merge r233167 from head: Rotate auth.log and messages at the beginning of a year. Otherwise, daily security checks 800.loginfail and 900.tcpwrap may produce false positive alerts. PR: 142467, 165331 Modified: stable/9/etc/newsyslog.conf Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/newsyslog.conf ============================================================================== --- stable/9/etc/newsyslog.conf Wed Apr 25 07:04:48 2012 (r234674) +++ stable/9/etc/newsyslog.conf Wed Apr 25 07:09:02 2012 (r234675) @@ -19,7 +19,7 @@ # logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] /var/log/all.log 600 7 * @T00 J /var/log/amd.log 644 7 100 * J -/var/log/auth.log 600 7 100 * JC +/var/log/auth.log 600 7 100 @0101T JC /var/log/console.log 600 5 100 * J /var/log/cron 600 3 100 * JC /var/log/daily.log 640 7 * @T00 JN @@ -27,7 +27,7 @@ /var/log/kerberos.log 600 7 100 * J /var/log/lpd-errs 644 7 100 * JC /var/log/maillog 640 7 * @T00 JC -/var/log/messages 644 5 100 * JC +/var/log/messages 644 5 100 @0101T JC /var/log/monthly.log 640 12 * $M1D0 JN /var/log/pflog 600 3 100 * JB /var/run/pflogd.pid /var/log/ppp.log root:network 640 3 100 * JC From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 07:10:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8BE671065676; Wed, 25 Apr 2012 07:10:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 769A58FC19; Wed, 25 Apr 2012 07:10:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P7AIVP085116; Wed, 25 Apr 2012 07:10:18 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P7AIns085114; Wed, 25 Apr 2012 07:10:18 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201204250710.q3P7AIns085114@svn.freebsd.org> From: Andriy Gapon Date: Wed, 25 Apr 2012 07:10:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234676 - in stable/8/sys/i386: conf i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 07:10:18 -0000 Author: avg Date: Wed Apr 25 07:10:17 2012 New Revision: 234676 URL: http://svn.freebsd.org/changeset/base/234676 Log: MFC r234208: add actual interrupt counters to back ipi_invlcache_counts Note: i386 only as r209248 has never been MFCed. Modified: stable/8/sys/i386/i386/mp_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/i386/i386/mp_machdep.c ============================================================================== --- stable/8/sys/i386/i386/mp_machdep.c Wed Apr 25 07:09:02 2012 (r234675) +++ stable/8/sys/i386/i386/mp_machdep.c Wed Apr 25 07:10:17 2012 (r234676) @@ -1678,6 +1678,8 @@ mp_ipi_intrcnt(void *dummy) intrcnt_add(buf, &ipi_invlrng_counts[i]); snprintf(buf, sizeof(buf), "cpu%d: invlpg", i); intrcnt_add(buf, &ipi_invlpg_counts[i]); + snprintf(buf, sizeof(buf), "cpu%d: invlcache", i); + intrcnt_add(buf, &ipi_invlcache_counts[i]); snprintf(buf, sizeof(buf), "cpu%d: preempt", i); intrcnt_add(buf, &ipi_preempt_counts[i]); snprintf(buf, sizeof(buf), "cpu%d: ast", i); From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 07:13:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C26B9106566B; Wed, 25 Apr 2012 07:13:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD3258FC16; Wed, 25 Apr 2012 07:13:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P7DGDW085269; Wed, 25 Apr 2012 07:13:16 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P7DGe5085267; Wed, 25 Apr 2012 07:13:16 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201204250713.q3P7DGe5085267@svn.freebsd.org> From: Andriy Gapon Date: Wed, 25 Apr 2012 07:13:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234677 - in stable/9/sys: i386/conf kern pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 07:13:16 -0000 Author: avg Date: Wed Apr 25 07:13:16 2012 New Revision: 234677 URL: http://svn.freebsd.org/changeset/base/234677 Log: MFC r234338: intpm: add ATI IXP400 pci id PR: kern/136762 Modified: stable/9/sys/pci/intpm.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/pci/intpm.c ============================================================================== --- stable/9/sys/pci/intpm.c Wed Apr 25 07:10:17 2012 (r234676) +++ stable/9/sys/pci/intpm.c Wed Apr 25 07:13:16 2012 (r234677) @@ -98,6 +98,9 @@ intsmb_probe(device_t dev) #endif device_set_desc(dev, "Intel PIIX4 SMBUS Interface"); break; + case 0x43721002: + device_set_desc(dev, "ATI IXP400 SMBus Controller"); + break; case 0x43851002: /* SB800 and newer can not be configured in a compatible way. */ if (pci_get_revid(dev) >= 0x40) From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 07:18:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C0C24106566B; Wed, 25 Apr 2012 07:18:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB4568FC16; Wed, 25 Apr 2012 07:18:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P7I4Cc085472; Wed, 25 Apr 2012 07:18:04 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P7I4tC085470; Wed, 25 Apr 2012 07:18:04 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201204250718.q3P7I4tC085470@svn.freebsd.org> From: Andriy Gapon Date: Wed, 25 Apr 2012 07:18:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234678 - in stable/8/sys: i386/conf pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 07:18:04 -0000 Author: avg Date: Wed Apr 25 07:18:04 2012 New Revision: 234678 URL: http://svn.freebsd.org/changeset/base/234678 Log: MFC r234338: intpm: add ATI IXP400 pci id PR: kern/136762 Modified: stable/8/sys/pci/intpm.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/pci/intpm.c ============================================================================== --- stable/8/sys/pci/intpm.c Wed Apr 25 07:13:16 2012 (r234677) +++ stable/8/sys/pci/intpm.c Wed Apr 25 07:18:04 2012 (r234678) @@ -98,6 +98,9 @@ intsmb_probe(device_t dev) #endif device_set_desc(dev, "Intel PIIX4 SMBUS Interface"); break; + case 0x43721002: + device_set_desc(dev, "ATI IXP400 SMBus Controller"); + break; case 0x43851002: /* SB800 and newer can not be configured in a compatible way. */ if (pci_get_revid(dev) >= 0x40) From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 07:23:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BDCB0106564A; Wed, 25 Apr 2012 07:23:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EF218FC08; Wed, 25 Apr 2012 07:23:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P7NZqp085696; Wed, 25 Apr 2012 07:23:35 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P7NZEg085694; Wed, 25 Apr 2012 07:23:35 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201204250723.q3P7NZEg085694@svn.freebsd.org> From: Andriy Gapon Date: Wed, 25 Apr 2012 07:23:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234679 - in stable/9/sys: boot/i386/zfsboot i386/conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 07:23:35 -0000 Author: avg Date: Wed Apr 25 07:23:35 2012 New Revision: 234679 URL: http://svn.freebsd.org/changeset/base/234679 Log: MFC r234339: zfsboot: honor -q if it's present in boot.config Modified: stable/9/sys/boot/i386/zfsboot/zfsboot.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- stable/9/sys/boot/i386/zfsboot/zfsboot.c Wed Apr 25 07:18:04 2012 (r234678) +++ stable/9/sys/boot/i386/zfsboot/zfsboot.c Wed Apr 25 07:23:35 2012 (r234679) @@ -93,6 +93,7 @@ static const char *const dev_nm[NDEV] = static const unsigned char dev_maj[NDEV] = {30, 4, 2}; static char cmd[512]; +static char cmddup[512]; static char kname[1024]; static int comspeed = SIOSPD; static struct bootinfo bootinfo; @@ -541,10 +542,15 @@ main(void) } if (*cmd) { - if (!OPT_CHECK(RBX_QUIET)) - printf("%s: %s", PATH_CONFIG, cmd); + /* + * Note that parse() is destructive to cmd[] and we also want + * to honor RBX_QUIET option that could be present in cmd[]. + */ + memcpy(cmddup, cmd, sizeof(cmd)); if (parse()) autoboot = 0; + if (!OPT_CHECK(RBX_QUIET)) + printf("%s: %s", PATH_CONFIG, cmddup); /* Do not process this command twice */ *cmd = 0; } From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 07:27:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A421106564A; Wed, 25 Apr 2012 07:27:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8C838FC17; Wed, 25 Apr 2012 07:27:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P7RD5g085865; Wed, 25 Apr 2012 07:27:13 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P7RD74085863; Wed, 25 Apr 2012 07:27:13 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201204250727.q3P7RD74085863@svn.freebsd.org> From: Andriy Gapon Date: Wed, 25 Apr 2012 07:27:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234680 - in stable/8/sys: boot/i386/zfsboot i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 07:27:14 -0000 Author: avg Date: Wed Apr 25 07:27:13 2012 New Revision: 234680 URL: http://svn.freebsd.org/changeset/base/234680 Log: MFC r234339: zfsboot: honor -q if it's present in boot.config Modified: stable/8/sys/boot/i386/zfsboot/zfsboot.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- stable/8/sys/boot/i386/zfsboot/zfsboot.c Wed Apr 25 07:23:35 2012 (r234679) +++ stable/8/sys/boot/i386/zfsboot/zfsboot.c Wed Apr 25 07:27:13 2012 (r234680) @@ -93,6 +93,7 @@ static const char *const dev_nm[NDEV] = static const unsigned char dev_maj[NDEV] = {30, 4, 2}; static char cmd[512]; +static char cmddup[512]; static char kname[1024]; static int comspeed = SIOSPD; static struct bootinfo bootinfo; @@ -536,10 +537,15 @@ main(void) } if (*cmd) { - if (!OPT_CHECK(RBX_QUIET)) - printf("%s: %s", PATH_CONFIG, cmd); + /* + * Note that parse() is destructive to cmd[] and we also want + * to honor RBX_QUIET option that could be present in cmd[]. + */ + memcpy(cmddup, cmd, sizeof(cmd)); if (parse()) autoboot = 0; + if (!OPT_CHECK(RBX_QUIET)) + printf("%s: %s", PATH_CONFIG, cmddup); /* Do not process this command twice */ *cmd = 0; } From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 09:55:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9664D1065676; Wed, 25 Apr 2012 09:55:34 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7FA2D8FC0C; Wed, 25 Apr 2012 09:55:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P9tYb5090643; Wed, 25 Apr 2012 09:55:34 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P9tYhL090641; Wed, 25 Apr 2012 09:55:34 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201204250955.q3P9tYhL090641@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Wed, 25 Apr 2012 09:55:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234681 - stable/9/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 09:55:34 -0000 Author: melifaro Date: Wed Apr 25 09:55:34 2012 New Revision: 234681 URL: http://svn.freebsd.org/changeset/base/234681 Log: MFC r234574 Fix panic in ng_patch(4) caused by checksum flags being added to mbuf flags. Tested by: Maxim Ignatenko Approved by: ae(mentor) Modified: stable/9/sys/netgraph/ng_patch.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netgraph/ng_patch.c ============================================================================== --- stable/9/sys/netgraph/ng_patch.c Wed Apr 25 07:27:13 2012 (r234680) +++ stable/9/sys/netgraph/ng_patch.c Wed Apr 25 09:55:34 2012 (r234681) @@ -517,7 +517,7 @@ ng_patch_rcvdata(hook_p hook, item_p ite return (ENOMEM); } do_patch(priv, m); - m->m_flags |= priv->config->csum_flags; + m->m_pkthdr.csum_flags |= priv->config->csum_flags; } target = NULL; From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 09:56:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3CA5D106564A; Wed, 25 Apr 2012 09:56:36 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 270BC8FC1F; Wed, 25 Apr 2012 09:56:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P9uaOV090716; Wed, 25 Apr 2012 09:56:36 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P9uZZr090714; Wed, 25 Apr 2012 09:56:35 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201204250956.q3P9uZZr090714@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Wed, 25 Apr 2012 09:56:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234682 - stable/8/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 09:56:36 -0000 Author: melifaro Date: Wed Apr 25 09:56:35 2012 New Revision: 234682 URL: http://svn.freebsd.org/changeset/base/234682 Log: MFC r234574 Fix panic in ng_patch(4) caused by checksum flags being added to mbuf flags. Tested by: Maxim Ignatenko Approved by: ae(mentor) Modified: stable/8/sys/netgraph/ng_patch.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/netgraph/ng_patch.c ============================================================================== --- stable/8/sys/netgraph/ng_patch.c Wed Apr 25 09:55:34 2012 (r234681) +++ stable/8/sys/netgraph/ng_patch.c Wed Apr 25 09:56:35 2012 (r234682) @@ -517,7 +517,7 @@ ng_patch_rcvdata(hook_p hook, item_p ite return (ENOMEM); } do_patch(priv, m); - m->m_flags |= priv->config->csum_flags; + m->m_pkthdr.csum_flags |= priv->config->csum_flags; } target = NULL; From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 12:02:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6494B1065674; Wed, 25 Apr 2012 12:02:07 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F3E48FC25; Wed, 25 Apr 2012 12:02:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3PC27Pt097589; Wed, 25 Apr 2012 12:02:07 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3PC27qc097587; Wed, 25 Apr 2012 12:02:07 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201204251202.q3PC27qc097587@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 25 Apr 2012 12:02:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234683 - stable/7/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 12:02:07 -0000 Author: ae Date: Wed Apr 25 12:02:06 2012 New Revision: 234683 URL: http://svn.freebsd.org/changeset/base/234683 Log: MFC r234574 (by melifaro): Fix panic in ng_patch(4) caused by checksum flags being added to mbuf flags. Tested by: Maxim Ignatenko Modified: stable/7/sys/netgraph/ng_patch.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/netgraph/ng_patch.c ============================================================================== --- stable/7/sys/netgraph/ng_patch.c Wed Apr 25 09:56:35 2012 (r234682) +++ stable/7/sys/netgraph/ng_patch.c Wed Apr 25 12:02:06 2012 (r234683) @@ -517,7 +517,7 @@ ng_patch_rcvdata(hook_p hook, item_p ite return (ENOMEM); } do_patch(priv, m); - m->m_flags |= priv->config->csum_flags; + m->m_pkthdr.csum_flags |= priv->config->csum_flags; } target = NULL; From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 17:54:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A34A1065674; Wed, 25 Apr 2012 17:54:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F05C08FC12; Wed, 25 Apr 2012 17:54:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3PHsQ93008777; Wed, 25 Apr 2012 17:54:26 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3PHsQ3t008774; Wed, 25 Apr 2012 17:54:26 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201204251754.q3PHsQ3t008774@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 25 Apr 2012 17:54:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234684 - head/lib/libusb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 17:54:27 -0000 Author: hselasky Date: Wed Apr 25 17:54:26 2012 New Revision: 234684 URL: http://svn.freebsd.org/changeset/base/234684 Log: Fix binary compatibility to the official LibUSB 1.0. This is useful for GNU/kFreeBSD and the libusb2debian port. Applications using the asynchronous API of LibUSB 1.0 needs to be recompiled after this update. Found by: lme @ Modified: head/lib/libusb/libusb.h head/lib/libusb/libusb10.c Modified: head/lib/libusb/libusb.h ============================================================================== --- head/lib/libusb/libusb.h Wed Apr 25 12:02:06 2012 (r234683) +++ head/lib/libusb/libusb.h Wed Apr 25 17:54:26 2012 (r234684) @@ -340,7 +340,7 @@ typedef void (*libusb_transfer_cb_fn) (s typedef struct libusb_transfer { libusb_device_handle *dev_handle; uint8_t flags; - uint32_t endpoint; + uint8_t endpoint; uint8_t type; uint32_t timeout; enum libusb_transfer_status status; @@ -349,7 +349,6 @@ typedef struct libusb_transfer { libusb_transfer_cb_fn callback; void *user_data; uint8_t *buffer; - void *os_priv; int num_iso_packets; struct libusb_iso_packet_descriptor iso_packet_desc[0]; } libusb_transfer __aligned(sizeof(void *)); Modified: head/lib/libusb/libusb10.c ============================================================================== --- head/lib/libusb/libusb10.c Wed Apr 25 12:02:06 2012 (r234683) +++ head/lib/libusb/libusb10.c Wed Apr 25 17:54:26 2012 (r234684) @@ -1322,7 +1322,7 @@ libusb_submit_transfer(struct libusb_tra struct libusb20_transfer *pxfer1; struct libusb_super_transfer *sxfer; struct libusb_device *dev; - uint32_t endpoint; + uint8_t endpoint; int err; if (uxfer == NULL) @@ -1333,9 +1333,6 @@ libusb_submit_transfer(struct libusb_tra endpoint = uxfer->endpoint; - if (endpoint > 255) - return (LIBUSB_ERROR_INVALID_PARAM); - dev = libusb_get_device(uxfer->dev_handle); DPRINTF(dev->ctx, LIBUSB_DEBUG_FUNCTION, "libusb_submit_transfer enter"); @@ -1385,7 +1382,7 @@ libusb_cancel_transfer(struct libusb_tra struct libusb20_transfer *pxfer1; struct libusb_super_transfer *sxfer; struct libusb_device *dev; - uint32_t endpoint; + uint8_t endpoint; int retval; if (uxfer == NULL) @@ -1397,9 +1394,6 @@ libusb_cancel_transfer(struct libusb_tra endpoint = uxfer->endpoint; - if (endpoint > 255) - return (LIBUSB_ERROR_INVALID_PARAM); - dev = libusb_get_device(uxfer->dev_handle); DPRINTF(dev->ctx, LIBUSB_DEBUG_FUNCTION, "libusb_cancel_transfer enter"); From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 18:07:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B801F106564A; Wed, 25 Apr 2012 18:07:35 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A340B8FC0A; Wed, 25 Apr 2012 18:07:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3PI7ZbK009239; Wed, 25 Apr 2012 18:07:35 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3PI7Zkf009237; Wed, 25 Apr 2012 18:07:35 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201204251807.q3PI7Zkf009237@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 25 Apr 2012 18:07:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234685 - head/lib/msun/src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 18:07:35 -0000 Author: des Date: Wed Apr 25 18:07:35 2012 New Revision: 234685 URL: http://svn.freebsd.org/changeset/base/234685 Log: I stopped using my middle name years ago. Modified: head/lib/msun/src/s_fabsl.c Modified: head/lib/msun/src/s_fabsl.c ============================================================================== --- head/lib/msun/src/s_fabsl.c Wed Apr 25 17:54:26 2012 (r234684) +++ head/lib/msun/src/s_fabsl.c Wed Apr 25 18:07:35 2012 (r234685) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2003 Dag-Erling Coïdan Smørgrav + * Copyright (c) 2003 Dag-Erling Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 21:50:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A19F10656B3; Wed, 25 Apr 2012 21:50:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 760848FC12; Wed, 25 Apr 2012 21:50:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3PLoL5G016210; Wed, 25 Apr 2012 21:50:21 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3PLoLD8016208; Wed, 25 Apr 2012 21:50:21 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201204252150.q3PLoLD8016208@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 25 Apr 2012 21:50:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234686 - head/lib/libusb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 21:50:21 -0000 Author: hselasky Date: Wed Apr 25 21:50:20 2012 New Revision: 234686 URL: http://svn.freebsd.org/changeset/base/234686 Log: Bump the libusb major version due to the last commit, which changes the libusb 1.0 API. While at it, correct a manual page symlink. Suggested by: kib @ Modified: head/lib/libusb/Makefile Modified: head/lib/libusb/Makefile ============================================================================== --- head/lib/libusb/Makefile Wed Apr 25 18:07:35 2012 (r234685) +++ head/lib/libusb/Makefile Wed Apr 25 21:50:20 2012 (r234686) @@ -5,7 +5,7 @@ # LIB= usb -SHLIB_MAJOR= 2 +SHLIB_MAJOR= 3 SHLIB_MINOR= 0 SRCS= libusb20.c SRCS+= libusb20_desc.c @@ -70,7 +70,7 @@ MLINKS += libusb.3 libusb_detach_kernel_ MLINKS += libusb.3 libusb_detach_kernel_driver_np.3 MLINKS += libusb.3 libusb_attach_kernel_driver.3 MLINKS += libusb.3 libusb_get_device_descriptor.3 -MLINKS += libusb.3 libsub_get_active_config_descriptor.3 +MLINKS += libusb.3 libusb_get_active_config_descriptor.3 MLINKS += libusb.3 libusb_get_config_descriptor.3 MLINKS += libusb.3 libusb_get_config_descriptor_by_value.3 MLINKS += libusb.3 libusb_free_config_descriptor.3 From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 21:59:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A28F1065672; Wed, 25 Apr 2012 21:59:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E9DE28FC14; Wed, 25 Apr 2012 21:59:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3PLxunG016529; Wed, 25 Apr 2012 21:59:56 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3PLxu84016527; Wed, 25 Apr 2012 21:59:56 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201204252159.q3PLxu84016527@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 25 Apr 2012 21:59:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234687 - head/lib/libusb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 21:59:57 -0000 Author: hselasky Date: Wed Apr 25 21:59:56 2012 New Revision: 234687 URL: http://svn.freebsd.org/changeset/base/234687 Log: Fix typo. Modified: head/lib/libusb/libusb.3 Modified: head/lib/libusb/libusb.3 ============================================================================== --- head/lib/libusb/libusb.3 Wed Apr 25 21:50:20 2012 (r234686) +++ head/lib/libusb/libusb.3 Wed Apr 25 21:59:56 2012 (r234687) @@ -285,7 +285,7 @@ Returns 0 on success and a LIBUSB_ERROR failure. .Pp .Ft int -.Fn libsub_get_active_config_descriptor "libusb_device *dev" "struct libusb_config_descriptor **config" +.Fn libusb_get_active_config_descriptor "libusb_device *dev" "struct libusb_config_descriptor **config" Get the USB configuration descriptor for the active configuration. Returns 0 on success, LIBUSB_ERROR_NOT_FOUND if the device is in From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 22:44:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 00A72106564A; Wed, 25 Apr 2012 22:44:08 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E17318FC0C; Wed, 25 Apr 2012 22:44:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3PMi7H2017950; Wed, 25 Apr 2012 22:44:07 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3PMi7Wf017948; Wed, 25 Apr 2012 22:44:07 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <201204252244.q3PMi7Wf017948@svn.freebsd.org> From: Stanislav Sedov Date: Wed, 25 Apr 2012 22:44:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234688 - head/sys/arm/arm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 22:44:08 -0000 Author: stas Date: Wed Apr 25 22:44:07 2012 New Revision: 234688 URL: http://svn.freebsd.org/changeset/base/234688 Log: - Disable MMU before reconfiguring the pagetables in the trampoline code. Otherwise we might end up overwriting the PTEs we're currently using for some reason. Reviewed by: cognet Modified: head/sys/arm/arm/elf_trampoline.c Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Wed Apr 25 21:59:56 2012 (r234687) +++ head/sys/arm/arm/elf_trampoline.c Wed Apr 25 22:44:07 2012 (r234688) @@ -614,6 +614,17 @@ __start(void) (unsigned int)&func_end + 800 , 0); if (altdst > dst) dst = altdst; + + /* + * Disable MMU. Otherwise, setup_pagetables call below + * might overwrite the L1 table we are currently using. + */ + cpu_idcache_wbinv_all(); + cpu_l2cache_wbinv_all(); + __asm __volatile("mrc p15, 0, %0, c1, c0, 0\n" + "bic %0, %0, #1\n" /* MMU_DISABLE */ + "mcr p15, 0, %0, c1, c0, 0\n" + :"=r" (pt_addr)); } else #endif dst = 4 + load_kernel((unsigned int)&kernel_start, From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 00:51:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CC101065672; Thu, 26 Apr 2012 00:51:44 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E7C78FC14; Thu, 26 Apr 2012 00:51:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3Q0piKC022435; Thu, 26 Apr 2012 00:51:44 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3Q0piHA022432; Thu, 26 Apr 2012 00:51:44 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201204260051.q3Q0piHA022432@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 26 Apr 2012 00:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234690 - head/lib/libedit/edit/readline X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 00:51:44 -0000 Author: obrien Date: Thu Apr 26 00:51:43 2012 New Revision: 234690 URL: http://svn.freebsd.org/changeset/base/234690 Log: Correct r228114 and use the same implementation for tilde.h as for history.h Added: head/lib/libedit/edit/readline/tilde.h - copied unchanged from r234451, head/lib/libedit/edit/readline/history.h Modified: head/lib/libedit/edit/readline/Makefile Modified: head/lib/libedit/edit/readline/Makefile ============================================================================== --- head/lib/libedit/edit/readline/Makefile Thu Apr 26 00:18:38 2012 (r234689) +++ head/lib/libedit/edit/readline/Makefile Thu Apr 26 00:51:43 2012 (r234690) @@ -1,8 +1,7 @@ # Copyright (c) 2011 David E O'Brien # $FreeBSD$ -INCS= readline.h history.h -INCSLINKS= readline.h ${INCSDIR}/tilde.h +INCS= readline.h history.h tilde.h INCSDIR= ${INCLUDEDIR}/edit/readline Copied: head/lib/libedit/edit/readline/tilde.h (from r234451, head/lib/libedit/edit/readline/history.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libedit/edit/readline/tilde.h Thu Apr 26 00:51:43 2012 (r234690, copy of r234451, head/lib/libedit/edit/readline/history.h) @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2011 David E. O'Brien + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * 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 REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 01:07:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B9699106566B; Thu, 26 Apr 2012 01:07:04 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 896288FC08; Thu, 26 Apr 2012 01:07:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3Q174ao023011; Thu, 26 Apr 2012 01:07:04 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3Q174k2023007; Thu, 26 Apr 2012 01:07:04 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201204260107.q3Q174k2023007@svn.freebsd.org> From: Ryan Stone Date: Thu, 26 Apr 2012 01:07:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234691 - in head: cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/contrib/opensolaris/uts/common/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 01:07:04 -0000 Author: rstone Date: Thu Apr 26 01:07:03 2012 New Revision: 234691 URL: http://svn.freebsd.org/changeset/base/234691 Log: Implement the D "cpu" variable, which returns curcpu. I have chosen not to follow the example of OpenSolaris and its descendants, which implemented cpu as an inline that took a value out of curthread. At certain points in the FreeBSD scheduler curthread->td_oncpu will no longer be valid (in particukar, just before the thread gets descheduled) so instead I have implemented this as its own built-in variable. Sponsored by: Sandvine Inc. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Thu Apr 26 00:51:43 2012 (r234690) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Thu Apr 26 01:07:03 2012 (r234691) @@ -497,6 +497,12 @@ static const dt_ident_t _dtrace_globals[ { "zonename", DT_IDENT_SCALAR, 0, DIF_VAR_ZONENAME, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_type, "string" }, #endif + +#if !defined(sun) +{ "cpu", DT_IDENT_SCALAR, 0, DIF_VAR_CPU, + DT_ATTR_STABCMN, DT_VERS_1_6_3, &dt_idops_type, "int" }, +#endif + { NULL, 0, 0, 0, { 0, 0, 0 }, 0, NULL, NULL } }; Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu Apr 26 00:51:43 2012 (r234690) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu Apr 26 01:07:03 2012 (r234691) @@ -3143,6 +3143,11 @@ dtrace_dif_variable(dtrace_mstate_t *mst return (curthread->td_errno); #endif } +#if !defined(sun) + case DIF_VAR_CPU: { + return curcpu; + } +#endif default: DTRACE_CPUFLAG_SET(CPU_DTRACE_ILLOP); return (0); Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Thu Apr 26 00:51:43 2012 (r234690) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Thu Apr 26 01:07:03 2012 (r234691) @@ -251,6 +251,10 @@ typedef enum dtrace_probespec { #define DIF_VAR_ERRNO 0x0120 /* thread errno */ #define DIF_VAR_EXECARGS 0x0121 /* process arguments */ +#if !defined(sun) +#define DIF_VAR_CPU 0x0200 +#endif + #define DIF_SUBR_RAND 0 #define DIF_SUBR_MUTEX_OWNED 1 #define DIF_SUBR_MUTEX_OWNER 2 From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 02:03:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7EA721065678; Thu, 26 Apr 2012 02:03:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6064D8FC08; Thu, 26 Apr 2012 02:03:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3Q23H6S024951; Thu, 26 Apr 2012 02:03:17 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3Q23Hjm024948; Thu, 26 Apr 2012 02:03:17 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204260203.q3Q23Hjm024948@svn.freebsd.org> From: Adrian Chadd Date: Thu, 26 Apr 2012 02:03:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234692 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 02:03:17 -0000 Author: adrian Date: Thu Apr 26 02:03:16 2012 New Revision: 234692 URL: http://svn.freebsd.org/changeset/base/234692 Log: Add the BT register definitions for AR9285/AR9287 BT coexistence. Obtained from: Linux ath9k Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416phy.h head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416phy.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416phy.h Thu Apr 26 01:07:03 2012 (r234691) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416phy.h Thu Apr 26 02:03:16 2012 (r234692) @@ -21,6 +21,42 @@ #include "ar5212/ar5212phy.h" +#define AR_BT_COEX_MODE 0x8170 +#define AR_BT_TIME_EXTEND 0x000000ff +#define AR_BT_TIME_EXTEND_S 0 +#define AR_BT_TXSTATE_EXTEND 0x00000100 +#define AR_BT_TXSTATE_EXTEND_S 8 +#define AR_BT_TX_FRAME_EXTEND 0x00000200 +#define AR_BT_TX_FRAME_EXTEND_S 9 +#define AR_BT_MODE 0x00000c00 +#define AR_BT_MODE_S 10 +#define AR_BT_QUIET 0x00001000 +#define AR_BT_QUIET_S 12 +#define AR_BT_QCU_THRESH 0x0001e000 +#define AR_BT_QCU_THRESH_S 13 +#define AR_BT_RX_CLEAR_POLARITY 0x00020000 +#define AR_BT_RX_CLEAR_POLARITY_S 17 +#define AR_BT_PRIORITY_TIME 0x00fc0000 +#define AR_BT_PRIORITY_TIME_S 18 +#define AR_BT_FIRST_SLOT_TIME 0xff000000 +#define AR_BT_FIRST_SLOT_TIME_S 24 + +#define AR_BT_COEX_WEIGHT 0x8174 +#define AR_BT_BT_WGHT 0x0000ffff +#define AR_BT_BT_WGHT_S 0 +#define AR_BT_WL_WGHT 0xffff0000 +#define AR_BT_WL_WGHT_S 16 + +#define AR_BT_COEX_MODE2 0x817c +#define AR_BT_BCN_MISS_THRESH 0x000000ff +#define AR_BT_BCN_MISS_THRESH_S 0 +#define AR_BT_BCN_MISS_CNT 0x0000ff00 +#define AR_BT_BCN_MISS_CNT_S 8 +#define AR_BT_HOLD_RX_CLEAR 0x00010000 +#define AR_BT_HOLD_RX_CLEAR_S 16 +#define AR_BT_DISABLE_BT_ANT 0x00100000 +#define AR_BT_DISABLE_BT_ANT_S 20 + /* For AR_PHY_RADAR0 */ #define AR_PHY_RADAR_0_FFT_ENA 0x80000000 Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Thu Apr 26 01:07:03 2012 (r234691) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Thu Apr 26 02:03:16 2012 (r234692) @@ -47,14 +47,58 @@ #define AR_GPIO_IN_OUT 0x4048 /* GPIO input/output register */ #define AR_GPIO_OE_OUT 0x404c /* GPIO output enable register */ #define AR_GPIO_INTR_POL 0x4050 /* GPIO interrupt polarity */ + #define AR_GPIO_INPUT_EN_VAL 0x4054 /* GPIO input enable and value */ +#define AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_DEF 0x00000004 +#define AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_S 2 +#define AR_GPIO_INPUT_EN_VAL_BT_FREQUENCY_DEF 0x00000008 +#define AR_GPIO_INPUT_EN_VAL_BT_FREQUENCY_S 3 +#define AR_GPIO_INPUT_EN_VAL_BT_ACTIVE_DEF 0x00000010 +#define AR_GPIO_INPUT_EN_VAL_BT_ACTIVE_S 4 +#define AR_GPIO_INPUT_EN_VAL_RFSILENT_DEF 0x00000080 +#define AR_GPIO_INPUT_EN_VAL_RFSILENT_DEF_S 7 +#define AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB 0x00000400 +#define AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB_S 10 +#define AR_GPIO_INPUT_EN_VAL_BT_FREQUENCY_BB 0x00000800 +#define AR_GPIO_INPUT_EN_VAL_BT_FREQUENCY_BB_S 11 +#define AR_GPIO_INPUT_EN_VAL_BT_ACTIVE_BB 0x00001000 +#define AR_GPIO_INPUT_EN_VAL_BT_ACTIVE_BB_S 12 +#define AR_GPIO_INPUT_EN_VAL_RFSILENT_BB 0x00008000 +#define AR_GPIO_INPUT_EN_VAL_RFSILENT_BB_S 15 +#define AR_GPIO_RTC_RESET_OVERRIDE_ENABLE 0x00010000 +#define AR_GPIO_JTAG_DISABLE 0x00020000 + #define AR_GPIO_INPUT_MUX1 0x4058 +#define AR_GPIO_INPUT_MUX1_BT_PRIORITY 0x00000f00 +#define AR_GPIO_INPUT_MUX1_BT_PRIORITY_S 8 +#define AR_GPIO_INPUT_MUX1_BT_FREQUENCY 0x0000f000 +#define AR_GPIO_INPUT_MUX1_BT_FREQUENCY_S 12 +#define AR_GPIO_INPUT_MUX1_BT_ACTIVE 0x000f0000 +#define AR_GPIO_INPUT_MUX1_BT_ACTIVE_S 16 + #define AR_GPIO_INPUT_MUX2 0x405c +#define AR_GPIO_INPUT_MUX2_CLK25 0x0000000f +#define AR_GPIO_INPUT_MUX2_CLK25_S 0 +#define AR_GPIO_INPUT_MUX2_RFSILENT 0x000000f0 +#define AR_GPIO_INPUT_MUX2_RFSILENT_S 4 +#define AR_GPIO_INPUT_MUX2_RTC_RESET 0x00000f00 +#define AR_GPIO_INPUT_MUX2_RTC_RESET_S 8 + #define AR_GPIO_OUTPUT_MUX1 0x4060 #define AR_GPIO_OUTPUT_MUX2 0x4064 #define AR_GPIO_OUTPUT_MUX3 0x4068 + +#define AR_GPIO_OUTPUT_MUX_AS_OUTPUT 0 +#define AR_GPIO_OUTPUT_MUX_AS_PCIE_ATTENTION_LED 1 +#define AR_GPIO_OUTPUT_MUX_AS_PCIE_POWER_LED 2 +#define AR_GPIO_OUTPUT_MUX_AS_TX_FRAME 3 +#define AR_GPIO_OUTPUT_MUX_AS_RX_CLEAR_EXTERNAL 4 +#define AR_GPIO_OUTPUT_MUX_AS_MAC_NETWORK_LED 5 +#define AR_GPIO_OUTPUT_MUX_AS_MAC_POWER_LED 6 + #define AR_EEPROM_STATUS_DATA 0x407c #define AR_OBS 0x4080 +#define AR_GPIO_PDPU 0x4088 #ifdef AH_SUPPORT_AR9130 #define AR_RTC_BASE 0x20000 @@ -95,6 +139,7 @@ #define AR_TSFOOR_THRESHOLD 0x813c #define AR_PHY_ERR_3 0x8168 #define AR_PHY_ERR_MASK_3 0x816c /* mask for AR_PHY_ERR_3 */ +#define AR_BT_COEX_WEIGHT2 0x81c4 #define AR_TXOP_X 0x81ec /* txop for legacy non-qos */ #define AR_TXOP_0_3 0x81f0 /* txop for various tid's */ #define AR_TXOP_4_7 0x81f4 @@ -460,6 +505,8 @@ #define AR_PCU_MISS_BCN_IN_SLEEP 0x00004000 /* count bmiss's when sleeping */ #define AR_PCU_BUG_12306_FIX_ENA 0x00020000 /* use rx_clear to count sifs */ #define AR_PCU_FORCE_QUIET_COLL 0x00040000 /* kill xmit for channel change */ +#define AR_PCU_BT_ANT_PREVENT_RX 0x00100000 +#define AR_PCU_BT_ANT_PREVENT_RX_S 20 #define AR_PCU_TBTT_PROTECT 0x00200000 /* no xmit upto tbtt+20 uS */ #define AR_PCU_CLEAR_VMF 0x01000000 /* clear vmf mode (fast cc)*/ #define AR_PCU_CLEAR_BA_VALID 0x04000000 /* clear ba state */ From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 05:17:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4673D106564A; Thu, 26 Apr 2012 05:17:26 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3149F8FC14; Thu, 26 Apr 2012 05:17:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3Q5HQvm031271; Thu, 26 Apr 2012 05:17:26 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3Q5HPWH031269; Thu, 26 Apr 2012 05:17:25 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201204260517.q3Q5HPWH031269@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 26 Apr 2012 05:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234693 - stable/9/sys/boot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 05:17:26 -0000 Author: ae Date: Thu Apr 26 05:17:25 2012 New Revision: 234693 URL: http://svn.freebsd.org/changeset/base/234693 Log: MFC r234692: Read backup GPT header from the last LBA only when primary GPT header and table aren't valid. If they are ok, use hdr_lba_alt value to read backup header. This will make gptboot happy when GPT used atop of some GEOM provider, e.g. GEOM_MIRROR. Modified: stable/9/sys/boot/common/gpt.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/common/gpt.c ============================================================================== --- stable/9/sys/boot/common/gpt.c Thu Apr 26 02:03:16 2012 (r234692) +++ stable/9/sys/boot/common/gpt.c Thu Apr 26 05:17:25 2012 (r234693) @@ -337,16 +337,16 @@ gptread(const uuid_t *uuid, struct dsk * gpttable = table_primary; } - altlba = drvsize(dskp); - if (altlba > 0) - altlba--; - else if (hdr_primary_lba > 0) { + if (hdr_primary_lba > 0) { /* - * If we cannot obtain disk size, but primary header - * is valid, we can get backup header location from - * there. + * If primary header is valid, we can get backup + * header location from there. */ altlba = hdr_primary.hdr_lba_alt; + } else { + altlba = drvsize(dskp); + if (altlba > 0) + altlba--; } if (altlba == 0) printf("%s: unable to locate backup GPT header\n", BOOTPROG); From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 05:17:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AACB31065678; Thu, 26 Apr 2012 05:17:48 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 953B48FC1A; Thu, 26 Apr 2012 05:17:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3Q5HmRq031320; Thu, 26 Apr 2012 05:17:48 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3Q5HmTT031318; Thu, 26 Apr 2012 05:17:48 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201204260517.q3Q5HmTT031318@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 26 Apr 2012 05:17:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234694 - stable/8/sys/boot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 05:17:48 -0000 Author: ae Date: Thu Apr 26 05:17:48 2012 New Revision: 234694 URL: http://svn.freebsd.org/changeset/base/234694 Log: MFC r234692: Read backup GPT header from the last LBA only when primary GPT header and table aren't valid. If they are ok, use hdr_lba_alt value to read backup header. This will make gptboot happy when GPT used atop of some GEOM provider, e.g. GEOM_MIRROR. Modified: stable/8/sys/boot/common/gpt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/boot/ (props changed) Modified: stable/8/sys/boot/common/gpt.c ============================================================================== --- stable/8/sys/boot/common/gpt.c Thu Apr 26 05:17:25 2012 (r234693) +++ stable/8/sys/boot/common/gpt.c Thu Apr 26 05:17:48 2012 (r234694) @@ -337,16 +337,16 @@ gptread(const uuid_t *uuid, struct dsk * gpttable = table_primary; } - altlba = drvsize(dskp); - if (altlba > 0) - altlba--; - else if (hdr_primary_lba > 0) { + if (hdr_primary_lba > 0) { /* - * If we cannot obtain disk size, but primary header - * is valid, we can get backup header location from - * there. + * If primary header is valid, we can get backup + * header location from there. */ altlba = hdr_primary.hdr_lba_alt; + } else { + altlba = drvsize(dskp); + if (altlba > 0) + altlba--; } if (altlba == 0) printf("%s: unable to locate backup GPT header\n", BOOTPROG); From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 09:07:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45D18106566C; Thu, 26 Apr 2012 09:07:33 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 316478FC0A; Thu, 26 Apr 2012 09:07:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3Q97Xoq039052; Thu, 26 Apr 2012 09:07:33 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3Q97Ws7039050; Thu, 26 Apr 2012 09:07:32 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201204260907.q3Q97Ws7039050@svn.freebsd.org> From: Ruslan Ermilov Date: Thu, 26 Apr 2012 09:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234697 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 09:07:33 -0000 Author: ru Date: Thu Apr 26 09:07:32 2012 New Revision: 234697 URL: http://svn.freebsd.org/changeset/base/234697 Log: Fixed a misspelling of OLD_LIBS in r232671 by pluknet@. (The patch in the PR 165523 had this spelled correctly.) Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Apr 26 08:37:51 2012 (r234696) +++ head/ObsoleteFiles.inc Thu Apr 26 09:07:32 2012 (r234697) @@ -459,7 +459,7 @@ OLD_FILES+=usr/share/man/man5/lastlog.5. OLD_FILES+=usr/share/man/man5/utmp.5.gz OLD_FILES+=usr/share/man/man5/wtmp.5.gz OLD_LIBS+=lib/libutil.so.8 -OLB_LIBS+=usr/lib32/libutil.so.8 +OLD_LIBS+=usr/lib32/libutil.so.8 # 20100105: new userland semaphore implementation OLD_FILES+=usr/include/sys/semaphore.h # 20100103: ntptrace(8) removed From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 09:14:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3629B106564A; Thu, 26 Apr 2012 09:14:53 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21B818FC0C; Thu, 26 Apr 2012 09:14:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3Q9EqR6039365; Thu, 26 Apr 2012 09:14:52 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3Q9EqTI039363; Thu, 26 Apr 2012 09:14:52 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201204260914.q3Q9EqTI039363@svn.freebsd.org> From: Ruslan Ermilov Date: Thu, 26 Apr 2012 09:14:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234698 - stable/9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 09:14:53 -0000 Author: ru Date: Thu Apr 26 09:14:52 2012 New Revision: 234698 URL: http://svn.freebsd.org/changeset/base/234698 Log: MFC r234697: Fixed a misspelling of OLD_LIBS in r232671 by pluknet@. (The patch in the PR 165523 had this spelled correctly.) Modified: stable/9/ObsoleteFiles.inc (contents, props changed) Modified: stable/9/ObsoleteFiles.inc ============================================================================== --- stable/9/ObsoleteFiles.inc Thu Apr 26 09:07:32 2012 (r234697) +++ stable/9/ObsoleteFiles.inc Thu Apr 26 09:14:52 2012 (r234698) @@ -351,7 +351,7 @@ OLD_FILES+=usr/share/man/man5/lastlog.5. OLD_FILES+=usr/share/man/man5/utmp.5.gz OLD_FILES+=usr/share/man/man5/wtmp.5.gz OLD_LIBS+=lib/libutil.so.8 -OLB_LIBS+=usr/lib32/libutil.so.8 +OLD_LIBS+=usr/lib32/libutil.so.8 # 20100105: new userland semaphore implementation OLD_FILES+=usr/include/sys/semaphore.h # 20100103: ntptrace(8) removed From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 09:26:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37B4A106566C; Thu, 26 Apr 2012 09:26:43 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id C791E8FC16; Thu, 26 Apr 2012 09:26:42 +0000 (UTC) Received: by iahk25 with SMTP id k25so1752798iah.13 for ; Thu, 26 Apr 2012 02:26:42 -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 :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=t6smNKTnXzAP5oIoZR0NluscCpi3kouNYd28pqMXRgc=; b=a9N5UJcuveIPkC6LBCk2AQIObrhDnH0GVjlK5M4mP5bfHFoe2keTzVhuoJFG3c0STX a1VsfxpHbBhtsPUxTxaW0bwnF0WH47vEDOuIN4X+fdvYEthDvQoCdMtVhFZSU3kNvIn4 ZzbNI+I1ovapcS7jL42xziip6q2Ku7azOW0aFscIsMV3fCYVehNykJw9Uh/zLXrdoMPu 2LkuZJelNruRnndggCKVzgkRenGfI6BlBi244aVggOImoGxyn3TVwF18V/1C9qLo+0R4 wTwRNI6VPU/8nDmxm0d7f60xQrerXnEJOoeaEmkzbM+LjVojMsE+DkKdKlh5SPtJXzdA GT9w== MIME-Version: 1.0 Received: by 10.50.36.194 with SMTP id s2mr5690914igj.46.1335432402433; Thu, 26 Apr 2012 02:26:42 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.64.78.37 with HTTP; Thu, 26 Apr 2012 02:26:42 -0700 (PDT) In-Reply-To: <201204260907.q3Q97Ws7039050@svn.freebsd.org> References: <201204260907.q3Q97Ws7039050@svn.freebsd.org> Date: Thu, 26 Apr 2012 13:26:42 +0400 X-Google-Sender-Auth: AezK2MWTPSPHSrtcRdknFnLdMcI Message-ID: From: Sergey Kandaurov To: Ruslan Ermilov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234697 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 09:26:43 -0000 On 26 April 2012 13:07, Ruslan Ermilov wrote: > Author: ru > Date: Thu Apr 26 09:07:32 2012 > New Revision: 234697 > URL: http://svn.freebsd.org/changeset/base/234697 > > Log: > =A0Fixed a misspelling of OLD_LIBS in r232671 by pluknet@. > =A0(The patch in the PR 165523 had this spelled correctly.) > > Modified: > =A0head/ObsoleteFiles.inc > > Modified: head/ObsoleteFiles.inc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/ObsoleteFiles.inc =A0 =A0 =A0Thu Apr 26 08:37:51 2012 =A0 =A0 = =A0 =A0(r234696) > +++ head/ObsoleteFiles.inc =A0 =A0 =A0Thu Apr 26 09:07:32 2012 =A0 =A0 = =A0 =A0(r234697) > @@ -459,7 +459,7 @@ OLD_FILES+=3Dusr/share/man/man5/lastlog.5. > =A0OLD_FILES+=3Dusr/share/man/man5/utmp.5.gz > =A0OLD_FILES+=3Dusr/share/man/man5/wtmp.5.gz > =A0OLD_LIBS+=3Dlib/libutil.so.8 > -OLB_LIBS+=3Dusr/lib32/libutil.so.8 > +OLD_LIBS+=3Dusr/lib32/libutil.so.8 > =A0# 20100105: new userland semaphore implementation > =A0OLD_FILES+=3Dusr/include/sys/semaphore.h > =A0# 20100103: ntptrace(8) removed Apparently I was on drugs. Thanks. --=20 wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 11:07:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7BEA106564A; Thu, 26 Apr 2012 11:07:16 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 794408FC16; Thu, 26 Apr 2012 11:07:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QB7GbL045505; Thu, 26 Apr 2012 11:07:16 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QB7GOL045501; Thu, 26 Apr 2012 11:07:16 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201204261107.q3QB7GOL045501@svn.freebsd.org> From: Michael Tuexen Date: Thu, 26 Apr 2012 11:07:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234699 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 11:07:18 -0000 Author: tuexen Date: Thu Apr 26 11:07:15 2012 New Revision: 234699 URL: http://svn.freebsd.org/changeset/base/234699 Log: Fix a type in an SCTP AUTH related notification. Keep the old name for backwards compatibility. Spotted by Irene Ruengeler. MFC after: 3 days Modified: head/sys/netinet/sctp_auth.c head/sys/netinet/sctp_uio.h head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_auth.c ============================================================================== --- head/sys/netinet/sctp_auth.c Thu Apr 26 09:14:52 2012 (r234698) +++ head/sys/netinet/sctp_auth.c Thu Apr 26 11:07:15 2012 (r234699) @@ -1801,7 +1801,7 @@ sctp_handle_auth(struct sctp_tcb *stcb, * shared_key_id, (void * *)stcb->asoc.authinfo.recv_keyid); */ - sctp_notify_authentication(stcb, SCTP_AUTH_NEWKEY, + sctp_notify_authentication(stcb, SCTP_AUTH_NEW_KEY, shared_key_id, stcb->asoc.authinfo.recv_keyid, SCTP_SO_NOT_LOCKED); /* compute a new recv assoc key and cache it */ Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Thu Apr 26 09:14:52 2012 (r234698) +++ head/sys/netinet/sctp_uio.h Thu Apr 26 11:07:15 2012 (r234699) @@ -424,7 +424,8 @@ struct sctp_authkey_event { }; /* indication values */ -#define SCTP_AUTH_NEWKEY 0x0001 +#define SCTP_AUTH_NEW_KEY 0x0001 +#define SCTP_AUTH_NEWKEY SCTP_AUTH_NEW_KEY #define SCTP_AUTH_NO_AUTH 0x0002 #define SCTP_AUTH_FREE_KEY 0x0003 Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Thu Apr 26 09:14:52 2012 (r234698) +++ head/sys/netinet/sctputil.c Thu Apr 26 11:07:15 2012 (r234699) @@ -3531,7 +3531,7 @@ sctp_ulp_notify(uint32_t notification, s sctp_notify_shutdown_event(stcb); break; case SCTP_NOTIFY_AUTH_NEW_KEY: - sctp_notify_authentication(stcb, SCTP_AUTH_NEWKEY, error, + sctp_notify_authentication(stcb, SCTP_AUTH_NEW_KEY, error, (uint16_t) (uintptr_t) data, so_locked); break; From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 11:23:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A6FA106564A; Thu, 26 Apr 2012 11:23:19 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 4E0418FC08; Thu, 26 Apr 2012 11:23:19 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 009B625D3A71; Thu, 26 Apr 2012 11:23:17 +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 11E30BE5A97; Thu, 26 Apr 2012 11:23:17 +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 nKCba53spaUG; Thu, 26 Apr 2012 11:23:16 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id EC316BE5A96; Thu, 26 Apr 2012 11:23:15 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201204252150.q3PLoLD8016208@svn.freebsd.org> Date: Thu, 26 Apr 2012 11:23:15 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <2479726E-9720-465E-A8A8-1F29C8880F89@lists.zabbadoz.net> References: <201204252150.q3PLoLD8016208@svn.freebsd.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234686 - head/lib/libusb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 11:23:20 -0000 On 25. Apr 2012, at 21:50 , Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Apr 25 21:50:20 2012 > New Revision: 234686 > URL: http://svn.freebsd.org/changeset/base/234686 >=20 > Log: > Bump the libusb major version due to the last commit, which > changes the libusb 1.0 API. While at it, correct a manual > page symlink. >=20 > Suggested by: kib @ Why don't we use symver for the library yet? http://people.freebsd.org/~deischen/symver/freebsd_versioning.txt >=20 > Modified: > head/lib/libusb/Makefile >=20 > Modified: head/lib/libusb/Makefile > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/lib/libusb/Makefile Wed Apr 25 18:07:35 2012 = (r234685) > +++ head/lib/libusb/Makefile Wed Apr 25 21:50:20 2012 = (r234686) > @@ -5,7 +5,7 @@ > # >=20 > LIB=3D usb > -SHLIB_MAJOR=3D 2 > +SHLIB_MAJOR=3D 3 > SHLIB_MINOR=3D 0 > SRCS=3D libusb20.c > SRCS+=3D libusb20_desc.c > @@ -70,7 +70,7 @@ MLINKS +=3D libusb.3 libusb_detach_kernel_ > MLINKS +=3D libusb.3 libusb_detach_kernel_driver_np.3 > MLINKS +=3D libusb.3 libusb_attach_kernel_driver.3 > MLINKS +=3D libusb.3 libusb_get_device_descriptor.3 > -MLINKS +=3D libusb.3 libsub_get_active_config_descriptor.3 > +MLINKS +=3D libusb.3 libusb_get_active_config_descriptor.3 > MLINKS +=3D libusb.3 libusb_get_config_descriptor.3 > MLINKS +=3D libusb.3 libusb_get_config_descriptor_by_value.3 > MLINKS +=3D libusb.3 libusb_free_config_descriptor.3 --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 11:42:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A240106564A; Thu, 26 Apr 2012 11:42:31 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id EBD268FC08; Thu, 26 Apr 2012 11:42:30 +0000 (UTC) Received: by qcsg15 with SMTP id g15so771262qcs.13 for ; Thu, 26 Apr 2012 04:42:30 -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:x-mailer :mime-version:content-type; bh=NqrcEutzPqyZ1l37vYprSOng8exJpAUBYb3WpORyAvU=; b=cczRA9XPfKTbg1152LgxT3OlJH5ovk4N1pzrbG30be7d9y4URSs6rAJXmnAa+I5TwC 9cI/AokGGxIIFjtgoNl8fkVNjYEpJfvE20hKn0MrSysOQyXUCvVY4kBlxHnZatJBgXaD OHcddSKNphabEVq1Sf8zjyF10883CBoHzhQQOG2Xu2aqwU7H6nwDPRDMrMtheEWIdW6u 5QLIWsi3DYiAyYM6mQrtMQVQfX8/tUwYbyIKrS9iz+zG0CGHAs+n17ROsbBsH3hm68lS QQNt95Pprn2gAtly67iL0an7aUJgMt6XKaibIiF7ruIY/gQQkmanJG3PUp6Lb9Ga9gUY ZiZA== Received: by 10.224.215.7 with SMTP id hc7mr4976186qab.29.1335440550215; Thu, 26 Apr 2012 04:42:30 -0700 (PDT) Received: from kan.dyndns.org (c-24-63-226-98.hsd1.ma.comcast.net. [24.63.226.98]) by mx.google.com with ESMTPS id m6sm4713150qah.2.2012.04.26.04.42.28 (version=SSLv3 cipher=OTHER); Thu, 26 Apr 2012 04:42:29 -0700 (PDT) Date: Thu, 26 Apr 2012 07:42:15 -0400 From: Alexander Kabaev To: "Bjoern A. Zeeb" Message-ID: <20120426074215.12d25651@kan.dyndns.org> In-Reply-To: <2479726E-9720-465E-A8A8-1F29C8880F89@lists.zabbadoz.net> References: <201204252150.q3PLoLD8016208@svn.freebsd.org> <2479726E-9720-465E-A8A8-1F29C8880F89@lists.zabbadoz.net> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/IvayygIc4S9rdsruq1h.W_E"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Hans Petter Selasky Subject: Re: svn commit: r234686 - head/lib/libusb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 11:42:31 -0000 --Sig_/IvayygIc4S9rdsruq1h.W_E Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 26 Apr 2012 11:23:15 +0000 "Bjoern A. Zeeb" wrote: >=20 > On 25. Apr 2012, at 21:50 , Hans Petter Selasky wrote: >=20 > > Author: hselasky > > Date: Wed Apr 25 21:50:20 2012 > > New Revision: 234686 > > URL: http://svn.freebsd.org/changeset/base/234686 > >=20 > > Log: > > Bump the libusb major version due to the last commit, which > > changes the libusb 1.0 API. While at it, correct a manual > > page symlink. > >=20 > > Suggested by: kib @ >=20 >=20 > Why don't we use symver for the library yet? > http://people.freebsd.org/~deischen/symver/freebsd_versioning.txt >=20 Symbol versions make sense if one can provide backward-compatible implementation for old symbol versions. If that is not possible or desirable, major version bump is the right answer. --=20 Alexander Kabaev --Sig_/IvayygIc4S9rdsruq1h.W_E Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iD8DBQFPmTSjQ6z1jMm+XZYRAl8CAKDeu+ckPfQX++xNmNSVAiRQAMB4fQCdE/iY if8HEjlzR2TBhHXG/yNskkU= =BEsb -----END PGP SIGNATURE----- --Sig_/IvayygIc4S9rdsruq1h.W_E-- From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 12:59:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C9FC1065676; Thu, 26 Apr 2012 12:59:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EBE7A8FC0C; Thu, 26 Apr 2012 12:59:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QCx8in049400; Thu, 26 Apr 2012 12:59:08 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QCx88a049398; Thu, 26 Apr 2012 12:59:08 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201204261259.q3QCx88a049398@svn.freebsd.org> From: Eitan Adler Date: Thu, 26 Apr 2012 12:59:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234700 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 12:59:09 -0000 Author: eadler Date: Thu Apr 26 12:59:08 2012 New Revision: 234700 URL: http://svn.freebsd.org/changeset/base/234700 Log: Document the standardization status of err* and warn* PR: docs/164939 Submitted by: Niclas Zeising Approved by: bcr MFC after: 3 days Modified: head/lib/libc/gen/err.3 Modified: head/lib/libc/gen/err.3 ============================================================================== --- head/lib/libc/gen/err.3 Thu Apr 26 11:07:15 2012 (r234699) +++ head/lib/libc/gen/err.3 Thu Apr 26 12:59:08 2012 (r234700) @@ -28,7 +28,7 @@ .\" From: @(#)err.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd March 6, 1999 +.Dd March 29, 2012 .Dt ERR 3 .Os .Sh NAME @@ -212,6 +212,16 @@ if (error != 0) .Xr printf 3 , .Xr strerror 3 , .Xr sysexits 3 +.Sh STANDARDS +The +.Fn err +and +.Fn warn +families of functions are BSD extensions. +As such they should not be used in truly portable code. +Use +.Fn strerror +or similar functions instead. .Sh HISTORY The .Fn err From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 13:45:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9E761065680; Thu, 26 Apr 2012 13:45:17 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D47598FC16; Thu, 26 Apr 2012 13:45:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QDjH6C051075; Thu, 26 Apr 2012 13:45:17 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QDjHMI051073; Thu, 26 Apr 2012 13:45:17 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201204261345.q3QDjHMI051073@svn.freebsd.org> From: Michael Tuexen Date: Thu, 26 Apr 2012 13:45:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234701 - head/contrib/traceroute X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 13:45:18 -0000 Author: tuexen Date: Thu Apr 26 13:45:17 2012 New Revision: 234701 URL: http://svn.freebsd.org/changeset/base/234701 Log: Fix a bug in the TCP tracerouting which resulted in not accepting any incoming packets. So all packets seemed to be lost. MFC after: 1 week Modified: head/contrib/traceroute/traceroute.c Modified: head/contrib/traceroute/traceroute.c ============================================================================== --- head/contrib/traceroute/traceroute.c Thu Apr 26 12:59:08 2012 (r234700) +++ head/contrib/traceroute/traceroute.c Thu Apr 26 13:45:17 2012 (r234701) @@ -1406,8 +1406,7 @@ tcp_prep(struct outdata *outdata) tcp->th_sport = htons(ident); tcp->th_dport = htons(port + (fixedPort ? 0 : outdata->seq)); - tcp->th_seq = (tcp->th_sport << 16) | (tcp->th_dport + - (fixedPort ? outdata->seq : 0)); + tcp->th_seq = (tcp->th_sport << 16) | tcp->th_dport; tcp->th_ack = 0; tcp->th_off = 5; tcp->th_flags = TH_SYN; @@ -1425,8 +1424,8 @@ tcp_check(const u_char *data, int seq) struct tcphdr *const tcp = (struct tcphdr *) data; return (ntohs(tcp->th_sport) == ident - && ntohs(tcp->th_dport) == port + (fixedPort ? 0 : seq)) - && tcp->th_seq == (((tcp_seq)ident << 16) | (port + seq)); + && ntohs(tcp->th_dport) == port + (fixedPort ? 0 : seq) + && tcp->th_seq == (tcp_seq)((tcp->th_sport << 16) | tcp->th_dport)); } void From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 13:55:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD823106566B; Thu, 26 Apr 2012 13:55:15 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BEB6C8FC0A; Thu, 26 Apr 2012 13:55:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QDtF26051523; Thu, 26 Apr 2012 13:55:15 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QDtFdi051518; Thu, 26 Apr 2012 13:55:15 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204261355.q3QDtFdi051518@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 26 Apr 2012 13:55:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234703 - in stable/9/sys/powerpc: aim include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 13:55:16 -0000 Author: nwhitehorn Date: Thu Apr 26 13:55:15 2012 New Revision: 234703 URL: http://svn.freebsd.org/changeset/base/234703 Log: MFC r234156: We don't need kcopy() in any of the remaining places it is used, so remove it. Modified: stable/9/sys/powerpc/aim/machdep.c stable/9/sys/powerpc/aim/mmu_oea.c stable/9/sys/powerpc/aim/mmu_oea64.c stable/9/sys/powerpc/include/cpu.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/powerpc/aim/machdep.c ============================================================================== --- stable/9/sys/powerpc/aim/machdep.c Thu Apr 26 13:46:16 2012 (r234702) +++ stable/9/sys/powerpc/aim/machdep.c Thu Apr 26 13:55:15 2012 (r234703) @@ -733,36 +733,6 @@ spinlock_exit(void) intr_restore(msr); } -/* - * kcopy(const void *src, void *dst, size_t len); - * - * Copy len bytes from src to dst, aborting if we encounter a fatal - * page fault. - * - * kcopy() _must_ save and restore the old fault handler since it is - * called by uiomove(), which may be in the path of servicing a non-fatal - * page fault. - */ -int -kcopy(const void *src, void *dst, size_t len) -{ - struct thread *td; - faultbuf env, *oldfault; - int rv; - - td = curthread; - oldfault = td->td_pcb->pcb_onfault; - if ((rv = setfault(env)) != 0) { - td->td_pcb->pcb_onfault = oldfault; - return rv; - } - - memcpy(dst, src, len); - - td->td_pcb->pcb_onfault = oldfault; - return (0); -} - int db_trap_glue(struct trapframe *); /* Called from trap_subr.S */ int Modified: stable/9/sys/powerpc/aim/mmu_oea.c ============================================================================== --- stable/9/sys/powerpc/aim/mmu_oea.c Thu Apr 26 13:46:16 2012 (r234702) +++ stable/9/sys/powerpc/aim/mmu_oea.c Thu Apr 26 13:55:15 2012 (r234703) @@ -991,7 +991,7 @@ moea_copy_page(mmu_t mmu, vm_page_t msrc dst = VM_PAGE_TO_PHYS(mdst); src = VM_PAGE_TO_PHYS(msrc); - kcopy((void *)src, (void *)dst, PAGE_SIZE); + bcopy((void *)src, (void *)dst, PAGE_SIZE); } /* Modified: stable/9/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/9/sys/powerpc/aim/mmu_oea64.c Thu Apr 26 13:46:16 2012 (r234702) +++ stable/9/sys/powerpc/aim/mmu_oea64.c Thu Apr 26 13:55:15 2012 (r234703) @@ -1096,14 +1096,14 @@ moea64_copy_page(mmu_t mmu, vm_page_t ms src = VM_PAGE_TO_PHYS(msrc); if (hw_direct_map) { - kcopy((void *)src, (void *)dst, PAGE_SIZE); + bcopy((void *)src, (void *)dst, PAGE_SIZE); } else { mtx_lock(&moea64_scratchpage_mtx); moea64_set_scratchpage_pa(mmu, 0, src); moea64_set_scratchpage_pa(mmu, 1, dst); - kcopy((void *)moea64_scratchpage_va[0], + bcopy((void *)moea64_scratchpage_va[0], (void *)moea64_scratchpage_va[1], PAGE_SIZE); mtx_unlock(&moea64_scratchpage_mtx); Modified: stable/9/sys/powerpc/include/cpu.h ============================================================================== --- stable/9/sys/powerpc/include/cpu.h Thu Apr 26 13:46:16 2012 (r234702) +++ stable/9/sys/powerpc/include/cpu.h Thu Apr 26 13:55:15 2012 (r234703) @@ -100,6 +100,5 @@ void swi_vm(void *); /* XXX the following should not be here. */ void savectx(struct pcb *); -int kcopy(const void *, void *, size_t); #endif /* _MACHINE_CPU_H_ */ From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 13:56:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E07B0106566B; Thu, 26 Apr 2012 13:56:38 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C9FBE8FC1A; Thu, 26 Apr 2012 13:56:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QDucJi051612; Thu, 26 Apr 2012 13:56:38 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QDuc1b051609; Thu, 26 Apr 2012 13:56:38 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204261356.q3QDuc1b051609@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 26 Apr 2012 13:56:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234704 - stable/9/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 13:56:39 -0000 Author: nwhitehorn Date: Thu Apr 26 13:56:38 2012 New Revision: 234704 URL: http://svn.freebsd.org/changeset/base/234704 Log: MFC r234517: Make sure all pending operations have completed on the existing thread before (potentially) migrating it to a different CPU. Modified: stable/9/sys/powerpc/aim/swtch32.S stable/9/sys/powerpc/aim/swtch64.S Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/powerpc/aim/swtch32.S ============================================================================== --- stable/9/sys/powerpc/aim/swtch32.S Thu Apr 26 13:55:15 2012 (r234703) +++ stable/9/sys/powerpc/aim/swtch32.S Thu Apr 26 13:56:38 2012 (r234704) @@ -113,6 +113,7 @@ ENTRY(cpu_switch) mr %r3,%r14 /* restore old thread ptr */ bl pmap_deactivate /* Deactivate the current pmap */ + sync /* Make sure all of that finished */ stw %r16,TD_LOCK(%r14) /* ULE: update old thread's lock */ cpu_switchin: Modified: stable/9/sys/powerpc/aim/swtch64.S ============================================================================== --- stable/9/sys/powerpc/aim/swtch64.S Thu Apr 26 13:55:15 2012 (r234703) +++ stable/9/sys/powerpc/aim/swtch64.S Thu Apr 26 13:56:38 2012 (r234704) @@ -139,6 +139,7 @@ ENTRY(cpu_switch) addi %r1,%r1,48 + sync /* Make sure all of that finished */ std %r16,TD_LOCK(%r14) /* ULE: update old thread's lock */ cpu_switchin: From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 13:57:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0F8D6106566B; Thu, 26 Apr 2012 13:57:42 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE24E8FC0A; Thu, 26 Apr 2012 13:57:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QDvf1K051707; Thu, 26 Apr 2012 13:57:41 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QDvfS4051705; Thu, 26 Apr 2012 13:57:41 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204261357.q3QDvfS4051705@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 26 Apr 2012 13:57:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234705 - stable/9/sys/powerpc/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 13:57:42 -0000 Author: nwhitehorn Date: Thu Apr 26 13:57:41 2012 New Revision: 234705 URL: http://svn.freebsd.org/changeset/base/234705 Log: MFC r234589: Correctly specify assembler constrains for synchronization instructions. Modified: stable/9/sys/powerpc/include/cpufunc.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/powerpc/include/cpufunc.h ============================================================================== --- stable/9/sys/powerpc/include/cpufunc.h Thu Apr 26 13:56:38 2012 (r234704) +++ stable/9/sys/powerpc/include/cpufunc.h Thu Apr 26 13:57:41 2012 (r234705) @@ -176,21 +176,21 @@ static __inline void eieio(void) { - __asm __volatile ("eieio"); + __asm __volatile ("eieio" : : : "memory"); } static __inline void isync(void) { - __asm __volatile ("isync"); + __asm __volatile ("isync" : : : "memory"); } static __inline void powerpc_sync(void) { - __asm __volatile ("sync"); + __asm __volatile ("sync" : : : "memory"); } static __inline register_t From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 13:59:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3C073106566C; Thu, 26 Apr 2012 13:59:01 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 25CAB8FC12; Thu, 26 Apr 2012 13:59:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QDx1en051805; Thu, 26 Apr 2012 13:59:01 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QDx08U051803; Thu, 26 Apr 2012 13:59:00 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204261359.q3QDx08U051803@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 26 Apr 2012 13:59:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234706 - stable/9/sys/powerpc/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 13:59:01 -0000 Author: nwhitehorn Date: Thu Apr 26 13:59:00 2012 New Revision: 234706 URL: http://svn.freebsd.org/changeset/base/234706 Log: MFC r234542: Organize some members of ucontext_t in the same order they are in the trap frame. These are usually not used, and so this changes very little. Modified: stable/9/sys/powerpc/include/ucontext.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/powerpc/include/ucontext.h ============================================================================== --- stable/9/sys/powerpc/include/ucontext.h Thu Apr 26 13:57:41 2012 (r234705) +++ stable/9/sys/powerpc/include/ucontext.h Thu Apr 26 13:59:00 2012 (r234706) @@ -71,9 +71,9 @@ typedef struct __mcontext32 { #define mc_ctr mc_frame[35] #define mc_srr0 mc_frame[36] #define mc_srr1 mc_frame[37] -#define mc_dar mc_frame[38] -#define mc_dsisr mc_frame[39] -#define mc_exc mc_frame[40] +#define mc_exc mc_frame[38] +#define mc_dar mc_frame[39] +#define mc_dsisr mc_frame[40] /* floating-point state */ #define mc_fpscr mc_fpreg[32] From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 14:00:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EC0961065672; Thu, 26 Apr 2012 14:00:29 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BCBC48FC0C; Thu, 26 Apr 2012 14:00:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QE0TPR051932; Thu, 26 Apr 2012 14:00:29 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QE0TTJ051929; Thu, 26 Apr 2012 14:00:29 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204261400.q3QE0TTJ051929@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 26 Apr 2012 14:00:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234707 - in stable/9/sys: powerpc/aim vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 14:00:30 -0000 Author: nwhitehorn Date: Thu Apr 26 14:00:29 2012 New Revision: 234707 URL: http://svn.freebsd.org/changeset/base/234707 Log: MFC r234579: Avoid a lock order reversal in pmap_extract_and_hold() from relocking the page. This PMAP requires an additional lock besides the PMAP lock in pmap_extract_and_hold(), which vm_page_pa_tryrelock() did not release. Suggested by: kib Modified: stable/9/sys/powerpc/aim/mmu_oea64.c stable/9/sys/vm/vm_page.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/9/sys/powerpc/aim/mmu_oea64.c Thu Apr 26 13:59:00 2012 (r234706) +++ stable/9/sys/powerpc/aim/mmu_oea64.c Thu Apr 26 14:00:29 2012 (r234707) @@ -1332,6 +1332,37 @@ moea64_extract(mmu_t mmu, pmap_t pm, vm_ * pmap and virtual address pair if that mapping permits the given * protection. */ + +extern int pa_tryrelock_restart; + +static int +vm_page_pa_tryrelock_moea64(pmap_t pmap, vm_paddr_t pa, vm_paddr_t *locked) +{ + /* + * This is a duplicate of vm_page_pa_tryrelock(), but with proper + * handling of the table lock + */ + vm_paddr_t lockpa; + + lockpa = *locked; + *locked = pa; + if (lockpa) { + PA_LOCK_ASSERT(lockpa, MA_OWNED); + if (PA_LOCKPTR(pa) == PA_LOCKPTR(lockpa)) + return (0); + PA_UNLOCK(lockpa); + } + if (PA_TRYLOCK(pa)) + return (0); + UNLOCK_TABLE_RD(); + PMAP_UNLOCK(pmap); + atomic_add_int(&pa_tryrelock_restart, 1); + PA_LOCK(pa); + LOCK_TABLE_RD(); + PMAP_LOCK(pmap); + return (EAGAIN); +} + vm_page_t moea64_extract_and_hold(mmu_t mmu, pmap_t pmap, vm_offset_t va, vm_prot_t prot) { @@ -1348,7 +1379,7 @@ retry: if (pvo != NULL && (pvo->pvo_pte.lpte.pte_hi & LPTE_VALID) && ((pvo->pvo_pte.lpte.pte_lo & LPTE_PP) == LPTE_RW || (prot & VM_PROT_WRITE) == 0)) { - if (vm_page_pa_tryrelock(pmap, + if (vm_page_pa_tryrelock_moea64(pmap, pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN, &pa)) goto retry; m = PHYS_TO_VM_PAGE(pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN); Modified: stable/9/sys/vm/vm_page.c ============================================================================== --- stable/9/sys/vm/vm_page.c Thu Apr 26 13:59:00 2012 (r234706) +++ stable/9/sys/vm/vm_page.c Thu Apr 26 14:00:29 2012 (r234707) @@ -131,7 +131,7 @@ TUNABLE_INT("vm.boot_pages", &boot_pages SYSCTL_INT(_vm, OID_AUTO, boot_pages, CTLFLAG_RD, &boot_pages, 0, "number of pages allocated for bootstrapping the VM system"); -static int pa_tryrelock_restart; +int pa_tryrelock_restart; SYSCTL_INT(_vm, OID_AUTO, tryrelock_restart, CTLFLAG_RD, &pa_tryrelock_restart, 0, "Number of tryrelock restarts"); From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 14:02:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA0BE1065689; Thu, 26 Apr 2012 14:02:39 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D479D8FC0C; Thu, 26 Apr 2012 14:02:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QE2dOH052073; Thu, 26 Apr 2012 14:02:39 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QE2dtv052071; Thu, 26 Apr 2012 14:02:39 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204261402.q3QE2dtv052071@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 26 Apr 2012 14:02:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234708 - stable/9/sys/powerpc/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 14:02:40 -0000 Author: nwhitehorn Date: Thu Apr 26 14:02:39 2012 New Revision: 234708 URL: http://svn.freebsd.org/changeset/base/234708 Log: MFC r234615: Fix copy-and-paste error in r230400 that would cause ppc64 executables built with -fvisibility=hidden to fail to link with a message about hidden symbol main being referenced from a DSO. Modified: stable/9/sys/powerpc/include/profile.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/powerpc/include/profile.h ============================================================================== --- stable/9/sys/powerpc/include/profile.h Thu Apr 26 14:00:29 2012 (r234707) +++ stable/9/sys/powerpc/include/profile.h Thu Apr 26 14:02:39 2012 (r234708) @@ -85,7 +85,7 @@ __asm( " .text \n" \ "_mcount: \n" \ " .quad .L._mcount,.TOC.@tocbase,0\n" \ " .previous \n" \ - " .size main,24 \n" \ + " .size _mcount,24 \n" \ " .type _mcount,@function \n" \ " .align 4 \n" \ ".L._mcount: \n" \ From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 14:34:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 97D85106564A; Thu, 26 Apr 2012 14:34:47 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8257C8FC18; Thu, 26 Apr 2012 14:34:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QEYl5L053330; Thu, 26 Apr 2012 14:34:47 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QEYlpx053328; Thu, 26 Apr 2012 14:34:47 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201204261434.q3QEYlpx053328@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 26 Apr 2012 14:34:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234709 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 14:34:47 -0000 Author: hselasky Date: Thu Apr 26 14:34:46 2012 New Revision: 234709 URL: http://svn.freebsd.org/changeset/base/234709 Log: Add libusb.so.2 to obsolete files. Suggested by: dumbbell @ Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Apr 26 14:02:39 2012 (r234708) +++ head/ObsoleteFiles.inc Thu Apr 26 14:34:46 2012 (r234709) @@ -633,6 +633,7 @@ OLD_LIBS+=usr/lib/libssl.so.5 OLD_LIBS+=usr/lib/libtacplus.so.3 OLD_LIBS+=usr/lib/libugidfw.so.3 OLD_LIBS+=usr/lib/libusb.so.1 +OLD_LIBS+=usr/lib/libusb.so.2 OLD_LIBS+=usr/lib/libusbhid.so.3 OLD_LIBS+=usr/lib/libvgl.so.5 OLD_LIBS+=usr/lib/libwrap.so.5 @@ -734,6 +735,7 @@ OLD_LIBS+=usr/lib32/libufs.so.4 OLD_LIBS+=usr/lib32/libugidfw.so.3 OLD_LIBS+=usr/lib32/libumem.so.1 OLD_LIBS+=usr/lib32/libusb.so.1 +OLD_LIBS+=usr/lib32/libusb.so.2 OLD_LIBS+=usr/lib32/libusbhid.so.3 OLD_LIBS+=usr/lib32/libutil.so.7 OLD_LIBS+=usr/lib32/libuutil.so.1 From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 14:55:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 765D61065670; Thu, 26 Apr 2012 14:55:13 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (unknown [IPv6:2001:41d0:1:7018::1:3]) by mx1.freebsd.org (Postfix) with ESMTP id F3EA88FC1B; Thu, 26 Apr 2012 14:55:12 +0000 (UTC) Received: from [2001:1b48:10b:cafe:225:64ff:febe:589f] (helo=viking.yzserv.com) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1SNQ6B-000IT2-Gh; Thu, 26 Apr 2012 16:55:12 +0200 Message-ID: <4F9961CF.9030709@FreeBSD.org> Date: Thu, 26 Apr 2012 16:55:11 +0200 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120425 Thunderbird/12.0 MIME-Version: 1.0 To: Hans Petter Selasky References: <201204261434.q3QEYlpx053328@svn.freebsd.org> In-Reply-To: <201204261434.q3QEYlpx053328@svn.freebsd.org> X-Enigmail-Version: 1.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234709 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 14:55:13 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 26.04.2012 16:34, Hans Petter Selasky wrote: > Modified: head/ObsoleteFiles.inc OLD_LIBS+=usr/lib/libusb.so.1 > +OLD_LIBS+=usr/lib/libusb.so.2 Entries are sorted by date (recent first), not alphabetically. You should move your modifications to the top of the file, adding a comment with the date and the reason. See for example the last entry following clang update: # 20120415: new clang import which bumps version from 3.0 to 3.1 - -- Jean-Sébastien Pédron -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+ZYc8ACgkQa+xGJsFYOlNm5ACfTcHj/Pwy4jF+lagTXQjz0lmE FcIAnipVqp6w0QYMOmEjJ9ibRXmOwXov =W05t -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 17:35:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 94005106566B; Thu, 26 Apr 2012 17:35:12 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DB138FC14; Thu, 26 Apr 2012 17:35:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QHZCoD060109; Thu, 26 Apr 2012 17:35:12 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QHZCH4060106; Thu, 26 Apr 2012 17:35:12 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201204261735.q3QHZCH4060106@svn.freebsd.org> From: Bernhard Schmidt Date: Thu, 26 Apr 2012 17:35:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234711 - in head/usr.sbin/wpa: . hostapd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 17:35:12 -0000 Author: bschmidt Date: Thu Apr 26 17:35:11 2012 New Revision: 234711 URL: http://svn.freebsd.org/changeset/base/234711 Log: fix EAP server support after the 0.7.3 import: - eap_xxx.c files have been renamed to eap_server_xxx.c - additional crypto files are required for some options - EAP_MD5 and EAP_GTC is now enabled by default to match vendor config - move each file on its own line to hopefully make further diffs easier to read EAP_SERVER is now enabled by default. Fiddling with HOSTAPD_CFLAGS in src.conf is no longer required to get a basic WPA-EAP/radius setup running. Tested by: Johann Hugo MFC after: 2 weeks Modified: head/usr.sbin/wpa/Makefile.inc head/usr.sbin/wpa/hostapd/Makefile Modified: head/usr.sbin/wpa/Makefile.inc ============================================================================== --- head/usr.sbin/wpa/Makefile.inc Thu Apr 26 14:51:12 2012 (r234710) +++ head/usr.sbin/wpa/Makefile.inc Thu Apr 26 17:35:11 2012 (r234711) @@ -7,17 +7,23 @@ WPA_SUPPLICANT_DISTDIR?=${WPA_DISTDIR}/w HOSTAPD_DISTDIR?= ${WPA_DISTDIR}/hostapd .PATH.c:${.CURDIR}/.. \ + ${WPA_DISTDIR}/src/ap \ ${WPA_DISTDIR}/src/common \ ${WPA_DISTDIR}/src/crypto \ + ${WPA_DISTDIR}/src/eapol_auth \ ${WPA_DISTDIR}/src/eap_common \ + ${WPA_DISTDIR}/src/eap_server \ ${WPA_DISTDIR}/src/eapol_supp \ ${WPA_DISTDIR}/src/l2_packet \ + ${WPA_DISTDIR}/src/radius \ ${WPA_DISTDIR}/src/utils CFLAGS+=-I${.CURDIR} +CFLAGS+=-I${HOSTAPD_DISTDIR} CFLAGS+=-I${WPA_DISTDIR}/src CFLAGS+=-I${WPA_DISTDIR}/src/common CFLAGS+=-I${WPA_DISTDIR}/src/crypto +CFLAGS+=-I${WPA_DISTDIR}/src/drivers CFLAGS+=-I${WPA_DISTDIR}/src/l2_packet CFLAGS+=-I${WPA_DISTDIR}/src/utils Modified: head/usr.sbin/wpa/hostapd/Makefile ============================================================================== --- head/usr.sbin/wpa/hostapd/Makefile Thu Apr 26 14:51:12 2012 (r234710) +++ head/usr.sbin/wpa/hostapd/Makefile Thu Apr 26 17:35:11 2012 (r234711) @@ -2,33 +2,59 @@ .include "${.CURDIR}/../Makefile.inc" -.PATH.c:${HOSTAPD_DISTDIR} \ - ${WPA_DISTDIR}/src/ap \ - ${WPA_DISTDIR}/src/eap_server \ - ${WPA_DISTDIR}/src/eap_common \ - ${WPA_DISTDIR}/src/eapol_auth \ - ${WPA_DISTDIR}/src/drivers \ - ${WPA_DISTDIR}/src/radius \ - ${WPA_DISTDIR} +.PATH.c:${WPA_DISTDIR}/src/drivers PROG= hostapd -SRCS= accounting.c aes-wrap.c ap_config.c \ - ap_drv_ops.c ap_mlme.c authsrv.c \ - chap.c common.c config_file.c ctrl_iface.c crypto_openssl.c \ - ctrl_iface_ap.c drivers.c drv_callbacks.c dump_state.c \ - eap_common.c eap_peap_common.c eap_register.c eap_server.c \ - eap_server_gtc.c eap_server_identity.c eap_server_md5.c \ - eap_server_methods.c eap_server_mschapv2.c eap_server_peap.c \ - eap_server_tls.c eap_server_tls_common.c eap_server_ttls.c \ - eapol_auth_dump.c eapol_auth_sm.c eloop.c hostapd.c ieee802_11_auth.c \ - ieee802_11_common.c ieee802_11_ht.c ieee802_1x.c ip_addr.c \ - md5.c main.c ms_funcs.c peerkey_auth.c pmksa_cache_auth.c \ - preauth_auth.c radius.c radius_client.c sta_info.c \ - sha1-pbkdf2.c sha1-tlsprf.c sha1-tprf.c sha1.c \ - tkip_countermeasures.c utils.c \ - vlan_init.c wpa_auth.c wpa_auth_glue.c wpa_auth_ie.c wpa_common.c \ - wpa_debug.c wpabuf.c -SRCS+= l2_packet_freebsd.c driver_freebsd.c os_unix.c +SRCS= accounting.c \ + aes-wrap.c \ + ap_config.c \ + ap_drv_ops.c \ + ap_mlme.c \ + authsrv.c \ + chap.c \ + common.c \ + config_file.c \ + crypto_openssl.c \ + ctrl_iface.c \ + ctrl_iface_ap.c \ + drivers.c \ + drv_callbacks.c \ + eap_common.c \ + eap_peap_common.c \ + eap_register.c \ + eapol_auth_dump.c \ + eapol_auth_sm.c \ + eap_server.c \ + eap_server_methods.c \ + eloop.c \ + hostapd.c \ + ieee802_11_auth.c \ + ieee802_11_common.c \ + ieee802_1x.c \ + ip_addr.c \ + main.c \ + md5.c \ + ms_funcs.c \ + os_unix.c \ + peerkey_auth.c \ + pmksa_cache_auth.c \ + preauth_auth.c \ + radius.c \ + radius_client.c \ + sha1-pbkdf2.c \ + sha1-tlsprf.c \ + sha1.c \ + sta_info.c \ + tkip_countermeasures.c \ + utils.c \ + vlan_init.c \ + wpa_auth.c \ + wpa_auth_glue.c \ + wpa_auth_ie.c \ + wpa_common.c \ + wpa_debug.c \ + wpabuf.c +SRCS+= l2_packet_freebsd.c driver_freebsd.c MAN= hostapd.8 hostapd.conf.5 @@ -38,10 +64,11 @@ FILESDIR= ${SHAREDIR}/examples/hostapd FILES= hostapd.conf hostapd.eap_user hostapd.wpa_psk .endif -CFLAGS+= -I${HOSTAPD_DISTDIR} -I${WPA_DISTDIR}/src/drivers - -CFLAGS+= -DCONFIG_DRIVER_BSD -DHOSTAPD -CFLAGS+= -DCONFIG_DRIVER_RADIUS_ACL +CFLAGS+=-DCONFIG_DRIVER_BSD \ + -DHOSTAPD \ + -DCONFIG_DRIVER_RADIUS_ACL \ + -DCONFIG_RSN_PREAUTH \ + -DCONFIG_PEERKEY .if ${MK_INET6} != "no" CFLAGS+= -DCONFIG_IPV6 .endif @@ -55,51 +82,64 @@ CFLAGS+=${HOSTAPD_CFLAGS} LDADD+=${HOSTAPD_LDADD} #LDFLAGS+=${HOSTAPD_LDFLAGS} -.if !empty(CFLAGS:M*-DEAP_SERVER) -#SRCS+= eap.c eap_methods.c eap_identity.c - .if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH) -CFLAGS+=-DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_PSK \ - -DEAP_TLS_FUNCS -DEAP_TLS_OPENSSL -SRCS+= crypto_openssl.c -SRCS+= eap_tls.c eap_peap.c eap_peap_common.c eap_mschapv2.c \ - eap_psk.c eap_psk_common.c \ - eap_tls_common.c tls_openssl.c ms_funcs.c chap.c - -CFLAGS+=-DEAP_TTLS -DEAP_MD5 -SRCS+= eap_ttls.c eap_md5.c - -.if !empty(CFLAGS:M*-DEAP_GTC) -SRCS+= eap_gtc.c -.endif +CFLAGS+=-DDPKCS12_FUNCS \ + -DEAP_SERVER \ + -DEAP_SERVER_GTC \ + -DEAP_SERVER_IDENTITY \ + -DEAP_SERVER_MD5 \ + -DEAP_SERVER_MSCHAPV2 \ + -DEAP_SERVER_PEAP \ + -DEAP_SERVER_TLS \ + -DEAP_SERVER_TTLS \ + -DEAP_TLS_FUNCS \ + -DCONFIG_NO_DUMP_STATE +SRCS+= dump_state.c \ + eap_server_gtc.c \ + eap_server_identity.c \ + eap_server_md5.c \ + eap_server_mschapv2.c \ + eap_server_peap.c \ + eap_server_tls.c \ + eap_server_tls_common.c \ + eap_server_ttls.c \ + tls_openssl.c .if !empty(CFLAGS:M*-DEAP_AKA) NEED_SIM_COMMON= true -SRCS+= eap_aka.c +NEED_SHA256= true +SRCS+= eap_server_aka.c .endif .if !empty(CFLAGS:M*-DEAP_SIM) NEED_SIM_COMMON= true -SRCS+= eap_sim.c +SRCS+= eap_server_sim.c .endif .if defined(NEED_SIM_COMMON) -SRCS+= eap_sim_common.c eap_sim_db.c +SRCS+= eap_sim_common.c \ + eap_sim_db.c +NEED_AES_CBC= true +NEED_FIPS186_2_PRF= true .endif .if !empty(CFLAGS:M*-DEAP_GPSK) CFLAGS+=-DEAP_GPSK_SHA256 -SRCS+= eap_gpsk.c eap_gpsk_common.c +SRCS+= eap_server_gpsk.c \ + eap_gpsk_common.c NEED_SHA256= true +NEED_AES_OMAC1= true .endif .if !empty(CFLAGS:M*-DEAP_PAX) -SRCS+= eap_pax.c eap_pax_common.c +SRCS+= eap_server_pax.c \ + eap_pax_common.c .endif .if !empty(CFLAGS:M*-DEAP_SAKE) -SRCS+= eap_sake.c eap_sake_common.c +SRCS+= eap_server_sake.c \ + eap_sake_common.c .endif DPADD+= ${LIBSSL} ${LIBCRYPTO} @@ -108,12 +148,19 @@ LDADD+= -lssl -lcrypto NEED_TLS_NONE= true .endif -.else -NEED_TLS_NONE= true +.if defined(NEED_AES_CBC) +SRCS+= aes-cbc.c +.endif + +.if defined(NEED_AES_OMAC1) +SRCS+= aes-omac1.c +.endif + +.if defined(NEED_FIPS186_2_PRF) +SRCS+= fips_prf_openssl.c .endif .if defined(NEED_SHA256) -CFLAGS+=-DINTERNAL_SHA256 SRCS+= sha256.c .endif From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 17:36:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8B361065673; Thu, 26 Apr 2012 17:36:05 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C18EA8FC0A; Thu, 26 Apr 2012 17:36:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QHa50G060178; Thu, 26 Apr 2012 17:36:05 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QHa5qq060172; Thu, 26 Apr 2012 17:36:05 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201204261736.q3QHa5qq060172@svn.freebsd.org> From: Jamie Gritton Date: Thu, 26 Apr 2012 17:36:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234712 - in head: lib/libc/sys usr.sbin/jail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 17:36:05 -0000 Author: jamie Date: Thu Apr 26 17:36:05 2012 New Revision: 234712 URL: http://svn.freebsd.org/changeset/base/234712 Log: A new jail(8) with a configuration file, ultimately to replace the work currently done by /etc/rc.d/jail. MFC after: 3 months Added: head/usr.sbin/jail/command.c - copied unchanged from r232242, projects/jailconf/usr.sbin/jail/command.c head/usr.sbin/jail/config.c - copied unchanged from r232242, projects/jailconf/usr.sbin/jail/config.c head/usr.sbin/jail/jail.conf.5 - copied unchanged from r232242, projects/jailconf/usr.sbin/jail/jail.conf.5 head/usr.sbin/jail/jaillex.l - copied unchanged from r232242, projects/jailconf/usr.sbin/jail/jaillex.l head/usr.sbin/jail/jailp.h - copied unchanged from r232242, projects/jailconf/usr.sbin/jail/jailp.h head/usr.sbin/jail/jailparse.y - copied unchanged from r232242, projects/jailconf/usr.sbin/jail/jailparse.y head/usr.sbin/jail/state.c - copied unchanged from r232242, projects/jailconf/usr.sbin/jail/state.c Modified: head/lib/libc/sys/jail.2 head/usr.sbin/jail/Makefile head/usr.sbin/jail/jail.8 head/usr.sbin/jail/jail.c Directory Properties: head/lib/libc/ (props changed) head/usr.sbin/jail/ (props changed) Modified: head/lib/libc/sys/jail.2 ============================================================================== --- head/lib/libc/sys/jail.2 Thu Apr 26 17:35:11 2012 (r234711) +++ head/lib/libc/sys/jail.2 Thu Apr 26 17:36:05 2012 (r234712) @@ -247,44 +247,6 @@ They return \-1 on failure, and set to indicate the error. .Pp .Rv -std jail_attach jail_remove -.Sh PRISON? -Once a process has been put in a prison, it and its descendants cannot escape -the prison. -.Pp -Inside the prison, the concept of -.Dq superuser -is very diluted. -In general, -it can be assumed that nothing can be mangled from inside a prison which -does not exist entirely inside that prison. -For instance the directory -tree below -.Dq Li path -can be manipulated all the ways a root can normally do it, including -.Dq Li "rm -rf /*" -but new device special nodes cannot be created because they reference -shared resources (the device drivers in the kernel). -The effective -.Dq securelevel -for a process is the greater of the global -.Dq securelevel -or, if present, the per-jail -.Dq securelevel . -.Pp -All IP activity will be forced to happen to/from the IP number specified, -which should be an alias on one of the network interfaces. -All connections to/from the loopback address -.Pf ( Li 127.0.0.1 -for IPv4, -.Li ::1 -for IPv6) will be changed to be to/from the primary address -of the jail for the given address family. -.Pp -It is possible to identify a process as jailed by examining -.Dq Li /proc//status : -it will show a field near the end of the line, either as -a single hyphen for a process at large, or the name currently -set for the prison for jailed processes. .Sh ERRORS The .Fn jail @@ -415,7 +377,7 @@ and .Fn jail_attach call .Xr chroot 2 -internally, so it can fail for all the same reasons. +internally, so they can fail for all the same reasons. Please consult the .Xr chroot 2 manual page for details. Modified: head/usr.sbin/jail/Makefile ============================================================================== --- head/usr.sbin/jail/Makefile Thu Apr 26 17:35:11 2012 (r234711) +++ head/usr.sbin/jail/Makefile Thu Apr 26 17:36:05 2012 (r234712) @@ -3,9 +3,14 @@ .include PROG= jail -MAN= jail.8 -DPADD= ${LIBJAIL} ${LIBUTIL} -LDADD= -ljail -lutil +MAN= jail.8 jail.conf.5 +SRCS= jail.c command.c config.c state.c jailp.h jaillex.l jailparse.y y.tab.h + +DPADD= ${LIBJAIL} ${LIBKVM} ${LIBUTIL} ${LIBL} +LDADD= -ljail -lkvm -lutil -ll + +YFLAGS+=-v +CFLAGS+=-I. -I${.CURDIR} .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 @@ -14,4 +19,6 @@ CFLAGS+= -DINET6 CFLAGS+= -DINET .endif +CLEANFILES= y.output + .include Copied: head/usr.sbin/jail/command.c (from r232242, projects/jailconf/usr.sbin/jail/command.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/jail/command.c Thu Apr 26 17:36:05 2012 (r234712, copy of r232242, projects/jailconf/usr.sbin/jail/command.c) @@ -0,0 +1,857 @@ +/*- + * Copyright (c) 2011 James Gritton + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "jailp.h" + +#define DEFAULT_STOP_TIMEOUT 10 +#define PHASH_SIZE 256 + +LIST_HEAD(phhead, phash); + +struct phash { + LIST_ENTRY(phash) le; + struct cfjail *j; + pid_t pid; +}; + +int paralimit = -1; + +extern char **environ; + +static int run_command(struct cfjail *j); +static void add_proc(struct cfjail *j, pid_t pid); +static void clear_procs(struct cfjail *j); +static struct cfjail *find_proc(pid_t pid); +static int term_procs(struct cfjail *j); +static int get_user_info(struct cfjail *j, const char *username, + const struct passwd **pwdp, login_cap_t **lcapp); +static int check_path(struct cfjail *j, const char *pname, const char *path, + int isfile, const char *umount_type); + +static struct cfjails sleeping = TAILQ_HEAD_INITIALIZER(sleeping); +static struct cfjails runnable = TAILQ_HEAD_INITIALIZER(runnable); +static struct cfstring dummystring = { .len = 1 }; +static struct phhead phash[PHASH_SIZE]; +static int kq; + +/* + * Run the next command associated with a jail. + */ +int +next_command(struct cfjail *j) +{ + enum intparam comparam; + int create_failed; + + if (paralimit == 0) { + requeue(j, &runnable); + return 1; + } + create_failed = (j->flags & (JF_STOP | JF_FAILED)) == JF_FAILED; + comparam = *j->comparam; + for (;;) { + if (j->comstring == NULL) { + j->comparam += create_failed ? -1 : 1; + switch ((comparam = *j->comparam)) { + case 0: + return 0; + case IP_MOUNT_DEVFS: + if (!bool_param(j->intparams[IP_MOUNT_DEVFS])) + continue; + /* FALLTHROUGH */ + case IP__OP: + case IP_STOP_TIMEOUT: + j->comstring = &dummystring; + break; + default: + if (j->intparams[comparam] == NULL) + continue; + j->comstring = create_failed + ? TAILQ_LAST(&j->intparams[comparam]->val, + cfstrings) + : TAILQ_FIRST(&j->intparams[comparam]->val); + } + } else { + j->comstring = j->comstring == &dummystring ? NULL : + create_failed + ? TAILQ_PREV(j->comstring, cfstrings, tq) + : TAILQ_NEXT(j->comstring, tq); + } + if (j->comstring == NULL || j->comstring->len == 0 || + (create_failed && (comparam == IP_EXEC_PRESTART || + comparam == IP_EXEC_START || comparam == IP_COMMAND || + comparam == IP_EXEC_POSTSTART))) + continue; + switch (run_command(j)) { + case -1: + failed(j); + /* FALLTHROUGH */ + case 1: + return 1; + } + } +} + +/* + * Check command exit status + */ +int +finish_command(struct cfjail *j) +{ + int error; + + if (!(j->flags & JF_SLEEPQ)) + return 0; + j->flags &= ~JF_SLEEPQ; + if (*j->comparam == IP_STOP_TIMEOUT) + { + j->flags &= ~JF_TIMEOUT; + j->pstatus = 0; + return 0; + } + paralimit++; + if (!TAILQ_EMPTY(&runnable)) + requeue(TAILQ_FIRST(&runnable), &ready); + error = 0; + if (j->flags & JF_TIMEOUT) { + j->flags &= ~JF_TIMEOUT; + if (*j->comparam != IP_STOP_TIMEOUT) { + jail_warnx(j, "%s: timed out", j->comline); + failed(j); + error = -1; + } else if (verbose > 0) + jail_note(j, "timed out\n"); + } else if (j->pstatus != 0) { + if (WIFSIGNALED(j->pstatus)) + jail_warnx(j, "%s: exited on signal %d", + j->comline, WTERMSIG(j->pstatus)); + else + jail_warnx(j, "%s: failed", j->comline); + j->pstatus = 0; + failed(j); + error = -1; + } + free(j->comline); + j->comline = NULL; + return error; +} + +/* + * Check for finished processes or timeouts. + */ +struct cfjail * +next_proc(int nonblock) +{ + struct kevent ke; + struct timespec ts; + struct timespec *tsp; + struct cfjail *j; + + if (!TAILQ_EMPTY(&sleeping)) { + again: + tsp = NULL; + if ((j = TAILQ_FIRST(&sleeping)) && j->timeout.tv_sec) { + clock_gettime(CLOCK_REALTIME, &ts); + ts.tv_sec = j->timeout.tv_sec - ts.tv_sec; + ts.tv_nsec = j->timeout.tv_nsec - ts.tv_nsec; + if (ts.tv_nsec < 0) { + ts.tv_sec--; + ts.tv_nsec += 1000000000; + } + if (ts.tv_sec < 0 || + (ts.tv_sec == 0 && ts.tv_nsec == 0)) { + j->flags |= JF_TIMEOUT; + clear_procs(j); + return j; + } + tsp = &ts; + } + if (nonblock) { + ts.tv_sec = 0; + ts.tv_nsec = 0; + tsp = &ts; + } + switch (kevent(kq, NULL, 0, &ke, 1, tsp)) { + case -1: + if (errno != EINTR) + err(1, "kevent"); + goto again; + case 0: + if (!nonblock) { + j = TAILQ_FIRST(&sleeping); + j->flags |= JF_TIMEOUT; + clear_procs(j); + return j; + } + break; + case 1: + (void)waitpid(ke.ident, NULL, WNOHANG); + if ((j = find_proc(ke.ident))) { + j->pstatus = ke.data; + return j; + } + goto again; + } + } + return NULL; +} + +/* + * Run a single command for a jail, possible inside the jail. + */ +int +run_command(struct cfjail *j) +{ + const struct passwd *pwd; + const struct cfstring *comstring, *s; + login_cap_t *lcap; + char **argv; + char *cs, *comcs, *devpath; + const char *jidstr, *conslog, *path, *ruleset, *term, *username; + enum intparam comparam; + size_t comlen; + pid_t pid; + int argc, bg, clean, consfd, down, fib, i, injail, sjuser, timeout; +#if defined(INET) || defined(INET6) + char *addr; +#endif + + static char *cleanenv; + + /* Perform some operations that aren't actually commands */ + comparam = *j->comparam; + down = j->flags & (JF_STOP | JF_FAILED); + switch (comparam) { + case IP_STOP_TIMEOUT: + return term_procs(j); + + case IP__OP: + if (down) { + if (jail_remove(j->jid) < 0 && errno == EPERM) { + jail_warnx(j, "jail_remove: %s", + strerror(errno)); + return -1; + } + if (verbose > 0 || (verbose == 0 && (j->flags & JF_STOP + ? note_remove : j->name != NULL))) + jail_note(j, "removed\n"); + j->jid = -1; + if (j->flags & JF_STOP) + dep_done(j, DF_LIGHT); + else + j->flags &= ~JF_PERSIST; + } else { + if (create_jail(j) < 0) + return -1; + if (verbose >= 0 && (j->name || verbose > 0)) + jail_note(j, "created\n"); + dep_done(j, DF_LIGHT); + } + return 0; + + default: ; + } + /* + * Collect exec arguments. Internal commands for network and + * mounting build their own argument lists. + */ + comstring = j->comstring; + bg = 0; + switch (comparam) { +#ifdef INET + case IP__IP4_IFADDR: + argv = alloca(8 * sizeof(char *)); + *(const char **)&argv[0] = _PATH_IFCONFIG; + if ((cs = strchr(comstring->s, '|'))) { + argv[1] = alloca(cs - comstring->s + 1); + strlcpy(argv[1], comstring->s, cs - comstring->s + 1); + addr = cs + 1; + } else { + *(const char **)&argv[1] = + string_param(j->intparams[IP_INTERFACE]); + addr = comstring->s; + } + *(const char **)&argv[2] = "inet"; + if (!(cs = strchr(addr, '/'))) { + argv[3] = addr; + *(const char **)&argv[4] = "netmask"; + *(const char **)&argv[5] = "255.255.255.255"; + argc = 6; + } else if (strchr(cs + 1, '.')) { + argv[3] = alloca(cs - addr + 1); + strlcpy(argv[3], addr, cs - addr + 1); + *(const char **)&argv[4] = "netmask"; + *(const char **)&argv[5] = cs + 1; + argc = 6; + } else { + argv[3] = addr; + argc = 4; + } + *(const char **)&argv[argc] = down ? "-alias" : "alias"; + argv[argc + 1] = NULL; + break; +#endif + +#ifdef INET6 + case IP__IP6_IFADDR: + argv = alloca(8 * sizeof(char *)); + *(const char **)&argv[0] = _PATH_IFCONFIG; + if ((cs = strchr(comstring->s, '|'))) { + argv[1] = alloca(cs - comstring->s + 1); + strlcpy(argv[1], comstring->s, cs - comstring->s + 1); + addr = cs + 1; + } else { + *(const char **)&argv[1] = + string_param(j->intparams[IP_INTERFACE]); + addr = comstring->s; + } + *(const char **)&argv[2] = "inet6"; + argv[3] = addr; + if (!(cs = strchr(addr, '/'))) { + *(const char **)&argv[4] = "prefixlen"; + *(const char **)&argv[5] = "128"; + argc = 6; + } else + argc = 4; + *(const char **)&argv[argc] = down ? "-alias" : "alias"; + argv[argc + 1] = NULL; + break; +#endif + + case IP_VNET_INTERFACE: + argv = alloca(5 * sizeof(char *)); + *(const char **)&argv[0] = _PATH_IFCONFIG; + argv[1] = comstring->s; + *(const char **)&argv[2] = down ? "-vnet" : "vnet"; + jidstr = string_param(j->intparams[KP_JID]); + *(const char **)&argv[3] = + jidstr ? jidstr : string_param(j->intparams[KP_NAME]); + argv[4] = NULL; + break; + + case IP_MOUNT: + case IP__MOUNT_FROM_FSTAB: + argv = alloca(8 * sizeof(char *)); + comcs = alloca(comstring->len + 1); + strcpy(comcs, comstring->s); + argc = 0; + for (cs = strtok(comcs, " \t\f\v\r\n"); cs && argc < 4; + cs = strtok(NULL, " \t\f\v\r\n")) + argv[argc++] = cs; + if (argc == 0) + return 0; + if (argc < 3) { + jail_warnx(j, "%s: %s: missing information", + j->intparams[comparam]->name, comstring->s); + return -1; + } + if (check_path(j, j->intparams[comparam]->name, argv[1], 0, + down ? argv[2] : NULL) < 0) + return -1; + if (down) { + argv[4] = NULL; + argv[3] = argv[1]; + *(const char **)&argv[0] = "/sbin/umount"; + } else { + if (argc == 4) { + argv[7] = NULL; + argv[6] = argv[1]; + argv[5] = argv[0]; + argv[4] = argv[3]; + *(const char **)&argv[3] = "-o"; + } else { + argv[5] = NULL; + argv[4] = argv[1]; + argv[3] = argv[0]; + } + *(const char **)&argv[0] = _PATH_MOUNT; + } + *(const char **)&argv[1] = "-t"; + break; + + case IP_MOUNT_DEVFS: + argv = alloca(7 * sizeof(char *)); + path = string_param(j->intparams[KP_PATH]); + if (path == NULL) { + jail_warnx(j, "mount.devfs: no path"); + return -1; + } + devpath = alloca(strlen(path) + 5); + sprintf(devpath, "%s/dev", path); + if (check_path(j, "mount.devfs", devpath, 0, + down ? "devfs" : NULL) < 0) + return -1; + if (down) { + *(const char **)&argv[0] = "/sbin/umount"; + argv[1] = devpath; + argv[2] = NULL; + } else { + *(const char **)&argv[0] = _PATH_MOUNT; + *(const char **)&argv[1] = "-t"; + *(const char **)&argv[2] = "devfs"; + ruleset = string_param(j->intparams[KP_DEVFS_RULESET]); + if (!ruleset) + ruleset = "4"; /* devfsrules_jail */ + argv[3] = alloca(11 + strlen(ruleset)); + sprintf(argv[3], "-oruleset=%s", ruleset); + *(const char **)&argv[4] = "."; + argv[5] = devpath; + argv[6] = NULL; + } + break; + + case IP_COMMAND: + if (j->name != NULL) + goto default_command; + argc = 0; + TAILQ_FOREACH(s, &j->intparams[IP_COMMAND]->val, tq) + argc++; + argv = alloca((argc + 1) * sizeof(char *)); + argc = 0; + TAILQ_FOREACH(s, &j->intparams[IP_COMMAND]->val, tq) + argv[argc++] = s->s; + argv[argc] = NULL; + j->comstring = &dummystring; + break; + + default: + default_command: + if ((cs = strpbrk(comstring->s, "!\"$&'()*;<>?[\\]`{|}~")) && + !(cs[0] == '&' && cs[1] == '\0')) { + argv = alloca(4 * sizeof(char *)); + *(const char **)&argv[0] = _PATH_BSHELL; + *(const char **)&argv[1] = "-c"; + argv[2] = comstring->s; + argv[3] = NULL; + } else { + if (cs) { + *cs = 0; + bg = 1; + } + comcs = alloca(comstring->len + 1); + strcpy(comcs, comstring->s); + argc = 0; + for (cs = strtok(comcs, " \t\f\v\r\n"); cs; + cs = strtok(NULL, " \t\f\v\r\n")) + argc++; + argv = alloca((argc + 1) * sizeof(char *)); + strcpy(comcs, comstring->s); + argc = 0; + for (cs = strtok(comcs, " \t\f\v\r\n"); cs; + cs = strtok(NULL, " \t\f\v\r\n")) + argv[argc++] = cs; + argv[argc] = NULL; + } + } + if (argv[0] == NULL) + return 0; + + if (int_param(j->intparams[IP_EXEC_TIMEOUT], &timeout) && + timeout != 0) { + clock_gettime(CLOCK_REALTIME, &j->timeout); + j->timeout.tv_sec += timeout; + } else + j->timeout.tv_sec = 0; + + injail = comparam == IP_EXEC_START || comparam == IP_COMMAND || + comparam == IP_EXEC_STOP; + clean = bool_param(j->intparams[IP_EXEC_CLEAN]); + username = string_param(j->intparams[injail + ? IP_EXEC_JAIL_USER : IP_EXEC_SYSTEM_USER]); + sjuser = bool_param(j->intparams[IP_EXEC_SYSTEM_JAIL_USER]); + + consfd = 0; + if (injail && + (conslog = string_param(j->intparams[IP_EXEC_CONSOLELOG]))) { + if (check_path(j, "exec.consolelog", conslog, 1, NULL) < 0) + return -1; + consfd = + open(conslog, O_WRONLY | O_CREAT | O_APPEND, DEFFILEMODE); + if (consfd < 0) { + jail_warnx(j, "open %s: %s", conslog, strerror(errno)); + return -1; + } + } + + comlen = 0; + for (i = 0; argv[i]; i++) + comlen += strlen(argv[i]) + 1; + j->comline = cs = emalloc(comlen); + for (i = 0; argv[i]; i++) { + strcpy(cs, argv[i]); + if (argv[i + 1]) { + cs += strlen(argv[i]) + 1; + cs[-1] = ' '; + } + } + if (verbose > 0) + jail_note(j, "run command%s%s%s: %s\n", + injail ? " in jail" : "", username ? " as " : "", + username ? username : "", j->comline); + + pid = fork(); + if (pid < 0) + err(1, "fork"); + if (pid > 0) { + if (bg) { + free(j->comline); + j->comline = NULL; + return 0; + } else { + paralimit--; + add_proc(j, pid); + return 1; + } + } + if (bg) + setsid(); + + /* Set up the environment and run the command */ + pwd = NULL; + lcap = NULL; + if ((clean || username) && injail && sjuser && + get_user_info(j, username, &pwd, &lcap) < 0) + exit(1); + if (injail) { + /* jail_attach won't chdir along with its chroot. */ + path = string_param(j->intparams[KP_PATH]); + if (path && chdir(path) < 0) { + jail_warnx(j, "chdir %s: %s", path, strerror(errno)); + exit(1); + } + if (int_param(j->intparams[IP_EXEC_FIB], &fib) && + setfib(fib) < 0) { + jail_warnx(j, "setfib: %s", strerror(errno)); + exit(1); + } + if (jail_attach(j->jid) < 0) { + jail_warnx(j, "jail_attach: %s", strerror(errno)); + exit(1); + } + } + if (clean || username) { + if (!(injail && sjuser) && + get_user_info(j, username, &pwd, &lcap) < 0) + exit(1); + if (clean) { + term = getenv("TERM"); + environ = &cleanenv; + setenv("PATH", "/bin:/usr/bin", 0); + setenv("TERM", term, 1); + } + if (setusercontext(lcap, pwd, pwd->pw_uid, username + ? LOGIN_SETALL & ~LOGIN_SETGROUP & ~LOGIN_SETLOGIN + : LOGIN_SETPATH | LOGIN_SETENV) < 0) { + jail_warnx(j, "setusercontext %s: %s", pwd->pw_name, + strerror(errno)); + exit(1); + } + login_close(lcap); + setenv("USER", pwd->pw_name, 1); + setenv("HOME", pwd->pw_dir, 1); + setenv("SHELL", + *pwd->pw_shell ? pwd->pw_shell : _PATH_BSHELL, 1); + if (clean && chdir(pwd->pw_dir) < 0) { + jail_warnx(j, "chdir %s: %s", + pwd->pw_dir, strerror(errno)); + exit(1); + } + endpwent(); + } + + if (consfd != 0 && (dup2(consfd, 1) < 0 || dup2(consfd, 2) < 0)) { + jail_warnx(j, "exec.consolelog: %s", strerror(errno)); + exit(1); + } + closefrom(3); + execvp(argv[0], argv); + jail_warnx(j, "exec %s: %s", argv[0], strerror(errno)); + exit(1); +} + +/* + * Add a process to the hash, tied to a jail. + */ +static void +add_proc(struct cfjail *j, pid_t pid) +{ + struct kevent ke; + struct cfjail *tj; + struct phash *ph; + + if (!kq && (kq = kqueue()) < 0) + err(1, "kqueue"); + EV_SET(&ke, pid, EVFILT_PROC, EV_ADD, NOTE_EXIT, 0, NULL); + if (kevent(kq, &ke, 1, NULL, 0, NULL) < 0) + err(1, "kevent"); + ph = emalloc(sizeof(struct phash)); + ph->j = j; + ph->pid = pid; + LIST_INSERT_HEAD(&phash[pid % PHASH_SIZE], ph, le); + j->nprocs++; + j->flags |= JF_SLEEPQ; + if (j->timeout.tv_sec == 0) + requeue(j, &sleeping); + else { + /* File the jail in the sleep queue acording to its timeout. */ + TAILQ_REMOVE(j->queue, j, tq); + TAILQ_FOREACH(tj, &sleeping, tq) { + if (!tj->timeout.tv_sec || + j->timeout.tv_sec < tj->timeout.tv_sec || + (j->timeout.tv_sec == tj->timeout.tv_sec && + j->timeout.tv_nsec <= tj->timeout.tv_nsec)) { + TAILQ_INSERT_BEFORE(tj, j, tq); + break; + } + } + if (tj == NULL) + TAILQ_INSERT_TAIL(&sleeping, j, tq); + j->queue = &sleeping; + } +} + +/* + * Remove any processes from the hash that correspond to a jail. + */ +static void +clear_procs(struct cfjail *j) +{ + struct kevent ke; + struct phash *ph, *tph; + int i; + + j->nprocs = 0; + for (i = 0; i < PHASH_SIZE; i++) + LIST_FOREACH_SAFE(ph, &phash[i], le, tph) + if (ph->j == j) { + EV_SET(&ke, ph->pid, EVFILT_PROC, EV_DELETE, + NOTE_EXIT, 0, NULL); + (void)kevent(kq, &ke, 1, NULL, 0, NULL); + LIST_REMOVE(ph, le); + free(ph); + } +} + +/* + * Find the jail that corresponds to an exited process. + */ +static struct cfjail * +find_proc(pid_t pid) +{ + struct cfjail *j; + struct phash *ph; + + LIST_FOREACH(ph, &phash[pid % PHASH_SIZE], le) + if (ph->pid == pid) { + j = ph->j; + LIST_REMOVE(ph, le); + free(ph); + return --j->nprocs ? NULL : j; + } + return NULL; +} + +/* + * Send SIGTERM to all processes in a jail and wait for them to die. + */ +static int +term_procs(struct cfjail *j) +{ + struct kinfo_proc *ki; + int i, noted, pcnt, timeout; + + static kvm_t *kd; + + if (!int_param(j->intparams[IP_STOP_TIMEOUT], &timeout)) + timeout = DEFAULT_STOP_TIMEOUT; + else if (timeout == 0) + return 0; + + if (kd == NULL) { + kd = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL); + if (kd == NULL) + return 0; + } + + ki = kvm_getprocs(kd, KERN_PROC_PROC, 0, &pcnt); + if (ki == NULL) + return 0; + noted = 0; + for (i = 0; i < pcnt; i++) + if (ki[i].ki_jid == j->jid && + kill(ki[i].ki_pid, SIGTERM) == 0) { + add_proc(j, ki[i].ki_pid); + if (verbose > 0) { + if (!noted) { + noted = 1; + jail_note(j, "sent SIGTERM to:"); + } + printf(" %d", ki[i].ki_pid); + } + } + if (noted) + printf("\n"); + if (j->nprocs > 0) { + clock_gettime(CLOCK_REALTIME, &j->timeout); + j->timeout.tv_sec += timeout; + return 1; + } + return 0; +} + +/* + * Look up a user in the passwd and login.conf files. + */ +static int +get_user_info(struct cfjail *j, const char *username, + const struct passwd **pwdp, login_cap_t **lcapp) +{ + const struct passwd *pwd; + + *pwdp = pwd = username ? getpwnam(username) : getpwuid(getuid()); + if (pwd == NULL) { + if (errno) + jail_warnx(j, "getpwnam%s%s: %s", username ? " " : "", + username ? username : "", strerror(errno)); + else if (username) + jail_warnx(j, "%s: no such user", username); + else + jail_warnx(j, "unknown uid %d", getuid()); + return -1; + } + *lcapp = login_getpwclass(pwd); + if (*lcapp == NULL) { + jail_warnx(j, "getpwclass %s: %s", pwd->pw_name, + strerror(errno)); + return -1; + } + /* Set the groups while the group file is still available */ + if (initgroups(pwd->pw_name, pwd->pw_gid) < 0) { + jail_warnx(j, "initgroups %s: %s", pwd->pw_name, + strerror(errno)); + return -1; + } + return 0; +} + +/* + * Make sure a mount or consolelog path is a valid absolute pathname + * with no symlinks. + */ +static int +check_path(struct cfjail *j, const char *pname, const char *path, int isfile, + const char *umount_type) +{ + struct stat st, mpst; + struct statfs stfs; + char *tpath, *p; + const char *jailpath; + size_t jplen; + + if (path[0] != '/') { + jail_warnx(j, "%s: %s: not an absolute pathname", + pname, path); + return -1; + } + /* + * Only check for symlinks in components below the jail's path, + * since that's where the security risk lies. + */ + jailpath = string_param(j->intparams[KP_PATH]); + if (jailpath == NULL) + jailpath = ""; + jplen = strlen(jailpath); + if (!strncmp(path, jailpath, jplen) && path[jplen] == '/') { + tpath = alloca(strlen(path) + 1); + strcpy(tpath, path); + for (p = tpath + jplen; p != NULL; ) { + p = strchr(p + 1, '/'); + if (p) + *p = '\0'; + if (lstat(tpath, &st) < 0) { + if (errno == ENOENT && isfile && !p) + break; + jail_warnx(j, "%s: %s: %s", pname, tpath, + strerror(errno)); + return -1; + } + if (S_ISLNK(st.st_mode)) { + jail_warnx(j, "%s: %s is a symbolic link", + pname, tpath); + return -1; + } + if (p) + *p = '/'; + } + } + if (umount_type != NULL) { + if (stat(path, &st) < 0 || statfs(path, &stfs) < 0) { + jail_warnx(j, "%s: %s: %s", pname, path, + strerror(errno)); + return -1; + } + if (stat(stfs.f_mntonname, &mpst) < 0) { + jail_warnx(j, "%s: %s: %s", pname, stfs.f_mntonname, + strerror(errno)); + return -1; + } + if (st.st_ino != mpst.st_ino) { + jail_warnx(j, "%s: %s: not a mount point", + pname, path); + return -1; + } + if (strcmp(stfs.f_fstypename, umount_type)) { + jail_warnx(j, "%s: %s: not a %s mount", + pname, path, umount_type); + return -1; + } + } + return 0; +} Copied: head/usr.sbin/jail/config.c (from r232242, projects/jailconf/usr.sbin/jail/config.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/jail/config.c Thu Apr 26 17:36:05 2012 (r234712, copy of r232242, projects/jailconf/usr.sbin/jail/config.c) @@ -0,0 +1,831 @@ +/*- + * Copyright (c) 2011 James Gritton + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "jailp.h" + +struct ipspec { + const char *name; + unsigned flags; +}; + +extern FILE *yyin; +extern int yynerrs; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 18:16:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A926C106566C; Thu, 26 Apr 2012 18:16:44 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92C598FC12; Thu, 26 Apr 2012 18:16:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QIGiN8061643; Thu, 26 Apr 2012 18:16:44 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QIGi6D061640; Thu, 26 Apr 2012 18:16:44 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201204261816.q3QIGi6D061640@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 26 Apr 2012 18:16:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234713 - in stable/9: share/man/man4 sys/dev/atkbdc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 18:16:44 -0000 Author: jkim Date: Thu Apr 26 18:16:44 2012 New Revision: 234713 URL: http://svn.freebsd.org/changeset/base/234713 Log: MFC: r233580 - Do not clobber softc when psm(4) is reintialized. - Make INITAFTERSUSPEND flag independent of HOOKRESUME flag. - Automatically set INITAFTERSUSPEND flag when ALPS GlidePoint is detected. - Always probe Synaptics Touchpad. Allow MOUSE_SYN_GETHWINFO ioctl and automatically set INITAFTERSUSPEND flag when a supported device is detected, regardless of "hw.psm.synaptics_support" tunable setting. - Update psm(4) to reflect the above changes. - Remove long-time defunct SYNCHACK flag while I am in the neighborhood. Modified: stable/9/share/man/man4/psm.4 stable/9/sys/dev/atkbdc/psm.c Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/share/man/man4/psm.4 ============================================================================== --- stable/9/share/man/man4/psm.4 Thu Apr 26 17:36:05 2012 (r234712) +++ stable/9/share/man/man4/psm.4 Thu Apr 26 18:16:44 2012 (r234713) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 8, 2008 +.Dd March 27, 2012 .Dt PSM 4 .Os .Sh NAME @@ -329,9 +329,6 @@ It will cause the .Nm driver to reset and re-initialize the pointing device after the `resume' event. -It has no effect unless the -.Em HOOKRESUME -flag is set as well. .El .Sh LOADER TUNABLES Extended support for Synaptics touchpads can be enabled by setting @@ -445,10 +442,8 @@ Microsoft IntelliMouse .El .Pp .It Dv MOUSE_SYN_GETHWINFO Ar synapticshw_t *synhw -Retrieves extra information associated with Synaptics Touchpads. -Only available when -.Va hw.psm.synaptics_support -has been enabled. +Retrieves extra information associated with Synaptics Touchpad. +Only available when a supported device has been detected. .Bd -literal typedef struct synapticshw { int infoMajor; /* major hardware revision */ @@ -837,12 +832,11 @@ In contrast, some pad products, e.g.\& s and Interlink VersaPad, treat the tapping action as fourth button events. .Pp -It is reported that Interlink VersaPad requires both -.Em HOOKRESUME -and +It is reported that ALPS GlidePoint, Synaptics Touchpad, and +Interlink VersaPad require .Em INITAFTERSUSPEND -flags in order to recover from suspended state. -These flags are automatically set when VersaPad is detected by the +flag in order to recover from suspended state. +This flag is automatically set when one of these devices is detected by the .Nm driver. .Pp Modified: stable/9/sys/dev/atkbdc/psm.c ============================================================================== --- stable/9/sys/dev/atkbdc/psm.c Thu Apr 26 17:36:05 2012 (r234712) +++ stable/9/sys/dev/atkbdc/psm.c Thu Apr 26 18:16:44 2012 (r234713) @@ -318,13 +318,11 @@ static devclass_t psm_devclass; #define PSM_CONFIG_IGNPORTERROR 0x1000 /* ignore error in aux port test */ #define PSM_CONFIG_HOOKRESUME 0x2000 /* hook the system resume event */ #define PSM_CONFIG_INITAFTERSUSPEND 0x4000 /* init the device at the resume event */ -#define PSM_CONFIG_SYNCHACK 0x8000 /* enable `out-of-sync' hack */ #define PSM_CONFIG_FLAGS \ (PSM_CONFIG_RESOLUTION | \ PSM_CONFIG_ACCEL | \ PSM_CONFIG_NOCHECKSYNC | \ - PSM_CONFIG_SYNCHACK | \ PSM_CONFIG_NOIDPROBE | \ PSM_CONFIG_NORESET | \ PSM_CONFIG_FORCETAP | \ @@ -415,7 +413,7 @@ static int tame_mouse(struct psm_softc * u_char *); /* vendor specific features */ -typedef int probefunc_t(struct psm_softc *); +typedef int probefunc_t(KBDC, struct psm_softc *); static int mouse_id_proc1(KBDC, int, int, int *); static int mouse_ext_command(KBDC, int); @@ -822,24 +820,10 @@ doinitialize(struct psm_softc *sc, mouse } empty_both_buffers(kbdc, 10); /* remove stray data if any */ - if (sc->config & PSM_CONFIG_NOIDPROBE) - i = GENERIC_MOUSE_ENTRY; - else { - /* FIXME: hardware ID, mouse buttons? */ - - /* other parameters */ - for (i = 0; vendortype[i].probefunc != NULL; ++i) - if ((*vendortype[i].probefunc)(sc)) { - if (verbose >= 2) - log(LOG_ERR, "psm%d: found %s\n", - sc->unit, - model_name(vendortype[i].model)); - break; - } - } - - sc->hw.model = vendortype[i].model; - sc->mode.packetsize = vendortype[i].packetsize; + /* Re-enable the mouse. */ + for (i = 0; vendortype[i].probefunc != NULL; ++i) + if (vendortype[i].model == sc->hw.model) + (*vendortype[i].probefunc)(sc->kbdc, NULL); /* set mouse parameters */ if (mode != (mousemode_t *)NULL) { @@ -1149,7 +1133,7 @@ psmprobe(device_t dev) #if defined(PSM_HOOKRESUME) || defined(PSM_HOOKAPM) sc->config |= #ifdef PSM_RESETAFTERSUSPEND - PSM_CONFIG_HOOKRESUME | PSM_CONFIG_INITAFTERSUSPEND; + PSM_CONFIG_INITAFTERSUSPEND; #else PSM_CONFIG_HOOKRESUME; #endif @@ -1338,7 +1322,7 @@ psmprobe(device_t dev) /* other parameters */ for (i = 0; vendortype[i].probefunc != NULL; ++i) - if ((*vendortype[i].probefunc)(sc)) { + if ((*vendortype[i].probefunc)(sc->kbdc, sc)) { if (verbose >= 2) printf("psm%d: found %s\n", unit, model_name(vendortype[i].model)); @@ -1454,6 +1438,19 @@ psmattach(device_t dev) sc->bdev = make_dev(&psm_cdevsw, 0, 0, 0, 0666, "bpsm%d", unit); sc->bdev->si_drv1 = sc; + /* Some touchpad devices need full reinitialization after suspend. */ + switch (sc->hw.model) { + case MOUSE_MODEL_SYNAPTICS: + case MOUSE_MODEL_GLIDEPOINT: + case MOUSE_MODEL_VERSAPAD: + sc->config |= PSM_CONFIG_INITAFTERSUSPEND; + break; + default: + if (sc->synhw.infoMajor >= 4) + sc->config |= PSM_CONFIG_INITAFTERSUSPEND; + break; + } + if (!verbose) printf("psm%d: model %s, device ID %d\n", unit, model_name(sc->hw.model), sc->hw.hwid & 0x00ff); @@ -1952,7 +1949,7 @@ psmioctl(struct cdev *dev, u_long cmd, c case MOUSE_SYN_GETHWINFO: s = spltty(); - if (synaptics_support && sc->hw.model == MOUSE_MODEL_SYNAPTICS) + if (sc->synhw.infoMajor >= 4) *(synapticshw_t *)addr = sc->synhw; else error = EINVAL; @@ -3566,12 +3563,12 @@ mouse_ext_command(KBDC kbdc, int command #ifdef notyet /* Logitech MouseMan Cordless II */ static int -enable_lcordless(struct psm_softc *sc) +enable_lcordless(KDBC kbdc, struct psm_softc *sc) { int status[3]; int ch; - if (!mouse_id_proc1(sc->kbdc, PSMD_RES_HIGH, 2, status)) + if (!mouse_id_proc1(kbdc, PSMD_RES_HIGH, 2, status)) return (FALSE); if (status[1] == PSMD_RES_HIGH) return (FALSE); @@ -3588,7 +3585,7 @@ enable_lcordless(struct psm_softc *sc) /* Genius NetScroll Mouse, MouseSystems SmartScroll Mouse */ static int -enable_groller(struct psm_softc *sc) +enable_groller(KBDC kbdc, struct psm_softc *sc) { int status[3]; @@ -3613,18 +3610,19 @@ enable_groller(struct psm_softc *sc) * byte 3 report rate (?) */ - if (!mouse_id_proc1(sc->kbdc, PSMD_RES_HIGH, 1, status)) + if (!mouse_id_proc1(kbdc, PSMD_RES_HIGH, 1, status)) return (FALSE); if ((status[1] != '3') || (status[2] != 'D')) return (FALSE); /* FIXME: SmartScroll Mouse has 5 buttons! XXX */ - sc->hw.buttons = 4; + if (sc != NULL) + sc->hw.buttons = 4; return (TRUE); } /* Genius NetMouse/NetMouse Pro, ASCII Mie Mouse, NetScroll Optical */ static int -enable_gmouse(struct psm_softc *sc) +enable_gmouse(KBDC kbdc, struct psm_softc *sc) { int status[3]; @@ -3638,7 +3636,7 @@ enable_gmouse(struct psm_softc *sc) * say they have three buttons too and they do have a button on the * side... */ - if (!mouse_id_proc1(sc->kbdc, PSMD_RES_HIGH, 1, status)) + if (!mouse_id_proc1(kbdc, PSMD_RES_HIGH, 1, status)) return (FALSE); if ((status[1] != '3') || (status[2] != 'U')) return (FALSE); @@ -3647,7 +3645,7 @@ enable_gmouse(struct psm_softc *sc) /* ALPS GlidePoint */ static int -enable_aglide(struct psm_softc *sc) +enable_aglide(KBDC kbdc, struct psm_softc *sc) { int status[3]; @@ -3658,9 +3656,9 @@ enable_aglide(struct psm_softc *sc) * NOTE: ALPS produces several models of GlidePoint. Some of those * do not respond to this sequence, thus, cannot be detected this way. */ - if (set_mouse_sampling_rate(sc->kbdc, 100) != 100) + if (set_mouse_sampling_rate(kbdc, 100) != 100) return (FALSE); - if (!mouse_id_proc1(sc->kbdc, PSMD_RES_LOW, 2, status)) + if (!mouse_id_proc1(kbdc, PSMD_RES_LOW, 2, status)) return (FALSE); if ((status[1] == PSMD_RES_LOW) || (status[2] == 100)) return (FALSE); @@ -3669,10 +3667,9 @@ enable_aglide(struct psm_softc *sc) /* Kensington ThinkingMouse/Trackball */ static int -enable_kmouse(struct psm_softc *sc) +enable_kmouse(KBDC kbdc, struct psm_softc *sc) { static u_char rate[] = { 20, 60, 40, 20, 20, 60, 40, 20, 20 }; - KBDC kbdc = sc->kbdc; int status[3]; int id1; int id2; @@ -3723,9 +3720,8 @@ enable_kmouse(struct psm_softc *sc) /* Logitech MouseMan+/FirstMouse+, IBM ScrollPoint Mouse */ static int -enable_mmanplus(struct psm_softc *sc) +enable_mmanplus(KBDC kbdc, struct psm_softc *sc) { - KBDC kbdc = sc->kbdc; int data[3]; /* the special sequence to enable the fourth button and the roller. */ @@ -3766,8 +3762,10 @@ enable_mmanplus(struct psm_softc *sc) if (MOUSE_PS2PLUS_PACKET_TYPE(data) != 0) return (FALSE); - sc->hw.hwid &= 0x00ff; - sc->hw.hwid |= data[2] << 8; /* save model ID */ + if (sc != NULL) { + sc->hw.hwid &= 0x00ff; + sc->hw.hwid |= data[2] << 8; /* save model ID */ + } /* * MouseMan+ (or FirstMouse+) is now in its native mode, in which @@ -3780,11 +3778,10 @@ enable_mmanplus(struct psm_softc *sc) /* MS IntelliMouse Explorer */ static int -enable_msexplorer(struct psm_softc *sc) +enable_msexplorer(KBDC kbdc, struct psm_softc *sc) { static u_char rate0[] = { 200, 100, 80, }; static u_char rate1[] = { 200, 200, 80, }; - KBDC kbdc = sc->kbdc; int id; int i; @@ -3793,7 +3790,7 @@ enable_msexplorer(struct psm_softc *sc) * straight to Explorer mode, but need to be set to Intelli mode * first. */ - enable_msintelli(sc); + enable_msintelli(kbdc, sc); /* the special sequence to enable the extra buttons and the roller. */ for (i = 0; i < sizeof(rate1)/sizeof(rate1[0]); ++i) @@ -3804,8 +3801,10 @@ enable_msexplorer(struct psm_softc *sc) if (id != PSM_EXPLORER_ID) return (FALSE); - sc->hw.hwid = id; - sc->hw.buttons = 5; /* IntelliMouse Explorer XXX */ + if (sc != NULL) { + sc->hw.buttons = 5; /* IntelliMouse Explorer XXX */ + sc->hw.hwid = id; + } /* * XXX: this is a kludge to fool some KVM switch products @@ -3820,14 +3819,14 @@ enable_msexplorer(struct psm_softc *sc) for (i = 0; i < sizeof(rate0)/sizeof(rate0[0]); ++i) if (set_mouse_sampling_rate(kbdc, rate0[i]) != rate0[i]) break; - id = get_aux_id(kbdc); + get_aux_id(kbdc); return (TRUE); } /* MS IntelliMouse */ static int -enable_msintelli(struct psm_softc *sc) +enable_msintelli(KBDC kbdc, struct psm_softc *sc) { /* * Logitech MouseMan+ and FirstMouse+ will also respond to this @@ -3835,7 +3834,6 @@ enable_msintelli(struct psm_softc *sc) */ static u_char rate[] = { 200, 100, 80, }; - KBDC kbdc = sc->kbdc; int id; int i; @@ -3848,22 +3846,23 @@ enable_msintelli(struct psm_softc *sc) if (id != PSM_INTELLI_ID) return (FALSE); - sc->hw.hwid = id; - sc->hw.buttons = 3; + if (sc != NULL) { + sc->hw.buttons = 3; + sc->hw.hwid = id; + } return (TRUE); } /* A4 Tech 4D Mouse */ static int -enable_4dmouse(struct psm_softc *sc) +enable_4dmouse(KBDC kbdc, struct psm_softc *sc) { /* * Newer wheel mice from A4 Tech may use the 4D+ protocol. */ static u_char rate[] = { 200, 100, 80, 60, 40, 20 }; - KBDC kbdc = sc->kbdc; int id; int i; @@ -3879,21 +3878,22 @@ enable_4dmouse(struct psm_softc *sc) if (id != PSM_4DMOUSE_ID) return (FALSE); - sc->hw.hwid = id; - sc->hw.buttons = 3; /* XXX some 4D mice have 4? */ + if (sc != NULL) { + sc->hw.buttons = 3; /* XXX some 4D mice have 4? */ + sc->hw.hwid = id; + } return (TRUE); } /* A4 Tech 4D+ Mouse */ static int -enable_4dplus(struct psm_softc *sc) +enable_4dplus(KBDC kbdc, struct psm_softc *sc) { /* * Newer wheel mice from A4 Tech seem to use this protocol. * Older models are recognized as either 4D Mouse or IntelliMouse. */ - KBDC kbdc = sc->kbdc; int id; /* @@ -3909,16 +3909,17 @@ enable_4dplus(struct psm_softc *sc) id = get_aux_id(kbdc); switch (id) { case PSM_4DPLUS_ID: - sc->hw.buttons = 4; break; case PSM_4DPLUS_RFSW35_ID: - sc->hw.buttons = 3; break; default: return (FALSE); } - sc->hw.hwid = id; + if (sc != NULL) { + sc->hw.buttons = (id == PSM_4DPLUS_ID) ? 4 : 3; + sc->hw.hwid = id; + } return (TRUE); } @@ -4307,18 +4308,13 @@ synaptics_sysctl_create_tree(struct psm_ } static int -enable_synaptics(struct psm_softc *sc) +enable_synaptics(KBDC kbdc, struct psm_softc *sc) { + synapticshw_t synhw; int status[3]; - KBDC kbdc; + int buttons; - if (!synaptics_support) - return (FALSE); - - kbdc = sc->kbdc; VLOG(3, (LOG_DEBUG, "synaptics: BEGIN init\n")); - sc->hw.buttons = 3; - sc->squelch = 0; /* * Just to be on the safe side: this avoids troubles with @@ -4336,14 +4332,15 @@ enable_synaptics(struct psm_softc *sc) if (status[1] != 0x47) return (FALSE); - sc->synhw.infoMinor = status[0]; - sc->synhw.infoMajor = status[2] & 0x0f; + bzero(&synhw, sizeof(synhw)); + synhw.infoMinor = status[0]; + synhw.infoMajor = status[2] & 0x0f; if (verbose >= 2) - printf("Synaptics Touchpad v%d.%d\n", sc->synhw.infoMajor, - sc->synhw.infoMinor); + printf("Synaptics Touchpad v%d.%d\n", synhw.infoMajor, + synhw.infoMinor); - if (sc->synhw.infoMajor < 4) { + if (synhw.infoMajor < 4) { printf(" Unsupported (pre-v4) Touchpad detected\n"); return (FALSE); } @@ -4358,25 +4355,25 @@ enable_synaptics(struct psm_softc *sc) return (FALSE); } - sc->synhw.infoRot180 = (status[0] & 0x80) >> 7; - sc->synhw.infoPortrait = (status[0] & 0x40) >> 6; - sc->synhw.infoSensor = status[0] & 0x3f; - sc->synhw.infoHardware = (status[1] & 0xfe) >> 1; - sc->synhw.infoNewAbs = (status[2] & 0x80) >> 7; - sc->synhw.capPen = (status[2] & 0x40) >> 6; - sc->synhw.infoSimplC = (status[2] & 0x20) >> 5; - sc->synhw.infoGeometry = status[2] & 0x0f; + synhw.infoRot180 = (status[0] & 0x80) != 0; + synhw.infoPortrait = (status[0] & 0x40) != 0; + synhw.infoSensor = status[0] & 0x3f; + synhw.infoHardware = (status[1] & 0xfe) >> 1; + synhw.infoNewAbs = (status[2] & 0x80) != 0; + synhw.capPen = (status[2] & 0x40) != 0; + synhw.infoSimplC = (status[2] & 0x20) != 0; + synhw.infoGeometry = status[2] & 0x0f; if (verbose >= 2) { printf(" Model information:\n"); - printf(" infoRot180: %d\n", sc->synhw.infoRot180); - printf(" infoPortrait: %d\n", sc->synhw.infoPortrait); - printf(" infoSensor: %d\n", sc->synhw.infoSensor); - printf(" infoHardware: %d\n", sc->synhw.infoHardware); - printf(" infoNewAbs: %d\n", sc->synhw.infoNewAbs); - printf(" capPen: %d\n", sc->synhw.capPen); - printf(" infoSimplC: %d\n", sc->synhw.infoSimplC); - printf(" infoGeometry: %d\n", sc->synhw.infoGeometry); + printf(" infoRot180: %d\n", synhw.infoRot180); + printf(" infoPortrait: %d\n", synhw.infoPortrait); + printf(" infoSensor: %d\n", synhw.infoSensor); + printf(" infoHardware: %d\n", synhw.infoHardware); + printf(" infoNewAbs: %d\n", synhw.infoNewAbs); + printf(" capPen: %d\n", synhw.capPen); + printf(" infoSimplC: %d\n", synhw.infoSimplC); + printf(" infoGeometry: %d\n", synhw.infoGeometry); } /* Read the extended capability bits. */ @@ -4390,46 +4387,42 @@ enable_synaptics(struct psm_softc *sc) } /* Set the different capabilities when they exist. */ - if ((status[0] & 0x80) >> 7) { - sc->synhw.capExtended = (status[0] & 0x80) >> 7; - sc->synhw.capPassthrough = (status[2] & 0x80) >> 7; - sc->synhw.capSleep = (status[2] & 0x10) >> 4; - sc->synhw.capFourButtons = (status[2] & 0x08) >> 3; - sc->synhw.capMultiFinger = (status[2] & 0x02) >> 1; - sc->synhw.capPalmDetect = (status[2] & 0x01); + buttons = 0; + synhw.capExtended = (status[0] & 0x80) != 0; + if (synhw.capExtended) { + synhw.capPassthrough = (status[2] & 0x80) != 0; + synhw.capSleep = (status[2] & 0x10) != 0; + synhw.capFourButtons = (status[2] & 0x08) != 0; + synhw.capMultiFinger = (status[2] & 0x02) != 0; + synhw.capPalmDetect = (status[2] & 0x01) != 0; if (verbose >= 2) { printf(" Extended capabilities:\n"); - printf(" capExtended: %d\n", sc->synhw.capExtended); - printf(" capPassthrough: %d\n", - sc->synhw.capPassthrough); - printf(" capSleep: %d\n", sc->synhw.capSleep); - printf(" capFourButtons: %d\n", - sc->synhw.capFourButtons); - printf(" capMultiFinger: %d\n", - sc->synhw.capMultiFinger); - printf(" capPalmDetect: %d\n", - sc->synhw.capPalmDetect); + printf(" capExtended: %d\n", synhw.capExtended); + printf(" capPassthrough: %d\n", synhw.capPassthrough); + printf(" capSleep: %d\n", synhw.capSleep); + printf(" capFourButtons: %d\n", synhw.capFourButtons); + printf(" capMultiFinger: %d\n", synhw.capMultiFinger); + printf(" capPalmDetect: %d\n", synhw.capPalmDetect); } /* * If we have bits set in status[0] & 0x70, then we can load * more information about buttons using query 0x09. */ - if (status[0] & 0x70) { + if ((status[0] & 0x70) != 0) { if (mouse_ext_command(kbdc, 0x09) == 0) return (FALSE); if (get_mouse_status(kbdc, status, 0, 3) != 3) return (FALSE); - sc->hw.buttons = ((status[1] & 0xf0) >> 4) + 3; - if (verbose >= 2) - printf(" Additional Buttons: %d\n", - sc->hw.buttons -3); - } - } else { - sc->synhw.capExtended = 0; - - if (verbose >= 2) + buttons = (status[1] & 0xf0) >> 4; + } else + buttons = synhw.capFourButtons ? 1 : 0; + } + if (verbose >= 2) { + if (synhw.capExtended) + printf(" Additional Buttons: %d\n", buttons); + else printf(" No extended capabilities\n"); } @@ -4449,43 +4442,34 @@ enable_synaptics(struct psm_softc *sc) return (FALSE); } + if (sc != NULL) + sc->synhw = synhw; + if (!synaptics_support) + return (FALSE); + /* Set the mode byte; request wmode where available. */ - if (sc->synhw.capExtended) - mouse_ext_command(kbdc, 0xc1); - else - mouse_ext_command(kbdc, 0xc0); + mouse_ext_command(kbdc, synhw.capExtended ? 0xc1 : 0xc0); /* "Commit" the Set Mode Byte command sent above. */ set_mouse_sampling_rate(kbdc, 20); - /* - * Report the correct number of buttons - * - * XXX: I'm not sure this is used anywhere. - */ - if (sc->synhw.capExtended && sc->synhw.capFourButtons) - sc->hw.buttons = 4; - - VLOG(3, (LOG_DEBUG, "synaptics: END init (%d buttons)\n", - sc->hw.buttons)); + buttons += 3; + VLOG(3, (LOG_DEBUG, "synaptics: END init (%d buttons)\n", buttons)); - /* Create sysctl tree. */ - synaptics_sysctl_create_tree(sc); + if (sc != NULL) { + /* Create sysctl tree. */ + synaptics_sysctl_create_tree(sc); - /* - * The touchpad will have to be reinitialized after - * suspend/resume. - */ - sc->config |= PSM_CONFIG_HOOKRESUME | PSM_CONFIG_INITAFTERSUSPEND; + sc->hw.buttons = buttons; + } return (TRUE); } /* Interlink electronics VersaPad */ static int -enable_versapad(struct psm_softc *sc) +enable_versapad(KBDC kbdc, struct psm_softc *sc) { - KBDC kbdc = sc->kbdc; int data[3]; set_mouse_resolution(kbdc, PSMD_RES_MEDIUM_HIGH); /* set res. 2 */ @@ -4500,8 +4484,6 @@ enable_versapad(struct psm_softc *sc) return (FALSE); set_mouse_scaling(kbdc, 1); /* set scale 1:1 */ - sc->config |= PSM_CONFIG_HOOKRESUME | PSM_CONFIG_INITAFTERSUSPEND; - return (TRUE); /* PS/2 absolute mode */ } @@ -4539,7 +4521,8 @@ psmresume(device_t dev) VLOG(2, (LOG_NOTICE, "psm%d: system resume hook called.\n", unit)); - if (!(sc->config & PSM_CONFIG_HOOKRESUME)) + if ((sc->config & + (PSM_CONFIG_HOOKRESUME | PSM_CONFIG_INITAFTERSUSPEND)) == 0) return (0); err = reinitialize(sc, sc->config & PSM_CONFIG_INITAFTERSUSPEND); From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 19:21:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEE0C106566C; Thu, 26 Apr 2012 19:21:58 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBB358FC0A; Thu, 26 Apr 2012 19:21:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QJLwfL064215; Thu, 26 Apr 2012 19:21:58 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QJLwsh064213; Thu, 26 Apr 2012 19:21:58 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201204261921.q3QJLwsh064213@svn.freebsd.org> From: Eitan Adler Date: Thu, 26 Apr 2012 19:21:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234714 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 19:21:59 -0000 Author: eadler Date: Thu Apr 26 19:21:58 2012 New Revision: 234714 URL: http://svn.freebsd.org/changeset/base/234714 Log: Use the .Bx macro instead of BSD Submitted by: ru Approved by: ru MFC after: 3 days X-MFC-With: r234700 Modified: head/lib/libc/gen/err.3 Modified: head/lib/libc/gen/err.3 ============================================================================== --- head/lib/libc/gen/err.3 Thu Apr 26 18:16:44 2012 (r234713) +++ head/lib/libc/gen/err.3 Thu Apr 26 19:21:58 2012 (r234714) @@ -217,7 +217,9 @@ The .Fn err and .Fn warn -families of functions are BSD extensions. +families of functions are +.Bx +extensions. As such they should not be used in truly portable code. Use .Fn strerror From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 19:31:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C8AF106566B; Thu, 26 Apr 2012 19:31:17 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 28D928FC1A; Thu, 26 Apr 2012 19:31:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QJVHnW064716; Thu, 26 Apr 2012 19:31:17 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QJVG72064714; Thu, 26 Apr 2012 19:31:16 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201204261931.q3QJVG72064714@svn.freebsd.org> From: Michael Tuexen Date: Thu, 26 Apr 2012 19:31:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234715 - head/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 19:31:17 -0000 Author: tuexen Date: Thu Apr 26 19:31:16 2012 New Revision: 234715 URL: http://svn.freebsd.org/changeset/base/234715 Log: Export symbols for sctp_sendv() and sctp_recvv(). MFC after: 1 week Modified: head/lib/libc/net/Symbol.map Modified: head/lib/libc/net/Symbol.map ============================================================================== --- head/lib/libc/net/Symbol.map Thu Apr 26 19:21:58 2012 (r234714) +++ head/lib/libc/net/Symbol.map Thu Apr 26 19:31:16 2012 (r234715) @@ -135,8 +135,10 @@ FBSD_1.0 { sctp_sendmsg; sctp_sendmsgx; sctp_send; + sctp_sendv; sctp_sendx; sctp_recvmsg; + sctp_recvv; setipv4sourcefilter; getipv4sourcefilter; getsourcefilter; From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 19:33:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74DE8106566B; Thu, 26 Apr 2012 19:33:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id E56598FC12; Thu, 26 Apr 2012 19:33:29 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q3QJXPfb000601; Thu, 26 Apr 2012 22:33:25 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q3QJXPUU029075; Thu, 26 Apr 2012 22:33:25 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q3QJXOVv029074; Thu, 26 Apr 2012 22:33:24 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 26 Apr 2012 22:33:24 +0300 From: Konstantin Belousov To: Michael Tuexen Message-ID: <20120426193324.GV2358@deviant.kiev.zoral.com.ua> References: <201204261931.q3QJVG72064714@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fexaaLh22eEX/G9y" Content-Disposition: inline In-Reply-To: <201204261931.q3QJVG72064714@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234715 - head/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 19:33:30 -0000 --fexaaLh22eEX/G9y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 26, 2012 at 07:31:16PM +0000, Michael Tuexen wrote: > Author: tuexen > Date: Thu Apr 26 19:31:16 2012 > New Revision: 234715 > URL: http://svn.freebsd.org/changeset/base/234715 >=20 > Log: > Export symbols for sctp_sendv() and sctp_recvv(). > =20 > MFC after: 1 week >=20 > Modified: > head/lib/libc/net/Symbol.map >=20 > Modified: head/lib/libc/net/Symbol.map > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libc/net/Symbol.map Thu Apr 26 19:21:58 2012 (r234714) > +++ head/lib/libc/net/Symbol.map Thu Apr 26 19:31:16 2012 (r234715) > @@ -135,8 +135,10 @@ FBSD_1.0 { > sctp_sendmsg; > sctp_sendmsgx; > sctp_send; > + sctp_sendv; > sctp_sendx; > sctp_recvmsg; > + sctp_recvv; > setipv4sourcefilter; > getipv4sourcefilter; > getsourcefilter; These are new symbols, they should go into the current (FBSD_1.3) version. --fexaaLh22eEX/G9y Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk+ZowQACgkQC3+MBN1Mb4i1YQCeMW4+zmKXIeCkb5RmYvgt/q9L 88AAniZVMBGebkzI/iuh9IIrAw1TxG5i =1AJ7 -----END PGP SIGNATURE----- --fexaaLh22eEX/G9y-- From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 19:36:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E1741065670; Thu, 26 Apr 2012 19:36:42 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) by mx1.freebsd.org (Postfix) with ESMTP id 9E2E18FC17; Thu, 26 Apr 2012 19:36:41 +0000 (UTC) Received: from [192.168.1.103] (p508F93CD.dip.t-dialin.net [80.143.147.205]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id B9B2D1C0C0BD4; Thu, 26 Apr 2012 21:36:39 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: Michael Tuexen In-Reply-To: <20120426193324.GV2358@deviant.kiev.zoral.com.ua> Date: Thu, 26 Apr 2012 21:36:38 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <9E92A2FD-2432-4204-BD46-3548E328AF1D@freebsd.org> References: <201204261931.q3QJVG72064714@svn.freebsd.org> <20120426193324.GV2358@deviant.kiev.zoral.com.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1257) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234715 - head/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 19:36:42 -0000 On Apr 26, 2012, at 9:33 PM, Konstantin Belousov wrote: > On Thu, Apr 26, 2012 at 07:31:16PM +0000, Michael Tuexen wrote: >> Author: tuexen >> Date: Thu Apr 26 19:31:16 2012 >> New Revision: 234715 >> URL: http://svn.freebsd.org/changeset/base/234715 >>=20 >> Log: >> Export symbols for sctp_sendv() and sctp_recvv(). >>=20 >> MFC after: 1 week >>=20 >> Modified: >> head/lib/libc/net/Symbol.map >>=20 >> Modified: head/lib/libc/net/Symbol.map >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/lib/libc/net/Symbol.map Thu Apr 26 19:21:58 2012 = (r234714) >> +++ head/lib/libc/net/Symbol.map Thu Apr 26 19:31:16 2012 = (r234715) >> @@ -135,8 +135,10 @@ FBSD_1.0 { >> sctp_sendmsg; >> sctp_sendmsgx; >> sctp_send; >> + sctp_sendv; >> sctp_sendx; >> sctp_recvmsg; >> + sctp_recvv; >> setipv4sourcefilter; >> getipv4sourcefilter; >> getsourcefilter; > These are new symbols, they should go into the current (FBSD_1.3) > version. And where is that? Should I add something like FBSD_1.3 { sctp_recvv; sctp_sendv; } Or in another file? Will it be possible to MFC that to stable/8 and = stable/9? I added the functions a while ago, but missed to add them to the = Symbol.map. Best regards Michael From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 19:39:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8237A1065670; Thu, 26 Apr 2012 19:39:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 046428FC16; Thu, 26 Apr 2012 19:39:55 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q3QJdoYx001953; Thu, 26 Apr 2012 22:39:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q3QJdojU029128; Thu, 26 Apr 2012 22:39:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q3QJdovP029127; Thu, 26 Apr 2012 22:39:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 26 Apr 2012 22:39:50 +0300 From: Konstantin Belousov To: Michael Tuexen Message-ID: <20120426193950.GW2358@deviant.kiev.zoral.com.ua> References: <201204261931.q3QJVG72064714@svn.freebsd.org> <20120426193324.GV2358@deviant.kiev.zoral.com.ua> <9E92A2FD-2432-4204-BD46-3548E328AF1D@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EODUij44syq40wlh" Content-Disposition: inline In-Reply-To: <9E92A2FD-2432-4204-BD46-3548E328AF1D@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234715 - head/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 19:39:56 -0000 --EODUij44syq40wlh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 26, 2012 at 09:36:38PM +0200, Michael Tuexen wrote: > On Apr 26, 2012, at 9:33 PM, Konstantin Belousov wrote: >=20 > > On Thu, Apr 26, 2012 at 07:31:16PM +0000, Michael Tuexen wrote: > >> Author: tuexen > >> Date: Thu Apr 26 19:31:16 2012 > >> New Revision: 234715 > >> URL: http://svn.freebsd.org/changeset/base/234715 > >>=20 > >> Log: > >> Export symbols for sctp_sendv() and sctp_recvv(). > >>=20 > >> MFC after: 1 week > >>=20 > >> Modified: > >> head/lib/libc/net/Symbol.map > >>=20 > >> Modified: head/lib/libc/net/Symbol.map > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > >> --- head/lib/libc/net/Symbol.map Thu Apr 26 19:21:58 2012 (r234714) > >> +++ head/lib/libc/net/Symbol.map Thu Apr 26 19:31:16 2012 (r234715) > >> @@ -135,8 +135,10 @@ FBSD_1.0 { > >> sctp_sendmsg; > >> sctp_sendmsgx; > >> sctp_send; > >> + sctp_sendv; > >> sctp_sendx; > >> sctp_recvmsg; > >> + sctp_recvv; > >> setipv4sourcefilter; > >> getipv4sourcefilter; > >> getsourcefilter; > > These are new symbols, they should go into the current (FBSD_1.3) > > version. > And where is that? Should I add something like > FBSD_1.3 { > sctp_recvv; > sctp_sendv; > } Right, add it between FBSD_1.0 and FBSDprivate_1.0. >=20 > Or in another file? Will it be possible to MFC that to stable/8 and stabl= e/9? > I added the functions a while ago, but missed to add them to the Symbol.m= ap. Yes, it is possible to MFC this to both stable/8 and stable/9. Straight merge should do it. --EODUij44syq40wlh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk+ZpIYACgkQC3+MBN1Mb4hCQACffrHnbTS41s37Hs0x525dHkOG z04AoPBLyDot9YrQ9OGNLQ3DKUJdfmc3 =++V1 -----END PGP SIGNATURE----- --EODUij44syq40wlh-- From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 19:56:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B1B88106566B; Thu, 26 Apr 2012 19:56:06 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F0178FC15; Thu, 26 Apr 2012 19:56:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QJu6Q2065819; Thu, 26 Apr 2012 19:56:06 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QJu6vN065817; Thu, 26 Apr 2012 19:56:06 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201204261956.q3QJu6vN065817@svn.freebsd.org> From: Michael Tuexen Date: Thu, 26 Apr 2012 19:56:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234716 - head/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 19:56:06 -0000 Author: tuexen Date: Thu Apr 26 19:56:06 2012 New Revision: 234716 URL: http://svn.freebsd.org/changeset/base/234716 Log: Move sctp_sendv and sctp_recvv to FBSD_1.3 as suggested by Konstantin Belousov. MFC after: 1 week. X-MFC with: r234715 Modified: head/lib/libc/net/Symbol.map Modified: head/lib/libc/net/Symbol.map ============================================================================== --- head/lib/libc/net/Symbol.map Thu Apr 26 19:31:16 2012 (r234715) +++ head/lib/libc/net/Symbol.map Thu Apr 26 19:56:06 2012 (r234716) @@ -135,16 +135,19 @@ FBSD_1.0 { sctp_sendmsg; sctp_sendmsgx; sctp_send; - sctp_sendv; sctp_sendx; sctp_recvmsg; - sctp_recvv; setipv4sourcefilter; getipv4sourcefilter; getsourcefilter; setsourcefilter; }; +FBSD_1.3 { + sctp_recvv; + sctp_sendv; +}; + FBSDprivate_1.0 { _nsdispatch; _nsyyerror; /* generated from nslexer.l */ From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 19:58:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DCBB106566C; Thu, 26 Apr 2012 19:58:04 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) by mx1.freebsd.org (Postfix) with ESMTP id 950348FC0A; Thu, 26 Apr 2012 19:58:03 +0000 (UTC) Received: from [192.168.1.103] (p508F93CD.dip.t-dialin.net [80.143.147.205]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id 9AE1E1C0C0BD4; Thu, 26 Apr 2012 21:58:02 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: Michael Tuexen In-Reply-To: <20120426193950.GW2358@deviant.kiev.zoral.com.ua> Date: Thu, 26 Apr 2012 21:58:01 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <8C81F8AF-359C-4BD7-A349-D82C7B3828C9@freebsd.org> References: <201204261931.q3QJVG72064714@svn.freebsd.org> <20120426193324.GV2358@deviant.kiev.zoral.com.ua> <9E92A2FD-2432-4204-BD46-3548E328AF1D@freebsd.org> <20120426193950.GW2358@deviant.kiev.zoral.com.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1257) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234715 - head/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 19:58:04 -0000 On Apr 26, 2012, at 9:39 PM, Konstantin Belousov wrote: > On Thu, Apr 26, 2012 at 09:36:38PM +0200, Michael Tuexen wrote: >> On Apr 26, 2012, at 9:33 PM, Konstantin Belousov wrote: >>=20 >>> On Thu, Apr 26, 2012 at 07:31:16PM +0000, Michael Tuexen wrote: >>>> Author: tuexen >>>> Date: Thu Apr 26 19:31:16 2012 >>>> New Revision: 234715 >>>> URL: http://svn.freebsd.org/changeset/base/234715 >>>>=20 >>>> Log: >>>> Export symbols for sctp_sendv() and sctp_recvv(). >>>>=20 >>>> MFC after: 1 week >>>>=20 >>>> Modified: >>>> head/lib/libc/net/Symbol.map >>>>=20 >>>> Modified: head/lib/libc/net/Symbol.map >>>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>>> --- head/lib/libc/net/Symbol.map Thu Apr 26 19:21:58 2012 = (r234714) >>>> +++ head/lib/libc/net/Symbol.map Thu Apr 26 19:31:16 2012 = (r234715) >>>> @@ -135,8 +135,10 @@ FBSD_1.0 { >>>> sctp_sendmsg; >>>> sctp_sendmsgx; >>>> sctp_send; >>>> + sctp_sendv; >>>> sctp_sendx; >>>> sctp_recvmsg; >>>> + sctp_recvv; >>>> setipv4sourcefilter; >>>> getipv4sourcefilter; >>>> getsourcefilter; >>> These are new symbols, they should go into the current (FBSD_1.3) >>> version. >> And where is that? Should I add something like >> FBSD_1.3 { >> sctp_recvv; >> sctp_sendv; >> } > Right, add it between FBSD_1.0 and FBSDprivate_1.0. >=20 >>=20 >> Or in another file? Will it be possible to MFC that to stable/8 and = stable/9? >> I added the functions a while ago, but missed to add them to the = Symbol.map. >=20 > Yes, it is possible to MFC this to both stable/8 and stable/9. > Straight merge should do it. Done in r234716. Thanks for the help. Just to be sure: After an MFC to stable/9, the symbol will be usable in = the upcoming 9.1, right? Best regards Michael From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 20:11:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D7DF5106564A; Thu, 26 Apr 2012 20:11:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD8478FC15; Thu, 26 Apr 2012 20:11:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QKBwTZ066537; Thu, 26 Apr 2012 20:11:58 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QKBwIB066514; Thu, 26 Apr 2012 20:11:58 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201204262011.q3QKBwIB066514@svn.freebsd.org> From: Glen Barber Date: Thu, 26 Apr 2012 20:11:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234717 - in stable/9: bin/expr lib/libc/sys lib/libmemstat lib/libpmc lib/libusb lib/libutil lib/libvgl sbin/iscontrol share/man/man3 share/man/man4 share/man/man5 share/man/man9 sys/b... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 20:11:59 -0000 Author: gjb (doc committer) Date: Thu Apr 26 20:11:57 2012 New Revision: 234717 URL: http://svn.freebsd.org/changeset/base/234717 Log: MFC r232157, r232158: r232157: Fix various typos in manual pages. Submitted by: amdmi3 PR: 165431 r232158: Whitespace cleanup: o Wrap sentences on to new lines o Cleanup trailing whitespace Modified: stable/9/bin/expr/expr.1 stable/9/lib/libc/sys/cap_enter.2 stable/9/lib/libc/sys/pdfork.2 stable/9/lib/libc/sys/posix_fadvise.2 stable/9/lib/libc/sys/posix_fallocate.2 stable/9/lib/libmemstat/libmemstat.3 stable/9/lib/libpmc/pmc.mips.3 stable/9/lib/libpmc/pmc.westmere.3 stable/9/lib/libusb/libusb.3 stable/9/lib/libutil/kinfo_getproc.3 stable/9/lib/libvgl/vgl.3 stable/9/sbin/iscontrol/iscsi.conf.5 stable/9/share/man/man3/pthread_getthreadid_np.3 stable/9/share/man/man4/acpi_panasonic.4 stable/9/share/man/man4/cxgbe.4 stable/9/share/man/man4/ed.4 stable/9/share/man/man4/mac_lomac.4 stable/9/share/man/man4/umcs.4 stable/9/share/man/man4/vr.4 stable/9/share/man/man5/rc.conf.5 stable/9/share/man/man9/zone.9 stable/9/sys/boot/forth/menu.4th.8 Directory Properties: stable/9/bin/expr/ (props changed) stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) stable/9/lib/libmemstat/ (props changed) stable/9/lib/libpmc/ (props changed) stable/9/lib/libusb/ (props changed) stable/9/lib/libutil/ (props changed) stable/9/lib/libvgl/ (props changed) stable/9/sbin/iscontrol/ (props changed) stable/9/share/man/man3/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/share/man/man5/ (props changed) stable/9/share/man/man9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/bin/expr/expr.1 ============================================================================== --- stable/9/bin/expr/expr.1 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/bin/expr/expr.1 Thu Apr 26 20:11:57 2012 (r234717) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 9, 2010 +.Dd February 25, 2012 .Dt EXPR 1 .Os .Sh NAME @@ -52,7 +52,7 @@ Several of the operators have special me and must therefore be quoted appropriately. All integer operands are interpreted in base 10 and must consist of only an optional leading minus sign followed by one or more digits (unless -less strict parsing has been enabled for backwards compatibilty with +less strict parsing has been enabled for backwards compatibility with prior versions of .Nm in @@ -176,7 +176,8 @@ option, since this matches the historic .Nm in .Fx . This option makes number parsing less strict and permits leading -white space and an optional leading plus sign. In addition, empty operands +white space and an optional leading plus sign. +In addition, empty operands have an implied value of zero in numeric context. For historical reasons, defining the environment variable .Ev EXPR_COMPAT @@ -284,7 +285,7 @@ An empty operand string is interpreted a .Bl -bullet .It Leading white space and/or a plus sign before an otherwise valid positive -numberic operand are allowed and will be ignored. +numeric operand are allowed and will be ignored. .El .Pp The extended arithmetic range and overflow checks do not conflict with @@ -300,7 +301,8 @@ standard, the use of string arguments .Va index , or .Va match -produces undefined results. In this version of +produces undefined results. +In this version of .Nm , these arguments are treated just as their respective string values. .Pp Modified: stable/9/lib/libc/sys/cap_enter.2 ============================================================================== --- stable/9/lib/libc/sys/cap_enter.2 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/lib/libc/sys/cap_enter.2 Thu Apr 26 20:11:57 2012 (r234717) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 11, 2009 +.Dd February 25, 2012 .Dt CAP_ENTER 2 .Os .Sh NAME @@ -68,7 +68,7 @@ appropriately-crafted applications or ap returns a flag indicating whether or not the process is in a capability mode sandbox. .Sh CAVEAT -Creating effecive process sandboxes is a tricky process that involves +Creating effective process sandboxes is a tricky process that involves identifying the least possible rights required by the process and then passing those rights into the process in a safe manner. See the CAVEAT Modified: stable/9/lib/libc/sys/pdfork.2 ============================================================================== --- stable/9/lib/libc/sys/pdfork.2 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/lib/libc/sys/pdfork.2 Thu Apr 26 20:11:57 2012 (r234717) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 16, 2011 +.Dd February 25, 2012 .Dt PDFORK 2 .Os .Sh NAME @@ -87,7 +87,7 @@ except that it accepts a process descrip rather than a PID. .Pp .Fn pdwait4 -behaves identially to +behaves identically to .Xr wait4 2 , but operates with respect to a process descriptor argument rather than a PID. .Pp @@ -101,7 +101,8 @@ queries status of a process descriptor; .Fa st_ctime and .Fa st_mtime -fields are defined. If the owner read, write, and execute bits are set then the +fields are defined. +If the owner read, write, and execute bits are set then the process represented by the process descriptor is still alive. .Pp .Xr poll 2 Modified: stable/9/lib/libc/sys/posix_fadvise.2 ============================================================================== --- stable/9/lib/libc/sys/posix_fadvise.2 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/lib/libc/sys/posix_fadvise.2 Thu Apr 26 20:11:57 2012 (r234717) @@ -28,7 +28,7 @@ .\" @(#)madvise.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd October 26, 2011 +.Dd February 25, 2012 .Dt POSIX_FADVISE 2 .Os .Sh NAME @@ -74,7 +74,7 @@ This currently does nothing as the defau detect sequential behavior. .It Dv POSIX_FADV_WILLNEED Tells the system that the specified data will be accessed in the near future. -The system may initiate an asychronous read of the data if it is not already +The system may initiate an asynchronous read of the data if it is not already present in memory. .It Dv POSIX_FADV_DONTNEED Tells the system that the specified data will not be accessed in the near Modified: stable/9/lib/libc/sys/posix_fallocate.2 ============================================================================== --- stable/9/lib/libc/sys/posix_fallocate.2 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/lib/libc/sys/posix_fallocate.2 Thu Apr 26 20:11:57 2012 (r234717) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd April 13, 2011 +.Dd February 25, 2012 .Dt POSIX_FALLOCATE 2 .Os .Sh NAME @@ -48,7 +48,7 @@ to .Fa len in the file referenced by .Fa fd -is guarateed to be allocated upon successful return. +is guaranteed to be allocated upon successful return. That is, if .Fn posix_fallocate returns successfully, subsequent writes to the specified file data Modified: stable/9/lib/libmemstat/libmemstat.3 ============================================================================== --- stable/9/lib/libmemstat/libmemstat.3 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/lib/libmemstat/libmemstat.3 Thu Apr 26 20:11:57 2012 (r234717) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 21, 2011 +.Dd February 25, 2012 .Dt LIBMEMSTAT 3 .Os .Sh NAME @@ -345,7 +345,7 @@ Return a caller-owned per-CPU pointer fo Set a caller-owned per-CPU pointer for the memory type. .It Fn memstat_get_percpu_caller_uint64 Return a caller-owned per-CPU integer for the memory type. -.It Fn memsttat_set_percpu_caller_uint64 +.It Fn memstat_set_percpu_caller_uint64 Set a caller-owned per-CPU integer for the memory type. .It Fn memstat_get_percpu_free If the memory allocator supports a per-CPU cache, return the number of free Modified: stable/9/lib/libpmc/pmc.mips.3 ============================================================================== --- stable/9/lib/libpmc/pmc.mips.3 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/lib/libpmc/pmc.mips.3 Thu Apr 26 20:11:57 2012 (r234717) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 11, 2010 +.Dd February 25, 2012 .Dt PMC.MIPS 3 .Os .Sh NAME @@ -54,16 +54,16 @@ MIPS programmable PMCs support the follo .Bl -tag -width indent .It Li CYCLE .Pq Event 0, Counter 0/1 -Total number of cycles. +Total number of cycles. The performance counters are clocked by the -top-level gated clock. +top-level gated clock. If the core is built with that clock gater present, none of the counters will increment while the clock is stopped - due to a WAIT instruction. .It Li INSTR_EXECUTED .Pq Event 1, Counter 0/1 Total number of instructions completed. -.It Li BRANCH_COMPLETED +.It Li BRANCH_COMPLETED .Pq Event 2, Counter 0 Total number of branch instructions completed. .It Li BRANCH_MISPRED @@ -85,9 +85,9 @@ If RPS use is disabled, JR $31 will not .Pq Event 5, Counter 0 Counts ITLB accesses that are due to fetches showing up in the instruction fetch stage of the pipeline and which do not use a fixed -mapping or are not in unmapped space. +mapping or are not in unmapped space. If an address is fetched twice from the pipe (as in the case of a -cache miss), that instruction willcount as 2 ITLB accesses. +cache miss), that instruction willcount as 2 ITLB accesses. Since each fetch gets us 2 instructions,there is one access marked per double word. .It Li ITLB_MISS @@ -102,7 +102,8 @@ They are also ignored if there is some f Counts DTLB access including those in unmapped address spaces. .It Li DTLB_MISS .Pq Event 6, Counter 1 -Counts DTLB misses. Back to back misses that result in only one DTLB +Counts DTLB misses. +Back to back misses that result in only one DTLB entry getting refilled are counted as a single miss. .It Li JTLB_IACCESS .Pq Event 7, Counter 0 @@ -119,7 +120,8 @@ Data JTLB accesses. Counts data JTLB accesses that result in no match or a match on an invalid translation. .It Li IC_FETCH .Pq Event 9, Counter 0 -Counts every time the instruction cache is accessed. All replays, +Counts every time the instruction cache is accessed. +All replays, wasted fetches etc. are counted. For example, following a branch, even though the prediction is taken, the fall through access is counted. @@ -166,7 +168,7 @@ This includes all instructions that norm purpose register, but where the destination register was set to r0. .It Li INTEGER_MULDIV_COMPLETED .Pq Event 17, Counter 1 -Integer multipy and divide instructions completed. (MULxx, DIVx, MADDx, MSUBx). +Integer multiply and divide instructions completed. (MULxx, DIVx, MADDx, MSUBx). .It Li RF_STALL .Pq Event 18, Counter 0 Counts the total number of cycles where no instructions are issued @@ -179,7 +181,8 @@ when both stalls are active will only be replay traps (other than uTLB) .It Li STORE_COND_COMPLETED .Pq Event 19, Counter 0 -Conditional stores completed. Counts all events, including failed stores. +Conditional stores completed. +Counts all events, including failed stores. .It Li STORE_COND_FAILED .Pq Event 19, Counter 1 Conditional store instruction that did not update memory. @@ -189,7 +192,7 @@ different and the observed operating mod causing some inaccuracy in the measured ratio. .It Li ICACHE_REQUESTS .Pq Event 20, Counter 0 -Note that this only counts PREFs that are actually attempted. +Note that this only counts PREFs that are actually attempted. PREFs to uncached addresses or ones with translation errors are not counted .It Li ICACHE_HIT .Pq Event 20, Counter 1 @@ -214,7 +217,7 @@ Any type of exception taken. Counts cycles where the LSU is in fixup and cannot accept a new instruction from the ALU. Fixups are replays within the LSU that occur when an instruction needs -to re-access the cache or the DTLB. +to re-access the cache or the DTLB. .It Li IFU_CYCLES_STALLED .Pq Event 25, Counter 0 Counts the number of cycles where the fetch unit is not providing a @@ -256,7 +259,7 @@ Cycles where the main pipeline is stalle in the Fill Store Buffer. .It Li DMISS_CYCLES .Pq Event 39, Counter 0 -Data miss is outstanding, but not necessarily stalling the pipeline. +Data miss is outstanding, but not necessarily stalling the pipeline. The difference between this and D$ miss stall cycles can show the gain from non-blocking cache misses. .It Li L2_MISS_CYCLES @@ -282,7 +285,8 @@ Counts all cycles where integer pipeline Count all pipeline bubbles that are a result of multicycle ISPRAM access. Pipeline bubbles are defined as all cycles that IFU doesn't present an -instruction to ALU. The four cycles after a redirect are not counted. +instruction to ALU. +The four cycles after a redirect are not counted. .It Li DSPRAM_STALL_CYCLES .Pq Event 43, Counter 1 Counts stall cycles created by an instruction waiting for access to DSPRAM. @@ -372,10 +376,10 @@ aliases supported by .Lb libpmc and the underlying hardware events used. .Bl -column "branch-mispredicts" "cpu_clk_unhalted.core_p" -.It Em Alias Ta Em Event Ta +.It Em Alias Ta Em Event Ta .It Li instructions Ta Li INSTR_EXECUTED Ta -.It Li branches Ta Li BRANCH_COMPLETED Ta -.It Li branch-mispredicts Ta Li BRANCH_MISPRED Ta +.It Li branches Ta Li BRANCH_COMPLETED Ta +.It Li branch-mispredicts Ta Li BRANCH_MISPRED Ta .El .Sh SEE ALSO .Xr pmc 3 , Modified: stable/9/lib/libpmc/pmc.westmere.3 ============================================================================== --- stable/9/lib/libpmc/pmc.westmere.3 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/lib/libpmc/pmc.westmere.3 Thu Apr 26 20:11:57 2012 (r234717) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 24, 2010 +.Dd February 25, 2012 .Dt PMC.WESTMERE 3 .Os .Sh NAME @@ -643,7 +643,7 @@ Counter 0. .Pq Event 60H , Umask 08H Counts weighted cycles of offcore read requests of any kind. Include L2 prefetch requests. -Ccounter 0. +Counter 0. .It Li CACHE_LOCK_CYCLES.L1D_L2 .Pq Event 63H , Umask 01H Cycle count during which the L1D and L2 are locked. A lock is asserted when Modified: stable/9/lib/libusb/libusb.3 ============================================================================== --- stable/9/lib/libusb/libusb.3 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/lib/libusb/libusb.3 Thu Apr 26 20:11:57 2012 (r234717) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 9, 2011 +.Dd February 25, 2012 .Dt LIBUSB 3 .Os .Sh NAME @@ -483,7 +483,7 @@ on success and a LIBUSB_ERROR code on fa .Pp .Ft int .Fn libusb_handle_events_locked "libusb_context *ctx" "struct timeval *tv" -Handle any pending events by polling file desciptors, without checking if +Handle any pending events by polling file descriptors, without checking if another thread is already doing so. Must be called with the event lock held. .Pp Modified: stable/9/lib/libutil/kinfo_getproc.3 ============================================================================== --- stable/9/lib/libutil/kinfo_getproc.3 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/lib/libutil/kinfo_getproc.3 Thu Apr 26 20:11:57 2012 (r234717) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 9, 2009 +.Dd February 25, 2012 .Os .Dt KINFO_GETPROC 3 .Sh NAME @@ -44,7 +44,7 @@ This function is used for obtaining proc The .Ar pid field contains the process identifier. -This should be the a process that you have privilige to access. +This should be a process that you have privilege to access. This function is a wrapper around .Xr sysctl 3 with the Modified: stable/9/lib/libvgl/vgl.3 ============================================================================== --- stable/9/lib/libvgl/vgl.3 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/lib/libvgl/vgl.3 Thu Apr 26 20:11:57 2012 (r234717) @@ -25,7 +25,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd November 7, 1999 +.Dd February 25, 2012 .Dt VGL 3 .Os .Sh NAME @@ -385,7 +385,7 @@ Passing an in-memory bitmap to this func The desired virtual screen width may not be achievable because of the video card hardware. In such case the video driver (and -underlaying video BIOS) may choose the next largest values. +underlying video BIOS) may choose the next largest values. Always examine .Va object->VXsize and Modified: stable/9/sbin/iscontrol/iscsi.conf.5 ============================================================================== --- stable/9/sbin/iscontrol/iscsi.conf.5 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/sbin/iscontrol/iscsi.conf.5 Thu Apr 26 20:11:57 2012 (r234717) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 5, 2007 +.Dd February 25, 2012 .Dt ISCSI.CONF 5 .Os .Sh NAME @@ -39,7 +39,7 @@ program. It contains declarations and parameter/key-options. The syntax is very simple, .D1 Li variable = value; -and they can be grouped via a +and they can be grouped via a .Em block declaration: .Bf Li @@ -60,7 +60,7 @@ currently only supported authentication digest either MD5 or SHA. Default is none. .It Cm HeaderDigest -a +a .Em digest is calculated on the header of all iSCSI PDUs, and checked. @@ -113,7 +113,7 @@ bytes it can receive in an iSCSI PDU, de .It Cm MaxOutstandingR2T is used to calculate/negotiate the .Em tag opening , -can be overriden by the +can be overridden by the .Sy tag option. .It Cm DataPDUInOrder @@ -141,7 +141,7 @@ to the value specified. .It Cm maxluns overrides the compiled value of .Sy luns , -see +see .Xr iscsi_initiator 4 . This value can only be reduced. .It Cm sockbufsize @@ -185,7 +185,7 @@ myiscsi { # nickname targetaddress = iscsi1 targetname = iqn.1900.com.com:sn.123456 } -chaptest { +chaptest { targetaddress= 10.0.0.1; targetname = iqn.1900.com.com:sn.123456 initiatorname= iqn.2005-01.il.ac.huji.cs:nobody Modified: stable/9/share/man/man3/pthread_getthreadid_np.3 ============================================================================== --- stable/9/share/man/man3/pthread_getthreadid_np.3 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/share/man/man3/pthread_getthreadid_np.3 Thu Apr 26 20:11:57 2012 (r234717) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 7, 2011 +.Dd February 25, 2012 .Dt PTHREAD_GETTHREADID_NP 3 .Os .Sh NAME @@ -42,7 +42,7 @@ The function returns the unique integral ID of the calling thread. Its semantics is similar to the AIX's .Fn pthread_getthreadid_np -functuion. +function. .Sh RETURN VALUES The .Fn pthread_getthreadid_np Modified: stable/9/share/man/man4/acpi_panasonic.4 ============================================================================== --- stable/9/share/man/man4/acpi_panasonic.4 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/share/man/man4/acpi_panasonic.4 Thu Apr 26 20:11:57 2012 (r234717) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2010 +.Dd February 25, 2012 .Dt ACPI_PANASONIC 4 .Os .Sh NAME @@ -66,7 +66,7 @@ The third and last is to provide a way t sound mute state via .Xr sysctl 8 . .Ss Hotkeys -There are 9 hotkeys available on the supported hardwares: +There are 9 hotkeys available on the supported hardware: .Pp .Bl -tag -compact -offset indent .It Sy Fn+F1 Modified: stable/9/share/man/man4/cxgbe.4 ============================================================================== --- stable/9/share/man/man4/cxgbe.4 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/share/man/man4/cxgbe.4 Thu Apr 26 20:11:57 2012 (r234717) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 14, 2011 +.Dd February 25, 2012 .Dt CXGBE 4 .Os .Sh NAME @@ -56,7 +56,7 @@ The .Nm driver provides support for PCI Express Ethernet adapters based on the Chelsio Terminator 4 (T4) ASIC. -The driver supprts Jumbo Frames, Transmit/Receive checksum offload, +The driver supports Jumbo Frames, Transmit/Receive checksum offload, TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN tag insertion/extraction, VLAN checksum offload, VLAN TSO, and Receive Side Steering (RSS). @@ -100,28 +100,36 @@ prompt before booting the kernel or stor .Xr loader.conf 5 . .Bl -tag -width indent .It Va hw.cxgbe.ntxq10g -The number of tx queues to use for a 10Gb port. The default is 16 or the number +The number of tx queues to use for a 10Gb port. +The default is 16 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nrxq10g -The number of rx queues to use for a 10Gb port. The default is 8 or the number +The number of rx queues to use for a 10Gb port. +The default is 8 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.ntxq1g -The number of tx queues to use for a 1Gb port. The default is 4 or the number +The number of tx queues to use for a 1Gb port. +The default is 4 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nrxq1g -The number of rx queues to use for a 1Gb port. The default is 2 or the number +The number of rx queues to use for a 1Gb port. +The default is 2 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldtxq10g -The number of TOE tx queues to use for a 10Gb port. The default is 8 or the +The number of TOE tx queues to use for a 10Gb port. +The default is 8 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldrxq10g -The number of TOE rx queues to use for a 10Gb port. The default is 2 or the +The number of TOE rx queues to use for a 10Gb port. +The default is 2 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldtxq1g -The number of TOE tx queues to use for a 1Gb port. The default is 2 or the +The number of TOE tx queues to use for a 1Gb port. +The default is 2 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldrxq1g -The number of TOE rx queues to use for a 1Gb port. The default is 1. +The number of TOE rx queues to use for a 1Gb port. +The default is 1. .It Va hw.cxgbe.holdoff_timer_idx_10G .It Va hw.cxgbe.holdoff_timer_idx_1G The timer index value to use to delay interrupts. @@ -149,7 +157,8 @@ ifconfig up). The size, in number of entries, of the descriptor ring used for a tx queue. A buf_ring of the same size is also allocated for additional -software queuing. See +software queuing. +See .Xr ifnet 9 . The default value is 1024. Different cxgbe interfaces can be assigned different values via the Modified: stable/9/share/man/man4/ed.4 ============================================================================== --- stable/9/share/man/man4/ed.4 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/share/man/man4/ed.4 Thu Apr 26 20:11:57 2012 (r234717) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2012 +.Dd February 25, 2012 .Dt ED 4 .Os .Sh NAME @@ -285,7 +285,7 @@ Surecom EtherPerfect EP-427 .It Surecom NE-34 .It -TDK 3000/3400/5670 Fast Etherenet/Modem +TDK 3000/3400/5670 Fast Ethernet/Modem .It TDK LAK-CD031, Grey Cell GCS2000 Ethernet Card .It @@ -419,8 +419,8 @@ packets are received. As a result, it may throw out some good packets which have been received but not yet transferred from the card to main memory. .Pp -The -.Nm +The +.Nm driver is slow by today's standards. .Pp PC Card attachment supports the D-Link DMF650TX LAN/Modem card's Ethernet Modified: stable/9/share/man/man4/mac_lomac.4 ============================================================================== --- stable/9/share/man/man4/mac_lomac.4 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/share/man/man4/mac_lomac.4 Thu Apr 26 20:11:57 2012 (r234717) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 11, 2002 +.Dd February 25, 2012 .Dt MAC_LOMAC 4 .Os .Sh NAME @@ -63,7 +63,7 @@ which protects the integrity of system o an information flow policy coupled with the subject demotion via floating labels. In LOMAC, all system subjects and objects are assigned integrity labels, made -up of one or more hierarchial grades, depending on the their types. +up of one or more hierarchical grades, depending on the their types. Together, these label elements permit all labels to be placed in a partial order, with information flow protections and demotion decisions based on a dominance operator Modified: stable/9/share/man/man4/umcs.4 ============================================================================== --- stable/9/share/man/man4/umcs.4 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/share/man/man4/umcs.4 Thu Apr 26 20:11:57 2012 (r234717) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 10, 2010 +.Dd February 25, 2012 .Dt UMCS 4 .Os .Sh NAME @@ -52,9 +52,11 @@ umcs_load="YES" The .Nm driver provides support for various multiport serial adapters based on the MosCom -MCS7820 and MCS7840 chips. They are 2- or 4-port adapters with full-featured -16550-compatible UARTs and very flexible baud generators. Also, these chips -support RS422/RS485 and IrDA oprations. +MCS7820 and MCS7840 chips. +They are 2- or 4-port adapters with full-featured +16550-compatible UARTs and very flexible baud generators. +Also, these chips +support RS422/RS485 and IrDA operations. .Pp The device is accessed through the .Xr ucom 4 Modified: stable/9/share/man/man4/vr.4 ============================================================================== --- stable/9/share/man/man4/vr.4 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/share/man/man4/vr.4 Thu Apr 26 20:11:57 2012 (r234717) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 7, 2010 +.Dd February 25, 2012 .Dt VR 4 .Os .Sh NAME @@ -94,7 +94,7 @@ or .Ar half-duplex modes. .It 100baseTX -Set 100Mbps (Fast Fthernet) operation. +Set 100Mbps (Fast Ethernet) operation. The .Ar mediaopt option can also be used to select either Modified: stable/9/share/man/man5/rc.conf.5 ============================================================================== --- stable/9/share/man/man5/rc.conf.5 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/share/man/man5/rc.conf.5 Thu Apr 26 20:11:57 2012 (r234717) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 11, 2012 +.Dd February 25, 2012 .Dt RC.CONF 5 .Os .Sh NAME @@ -200,7 +200,7 @@ to handle device added, removed or unkno .Pq Vt bool Run .Xr ddb 8 -to install +to install .Xr ddb 4 scripts at boot time. .It Va ddb_config @@ -1273,7 +1273,7 @@ options in this variable, in addition to file. For instance, to configure an .Xr ath 4 -wireless device in station mode with an address obtained +wireless device in station mode with an address obtained via DHCP, using WPA authentication and 802.11b mode, it is possible to use something like: .Bd -literal @@ -1427,7 +1427,7 @@ Note that ICMPv6 Router Advertisement me accepted even when .Va net.inet6.ip6.forwarding is 1 -.Pq packet fowarding is enabled +.Pq packet forwarding is enabled when .Va net.inet6.ip6.rfc6204w3 is set to 1. @@ -1449,7 +1449,8 @@ Aliases should be set by .Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n with .Dq Li inet6 -keyword. For example: +keyword. +For example: .Bd -literal ifconfig_ed0_ipv6="inet6 2001:db8:1::1 prefixlen 64" ifconfig_ed0_alias0="inet6 2001:db8:2::1 prefixlen 64" @@ -1552,14 +1553,17 @@ If .Dq Li AUTO is specified, it attempts to read a file .Pa /etc/ip6addrctl.conf -first. If this file is found, +first. +If this file is found, .Xr ip6addrctl 8 -reads and installs it. If not found, a policy is automatically set +reads and installs it. +If not found, a policy is automatically set according to .Va ipv6_activate_all_interfaces variable; if the variable is set to .Dq Li YES -the IPv6-preferred one is used. Otherwise IPv4-preferred. +the IPv6-preferred one is used. +Otherwise IPv4-preferred. .Pp The default value of .Va ip6addrctl_enable Modified: stable/9/share/man/man9/zone.9 ============================================================================== --- stable/9/share/man/man9/zone.9 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/share/man/man9/zone.9 Thu Apr 26 20:11:57 2012 (r234717) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 9, 2010 +.Dd February 25, 2012 .Dt ZONE 9 .Os .Sh NAME @@ -210,7 +210,7 @@ The .Fn uma_zone_get_cur function returns the approximate current occupancy of the zone. The returned value is approximate because appropriate synchronisation to -determine an exact value is not performend by the implementation. +determine an exact value is not performed by the implementation. This ensures low overhead at the expense of potentially stale data being used in the calculation. .Sh RETURN VALUES Modified: stable/9/sys/boot/forth/menu.4th.8 ============================================================================== --- stable/9/sys/boot/forth/menu.4th.8 Thu Apr 26 19:56:06 2012 (r234716) +++ stable/9/sys/boot/forth/menu.4th.8 Thu Apr 26 20:11:57 2012 (r234717) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Dec 27, 2011 +.Dd February 25, 2012 .Dt MENU.4TH 8 .Os .Sh NAME @@ -86,11 +86,12 @@ If set to .Dq Li YES (case-insensitive) or .Dq Li 1 , -causes the menu to be displayed in color wherever possible. This includes the +causes the menu to be displayed in color wherever possible. +This includes the use of ANSI bold for numbers appearing to the left of menuitems and the use of special .Dq Li ansi -variables describd below. +variables described below. .It Va autoboot_delay Number of seconds .Ic menu-display @@ -117,14 +118,18 @@ for additional information. .It Va menu_timeout_command The command to be executed after .Va autoboot_delay -seconds if a key is not pressed. The default is +seconds if a key is not pressed. +The default is .Ic boot . .It Va loader_menu_timeout_x -Sets the desired column position of the timeout countdown text. Default is 4. +Sets the desired column position of the timeout countdown text. +Default is 4. .It Va loader_menu_timeout_y -Sets the desired row position of the timeout countdown text. Default is 23. +Sets the desired row position of the timeout countdown text. +Default is 23. .It Va loader_menu_title -The text to display centered above the menu. Default is +The text to display centered above the menu. +Default is .Dq Li "Welcome to FreeBSD" . .It Va menu_caption[x] The text to be displayed for the numbered menuitem @@ -132,7 +137,8 @@ The text to be displayed for the numbere .It Va menu_command[x] The command to be executed when the number associated with menuitem .Dq Li x -is pressed. See the list of included FICL words below for some ideas. +is pressed. +See the list of included FICL words below for some ideas. .It Va menu_keycode[x] An optional decimal ASCII keycode to be associated with menuitem .Dq Li x . @@ -201,7 +207,8 @@ menuitem (if configured). .It Va hint.acpi.0.disabled Effects the display of the .Va menu_acpi -menuitem. If set, the menuitem will display +menuitem. +If set, the menuitem will display .Va toggled_text[x] .Va ( toggled_ansi[x] if @@ -225,7 +232,8 @@ and .It Va menu_reboot If set, adds a built-in .Dq Li Reboot -menuitem to the end of the last configured menuitem. If +menuitem to the end of the last configured menuitem. +If .Va menu_options is configured, the .Dq Li Reboot From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 20:16:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 367591065673; Thu, 26 Apr 2012 20:16:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E0288FC15; Thu, 26 Apr 2012 20:16:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QKG12q066770; Thu, 26 Apr 2012 20:16:01 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QKG0SJ066754; Thu, 26 Apr 2012 20:16:00 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201204262016.q3QKG0SJ066754@svn.freebsd.org> From: Glen Barber Date: Thu, 26 Apr 2012 20:16:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234719 - in stable/8: lib/libc/sys lib/libmemstat lib/libpmc lib/libusb lib/libvgl sbin/iscontrol share/man/man4 share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 20:16:01 -0000 Author: gjb (doc committer) Date: Thu Apr 26 20:16:00 2012 New Revision: 234719 URL: http://svn.freebsd.org/changeset/base/234719 Log: MFC r232157, r232158: r232157: Fix various typos in manual pages. Submitted by: amdmi3 PR: 165431 r232158: Whitespace cleanup: o Wrap sentences on to new lines o Cleanup trailing whitespace Modified: stable/8/lib/libc/sys/posix_fadvise.2 stable/8/lib/libc/sys/posix_fallocate.2 stable/8/lib/libmemstat/libmemstat.3 stable/8/lib/libpmc/pmc.westmere.3 stable/8/lib/libusb/libusb.3 stable/8/lib/libvgl/vgl.3 stable/8/sbin/iscontrol/iscsi.conf.5 stable/8/share/man/man4/acpi_panasonic.4 stable/8/share/man/man4/cxgbe.4 stable/8/share/man/man4/ed.4 stable/8/share/man/man4/mac_lomac.4 stable/8/share/man/man4/umcs.4 stable/8/share/man/man4/vr.4 stable/8/share/man/man9/zone.9 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) stable/8/lib/libmemstat/ (props changed) stable/8/lib/libpmc/ (props changed) stable/8/lib/libusb/ (props changed) stable/8/lib/libvgl/ (props changed) stable/8/sbin/iscontrol/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/share/man/man9/ (props changed) Modified: stable/8/lib/libc/sys/posix_fadvise.2 ============================================================================== --- stable/8/lib/libc/sys/posix_fadvise.2 Thu Apr 26 20:14:26 2012 (r234718) +++ stable/8/lib/libc/sys/posix_fadvise.2 Thu Apr 26 20:16:00 2012 (r234719) @@ -28,7 +28,7 @@ .\" @(#)madvise.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd October 26, 2011 +.Dd February 25, 2012 .Dt POSIX_FADVISE 2 .Os .Sh NAME @@ -74,7 +74,7 @@ This currently does nothing as the defau detect sequential behavior. .It Dv POSIX_FADV_WILLNEED Tells the system that the specified data will be accessed in the near future. -The system may initiate an asychronous read of the data if it is not already +The system may initiate an asynchronous read of the data if it is not already present in memory. .It Dv POSIX_FADV_DONTNEED Tells the system that the specified data will not be accessed in the near Modified: stable/8/lib/libc/sys/posix_fallocate.2 ============================================================================== --- stable/8/lib/libc/sys/posix_fallocate.2 Thu Apr 26 20:14:26 2012 (r234718) +++ stable/8/lib/libc/sys/posix_fallocate.2 Thu Apr 26 20:16:00 2012 (r234719) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd April 13, 2011 +.Dd February 25, 2012 .Dt POSIX_FALLOCATE 2 .Os .Sh NAME @@ -48,7 +48,7 @@ to .Fa len in the file referenced by .Fa fd -is guarateed to be allocated upon successful return. +is guaranteed to be allocated upon successful return. That is, if .Fn posix_fallocate returns successfully, subsequent writes to the specified file data Modified: stable/8/lib/libmemstat/libmemstat.3 ============================================================================== --- stable/8/lib/libmemstat/libmemstat.3 Thu Apr 26 20:14:26 2012 (r234718) +++ stable/8/lib/libmemstat/libmemstat.3 Thu Apr 26 20:16:00 2012 (r234719) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 27, 2005 +.Dd February 25, 2012 .Dt LIBMEMSTAT 3 .Os .Sh NAME @@ -345,7 +345,7 @@ Return a caller-owned per-CPU pointer fo Set a caller-owned per-CPU pointer for the memory type. .It Fn memstat_get_percpu_caller_uint64 Return a caller-owned per-CPU integer for the memory type. -.It Fn memsttat_set_percpu_caller_uint64 +.It Fn memstat_set_percpu_caller_uint64 Set a caller-owned per-CPU integer for the memory type. .It Fn memstat_get_percpu_free If the memory allocator supports a per-CPU cache, return the number of free Modified: stable/8/lib/libpmc/pmc.westmere.3 ============================================================================== --- stable/8/lib/libpmc/pmc.westmere.3 Thu Apr 26 20:14:26 2012 (r234718) +++ stable/8/lib/libpmc/pmc.westmere.3 Thu Apr 26 20:16:00 2012 (r234719) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 24, 2010 +.Dd February 25, 2012 .Dt PMC.WESTMERE 3 .Os .Sh NAME @@ -643,7 +643,7 @@ Counter 0. .Pq Event 60H , Umask 08H Counts weighted cycles of offcore read requests of any kind. Include L2 prefetch requests. -Ccounter 0. +Counter 0. .It Li CACHE_LOCK_CYCLES.L1D_L2 .Pq Event 63H , Umask 01H Cycle count during which the L1D and L2 are locked. A lock is asserted when Modified: stable/8/lib/libusb/libusb.3 ============================================================================== --- stable/8/lib/libusb/libusb.3 Thu Apr 26 20:14:26 2012 (r234718) +++ stable/8/lib/libusb/libusb.3 Thu Apr 26 20:16:00 2012 (r234719) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 9, 2011 +.Dd February 25, 2012 .Dt LIBUSB 3 .Os .Sh NAME @@ -483,7 +483,7 @@ on success and a LIBUSB_ERROR code on fa .Pp .Ft int .Fn libusb_handle_events_locked "libusb_context *ctx" "struct timeval *tv" -Handle any pending events by polling file desciptors, without checking if +Handle any pending events by polling file descriptors, without checking if another thread is already doing so. Must be called with the event lock held. .Pp Modified: stable/8/lib/libvgl/vgl.3 ============================================================================== --- stable/8/lib/libvgl/vgl.3 Thu Apr 26 20:14:26 2012 (r234718) +++ stable/8/lib/libvgl/vgl.3 Thu Apr 26 20:16:00 2012 (r234719) @@ -25,7 +25,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd November 7, 1999 +.Dd February 25, 2012 .Dt VGL 3 .Os .Sh NAME @@ -385,7 +385,7 @@ Passing an in-memory bitmap to this func The desired virtual screen width may not be achievable because of the video card hardware. In such case the video driver (and -underlaying video BIOS) may choose the next largest values. +underlying video BIOS) may choose the next largest values. Always examine .Va object->VXsize and Modified: stable/8/sbin/iscontrol/iscsi.conf.5 ============================================================================== --- stable/8/sbin/iscontrol/iscsi.conf.5 Thu Apr 26 20:14:26 2012 (r234718) +++ stable/8/sbin/iscontrol/iscsi.conf.5 Thu Apr 26 20:16:00 2012 (r234719) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 5, 2007 +.Dd February 25, 2012 .Dt ISCSI.CONF 5 .Os .Sh NAME @@ -39,7 +39,7 @@ program. It contains declarations and parameter/key-options. The syntax is very simple, .D1 Li variable = value; -and they can be grouped via a +and they can be grouped via a .Em block declaration: .Bf Li @@ -60,7 +60,7 @@ currently only supported authentication digest either MD5 or SHA. Default is none. .It Cm HeaderDigest -a +a .Em digest is calculated on the header of all iSCSI PDUs, and checked. @@ -113,7 +113,7 @@ bytes it can receive in an iSCSI PDU, de .It Cm MaxOutstandingR2T is used to calculate/negotiate the .Em tag opening , -can be overriden by the +can be overridden by the .Sy tag option. .It Cm DataPDUInOrder @@ -141,7 +141,7 @@ to the value specified. .It Cm maxluns overrides the compiled value of .Sy luns , -see +see .Xr iscsi_initiator 4 . This value can only be reduced. .It Cm sockbufsize @@ -185,7 +185,7 @@ myiscsi { # nickname targetaddress = iscsi1 targetname = iqn.1900.com.com:sn.123456 } -chaptest { +chaptest { targetaddress= 10.0.0.1; targetname = iqn.1900.com.com:sn.123456 initiatorname= iqn.2005-01.il.ac.huji.cs:nobody Modified: stable/8/share/man/man4/acpi_panasonic.4 ============================================================================== --- stable/8/share/man/man4/acpi_panasonic.4 Thu Apr 26 20:14:26 2012 (r234718) +++ stable/8/share/man/man4/acpi_panasonic.4 Thu Apr 26 20:16:00 2012 (r234719) @@ -25,8 +25,8 @@ .\" .\" $FreeBSD$ .\" -.Dd September 17, 2009 -.Dt ACPI_PANASONIC 4 i386 +.Dd February 25, 2012 +.Dt ACPI_PANASONIC 4 .Os .Sh NAME .Nm acpi_panasonic @@ -66,7 +66,7 @@ The third and last is to provide a way t sound mute state via .Xr sysctl 8 . .Ss Hotkeys -There are 9 hotkeys available on the supported hardwares: +There are 9 hotkeys available on the supported hardware: .Pp .Bl -tag -compact -offset indent .It Sy Fn+F1 Modified: stable/8/share/man/man4/cxgbe.4 ============================================================================== --- stable/8/share/man/man4/cxgbe.4 Thu Apr 26 20:14:26 2012 (r234718) +++ stable/8/share/man/man4/cxgbe.4 Thu Apr 26 20:16:00 2012 (r234719) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 14, 2011 +.Dd February 25, 2012 .Dt CXGBE 4 .Os .Sh NAME @@ -56,7 +56,7 @@ The .Nm driver provides support for PCI Express Ethernet adapters based on the Chelsio Terminator 4 (T4) ASIC. -The driver supprts Jumbo Frames, Transmit/Receive checksum offload, +The driver supports Jumbo Frames, Transmit/Receive checksum offload, TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN tag insertion/extraction, VLAN checksum offload, VLAN TSO, and Receive Side Steering (RSS). @@ -100,28 +100,36 @@ prompt before booting the kernel or stor .Xr loader.conf 5 . .Bl -tag -width indent .It Va hw.cxgbe.ntxq10g -The number of tx queues to use for a 10Gb port. The default is 16 or the number +The number of tx queues to use for a 10Gb port. +The default is 16 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nrxq10g -The number of rx queues to use for a 10Gb port. The default is 8 or the number +The number of rx queues to use for a 10Gb port. +The default is 8 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.ntxq1g -The number of tx queues to use for a 1Gb port. The default is 4 or the number +The number of tx queues to use for a 1Gb port. +The default is 4 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nrxq1g -The number of rx queues to use for a 1Gb port. The default is 2 or the number +The number of rx queues to use for a 1Gb port. +The default is 2 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldtxq10g -The number of TOE tx queues to use for a 10Gb port. The default is 8 or the +The number of TOE tx queues to use for a 10Gb port. +The default is 8 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldrxq10g -The number of TOE rx queues to use for a 10Gb port. The default is 2 or the +The number of TOE rx queues to use for a 10Gb port. +The default is 2 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldtxq1g -The number of TOE tx queues to use for a 1Gb port. The default is 2 or the +The number of TOE tx queues to use for a 1Gb port. +The default is 2 or the number of CPU cores in the system, whichever is less. .It Va hw.cxgbe.nofldrxq1g -The number of TOE rx queues to use for a 1Gb port. The default is 1. +The number of TOE rx queues to use for a 1Gb port. +The default is 1. .It Va hw.cxgbe.holdoff_timer_idx_10G .It Va hw.cxgbe.holdoff_timer_idx_1G The timer index value to use to delay interrupts. @@ -149,7 +157,8 @@ ifconfig up). The size, in number of entries, of the descriptor ring used for a tx queue. A buf_ring of the same size is also allocated for additional -software queuing. See +software queuing. +See .Xr ifnet 9 . The default value is 1024. Different cxgbe interfaces can be assigned different values via the Modified: stable/8/share/man/man4/ed.4 ============================================================================== --- stable/8/share/man/man4/ed.4 Thu Apr 26 20:14:26 2012 (r234718) +++ stable/8/share/man/man4/ed.4 Thu Apr 26 20:16:00 2012 (r234719) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 9, 2009 +.Dd February 25, 2012 .Dt ED 4 .Os .Sh NAME @@ -285,7 +285,7 @@ Surecom EtherPerfect EP-427 .It Surecom NE-34 .It -TDK 3000/3400/5670 Fast Etherenet/Modem +TDK 3000/3400/5670 Fast Ethernet/Modem .It TDK LAK-CD031, Grey Cell GCS2000 Ethernet Card .It @@ -419,8 +419,8 @@ packets are received. As a result, it may throw out some good packets which have been received but not yet transferred from the card to main memory. .Pp -The -.Nm +The +.Nm driver is slow by today's standards. .Pp PC Card attachment supports the D-Link DMF650TX LAN/Modem card's Ethernet Modified: stable/8/share/man/man4/mac_lomac.4 ============================================================================== --- stable/8/share/man/man4/mac_lomac.4 Thu Apr 26 20:14:26 2012 (r234718) +++ stable/8/share/man/man4/mac_lomac.4 Thu Apr 26 20:16:00 2012 (r234719) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 11, 2002 +.Dd February 25, 2012 .Dt MAC_LOMAC 4 .Os .Sh NAME @@ -63,7 +63,7 @@ which protects the integrity of system o an information flow policy coupled with the subject demotion via floating labels. In LOMAC, all system subjects and objects are assigned integrity labels, made -up of one or more hierarchal grades, depending on the their types. +up of one or more hierarchical grades, depending on the their types. Together, these label elements permit all labels to be placed in a partial order, with information flow protections and demotion decisions based on a dominance operator Modified: stable/8/share/man/man4/umcs.4 ============================================================================== --- stable/8/share/man/man4/umcs.4 Thu Apr 26 20:14:26 2012 (r234718) +++ stable/8/share/man/man4/umcs.4 Thu Apr 26 20:16:00 2012 (r234719) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 10, 2010 +.Dd February 25, 2012 .Dt UMCS 4 .Os .Sh NAME @@ -52,9 +52,11 @@ umcs_load="YES" The .Nm driver provides support for various multiport serial adapters based on the MosCom -MCS7820 and MCS7840 chips. They are 2- or 4-port adapters with full-featured -16550-compatible UARTs and very flexible baud generators. Also, these chips -support RS422/RS485 and IrDA oprations. +MCS7820 and MCS7840 chips. +They are 2- or 4-port adapters with full-featured +16550-compatible UARTs and very flexible baud generators. +Also, these chips +support RS422/RS485 and IrDA operations. .Pp The device is accessed through the .Xr ucom 4 Modified: stable/8/share/man/man4/vr.4 ============================================================================== --- stable/8/share/man/man4/vr.4 Thu Apr 26 20:14:26 2012 (r234718) +++ stable/8/share/man/man4/vr.4 Thu Apr 26 20:16:00 2012 (r234719) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 7, 2010 +.Dd February 25, 2012 .Dt VR 4 .Os .Sh NAME @@ -95,7 +95,7 @@ or .Ar half-duplex modes. .It 100baseTX -Set 100Mbps (Fast Fthernet) operation. +Set 100Mbps (Fast Ethernet) operation. The .Ar mediaopt option can also be used to select either Modified: stable/8/share/man/man9/zone.9 ============================================================================== --- stable/8/share/man/man9/zone.9 Thu Apr 26 20:14:26 2012 (r234718) +++ stable/8/share/man/man9/zone.9 Thu Apr 26 20:16:00 2012 (r234719) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 9, 2010 +.Dd February 25, 2012 .Dt ZONE 9 .Os .Sh NAME @@ -210,7 +210,7 @@ The .Fn uma_zone_get_cur function returns the approximate current occupancy of the zone. The returned value is approximate because appropriate synchronisation to -determine an exact value is not performend by the implementation. +determine an exact value is not performed by the implementation. This ensures low overhead at the expense of potentially stale data being used in the calculation. .Sh RETURN VALUES From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 20:19:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FD361065675; Thu, 26 Apr 2012 20:19:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 416CB8FC19; Thu, 26 Apr 2012 20:19:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QKJ6Lt066929; Thu, 26 Apr 2012 20:19:06 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QKJ6kd066927; Thu, 26 Apr 2012 20:19:06 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201204262019.q3QKJ6kd066927@svn.freebsd.org> From: Dimitry Andric Date: Thu, 26 Apr 2012 20:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234720 - stable/9/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 20:19:06 -0000 Author: dim Date: Thu Apr 26 20:19:05 2012 New Revision: 234720 URL: http://svn.freebsd.org/changeset/base/234720 Log: MFC r234289: Add files and directories to be cleaned up if WITHOUT_GCC is in effect to OptionalObsoleteFiles.inc. Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/tools/ (props changed) Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Thu Apr 26 20:16:00 2012 (r234719) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Thu Apr 26 20:19:05 2012 (r234720) @@ -1409,6 +1409,42 @@ OLD_FILES+=usr/share/man/man8/strfile.8. OLD_FILES+=usr/share/man/man8/unstr.8.gz .endif +.if ${MK_GCC} == no +OLD_FILES+=usr/bin/c++filt +OLD_FILES+=usr/bin/g++ +OLD_FILES+=usr/bin/gcc +OLD_FILES+=usr/bin/gcov +OLD_FILES+=usr/bin/gcpp +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" +OLD_FILES+=usr/include/gcc/4.2/emmintrin.h +OLD_FILES+=usr/include/gcc/4.2/mm_malloc.h +OLD_FILES+=usr/include/gcc/4.2/mmintrin.h +OLD_FILES+=usr/include/gcc/4.2/pmmintrin.h +OLD_FILES+=usr/include/gcc/4.2/tmmintrin.h +OLD_FILES+=usr/include/gcc/4.2/xmmintrin.h +.elif ${TARGET_ARCH} == "ia64" +OLD_FILES+=usr/include/gcc/4.2/ia64intrin.h +.elif ${TARGET_ARCH} == "arm" +OLD_FILES+=usr/include/gcc/4.2/mmintrin.h +.elif ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "powerpc64" +OLD_FILES+=usr/include/gcc/4.2/altivec.h +OLD_FILES+=usr/include/gcc/4.2/ppc-asm.h +OLD_FILES+=usr/include/gcc/4.2/spe.h +.endif +OLD_DIRS+=usr/include/gcc/4.2 +OLD_DIRS+=usr/include/gcc +OLD_FILES+=usr/libexec/cc1 +OLD_FILES+=usr/libexec/cc1plus +OLD_FILES+=usr/share/info/cpp.info.gz +OLD_FILES+=usr/share/info/cppinternals.info.gz +OLD_FILES+=usr/share/info/gcc.info.gz +OLD_FILES+=usr/share/info/gccint.info.gz +OLD_FILES+=usr/share/man/man1/g++.1.gz +OLD_FILES+=usr/share/man/man1/gcc.1.gz +OLD_FILES+=usr/share/man/man1/gcov.1.gz +OLD_FILES+=usr/share/man/man1/gcpp.1.gz +.endif + .if ${MK_GCOV} == no OLD_FILES+=usr/bin/gcov OLD_FILES+=usr/share/man/man1/gcov.1.gz From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 20:22:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15AEE1065675; Thu, 26 Apr 2012 20:22:15 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F27E18FC1D; Thu, 26 Apr 2012 20:22:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QKMEts067134; Thu, 26 Apr 2012 20:22:14 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QKMECb067132; Thu, 26 Apr 2012 20:22:14 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201204262022.q3QKMECb067132@svn.freebsd.org> From: Glen Barber Date: Thu, 26 Apr 2012 20:22:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234721 - stable/9/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 20:22:15 -0000 Author: gjb (doc committer) Date: Thu Apr 26 20:22:14 2012 New Revision: 234721 URL: http://svn.freebsd.org/changeset/base/234721 Log: MFC r232159: Whitespace cleanup: o Wrap sentences on to new lines o Rewrap lines where possible while trying to keep the diff to a minimum Modified: stable/9/lib/libpmc/pmc.westmere.3 Directory Properties: stable/9/lib/libpmc/ (props changed) Modified: stable/9/lib/libpmc/pmc.westmere.3 ============================================================================== --- stable/9/lib/libpmc/pmc.westmere.3 Thu Apr 26 20:19:05 2012 (r234720) +++ stable/9/lib/libpmc/pmc.westmere.3 Thu Apr 26 20:22:14 2012 (r234721) @@ -92,15 +92,17 @@ Configure the Off-core Response bits. .It Li DMND_DATA_RD Counts the number of demand and DCU prefetch data reads of full and partial cachelines as well as demand data page table entry -cacheline reads. Does not count L2 data read prefetches or +cacheline reads. +Does not count L2 data read prefetches or instruction fetches. .It Li DMND_RFO Counts the number of demand and DCU prefetch reads for ownership -(RFO) requests generated by a write to data cacheline. Does not -count L2 RFO. +(RFO) requests generated by a write to data cacheline. +Does not count L2 RFO. .It Li DMND_IFETCH Counts the number of demand and DCU prefetch instruction cacheline -reads. Does not count L2 code read prefetches. +reads. +Does not count L2 code read prefetches. WB Counts the number of writeback (modified to exclusive) transactions. .It Li PF_DATA_RD @@ -181,7 +183,8 @@ All Store buffer stall cycles All store referenced with misaligned address .It Li STORE_BLOCKS.AT_RET .Pq Event 06H , Umask 04H -Counts number of loads delayed with at-Retirement block code. The following +Counts number of loads delayed with at-Retirement block code. +The following loads need to be executed at retirement and wait for all senior stores on the same thread to be drained: load splitting across 4K boundary (page split), load accessing uncacheable (UC or USWC) memory, load lock, and load @@ -225,9 +228,10 @@ ld_lat facility. In conjunction with ld_lat facility .It Li MEM_STORE_RETIRED.DTLB_MISS .Pq Event 0CH , Umask 01H -The event counts the number of retired stores that missed the DTLB. The DTLB -miss is not counted if the store operation causes a fault. Does not counter -prefetches. Counts both primary and secondary misses to the TLB +The event counts the number of retired stores that missed the DTLB. +The DTLB miss is not counted if the store operation causes a fault. +Does not counter prefetches. +Counts both primary and secondary misses to the TLB .It Li UOPS_ISSUED.ANY .Pq Event 0EH , Umask 01H Counts the number of Uops issued by the Register Allocation Table to the @@ -264,9 +268,11 @@ Load instructions retired remote DRAM an Load instructions retired I/O (Precise Event) .It Li FP_COMP_OPS_EXE.X87 .Pq Event 10H , Umask 01H -Counts the number of FP Computational Uops Executed. The number of FADD, +Counts the number of FP Computational Uops Executed. +The number of FADD, FSUB, FCOM, FMULs, integer MULsand IMULs, FDIVs, FPREMs, FSQRTS, integer -DIVs, and IDIVs. This event does not distinguish an FADD used in the middle +DIVs, and IDIVs. +This event does not distinguish an FADD used in the middle of a transcendental flow from a separate FADD instruction. .It Li FP_COMP_OPS_EXE.MMX .Pq Event 10H , Umask 02H @@ -316,9 +322,9 @@ Counts number of loads dispatched from t the Memory Order Buffer. .It Li LOAD_DISPATCH.RS_DELAYED .Pq Event 13H , Umask 02H -Counts the number of delayed RS dispatches at the stage latch. If an RS -dispatch can not bypass to LB, it has another chance to dispatch from the -one-cycle delayed staging latch before it is written into the LB. +Counts the number of delayed RS dispatches at the stage latch. +If an RS dispatch can not bypass to LB, it has another chance to dispatch +from the one-cycle delayed staging latch before it is written into the LB. .It Li LOAD_DISPATCH.MOB .Pq Event 13H , Umask 04H Counts the number of loads dispatched from the Reservation Station to the @@ -329,13 +335,15 @@ Counts all loads dispatched from the Res .It Li ARITH.CYCLES_DIV_BUSY .Pq Event 14H , Umask 01H Counts the number of cycles the divider is busy executing divide or square -root operations. The divide can be integer, X87 or Streaming SIMD Extensions -(SSE). The square root operation can be either X87 or SSE. +root operations. +The divide can be integer, X87 or Streaming SIMD Extensions (SSE). +The square root operation can be either X87 or SSE. Set 'edge =1, invert=1, cmask=1' to count the number of divides. Count may be incorrect When SMT is on .It Li ARITH.MUL .Pq Event 14H , Umask 02H -Counts the number of multiply operations executed. This includes integer as +Counts the number of multiply operations executed. +This includes integer as well as floating point multiply operations but excludes DPPS mul and MPSAD. Count may be incorrect When SMT is on .It Li INST_QUEUE_WRITES @@ -344,64 +352,72 @@ Counts the number of instructions writte cycle. .It Li INST_DECODED.DEC0 .Pq Event 18H , Umask 01H -Counts number of instructions that require decoder 0 to be decoded. Usually, -this means that the instruction maps to more than 1 uop +Counts number of instructions that require decoder 0 to be decoded. +Usually, this means that the instruction maps to more than 1 uop .It Li TWO_UOP_INSTS_DECODED .Pq Event 19H , Umask 01H An instruction that generates two uops was decoded .It Li INST_QUEUE_WRITE_CYCLES .Pq Event 1EH , Umask 01H This event counts the number of cycles during which instructions are written -to the instruction queue. Dividing this counter by the number of +to the instruction queue. +Dividing this counter by the number of instructions written to the instruction queue (INST_QUEUE_WRITES) yields the -average number of instructions decoded each cycle. If this number is less +average number of instructions decoded each cycle. +If this number is less than four and the pipe stalls, this indicates that the decoder is failing to decode enough instructions per cycle to sustain the 4-wide pipeline. If SSE* instructions that are 6 bytes or longer arrive one after another, -then front end throughput may limit execution speed. In such case, +then front end throughput may limit execution speed. +In such case, .It Li LSD_OVERFLOW .Pq Event 20H , Umask 01H Number of loops that can not stream from the instruction queue. .It Li L2_RQSTS.LD_HIT .Pq Event 24H , Umask 01H -Counts number of loads that hit the L2 cache. L2 loads include both L1D -demand misses as well as L1D prefetches. L2 loads can be rejected for -various reasons. Only non rejected loads are counted. +Counts number of loads that hit the L2 cache. +L2 loads include both L1D demand misses as well as L1D prefetches. +L2 loads can be rejected for various reasons. +Only non rejected loads are counted. .It Li L2_RQSTS.LD_MISS .Pq Event 24H , Umask 02H -Counts the number of loads that miss the L2 cache. L2 loads include both L1D -demand misses as well as L1D prefetches. +Counts the number of loads that miss the L2 cache. +L2 loads include both L1D demand misses as well as L1D prefetches. .It Li L2_RQSTS.LOADS .Pq Event 24H , Umask 03H -Counts all L2 load requests. L2 loads include both L1D demand misses as well -as L1D prefetches. +Counts all L2 load requests. +L2 loads include both L1D demand misses as well as L1D prefetches. .It Li L2_RQSTS.RFO_HIT .Pq Event 24H , Umask 04H -Counts the number of store RFO requests that hit the L2 cache. L2 RFO -requests include both L1D demand RFO misses as well as L1D RFO prefetches. +Counts the number of store RFO requests that hit the L2 cache. +L2 RFO requests include both L1D demand RFO misses as well as L1D RFO +prefetches. Count includes WC memory requests, where the data is not fetched but the permission to write the line is required. .It Li L2_RQSTS.RFO_MISS .Pq Event 24H , Umask 08H -Counts the number of store RFO requests that miss the L2 cache. L2 RFO -requests include both L1D demand RFO misses as well as L1D RFO prefetches. +Counts the number of store RFO requests that miss the L2 cache. +L2 RFO requests include both L1D demand RFO misses as well as L1D RFO +prefetches. .It Li L2_RQSTS.RFOS .Pq Event 24H , Umask 0CH -Counts all L2 store RFO requests. L2 RFO requests include both L1D demand +Counts all L2 store RFO requests. +L2 RFO requests include both L1D demand RFO misses as well as L1D RFO prefetches. .It Li L2_RQSTS.IFETCH_HIT .Pq Event 24H , Umask 10H -Counts number of instruction fetches that hit the L2 cache. L2 instruction -fetches include both L1I demand misses as well as L1I instruction -prefetches. +Counts number of instruction fetches that hit the L2 cache. +L2 instruction fetches include both L1I demand misses as well as L1I +instruction prefetches. .It Li L2_RQSTS.IFETCH_MISS .Pq Event 24H , Umask 20H -Counts number of instruction fetches that miss the L2 cache. L2 instruction -fetches include both L1I demand misses as well as L1I instruction -prefetches. +Counts number of instruction fetches that miss the L2 cache. +L2 instruction fetches include both L1I demand misses as well as L1I +instruction prefetches. .It Li L2_RQSTS.IFETCHES .Pq Event 24H , Umask 30H -Counts all instruction fetches. L2 instruction fetches include both L1I +Counts all instruction fetches. +L2 instruction fetches include both L1I demand misses as well as L1I instruction prefetches. .It Li L2_RQSTS.PREFETCH_HIT .Pq Event 24H , Umask 40H @@ -421,26 +437,30 @@ Counts all L2 requests for both code and .It Li L2_DATA_RQSTS.DEMAND.I_STATE .Pq Event 26H , Umask 01H Counts number of L2 data demand loads where the cache line to be loaded is -in the I (invalid) state, i.e. a cache miss. L2 demand loads are both L1D -demand misses and L1D prefetches. +in the I (invalid) state, i.e. a cache miss. +L2 demand loads are both L1D demand misses and L1D prefetches. .It Li L2_DATA_RQSTS.DEMAND.S_STATE .Pq Event 26H , Umask 02H Counts number of L2 data demand loads where the cache line to be loaded is -in the S (shared) state. L2 demand loads are both L1D demand misses and L1D +in the S (shared) state. +L2 demand loads are both L1D demand misses and L1D prefetches. .It Li L2_DATA_RQSTS.DEMAND.E_STATE .Pq Event 26H , Umask 04H Counts number of L2 data demand loads where the cache line to be loaded is -in the E (exclusive) state. L2 demand loads are both L1D demand misses and +in the E (exclusive) state. +L2 demand loads are both L1D demand misses and L1D prefetches. .It Li L2_DATA_RQSTS.DEMAND.M_STATE .Pq Event 26H , Umask 08H Counts number of L2 data demand loads where the cache line to be loaded is -in the M (modified) state. L2 demand loads are both L1D demand misses and +in the M (modified) state. +L2 demand loads are both L1D demand misses and L1D prefetches. .It Li L2_DATA_RQSTS.DEMAND.MESI .Pq Event 26H , Umask 0FH -Counts all L2 data demand requests. L2 demand loads are both L1D demand +Counts all L2 data demand requests. +L2 demand loads are both L1D demand misses and L1D prefetches. .It Li L2_DATA_RQSTS.PREFETCH.I_STATE .Pq Event 26H , Umask 10H @@ -449,7 +469,8 @@ in the I (invalid) state, i.e. a cache m .It Li L2_DATA_RQSTS.PREFETCH.S_STATE .Pq Event 26H , Umask 20H Counts number of L2 prefetch data loads where the cache line to be loaded is -in the S (shared) state. A prefetch RFO will miss on an S state line, while +in the S (shared) state. +A prefetch RFO will miss on an S state line, while a prefetch read will hit on an S state line. .It Li L2_DATA_RQSTS.PREFETCH.E_STATE .Pq Event 26H , Umask 40H @@ -468,23 +489,27 @@ Counts all L2 data requests. .It Li L2_WRITE.RFO.I_STATE .Pq Event 27H , Umask 01H Counts number of L2 demand store RFO requests where the cache line to be -loaded is in the I (invalid) state, i.e, a cache miss. The L1D prefetcher +loaded is in the I (invalid) state, i.e, a cache miss. +The L1D prefetcher does not issue a RFO prefetch. This is a demand RFO request .It Li L2_WRITE.RFO.S_STATE .Pq Event 27H , Umask 02H Counts number of L2 store RFO requests where the cache line to be loaded is -in the S (shared) state. The L1D prefetcher does not issue a RFO prefetch. +in the S (shared) state. +The L1D prefetcher does not issue a RFO prefetch. This is a demand RFO request. .It Li L2_WRITE.RFO.M_STATE .Pq Event 27H , Umask 08H Counts number of L2 store RFO requests where the cache line to be loaded is -in the M (modified) state. The L1D prefetcher does not issue a RFO prefetch. +in the M (modified) state. +The L1D prefetcher does not issue a RFO prefetch. This is a demand RFO request. .It Li L2_WRITE.RFO.HIT .Pq Event 27H , Umask 0EH Counts number of L2 store RFO requests where the cache line to be loaded is -in either the S, E or M states. The L1D prefetcher does not issue a RFO +in either the S, E or M states. +The L1D prefetcher does not issue a RFO prefetch. This is a demand RFO request .It Li L2_WRITE.RFO.MESI @@ -536,21 +561,23 @@ is in the M (modified) state. Counts all L1 writebacks to the L2. .It Li L3_LAT_CACHE.REFERENCE .Pq Event 2EH , Umask 02H -Counts uncore Last Level Cache references. Because cache hierarchy, cache +Counts uncore Last Level Cache references. +Because cache hierarchy, cache sizes and other implementation-specific characteristics; value comparison to estimate performance differences is not recommended. See Table A-1. .It Li L3_LAT_CACHE.MISS .Pq Event 2EH , Umask 01H -Counts uncore Last Level Cache misses. Because cache hierarchy, cache sizes +Counts uncore Last Level Cache misses. +Because cache hierarchy, cache sizes and other implementation-specific characteristics; value comparison to estimate performance differences is not recommended. See Table A-1. .It Li CPU_CLK_UNHALTED.THREAD_P .Pq Event 3CH , Umask 00H Counts the number of thread cycles while the thread is not in a halt state. -The thread enters the halt state when it is running the HLT instruction. The -core frequency may change from time to time due to power or thermal +The thread enters the halt state when it is running the HLT instruction. +The core frequency may change from time to time due to power or thermal throttling. see Table A-1 .It Li CPU_CLK_UNHALTED.REF_P @@ -569,7 +596,8 @@ Counts cycles of page walk due to misses .It Li DTLB_MISSES.STLB_HIT .Pq Event 49H , Umask 10H Counts the number of DTLB first level misses that hit in the second level -TLB. This event is only relevant if the core contains multiple DTLB levels. +TLB. +This event is only relevant if the core contains multiple DTLB levels. .It Li DTLB_MISSES.LARGE_WALK_COMPLETED .Pq Event 49H , Umask 80H Counts number of completed large page walks due to misses in the STLB. @@ -584,17 +612,22 @@ Counts number of hardware prefetch reque FIFO. .It Li L1D_PREFETCH.MISS .Pq Event 4EH , Umask 02H -Counts number of hardware prefetch requests that miss the L1D. There are two -prefetchers in the L1D. A streamer, which predicts lines sequentially after +Counts number of hardware prefetch requests that miss the L1D. +There are two +prefetchers in the L1D. +A streamer, which predicts lines sequentially after this one should be fetched, and the IP prefetcher that remembers access -patterns for the current instruction. The streamer prefetcher stops on an +patterns for the current instruction. +The streamer prefetcher stops on an L1D hit, while the IP prefetcher does not. .It Li L1D_PREFETCH.TRIGGERS .Pq Event 4EH , Umask 04H Counts number of prefetch requests triggered by the Finite State Machine and -pushed into the prefetch FIFO. Some of the prefetch requests are dropped due +pushed into the prefetch FIFO. +Some of the prefetch requests are dropped due to overwrites or competition between the IP index prefetcher and streamer -prefetcher. The prefetch FIFO contains 4 entries. +prefetcher. +The prefetch FIFO contains 4 entries. .It Li EPT.WALK_CYCLES .Pq Event 4FH , Umask 10H Counts Extended Page walk cycles. @@ -626,31 +659,33 @@ Counts the number of cacheable load lock accepted into the fill buffer. .It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND.READ_DATA .Pq Event 60H , Umask 01H -Counts weighted cycles of offcore demand data read requests. Does not -include L2 prefetch requests. +Counts weighted cycles of offcore demand data read requests. +Does not include L2 prefetch requests. Counter 0. .It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND.READ_CODE .Pq Event 60H , Umask 02H -Counts weighted cycles of offcore demand code read requests. Does not -include L2 prefetch requests. +Counts weighted cycles of offcore demand code read requests. +Does not include L2 prefetch requests. Counter 0. .It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND.RFO .Pq Event 60H , Umask 04H -Counts weighted cycles of offcore demand RFO requests. Does not include L2 -prefetch requests. +Counts weighted cycles of offcore demand RFO requests. +Does not include L2 prefetch requests. Counter 0. .It Li OFFCORE_REQUESTS_OUTSTANDING.ANY.READ .Pq Event 60H , Umask 08H -Counts weighted cycles of offcore read requests of any kind. Include L2 -prefetch requests. +Counts weighted cycles of offcore read requests of any kind. +Include L2 prefetch requests. Counter 0. .It Li CACHE_LOCK_CYCLES.L1D_L2 .Pq Event 63H , Umask 01H -Cycle count during which the L1D and L2 are locked. A lock is asserted when +Cycle count during which the L1D and L2 are locked. +A lock is asserted when there is a locked memory access, due to uncacheable memory, a locked operation that spans two cache lines, or a page walk from an uncacheable page table. -Counter 0, 1 only. L1D and L2 locks have a very high performance penalty and +Counter 0, 1 only. +L1D and L2 locks have a very high performance penalty and it is highly recommended to avoid such accesses. .It Li CACHE_LOCK_CYCLES.L1D .Pq Event 63H , Umask 02H @@ -665,9 +700,11 @@ Counts the number of completed I/O trans Counts all instruction fetches that hit the L1 instruction cache. .It Li L1I.MISSES .Pq Event 80H , Umask 02H -Counts all instruction fetches that miss the L1I cache. This includes +Counts all instruction fetches that miss the L1I cache. +This includes instruction cache misses, streaming buffer misses, victim cache misses and -uncacheable fetches. An instruction fetch miss is counted only once and not +uncacheable fetches. +An instruction fetch miss is counted only once and not once for every cycle it is outstanding. .It Li L1I.READS .Pq Event 80H , Umask 03H @@ -747,10 +784,10 @@ Counts all near call branches executed, Counts taken near branches executed, but not necessarily retired. .It Li BR_INST_EXEC.ANY .Pq Event 88H , Umask 7FH -Counts all near executed branches (not necessarily retired). This includes -only instructions and not micro-op branches. Frequent branching is not -necessarily a major performance issue. However frequent branch -mispredictions may be a problem. +Counts all near executed branches (not necessarily retired). +This includes only instructions and not micro-op branches. +Frequent branching is not necessarily a major performance issue. +However frequent branch mispredictions may be a problem. .It Li BR_MISP_EXEC.COND .Pq Event 89H , Umask 01H Counts the number of mispredicted conditional near branch instructions @@ -791,9 +828,10 @@ Counts the number of mispredicted near b executed, but not necessarily retired. .It Li RESOURCE_STALLS.ANY .Pq Event A2H , Umask 01H -Counts the number of Allocator resource related stalls. Includes register -renaming buffer entries, memory buffer entries. In addition to resource -related stalls, this event counts some other events. Includes stalls arising +Counts the number of Allocator resource related stalls. +Includes register renaming buffer entries, memory buffer entries. +In addition to resource related stalls, this event counts some other events. +Includes stalls arising during branch misprediction recovery, such as if retirement of the mispredicted branch is delayed and stalls arising while store buffer is draining from synchronizing operations. @@ -806,7 +844,8 @@ Counts the cycles of stall due to lack o .Pq Event A2H , Umask 04H This event counts the number of cycles when the number of instructions in the pipeline waiting for execution reaches the limit the processor can -handle. A high count of this event indicates that there are long latency +handle. +A high count of this event indicates that there are long latency operations in the pipe (possibly load and store operations that miss the L2 cache, or instructions dependent upon instructions further down the pipeline that have yet to retire. @@ -816,7 +855,8 @@ start execution. .Pq Event A2H , Umask 08H This event counts the number of cycles that a resource related stall will occur due to the number of store instructions reaching the limit of the -pipeline, (i.e. all store buffers are used). The stall ends when a store +pipeline, (i.e. all store buffers are used). +The stall ends when a store instruction commits its data to the cache or memory. .It Li RESOURCE_STALLS.ROB_FULL .Pq Event A2H , Umask 10H @@ -828,7 +868,8 @@ floating-point unit (FPU) control word. .It Li RESOURCE_STALLS.MXCSR .Pq Event A2H , Umask 40H Stalls due to the MXCSR register rename occurring to close to a previous -MXCSR rename. The MXCSR provides control and status for the MMX registers. +MXCSR rename. +The MXCSR provides control and status for the MMX registers. .It Li RESOURCE_STALLS.OTHER .Pq Event A2H , Umask 80H Counts the number of cycles while execution was stalled due to other @@ -839,12 +880,14 @@ Counts the number of instructions decode necessarily executed or retired. .It Li BACLEAR_FORCE_IQ .Pq Event A7H , Umask 01H -Counts number of times a BACLEAR was forced by the Instruction Queue. The IQ -is also responsible for providing conditional branch prediction direction -based on a static scheme and dynamic data provided by the L2 Branch -Prediction Unit. If the conditional branch target is not found in the Target +Counts number of times a BACLEAR was forced by the Instruction Queue. +The IQ is also responsible for providing conditional branch prediction +direction based on a static scheme and dynamic data provided by the L2 +Branch Prediction Unit. +If the conditional branch target is not found in the Target Array and the IQ predicts that the branch is taken, then the IQ will force -the Branch Address Calculator to issue a BACLEAR. Each BACLEAR asserted by +the Branch Address Calculator to issue a BACLEAR. +Each BACLEAR asserted by the BAC generates approximately an 8 cycle bubble in the instruction fetch pipeline. .It Li LSD.UOPS @@ -856,22 +899,24 @@ Use cmask=1 and invert to count cycles Counts the number of ITLB flushes .It Li OFFCORE_REQUESTS.DEMAND.READ_DATA .Pq Event B0H , Umask 01H -Counts number of offcore demand data read requests. Does not count L2 -prefetch requests. +Counts number of offcore demand data read requests. +Does not count L2 prefetch requests. .It Li OFFCORE_REQUESTS.DEMAND.READ_CODE .Pq Event B0H , Umask 02H -Counts number of offcore demand code read requests. Does not count L2 -prefetch requests. +Counts number of offcore demand code read requests. +Does not count L2 prefetch requests. .It Li OFFCORE_REQUESTS.DEMAND.RFO .Pq Event B0H , Umask 04H -Counts number of offcore demand RFO requests. Does not count L2 prefetch -requests. +Counts number of offcore demand RFO requests. +Does not count L2 prefetch requests. .It Li OFFCORE_REQUESTS.ANY.READ .Pq Event B0H , Umask 08H -Counts number of offcore read requests. Includes L2 prefetch requests. +Counts number of offcore read requests. +Includes L2 prefetch requests. .It Li OFFCORE_REQUESTS.ANY.RFO .Pq Event 80H , Umask 10H -Counts number of offcore RFO requests. Includes L2 prefetch requests. +Counts number of offcore RFO requests. +Includes L2 prefetch requests. .It Li OFFCORE_REQUESTS.L1D_WRITEBACK .Pq Event B0H , Umask 40H Counts number of L1D writebacks to the uncore. @@ -880,38 +925,42 @@ Counts number of L1D writebacks to the u Counts all offcore requests. .It Li UOPS_EXECUTED.PORT0 .Pq Event B1H , Umask 01H -Counts number of Uops executed that were issued on port 0. Port 0 handles -integer arithmetic, SIMD and FP add Uops. +Counts number of Uops executed that were issued on port 0. +Port 0 handles integer arithmetic, SIMD and FP add Uops. .It Li UOPS_EXECUTED.PORT1 .Pq Event B1H , Umask 02H -Counts number of Uops executed that were issued on port 1. Port 1 handles -integer arithmetic, SIMD, integer shift, FP multiply and FP divide Uops. +Counts number of Uops executed that were issued on port 1. +Port 1 handles integer arithmetic, SIMD, integer shift, FP multiply and +FP divide Uops. .It Li UOPS_EXECUTED.PORT2_CORE .Pq Event B1H , Umask 04H -Counts number of Uops executed that were issued on port 2. Port 2 handles -the load Uops. This is a core count only and can not be collected per +Counts number of Uops executed that were issued on port 2. +Port 2 handles the load Uops. +This is a core count only and can not be collected per thread. .It Li UOPS_EXECUTED.PORT3_CORE .Pq Event B1H , Umask 08H -Counts number of Uops executed that were issued on port 3. Port 3 handles -store Uops. This is a core count only and can not be collected per thread. +Counts number of Uops executed that were issued on port 3. +Port 3 handles store Uops. +This is a core count only and can not be collected per thread. .It Li UOPS_EXECUTED.PORT4_CORE .Pq Event B1H , Umask 10H -Counts number of Uops executed that where issued on port 4. Port 4 handles -the value to be stored for the store Uops issued on port 3. This is a core -count only and can not be collected per thread. +Counts number of Uops executed that where issued on port 4. +Port 4 handles the value to be stored for the store Uops issued on port 3. +This is a core count only and can not be collected per thread. .It Li UOPS_EXECUTED.CORE_ACTIVE_CYCLES_NO_PORT5 .Pq Event B1H , Umask 1FH Counts number of cycles there are one or more uops being executed and were -issued on ports 0-4. This is a core count only and can not be collected per -thread. +issued on ports 0-4. +This is a core count only and can not be collected per thread. .It Li UOPS_EXECUTED.PORT5 .Pq Event B1H , Umask 20H Counts number of Uops executed that where issued on port 5. .It Li UOPS_EXECUTED.CORE_ACTIVE_CYCLES .Pq Event B1H , Umask 3FH Counts number of cycles there are one or more uops being executed on any -ports. This is a core count only and can not be collected per thread. +ports. +This is a core count only and can not be collected per thread. .It Li UOPS_EXECUTED.PORT015 .Pq Event B1H , Umask 40H Counts number of Uops executed that where issued on port 0, 1, or 5. @@ -924,15 +973,18 @@ Counts number of Uops executed that wher Counts number of cycles the SQ is full to handle off-core requests. .It Li SNOOPQ_REQUESTS_OUTSTANDING.DATA .Pq Event B3H , Umask 01H -Counts weighted cycles of snoopq requests for data. Counter 0 only +Counts weighted cycles of snoopq requests for data. +Counter 0 only Use cmask=1 to count cycles not empty. .It Li SNOOPQ_REQUESTS_OUTSTANDING.INVALIDATE .Pq Event B3H , Umask 02H -Counts weighted cycles of snoopq invalidate requests. Counter 0 only. +Counts weighted cycles of snoopq invalidate requests. +Counter 0 only. Use cmask=1 to count cycles not empty. .It Li SNOOPQ_REQUESTS_OUTSTANDING.CODE .Pq Event B3H , Umask 04H -Counts weighted cycles of snoopq requests for code. Counter 0 only. +Counts weighted cycles of snoopq requests for code. +Counter 0 only. Use cmask=1 to count cycles not empty. .It Li SNOOPQ_REQUESTS.CODE .Pq Event B4H , Umask 01H @@ -970,7 +1022,8 @@ Use MSR 01A7H. See Table A-1 Notes: INST_RETIRED.ANY is counted by a designated fixed counter. INST_RETIRED.ANY_P is counted by a programmable counter and is an -architectural performance event. Event is supported if CPUID.A.EBX[1] = 0. +architectural performance event. +Event is supported if CPUID.A.EBX[1] = 0. Counting: Faulting executions of GETSEC/VM entry/VM Exit/MWait will not count as retired instructions. .It Li INST_RETIRED.X87 @@ -985,8 +1038,9 @@ Counts the number of retired: MMX instru .It Li UOPS_RETIRED.ANY .Pq Event C2H , Umask 01H Counts the number of micro-ops retired, (macro-fused=1, micro- fused=2, -others=1; maximum count of 8 per cycle). Most instructions are composed of -one or two micro-ops. Some instructions are decoded into longer sequences +others=1; maximum count of 8 per cycle). +Most instructions are composed of one or two micro-ops. +Some instructions are decoded into longer sequences such as repeat instructions, floating point transcendental instructions, and assists. Use cmask=1 and invert to count active cycles or stalled cycles @@ -1006,7 +1060,8 @@ Counts the number of machine clears due .Pq Event C3H , Umask 04H Counts the number of times that a program writes to a code section. Self-modifying code causes a sever penalty in all Intel 64 and IA-32 -processors. The modified cache line is written back to the L2 and L3caches. +processors. +The modified cache line is written back to the L2 and L3caches. .It Li BR_INST_RETIRED.ANY_P .Pq Event C4H , Umask 00H See Table A-1. @@ -1063,23 +1118,25 @@ cache. .It Li MEM_LOAD_RETIRED.OTHER_CORE_L2_HIT_HITM .Pq Event CBH , Umask 08H Counts number of retired loads that hit in a sibling core's L2 (on die -core). Since the L3 is inclusive of all cores on the package, this is an L3 -hit. This counts both clean or modified hits. +core). +Since the L3 is inclusive of all cores on the package, this is an L3 hit. +This counts both clean or modified hits. .It Li MEM_LOAD_RETIRED.L3_MISS .Pq Event CBH , Umask 10H -Counts number of retired loads that miss the L3 cache. The load was -satisfied by a remote socket, local memory or an IOH. +Counts number of retired loads that miss the L3 cache. +The load was satisfied by a remote socket, local memory or an IOH. .It Li MEM_LOAD_RETIRED.HIT_LFB .Pq Event CBH , Umask 40H Counts number of retired loads that miss the L1D and the address is located -in an allocated line fill buffer and will soon be committed to cache. This -is counting secondary L1D misses. +in an allocated line fill buffer and will soon be committed to cache. +This is counting secondary L1D misses. .It Li MEM_LOAD_RETIRED.DTLB_MISS .Pq Event CBH , Umask 80H -Counts the number of retired loads that missed the DTLB. The DTLB miss is -not counted if the load operation causes a fault. This event counts loads -from cacheable memory only. The event does not count loads by software -prefetches. Counts both primary and secondary misses to the TLB. +Counts the number of retired loads that missed the DTLB. +The DTLB miss is not counted if the load operation causes a fault. +This event counts loads from cacheable memory only. +The event does not count loads by software prefetches. +Counts both primary and secondary misses to the TLB. .It Li FP_MMX_TRANS.TO_FP .Pq Event CCH , Umask 01H Counts the first floating-point instruction following any MMX instruction. @@ -1087,15 +1144,15 @@ You can use this event to estimate the p floating-point and MMX technology states. .It Li FP_MMX_TRANS.TO_MMX .Pq Event CCH , Umask 02H -Counts the first MMX instruction following a floating-point instruction. You -can use this event to estimate the penalties for the transitions between +Counts the first MMX instruction following a floating-point instruction. +You can use this event to estimate the penalties for the transitions between floating-point and MMX technology states. .It Li FP_MMX_TRANS.ANY .Pq Event CCH , Umask 03H Counts all transitions from floating point to MMX instructions and from MMX -instructions to floating point instructions. You can use this event to -estimate the penalties for the transitions between floating-point and MMX -technology states. +instructions to floating point instructions. +You can use this event to estimate the penalties for the transitions between +floating-point and MMX technology states. .It Li MACRO_INSTS.DECODED .Pq Event D0H , Umask 01H Counts the number of instructions decoded, (but not necessarily executed or @@ -1105,14 +1162,15 @@ retired). Counts the cycles of decoder stalls. .It Li UOPS_DECODED.MS .Pq Event D1H , Umask 02H -Counts the number of Uops decoded by the Microcode Sequencer, MS. The MS -delivers uops when the instruction is more than 4 uops long or a microcode -assist is occurring. +Counts the number of Uops decoded by the Microcode Sequencer, MS. +The MS delivers uops when the instruction is more than 4 uops long or a +microcode assist is occurring. .It Li UOPS_DECODED.ESP_FOLDING .Pq Event D1H , Umask 04H Counts number of stack pointer (ESP) instructions decoded: push , pop , call , ret, etc. ESP instructions do not generate a Uop to increment or decrement -ESP. Instead, they update an ESP_Offset register that keeps track of the +ESP. +Instead, they update an ESP_Offset register that keeps track of the delta to the current value of the ESP register. .It Li UOPS_DECODED.ESP_SYNC .Pq Event D1H , Umask 08H @@ -1122,7 +1180,8 @@ value of the ESP register. .It Li RAT_STALLS.FLAGS .Pq Event D2H , Umask 01H Counts the number of cycles during which execution stalled due to several -reasons, one of which is a partial flag register stall. A partial register +reasons, one of which is a partial flag register stall. +A partial register stall may occur when two conditions are met: 1) an instruction modifies some, but not all, of the flags in the flag register and 2) the next instruction, which depends on flags, depends on flags that were not modified @@ -1135,28 +1194,34 @@ was partially written by previous instru .It Li RAT_STALLS.ROB_READ_PORT .Pq Event D2H , Umask 04H Counts the number of cycles when ROB read port stalls occurred, which did -not allow new micro-ops to enter the out-of-order pipeline. Note that, at +not allow new micro-ops to enter the out-of-order pipeline. +Note that, at this stage in the pipeline, additional stalls may occur at the same cycle -and prevent the stalled micro-ops from entering the pipe. In such a case, +and prevent the stalled micro-ops from entering the pipe. +In such a case, micro-ops retry entering the execution pipe in the next cycle and the ROB-read port stall is counted again. .It Li RAT_STALLS.SCOREBOARD .Pq Event D2H , Umask 08H Counts the cycles where we stall due to microarchitecturally required -serialization. Microcode scoreboarding stalls. +serialization. +Microcode scoreboarding stalls. .It Li RAT_STALLS.ANY .Pq Event D2H , Umask 0FH Counts all Register Allocation Table stall cycles due to: Cycles when ROB read port stalls occurred, which did not allow new micro-ops to enter the -execution pipe. Cycles when partial register stalls occurred Cycles when +execution pipe. +Cycles when partial register stalls occurred Cycles when flag stalls occurred Cycles floating-point unit (FPU) status word stalls -occurred. To count each of these conditions separately use the events: +occurred. +To count each of these conditions separately use the events: RAT_STALLS.ROB_READ_PORT, RAT_STALLS.PARTIAL, RAT_STALLS.FLAGS, and RAT_STALLS.FPSW. .It Li SEG_RENAME_STALLS .Pq Event D4H , Umask 01H Counts the number of stall cycles due to the lack of renaming resources for -the ES, DS, FS, and GS segment registers. If a segment is renamed but not +the ES, DS, FS, and GS segment registers. +If a segment is renamed but not retired and a second update to the same segment occurs, a stall occurs in the front- end of the pipeline until the renamed segment retires. .It Li ES_REG_RENAMES @@ -1176,16 +1241,18 @@ or return branch. .Pq Event E6H , Umask 01H Counts the number of times the front end is resteered, mainly when the Branch Prediction Unit cannot provide a correct prediction and this is -corrected by the Branch Address Calculator at the front end. This can occur +corrected by the Branch Address Calculator at the front end. +This can occur if the code has many branches such that they cannot be consumed by the BPU. Each BACLEAR asserted by the BAC generates approximately an 8 cycle bubble -in the instruction fetch pipeline. The effect on total execution time -depends on the surrounding code. +in the instruction fetch pipeline. +The effect on total execution time depends on the surrounding code. .It Li BACLEAR.BAD_TARGET .Pq Event E6H , Umask 02H Counts number of Branch Address Calculator clears (BACLEAR) asserted due to conditional branch instructions in which there was a target hit but the -direction was wrong. Each BACLEAR asserted by the BAC generates +direction was wrong. +Each BACLEAR asserted by the BAC generates approximately an 8 cycle bubble in the instruction fetch pipeline. .It Li BPU_CLEARS.EARLY .Pq Event E8H , Umask 01H @@ -1195,7 +1262,8 @@ The BPU clear leads to 2 cycle bubble in .It Li BPU_CLEARS.LATE .Pq Event E8H , Umask 02H Counts late Branch Prediction Unit clears due to Most Recently Used -conflicts. The PBU clear leads to a 3 cycle bubble in the Front End. +conflicts. +The PBU clear leads to a 3 cycle bubble in the Front End. .It Li THREAD_ACTIVE .Pq Event ECH , Umask 01H Counts cycles threads are active. @@ -1258,12 +1326,13 @@ Counts number of Super Queue LRU hints s Counts the number of SQ lock splits across a cache line. .It Li SQ_FULL_STALL_CYCLES .Pq Event F6H , Umask 01H -Counts cycles the Super Queue is full. Neither of the threads on this core -will be able to access the uncore. +Counts cycles the Super Queue is full. +Neither of the threads on this core will be able to access the uncore. .It Li FP_ASSIST.ALL .Pq Event F7H , Umask 01H Counts the number of floating point operations executed that required -micro-code assist intervention. Assists are required in the following cases: +micro-code assist intervention. +Assists are required in the following cases: SSE instructions, (Denormal input when the DAZ flag is off or Underflow result when the FTZ flag is off): x87 instructions, (NaN or denormal are loaded to a register or used as input from memory, Division by 0 or From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 20:23:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 571C8106566C; Thu, 26 Apr 2012 20:23:15 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D3E48FC16; Thu, 26 Apr 2012 20:23:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QKNFJD067208; Thu, 26 Apr 2012 20:23:15 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QKNFB3067206; Thu, 26 Apr 2012 20:23:15 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201204262023.q3QKNFB3067206@svn.freebsd.org> From: Glen Barber Date: Thu, 26 Apr 2012 20:23:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234722 - stable/8/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 20:23:15 -0000 Author: gjb (doc committer) Date: Thu Apr 26 20:23:14 2012 New Revision: 234722 URL: http://svn.freebsd.org/changeset/base/234722 Log: MFC r232159: Whitespace cleanup: o Wrap sentences on to new lines o Rewrap lines where possible while trying to keep the diff to a minimum Modified: stable/8/lib/libpmc/pmc.westmere.3 Directory Properties: stable/8/lib/libpmc/ (props changed) Modified: stable/8/lib/libpmc/pmc.westmere.3 ============================================================================== --- stable/8/lib/libpmc/pmc.westmere.3 Thu Apr 26 20:22:14 2012 (r234721) +++ stable/8/lib/libpmc/pmc.westmere.3 Thu Apr 26 20:23:14 2012 (r234722) @@ -92,15 +92,17 @@ Configure the Off-core Response bits. .It Li DMND_DATA_RD Counts the number of demand and DCU prefetch data reads of full and partial cachelines as well as demand data page table entry -cacheline reads. Does not count L2 data read prefetches or +cacheline reads. +Does not count L2 data read prefetches or instruction fetches. .It Li DMND_RFO Counts the number of demand and DCU prefetch reads for ownership -(RFO) requests generated by a write to data cacheline. Does not -count L2 RFO. +(RFO) requests generated by a write to data cacheline. +Does not count L2 RFO. .It Li DMND_IFETCH Counts the number of demand and DCU prefetch instruction cacheline -reads. Does not count L2 code read prefetches. +reads. +Does not count L2 code read prefetches. WB Counts the number of writeback (modified to exclusive) transactions. .It Li PF_DATA_RD @@ -181,7 +183,8 @@ All Store buffer stall cycles All store referenced with misaligned address .It Li STORE_BLOCKS.AT_RET .Pq Event 06H , Umask 04H -Counts number of loads delayed with at-Retirement block code. The following +Counts number of loads delayed with at-Retirement block code. +The following loads need to be executed at retirement and wait for all senior stores on the same thread to be drained: load splitting across 4K boundary (page split), load accessing uncacheable (UC or USWC) memory, load lock, and load @@ -225,9 +228,10 @@ ld_lat facility. In conjunction with ld_lat facility .It Li MEM_STORE_RETIRED.DTLB_MISS .Pq Event 0CH , Umask 01H -The event counts the number of retired stores that missed the DTLB. The DTLB -miss is not counted if the store operation causes a fault. Does not counter -prefetches. Counts both primary and secondary misses to the TLB +The event counts the number of retired stores that missed the DTLB. +The DTLB miss is not counted if the store operation causes a fault. +Does not counter prefetches. +Counts both primary and secondary misses to the TLB .It Li UOPS_ISSUED.ANY .Pq Event 0EH , Umask 01H Counts the number of Uops issued by the Register Allocation Table to the @@ -264,9 +268,11 @@ Load instructions retired remote DRAM an Load instructions retired I/O (Precise Event) .It Li FP_COMP_OPS_EXE.X87 .Pq Event 10H , Umask 01H -Counts the number of FP Computational Uops Executed. The number of FADD, +Counts the number of FP Computational Uops Executed. +The number of FADD, FSUB, FCOM, FMULs, integer MULsand IMULs, FDIVs, FPREMs, FSQRTS, integer -DIVs, and IDIVs. This event does not distinguish an FADD used in the middle +DIVs, and IDIVs. +This event does not distinguish an FADD used in the middle of a transcendental flow from a separate FADD instruction. .It Li FP_COMP_OPS_EXE.MMX .Pq Event 10H , Umask 02H @@ -316,9 +322,9 @@ Counts number of loads dispatched from t the Memory Order Buffer. .It Li LOAD_DISPATCH.RS_DELAYED .Pq Event 13H , Umask 02H -Counts the number of delayed RS dispatches at the stage latch. If an RS -dispatch can not bypass to LB, it has another chance to dispatch from the -one-cycle delayed staging latch before it is written into the LB. +Counts the number of delayed RS dispatches at the stage latch. +If an RS dispatch can not bypass to LB, it has another chance to dispatch +from the one-cycle delayed staging latch before it is written into the LB. .It Li LOAD_DISPATCH.MOB .Pq Event 13H , Umask 04H Counts the number of loads dispatched from the Reservation Station to the @@ -329,13 +335,15 @@ Counts all loads dispatched from the Res .It Li ARITH.CYCLES_DIV_BUSY .Pq Event 14H , Umask 01H Counts the number of cycles the divider is busy executing divide or square -root operations. The divide can be integer, X87 or Streaming SIMD Extensions -(SSE). The square root operation can be either X87 or SSE. +root operations. +The divide can be integer, X87 or Streaming SIMD Extensions (SSE). +The square root operation can be either X87 or SSE. Set 'edge =1, invert=1, cmask=1' to count the number of divides. Count may be incorrect When SMT is on .It Li ARITH.MUL .Pq Event 14H , Umask 02H -Counts the number of multiply operations executed. This includes integer as +Counts the number of multiply operations executed. +This includes integer as well as floating point multiply operations but excludes DPPS mul and MPSAD. Count may be incorrect When SMT is on .It Li INST_QUEUE_WRITES @@ -344,64 +352,72 @@ Counts the number of instructions writte cycle. .It Li INST_DECODED.DEC0 .Pq Event 18H , Umask 01H -Counts number of instructions that require decoder 0 to be decoded. Usually, -this means that the instruction maps to more than 1 uop +Counts number of instructions that require decoder 0 to be decoded. +Usually, this means that the instruction maps to more than 1 uop .It Li TWO_UOP_INSTS_DECODED .Pq Event 19H , Umask 01H An instruction that generates two uops was decoded .It Li INST_QUEUE_WRITE_CYCLES .Pq Event 1EH , Umask 01H This event counts the number of cycles during which instructions are written -to the instruction queue. Dividing this counter by the number of +to the instruction queue. +Dividing this counter by the number of instructions written to the instruction queue (INST_QUEUE_WRITES) yields the -average number of instructions decoded each cycle. If this number is less +average number of instructions decoded each cycle. +If this number is less than four and the pipe stalls, this indicates that the decoder is failing to decode enough instructions per cycle to sustain the 4-wide pipeline. If SSE* instructions that are 6 bytes or longer arrive one after another, -then front end throughput may limit execution speed. In such case, +then front end throughput may limit execution speed. +In such case, .It Li LSD_OVERFLOW .Pq Event 20H , Umask 01H Number of loops that can not stream from the instruction queue. .It Li L2_RQSTS.LD_HIT .Pq Event 24H , Umask 01H -Counts number of loads that hit the L2 cache. L2 loads include both L1D -demand misses as well as L1D prefetches. L2 loads can be rejected for -various reasons. Only non rejected loads are counted. +Counts number of loads that hit the L2 cache. +L2 loads include both L1D demand misses as well as L1D prefetches. +L2 loads can be rejected for various reasons. +Only non rejected loads are counted. .It Li L2_RQSTS.LD_MISS .Pq Event 24H , Umask 02H -Counts the number of loads that miss the L2 cache. L2 loads include both L1D -demand misses as well as L1D prefetches. +Counts the number of loads that miss the L2 cache. +L2 loads include both L1D demand misses as well as L1D prefetches. .It Li L2_RQSTS.LOADS .Pq Event 24H , Umask 03H -Counts all L2 load requests. L2 loads include both L1D demand misses as well -as L1D prefetches. +Counts all L2 load requests. +L2 loads include both L1D demand misses as well as L1D prefetches. .It Li L2_RQSTS.RFO_HIT .Pq Event 24H , Umask 04H -Counts the number of store RFO requests that hit the L2 cache. L2 RFO -requests include both L1D demand RFO misses as well as L1D RFO prefetches. +Counts the number of store RFO requests that hit the L2 cache. +L2 RFO requests include both L1D demand RFO misses as well as L1D RFO +prefetches. Count includes WC memory requests, where the data is not fetched but the permission to write the line is required. .It Li L2_RQSTS.RFO_MISS .Pq Event 24H , Umask 08H -Counts the number of store RFO requests that miss the L2 cache. L2 RFO -requests include both L1D demand RFO misses as well as L1D RFO prefetches. +Counts the number of store RFO requests that miss the L2 cache. +L2 RFO requests include both L1D demand RFO misses as well as L1D RFO +prefetches. .It Li L2_RQSTS.RFOS .Pq Event 24H , Umask 0CH -Counts all L2 store RFO requests. L2 RFO requests include both L1D demand +Counts all L2 store RFO requests. +L2 RFO requests include both L1D demand RFO misses as well as L1D RFO prefetches. .It Li L2_RQSTS.IFETCH_HIT .Pq Event 24H , Umask 10H -Counts number of instruction fetches that hit the L2 cache. L2 instruction -fetches include both L1I demand misses as well as L1I instruction -prefetches. +Counts number of instruction fetches that hit the L2 cache. +L2 instruction fetches include both L1I demand misses as well as L1I +instruction prefetches. .It Li L2_RQSTS.IFETCH_MISS .Pq Event 24H , Umask 20H -Counts number of instruction fetches that miss the L2 cache. L2 instruction -fetches include both L1I demand misses as well as L1I instruction -prefetches. +Counts number of instruction fetches that miss the L2 cache. +L2 instruction fetches include both L1I demand misses as well as L1I +instruction prefetches. .It Li L2_RQSTS.IFETCHES .Pq Event 24H , Umask 30H -Counts all instruction fetches. L2 instruction fetches include both L1I +Counts all instruction fetches. +L2 instruction fetches include both L1I demand misses as well as L1I instruction prefetches. .It Li L2_RQSTS.PREFETCH_HIT .Pq Event 24H , Umask 40H @@ -421,26 +437,30 @@ Counts all L2 requests for both code and .It Li L2_DATA_RQSTS.DEMAND.I_STATE .Pq Event 26H , Umask 01H Counts number of L2 data demand loads where the cache line to be loaded is -in the I (invalid) state, i.e. a cache miss. L2 demand loads are both L1D -demand misses and L1D prefetches. +in the I (invalid) state, i.e. a cache miss. +L2 demand loads are both L1D demand misses and L1D prefetches. .It Li L2_DATA_RQSTS.DEMAND.S_STATE .Pq Event 26H , Umask 02H Counts number of L2 data demand loads where the cache line to be loaded is -in the S (shared) state. L2 demand loads are both L1D demand misses and L1D +in the S (shared) state. +L2 demand loads are both L1D demand misses and L1D prefetches. .It Li L2_DATA_RQSTS.DEMAND.E_STATE .Pq Event 26H , Umask 04H Counts number of L2 data demand loads where the cache line to be loaded is -in the E (exclusive) state. L2 demand loads are both L1D demand misses and +in the E (exclusive) state. +L2 demand loads are both L1D demand misses and L1D prefetches. .It Li L2_DATA_RQSTS.DEMAND.M_STATE .Pq Event 26H , Umask 08H Counts number of L2 data demand loads where the cache line to be loaded is -in the M (modified) state. L2 demand loads are both L1D demand misses and +in the M (modified) state. +L2 demand loads are both L1D demand misses and L1D prefetches. .It Li L2_DATA_RQSTS.DEMAND.MESI .Pq Event 26H , Umask 0FH -Counts all L2 data demand requests. L2 demand loads are both L1D demand +Counts all L2 data demand requests. +L2 demand loads are both L1D demand misses and L1D prefetches. .It Li L2_DATA_RQSTS.PREFETCH.I_STATE .Pq Event 26H , Umask 10H @@ -449,7 +469,8 @@ in the I (invalid) state, i.e. a cache m .It Li L2_DATA_RQSTS.PREFETCH.S_STATE .Pq Event 26H , Umask 20H Counts number of L2 prefetch data loads where the cache line to be loaded is -in the S (shared) state. A prefetch RFO will miss on an S state line, while +in the S (shared) state. +A prefetch RFO will miss on an S state line, while a prefetch read will hit on an S state line. .It Li L2_DATA_RQSTS.PREFETCH.E_STATE .Pq Event 26H , Umask 40H @@ -468,23 +489,27 @@ Counts all L2 data requests. .It Li L2_WRITE.RFO.I_STATE .Pq Event 27H , Umask 01H Counts number of L2 demand store RFO requests where the cache line to be -loaded is in the I (invalid) state, i.e, a cache miss. The L1D prefetcher +loaded is in the I (invalid) state, i.e, a cache miss. +The L1D prefetcher does not issue a RFO prefetch. This is a demand RFO request .It Li L2_WRITE.RFO.S_STATE .Pq Event 27H , Umask 02H Counts number of L2 store RFO requests where the cache line to be loaded is -in the S (shared) state. The L1D prefetcher does not issue a RFO prefetch. +in the S (shared) state. +The L1D prefetcher does not issue a RFO prefetch. This is a demand RFO request. .It Li L2_WRITE.RFO.M_STATE .Pq Event 27H , Umask 08H Counts number of L2 store RFO requests where the cache line to be loaded is -in the M (modified) state. The L1D prefetcher does not issue a RFO prefetch. +in the M (modified) state. +The L1D prefetcher does not issue a RFO prefetch. This is a demand RFO request. .It Li L2_WRITE.RFO.HIT .Pq Event 27H , Umask 0EH Counts number of L2 store RFO requests where the cache line to be loaded is -in either the S, E or M states. The L1D prefetcher does not issue a RFO +in either the S, E or M states. +The L1D prefetcher does not issue a RFO prefetch. This is a demand RFO request .It Li L2_WRITE.RFO.MESI @@ -536,21 +561,23 @@ is in the M (modified) state. Counts all L1 writebacks to the L2. .It Li L3_LAT_CACHE.REFERENCE .Pq Event 2EH , Umask 02H -Counts uncore Last Level Cache references. Because cache hierarchy, cache +Counts uncore Last Level Cache references. +Because cache hierarchy, cache sizes and other implementation-specific characteristics; value comparison to estimate performance differences is not recommended. See Table A-1. .It Li L3_LAT_CACHE.MISS .Pq Event 2EH , Umask 01H -Counts uncore Last Level Cache misses. Because cache hierarchy, cache sizes +Counts uncore Last Level Cache misses. +Because cache hierarchy, cache sizes and other implementation-specific characteristics; value comparison to estimate performance differences is not recommended. See Table A-1. .It Li CPU_CLK_UNHALTED.THREAD_P .Pq Event 3CH , Umask 00H Counts the number of thread cycles while the thread is not in a halt state. -The thread enters the halt state when it is running the HLT instruction. The -core frequency may change from time to time due to power or thermal +The thread enters the halt state when it is running the HLT instruction. +The core frequency may change from time to time due to power or thermal throttling. see Table A-1 .It Li CPU_CLK_UNHALTED.REF_P @@ -569,7 +596,8 @@ Counts cycles of page walk due to misses .It Li DTLB_MISSES.STLB_HIT .Pq Event 49H , Umask 10H Counts the number of DTLB first level misses that hit in the second level -TLB. This event is only relevant if the core contains multiple DTLB levels. +TLB. +This event is only relevant if the core contains multiple DTLB levels. .It Li DTLB_MISSES.LARGE_WALK_COMPLETED .Pq Event 49H , Umask 80H Counts number of completed large page walks due to misses in the STLB. @@ -584,17 +612,22 @@ Counts number of hardware prefetch reque FIFO. .It Li L1D_PREFETCH.MISS .Pq Event 4EH , Umask 02H -Counts number of hardware prefetch requests that miss the L1D. There are two -prefetchers in the L1D. A streamer, which predicts lines sequentially after +Counts number of hardware prefetch requests that miss the L1D. +There are two +prefetchers in the L1D. +A streamer, which predicts lines sequentially after this one should be fetched, and the IP prefetcher that remembers access -patterns for the current instruction. The streamer prefetcher stops on an +patterns for the current instruction. +The streamer prefetcher stops on an L1D hit, while the IP prefetcher does not. .It Li L1D_PREFETCH.TRIGGERS .Pq Event 4EH , Umask 04H Counts number of prefetch requests triggered by the Finite State Machine and -pushed into the prefetch FIFO. Some of the prefetch requests are dropped due +pushed into the prefetch FIFO. +Some of the prefetch requests are dropped due to overwrites or competition between the IP index prefetcher and streamer -prefetcher. The prefetch FIFO contains 4 entries. +prefetcher. +The prefetch FIFO contains 4 entries. .It Li EPT.WALK_CYCLES .Pq Event 4FH , Umask 10H Counts Extended Page walk cycles. @@ -626,31 +659,33 @@ Counts the number of cacheable load lock accepted into the fill buffer. .It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND.READ_DATA .Pq Event 60H , Umask 01H -Counts weighted cycles of offcore demand data read requests. Does not -include L2 prefetch requests. +Counts weighted cycles of offcore demand data read requests. +Does not include L2 prefetch requests. Counter 0. .It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND.READ_CODE .Pq Event 60H , Umask 02H -Counts weighted cycles of offcore demand code read requests. Does not -include L2 prefetch requests. +Counts weighted cycles of offcore demand code read requests. +Does not include L2 prefetch requests. Counter 0. .It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND.RFO .Pq Event 60H , Umask 04H -Counts weighted cycles of offcore demand RFO requests. Does not include L2 -prefetch requests. +Counts weighted cycles of offcore demand RFO requests. +Does not include L2 prefetch requests. Counter 0. .It Li OFFCORE_REQUESTS_OUTSTANDING.ANY.READ .Pq Event 60H , Umask 08H -Counts weighted cycles of offcore read requests of any kind. Include L2 -prefetch requests. +Counts weighted cycles of offcore read requests of any kind. +Include L2 prefetch requests. Counter 0. .It Li CACHE_LOCK_CYCLES.L1D_L2 .Pq Event 63H , Umask 01H -Cycle count during which the L1D and L2 are locked. A lock is asserted when +Cycle count during which the L1D and L2 are locked. +A lock is asserted when there is a locked memory access, due to uncacheable memory, a locked operation that spans two cache lines, or a page walk from an uncacheable page table. -Counter 0, 1 only. L1D and L2 locks have a very high performance penalty and +Counter 0, 1 only. +L1D and L2 locks have a very high performance penalty and it is highly recommended to avoid such accesses. .It Li CACHE_LOCK_CYCLES.L1D .Pq Event 63H , Umask 02H @@ -665,9 +700,11 @@ Counts the number of completed I/O trans Counts all instruction fetches that hit the L1 instruction cache. .It Li L1I.MISSES .Pq Event 80H , Umask 02H -Counts all instruction fetches that miss the L1I cache. This includes +Counts all instruction fetches that miss the L1I cache. +This includes instruction cache misses, streaming buffer misses, victim cache misses and -uncacheable fetches. An instruction fetch miss is counted only once and not +uncacheable fetches. +An instruction fetch miss is counted only once and not once for every cycle it is outstanding. .It Li L1I.READS .Pq Event 80H , Umask 03H @@ -747,10 +784,10 @@ Counts all near call branches executed, Counts taken near branches executed, but not necessarily retired. .It Li BR_INST_EXEC.ANY .Pq Event 88H , Umask 7FH -Counts all near executed branches (not necessarily retired). This includes -only instructions and not micro-op branches. Frequent branching is not -necessarily a major performance issue. However frequent branch -mispredictions may be a problem. +Counts all near executed branches (not necessarily retired). +This includes only instructions and not micro-op branches. +Frequent branching is not necessarily a major performance issue. +However frequent branch mispredictions may be a problem. .It Li BR_MISP_EXEC.COND .Pq Event 89H , Umask 01H Counts the number of mispredicted conditional near branch instructions @@ -791,9 +828,10 @@ Counts the number of mispredicted near b executed, but not necessarily retired. .It Li RESOURCE_STALLS.ANY .Pq Event A2H , Umask 01H -Counts the number of Allocator resource related stalls. Includes register -renaming buffer entries, memory buffer entries. In addition to resource -related stalls, this event counts some other events. Includes stalls arising +Counts the number of Allocator resource related stalls. +Includes register renaming buffer entries, memory buffer entries. +In addition to resource related stalls, this event counts some other events. +Includes stalls arising during branch misprediction recovery, such as if retirement of the mispredicted branch is delayed and stalls arising while store buffer is draining from synchronizing operations. @@ -806,7 +844,8 @@ Counts the cycles of stall due to lack o .Pq Event A2H , Umask 04H This event counts the number of cycles when the number of instructions in the pipeline waiting for execution reaches the limit the processor can -handle. A high count of this event indicates that there are long latency +handle. +A high count of this event indicates that there are long latency operations in the pipe (possibly load and store operations that miss the L2 cache, or instructions dependent upon instructions further down the pipeline that have yet to retire. @@ -816,7 +855,8 @@ start execution. .Pq Event A2H , Umask 08H This event counts the number of cycles that a resource related stall will occur due to the number of store instructions reaching the limit of the -pipeline, (i.e. all store buffers are used). The stall ends when a store +pipeline, (i.e. all store buffers are used). +The stall ends when a store instruction commits its data to the cache or memory. .It Li RESOURCE_STALLS.ROB_FULL .Pq Event A2H , Umask 10H @@ -828,7 +868,8 @@ floating-point unit (FPU) control word. .It Li RESOURCE_STALLS.MXCSR .Pq Event A2H , Umask 40H Stalls due to the MXCSR register rename occurring to close to a previous -MXCSR rename. The MXCSR provides control and status for the MMX registers. +MXCSR rename. +The MXCSR provides control and status for the MMX registers. .It Li RESOURCE_STALLS.OTHER .Pq Event A2H , Umask 80H Counts the number of cycles while execution was stalled due to other @@ -839,12 +880,14 @@ Counts the number of instructions decode necessarily executed or retired. .It Li BACLEAR_FORCE_IQ .Pq Event A7H , Umask 01H -Counts number of times a BACLEAR was forced by the Instruction Queue. The IQ -is also responsible for providing conditional branch prediciton direction -based on a static scheme and dynamic data provided by the L2 Branch -Prediction Unit. If the conditional branch target is not found in the Target +Counts number of times a BACLEAR was forced by the Instruction Queue. +The IQ is also responsible for providing conditional branch prediction +direction based on a static scheme and dynamic data provided by the L2 +Branch Prediction Unit. +If the conditional branch target is not found in the Target Array and the IQ predicts that the branch is taken, then the IQ will force -the Branch Address Calculator to issue a BACLEAR. Each BACLEAR asserted by +the Branch Address Calculator to issue a BACLEAR. +Each BACLEAR asserted by the BAC generates approximately an 8 cycle bubble in the instruction fetch pipeline. .It Li LSD.UOPS @@ -856,22 +899,24 @@ Use cmask=1 and invert to count cycles Counts the number of ITLB flushes .It Li OFFCORE_REQUESTS.DEMAND.READ_DATA .Pq Event B0H , Umask 01H -Counts number of offcore demand data read requests. Does not count L2 -prefetch requests. +Counts number of offcore demand data read requests. +Does not count L2 prefetch requests. .It Li OFFCORE_REQUESTS.DEMAND.READ_CODE .Pq Event B0H , Umask 02H -Counts number of offcore demand code read requests. Does not count L2 -prefetch requests. +Counts number of offcore demand code read requests. +Does not count L2 prefetch requests. .It Li OFFCORE_REQUESTS.DEMAND.RFO .Pq Event B0H , Umask 04H -Counts number of offcore demand RFO requests. Does not count L2 prefetch -requests. +Counts number of offcore demand RFO requests. +Does not count L2 prefetch requests. .It Li OFFCORE_REQUESTS.ANY.READ .Pq Event B0H , Umask 08H -Counts number of offcore read requests. Includes L2 prefetch requests. +Counts number of offcore read requests. +Includes L2 prefetch requests. .It Li OFFCORE_REQUESTS.ANY.RFO .Pq Event 80H , Umask 10H -Counts number of offcore RFO requests. Includes L2 prefetch requests. +Counts number of offcore RFO requests. +Includes L2 prefetch requests. .It Li OFFCORE_REQUESTS.L1D_WRITEBACK .Pq Event B0H , Umask 40H Counts number of L1D writebacks to the uncore. @@ -880,38 +925,42 @@ Counts number of L1D writebacks to the u Counts all offcore requests. .It Li UOPS_EXECUTED.PORT0 .Pq Event B1H , Umask 01H -Counts number of Uops executed that were issued on port 0. Port 0 handles -integer arithmetic, SIMD and FP add Uops. +Counts number of Uops executed that were issued on port 0. +Port 0 handles integer arithmetic, SIMD and FP add Uops. .It Li UOPS_EXECUTED.PORT1 .Pq Event B1H , Umask 02H -Counts number of Uops executed that were issued on port 1. Port 1 handles -integer arithmetic, SIMD, integer shift, FP multiply and FP divide Uops. +Counts number of Uops executed that were issued on port 1. +Port 1 handles integer arithmetic, SIMD, integer shift, FP multiply and +FP divide Uops. .It Li UOPS_EXECUTED.PORT2_CORE .Pq Event B1H , Umask 04H -Counts number of Uops executed that were issued on port 2. Port 2 handles -the load Uops. This is a core count only and can not be collected per +Counts number of Uops executed that were issued on port 2. +Port 2 handles the load Uops. +This is a core count only and can not be collected per thread. .It Li UOPS_EXECUTED.PORT3_CORE .Pq Event B1H , Umask 08H -Counts number of Uops executed that were issued on port 3. Port 3 handles -store Uops. This is a core count only and can not be collected per thread. +Counts number of Uops executed that were issued on port 3. +Port 3 handles store Uops. +This is a core count only and can not be collected per thread. .It Li UOPS_EXECUTED.PORT4_CORE .Pq Event B1H , Umask 10H -Counts number of Uops executed that where issued on port 4. Port 4 handles -the value to be stored for the store Uops issued on port 3. This is a core -count only and can not be collected per thread. +Counts number of Uops executed that where issued on port 4. +Port 4 handles the value to be stored for the store Uops issued on port 3. +This is a core count only and can not be collected per thread. .It Li UOPS_EXECUTED.CORE_ACTIVE_CYCLES_NO_PORT5 .Pq Event B1H , Umask 1FH Counts number of cycles there are one or more uops being executed and were -issued on ports 0-4. This is a core count only and can not be collected per -thread. +issued on ports 0-4. +This is a core count only and can not be collected per thread. .It Li UOPS_EXECUTED.PORT5 .Pq Event B1H , Umask 20H Counts number of Uops executed that where issued on port 5. .It Li UOPS_EXECUTED.CORE_ACTIVE_CYCLES .Pq Event B1H , Umask 3FH Counts number of cycles there are one or more uops being executed on any -ports. This is a core count only and can not be collected per thread. +ports. +This is a core count only and can not be collected per thread. .It Li UOPS_EXECUTED.PORT015 .Pq Event B1H , Umask 40H Counts number of Uops executed that where issued on port 0, 1, or 5. @@ -924,15 +973,18 @@ Counts number of Uops executed that wher Counts number of cycles the SQ is full to handle off-core requests. .It Li SNOOPQ_REQUESTS_OUTSTANDING.DATA .Pq Event B3H , Umask 01H -Counts weighted cycles of snoopq requests for data. Counter 0 only +Counts weighted cycles of snoopq requests for data. +Counter 0 only Use cmask=1 to count cycles not empty. .It Li SNOOPQ_REQUESTS_OUTSTANDING.INVALIDATE .Pq Event B3H , Umask 02H -Counts weighted cycles of snoopq invalidate requests. Counter 0 only. +Counts weighted cycles of snoopq invalidate requests. +Counter 0 only. Use cmask=1 to count cycles not empty. .It Li SNOOPQ_REQUESTS_OUTSTANDING.CODE .Pq Event B3H , Umask 04H -Counts weighted cycles of snoopq requests for code. Counter 0 only. +Counts weighted cycles of snoopq requests for code. +Counter 0 only. Use cmask=1 to count cycles not empty. .It Li SNOOPQ_REQUESTS.CODE .Pq Event B4H , Umask 01H @@ -970,7 +1022,8 @@ Use MSR 01A7H. See Table A-1 Notes: INST_RETIRED.ANY is counted by a designated fixed counter. INST_RETIRED.ANY_P is counted by a programmable counter and is an -architectural performance event. Event is supported if CPUID.A.EBX[1] = 0. +architectural performance event. +Event is supported if CPUID.A.EBX[1] = 0. Counting: Faulting executions of GETSEC/VM entry/VM Exit/MWait will not count as retired instructions. .It Li INST_RETIRED.X87 @@ -985,8 +1038,9 @@ Counts the number of retired: MMX instru .It Li UOPS_RETIRED.ANY .Pq Event C2H , Umask 01H Counts the number of micro-ops retired, (macro-fused=1, micro- fused=2, -others=1; maximum count of 8 per cycle). Most instructions are composed of -one or two micro-ops. Some instructions are decoded into longer sequences +others=1; maximum count of 8 per cycle). +Most instructions are composed of one or two micro-ops. +Some instructions are decoded into longer sequences such as repeat instructions, floating point transcendental instructions, and assists. Use cmask=1 and invert to count active cycles or stalled cycles @@ -1006,7 +1060,8 @@ Counts the number of machine clears due .Pq Event C3H , Umask 04H Counts the number of times that a program writes to a code section. Self-modifying code causes a sever penalty in all Intel 64 and IA-32 -processors. The modified cache line is written back to the L2 and L3caches. +processors. +The modified cache line is written back to the L2 and L3caches. .It Li BR_INST_RETIRED.ANY_P .Pq Event C4H , Umask 00H See Table A-1. @@ -1063,23 +1118,25 @@ cache. .It Li MEM_LOAD_RETIRED.OTHER_CORE_L2_HIT_HITM .Pq Event CBH , Umask 08H Counts number of retired loads that hit in a sibling core's L2 (on die -core). Since the L3 is inclusive of all cores on the package, this is an L3 -hit. This counts both clean or modified hits. +core). +Since the L3 is inclusive of all cores on the package, this is an L3 hit. +This counts both clean or modified hits. .It Li MEM_LOAD_RETIRED.L3_MISS .Pq Event CBH , Umask 10H -Counts number of retired loads that miss the L3 cache. The load was -satisfied by a remote socket, local memory or an IOH. +Counts number of retired loads that miss the L3 cache. +The load was satisfied by a remote socket, local memory or an IOH. .It Li MEM_LOAD_RETIRED.HIT_LFB .Pq Event CBH , Umask 40H Counts number of retired loads that miss the L1D and the address is located -in an allocated line fill buffer and will soon be committed to cache. This -is counting secondary L1D misses. +in an allocated line fill buffer and will soon be committed to cache. +This is counting secondary L1D misses. .It Li MEM_LOAD_RETIRED.DTLB_MISS .Pq Event CBH , Umask 80H -Counts the number of retired loads that missed the DTLB. The DTLB miss is -not counted if the load operation causes a fault. This event counts loads -from cacheable memory only. The event does not count loads by software -prefetches. Counts both primary and secondary misses to the TLB. +Counts the number of retired loads that missed the DTLB. +The DTLB miss is not counted if the load operation causes a fault. +This event counts loads from cacheable memory only. +The event does not count loads by software prefetches. +Counts both primary and secondary misses to the TLB. .It Li FP_MMX_TRANS.TO_FP .Pq Event CCH , Umask 01H Counts the first floating-point instruction following any MMX instruction. @@ -1087,15 +1144,15 @@ You can use this event to estimate the p floating-point and MMX technology states. .It Li FP_MMX_TRANS.TO_MMX .Pq Event CCH , Umask 02H -Counts the first MMX instruction following a floating-point instruction. You -can use this event to estimate the penalties for the transitions between +Counts the first MMX instruction following a floating-point instruction. +You can use this event to estimate the penalties for the transitions between floating-point and MMX technology states. .It Li FP_MMX_TRANS.ANY .Pq Event CCH , Umask 03H Counts all transitions from floating point to MMX instructions and from MMX -instructions to floating point instructions. You can use this event to -estimate the penalties for the transitions between floating-point and MMX -technology states. +instructions to floating point instructions. +You can use this event to estimate the penalties for the transitions between +floating-point and MMX technology states. .It Li MACRO_INSTS.DECODED .Pq Event D0H , Umask 01H Counts the number of instructions decoded, (but not necessarily executed or @@ -1105,14 +1162,15 @@ retired). Counts the cycles of decoder stalls. .It Li UOPS_DECODED.MS .Pq Event D1H , Umask 02H -Counts the number of Uops decoded by the Microcode Sequencer, MS. The MS -delivers uops when the instruction is more than 4 uops long or a microcode -assist is occurring. +Counts the number of Uops decoded by the Microcode Sequencer, MS. +The MS delivers uops when the instruction is more than 4 uops long or a +microcode assist is occurring. .It Li UOPS_DECODED.ESP_FOLDING .Pq Event D1H , Umask 04H Counts number of stack pointer (ESP) instructions decoded: push , pop , call , ret, etc. ESP instructions do not generate a Uop to increment or decrement -ESP. Instead, they update an ESP_Offset register that keeps track of the +ESP. +Instead, they update an ESP_Offset register that keeps track of the delta to the current value of the ESP register. .It Li UOPS_DECODED.ESP_SYNC .Pq Event D1H , Umask 08H @@ -1122,7 +1180,8 @@ value of the ESP register. .It Li RAT_STALLS.FLAGS .Pq Event D2H , Umask 01H Counts the number of cycles during which execution stalled due to several -reasons, one of which is a partial flag register stall. A partial register +reasons, one of which is a partial flag register stall. +A partial register stall may occur when two conditions are met: 1) an instruction modifies some, but not all, of the flags in the flag register and 2) the next instruction, which depends on flags, depends on flags that were not modified @@ -1135,28 +1194,34 @@ was partially written by previous instru .It Li RAT_STALLS.ROB_READ_PORT .Pq Event D2H , Umask 04H Counts the number of cycles when ROB read port stalls occurred, which did -not allow new micro-ops to enter the out-of-order pipeline. Note that, at +not allow new micro-ops to enter the out-of-order pipeline. +Note that, at this stage in the pipeline, additional stalls may occur at the same cycle -and prevent the stalled micro-ops from entering the pipe. In such a case, +and prevent the stalled micro-ops from entering the pipe. +In such a case, micro-ops retry entering the execution pipe in the next cycle and the ROB-read port stall is counted again. .It Li RAT_STALLS.SCOREBOARD .Pq Event D2H , Umask 08H Counts the cycles where we stall due to microarchitecturally required -serialization. Microcode scoreboarding stalls. +serialization. +Microcode scoreboarding stalls. .It Li RAT_STALLS.ANY .Pq Event D2H , Umask 0FH Counts all Register Allocation Table stall cycles due to: Cycles when ROB read port stalls occurred, which did not allow new micro-ops to enter the -execution pipe. Cycles when partial register stalls occurred Cycles when +execution pipe. +Cycles when partial register stalls occurred Cycles when flag stalls occurred Cycles floating-point unit (FPU) status word stalls -occurred. To count each of these conditions separately use the events: +occurred. +To count each of these conditions separately use the events: RAT_STALLS.ROB_READ_PORT, RAT_STALLS.PARTIAL, RAT_STALLS.FLAGS, and RAT_STALLS.FPSW. .It Li SEG_RENAME_STALLS .Pq Event D4H , Umask 01H Counts the number of stall cycles due to the lack of renaming resources for -the ES, DS, FS, and GS segment registers. If a segment is renamed but not +the ES, DS, FS, and GS segment registers. +If a segment is renamed but not retired and a second update to the same segment occurs, a stall occurs in the front- end of the pipeline until the renamed segment retires. .It Li ES_REG_RENAMES @@ -1176,16 +1241,18 @@ or return branch. .Pq Event E6H , Umask 01H Counts the number of times the front end is resteered, mainly when the Branch Prediction Unit cannot provide a correct prediction and this is -corrected by the Branch Address Calculator at the front end. This can occur +corrected by the Branch Address Calculator at the front end. +This can occur if the code has many branches such that they cannot be consumed by the BPU. Each BACLEAR asserted by the BAC generates approximately an 8 cycle bubble -in the instruction fetch pipeline. The effect on total execution time -depends on the surrounding code. +in the instruction fetch pipeline. +The effect on total execution time depends on the surrounding code. .It Li BACLEAR.BAD_TARGET .Pq Event E6H , Umask 02H Counts number of Branch Address Calculator clears (BACLEAR) asserted due to conditional branch instructions in which there was a target hit but the -direction was wrong. Each BACLEAR asserted by the BAC generates +direction was wrong. +Each BACLEAR asserted by the BAC generates approximately an 8 cycle bubble in the instruction fetch pipeline. .It Li BPU_CLEARS.EARLY .Pq Event E8H , Umask 01H @@ -1195,7 +1262,8 @@ The BPU clear leads to 2 cycle bubble in .It Li BPU_CLEARS.LATE .Pq Event E8H , Umask 02H Counts late Branch Prediction Unit clears due to Most Recently Used -conflicts. The PBU clear leads to a 3 cycle bubble in the Front End. +conflicts. +The PBU clear leads to a 3 cycle bubble in the Front End. .It Li THREAD_ACTIVE .Pq Event ECH , Umask 01H Counts cycles threads are active. @@ -1258,12 +1326,13 @@ Counts number of Super Queue LRU hints s Counts the number of SQ lock splits across a cache line. .It Li SQ_FULL_STALL_CYCLES .Pq Event F6H , Umask 01H -Counts cycles the Super Queue is full. Neither of the threads on this core -will be able to access the uncore. +Counts cycles the Super Queue is full. +Neither of the threads on this core will be able to access the uncore. .It Li FP_ASSIST.ALL .Pq Event F7H , Umask 01H Counts the number of floating point operations executed that required -micro-code assist intervention. Assists are required in the following cases: +micro-code assist intervention. +Assists are required in the following cases: SSE instructions, (Denormal input when the DAZ flag is off or Underflow result when the FTZ flag is off): x87 instructions, (NaN or denormal are loaded to a register or used as input from memory, Division by 0 or From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 20:24:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 430371065673; Thu, 26 Apr 2012 20:24:26 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CCFA8FC14; Thu, 26 Apr 2012 20:24:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QKOQ5Z067297; Thu, 26 Apr 2012 20:24:26 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QKOPA6067287; Thu, 26 Apr 2012 20:24:25 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201204262024.q3QKOPA6067287@svn.freebsd.org> From: Attilio Rao Date: Thu, 26 Apr 2012 20:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234723 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 sparc64/include sparc64/sparc64 x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 20:24:26 -0000 Author: attilio Date: Thu Apr 26 20:24:25 2012 New Revision: 234723 URL: http://svn.freebsd.org/changeset/base/234723 Log: Clean up the intr* MD KPI from the SMP dependency, removing a cause of discrepancy between modules and kernel, but deal with SMP differences within the functions themselves. As an added bonus this also helps in terms of code readability. Requested by: gibbs Reviewed by: jhb, marius MFC after: 1 week Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/include/intr_machdep.h head/sys/i386/i386/machdep.c head/sys/i386/include/intr_machdep.h head/sys/pc98/pc98/machdep.c head/sys/sparc64/include/intr_machdep.h head/sys/sparc64/sparc64/intr_machdep.c head/sys/sparc64/sparc64/machdep.c head/sys/x86/x86/intr_machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Thu Apr 26 20:23:14 2012 (r234722) +++ head/sys/amd64/amd64/machdep.c Thu Apr 26 20:24:25 2012 (r234723) @@ -296,12 +296,10 @@ cpu_startup(dummy) cpu_setregs(); -#ifdef SMP /* * Add BSP as an interrupt target. */ intr_add_cpu(0); -#endif } /* Modified: head/sys/amd64/include/intr_machdep.h ============================================================================== --- head/sys/amd64/include/intr_machdep.h Thu Apr 26 20:23:14 2012 (r234722) +++ head/sys/amd64/include/intr_machdep.h Thu Apr 26 20:24:25 2012 (r234723) @@ -140,15 +140,11 @@ int elcr_probe(void); enum intr_trigger elcr_read_trigger(u_int irq); void elcr_resume(void); void elcr_write_trigger(u_int irq, enum intr_trigger trigger); -#ifdef SMP void intr_add_cpu(u_int cpu); -#endif int intr_add_handler(const char *name, int vector, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep); -#ifdef SMP int intr_bind(u_int vector, u_char cpu); -#endif int intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); int intr_describe(u_int vector, void *ih, const char *descr); Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Thu Apr 26 20:23:14 2012 (r234722) +++ head/sys/i386/i386/machdep.c Thu Apr 26 20:24:25 2012 (r234723) @@ -337,12 +337,10 @@ cpu_startup(dummy) cpu_setregs(); #endif -#ifdef SMP /* * Add BSP as an interrupt target. */ intr_add_cpu(0); -#endif } /* Modified: head/sys/i386/include/intr_machdep.h ============================================================================== --- head/sys/i386/include/intr_machdep.h Thu Apr 26 20:23:14 2012 (r234722) +++ head/sys/i386/include/intr_machdep.h Thu Apr 26 20:24:25 2012 (r234723) @@ -131,14 +131,10 @@ int elcr_probe(void); enum intr_trigger elcr_read_trigger(u_int irq); void elcr_resume(void); void elcr_write_trigger(u_int irq, enum intr_trigger trigger); -#ifdef SMP void intr_add_cpu(u_int cpu); -#endif int intr_add_handler(const char *name, int vector, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep); -#ifdef SMP int intr_bind(u_int vector, u_char cpu); -#endif int intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); int intr_describe(u_int vector, void *ih, const char *descr); Modified: head/sys/pc98/pc98/machdep.c ============================================================================== --- head/sys/pc98/pc98/machdep.c Thu Apr 26 20:23:14 2012 (r234722) +++ head/sys/pc98/pc98/machdep.c Thu Apr 26 20:24:25 2012 (r234723) @@ -272,12 +272,10 @@ cpu_startup(dummy) vm_pager_bufferinit(); cpu_setregs(); -#ifdef SMP /* * Add BSP as an interrupt target. */ intr_add_cpu(0); -#endif } /* Modified: head/sys/sparc64/include/intr_machdep.h ============================================================================== --- head/sys/sparc64/include/intr_machdep.h Thu Apr 26 20:23:14 2012 (r234722) +++ head/sys/sparc64/include/intr_machdep.h Thu Apr 26 20:24:25 2012 (r234723) @@ -91,9 +91,7 @@ struct intr_vector { extern ih_func_t *intr_handlers[]; extern struct intr_vector intr_vectors[]; -#ifdef SMP void intr_add_cpu(u_int cpu); -#endif int intr_bind(int vec, u_char cpu); int intr_describe(int vec, void *ih, const char *descr); void intr_setup(int level, ih_func_t *ihf, int pri, iv_func_t *ivf, Modified: head/sys/sparc64/sparc64/intr_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/intr_machdep.c Thu Apr 26 20:23:14 2012 (r234722) +++ head/sys/sparc64/sparc64/intr_machdep.c Thu Apr 26 20:24:25 2012 (r234723) @@ -554,4 +554,20 @@ intr_shuffle_irqs(void *arg __unused) } SYSINIT(intr_shuffle_irqs, SI_SUB_SMP, SI_ORDER_SECOND, intr_shuffle_irqs, NULL); +#else /* !SMP */ + +/* Return EOPNOTSUPP in the UP case. */ +int +intr_bind(int vec __unused, u_char cpu __unused) +{ + + return (EOPNOTSUPP); +} + +/* Use an empty stub for compatibility. */ +void +intr_add_cpu(u_int cpu __unused) +{ + +} #endif Modified: head/sys/sparc64/sparc64/machdep.c ============================================================================== --- head/sys/sparc64/sparc64/machdep.c Thu Apr 26 20:23:14 2012 (r234722) +++ head/sys/sparc64/sparc64/machdep.c Thu Apr 26 20:24:25 2012 (r234723) @@ -197,12 +197,10 @@ cpu_startup(void *arg) cpu_identify(rdpr(ver), PCPU_GET(clock), curcpu); -#ifdef SMP /* * Add BSP as an interrupt target. */ intr_add_cpu(0); -#endif } void Modified: head/sys/x86/x86/intr_machdep.c ============================================================================== --- head/sys/x86/x86/intr_machdep.c Thu Apr 26 20:23:14 2012 (r234722) +++ head/sys/x86/x86/intr_machdep.c Thu Apr 26 20:24:25 2012 (r234723) @@ -565,4 +565,19 @@ intr_next_cpu(void) return (PCPU_GET(apic_id)); } + +/* Return EOPNOTSUPP in the UP case. */ +int +intr_bind(u_int vector __unused, u_char cpu __unused) +{ + + return (EOPNOTSUPP); +} + +/* Use an empty stub for compatibility. */ +void +intr_add_cpu(u_int cpu __unused) +{ + +} #endif From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 21:51:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8D45C106566B; Thu, 26 Apr 2012 21:51:35 +0000 (UTC) (envelope-from ermal.luci@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0D3BA8FC0A; Thu, 26 Apr 2012 21:51:34 +0000 (UTC) Received: by yhgm50 with SMTP id m50so91630yhg.13 for ; Thu, 26 Apr 2012 14:51:34 -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 :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=jr1Il+HSuBQwA+muXJO0wnmtWfhSBMbcoxQ3xQuLTWY=; b=jPKvWsF3kItzFv0dmqi1z6RO0mBEWHptSL31RjNKbsCP8c7IPtQGNMj0cHuYNc4wp5 KvosXk7NCFusjHKD9kmteuZgPggkqQisw6YqYNeFnWuvrAcSA9hkQKB/UOeyTL13m1pH pyIu12am7hIr2L9i0AUqWP/elTIlxVF/naTajXAsYL2dPfzlTIJ8wx6a8gJB5R0hdJUF I7wiNcJguf9SJEiJpQ2wzw7TmmdDaK0Ul7VWfMMmSRaWt6hraDs2qT5snrB7kPclTSQp qHO/kFMu4G4MA+Roc3lC7kiz1QIvTGc5xhzljb5WvY7uCXiIt/YY7OE3UYGKZYJU26jf /J6A== MIME-Version: 1.0 Received: by 10.50.36.194 with SMTP id s2mr8807393igj.46.1335477094121; Thu, 26 Apr 2012 14:51:34 -0700 (PDT) Sender: ermal.luci@gmail.com Received: by 10.231.166.138 with HTTP; Thu, 26 Apr 2012 14:51:34 -0700 (PDT) In-Reply-To: <201204261735.q3QHZCH4060106@svn.freebsd.org> References: <201204261735.q3QHZCH4060106@svn.freebsd.org> Date: Thu, 26 Apr 2012 23:51:34 +0200 X-Google-Sender-Auth: Etf8lxqC3DwGgdLcVMkR8_BHhac Message-ID: From: =?ISO-8859-1?Q?Ermal_Lu=E7i?= To: Bernhard Schmidt Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234711 - in head/usr.sbin/wpa: . hostapd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 21:51:35 -0000 Thanks, i actually forgot to submit this. On Thu, Apr 26, 2012 at 7:35 PM, Bernhard Schmidt wr= ote: > Author: bschmidt > Date: Thu Apr 26 17:35:11 2012 > New Revision: 234711 > URL: http://svn.freebsd.org/changeset/base/234711 > > Log: > =A0fix EAP server support after the 0.7.3 import: > =A0- eap_xxx.c files have been renamed to eap_server_xxx.c > =A0- additional crypto files are required for some options > =A0- EAP_MD5 and EAP_GTC is now enabled by default to match vendor config > =A0- move each file on its own line to hopefully make further diffs easie= r > =A0 =A0to read > > =A0EAP_SERVER is now enabled by default. Fiddling with HOSTAPD_CFLAGS in > =A0src.conf is no longer required to get a basic WPA-EAP/radius setup > =A0running. > > =A0Tested by: =A0 =A0Johann Hugo > =A0MFC after: =A0 =A02 weeks > > Modified: > =A0head/usr.sbin/wpa/Makefile.inc > =A0head/usr.sbin/wpa/hostapd/Makefile > > Modified: head/usr.sbin/wpa/Makefile.inc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/usr.sbin/wpa/Makefile.inc =A0 =A0 =A0Thu Apr 26 14:51:12 2012 = =A0 =A0 =A0 =A0(r234710) > +++ head/usr.sbin/wpa/Makefile.inc =A0 =A0 =A0Thu Apr 26 17:35:11 2012 = =A0 =A0 =A0 =A0(r234711) > @@ -7,17 +7,23 @@ WPA_SUPPLICANT_DISTDIR?=3D${WPA_DISTDIR}/w > =A0HOSTAPD_DISTDIR?=3D =A0 =A0 =A0${WPA_DISTDIR}/hostapd > > =A0.PATH.c:${.CURDIR}/.. \ > + =A0 =A0 =A0 ${WPA_DISTDIR}/src/ap \ > =A0 =A0 =A0 =A0${WPA_DISTDIR}/src/common \ > =A0 =A0 =A0 =A0${WPA_DISTDIR}/src/crypto \ > + =A0 =A0 =A0 ${WPA_DISTDIR}/src/eapol_auth \ > =A0 =A0 =A0 =A0${WPA_DISTDIR}/src/eap_common \ > + =A0 =A0 =A0 ${WPA_DISTDIR}/src/eap_server \ > =A0 =A0 =A0 =A0${WPA_DISTDIR}/src/eapol_supp \ > =A0 =A0 =A0 =A0${WPA_DISTDIR}/src/l2_packet \ > + =A0 =A0 =A0 ${WPA_DISTDIR}/src/radius \ > =A0 =A0 =A0 =A0${WPA_DISTDIR}/src/utils > > =A0CFLAGS+=3D-I${.CURDIR} > +CFLAGS+=3D-I${HOSTAPD_DISTDIR} > =A0CFLAGS+=3D-I${WPA_DISTDIR}/src > =A0CFLAGS+=3D-I${WPA_DISTDIR}/src/common > =A0CFLAGS+=3D-I${WPA_DISTDIR}/src/crypto > +CFLAGS+=3D-I${WPA_DISTDIR}/src/drivers > =A0CFLAGS+=3D-I${WPA_DISTDIR}/src/l2_packet > =A0CFLAGS+=3D-I${WPA_DISTDIR}/src/utils > > > Modified: head/usr.sbin/wpa/hostapd/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/usr.sbin/wpa/hostapd/Makefile =A0Thu Apr 26 14:51:12 2012 =A0 = =A0 =A0 =A0(r234710) > +++ head/usr.sbin/wpa/hostapd/Makefile =A0Thu Apr 26 17:35:11 2012 =A0 = =A0 =A0 =A0(r234711) > @@ -2,33 +2,59 @@ > > =A0.include "${.CURDIR}/../Makefile.inc" > > -.PATH.c:${HOSTAPD_DISTDIR} \ > - =A0 =A0 =A0 ${WPA_DISTDIR}/src/ap \ > - =A0 =A0 =A0 ${WPA_DISTDIR}/src/eap_server \ > - =A0 =A0 =A0 ${WPA_DISTDIR}/src/eap_common \ > - =A0 =A0 =A0 ${WPA_DISTDIR}/src/eapol_auth \ > - =A0 =A0 =A0 ${WPA_DISTDIR}/src/drivers \ > - =A0 =A0 =A0 ${WPA_DISTDIR}/src/radius \ > - =A0 =A0 =A0 ${WPA_DISTDIR} > +.PATH.c:${WPA_DISTDIR}/src/drivers > > =A0PROG=3D =A0hostapd > -SRCS=3D =A0accounting.c aes-wrap.c ap_config.c \ > - =A0 =A0 =A0 ap_drv_ops.c ap_mlme.c authsrv.c \ > - =A0 =A0 =A0 chap.c common.c config_file.c ctrl_iface.c crypto_openssl.c= \ > - =A0 =A0 =A0 ctrl_iface_ap.c drivers.c drv_callbacks.c dump_state.c \ > - =A0 =A0 =A0 eap_common.c eap_peap_common.c eap_register.c eap_server.c = \ > - =A0 =A0 =A0 eap_server_gtc.c eap_server_identity.c eap_server_md5.c \ > - =A0 =A0 =A0 eap_server_methods.c eap_server_mschapv2.c eap_server_peap.= c \ > - =A0 =A0 =A0 eap_server_tls.c eap_server_tls_common.c eap_server_ttls.c = \ > - =A0 =A0 =A0 eapol_auth_dump.c eapol_auth_sm.c eloop.c hostapd.c ieee802= _11_auth.c \ > - =A0 =A0 =A0 ieee802_11_common.c ieee802_11_ht.c ieee802_1x.c ip_addr.c = \ > - =A0 =A0 =A0 md5.c main.c ms_funcs.c peerkey_auth.c pmksa_cache_auth.c \ > - =A0 =A0 =A0 preauth_auth.c radius.c radius_client.c sta_info.c \ > - =A0 =A0 =A0 sha1-pbkdf2.c sha1-tlsprf.c sha1-tprf.c sha1.c \ > - =A0 =A0 =A0 tkip_countermeasures.c utils.c \ > - =A0 =A0 =A0 vlan_init.c wpa_auth.c wpa_auth_glue.c wpa_auth_ie.c wpa_co= mmon.c \ > - =A0 =A0 =A0 wpa_debug.c wpabuf.c > -SRCS+=3D l2_packet_freebsd.c driver_freebsd.c os_unix.c > +SRCS=3D =A0accounting.c \ > + =A0 =A0 =A0 aes-wrap.c \ > + =A0 =A0 =A0 ap_config.c \ > + =A0 =A0 =A0 ap_drv_ops.c \ > + =A0 =A0 =A0 ap_mlme.c \ > + =A0 =A0 =A0 authsrv.c \ > + =A0 =A0 =A0 chap.c \ > + =A0 =A0 =A0 common.c \ > + =A0 =A0 =A0 config_file.c \ > + =A0 =A0 =A0 crypto_openssl.c \ > + =A0 =A0 =A0 ctrl_iface.c \ > + =A0 =A0 =A0 ctrl_iface_ap.c \ > + =A0 =A0 =A0 drivers.c \ > + =A0 =A0 =A0 drv_callbacks.c \ > + =A0 =A0 =A0 eap_common.c \ > + =A0 =A0 =A0 eap_peap_common.c \ > + =A0 =A0 =A0 eap_register.c \ > + =A0 =A0 =A0 eapol_auth_dump.c \ > + =A0 =A0 =A0 eapol_auth_sm.c \ > + =A0 =A0 =A0 eap_server.c \ > + =A0 =A0 =A0 eap_server_methods.c \ > + =A0 =A0 =A0 eloop.c \ > + =A0 =A0 =A0 hostapd.c \ > + =A0 =A0 =A0 ieee802_11_auth.c \ > + =A0 =A0 =A0 ieee802_11_common.c \ > + =A0 =A0 =A0 ieee802_1x.c \ > + =A0 =A0 =A0 ip_addr.c \ > + =A0 =A0 =A0 main.c \ > + =A0 =A0 =A0 md5.c \ > + =A0 =A0 =A0 ms_funcs.c \ > + =A0 =A0 =A0 os_unix.c \ > + =A0 =A0 =A0 peerkey_auth.c \ > + =A0 =A0 =A0 pmksa_cache_auth.c \ > + =A0 =A0 =A0 preauth_auth.c \ > + =A0 =A0 =A0 radius.c \ > + =A0 =A0 =A0 radius_client.c \ > + =A0 =A0 =A0 sha1-pbkdf2.c \ > + =A0 =A0 =A0 sha1-tlsprf.c \ > + =A0 =A0 =A0 sha1.c \ > + =A0 =A0 =A0 sta_info.c \ > + =A0 =A0 =A0 tkip_countermeasures.c \ > + =A0 =A0 =A0 utils.c \ > + =A0 =A0 =A0 vlan_init.c \ > + =A0 =A0 =A0 wpa_auth.c \ > + =A0 =A0 =A0 wpa_auth_glue.c \ > + =A0 =A0 =A0 wpa_auth_ie.c \ > + =A0 =A0 =A0 wpa_common.c \ > + =A0 =A0 =A0 wpa_debug.c \ > + =A0 =A0 =A0 wpabuf.c > +SRCS+=3D l2_packet_freebsd.c driver_freebsd.c > > =A0MAN=3D =A0 hostapd.8 hostapd.conf.5 > > @@ -38,10 +64,11 @@ FILESDIR=3D ${SHAREDIR}/examples/hostapd > =A0FILES=3D hostapd.conf hostapd.eap_user hostapd.wpa_psk > =A0.endif > > -CFLAGS+=3D -I${HOSTAPD_DISTDIR} -I${WPA_DISTDIR}/src/drivers > - > -CFLAGS+=3D -DCONFIG_DRIVER_BSD -DHOSTAPD > -CFLAGS+=3D -DCONFIG_DRIVER_RADIUS_ACL > +CFLAGS+=3D-DCONFIG_DRIVER_BSD \ > + =A0 =A0 =A0 -DHOSTAPD \ > + =A0 =A0 =A0 -DCONFIG_DRIVER_RADIUS_ACL \ > + =A0 =A0 =A0 -DCONFIG_RSN_PREAUTH \ > + =A0 =A0 =A0 -DCONFIG_PEERKEY > =A0.if ${MK_INET6} !=3D "no" > =A0CFLAGS+=3D -DCONFIG_IPV6 > =A0.endif > @@ -55,51 +82,64 @@ CFLAGS+=3D${HOSTAPD_CFLAGS} > =A0LDADD+=3D${HOSTAPD_LDADD} > =A0#LDFLAGS+=3D${HOSTAPD_LDFLAGS} > > -.if !empty(CFLAGS:M*-DEAP_SERVER) > -#SRCS+=3D =A0 =A0 =A0 =A0eap.c eap_methods.c eap_identity.c > - > =A0.if ${MK_OPENSSL} !=3D "no" && !defined(RELEASE_CRUNCH) > > -CFLAGS+=3D-DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_PSK \ > - =A0 =A0 =A0 -DEAP_TLS_FUNCS -DEAP_TLS_OPENSSL > -SRCS+=3D crypto_openssl.c > -SRCS+=3D eap_tls.c eap_peap.c eap_peap_common.c eap_mschapv2.c \ > - =A0 =A0 =A0 eap_psk.c eap_psk_common.c \ > - =A0 =A0 =A0 eap_tls_common.c tls_openssl.c ms_funcs.c chap.c > - > -CFLAGS+=3D-DEAP_TTLS -DEAP_MD5 > -SRCS+=3D eap_ttls.c eap_md5.c > - > -.if !empty(CFLAGS:M*-DEAP_GTC) > -SRCS+=3D eap_gtc.c > -.endif > +CFLAGS+=3D-DDPKCS12_FUNCS \ > + =A0 =A0 =A0 -DEAP_SERVER \ > + =A0 =A0 =A0 -DEAP_SERVER_GTC \ > + =A0 =A0 =A0 -DEAP_SERVER_IDENTITY \ > + =A0 =A0 =A0 -DEAP_SERVER_MD5 \ > + =A0 =A0 =A0 -DEAP_SERVER_MSCHAPV2 \ > + =A0 =A0 =A0 -DEAP_SERVER_PEAP \ > + =A0 =A0 =A0 -DEAP_SERVER_TLS \ > + =A0 =A0 =A0 -DEAP_SERVER_TTLS \ > + =A0 =A0 =A0 -DEAP_TLS_FUNCS \ > + =A0 =A0 =A0 -DCONFIG_NO_DUMP_STATE > +SRCS+=3D dump_state.c \ > + =A0 =A0 =A0 eap_server_gtc.c \ > + =A0 =A0 =A0 eap_server_identity.c \ > + =A0 =A0 =A0 eap_server_md5.c \ > + =A0 =A0 =A0 eap_server_mschapv2.c \ > + =A0 =A0 =A0 eap_server_peap.c \ > + =A0 =A0 =A0 eap_server_tls.c \ > + =A0 =A0 =A0 eap_server_tls_common.c \ > + =A0 =A0 =A0 eap_server_ttls.c \ > + =A0 =A0 =A0 tls_openssl.c > > =A0.if !empty(CFLAGS:M*-DEAP_AKA) > =A0NEED_SIM_COMMON=3D =A0 =A0 =A0 true > -SRCS+=3D eap_aka.c > +NEED_SHA256=3D =A0 true > +SRCS+=3D eap_server_aka.c > =A0.endif > > =A0.if !empty(CFLAGS:M*-DEAP_SIM) > =A0NEED_SIM_COMMON=3D =A0 =A0 =A0 true > -SRCS+=3D eap_sim.c > +SRCS+=3D eap_server_sim.c > =A0.endif > > =A0.if defined(NEED_SIM_COMMON) > -SRCS+=3D eap_sim_common.c eap_sim_db.c > +SRCS+=3D eap_sim_common.c \ > + =A0 =A0 =A0 eap_sim_db.c > +NEED_AES_CBC=3D =A0true > +NEED_FIPS186_2_PRF=3D =A0 =A0true > =A0.endif > > =A0.if !empty(CFLAGS:M*-DEAP_GPSK) > =A0CFLAGS+=3D-DEAP_GPSK_SHA256 > -SRCS+=3D eap_gpsk.c eap_gpsk_common.c > +SRCS+=3D eap_server_gpsk.c \ > + =A0 =A0 =A0 eap_gpsk_common.c > =A0NEED_SHA256=3D =A0 true > +NEED_AES_OMAC1=3D =A0 =A0 =A0 =A0true > =A0.endif > > =A0.if !empty(CFLAGS:M*-DEAP_PAX) > -SRCS+=3D eap_pax.c eap_pax_common.c > +SRCS+=3D eap_server_pax.c \ > + =A0 =A0 =A0 eap_pax_common.c > =A0.endif > > =A0.if !empty(CFLAGS:M*-DEAP_SAKE) > -SRCS+=3D eap_sake.c eap_sake_common.c > +SRCS+=3D eap_server_sake.c \ > + =A0 =A0 =A0 eap_sake_common.c > =A0.endif > > =A0DPADD+=3D ${LIBSSL} ${LIBCRYPTO} > @@ -108,12 +148,19 @@ LDADD+=3D -lssl -lcrypto > =A0NEED_TLS_NONE=3D true > =A0.endif > > -.else > -NEED_TLS_NONE=3D true > +.if defined(NEED_AES_CBC) > +SRCS+=3D aes-cbc.c > +.endif > + > +.if defined(NEED_AES_OMAC1) > +SRCS+=3D aes-omac1.c > +.endif > + > +.if defined(NEED_FIPS186_2_PRF) > +SRCS+=3D fips_prf_openssl.c > =A0.endif > > =A0.if defined(NEED_SHA256) > -CFLAGS+=3D-DINTERNAL_SHA256 > =A0SRCS+=3D sha256.c > =A0.endif > --=20 Ermal From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 23:12:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E78A8106566C; Thu, 26 Apr 2012 23:12:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D395F8FC0A; Thu, 26 Apr 2012 23:12:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QNCq9c073223; Thu, 26 Apr 2012 23:12:52 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QNCqPg073221; Thu, 26 Apr 2012 23:12:52 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201204262312.q3QNCqPg073221@svn.freebsd.org> From: Warner Losh Date: Thu, 26 Apr 2012 23:12:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234724 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 23:12:53 -0000 Author: imp Date: Thu Apr 26 23:12:52 2012 New Revision: 234724 URL: http://svn.freebsd.org/changeset/base/234724 Log: Fix ordering issue. 'make xdev' can fail with -jN because it tries to run the xdev-install step while xdev-build is still running. Submitted by: Ian Lepore Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Apr 26 20:24:25 2012 (r234723) +++ head/Makefile.inc1 Thu Apr 26 23:12:52 2012 (r234724) @@ -1649,8 +1649,8 @@ _xi-mtree: mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${XDDESTDIR}/usr/include >/dev/null -.ORDER: _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links -xdev-install: _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links +.ORDER: xdev-build _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links +xdev-install: xdev-build _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links _xi-cross-tools: @echo "_xi-cross-tools" From owner-svn-src-all@FreeBSD.ORG Thu Apr 26 23:57:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E04E106566B; Thu, 26 Apr 2012 23:57:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F36848FC08; Thu, 26 Apr 2012 23:57:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3QNvOXj074782; Thu, 26 Apr 2012 23:57:24 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3QNvOw7074780; Thu, 26 Apr 2012 23:57:24 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204262357.q3QNvOw7074780@svn.freebsd.org> From: Adrian Chadd Date: Thu, 26 Apr 2012 23:57:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234725 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2012 23:57:25 -0000 Author: adrian Date: Thu Apr 26 23:57:24 2012 New Revision: 234725 URL: http://svn.freebsd.org/changeset/base/234725 Log: Remove some of the redundant locking done in the TX completion path, when checking whether BAR frames need to be checked. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Thu Apr 26 23:12:52 2012 (r234724) +++ head/sys/dev/ath/if_ath_tx.c Thu Apr 26 23:57:24 2012 (r234725) @@ -3455,6 +3455,9 @@ ath_tx_comp_aggr_error(struct ath_softc ATH_TXQ_INSERT_HEAD(tid, bf, bf_list); } + /* + * Schedule the TID to be re-tried. + */ ath_tx_tid_sched(sc, tid); /* @@ -3469,12 +3472,9 @@ ath_tx_comp_aggr_error(struct ath_softc ath_tx_tid_bar_suspend(sc, tid); } - ATH_TXQ_UNLOCK(sc->sc_ac2q[tid->ac]); - /* * Send BAR if required */ - ATH_TXQ_LOCK(sc->sc_ac2q[tid->ac]); if (ath_tx_tid_bar_tx_ready(sc, tid)) ath_tx_tid_bar_tx(sc, tid); ATH_TXQ_UNLOCK(sc->sc_ac2q[tid->ac]); @@ -3742,24 +3742,28 @@ ath_tx_aggr_comp_aggr(struct ath_softc * ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); } - /* Prepend all frames to the beginning of the queue */ + DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR, + "%s: txa_start now %d\n", __func__, tap->txa_start); + ATH_TXQ_LOCK(sc->sc_ac2q[atid->ac]); + + /* Prepend all frames to the beginning of the queue */ while ((bf = TAILQ_LAST(&bf_q, ath_bufhead_s)) != NULL) { TAILQ_REMOVE(&bf_q, bf, bf_list); ATH_TXQ_INSERT_HEAD(atid, bf, bf_list); } - ath_tx_tid_sched(sc, atid); - ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); - DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR, - "%s: txa_start now %d\n", __func__, tap->txa_start); + /* + * Reschedule to grab some further frames. + */ + ath_tx_tid_sched(sc, atid); /* * Send BAR if required */ - ATH_TXQ_LOCK(sc->sc_ac2q[atid->ac]); if (ath_tx_tid_bar_tx_ready(sc, atid)) ath_tx_tid_bar_tx(sc, atid); + ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); /* Do deferred completion */ From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 06:49:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67F741065674; Fri, 27 Apr 2012 06:49:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 507C78FC14; Fri, 27 Apr 2012 06:49:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3R6nakh091167; Fri, 27 Apr 2012 06:49:36 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3R6naCt091159; Fri, 27 Apr 2012 06:49:36 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201204270649.q3R6naCt091159@svn.freebsd.org> From: Dimitry Andric Date: Fri, 27 Apr 2012 06:49:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234726 - in stable/9/lib/csu: amd64 arm i386-elf ia64 mips powerpc powerpc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 06:49:36 -0000 Author: dim Date: Fri Apr 27 06:49:35 2012 New Revision: 234726 URL: http://svn.freebsd.org/changeset/base/234726 Log: MFC r234502: After r217375, some startup objects under lib/csu are built in a special way: first they are compiled to assembly, then some sed'ing is done on the assembly, and lastly the assembly is compiled to an object file. This last step is done using ${CC}, and not ${AS}, because when the compiler is clang, it outputs directives that are too advanced for our old gas. So we use clang's integrated assembler instead. (When the compiler is gcc, it just calls gas, and nothing is different, except one extra fork.) However, in the .s to .o rules in lib/csu/$ARCH/Makefile, I still passed CFLAGS to the compiler, instead of ACFLAGS, which are specifically for compiling .s files. In case you are using '-g' for debug info anywhere in your CFLAGS, it causes the .s files to already contain debug information in the assembly itself. In the next step, the .s files are also compiled using '-g', and if the compiler is clang, it complains: "error: input can't have .file dwarf directives when -g is used to generate dwarf debug info for assembly code". Fix this by using ${ACFLAGS} for compiling the .s files instead. Reported by: jasone Modified: stable/9/lib/csu/amd64/Makefile stable/9/lib/csu/arm/Makefile stable/9/lib/csu/i386-elf/Makefile stable/9/lib/csu/ia64/Makefile stable/9/lib/csu/mips/Makefile stable/9/lib/csu/powerpc/Makefile stable/9/lib/csu/powerpc64/Makefile Directory Properties: stable/9/lib/csu/ (props changed) Modified: stable/9/lib/csu/amd64/Makefile ============================================================================== --- stable/9/lib/csu/amd64/Makefile Thu Apr 26 23:57:24 2012 (r234725) +++ stable/9/lib/csu/amd64/Makefile Fri Apr 27 06:49:35 2012 (r234726) @@ -22,21 +22,21 @@ crt1.s: crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} crt1.o: crt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} crt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} crt1.s gcrt1.s: crt1.c ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} gcrt1.o: gcrt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s Scrt1.s: crt1.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} Scrt1.o: Scrt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ Modified: stable/9/lib/csu/arm/Makefile ============================================================================== --- stable/9/lib/csu/arm/Makefile Thu Apr 26 23:57:24 2012 (r234725) +++ stable/9/lib/csu/arm/Makefile Fri Apr 27 06:49:35 2012 (r234726) @@ -21,21 +21,21 @@ crt1.s: crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} crt1.o: crt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} crt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} crt1.s gcrt1.s: crt1.c ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} gcrt1.o: gcrt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s Scrt1.s: crt1.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} Scrt1.o: Scrt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ Modified: stable/9/lib/csu/i386-elf/Makefile ============================================================================== --- stable/9/lib/csu/i386-elf/Makefile Thu Apr 26 23:57:24 2012 (r234725) +++ stable/9/lib/csu/i386-elf/Makefile Fri Apr 27 06:49:35 2012 (r234726) @@ -21,7 +21,7 @@ gcrt1_c.s: crt1_c.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} gcrt1_c.o: gcrt1_c.s - ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1_c.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} gcrt1_c.s gcrt1.o: gcrt1_c.o crt1_s.o ${LD} ${LDFLAGS} -o gcrt1.o -r crt1_s.o gcrt1_c.o @@ -31,7 +31,7 @@ crt1_c.s: crt1_c.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} crt1_c.o: crt1_c.s - ${CC} ${CFLAGS} -c -o ${.TARGET} crt1_c.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} crt1_c.s crt1.o: crt1_c.o crt1_s.o ${LD} ${LDFLAGS} -o crt1.o -r crt1_s.o crt1_c.o @@ -42,7 +42,7 @@ Scrt1_c.s: crt1_c.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} Scrt1_c.o: Scrt1_c.s - ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1_c.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1_c.s Scrt1.o: Scrt1_c.o crt1_s.o ${LD} ${LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o Modified: stable/9/lib/csu/ia64/Makefile ============================================================================== --- stable/9/lib/csu/ia64/Makefile Thu Apr 26 23:57:24 2012 (r234725) +++ stable/9/lib/csu/ia64/Makefile Fri Apr 27 06:49:35 2012 (r234726) @@ -24,7 +24,7 @@ crtbrand.s: crtbrand.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} crtbrand.o: crtbrand.s - ${CC} ${CFLAGS} -c -o ${.TARGET} crtbrand.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} crtbrand.s crt1.o: crt1_.o crtbrand.o ${LD} ${LDFLAGS} -r -o ${.TARGET} crt1_.o crtbrand.o @@ -37,7 +37,7 @@ gcrtbrand.s: crtbrand.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} gcrtbrand.o: gcrtbrand.s - ${CC} ${CFLAGS} -c -o ${.TARGET} gcrtbrand.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} gcrtbrand.s gcrt1.o: gcrt1_.o gcrtbrand.o ${LD} ${LDFLAGS} -r -o ${.TARGET} ${.ALLSRC} @@ -50,7 +50,7 @@ Scrtbrand.s: crtbrand.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} Scrtbrand.o: Scrtbrand.s - ${CC} ${CFLAGS} -c -o ${.TARGET} Scrtbrand.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrtbrand.s Scrt1.o: Scrt1_.o Scrtbrand.o ${LD} ${LDFLAGS} -r -o ${.TARGET} ${.ALLSRC} Modified: stable/9/lib/csu/mips/Makefile ============================================================================== --- stable/9/lib/csu/mips/Makefile Thu Apr 26 23:57:24 2012 (r234725) +++ stable/9/lib/csu/mips/Makefile Fri Apr 27 06:49:35 2012 (r234726) @@ -21,21 +21,21 @@ crt1.s: crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} crt1.o: crt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} crt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} crt1.s gcrt1.s: crt1.c ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} gcrt1.o: gcrt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s Scrt1.s: crt1.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} Scrt1.o: Scrt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ Modified: stable/9/lib/csu/powerpc/Makefile ============================================================================== --- stable/9/lib/csu/powerpc/Makefile Thu Apr 26 23:57:24 2012 (r234725) +++ stable/9/lib/csu/powerpc/Makefile Fri Apr 27 06:49:35 2012 (r234726) @@ -21,21 +21,21 @@ crt1.s: crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} crt1.o: crt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} crt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} crt1.s gcrt1.s: crt1.c ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} gcrt1.o: gcrt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s Scrt1.s: crt1.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} Scrt1.o: Scrt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ Modified: stable/9/lib/csu/powerpc64/Makefile ============================================================================== --- stable/9/lib/csu/powerpc64/Makefile Thu Apr 26 23:57:24 2012 (r234725) +++ stable/9/lib/csu/powerpc64/Makefile Fri Apr 27 06:49:35 2012 (r234726) @@ -21,21 +21,21 @@ crt1.s: crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} crt1.o: crt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} crt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} crt1.s gcrt1.s: crt1.c ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} gcrt1.o: gcrt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s Scrt1.s: crt1.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} Scrt1.o: Scrt1.s - ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1.s + ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 08:24:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CF1B1065672; Fri, 27 Apr 2012 08:24:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 8F2DA8FC1E; Fri, 27 Apr 2012 08:24:52 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q3R8Ok2X060895; Fri, 27 Apr 2012 11:24:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q3R8Ojss033319; Fri, 27 Apr 2012 11:24:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q3R8Ojrp033318; Fri, 27 Apr 2012 11:24:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 27 Apr 2012 11:24:45 +0300 From: Konstantin Belousov To: Michael Tuexen Message-ID: <20120427082445.GX2358@deviant.kiev.zoral.com.ua> References: <201204261931.q3QJVG72064714@svn.freebsd.org> <20120426193324.GV2358@deviant.kiev.zoral.com.ua> <9E92A2FD-2432-4204-BD46-3548E328AF1D@freebsd.org> <20120426193950.GW2358@deviant.kiev.zoral.com.ua> <8C81F8AF-359C-4BD7-A349-D82C7B3828C9@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5zyfs+xXgaOUPfjY" Content-Disposition: inline In-Reply-To: <8C81F8AF-359C-4BD7-A349-D82C7B3828C9@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234715 - head/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 08:24:53 -0000 --5zyfs+xXgaOUPfjY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 26, 2012 at 09:58:01PM +0200, Michael Tuexen wrote: > On Apr 26, 2012, at 9:39 PM, Konstantin Belousov wrote: >=20 > > On Thu, Apr 26, 2012 at 09:36:38PM +0200, Michael Tuexen wrote: > >> On Apr 26, 2012, at 9:33 PM, Konstantin Belousov wrote: > >>=20 > >>> On Thu, Apr 26, 2012 at 07:31:16PM +0000, Michael Tuexen wrote: > >>>> Author: tuexen > >>>> Date: Thu Apr 26 19:31:16 2012 > >>>> New Revision: 234715 > >>>> URL: http://svn.freebsd.org/changeset/base/234715 > >>>>=20 > >>>> Log: > >>>> Export symbols for sctp_sendv() and sctp_recvv(). > >>>>=20 > >>>> MFC after: 1 week > >>>>=20 > >>>> Modified: > >>>> head/lib/libc/net/Symbol.map > >>>>=20 > >>>> Modified: head/lib/libc/net/Symbol.map > >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > >>>> --- head/lib/libc/net/Symbol.map Thu Apr 26 19:21:58 2012 (r234714) > >>>> +++ head/lib/libc/net/Symbol.map Thu Apr 26 19:31:16 2012 (r234715) > >>>> @@ -135,8 +135,10 @@ FBSD_1.0 { > >>>> sctp_sendmsg; > >>>> sctp_sendmsgx; > >>>> sctp_send; > >>>> + sctp_sendv; > >>>> sctp_sendx; > >>>> sctp_recvmsg; > >>>> + sctp_recvv; > >>>> setipv4sourcefilter; > >>>> getipv4sourcefilter; > >>>> getsourcefilter; > >>> These are new symbols, they should go into the current (FBSD_1.3) > >>> version. > >> And where is that? Should I add something like > >> FBSD_1.3 { > >> sctp_recvv; > >> sctp_sendv; > >> } > > Right, add it between FBSD_1.0 and FBSDprivate_1.0. > >=20 > >>=20 > >> Or in another file? Will it be possible to MFC that to stable/8 and st= able/9? > >> I added the functions a while ago, but missed to add them to the Symbo= l.map. > >=20 > > Yes, it is possible to MFC this to both stable/8 and stable/9. > > Straight merge should do it. > Done in r234716. Thanks for the help. > Just to be sure: After an MFC to stable/9, the symbol will be usable in t= he upcoming > 9.1, right? Right, when/if 9.1 is released. Obviously, MFC shall be done before 9.1 is branched. --5zyfs+xXgaOUPfjY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk+aV80ACgkQC3+MBN1Mb4iqLwCdFCLxCb6GsUUq4RG4quz66x7F ETQAnibdt4Q+CQXaoIoOoNj8zTC+3NLq =HgDp -----END PGP SIGNATURE----- --5zyfs+xXgaOUPfjY-- From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 08:49:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62D9B106566C; Fri, 27 Apr 2012 08:49:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E8F98FC12; Fri, 27 Apr 2012 08:49:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3R8nG3n095397; Fri, 27 Apr 2012 08:49:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3R8nG2V095391; Fri, 27 Apr 2012 08:49:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201204270849.q3R8nG2V095391@svn.freebsd.org> From: Alexander Motin Date: Fri, 27 Apr 2012 08:49:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234727 - head/sys/geom/raid X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 08:49:16 -0000 Author: mav Date: Fri Apr 27 08:49:15 2012 New Revision: 234727 URL: http://svn.freebsd.org/changeset/base/234727 Log: Fix RAID5 level names changed at r234603. Modified: head/sys/geom/raid/md_intel.c head/sys/geom/raid/md_jmicron.c head/sys/geom/raid/md_nvidia.c head/sys/geom/raid/md_promise.c head/sys/geom/raid/md_sii.c Modified: head/sys/geom/raid/md_intel.c ============================================================================== --- head/sys/geom/raid/md_intel.c Fri Apr 27 06:49:35 2012 (r234726) +++ head/sys/geom/raid/md_intel.c Fri Apr 27 08:49:15 2012 (r234727) @@ -1490,7 +1490,7 @@ g_raid_md_ctl_intel(struct g_raid_md_obj return (-3); } if (strcasecmp(levelname, "RAID5") == 0) - levelname = "RAID5LA"; + levelname = "RAID5-LA"; if (g_raid_volume_str2level(levelname, &level, &qual)) { gctl_error(req, "Unknown RAID level '%s'.", levelname); return (-4); @@ -1705,7 +1705,7 @@ g_raid_md_ctl_intel(struct g_raid_md_obj return (-3); } if (strcasecmp(levelname, "RAID5") == 0) - levelname = "RAID5LA"; + levelname = "RAID5-LA"; if (g_raid_volume_str2level(levelname, &level, &qual)) { gctl_error(req, "Unknown RAID level '%s'.", levelname); return (-4); Modified: head/sys/geom/raid/md_jmicron.c ============================================================================== --- head/sys/geom/raid/md_jmicron.c Fri Apr 27 06:49:35 2012 (r234726) +++ head/sys/geom/raid/md_jmicron.c Fri Apr 27 08:49:15 2012 (r234727) @@ -1062,7 +1062,7 @@ g_raid_md_ctl_jmicron(struct g_raid_md_o return (-3); } if (strcasecmp(levelname, "RAID5") == 0) - levelname = "RAID5LA"; + levelname = "RAID5-LA"; if (g_raid_volume_str2level(levelname, &level, &qual)) { gctl_error(req, "Unknown RAID level '%s'.", levelname); return (-4); Modified: head/sys/geom/raid/md_nvidia.c ============================================================================== --- head/sys/geom/raid/md_nvidia.c Fri Apr 27 06:49:35 2012 (r234726) +++ head/sys/geom/raid/md_nvidia.c Fri Apr 27 08:49:15 2012 (r234727) @@ -1065,7 +1065,7 @@ g_raid_md_ctl_nvidia(struct g_raid_md_ob return (-3); } if (strcasecmp(levelname, "RAID5") == 0) - levelname = "RAID5LS"; + levelname = "RAID5-LS"; if (g_raid_volume_str2level(levelname, &level, &qual)) { gctl_error(req, "Unknown RAID level '%s'.", levelname); return (-4); Modified: head/sys/geom/raid/md_promise.c ============================================================================== --- head/sys/geom/raid/md_promise.c Fri Apr 27 06:49:35 2012 (r234726) +++ head/sys/geom/raid/md_promise.c Fri Apr 27 08:49:15 2012 (r234727) @@ -1246,7 +1246,7 @@ g_raid_md_ctl_promise(struct g_raid_md_o return (-3); } if (strcasecmp(levelname, "RAID5") == 0) - levelname = "RAID5LA"; + levelname = "RAID5-LA"; if (g_raid_volume_str2level(levelname, &level, &qual)) { gctl_error(req, "Unknown RAID level '%s'.", levelname); return (-4); Modified: head/sys/geom/raid/md_sii.c ============================================================================== --- head/sys/geom/raid/md_sii.c Fri Apr 27 06:49:35 2012 (r234726) +++ head/sys/geom/raid/md_sii.c Fri Apr 27 08:49:15 2012 (r234727) @@ -1149,7 +1149,7 @@ g_raid_md_ctl_sii(struct g_raid_md_objec return (-3); } if (strcasecmp(levelname, "RAID5") == 0) - levelname = "RAID5LS"; + levelname = "RAID5-LS"; if (g_raid_volume_str2level(levelname, &level, &qual)) { gctl_error(req, "Unknown RAID level '%s'.", levelname); return (-4); From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 08:52:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CE6D106564A; Fri, 27 Apr 2012 08:52:22 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 257318FC15; Fri, 27 Apr 2012 08:52:22 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id F0F6925D3A05; Fri, 27 Apr 2012 08:52:20 +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 06C35BE5B97; Fri, 27 Apr 2012 08:52:20 +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 5bd8QuAzE8Wz; Fri, 27 Apr 2012 08:52:19 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id DB4F9BE5B95; Fri, 27 Apr 2012 08:52:18 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201201151208.q0FC8KAh082348@svn.freebsd.org> Date: Fri, 27 Apr 2012 08:52:17 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <8DFCF784-D4D4-420F-80FD-6B6609B035D4@lists.zabbadoz.net> References: <201201151208.q0FC8KAh082348@svn.freebsd.org> To: Martin Matuska X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r230129 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 08:52:22 -0000 On 15. Jan 2012, at 12:08 , Martin Matuska wrote: > Author: mm > Date: Sun Jan 15 12:08:20 2012 > New Revision: 230129 > URL: http://svn.freebsd.org/changeset/base/230129 >=20 > Log: > Introduce vn_path_to_global_path() >=20 > This function updates path string to vnode's full global path and = checks > the size of the new path string against the pathlen argument. >=20 > In vfs_domount(), sys_unmount() and kern_jail_set() this new function > is used to update the supplied path argument to the respective global = path. And I have been bitten by that with my image building inside a chroot = that after some years now failed to mount an md file system due to now being over the 88 char limit with chroot path + mount path inside the chroot (thanks kib for helping me figure out:) What I think the solution seems to be a larger project to break statfs once again and maybe convert it to a nmount like API as nmount and jails already use so that we'd not need more "ostatfs" versions in the future and could thus overcome the 88 character limit more easily (and handle backward compat somehow erroring or truncating or ...). It'd be hard, tiresome and not much rewarding but great to finally have it. Meanwhile I'll adjust quite a lot of setups to allow them to continue to work:) /bz --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 09:22:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B7B3F106566B; Fri, 27 Apr 2012 09:22:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A2FC78FC0C; Fri, 27 Apr 2012 09:22:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3R9Mkbp096692; Fri, 27 Apr 2012 09:22:46 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3R9MkP3096690; Fri, 27 Apr 2012 09:22:46 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201204270922.q3R9MkP3096690@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 27 Apr 2012 09:22:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234728 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 09:22:46 -0000 Author: hselasky Date: Fri Apr 27 09:22:46 2012 New Revision: 234728 URL: http://svn.freebsd.org/changeset/base/234728 Log: Style. Suggested by: dumbbell @ Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Apr 27 08:49:15 2012 (r234727) +++ head/ObsoleteFiles.inc Fri Apr 27 09:22:46 2012 (r234728) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20120425: libusb version bump (r234684) +OLD_LIBS+=usr/lib/libusb.so.2 +OLD_LIBS+=usr/lib32/libusb.so.2 # 20120415: new clang import which bumps version from 3.0 to 3.1 OLD_FILES+=usr/include/clang/3.0/altivec.h OLD_FILES+=usr/include/clang/3.0/avxintrin.h @@ -633,7 +636,6 @@ OLD_LIBS+=usr/lib/libssl.so.5 OLD_LIBS+=usr/lib/libtacplus.so.3 OLD_LIBS+=usr/lib/libugidfw.so.3 OLD_LIBS+=usr/lib/libusb.so.1 -OLD_LIBS+=usr/lib/libusb.so.2 OLD_LIBS+=usr/lib/libusbhid.so.3 OLD_LIBS+=usr/lib/libvgl.so.5 OLD_LIBS+=usr/lib/libwrap.so.5 @@ -735,7 +737,6 @@ OLD_LIBS+=usr/lib32/libufs.so.4 OLD_LIBS+=usr/lib32/libugidfw.so.3 OLD_LIBS+=usr/lib32/libumem.so.1 OLD_LIBS+=usr/lib32/libusb.so.1 -OLD_LIBS+=usr/lib32/libusb.so.2 OLD_LIBS+=usr/lib32/libusbhid.so.3 OLD_LIBS+=usr/lib32/libutil.so.7 OLD_LIBS+=usr/lib32/libuutil.so.1 From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 11:29:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4000106564A; Fri, 27 Apr 2012 11:29:09 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BFA0C8FC0C; Fri, 27 Apr 2012 11:29:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RBT9A2003428; Fri, 27 Apr 2012 11:29:09 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RBT9N7003426; Fri, 27 Apr 2012 11:29:09 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201204271129.q3RBT9N7003426@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Fri, 27 Apr 2012 11:29:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234729 - head/contrib/openpam/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 11:29:09 -0000 Author: des Date: Fri Apr 27 11:29:09 2012 New Revision: 234729 URL: http://svn.freebsd.org/changeset/base/234729 Log: r234173 missed one instance of FREE(line). Noticed by: glebius@ Modified: head/contrib/openpam/lib/openpam_configure.c Modified: head/contrib/openpam/lib/openpam_configure.c ============================================================================== --- head/contrib/openpam/lib/openpam_configure.c Fri Apr 27 09:22:46 2012 (r234728) +++ head/contrib/openpam/lib/openpam_configure.c Fri Apr 27 11:29:09 2012 (r234729) @@ -501,7 +501,7 @@ fail: FREE(this->optv); } FREE(this); - FREE(line); + FREE(line0); FREE(name); fclose(f); return (PAM_SYSTEM_ERR); From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 13:40:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 883E6106566B; Fri, 27 Apr 2012 13:40:19 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 5B95B8FC0C; Fri, 27 Apr 2012 13:40:19 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 987B2B91C; Fri, 27 Apr 2012 09:40:18 -0400 (EDT) From: John Baldwin To: Attilio Rao Date: Fri, 27 Apr 2012 07:40:41 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201204262024.q3QKOPA6067287@svn.freebsd.org> In-Reply-To: <201204262024.q3QKOPA6067287@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201204270740.43912.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 27 Apr 2012 09:40:18 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234723 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 sparc64/include sparc64/sparc64 x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 13:40:19 -0000 On Thursday, April 26, 2012 4:24:25 pm Attilio Rao wrote: > Author: attilio > Date: Thu Apr 26 20:24:25 2012 > New Revision: 234723 > URL: http://svn.freebsd.org/changeset/base/234723 > > Log: > Clean up the intr* MD KPI from the SMP dependency, removing a cause of > discrepancy between modules and kernel, but deal with SMP differences > within the functions themselves. > > As an added bonus this also helps in terms of code readability. Hmm, this should not have affected anything with modules as no modules should have ever called this. Also, making intr_bind() available for UP kernels on x86 is largely pointless. It's only caller is already conditional in sys/x86/x86/nexus.c: #ifdef SMP static int nexus_bind_intr(device_t dev, device_t child, struct resource *irq, int cpu) { return (intr_bind(rman_get_start(irq), cpu)); } #endif I think the UP stubs for intr_bind() should be removed. No drivers should be using that directly (they should all use bus_bind_intr(9)). The same appears to be true for sparc64 as well. I had only noticed the intr_add_cpu() changes when I reviewed, not the intr_bind() ones. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 13:40:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14A2B106566C; Fri, 27 Apr 2012 13:40:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id DE8058FC14; Fri, 27 Apr 2012 13:40:20 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 5A41DB961; Fri, 27 Apr 2012 09:40:20 -0400 (EDT) From: John Baldwin To: Alexander Motin Date: Fri, 27 Apr 2012 07:45:16 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201204231304.q3ND43Yg098748@svn.freebsd.org> In-Reply-To: <201204231304.q3ND43Yg098748@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201204270745.16844.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 27 Apr 2012 09:40:20 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234603 - head/sys/geom/raid X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 13:40:21 -0000 On Monday, April 23, 2012 9:04:03 am Alexander Motin wrote: > Author: mav > Date: Mon Apr 23 13:04:02 2012 > New Revision: 234603 > URL: http://svn.freebsd.org/changeset/base/234603 > > Log: > Add names for all primary RAID levels defined by DDF 2.0 specification. > > Modified: > head/sys/geom/raid/g_raid.c > head/sys/geom/raid/g_raid.h > head/sys/geom/raid/tr_raid1.c > head/sys/geom/raid/tr_raid1e.c We should probably add a separate header to hold DDF constants. graid isn't the only place that uses them (e.g. mfi(4) uses it to describe volumes, so mfiutil(8) has its own DDF constants as well in mfiutil.h). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 13:41:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77B6410656B7; Fri, 27 Apr 2012 13:41:21 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 625B98FC15; Fri, 27 Apr 2012 13:41:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RDfLQX008110; Fri, 27 Apr 2012 13:41:21 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RDfLQ0008108; Fri, 27 Apr 2012 13:41:21 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201204271341.q3RDfLQ0008108@svn.freebsd.org> From: Ken Smith Date: Fri, 27 Apr 2012 13:41:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234730 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 13:41:21 -0000 Author: kensmith Date: Fri Apr 27 13:41:20 2012 New Revision: 234730 URL: http://svn.freebsd.org/changeset/base/234730 Log: Turn releng/8.3 over to secteam. Approved by: core (implicit) Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Fri Apr 27 11:29:09 2012 (r234729) +++ svnadmin/conf/approvers Fri Apr 27 13:41:20 2012 (r234730) @@ -21,8 +21,7 @@ #^stable/8/ re #^stable/7/ re ^releng/9.0/ (security-officer|so) -^releng/8.3/ re -^releng/8.[0-2]/ (security-officer|so) +^releng/8.[0-3]/ (security-officer|so) ^releng/7.[0-4]/ (security-officer|so) ^releng/6.[0-4]/ (security-officer|so) ^releng/5.[0-5]/ (security-officer|so) From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 13:55:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E255A106564A; Fri, 27 Apr 2012 13:55:43 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id C65B98FC0C; Fri, 27 Apr 2012 13:55:42 +0000 (UTC) Received: by lagv3 with SMTP id v3so690953lag.13 for ; Fri, 27 Apr 2012 06:55:41 -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 :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=3befTjujDJv1D6peDyRdB6IjaR9KZ9BNxGVYJkGOiZg=; b=kge7SSPfm6YC0KKeJRx6dHd2n3Nr6FCXgrZV4hBzqam29Q95hTTTupkhJQc/LJJiz1 uSVefZj1SD4+Ai5o7OYQJZedAjwbx91sRNE1Un+LZU9rRh98s7K6IDE2OTv7bvecB3Ma bopBYNwly+0g0OOQVEUdWi7Dt1qJyn2R2HXNT0OBGFMurYcWLGVLCyMg9YlhPN0W6Vh7 eCkM3qMBajfG+cvLXyP5UserNvuN2ycNEQWwKKarM5ek85ZqUAQxtlE3rlYFXRk800XS /yBMkW8Rn3K5UjoqdfZJta9AaC4R6J8VeK60jN97ZFDml+Wfr3gQ4GJB2Hx7J9NbrA03 rgrQ== MIME-Version: 1.0 Received: by 10.152.132.166 with SMTP id ov6mr11624455lab.35.1335534941511; Fri, 27 Apr 2012 06:55:41 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.63.146 with HTTP; Fri, 27 Apr 2012 06:55:41 -0700 (PDT) In-Reply-To: <201204270740.43912.jhb@freebsd.org> References: <201204262024.q3QKOPA6067287@svn.freebsd.org> <201204270740.43912.jhb@freebsd.org> Date: Fri, 27 Apr 2012 14:55:41 +0100 X-Google-Sender-Auth: 2fU5FgQhZ5KMu5J-0ESel8-wphY Message-ID: From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234723 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 sparc64/include sparc64/sparc64 x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 13:55:44 -0000 2012/4/27, John Baldwin : > On Thursday, April 26, 2012 4:24:25 pm Attilio Rao wrote: >> Author: attilio >> Date: Thu Apr 26 20:24:25 2012 >> New Revision: 234723 >> URL: http://svn.freebsd.org/changeset/base/234723 >> >> Log: >> Clean up the intr* MD KPI from the SMP dependency, removing a cause of >> discrepancy between modules and kernel, but deal with SMP differences >> within the functions themselves. >> >> As an added bonus this also helps in terms of code readability. > > Hmm, this should not have affected anything with modules as no modules > should have ever called this. Also, making intr_bind() available for UP > kernels on x86 is largely pointless. It's only caller is already > conditional > in sys/x86/x86/nexus.c: It doesn't mean that there couldn't be an user in the future of this KPI in terms of thirdy part modules. These functions are part of the public KPI and we speak a lot about making our KPI as less as dependent by compiling options so I don't really see why you are not happy about this. If the function (intr_bind() included) is part of the public KPI it can be called by thirdy part modules too. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 13:58:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 15BA8106566B; Fri, 27 Apr 2012 13:58:10 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 013028FC15; Fri, 27 Apr 2012 13:58:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RDw9JU008733; Fri, 27 Apr 2012 13:58:09 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RDw93b008731; Fri, 27 Apr 2012 13:58:09 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201204271358.q3RDw93b008731@svn.freebsd.org> From: Michael Tuexen Date: Fri, 27 Apr 2012 13:58:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234731 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 13:58:10 -0000 Author: tuexen Date: Fri Apr 27 13:58:09 2012 New Revision: 234731 URL: http://svn.freebsd.org/changeset/base/234731 Log: Remove unused structure. Reported by Irene Ruengeler. MFC after: 3 days Modified: head/sys/netinet/sctp_uio.h Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Fri Apr 27 13:41:20 2012 (r234730) +++ head/sys/netinet/sctp_uio.h Fri Apr 27 13:58:09 2012 (r234731) @@ -608,13 +608,6 @@ struct sctp_getaddresses { struct sockaddr addr[1]; }; -struct sctp_setstrm_timeout { - sctp_assoc_t ssto_assoc_id; - uint32_t ssto_timeout; - uint32_t ssto_streamid_start; - uint32_t ssto_streamid_end; -}; - struct sctp_status { sctp_assoc_t sstat_assoc_id; int32_t sstat_state; From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 14:21:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4586A1065675; Fri, 27 Apr 2012 14:21:01 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 164B98FC08; Fri, 27 Apr 2012 14:21:01 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 79752B91A; Fri, 27 Apr 2012 10:21:00 -0400 (EDT) From: John Baldwin To: Attilio Rao Date: Fri, 27 Apr 2012 10:20:59 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201204262024.q3QKOPA6067287@svn.freebsd.org> <201204270740.43912.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201204271020.59067.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 27 Apr 2012 10:21:00 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234723 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 sparc64/include sparc64/sparc64 x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 14:21:01 -0000 On Friday, April 27, 2012 9:55:41 am Attilio Rao wrote: > 2012/4/27, John Baldwin : > > On Thursday, April 26, 2012 4:24:25 pm Attilio Rao wrote: > >> Author: attilio > >> Date: Thu Apr 26 20:24:25 2012 > >> New Revision: 234723 > >> URL: http://svn.freebsd.org/changeset/base/234723 > >> > >> Log: > >> Clean up the intr* MD KPI from the SMP dependency, removing a cause of > >> discrepancy between modules and kernel, but deal with SMP differences > >> within the functions themselves. > >> > >> As an added bonus this also helps in terms of code readability. > > > > Hmm, this should not have affected anything with modules as no modules > > should have ever called this. Also, making intr_bind() available for UP > > kernels on x86 is largely pointless. It's only caller is already > > conditional > > in sys/x86/x86/nexus.c: > > It doesn't mean that there couldn't be an user in the future of this > KPI in terms of thirdy part modules. > These functions are part of the public KPI and we speak a lot about > making our KPI as less as dependent by compiling options so I don't > really see why you are not happy about this. > > If the function (intr_bind() included) is part of the public KPI it > can be called by thirdy part modules too. No! intr_bind() is _NOT_ part of the public KPI. The public KPI is bus_intr_bind() which accepts a struct resource, which is the approved handle for interrupt resources in drivers and other modules. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 14:23:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C334A106564A; Fri, 27 Apr 2012 14:23:16 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id A7A488FC0A; Fri, 27 Apr 2012 14:23:15 +0000 (UTC) Received: by lbbgm6 with SMTP id gm6so727922lbb.13 for ; Fri, 27 Apr 2012 07:23:14 -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 :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=da2KH26WtOl/gIOQRb2ZPXRqwl1po7QflP06pfglVhE=; b=sFE02YDHw+bbKcOWpm0FZnwc0bqXg2Fledy5TJ49ewLGEYoAqCW5aknR2a4anhbHNT Jh/QDJurN/ym39g20pGgUrzoa3XeQ1DTBffm5KFDLH4sh+S+ysDYBrEXuuny3ceuAfz0 jKPwCDw0NI58Eagfyc1DSQybneRPqMRL6V4hBtQSUIZqgtm6F1oFMCi6N+pykaZUjwM4 dKk79R+oXo/AbVrmPNnchVCa4iV/14EPbXNZkuBzaHK5QH4s8gbyJUT+dYeqr7YV0m8G w+3ohtCo9CnUxUPCYyuoTxXSmhGNmIyFMpMGZ5jGOSfwAIyP2wQKywIi6t6XxuWQU/lK BtNA== MIME-Version: 1.0 Received: by 10.152.132.166 with SMTP id ov6mr11728267lab.35.1335536594648; Fri, 27 Apr 2012 07:23:14 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.63.146 with HTTP; Fri, 27 Apr 2012 07:23:14 -0700 (PDT) In-Reply-To: <201204271020.59067.jhb@freebsd.org> References: <201204262024.q3QKOPA6067287@svn.freebsd.org> <201204270740.43912.jhb@freebsd.org> <201204271020.59067.jhb@freebsd.org> Date: Fri, 27 Apr 2012 15:23:14 +0100 X-Google-Sender-Auth: YmBOr5AAmb_D9mjcbN-PzDZN3l8 Message-ID: From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234723 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 sparc64/include sparc64/sparc64 x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 14:23:16 -0000 2012/4/27, John Baldwin : > On Friday, April 27, 2012 9:55:41 am Attilio Rao wrote: >> 2012/4/27, John Baldwin : >> > On Thursday, April 26, 2012 4:24:25 pm Attilio Rao wrote: >> >> Author: attilio >> >> Date: Thu Apr 26 20:24:25 2012 >> >> New Revision: 234723 >> >> URL: http://svn.freebsd.org/changeset/base/234723 >> >> >> >> Log: >> >> Clean up the intr* MD KPI from the SMP dependency, removing a cause >> >> of >> >> discrepancy between modules and kernel, but deal with SMP >> >> differences >> >> within the functions themselves. >> >> >> >> As an added bonus this also helps in terms of code readability. >> > >> > Hmm, this should not have affected anything with modules as no modules >> > should have ever called this. Also, making intr_bind() available for >> > UP >> > kernels on x86 is largely pointless. It's only caller is already >> > conditional >> > in sys/x86/x86/nexus.c: >> >> It doesn't mean that there couldn't be an user in the future of this >> KPI in terms of thirdy part modules. >> These functions are part of the public KPI and we speak a lot about >> making our KPI as less as dependent by compiling options so I don't >> really see why you are not happy about this. >> >> If the function (intr_bind() included) is part of the public KPI it >> can be called by thirdy part modules too. > > No! intr_bind() is _NOT_ part of the public KPI. The public KPI is > bus_intr_bind() which accepts a struct resource, which is the approved > handle for interrupt resources in drivers and other modules. It is accessible from machine/intr_machdep.h so *it is* part of the public KPI by definition. However I won't argue further and will change it as you request, I have enough of no-sense requests on this simple change. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 15:08:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B075106564A; Fri, 27 Apr 2012 15:08:27 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 1B0DB8FC08; Fri, 27 Apr 2012 15:08:27 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4E3A8B93B; Fri, 27 Apr 2012 11:08:26 -0400 (EDT) From: John Baldwin To: Attilio Rao Date: Fri, 27 Apr 2012 11:08:25 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201204262024.q3QKOPA6067287@svn.freebsd.org> <201204271020.59067.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201204271108.25734.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 27 Apr 2012 11:08:26 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234723 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 sparc64/include sparc64/sparc64 x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 15:08:27 -0000 On Friday, April 27, 2012 10:23:14 am Attilio Rao wrote: > 2012/4/27, John Baldwin : > > On Friday, April 27, 2012 9:55:41 am Attilio Rao wrote: > >> 2012/4/27, John Baldwin : > >> > On Thursday, April 26, 2012 4:24:25 pm Attilio Rao wrote: > >> >> Author: attilio > >> >> Date: Thu Apr 26 20:24:25 2012 > >> >> New Revision: 234723 > >> >> URL: http://svn.freebsd.org/changeset/base/234723 > >> >> > >> >> Log: > >> >> Clean up the intr* MD KPI from the SMP dependency, removing a cause > >> >> of > >> >> discrepancy between modules and kernel, but deal with SMP > >> >> differences > >> >> within the functions themselves. > >> >> > >> >> As an added bonus this also helps in terms of code readability. > >> > > >> > Hmm, this should not have affected anything with modules as no modules > >> > should have ever called this. Also, making intr_bind() available for > >> > UP > >> > kernels on x86 is largely pointless. It's only caller is already > >> > conditional > >> > in sys/x86/x86/nexus.c: > >> > >> It doesn't mean that there couldn't be an user in the future of this > >> KPI in terms of thirdy part modules. > >> These functions are part of the public KPI and we speak a lot about > >> making our KPI as less as dependent by compiling options so I don't > >> really see why you are not happy about this. > >> > >> If the function (intr_bind() included) is part of the public KPI it > >> can be called by thirdy part modules too. > > > > No! intr_bind() is _NOT_ part of the public KPI. The public KPI is > > bus_intr_bind() which accepts a struct resource, which is the approved > > handle for interrupt resources in drivers and other modules. > > It is accessible from machine/intr_machdep.h so *it is* part of the > public KPI by definition. I will argue just this one point. I don't think this is true. There are many things in machine/foo headers that I do not consider to be part of the public KPI, but are solely for use in MD code, for example for the nexus(4) driver to interface with other MD code such as msi.c or intr_machdep.c on x86. Almost all of falls into this category. In fact, I don't see a single thing in the current that is intended to be used by any MI code and is part of the public KPI. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 15:18:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F3640106567A; Fri, 27 Apr 2012 15:18:41 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id CDCD58FC15; Fri, 27 Apr 2012 15:18:40 +0000 (UTC) Received: by lagv3 with SMTP id v3so781647lag.13 for ; Fri, 27 Apr 2012 08:18:39 -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 :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=0ynOizCXAvU1U+b3OgkIBcwC2DM7j2T8ntbsCTUNrHg=; b=VUwuRqBqkTMnyCvutv/Jcwhp21baYTt0KNT5tm0O6snmzS7orZBdGghgP0w53IxDRA h690qMEo4U6RT8sVrWi0wHF/E/PPJHbDru4UuCoNIiowtAIOnlU3LmdeTlyyTXy1v2MO UIx4nugaPbnalkRz51P1L0cAwMM2sGZTGpvuf3Qlsk9Xm+W0kS6uenb36LYahq6jtuKx MzsqyPy/6CdL42mbNAmF8z/p3950daqDEpXc4lye1Ws9AypTUaMaDYCpi+lrhlZQH5fs be7CfORR/LFLarUtg/esOgCY31yyisCudj2ZXeZpmCX6MysUDPruZWqZg+uuONmffl/k froQ== MIME-Version: 1.0 Received: by 10.152.144.101 with SMTP id sl5mr4628137lab.51.1335539919511; Fri, 27 Apr 2012 08:18:39 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.63.146 with HTTP; Fri, 27 Apr 2012 08:18:39 -0700 (PDT) In-Reply-To: <201204271108.25734.jhb@freebsd.org> References: <201204262024.q3QKOPA6067287@svn.freebsd.org> <201204271020.59067.jhb@freebsd.org> <201204271108.25734.jhb@freebsd.org> Date: Fri, 27 Apr 2012 16:18:39 +0100 X-Google-Sender-Auth: r3DxQJezx_vbx2_hZEbrSZdIIDs Message-ID: From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234723 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 sparc64/include sparc64/sparc64 x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 15:18:42 -0000 2012/4/27, John Baldwin : > On Friday, April 27, 2012 10:23:14 am Attilio Rao wrote: >> 2012/4/27, John Baldwin : >> > On Friday, April 27, 2012 9:55:41 am Attilio Rao wrote: >> >> 2012/4/27, John Baldwin : >> >> > On Thursday, April 26, 2012 4:24:25 pm Attilio Rao wrote: >> >> >> Author: attilio >> >> >> Date: Thu Apr 26 20:24:25 2012 >> >> >> New Revision: 234723 >> >> >> URL: http://svn.freebsd.org/changeset/base/234723 >> >> >> >> >> >> Log: >> >> >> Clean up the intr* MD KPI from the SMP dependency, removing a >> >> >> cause >> >> >> of >> >> >> discrepancy between modules and kernel, but deal with SMP >> >> >> differences >> >> >> within the functions themselves. >> >> >> >> >> >> As an added bonus this also helps in terms of code readability. >> >> > >> >> > Hmm, this should not have affected anything with modules as no >> >> > modules >> >> > should have ever called this. Also, making intr_bind() available >> >> > for >> >> > UP >> >> > kernels on x86 is largely pointless. It's only caller is already >> >> > conditional >> >> > in sys/x86/x86/nexus.c: >> >> >> >> It doesn't mean that there couldn't be an user in the future of this >> >> KPI in terms of thirdy part modules. >> >> These functions are part of the public KPI and we speak a lot about >> >> making our KPI as less as dependent by compiling options so I don't >> >> really see why you are not happy about this. >> >> >> >> If the function (intr_bind() included) is part of the public KPI it >> >> can be called by thirdy part modules too. >> > >> > No! intr_bind() is _NOT_ part of the public KPI. The public KPI is >> > bus_intr_bind() which accepts a struct resource, which is the approved >> > handle for interrupt resources in drivers and other modules. >> >> It is accessible from machine/intr_machdep.h so *it is* part of the >> public KPI by definition. > > I will argue just this one point. I don't think this is true. There are > many > things in machine/foo headers that I do not consider to be part of the > public > KPI, but are solely for use in MD code, for example for the nexus(4) driver > to > interface with other MD code such as msi.c or intr_machdep.c on x86. Almost > > all of falls into this category. In fact, I don't > > see a single thing in the current that is intended > to > be used by any MI code and is part of the public KPI. I think what we really want is something as _KERNEL discriminant to be _KERNEL_KPI which defines which functions are really part of the public KPI (to be intended for usage in modules) and which not. Right now your idea of 'public KPI' is just something to be shared by voice, but if you really don't want to consider all the exported kernel functions as part of the KPI a way to enforce the subset would be desirable. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 15:35:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 07507106564A; Fri, 27 Apr 2012 15:35:10 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E60348FC08; Fri, 27 Apr 2012 15:35:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RFZ9Fc012464; Fri, 27 Apr 2012 15:35:09 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RFZ9Nr012462; Fri, 27 Apr 2012 15:35:09 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201204271535.q3RFZ9Nr012462@svn.freebsd.org> From: David Chisnall Date: Fri, 27 Apr 2012 15:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234732 - head/usr.sbin/wpa/hostapd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 15:35:10 -0000 Author: theraven Date: Fri Apr 27 15:35:09 2012 New Revision: 234732 URL: http://svn.freebsd.org/changeset/base/234732 Log: Add a note to hostapd.conf about an unhelpful error message in the hope that it won't confuse anyone else in the future. MFC after: 1 week Modified: head/usr.sbin/wpa/hostapd/hostapd.conf.5 Modified: head/usr.sbin/wpa/hostapd/hostapd.conf.5 ============================================================================== --- head/usr.sbin/wpa/hostapd/hostapd.conf.5 Fri Apr 27 13:58:09 2012 (r234731) +++ head/usr.sbin/wpa/hostapd/hostapd.conf.5 Fri Apr 27 15:35:09 2012 (r234732) @@ -67,7 +67,8 @@ The following parameters are recognized: Interface name. Should be set in .Dq hostap -mode. +mode. Make certain that there are no spaces after the interface name, +or hostapd will complain that the interface does not exist. .It Va debug Debugging mode: 0 = no, 1 = minimal, 2 = verbose, 3 = msg dumps, 4 = excessive. From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 17:27:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFC1F106566C for ; Fri, 27 Apr 2012 17:27:23 +0000 (UTC) (envelope-from scott4long@yahoo.com) Received: from nm26-vm0.bullet.mail.sp2.yahoo.com (nm26-vm0.bullet.mail.sp2.yahoo.com [98.139.91.230]) by mx1.freebsd.org (Postfix) with SMTP id 9F3078FC19 for ; Fri, 27 Apr 2012 17:27:23 +0000 (UTC) Received: from [98.139.91.67] by nm26.bullet.mail.sp2.yahoo.com with NNFMP; 27 Apr 2012 17:27:23 -0000 Received: from [98.139.91.12] by tm7.bullet.mail.sp2.yahoo.com with NNFMP; 27 Apr 2012 17:27:23 -0000 Received: from [127.0.0.1] by omp1012.mail.sp2.yahoo.com with NNFMP; 27 Apr 2012 17:27:23 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 607909.15578.bm@omp1012.mail.sp2.yahoo.com Received: (qmail 965 invoked by uid 60001); 27 Apr 2012 17:27:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1335547643; bh=+rm6lHX2eOxpxc6UGx/Q+Y5oIlHmK0iq11TI3sIEoxc=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=S+S/QDPM6RaQdxhqDq6oWgNxFTiOilGy509LOk0hpTpMX6GQL9as3LQOZSrBSiCVwFpDeMMS0UhDsy5sca3q/wh8CvV/I2s+12kCvndZ/wsff5nA0RChsVHKzEKQHFkHSXoY1pJULqi/baaqVuvOY/HMAzeJQnjZ9bCWr6HnHOs= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=C6yyTBng/ZOR9kDKOTpd1kYtYf7xQAAzWm6kp/s3ODue5YhWUDkbebR/aIRLAcWuB9BwRn7dRz+Yh55nzIA8k7oiYDm5NYjrlJObweqbYIo+d5HtudokLMioH5/Mi7YAQbRGWjt7Ky770xQSLdWG/AygLHOgO5azoFg2TXWg3rY=; X-YMail-OSG: hj1ia.4VM1lMnzHngzT78KAls3rUAF1YhbK71MA4j8uLSdc OY3WDBfBd.Zz7ndUYxfFS6CAScluBZ8JMQtcvgEoOMd9kX9n7VCkR8FOdqmg cLNui_MC2sCiwLJcyYG1dGIX8RDYKt7hAMlib_1tlG0Ue00RSBDOHKBfIBkA JhgRnKNQXG6qBneSj7fmNUt8aKqKCw._J._immaQ4VAPFAF3BKRZghTT5TmF 7huYuvEr1Uj4oNkb2WcspiDDopM7qYu9XDiYevGSPrP4I2OI0fbJgGhr2bTh Vnj5Cwg5Vw6d.v6KsMpGrVlDyrvHsuP0yXr0QFrME2eXS2.TlLZXryMzI9fJ bRDoXY9z1_vQpTxgC8x6atZ5A3ZXtmzh5uRwDw_ZOO5USBHuN.xGFK.srdmQ FWnile2Mhcb78olNT9ldFxps_jCmn41Kzm42LcclbhNCdw51fOUc3ipkUTUS xPtyBGp5TRpx1fw-- Received: from [209.131.62.114] by web45713.mail.sp1.yahoo.com via HTTP; Fri, 27 Apr 2012 10:27:23 PDT X-Mailer: YahooMailWebService/0.8.117.340979 References: <201204231304.q3ND43Yg098748@svn.freebsd.org> <201204270745.16844.jhb@freebsd.org> Message-ID: <1335547643.283.YahooMailNeo@web45713.mail.sp1.yahoo.com> Date: Fri, 27 Apr 2012 10:27:23 -0700 (PDT) From: Scott Long To: John Baldwin , Alexander Motin In-Reply-To: <201204270745.16844.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r234603 - head/sys/geom/raid X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Scott Long List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 17:27:24 -0000 =0A=0A=0A=0A----- Original Message -----=0A> From: John Baldwin =0A> To: Alexander Motin =0A> Cc: src-committers@fre= ebsd.org; svn-src-all@freebsd.org; svn-src-head@freebsd.org=0A> Sent: Frida= y, April 27, 2012 5:45 AM=0A> Subject: Re: svn commit: r234603 - head/sys/g= eom/raid=0A> =0A> On Monday, April 23, 2012 9:04:03 am Alexander Motin wrot= e:=0A>> Author: mav=0A>> Date: Mon Apr 23 13:04:02 2012=0A>> New Revisio= n: 234603=0A>> URL: http://svn.freebsd.org/changeset/base/234603=0A>> =0A>= > Log:=0A>> =A0 Add names for all primary RAID levels defined by DDF 2.0 = specification.=0A>> =0A>> Modified:=0A>> =A0 head/sys/geom/raid/g_raid.c= =0A>> =A0 head/sys/geom/raid/g_raid.h=0A>> =A0 head/sys/geom/raid/tr_raid= 1.c=0A>> =A0 head/sys/geom/raid/tr_raid1e.c=0A> =0A> We should probably ad= d a separate header to hold DDF constants.=A0 graid isn't=0A> the only plac= e that uses them (e.g. mfi(4) uses it to describe volumes, so=0A> mfiutil(8= ) has its own DDF constants as well in mfiutil.h).=0A> =0A> --=A0=0A=0AYou = mean src/sys/dev/ata/ata-raid-ddf.h?=0A=0AThat said, I trust DDF to be neit= her universal nor standard, and it's probably a futile micro-optimization t= o try too hard at this. =A0At the very least, leave MFI alone.=0A=0A=0AScot= t=0A From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 17:46:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F660106566B; Fri, 27 Apr 2012 17:46:24 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id E4D8D8FC0C; Fri, 27 Apr 2012 17:46:23 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4F08FB96D; Fri, 27 Apr 2012 13:46:23 -0400 (EDT) From: John Baldwin To: Scott Long Date: Fri, 27 Apr 2012 13:38:37 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201204231304.q3ND43Yg098748@svn.freebsd.org> <201204270745.16844.jhb@freebsd.org> <1335547643.283.YahooMailNeo@web45713.mail.sp1.yahoo.com> In-Reply-To: <1335547643.283.YahooMailNeo@web45713.mail.sp1.yahoo.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201204271338.37236.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 27 Apr 2012 13:46:23 -0400 (EDT) Cc: "svn-src-head@freebsd.org" , Alexander Motin , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" Subject: Re: svn commit: r234603 - head/sys/geom/raid X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 17:46:24 -0000 On Friday, April 27, 2012 1:27:23 pm Scott Long wrote: > > ----- Original Message ----- > > From: John Baldwin > > To: Alexander Motin > > Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src-head@freebsd.org > > Sent: Friday, April 27, 2012 5:45 AM > > Subject: Re: svn commit: r234603 - head/sys/geom/raid > > > > On Monday, April 23, 2012 9:04:03 am Alexander Motin wrote: > >> Author: mav > >> Date: Mon Apr 23 13:04:02 2012 > >> New Revision: 234603 > >> URL: http://svn.freebsd.org/changeset/base/234603 > >> > >> Log: > >> Add names for all primary RAID levels defined by DDF 2.0 specification. > >> > >> Modified: > >> head/sys/geom/raid/g_raid.c > >> head/sys/geom/raid/g_raid.h > >> head/sys/geom/raid/tr_raid1.c > >> head/sys/geom/raid/tr_raid1e.c > > > > We should probably add a separate header to hold DDF constants. graid isn't > > the only place that uses them (e.g. mfi(4) uses it to describe volumes, so > > mfiutil(8) has its own DDF constants as well in mfiutil.h). > > > > -- > > You mean src/sys/dev/ata/ata-raid-ddf.h? Yes. > That said, I trust DDF to be neither universal nor standard, and it's probably a futile micro-optimization to try too hard at this. At the very least, leave MFI alone. Hmm, LSI claims that MFI uses the constant values (but not necessarily the structures from DDF). Certainly the primary RAID type in an mfi(4) volume uses the same constants as both g_raid.h and ata-raid-ddf.h. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 18:05:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 117F81065670; Fri, 27 Apr 2012 18:05:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E74E78FC16; Fri, 27 Apr 2012 18:05:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RI5O0K017928; Fri, 27 Apr 2012 18:05:24 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RI5OlY017926; Fri, 27 Apr 2012 18:05:24 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201204271805.q3RI5OlY017926@svn.freebsd.org> From: Dimitry Andric Date: Fri, 27 Apr 2012 18:05:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234734 - stable/9/sys/dev/asr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 18:05:25 -0000 Author: dim Date: Fri Apr 27 18:05:24 2012 New Revision: 234734 URL: http://svn.freebsd.org/changeset/base/234734 Log: MFC r234503: Replace homegrown list implementation in sys/dev/asr/asr.c with STAILQ(). While here, fix another clang warning about a switch which tests an enum type for a regular integer value. Submitted by: jhb Modified: stable/9/sys/dev/asr/asr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/asr/asr.c ============================================================================== --- stable/9/sys/dev/asr/asr.c Fri Apr 27 17:25:13 2012 (r234733) +++ stable/9/sys/dev/asr/asr.c Fri Apr 27 18:05:24 2012 (r234734) @@ -378,11 +378,12 @@ typedef struct Asr_softc { u_int16_t ha_Msgs_Count; /* Links into other parents and HBAs */ - struct Asr_softc * ha_next; /* HBA list */ + STAILQ_ENTRY(Asr_softc) ha_next; /* HBA list */ struct cdev *ha_devt; } Asr_softc_t; -static Asr_softc_t *Asr_softc_list; +static STAILQ_HEAD(, Asr_softc) Asr_softc_list = + STAILQ_HEAD_INITIALIZER(Asr_softc_list); /* * Prototypes of the routines we have in this object. @@ -1959,7 +1960,7 @@ ASR_setSysTab(Asr_softc_t *sc) { PI2O_EXEC_SYS_TAB_SET_MESSAGE Message_Ptr; PI2O_SET_SYSTAB_HEADER SystemTable; - Asr_softc_t * ha; + Asr_softc_t * ha, *next; PI2O_SGE_SIMPLE_ELEMENT sg; int retVal; @@ -1967,7 +1968,7 @@ ASR_setSysTab(Asr_softc_t *sc) sizeof(I2O_SET_SYSTAB_HEADER), M_TEMP, M_WAITOK | M_ZERO)) == NULL) { return (ENOMEM); } - for (ha = Asr_softc_list; ha; ha = ha->ha_next) { + STAILQ_FOREACH(ha, &Asr_softc_list, ha_next) { ++SystemTable->NumberEntries; } if ((Message_Ptr = (PI2O_EXEC_SYS_TAB_SET_MESSAGE)malloc ( @@ -1998,9 +1999,9 @@ ASR_setSysTab(Asr_softc_t *sc) &(Message_Ptr->StdMessageFrame)) & 0xF0) >> 2)); SG(sg, 0, I2O_SGL_FLAGS_DIR, SystemTable, sizeof(I2O_SET_SYSTAB_HEADER)); ++sg; - for (ha = Asr_softc_list; ha; ha = ha->ha_next) { + STAILQ_FOREACH_SAFE(ha, &Asr_softc_list, ha_next, next) { SG(sg, 0, - ((ha->ha_next) + ((next) ? (I2O_SGL_FLAGS_DIR) : (I2O_SGL_FLAGS_DIR | I2O_SGL_FLAGS_END_OF_BUFFER)), &(ha->ha_SystemTable), sizeof(ha->ha_SystemTable)); @@ -2396,7 +2397,7 @@ asr_attach(device_t dev) { PI2O_EXEC_STATUS_GET_REPLY status; PI2O_LCT_ENTRY Device; - Asr_softc_t *sc, **ha; + Asr_softc_t *sc; struct scsi_inquiry_data *iq; int bus, size, unit; int error; @@ -2405,7 +2406,7 @@ asr_attach(device_t dev) unit = device_get_unit(dev); sc->ha_dev = dev; - if (Asr_softc_list == NULL) { + if (STAILQ_EMPTY(&Asr_softc_list)) { /* * Fixup the OS revision as saved in the dptsig for the * engine (dptioctl.h) to pick up. @@ -2417,8 +2418,7 @@ asr_attach(device_t dev) */ LIST_INIT(&(sc->ha_ccb)); /* Link us into the HA list */ - for (ha = &Asr_softc_list; *ha; ha = &((*ha)->ha_next)); - *(ha) = sc; + STAILQ_INSERT_TAIL(&Asr_softc_list, sc, ha_next); /* * This is the real McCoy! @@ -2700,7 +2700,7 @@ asr_action(struct cam_sim *sim, union cc ccb->ccb_h.spriv_ptr0 = sc = (struct Asr_softc *)cam_sim_softc(sim); - switch (ccb->ccb_h.func_code) { + switch ((int)ccb->ccb_h.func_code) { /* Common cases first */ case XPT_SCSI_IO: /* Execute the requested I/O operation */ From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 18:08:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D9C67106564A; Fri, 27 Apr 2012 18:08:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C44698FC0C; Fri, 27 Apr 2012 18:08:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RI8FQv018078; Fri, 27 Apr 2012 18:08:15 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RI8FR1018076; Fri, 27 Apr 2012 18:08:15 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201204271808.q3RI8FR1018076@svn.freebsd.org> From: Dimitry Andric Date: Fri, 27 Apr 2012 18:08:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234735 - stable/9/sys/dev/nxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 18:08:16 -0000 Author: dim Date: Fri Apr 27 18:08:15 2012 New Revision: 234735 URL: http://svn.freebsd.org/changeset/base/234735 Log: MFC r234506: Fix the following compilation warnings in nxge(4): sys/dev/nxge/if_nxge.c:1276:11: error: case value not in enumerated type 'xge_hal_event_e' (aka 'enum xge_hal_event_e') [-Werror,-Wswitch] case XGE_LL_EVENT_TRY_XMIT_AGAIN: ^ sys/dev/nxge/if_nxge.c:1289:11: error: case value not in enumerated type 'xge_hal_event_e' (aka 'enum xge_hal_event_e') [-Werror,-Wswitch] case XGE_LL_EVENT_DEVICE_RESETTING: ^ This is because the switch uses xge_queue_item_t::event_type, which is an enum xge_hal_event_e, while the XGE_LL_EVENT_xx values are of the enum xge_event_e. Since messing around with the enum definitions is too disruptive, the simplest fix is to cast the argument of the switch to int. Reviewed by: gnn Modified: stable/9/sys/dev/nxge/if_nxge.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/nxge/if_nxge.c ============================================================================== --- stable/9/sys/dev/nxge/if_nxge.c Fri Apr 27 18:05:24 2012 (r234734) +++ stable/9/sys/dev/nxge/if_nxge.c Fri Apr 27 18:08:15 2012 (r234735) @@ -1272,7 +1272,7 @@ xge_callback_event(xge_queue_item_t *ite lldev = xge_hal_device_private(hldev); ifnetp = lldev->ifnetp; - switch(item->event_type) { + switch((int)item->event_type) { case XGE_LL_EVENT_TRY_XMIT_AGAIN: if(lldev->initialized) { if(xge_hal_channel_dtr_count(lldev->fifo_channel[0]) > 0) { From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 18:12:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 285861065677; Fri, 27 Apr 2012 18:12:26 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 238D98FC24; Fri, 27 Apr 2012 18:12:24 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so961027bkc.13 for ; Fri, 27 Apr 2012 11:12:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=1cJEQFwn2p2Wcaszi1hxe01tdO82hrOvwNGOSf8sSnc=; b=XYi+gzsDlvLRS2T43MRc5AaWy6Sb46wLx5IbIVxDIrAnB2MAAhCghhqqZXxBR+KbY3 NS7GeZzbhPj3sQPc6gBib3LiEU0sPAzZcGH8XNeYqgH5aj8dN2ekA9YwX3mM5WywJ3tT b2L/Vkttgye5Bu+fmOQHiYC4qOUq7xWOXjRZdicyxkKW0k2lDFyFFbnCCltCTOF8eqXV h+9dL7jqdJpWS2oiEstK4ulAl9UWdqBAc10BaUahB1SPhr3uRGfEs7HgqeYjfBzNdWAU nn6gUavHff0+mYQ+vNPpwq+jsmzZt1hge5xPA3g6Iz/ZEDqmnVEjTVUxLVX0wkZJJXnC 0VdQ== Received: by 10.204.9.195 with SMTP id m3mr4435810bkm.78.1335550344220; Fri, 27 Apr 2012 11:12:24 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id n17sm6129525bkw.5.2012.04.27.11.12.20 (version=SSLv3 cipher=OTHER); Fri, 27 Apr 2012 11:12:22 -0700 (PDT) Sender: Alexander Motin Message-ID: <4F9AE183.7060209@FreeBSD.org> Date: Fri, 27 Apr 2012 21:12:19 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120328 Thunderbird/10.0.3 MIME-Version: 1.0 To: John Baldwin References: <201204231304.q3ND43Yg098748@svn.freebsd.org> <201204270745.16844.jhb@freebsd.org> <1335547643.283.YahooMailNeo@web45713.mail.sp1.yahoo.com> <201204271338.37236.jhb@freebsd.org> In-Reply-To: <201204271338.37236.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Scott Long Subject: Re: svn commit: r234603 - head/sys/geom/raid X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 18:12:26 -0000 On 04/27/12 20:38, John Baldwin wrote: > On Friday, April 27, 2012 1:27:23 pm Scott Long wrote: >> >> ----- Original Message ----- >>> From: John Baldwin >>> To: Alexander Motin >>> Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src-head@freebsd.org >>> Sent: Friday, April 27, 2012 5:45 AM >>> Subject: Re: svn commit: r234603 - head/sys/geom/raid >>> >>> On Monday, April 23, 2012 9:04:03 am Alexander Motin wrote: >>>> Author: mav >>>> Date: Mon Apr 23 13:04:02 2012 >>>> New Revision: 234603 >>>> URL: http://svn.freebsd.org/changeset/base/234603 >>>> >>>> Log: >>>> Add names for all primary RAID levels defined by DDF 2.0 specification. >>>> >>>> Modified: >>>> head/sys/geom/raid/g_raid.c >>>> head/sys/geom/raid/g_raid.h >>>> head/sys/geom/raid/tr_raid1.c >>>> head/sys/geom/raid/tr_raid1e.c >>> >>> We should probably add a separate header to hold DDF constants. graid isn't >>> the only place that uses them (e.g. mfi(4) uses it to describe volumes, so >>> mfiutil(8) has its own DDF constants as well in mfiutil.h). >>> >>> -- >> >> You mean src/sys/dev/ata/ata-raid-ddf.h? > > Yes. > >> That said, I trust DDF to be neither universal nor standard, and it's probably a futile micro-optimization to try too hard at this. At the very > least, leave MFI alone. Standard or not, DDF is the only public specification and it is quite universal from point of reviewing possible configurations. That's why I took it as reference instead of reinventing own numbers. Same time metadata modules in graid may do own translation and theoretically support some other configurations, that's why I am not exactly comfortable with idea of merging these lists and strictly tying to DDF. > Hmm, LSI claims that MFI uses the constant values (but not necessarily the > structures from DDF). Certainly the primary RAID type in an mfi(4) volume > uses the same constants as both g_raid.h and ata-raid-ddf.h. ata-raid-ddf.h as all ataraid(4) is not actively used now and should leave. Instead I am now writing DDF module for graid and going to resurrect that file there with minor updates. These two files could be merged, but I am not sure it worth to be done either, as it is temporary coexistence. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 18:21:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0829E1065670; Fri, 27 Apr 2012 18:21:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD89E8FC15; Fri, 27 Apr 2012 18:21:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RILjqA018665; Fri, 27 Apr 2012 18:21:45 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RILjES018663; Fri, 27 Apr 2012 18:21:45 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201204271821.q3RILjES018663@svn.freebsd.org> From: Dimitry Andric Date: Fri, 27 Apr 2012 18:21:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234736 - stable/9/sys/contrib/rdma X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 18:21:46 -0000 Author: dim Date: Fri Apr 27 18:21:45 2012 New Revision: 234736 URL: http://svn.freebsd.org/changeset/base/234736 Log: MFC r234507: Fix the following compilation warnings in sys/contrib/rdma/rdma_cma.c: sys/contrib/rdma/rdma_cma.c:1259:8: error: case value not in enumerated type 'enum iw_cm_event_status' [-Werror,-Wswitch] case ECONNRESET: ^ @/sys/errno.h:118:20: note: expanded from macro 'ECONNRESET' #define ECONNRESET 54 /* Connection reset by peer */ ^ sys/contrib/rdma/rdma_cma.c:1263:8: error: case value not in enumerated type 'enum iw_cm_event_status' [-Werror,-Wswitch] case ETIMEDOUT: ^ @/sys/errno.h:124:19: note: expanded from macro 'ETIMEDOUT' #define ETIMEDOUT 60 /* Operation timed out */ ^ sys/contrib/rdma/rdma_cma.c:1260:8: error: case value not in enumerated type 'enum iw_cm_event_status' [-Werror,-Wswitch] case ECONNREFUSED: ^ @/sys/errno.h:125:22: note: expanded from macro 'ECONNREFUSED' #define ECONNREFUSED 61 /* Connection refused */ ^ This is because the switch uses iw_cm_event::status, which is an enum iw_cm_event_status, while ECONNRESET, ETIMEDOUT and ECONNREFUSED are just plain defines from errno.h. It looks like there is only one use of any of the enumeration values of iw_cm_event_status, in: sys/contrib/rdma/rdma_iwcm.c: if (iw_event->status == IW_CM_EVENT_STATUS_ACCEPTED) { So messing around with the enum definitions to fix the warning seems too disruptive; the simplest fix is to cast the argument of the switch to int. Reviewed by: kmacy Modified: stable/9/sys/contrib/rdma/rdma_cma.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/contrib/rdma/rdma_cma.c ============================================================================== --- stable/9/sys/contrib/rdma/rdma_cma.c Fri Apr 27 18:08:15 2012 (r234735) +++ stable/9/sys/contrib/rdma/rdma_cma.c Fri Apr 27 18:21:45 2012 (r234736) @@ -1252,7 +1252,7 @@ static int cma_iw_handler(struct iw_cm_i *sin = iw_event->local_addr; sin = (struct sockaddr_in *) &id_priv->id.route.addr.dst_addr; *sin = iw_event->remote_addr; - switch (iw_event->status) { + switch ((int)iw_event->status) { case 0: event.event = RDMA_CM_EVENT_ESTABLISHED; break; From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 19:26:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62504106566B; Fri, 27 Apr 2012 19:26:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3385C8FC12; Fri, 27 Apr 2012 19:26:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RJQKpX021070; Fri, 27 Apr 2012 19:26:20 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RJQJQZ021065; Fri, 27 Apr 2012 19:26:19 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201204271926.q3RJQJQZ021065@svn.freebsd.org> From: Dimitry Andric Date: Fri, 27 Apr 2012 19:26:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234737 - stable/9/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 19:26:20 -0000 Author: dim Date: Fri Apr 27 19:26:19 2012 New Revision: 234737 URL: http://svn.freebsd.org/changeset/base/234737 Log: Fix several 'format string is not a literal' warnings in sysinstall. Since sysinstall does not exist anymore in head, this is a direct commit. Modified: stable/9/usr.sbin/sysinstall/dispatch.c stable/9/usr.sbin/sysinstall/install.c stable/9/usr.sbin/sysinstall/label.c stable/9/usr.sbin/sysinstall/modules.c Modified: stable/9/usr.sbin/sysinstall/dispatch.c ============================================================================== --- stable/9/usr.sbin/sysinstall/dispatch.c Fri Apr 27 18:21:45 2012 (r234736) +++ stable/9/usr.sbin/sysinstall/dispatch.c Fri Apr 27 19:26:19 2012 (r234737) @@ -591,7 +591,7 @@ dispatch_load_menu(dialogMenuItem *self) if (err != NULL) { what |= DITEM_FAILURE; if (!variable_get(VAR_NO_ERROR)) - msgConfirm(err); + msgConfirm("%s", err); } return (what); Modified: stable/9/usr.sbin/sysinstall/install.c ============================================================================== --- stable/9/usr.sbin/sysinstall/install.c Fri Apr 27 18:21:45 2012 (r234736) +++ stable/9/usr.sbin/sysinstall/install.c Fri Apr 27 19:26:19 2012 (r234737) @@ -1017,10 +1017,10 @@ performNewfs(PartInfo *pi, char *dname, } if (queue == QUEUE_YES) { - command_shell_add(pi->mountpoint, buffer); + command_shell_add(pi->mountpoint, "%s", buffer); return (0); } else - return (vsystem(buffer)); + return (vsystem("%s", buffer)); } return (0); } Modified: stable/9/usr.sbin/sysinstall/label.c ============================================================================== --- stable/9/usr.sbin/sysinstall/label.c Fri Apr 27 18:21:45 2012 (r234736) +++ stable/9/usr.sbin/sysinstall/label.c Fri Apr 27 19:26:19 2012 (r234737) @@ -978,7 +978,7 @@ diskLabel(Device *dev) } if (msg) { if (req) { - msgConfirm(msg); + msgConfirm("%s", msg); clear_wins(); msg = NULL; } Modified: stable/9/usr.sbin/sysinstall/modules.c ============================================================================== --- stable/9/usr.sbin/sysinstall/modules.c Fri Apr 27 18:21:45 2012 (r234736) +++ stable/9/usr.sbin/sysinstall/modules.c Fri Apr 27 19:26:19 2012 (r234737) @@ -198,7 +198,7 @@ kldBrowser(dialogMenuItem *self) if (err != NULL) { what |= DITEM_FAILURE; if (!variable_get(VAR_NO_ERROR)) - msgConfirm(err); + msgConfirm("%s", err); } return (what); From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 20:10:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1C67B106564A; Fri, 27 Apr 2012 20:10:44 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 07A518FC20; Fri, 27 Apr 2012 20:10:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RKAhCj022771; Fri, 27 Apr 2012 20:10:43 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RKAht0022769; Fri, 27 Apr 2012 20:10:43 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201204272010.q3RKAht0022769@svn.freebsd.org> From: Marcel Moolenaar Date: Fri, 27 Apr 2012 20:10:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234738 - stable/9/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 20:10:44 -0000 Author: marcel Date: Fri Apr 27 20:10:43 2012 New Revision: 234738 URL: http://svn.freebsd.org/changeset/base/234738 Log: MFC 234611: Update the bugs section. We don't consider tmpfs as experimental, though we do not claim to support all mount options equally well. Modified: stable/9/share/man/man5/tmpfs.5 Directory Properties: stable/9/share/man/man5/ (props changed) Modified: stable/9/share/man/man5/tmpfs.5 ============================================================================== --- stable/9/share/man/man5/tmpfs.5 Fri Apr 27 19:26:19 2012 (r234737) +++ stable/9/share/man/man5/tmpfs.5 Fri Apr 27 20:10:43 2012 (r234738) @@ -49,7 +49,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 16, 2010 +.Dd April 23, 2012 .Dt TMPFS 5 .Os .Sh NAME @@ -141,9 +141,4 @@ to This manual page was written by .An Xin LI Aq delphij@FreeBSD.org . .Sh BUGS -The -.Nm -kernel implementation is currently considered as -an experimental feature. -Some file system mount -time options are not well supported. +Some file system mount time options may not be well-supported. From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 20:16:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5495106566B; Fri, 27 Apr 2012 20:16:20 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A08218FC08; Fri, 27 Apr 2012 20:16:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RKGKSF023011; Fri, 27 Apr 2012 20:16:20 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RKGKDX023009; Fri, 27 Apr 2012 20:16:20 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201204272016.q3RKGKDX023009@svn.freebsd.org> From: Marcel Moolenaar Date: Fri, 27 Apr 2012 20:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234739 - head/gnu/usr.bin/gdb/kgdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 20:16:20 -0000 Author: marcel Date: Fri Apr 27 20:16:20 2012 New Revision: 234739 URL: http://svn.freebsd.org/changeset/base/234739 Log: Allow building a powerpc cross-kgdb. Modified: head/gnu/usr.bin/gdb/kgdb/trgt_powerpc.c Modified: head/gnu/usr.bin/gdb/kgdb/trgt_powerpc.c ============================================================================== --- head/gnu/usr.bin/gdb/kgdb/trgt_powerpc.c Fri Apr 27 20:10:43 2012 (r234738) +++ head/gnu/usr.bin/gdb/kgdb/trgt_powerpc.c Fri Apr 27 20:16:20 2012 (r234739) @@ -28,8 +28,13 @@ __FBSDID("$FreeBSD$"); #include +#ifdef CROSS_DEBUGGER +#include +#include +#else #include #include +#endif #include #include #include From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 20:23:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CC02E106564A; Fri, 27 Apr 2012 20:23:24 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B764D8FC0A; Fri, 27 Apr 2012 20:23:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RKNOpn023298; Fri, 27 Apr 2012 20:23:24 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RKNOQH023296; Fri, 27 Apr 2012 20:23:24 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201204272023.q3RKNOQH023296@svn.freebsd.org> From: Rick Macklem Date: Fri, 27 Apr 2012 20:23:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234740 - head/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 20:23:24 -0000 Author: rmacklem Date: Fri Apr 27 20:23:24 2012 New Revision: 234740 URL: http://svn.freebsd.org/changeset/base/234740 Log: Fix a leak of namei lookup path buffers that occurs when a ZFS volume is exported via the new NFS server. The leak occurred because the new NFS server code didn't handle the case where a file system sets the SAVENAME flag in its VOP_LOOKUP() and ZFS does this for the DELETE case. Tested by: Oliver Brandmueller (ob at gruft.de), hrs PR: kern/167266 MFC after: 1 month Modified: head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Fri Apr 27 20:16:20 2012 (r234739) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Fri Apr 27 20:23:24 2012 (r234740) @@ -1047,6 +1047,8 @@ nfsvno_removesub(struct nameidata *ndp, else vput(ndp->ni_dvp); vput(vp); + if ((ndp->ni_cnd.cn_flags & SAVENAME) != 0) + nfsvno_relpathbuf(ndp); NFSEXITCODE(error); return (error); } @@ -1086,6 +1088,8 @@ out: else vput(ndp->ni_dvp); vput(vp); + if ((ndp->ni_cnd.cn_flags & SAVENAME) != 0) + nfsvno_relpathbuf(ndp); NFSEXITCODE(error); return (error); } From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 20:42:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 057E6106564A; Fri, 27 Apr 2012 20:42:40 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by mx1.freebsd.org (Postfix) with ESMTP id B6F328FC17; Fri, 27 Apr 2012 20:42:39 +0000 (UTC) Received: by dadz14 with SMTP id z14so4920665dad.17 for ; Fri, 27 Apr 2012 13:42:39 -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 :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=KFarAbheAZ1CUzw2EUou2csUYk9naN4tWQDaENAQdYo=; b=yoqS1YKOSGja7SNFrdus8vv9IWFrLen7DdBdLeosQGCOQjBDbBcZPwJ9AsuSEnhNat strdR6+niz1RnNtWtwoRzil/ABhzLPwB1mNKrszRwrgVO84UksWfpbEDY5ajZBPM3Qqz WdFTcim+BbqBcE1BsbD5lBm8BCv3Jo5tSDPGgqVWlj2dU807sZ6AHaNjjHf0Ywnn+Yz2 PXXW635UTeKiweZVBTP6nkred8fviRFgO5By8221g8KOZYD6GSLkA+z9ssMcH4G5aAjo JhA7OxRQJ/3zAUugueP+b6OqxSL/T+7q7A5H5HWNmCgVP4Q7t17cvjtDcuaueeca+6AA io8g== MIME-Version: 1.0 Received: by 10.68.213.200 with SMTP id nu8mr13956780pbc.59.1335559359538; Fri, 27 Apr 2012 13:42:39 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.101.9 with HTTP; Fri, 27 Apr 2012 13:42:39 -0700 (PDT) In-Reply-To: <4F91240C.3050703@ipfw.ru> References: <201204060653.q366rwLa096182@svn.freebsd.org> <4F7E9413.20602@FreeBSD.org> <4F8BBD4E.1040106@FreeBSD.org> <4F91240C.3050703@ipfw.ru> Date: Fri, 27 Apr 2012 13:42:39 -0700 X-Google-Sender-Auth: wFTBDahJZWfGg4fbgug1a9YSzhQ Message-ID: From: Adrian Chadd To: "Alexander V. Chernikov" Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, freebsd-net@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233937 - in head/sys: kern net security/mac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 20:42:40 -0000 Hi Alex, I don't want to be demanding, but would you please consider committing your fixes? And if you could, would you please do it as a set of commits, one per 'thing', rather than one big monolithic commit that does half a dozen different things? That way if there are any further regressions, I/others could test things out. This is breaking bpf for a few people - ladv causes a crash, wifi also causes a crash. Thanks! Adrian From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 21:40:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C27E106566C; Fri, 27 Apr 2012 21:40:52 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D1198FC08; Fri, 27 Apr 2012 21:40:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RLeqLj026037; Fri, 27 Apr 2012 21:40:52 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RLeqC9026034; Fri, 27 Apr 2012 21:40:52 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201204272140.q3RLeqC9026034@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Fri, 27 Apr 2012 21:40:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234741 - stable/8/lib/libpam/modules/pam_unix X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 21:40:52 -0000 Author: des Date: Fri Apr 27 21:40:51 2012 New Revision: 234741 URL: http://svn.freebsd.org/changeset/base/234741 Log: MFH r203377, r215680, r227044, r227105: mainly, respect passwordtime. PR: 93310, 93473 Modified: stable/8/lib/libpam/modules/pam_unix/pam_unix.8 stable/8/lib/libpam/modules/pam_unix/pam_unix.c Modified: stable/8/lib/libpam/modules/pam_unix/pam_unix.8 ============================================================================== --- stable/8/lib/libpam/modules/pam_unix/pam_unix.8 Fri Apr 27 20:23:24 2012 (r234740) +++ stable/8/lib/libpam/modules/pam_unix/pam_unix.8 Fri Apr 27 21:40:51 2012 (r234741) @@ -188,3 +188,9 @@ password database. .Xr pam 8 , .Xr pw 8 , .Xr yp 8 +.Sh BUGS +The +.Nm +module ignores the +.Dv PAM_CHANGE_EXPIRED_AUTHTOK +flag. Modified: stable/8/lib/libpam/modules/pam_unix/pam_unix.c ============================================================================== --- stable/8/lib/libpam/modules/pam_unix/pam_unix.c Fri Apr 27 20:23:24 2012 (r234740) +++ stable/8/lib/libpam/modules/pam_unix/pam_unix.c Fri Apr 27 21:40:51 2012 (r234741) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -80,8 +81,6 @@ static char password_hash[] = PASSWORD_ #define PAM_OPT_LOCAL_PASS "local_pass" #define PAM_OPT_NIS_PASS "nis_pass" -char *tempname = NULL; - /* * authentication management */ @@ -271,10 +270,11 @@ pam_sm_chauthtok(pam_handle_t *pamh, int const void *yp_domain, *yp_server; #endif char salt[SALTSIZE + 1]; - login_cap_t * lc; + login_cap_t *lc; struct passwd *pwd, *old_pwd; const char *user, *old_pass, *new_pass; char *encrypted; + time_t passwordtime; int pfd, tfd, retval; if (openpam_get_option(pamh, PAM_OPT_AUTH_AS_SELF)) @@ -377,11 +377,17 @@ pam_sm_chauthtok(pam_handle_t *pamh, int if ((old_pwd = pw_dup(pwd)) == NULL) return (PAM_BUF_ERR); - pwd->pw_change = 0; lc = login_getclass(pwd->pw_class); if (login_setcryptfmt(lc, password_hash, NULL) == NULL) openpam_log(PAM_LOG_ERROR, "can't set password cipher, relying on default"); + + /* set password expiry date */ + pwd->pw_change = 0; + passwordtime = login_getcaptime(lc, "passwordtime", 0, 0); + if (passwordtime > 0) + pwd->pw_change = time(NULL) + passwordtime; + login_close(lc); makesalt(salt); pwd->pw_passwd = crypt(new_pass, salt); From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 22:23:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70E09106566B; Fri, 27 Apr 2012 22:23:07 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5BD188FC0A; Fri, 27 Apr 2012 22:23:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RMN79a027534; Fri, 27 Apr 2012 22:23:07 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RMN6cJ027532; Fri, 27 Apr 2012 22:23:06 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201204272223.q3RMN6cJ027532@svn.freebsd.org> From: Rick Macklem Date: Fri, 27 Apr 2012 22:23:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234742 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 22:23:07 -0000 Author: rmacklem Date: Fri Apr 27 22:23:06 2012 New Revision: 234742 URL: http://svn.freebsd.org/changeset/base/234742 Log: It was reported via email that some non-FreeBSD NFS servers do not include file attributes in the reply to an NFS create RPC under certain circumstances. This resulted in a vnode of type VNON that was not usable. This patch adds an NFS getattr RPC to nfs_create() for this case, to fix the problem. It was tested by the person that reported the problem and confirmed to fix this case for their server. Tested by: Steven Haber (steven.haber at isilon.com) MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Fri Apr 27 21:40:51 2012 (r234741) +++ head/sys/fs/nfsclient/nfs_clvnops.c Fri Apr 27 22:23:06 2012 (r234742) @@ -1546,7 +1546,10 @@ again: (void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1); if (!error) { newvp = NFSTOV(np); - if (attrflag) + if (attrflag == 0) + error = nfsrpc_getattr(newvp, cnp->cn_cred, + cnp->cn_thread, &nfsva, NULL); + if (error == 0) error = nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL, 0, 1); } From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 22:27:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 405B0106566B; Fri, 27 Apr 2012 22:27:22 +0000 (UTC) (envelope-from rmh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BB328FC14; Fri, 27 Apr 2012 22:27:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RMRMRD027714; Fri, 27 Apr 2012 22:27:22 GMT (envelope-from rmh@svn.freebsd.org) Received: (from rmh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RMRLmI027711; Fri, 27 Apr 2012 22:27:21 GMT (envelope-from rmh@svn.freebsd.org) Message-Id: <201204272227.q3RMRLmI027711@svn.freebsd.org> From: Robert Millan Date: Fri, 27 Apr 2012 22:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234743 - head/sys/amd64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 22:27:22 -0000 Author: rmh Date: Fri Apr 27 22:27:21 2012 New Revision: 234743 URL: http://svn.freebsd.org/changeset/base/234743 Log: Increase DFLDSIZ from 128 MiB to 32 GiB. On amd64 there's plenty of virtual memory available, so there is no need to be so conservative about it. Reviewed by: arch Modified: head/sys/amd64/include/vmparam.h Modified: head/sys/amd64/include/vmparam.h ============================================================================== --- head/sys/amd64/include/vmparam.h Fri Apr 27 22:23:06 2012 (r234742) +++ head/sys/amd64/include/vmparam.h Fri Apr 27 22:27:21 2012 (r234743) @@ -54,7 +54,7 @@ */ #define MAXTSIZ (128UL*1024*1024) /* max text size */ #ifndef DFLDSIZ -#define DFLDSIZ (128UL*1024*1024) /* initial data size limit */ +#define DFLDSIZ (32768UL*1024*1024) /* initial data size limit */ #endif #ifndef MAXDSIZ #define MAXDSIZ (32768UL*1024*1024) /* max data size */ From owner-svn-src-all@FreeBSD.ORG Fri Apr 27 23:39:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 91DD2106564A; Fri, 27 Apr 2012 23:39:22 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C8838FC08; Fri, 27 Apr 2012 23:39:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3RNdMll030297; Fri, 27 Apr 2012 23:39:22 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3RNdMbf030295; Fri, 27 Apr 2012 23:39:22 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201204272339.q3RNdMbf030295@svn.freebsd.org> From: Jamie Gritton Date: Fri, 27 Apr 2012 23:39:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234744 - head/usr.sbin/jail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 23:39:22 -0000 Author: jamie Date: Fri Apr 27 23:39:21 2012 New Revision: 234744 URL: http://svn.freebsd.org/changeset/base/234744 Log: Fix the dates and history as of the move to HEAD. Modified: head/usr.sbin/jail/jail.conf.5 Modified: head/usr.sbin/jail/jail.conf.5 ============================================================================== --- head/usr.sbin/jail/jail.conf.5 Fri Apr 27 22:27:21 2012 (r234743) +++ head/usr.sbin/jail/jail.conf.5 Fri Apr 27 23:39:21 2012 (r234744) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011 James Gritton +.\" Copyright (c) 2012 James Gritton .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 20, 2010 +.Dd April 26, 2012 .Dt JAIL.CONF 5 .Os .Sh NAME @@ -217,7 +217,7 @@ utility appeared in The .Nm file was added in -.Fx 9.0 . +.Fx 10.0 . .Sh AUTHORS .An -nosplit The jail feature was written by From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 00:12:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5532D1065672; Sat, 28 Apr 2012 00:12:24 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FFBB8FC0C; Sat, 28 Apr 2012 00:12:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3S0COP3031475; Sat, 28 Apr 2012 00:12:24 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3S0COYL031472; Sat, 28 Apr 2012 00:12:24 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204280012.q3S0COYL031472@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 28 Apr 2012 00:12:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234745 - head/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 00:12:24 -0000 Author: nwhitehorn Date: Sat Apr 28 00:12:23 2012 New Revision: 234745 URL: http://svn.freebsd.org/changeset/base/234745 Log: After switching mutexes to use lwsync, they no longer provide sufficient guarantees on acquire for the tlbie mutex. Conversely, the TLB invalidation sequence provides guarantees that do not need to be redundantly applied on release. Roll a small custom lock that is just right. Simultaneously, convert the SLB tree changes back to lwsync, as changing them to sync was a misdiagnosis of the tlbie barrier problem this commit actually fixes. Modified: head/sys/powerpc/aim/moea64_native.c head/sys/powerpc/aim/slb.c Modified: head/sys/powerpc/aim/moea64_native.c ============================================================================== --- head/sys/powerpc/aim/moea64_native.c Fri Apr 27 23:39:21 2012 (r234744) +++ head/sys/powerpc/aim/moea64_native.c Sat Apr 28 00:12:23 2012 (r234745) @@ -133,36 +133,31 @@ __FBSDID("$FreeBSD$"); #define VSID_HASH_MASK 0x0000007fffffffffULL -/* - * The tlbie instruction must be executed in 64-bit mode - * so we have to twiddle MSR[SF] around every invocation. - * Just to add to the fun, exceptions must be off as well - * so that we can't trap in 64-bit mode. What a pain. - */ -static struct mtx tlbie_mutex; - static __inline void TLBIE(uint64_t vpn) { #ifndef __powerpc64__ register_t vpn_hi, vpn_lo; register_t msr; - register_t scratch; + register_t scratch, intr; #endif + static volatile u_int tlbie_lock = 0; + vpn <<= ADDR_PIDX_SHFT; vpn &= ~(0xffffULL << 48); + /* Hobo spinlock: we need stronger guarantees than mutexes provide */ + while (!atomic_cmpset_int(&tlbie_lock, 0, 1)); + isync(); /* Flush instruction queue once lock acquired */ + #ifdef __powerpc64__ - mtx_lock(&tlbie_mutex); __asm __volatile("tlbie %0" :: "r"(vpn) : "memory"); - mtx_unlock(&tlbie_mutex); - __asm __volatile("eieio; tlbsync; ptesync"); + __asm __volatile("eieio; tlbsync; ptesync" ::: "memory"); #else vpn_hi = (uint32_t)(vpn >> 32); vpn_lo = (uint32_t)vpn; - /* Note: spin mutex is to disable exceptions while fiddling MSR */ - mtx_lock_spin(&tlbie_mutex); + intr = intr_disable(); __asm __volatile("\ mfmsr %0; \ mr %1, %0; \ @@ -179,8 +174,11 @@ TLBIE(uint64_t vpn) { ptesync;" : "=r"(msr), "=r"(scratch) : "r"(vpn_hi), "r"(vpn_lo), "r"(32), "r"(1) : "memory"); - mtx_unlock_spin(&tlbie_mutex); + intr_enable(); #endif + + /* No barriers or special ops -- taken care of by ptesync above */ + tlbie_lock = 0; } #define DISABLE_TRANS(msr) msr = mfmsr(); mtmsr(msr & ~PSL_DR) @@ -261,9 +259,9 @@ moea64_pte_clear_native(mmu_t mmu, uintp * As shown in Section 7.6.3.2.3 */ pt->pte_lo &= ~ptebit; - sched_pin(); + critical_enter(); TLBIE(vpn); - sched_unpin(); + critical_exit(); } static void @@ -297,12 +295,12 @@ moea64_pte_unset_native(mmu_t mmu, uintp * Invalidate the pte. */ isync(); - sched_pin(); + critical_enter(); pvo_pt->pte_hi &= ~LPTE_VALID; pt->pte_hi &= ~LPTE_VALID; PTESYNC(); TLBIE(vpn); - sched_unpin(); + critical_exit(); /* * Save the reg & chg bits. @@ -405,15 +403,6 @@ moea64_bootstrap_native(mmu_t mmup, vm_o CTR1(KTR_PMAP, "moea64_bootstrap: PTEG table at %p", moea64_pteg_table); - /* - * Initialize the TLBIE lock. TLBIE can only be executed by one CPU. - */ -#ifdef __powerpc64__ - mtx_init(&tlbie_mutex, "tlbie", NULL, MTX_DEF); -#else - mtx_init(&tlbie_mutex, "tlbie", NULL, MTX_SPIN); -#endif - moea64_mid_bootstrap(mmup, kernelstart, kernelend); /* Modified: head/sys/powerpc/aim/slb.c ============================================================================== --- head/sys/powerpc/aim/slb.c Fri Apr 27 23:39:21 2012 (r234744) +++ head/sys/powerpc/aim/slb.c Sat Apr 28 00:12:23 2012 (r234745) @@ -139,7 +139,7 @@ make_new_leaf(uint64_t esid, uint64_t sl * that a lockless searcher always sees a valid path through * the tree. */ - powerpc_sync(); + mb(); idx = esid2idx(esid, parent->ua_level); parent->u.ua_child[idx] = child; @@ -187,7 +187,7 @@ make_intermediate(uint64_t esid, struct idx = esid2idx(child->ua_base, inter->ua_level); inter->u.ua_child[idx] = child; setbit(&inter->ua_alloc, idx); - powerpc_sync(); + mb(); /* Set up parent to point to intermediate node ... */ idx = esid2idx(inter->ua_base, parent->ua_level); From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 02:48:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4004106566B; Sat, 28 Apr 2012 02:48:52 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 843C28FC08; Sat, 28 Apr 2012 02:48:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3S2mqMo038158; Sat, 28 Apr 2012 02:48:52 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3S2mqnH038154; Sat, 28 Apr 2012 02:48:52 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201204280248.q3S2mqnH038154@svn.freebsd.org> From: "David E. O'Brien" Date: Sat, 28 Apr 2012 02:48:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234746 - in head: . lib/libmd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 02:48:52 -0000 Author: obrien Date: Sat Apr 28 02:48:51 2012 New Revision: 234746 URL: http://svn.freebsd.org/changeset/base/234746 Log: Remove the RFC 1319 MD2 Message-Digest Algorithm routines from libmd. 1. The licensing terms for the MD2 routines from RFC is not under a BSD-like license. Instead it is only granted for non-commercial Internet Privacy-Enhanced Mail. 2. MD2 is quite deprecated as it is no longer considered a cryptographically strong algorithm. Discussed with: so (cperciva), core Deleted: head/lib/libmd/md2.copyright head/lib/libmd/md2.h head/lib/libmd/md2c.c Modified: head/ObsoleteFiles.inc head/lib/libmd/Makefile head/lib/libmd/mdX.3 Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sat Apr 28 00:12:23 2012 (r234745) +++ head/ObsoleteFiles.inc Sat Apr 28 02:48:51 2012 (r234746) @@ -582,6 +582,7 @@ OLD_LIBS+=lib/libipx.so.4 OLD_LIBS+=lib/libkiconv.so.3 OLD_LIBS+=lib/libkvm.so.4 OLD_LIBS+=lib/libmd.so.4 +OLD_LIBS+=lib/libmd.so.5 OLD_LIBS+=lib/libncurses.so.7 OLD_LIBS+=lib/libncursesw.so.7 OLD_LIBS+=lib/libnvpair.so.1 Modified: head/lib/libmd/Makefile ============================================================================== --- head/lib/libmd/Makefile Sat Apr 28 00:12:23 2012 (r234745) +++ head/lib/libmd/Makefile Sat Apr 28 02:48:51 2012 (r234746) @@ -1,20 +1,18 @@ # $FreeBSD$ LIB= md +SHLIB_MAJOR= 6 SHLIBDIR?= /lib -SRCS= md2c.c md4c.c md5c.c md2hl.c md4hl.c md5hl.c \ +SRCS= md4c.c md5c.c md4hl.c md5hl.c \ rmd160c.c rmd160hl.c \ sha0c.c sha0hl.c sha1c.c sha1hl.c \ sha256c.c sha256hl.c \ sha512c.c sha512hl.c -INCS= md2.h md4.h md5.h ripemd.h sha.h sha256.h sha512.h +INCS= md4.h md5.h ripemd.h sha.h sha256.h sha512.h WARNS?= 0 -MAN+= md2.3 md4.3 md5.3 ripemd.3 sha.3 sha256.3 sha512.3 -MLINKS+=md2.3 MD2Init.3 md2.3 MD2Update.3 md2.3 MD2Final.3 -MLINKS+=md2.3 MD2End.3 md2.3 MD2File.3 md2.3 MD2FileChunk.3 -MLINKS+=md2.3 MD2Data.3 +MAN+= md4.3 md5.3 ripemd.3 sha.3 sha256.3 sha512.3 MLINKS+=md4.3 MD4Init.3 md4.3 MD4Update.3 md4.3 MD4Final.3 MLINKS+=md4.3 MD4End.3 md4.3 MD4File.3 md4.3 MD4FileChunk.3 MLINKS+=md4.3 MD4Data.3 @@ -59,10 +57,6 @@ CFLAGS+= -DRMD160_ASM ACFLAGS+= -DELF -Wa,--noexecstack .endif -md2hl.c: mdXhl.c - (echo '#define LENGTH 16'; \ - sed -e 's/mdX/md2/g' -e 's/MDX/MD2/g' ${.ALLSRC}) > ${.TARGET} - md4hl.c: mdXhl.c (echo '#define LENGTH 16'; \ sed -e 's/mdX/md4/g' -e 's/MDX/MD4/g' ${.ALLSRC}) > ${.TARGET} @@ -105,16 +99,6 @@ md${i}.3: ${.CURDIR}/mdX.3 cat ${.CURDIR}/md${i}.copyright >> ${.TARGET} .endfor -md2.ref: - echo 'MD2 test suite:' > ${.TARGET} - @echo 'MD2 ("") = 8350e5a3e24c153df2275c9f80692773' >> ${.TARGET} - @echo 'MD2 ("a") = 32ec01ec4a6dac72c0ab96fb34c0b5d1' >> ${.TARGET} - @echo 'MD2 ("abc") = da853b0d3f88d99b30283a69e6ded6bb' >> ${.TARGET} - @echo 'MD2 ("message digest") = ab4f496bfb2a530b219ff33031fe06b0' >> ${.TARGET} - @echo 'MD2 ("abcdefghijklmnopqrstuvwxyz") = 4e8ddff3650292ab5a4108c3aa47940b' >> ${.TARGET} - @echo 'MD2 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = da33def2a42df13975352846c30338cd' >> ${.TARGET} - @echo 'MD2 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = d5976f79d83d3a0dc9806c3c66f3efd8' >> ${.TARGET} - md4.ref: echo 'MD4 test suite:' > ${.TARGET} @echo 'MD4 ("") = 31d6cfe0d16ae931b73c59d7e0c089c0' >> ${.TARGET} @@ -205,12 +189,9 @@ rmd160.ref: @echo 'RIPEMD160 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") =' \ '9b752e45573d4b39f4dbd3323cab82bf63326bfb' >> ${.TARGET} -test: md2.ref md4.ref md5.ref sha0.ref rmd160.ref sha1.ref sha256.ref sha512.ref +test: md4.ref md5.ref sha0.ref rmd160.ref sha1.ref sha256.ref sha512.ref @${ECHO} if any of these test fail, the code produces wrong results @${ECHO} and should NOT be used. - ${CC} ${CFLAGS} ${LDFLAGS} -DMD=2 -o mddriver ${.CURDIR}/mddriver.c ./libmd.a - ./mddriver | cmp md2.ref - - @${ECHO} MD2 passed test ${CC} ${CFLAGS} ${LDFLAGS} -DMD=4 -o mddriver ${.CURDIR}/mddriver.c libmd.a ./mddriver | cmp md4.ref - @${ECHO} MD4 passed test Modified: head/lib/libmd/mdX.3 ============================================================================== --- head/lib/libmd/mdX.3 Sat Apr 28 00:12:23 2012 (r234745) +++ head/lib/libmd/mdX.3 Sat Apr 28 02:48:51 2012 (r234746) @@ -52,8 +52,7 @@ This net result is a .Dq fingerprint of the input-data, which does not disclose the actual input. .Pp -MD2 is the slowest, MD4 is the fastest and MD5 is somewhere in the middle. -MD2 can only be used for Privacy-Enhanced Mail. +MD4 is the fastest and MD5 is somewhat slower. MD4 has now been broken; it should only be used where necessary for backward compatibility. MD5 has not yet (1999-02-11) been broken, but sufficient attacks have been @@ -144,16 +143,10 @@ If the .Fa buf argument is non-null it must point to at least 33 characters of buffer space. .Sh SEE ALSO -.Xr md2 3 , .Xr md4 3 , .Xr md5 3 , .Xr sha 3 .Rs -.%A B. Kaliski -.%T The MD2 Message-Digest Algorithm -.%O RFC 1319 -.Re -.Rs .%A R. Rivest .%T The MD4 Message-Digest Algorithm .%O RFC 1186 @@ -192,6 +185,3 @@ Phk ristede runen. No method is known to exist which finds two files having the same hash value, nor to find a file with a specific hash value. There is on the other hand no guarantee that such a method does not exist. -.Pp -MD2 has only been licensed for use in Privacy Enhanced Mail. -Use MD4 or MD5 if that is not what you are doing. From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 03:07:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7EA8E106564A; Sat, 28 Apr 2012 03:07:37 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5FDAE8FC15; Sat, 28 Apr 2012 03:07:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3S37bod038964; Sat, 28 Apr 2012 03:07:37 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3S37bTn038960; Sat, 28 Apr 2012 03:07:37 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204280307.q3S37bTn038960@svn.freebsd.org> From: Adrian Chadd Date: Sat, 28 Apr 2012 03:07:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234747 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 03:07:37 -0000 Author: adrian Date: Sat Apr 28 03:07:36 2012 New Revision: 234747 URL: http://svn.freebsd.org/changeset/base/234747 Log: Add an AR5416 PCU DMA stop method, as a check for the AR9130 is needed. The reference driver has a 3ms delay for the AR9130 but I'm not as yet sure why. From what I can gather, it's likely waiting for some FIFO flush to occur. At some point in the future it may be worthwhile adding a WMAC FIFO flush here, but that'd require some side-call through to the SoC DDR flush routines. Obtained from: Atheros Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416.h Sat Apr 28 02:48:51 2012 (r234746) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h Sat Apr 28 03:07:36 2012 (r234747) @@ -234,6 +234,7 @@ extern HAL_BOOL ar5416SetKeyCacheEntry(s extern uint32_t ar5416GetRxFilter(struct ath_hal *ah); extern void ar5416SetRxFilter(struct ath_hal *ah, uint32_t bits); +extern HAL_BOOL ar5416StopDmaReceive(struct ath_hal *ah); extern void ar5416StartPcuReceive(struct ath_hal *ah); extern void ar5416StopPcuReceive(struct ath_hal *ah); extern HAL_BOOL ar5416SetupRxDesc(struct ath_hal *, Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sat Apr 28 02:48:51 2012 (r234746) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sat Apr 28 03:07:36 2012 (r234747) @@ -119,6 +119,7 @@ ar5416InitState(struct ath_hal_5416 *ahp /* Receive Functions */ ah->ah_getRxFilter = ar5416GetRxFilter; ah->ah_setRxFilter = ar5416SetRxFilter; + ah->ah_stopDmaReceive = ar5416StopDmaReceive; ah->ah_startPcuReceive = ar5416StartPcuReceive; ah->ah_stopPcuReceive = ar5416StopPcuReceive; ah->ah_setupRxDesc = ar5416SetupRxDesc; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Sat Apr 28 02:48:51 2012 (r234746) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Sat Apr 28 03:07:36 2012 (r234747) @@ -67,6 +67,40 @@ ar5416SetRxFilter(struct ath_hal *ah, u_ } /* + * Stop Receive at the DMA engine + */ +HAL_BOOL +ar5416StopDmaReceive(struct ath_hal *ah) +{ + HAL_BOOL status; + + OS_MARK(ah, AH_MARK_RX_CTL, AH_MARK_RX_CTL_DMA_STOP); + OS_REG_WRITE(ah, AR_CR, AR_CR_RXD); /* Set receive disable bit */ + if (!ath_hal_wait(ah, AR_CR, AR_CR_RXE, 0)) { + OS_MARK(ah, AH_MARK_RX_CTL, AH_MARK_RX_CTL_DMA_STOP_ERR); +#ifdef AH_DEBUG + ath_hal_printf(ah, "%s: dma failed to stop in 10ms\n" + "AR_CR=0x%08x\nAR_DIAG_SW=0x%08x\n", + __func__, + OS_REG_READ(ah, AR_CR), + OS_REG_READ(ah, AR_DIAG_SW)); +#endif + status = AH_FALSE; + } else { + status = AH_TRUE; + } + + /* + * XXX Is this to flush whatever is in a FIFO somewhere? + * XXX If so, what should the correct behaviour should be? + */ + if (AR_SREV_9100(ah)) + OS_DELAY(3000); + + return (status); +} + +/* * Start receive at the PCU engine */ void From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 05:00:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3C933106564A; Sat, 28 Apr 2012 05:00:48 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 278D38FC0C; Sat, 28 Apr 2012 05:00:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3S50mcQ043076; Sat, 28 Apr 2012 05:00:48 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3S50lcZ043074; Sat, 28 Apr 2012 05:00:47 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204280500.q3S50lcZ043074@svn.freebsd.org> From: Adrian Chadd Date: Sat, 28 Apr 2012 05:00:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234748 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 05:00:48 -0000 Author: adrian Date: Sat Apr 28 05:00:47 2012 New Revision: 234748 URL: http://svn.freebsd.org/changeset/base/234748 Log: Add a comment about this DELAY(), I'm not sure whether it's supposed to be for a DDR/FIFO flush or something else. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sat Apr 28 03:07:36 2012 (r234747) +++ head/sys/dev/ath/if_ath.c Sat Apr 28 05:00:47 2012 (r234748) @@ -5417,6 +5417,10 @@ ath_stoprecv(struct ath_softc *sc, int d ath_hal_stoppcurecv(ah); /* disable PCU */ ath_hal_setrxfilter(ah, 0); /* clear recv filter */ ath_hal_stopdmarecv(ah); /* disable DMA engine */ + /* + * TODO: see if this particular DELAY() is required; it may be + * masking some missing FIFO flush or DMA sync. + */ if (dodelay) DELAY(3000); /* 3ms is long enough for 1 frame */ #ifdef ATH_DEBUG From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 08:12:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E524D106566B; Sat, 28 Apr 2012 08:12:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D02CF8FC0A; Sat, 28 Apr 2012 08:12:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3S8CpSM049481; Sat, 28 Apr 2012 08:12:51 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3S8Cp8D049479; Sat, 28 Apr 2012 08:12:51 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204280812.q3S8Cp8D049479@svn.freebsd.org> From: Adrian Chadd Date: Sat, 28 Apr 2012 08:12:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234749 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 08:12:52 -0000 Author: adrian Date: Sat Apr 28 08:12:51 2012 New Revision: 234749 URL: http://svn.freebsd.org/changeset/base/234749 Log: Extend the HAL channel survey statistics: * include ext_chan_busy; * include ofdm/cck phy error counts, which aren't yet implemented. Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Sat Apr 28 05:00:47 2012 (r234748) +++ head/sys/dev/ath/ath_hal/ah.h Sat Apr 28 08:12:51 2012 (r234749) @@ -660,7 +660,11 @@ typedef struct { uint32_t tx_busy; uint32_t rx_busy; uint32_t chan_busy; + uint32_t ext_chan_busy; uint32_t cycle_count; + /* XXX TODO */ + uint32_t ofdm_phyerr_count; + uint32_t cck_phyerr_count; } HAL_SURVEY_SAMPLE; /* From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 08:15:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A3982106564A; Sat, 28 Apr 2012 08:15:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F8BA8FC0C; Sat, 28 Apr 2012 08:15:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3S8FeTT049619; Sat, 28 Apr 2012 08:15:40 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3S8FeRT049615; Sat, 28 Apr 2012 08:15:40 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204280815.q3S8FeRT049615@svn.freebsd.org> From: Adrian Chadd Date: Sat, 28 Apr 2012 08:15:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234750 - head/sys/dev/ath/ath_hal/ar5212 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 08:15:40 -0000 Author: adrian Date: Sat Apr 28 08:15:40 2012 New Revision: 234750 URL: http://svn.freebsd.org/changeset/base/234750 Log: Fetch the channel survey code from the HAL. This information is currently not being populated by any of the HAL modules. Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212.h Sat Apr 28 08:12:51 2012 (r234749) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212.h Sat Apr 28 08:15:40 2012 (r234750) @@ -320,6 +320,7 @@ struct ath_hal_5212 { struct ar5212AniParams ah_aniParams5; /* 5GHz parameters */ struct ar5212AniState *ah_curani; /* cached last reference */ struct ar5212AniState ah_ani[AH_MAXCHAN]; /* per-channel state */ + HAL_CHANNEL_SURVEY ah_chansurvey[AH_MAXCHAN]; /* channel survey */ /* AR5416 uses some of the AR5212 ANI code; these are the ANI methods */ HAL_BOOL (*ah_aniControl) (struct ath_hal *, HAL_ANI_CMD cmd, int param); Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Sat Apr 28 08:12:51 2012 (r234749) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Sat Apr 28 08:15:40 2012 (r234750) @@ -1090,6 +1090,14 @@ ar5212GetDiagState(struct ath_hal *ah, i return AH_FALSE; return ar5212AniSetParams(ah, args, args); } + break; + case HAL_DIAG_CHANSURVEY: + if (AH_PRIVATE(ah)->ah_curchan == NULL) + return AH_FALSE; + *result = + &ahp->ah_chansurvey[AH_PRIVATE(ah)->ah_curchan->ic_devdata]; + *resultsize = sizeof(HAL_CHANNEL_SURVEY); + return AH_TRUE; } return AH_FALSE; } From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 08:17:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB9CC106564A; Sat, 28 Apr 2012 08:17:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D56B98FC18; Sat, 28 Apr 2012 08:17:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3S8HJAW049712; Sat, 28 Apr 2012 08:17:19 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3S8HJS0049708; Sat, 28 Apr 2012 08:17:19 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204280817.q3S8HJS0049708@svn.freebsd.org> From: Adrian Chadd Date: Sat, 28 Apr 2012 08:17:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234751 - in head/tools/tools/ath: . athsurvey X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 08:17:20 -0000 Author: adrian Date: Sat Apr 28 08:17:19 2012 New Revision: 234751 URL: http://svn.freebsd.org/changeset/base/234751 Log: Add a tool to print out min, average and max channel survey information from the current channel. There seem to be some occasional issues with the extension channel counters reporting more than 100% of use. I'll investigate that soon. Added: head/tools/tools/ath/athsurvey/ head/tools/tools/ath/athsurvey/Makefile (contents, props changed) head/tools/tools/ath/athsurvey/athsurvey.c (contents, props changed) Modified: head/tools/tools/ath/Makefile Modified: head/tools/tools/ath/Makefile ============================================================================== --- head/tools/tools/ath/Makefile Sat Apr 28 08:15:40 2012 (r234750) +++ head/tools/tools/ath/Makefile Sat Apr 28 08:17:19 2012 (r234751) @@ -3,5 +3,6 @@ SUBDIR= arcode athdebug athdecode athkey athpoke athprom athrd athregs SUBDIR+= athstats ath_prom_read athradar SUBDIR+= ath_ee_v14_print ath_ee_v4k_print ath_ee_9287_print +SUBDIR+= athsurvey .include Added: head/tools/tools/ath/athsurvey/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athsurvey/Makefile Sat Apr 28 08:17:19 2012 (r234751) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +PROG= athsurvey + +.include <../Makefile.inc> + +SRCS= athsurvey.c +SRCS+= opt_ah.h +CLEANFILES+= opt_ah.h + +opt_ah.h: + echo "#define AH_DEBUG 1" > opt_ah.h + echo "#define AH_DEBUG_COUNTRY 1" >> opt_ah.h + echo "#define AH_SUPPORT_AR5416 1" >> opt_ah.h + +.include Added: head/tools/tools/ath/athsurvey/athsurvey.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athsurvey/athsurvey.c Sat Apr 28 08:17:19 2012 (r234751) @@ -0,0 +1,216 @@ +/*- + * Copyright (c) 2012 Adrian Chadd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGES. + * + * $FreeBSD$ + */ +#include "diag.h" + +#include "ah.h" +#include "ah_internal.h" + +#include +#include +#include +#include +#include +#include +#include + +const char *progname; + +static void +usage() +{ + fprintf(stderr, "usage: %s [-i ifname]\n", progname); + exit(-1); +} + +static int +get_survey_stats(int s, const char *ifname, HAL_CHANNEL_SURVEY *hs) +{ + uint16_t eedata; + struct ath_diag atd; + + memset(&atd, '\0', sizeof(atd)); + + atd.ad_id = HAL_DIAG_CHANSURVEY | ATH_DIAG_OUT; + atd.ad_in_size = 0; + atd.ad_in_data = NULL; + atd.ad_out_size = sizeof(HAL_CHANNEL_SURVEY); + atd.ad_out_data = (caddr_t) hs; + strncpy(atd.ad_name, ifname, sizeof(atd.ad_name)); + + if (ioctl(s, SIOCGATHDIAG, &atd) < 0) { + err(1, atd.ad_name); + return (0); + } + return (1); +} + +static void +process_survey_stats(HAL_CHANNEL_SURVEY *hs) +{ + int i; + float tx = 0.0, rx = 0.0, cc = 0.0, cext = 0.0; + float max_tx = 0.0, max_rx = 0.0, max_cc = 0.0, max_cext = 0.0; + uint64_t avg_tx = 0, avg_rx = 0, avg_cc = 0, avg_cext = 0; + float min_tx = 100.0, min_rx = 100.0, min_cc = 100.0, min_cext = 100.0; + int n = 0; + int cycle_count = 0, max_cycle_count = 0; + + /* Calculate a percentage channel busy */ + for (i = 0; i < CHANNEL_SURVEY_SAMPLE_COUNT; i++) { + /* + * Skip samples with no cycle count + */ + if (hs->samples[i].cycle_count == 0) + continue; + n++; + + /* + * Grab cycle count, calculate maximum just for curiousity + */ + cycle_count = hs->samples[i].cycle_count; + if (cycle_count > max_cycle_count) + max_cycle_count = cycle_count; + + /* + * Calculate percentage + */ + tx = (float) hs->samples[i].tx_busy * 100.0 / + hs->samples[i].cycle_count; + rx = (float) hs->samples[i].rx_busy * 100.0 / + hs->samples[i].cycle_count; + cc = (float) hs->samples[i].chan_busy * 100.0 / + hs->samples[i].cycle_count; + cext = (float) hs->samples[i].ext_chan_busy * 100.0 / + hs->samples[i].cycle_count; + + /* + * Update rolling average + * XXX to preserve some accuracy, keep two decimal points + * using "fixed" point math. + */ + avg_tx += (uint64_t) hs->samples[i].tx_busy * 10000 / + hs->samples[i].cycle_count; + avg_rx += (uint64_t) hs->samples[i].rx_busy * 10000 / + hs->samples[i].cycle_count; + avg_cc += (uint64_t) hs->samples[i].chan_busy * 10000 / + hs->samples[i].cycle_count; + avg_cext += (uint64_t) hs->samples[i].ext_chan_busy * 10000 / + hs->samples[i].cycle_count; + + /* + * Update maximum values + */ + if (tx > max_tx) + max_tx = tx; + if (rx > max_rx) + max_rx = rx; + if (cc > max_cc) + max_cc = cc; + if (cext > max_cext) + max_cext = cext; + + /* + * Update minimum values + */ + if (tx < min_tx) + min_tx = tx; + if (rx < min_rx) + min_rx = rx; + if (cc < min_cc) + min_cc = cc; + if (cext < min_cext) + min_cext = cext; + } + + printf("(%4.1f %4.1f %4.1f %4.1f) ", + min_tx, min_rx, min_cc, min_cext); + printf("(%4.1f %4.1f %4.1f %4.1f) ", + n == 0 ? 0.0 : (float) (avg_tx / n) / 100.0, + n == 0 ? 0.0 : (float) (avg_rx / n) / 100.0, + n == 0 ? 0.0 : (float) (avg_cc / n) / 100.0, + n == 0 ? 0.0 : (float) (avg_cext / n) / 100.0); + printf("(%4.1f %4.1f %4.1f %4.1f)\n", + max_tx, max_rx, max_cc, max_cext); +} + +int +main(int argc, char *argv[]) +{ + FILE *fd = NULL; + const char *ifname; + int c, s; + int l = 0; + + s = socket(AF_INET, SOCK_DGRAM, 0); + if (s < 0) + err(1, "socket"); + ifname = getenv("ATH"); + if (!ifname) + ifname = ATH_DEFAULT; + + progname = argv[0]; + while ((c = getopt(argc, argv, "i:")) != -1) + switch (c) { + case 'i': + ifname = optarg; + break; + default: + usage(); + /*NOTREACHED*/ + } + argc -= optind; + argv += optind; + + /* Now, loop over and fetch some statistics .. */ + while (1) { + HAL_CHANNEL_SURVEY hs; + memset(&hs, '\0', sizeof(hs)); + if (get_survey_stats(s, ifname, &hs) == 0) + break; + /* XXX screen height! */ + if (l % 23 == 0) { + printf(" " + "min " + "avg " + "max\n"); + printf(" tx%% rx%% cc%% ec%% "); + printf(" tx%% rx%% cc%% ec%% "); + printf(" tx%% rx%% cc%% ec%%\n"); + } + process_survey_stats(&hs); + sleep(1); + l++; + } + + return (0); +} + + From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 08:29:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24B5C106566B; Sat, 28 Apr 2012 08:29:47 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F93C8FC0A; Sat, 28 Apr 2012 08:29:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3S8TkEi050156; Sat, 28 Apr 2012 08:29:46 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3S8TkFB050152; Sat, 28 Apr 2012 08:29:46 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204280829.q3S8TkFB050152@svn.freebsd.org> From: Adrian Chadd Date: Sat, 28 Apr 2012 08:29:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234752 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 08:29:47 -0000 Author: adrian Date: Sat Apr 28 08:29:46 2012 New Revision: 234752 URL: http://svn.freebsd.org/changeset/base/234752 Log: Extend the ANI code to implement basic channel survey support. * Always call ar5416GetListenTime() * Modify ar5416GetListenTime() to: + don't update the ANI state if there isn't any ANI state; + don't update the channel survey state if there's no active channel - just to be paranoid + copy the channel survey results into the current sample slot based on the current channel; then increment the sample counter and sample history counter. * Modify ar5416GetMIBCyclesPct() to simply return a HAL_SURVEY_SAMPLE, rather than a set of percentages. The ANI code wasn't using the percentages anyway. TODO: * Create a new function which fetches the survey results periodically * .. then modify the ANI code to use the pre-fetched values rather than fetching them again * Roll the 11n ext busy function from ar5416_misc.c to update all the counters, then do the result calculation * .. then, modify the MIB counter routine to correctly fetch a snapshot - freeze the counters, fetch the values, then reset the counters. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416.h Sat Apr 28 08:17:19 2012 (r234751) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h Sat Apr 28 08:29:46 2012 (r234752) @@ -196,9 +196,8 @@ extern uint32_t ar5416GetCurRssi(struct extern HAL_BOOL ar5416SetAntennaSwitch(struct ath_hal *, HAL_ANT_SETTING); extern HAL_BOOL ar5416SetDecompMask(struct ath_hal *, uint16_t, int); extern void ar5416SetCoverageClass(struct ath_hal *, uint8_t, int); -extern uint32_t ar5416GetMibCycleCountsPct(struct ath_hal *ah, - uint32_t *rxc_pcnt, uint32_t *rxextc_pcnt, uint32_t *rxf_pcnt, - uint32_t *txf_pcnt); +extern uint32_t ar5416GetMibCycleCounts(struct ath_hal *ah, + HAL_SURVEY_SAMPLE *hsample); extern uint32_t ar5416Get11nExtBusy(struct ath_hal *ah); extern void ar5416Set11nMac2040(struct ath_hal *ah, HAL_HT_MACMODE mode); extern HAL_HT_RXCLEAR ar5416Get11nRxClear(struct ath_hal *ah); Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Sat Apr 28 08:17:19 2012 (r234751) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Sat Apr 28 08:29:46 2012 (r234752) @@ -804,20 +804,51 @@ ar5416AniLowerImmunity(struct ath_hal *a * deducting the cycles spent tx'ing and rx'ing from the total * cycle count since our last call. A return value <0 indicates * an invalid/inconsistent time. + * + * This may be called with ANI disabled; in which case simply keep + * the statistics and don't write to the aniState pointer. + * + * XXX TODO: Make this cleaner! */ static int32_t ar5416AniGetListenTime(struct ath_hal *ah) { struct ath_hal_5212 *ahp = AH5212(ah); - struct ar5212AniState *aniState; - uint32_t rxc_pct, extc_pct, rxf_pct, txf_pct; + struct ar5212AniState *aniState = NULL; int32_t listenTime; int good; + HAL_SURVEY_SAMPLE hs; + HAL_CHANNEL_SURVEY *cs = AH_NULL; - good = ar5416GetMibCycleCountsPct(ah, - &rxc_pct, &extc_pct, &rxf_pct, &txf_pct); + /* + * We shouldn't see ah_curchan be NULL, but just in case.. + */ + if (AH_PRIVATE(ah)->ah_curchan == AH_NULL) { + ath_hal_printf(ah, "%s: ah_curchan = NULL?\n", __func__); + return (0); + } + /* XXX bounds check? */ + if (AH_PRIVATE(ah)->ah_curchan != AH_NULL) + cs = + &ahp->ah_chansurvey[AH_PRIVATE(ah)->ah_curchan->ic_devdata]; + + /* + * Fetch the current statistics, squirrel away the current + * sample, bump the sequence/sample counter. + */ + OS_MEMZERO(&hs, sizeof(hs)); + good = ar5416GetMibCycleCounts(ah, &hs); + if (cs != AH_NULL) { + OS_MEMCPY(&cs->samples[cs->cur_sample], &hs, sizeof(hs)); + cs->samples[cs->cur_sample].seq_num = cs->cur_seq; + cs->cur_sample = + (cs->cur_sample + 1) % CHANNEL_SURVEY_SAMPLE_COUNT; + cs->cur_seq++; + } + + if (ANI_ENA(ah)) + aniState = ahp->ah_curani; - aniState = ahp->ah_curani; if (good == 0) { /* * Cycle counter wrap (or initial call); it's not possible @@ -826,18 +857,28 @@ ar5416AniGetListenTime(struct ath_hal *a */ listenTime = 0; ahp->ah_stats.ast_ani_lzero++; - } else { - int32_t ccdelta = AH5416(ah)->ah_cycleCount - aniState->cycleCount; - int32_t rfdelta = AH5416(ah)->ah_rxBusy - aniState->rxFrameCount; - int32_t tfdelta = AH5416(ah)->ah_txBusy - aniState->txFrameCount; + } else if (ANI_ENA(ah)) { + /* + * Only calculate and update the cycle count if we have + * an ANI state. + */ + int32_t ccdelta = + AH5416(ah)->ah_cycleCount - aniState->cycleCount; + int32_t rfdelta = + AH5416(ah)->ah_rxBusy - aniState->rxFrameCount; + int32_t tfdelta = + AH5416(ah)->ah_txBusy - aniState->txFrameCount; listenTime = (ccdelta - rfdelta - tfdelta) / CLOCK_RATE; } - aniState->cycleCount = AH5416(ah)->ah_cycleCount; - aniState->txFrameCount = AH5416(ah)->ah_rxBusy; - aniState->rxFrameCount = AH5416(ah)->ah_txBusy; - HALDEBUG(ah, HAL_DEBUG_ANI, "rxc=%d, extc=%d, rxf=%d, txf=%d\n", - rxc_pct, extc_pct, rxf_pct, txf_pct); + /* + * Again, only update ANI state if we have it. + */ + if (ANI_ENA(ah)) { + aniState->cycleCount = AH5416(ah)->ah_cycleCount; + aniState->txFrameCount = AH5416(ah)->ah_rxBusy; + aniState->rxFrameCount = AH5416(ah)->ah_txBusy; + } return listenTime; } @@ -902,13 +943,13 @@ ar5416AniPoll(struct ath_hal *ah, const const struct ar5212AniParams *params; int32_t listenTime; + /* Always update from the MIB, for statistics gathering */ + listenTime = ar5416AniGetListenTime(ah); + /* XXX can aniState be null? */ if (aniState == AH_NULL) return; - /* Always update from the MIB, for statistics gathering */ - listenTime = ar5416AniGetListenTime(ah); - if (!ANI_ENA(ah)) return; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Sat Apr 28 08:17:19 2012 (r234751) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Sat Apr 28 08:29:46 2012 (r234752) @@ -185,8 +185,7 @@ ar5416SetCoverageClass(struct ath_hal *a * Return the busy for rx_frame, rx_clear, and tx_frame */ uint32_t -ar5416GetMibCycleCountsPct(struct ath_hal *ah, uint32_t *rxc_pcnt, - uint32_t *extc_pcnt, uint32_t *rxf_pcnt, uint32_t *txf_pcnt) +ar5416GetMibCycleCounts(struct ath_hal *ah, HAL_SURVEY_SAMPLE *hsample) { struct ath_hal_5416 *ahp = AH5416(ah); u_int32_t good = 1; @@ -208,21 +207,17 @@ ar5416GetMibCycleCountsPct(struct ath_ha "%s: cycle counter wrap. ExtBusy = 0\n", __func__); good = 0; } else { - uint32_t cc_d = cc - ahp->ah_cycleCount; - uint32_t rc_d = rc - ahp->ah_ctlBusy; - uint32_t ec_d = ec - ahp->ah_extBusy; - uint32_t rf_d = rf - ahp->ah_rxBusy; - uint32_t tf_d = tf - ahp->ah_txBusy; - - if (cc_d != 0) { - *rxc_pcnt = rc_d * 100 / cc_d; - *rxf_pcnt = rf_d * 100 / cc_d; - *txf_pcnt = tf_d * 100 / cc_d; - *extc_pcnt = ec_d * 100 / cc_d; - } else { - good = 0; - } + hsample->cycle_count = cc - ahp->ah_cycleCount; + hsample->chan_busy = rc - ahp->ah_ctlBusy; + hsample->ext_chan_busy = ec - ahp->ah_extBusy; + hsample->rx_busy = rf - ahp->ah_rxBusy; + hsample->tx_busy = tf - ahp->ah_txBusy; } + + /* + * Keep a copy of the MIB results so the next sample has something + * to work from. + */ ahp->ah_cycleCount = cc; ahp->ah_rxBusy = rf; ahp->ah_ctlBusy = rc; @@ -236,6 +231,8 @@ ar5416GetMibCycleCountsPct(struct ath_ha * Return approximation of extension channel busy over an time interval * 0% (clear) -> 100% (busy) * + * XXX TODO: update this to correctly sample all the counters, + * rather than a subset of it. */ uint32_t ar5416Get11nExtBusy(struct ath_hal *ah) From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 09:15:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 605551065673; Sat, 28 Apr 2012 09:15:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4257E8FC18; Sat, 28 Apr 2012 09:15:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3S9F2GC051839; Sat, 28 Apr 2012 09:15:02 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3S9F1VD051812; Sat, 28 Apr 2012 09:15:01 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201204280915.q3S9F1VD051812@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Apr 2012 09:15:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234753 - in stable/9/sys: dev/an dev/ath dev/bwi dev/bwn dev/if_ndis dev/ipw dev/iwi dev/iwn dev/malo dev/mwl dev/ral dev/usb/wlan dev/wi dev/wpi net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 09:15:02 -0000 Author: dim Date: Sat Apr 28 09:15:01 2012 New Revision: 234753 URL: http://svn.freebsd.org/changeset/base/234753 Log: MFC r225941: Fix an unaligned access issue; tidy up OFDM/DS rate decoding from the PLCP. This fixes a panic on PPC. Submitted by: novel Obtained from: OpenBSD, sys/dev/ic/bwi.c r1.89 MFC r226181: Update from OpenBSD: Include 0x4402 in the bbp id mapping table used on older devices. http://bcm-specs.sipsolutions.net/BackPlane agrees. Obtained from: OpenBSD, sys/dev/ic/bwi.c r1.88 MFC r226182: Fix an incorrect use of sizeof(). Obtained from: OpenBSD sys/dev/ic/bwi.c r1.87 MFC r228621: Fix some net80211 enum nits: - ic_vap_create() uses an ieee80211_opmode argument - ieee80211_rate2media() takes an ieee80211_phymode argument - ieee80211_plcp2rate() takes an ieee80211_phytype argument - cast to enum ieee80211_protmode and ieee80211_roamingmode to silence compiler warnings Submitted by: arundel@ Modified: stable/9/sys/dev/an/if_an.c stable/9/sys/dev/ath/if_ath.c stable/9/sys/dev/bwi/bwiphy.c stable/9/sys/dev/bwi/if_bwi.c stable/9/sys/dev/bwn/if_bwn.c stable/9/sys/dev/if_ndis/if_ndis.c stable/9/sys/dev/ipw/if_ipw.c stable/9/sys/dev/iwi/if_iwi.c stable/9/sys/dev/iwn/if_iwn.c stable/9/sys/dev/malo/if_malo.c stable/9/sys/dev/mwl/if_mwl.c stable/9/sys/dev/ral/rt2560.c stable/9/sys/dev/ral/rt2661.c stable/9/sys/dev/usb/wlan/if_rum.c stable/9/sys/dev/usb/wlan/if_run.c stable/9/sys/dev/usb/wlan/if_uath.c stable/9/sys/dev/usb/wlan/if_upgt.c stable/9/sys/dev/usb/wlan/if_ural.c stable/9/sys/dev/usb/wlan/if_urtw.c stable/9/sys/dev/usb/wlan/if_zyd.c stable/9/sys/dev/wi/if_wi.c stable/9/sys/dev/wpi/if_wpi.c stable/9/sys/net80211/ieee80211.c stable/9/sys/net80211/ieee80211_ht.c stable/9/sys/net80211/ieee80211_ioctl.c stable/9/sys/net80211/ieee80211_var.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/an/if_an.c ============================================================================== --- stable/9/sys/dev/an/if_an.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/an/if_an.c Sat Apr 28 09:15:01 2012 (r234753) @@ -796,7 +796,7 @@ an_attach(struct an_softc *sc, int flags ADD(IFM_AUTO, IFM_IEEE80211_ADHOC); for (i = 0; i < nrate; i++) { r = sc->an_caps.an_rates[i]; - mword = ieee80211_rate2media(NULL, r, IEEE80211_T_DS); + mword = ieee80211_rate2media(NULL, r, IEEE80211_MODE_AUTO); if (mword == 0) continue; printf("%s%d%sMbps", (i != 0 ? " " : ""), @@ -3298,7 +3298,7 @@ an_media_status(struct ifnet *ifp, struc if (sc->an_config.an_opmode == AN_OPMODE_IBSS_ADHOC) imr->ifm_active |= IFM_IEEE80211_ADHOC; imr->ifm_active |= ieee80211_rate2media(NULL, - status.an_current_tx_rate, IEEE80211_T_DS); + status.an_current_tx_rate, IEEE80211_MODE_AUTO); imr->ifm_status = IFM_AVALID; if (status.an_opmode & AN_STATUS_OPMODE_ASSOCIATED) imr->ifm_status |= IFM_ACTIVE; Modified: stable/9/sys/dev/ath/if_ath.c ============================================================================== --- stable/9/sys/dev/ath/if_ath.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/ath/if_ath.c Sat Apr 28 09:15:01 2012 (r234753) @@ -119,9 +119,9 @@ __FBSDID("$FreeBSD$"); CTASSERT(ATH_BCBUF <= 8); static struct ieee80211vap *ath_vap_create(struct ieee80211com *, - const char name[IFNAMSIZ], int unit, int opmode, - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]); + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, + const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); static void ath_vap_delete(struct ieee80211vap *); static void ath_init(void *); static void ath_stop_locked(struct ifnet *); @@ -849,16 +849,17 @@ assign_bslot(struct ath_softc *sc) } static struct ieee80211vap * -ath_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac0[IEEE80211_ADDR_LEN]) +ath_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac0[IEEE80211_ADDR_LEN]) { struct ath_softc *sc = ic->ic_ifp->if_softc; struct ath_vap *avp; struct ieee80211vap *vap; uint8_t mac[IEEE80211_ADDR_LEN]; - int ic_opmode, needbeacon, error; + int needbeacon, error; + enum ieee80211_opmode ic_opmode; avp = (struct ath_vap *) malloc(sizeof(struct ath_vap), M_80211_VAP, M_WAITOK | M_ZERO); Modified: stable/9/sys/dev/bwi/bwiphy.c ============================================================================== --- stable/9/sys/dev/bwi/bwiphy.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/bwi/bwiphy.c Sat Apr 28 09:15:01 2012 (r234753) @@ -796,7 +796,7 @@ bwi_phy_config_11g(struct bwi_mac *mac) bwi_tbl_write_2(mac, BWI_PHYTBL_RSSI + i, i); /* Fill noise table */ - for (i = 0; i < sizeof(bwi_phy_noise_11g); ++i) { + for (i = 0; i < N(bwi_phy_noise_11g); ++i) { bwi_tbl_write_2(mac, BWI_PHYTBL_NOISE + i, bwi_phy_noise_11g[i]); } Modified: stable/9/sys/dev/bwi/if_bwi.c ============================================================================== --- stable/9/sys/dev/bwi/if_bwi.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/bwi/if_bwi.c Sat Apr 28 09:15:01 2012 (r234753) @@ -96,9 +96,9 @@ struct bwi_myaddr_bssid { } __packed; static struct ieee80211vap *bwi_vap_create(struct ieee80211com *, - const char [IFNAMSIZ], int, int, int, - const uint8_t [IEEE80211_ADDR_LEN], - const uint8_t [IEEE80211_ADDR_LEN]); + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, + const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); static void bwi_vap_delete(struct ieee80211vap *); static void bwi_init(void *); static int bwi_ioctl(struct ifnet *, u_long, caddr_t); @@ -118,8 +118,7 @@ static void bwi_calibrate(void *); static int bwi_calc_rssi(struct bwi_softc *, const struct bwi_rxbuf_hdr *); static int bwi_calc_noise(struct bwi_softc *); -static __inline uint8_t bwi_ofdm_plcp2rate(const uint32_t *); -static __inline uint8_t bwi_ds_plcp2rate(const struct ieee80211_ds_plcp_hdr *); +static __inline uint8_t bwi_plcp2rate(uint32_t, enum ieee80211_phytype); static void bwi_rx_radiotap(struct bwi_softc *, struct mbuf *, struct bwi_rxbuf_hdr *, const void *, int, int, int); @@ -221,7 +220,7 @@ static const struct { } bwi_bbpid_map[] = { { 0x4301, 0x4301, 0x4301 }, { 0x4305, 0x4307, 0x4307 }, - { 0x4403, 0x4403, 0x4402 }, + { 0x4402, 0x4403, 0x4402 }, { 0x4610, 0x4615, 0x4610 }, { 0x4710, 0x4715, 0x4710 }, { 0x4720, 0x4725, 0x4309 } @@ -592,10 +591,10 @@ bwi_detach(struct bwi_softc *sc) } static struct ieee80211vap * -bwi_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]) +bwi_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]) { struct bwi_vap *bvp; struct ieee80211vap *vap; @@ -2629,7 +2628,7 @@ bwi_rxeof(struct bwi_softc *sc, int end_ struct ieee80211_frame_min *wh; struct ieee80211_node *ni; struct mbuf *m; - const void *plcp; + uint32_t plcp; uint16_t flags2; int buflen, wh_ofs, hdr_extra, rssi, noise, type, rate; @@ -2659,7 +2658,7 @@ bwi_rxeof(struct bwi_softc *sc, int end_ goto next; } - plcp = ((const uint8_t *)(hdr + 1) + hdr_extra); + bcopy((uint8_t *)(hdr + 1) + hdr_extra, &plcp, sizeof(plcp)); rssi = bwi_calc_rssi(sc, hdr); noise = bwi_calc_noise(sc); @@ -2668,13 +2667,13 @@ bwi_rxeof(struct bwi_softc *sc, int end_ m_adj(m, sizeof(*hdr) + wh_ofs); if (htole16(hdr->rxh_flags1) & BWI_RXH_F1_OFDM) - rate = bwi_ofdm_plcp2rate(plcp); + rate = bwi_plcp2rate(plcp, IEEE80211_T_OFDM); else - rate = bwi_ds_plcp2rate(plcp); + rate = bwi_plcp2rate(plcp, IEEE80211_T_CCK); /* RX radio tap */ if (ieee80211_radiotap_active(ic)) - bwi_rx_radiotap(sc, m, hdr, plcp, rate, rssi, noise); + bwi_rx_radiotap(sc, m, hdr, &plcp, rate, rssi, noise); m_adj(m, -IEEE80211_CRC_LEN); @@ -3802,20 +3801,10 @@ bwi_calc_noise(struct bwi_softc *sc) } static __inline uint8_t -bwi_ofdm_plcp2rate(const uint32_t *plcp0) +bwi_plcp2rate(const uint32_t plcp0, enum ieee80211_phytype type) { - uint32_t plcp; - uint8_t plcp_rate; - - plcp = le32toh(*plcp0); - plcp_rate = __SHIFTOUT(plcp, IEEE80211_OFDM_PLCP_RATE_MASK); - return ieee80211_plcp2rate(plcp_rate, IEEE80211_T_OFDM); -} - -static __inline uint8_t -bwi_ds_plcp2rate(const struct ieee80211_ds_plcp_hdr *hdr) -{ - return ieee80211_plcp2rate(hdr->i_signal, IEEE80211_T_DS); + uint32_t plcp = le32toh(plcp0) & IEEE80211_OFDM_PLCP_RATE_MASK; + return (ieee80211_plcp2rate(plcp, type)); } static void Modified: stable/9/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/9/sys/dev/bwn/if_bwn.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/bwn/if_bwn.c Sat Apr 28 09:15:01 2012 (r234753) @@ -192,8 +192,8 @@ static void bwn_scan_start(struct ieee80 static void bwn_scan_end(struct ieee80211com *); static void bwn_set_channel(struct ieee80211com *); static struct ieee80211vap *bwn_vap_create(struct ieee80211com *, - const char [IFNAMSIZ], int, int, - int, const uint8_t [IEEE80211_ADDR_LEN], + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, + const uint8_t [IEEE80211_ADDR_LEN], const uint8_t [IEEE80211_ADDR_LEN]); static void bwn_vap_delete(struct ieee80211vap *); static void bwn_stop(struct bwn_softc *, int); @@ -2926,10 +2926,10 @@ fail: } static struct ieee80211vap * -bwn_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac0[IEEE80211_ADDR_LEN]) +bwn_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac0[IEEE80211_ADDR_LEN]) { struct ifnet *ifp = ic->ic_ifp; struct bwn_softc *sc = ifp->if_softc; Modified: stable/9/sys/dev/if_ndis/if_ndis.c ============================================================================== --- stable/9/sys/dev/if_ndis/if_ndis.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/if_ndis/if_ndis.c Sat Apr 28 09:15:01 2012 (r234753) @@ -150,9 +150,9 @@ static funcptr ndis_resettask_wrap; static funcptr ndis_inputtask_wrap; static struct ieee80211vap *ndis_vap_create(struct ieee80211com *, - const char name[IFNAMSIZ], int unit, int opmode, - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]); + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, + const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); static void ndis_vap_delete (struct ieee80211vap *); static void ndis_tick (void *); static void ndis_ticktask (device_object *, void *); @@ -973,10 +973,10 @@ fail: } static struct ieee80211vap * -ndis_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]) +ndis_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]) { struct ndis_vap *nvp; struct ieee80211vap *vap; Modified: stable/9/sys/dev/ipw/if_ipw.c ============================================================================== --- stable/9/sys/dev/ipw/if_ipw.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/ipw/if_ipw.c Sat Apr 28 09:15:01 2012 (r234753) @@ -108,9 +108,9 @@ static const struct ipw_ident ipw_ident_ }; static struct ieee80211vap *ipw_vap_create(struct ieee80211com *, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]); + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, + const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); static void ipw_vap_delete(struct ieee80211vap *); static int ipw_dma_alloc(struct ipw_softc *); static void ipw_release(struct ipw_softc *); @@ -428,10 +428,10 @@ ipw_detach(device_t dev) } static struct ieee80211vap * -ipw_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]) +ipw_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]) { struct ifnet *ifp = ic->ic_ifp; struct ipw_softc *sc = ifp->if_softc; Modified: stable/9/sys/dev/iwi/if_iwi.c ============================================================================== --- stable/9/sys/dev/iwi/if_iwi.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/iwi/if_iwi.c Sat Apr 28 09:15:01 2012 (r234753) @@ -129,9 +129,9 @@ static const struct iwi_ident iwi_ident_ }; static struct ieee80211vap *iwi_vap_create(struct ieee80211com *, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]); + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, + const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); static void iwi_vap_delete(struct ieee80211vap *); static void iwi_dma_map_addr(void *, bus_dma_segment_t *, int, int); static int iwi_alloc_cmd_ring(struct iwi_softc *, struct iwi_cmd_ring *, @@ -495,10 +495,10 @@ iwi_detach(device_t dev) } static struct ieee80211vap * -iwi_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]) +iwi_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]) { struct ifnet *ifp = ic->ic_ifp; struct iwi_softc *sc = ifp->if_softc; Modified: stable/9/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/9/sys/dev/iwn/if_iwn.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/iwn/if_iwn.c Sat Apr 28 09:15:01 2012 (r234753) @@ -118,9 +118,9 @@ static int iwn5000_attach(struct iwn_sof static void iwn_radiotap_attach(struct iwn_softc *); static void iwn_sysctlattach(struct iwn_softc *); static struct ieee80211vap *iwn_vap_create(struct ieee80211com *, - const char name[IFNAMSIZ], int unit, int opmode, - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]); + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, + const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); static void iwn_vap_delete(struct ieee80211vap *); static int iwn_detach(device_t); static int iwn_shutdown(device_t); @@ -847,8 +847,8 @@ iwn_sysctlattach(struct iwn_softc *sc) } static struct ieee80211vap * -iwn_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, +iwn_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], const uint8_t mac[IEEE80211_ADDR_LEN]) { Modified: stable/9/sys/dev/malo/if_malo.c ============================================================================== --- stable/9/sys/dev/malo/if_malo.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/malo/if_malo.c Sat Apr 28 09:15:01 2012 (r234753) @@ -125,10 +125,10 @@ enum { MALLOC_DEFINE(M_MALODEV, "malodev", "malo driver dma buffers"); -static struct ieee80211vap *malo_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]); +static struct ieee80211vap *malo_vap_create(struct ieee80211com *, + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, + const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); static void malo_vap_delete(struct ieee80211vap *); static int malo_dma_setup(struct malo_softc *); static int malo_setup_hwdma(struct malo_softc *); @@ -344,10 +344,10 @@ bad: } static struct ieee80211vap * -malo_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]) +malo_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]) { struct ifnet *ifp = ic->ic_ifp; struct malo_vap *mvp; Modified: stable/9/sys/dev/mwl/if_mwl.c ============================================================================== --- stable/9/sys/dev/mwl/if_mwl.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/mwl/if_mwl.c Sat Apr 28 09:15:01 2012 (r234753) @@ -83,9 +83,9 @@ __FBSDID("$FreeBSD$"); #define SM(v,x) (((v) << x##_S) & x) static struct ieee80211vap *mwl_vap_create(struct ieee80211com *, - const char name[IFNAMSIZ], int unit, int opmode, - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]); + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, + const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); static void mwl_vap_delete(struct ieee80211vap *); static int mwl_setupdma(struct mwl_softc *); static int mwl_hal_reset(struct mwl_softc *sc); @@ -601,10 +601,10 @@ reclaim_address(struct mwl_softc *sc, ui } static struct ieee80211vap * -mwl_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac0[IEEE80211_ADDR_LEN]) +mwl_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac0[IEEE80211_ADDR_LEN]) { struct ifnet *ifp = ic->ic_ifp; struct mwl_softc *sc = ifp->if_softc; Modified: stable/9/sys/dev/ral/rt2560.c ============================================================================== --- stable/9/sys/dev/ral/rt2560.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/ral/rt2560.c Sat Apr 28 09:15:01 2012 (r234753) @@ -85,9 +85,9 @@ __FBSDID("$FreeBSD$"); #endif static struct ieee80211vap *rt2560_vap_create(struct ieee80211com *, - const char name[IFNAMSIZ], int unit, int opmode, - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]); + const char [IFNAMSIZ], int, enum ieee80211_opmode, + int, const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); static void rt2560_vap_delete(struct ieee80211vap *); static void rt2560_dma_map_addr(void *, bus_dma_segment_t *, int, int); @@ -373,10 +373,10 @@ rt2560_detach(void *xsc) } static struct ieee80211vap * -rt2560_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]) +rt2560_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]) { struct ifnet *ifp = ic->ic_ifp; struct rt2560_vap *rvp; Modified: stable/9/sys/dev/ral/rt2661.c ============================================================================== --- stable/9/sys/dev/ral/rt2661.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/ral/rt2661.c Sat Apr 28 09:15:01 2012 (r234753) @@ -82,9 +82,9 @@ __FBSDID("$FreeBSD$"); #endif static struct ieee80211vap *rt2661_vap_create(struct ieee80211com *, - const char name[IFNAMSIZ], int unit, int opmode, - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]); + const char [IFNAMSIZ], int, enum ieee80211_opmode, + int, const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); static void rt2661_vap_delete(struct ieee80211vap *); static void rt2661_dma_map_addr(void *, bus_dma_segment_t *, int, int); @@ -368,10 +368,10 @@ rt2661_detach(void *xsc) } static struct ieee80211vap * -rt2661_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]) +rt2661_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]) { struct ifnet *ifp = ic->ic_ifp; struct rt2661_vap *rvp; Modified: stable/9/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_rum.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/usb/wlan/if_rum.c Sat Apr 28 09:15:01 2012 (r234753) @@ -152,9 +152,9 @@ static usb_callback_t rum_bulk_write_cal static usb_error_t rum_do_request(struct rum_softc *sc, struct usb_device_request *req, void *data); static struct ieee80211vap *rum_vap_create(struct ieee80211com *, - const char name[IFNAMSIZ], int unit, int opmode, - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]); + const char [IFNAMSIZ], int, enum ieee80211_opmode, + int, const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); static void rum_vap_delete(struct ieee80211vap *); static void rum_tx_free(struct rum_tx_data *, int); static void rum_setup_tx_list(struct rum_softc *); @@ -580,10 +580,10 @@ rum_do_request(struct rum_softc *sc, } static struct ieee80211vap * -rum_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]) +rum_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]) { struct rum_softc *sc = ic->ic_ifp->if_softc; struct rum_vap *rvp; Modified: stable/9/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_run.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/usb/wlan/if_run.c Sat Apr 28 09:15:01 2012 (r234753) @@ -315,9 +315,9 @@ static usb_callback_t run_bulk_tx_callba static void run_bulk_tx_callbackN(struct usb_xfer *xfer, usb_error_t error, unsigned int index); static struct ieee80211vap *run_vap_create(struct ieee80211com *, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], const uint8_t - mac[IEEE80211_ADDR_LEN]); + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, + const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); static void run_vap_delete(struct ieee80211vap *); static void run_cmdq_cb(void *, int); static void run_setup_tx_list(struct run_softc *, @@ -742,8 +742,8 @@ run_detach(device_t self) } static struct ieee80211vap * -run_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, +run_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], const uint8_t mac[IEEE80211_ADDR_LEN]) { Modified: stable/9/sys/dev/usb/wlan/if_uath.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_uath.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/usb/wlan/if_uath.c Sat Apr 28 09:15:01 2012 (r234753) @@ -254,9 +254,9 @@ static const struct usb_config uath_usbc }; static struct ieee80211vap *uath_vap_create(struct ieee80211com *, - const char name[IFNAMSIZ], int unit, int opmode, - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]); + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, + const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); static void uath_vap_delete(struct ieee80211vap *); static int uath_alloc_cmd_list(struct uath_softc *, struct uath_cmd [], int, int); @@ -1065,10 +1065,10 @@ uath_free_tx_data_list(struct uath_softc } static struct ieee80211vap * -uath_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]) +uath_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]) { struct uath_vap *uvp; struct ieee80211vap *vap; Modified: stable/9/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_upgt.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/usb/wlan/if_upgt.c Sat Apr 28 09:15:01 2012 (r234753) @@ -138,9 +138,9 @@ static void upgt_scan_start(struct ieee8 static void upgt_scan_end(struct ieee80211com *); static void upgt_set_channel(struct ieee80211com *); static struct ieee80211vap *upgt_vap_create(struct ieee80211com *, - const char name[IFNAMSIZ], int unit, int opmode, - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]); + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, + const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); static void upgt_vap_delete(struct ieee80211vap *); static void upgt_update_mcast(struct ifnet *); static uint8_t upgt_rx_rate(struct upgt_softc *, const int); @@ -1014,10 +1014,10 @@ upgt_set_chan(struct upgt_softc *sc, str } static struct ieee80211vap * -upgt_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]) +upgt_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]) { struct upgt_vap *uvp; struct ieee80211vap *vap; Modified: stable/9/sys/dev/usb/wlan/if_ural.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_ural.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/usb/wlan/if_ural.c Sat Apr 28 09:15:01 2012 (r234753) @@ -131,9 +131,9 @@ static usb_callback_t ural_bulk_write_ca static usb_error_t ural_do_request(struct ural_softc *sc, struct usb_device_request *req, void *data); static struct ieee80211vap *ural_vap_create(struct ieee80211com *, - const char name[IFNAMSIZ], int unit, int opmode, - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]); + const char [IFNAMSIZ], int, enum ieee80211_opmode, + int, const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); static void ural_vap_delete(struct ieee80211vap *); static void ural_tx_free(struct ural_tx_data *, int); static void ural_setup_tx_list(struct ural_softc *); @@ -568,10 +568,10 @@ ural_do_request(struct ural_softc *sc, } static struct ieee80211vap * -ural_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]) +ural_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]) { struct ural_softc *sc = ic->ic_ifp->if_softc; struct ural_vap *uvp; Modified: stable/9/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_urtw.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/usb/wlan/if_urtw.c Sat Apr 28 09:15:01 2012 (r234753) @@ -649,9 +649,9 @@ static const struct usb_config urtw_8187 }; static struct ieee80211vap *urtw_vap_create(struct ieee80211com *, - const char name[IFNAMSIZ], int unit, int opmode, - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]); + const char [IFNAMSIZ], int, enum ieee80211_opmode, + int, const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); static void urtw_vap_delete(struct ieee80211vap *); static void urtw_init(void *); static void urtw_stop(struct ifnet *, int); @@ -993,10 +993,10 @@ urtw_free_data_list(struct urtw_softc *s } static struct ieee80211vap * -urtw_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]) +urtw_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]) { struct urtw_vap *uvp; struct ieee80211vap *vap; Modified: stable/9/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_zyd.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/usb/wlan/if_zyd.c Sat Apr 28 09:15:01 2012 (r234753) @@ -118,9 +118,9 @@ static usb_callback_t zyd_bulk_read_call static usb_callback_t zyd_bulk_write_callback; static struct ieee80211vap *zyd_vap_create(struct ieee80211com *, - const char name[IFNAMSIZ], int unit, int opmode, - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]); + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, + const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); static void zyd_vap_delete(struct ieee80211vap *); static void zyd_tx_free(struct zyd_tx_data *, int); static void zyd_setup_tx_list(struct zyd_softc *); @@ -456,10 +456,10 @@ zyd_detach(device_t dev) } static struct ieee80211vap * -zyd_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]) +zyd_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]) { struct zyd_vap *zvp; struct ieee80211vap *vap; Modified: stable/9/sys/dev/wi/if_wi.c ============================================================================== --- stable/9/sys/dev/wi/if_wi.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/wi/if_wi.c Sat Apr 28 09:15:01 2012 (r234753) @@ -108,10 +108,10 @@ __FBSDID("$FreeBSD$"); #include #include -static struct ieee80211vap *wi_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]); +static struct ieee80211vap *wi_vap_create(struct ieee80211com *, + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, + const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); static void wi_vap_delete(struct ieee80211vap *vap); static void wi_stop_locked(struct wi_softc *sc, int disable); static void wi_start_locked(struct ifnet *); @@ -506,10 +506,10 @@ wi_detach(device_t dev) } static struct ieee80211vap * -wi_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]) +wi_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]) { struct wi_softc *sc = ic->ic_ifp->if_softc; struct wi_vap *wvp; Modified: stable/9/sys/dev/wpi/if_wpi.c ============================================================================== --- stable/9/sys/dev/wpi/if_wpi.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/dev/wpi/if_wpi.c Sat Apr 28 09:15:01 2012 (r234753) @@ -157,9 +157,9 @@ static const struct wpi_ident wpi_ident_ }; static struct ieee80211vap *wpi_vap_create(struct ieee80211com *, - const char name[IFNAMSIZ], int unit, int opmode, - int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]); + const char [IFNAMSIZ], int, enum ieee80211_opmode, int, + const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); static void wpi_vap_delete(struct ieee80211vap *); static int wpi_dma_contig_alloc(struct wpi_softc *, struct wpi_dma_info *, void **, bus_size_t, bus_size_t, int); @@ -760,10 +760,10 @@ wpi_detach(device_t dev) } static struct ieee80211vap * -wpi_vap_create(struct ieee80211com *ic, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t mac[IEEE80211_ADDR_LEN]) +wpi_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]) { struct wpi_vap *wvp; struct ieee80211vap *vap; Modified: stable/9/sys/net80211/ieee80211.c ============================================================================== --- stable/9/sys/net80211/ieee80211.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/net80211/ieee80211.c Sat Apr 28 09:15:01 2012 (r234753) @@ -384,9 +384,9 @@ default_reset(struct ieee80211vap *vap, */ int ieee80211_vap_setup(struct ieee80211com *ic, struct ieee80211vap *vap, - const char name[IFNAMSIZ], int unit, int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t macaddr[IEEE80211_ADDR_LEN]) + const char name[IFNAMSIZ], int unit, enum ieee80211_opmode opmode, + int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t macaddr[IEEE80211_ADDR_LEN]) { struct ifnet *ifp; @@ -447,6 +447,8 @@ ieee80211_vap_setup(struct ieee80211com } break; #endif + default: + break; } /* auto-enable s/w beacon miss support */ if (flags & IEEE80211_CLONE_NOBEACONS) @@ -1008,7 +1010,8 @@ ieee80211_media_setup(struct ieee80211co struct ifmedia *media, int caps, int addsta, ifm_change_cb_t media_change, ifm_stat_cb_t media_stat) { - int i, j, mode, rate, maxrate, mword, r; + int i, j, rate, maxrate, mword, r; + enum ieee80211_phymode mode; const struct ieee80211_rateset *rs; struct ieee80211_rateset allrates; @@ -1137,7 +1140,8 @@ void ieee80211_announce(struct ieee80211com *ic) { struct ifnet *ifp = ic->ic_ifp; - int i, mode, rate, mword; + int i, rate, mword; + enum ieee80211_phymode mode; const struct ieee80211_rateset *rs; /* NB: skip AUTO since it has no rates */ Modified: stable/9/sys/net80211/ieee80211_ht.c ============================================================================== --- stable/9/sys/net80211/ieee80211_ht.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/net80211/ieee80211_ht.c Sat Apr 28 09:15:01 2012 (r234753) @@ -307,7 +307,8 @@ ieee80211_ht_vdetach(struct ieee80211vap } static int -ht_getrate(struct ieee80211com *ic, int index, int mode, int ratetype) +ht_getrate(struct ieee80211com *ic, int index, enum ieee80211_phymode mode, + int ratetype) { int mword, rate; @@ -350,7 +351,7 @@ static struct printranges { }; static void -ht_rateprint(struct ieee80211com *ic, int mode, int ratetype) +ht_rateprint(struct ieee80211com *ic, enum ieee80211_phymode mode, int ratetype) { struct ifnet *ifp = ic->ic_ifp; int minrate, maxrate; @@ -379,7 +380,7 @@ ht_rateprint(struct ieee80211com *ic, in } static void -ht_announce(struct ieee80211com *ic, int mode) +ht_announce(struct ieee80211com *ic, enum ieee80211_phymode mode) { struct ifnet *ifp = ic->ic_ifp; const char *modestr = ieee80211_phymode_name[mode]; Modified: stable/9/sys/net80211/ieee80211_ioctl.c ============================================================================== --- stable/9/sys/net80211/ieee80211_ioctl.c Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/net80211/ieee80211_ioctl.c Sat Apr 28 09:15:01 2012 (r234753) @@ -2722,7 +2722,7 @@ ieee80211_ioctl_set80211(struct ieee8021 case IEEE80211_IOC_PROTMODE: if (ireq->i_val > IEEE80211_PROT_RTSCTS) return EINVAL; - ic->ic_protmode = ireq->i_val; + ic->ic_protmode = (enum ieee80211_protmode)ireq->i_val; /* NB: if not operating in 11g this can wait */ if (ic->ic_bsschan != IEEE80211_CHAN_ANYC && IEEE80211_IS_CHAN_ANYG(ic->ic_bsschan)) @@ -2741,7 +2741,7 @@ ieee80211_ioctl_set80211(struct ieee8021 if (!(IEEE80211_ROAMING_DEVICE <= ireq->i_val && ireq->i_val <= IEEE80211_ROAMING_MANUAL)) return EINVAL; - vap->iv_roaming = ireq->i_val; + vap->iv_roaming = (enum ieee80211_roamingmode)ireq->i_val; /* XXXX reset? */ break; case IEEE80211_IOC_PRIVACY: Modified: stable/9/sys/net80211/ieee80211_var.h ============================================================================== --- stable/9/sys/net80211/ieee80211_var.h Sat Apr 28 08:29:46 2012 (r234752) +++ stable/9/sys/net80211/ieee80211_var.h Sat Apr 28 09:15:01 2012 (r234753) @@ -228,10 +228,10 @@ struct ieee80211com { /* virtual ap create/delete */ struct ieee80211vap* (*ic_vap_create)(struct ieee80211com *, - const char name[IFNAMSIZ], int unit, - int opmode, int flags, - const uint8_t bssid[IEEE80211_ADDR_LEN], - const uint8_t macaddr[IEEE80211_ADDR_LEN]); + const char [IFNAMSIZ], int, + enum ieee80211_opmode, int, + const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN]); void (*ic_vap_delete)(struct ieee80211vap *); /* operating mode attachment */ ieee80211vap_attach ic_vattach[IEEE80211_OPMODE_MAX]; @@ -652,7 +652,8 @@ void ieee80211_ifattach(struct ieee80211 const uint8_t macaddr[IEEE80211_ADDR_LEN]); void ieee80211_ifdetach(struct ieee80211com *); int ieee80211_vap_setup(struct ieee80211com *, struct ieee80211vap *, - const char name[IFNAMSIZ], int unit, int opmode, int flags, + const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], const uint8_t macaddr[IEEE80211_ADDR_LEN]); int ieee80211_vap_attach(struct ieee80211vap *, From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 09:18:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E963E106566B; Sat, 28 Apr 2012 09:18:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D42328FC0A; Sat, 28 Apr 2012 09:18:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3S9IKEM052015; Sat, 28 Apr 2012 09:18:20 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3S9IK2D052013; Sat, 28 Apr 2012 09:18:20 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201204280918.q3S9IK2D052013@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Apr 2012 09:18:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234754 - stable/9/sys/dev/drm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 09:18:21 -0000 Author: dim Date: Sat Apr 28 09:18:20 2012 New Revision: 234754 URL: http://svn.freebsd.org/changeset/base/234754 Log: MFC r228572: Fix format string Z --> z, since the former is a deprecated and (in FreeBSD) unsupported form of the latter. This change has been reviewed and accepted in the -hackers list. Submitted by: Alexander Best Reviewed by: David Schulz Modified: stable/9/sys/dev/drm/mga_drv.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/drm/mga_drv.h ============================================================================== --- stable/9/sys/dev/drm/mga_drv.h Sat Apr 28 09:15:01 2012 (r234753) +++ stable/9/sys/dev/drm/mga_drv.h Sat Apr 28 09:18:20 2012 (r234754) @@ -288,7 +288,7 @@ do { \ do { \ if ( MGA_VERBOSE ) { \ DRM_INFO( "BEGIN_DMA( %d )\n", (n) ); \ - DRM_INFO( " space=0x%x req=0x%Zx\n", \ + DRM_INFO( " space=0x%x req=0x%zx\n", \ dev_priv->prim.space, (n) * DMA_BLOCK_SIZE ); \ } \ prim = dev_priv->prim.start; \ @@ -338,7 +338,7 @@ do { \ #define DMA_WRITE( offset, val ) \ do { \ if ( MGA_VERBOSE ) { \ - DRM_INFO( " DMA_WRITE( 0x%08x ) at 0x%04Zx\n", \ + DRM_INFO( " DMA_WRITE( 0x%08x ) at 0x%04zx\n", \ (u32)(val), write + (offset) * sizeof(u32) ); \ } \ *(volatile u32 *)(prim + write + (offset) * sizeof(u32)) = val; \ From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 09:21:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5511D106564A; Sat, 28 Apr 2012 09:21:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 403EA8FC14; Sat, 28 Apr 2012 09:21:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3S9LicR052188; Sat, 28 Apr 2012 09:21:44 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3S9LiWV052186; Sat, 28 Apr 2012 09:21:44 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201204280921.q3S9LiWV052186@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Apr 2012 09:21:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234755 - stable/9/sys/dev/dpt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 09:21:44 -0000 Author: dim Date: Sat Apr 28 09:21:43 2012 New Revision: 234755 URL: http://svn.freebsd.org/changeset/base/234755 Log: MFC r234540: Fix the following clang warning in dpt(4): sys/dev/dpt/dpt_scsi.c:612:18: error: implicit truncation from 'int' to bitfield changes value from -2 to 2 [-Werror,-Wconstant-conversion] dpt->cache_type = DPT_CACHE_WRITEBACK; ^ ~~~~~~~~~~~~~~~~~~~ by defining DPT_CACHE_WRITEBACK as 2, since dpt_softc::cache_type is an unsigned bitfield. No binary change. MFC after: 1 week Modified: stable/9/sys/dev/dpt/dpt.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/dpt/dpt.h ============================================================================== --- stable/9/sys/dev/dpt/dpt.h Sat Apr 28 09:18:20 2012 (r234754) +++ stable/9/sys/dev/dpt/dpt.h Sat Apr 28 09:21:43 2012 (r234755) @@ -142,7 +142,7 @@ typedef void *physaddr; */ #define DPT_NO_CACHE 0 #define DPT_CACHE_WRITETHROUGH 1 -#define DPT_CACHE_WRITEBACK -2 +#define DPT_CACHE_WRITEBACK 2 #define min(a,b) ((a Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5ACF4106566B; Sat, 28 Apr 2012 10:59:30 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B2328FC0C; Sat, 28 Apr 2012 10:59:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SAxUOO057395; Sat, 28 Apr 2012 10:59:30 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SAxUDR057392; Sat, 28 Apr 2012 10:59:30 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201204281059.q3SAxUDR057392@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 28 Apr 2012 10:59:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234756 - in head/usr.sbin/wpa: . wpa_supplicant X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 10:59:30 -0000 Author: bschmidt Date: Sat Apr 28 10:59:29 2012 New Revision: 234756 URL: http://svn.freebsd.org/changeset/base/234756 Log: Follow up r234711 and do same for the supplicant, one file/option per line. While here merge the options which are always enabled. MFC after: 2 weeks Modified: head/usr.sbin/wpa/Makefile.inc head/usr.sbin/wpa/wpa_supplicant/Makefile Modified: head/usr.sbin/wpa/Makefile.inc ============================================================================== --- head/usr.sbin/wpa/Makefile.inc Sat Apr 28 09:21:43 2012 (r234755) +++ head/usr.sbin/wpa/Makefile.inc Sat Apr 28 10:59:29 2012 (r234756) @@ -12,10 +12,13 @@ HOSTAPD_DISTDIR?= ${WPA_DISTDIR}/hostapd ${WPA_DISTDIR}/src/crypto \ ${WPA_DISTDIR}/src/eapol_auth \ ${WPA_DISTDIR}/src/eap_common \ + ${WPA_DISTDIR}/src/eap_peer \ ${WPA_DISTDIR}/src/eap_server \ ${WPA_DISTDIR}/src/eapol_supp \ ${WPA_DISTDIR}/src/l2_packet \ ${WPA_DISTDIR}/src/radius \ + ${WPA_DISTDIR}/src/rsn_supp \ + ${WPA_DISTDIR}/src/tls \ ${WPA_DISTDIR}/src/utils CFLAGS+=-I${.CURDIR} Modified: head/usr.sbin/wpa/wpa_supplicant/Makefile ============================================================================== --- head/usr.sbin/wpa/wpa_supplicant/Makefile Sat Apr 28 09:21:43 2012 (r234755) +++ head/usr.sbin/wpa/wpa_supplicant/Makefile Sat Apr 28 10:59:29 2012 (r234756) @@ -2,24 +2,53 @@ .include "${.CURDIR}/../Makefile.inc" -.PATH.c:${WPA_SUPPLICANT_DISTDIR} \ - ${WPA_DISTDIR}/src/drivers \ - ${WPA_DISTDIR}/src/eap_peer \ - ${WPA_DISTDIR}/src/rsn_supp \ - ${WPA_DISTDIR}/src/crypto +.PATH.c:${WPA_DISTDIR}/src/drivers PROG= wpa_supplicant -SRCS= aes-cbc.c aes-ctr.c aes-eax.c aes-encblock.c \ - aes-internal.c aes-omac1.c aes-unwrap.c \ - aes-wrap.c bss.c blacklist.c common.c config.c ctrl_iface.c \ - ctrl_iface_unix.c drivers.c eloop.c events.c l2_packet_freebsd.c main.c\ - md5.c notify.c preauth.c pmksa_cache.c scan.c \ - sha1-pbkdf2.c sha1-tlsprf.c sha1-tprf.c sha1.c \ - wpa.c wpa_common.c wpa_debug.c wpa_ie.c wpa_supplicant.c \ - wpabuf.c wpas_glue.c \ - driver_ndis.c Packet32.c \ +SRCS= aes-cbc.c \ + aes-ctr.c \ + aes-eax.c \ + aes-encblock.c \ + aes-internal.c \ + aes-omac1.c \ + aes-unwrap.c \ + aes-wrap.c \ + base64.c \ + blacklist.c \ + bss.c \ + common.c \ + config.c \ + config_file.c \ + ctrl_iface.c \ + ctrl_iface_unix.c \ + driver_ndis.c \ driver_wired.c \ - driver_freebsd.c os_unix.c + drivers.c \ + eap_register.c \ + eloop.c \ + events.c \ + main.c \ + md5.c \ + notify.c \ + os_unix.c \ + peerkey.c \ + pmksa_cache.c \ + preauth.c \ + scan.c \ + sha1-pbkdf2.c \ + sha1-tlsprf.c \ + sha1-tprf.c \ + sha1.c \ + wpa.c \ + wpa_common.c \ + wpa_debug.c \ + wpa_ie.c \ + wpa_supplicant.c \ + wpabuf.c \ + wpas_glue.c +SRCS+= driver_freebsd.c \ + l2_packet_freebsd.c \ + Packet32.c MAN= wpa_supplicant.8 wpa_supplicant.conf.5 @@ -29,23 +58,19 @@ FILESDIR= ${SHAREDIR}/examples/etc FILES= wpa_supplicant.conf .endif -CFLAGS+=-I${WPA_SUPPLICANT_DISTDIR} -CFLAGS+=-I${WPA_DISTDIR}/src/drivers -CFLAGS+=-I${WPA_DISTDIR}/src/rsn_supp - -CFLAGS+= -DCONFIG_DRIVER_BSD -CFLAGS+= -DCONFIG_DRIVER_NDIS -CFLAGS+= -DCONFIG_DRIVER_WIRED -CFLAGS+= -DCONFIG_TERMINATE_ONLASTIF -CFLAGS+= -DCONFIG_DEBUG_SYSLOG +CFLAGS+=-DCONFIG_BACKEND_FILE \ + -DCONFIG_DEBUG_SYSLOG \ + -DCONFIG_DRIVER_BSD \ + -DCONFIG_DRIVER_NDIS \ + -DCONFIG_DRIVER_WIRED \ + -DCONFIG_PEERKEY \ + -DCONFIG_SMARTCARD \ + -DCONFIG_TERMINATE_ONLASTIF \ + -DPKCS12_FUNCS #CFLAGS+= -g DPADD+= ${LIBPCAP} LDADD+= -lpcap -# NB: we only support wpa_supplicant.conf file -SRCS+= config_file.c base64.c -CFLAGS+=-DCONFIG_BACKEND_FILE - # User customizations to the wpa_supplicant build environment CFLAGS+=${WPA_SUPPLICANT_CFLAGS} #DPADD+=${WPA_SUPPLICANT_DPADD} @@ -53,22 +78,39 @@ LDADD+=${WPA_SUPPLICANT_LDADD} #LDFLAGS+=${WPA_SUPPLICANT_LDFLAGS} .if ${MK_WPA_SUPPLICANT_EAPOL} != "no" -SRCS+= eapol_supp_sm.c eap.c eap_common.c eap_methods.c eap_register.c -CFLAGS+= -DIEEE8021X_EAPOL .if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH) -CFLAGS+=-DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_LEAP -DEAP_PSK \ - -DEAP_TLV -DEAP_TLS_FUNCS -DEAP_TLS_OPENSSL -SRCS+= chap.c crypto_openssl.c \ + +CFLAGS+=-DEAP_LEAP \ + -DEAP_MD5 \ + -DEAP_MSCHAPv2 \ + -DEAP_PEAP \ + -DEAP_PSK \ + -DEAP_TLS \ + -DEAP_TLV \ + -DEAP_TLS_FUNCS \ + -DEAP_TLS_OPENSSL \ + -DEAP_TTLS \ + -DIEEE8021X_EAPOL +SRCS+= chap.c \ + crypto_openssl.c \ + eap.c \ + eap_common.c \ eap_leap.c \ + eap_md5.c \ + eap_methods.c \ eap_mschapv2.c \ - eap_peap.c eap_peap_common.c \ - eap_psk.c eap_psk_common.c \ - eap_tls.c eap_tls_common.c \ - mschapv2.c ms_funcs.c tls_openssl.c - -CFLAGS+=-DEAP_TTLS -DEAP_MD5 -SRCS+= eap_ttls.c eap_md5.c + eap_peap.c \ + eap_peap_common.c \ + eap_psk.c \ + eap_psk_common.c \ + eap_tls.c \ + eap_tls_common.c \ + eap_ttls.c \ + eapol_supp_sm.c \ + ms_funcs.c \ + mschapv2.c \ + tls_openssl.c .if !empty(CFLAGS:M*-DEAP_GTC) SRCS+= eap_gtc.c @@ -90,6 +132,7 @@ SRCS+= eap_sim.c .if defined(NEED_SIM_COMMON) SRCS+= eap_sim_common.c +.endif # PC/SC interface for smartcards (USIM, GSM SIM) # GSM/UMTS authentication algorithm (for EAP-SIM/EAP-AKA) @@ -103,26 +146,24 @@ SRCS+= pcsc_funcs.c DPADD+=${LIBPTHREAD} LDADD+=-lpcsclite -lpthread .endif -.endif .if !empty(CFLAGS:M*-DEAP_GPSK) CFLAGS+=-DEAP_GPSK_SHA256 -SRCS+= eap_gpsk.c eap_gpsk_common.c +SRCS+= eap_gpsk.c \ + eap_gpsk_common.c NEED_SHA256= true .endif .if !empty(CFLAGS:M*-DEAP_PAX) -SRCS+= eap_pax.c eap_pax_common.c +SRCS+= eap_pax.c \ + eap_pax_common.c .endif .if !empty(CFLAGS:M*-DEAP_SAKE) -SRCS+= eap_sake.c eap_sake_common.c +SRCS+= eap_sake.c \ + eap_sake_common.c .endif -# NB: requires patch to openssl -#CFLAGS+= -DEAP_FAST -#SRCS+= eap_fast.c - NEED_LIBSSL= true .else CFLAGS+= -DEAP_TLS_NONE From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 11:01:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52738106564A; Sat, 28 Apr 2012 11:01:13 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CE558FC16; Sat, 28 Apr 2012 11:01:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SB1D50057532; Sat, 28 Apr 2012 11:01:13 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SB1DTQ057530; Sat, 28 Apr 2012 11:01:13 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201204281101.q3SB1DTQ057530@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 28 Apr 2012 11:01:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234757 - head/usr.sbin/wpa/wpa_supplicant X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 11:01:13 -0000 Author: bschmidt Date: Sat Apr 28 11:01:12 2012 New Revision: 234757 URL: http://svn.freebsd.org/changeset/base/234757 Log: enable EAP_GTC and EAP_OTP to match upstream's default configuration MFC after: 2 weeks Modified: head/usr.sbin/wpa/wpa_supplicant/Makefile Modified: head/usr.sbin/wpa/wpa_supplicant/Makefile ============================================================================== --- head/usr.sbin/wpa/wpa_supplicant/Makefile Sat Apr 28 10:59:29 2012 (r234756) +++ head/usr.sbin/wpa/wpa_supplicant/Makefile Sat Apr 28 11:01:12 2012 (r234757) @@ -81,9 +81,11 @@ LDADD+=${WPA_SUPPLICANT_LDADD} .if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH) -CFLAGS+=-DEAP_LEAP \ +CFLAGS+=-DEAP_GTC \ + -DEAP_LEAP \ -DEAP_MD5 \ -DEAP_MSCHAPv2 \ + -DEAP_OTP \ -DEAP_PEAP \ -DEAP_PSK \ -DEAP_TLS \ @@ -96,10 +98,12 @@ SRCS+= chap.c \ crypto_openssl.c \ eap.c \ eap_common.c \ + eap_gtc.c \ eap_leap.c \ eap_md5.c \ eap_methods.c \ eap_mschapv2.c \ + eap_otp.c \ eap_peap.c \ eap_peap_common.c \ eap_psk.c \ @@ -112,14 +116,6 @@ SRCS+= chap.c \ mschapv2.c \ tls_openssl.c -.if !empty(CFLAGS:M*-DEAP_GTC) -SRCS+= eap_gtc.c -.endif - -.if !empty(CFLAGS:M*-DEAP_OTP) -SRCS+= eap_otp.c -.endif - .if !empty(CFLAGS:M*-DEAP_AKA) NEED_SIM_COMMON= true SRCS+= eap_aka.c From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 11:02:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 943CA106566B; Sat, 28 Apr 2012 11:02:33 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EBDA8FC12; Sat, 28 Apr 2012 11:02:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SB2Xr6057616; Sat, 28 Apr 2012 11:02:33 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SB2XOr057614; Sat, 28 Apr 2012 11:02:33 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201204281102.q3SB2XOr057614@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 28 Apr 2012 11:02:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234758 - head/usr.sbin/wpa/hostapd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 11:02:33 -0000 Author: bschmidt Date: Sat Apr 28 11:02:32 2012 New Revision: 234758 URL: http://svn.freebsd.org/changeset/base/234758 Log: not only the file names have changed from eap_xxx.c to eap_server_xxx.c, the defines too MFC after: 2 weeks Modified: head/usr.sbin/wpa/hostapd/Makefile Modified: head/usr.sbin/wpa/hostapd/Makefile ============================================================================== --- head/usr.sbin/wpa/hostapd/Makefile Sat Apr 28 11:01:12 2012 (r234757) +++ head/usr.sbin/wpa/hostapd/Makefile Sat Apr 28 11:02:32 2012 (r234758) @@ -106,13 +106,13 @@ SRCS+= dump_state.c \ eap_server_ttls.c \ tls_openssl.c -.if !empty(CFLAGS:M*-DEAP_AKA) +.if !empty(CFLAGS:M*-DEAP_SERVER_AKA) NEED_SIM_COMMON= true NEED_SHA256= true SRCS+= eap_server_aka.c .endif -.if !empty(CFLAGS:M*-DEAP_SIM) +.if !empty(CFLAGS:M*-DEAP_SERVER_SIM) NEED_SIM_COMMON= true SRCS+= eap_server_sim.c .endif @@ -124,7 +124,7 @@ NEED_AES_CBC= true NEED_FIPS186_2_PRF= true .endif -.if !empty(CFLAGS:M*-DEAP_GPSK) +.if !empty(CFLAGS:M*-DEAP_SERVER_GPSK) CFLAGS+=-DEAP_GPSK_SHA256 SRCS+= eap_server_gpsk.c \ eap_gpsk_common.c @@ -132,12 +132,12 @@ NEED_SHA256= true NEED_AES_OMAC1= true .endif -.if !empty(CFLAGS:M*-DEAP_PAX) +.if !empty(CFLAGS:M*-DEAP_SERVER_PAX) SRCS+= eap_server_pax.c \ eap_pax_common.c .endif -.if !empty(CFLAGS:M*-DEAP_SAKE) +.if !empty(CFLAGS:M*-DEAP_SERVER_SAKE) SRCS+= eap_server_sake.c \ eap_sake_common.c .endif From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 11:11:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5B5D3106566C; Sat, 28 Apr 2012 11:11:54 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 44EC38FC08; Sat, 28 Apr 2012 11:11:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SBBse2057992; Sat, 28 Apr 2012 11:11:54 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SBBsHm057989; Sat, 28 Apr 2012 11:11:54 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201204281111.q3SBBsHm057989@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 28 Apr 2012 11:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234759 - in head/usr.sbin/wpa: . hostapd wpa_supplicant X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 11:11:54 -0000 Author: bschmidt Date: Sat Apr 28 11:11:53 2012 New Revision: 234759 URL: http://svn.freebsd.org/changeset/base/234759 Log: Move crypto stuff into a common Makefile. While here fix the WITHOUT_OPENSSL build by using the wpa's internal crypto support if openssl is not available, this allows us to unconditionally enable EAP support. MFC after: 2 weeks Added: head/usr.sbin/wpa/Makefile.crypto (contents, props changed) Modified: head/usr.sbin/wpa/hostapd/Makefile head/usr.sbin/wpa/wpa_supplicant/Makefile Added: head/usr.sbin/wpa/Makefile.crypto ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/wpa/Makefile.crypto Sat Apr 28 11:11:53 2012 (r234759) @@ -0,0 +1,121 @@ +# $FreeBSD$ + +.if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH) +SRCS+= crypto_openssl.c +DPADD+= ${LIBSSL} ${LIBCRYPTO} +LDADD+= -lssl -lcrypto +.else +CFLAGS+=-DCONFIG_CRYPTO_INTERNAL +SRCS+= crypto_internal.c +CONFIG_INTERNAL_AES=y +CONFIG_INTERNAL_DES=y +CONFIG_INTERNAL_MD4=y +CONFIG_INTERNAL_MD5=y +CONFIG_INTERNAL_RC4=y +CONFIG_INTERNAL_SHA1=y +CONFIG_INTERNAL_SHA256=y +CONFIG_INTERNAL_TLS=y +NEED_AES_ENC=true +.endif + +.if defined(TLS_FUNCS) +NEED_TLS_PRF=y +.if defined(CONFIG_INTERNAL_TLS) +CFLAGS+=-DCONFIG_INTERNAL_LIBTOMMATH \ + -DCONFIG_TLS_INTERNAL_CLIENT +SRCS+= asn1.c \ + bignum.c \ + crypto_internal-cipher.c \ + crypto_internal-modexp.c \ + crypto_internal-rsa.c \ + pkcs1.c \ + pkcs5.c \ + pkcs8.c \ + rsa.c \ + tls_internal.c \ + tlsv1_common.c \ + tlsv1_record.c \ + tlsv1_cred.c \ + tlsv1_client.c \ + tlsv1_client_write.c \ + tlsv1_client_read.c \ + x509v3.c +NEED_DES=y +NEED_MD4=y +NEED_RC4=y +.else +CFLAGS+=-DEAP_TLS_OPENSSL +SRCS+= tls_openssl.c +.endif +.endif + +.if defined(CONFIG_INTERNAL_AES) +SRCS+= aes-internal.c \ + aes-internal-dec.c \ + aes-internal-enc.c +.endif + +.if defined(NEED_AES_CBC) +SRCS+= aes-cbc.c +.endif + +.if defined(NEED_AES_EAX) +SRCS+= aes-eax.c +NEED_AES_CTR=y +.endif + +.if defined(NEED_AES_CTR) +SRCS+= aes-ctr.c +.endif + +.if defined(NEED_AES_ENCBLOCK) +SRCS+= aes-encblock.c +.endif + +.if defined(NEED_AES_OMAC1) +SRCS+= aes-omac1.c +.endif + +.if defined(NEED_DES) +.if defined(CONFIG_INTERNAL_DES) +SRCS+= des-internal.c +.endif +.endif + +.if defined(NEED_MD4) +.if defined(CONFIG_INTERNAL_MD4) +SRCS+= md4-internal.c +.endif +.endif + +.if defined(CONFIG_INTERNAL_MD5) +SRCS+= md5-internal.c +.endif + +.if defined(NEED_FIPS186_2_PRF) +.if defined(CONFIG_INTERNAL_SHA1) +SRCS+= fips_prf_internal.c +.else +SRCS+= fips_prf_openssl.c +.endif +.endif + +.if defined(CONFIG_INTERNAL_RC4) +SRCS+= rc4.c +.endif + +.if defined(CONFIG_INTERNAL_SHA1) +SRCS+= sha1-internal.c +.endif + +.if defined(NEED_SHA256) +CFLAGS+=-DCONFIG_SHA256 +SRCS+= sha256.c +.if defined(CONFIG_INTERNAL_SHA256) +SRCS+= sha256-internal.c +.endif +.endif + +.if defined(NEED_TLS_PRF) +SRCS+= sha1-tlsprf.c +.endif Modified: head/usr.sbin/wpa/hostapd/Makefile ============================================================================== --- head/usr.sbin/wpa/hostapd/Makefile Sat Apr 28 11:02:32 2012 (r234758) +++ head/usr.sbin/wpa/hostapd/Makefile Sat Apr 28 11:11:53 2012 (r234759) @@ -11,10 +11,10 @@ SRCS= accounting.c \ ap_drv_ops.c \ ap_mlme.c \ authsrv.c \ + base64.c \ chap.c \ common.c \ config_file.c \ - crypto_openssl.c \ ctrl_iface.c \ ctrl_iface_ap.c \ drivers.c \ @@ -42,7 +42,6 @@ SRCS= accounting.c \ radius.c \ radius_client.c \ sha1-pbkdf2.c \ - sha1-tlsprf.c \ sha1.c \ sta_info.c \ tkip_countermeasures.c \ @@ -73,8 +72,8 @@ CFLAGS+=-DCONFIG_DRIVER_BSD \ CFLAGS+= -DCONFIG_IPV6 .endif #CFLAGS+= -g -DPADD+= ${LIBPCAP} ${LIBSSL} -LDADD+= -lpcap -lssl +DPADD+= ${LIBPCAP} +LDADD+= -lpcap # User customizations for wpa_supplicant/hostapd build environment CFLAGS+=${HOSTAPD_CFLAGS} @@ -82,8 +81,6 @@ CFLAGS+=${HOSTAPD_CFLAGS} LDADD+=${HOSTAPD_LDADD} #LDFLAGS+=${HOSTAPD_LDFLAGS} -.if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH) - CFLAGS+=-DDPKCS12_FUNCS \ -DEAP_SERVER \ -DEAP_SERVER_GTC \ @@ -103,33 +100,32 @@ SRCS+= dump_state.c \ eap_server_peap.c \ eap_server_tls.c \ eap_server_tls_common.c \ - eap_server_ttls.c \ - tls_openssl.c + eap_server_ttls.c +TLS_FUNCS=y +NEED_SHA256=y .if !empty(CFLAGS:M*-DEAP_SERVER_AKA) -NEED_SIM_COMMON= true -NEED_SHA256= true SRCS+= eap_server_aka.c +NEED_SIM_COMMON=y .endif .if !empty(CFLAGS:M*-DEAP_SERVER_SIM) -NEED_SIM_COMMON= true SRCS+= eap_server_sim.c +NEED_SIM_COMMON=y .endif .if defined(NEED_SIM_COMMON) SRCS+= eap_sim_common.c \ eap_sim_db.c -NEED_AES_CBC= true -NEED_FIPS186_2_PRF= true +NEED_AES_CBC=y +NEED_FIPS186_2_PRF=y .endif .if !empty(CFLAGS:M*-DEAP_SERVER_GPSK) CFLAGS+=-DEAP_GPSK_SHA256 SRCS+= eap_server_gpsk.c \ eap_gpsk_common.c -NEED_SHA256= true -NEED_AES_OMAC1= true +NEED_AES_OMAC1=y .endif .if !empty(CFLAGS:M*-DEAP_SERVER_PAX) @@ -142,34 +138,6 @@ SRCS+= eap_server_sake.c \ eap_sake_common.c .endif -DPADD+= ${LIBSSL} ${LIBCRYPTO} -LDADD+= -lssl -lcrypto -.else -NEED_TLS_NONE= true -.endif - -.if defined(NEED_AES_CBC) -SRCS+= aes-cbc.c -.endif - -.if defined(NEED_AES_OMAC1) -SRCS+= aes-omac1.c -.endif - -.if defined(NEED_FIPS186_2_PRF) -SRCS+= fips_prf_openssl.c -.endif - -.if defined(NEED_SHA256) -SRCS+= sha256.c -.endif - -.if defined(NEED_TLS_NONE) -CFLAGS+= -DEAP_TLS_NONE -CFLAGS+= -DINTERNAL_AES -CFLAGS+= -DINTERNAL_SHA1 -CFLAGS+= -DINTERNAL_MD5 -SRCS+= tls_none.c -.endif +.include "${.CURDIR}/../Makefile.crypto" .include Modified: head/usr.sbin/wpa/wpa_supplicant/Makefile ============================================================================== --- head/usr.sbin/wpa/wpa_supplicant/Makefile Sat Apr 28 11:02:32 2012 (r234758) +++ head/usr.sbin/wpa/wpa_supplicant/Makefile Sat Apr 28 11:11:53 2012 (r234759) @@ -5,14 +5,7 @@ .PATH.c:${WPA_DISTDIR}/src/drivers PROG= wpa_supplicant -SRCS= aes-cbc.c \ - aes-ctr.c \ - aes-eax.c \ - aes-encblock.c \ - aes-internal.c \ - aes-omac1.c \ - aes-unwrap.c \ - aes-wrap.c \ +SRCS= aes-unwrap.c \ base64.c \ blacklist.c \ bss.c \ @@ -36,8 +29,6 @@ SRCS= aes-cbc.c \ preauth.c \ scan.c \ sha1-pbkdf2.c \ - sha1-tlsprf.c \ - sha1-tprf.c \ sha1.c \ wpa.c \ wpa_common.c \ @@ -78,9 +69,6 @@ LDADD+=${WPA_SUPPLICANT_LDADD} #LDFLAGS+=${WPA_SUPPLICANT_LDFLAGS} .if ${MK_WPA_SUPPLICANT_EAPOL} != "no" - -.if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH) - CFLAGS+=-DEAP_GTC \ -DEAP_LEAP \ -DEAP_MD5 \ @@ -89,13 +77,9 @@ CFLAGS+=-DEAP_GTC \ -DEAP_PEAP \ -DEAP_PSK \ -DEAP_TLS \ - -DEAP_TLV \ - -DEAP_TLS_FUNCS \ - -DEAP_TLS_OPENSSL \ -DEAP_TTLS \ -DIEEE8021X_EAPOL SRCS+= chap.c \ - crypto_openssl.c \ eap.c \ eap_common.c \ eap_gtc.c \ @@ -113,21 +97,29 @@ SRCS+= chap.c \ eap_ttls.c \ eapol_supp_sm.c \ ms_funcs.c \ - mschapv2.c \ - tls_openssl.c + mschapv2.c +TLS_FUNCS=y +NEED_AES_EAX=y +NEED_AES_ENCBLOCK=y +NEED_AES_OMAC1=y +NEED_SHA256=y +.endif .if !empty(CFLAGS:M*-DEAP_AKA) -NEED_SIM_COMMON= true SRCS+= eap_aka.c +NEED_SIM_COMMON=y +NEED_AES_CBC=y .endif .if !empty(CFLAGS:M*-DEAP_SIM) -NEED_SIM_COMMON= true SRCS+= eap_sim.c +NEED_SIM_COMMON=y +NEED_AES_CBC=y .endif .if defined(NEED_SIM_COMMON) SRCS+= eap_sim_common.c +NEED_FIPS186_2_PRF=y .endif # PC/SC interface for smartcards (USIM, GSM SIM) @@ -147,7 +139,7 @@ LDADD+=-lpcsclite -lpthread CFLAGS+=-DEAP_GPSK_SHA256 SRCS+= eap_gpsk.c \ eap_gpsk_common.c -NEED_SHA256= true +NEED_AES_OMAC1=y .endif .if !empty(CFLAGS:M*-DEAP_PAX) @@ -160,32 +152,6 @@ SRCS+= eap_sake.c \ eap_sake_common.c .endif -NEED_LIBSSL= true -.else -CFLAGS+= -DEAP_TLS_NONE -SRCS+= tls_none.c -.endif - -.endif - -# -# Configure crypto/cipher support. -# -# EAPOL support requires openssl in which case we use their -# cipher code. Otherwise we use our internal versions. -# -.if !defined(NEED_LIBSSL) -CFLAGS+= -DINTERNAL_AES -CFLAGS+= -DINTERNAL_SHA1 -CFLAGS+= -DINTERNAL_MD5 -.else -DPADD+= ${LIBSSL} ${LIBCRYPTO} -LDADD+= -lssl -lcrypto -.endif - -.if defined(NEED_SHA256) -CFLAGS+=-DINTERNAL_SHA256 -SRCS+= sha256.c -.endif +.include "${.CURDIR}/../Makefile.crypto" .include From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 14:42:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D0C071065670; Sat, 28 Apr 2012 14:42:49 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBD7A8FC0C; Sat, 28 Apr 2012 14:42:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SEgnIj065633; Sat, 28 Apr 2012 14:42:49 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SEgnRV065631; Sat, 28 Apr 2012 14:42:49 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204281442.q3SEgnRV065631@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 28 Apr 2012 14:42:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234760 - head/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 14:42:49 -0000 Author: nwhitehorn Date: Sat Apr 28 14:42:49 2012 New Revision: 234760 URL: http://svn.freebsd.org/changeset/base/234760 Log: Fix build on 32-bit systems. Modified: head/sys/powerpc/aim/moea64_native.c Modified: head/sys/powerpc/aim/moea64_native.c ============================================================================== --- head/sys/powerpc/aim/moea64_native.c Sat Apr 28 11:11:53 2012 (r234759) +++ head/sys/powerpc/aim/moea64_native.c Sat Apr 28 14:42:49 2012 (r234760) @@ -174,7 +174,7 @@ TLBIE(uint64_t vpn) { ptesync;" : "=r"(msr), "=r"(scratch) : "r"(vpn_hi), "r"(vpn_lo), "r"(32), "r"(1) : "memory"); - intr_enable(); + intr_restore(intr); #endif /* No barriers or special ops -- taken care of by ptesync above */ From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 16:32:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4843106566B; Sat, 28 Apr 2012 16:32:49 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B06C48FC0C; Sat, 28 Apr 2012 16:32:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SGWn70069455; Sat, 28 Apr 2012 16:32:49 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SGWnbL069453; Sat, 28 Apr 2012 16:32:49 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201204281632.q3SGWnbL069453@svn.freebsd.org> From: Michael Tuexen Date: Sat, 28 Apr 2012 16:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234762 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 16:32:49 -0000 Author: tuexen Date: Sat Apr 28 16:32:49 2012 New Revision: 234762 URL: http://svn.freebsd.org/changeset/base/234762 Log: Whitespace changes. MFC after: 3 days Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sat Apr 28 16:28:00 2012 (r234761) +++ head/sys/netinet/sctp_usrreq.c Sat Apr 28 16:32:49 2012 (r234762) @@ -79,7 +79,6 @@ sctp_init(void) * now I will just copy. */ SCTP_BASE_SYSCTL(sctp_recvspace) = SCTP_BASE_SYSCTL(sctp_sendspace); - SCTP_BASE_VAR(first_time) = 0; SCTP_BASE_VAR(sctp_pcb_initialized) = 0; sctp_pcb_init(); @@ -88,8 +87,6 @@ sctp_init(void) SCTP_BASE_VAR(packet_log_end) = 0; bzero(&SCTP_BASE_VAR(packet_log_buffer), SCTP_PACKET_LOG_SIZE); #endif - - } void From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 17:29:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98A85106564A; Sat, 28 Apr 2012 17:29:09 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 799078FC0C; Sat, 28 Apr 2012 17:29:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SHT9ul072453; Sat, 28 Apr 2012 17:29:09 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SHT94p072451; Sat, 28 Apr 2012 17:29:09 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201204281729.q3SHT94p072451@svn.freebsd.org> From: Alan Cox Date: Sat, 28 Apr 2012 17:29:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234763 - in stable/9/sys: i386/conf kern vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 17:29:09 -0000 Author: alc Date: Sat Apr 28 17:29:08 2012 New Revision: 234763 URL: http://svn.freebsd.org/changeset/base/234763 Log: MFC r232166 Simplify vm_mmap()'s control flow. Add a comment describing what vm_mmap_to_errno() does. Modified: stable/9/sys/vm/vm_mmap.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/vm/vm_mmap.c ============================================================================== --- stable/9/sys/vm/vm_mmap.c Sat Apr 28 16:32:49 2012 (r234762) +++ stable/9/sys/vm/vm_mmap.c Sat Apr 28 17:29:08 2012 (r234763) @@ -1449,9 +1449,8 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, { boolean_t fitit; vm_object_t object = NULL; - int rv = KERN_SUCCESS; - int docow, error; struct thread *td = curthread; + int docow, error, rv; boolean_t writecounted; if (size == 0) @@ -1557,31 +1556,35 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, rv = vm_map_fixed(map, object, foff, *addr, size, prot, maxprot, docow); - if (rv != KERN_SUCCESS) { + if (rv == KERN_SUCCESS) { + /* + * If the process has requested that all future mappings + * be wired, then heed this. + */ + if (map->flags & MAP_WIREFUTURE) + vm_map_wire(map, *addr, *addr + size, + VM_MAP_WIRE_USER | VM_MAP_WIRE_NOHOLES); + } else { /* - * Lose the object reference. Will destroy the - * object if it's an unnamed anonymous mapping - * or named anonymous without other references. - * * If this mapping was accounted for in the vnode's * writecount, then undo that now. */ if (writecounted) vnode_pager_release_writecount(object, 0, size); + /* + * Lose the object reference. Will destroy the + * object if it's an unnamed anonymous mapping + * or named anonymous without other references. + */ vm_object_deallocate(object); } - - /* - * If the process has requested that all future mappings - * be wired, then heed this. - */ - if ((rv == KERN_SUCCESS) && (map->flags & MAP_WIREFUTURE)) - vm_map_wire(map, *addr, *addr + size, - VM_MAP_WIRE_USER|VM_MAP_WIRE_NOHOLES); - return (vm_mmap_to_errno(rv)); } +/* + * Translate a Mach VM return code to zero on success or the appropriate errno + * on failure. + */ int vm_mmap_to_errno(int rv) { From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 17:54:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6FEC61065673; Sat, 28 Apr 2012 17:54:55 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 419178FC12; Sat, 28 Apr 2012 17:54:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SHstUp073412; Sat, 28 Apr 2012 17:54:55 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SHst7E073410; Sat, 28 Apr 2012 17:54:55 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201204281754.q3SHst7E073410@svn.freebsd.org> From: Alan Cox Date: Sat, 28 Apr 2012 17:54:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234764 - in stable/9/sys: i386/conf kern vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 17:54:55 -0000 Author: alc Date: Sat Apr 28 17:54:54 2012 New Revision: 234764 URL: http://svn.freebsd.org/changeset/base/234764 Log: MFC r234554 Updates to the vm_page's flags no longer require the page queues lock. Modified: stable/9/sys/vm/vm_page.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/vm/vm_page.c ============================================================================== --- stable/9/sys/vm/vm_page.c Sat Apr 28 17:29:08 2012 (r234763) +++ stable/9/sys/vm/vm_page.c Sat Apr 28 17:54:54 2012 (r234764) @@ -1921,13 +1921,10 @@ vm_page_unwire(vm_page_t m, int activate if ((m->oflags & VPO_UNMANAGED) != 0 || m->object == NULL) return; - vm_page_lock_queues(); - if (activate) - vm_page_enqueue(PQ_ACTIVE, m); - else { + if (!activate) m->flags &= ~PG_WINATCFLS; - vm_page_enqueue(PQ_INACTIVE, m); - } + vm_page_lock_queues(); + vm_page_enqueue(activate ? PQ_ACTIVE : PQ_INACTIVE, m); vm_page_unlock_queues(); } } else @@ -1967,8 +1964,8 @@ _vm_page_deactivate(vm_page_t m, int ath if ((queue = m->queue) == PQ_INACTIVE) return; if (m->wire_count == 0 && (m->oflags & VPO_UNMANAGED) == 0) { - vm_page_lock_queues(); m->flags &= ~PG_WINATCFLS; + vm_page_lock_queues(); if (queue != PQ_NONE) vm_page_queue_remove(queue, m); if (athead) From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 18:03:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 97BD4106566C; Sat, 28 Apr 2012 18:03:58 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A1C88FC0A; Sat, 28 Apr 2012 18:03:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SI3w5b073801; Sat, 28 Apr 2012 18:03:58 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SI3wXa073799; Sat, 28 Apr 2012 18:03:58 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201204281803.q3SI3wXa073799@svn.freebsd.org> From: Alan Cox Date: Sat, 28 Apr 2012 18:03:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234765 - in stable/9/sys: amd64/amd64 i386/conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 18:03:58 -0000 Author: alc Date: Sat Apr 28 18:03:57 2012 New Revision: 234765 URL: http://svn.freebsd.org/changeset/base/234765 Log: MFC r233097 With the changes over the past year to how accesses to the page's dirty field are synchronized, there is no need for pmap_protect() to acquire the page queues lock unless it is going to access the pv lists. Modified: stable/9/sys/amd64/amd64/pmap.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Sat Apr 28 17:54:54 2012 (r234764) +++ stable/9/sys/amd64/amd64/pmap.c Sat Apr 28 18:03:57 2012 (r234765) @@ -2893,6 +2893,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sv pd_entry_t ptpaddr, *pde; pt_entry_t *pte; int anychanged; + boolean_t pv_lists_locked; if ((prot & VM_PROT_READ) == VM_PROT_NONE) { pmap_remove(pmap, sva, eva); @@ -2903,9 +2904,10 @@ pmap_protect(pmap_t pmap, vm_offset_t sv (VM_PROT_WRITE|VM_PROT_EXECUTE)) return; + pv_lists_locked = FALSE; +resume: anychanged = 0; - vm_page_lock_queues(); PMAP_LOCK(pmap); for (; sva < eva; sva = va_next) { @@ -2954,9 +2956,25 @@ pmap_protect(pmap_t pmap, vm_offset_t sv if (pmap_protect_pde(pmap, pde, sva, prot)) anychanged = 1; continue; - } else if (!pmap_demote_pde(pmap, pde, sva)) { - /* The large page mapping was destroyed. */ - continue; + } else { + if (!pv_lists_locked) { + pv_lists_locked = TRUE; + if (!mtx_trylock(&vm_page_queue_mtx)) { + if (anychanged) + pmap_invalidate_all( + pmap); + PMAP_UNLOCK(pmap); + vm_page_lock_queues(); + goto resume; + } + } + if (!pmap_demote_pde(pmap, pde, sva)) { + /* + * The large page mapping was + * destroyed. + */ + continue; + } } } @@ -2996,7 +3014,8 @@ retry: } if (anychanged) pmap_invalidate_all(pmap); - vm_page_unlock_queues(); + if (pv_lists_locked) + vm_page_unlock_queues(); PMAP_UNLOCK(pmap); } From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 18:43:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A428E106566B; Sat, 28 Apr 2012 18:43:28 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EAB68FC08; Sat, 28 Apr 2012 18:43:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SIhSP3075212; Sat, 28 Apr 2012 18:43:28 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SIhS7s075208; Sat, 28 Apr 2012 18:43:28 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201204281843.q3SIhS7s075208@svn.freebsd.org> From: Alan Cox Date: Sat, 28 Apr 2012 18:43:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234766 - in stable/9/sys: i386/conf kern vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 18:43:28 -0000 Author: alc Date: Sat Apr 28 18:43:27 2012 New Revision: 234766 URL: http://svn.freebsd.org/changeset/base/234766 Log: MFC r234039 Fix mincore(2) so that it reports PG_CACHED pages as resident. Modified: stable/9/sys/vm/vm_mmap.c stable/9/sys/vm/vm_page.c stable/9/sys/vm/vm_page.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/vm/vm_mmap.c ============================================================================== --- stable/9/sys/vm/vm_mmap.c Sat Apr 28 18:03:57 2012 (r234765) +++ stable/9/sys/vm/vm_mmap.c Sat Apr 28 18:43:27 2012 (r234766) @@ -891,6 +891,9 @@ RestartScan: pindex = OFF_TO_IDX(current->offset + (addr - current->start)); m = vm_page_lookup(object, pindex); + if (m == NULL && + vm_page_is_cached(object, pindex)) + mincoreinfo = MINCORE_INCORE; if (m != NULL && m->valid == 0) m = NULL; if (m != NULL) Modified: stable/9/sys/vm/vm_page.c ============================================================================== --- stable/9/sys/vm/vm_page.c Sat Apr 28 18:03:57 2012 (r234765) +++ stable/9/sys/vm/vm_page.c Sat Apr 28 18:43:27 2012 (r234766) @@ -1284,6 +1284,33 @@ vm_page_cache_transfer(vm_object_t orig_ } /* + * Returns TRUE if a cached page is associated with the given object and + * offset, and FALSE otherwise. + * + * The object must be locked. + */ +boolean_t +vm_page_is_cached(vm_object_t object, vm_pindex_t pindex) +{ + vm_page_t m; + + /* + * Insertion into an object's collection of cached pages requires the + * object to be locked. Therefore, if the object is locked and the + * object's collection is empty, there is no need to acquire the free + * page queues lock in order to prove that the specified page doesn't + * exist. + */ + VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); + if (object->cache == NULL) + return (FALSE); + mtx_lock(&vm_page_queue_free_mtx); + m = vm_page_cache_lookup(object, pindex); + mtx_unlock(&vm_page_queue_free_mtx); + return (m != NULL); +} + +/* * vm_page_alloc: * * Allocate and return a memory cell associated Modified: stable/9/sys/vm/vm_page.h ============================================================================== --- stable/9/sys/vm/vm_page.h Sat Apr 28 18:03:57 2012 (r234765) +++ stable/9/sys/vm/vm_page.h Sat Apr 28 18:43:27 2012 (r234766) @@ -391,6 +391,7 @@ void vm_page_deactivate (vm_page_t); vm_page_t vm_page_find_least(vm_object_t, vm_pindex_t); vm_page_t vm_page_getfake(vm_paddr_t paddr, vm_memattr_t memattr); void vm_page_insert (vm_page_t, vm_object_t, vm_pindex_t); +boolean_t vm_page_is_cached(vm_object_t object, vm_pindex_t pindex); vm_page_t vm_page_lookup (vm_object_t, vm_pindex_t); vm_page_t vm_page_next(vm_page_t m); int vm_page_pa_tryrelock(pmap_t, vm_paddr_t, vm_paddr_t *); From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 18:46:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01CB2106566C; Sat, 28 Apr 2012 18:46:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E0D4B8FC0C; Sat, 28 Apr 2012 18:46:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SIkm8W075387; Sat, 28 Apr 2012 18:46:48 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SIkmZ1075385; Sat, 28 Apr 2012 18:46:48 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204281846.q3SIkmZ1075385@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 28 Apr 2012 18:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234767 - stable/9/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 18:46:49 -0000 Author: kib Date: Sat Apr 28 18:46:48 2012 New Revision: 234767 URL: http://svn.freebsd.org/changeset/base/234767 Log: MFC r234556: When MAP_STACK mapping is created, the map entry is created only to cover the initial stack size. For MCL_WIREFUTURE maps, the subsequent call to vm_map_wire() to wire the whole stack region fails due to VM_MAP_WIRE_NOHOLES flag. Use the VM_MAP_WIRE_HOLESOK to only wire mapped part of the stack. Modified: stable/9/sys/vm/vm_mmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_mmap.c ============================================================================== --- stable/9/sys/vm/vm_mmap.c Sat Apr 28 18:43:27 2012 (r234766) +++ stable/9/sys/vm/vm_mmap.c Sat Apr 28 18:46:48 2012 (r234767) @@ -1564,9 +1564,11 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, * If the process has requested that all future mappings * be wired, then heed this. */ - if (map->flags & MAP_WIREFUTURE) + if (map->flags & MAP_WIREFUTURE) { vm_map_wire(map, *addr, *addr + size, - VM_MAP_WIRE_USER | VM_MAP_WIRE_NOHOLES); + VM_MAP_WIRE_USER | ((flags & MAP_STACK) ? + VM_MAP_WIRE_HOLESOK : VM_MAP_WIRE_NOHOLES)); + } } else { /* * If this mapping was accounted for in the vnode's From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 18:56:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B6CB3106564A; Sat, 28 Apr 2012 18:56:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A2CF18FC0A; Sat, 28 Apr 2012 18:56:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SIuHRM075749; Sat, 28 Apr 2012 18:56:17 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SIuHgI075747; Sat, 28 Apr 2012 18:56:17 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204281856.q3SIuHgI075747@svn.freebsd.org> From: Adrian Chadd Date: Sat, 28 Apr 2012 18:56:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234768 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 18:56:17 -0000 Author: adrian Date: Sat Apr 28 18:56:17 2012 New Revision: 234768 URL: http://svn.freebsd.org/changeset/base/234768 Log: Although not strictly needed, quieten a compiler warning by a user. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Sat Apr 28 18:46:48 2012 (r234767) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Sat Apr 28 18:56:17 2012 (r234768) @@ -815,7 +815,7 @@ ar5416AniGetListenTime(struct ath_hal *a { struct ath_hal_5212 *ahp = AH5212(ah); struct ar5212AniState *aniState = NULL; - int32_t listenTime; + int32_t listenTime = 0; int good; HAL_SURVEY_SAMPLE hs; HAL_CHANNEL_SURVEY *cs = AH_NULL; From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 18:57:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AEC9106566B; Sat, 28 Apr 2012 18:57:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D7098FC14; Sat, 28 Apr 2012 18:57:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SIvSKV075826; Sat, 28 Apr 2012 18:57:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SIvSFQ075823; Sat, 28 Apr 2012 18:57:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204281857.q3SIvSFQ075823@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 28 Apr 2012 18:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234769 - head/lib/libc/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 18:57:28 -0000 Author: kib Date: Sat Apr 28 18:57:27 2012 New Revision: 234769 URL: http://svn.freebsd.org/changeset/base/234769 Log: Fix several memory and lock leaks on the out of memory condition. Reported by: Matt Miller MFC after: 1 week Modified: head/lib/libc/rpc/svc.c head/lib/libc/rpc/svc_raw.c Modified: head/lib/libc/rpc/svc.c ============================================================================== --- head/lib/libc/rpc/svc.c Sat Apr 28 18:56:17 2012 (r234768) +++ head/lib/libc/rpc/svc.c Sat Apr 28 18:57:27 2012 (r234769) @@ -108,8 +108,10 @@ xprt_register(xprt) if (__svc_xports == NULL) { __svc_xports = (SVCXPRT **) mem_alloc(FD_SETSIZE * sizeof(SVCXPRT *)); - if (__svc_xports == NULL) + if (__svc_xports == NULL) { + rwlock_unlock(&svc_fd_lock); return; + } memset(__svc_xports, '\0', FD_SETSIZE * sizeof(SVCXPRT *)); } if (sock < FD_SETSIZE) { @@ -565,8 +567,14 @@ svc_xprt_alloc() SVCXPRT_EXT *ext; xprt = mem_alloc(sizeof(SVCXPRT)); + if (xprt == NULL) + return (NULL); memset(xprt, 0, sizeof(SVCXPRT)); ext = mem_alloc(sizeof(SVCXPRT_EXT)); + if (ext == NULL) { + mem_free(xprt, sizeof(SVCXPRT)); + return (NULL); + } memset(ext, 0, sizeof(SVCXPRT_EXT)); xprt->xp_p3 = ext; ext->xp_auth.svc_ah_ops = &svc_auth_null_ops; Modified: head/lib/libc/rpc/svc_raw.c ============================================================================== --- head/lib/libc/rpc/svc_raw.c Sat Apr 28 18:56:17 2012 (r234768) +++ head/lib/libc/rpc/svc_raw.c Sat Apr 28 18:57:27 2012 (r234769) @@ -96,10 +96,22 @@ svc_raw_create() mutex_unlock(&svcraw_lock); return (NULL); } - if (__rpc_rawcombuf == NULL) + if (__rpc_rawcombuf == NULL) { __rpc_rawcombuf = calloc(UDPMSGSIZE, sizeof (char)); + if (__rpc_rawcombuf == NULL) { + free(srp); + mutex_unlock(&svcraw_lock); + return (NULL); + } + } srp->raw_buf = __rpc_rawcombuf; /* Share it with the client */ srp->server = svc_xprt_alloc(); + if (srp->server == NULL) { + free(__rpc_rawcombuf); + free(srp); + mutex_unlock(&svcraw_lock); + return (NULL); + } svc_raw_private = srp; } srp->server->xp_fd = FD_SETSIZE; From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 20:23:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9EFE3106564A; Sat, 28 Apr 2012 20:23:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A7F78FC15; Sat, 28 Apr 2012 20:23:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SKNEZk078938; Sat, 28 Apr 2012 20:23:14 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SKNEFQ078936; Sat, 28 Apr 2012 20:23:14 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201204282023.q3SKNEFQ078936@svn.freebsd.org> From: Glen Barber Date: Sat, 28 Apr 2012 20:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234770 - head/sbin/geom/class/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 20:23:14 -0000 Author: gjb (doc committer) Date: Sat Apr 28 20:23:13 2012 New Revision: 234770 URL: http://svn.freebsd.org/changeset/base/234770 Log: As of r226840, GELI starts one thread per CPU. PR: 167382 Submitted by: John W. O'Brien (john%saltant.com) X-Needs-MFC: r226840 Modified: head/sbin/geom/class/eli/geli.8 Modified: head/sbin/geom/class/eli/geli.8 ============================================================================== --- head/sbin/geom/class/eli/geli.8 Sat Apr 28 18:57:27 2012 (r234769) +++ head/sbin/geom/class/eli/geli.8 Sat Apr 28 20:23:13 2012 (r234770) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 4, 2012 +.Dd April 28, 2012 .Dt GELI 8 .Os .Sh NAME @@ -692,7 +692,6 @@ This variable should be set in Specifies how many kernel threads should be used for doing software cryptography. Its purpose is to increase performance on SMP systems. -If hardware acceleration is available, only one thread will be started. If set to 0, a CPU-pinned thread will be started for every active CPU. .It Va kern.geom.eli.batch : No 0 When set to 1, can speed-up crypto operations by using batching. From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 20:34:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA9B2106567B; Sat, 28 Apr 2012 20:34:15 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C2FE8FC14; Sat, 28 Apr 2012 20:34:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SKYFF9079364; Sat, 28 Apr 2012 20:34:15 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SKYFiu079362; Sat, 28 Apr 2012 20:34:15 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201204282034.q3SKYFiu079362@svn.freebsd.org> From: Alan Cox Date: Sat, 28 Apr 2012 20:34:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234771 - in stable/9/sys: i386/conf kern vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 20:34:15 -0000 Author: alc Date: Sat Apr 28 20:34:14 2012 New Revision: 234771 URL: http://svn.freebsd.org/changeset/base/234771 Log: MFC r234038 If a page belonging a reservation is cached, then mark the reservation so that it will be freed to the cache pool rather than the default pool. Otherwise, the cached pages within the reservation may be recycled sooner than necessary. Modified: stable/9/sys/vm/vm_reserv.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/vm/vm_reserv.c ============================================================================== --- stable/9/sys/vm/vm_reserv.c Sat Apr 28 20:23:13 2012 (r234770) +++ stable/9/sys/vm/vm_reserv.c Sat Apr 28 20:34:14 2012 (r234771) @@ -464,11 +464,13 @@ vm_reserv_free_page(vm_page_t m) mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); rv = vm_reserv_from_page(m); - if (rv->object != NULL) { - vm_reserv_depopulate(rv); - return (TRUE); - } - return (FALSE); + if (rv->object == NULL) + return (FALSE); + if ((m->flags & PG_CACHED) != 0 && m->pool != VM_FREEPOOL_CACHE) + vm_phys_set_pool(VM_FREEPOOL_CACHE, rv->pages, + VM_LEVEL_0_ORDER); + vm_reserv_depopulate(rv); + return (TRUE); } /* From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 20:52:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13054106564A; Sat, 28 Apr 2012 20:52:21 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EFBF58FC0A; Sat, 28 Apr 2012 20:52:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SKqKjZ079999; Sat, 28 Apr 2012 20:52:20 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SKqKoF079989; Sat, 28 Apr 2012 20:52:20 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201204282052.q3SKqKoF079989@svn.freebsd.org> From: Jeremie Le Hen Date: Sat, 28 Apr 2012 20:52:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234772 - in head: lib lib/libc/stdio lib/libstdbuf usr.bin usr.bin/stdbuf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 20:52:21 -0000 Author: jlh Date: Sat Apr 28 20:52:20 2012 New Revision: 234772 URL: http://svn.freebsd.org/changeset/base/234772 Log: Import stdbuf(1) and the shared library it relies on. This tool changes the default buffering behaviour of standard stdio streams. It only works on dynamic binaries. To make it work for static ones it would require cluttering stdio because there no single entry point. PR: 166660 Reviewed by: current@, jhb Approved by: kib (mentor) MFC after: 1 week Added: head/lib/libstdbuf/ head/lib/libstdbuf/Makefile (contents, props changed) head/lib/libstdbuf/libstdbuf.3 (contents, props changed) head/lib/libstdbuf/stdbuf.c (contents, props changed) head/usr.bin/stdbuf/ head/usr.bin/stdbuf/Makefile (contents, props changed) head/usr.bin/stdbuf/stdbuf.1 (contents, props changed) head/usr.bin/stdbuf/stdbuf.c (contents, props changed) Modified: head/lib/Makefile head/lib/libc/stdio/setbuf.3 head/usr.bin/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Sat Apr 28 20:34:14 2012 (r234771) +++ head/lib/Makefile Sat Apr 28 20:52:20 2012 (r234772) @@ -104,6 +104,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libsmdb} \ ${_libsmutil} \ libstand \ + libstdbuf \ libstdthreads \ ${_libtelnet} \ ${_libthr} \ Modified: head/lib/libc/stdio/setbuf.3 ============================================================================== --- head/lib/libc/stdio/setbuf.3 Sat Apr 28 20:34:14 2012 (r234771) +++ head/lib/libc/stdio/setbuf.3 Sat Apr 28 20:52:20 2012 (r234772) @@ -83,6 +83,9 @@ normally does) it is line buffered. The standard error stream .Dv stderr is always unbuffered. +Note that these defaults maybe be altered using the +.Xr stdbuf 1 +utility. .Pp The .Fn setvbuf @@ -177,6 +180,7 @@ function returns what the equivalent .Fn setvbuf would have returned. .Sh SEE ALSO +.Xr stdbuf 1 , .Xr fclose 3 , .Xr fopen 3 , .Xr fread 3 , Added: head/lib/libstdbuf/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libstdbuf/Makefile Sat Apr 28 20:52:20 2012 (r234772) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +.include + +LIB= stdbuf +SRCS= stdbuf.c +SHLIB_MAJOR= 1 +MAN= libstdbuf.3 + +WARNS?= 6 + +.include Added: head/lib/libstdbuf/libstdbuf.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libstdbuf/libstdbuf.3 Sat Apr 28 20:52:20 2012 (r234772) @@ -0,0 +1,102 @@ +.\" Copyright (c) 2012 Jeremie Le Hen +.\" 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 and documentation 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 April 28, 2012 +.Dt LIBSTDBUF 3 +.Os +.Sh NAME +.Nm libstdbuf +.Nd preloaded library to change standard streams initial buffering +.Sh DESCRIPTION +The +.Nm +library is meant to be preloaded with the +.Ev LD_PRELOAD +environment variable to as to change the initial buffering +of standard input, standard output and standard error streams. +.Pp +Although you may load and configure this library manually, +an utility, +.Xr stdbuf 1 , +can be used to run a command with the appropriate environment variables. +.Sh ENVIRONMENT +Each stream can be configured indepentently through the following +environment variables (values are defined below): +.Bl -tag -width size -offset indent +.It Ev _STDBUF_I +Initial buffering definition for the standard input stream +.It Ev _STDBUF_O +Initial buffering definition for the standard output stream +.It Ev _STDBUF_E +Initial buffering definition for the standard error stream +.El +.Pp +Each variable may take one of the following values: +.Bl -tag -width size -offset indent +.It Qq 0 +unbuffered +.It Qq L +line buffered +.It Qq B +fully buffered with the default buffer size +.It Ar size +fully buffered with a buffer of +.Ar size +bytes (suffixes 'k', 'M' and 'G' are accepted) +.El +.Sh EXAMPLE +In the following example, the stdout stream of the +.Xr awk 1 +command +will be fully buffered by default because it does not refer +to a terminal. +.Nm +is used to force it to be line-buffered so +.Xr vmstat 8 Ns 's +output will not stall until the full buffer fills. +.Bd -literal -offset indent +# vmstat 1 | LD_PRELOAD=/usr/lib/libstdbuf.so \\ + STDBUF_1=L awk '$2 > 1 || $3 > 1' | cat -n +.Ed +.Pp +See also the manpage of +.Xr stdbuf 1 +for a simpler way to do this. +.Sh HISTORY +The +.Nm +library first appeared in +.Fx 8.4 . +.Sh AUTHORS +.An -nosplit +The original idea of the +.Nm +command comes from +.An Padraig Brady +who implemented it in the GNU coreutils. +.An Jeremie Le Hen +implemented it on +.Fx . Added: head/lib/libstdbuf/stdbuf.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libstdbuf/stdbuf.c Sat Apr 28 20:52:20 2012 (r234772) @@ -0,0 +1,115 @@ +/*- + * Copyright (c) 2012 Jeremie Le Hen + * 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 + +static const char * +stream_name(FILE *s) +{ + + if (s == stdin) + return "stdin"; + if (s == stdout) + return "stdout"; + if (s == stderr) + return "stderr"; + /* This should not happen. */ + abort(); +} + +static void +change_buf(FILE *s, const char *bufmode) +{ + char *unit; + size_t bufsize; + int mode; + + bufsize = 0; + if (bufmode[0] == '0' && bufmode[1] == '\0') + mode = _IONBF; + else if (bufmode[0] == 'L' && bufmode[1] == '\0') + mode = _IOLBF; + else if (bufmode[0] == 'B' && bufmode[1] == '\0') { + mode = _IOFBF; + bufsize = 0; + } else { + /* + * This library being preloaded, depending on libutil + * would lead to excessive namespace pollution. + * Thus we do not use expand_number(). + */ + errno = 0; + bufsize = strtol(bufmode, &unit, 0); + if (errno == EINVAL || errno == ERANGE || unit == bufmode) + warn("Wrong buffer mode '%s' for %s", bufmode, + stream_name(s)); + switch (*unit) { + case 'G': + bufsize *= 1024 * 1024 * 1024; + break; + case 'M': + bufsize *= 1024 * 1024; + break; + case 'k': + bufsize *= 1024; + break; + case '\0': + break; + default: + warnx("Unknown suffix '%c' for %s", *unit, + stream_name(s)); + return; + } + mode = _IOFBF; + } + if (setvbuf(s, NULL, mode, bufsize) != 0) + warn("Cannot set buffer mode '%s' for %s", bufmode, + stream_name(s)); +} + +__attribute__ ((constructor)) static void +stdbuf(void) +{ + char *i_mode, *o_mode, *e_mode; + + i_mode = getenv("_STDBUF_I"); + o_mode = getenv("_STDBUF_O"); + e_mode = getenv("_STDBUF_E"); + + if (e_mode != NULL) + change_buf(stderr, e_mode); + if (i_mode != NULL) + change_buf(stdin, i_mode); + if (o_mode != NULL) + change_buf(stdout, o_mode); +} Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Sat Apr 28 20:34:14 2012 (r234771) +++ head/usr.bin/Makefile Sat Apr 28 20:52:20 2012 (r234772) @@ -143,6 +143,7 @@ SUBDIR= alias \ sockstat \ split \ stat \ + stdbuf \ su \ systat \ tabs \ Added: head/usr.bin/stdbuf/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/stdbuf/Makefile Sat Apr 28 20:52:20 2012 (r234772) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +PROG= stdbuf +SRCS= stdbuf.c + +WARNS?= 6 + +.include Added: head/usr.bin/stdbuf/stdbuf.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/stdbuf/stdbuf.1 Sat Apr 28 20:52:20 2012 (r234772) @@ -0,0 +1,116 @@ +.\" Copyright (c) 2012 Jeremie Le Hen +.\" 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 and documentation 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 April 28, 2012 +.Dt STDBUF 1 +.Os +.Sh NAME +.Nm stdbuf +.Nd change standard streams initial buffering +.Sh SYNOPSIS +.Nm +.Op Fl e Ar bufdef +.Op Fl i Ar bufdef +.Op Fl o Ar bufdef +.Op Ar command Op ... +.Sh DESCRIPTION +.Nm +is used to change the initial buffering of standard input, +standard output and/or standard error streams for +.Ar command . +It relies on +.Xr libstdbuf 3 +which is loaded and configured by +.Nm +through environment variables. +.Pp +The options are as follows: +.Bl -tag -width Ds +.It Fl e Ar bufdef +Set initial buffering of the standard error stream for +.Ar command +as defined by +.Ar bufdef +.Pq see Sx BUFFER DEFINITION . +.It Fl i Ar bufdef +Set initial buffering of the standard input stream for +.Ar command +as defined by +.Ar bufdef +.Pq see Sx BUFFER DEFINITION . +.It Fl o Ar bufdef +Set initial buffering of the standard output stream for +.Ar command +as defined by +.Ar bufdef +.Pq see Sx BUFFER DEFINITION . +.El +.Sh BUFFER DEFINITION +Buffer definition is the same as in +.Xr libstdbuf 3 : +.Bl -tag -width size -offset indent +.It Qq 0 +unbuffered +.It Qq L +line buffered +.It Qq B +fully buffered with the default buffer size +.It Ar size +fully buffered with a buffer of +.Ar size +bytes (suffixes 'k', 'M' and 'G' are accepted) +.El +.Sh EXAMPLES +In the following example, the stdout stream of the +.Xr awk 1 +command +will be fully buffered by default because it does not refer +to a terminal. +.Nm +is used to force it to be line-buffered so +.Xr vmstat 8 Ns 's +output will not stall until the full buffer fills. +.Bd -literal -offset indent +# vmstat 1 | stdbuf -o L awk '$2 > 1 || $3 > 1' | cat -n +.Ed +.Sh SEE ALSO +.Xr libstdbuf 3 , +.Xr setvbuf 3 +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 8.4 . +.Sh AUTHORS +.An -nosplit +The original idea of the +.Nm +command comes from +.An Padraig Brady +who implemented it in the GNU coreutils. +.An Jeremie Le Hen +implemented it on +.Fx . Added: head/usr.bin/stdbuf/stdbuf.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/stdbuf/stdbuf.c Sat Apr 28 20:52:20 2012 (r234772) @@ -0,0 +1,104 @@ +/*- + * Copyright (c) 2012 Jeremie Le Hen + * 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 + +#define LIBSTDBUF "/usr/lib/libstdbuf.so" + +extern char *__progname; + +static void +usage(int s) +{ + + fprintf(stderr, "Usage: %s [-e 0|L|] [-i 0|L|] [-o 0|L|] " + " [args ...]\n", __progname); + exit(s); +} + +int +main(int argc, char *argv[]) +{ + char *ibuf, *obuf, *ebuf; + char *preload0, *preload1; + int i; + + ibuf = obuf = ebuf = NULL; + while ((i = getopt(argc, argv, ":e:i:o:")) != -1) { + switch (i) { + case 'e': + ebuf = optarg; + break; + case 'i': + ibuf = optarg; + break; + case 'o': + obuf = optarg; + break; + case ':': + warnx("Missing argument for option -%c", optopt); + usage(1); + break; + case '?': + default: + warnx("Unknown option: %c", optopt); + usage(1); + break; + } + } + argc -= optind; + argv += optind; + if (argc < 2) + usage(0); + + if (ibuf != NULL && setenv("_STDBUF_I", ibuf, 1) == -1) + warn("Failed to set environment variable: %s=%s", + "_STDBUF_I", ibuf); + if (obuf != NULL && setenv("_STDBUF_O", obuf, 1) == -1) + warn("Failed to set environment variable: %s=%s", + "_STDBUF_O", obuf); + if (ebuf != NULL && setenv("_STDBUF_E", ebuf, 1) == -1) + warn("Failed to set environment variable: %s=%s", + "_STDBUF_E", ebuf); + + preload0 = getenv("LD_PRELOAD"); + if (preload0 == NULL) + i = asprintf(&preload1, "LD_PRELOAD=" LIBSTDBUF); + else + i = asprintf(&preload1, "LD_PRELOAD=%s:%s", preload0, + LIBSTDBUF); + + if (i < 0 || putenv(preload1) == -1) + warn("Failed to set environment variable: %s", preload1); + + execvp(argv[0], argv); + err(2, "%s", argv[0]); +} From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 21:50:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1AE3C106566C; Sat, 28 Apr 2012 21:50:31 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 05AF48FC15; Sat, 28 Apr 2012 21:50:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SLoUwa082019; Sat, 28 Apr 2012 21:50:30 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SLoUI3082016; Sat, 28 Apr 2012 21:50:30 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201204282150.q3SLoUI3082016@svn.freebsd.org> From: Jeremie Le Hen Date: Sat, 28 Apr 2012 21:50:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234773 - in head/lib: libc/stdio libstdbuf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 21:50:31 -0000 Author: jlh Date: Sat Apr 28 21:50:30 2012 New Revision: 234773 URL: http://svn.freebsd.org/changeset/base/234773 Log: Fix small documentation mistakes. Submitted by: brueffer Approved by: kib (mentor) Modified: head/lib/libc/stdio/setbuf.3 head/lib/libstdbuf/libstdbuf.3 Modified: head/lib/libc/stdio/setbuf.3 ============================================================================== --- head/lib/libc/stdio/setbuf.3 Sat Apr 28 20:52:20 2012 (r234772) +++ head/lib/libc/stdio/setbuf.3 Sat Apr 28 21:50:30 2012 (r234773) @@ -83,7 +83,7 @@ normally does) it is line buffered. The standard error stream .Dv stderr is always unbuffered. -Note that these defaults maybe be altered using the +Note that these defaults may be altered using the .Xr stdbuf 1 utility. .Pp Modified: head/lib/libstdbuf/libstdbuf.3 ============================================================================== --- head/lib/libstdbuf/libstdbuf.3 Sat Apr 28 20:52:20 2012 (r234772) +++ head/lib/libstdbuf/libstdbuf.3 Sat Apr 28 21:50:30 2012 (r234773) @@ -43,7 +43,7 @@ an utility, .Xr stdbuf 1 , can be used to run a command with the appropriate environment variables. .Sh ENVIRONMENT -Each stream can be configured indepentently through the following +Each stream can be configured independently through the following environment variables (values are defined below): .Bl -tag -width size -offset indent .It Ev _STDBUF_I From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 22:03:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5F18E106566B; Sat, 28 Apr 2012 22:03:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A4A08FC0A; Sat, 28 Apr 2012 22:03:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SM3Kpe082554; Sat, 28 Apr 2012 22:03:20 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SM3KPY082548; Sat, 28 Apr 2012 22:03:20 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204282203.q3SM3KPY082548@svn.freebsd.org> From: Adrian Chadd Date: Sat, 28 Apr 2012 22:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234774 - in head/sys/dev/ath/ath_hal: ar5212 ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 22:03:20 -0000 Author: adrian Date: Sat Apr 28 22:03:19 2012 New Revision: 234774 URL: http://svn.freebsd.org/changeset/base/234774 Log: After thinking about this a bit more, let's not keep statistics per-channel in the HAL. That's very memory hungry (32k just for channel statistics) which would be better served by keeping a summary in the ANI state. Or, later, keep a survey history in net80211. So: * Migrate the ah_chansurvey array to be a single entry, for the current channel. * Change the ioctl interface and ANI code to just reference that. * Clear the ah_chansurvey array during channel reset, both in the AR5212 and AR5416 reset path. Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212.h Sat Apr 28 21:50:30 2012 (r234773) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212.h Sat Apr 28 22:03:19 2012 (r234774) @@ -320,7 +320,7 @@ struct ath_hal_5212 { struct ar5212AniParams ah_aniParams5; /* 5GHz parameters */ struct ar5212AniState *ah_curani; /* cached last reference */ struct ar5212AniState ah_ani[AH_MAXCHAN]; /* per-channel state */ - HAL_CHANNEL_SURVEY ah_chansurvey[AH_MAXCHAN]; /* channel survey */ + HAL_CHANNEL_SURVEY ah_chansurvey; /* channel survey */ /* AR5416 uses some of the AR5212 ANI code; these are the ANI methods */ HAL_BOOL (*ah_aniControl) (struct ath_hal *, HAL_ANI_CMD cmd, int param); Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Sat Apr 28 21:50:30 2012 (r234773) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Sat Apr 28 22:03:19 2012 (r234774) @@ -1092,10 +1092,7 @@ ar5212GetDiagState(struct ath_hal *ah, i } break; case HAL_DIAG_CHANSURVEY: - if (AH_PRIVATE(ah)->ah_curchan == NULL) - return AH_FALSE; - *result = - &ahp->ah_chansurvey[AH_PRIVATE(ah)->ah_curchan->ic_devdata]; + *result = &ahp->ah_chansurvey; *resultsize = sizeof(HAL_CHANNEL_SURVEY); return AH_TRUE; } Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Sat Apr 28 21:50:30 2012 (r234773) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Sat Apr 28 22:03:19 2012 (r234774) @@ -195,6 +195,9 @@ ar5212Reset(struct ath_hal *ah, HAL_OPMO saveFrameSeqCount = OS_REG_READ(ah, AR_D_SEQNUM); } else saveFrameSeqCount = 0; /* NB: silence compiler */ + + /* Blank the channel survey statistics */ + OS_MEMZERO(&ahp->ah_chansurvey, sizeof(ahp->ah_chansurvey)); #if 0 /* * XXX disable for now; this appears to sometimes cause OFDM Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Sat Apr 28 21:50:30 2012 (r234773) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Sat Apr 28 22:03:19 2012 (r234774) @@ -827,10 +827,8 @@ ar5416AniGetListenTime(struct ath_hal *a ath_hal_printf(ah, "%s: ah_curchan = NULL?\n", __func__); return (0); } - /* XXX bounds check? */ - if (AH_PRIVATE(ah)->ah_curchan != AH_NULL) - cs = - &ahp->ah_chansurvey[AH_PRIVATE(ah)->ah_curchan->ic_devdata]; + + cs = &ahp->ah_chansurvey; /* * Fetch the current statistics, squirrel away the current Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sat Apr 28 21:50:30 2012 (r234773) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sat Apr 28 22:03:19 2012 (r234774) @@ -118,6 +118,9 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO } HALASSERT(AH_PRIVATE(ah)->ah_eeversion >= AR_EEPROM_VER14_1); + /* Blank the channel survey statistics */ + OS_MEMZERO(&ahp->ah_chansurvey, sizeof(ahp->ah_chansurvey)); + /* XXX Turn on fast channel change for 5416 */ /* * Preserve the bmiss rssi threshold and count threshold From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 22:48:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 323D6106564A; Sat, 28 Apr 2012 22:48:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D8998FC0C; Sat, 28 Apr 2012 22:48:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SMm0IP084180; Sat, 28 Apr 2012 22:48:00 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SMm0OU084178; Sat, 28 Apr 2012 22:48:00 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201204282248.q3SMm0OU084178@svn.freebsd.org> From: Glen Barber Date: Sat, 28 Apr 2012 22:48:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234775 - head/usr.sbin/cron/crontab X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 22:48:01 -0000 Author: gjb (doc committer) Date: Sat Apr 28 22:48:00 2012 New Revision: 234775 URL: http://svn.freebsd.org/changeset/base/234775 Log: As cron(8) is started with '-s' by default, timezones that observe DST should not need to worry about scheduling jobs when the DST time changes. Rather than removing the BUGS section in crontab(5) regarding this, note that disabling '-s' may still cause jobs to be executed twice or not at all. PR: 166318 Submitted by: Florian k Unglaub (f.unglaub%googlemail!com) MFC After: 1 week Modified: head/usr.sbin/cron/crontab/crontab.5 Modified: head/usr.sbin/cron/crontab/crontab.5 ============================================================================== --- head/usr.sbin/cron/crontab/crontab.5 Sat Apr 28 22:03:19 2012 (r234774) +++ head/usr.sbin/cron/crontab/crontab.5 Sat Apr 28 22:48:00 2012 (r234775) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 28, 2012 +.Dd April 28, 2012 .Dt CRONTAB 5 .Os .Sh NAME @@ -296,10 +296,21 @@ are extensions. .An Paul Vixie Aq paul@vix.com .Sh BUGS If you are in one of the 70-odd countries that observe Daylight -Savings Time, jobs scheduled during the rollback or advance will be -affected. +Savings Time, jobs scheduled during the rollback or advance may be +affected if +.Xr cron 8 +is not started with the +.Fl s +flag. In general, it is not a good idea to schedule jobs during -this period. +this period if +.Xr cron 8 +is not started with the +.Fl s +flag, which is enabled by default. +See +.Xr cron 8 +for more details. .Pp For US timezones (except parts of AZ and HI) the time shift occurs at 2AM local time. From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 23:05:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B83A81065689; Sat, 28 Apr 2012 23:05:08 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A39E88FC08; Sat, 28 Apr 2012 23:05:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SN583C084820; Sat, 28 Apr 2012 23:05:08 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SN58rR084818; Sat, 28 Apr 2012 23:05:08 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201204282305.q3SN58rR084818@svn.freebsd.org> From: Alan Cox Date: Sat, 28 Apr 2012 23:05:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234776 - in stable/8/sys: i386/conf vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 23:05:08 -0000 Author: alc Date: Sat Apr 28 23:05:08 2012 New Revision: 234776 URL: http://svn.freebsd.org/changeset/base/234776 Log: MFC r234038 If a page belonging a reservation is cached, then mark the reservation so that it will be freed to the cache pool rather than the default pool. Otherwise, the cached pages within the reservation may be recycled sooner than necessary. Modified: stable/8/sys/vm/vm_reserv.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/vm/vm_reserv.c ============================================================================== --- stable/8/sys/vm/vm_reserv.c Sat Apr 28 22:48:00 2012 (r234775) +++ stable/8/sys/vm/vm_reserv.c Sat Apr 28 23:05:08 2012 (r234776) @@ -466,11 +466,13 @@ vm_reserv_free_page(vm_page_t m) mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); rv = vm_reserv_from_page(m); - if (rv->object != NULL) { - vm_reserv_depopulate(rv); - return (TRUE); - } - return (FALSE); + if (rv->object == NULL) + return (FALSE); + if ((m->flags & PG_CACHED) != 0 && m->pool != VM_FREEPOOL_CACHE) + vm_phys_set_pool(VM_FREEPOOL_CACHE, rv->pages, + VM_LEVEL_0_ORDER); + vm_reserv_depopulate(rv); + return (TRUE); } /* From owner-svn-src-all@FreeBSD.ORG Sat Apr 28 23:13:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF6B4106566B; Sat, 28 Apr 2012 23:13:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AADBE8FC12; Sat, 28 Apr 2012 23:13:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3SND91W085148; Sat, 28 Apr 2012 23:13:09 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3SND9rU085146; Sat, 28 Apr 2012 23:13:09 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204282313.q3SND9rU085146@svn.freebsd.org> From: Adrian Chadd Date: Sat, 28 Apr 2012 23:13:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234777 - head/tools/tools/ath/athsurvey X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 23:13:09 -0000 Author: adrian Date: Sat Apr 28 23:13:09 2012 New Revision: 234777 URL: http://svn.freebsd.org/changeset/base/234777 Log: Change cc -> bc : "bc" is "busy count", which is the % of time the channel is considered "busy but not doing any active TX or frame RX." Just keep in mind that "frame RX" is "decoding what looks like a wifi signal", not necessarily "frame successfully decoded for this particular device." Modified: head/tools/tools/ath/athsurvey/athsurvey.c Modified: head/tools/tools/ath/athsurvey/athsurvey.c ============================================================================== --- head/tools/tools/ath/athsurvey/athsurvey.c Sat Apr 28 23:05:08 2012 (r234776) +++ head/tools/tools/ath/athsurvey/athsurvey.c Sat Apr 28 23:13:09 2012 (r234777) @@ -201,9 +201,9 @@ main(int argc, char *argv[]) "min " "avg " "max\n"); - printf(" tx%% rx%% cc%% ec%% "); - printf(" tx%% rx%% cc%% ec%% "); - printf(" tx%% rx%% cc%% ec%%\n"); + printf(" tx%% rx%% bc%% ec%% "); + printf(" tx%% rx%% bc%% ec%% "); + printf(" tx%% rx%% bc%% ec%%\n"); } process_survey_stats(&hs); sleep(1);