svn commit: r259247 - head/sys/geom
Author: mav Date: Thu Dec 12 08:23:28 2013 New Revision: 259247 URL: http://svnweb.freebsd.org/changeset/base/259247 Log: Fix bug introduced at r256607. We have to recalculate bp_resid here since sizes of original and completed requests may differ due to end of media. Bisected by: pho Modified: head/sys/geom/geom_dev.c Modified: head/sys/geom/geom_dev.c == --- head/sys/geom/geom_dev.cThu Dec 12 05:49:27 2013(r259246) +++ head/sys/geom/geom_dev.cThu Dec 12 08:23:28 2013(r259247) @@ -487,7 +487,7 @@ g_dev_done(struct bio *bp2) bp = bp2-bio_parent; bp-bio_error = bp2-bio_error; bp-bio_completed = bp2-bio_completed; - bp-bio_resid = bp2-bio_resid; + bp-bio_resid = bp-bio_length - bp2-bio_completed; if (bp2-bio_error != 0) { g_trace(G_T_BIO, g_dev_done(%p) had error %d, bp2, bp2-bio_error); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259248 - head/sys/dev/usb/controller
Author: hselasky Date: Thu Dec 12 08:34:51 2013 New Revision: 259248 URL: http://svnweb.freebsd.org/changeset/base/259248 Log: Set chain bit correctly. This will fix some problems sending and receiving Zero Length Packets, ZLPs. See comment in code for more information. MFC after:1 week Reported by: Kohji Okuno okuno.ko...@jp.panasonic.com Modified: head/sys/dev/usb/controller/xhci.c Modified: head/sys/dev/usb/controller/xhci.c == --- head/sys/dev/usb/controller/xhci.c Thu Dec 12 08:23:28 2013 (r259247) +++ head/sys/dev/usb/controller/xhci.c Thu Dec 12 08:34:51 2013 (r259248) @@ -1892,7 +1892,16 @@ restart: td-td_trb[x].dwTrb2 = htole32(dword); dword = XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_LINK) | - XHCI_TRB_3_CYCLE_BIT | XHCI_TRB_3_IOC_BIT; + XHCI_TRB_3_CYCLE_BIT | XHCI_TRB_3_IOC_BIT | + /* +* CHAIN-BIT: Ensure that a multi-TRB IN-endpoint +* frame only receives a single short packet event +* by setting the CHAIN bit in the LINK field. In +* addition some XHCI controllers have problems +* sending a ZLP unless the CHAIN-BIT is set in +* the LINK TRB. +*/ + XHCI_TRB_3_CHAIN_BIT; td-td_trb[x].dwTrb3 = htole32(dword); @@ -1930,7 +1939,7 @@ restart: } /* clear TD SIZE to zero, hence this is the last TRB */ - /* remove chain bit because this is the last TRB in the chain */ + /* remove chain bit because this is the last data TRB in the chain */ td-td_trb[td-ntrb - 1].dwTrb2 = ~htole32(XHCI_TRB_2_TDSZ_SET(15)); td-td_trb[td-ntrb - 1].dwTrb3 = ~htole32(XHCI_TRB_3_CHAIN_BIT); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259249 - head/usr.bin/dtc
Author: theraven Date: Thu Dec 12 08:48:45 2013 New Revision: 259249 URL: http://svnweb.freebsd.org/changeset/base/259249 Log: Fix the version string in dts emission. Reported by: Patrick Wildt MFC after:1 week Modified: head/usr.bin/dtc/fdt.cc Modified: head/usr.bin/dtc/fdt.cc == --- head/usr.bin/dtc/fdt.cc Thu Dec 12 08:34:51 2013(r259248) +++ head/usr.bin/dtc/fdt.cc Thu Dec 12 08:48:45 2013(r259249) @@ -1181,7 +1181,7 @@ void device_tree::write_dts(int fd) { FILE *file = fdopen(fd, w); - fputs(/dtc-v1/;\n\n, file); + fputs(/dts-v1/;\n\n, file); if (!reservations.empty()) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259250 - head/usr.bin/dtc
Author: theraven Date: Thu Dec 12 08:55:24 2013 New Revision: 259250 URL: http://svnweb.freebsd.org/changeset/base/259250 Log: Some more cleanups and bug fixes in dtc for property printing / parsing. Submitted by: Patrick Wildt Modified: head/usr.bin/dtc/fdt.cc Modified: head/usr.bin/dtc/fdt.cc == --- head/usr.bin/dtc/fdt.cc Thu Dec 12 08:48:45 2013(r259249) +++ head/usr.bin/dtc/fdt.cc Thu Dec 12 08:55:24 2013(r259250) @@ -137,7 +137,7 @@ property_value::resolve_type() break; } } - if (is_all_printable (bytes nuls)) + if ((is_all_printable (bytes nuls)) || bytes == 0) { type = STRING; if (nuls 0) @@ -204,7 +204,7 @@ property_value::write_as_bytes(FILE *fil putc('[', file); for (byte_buffer::iterator i=byte_data.begin(), e=byte_data.end(); i!=e ; i++) { - fprintf(file, %hhx, *i); + fprintf(file, %02hhx, *i); if (i+1 != e) { putc(' ', file); @@ -367,6 +367,11 @@ property::property(input_buffer structs return; } key = string(name_buffer); + + // If we're empty, do not push anything as value. + if (!length) + return; + // Read the value uint8_t byte; property_value v; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259254 - head/sys/fs/devfs
Author: mav Date: Thu Dec 12 11:05:48 2013 New Revision: 259254 URL: http://svnweb.freebsd.org/changeset/base/259254 Log: Fix long known bug with handling device aliases residing not in devfs root. Historically creation of device aliases created symbolic links using only name of target device as a link target, not considering current directory. Fix that by adding number of ../ chunks to the terget device name, required to get out of the current directory to devfs root first. MFC after:1 month Modified: head/sys/fs/devfs/devfs_devs.c Modified: head/sys/fs/devfs/devfs_devs.c == --- head/sys/fs/devfs/devfs_devs.c Thu Dec 12 10:57:16 2013 (r259253) +++ head/sys/fs/devfs/devfs_devs.c Thu Dec 12 11:05:48 2013 (r259254) @@ -486,9 +486,9 @@ devfs_populate_loop(struct devfs_mount * { struct cdev_priv *cdp; struct devfs_dirent *de; - struct devfs_dirent *dd; + struct devfs_dirent *dd, *dt; struct cdev *pdev; - int de_flags, j; + int de_flags, depth, j; char *q, *s; sx_assert(dm-dm_lock, SX_XLOCKED); @@ -589,9 +589,17 @@ devfs_populate_loop(struct devfs_mount * de-de_mode = 0755; de-de_dirent-d_type = DT_LNK; pdev = cdp-cdp_c.si_parent; - j = strlen(pdev-si_name) + 1; + dt = dd; + depth = 0; + while (dt != dm-dm_rootdir + (dt = devfs_parent_dirent(dt)) != NULL) + depth++; + j = depth * 3 + strlen(pdev-si_name) + 1; de-de_symlink = malloc(j, M_DEVFS, M_WAITOK); - bcopy(pdev-si_name, de-de_symlink, j); + de-de_symlink[0] = 0; + while (depth-- 0) + strcat(de-de_symlink, ../); + strcat(de-de_symlink, pdev-si_name); } else { de-de_uid = cdp-cdp_c.si_uid; de-de_gid = cdp-cdp_c.si_gid; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259255 - stable/10/sys/dev/ofw
Author: andreast Date: Thu Dec 12 12:17:20 2013 New Revision: 259255 URL: http://svnweb.freebsd.org/changeset/base/259255 Log: MFC: r256932, r256938, r256953 r256932: Add a new function (OF_getencprop()) that undoes the transformation applied by encode-int. Specifically, it takes a set of 32-bit cell values and changes them to host byte order. Most non-string instances of OF_getprop() should be using this function, which is a no-op on big-endian platforms. r256938: A few other common cases for encode-int decoding: OF_getencprop_alloc() and OF_searchencprop(). I thought about using the element size parameter to OF_getprop_alloc() to do endian-switching automatically, but it breaks use with structs and a *lot* of FDT code (which can hopefully be moved to these new APIs). r256953: Fix build. Modified: stable/10/sys/dev/ofw/openfirm.c stable/10/sys/dev/ofw/openfirm.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ofw/openfirm.c == --- stable/10/sys/dev/ofw/openfirm.cThu Dec 12 11:05:48 2013 (r259254) +++ stable/10/sys/dev/ofw/openfirm.cThu Dec 12 12:17:20 2013 (r259255) @@ -64,6 +64,7 @@ __FBSDID($FreeBSD$); #include sys/kernel.h #include sys/malloc.h #include sys/systm.h +#include sys/endian.h #include machine/stdarg.h @@ -280,6 +281,21 @@ OF_getprop(phandle_t package, const char return (OFW_GETPROP(ofw_obj, package, propname, buf, buflen)); } +ssize_t +OF_getencprop(phandle_t node, const char *propname, pcell_t *buf, size_t len) +{ + ssize_t retval; + int i; + + KASSERT(len % 4 == 0, (Need a multiple of 4 bytes)); + + retval = OF_getprop(node, propname, buf, len); + for (i = 0; i len/4; i++) + buf[i] = be32toh(buf[i]); + + return (retval); +} + /* * Recursively search the node and its parent for the given property, working * downward from the node to the device tree root. Returns the value of the @@ -296,6 +312,17 @@ OF_searchprop(phandle_t node, const char return (-1); } +ssize_t +OF_searchencprop(phandle_t node, const char *propname, void *buf, size_t len) +{ + ssize_t rv; + + for (; node != 0; node = OF_parent(node)) + if ((rv = OF_getencprop(node, propname, buf, len)) != -1) + return (rv); + return (-1); +} + /* * Store the value of a property of a package into newly allocated memory * (using the M_OFWPROP malloc pool and M_WAITOK). elsz is the size of a @@ -320,6 +347,26 @@ OF_getprop_alloc(phandle_t package, cons return (len / elsz); } +ssize_t +OF_getencprop_alloc(phandle_t package, const char *name, int elsz, void **buf) +{ + ssize_t retval; + pcell_t *cell; + int i; + + KASSERT(elsz % 4 == 0, (Need a multiple of 4 bytes)); + + retval = OF_getprop_alloc(package, name, elsz, buf); + if (retval == -1) + return (retval); + + cell = *buf; + for (i = 0; i retval*elsz/4; i++) + cell[i] = be32toh(cell[i]); + + return (retval); +} + /* Get the next property of a package. */ int OF_nextprop(phandle_t package, const char *previous, char *buf, size_t size) Modified: stable/10/sys/dev/ofw/openfirm.h == --- stable/10/sys/dev/ofw/openfirm.hThu Dec 12 11:05:48 2013 (r259254) +++ stable/10/sys/dev/ofw/openfirm.hThu Dec 12 12:17:20 2013 (r259255) @@ -105,11 +105,17 @@ phandle_t OF_parent(phandle_t node); ssize_tOF_getproplen(phandle_t node, const char *propname); ssize_tOF_getprop(phandle_t node, const char *propname, void *buf, size_t len); +ssize_tOF_getencprop(phandle_t node, const char *prop, pcell_t *buf, + size_t len); /* Same as getprop, but maintains endianness */ intOF_hasprop(phandle_t node, const char *propname); ssize_tOF_searchprop(phandle_t node, const char *propname, void *buf, size_t len); +ssize_tOF_searchencprop(phandle_t node, const char *propname, + void *buf, size_t len); ssize_tOF_getprop_alloc(phandle_t node, const char *propname, int elsz, void **buf); +ssize_tOF_getencprop_alloc(phandle_t node, const char *propname, + int elsz, void **buf); intOF_nextprop(phandle_t node, const char *propname, char *buf, size_t len); intOF_setprop(phandle_t node, const char *name, const void *buf, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259256 - stable/10/sys/powerpc/powerpc
Author: andreast Date: Thu Dec 12 12:29:35 2013 New Revision: 259256 URL: http://svnweb.freebsd.org/changeset/base/259256 Log: MFC: r258722, r258757 r258722: Give some output about the CPU clock on IBMPOWER machines, currently read from OF. Linux does it similar, means they also read the OF values and display them. r258757: Use the Open Firmware-based CPU frequency determination as a generic fallback if we can't measure CPU frequency. This is also useful on a variety of embedded systems using FDT. Modified: stable/10/sys/powerpc/powerpc/cpu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/powerpc/cpu.c == --- stable/10/sys/powerpc/powerpc/cpu.c Thu Dec 12 12:17:20 2013 (r259255) +++ stable/10/sys/powerpc/powerpc/cpu.c Thu Dec 12 12:29:35 2013 (r259256) @@ -74,6 +74,8 @@ #include machine/smp.h #include machine/spr.h +#include dev/ofw/openfirm.h + static voidcpu_6xx_setup(int cpuid, uint16_t vers); static voidcpu_970_setup(int cpuid, uint16_t vers); static voidcpu_booke_setup(int cpuid, uint16_t vers); @@ -273,6 +275,9 @@ cpu_est_clockrate(int cpu_id, uint64_t * { uint16_tvers; register_t msr; + phandle_t cpu, dev, root; + int res = 0; + charbuf[8]; vers = mfpvr() 16; msr = mfmsr(); @@ -316,9 +321,40 @@ cpu_est_clockrate(int cpu_id, uint64_t * mtmsr(msr); return (0); + + default: + root = OF_peer(0); + if (root == 0) + return (ENXIO); + + dev = OF_child(root); + while (dev != 0) { + res = OF_getprop(dev, name, buf, sizeof(buf)); + if (res 0 strcmp(buf, cpus) == 0) + break; + dev = OF_peer(dev); + } + cpu = OF_child(dev); + while (cpu != 0) { + res = OF_getprop(cpu, device_type, buf, + sizeof(buf)); + if (res 0 strcmp(buf, cpu) == 0) + break; + cpu = OF_peer(cpu); + } + if (cpu == 0) + return (ENOENT); + if (OF_getprop(cpu, ibm,extended-clock-frequency, + cps, sizeof(*cps)) = 0) { + return (0); + } else if (OF_getprop(cpu, clock-frequency, cps, + sizeof(cell_t)) = 0) { + *cps = 32; + return (0); + } else { + return (ENOENT); + } } - - return (ENXIO); } void ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259257 - in stable/10/sys: conf powerpc/ofw powerpc/pseries
Author: andreast Date: Thu Dec 12 12:36:40 2013 New Revision: 259257 URL: http://svnweb.freebsd.org/changeset/base/259257 Log: MFC: r258051, r258052 r258052: Following the approach with ACPI DMAR on x86, split IOMMU handling into a variant PCI bus instead of trying to shoehorn it into the PCI host bridge adapter. Besides matching better the architecture on other platforms, this also allows systems with multiple partitionable endpoints per PCI host bridge to work correctly. r258051: Actually add IOMMU domain to the list of known mappings. This fixes a bug where multiple devices in the same IOMMU domain would be allocated conflicting mappings unless they also shared a DMA tag. Added: stable/10/sys/powerpc/ofw/ofw_pcibus.h - copied unchanged from r258052, head/sys/powerpc/ofw/ofw_pcibus.h stable/10/sys/powerpc/pseries/plpar_pcibus.c - copied unchanged from r258052, head/sys/powerpc/pseries/plpar_pcibus.c Modified: stable/10/sys/conf/files.powerpc stable/10/sys/powerpc/ofw/ofw_pcibus.c stable/10/sys/powerpc/pseries/plpar_iommu.c stable/10/sys/powerpc/pseries/rtas_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files.powerpc == --- stable/10/sys/conf/files.powerpcThu Dec 12 12:29:35 2013 (r259256) +++ stable/10/sys/conf/files.powerpcThu Dec 12 12:36:40 2013 (r259257) @@ -232,6 +232,7 @@ powerpc/pseries/phyp_llan.c optionallla powerpc/pseries/phyp_vscsi.c optionalpseries powerpc64 scbus powerpc/pseries/platform_chrp.coptionalpseries powerpc/pseries/plpar_iommu.c optionalpseries powerpc64 +powerpc/pseries/plpar_pcibus.c optionalpseries powerpc64 pci powerpc/pseries/rtas_dev.c optionalpseries powerpc/pseries/rtas_pci.c optionalpseries pci powerpc/pseries/vdevice.c optionalpseries powerpc64 Modified: stable/10/sys/powerpc/ofw/ofw_pcibus.c == --- stable/10/sys/powerpc/ofw/ofw_pcibus.c Thu Dec 12 12:29:35 2013 (r259256) +++ stable/10/sys/powerpc/ofw/ofw_pcibus.c Thu Dec 12 12:36:40 2013 (r259257) @@ -50,6 +50,7 @@ __FBSDID($FreeBSD$); #include dev/pci/pcivar.h #include dev/pci/pci_private.h +#include ofw_pcibus.h #include pcib_if.h #include pci_if.h @@ -85,12 +86,7 @@ static device_method_t ofw_pcibus_method DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), - { 0, 0 } -}; - -struct ofw_pcibus_devinfo { - struct pci_devinfo opd_dinfo; - struct ofw_bus_devinfo opd_obdinfo; + DEVMETHOD_END }; static devclass_t pci_devclass; @@ -195,6 +191,7 @@ ofw_pcibus_enum_devtree(device_t dev, u_ pci_freecfg((struct pci_devinfo *)dinfo); continue; } + dinfo-opd_dma_tag = NULL; pci_add_child(dev, (struct pci_devinfo *)dinfo); /* @@ -274,6 +271,7 @@ ofw_pcibus_enum_bus(device_t dev, u_int if (dinfo == NULL) continue; + dinfo-opd_dma_tag = NULL; dinfo-opd_obdinfo.obd_node = -1; dinfo-opd_obdinfo.obd_name = NULL; Copied: stable/10/sys/powerpc/ofw/ofw_pcibus.h (from r258052, head/sys/powerpc/ofw/ofw_pcibus.h) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/powerpc/ofw/ofw_pcibus.h Thu Dec 12 12:36:40 2013 (r259257, copy of r258052, head/sys/powerpc/ofw/ofw_pcibus.h) @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2011 Nathan Whitehorn + * 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
svn commit: r259258 - in stable/10/sys/powerpc: ofw pseries
Author: andreast Date: Thu Dec 12 13:00:07 2013 New Revision: 259258 URL: http://svnweb.freebsd.org/changeset/base/259258 Log: MFC: r258427, r258694 r258694: Make RTAS calls, which call setfault() to recover from machine checks, preserve any existing fault buffer. RTAS calls are meant to be safe from interrupt context (and are indeed used there to implement the xics PIC driver). Without this, calling into RTAS in interrupt context would have the effect of clearing any existing onfault state of the interrupted thread, potentially leading to a panic. r258427: For PCI-PCI bridges, #address-cells may be 3. Allow this when parsing the ibm,dma-window properties. This is especially a concern when #ibm,dma-address-cells is not specified and we have to use the regular #address-cells property. Modified: stable/10/sys/powerpc/ofw/rtas.c stable/10/sys/powerpc/pseries/plpar_iommu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/ofw/rtas.c == --- stable/10/sys/powerpc/ofw/rtas.cThu Dec 12 12:36:40 2013 (r259257) +++ stable/10/sys/powerpc/ofw/rtas.cThu Dec 12 13:00:07 2013 (r259258) @@ -192,7 +192,7 @@ int rtas_call_method(cell_t token, int nargs, int nreturns, ...) { vm_offset_t argsptr; - faultbuf env; + faultbuf env, *oldfaultbuf; va_list ap; struct { cell_t token; @@ -221,6 +221,7 @@ rtas_call_method(cell_t token, int nargs /* Get rid of any stale machine checks that have been waiting. */ __asm __volatile (sync; isync); + oldfaultbuf = curthread-td_pcb-pcb_onfault; if (!setfault(env)) { __asm __volatile (sync); result = rtascall(argsptr, rtas_private_data); @@ -228,7 +229,7 @@ rtas_call_method(cell_t token, int nargs } else { result = RTAS_HW_ERROR; } - curthread-td_pcb-pcb_onfault = 0; + curthread-td_pcb-pcb_onfault = oldfaultbuf; __asm __volatile (sync); rtas_real_unmap(argsptr, args, sizeof(args)); Modified: stable/10/sys/powerpc/pseries/plpar_iommu.c == --- stable/10/sys/powerpc/pseries/plpar_iommu.c Thu Dec 12 12:36:40 2013 (r259257) +++ stable/10/sys/powerpc/pseries/plpar_iommu.c Thu Dec 12 13:00:07 2013 (r259258) @@ -73,8 +73,9 @@ phyp_iommu_set_dma_tag(device_t dev, dev { device_t p; phandle_t node; - cell_t dma_acells, dma_scells, dmawindow[5]; + cell_t dma_acells, dma_scells, dmawindow[6]; struct iommu_map *i; + int cell; for (p = child; p != NULL; p = device_get_parent(p)) { if (ofw_bus_has_prop(p, ibm,my-dma-window)) @@ -104,16 +105,17 @@ phyp_iommu_set_dma_tag(device_t dev, dev struct dma_window *window = malloc(sizeof(struct dma_window), M_PHYPIOMMU, M_WAITOK); - if (dma_acells == 1) - window-start = dmawindow[1]; - else - window-start = ((uint64_t)(dmawindow[1]) 32) | dmawindow[2]; - if (dma_scells == 1) - window-end = window-start + dmawindow[dma_acells + 1]; - else - window-end = window-start + - (((uint64_t)(dmawindow[dma_acells + 1]) 32) | - dmawindow[dma_acells + 2]); + window-start = 0; + for (cell = 1; cell 1 + dma_acells; cell++) { + window-start = 32; + window-start |= dmawindow[cell]; + } + window-end = 0; + for (; cell 1 + dma_acells + dma_scells; cell++) { + window-end = 32; + window-end |= dmawindow[cell]; + } + window-end += window-start; if (bootverbose) device_printf(dev, Mapping IOMMU domain %#x\n, dmawindow[0]); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259261 - head/sys/dev/drm2
Author: ray Date: Thu Dec 12 14:49:26 2013 New Revision: 259261 URL: http://svnweb.freebsd.org/changeset/base/259261 Log: Do not try to probe/attach if attempt to add fbd child are failed. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/drm2/drm_fb_helper.c Modified: head/sys/dev/drm2/drm_fb_helper.c == --- head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:37:25 2013 (r259260) +++ head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:49:26 2013 (r259261) @@ -1043,7 +1043,10 @@ int drm_fb_helper_single_fb_probe(struct kdev = fb_helper-dev-device; fbd = device_add_child(kdev, fbd, device_get_unit(kdev)); - ret = device_probe_and_attach(fbd); + if (fbd != NULL) + ret = device_probe_and_attach(fbd); + else + ret = ENODEV; #ifdef DEV_VT if (ret != 0) DRM_ERROR(Failed to attach fbd device: %d\n, ret); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259262 - in stable/9/usr.bin/m4: . TEST lib
Author: tijl Date: Thu Dec 12 15:04:59 2013 New Revision: 259262 URL: http://svnweb.freebsd.org/changeset/base/259262 Log: MFC r226422, r227241, r228063, r228697, r228698, r228701, r234310, r234850, r250226, r250926. This brings m4 up to date with the version in head and fixes the eval command when called with a 2nd and 3rd argument. The only differences remaining are related to the updated flex and byacc in head. PR: bin/166994 Added: stable/9/usr.bin/m4/lib/ - copied from r228063, head/usr.bin/m4/lib/ stable/9/usr.bin/m4/parser.y - copied, changed from r228697, head/usr.bin/m4/parser.y stable/9/usr.bin/m4/tokenizer.l - copied, changed from r228697, head/usr.bin/m4/tokenizer.l Modified: stable/9/usr.bin/m4/Makefile stable/9/usr.bin/m4/TEST/ack.m4 stable/9/usr.bin/m4/TEST/hanoi.m4 stable/9/usr.bin/m4/TEST/hash.m4 stable/9/usr.bin/m4/TEST/sqroot.m4 stable/9/usr.bin/m4/TEST/string.m4 stable/9/usr.bin/m4/TEST/test.m4 stable/9/usr.bin/m4/eval.c stable/9/usr.bin/m4/expr.c stable/9/usr.bin/m4/extern.h stable/9/usr.bin/m4/gnum4.c stable/9/usr.bin/m4/look.c stable/9/usr.bin/m4/m4.1 stable/9/usr.bin/m4/main.c stable/9/usr.bin/m4/mdef.h stable/9/usr.bin/m4/misc.c stable/9/usr.bin/m4/pathnames.h stable/9/usr.bin/m4/stdd.h stable/9/usr.bin/m4/trace.c Directory Properties: stable/9/usr.bin/m4/ (props changed) Modified: stable/9/usr.bin/m4/Makefile == --- stable/9/usr.bin/m4/MakefileThu Dec 12 14:49:26 2013 (r259261) +++ stable/9/usr.bin/m4/MakefileThu Dec 12 15:04:59 2013 (r259262) @@ -5,10 +5,21 @@ # if you want the paste spaste macros. PROG= m4 -CFLAGS+=-DEXTENDED +CFLAGS+=-DEXTENDED -I${.CURDIR}/lib +DPADD= ${LIBY} ${LIBL} ${LIBM} +LDADD= -ly -ll -lm +# clang needs 1 while with gcc we can use 2 +#WARNS=1 -SRCS= eval.c expr.c look.c main.c misc.c gnum4.c trace.c +SRCS= eval.c expr.c look.c main.c misc.c gnum4.c trace.c parser.y tokenizer.l +.PATH: ${.CURDIR}/lib +SRCS+= ohash_create_entry.c ohash_delete.c ohash_do.c ohash_entries.c \ + ohash_enum.c ohash_init.c ohash_int.h ohash_interval.c \ + ohash_lookup_interval.c ohash_lookup_memory.c ohash_qlookup.c \ + ohash_qlookupi.c -WARNS?=0 +tokenizer.o: parser.h + +CLEANFILES+= parser.c parser.h tokenizer.o .include bsd.prog.mk Modified: stable/9/usr.bin/m4/TEST/ack.m4 == --- stable/9/usr.bin/m4/TEST/ack.m4 Thu Dec 12 14:49:26 2013 (r259261) +++ stable/9/usr.bin/m4/TEST/ack.m4 Thu Dec 12 15:04:59 2013 (r259262) @@ -1,4 +1,4 @@ -# $OpenBSD: ack.m4,v 1.2 1996/06/26 05:36:18 deraadt Exp $ +# $OpenBSD: ack.m4,v 1.3 2003/06/03 02:56:11 millert Exp $ # $NetBSD: ack.m4,v 1.4 1995/09/28 05:37:54 tls Exp $ # # Copyright (c) 1989, 1993 @@ -15,7 +15,7 @@ # 2. Redistributions in binary form must reproduce the above copyright #notice, this list of conditions and the following disclaimer in the #documentation and/or other materials provided with the distribution. -# 4. Neither the name of the University nor the names of its contributors +# 3. Neither the name of the University nor the names of its contributors #may be used to endorse or promote products derived from this software #without specific prior written permission. # Modified: stable/9/usr.bin/m4/TEST/hanoi.m4 == --- stable/9/usr.bin/m4/TEST/hanoi.m4 Thu Dec 12 14:49:26 2013 (r259261) +++ stable/9/usr.bin/m4/TEST/hanoi.m4 Thu Dec 12 15:04:59 2013 (r259262) @@ -1,4 +1,4 @@ -# $OpenBSD: hanoi.m4,v 1.2 1996/06/26 05:36:19 deraadt Exp $ +# $OpenBSD: hanoi.m4,v 1.3 2003/06/03 02:56:11 millert Exp $ # $NetBSD: hanoi.m4,v 1.4 1995/09/28 05:37:56 tls Exp $ # # Copyright (c) 1989, 1993 @@ -15,7 +15,7 @@ # 2. Redistributions in binary form must reproduce the above copyright #notice, this list of conditions and the following disclaimer in the #documentation and/or other materials provided with the distribution. -# 4. Neither the name of the University nor the names of its contributors +# 3. Neither the name of the University nor the names of its contributors #may be used to endorse or promote products derived from this software #without specific prior written permission. # Modified: stable/9/usr.bin/m4/TEST/hash.m4 == --- stable/9/usr.bin/m4/TEST/hash.m4Thu Dec 12 14:49:26 2013 (r259261) +++ stable/9/usr.bin/m4/TEST/hash.m4Thu Dec 12 15:04:59 2013 (r259262) @@ -1,4 +1,4 @@ -# $OpenBSD: hash.m4,v 1.2 1996/06/26 05:36:19 deraadt Exp $ +# $OpenBSD: hash.m4,v 1.3 2003/06/03 02:56:11 millert Exp $ #
svn commit: r259263 - in stable/8/contrib/libstdc++: include/debug include/ext libsupc++ src
Author: pfg Date: Thu Dec 12 16:18:45 2013 New Revision: 259263 URL: http://svnweb.freebsd.org/changeset/base/259263 Log: MFC r241959: Fix a number of other clang warnings in libstdc++, which could appear when building other C++ software with it. Also fix one actual bug in libsupc++, which was exposed by such a warning. This latter fix is the only functional change. This is required for newer versions of gcc and clang which have stricter warnings about parenthesis in C++ programs. Modified: stable/8/contrib/libstdc++/include/debug/safe_iterator.tcc stable/8/contrib/libstdc++/include/ext/ropeimpl.h stable/8/contrib/libstdc++/libsupc++/tinfo.cc stable/8/contrib/libstdc++/src/locale.cc stable/8/contrib/libstdc++/src/strstream.cc stable/8/contrib/libstdc++/src/tree.cc Directory Properties: stable/8/ (props changed) stable/8/contrib/ (props changed) stable/8/contrib/libstdc++/ (props changed) Modified: stable/8/contrib/libstdc++/include/debug/safe_iterator.tcc == --- stable/8/contrib/libstdc++/include/debug/safe_iterator.tcc Thu Dec 12 15:04:59 2013(r259262) +++ stable/8/contrib/libstdc++/include/debug/safe_iterator.tcc Thu Dec 12 16:18:45 2013(r259263) @@ -54,8 +54,8 @@ namespace __gnu_debug static_castconst _Sequence*(_M_sequence)-begin(); std::pairdifference_type, _Distance_precision __dist = this-_M_get_distance(__begin, *this); - bool __ok = (__dist.second == __dp_exact __dist.first = -__n - || __dist.second != __dp_exact __dist.first 0); + bool __ok = ((__dist.second == __dp_exact __dist.first = -__n) + || (__dist.second != __dp_exact __dist.first 0)); return __ok; } else @@ -64,8 +64,8 @@ namespace __gnu_debug static_castconst _Sequence*(_M_sequence)-end(); std::pairdifference_type, _Distance_precision __dist = this-_M_get_distance(*this, __end); - bool __ok = (__dist.second == __dp_exact __dist.first = __n - || __dist.second != __dp_exact __dist.first 0); + bool __ok = ((__dist.second == __dp_exact __dist.first = __n) + || (__dist.second != __dp_exact __dist.first 0)); return __ok; } } Modified: stable/8/contrib/libstdc++/include/ext/ropeimpl.h == --- stable/8/contrib/libstdc++/include/ext/ropeimpl.h Thu Dec 12 15:04:59 2013(r259262) +++ stable/8/contrib/libstdc++/include/ext/ropeimpl.h Thu Dec 12 16:18:45 2013(r259263) @@ -1143,7 +1143,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } else { - char* __kind; + const char* __kind; switch (__r-_M_tag) { Modified: stable/8/contrib/libstdc++/libsupc++/tinfo.cc == --- stable/8/contrib/libstdc++/libsupc++/tinfo.cc Thu Dec 12 15:04:59 2013(r259262) +++ stable/8/contrib/libstdc++/libsupc++/tinfo.cc Thu Dec 12 16:18:45 2013(r259263) @@ -499,9 +499,9 @@ __do_dyncast (ptrdiff_t src2dst, result.whole2dst = __sub_kind (result.whole2dst | result2.whole2dst); } - else if ((result.dst_ptr != 0 result2.dst_ptr != 0) - || (result.dst_ptr != 0 result2_ambig) - || (result2.dst_ptr != 0 result_ambig)) + else if ((result.dst_ptr != 0 result2.dst_ptr != 0) + || (result.dst_ptr != 0 result2_ambig) + || (result2.dst_ptr != 0 result_ambig)) { // Found two different DST_TYPE bases, or a valid one and a set of // ambiguous ones, must disambiguate. See whether SRC_PTR is Modified: stable/8/contrib/libstdc++/src/locale.cc == --- stable/8/contrib/libstdc++/src/locale.ccThu Dec 12 15:04:59 2013 (r259262) +++ stable/8/contrib/libstdc++/src/locale.ccThu Dec 12 16:18:45 2013 (r259263) @@ -146,7 +146,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) locale::_S_normalize_category(category __cat) { int __ret = 0; -if (__cat == none || (__cat all) !(__cat ~all)) +if (__cat == none || ((__cat all) !(__cat ~all))) __ret = __cat; else { Modified: stable/8/contrib/libstdc++/src/strstream.cc == --- stable/8/contrib/libstdc++/src/strstream.cc Thu Dec 12 15:04:59 2013 (r259262) +++ stable/8/contrib/libstdc++/src/strstream.cc Thu Dec 12 16:18:45 2013 (r259263) @@ -311,10 +311,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) strstreambuf::_M_free(char* p) { if (p) - if (_M_free_fun) -
svn commit: r259265 - head/sys/mips/beri
Author: bz Date: Thu Dec 12 17:48:33 2013 New Revision: 259265 URL: http://svnweb.freebsd.org/changeset/base/259265 Log: Use correct value pointing to previously selected FDT DTB. Reviewed by: brooks Sponsored by: DARPA, AFRL MFC after:1 week Modified: head/sys/mips/beri/beri_machdep.c Modified: head/sys/mips/beri/beri_machdep.c == --- head/sys/mips/beri/beri_machdep.c Thu Dec 12 16:58:45 2013 (r259264) +++ head/sys/mips/beri/beri_machdep.c Thu Dec 12 17:48:33 2013 (r259265) @@ -178,7 +178,7 @@ platform_start(__register_t a0, __regist if (OF_install(OFW_FDT, 0) == FALSE) while (1); - if (OF_init(fdt_static_dtb) != 0) + if (OF_init((void *)dtbp) != 0) while (1); #endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259266 - head/usr.sbin/pkg
Author: bdrewery (ports committer) Date: Thu Dec 12 17:59:09 2013 New Revision: 259266 URL: http://svnweb.freebsd.org/changeset/base/259266 Log: Fix multi-repository support by properly respecting 'enabled' flag. This will read the REPOS_DIR env/config setting (default is /etc/pkg and /usr/local/etc/pkg/repos) and use the last enabled repository. This can be changed in the environment using a comma-separated list, or in /usr/local/etc/pkg.conf with JSON array syntax of: REPOS_DIR: [/etc/pkg, /usr/local/etc/pkg/repos] Approved by: bapt MFC after:1 week Modified: head/usr.sbin/pkg/config.c head/usr.sbin/pkg/config.h head/usr.sbin/pkg/pkg.7 Modified: head/usr.sbin/pkg/config.c == --- head/usr.sbin/pkg/config.c Thu Dec 12 17:48:33 2013(r259265) +++ head/usr.sbin/pkg/config.c Thu Dec 12 17:59:09 2013(r259266) @@ -32,8 +32,10 @@ __FBSDID($FreeBSD$); #include sys/sbuf.h #include sys/elf_common.h #include sys/endian.h +#include sys/types.h #include assert.h +#include dirent.h #include yaml.h #include ctype.h #include err.h @@ -51,11 +53,17 @@ __FBSDID($FreeBSD$); #define roundup2(x, y) (((x)+((y)-1))(~((y)-1))) /* if y is powers of two */ +struct config_value { + char *value; + STAILQ_ENTRY(config_value) next; +}; + struct config_entry { uint8_t type; const char *key; const char *val; char *value; + STAILQ_HEAD(, config_value) *list; bool envset; }; @@ -65,6 +73,7 @@ static struct config_entry c[] = { PACKAGESITE, URL_SCHEME_PREFIX http://pkg.FreeBSD.org/${ABI}/latest;, NULL, + NULL, false, }, [ABI] = { @@ -72,6 +81,7 @@ static struct config_entry c[] = { ABI, NULL, NULL, + NULL, false, }, [MIRROR_TYPE] = { @@ -79,6 +89,7 @@ static struct config_entry c[] = { MIRROR_TYPE, SRV, NULL, + NULL, false, }, [ASSUME_ALWAYS_YES] = { @@ -86,6 +97,7 @@ static struct config_entry c[] = { ASSUME_ALWAYS_YES, NO, NULL, + NULL, false, }, [SIGNATURE_TYPE] = { @@ -93,6 +105,7 @@ static struct config_entry c[] = { SIGNATURE_TYPE, NULL, NULL, + NULL, false, }, [FINGERPRINTS] = { @@ -100,6 +113,15 @@ static struct config_entry c[] = { FINGERPRINTS, NULL, NULL, + NULL, + false, + }, + [REPOS_DIR] = { + PKG_CONFIG_LIST, + REPOS_DIR, + NULL, + NULL, + NULL, false, }, }; @@ -474,17 +496,34 @@ subst_packagesite(const char *abi) c[PACKAGESITE].value = strdup(sbuf_data(newval)); } +static int +boolstr_to_bool(const char *str) +{ + if (str != NULL (strcasecmp(str, true) == 0 || + strcasecmp(str, yes) == 0 || strcasecmp(str, on) == 0 || + str[0] == '1')) + return (true); + + return (false); +} + static void config_parse(yaml_document_t *doc, yaml_node_t *node, pkg_conf_file_t conftype) { + yaml_node_item_t *item; yaml_node_pair_t *pair; - yaml_node_t *key, *val; + yaml_node_t *key, *val, *item_val; struct sbuf *buf = sbuf_new_auto(); + struct config_entry *temp_config; + struct config_value *cv; int i; size_t j; pair = node-data.mapping.pairs.start; + /* Temporary config for configs that may be disabled. */ + temp_config = calloc(CONFIG_SIZE, sizeof(struct config_entry)); + while (pair node-data.mapping.pairs.top) { key = yaml_document_get_node(doc, pair-key); val = yaml_document_get_node(doc, pair-value); @@ -530,7 +569,12 @@ config_parse(yaml_document_t *doc, yaml_ else if (strcasecmp(key-data.scalar.value, fingerprints) == 0) sbuf_cpy(buf, FINGERPRINTS); - else { /* Skip unknown entries for future use. */ + else if (strcasecmp(key-data.scalar.value, + enabled) == 0) { + /* Skip disabled repos. */ + if (!boolstr_to_bool(val-data.scalar.value)) + goto cleanup; + } else { /* Skip unknown entries for future use. */ ++pair; continue; } @@ -554,10 +598,58
svn commit: r259267 - in head/sys: boot/fdt/dts mips/conf
Author: bz Date: Thu Dec 12 18:08:31 2013 New Revision: 259267 URL: http://svnweb.freebsd.org/changeset/base/259267 Log: Add an FDT DTS and MDROOT kernel configuration for BERI on NetFPGA. At this point we only support one CPU, the PIC, and a UART console. Reviewed by: brooks Sponsored by: DARPA, AFRL MFC after:5 days Added: head/sys/boot/fdt/dts/beri-netfpga.dts (contents, props changed) head/sys/mips/conf/BERI_NETFPGA_MDROOT (contents, props changed) Added: head/sys/boot/fdt/dts/beri-netfpga.dts == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/beri-netfpga.dts Thu Dec 12 18:08:31 2013 (r259267) @@ -0,0 +1,135 @@ +/*- + * Copyright (c) 2012-2013 Robert N. M. Watson + * Copyright (c) 2013 SRI International + * Copyright (c) 2013 Bjoern A. Zeeb + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * (CTSRD), as part of the DARPA CRASH research programme. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-11-C-0249) + * (MRC2), as part of the DARPA MRC research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/dts-v1/; + +/* + * Device names here have been largely made up on the spot, especially for the + * compatible strings, and might want to be revised. + */ + +/ { + model = SRI/Cambridge Beri (NetFPGA); + compatible = sri-cambridge,beri-netfpga; + #address-cells = 1; + #size-cells = 1; + + cpus { + #address-cells = 1; + #size-cells = 1; + + /* +* Secondary CPUs all start disabled and use the +* spin-table enable method. cpu-release-addr must be +* specified for each cpu other than cpu@0. Values of +* cpu-release-addr grow down from 0x10 (kernel). +*/ + status = disabled; + enable-method = spin-table; + + cpu@0 { + device-type = cpu; + compatible = sri-cambridge,beri; + + reg = 0; + status = okay; + }; + +/* + cpu@1 { + device-type = cpu; + compatible = sri-cambridge,beri; + + reg = 1; + // XXX: should we need cached prefix? + cpu-release-addr = 0x 0x800fffe0; + }; +*/ + }; + + soc { + #address-cells = 1; + #size-cells = 1; + #interrupt-cells = 1; + + /* +* Declare mips,mips4k since BERI doesn't (yet) have a PIC, so +* we use mips4k coprocessor 0 interrupt management directly. +*/ + compatible = simple-bus, mips,mips4k; + ranges = ; + + memory { + device_type = memory; + reg = 0x0 0x0FFF; // ~256M at 0x0 + }; + + beripic: beripic@7f804000 { + compatible = sri-cambridge,beri-pic; + interrupt-controller; + #address-cells = 0; + #interrupt-cells = 1; + reg = 0x7f804000 0x400 + 0x7f806000 0x10 + 0x7f806080
svn commit: r259268 - in stable/10/contrib: gcc gcc/config/rs6000 gcc/cp gcc/doc gcclibs/libcpp
Author: pfg Date: Thu Dec 12 18:15:32 2013 New Revision: 259268 URL: http://svnweb.freebsd.org/changeset/base/259268 Log: MFC r258081, r258138, r258143, r258179, r258157, r258204, 258205, r258206, r258207, r258321 This is a series of commits inspired on Google's gcc-4.2.1 for Android that were taken from the gcc pre-4.3 under the GPLv2. gcc: Backport fixes for -W parentheses in C++ This fixes GCC 19564. gcc: merge rs6000 change from FSF pre-gcc43 Don't set MASK_PPC_GFXOPT for 8540 or 8548. Merge vrp-tree fix from gcc-4.3 Fix missed conversion from / to (GCC PR32521) Merge in GCCr120505 to include definition of TREE_OVERFLOW_P gcc: warn about integer overflow in constant expressions in the C++ frontend. gcc: Add a new option -Wvla to warn variable length array. libcpp: preprocessor speedup patches from upstream gcc. gcc: add femit-struct-debug support to reduce Reduce dwarf debug size gcc: Fix postreload-gcse treatment of call-clobbered registers. gcc: Record some previous commits in the ChangeLog.gcc43 file. Modified: stable/10/contrib/gcc/ChangeLog.gcc43 stable/10/contrib/gcc/c-common.c stable/10/contrib/gcc/c-common.h stable/10/contrib/gcc/c-decl.c stable/10/contrib/gcc/c-opts.c stable/10/contrib/gcc/c-typeck.c stable/10/contrib/gcc/c.opt stable/10/contrib/gcc/config/rs6000/rs6000.c stable/10/contrib/gcc/cp/cp-lang.c stable/10/contrib/gcc/cp/cp-tree.h stable/10/contrib/gcc/cp/decl.c stable/10/contrib/gcc/cp/parser.c stable/10/contrib/gcc/cp/pt.c stable/10/contrib/gcc/cp/semantics.c stable/10/contrib/gcc/cp/tree.c stable/10/contrib/gcc/cp/typeck.c stable/10/contrib/gcc/doc/invoke.texi stable/10/contrib/gcc/dwarf2out.c stable/10/contrib/gcc/flags.h stable/10/contrib/gcc/langhooks-def.h stable/10/contrib/gcc/langhooks.h stable/10/contrib/gcc/opts.c stable/10/contrib/gcc/postreload-gcse.c stable/10/contrib/gcc/regs.h stable/10/contrib/gcc/rtlanal.c stable/10/contrib/gcc/tree-vrp.c stable/10/contrib/gcc/tree.h stable/10/contrib/gcclibs/libcpp/files.c stable/10/contrib/gcclibs/libcpp/internal.h stable/10/contrib/gcclibs/libcpp/lex.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/gcc/ChangeLog.gcc43 == --- stable/10/contrib/gcc/ChangeLog.gcc43 Thu Dec 12 18:08:31 2013 (r259267) +++ stable/10/contrib/gcc/ChangeLog.gcc43 Thu Dec 12 18:15:32 2013 (r259268) @@ -1,9 +1,35 @@ -2007-06-05 Joerg Wunsch j@uriah.heep.sax.de (r23479) +2007-08-08 Andrew Haley a...@redhat.com (r128087) + + * config/arm/libunwind.S (UNWIND_WRAPPER _Unwind_Backtrace): New. + * config/arm/unwind-arm.h (__gnu_Unwind_Backtrace): New. + * config/arm/unwind-arm.c (__gnu_Unwind_Backtrace): New. + +2007-06-05 Joerg Wunsch j@uriah.heep.sax.de (r125346) PR preprocessor/23479 * doc/extend.texi: Document the 0b-prefixed binary integer constant extension. +2007-05-24 Richard Sandiford rsand...@nildram.co.uk (r125037) + + * postreload-gcse.c (reg_changed_after_insn_p): New function. + (oprs_unchanged_p): Use it to check all registers in a REG. + (record_opr_changes): Look for clobbers in CALL_INSN_FUNCTION_USAGE. + (reg_set_between_after_reload_p): Delete. + (reg_used_between_after_reload_p): Likewise. + (reg_set_or_used_since_bb_start): Likewise. + (eliminate_partially_redundant_load): Use reg_changed_after_insn_p + and reg_used_between_p instead of reg_set_or_used_since_bb_start. + Use reg_set_between_p instead of reg_set_between_after_reload_p. + * rtlanal.c (reg_set_p): Check whether REG overlaps + regs_invalidated_by_call, rather than just checking the + membership of REGNO (REG). + +2007-05-03 Ian Lance Taylor i...@google.com (r124381) + + * config/rs6000/rs6000.c (rs6000_override_options): Don't set + MASK_PPC_GFXOPT for 8540 or 8548. + 2007-05-01 Dwarakanath Rajagopal dwarak.rajago...@amd.com (r124341) * doc/invoke.texi: Fix typo, 'AMD Family 10h core' instead of @@ -22,6 +48,57 @@ alignment for amdfam10 architecture. Increasing the max loop alignment to 24 bytes. +2007-04-16 Lawrence Crowl cr...@google.com + + * doc/invoke.texi (Debugging Options): Add documentation for the + -femit-struct-debug options -femit-struct-debug-baseonly, + -femit-struct-debug-reduced, and + -femit-struct-debug-detailed[=...]. + + * c-opts.c (c_common_handle_option): Add + OPT_femit_struct_debug_baseonly, OPT_femit_struct_debug_reduced, + and OPT_femit_struct_debug_detailed_. + * c.opt: Add specifications for + -femit-struct-debug-baseonly, -femit-struct-debug-reduced, + and -femit-struct-debug-detailed[=...]. + * opts.c (set_struct_debug_option): Parse
svn commit: r259269 - in stable/9/contrib: gcc gcc/config/rs6000 gcc/cp gcc/doc gcclibs/libcpp
Author: pfg Date: Thu Dec 12 18:16:46 2013 New Revision: 259269 URL: http://svnweb.freebsd.org/changeset/base/259269 Log: MFC r258081, r258138, r258143, r258179, r258157, r258204, 258205, r258206, r258207, r258321 This is a series of commits inspired on Google's gcc-4.2.1 for Android that were taken from the gcc pre-4.3 under the GPLv2. gcc: Backport fixes for -W parentheses in C++ This fixes GCC 19564. gcc: merge rs6000 change from FSF pre-gcc43 Don't set MASK_PPC_GFXOPT for 8540 or 8548. Merge vrp-tree fix from gcc-4.3 Fix missed conversion from / to (GCC PR32521) Merge in GCCr120505 to include definition of TREE_OVERFLOW_P gcc: warn about integer overflow in constant expressions in the C++ frontend. gcc: Add a new option -Wvla to warn variable length array. libcpp: preprocessor speedup patches from upstream gcc. gcc: add femit-struct-debug support to reduce Reduce dwarf debug size gcc: Fix postreload-gcse treatment of call-clobbered registers. gcc: Record some previous commits in the ChangeLog.gcc43 file. Modified: stable/9/contrib/gcc/ChangeLog.gcc43 stable/9/contrib/gcc/c-common.c stable/9/contrib/gcc/c-common.h stable/9/contrib/gcc/c-decl.c stable/9/contrib/gcc/c-opts.c stable/9/contrib/gcc/c-typeck.c stable/9/contrib/gcc/c.opt stable/9/contrib/gcc/config/rs6000/rs6000.c stable/9/contrib/gcc/cp/cp-lang.c stable/9/contrib/gcc/cp/cp-tree.h stable/9/contrib/gcc/cp/decl.c stable/9/contrib/gcc/cp/parser.c stable/9/contrib/gcc/cp/pt.c stable/9/contrib/gcc/cp/semantics.c stable/9/contrib/gcc/cp/tree.c stable/9/contrib/gcc/cp/typeck.c stable/9/contrib/gcc/doc/invoke.texi stable/9/contrib/gcc/dwarf2out.c stable/9/contrib/gcc/flags.h stable/9/contrib/gcc/langhooks-def.h stable/9/contrib/gcc/langhooks.h stable/9/contrib/gcc/opts.c stable/9/contrib/gcc/postreload-gcse.c stable/9/contrib/gcc/regs.h stable/9/contrib/gcc/rtlanal.c stable/9/contrib/gcc/tree-vrp.c stable/9/contrib/gcc/tree.h stable/9/contrib/gcclibs/libcpp/files.c stable/9/contrib/gcclibs/libcpp/internal.h stable/9/contrib/gcclibs/libcpp/lex.c Directory Properties: stable/9/ (props changed) stable/9/contrib/gcc/ (props changed) stable/9/contrib/gcclibs/ (props changed) Modified: stable/9/contrib/gcc/ChangeLog.gcc43 == --- stable/9/contrib/gcc/ChangeLog.gcc43Thu Dec 12 18:15:32 2013 (r259268) +++ stable/9/contrib/gcc/ChangeLog.gcc43Thu Dec 12 18:16:46 2013 (r259269) @@ -1,9 +1,35 @@ -2007-06-05 Joerg Wunsch j@uriah.heep.sax.de (r23479) +2007-08-08 Andrew Haley a...@redhat.com (r128087) + + * config/arm/libunwind.S (UNWIND_WRAPPER _Unwind_Backtrace): New. + * config/arm/unwind-arm.h (__gnu_Unwind_Backtrace): New. + * config/arm/unwind-arm.c (__gnu_Unwind_Backtrace): New. + +2007-06-05 Joerg Wunsch j@uriah.heep.sax.de (r125346) PR preprocessor/23479 * doc/extend.texi: Document the 0b-prefixed binary integer constant extension. +2007-05-24 Richard Sandiford rsand...@nildram.co.uk (r125037) + + * postreload-gcse.c (reg_changed_after_insn_p): New function. + (oprs_unchanged_p): Use it to check all registers in a REG. + (record_opr_changes): Look for clobbers in CALL_INSN_FUNCTION_USAGE. + (reg_set_between_after_reload_p): Delete. + (reg_used_between_after_reload_p): Likewise. + (reg_set_or_used_since_bb_start): Likewise. + (eliminate_partially_redundant_load): Use reg_changed_after_insn_p + and reg_used_between_p instead of reg_set_or_used_since_bb_start. + Use reg_set_between_p instead of reg_set_between_after_reload_p. + * rtlanal.c (reg_set_p): Check whether REG overlaps + regs_invalidated_by_call, rather than just checking the + membership of REGNO (REG). + +2007-05-03 Ian Lance Taylor i...@google.com (r124381) + + * config/rs6000/rs6000.c (rs6000_override_options): Don't set + MASK_PPC_GFXOPT for 8540 or 8548. + 2007-05-01 Dwarakanath Rajagopal dwarak.rajago...@amd.com (r124341) * doc/invoke.texi: Fix typo, 'AMD Family 10h core' instead of @@ -22,6 +48,57 @@ alignment for amdfam10 architecture. Increasing the max loop alignment to 24 bytes. +2007-04-16 Lawrence Crowl cr...@google.com + + * doc/invoke.texi (Debugging Options): Add documentation for the + -femit-struct-debug options -femit-struct-debug-baseonly, + -femit-struct-debug-reduced, and + -femit-struct-debug-detailed[=...]. + + * c-opts.c (c_common_handle_option): Add + OPT_femit_struct_debug_baseonly, OPT_femit_struct_debug_reduced, + and OPT_femit_struct_debug_detailed_. + * c.opt: Add specifications for + -femit-struct-debug-baseonly, -femit-struct-debug-reduced, + and
svn commit: r259270 - in head/sys/arm: freescale/imx ti
Author: loos Date: Thu Dec 12 18:29:36 2013 New Revision: 259270 URL: http://svnweb.freebsd.org/changeset/base/259270 Log: After r256961 ofw_iicbuc.c will be built for any kernel which includes options 'iicbus' and 'fdt'. Remove the (now) unnecessary entries. Verified on BBB (am335x), EFIKA_MX (imx51 - by ray@), DIGI-CCWMX53 (imx53 - kernel build). Approved by: adrian (mentor) Modified: head/sys/arm/freescale/imx/files.imx51 head/sys/arm/freescale/imx/files.imx53 head/sys/arm/freescale/imx/files.imx6 head/sys/arm/ti/files.ti Modified: head/sys/arm/freescale/imx/files.imx51 == --- head/sys/arm/freescale/imx/files.imx51 Thu Dec 12 18:16:46 2013 (r259269) +++ head/sys/arm/freescale/imx/files.imx51 Thu Dec 12 18:29:36 2013 (r259270) @@ -46,7 +46,6 @@ arm/freescale/imx/imx_wdog.c optional i # i2c arm/freescale/imx/i2c.coptional fsliic -dev/ofw/ofw_iicbus.c optional fsliic # IPU - Image Processing Unit (frame buffer also) arm/freescale/imx/imx51_ipuv3.coptional sc Modified: head/sys/arm/freescale/imx/files.imx53 == --- head/sys/arm/freescale/imx/files.imx53 Thu Dec 12 18:16:46 2013 (r259269) +++ head/sys/arm/freescale/imx/files.imx53 Thu Dec 12 18:29:36 2013 (r259270) @@ -46,7 +46,6 @@ arm/freescale/imx/imx_wdog.c optional i # i2c arm/freescale/imx/i2c.coptional fsliic -dev/ofw/ofw_iicbus.c optional fsliic # IPU - Image Processing Unit (frame buffer also) arm/freescale/imx/imx51_ipuv3.coptional sc Modified: head/sys/arm/freescale/imx/files.imx6 == --- head/sys/arm/freescale/imx/files.imx6 Thu Dec 12 18:16:46 2013 (r259269) +++ head/sys/arm/freescale/imx/files.imx6 Thu Dec 12 18:29:36 2013 (r259270) @@ -51,6 +51,5 @@ arm/freescale/imx/imx6_usbphy.c optiona #arm/freescale/imx/imx51_gpio.coptional gpio #dev/ata/chipsets/ata-fsl.coptional imxata #arm/freescale/imx/i2c.c optional fsliic -#dev/ofw/ofw_iicbus.c optional fsliic #arm/freescale/imx/imx51_ipuv3.c optional sc Modified: head/sys/arm/ti/files.ti == --- head/sys/arm/ti/files.tiThu Dec 12 18:16:46 2013(r259269) +++ head/sys/arm/ti/files.tiThu Dec 12 18:29:36 2013(r259270) @@ -22,7 +22,6 @@ arm/ti/ti_pruss.c standard arm/ti/ti_gpio.c optionalgpio arm/ti/ti_i2c.coptionalti_i2c -dev/ofw/ofw_iicbus.c optionaliicbus dev/uart/uart_dev_ti8250.c optionaluart dev/uart/uart_dev_ns8250.c optionaluart ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259271 - stable/10/contrib/gcclibs/libcpp
Author: pfg Date: Thu Dec 12 19:01:50 2013 New Revision: 259271 URL: http://svnweb.freebsd.org/changeset/base/259271 Log: MFC r258712; libcpp: fix an underflow. Similar fix seen in Apple's gcc42. Obtained from:OpenBSD (Rev 1.2) MFC after:2 weeks Modified: stable/10/contrib/gcclibs/libcpp/charset.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/gcclibs/libcpp/charset.c == --- stable/10/contrib/gcclibs/libcpp/charset.c Thu Dec 12 18:29:36 2013 (r259270) +++ stable/10/contrib/gcclibs/libcpp/charset.c Thu Dec 12 19:01:50 2013 (r259271) @@ -1628,7 +1628,7 @@ _cpp_convert_input (cpp_reader *pfile, c terminate with another \r, not an \n, so that we do not mistake the \r\n sequence for a single DOS line ending and erroneously issue the No newline at end of file diagnostic. */ - if (to.text[to.len - 1] == '\r') + if (to.len 0 to.text[to.len - 1] == '\r') to.text[to.len] = '\r'; else to.text[to.len] = '\n'; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259272 - stable/9/contrib/gcclibs/libcpp
Author: pfg Date: Thu Dec 12 19:02:18 2013 New Revision: 259272 URL: http://svnweb.freebsd.org/changeset/base/259272 Log: MFC r258712; libcpp: fix an underflow. Similar fix seen in Apple's gcc42. Obtained from:OpenBSD (Rev 1.2) MFC after:2 weeks Modified: stable/9/contrib/gcclibs/libcpp/charset.c Directory Properties: stable/9/ (props changed) stable/9/contrib/gcclibs/ (props changed) Modified: stable/9/contrib/gcclibs/libcpp/charset.c == --- stable/9/contrib/gcclibs/libcpp/charset.c Thu Dec 12 19:01:50 2013 (r259271) +++ stable/9/contrib/gcclibs/libcpp/charset.c Thu Dec 12 19:02:18 2013 (r259272) @@ -1628,7 +1628,7 @@ _cpp_convert_input (cpp_reader *pfile, c terminate with another \r, not an \n, so that we do not mistake the \r\n sequence for a single DOS line ending and erroneously issue the No newline at end of file diagnostic. */ - if (to.text[to.len - 1] == '\r') + if (to.len 0 to.text[to.len - 1] == '\r') to.text[to.len] = '\r'; else to.text[to.len] = '\n'; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259273 - stable/8/contrib/gcclibs/libcpp
Author: pfg Date: Thu Dec 12 19:02:42 2013 New Revision: 259273 URL: http://svnweb.freebsd.org/changeset/base/259273 Log: MFC r258712; libcpp: fix an underflow. Similar fix seen in Apple's gcc42. Obtained from:OpenBSD (Rev 1.2) MFC after:2 weeks Modified: stable/8/contrib/gcclibs/libcpp/charset.c Directory Properties: stable/8/ (props changed) stable/8/contrib/ (props changed) stable/8/contrib/gcclibs/ (props changed) Modified: stable/8/contrib/gcclibs/libcpp/charset.c == --- stable/8/contrib/gcclibs/libcpp/charset.c Thu Dec 12 19:02:18 2013 (r259272) +++ stable/8/contrib/gcclibs/libcpp/charset.c Thu Dec 12 19:02:42 2013 (r259273) @@ -1628,7 +1628,7 @@ _cpp_convert_input (cpp_reader *pfile, c terminate with another \r, not an \n, so that we do not mistake the \r\n sequence for a single DOS line ending and erroneously issue the No newline at end of file diagnostic. */ - if (to.text[to.len - 1] == '\r') + if (to.len 0 to.text[to.len - 1] == '\r') to.text[to.len] = '\r'; else to.text[to.len] = '\n'; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r259261 - head/sys/dev/drm2
On Thu, Dec 12, 2013 at 02:49:27PM +, Aleksandr Rybalko wrote: Author: ray Date: Thu Dec 12 14:49:26 2013 New Revision: 259261 URL: http://svnweb.freebsd.org/changeset/base/259261 Log: Do not try to probe/attach if attempt to add fbd child are failed. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/drm2/drm_fb_helper.c Modified: head/sys/dev/drm2/drm_fb_helper.c == --- head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:37:25 2013 (r259260) +++ head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:49:26 2013 (r259261) @@ -1043,7 +1043,10 @@ int drm_fb_helper_single_fb_probe(struct kdev = fb_helper-dev-device; fbd = device_add_child(kdev, fbd, device_get_unit(kdev)); - ret = device_probe_and_attach(fbd); + if (fbd != NULL) + ret = device_probe_and_attach(fbd); + else + ret = ENODEV; This must be -ENODEV, since linux layer operates on negative values for error. The error is negated in the drm layer, which would result in non-existent errno returned to FreeBSD code. Also, the #ifdef __FreeBSD braces in the file are not useful, please remove them. #ifdef DEV_VT if (ret != 0) DRM_ERROR(Failed to attach fbd device: %d\n, ret); pgpthIxOu1UdY.pgp Description: PGP signature
Re: svn commit: r259272 - stable/9/contrib/gcclibs/libcpp
On 12.12.2013 14:02, Pedro F. Giffuni wrote: Author: pfg Date: Thu Dec 12 19:02:18 2013 New Revision: 259272 URL: http://svnweb.freebsd.org/changeset/base/259272 Log: MFC r258712; libcpp: fix an underflow. Similar fix seen in Apple's gcc42. Obtained from: OpenBSD (Rev 1.2) MFC after: 2 weeks Oops.. will obviously not be MFC'd again :-P. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259274 - head/release/doc/en_US.ISO8859-1/relnotes
Author: rodrigc Date: Thu Dec 12 20:20:46 2013 New Revision: 259274 URL: http://svnweb.freebsd.org/changeset/base/259274 Log: Mention BIND removal in release notes. Submitted by: skreuzer Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Dec 12 19:02:42 2013(r259273) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Dec 12 20:20:46 2013(r259274) @@ -328,6 +328,13 @@ sect2 xml:id=userland titleUserland Changes/title +para role=mergedBIND has been replaced by man.unbound.8; for + local dns resolution in the base system. With this change, nslookup + and dig are no longer a part of the base system. Users should + instead use man.host.1; and man.drill.1; Alternatively, + nslookup and dig can be obtained by installing the + dns/bind-tools port./para + para role=mergedThe man.adduser.8; utility now supports a option-M/option option to set the mode of a new user's home directory./para ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259275 - head/usr.sbin/bhyvectl
Author: jhb Date: Thu Dec 12 20:34:04 2013 New Revision: 259275 URL: http://svnweb.freebsd.org/changeset/base/259275 Log: Add a command to inject an NMI on a specific vcpu. It is a simple wrapper around the existing vm_inject_nmi(). Reviewed by: grehan, neel Modified: head/usr.sbin/bhyvectl/bhyvectl.c Modified: head/usr.sbin/bhyvectl/bhyvectl.c == --- head/usr.sbin/bhyvectl/bhyvectl.c Thu Dec 12 20:20:46 2013 (r259274) +++ head/usr.sbin/bhyvectl/bhyvectl.c Thu Dec 12 20:34:04 2013 (r259275) @@ -189,12 +189,14 @@ usage(void) [--set-mem=memory in units of MB]\n [--get-lowmem]\n [--get-highmem]\n - [--get-gpa-pmap]\n, + [--get-gpa-pmap]\n + [--inject-nmi]\n, progname); exit(1); } static int get_stats, getcap, setcap, capval, get_gpa_pmap; +static int inject_nmi; static const char *capname; static int create, destroy, get_lowmem, get_highmem; static uint64_t memsize; @@ -557,6 +559,7 @@ main(int argc, char *argv[]) { run,NO_ARG, run, 1 }, { create, NO_ARG, create,1 }, { destroy,NO_ARG, destroy, 1 }, + { inject-nmi, NO_ARG, inject_nmi,1 }, { NULL, 0, NULL, 0 } }; @@ -825,6 +828,10 @@ main(int argc, char *argv[]) vmcs_entry_interruption_info); } + if (!error inject_nmi) { + error = vm_inject_nmi(ctx, vcpu); + } + if (!error (get_lowmem || get_all)) { gpa = 0; error = vm_get_memory_seg(ctx, gpa, len, wired); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259276 - head/usr.sbin/bsdinstall/scripts
Author: dteske Date: Thu Dec 12 20:47:18 2013 New Revision: 259276 URL: http://svnweb.freebsd.org/changeset/base/259276 Log: I caught the following snippet at the end of my /var/log/bsdinstall_log: === DEBUG: Running installation step: services local: Not in a function /usr/libexec/bsdinstall/services: cannot create : Read-only file system /usr/libexec/bsdinstall/services: /tmp/bsdinstall/etc/rc.conf.services: \ Permission denied === The `local: Not in a function' is obvious, and was introduced by myself in SVN revision 256348. The latter two are caused by the attempt to use \ to continue the line after using the redirect. This appears to attempt to write a file with the name in the current directory and subsequently attempts to execute the file that was originally intended for writing (which is not executable; hence the `Permission denied'). That was introduced in SVN r228192 about 2 years ago, apparently unnoticed until I started going over the debug outputs very carefully. MFC after:3 days Modified: head/usr.sbin/bsdinstall/scripts/services Modified: head/usr.sbin/bsdinstall/scripts/services == --- head/usr.sbin/bsdinstall/scripts/services Thu Dec 12 20:34:04 2013 (r259275) +++ head/usr.sbin/bsdinstall/scripts/services Thu Dec 12 20:47:18 2013 (r259276) @@ -50,13 +50,12 @@ DAEMONS=$(dialog --backtitle FreeBSD In 21 13) exec 3- -local havedump= +havedump= for daemon in $DAEMONS; do if [ $daemon == dumpdev ]; then havedump=1 - echo \# Set dumpdev to \AUTO\ to enable crash dumps, \ - \NO\ to disable \ - $BSDINSTALL_TMPETC/rc.conf.services + echo '# Set dumpdev to AUTO to enable crash dumps, NO' \ +'to disable' $BSDINSTALL_TMPETC/rc.conf.services echo dumpdev=\AUTO\ $BSDINSTALL_TMPETC/rc.conf.services continue fi ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259277 - stable/10/release/doc/en_US.ISO8859-1/relnotes
Author: rodrigc Date: Thu Dec 12 21:51:33 2013 New Revision: 259277 URL: http://svnweb.freebsd.org/changeset/base/259277 Log: MFC r259274 Mention BIND removal in release notes. Submitted by: skreuzer Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Directory Properties: stable/10/ (props changed) Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Dec 12 20:47:18 2013(r259276) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Dec 12 21:51:33 2013(r259277) @@ -328,6 +328,13 @@ sect2 xml:id=userland titleUserland Changes/title +para role=mergedBIND has been replaced by man.unbound.8; for + local dns resolution in the base system. With this change, nslookup + and dig are no longer a part of the base system. Users should + instead use man.host.1; and man.drill.1; Alternatively, + nslookup and dig can be obtained by installing the + dns/bind-tools port./para + para role=mergedThe man.adduser.8; utility now supports a option-M/option option to set the mode of a new user's home directory./para ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259278 - releng/10.0/contrib/llvm/tools/clang/lib/CodeGen
Author: dim Date: Thu Dec 12 22:01:42 2013 New Revision: 259278 URL: http://svnweb.freebsd.org/changeset/base/259278 Log: Merge r259214 from stable/10 (head r259100): Pull in r196658 from upstream clang trunk: CodeGen: Don't emit linkage on thunks that aren't emitted because they're vararg. This can happen when we're trying to emit a thunk with available_externally linkage with optimization enabled but bail because it doesn't make sense for vararg functions. [LLVM] PR18098. This should fix clang Broken module found, compilation aborted errors when building the qt4-based dvbcut port. Reported by: se Approved by: re (glebius) Modified: releng/10.0/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp Directory Properties: releng/10.0/ (props changed) Modified: releng/10.0/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp == --- releng/10.0/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp Thu Dec 12 21:51:33 2013(r259277) +++ releng/10.0/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp Thu Dec 12 22:01:42 2013(r259278) @@ -454,10 +454,9 @@ void CodeGenVTables::EmitThunk(GlobalDec } else { // Normal thunk body generation. CodeGenFunction(CGM).GenerateThunk(ThunkFn, FnInfo, GD, Thunk); +if (UseAvailableExternallyLinkage) + ThunkFn-setLinkage(llvm::GlobalValue::AvailableExternallyLinkage); } - - if (UseAvailableExternallyLinkage) -ThunkFn-setLinkage(llvm::GlobalValue::AvailableExternallyLinkage); } void CodeGenVTables::MaybeEmitThunkAvailableExternally(GlobalDecl GD, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259279 - releng/10.0/contrib/gcc/config/i386
Author: dim Date: Thu Dec 12 22:04:47 2013 New Revision: 259279 URL: http://svnweb.freebsd.org/changeset/base/259279 Log: Merge r259216 from stable/10 (head r259111): Use correct casts in gcc's emmintrin.h for the first arguments of the following builtin functions: * __builtin_ia32_pslldi128() takes __v4si instead of __v8hi * __builtin_ia32_psllqi128() takes __v2di instead of __v8hi * __builtin_ia32_psradi128() takes __v4si instead of __v8hi This should fix the following errors when building the LINT kernel with gcc: sys/crypto/aesni/aesni_wrap.c:191: error: incompatible type for argument 1 of '__builtin_ia32_psradi128' sys/crypto/aesni/aesni_wrap.c:195: error: incompatible type for argument 1 of '__builtin_ia32_pslldi128' Approved by: re (glebius) Modified: releng/10.0/contrib/gcc/config/i386/emmintrin.h Directory Properties: releng/10.0/ (props changed) Modified: releng/10.0/contrib/gcc/config/i386/emmintrin.h == --- releng/10.0/contrib/gcc/config/i386/emmintrin.h Thu Dec 12 22:01:42 2013(r259278) +++ releng/10.0/contrib/gcc/config/i386/emmintrin.h Thu Dec 12 22:04:47 2013(r259279) @@ -1126,9 +1126,9 @@ _mm_slli_epi64 (__m128i __A, int __B) #define _mm_slli_epi16(__A, __B) \ ((__m128i)__builtin_ia32_psllwi128 ((__v8hi)(__A), __B)) #define _mm_slli_epi32(__A, __B) \ - ((__m128i)__builtin_ia32_pslldi128 ((__v8hi)(__A), __B)) + ((__m128i)__builtin_ia32_pslldi128 ((__v4si)(__A), __B)) #define _mm_slli_epi64(__A, __B) \ - ((__m128i)__builtin_ia32_psllqi128 ((__v8hi)(__A), __B)) + ((__m128i)__builtin_ia32_psllqi128 ((__v2di)(__A), __B)) #endif #if 0 @@ -1147,7 +1147,7 @@ _mm_srai_epi32 (__m128i __A, int __B) #define _mm_srai_epi16(__A, __B) \ ((__m128i)__builtin_ia32_psrawi128 ((__v8hi)(__A), __B)) #define _mm_srai_epi32(__A, __B) \ - ((__m128i)__builtin_ia32_psradi128 ((__v8hi)(__A), __B)) + ((__m128i)__builtin_ia32_psradi128 ((__v4si)(__A), __B)) #endif #if 0 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259280 - head/sbin/growfs
Author: glebius Date: Thu Dec 12 22:33:32 2013 New Revision: 259280 URL: http://svnweb.freebsd.org/changeset/base/259280 Log: Somehow stable/10 branch contains correct version, but head doesn't. Modified: head/sbin/growfs/growfs.8 Modified: head/sbin/growfs/growfs.8 == --- head/sbin/growfs/growfs.8 Thu Dec 12 22:04:47 2013(r259279) +++ head/sbin/growfs/growfs.8 Thu Dec 12 22:33:32 2013(r259280) @@ -116,7 +116,7 @@ The utility first appeared in .Fx 4.4 . The ability to resize mounted filesystems was added in -.Fx 9.2 . +.Fx 10.0 . .Sh AUTHORS .An Christoph Herrmann Aq c...@freebsd.org .An Thomas-Henning von Kamptz Aq toms...@freebsd.org ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259281 - stable/10/usr.sbin/mtest
Author: eadler Date: Fri Dec 13 00:56:05 2013 New Revision: 259281 URL: http://svnweb.freebsd.org/changeset/base/259281 Log: MFC r259156: mtest(8): use correct macro in mdoc The An macros is used for authors while the Ar macro is used for arguments. AFAIK mcast-addr and ifname are not authors. PR: docs/184649 Modified: stable/10/usr.sbin/mtest/mtest.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/mtest/mtest.8 == --- stable/10/usr.sbin/mtest/mtest.8Thu Dec 12 22:33:32 2013 (r259280) +++ stable/10/usr.sbin/mtest/mtest.8Fri Dec 13 00:56:05 2013 (r259281) @@ -131,9 +131,9 @@ to allow traffic from source Print .Ar n source filter entries for -.An mcast-addr +.Ar mcast-addr on interface -.An ifname . +.Ar ifname . .\ .Pp .It Ic f Ar filename ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259282 - stable/9/usr.sbin/mtest
Author: eadler Date: Fri Dec 13 01:35:31 2013 New Revision: 259282 URL: http://svnweb.freebsd.org/changeset/base/259282 Log: mtest(8): use correct macro in mdoc The An macros is used for authors while the Ar macro is used for arguments. AFAIK mcast-addr and ifname are not authors. PR: docs/184649 Modified: stable/9/usr.sbin/mtest/mtest.8 Directory Properties: stable/9/usr.sbin/mtest/ (props changed) Modified: stable/9/usr.sbin/mtest/mtest.8 == --- stable/9/usr.sbin/mtest/mtest.8 Fri Dec 13 00:56:05 2013 (r259281) +++ stable/9/usr.sbin/mtest/mtest.8 Fri Dec 13 01:35:31 2013 (r259282) @@ -131,9 +131,9 @@ to allow traffic from source Print .Ar n source filter entries for -.An mcast-addr +.Ar mcast-addr on interface -.An ifname . +.Ar ifname . .\ .Pp .It Ic f Ar filename ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259283 - stable/9/contrib/libstdc++/include/std
Author: pfg Date: Fri Dec 13 02:21:32 2013 New Revision: 259283 URL: http://svnweb.freebsd.org/changeset/base/259283 Log: MFC r244673: Fix the __glibcxx_min and __glibcxx_max macros for a signed wchar_t. This seems to be needed by newer compilers. Modified: stable/9/contrib/libstdc++/include/std/std_limits.h Directory Properties: stable/9/ (props changed) stable/9/contrib/libstdc++/ (props changed) Modified: stable/9/contrib/libstdc++/include/std/std_limits.h == --- stable/9/contrib/libstdc++/include/std/std_limits.h Fri Dec 13 01:35:31 2013(r259282) +++ stable/9/contrib/libstdc++/include/std/std_limits.h Fri Dec 13 02:21:32 2013(r259283) @@ -134,10 +134,11 @@ #define __glibcxx_signed(T)((T)(-1) 0) #define __glibcxx_min(T) \ - (__glibcxx_signed (T) ? (T)1 __glibcxx_digits (T) : (T)0) + (__glibcxx_signed (T) ? (((T)1 (__glibcxx_digits (T) - 1)) 1) : (T)0) #define __glibcxx_max(T) \ - (__glibcxx_signed (T) ? ((T)1 __glibcxx_digits (T)) - 1 : ~(T)0) + (__glibcxx_signed (T) ? \ + (T)1 (__glibcxx_digits (T) - 1)) - 1) 1) + 1) : ~(T)0) #define __glibcxx_digits(T) \ (sizeof(T) * __CHAR_BIT__ - __glibcxx_signed (T)) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259284 - in head/sys: conf powerpc/aim powerpc/cpufreq powerpc/include powerpc/powermac powerpc/powerpc
Author: jhibbits Date: Fri Dec 13 02:37:35 2013 New Revision: 259284 URL: http://svnweb.freebsd.org/changeset/base/259284 Log: Add PMU-based CPU frequency scaling. This method is used on most Titanium PowerBooks. MFC after:1 month Added: head/sys/powerpc/cpufreq/pmufreq.c (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/powerpc/aim/mp_cpudep.c head/sys/powerpc/include/cpu.h head/sys/powerpc/include/dbdma.h head/sys/powerpc/include/pcpu.h head/sys/powerpc/include/spr.h head/sys/powerpc/powermac/platform_powermac.c head/sys/powerpc/powermac/pmu.c head/sys/powerpc/powermac/pmuvar.h head/sys/powerpc/powermac/uninorth.c head/sys/powerpc/powermac/uninorthvar.h head/sys/powerpc/powermac/viareg.h head/sys/powerpc/powerpc/mp_machdep.c Modified: head/sys/conf/files.powerpc == --- head/sys/conf/files.powerpc Fri Dec 13 02:21:32 2013(r259283) +++ head/sys/conf/files.powerpc Fri Dec 13 02:37:35 2013(r259284) @@ -107,6 +107,7 @@ powerpc/booke/pmap.coptionalbooke powerpc/booke/trap.c optionalbooke powerpc/cpufreq/dfs.c optionalcpufreq powerpc/cpufreq/pcr.c optionalcpufreq aim +powerpc/cpufreq/pmufreq.c optionalcpufreq aim pmu powerpc/fpu/fpu_add.c optionalfpu_emu powerpc/fpu/fpu_compare.c optionalfpu_emu powerpc/fpu/fpu_div.c optionalfpu_emu Modified: head/sys/powerpc/aim/mp_cpudep.c == --- head/sys/powerpc/aim/mp_cpudep.cFri Dec 13 02:21:32 2013 (r259283) +++ head/sys/powerpc/aim/mp_cpudep.cFri Dec 13 02:37:35 2013 (r259284) @@ -322,17 +322,13 @@ cpudep_ap_setup() mtspr(SPR_CELL_TSRL, bsp_state[5]); break; - case MPC7450: - case MPC7455: - case MPC7457: - /* Only MPC745x CPUs have an L3 cache. */ - reg = mpc745x_l3_enable(bsp_state[3]); - - /* Fallthrough */ case MPC7400: case MPC7410: case MPC7447A: case MPC7448: + case MPC7450: + case MPC7455: + case MPC7457: /* XXX: Program the CPU ID into PIR */ __asm __volatile(mtspr 1023,%0 :: r(PCPU_GET(cpuid))); @@ -342,6 +338,17 @@ cpudep_ap_setup() mtspr(SPR_HID0, bsp_state[0]); isync(); mtspr(SPR_HID1, bsp_state[1]); isync(); + /* Now enable the L3 cache. */ + switch (vers) { + case MPC7450: + case MPC7455: + case MPC7457: + /* Only MPC745x CPUs have an L3 cache. */ + reg = mpc745x_l3_enable(bsp_state[3]); + default: + break; + } + reg = mpc74xx_l2_enable(bsp_state[2]); reg = mpc74xx_l1d_enable(); reg = mpc74xx_l1i_enable(); Added: head/sys/powerpc/cpufreq/pmufreq.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/cpufreq/pmufreq.c Fri Dec 13 02:37:35 2013 (r259284) @@ -0,0 +1,222 @@ +/*- + * Copyright (c) 2011 Justin Hibbits + * Copyright (c) 2009 Nathan Whitehorn + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include sys/cdefs.h +__FBSDID($FreeBSD$); + +#include sys/param.h +#include sys/systm.h +#include sys/bus.h +#include sys/cpu.h +#include sys/kernel.h
svn commit: r259285 - stable/8/contrib/libstdc++/include/std
Author: pfg Date: Fri Dec 13 02:47:41 2013 New Revision: 259285 URL: http://svnweb.freebsd.org/changeset/base/259285 Log: MFC r244673: Fix the __glibcxx_min and __glibcxx_max macros for a signed wchar_t. This seems to be needed by newer compilers. Modified: stable/8/contrib/libstdc++/include/std/std_limits.h Directory Properties: stable/8/ (props changed) stable/8/contrib/ (props changed) stable/8/contrib/libstdc++/ (props changed) Modified: stable/8/contrib/libstdc++/include/std/std_limits.h == --- stable/8/contrib/libstdc++/include/std/std_limits.h Fri Dec 13 02:37:35 2013(r259284) +++ stable/8/contrib/libstdc++/include/std/std_limits.h Fri Dec 13 02:47:41 2013(r259285) @@ -134,10 +134,11 @@ #define __glibcxx_signed(T)((T)(-1) 0) #define __glibcxx_min(T) \ - (__glibcxx_signed (T) ? (T)1 __glibcxx_digits (T) : (T)0) + (__glibcxx_signed (T) ? (((T)1 (__glibcxx_digits (T) - 1)) 1) : (T)0) #define __glibcxx_max(T) \ - (__glibcxx_signed (T) ? ((T)1 __glibcxx_digits (T)) - 1 : ~(T)0) + (__glibcxx_signed (T) ? \ + (T)1 (__glibcxx_digits (T) - 1)) - 1) 1) + 1) : ~(T)0) #define __glibcxx_digits(T) \ (sizeof(T) * __CHAR_BIT__ - __glibcxx_signed (T)) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259286 - head/crypto/heimdal/lib/gssapi/krb5
Author: bjk (doc committer) Date: Fri Dec 13 03:09:29 2013 New Revision: 259286 URL: http://svnweb.freebsd.org/changeset/base/259286 Log: Apply patch from upstream Heimdal for encoding fix RFC 4402 specifies the implementation of the gss_pseudo_random() function for the krb5 mechanism (and the C bindings therein). The implementation uses a PRF+ function that concatenates the output of individual krb5 pseudo-random operations produced with a counter and seed. The original implementation of this function in Heimdal incorrectly encoded the counter as a little-endian integer, but the RFC specifies the counter encoding as big-endian. The implementation initializes the counter to zero, so the first block of output (16 octets, for the modern AES enctypes 17 and 18) is unchanged. (RFC 4402 specifies that the counter should begin at 1, but both existing implementations begin with zero and it looks like the standard will be re-issued, with test vectors, to begin at zero.) This is upstream's commit f85652af868e64811f2b32b815d4198e7f9017f6, from 13 October, 2013: % Fix krb5's gss_pseudo_random() (n is big-endian) % % The first enctype RFC3961 prf output length's bytes are correct because % the little- and big-endian representations of unsigned zero are the % same. The second block of output was wrong because the counter was not % being encoded as big-endian. % % This change could break applications. But those applications would not % have been interoperating with other implementations anyways (in % particular: MIT's). Approved by: hrs (mentor, src committer) MFC after:3 days Modified: head/crypto/heimdal/lib/gssapi/krb5/prf.c Modified: head/crypto/heimdal/lib/gssapi/krb5/prf.c == --- head/crypto/heimdal/lib/gssapi/krb5/prf.c Fri Dec 13 02:47:41 2013 (r259285) +++ head/crypto/heimdal/lib/gssapi/krb5/prf.c Fri Dec 13 03:09:29 2013 (r259286) @@ -119,7 +119,7 @@ _gsskrb5_pseudo_random(OM_uint32 *minor_ while(dol 0) { size_t tsize; - _gsskrb5_encode_om_uint32(num, input.data); + _gsskrb5_encode_be_om_uint32(num, input.data); ret = krb5_crypto_prf(context, crypto, input, output); if (ret) { @@ -133,7 +133,7 @@ _gsskrb5_pseudo_random(OM_uint32 *minor_ tsize = min(dol, output.length); memcpy(p, output.data, tsize); - p += output.length; + p += tsize; dol -= tsize; krb5_data_free(output); num++; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259287 - head/sys/powerpc/cpufreq
Author: jhibbits Date: Fri Dec 13 05:54:25 2013 New Revision: 259287 URL: http://svnweb.freebsd.org/changeset/base/259287 Log: Some style(9) fixes MFC after:1 month X-MFC with: r259284 Modified: head/sys/powerpc/cpufreq/pmufreq.c Modified: head/sys/powerpc/cpufreq/pmufreq.c == --- head/sys/powerpc/cpufreq/pmufreq.c Fri Dec 13 03:09:29 2013 (r259286) +++ head/sys/powerpc/cpufreq/pmufreq.c Fri Dec 13 05:54:25 2013 (r259287) @@ -106,9 +106,9 @@ pmufreq_identify(driver_t *driver, devic static int pmufreq_probe(device_t dev) { - uint32_t min_freq; struct pmufreq_softc *sc; phandle_t node; + uint32_t min_freq; if (resource_disabled(pmufreq, 0)) return (ENXIO); @@ -174,8 +174,7 @@ static int pmufreq_set(device_t dev, const struct cf_setting *set) { struct pmufreq_softc *sc; - int speed_sel; - int error; + int error, speed_sel; if (set == NULL) return (EINVAL); @@ -191,7 +190,7 @@ pmufreq_set(device_t dev, const struct c if (error == 0) sc-curfreq = set-freq; - return error; + return (error); } static int ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259289 - stable/9/lib/libc/stdlib
Author: kib Date: Fri Dec 13 05:54:58 2013 New Revision: 259289 URL: http://svnweb.freebsd.org/changeset/base/259289 Log: MFC r259042: Do not force to run atexit handlers, which text comes from a dso owning the handle passed to __cxa_finalize() but which are registered by other dso, when the process is inside exit(3). Modified: stable/9/lib/libc/stdlib/atexit.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/stdlib/atexit.c == --- stable/9/lib/libc/stdlib/atexit.c Fri Dec 13 05:54:30 2013 (r259288) +++ stable/9/lib/libc/stdlib/atexit.c Fri Dec 13 05:54:58 2013 (r259289) @@ -151,6 +151,8 @@ __cxa_atexit(void (*func)(void *), void #pragma weak __pthread_cxa_finalize void __pthread_cxa_finalize(const struct dl_phdr_info *); +static int global_exit; + /* * Call all handlers registered with __cxa_atexit for the shared * object owning 'dso'. Note: if 'dso' is NULL, then all remaining @@ -164,10 +166,12 @@ __cxa_finalize(void *dso) struct atexit_fn fn; int n, has_phdr; - if (dso != NULL) + if (dso != NULL) { has_phdr = _rtld_addr_phdr(dso, phdr_info); - else + } else { has_phdr = 0; + global_exit = 1; + } _MUTEX_LOCK(atexit_mutex); for (p = __atexit; p; p = p-next) { @@ -177,8 +181,9 @@ __cxa_finalize(void *dso) fn = p-fns[n]; if (dso != NULL dso != fn.fn_dso) { /* wrong DSO ? */ - if (!has_phdr || !__elf_phdr_match_addr( - phdr_info, fn.fn_ptr.cxa_func)) + if (!has_phdr || global_exit || + !__elf_phdr_match_addr(phdr_info, + fn.fn_ptr.cxa_func)) continue; } /* @@ -200,6 +205,6 @@ __cxa_finalize(void *dso) if (dso == NULL) _MUTEX_DESTROY(atexit_mutex); - if (has_phdr __pthread_cxa_finalize != NULL) + if (has_phdr !global_exit __pthread_cxa_finalize != NULL) __pthread_cxa_finalize(phdr_info); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259288 - stable/10/lib/libc/stdlib
Author: kib Date: Fri Dec 13 05:54:30 2013 New Revision: 259288 URL: http://svnweb.freebsd.org/changeset/base/259288 Log: MFC r259042: Do not force to run atexit handlers, which text comes from a dso owning the handle passed to __cxa_finalize() but which are registered by other dso, when the process is inside exit(3). Modified: stable/10/lib/libc/stdlib/atexit.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdlib/atexit.c == --- stable/10/lib/libc/stdlib/atexit.c Fri Dec 13 05:54:25 2013 (r259287) +++ stable/10/lib/libc/stdlib/atexit.c Fri Dec 13 05:54:30 2013 (r259288) @@ -151,6 +151,8 @@ __cxa_atexit(void (*func)(void *), void #pragma weak __pthread_cxa_finalize void __pthread_cxa_finalize(const struct dl_phdr_info *); +static int global_exit; + /* * Call all handlers registered with __cxa_atexit for the shared * object owning 'dso'. Note: if 'dso' is NULL, then all remaining @@ -164,10 +166,12 @@ __cxa_finalize(void *dso) struct atexit_fn fn; int n, has_phdr; - if (dso != NULL) + if (dso != NULL) { has_phdr = _rtld_addr_phdr(dso, phdr_info); - else + } else { has_phdr = 0; + global_exit = 1; + } _MUTEX_LOCK(atexit_mutex); for (p = __atexit; p; p = p-next) { @@ -177,8 +181,9 @@ __cxa_finalize(void *dso) fn = p-fns[n]; if (dso != NULL dso != fn.fn_dso) { /* wrong DSO ? */ - if (!has_phdr || !__elf_phdr_match_addr( - phdr_info, fn.fn_ptr.cxa_func)) + if (!has_phdr || global_exit || + !__elf_phdr_match_addr(phdr_info, + fn.fn_ptr.cxa_func)) continue; } /* @@ -200,6 +205,6 @@ __cxa_finalize(void *dso) if (dso == NULL) _MUTEX_DESTROY(atexit_mutex); - if (has_phdr __pthread_cxa_finalize != NULL) + if (has_phdr !global_exit __pthread_cxa_finalize != NULL) __pthread_cxa_finalize(phdr_info); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259290 - stable/10/libexec/rtld-elf
Author: kib Date: Fri Dec 13 06:00:44 2013 New Revision: 259290 URL: http://svnweb.freebsd.org/changeset/base/259290 Log: MFC r259043: Build an allocator for the aligned memory on top of the rtld-private malloc. Modified: stable/10/libexec/rtld-elf/rtld.h stable/10/libexec/rtld-elf/xmalloc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/rtld-elf/rtld.h == --- stable/10/libexec/rtld-elf/rtld.h Fri Dec 13 05:54:58 2013 (r259289) +++ stable/10/libexec/rtld-elf/rtld.h Fri Dec 13 06:00:44 2013 (r259290) @@ -352,6 +352,8 @@ Obj_Entry *map_object(int, const char *, void *xcalloc(size_t, size_t); void *xmalloc(size_t); char *xstrdup(const char *); +void *malloc_aligned(size_t size, size_t align); +void free_aligned(void *ptr); extern Elf_Addr _GLOBAL_OFFSET_TABLE_[]; extern Elf_Sym sym_zero; /* For resolving undefined weak refs. */ Modified: stable/10/libexec/rtld-elf/xmalloc.c == --- stable/10/libexec/rtld-elf/xmalloc.cFri Dec 13 05:54:58 2013 (r259289) +++ stable/10/libexec/rtld-elf/xmalloc.cFri Dec 13 06:00:44 2013 (r259290) @@ -67,3 +67,33 @@ xstrdup(const char *str) memcpy(copy, str, len); return (copy); } + +void * +malloc_aligned(size_t size, size_t align) +{ + void *mem, *res; + uintptr_t x; + size_t asize, r; + + r = round(sizeof(void *), align); + asize = round(size, align) + r; + mem = xmalloc(asize); + x = (uintptr_t)mem; + res = (void *)round(x, align); + *(void **)((uintptr_t)res - sizeof(void *)) = mem; + return (res); +} + +void +free_aligned(void *ptr) +{ + void *mem; + uintptr_t x; + + if (ptr == NULL) + return; + x = (uintptr_t)ptr; + x -= sizeof(void *); + mem = *(void **)x; + free(mem); +} ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259291 - stable/9/libexec/rtld-elf
Author: kib Date: Fri Dec 13 06:01:21 2013 New Revision: 259291 URL: http://svnweb.freebsd.org/changeset/base/259291 Log: MFC r259043: Build an allocator for the aligned memory on top of the rtld-private malloc. Modified: stable/9/libexec/rtld-elf/rtld.h stable/9/libexec/rtld-elf/xmalloc.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/rtld.h == --- stable/9/libexec/rtld-elf/rtld.hFri Dec 13 06:00:44 2013 (r259290) +++ stable/9/libexec/rtld-elf/rtld.hFri Dec 13 06:01:21 2013 (r259291) @@ -352,6 +352,8 @@ Obj_Entry *map_object(int, const char *, void *xcalloc(size_t, size_t); void *xmalloc(size_t); char *xstrdup(const char *); +void *malloc_aligned(size_t size, size_t align); +void free_aligned(void *ptr); extern Elf_Addr _GLOBAL_OFFSET_TABLE_[]; extern Elf_Sym sym_zero; /* For resolving undefined weak refs. */ Modified: stable/9/libexec/rtld-elf/xmalloc.c == --- stable/9/libexec/rtld-elf/xmalloc.c Fri Dec 13 06:00:44 2013 (r259290) +++ stable/9/libexec/rtld-elf/xmalloc.c Fri Dec 13 06:01:21 2013 (r259291) @@ -67,3 +67,33 @@ xstrdup(const char *str) memcpy(copy, str, len); return (copy); } + +void * +malloc_aligned(size_t size, size_t align) +{ + void *mem, *res; + uintptr_t x; + size_t asize, r; + + r = round(sizeof(void *), align); + asize = round(size, align) + r; + mem = xmalloc(asize); + x = (uintptr_t)mem; + res = (void *)round(x, align); + *(void **)((uintptr_t)res - sizeof(void *)) = mem; + return (res); +} + +void +free_aligned(void *ptr) +{ + void *mem; + uintptr_t x; + + if (ptr == NULL) + return; + x = (uintptr_t)ptr; + x -= sizeof(void *); + mem = *(void **)x; + free(mem); +} ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259293 - stable/9/libexec/rtld-elf
Author: kib Date: Fri Dec 13 06:06:25 2013 New Revision: 259293 URL: http://svnweb.freebsd.org/changeset/base/259293 Log: MFC r259044: For variant II static TLS, properly align tls segments. MFC r259072: Cast Elf_Addr to void * to match the free_aligned() argument type. Modified: stable/9/libexec/rtld-elf/rtld.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/rtld.c == --- stable/9/libexec/rtld-elf/rtld.cFri Dec 13 06:06:08 2013 (r259292) +++ stable/9/libexec/rtld-elf/rtld.cFri Dec 13 06:06:25 2013 (r259293) @@ -231,6 +231,7 @@ char **main_argv; size_t tls_last_offset;/* Static TLS offset of last module */ size_t tls_last_size; /* Static TLS size of last module */ size_t tls_static_space; /* Static TLS space allocated */ +size_t tls_static_max_align; int tls_dtv_generation = 1;/* Used to detect when dtv size changes */ int tls_max_index = 1; /* Largest module index allocated */ @@ -4281,19 +4282,22 @@ void * allocate_tls(Obj_Entry *objs, void *oldtls, size_t tcbsize, size_t tcbalign) { Obj_Entry *obj; -size_t size; +size_t size, ralign; char *tls; Elf_Addr *dtv, *olddtv; Elf_Addr segbase, oldsegbase, addr; int i; -size = round(tls_static_space, tcbalign); +ralign = tcbalign; +if (tls_static_max_align ralign) + ralign = tls_static_max_align; +size = round(tls_static_space, ralign) + round(tcbsize, ralign); assert(tcbsize = 2*sizeof(Elf_Addr)); -tls = xcalloc(1, size + tcbsize); +tls = malloc_aligned(size, ralign); dtv = xcalloc(tls_max_index + 2, sizeof(Elf_Addr)); -segbase = (Elf_Addr)(tls + size); +segbase = (Elf_Addr)(tls + round(tls_static_space, ralign)); ((Elf_Addr*)segbase)[0] = segbase; ((Elf_Addr*)segbase)[1] = (Elf_Addr) dtv; @@ -4345,8 +4349,8 @@ allocate_tls(Obj_Entry *objs, void *oldt void free_tls(void *tls, size_t tcbsize, size_t tcbalign) { -size_t size; Elf_Addr* dtv; +size_t size, ralign; int dtvsize, i; Elf_Addr tlsstart, tlsend; @@ -4354,19 +4358,22 @@ free_tls(void *tls, size_t tcbsize, size * Figure out the size of the initial TLS block so that we can * find stuff which ___tls_get_addr() allocated dynamically. */ -size = round(tls_static_space, tcbalign); +ralign = tcbalign; +if (tls_static_max_align ralign) + ralign = tls_static_max_align; +size = round(tls_static_space, ralign); dtv = ((Elf_Addr**)tls)[1]; dtvsize = dtv[1]; tlsend = (Elf_Addr) tls; tlsstart = tlsend - size; for (i = 0; i dtvsize; i++) { - if (dtv[i+2] (dtv[i+2] tlsstart || dtv[i+2] tlsend)) { - free((void*) dtv[i+2]); + if (dtv[i + 2] != 0 (dtv[i + 2] tlsstart || dtv[i + 2] tlsend)) { + free_aligned((void *)dtv[i + 2]); } } -free((void*) tlsstart); +free_aligned((void *)tlsstart); free((void*) dtv); } @@ -4390,11 +4397,7 @@ allocate_module_tls(int index) die(); } -p = malloc(obj-tlssize); -if (p == NULL) { - _rtld_error(Cannot allocate TLS block for index %d, index); - die(); -} +p = malloc_aligned(obj-tlssize, obj-tlsalign); memcpy(p, obj-tlsinit, obj-tlsinitsize); memset(p + obj-tlsinitsize, 0, obj-tlssize - obj-tlsinitsize); @@ -4426,9 +4429,11 @@ allocate_tls_offset(Obj_Entry *obj) * leave a small amount of space spare to be used for dynamically * loading modules which use static TLS. */ -if (tls_static_space) { +if (tls_static_space != 0) { if (calculate_tls_end(off, obj-tlssize) tls_static_space) return false; +} else if (obj-tlsalign tls_static_max_align) { + tls_static_max_align = obj-tlsalign; } tls_last_offset = obj-tlsoffset = off; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259292 - stable/10/libexec/rtld-elf
Author: kib Date: Fri Dec 13 06:06:08 2013 New Revision: 259292 URL: http://svnweb.freebsd.org/changeset/base/259292 Log: MFC r259044: For variant II static TLS, properly align tls segments. MFC r259072: Cast Elf_Addr to void * to match the free_aligned() argument type. Modified: stable/10/libexec/rtld-elf/rtld.c Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/rtld-elf/rtld.c == --- stable/10/libexec/rtld-elf/rtld.c Fri Dec 13 06:01:21 2013 (r259291) +++ stable/10/libexec/rtld-elf/rtld.c Fri Dec 13 06:06:08 2013 (r259292) @@ -231,6 +231,7 @@ char **main_argv; size_t tls_last_offset;/* Static TLS offset of last module */ size_t tls_last_size; /* Static TLS size of last module */ size_t tls_static_space; /* Static TLS space allocated */ +size_t tls_static_max_align; int tls_dtv_generation = 1;/* Used to detect when dtv size changes */ int tls_max_index = 1; /* Largest module index allocated */ @@ -4276,19 +4277,22 @@ void * allocate_tls(Obj_Entry *objs, void *oldtls, size_t tcbsize, size_t tcbalign) { Obj_Entry *obj; -size_t size; +size_t size, ralign; char *tls; Elf_Addr *dtv, *olddtv; Elf_Addr segbase, oldsegbase, addr; int i; -size = round(tls_static_space, tcbalign); +ralign = tcbalign; +if (tls_static_max_align ralign) + ralign = tls_static_max_align; +size = round(tls_static_space, ralign) + round(tcbsize, ralign); assert(tcbsize = 2*sizeof(Elf_Addr)); -tls = xcalloc(1, size + tcbsize); +tls = malloc_aligned(size, ralign); dtv = xcalloc(tls_max_index + 2, sizeof(Elf_Addr)); -segbase = (Elf_Addr)(tls + size); +segbase = (Elf_Addr)(tls + round(tls_static_space, ralign)); ((Elf_Addr*)segbase)[0] = segbase; ((Elf_Addr*)segbase)[1] = (Elf_Addr) dtv; @@ -4340,8 +4344,8 @@ allocate_tls(Obj_Entry *objs, void *oldt void free_tls(void *tls, size_t tcbsize, size_t tcbalign) { -size_t size; Elf_Addr* dtv; +size_t size, ralign; int dtvsize, i; Elf_Addr tlsstart, tlsend; @@ -4349,19 +4353,22 @@ free_tls(void *tls, size_t tcbsize, size * Figure out the size of the initial TLS block so that we can * find stuff which ___tls_get_addr() allocated dynamically. */ -size = round(tls_static_space, tcbalign); +ralign = tcbalign; +if (tls_static_max_align ralign) + ralign = tls_static_max_align; +size = round(tls_static_space, ralign); dtv = ((Elf_Addr**)tls)[1]; dtvsize = dtv[1]; tlsend = (Elf_Addr) tls; tlsstart = tlsend - size; for (i = 0; i dtvsize; i++) { - if (dtv[i+2] (dtv[i+2] tlsstart || dtv[i+2] tlsend)) { - free((void*) dtv[i+2]); + if (dtv[i + 2] != 0 (dtv[i + 2] tlsstart || dtv[i + 2] tlsend)) { + free_aligned((void *)dtv[i + 2]); } } -free((void*) tlsstart); +free_aligned((void *)tlsstart); free((void*) dtv); } @@ -4385,11 +4392,7 @@ allocate_module_tls(int index) die(); } -p = malloc(obj-tlssize); -if (p == NULL) { - _rtld_error(Cannot allocate TLS block for index %d, index); - die(); -} +p = malloc_aligned(obj-tlssize, obj-tlsalign); memcpy(p, obj-tlsinit, obj-tlsinitsize); memset(p + obj-tlsinitsize, 0, obj-tlssize - obj-tlsinitsize); @@ -4421,9 +4424,11 @@ allocate_tls_offset(Obj_Entry *obj) * leave a small amount of space spare to be used for dynamically * loading modules which use static TLS. */ -if (tls_static_space) { +if (tls_static_space != 0) { if (calculate_tls_end(off, obj-tlssize) tls_static_space) return false; +} else if (obj-tlsalign tls_static_max_align) { + tls_static_max_align = obj-tlsalign; } tls_last_offset = obj-tlsoffset = off; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259294 - in stable/10/sys: kern sys
Author: kib Date: Fri Dec 13 06:09:19 2013 New Revision: 259294 URL: http://svnweb.freebsd.org/changeset/base/259294 Log: MFC r257898: Change VFS_PROLOGUE() to evaluate the mp once, convert MNTK_SHARED_WRITES and MNTK_EXTENDED_SHARED tests into inline functions. Modified: stable/10/sys/kern/vfs_lookup.c stable/10/sys/kern/vfs_vnops.c stable/10/sys/sys/mount.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_lookup.c == --- stable/10/sys/kern/vfs_lookup.c Fri Dec 13 06:06:25 2013 (r259293) +++ stable/10/sys/kern/vfs_lookup.c Fri Dec 13 06:09:19 2013 (r259294) @@ -424,13 +424,8 @@ needs_exclusive_leaf(struct mount *mp, i * extended shared operations, then use a shared lock for the * leaf node, otherwise use an exclusive lock. */ - if (flags ISOPEN) { - if (mp != NULL - (mp-mnt_kern_flag MNTK_EXTENDED_SHARED)) - return (0); - else - return (1); - } + if ((flags ISOPEN) != 0) + return (!MNT_EXTENDED_SHARED(mp)); /* * Lookup requests outside of open() that specify LOCKSHARED Modified: stable/10/sys/kern/vfs_vnops.c == --- stable/10/sys/kern/vfs_vnops.c Fri Dec 13 06:06:25 2013 (r259293) +++ stable/10/sys/kern/vfs_vnops.c Fri Dec 13 06:09:19 2013 (r259294) @@ -360,8 +360,8 @@ vn_close(vp, flags, file_cred, td) struct mount *mp; int error, lock_flags; - if (vp-v_type != VFIFO !(flags FWRITE) vp-v_mount != NULL - vp-v_mount-mnt_kern_flag MNTK_EXTENDED_SHARED) + if (vp-v_type != VFIFO (flags FWRITE) == 0 + MNT_EXTENDED_SHARED(vp-v_mount)) lock_flags = LK_SHARED; else lock_flags = LK_EXCLUSIVE; Modified: stable/10/sys/sys/mount.h == --- stable/10/sys/sys/mount.h Fri Dec 13 06:06:25 2013(r259293) +++ stable/10/sys/sys/mount.h Fri Dec 13 06:09:19 2013(r259294) @@ -362,8 +362,19 @@ void __mnt_vnode_markerfree_act #define MNTK_LOOKUP_SHARED 0x4000 /* FS supports shared lock lookups */ #defineMNTK_NOKNOTE0x8000 /* Don't send KNOTEs from VOP hooks */ -#defineMNT_SHARED_WRITES(mp) (((mp) != NULL) \ - ((mp)-mnt_kern_flag MNTK_SHARED_WRITES)) +static inline int +MNT_SHARED_WRITES(struct mount *mp) +{ + + return (mp != NULL (mp-mnt_kern_flag MNTK_SHARED_WRITES) != 0); +} + +static inline int +MNT_EXTENDED_SHARED(struct mount *mp) +{ + + return (mp != NULL (mp-mnt_kern_flag MNTK_EXTENDED_SHARED) != 0); +} /* * Sysctl CTL_VFS definitions. @@ -636,10 +647,12 @@ struct vfsops { vfs_statfs_t __vfs_statfs; #defineVFS_PROLOGUE(MP)do { \ + struct mount *mp__; \ int _enable_stops; \ \ - _enable_stops = ((MP) != NULL \ - ((MP)-mnt_vfc-vfc_flags VFCF_SBDRY) sigdeferstop()) + mp__ = (MP);\ + _enable_stops = (mp__ != NULL \ + (mp__-mnt_vfc-vfc_flags VFCF_SBDRY) sigdeferstop()) #defineVFS_EPILOGUE(MP) \ if (_enable_stops) \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259295 - stable/10/sys/sys
Author: kib Date: Fri Dec 13 06:10:49 2013 New Revision: 259295 URL: http://svnweb.freebsd.org/changeset/base/259295 Log: MFC r257904: Hide MNT_SHARED_WRITES() and MNT_EXTENDED_SHARED() under the #ifdef _KERNEL braces. Struct mount is only defined for the kernel build. Modified: stable/10/sys/sys/mount.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/mount.h == --- stable/10/sys/sys/mount.h Fri Dec 13 06:09:19 2013(r259294) +++ stable/10/sys/sys/mount.h Fri Dec 13 06:10:49 2013(r259295) @@ -362,6 +362,7 @@ void __mnt_vnode_markerfree_act #define MNTK_LOOKUP_SHARED 0x4000 /* FS supports shared lock lookups */ #defineMNTK_NOKNOTE0x8000 /* Don't send KNOTEs from VOP hooks */ +#ifdef _KERNEL static inline int MNT_SHARED_WRITES(struct mount *mp) { @@ -375,6 +376,7 @@ MNT_EXTENDED_SHARED(struct mount *mp) return (mp != NULL (mp-mnt_kern_flag MNTK_EXTENDED_SHARED) != 0); } +#endif /* * Sysctl CTL_VFS definitions. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259296 - in stable/10/sys: kern vm
Author: kib Date: Fri Dec 13 06:12:21 2013 New Revision: 259296 URL: http://svnweb.freebsd.org/changeset/base/259296 Log: MFC r257899: If filesystem declares that it supports shared locking for writes, use shared vnode lock for VOP_PUTPAGES() as well. Modified: stable/10/sys/kern/vnode_if.src stable/10/sys/vm/vm_pageout.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vnode_if.src == --- stable/10/sys/kern/vnode_if.src Fri Dec 13 06:10:49 2013 (r259295) +++ stable/10/sys/kern/vnode_if.src Fri Dec 13 06:12:21 2013 (r259296) @@ -477,7 +477,7 @@ vop_getpages { }; -%% putpagesvp E E E +%% putpagesvp L L L vop_putpages { IN struct vnode *vp; Modified: stable/10/sys/vm/vm_pageout.c == --- stable/10/sys/vm/vm_pageout.c Fri Dec 13 06:10:49 2013 (r259295) +++ stable/10/sys/vm/vm_pageout.c Fri Dec 13 06:12:21 2013 (r259296) @@ -570,6 +570,7 @@ vm_pageout_launder(struct vm_pagequeue * vm_object_t object; vm_paddr_t pa; vm_page_t m, m_tmp, next; + int lockmode; vm_pagequeue_lock(pq); TAILQ_FOREACH_SAFE(m, pq-pq_pl, plinks.q, next) { @@ -605,7 +606,9 @@ vm_pageout_launder(struct vm_pagequeue * vm_object_reference_locked(object); VM_OBJECT_WUNLOCK(object); (void)vn_start_write(vp, mp, V_WAIT); - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + lockmode = MNT_SHARED_WRITES(vp-v_mount) ? + LK_SHARED : LK_EXCLUSIVE; + vn_lock(vp, lockmode | LK_RETRY); VM_OBJECT_WLOCK(object); vm_object_page_clean(object, 0, 0, OBJPC_SYNC); VM_OBJECT_WUNLOCK(object); @@ -902,6 +905,7 @@ vm_pageout_scan(struct vm_domain *vmd, i int act_delta; int vnodes_skipped = 0; int maxlaunder; + int lockmode; boolean_t queues_locked; /* @@ -1193,7 +1197,9 @@ vm_pageout_scan(struct vm_domain *vmd, i (vp %p with NULL v_mount, vp)); vm_object_reference_locked(object); VM_OBJECT_WUNLOCK(object); - if (vget(vp, LK_EXCLUSIVE | LK_TIMELOCK, + lockmode = MNT_SHARED_WRITES(vp-v_mount) ? + LK_SHARED : LK_EXCLUSIVE; + if (vget(vp, lockmode | LK_TIMELOCK, curthread)) { VM_OBJECT_WLOCK(object); ++pageout_lock_miss; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259297 - stable/10/sys/vm
Author: kib Date: Fri Dec 13 06:25:08 2013 New Revision: 259297 URL: http://svnweb.freebsd.org/changeset/base/259297 Log: MFC r258366: Add assertions to cover all places in the wiring and unwiring code where MAP_ENTRY_IN_TRANSITION is set or cleared. Modified: stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c == --- stable/10/sys/vm/vm_map.c Fri Dec 13 06:12:21 2013(r259296) +++ stable/10/sys/vm/vm_map.c Fri Dec 13 06:25:08 2013(r259297) @@ -2288,6 +2288,9 @@ vm_map_unwire(vm_map_t map, vm_offset_t * Mark the entry in case the map lock is released. (See * above.) */ + KASSERT((entry-eflags MAP_ENTRY_IN_TRANSITION) == 0 + entry-wiring_thread == NULL, + (owned map entry %p, entry)); entry-eflags |= MAP_ENTRY_IN_TRANSITION; entry-wiring_thread = curthread; /* @@ -2356,7 +2359,9 @@ done: } } KASSERT((entry-eflags MAP_ENTRY_IN_TRANSITION) != 0, - (vm_map_unwire: in-transition flag missing)); + (vm_map_unwire: in-transition flag missing %p, entry)); + KASSERT(entry-wiring_thread == curthread, + (vm_map_unwire: alien wire %p, entry)); entry-eflags = ~MAP_ENTRY_IN_TRANSITION; entry-wiring_thread = NULL; if (entry-eflags MAP_ENTRY_NEEDS_WAKEUP) { @@ -2456,6 +2461,9 @@ vm_map_wire(vm_map_t map, vm_offset_t st * Mark the entry in case the map lock is released. (See * above.) */ + KASSERT((entry-eflags MAP_ENTRY_IN_TRANSITION) == 0 + entry-wiring_thread == NULL, + (owned map entry %p, entry)); entry-eflags |= MAP_ENTRY_IN_TRANSITION; entry-wiring_thread = curthread; if ((entry-protection (VM_PROT_READ | VM_PROT_EXECUTE)) == 0 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259298 - stable/9/sys/vm
Author: kib Date: Fri Dec 13 06:25:43 2013 New Revision: 259298 URL: http://svnweb.freebsd.org/changeset/base/259298 Log: MFC r258366: Add assertions to cover all places in the wiring and unwiring code where MAP_ENTRY_IN_TRANSITION is set or cleared. Modified: stable/9/sys/vm/vm_map.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_map.c == --- stable/9/sys/vm/vm_map.cFri Dec 13 06:25:08 2013(r259297) +++ stable/9/sys/vm/vm_map.cFri Dec 13 06:25:43 2013(r259298) @@ -2289,6 +2289,9 @@ vm_map_unwire(vm_map_t map, vm_offset_t * Mark the entry in case the map lock is released. (See * above.) */ + KASSERT((entry-eflags MAP_ENTRY_IN_TRANSITION) == 0 + entry-wiring_thread == NULL, + (owned map entry %p, entry)); entry-eflags |= MAP_ENTRY_IN_TRANSITION; entry-wiring_thread = curthread; /* @@ -2357,7 +2360,9 @@ done: } } KASSERT((entry-eflags MAP_ENTRY_IN_TRANSITION) != 0, - (vm_map_unwire: in-transition flag missing)); + (vm_map_unwire: in-transition flag missing %p, entry)); + KASSERT(entry-wiring_thread == curthread, + (vm_map_unwire: alien wire %p, entry)); entry-eflags = ~MAP_ENTRY_IN_TRANSITION; entry-wiring_thread = NULL; if (entry-eflags MAP_ENTRY_NEEDS_WAKEUP) { @@ -2457,6 +2462,9 @@ vm_map_wire(vm_map_t map, vm_offset_t st * Mark the entry in case the map lock is released. (See * above.) */ + KASSERT((entry-eflags MAP_ENTRY_IN_TRANSITION) == 0 + entry-wiring_thread == NULL, + (owned map entry %p, entry)); entry-eflags |= MAP_ENTRY_IN_TRANSITION; entry-wiring_thread = curthread; if ((entry-protection (VM_PROT_READ | VM_PROT_EXECUTE)) == 0 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259299 - stable/10/sys/vm
Author: kib Date: Fri Dec 13 06:28:18 2013 New Revision: 259299 URL: http://svnweb.freebsd.org/changeset/base/259299 Log: MFC r258367: Verify for zero-length requests and act as if it is always successfull without performing any action on the address space. Modified: stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c == --- stable/10/sys/vm/vm_map.c Fri Dec 13 06:25:43 2013(r259298) +++ stable/10/sys/vm/vm_map.c Fri Dec 13 06:28:18 2013(r259299) @@ -1876,6 +1876,9 @@ vm_map_protect(vm_map_t map, vm_offset_t struct ucred *cred; vm_prot_t old_prot; + if (start == end) + return (KERN_SUCCESS); + vm_map_lock(map); VM_MAP_RANGE_CHECK(map, start, end); @@ -2030,12 +2033,16 @@ vm_map_madvise( case MADV_AUTOSYNC: case MADV_NOCORE: case MADV_CORE: + if (start == end) + return (KERN_SUCCESS); modify_map = 1; vm_map_lock(map); break; case MADV_WILLNEED: case MADV_DONTNEED: case MADV_FREE: + if (start == end) + return (KERN_SUCCESS); vm_map_lock_read(map); break; default: @@ -2190,6 +2197,8 @@ vm_map_inherit(vm_map_t map, vm_offset_t default: return (KERN_INVALID_ARGUMENT); } + if (start == end) + return (KERN_SUCCESS); vm_map_lock(map); VM_MAP_RANGE_CHECK(map, start, end); if (vm_map_lookup_entry(map, start, temp_entry)) { @@ -,6 +2231,8 @@ vm_map_unwire(vm_map_t map, vm_offset_t int rv; boolean_t need_wakeup, result, user_unwire; + if (start == end) + return (KERN_SUCCESS); user_unwire = (flags VM_MAP_WIRE_USER) ? TRUE : FALSE; vm_map_lock(map); VM_MAP_RANGE_CHECK(map, start, end); @@ -2392,6 +2403,8 @@ vm_map_wire(vm_map_t map, vm_offset_t st boolean_t fictitious, need_wakeup, result, user_wire; vm_prot_t prot; + if (start == end) + return (KERN_SUCCESS); prot = 0; if (flags VM_MAP_WIRE_WRITE) prot |= VM_PROT_WRITE; @@ -2833,6 +2846,8 @@ vm_map_delete(vm_map_t map, vm_offset_t vm_map_entry_t first_entry; VM_MAP_ASSERT_LOCKED(map); + if (start == end) + return (KERN_SUCCESS); /* * Find the start of the region, and clip it ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259300 - stable/9/sys/vm
Author: kib Date: Fri Dec 13 06:29:02 2013 New Revision: 259300 URL: http://svnweb.freebsd.org/changeset/base/259300 Log: MFC r258367: Verify for zero-length requests and act as if it is always successfull without performing any action on the address space. Modified: stable/9/sys/vm/vm_map.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_map.c == --- stable/9/sys/vm/vm_map.cFri Dec 13 06:28:18 2013(r259299) +++ stable/9/sys/vm/vm_map.cFri Dec 13 06:29:02 2013(r259300) @@ -1894,6 +1894,9 @@ vm_map_protect(vm_map_t map, vm_offset_t struct ucred *cred; vm_prot_t old_prot; + if (start == end) + return (KERN_SUCCESS); + vm_map_lock(map); VM_MAP_RANGE_CHECK(map, start, end); @@ -2048,12 +2051,16 @@ vm_map_madvise( case MADV_AUTOSYNC: case MADV_NOCORE: case MADV_CORE: + if (start == end) + return (KERN_SUCCESS); modify_map = 1; vm_map_lock(map); break; case MADV_WILLNEED: case MADV_DONTNEED: case MADV_FREE: + if (start == end) + return (KERN_SUCCESS); vm_map_lock_read(map); break; default: @@ -2191,6 +2198,8 @@ vm_map_inherit(vm_map_t map, vm_offset_t default: return (KERN_INVALID_ARGUMENT); } + if (start == end) + return (KERN_SUCCESS); vm_map_lock(map); VM_MAP_RANGE_CHECK(map, start, end); if (vm_map_lookup_entry(map, start, temp_entry)) { @@ -2223,6 +2232,8 @@ vm_map_unwire(vm_map_t map, vm_offset_t int rv; boolean_t need_wakeup, result, user_unwire; + if (start == end) + return (KERN_SUCCESS); user_unwire = (flags VM_MAP_WIRE_USER) ? TRUE : FALSE; vm_map_lock(map); VM_MAP_RANGE_CHECK(map, start, end); @@ -2393,6 +2404,8 @@ vm_map_wire(vm_map_t map, vm_offset_t st boolean_t fictitious, need_wakeup, result, user_wire; vm_prot_t prot; + if (start == end) + return (KERN_SUCCESS); prot = 0; if (flags VM_MAP_WIRE_WRITE) prot |= VM_PROT_WRITE; @@ -2835,6 +2848,8 @@ vm_map_delete(vm_map_t map, vm_offset_t vm_map_entry_t first_entry; VM_MAP_ASSERT_LOCKED(map); + if (start == end) + return (KERN_SUCCESS); /* * Find the start of the region, and clip it ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r259301 - in stable/10/usr.sbin: bhyve bhyveload
Author: grehan Date: Fri Dec 13 06:59:18 2013 New Revision: 259301 URL: http://svnweb.freebsd.org/changeset/base/259301 Log: MFC r256657,r257018,r257347,r257423,r257729,r257767, r257933,r258609,r258614,r258668,r258673,r258855 Pull in some minor bugfixes and functionality enhancements from CURRENT. These are candidates to be moved to 10.0-release. r258855 mdoc: quote string properly. r258673 Don't create an initial value for the host filesystem of /. r258668 Allow bhyve and bhyveload to attach to tty devices. r258614 The 22-bit Data Byte Count (DBC) field of a Physical Region Descriptor was being read as a 32-bit quantity by the bhyve AHCI driver. r258609 Fix discrepancy between the IOAPIC ID advertised by firmware tables and the actual value read by the guest. r257933 Route the legacy timer interrupt (IRQ0) to pin 2 of the IOAPIC. r257767 Fix an off-by-one error when iterating over the emulated PCI BARs. r257729 Add the VM name to the process name with setproctitle(). r257423 Make the virtual ioapic available unconditionally in a bhyve virtual machine. r257347 Update copyright to include the author of the LPC bridge emulation code. hand-merge r257018 Tidy usage messages for bhyve and bhyveload. r256657 Add an option to bhyveload(8) that allows setting a loader environment variable from the command line. Discussed with: neel Modified: stable/10/usr.sbin/bhyve/acpi.c stable/10/usr.sbin/bhyve/acpi.h stable/10/usr.sbin/bhyve/bhyverun.c stable/10/usr.sbin/bhyve/block_if.c stable/10/usr.sbin/bhyve/mevent.c stable/10/usr.sbin/bhyve/mptbl.c stable/10/usr.sbin/bhyve/mptbl.h stable/10/usr.sbin/bhyve/pci_ahci.c stable/10/usr.sbin/bhyve/pci_emul.c stable/10/usr.sbin/bhyve/pci_virtio_net.c stable/10/usr.sbin/bhyve/pit_8254.c stable/10/usr.sbin/bhyve/uart_emul.c stable/10/usr.sbin/bhyveload/bhyveload.8 stable/10/usr.sbin/bhyveload/bhyveload.c Modified: stable/10/usr.sbin/bhyve/acpi.c == --- stable/10/usr.sbin/bhyve/acpi.c Fri Dec 13 06:29:02 2013 (r259300) +++ stable/10/usr.sbin/bhyve/acpi.c Fri Dec 13 06:59:18 2013 (r259301) @@ -253,13 +253,23 @@ basl_fwrite_madt(FILE *fp) EFPRINTF(fp, [0001]\t\tSubtable Type : 01\n); EFPRINTF(fp, [0001]\t\tLength : 0C\n); /* iasl expects a hex value for the i/o apic id */ - EFPRINTF(fp, [0001]\t\tI/O Apic ID : %02x\n, basl_ncpu); + EFPRINTF(fp, [0001]\t\tI/O Apic ID : %02x\n, 0); EFPRINTF(fp, [0001]\t\tReserved : 00\n); EFPRINTF(fp, [0004]\t\tAddress : fec0\n); EFPRINTF(fp, [0004]\t\tInterrupt : \n); EFPRINTF(fp, \n); - /* Override the 8259 chained vector. XXX maybe not needed */ + /* Legacy IRQ0 is connected to pin 2 of the IOAPIC */ + EFPRINTF(fp, [0001]\t\tSubtable Type : 02\n); + EFPRINTF(fp, [0001]\t\tLength : 0A\n); + EFPRINTF(fp, [0001]\t\tBus : 00\n); + EFPRINTF(fp, [0001]\t\tSource : 00\n); + EFPRINTF(fp, [0004]\t\tInterrupt : 0002\n); + EFPRINTF(fp, [0002]\t\tFlags (decoded below) : 0005\n); + EFPRINTF(fp, \t\t\tPolarity : 1\n); + EFPRINTF(fp, \t\t\tTrigger Mode : 1\n); + EFPRINTF(fp, \n); + EFPRINTF(fp, [0001]\t\tSubtable Type : 02\n); EFPRINTF(fp, [0001]\t\tLength : 0A\n); EFPRINTF(fp, [0001]\t\tBus : 00\n); @@ -806,7 +816,7 @@ static struct { }; int -acpi_build(struct vmctx *ctx, int ncpu, int ioapic) +acpi_build(struct vmctx *ctx, int ncpu) { int err; int i; @@ -814,11 +824,6 @@ acpi_build(struct vmctx *ctx, int ncpu, err = 0; basl_ncpu = ncpu; - if (!ioapic) { - fprintf(stderr, ACPI tables require an ioapic\n); - return (EINVAL); - } - /* * For debug, allow the user to have iasl compiler output sent * to stdout rather than /dev/null Modified: stable/10/usr.sbin/bhyve/acpi.h == --- stable/10/usr.sbin/bhyve/acpi.h Fri Dec 13 06:29:02 2013 (r259300) +++ stable/10/usr.sbin/bhyve/acpi.h Fri Dec 13 06:59:18 2013 (r259301) @@ -29,6 +29,6 @@ #ifndef _ACPI_H_ #define _ACPI_H_ -intacpi_build(struct vmctx *ctx, int ncpu, int ioapic); +intacpi_build(struct vmctx *ctx, int ncpu); #endif /* _ACPI_H_ */ Modified: stable/10/usr.sbin/bhyve/bhyverun.c == --- stable/10/usr.sbin/bhyve/bhyverun.c Fri Dec 13 06:29:02 2013 (r259300) +++ stable/10/usr.sbin/bhyve/bhyverun.c Fri Dec 13 06:59:18 2013 (r259301) @@ -132,7 +132,6 @@ usage(int code) -c: # cpus (default 1)\n -p: pin vcpu 'n' to host cpu 'pincpu + n'\n
Re: svn commit: r259280 - head/sbin/growfs
On 13 December 2013 02:33, Gleb Smirnoff gleb...@freebsd.org wrote: Author: glebius Date: Thu Dec 12 22:33:32 2013 New Revision: 259280 URL: http://svnweb.freebsd.org/changeset/base/259280 Log: Somehow stable/10 branch contains correct version, but head doesn't. Modified: head/sbin/growfs/growfs.8 Modified: head/sbin/growfs/growfs.8 == --- head/sbin/growfs/growfs.8 Thu Dec 12 22:04:47 2013(r259279) +++ head/sbin/growfs/growfs.8 Thu Dec 12 22:33:32 2013(r259280) @@ -116,7 +116,7 @@ The utility first appeared in .Fx 4.4 . The ability to resize mounted filesystems was added in -.Fx 9.2 . +.Fx 10.0 . .Sh AUTHORS .An Christoph Herrmann Aq c...@freebsd.org .An Thomas-Henning von Kamptz Aq toms...@freebsd.org It was merged in stable/9 before 9.2 in r246235. -- wbr, pluknet ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org