svn commit: r249762 - head/sys/arm/arm
Author: dmarion Date: Mon Apr 22 08:28:53 2013 New Revision: 249762 URL: http://svnweb.freebsd.org/changeset/base/249762 Log: Initialize GIC_PMRR register on ARM GIC. Provided by: Thomas Skibo Modified: head/sys/arm/arm/gic.c Modified: head/sys/arm/arm/gic.c == --- head/sys/arm/arm/gic.c Mon Apr 22 06:47:27 2013(r249761) +++ head/sys/arm/arm/gic.c Mon Apr 22 08:28:53 2013(r249762) @@ -134,6 +134,9 @@ gic_init_secondary(void) /* Enable CPU interface */ gic_c_write_4(GICC_CTLR, 1); + /* Set priority mask register. */ + gic_c_write_4(GICC_PMR, 0xff); + /* Enable interrupt distribution */ gic_d_write_4(GICD_CTLR, 0x01); @@ -199,6 +202,9 @@ arm_gic_attach(device_t dev) /* Enable CPU interface */ gic_c_write_4(GICC_CTLR, 1); + /* Set priority mask register. */ + gic_c_write_4(GICC_PMR, 0xff); + /* Enable interrupt distribution */ gic_d_write_4(GICD_CTLR, 0x01); ___ 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: r249763 - head/sys/vm
Author: glebius Date: Mon Apr 22 09:02:23 2013 New Revision: 249763 URL: http://svnweb.freebsd.org/changeset/base/249763 Log: Panic if UMA_ZONE_PCPU is created at early stages of boot, when mp_ncpus isn't yet initialized. Otherwise we will panic at first allocation later. Sponsored by: Nginx, Inc. Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c == --- head/sys/vm/uma_core.c Mon Apr 22 08:28:53 2013(r249762) +++ head/sys/vm/uma_core.c Mon Apr 22 09:02:23 2013(r249763) @@ -1139,6 +1139,7 @@ keg_small_init(uma_keg_t keg) u_int shsize; if (keg->uk_flags & UMA_ZONE_PCPU) { + KASSERT(mp_ncpus > 0, ("%s: ncpus %d\n", __func__, mp_ncpus)); keg->uk_slabsize = sizeof(struct pcpu); keg->uk_ppera = howmany(mp_ncpus * sizeof(struct pcpu), PAGE_SIZE); ___ 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: r249764 - head/lib/libc/sys
Author: pluknet Date: Mon Apr 22 09:18:50 2013 New Revision: 249764 URL: http://svnweb.freebsd.org/changeset/base/249764 Log: Keep up with negative addrlen check removal in r249649. Modified: head/lib/libc/sys/accept.2 Modified: head/lib/libc/sys/accept.2 == --- head/lib/libc/sys/accept.2 Mon Apr 22 09:02:23 2013(r249763) +++ head/lib/libc/sys/accept.2 Mon Apr 22 09:18:50 2013(r249764) @@ -28,7 +28,7 @@ .\" @(#)accept.2 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd March 26, 2013 +.Dd April 22, 2013 .Dt ACCEPT 2 .Os .Sh NAME @@ -164,10 +164,6 @@ The descriptor references a file, not a .It Bq Er EINVAL .Xr listen 2 has not been called on the socket descriptor. -.It Bq Er EINVAL -The -.Fa addrlen -argument is negative. .It Bq Er EFAULT The .Fa addr ___ 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: r249765 - in head/sys: dev/uart modules/uart
Author: nyan Date: Mon Apr 22 13:02:41 2013 New Revision: 249765 URL: http://svnweb.freebsd.org/changeset/base/249765 Log: Build uart_dev_lpc.c on arm only. This fixes pc98 build. Modified: head/sys/dev/uart/uart_subr.c head/sys/modules/uart/Makefile Modified: head/sys/dev/uart/uart_subr.c == --- head/sys/dev/uart/uart_subr.c Mon Apr 22 09:18:50 2013 (r249764) +++ head/sys/dev/uart/uart_subr.c Mon Apr 22 13:02:41 2013 (r249765) @@ -52,7 +52,9 @@ static struct uart_class *uart_classes[] &uart_ns8250_class, &uart_sab82532_class, &uart_z8530_class, +#if defined(__arm__) &uart_lpc_class, +#endif }; static size_t uart_nclasses = sizeof(uart_classes) / sizeof(uart_classes[0]); Modified: head/sys/modules/uart/Makefile == --- head/sys/modules/uart/Makefile Mon Apr 22 09:18:50 2013 (r249764) +++ head/sys/modules/uart/Makefile Mon Apr 22 13:02:41 2013 (r249765) @@ -6,6 +6,10 @@ uart_bus_ebus= uart_bus_ebus.c .endif +.if ${MACHINE_CPUARCH} == "arm" +uart_dev_lpc= uart_dev_lpc.c +.endif + .if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "sparc64" ofw_bus_if=ofw_bus_if.h .endif @@ -23,7 +27,7 @@ KMOD= uart SRCS= uart_bus_acpi.c ${uart_bus_ebus} uart_bus_isa.c uart_bus_pccard.c \ uart_bus_pci.c uart_bus_puc.c uart_bus_scc.c \ uart_core.c ${uart_cpu_machine} uart_dbg.c \ - uart_dev_lpc.c uart_dev_ns8250.c uart_dev_quicc.c uart_dev_sab82532.c \ + ${uart_dev_lpc} uart_dev_ns8250.c uart_dev_quicc.c uart_dev_sab82532.c \ uart_dev_z8530.c \ uart_if.c uart_if.h uart_subr.c uart_tty.c ___ 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: r249765 - in head/sys: dev/uart modules/uart
Sorry! I should've read the tinderbox failures. Pointy hat to: jhibbits On Apr 22, 2013 6:02 AM, "Takahashi Yoshihiro" wrote: > Author: nyan > Date: Mon Apr 22 13:02:41 2013 > New Revision: 249765 > URL: http://svnweb.freebsd.org/changeset/base/249765 > > Log: > Build uart_dev_lpc.c on arm only. This fixes pc98 build. > > Modified: > head/sys/dev/uart/uart_subr.c > head/sys/modules/uart/Makefile > > Modified: head/sys/dev/uart/uart_subr.c > > == > --- head/sys/dev/uart/uart_subr.c Mon Apr 22 09:18:50 2013 > (r249764) > +++ head/sys/dev/uart/uart_subr.c Mon Apr 22 13:02:41 2013 > (r249765) > @@ -52,7 +52,9 @@ static struct uart_class *uart_classes[] > &uart_ns8250_class, > &uart_sab82532_class, > &uart_z8530_class, > +#if defined(__arm__) > &uart_lpc_class, > +#endif > }; > static size_t uart_nclasses = sizeof(uart_classes) / > sizeof(uart_classes[0]); > > > Modified: head/sys/modules/uart/Makefile > > == > --- head/sys/modules/uart/Makefile Mon Apr 22 09:18:50 2013 > (r249764) > +++ head/sys/modules/uart/Makefile Mon Apr 22 13:02:41 2013 > (r249765) > @@ -6,6 +6,10 @@ > uart_bus_ebus= uart_bus_ebus.c > .endif > > +.if ${MACHINE_CPUARCH} == "arm" > +uart_dev_lpc= uart_dev_lpc.c > +.endif > + > .if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "sparc64" > ofw_bus_if=ofw_bus_if.h > .endif > @@ -23,7 +27,7 @@ KMOD= uart > SRCS= uart_bus_acpi.c ${uart_bus_ebus} uart_bus_isa.c uart_bus_pccard.c \ > uart_bus_pci.c uart_bus_puc.c uart_bus_scc.c \ > uart_core.c ${uart_cpu_machine} uart_dbg.c \ > - uart_dev_lpc.c uart_dev_ns8250.c uart_dev_quicc.c > uart_dev_sab82532.c \ > + ${uart_dev_lpc} uart_dev_ns8250.c uart_dev_quicc.c > uart_dev_sab82532.c \ > uart_dev_z8530.c \ > uart_if.c uart_if.h uart_subr.c uart_tty.c > > ___ 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: r249766 - head/sbin/dhclient
Author: jhb Date: Mon Apr 22 15:02:32 2013 New Revision: 249766 URL: http://svnweb.freebsd.org/changeset/base/249766 Log: Use a higher TTL (128) for DHCP packets. This matches the ISC DHCP client. PR: bin/170279 MFC after:1 week Modified: head/sbin/dhclient/packet.c Modified: head/sbin/dhclient/packet.c == --- head/sbin/dhclient/packet.c Mon Apr 22 13:02:41 2013(r249765) +++ head/sbin/dhclient/packet.c Mon Apr 22 15:02:32 2013(r249766) @@ -128,7 +128,7 @@ assemble_udp_ip_header(unsigned char *bu ip.ip_len = htons(sizeof(ip) + sizeof(udp) + len); ip.ip_id = 0; ip.ip_off = 0; - ip.ip_ttl = 16; + ip.ip_ttl = 128; ip.ip_p = IPPROTO_UDP; ip.ip_sum = 0; ip.ip_src.s_addr = from; ___ 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: r249767 - head/sys/dev/acpica
Author: jhb Date: Mon Apr 22 15:51:06 2013 New Revision: 249767 URL: http://svnweb.freebsd.org/changeset/base/249767 Log: - Some BIOSes use an Extended IRQ resource descriptor in _PRS for a link that uses non-ISA IRQs but use a plain IRQ resource in _CRS. However, a non-ISA IRQ can't fit into a plain IRQ resource. If we encounter a link like this, build the resource buffer from _PRS instead of _CRS. - Set the correct size of the end tag in a resource buffer. Tested by:Benjamin Lee MFC after:2 weeks Modified: head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpi_pci_link.c Modified: head/sys/dev/acpica/acpi.c == --- head/sys/dev/acpica/acpi.c Mon Apr 22 15:02:32 2013(r249766) +++ head/sys/dev/acpica/acpi.c Mon Apr 22 15:51:06 2013(r249767) @@ -2334,7 +2334,7 @@ acpi_AppendBufferResource(ACPI_BUFFER *b return (AE_NO_MEMORY); rp = (ACPI_RESOURCE *)buf->Pointer; rp->Type = ACPI_RESOURCE_TYPE_END_TAG; - rp->Length = 0; + rp->Length = ACPI_RS_SIZE_MIN; } if (res == NULL) return (AE_OK); @@ -2384,7 +2384,7 @@ acpi_AppendBufferResource(ACPI_BUFFER *b /* And add the terminator. */ rp = ACPI_NEXT_RESOURCE(rp); rp->Type = ACPI_RESOURCE_TYPE_END_TAG; -rp->Length = 0; +rp->Length = ACPI_RS_SIZE_MIN; return (AE_OK); } Modified: head/sys/dev/acpica/acpi_pci_link.c == --- head/sys/dev/acpica/acpi_pci_link.c Mon Apr 22 15:02:32 2013 (r249766) +++ head/sys/dev/acpica/acpi_pci_link.c Mon Apr 22 15:51:06 2013 (r249767) @@ -99,6 +99,7 @@ struct link { uint8_t l_bios_irq; uint8_t l_irq; uint8_t l_initial_irq; + UINT32 l_crs_type; int l_res_index; int l_num_irqs; int *l_irqs; @@ -236,6 +237,7 @@ link_add_crs(ACPI_RESOURCE *res, void *c ("%s: array boundary violation", __func__)); link = &req->sc->pl_links[req->link_index]; link->l_res_index = req->res_index; + link->l_crs_type = res->Type; req->link_index++; req->res_index++; @@ -364,6 +366,14 @@ link_add_prs(ACPI_RESOURCE *res, void *c link->l_isa_irq = FALSE; } } + + /* +* If this is not an ISA IRQ but _CRS used a non-extended +* IRQ descriptor, don't use _CRS as a template for _SRS. +*/ + if (!req->sc->pl_crs_bad && !link->l_isa_irq && + link->l_crs_type == ACPI_RESOURCE_TYPE_IRQ) + req->sc->pl_crs_bad = TRUE; break; default: if (req->in_dpf == DPF_IGNORE) ___ 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: r249768 - head/sbin/geom/class/label
Author: joel (doc committer) Date: Mon Apr 22 17:38:26 2013 New Revision: 249768 URL: http://svnweb.freebsd.org/changeset/base/249768 Log: Minor clarificiation. PR: 177455 Modified: head/sbin/geom/class/label/glabel.8 Modified: head/sbin/geom/class/label/glabel.8 == --- head/sbin/geom/class/label/glabel.8 Mon Apr 22 15:51:06 2013 (r249767) +++ head/sbin/geom/class/label/glabel.8 Mon Apr 22 17:38:26 2013 (r249768) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 13, 2009 +.Dd April 22, 2013 .Dt GLABEL 8 .Os .Sh NAME @@ -81,7 +81,7 @@ The method uses on-disk metadata to store the label and detect it automatically in the future. .Pp -This class also provides volume label detection for file systems. +This GEOM class also provides volume label detection for file systems. Those labels cannot be set with .Nm , but must be set with the appropriate file system utility, e.g.\& for UFS ___ 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: r249769 - head/bin/domainname
Author: joel (doc committer) Date: Mon Apr 22 17:55:12 2013 New Revision: 249769 URL: http://svnweb.freebsd.org/changeset/base/249769 Log: Point users towards nisdomainname and rc.conf. PR: 144630 Submitted by: Stefan Krueger , Fel Modified: head/bin/domainname/domainname.1 Modified: head/bin/domainname/domainname.1 == --- head/bin/domainname/domainname.1Mon Apr 22 17:38:26 2013 (r249768) +++ head/bin/domainname/domainname.1Mon Apr 22 17:55:12 2013 (r249769) @@ -29,7 +29,7 @@ .\"From: @(#)hostname.18.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.Dd September 18, 1994 +.Dd April 22, 2013 .Dt DOMAINNAME 1 .Os .Sh NAME @@ -43,10 +43,11 @@ The .Nm utility prints the name of the current YP/NIS domain. The super-user can -set the domain name by supplying an argument; this is usually done in the -network initialization script -.Pa /etc/rc.network , -normally run at boot +set the domain name by supplying an argument; this is usually done with the +.Va nisdomainname +variable in the +.Pa /etc/rc.conf +file, normally run at boot time. .Sh NOTES The YP/NIS (formerly ``Yellow Pages'' but renamed for legal reasons) @@ -54,7 +55,8 @@ domain name does not necessarily have an Name System domain name, although they are often set equal for administrative convenience. .Sh SEE ALSO -.Xr getdomainname 3 +.Xr getdomainname 3 , +.Xr rc.conf 5 .Sh HISTORY The .Nm ___ 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: r249770 - head/share/mk
Author: sjg Date: Mon Apr 22 18:11:29 2013 New Revision: 249770 URL: http://svnweb.freebsd.org/changeset/base/249770 Log: Pass more variables to bsd.prog.mk and only append to already defined variables. Submitted by: Garrett Cooper Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk == --- head/share/mk/bsd.progs.mk Mon Apr 22 17:55:12 2013(r249769) +++ head/share/mk/bsd.progs.mk Mon Apr 22 18:11:29 2013(r249770) @@ -36,9 +36,11 @@ PROG ?= $t .if defined(PROG) # just one of many -PROG_VARS += CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS LDADD MAN SRCS +PROG_VARS += BINDIR CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS LDADD MAN SRCS .for v in ${PROG_VARS:O:u} +.if defined(${v}.${PROG}) $v += ${${v}_${PROG}:U${${v}.${PROG}}} +.endif .endfor # for meta mode, there can be only one! @@ -64,7 +66,8 @@ UPDATE_DEPENDFILE = NO .include <${.PARSEFILE:S,progs,prog,}> .ifndef PROG -PROGS_TARGETS += clean +# tell progs.mk we might want to install things +PROGS_TARGETS+= cleandepend cleandir cleanobj depend install .for p in ${PROGS} .if defined(PROGS_CXX) && !empty(PROGS_CXX:M$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: r249771 - head/usr.sbin/timed/timed
Author: joel (doc committer) Date: Mon Apr 22 18:31:39 2013 New Revision: 249771 URL: http://svnweb.freebsd.org/changeset/base/249771 Log: Minor update about rc.conf. Modified: head/usr.sbin/timed/timed/timed.8 Modified: head/usr.sbin/timed/timed/timed.8 == --- head/usr.sbin/timed/timed/timed.8 Mon Apr 22 18:11:29 2013 (r249770) +++ head/usr.sbin/timed/timed/timed.8 Mon Apr 22 18:31:39 2013 (r249771) @@ -44,7 +44,7 @@ The .Nm utility is a time server daemon which is normally invoked at boot time from the -.Xr rc.network 8 +.Xr rc.conf 5 file. It synchronizes the host's time with the time of other machines, which are also running ___ 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: r249771 - head/usr.sbin/timed/timed
On Apr 22, 2013, at 11:31 AM, Joel Dahl wrote: > Author: joel (doc committer) > Date: Mon Apr 22 18:31:39 2013 > New Revision: 249771 > URL: http://svnweb.freebsd.org/changeset/base/249771 > > Log: > Minor update about rc.conf. > > Modified: > head/usr.sbin/timed/timed/timed.8 > > Modified: head/usr.sbin/timed/timed/timed.8 > == > --- head/usr.sbin/timed/timed/timed.8Mon Apr 22 18:11:29 2013(r249770) > +++ head/usr.sbin/timed/timed/timed.8Mon Apr 22 18:31:39 2013(r249771) > @@ -44,7 +44,7 @@ The > .Nm > utility is a time server daemon > which is normally invoked at boot time from the > -.Xr rc.network 8 > +.Xr rc.conf 5 > file. Neither of these is correct; ntpd/ntpdate are executed via their respective rc scripts, which is executed by rc.subr. I would just delete this portion of the sentence TBH as it's unfortunately misleading :/.. Thanks! -Garrett ___ 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: r249774 - head/sys/boot/fdt/dts
Author: gonzo Date: Mon Apr 22 18:53:36 2013 New Revision: 249774 URL: http://svnweb.freebsd.org/changeset/base/249774 Log: Split BeagleBone DTS to generic AM335x part and Beagle-bone specific Added: head/sys/boot/fdt/dts/am335x.dtsi (contents, props changed) Modified: head/sys/boot/fdt/dts/beaglebone.dts Added: head/sys/boot/fdt/dts/am335x.dtsi == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/am335x.dtsi Mon Apr 22 18:53:36 2013 (r249774) @@ -0,0 +1,225 @@ +/*- + * Copyright (c) 2012 Damjan Marion + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/ { + compatible = "ti,am335x"; + #address-cells = <1>; + #size-cells = <1>; + + interrupt-parent = <&AINTC>; + + SOC: am335x { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges; + bus-frequency = <0>; + + AINTC: interrupt-controller@4820 { + compatible = "ti,aintc"; + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + reg = < 0x4820 0x1000 >; + }; + + scm@44e1 { + compatible = "ti,scm"; + reg = < 0x44e1 0x2000 >; + /* Set of triplets < padname, muxname, padstate> */ + scm-pad-config = + /* I2C0 */ + "I2C0_SDA", "I2C0_SDA","i2c", + "I2C0_SCL", "I2C0_SCL","i2c", + /* Ethernet */ + "MII1_RX_ER", "gmii1_rxerr", "input_pulldown", + "MII1_TX_EN", "gmii1_txen", "output", + "MII1_RX_DV", "gmii1_rxdv", "input_pulldown", + "MII1_TXD3", "gmii1_txd3", "output", + "MII1_TXD2", "gmii1_txd2", "output", + "MII1_TXD1", "gmii1_txd1", "output", + "MII1_TXD0", "gmii1_txd0", "output", + "MII1_TX_CLK", "gmii1_txclk", "input_pulldown", + "MII1_RX_CLK", "gmii1_rxclk", "input_pulldown", + "MII1_RXD3", "gmii1_rxd3", "input_pulldown", + "MII1_RXD2", "gmii1_rxd2", "input_pulldown", + "MII1_RXD1", "gmii1_rxd1", "input_pulldown", + "MII1_RXD0", "gmii1_rxd0", "input_pulldown", + "MDIO", "mdio_data", "input_pullup", + "MDC", "mdio_clk", "output_pullup", + /* MMCSD0 */ + "MMC0_CMD", "mmc0_cmd", "input_pullup", + "MMC0_CLK", "mmc0_clk", "input_pullup", + "MMC0_DAT0", "mmc0_dat0", "input_pullup", + "MMC0_DAT1", "mmc0_dat1", "input_pullup", + "MMC0_DAT2", "mmc0_dat2", "input_pullup", + "MMC0_DAT3", "mmc0_dat3", "input_pullup", + /* GPIO */ + "ECAP0_IN_PWM0_OUT", "gpio0_7", "input_pulldown", + "GPMC_AD10", "gpio0_26", "input_pulldown", + "GPMC_AD11", "gpio0_27", "input_pulldow
svn commit: r249775 - head/sys/dev/etherswitch/arswitch
Author: adrian Date: Mon Apr 22 18:58:12 2013 New Revision: 249775 URL: http://svnweb.freebsd.org/changeset/base/249775 Log: Update arswitch to the new API. Modified: head/sys/dev/etherswitch/arswitch/arswitch.c Modified: head/sys/dev/etherswitch/arswitch/arswitch.c == --- head/sys/dev/etherswitch/arswitch/arswitch.cMon Apr 22 18:53:36 2013(r249774) +++ head/sys/dev/etherswitch/arswitch/arswitch.cMon Apr 22 18:58:12 2013(r249775) @@ -435,7 +435,7 @@ arswitch_getport(device_t dev, etherswit if (p->es_port < 0 || p->es_port >= AR8X16_NUM_PORTS) return (ENXIO); - p->es_vlangroup = 0; + p->es_pvid = 0; mii = arswitch_miiforport(sc, p->es_port); if (p->es_port == 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: r249776 - in head/sys/mips: include mips
Author: brooks Date: Mon Apr 22 19:02:37 2013 New Revision: 249776 URL: http://svnweb.freebsd.org/changeset/base/249776 Log: MFP4 223084, 227821: Partially implement generic_bs_*_8() for MIPS platforms. This is known to work with TARGET_ARCH=mips64 with FreeBSD/BERI. Assuming that other definitions in cpufunc.h are correct it will work on non-o64 ABI systems except sibyte. On sibyte and o32 systems generic_bs_*_8() will remain panic() implementations. Sponsored by: DARPA, AFRL Reviewed by: imp, jmallett (older versions) Modified: head/sys/mips/include/cpufunc.h head/sys/mips/mips/bus_space_generic.c Modified: head/sys/mips/include/cpufunc.h == --- head/sys/mips/include/cpufunc.h Mon Apr 22 18:58:12 2013 (r249775) +++ head/sys/mips/include/cpufunc.h Mon Apr 22 19:02:37 2013 (r249776) @@ -354,9 +354,15 @@ void mips3_sd(volatile uint64_t *, uint6 #definereadb(va) (*(volatile uint8_t *) (va)) #definereadw(va) (*(volatile uint16_t *) (va)) #definereadl(va) (*(volatile uint32_t *) (va)) +#if defined(__GNUC__) && !defined(__mips_o32) +#definereadq(a)(*(volatile uint64_t *)(a)) +#endif #definewriteb(va, d) (*(volatile uint8_t *) (va) = (d)) #definewritew(va, d) (*(volatile uint16_t *) (va) = (d)) #definewritel(va, d) (*(volatile uint32_t *) (va) = (d)) +#if defined(__GNUC__) && !defined(__mips_o32) +#definewriteq(va, d) (*(volatile uint64_t *) (va) = (d)) +#endif #endif /* !_MACHINE_CPUFUNC_H_ */ Modified: head/sys/mips/mips/bus_space_generic.c == --- head/sys/mips/mips/bus_space_generic.c Mon Apr 22 18:58:12 2013 (r249775) +++ head/sys/mips/mips/bus_space_generic.c Mon Apr 22 19:02:37 2013 (r249776) @@ -202,9 +202,11 @@ static struct bus_space generic_space = #define rd8(a) cvmx_read64_uint8(a) #define rd16(a) cvmx_read64_uint16(a) #define rd32(a) cvmx_read64_uint32(a) +#define rd64(a) cvmx_read64_uint64(a) #define wr8(a, v) cvmx_write64_uint8(a, v) #define wr16(a, v) cvmx_write64_uint16(a, v) #define wr32(a, v) cvmx_write64_uint32(a, v) +#define wr64(a, v) cvmx_write64_uint64(a, v) #elif defined(CPU_SB1) && _BYTE_ORDER == _BIG_ENDIAN #include #define rd8(a) sb_big_endian_read8(a) @@ -217,9 +219,15 @@ static struct bus_space generic_space = #define rd8(a) readb(a) #define rd16(a) readw(a) #define rd32(a) readl(a) +#ifdef readq +#define rd64(a)readq((a)) +#endif #define wr8(a, v) writeb(a, v) #define wr16(a, v) writew(a, v) #define wr32(a, v) writel(a, v) +#ifdef writeq +#define wr64(a, v) writeq(a, v) +#endif #endif /* generic bus_space tag */ @@ -297,7 +305,11 @@ uint64_t generic_bs_r_8(void *t, bus_space_handle_t handle, bus_size_t offset) { +#ifdef rd64 + return(rd64(handle + offset)); +#else panic("%s: not implemented", __func__); +#endif } void @@ -333,8 +345,14 @@ void generic_bs_rm_8(void *t, bus_space_handle_t bsh, bus_size_t offset, uint64_t *addr, size_t count) { +#ifdef rd64 + bus_addr_t baddr = bsh + offset; + while (count--) + *addr++ = rd64(baddr); +#else panic("%s: not implemented", __func__); +#endif } /* @@ -382,8 +400,16 @@ void generic_bs_rr_8(void *t, bus_space_handle_t bsh, bus_size_t offset, uint64_t *addr, size_t count) { +#ifdef rd64 + bus_addr_t baddr = bsh + offset; + while (count--) { + *addr++ = rd64(baddr); + baddr += 8; + } +#else panic("%s: not implemented", __func__); +#endif } /* @@ -419,7 +445,11 @@ generic_bs_w_8(void *t, bus_space_handle uint64_t value) { +#ifdef wr64 + wr64(bsh + offset, value); +#else panic("%s: not implemented", __func__); +#endif } /* @@ -460,8 +490,14 @@ void generic_bs_wm_8(void *t, bus_space_handle_t bsh, bus_size_t offset, const uint64_t *addr, size_t count) { +#ifdef wr64 + bus_addr_t baddr = bsh + offset; + while (count--) + wr64(baddr, *addr++); +#else panic("%s: not implemented", __func__); +#endif } /* @@ -508,8 +544,16 @@ void generic_bs_wr_8(void *t, bus_space_handle_t bsh, bus_size_t offset, const uint64_t *addr, size_t count) { +#ifdef wr64 + bus_addr_t baddr = bsh + offset; + while (count--) { + wr64(baddr, *addr++); + baddr += 8; + } +#else panic("%s: not implemented", __func__); +#endif } /* @@ -550,8 +594,14 @@ void generic_bs_sm_8(void *t, bus_space_handle_t bsh, bus_size_t offset, uint64_t value, size_t count) { +#ifdef wr64 + bus_addr_t addr = bsh + offset; + while (count--) + wr64(addr, value); +#else panic("%s: not implemented", __func__); +#endif }
svn commit: r249778 - head/share/man/man5
Author: joel (doc committer) Date: Mon Apr 22 20:14:57 2013 New Revision: 249778 URL: http://svnweb.freebsd.org/changeset/base/249778 Log: Update description of process status output. PR: 143850 Submitted by: Slaven Rezic Modified: head/share/man/man5/procfs.5 Modified: head/share/man/man5/procfs.5 == --- head/share/man/man5/procfs.5Mon Apr 22 19:38:56 2013 (r249777) +++ head/share/man/man5/procfs.5Mon Apr 22 20:14:57 2013 (r249778) @@ -2,7 +2,7 @@ .\" Written by Garrett Wollman .\" This file is in the public domain. .\" -.Dd September 22, 2009 +.Dd April 22, 2013 .Dt PROCFS 5 .Os .Sh NAME @@ -155,9 +155,10 @@ process group id .It session id .It -.Ar major , Ns Ar minor +device name of the controlling terminal, or -.Dv -1,-1 +a minus sign +.Pq Dq - if there is no controlling terminal. .It a list of process flags: ___ 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: r249779 - in head/usr.sbin/bsdconfig/share: . media
Author: dteske Date: Mon Apr 22 21:03:44 2013 New Revision: 249779 URL: http://svnweb.freebsd.org/changeset/base/249779 Log: Fix "-D file" to automagically enable debugging if not explicitly disabled. Modified: head/usr.sbin/bsdconfig/share/common.subr head/usr.sbin/bsdconfig/share/media/options.subr head/usr.sbin/bsdconfig/share/script.subr head/usr.sbin/bsdconfig/share/variable.subr Modified: head/usr.sbin/bsdconfig/share/common.subr == --- head/usr.sbin/bsdconfig/share/common.subr Mon Apr 22 20:14:57 2013 (r249778) +++ head/usr.sbin/bsdconfig/share/common.subr Mon Apr 22 21:03:44 2013 (r249779) @@ -100,23 +100,21 @@ f_debug_init() # # Process stored command-line arguments # - ( set -- "$ARGV" - while getopts d flag > /dev/null; do - case "$flag" in - d) true; exit;; - \?) continue;; - esac - done - false - ) && debug=1 - debugFile=$( set -- "$ARGV" - while getopts D flag > /dev/null; do - case "$flag" in - D) echo "$OPTARG";; - \?) continue;; - esac - done - ) + set -- $ARGV + local OPTIND + while getopts dD: flag > /dev/null; do + case "$flag" in + d) debug=1;; + D) debugFile="$OPTARG";; + \?) continue;; + esac + done + shift $(( $OPTIND - 1 )) + + # + # Automagically enable debugging if debugFile is set (and non-NULL) + # + [ "$debugFile" ] && { [ "${debug+set}" ] || debug=1; } # # Make debugging persistant if set Modified: head/usr.sbin/bsdconfig/share/media/options.subr == --- head/usr.sbin/bsdconfig/share/media/options.subrMon Apr 22 20:14:57 2013(r249778) +++ head/usr.sbin/bsdconfig/share/media/options.subrMon Apr 22 21:03:44 2013(r249779) @@ -111,6 +111,15 @@ f_media_options_menu() '$msg_emit_extra_debugging_output'" fi + f_getvar $VAR_NO_CONFIRM cp + if [ "$cp" ]; then menu_list="$menu_list + ' $msg_yes_to_all' 'YES' + '$msg_assume_yes_to_all_non_critical_dialogs'" + else menu_list="$menu_list + ' $msg_yes_to_all' 'NO' + '$msg_assume_yes_to_all_non_critical_dialogs'" + fi + f_getvar $VAR_TRY_DHCP cp if [ "$cp" = "YES" ]; then menu_list="$menu_list ' $msg_dhcp' 'YES' @@ -179,6 +188,11 @@ f_media_options_menu() ' $msg_media_timeout' '$cp' '$msg_timeout_value_in_seconds_for_slow_media'" + f_getvar $VAR_PKG_TMPDIR cp + menu_list="$menu_list + ' $msg_package_temp' '$cp' + '$msg_directory_where_package_temporary_files_go'" + menu_list="$menu_list ' $msg_rescan_devices' '<*>' '$msg_rerun_bsdconfig_initial_device_probe' @@ -260,6 +274,12 @@ f_media_options_menu() else export $VAR_DEBUG=1 fi ;; + " $msg_yes_to_all") + if f_getvar $VAR_NO_CONFIRM cp && [ "$cp" ]; then + unset $VAR_NO_CONFIRM + else + export $VAR_NO_CONFIRM=1 + fi ;; " $msg_dhcp") f_getvar $VAR_TRY_DHCP cp if [ "$cp" = "YES" ]; then @@ -290,6 +310,10 @@ f_media_options_menu() f_variable_get_value $VAR_MEDIA_TIMEOUT \ "$msg_please_specify_the_number_of_seconds_to_wait" ;; + " $msg_package_temp") + f_variable_get_value $VAR_PKG_TMPDIR \ + "$msg_please_specify_a_temporary_directory" + ;; " $msg_rescan_devices") f_device_rescan ;; " $msg_use_defaults") Modified: head/usr.sbin/bsdconfig/share/script.subr == --- head/usr.sbin/bsdconfig/share/script.subr Mon Apr 22 20:14:57 2013 (r249778) +++ head/usr.sbin/bsdconfig/share/script.subr Mon Apr 22 21:03:44 2013 (r249779) @@ -32,6 +32,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig" . $BSDCFG_SHARE/common.subr || exit 1 f_dprintf "%s: loading
svn commit: r249780 - in head/usr.sbin/bsdconfig/share: . media
Author: dteske Date: Mon Apr 22 21:11:27 2013 New Revision: 249780 URL: http://svnweb.freebsd.org/changeset/base/249780 Log: Partially uncommit r249779. The changes to share/common.subr were good while the remaining changes were part of a much larger ``secret sauce'' involved in an up-coming commit that I'm still laboring on. Modified: head/usr.sbin/bsdconfig/share/media/options.subr head/usr.sbin/bsdconfig/share/script.subr head/usr.sbin/bsdconfig/share/variable.subr Modified: head/usr.sbin/bsdconfig/share/media/options.subr == --- head/usr.sbin/bsdconfig/share/media/options.subrMon Apr 22 21:03:44 2013(r249779) +++ head/usr.sbin/bsdconfig/share/media/options.subrMon Apr 22 21:11:27 2013(r249780) @@ -111,15 +111,6 @@ f_media_options_menu() '$msg_emit_extra_debugging_output'" fi - f_getvar $VAR_NO_CONFIRM cp - if [ "$cp" ]; then menu_list="$menu_list - ' $msg_yes_to_all' 'YES' - '$msg_assume_yes_to_all_non_critical_dialogs'" - else menu_list="$menu_list - ' $msg_yes_to_all' 'NO' - '$msg_assume_yes_to_all_non_critical_dialogs'" - fi - f_getvar $VAR_TRY_DHCP cp if [ "$cp" = "YES" ]; then menu_list="$menu_list ' $msg_dhcp' 'YES' @@ -188,11 +179,6 @@ f_media_options_menu() ' $msg_media_timeout' '$cp' '$msg_timeout_value_in_seconds_for_slow_media'" - f_getvar $VAR_PKG_TMPDIR cp - menu_list="$menu_list - ' $msg_package_temp' '$cp' - '$msg_directory_where_package_temporary_files_go'" - menu_list="$menu_list ' $msg_rescan_devices' '<*>' '$msg_rerun_bsdconfig_initial_device_probe' @@ -274,12 +260,6 @@ f_media_options_menu() else export $VAR_DEBUG=1 fi ;; - " $msg_yes_to_all") - if f_getvar $VAR_NO_CONFIRM cp && [ "$cp" ]; then - unset $VAR_NO_CONFIRM - else - export $VAR_NO_CONFIRM=1 - fi ;; " $msg_dhcp") f_getvar $VAR_TRY_DHCP cp if [ "$cp" = "YES" ]; then @@ -310,10 +290,6 @@ f_media_options_menu() f_variable_get_value $VAR_MEDIA_TIMEOUT \ "$msg_please_specify_the_number_of_seconds_to_wait" ;; - " $msg_package_temp") - f_variable_get_value $VAR_PKG_TMPDIR \ - "$msg_please_specify_a_temporary_directory" - ;; " $msg_rescan_devices") f_device_rescan ;; " $msg_use_defaults") Modified: head/usr.sbin/bsdconfig/share/script.subr == --- head/usr.sbin/bsdconfig/share/script.subr Mon Apr 22 21:03:44 2013 (r249779) +++ head/usr.sbin/bsdconfig/share/script.subr Mon Apr 22 21:11:27 2013 (r249780) @@ -32,7 +32,6 @@ BSDCFG_SHARE="/usr/share/bsdconfig" . $BSDCFG_SHARE/common.subr || exit 1 f_dprintf "%s: loading includes..." script.subr f_include $BSDCFG_SHARE/device.subr -f_include $BSDCFG_SHARE/packages.subr f_include $BSDCFG_SHARE/variable.subr f_include $BSDCFG_SHARE/media/any.subr f_include $BSDCFG_SHARE/media/tcpip.subr @@ -152,38 +151,26 @@ f_script_load() # # Reserved words meant for scripting # - -f_resword_new loadConfig f_script_load # this file -f_resword_new deviceRescan f_device_rescan# device.subr - -# variable.subr -f_resword_new installVarDefaults f_variable_set_defaults +f_resword_new deviceRescan f_device_rescan f_resword_new dumpVariablesf_dump_variables - -# media/common.subr -f_resword_new mediaOpenf_media_open +f_resword_new loadConfig f_script_load f_resword_new mediaClose f_media_close - -f_resword_new mediaGetType f_media_get_type # media/any.subr -f_resword_new mediaSetCDROMf_media_set_cdrom # media/cdrom.subr -f_resword_new mediaSetDOS f_media_set_dos# media/dos.subr -f_resword_new mediaSetFloppy f_media_set_floppy # media/floppy.subr -f_resword_new mediaSetNFS f_media_set_nfs# media/nfs.subr - -# media/ftp.subr +f_resword_new mediaGetType f_media_get_type +f_resword_new mediaOpenf_media_open +f_resword_new mediaSetCDROM
svn commit: r249781 - head/usr.sbin/bsdconfig/share
Author: dteske Date: Mon Apr 22 21:19:44 2013 New Revision: 249781 URL: http://svnweb.freebsd.org/changeset/base/249781 Log: Preserve debugFile preference across the exec boundary. Modified: head/usr.sbin/bsdconfig/share/common.subr Modified: head/usr.sbin/bsdconfig/share/common.subr == --- head/usr.sbin/bsdconfig/share/common.subr Mon Apr 22 21:11:27 2013 (r249780) +++ head/usr.sbin/bsdconfig/share/common.subr Mon Apr 22 21:19:44 2013 (r249781) @@ -120,6 +120,7 @@ f_debug_init() # Make debugging persistant if set # [ "$debug" ] && export debug + [ "$debugFile" ] && export debugFile # # Truncate the debug file upon. Note that we will trim a leading plus ___ 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: r249782 - stable/9/sys/ufs/ffs
Author: mckusick Date: Mon Apr 22 23:59:00 2013 New Revision: 249782 URL: http://svnweb.freebsd.org/changeset/base/249782 Log: MFC of 242520: When a file is first being written, the dynamic block reallocation (implemented by ffs_reallocblks_ufs[12]) relocates the file's blocks so as to cluster them together into a contiguous set of blocks on the disk. When the cluster crosses the boundary into the first indirect block, the first indirect block is initially allocated in a position immediately following the last direct block. Block reallocation would usually destroy locality by moving the indirect block out of the way to keep the data blocks contiguous. This change compensates for this problem by noting that the first indirect block should be left immediately following the last direct block. It then tries to start a new cluster of contiguous blocks (referenced by the indirect block) immediately following the indirect block. We should also do this for other indirect block boundaries, but it is only important for the first one. Suggested by: Bruce Evans MFC of 248623: The purpose of this change to the FFS layout policy is to reduce the running time for a full fsck. It also reduces the random access time for large files and speeds the traversal time for directory tree walks. The key idea is to reserve a small area in each cylinder group immediately following the inode blocks for the use of metadata, specifically indirect blocks and directory contents. The new policy is to preferentially place metadata in the metadata area and everything else in the blocks that follow the metadata area. The size of this area can be set when creating a filesystem using newfs(8) or changed in an existing filesystem using tunefs(8). Both utilities use the `-k held-for-metadata-blocks' option to specify the amount of space to be held for metadata blocks in each cylinder group. By default, newfs(8) sets this area to half of minfree (typically 4% of the data area). This work was inspired by a paper presented at Usenix's FAST '13: www.usenix.org/conference/fast13/ffsck-fast-file-system-checker Details of this implementation appears in the April 2013 of ;login: www.usenix.org/publications/login/april-2013-volume-38-number-2. A copy of the April 2013 ;login: paper can also be downloaded from: www.mckusick.com/publications/faster_fsck.pdf. Reviewed by: kib Tested by: Peter Holm Modified: stable/9/sys/ufs/ffs/ffs_alloc.c stable/9/sys/ufs/ffs/ffs_balloc.c stable/9/sys/ufs/ffs/fs.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ufs/ffs/ffs_alloc.c == --- stable/9/sys/ufs/ffs/ffs_alloc.cMon Apr 22 21:19:44 2013 (r249781) +++ stable/9/sys/ufs/ffs/ffs_alloc.cMon Apr 22 23:59:00 2013 (r249782) @@ -535,6 +535,18 @@ ffs_reallocblks_ufs1(ap) panic("ffs_reallocblks: non-physical cluster %d", i); #endif /* +* If the cluster crosses the boundary for the first indirect +* block, leave space for the indirect block. Indirect blocks +* are initially laid out in a position after the last direct +* block. Block reallocation would usually destroy locality by +* moving the indirect block out of the way to make room for +* data blocks if we didn't compensate here. We should also do +* this for other indirect block boundaries, but it is only +* important for the first one. +*/ + if (start_lbn < NDADDR && end_lbn >= NDADDR) + return (ENOSPC); + /* * If the latest allocation is in a new cylinder group, assume that * the filesystem has decided to move and do not force it back to * the previous cylinder group. @@ -743,6 +755,18 @@ ffs_reallocblks_ufs2(ap) panic("ffs_reallocblks: non-physical cluster %d", i); #endif /* +* If the cluster crosses the boundary for the first indirect +* block, do not move anything in it. Indirect blocks are +* usually initially laid out in a position between the data +* blocks. Block reallocation would usually destroy locality by +* moving the indirect block out of the way to make room for +* data blocks if we didn't compensate here. We should also do +* this for other indirect block boundaries, but it is only +* important for the first one. +*/ + if (start_lbn < NDADDR && end_lbn >= NDADDR) + return (ENOSPC); + /* * If the latest allocation is in a new cylinder group, assume that * the filesystem has decided to move and do not force it back to * the previous cylinder group. @@ -1054,7 +1078,7 @@ ffs_dirpref(pip) struct inode *pip; { struct fs *fs; -
svn commit: r249783 - head/usr.sbin/bsdconfig/networking
Author: dteske Date: Tue Apr 23 00:10:33 2013 New Revision: 249783 URL: http://svnweb.freebsd.org/changeset/base/249783 Log: Prevent device.subr from auto-loading in the nameservers module. This module doesn't need device support (but device.subr is loaded indirectly through media/tcpip.subr which contains resolv stuff). Modified: head/usr.sbin/bsdconfig/networking/nameservers Modified: head/usr.sbin/bsdconfig/networking/nameservers == --- head/usr.sbin/bsdconfig/networking/nameservers Mon Apr 22 23:59:00 2013(r249782) +++ head/usr.sbin/bsdconfig/networking/nameservers Tue Apr 23 00:10:33 2013(r249783) @@ -28,6 +28,9 @@ # INCLUDES +# Prevent device.subr (included indirectly) from auto scanning on load +DEVICE_SELF_SCAN_ALL=NO + BSDCFG_SHARE="/usr/share/bsdconfig" . $BSDCFG_SHARE/common.subr || exit 1 f_dprintf "%s: loading includes..." "$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: r249785 - in stable/9/sbin: dumpfs newfs tunefs
Author: mckusick Date: Tue Apr 23 01:09:22 2013 New Revision: 249785 URL: http://svnweb.freebsd.org/changeset/base/249785 Log: MFC of 248623: The purpose of this change to the FFS layout policy is to reduce the running time for a full fsck. It also reduces the random access time for large files and speeds the traversal time for directory tree walks. The key idea is to reserve a small area in each cylinder group immediately following the inode blocks for the use of metadata, specifically indirect blocks and directory contents. The new policy is to preferentially place metadata in the metadata area and everything else in the blocks that follow the metadata area. The size of this area can be set when creating a filesystem using newfs(8) or changed in an existing filesystem using tunefs(8). Both utilities use the `-k held-for-metadata-blocks' option to specify the amount of space to be held for metadata blocks in each cylinder group. By default, newfs(8) sets this area to half of minfree (typically 4% of the data area). This work was inspired by a paper presented at Usenix's FAST '13: www.usenix.org/conference/fast13/ffsck-fast-file-system-checker Details of this implementation appears in the April 2013 of ;login: www.usenix.org/publications/login/april-2013-volume-38-number-2. A copy of the April 2013 ;login: paper can also be downloaded from: www.mckusick.com/publications/faster_fsck.pdf. Reviewed by: kib Tested by: Peter Holm Modified: stable/9/sbin/dumpfs/dumpfs.c stable/9/sbin/newfs/mkfs.c stable/9/sbin/newfs/newfs.8 stable/9/sbin/newfs/newfs.c stable/9/sbin/newfs/newfs.h stable/9/sbin/tunefs/tunefs.8 stable/9/sbin/tunefs/tunefs.c Directory Properties: stable/9/sbin/dumpfs/ (props changed) stable/9/sbin/newfs/ (props changed) stable/9/sbin/tunefs/ (props changed) Modified: stable/9/sbin/dumpfs/dumpfs.c == --- stable/9/sbin/dumpfs/dumpfs.c Tue Apr 23 00:55:04 2013 (r249784) +++ stable/9/sbin/dumpfs/dumpfs.c Tue Apr 23 01:09:22 2013 (r249785) @@ -241,8 +241,8 @@ dumpfs(const char *name) afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, afs.fs_dblkno); printf("cgrotor\t%d\tfmod\t%d\tronly\t%d\tclean\t%d\n", afs.fs_cgrotor, afs.fs_fmod, afs.fs_ronly, afs.fs_clean); - printf("avgfpdir %d\tavgfilesize %d\n", - afs.fs_avgfpdir, afs.fs_avgfilesize); + printf("metaspace %jd\tavgfpdir %d\tavgfilesize %d\n", + afs.fs_metaspace, afs.fs_avgfpdir, afs.fs_avgfilesize); printf("flags\t"); if (afs.fs_old_flags & FS_FLAGS_UPDATED) fsflags = afs.fs_flags; Modified: stable/9/sbin/newfs/mkfs.c == --- stable/9/sbin/newfs/mkfs.c Tue Apr 23 00:55:04 2013(r249784) +++ stable/9/sbin/newfs/mkfs.c Tue Apr 23 01:09:22 2013(r249785) @@ -444,6 +444,12 @@ restart: if (sblock.fs_sbsize > SBLOCKSIZE) sblock.fs_sbsize = SBLOCKSIZE; sblock.fs_minfree = minfree; + if (metaspace > 0 && metaspace < sblock.fs_fpg / 2) + sblock.fs_metaspace = blknum(&sblock, metaspace); + else if (metaspace != -1) + /* reserve half of minfree for metadata blocks */ + sblock.fs_metaspace = blknum(&sblock, + (sblock.fs_fpg * minfree) / 200); if (maxbpg == 0) sblock.fs_maxbpg = MAXBLKPG(sblock.fs_bsize); else Modified: stable/9/sbin/newfs/newfs.8 == --- stable/9/sbin/newfs/newfs.8 Tue Apr 23 00:55:04 2013(r249784) +++ stable/9/sbin/newfs/newfs.8 Tue Apr 23 01:09:22 2013(r249785) @@ -50,6 +50,7 @@ .Op Fl g Ar avgfilesize .Op Fl h Ar avgfpdir .Op Fl i Ar bytes +.Op Fl k Ar held-for-metadata-blocks .Op Fl m Ar free-space .Op Fl o Ar optimization .Op Fl p Ar partition @@ -163,6 +164,17 @@ This flag is implemented by running the .Xr tunefs 8 utility found in the user's .Dv $PATH . +.It Fl k Ar held-for-metadata-blocks +Set the amount of space to be held for metadata blocks in each cylinder group. +When set, the file system preference routines will try to save +the specified amount of space immediately following the inode blocks +in each cylinder group for use by metadata blocks. +Clustering the metadata blocks speeds up random file access +and decreases the running time of +.Xr fsck 8 . +By default +.Xr newfs 8 +sets it to half of the space reserved to minfree. .It Fl l Enable multilabel MAC on the new file system. .It Fl m Ar free-space Modified: stable/9/sbin/newfs/newfs.c == --- stable/9/sbin/newfs/newfs.c Tue Apr 23 00:55:04 2013(r249784) +++ stable/9/sbin/newfs/newfs.
Re: svn commit: r249785 - in stable/9/sbin: dumpfs newfs tunefs
The bug eye-catched: On 23.04.2013 5:09, Kirk McKusick wrote: > + case 'k': > + found_arg = 1; > + name = "space to hold for metadata blocks"; > + kvalue = atoi(optarg); > + if (mvalue < 0) ^^ should be kvalue > + errx(10, "bad %s (%s)", name, optarg); > + kflag = 1; > + break; -- bitcoin:13fGiNutKNHcVSsgtGQ7bQ5kgUKgEQHn7N ___ 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: r249611 - in stable/9/sys/cam: ata scsi
What problem does this solve, other than to unintentionally break the MPT driver? This needs to be backed out of HEAD and stable/9 until a better analysis is done. Scott On Apr 18, 2013, at 3:44 AM, Alexander Motin wrote: > Author: mav > Date: Thu Apr 18 09:44:00 2013 > New Revision: 249611 > URL: http://svnweb.freebsd.org/changeset/base/249611 > > Log: > MFC r248872, r249048: > Make pre-shutdown flush and spindown routines to not use xpt_polled_action(), > but execute the commands in regular way. There is no any reason to cook CPU > while the system is still fully operational. After this change polling in > CAM is used only for kernel dumping. > > Modified: > stable/9/sys/cam/ata/ata_da.c > stable/9/sys/cam/scsi/scsi_da.c > Directory Properties: > stable/9/sys/ (props changed) > > Modified: stable/9/sys/cam/ata/ata_da.c > == > --- stable/9/sys/cam/ata/ata_da.c Thu Apr 18 09:40:34 2013 > (r249610) > +++ stable/9/sys/cam/ata/ata_da.c Thu Apr 18 09:44:00 2013 > (r249611) > @@ -1825,11 +1825,10 @@ adaflush(void) > { > struct cam_periph *periph; > struct ada_softc *softc; > + union ccb *ccb; > int error; > > CAM_PERIPH_FOREACH(periph, &adadriver) { > - union ccb ccb; > - > /* If we paniced with lock held - not recurse here. */ > if (cam_periph_owned(periph)) > continue; > @@ -1845,10 +1844,8 @@ adaflush(void) > continue; > } > > - xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL); > - > - ccb.ccb_h.ccb_state = ADA_CCB_DUMP; > - cam_fill_ataio(&ccb.ataio, > + ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); > + cam_fill_ataio(&ccb->ataio, > 0, > adadone, > CAM_DIR_NONE, > @@ -1856,20 +1853,17 @@ adaflush(void) > NULL, > 0, > ada_default_timeout*1000); > - > if (softc->flags & ADA_FLAG_CAN_48BIT) > - ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE48, 0, 0, 0); > + ata_48bit_cmd(&ccb->ataio, ATA_FLUSHCACHE48, 0, 0, 0); > else > - ata_28bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0); > - xpt_polled_action(&ccb); > + ata_28bit_cmd(&ccb->ataio, ATA_FLUSHCACHE, 0, 0, 0); > > - error = cam_periph_error(&ccb, > - 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); > - if ((ccb.ccb_h.status & CAM_DEV_QFRZN) != 0) > - cam_release_devq(ccb.ccb_h.path, /*relsim_flags*/0, > - /*reduction*/0, /*timeout*/0, /*getcount_only*/0); > + error = cam_periph_runccb(ccb, adaerror, /*cam_flags*/0, > + /*sense_flags*/ SF_NO_RECOVERY | SF_NO_RETRY, > + softc->disk->d_devstat); > if (error != 0) > xpt_print(periph->path, "Synchronize cache failed\n"); > + xpt_release_ccb(ccb); > cam_periph_unlock(periph); > } > } > @@ -1879,11 +1873,10 @@ adaspindown(uint8_t cmd, int flags) > { > struct cam_periph *periph; > struct ada_softc *softc; > + union ccb *ccb; > int error; > > CAM_PERIPH_FOREACH(periph, &adadriver) { > - union ccb ccb; > - > /* If we paniced with lock held - not recurse here. */ > if (cam_periph_owned(periph)) > continue; > @@ -1900,10 +1893,8 @@ adaspindown(uint8_t cmd, int flags) > if (bootverbose) > xpt_print(periph->path, "spin-down\n"); > > - xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL); > - > - ccb.ccb_h.ccb_state = ADA_CCB_DUMP; > - cam_fill_ataio(&ccb.ataio, > + ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); > + cam_fill_ataio(&ccb->ataio, > 0, > adadone, > CAM_DIR_NONE | flags, > @@ -1911,17 +1902,14 @@ adaspindown(uint8_t cmd, int flags) > NULL, > 0, > ada_default_timeout*1000); > + ata_28bit_cmd(&ccb->ataio, cmd, 0, 0, 0); > > - ata_28bit_cmd(&ccb.ataio, cmd, 0, 0, 0); > - xpt_polled_action(&ccb); > - > - error = cam_periph_error(&ccb, > - 0, SF_NO_RECOVERY | SF_NO_RETRY, NULL); > - if ((ccb.ccb_h.status & CAM_DEV_QFRZN) != 0) > - cam_release_devq(ccb.ccb_h.path, /*relsim_flags*/0, > -
svn commit: r249786 - head/sys/dev/usb/controller
Author: hselasky Date: Tue Apr 23 06:26:54 2013 New Revision: 249786 URL: http://svnweb.freebsd.org/changeset/base/249786 Log: Add descriptive comment. Modified: head/sys/dev/usb/controller/xhci.c Modified: head/sys/dev/usb/controller/xhci.c == --- head/sys/dev/usb/controller/xhci.c Tue Apr 23 01:09:22 2013 (r249785) +++ head/sys/dev/usb/controller/xhci.c Tue Apr 23 06:26:54 2013 (r249786) @@ -554,6 +554,12 @@ xhci_init(struct xhci_softc *sc, device_ void xhci_uninit(struct xhci_softc *sc) { + /* +* NOTE: At this point the control transfer process is gone +* and "xhci_configure_msg" is no longer called. Consequently +* waiting for the configuration messages to complete is not +* needed. +*/ usb_bus_mem_free_all(&sc->sc_bus, &xhci_iterate_hw_softc); cv_destroy(&sc->sc_cmd_cv); ___ 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: r249787 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mm Date: Tue Apr 23 06:28:35 2013 New Revision: 249787 URL: http://svnweb.freebsd.org/changeset/base/249787 Log: The zfs synctask code restructuring introduced a new bug that makes it impossible to set quota and reservation on pools lower than version 22. Problem has been reported and a solution discussed with vendor. Illumos ZFS issues: 3739 cannot set zfs quota or reservation on pool version < 22 Reviewed by: Matthew Ahrens Reported by: Steve Wills MFC after:3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Tue Apr 23 06:26:54 2013(r249786) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Tue Apr 23 06:28:35 2013(r249787) @@ -972,12 +972,18 @@ dsl_dir_set_quota_sync(void *arg, dmu_tx VERIFY0(dsl_dataset_hold(dp, ddsqra->ddsqra_name, FTAG, &ds)); - dsl_prop_set_sync_impl(ds, zfs_prop_to_name(ZFS_PROP_QUOTA), - ddsqra->ddsqra_source, sizeof (ddsqra->ddsqra_value), 1, - &ddsqra->ddsqra_value, tx); + if (spa_version(dp->dp_spa) >= SPA_VERSION_RECVD_PROPS) { + dsl_prop_set_sync_impl(ds, zfs_prop_to_name(ZFS_PROP_QUOTA), + ddsqra->ddsqra_source, sizeof (ddsqra->ddsqra_value), 1, + &ddsqra->ddsqra_value, tx); - VERIFY0(dsl_prop_get_int_ds(ds, - zfs_prop_to_name(ZFS_PROP_QUOTA), &newval)); + VERIFY0(dsl_prop_get_int_ds(ds, + zfs_prop_to_name(ZFS_PROP_QUOTA), &newval)); + } else { + newval = ddsqra->ddsqra_value; + spa_history_log_internal_ds(ds, "set", tx, "%s=%lld", + zfs_prop_to_name(ZFS_PROP_QUOTA), (longlong_t)newval); + } dmu_buf_will_dirty(ds->ds_dir->dd_dbuf, tx); mutex_enter(&ds->ds_dir->dd_lock); @@ -1087,12 +1093,20 @@ dsl_dir_set_reservation_sync(void *arg, VERIFY0(dsl_dataset_hold(dp, ddsqra->ddsqra_name, FTAG, &ds)); - dsl_prop_set_sync_impl(ds, zfs_prop_to_name(ZFS_PROP_RESERVATION), - ddsqra->ddsqra_source, sizeof (ddsqra->ddsqra_value), 1, - &ddsqra->ddsqra_value, tx); + if (spa_version(dp->dp_spa) >= SPA_VERSION_RECVD_PROPS) { + dsl_prop_set_sync_impl(ds, + zfs_prop_to_name(ZFS_PROP_RESERVATION), + ddsqra->ddsqra_source, sizeof (ddsqra->ddsqra_value), 1, + &ddsqra->ddsqra_value, tx); - VERIFY0(dsl_prop_get_int_ds(ds, - zfs_prop_to_name(ZFS_PROP_RESERVATION), &newval)); + VERIFY0(dsl_prop_get_int_ds(ds, + zfs_prop_to_name(ZFS_PROP_RESERVATION), &newval)); + } else { + newval = ddsqra->ddsqra_value; + spa_history_log_internal_ds(ds, "set", tx, "%s=%lld", + zfs_prop_to_name(ZFS_PROP_RESERVATION), + (longlong_t)newval); + } dsl_dir_set_reservation_sync_impl(ds->ds_dir, newval, tx); dsl_dataset_rele(ds, FTAG); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c Tue Apr 23 06:26:54 2013(r249786) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c Tue Apr 23 06:28:35 2013(r249787) @@ -557,10 +557,6 @@ dsl_prop_set_sync_impl(dsl_dataset_t *ds } if (version < SPA_VERSION_RECVD_PROPS) { - zfs_prop_t prop = zfs_name_to_prop(propname); - if (prop == ZFS_PROP_QUOTA || prop == ZFS_PROP_RESERVATION) - return; - if (source & ZPROP_SRC_NONE) source = ZPROP_SRC_NONE; else if (source & ZPROP_SRC_RECEIVED) ___ 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: r249788 - in stable/9/sbin: fsck_ffs fsdb
Author: mckusick Date: Tue Apr 23 06:28:49 2013 New Revision: 249788 URL: http://svnweb.freebsd.org/changeset/base/249788 Log: Merge checked by: Glen Barber (gjb@) MFC of 247212: When running with the -d option, instrument fsck_ffs to track the number, data type, and running time of its I/O operations. No functional changes. MFC of 247234: Catch up with internal API changes for initbarea() and getdatablk() of fsck_ffs introduced with r247212. Submitted by: David Wolfskill MFC of 248625: Speed up fsck by caching the cylinder group maps in pass1 so that they do not need to be read again in pass5. As this nearly doubles the memory requirement for fsck, the cache is thrown away if other memory needs in fsck would otherwise fail. Thus, the memory footprint of fsck remains unchanged in memory constrained environments. This work was inspired by a paper presented at Usenix's FAST '13: www.usenix.org/conference/fast13/ffsck-fast-file-system-checker Details of this implementation appears in the April 2013 of ;login: www.usenix.org/publications/login/april-2013-volume-38-number-2. A copy of the April 2013 ;login: paper can also be downloaded from: www.mckusick.com/publications/faster_fsck.pdf. Reviewed by: kib Tested by: Peter Holm MFC of 248639: Fix the build after addition of cylinder group cacheing (r248625) Reported by: Glen Barber (gjb@) Pointy hat to: Kirk McKusick (mckusick@) MFC of 248673: Minor formatting fix for printf() to fix clang builds. Submitted by: db Reviewed by:gjb MFC of 248680: Resolve clang compile errors on amd64/i386 for certain by casting. compile tested with clang on i386, amd64 compile tested with gcc on i386, amd64, sparc64 Submitted by: delphij MFC of 248691: Note that output is in seconds, not msec. KNF indentation. No functional change. No change to printf strings. No change to casting of printf arguments. Reported by: Bruce Evans Modified: stable/9/sbin/fsck_ffs/dir.c stable/9/sbin/fsck_ffs/ea.c stable/9/sbin/fsck_ffs/fsck.h stable/9/sbin/fsck_ffs/fsutil.c stable/9/sbin/fsck_ffs/inode.c stable/9/sbin/fsck_ffs/main.c stable/9/sbin/fsck_ffs/pass1.c stable/9/sbin/fsck_ffs/pass5.c stable/9/sbin/fsck_ffs/setup.c stable/9/sbin/fsck_ffs/suj.c stable/9/sbin/fsdb/fsdb.c stable/9/sbin/fsdb/fsdbutil.c Directory Properties: stable/9/sbin/fsck_ffs/ (props changed) stable/9/sbin/fsdb/ (props changed) Modified: stable/9/sbin/fsck_ffs/dir.c == --- stable/9/sbin/fsck_ffs/dir.cTue Apr 23 06:28:35 2013 (r249787) +++ stable/9/sbin/fsck_ffs/dir.cTue Apr 23 06:28:49 2013 (r249788) @@ -708,6 +708,6 @@ getdirblk(ufs2_daddr_t blkno, long size) if (pdirbp != 0) pdirbp->b_flags &= ~B_INUSE; - pdirbp = getdatablk(blkno, size); + pdirbp = getdatablk(blkno, size, BT_DIRDATA); return (pdirbp); } Modified: stable/9/sbin/fsck_ffs/ea.c == --- stable/9/sbin/fsck_ffs/ea.c Tue Apr 23 06:28:35 2013(r249787) +++ stable/9/sbin/fsck_ffs/ea.c Tue Apr 23 06:28:49 2013(r249788) @@ -73,7 +73,7 @@ eascan(struct inodesc *idesc, struct ufs else blksiz = sblock.fs_bsize; printf("blksiz = %ju\n", (intmax_t)blksiz); - bp = getdatablk(dp->di_extb[0], blksiz); + bp = getdatablk(dp->di_extb[0], blksiz, BT_EXTATTR); cp = (u_char *)bp->b_un.b_buf; for (n = 0; n < blksiz; n++) { printf("%02x", cp[n]); Modified: stable/9/sbin/fsck_ffs/fsck.h == --- stable/9/sbin/fsck_ffs/fsck.h Tue Apr 23 06:28:35 2013 (r249787) +++ stable/9/sbin/fsck_ffs/fsck.h Tue Apr 23 06:28:49 2013 (r249788) @@ -138,6 +138,7 @@ struct bufarea { int b_size; int b_errs; int b_flags; + int b_type; union { char *b_buf;/* buffer space */ ufs1_daddr_t *b_indir1; /* UFS1 indirect block */ @@ -165,9 +166,38 @@ struct bufarea { * Buffer flags */ #defineB_INUSE 0x0001 /* Buffer is in use */ +/* + * Type of data in buffer + */ +#defineBT_UNKNOWN 0 /* Buffer holds a superblock */ +#defineBT_SUPERBLK 1 /* Buffer holds a superblock */ +#defineBT_CYLGRP2 /* Buffer holds a cylinder group map */ +#defineBT_LEVEL13 /* Buffer holds single level indirect */ +#defineBT_LEVEL24 /* Buffer holds double level indirect */ +#defineBT_LEVEL35 /* Buffer holds triple level indirect */ +#defineBT_EXTATTR 6 /* Buffer holds external a
svn commit: r249789 - head/sbin/tunefs
Author: mckusick Date: Tue Apr 23 06:37:50 2013 New Revision: 249789 URL: http://svnweb.freebsd.org/changeset/base/249789 Log: Fix error check. Submitted by: Andrey Chernov (ache@) MFC after: 3 days Modified: head/sbin/tunefs/tunefs.c Modified: head/sbin/tunefs/tunefs.c == --- head/sbin/tunefs/tunefs.c Tue Apr 23 06:28:49 2013(r249788) +++ head/sbin/tunefs/tunefs.c Tue Apr 23 06:37:50 2013(r249789) @@ -174,7 +174,7 @@ main(int argc, char *argv[]) found_arg = 1; name = "space to hold for metadata blocks"; kvalue = atoi(optarg); - if (mvalue < 0) + if (kvalue < 0) errx(10, "bad %s (%s)", name, optarg); kflag = 1; break; ___ 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"