svn commit: r247443 - in head: share/man/man4 sys/dev/arcmsr
Author: delphij Date: Thu Feb 28 04:16:47 2013 New Revision: 247443 URL: http://svnweb.freebsd.org/changeset/base/247443 Log: Refresh vendor driver version which adds ARC-1224 support. Many thanks to Areca for continuing to support FreeBSD. Submitted by: 黃清隆 MFC after:3 days Modified: head/share/man/man4/arcmsr.4 head/sys/dev/arcmsr/arcmsr.c head/sys/dev/arcmsr/arcmsr.h Modified: head/share/man/man4/arcmsr.4 == --- head/share/man/man4/arcmsr.4Thu Feb 28 01:24:24 2013 (r247442) +++ head/share/man/man4/arcmsr.4Thu Feb 28 04:16:47 2013 (r247443) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 18, 2012 +.Dd February 27, 2013 .Dt ARCMSR 4 .Os .Sh NAME @@ -108,6 +108,8 @@ ARC-1222 .It ARC-1223 .It +ARC-1224 +.It ARC-1230 .It ARC-1231 Modified: head/sys/dev/arcmsr/arcmsr.c == --- head/sys/dev/arcmsr/arcmsr.cThu Feb 28 01:24:24 2013 (r247442) +++ head/sys/dev/arcmsr/arcmsr.cThu Feb 28 04:16:47 2013 (r247443) @@ -1,16 +1,15 @@ /* -* -**O.S : FreeBSD + +**OS: FreeBSD ** FILE NAME : arcmsr.c **BY: Erich Chen, Ching Huang ** Description: SCSI RAID Device Driver for -**ARECA (ARC11XX/ARC12XX/ARC13XX/ARC16XX/ARC188x) SATA/SAS RAID HOST Adapter -**ARCMSR RAID Host adapter -**[RAID controller:INTEL 331(PCI-X) 341(PCI-EXPRESS) chip set] -** - +**ARECA (ARC11XX/ARC12XX/ARC13XX/ARC16XX/ARC188x) +**SATA/SAS RAID HOST Adapter + + ** -** Copyright (C) 2002 - 2010, Areca Technology Corporation All rights reserved. +** Copyright (C) 2002 - 2012, Areca Technology Corporation All rights reserved. ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions @@ -33,7 +32,7 @@ ** 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. -** + ** History ** **REV# DATE NAME DESCRIPTION @@ -73,7 +72,7 @@ ** 1.20.00.23 01/30/2012 Ching Huang Fixed Request requeued and Retrying command ** 1.20.00.24 06/11/2012 Ching Huang Fixed return sense data condition ** 1.20.00.25 08/17/2012 Ching Huang Fixed hotplug device no function on type A adapter -** 1.20.00.26 12/14/2012 Ching Huang Added support ARC1214 +** 1.20.00.26 12/14/2012 Ching Huang Added support ARC1214,1224 ** */ @@ -145,7 +144,7 @@ __FBSDID("$FreeBSD$"); #define arcmsr_callout_init(a) callout_init(a); #endif -#define ARCMSR_DRIVER_VERSION "Driver Version 1.20.00.26 2012-12-14" +#define ARCMSR_DRIVER_VERSION "Driver Version 1.20.00.26 2013-01-08" #include /* ** @@ -168,7 +167,7 @@ static void arcmsr_stop_adapter_bgrb(str static void arcmsr_start_adapter_bgrb(struct AdapterControlBlock *acb); static void arcmsr_iop_init(struct AdapterControlBlock *acb); static void arcmsr_flush_adapter_cache(struct AdapterControlBlock *acb); -static voidarcmsr_Read_iop_rqbuffer_data(struct AdapterControlBlock *acb, struct QBUFFER *prbuffer); +static u_int32_t arcmsr_Read_iop_rqbuffer_data(struct AdapterControlBlock *acb, struct QBUFFER *prbuffer); static void arcmsr_Write_data_2iop_wqbuffer(struct AdapterControlBlock *acb); static void arcmsr_abort_allcmd(struct AdapterControlBlock *acb); static void arcmsr_srb_complete(struct CommandControlBlock *srb, int stand_flag); @@ -212,7 +211,11 @@ static device_method_t arcmsr_methods[]= DEVMETHOD(device_suspend, arcmsr_suspend), DEVMETHOD(device_resume,arcmsr_resume), +#if __FreeBSD_version >= 803000 DEVMETHOD_END +#else + { 0, 0 } +#endif }; static driver_t arcmsr_driver={ @@ -1381,13 +1384,61 @@ static void arcmsr_poll(st
svn commit: r247442 - head/contrib/openbsm/bin/auditdistd
Author: pjd Date: Thu Feb 28 01:24:24 2013 New Revision: 247442 URL: http://svnweb.freebsd.org/changeset/base/247442 Log: When we are waiting for new trail files we may have been disconnected and reconnected in the meantime. Check if reset is set before opening next trail file, as not doing so will result in sending OPEN message with the same file name twice and this is illegal - the second OPEN is send without first closing previous trail file. Modified: head/contrib/openbsm/bin/auditdistd/sender.c Modified: head/contrib/openbsm/bin/auditdistd/sender.c == --- head/contrib/openbsm/bin/auditdistd/sender.cThu Feb 28 01:22:14 2013(r247441) +++ head/contrib/openbsm/bin/auditdistd/sender.cThu Feb 28 01:24:24 2013(r247442) @@ -394,6 +394,7 @@ read_thread_wait(void) mtx_lock(&adist_remote_mtx); if (adhost->adh_reset) { +reset: adhost->adh_reset = false; if (trail_filefd(adist_trail) != -1) trail_close(adist_trail); @@ -408,6 +409,14 @@ read_thread_wait(void) while (trail_filefd(adist_trail) == -1) { newfile = true; wait_for_dir(); + /* +* We may have been disconnected and reconnected in the +* meantime, check if reset is set. +*/ + mtx_lock(&adist_remote_mtx); + if (adhost->adh_reset) + goto reset; + mtx_unlock(&adist_remote_mtx); if (trail_filefd(adist_trail) == -1) trail_next(adist_trail); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r247441 - head/usr.bin/dc
Author: gjb (doc,ports committer) Date: Thu Feb 28 01:22:14 2013 New Revision: 247441 URL: http://svnweb.freebsd.org/changeset/base/247441 Log: Properly handle '-h' argument. PR: 176332 Reviewed by: scottl MFC after:3 days Modified: head/usr.bin/dc/dc.c Modified: head/usr.bin/dc/dc.c == --- head/usr.bin/dc/dc.cThu Feb 28 01:05:48 2013(r247440) +++ head/usr.bin/dc/dc.cThu Feb 28 01:22:14 2013(r247441) @@ -84,7 +84,7 @@ main(int argc, char *argv[]) bool extended_regs = false, preproc_done = false; /* accept and ignore a single dash to be 4.4BSD dc(1) compatible */ - while ((ch = getopt_long(argc, argv, "e:f:Vx", long_options, NULL)) != -1) { + while ((ch = getopt_long(argc, argv, "e:f:hVx", long_options, NULL)) != -1) { switch (ch) { case 'e': if (!preproc_done) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r247438 - head/sys/dev/pci
Author: neel Date: Thu Feb 28 01:00:32 2013 New Revision: 247438 URL: http://svnweb.freebsd.org/changeset/base/247438 Log: Remove the quirk to allow use of MSI when the guest is running inside bhyve. This became redundant after the hostbridge presented to the guest started advertising the PCI-E capability (r246846). Obtained from:NetApp Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c == --- head/sys/dev/pci/pci.c Thu Feb 28 00:52:44 2013(r247437) +++ head/sys/dev/pci/pci.c Thu Feb 28 01:00:32 2013(r247438) @@ -244,7 +244,6 @@ static const struct pci_quirk pci_quirks * but support MSI just fine. QEMU uses the Intel 82440. */ { 0x12378086, PCI_QUIRK_ENABLE_MSI_VM, 0, 0 }, - { 0x12751275, PCI_QUIRK_ENABLE_MSI_VM, 0, 0 },/* bhyve */ /* * HPET MMIO base address may appear in Bar1 for AMD SB600 SMBus ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r247429 - in head/sys/arm: econa s3c2xx0 xscale/i80321 xscale/i8134x xscale/ixp425 xscale/pxa
Author: attilio Date: Thu Feb 28 00:18:56 2013 New Revision: 247429 URL: http://svnweb.freebsd.org/changeset/base/247429 Log: Complete r247297: Remove unused inclusions of vm/vm_pager.h and vm/vnode_pager.h. Sponsored by: EMC / Isilon storage division Modified: head/sys/arm/econa/econa_machdep.c head/sys/arm/s3c2xx0/s3c24x0_machdep.c head/sys/arm/xscale/i80321/ep80219_machdep.c head/sys/arm/xscale/i80321/iq31244_machdep.c head/sys/arm/xscale/i8134x/crb_machdep.c head/sys/arm/xscale/ixp425/avila_machdep.c head/sys/arm/xscale/pxa/pxa_machdep.c Modified: head/sys/arm/econa/econa_machdep.c == --- head/sys/arm/econa/econa_machdep.c Thu Feb 28 00:14:59 2013 (r247428) +++ head/sys/arm/econa/econa_machdep.c Thu Feb 28 00:18:56 2013 (r247429) @@ -67,9 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #include #include #include Modified: head/sys/arm/s3c2xx0/s3c24x0_machdep.c == --- head/sys/arm/s3c2xx0/s3c24x0_machdep.c Thu Feb 28 00:14:59 2013 (r247428) +++ head/sys/arm/s3c2xx0/s3c24x0_machdep.c Thu Feb 28 00:18:56 2013 (r247429) @@ -77,9 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #include #include #include Modified: head/sys/arm/xscale/i80321/ep80219_machdep.c == --- head/sys/arm/xscale/i80321/ep80219_machdep.cThu Feb 28 00:14:59 2013(r247428) +++ head/sys/arm/xscale/i80321/ep80219_machdep.cThu Feb 28 00:18:56 2013(r247429) @@ -77,9 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #include #include #include Modified: head/sys/arm/xscale/i80321/iq31244_machdep.c == --- head/sys/arm/xscale/i80321/iq31244_machdep.cThu Feb 28 00:14:59 2013(r247428) +++ head/sys/arm/xscale/i80321/iq31244_machdep.cThu Feb 28 00:18:56 2013(r247429) @@ -77,9 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #include #include #include Modified: head/sys/arm/xscale/i8134x/crb_machdep.c == --- head/sys/arm/xscale/i8134x/crb_machdep.cThu Feb 28 00:14:59 2013 (r247428) +++ head/sys/arm/xscale/i8134x/crb_machdep.cThu Feb 28 00:18:56 2013 (r247429) @@ -77,9 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #include #include #include Modified: head/sys/arm/xscale/ixp425/avila_machdep.c == --- head/sys/arm/xscale/ixp425/avila_machdep.c Thu Feb 28 00:14:59 2013 (r247428) +++ head/sys/arm/xscale/ixp425/avila_machdep.c Thu Feb 28 00:18:56 2013 (r247429) @@ -77,9 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #include #include #include Modified: head/sys/arm/xscale/pxa/pxa_machdep.c == --- head/sys/arm/xscale/pxa/pxa_machdep.c Thu Feb 28 00:14:59 2013 (r247428) +++ head/sys/arm/xscale/pxa/pxa_machdep.c Thu Feb 28 00:18:56 2013 (r247429) @@ -79,9 +79,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #include #include #include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r247359 - head/sbin/reboot
On 28/02/2013, at 3:08, John Baldwin wrote: >> URL: http://svnweb.freebsd.org/changeset/base/247359 >> >> Log: >> Clarify that overriding the -h/-D flags through flags in device.hints >> only works for sio(4) but not for uart(4) which no longer has this flag. > > You should probably just remove the flag entirely. sio(4) doesn't build on > 8.x and later. The handbook will need fixing too since it mentions sio(4) and -D/-h. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r247426 - head/sys/dev/mfi
Author: smh Date: Wed Feb 27 23:17:45 2013 New Revision: 247426 URL: http://svnweb.freebsd.org/changeset/base/247426 Log: Adds hw.mfi.cmd_timeout loader / sysctl tuneable which controls the default timeout used in the mfi driver. This is useful for long running commands such as secure erase. Reviewed by: John Baldwin Approved by: pjd (mentor) Modified: head/sys/dev/mfi/mfi.c Modified: head/sys/dev/mfi/mfi.c == --- head/sys/dev/mfi/mfi.c Wed Feb 27 23:02:47 2013(r247425) +++ head/sys/dev/mfi/mfi.c Wed Feb 27 23:17:45 2013(r247426) @@ -157,6 +157,11 @@ SYSCTL_INT(_hw_mfi, OID_AUTO, polled_cmd &mfi_polled_cmd_timeout, 0, "Polled command timeout - used for firmware flash etc (in seconds)"); +static int mfi_cmd_timeout = MFI_CMD_TIMEOUT; +TUNABLE_INT("hw.mfi.cmd_timeout", &mfi_cmd_timeout); +SYSCTL_INT(_hw_mfi, OID_AUTO, cmd_timeout, CTLFLAG_RWTUN, &mfi_cmd_timeout, + 0, "Command timeout (in seconds)"); + /* Management interface */ static d_open_tmfi_open; static d_close_t mfi_close; @@ -782,7 +787,7 @@ mfi_attach(struct mfi_softc *sc) /* Start the timeout watchdog */ callout_init(&sc->mfi_watchdog_callout, CALLOUT_MPSAFE); - callout_reset(&sc->mfi_watchdog_callout, MFI_CMD_TIMEOUT * hz, + callout_reset(&sc->mfi_watchdog_callout, mfi_cmd_timeout * hz, mfi_timeout, sc); if (sc->mfi_flags & MFI_FLAGS_TBOLT) { @@ -3714,7 +3719,7 @@ mfi_dump_all(void) break; device_printf(sc->mfi_dev, "Dumping\n\n"); timedout = 0; - deadline = time_uptime - MFI_CMD_TIMEOUT; + deadline = time_uptime - mfi_cmd_timeout; mtx_lock(&sc->mfi_io_lock); TAILQ_FOREACH(cm, &sc->mfi_busy, cm_link) { if (cm->cm_timestamp <= deadline) { @@ -3745,10 +3750,11 @@ mfi_timeout(void *data) time_t deadline; int timedout = 0; - deadline = time_uptime - MFI_CMD_TIMEOUT; + deadline = time_uptime - mfi_cmd_timeout; if (sc->adpreset == 0) { if (!mfi_tbolt_reset(sc)) { - callout_reset(&sc->mfi_watchdog_callout, MFI_CMD_TIMEOUT * hz, mfi_timeout, sc); + callout_reset(&sc->mfi_watchdog_callout, + mfi_cmd_timeout * hz, mfi_timeout, sc); return; } } @@ -3785,7 +3791,7 @@ mfi_timeout(void *data) mtx_unlock(&sc->mfi_io_lock); - callout_reset(&sc->mfi_watchdog_callout, MFI_CMD_TIMEOUT * hz, + callout_reset(&sc->mfi_watchdog_callout, mfi_cmd_timeout * hz, mfi_timeout, sc); if (0) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r247422 - head
Author: delphij Date: Wed Feb 27 21:58:06 2013 New Revision: 247422 URL: http://svnweb.freebsd.org/changeset/base/247422 Log: Add a reminder that the user should update boot block if they are upgrading their existing system and use LZ4 compression for ZFS. Suggested by: mm MFC after:3 days Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Wed Feb 27 21:03:19 2013(r247421) +++ head/UPDATING Wed Feb 27 21:58:06 2013(r247422) @@ -26,6 +26,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130208: + A new compression method (lz4) has been merged to -HEAD. Please + refer to zpool-features(7) for more information. + + Please refer to the "ZFS notes" section of this file for information + on upgrading boot ZFS pools. + 20130129: A BSD-licensed patch(1) variant has been added and is installed as bsdpatch, being the GNU version the default patch. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r247417 - head/usr.sbin/watchdogd
Author: joel (doc committer) Date: Wed Feb 27 20:16:30 2013 New Revision: 247417 URL: http://svnweb.freebsd.org/changeset/base/247417 Log: Remove EOL whitespace. Modified: head/usr.sbin/watchdogd/watchdogd.8 Modified: head/usr.sbin/watchdogd/watchdogd.8 == --- head/usr.sbin/watchdogd/watchdogd.8 Wed Feb 27 20:15:06 2013 (r247416) +++ head/usr.sbin/watchdogd/watchdogd.8 Wed Feb 27 20:16:30 2013 (r247417) @@ -100,7 +100,7 @@ that its script has run for too long. If unset .Ar script_timeout defaults to the value specified by the -.Fl s Ar sleep +.Fl s Ar sleep option. .Pp Upon receiving the @@ -140,7 +140,7 @@ The default is just to log a message (WD .Pp .It Fl -pretimeout-action Ar action Set the timeout action for the pretimeout. -See the section +See the section .Sx Timeout Actions . .Pp .It Fl -softtimeout @@ -152,7 +152,7 @@ a message (WD_SOFT_LOG). .Pp .It Fl -softtimeout-action Ar action Set the timeout action for the softtimeout. -See the section +See the section .Sx Timeout Actions . .Pp .El @@ -179,7 +179,7 @@ Log a message using when the timeout is reached. .Pp .It Ar printf -call the kernel +call the kernel .Xr printf 9 to display a message to the console and .Xr dmesg 8 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r247416 - head/usr.sbin/watchdogd
Author: joel (doc committer) Date: Wed Feb 27 20:15:06 2013 New Revision: 247416 URL: http://svnweb.freebsd.org/changeset/base/247416 Log: mdoc: begin sentence on new line. Modified: head/usr.sbin/watchdogd/watchdogd.8 Modified: head/usr.sbin/watchdogd/watchdogd.8 == --- head/usr.sbin/watchdogd/watchdogd.8 Wed Feb 27 20:09:25 2013 (r247415) +++ head/usr.sbin/watchdogd/watchdogd.8 Wed Feb 27 20:15:06 2013 (r247416) @@ -132,23 +132,27 @@ This flag will cause watchdogd to compla execute the watchdog script exceeds the threshold of 'sleep' option. .Pp .It Fl -pretimeout Ar timeout -Set a "pretimeout" watchdog. At "timeout" seconds before the watchdog -will fire attempt an action. The action is set by the --pretimeout-action -flag. The default is just to log a message (WD_SOFT_LOG) via +Set a "pretimeout" watchdog. +At "timeout" seconds before the watchdog will fire attempt an action. +The action is set by the --pretimeout-action flag. +The default is just to log a message (WD_SOFT_LOG) via .Xr log 9 . .Pp .It Fl -pretimeout-action Ar action -Set the timeout action for the pretimeout. See the section +Set the timeout action for the pretimeout. +See the section .Sx Timeout Actions . .Pp .It Fl -softtimeout Instead of arming the various hardware watchdogs, only use a basic software -watchdog. The default action is just to +watchdog. +The default action is just to .Xr log 9 a message (WD_SOFT_LOG). .Pp .It Fl -softtimeout-action Ar action -Set the timeout action for the softtimeout. See the section +Set the timeout action for the softtimeout. +See the section .Sx Timeout Actions . .Pp .El ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r247415 - head/lib/libc/stdio
Author: joel (doc committer) Date: Wed Feb 27 20:09:25 2013 New Revision: 247415 URL: http://svnweb.freebsd.org/changeset/base/247415 Log: mdoc: add missing El. Modified: head/lib/libc/stdio/open_memstream.3 Modified: head/lib/libc/stdio/open_memstream.3 == --- head/lib/libc/stdio/open_memstream.3Wed Feb 27 19:59:58 2013 (r247414) +++ head/lib/libc/stdio/open_memstream.3Wed Feb 27 20:09:25 2013 (r247415) @@ -137,6 +137,7 @@ argument was .Dv NULL . .It Bq Er ENOMEM Memory for the stream or buffer could not be allocated. +.El .Sh SEE ALSO .Xr fclose 3 , .Xr fflush 3 , ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r247414 - head/tools/test/iconv/tablegen
Author: jmg Date: Wed Feb 27 19:59:58 2013 New Revision: 247414 URL: http://svnweb.freebsd.org/changeset/base/247414 Log: fix this script so we don't expand the second $FreeBSD since svn thinks the $ in $1 ends the keyword, and expands it... Modified: head/tools/test/iconv/tablegen/cmp.sh Modified: head/tools/test/iconv/tablegen/cmp.sh == --- head/tools/test/iconv/tablegen/cmp.sh Wed Feb 27 19:59:41 2013 (r247413) +++ head/tools/test/iconv/tablegen/cmp.sh Wed Feb 27 19:59:58 2013 (r247414) @@ -1,4 +1,4 @@ #!/bin/sh # $FreeBSD$ -diff -I\$FreeBSD$1 $2 | grep '^-' >/dev/null && printf "\tDIFFER: $1 $2\n" && exit 0 || exit 0 +diff -I\$\FreeBSD $1 $2 | grep '^-' >/dev/null && printf "\tDIFFER: $1 $2\n" && exit 0 || exit 0 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r247413 - head/sys/boot/common
Author: ian Date: Wed Feb 27 19:59:41 2013 New Revision: 247413 URL: http://svnweb.freebsd.org/changeset/base/247413 Log: Fix a typo that prevented booting a kernel that had virtual addresses in the elf headers. Modified: head/sys/boot/common/load_elf.c Modified: head/sys/boot/common/load_elf.c == --- head/sys/boot/common/load_elf.c Wed Feb 27 19:51:47 2013 (r247412) +++ head/sys/boot/common/load_elf.c Wed Feb 27 19:59:41 2013 (r247413) @@ -304,7 +304,7 @@ __elfN(loadimage)(struct preloaded_file * only adjust the entry point if it's a virtual address to begin with. */ off = -0xc000u; - if ((ehdr->e_entry & 0xc000u) == 0xc00u) + if ((ehdr->e_entry & 0xc000u) == 0xc000u) ehdr->e_entry += off; #ifdef ELF_VERBOSE printf("ehdr->e_entry 0x%08x, va<->pa off %llx\n", ehdr->e_entry, off); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r247412 - head/sys/netinet
Author: tuexen Date: Wed Feb 27 19:51:47 2013 New Revision: 247412 URL: http://svnweb.freebsd.org/changeset/base/247412 Log: Fix a potential race in returning setting errno when an association goes down. Reported by Mozilla in https://bugzilla.mozilla.org/show_bug.cgi?id=845513 MFC after: 3 days Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c == --- head/sys/netinet/sctputil.c Wed Feb 27 19:50:46 2013(r247411) +++ head/sys/netinet/sctputil.c Wed Feb 27 19:51:47 2013(r247412) @@ -2678,6 +2678,7 @@ set_error: if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC))) { + SOCK_LOCK(stcb->sctp_socket); if (from_peer) { if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_COOKIE_WAIT) { SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNREFUSED); @@ -2709,7 +2710,7 @@ set_error: if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) && ((state == SCTP_COMM_LOST) || (state == SCTP_CANT_STR_ASSOC))) { - socantrcvmore(stcb->sctp_socket); + socantrcvmore_locked(stcb->sctp_socket); } sorwakeup(stcb->sctp_socket); sowwakeup(stcb->sctp_socket); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r247411 - in head: include lib/libc/stdio tools/regression/lib/libc/stdio
Author: jhb Date: Wed Feb 27 19:50:46 2013 New Revision: 247411 URL: http://svnweb.freebsd.org/changeset/base/247411 Log: Add an implementation of open_memstream() and open_wmemstream(). These routines provide write-only stdio FILE objects that store their data in a dynamically allocated buffer. They are a string builder interface somewhat akin to a completely dynamic sbuf. Reviewed by: bde, jilles (earlier versions) MFC after:1 month Added: head/lib/libc/stdio/open_memstream.3 (contents, props changed) head/lib/libc/stdio/open_memstream.c (contents, props changed) head/lib/libc/stdio/open_wmemstream.c (contents, props changed) head/tools/regression/lib/libc/stdio/test-open_memstream.c (contents, props changed) head/tools/regression/lib/libc/stdio/test-open_memstream.t (contents, props changed) head/tools/regression/lib/libc/stdio/test-open_wmemstream.c (contents, props changed) head/tools/regression/lib/libc/stdio/test-open_wmemstream.t (contents, props changed) Modified: head/include/stdio.h head/include/wchar.h head/lib/libc/stdio/Makefile.inc head/lib/libc/stdio/Symbol.map head/tools/regression/lib/libc/stdio/Makefile Modified: head/include/stdio.h == --- head/include/stdio.hWed Feb 27 19:49:14 2013(r247410) +++ head/include/stdio.hWed Feb 27 19:50:46 2013(r247411) @@ -346,6 +346,7 @@ char*tempnam(const char *, const char * FILE *fmemopen(void * __restrict, size_t, const char * __restrict); ssize_t getdelim(char ** __restrict, size_t * __restrict, int, FILE * __restrict); +FILE *open_memstream(char **, size_t *); int renameat(int, const char *, int, const char *); int vdprintf(int, const char * __restrict, __va_list); Modified: head/include/wchar.h == --- head/include/wchar.hWed Feb 27 19:49:14 2013(r247410) +++ head/include/wchar.hWed Feb 27 19:50:46 2013(r247411) @@ -207,6 +207,7 @@ int wcwidth(wchar_t); #if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE size_t mbsnrtowcs(wchar_t * __restrict, const char ** __restrict, size_t, size_t, mbstate_t * __restrict); +FILE *open_wmemstream(wchar_t **, size_t *); wchar_t*wcpcpy(wchar_t * __restrict, const wchar_t * __restrict); wchar_t*wcpncpy(wchar_t * __restrict, const wchar_t * __restrict, size_t); wchar_t*wcsdup(const wchar_t *) __malloc_like; Modified: head/lib/libc/stdio/Makefile.inc == --- head/lib/libc/stdio/Makefile.incWed Feb 27 19:49:14 2013 (r247410) +++ head/lib/libc/stdio/Makefile.incWed Feb 27 19:50:46 2013 (r247411) @@ -14,6 +14,7 @@ SRCS+=_flock_stub.c asprintf.c clrerr.c ftell.c funopen.c fvwrite.c fwalk.c fwide.c fwprintf.c fwscanf.c \ fwrite.c getc.c getchar.c getdelim.c getline.c \ gets.c getw.c getwc.c getwchar.c makebuf.c mktemp.c \ + open_memstream.c open_wmemstream.c \ perror.c printf.c printf-pos.c putc.c putchar.c \ puts.c putw.c putwc.c putwchar.c \ refill.c remove.c rewind.c rget.c scanf.c setbuf.c setbuffer.c \ @@ -36,7 +37,7 @@ MAN+= fclose.3 ferror.3 fflush.3 fgetln. flockfile.3 \ fopen.3 fputs.3 \ fputws.3 fread.3 fseek.3 funopen.3 fwide.3 getc.3 \ - getline.3 getwc.3 mktemp.3 \ + getline.3 getwc.3 mktemp.3 open_memstream.3 \ printf.3 printf_l.3 putc.3 putwc.3 remove.3 scanf.3 scanf_l.3 setbuf.3 \ stdio.3 tmpnam.3 \ ungetc.3 ungetwc.3 wprintf.3 wscanf.3 @@ -60,6 +61,7 @@ MLINKS+=getc.3 fgetc.3 getc.3 getc_unloc MLINKS+=getline.3 getdelim.3 MLINKS+=getwc.3 fgetwc.3 getwc.3 getwchar.3 MLINKS+=mktemp.3 mkdtemp.3 mktemp.3 mkstemp.3 mktemp.3 mkstemps.3 +MLINKS+=open_memstream.3 open_wmemstream.3 MLINKS+=printf.3 asprintf.3 printf.3 dprintf.3 printf.3 fprintf.3 \ printf.3 snprintf.3 printf.3 sprintf.3 \ printf.3 vasprintf.3 printf.3 vdprintf.3 \ Modified: head/lib/libc/stdio/Symbol.map == --- head/lib/libc/stdio/Symbol.map Wed Feb 27 19:49:14 2013 (r247410) +++ head/lib/libc/stdio/Symbol.map Wed Feb 27 19:50:46 2013 (r247411) @@ -156,6 +156,8 @@ FBSD_1.3 { putwc_l; putwchar_l; fmemopen; + open_memstream; + open_wmemstream; }; FBSDprivate_1.0 { Added: head/lib/libc/stdio/open_memstream.3 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/stdio/open_memstream.3Wed Feb 27 19:50:46 2013 (r247411) @@ -0,0 +1,154 @@ +.\" Copyright (c) 2013 Advanced Computing Technolog
svn commit: r247405 - in head: sys/dev/watchdog sys/sys usr.sbin/watchdogd
Author: alfred Date: Wed Feb 27 19:03:31 2013 New Revision: 247405 URL: http://svnweb.freebsd.org/changeset/base/247405 Log: watchdogd(8) and watchdog(4) enhancements. The following support was added to watchdog(4): - Support to query the outstanding timeout. - Support to set a software pre-timeout function watchdog with an 'action' - Support to set a software only watchdog with a configurable 'action' 'action' can be a mask specifying a single operation or a combination of: log(9), printf(9), panic(9) and/or kdb_enter(9). Support the following in watchdogged: - Support to utilize the new additions to watchdog(4). - Support to warn if a watchdog script runs for too long. - Support for "dry run" where we do not actually arm the watchdog, but only report on our timing. Sponsored by: iXsystems, Inc. MFC after: 1 month Modified: head/sys/dev/watchdog/watchdog.c head/sys/sys/watchdog.h head/usr.sbin/watchdogd/watchdogd.8 head/usr.sbin/watchdogd/watchdogd.c Modified: head/sys/dev/watchdog/watchdog.c == --- head/sys/dev/watchdog/watchdog.cWed Feb 27 18:47:01 2013 (r247404) +++ head/sys/dev/watchdog/watchdog.cWed Feb 27 19:03:31 2013 (r247405) @@ -1,5 +1,8 @@ /*- * Copyright (c) 2004 Poul-Henning Kamp + * Copyright (c) 2013 iXsystems.com, + * author: Alfred Perlstein + * * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,21 +32,40 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include #include #include #include +#include #include #include #include +#include /* kern_clock_gettime() */ + +static int wd_set_pretimeout(int newtimeout, int disableiftoolong); +static void wd_timeout_cb(void *arg); + +static struct callout wd_pretimeo_handle; +static int wd_pretimeout; +static int wd_pretimeout_act = WD_SOFT_LOG; + +static struct callout wd_softtimeo_handle; +static int wd_softtimer; /* true = use softtimer instead of hardware + watchdog */ +static int wd_softtimeout_act = WD_SOFT_LOG; /* action for the software timeout */ + static struct cdev *wd_dev; -static volatile u_int wd_last_u; +static volatile u_int wd_last_u;/* last timeout value set by kern_do_pat */ -static int -kern_do_pat(u_int utim) +static int wd_lastpat_valid = 0; +static time_t wd_lastpat = 0; /* when the watchdog was last patted */ + +int +wdog_kern_pat(u_int utim) { int error; @@ -51,11 +73,20 @@ kern_do_pat(u_int utim) return (EINVAL); if ((utim & WD_LASTVAL) != 0) { + /* +* if WD_LASTVAL is set, fill in the bits for timeout +* from the saved value in wd_last_u. +*/ MPASS((wd_last_u & ~WD_INTERVAL) == 0); utim &= ~WD_LASTVAL; utim |= wd_last_u; - } else + } else { + /* +* Otherwise save the new interval. +* This can be zero (to disable the watchdog) +*/ wd_last_u = (utim & WD_INTERVAL); + } if ((utim & WD_INTERVAL) == WD_TO_NEVER) { utim = 0; @@ -65,18 +96,49 @@ kern_do_pat(u_int utim) /* Assume no watchdog available; watchdog flags success */ error = EOPNOTSUPP; } - EVENTHANDLER_INVOKE(watchdog_list, utim, &error); + if (wd_softtimer) { + if (utim == 0) { + callout_stop(&wd_softtimeo_handle); + } else { + (void) callout_reset(&wd_softtimeo_handle, + hz*utim, wd_timeout_cb, "soft"); + } + error = 0; + } else { + EVENTHANDLER_INVOKE(watchdog_list, utim, &error); + } + wd_set_pretimeout(wd_pretimeout, true); + /* +* If we were able to arm/strobe the watchdog, then +* update the last time it was strobed for WDIOC_GETTIMELEFT +*/ + if (!error) { + struct timespec ts; + + error = kern_clock_gettime(curthread /* XXX */, + CLOCK_MONOTONIC_FAST, &ts); + if (!error) { + wd_lastpat = ts.tv_sec; + wd_lastpat_valid = 1; + } + } return (error); } static int -wd_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t data, -int flags __unused, struct thread *td) +wd_valid_act(int act) +{ + + if ((act & ~(WD_SOFT_MASK)) != 0) + return false; + return true; +} + +static int +wd_ioctl_patpat(caddr_t data) { u_int u; - if (cmd != WDIOCPATPAT) - return (ENOIOCTL); u = *(u_int *)data; if (u & ~(WD_ACTIVE | WD_PASSIVE | WD_LASTVAL | WD_
svn commit: r247400 - in head/sys: amd64/amd64 i386/i386 i386/xen powerpc/aim powerpc/booke sparc64/sparc64 vm
Author: attilio Date: Wed Feb 27 18:12:13 2013 New Revision: 247400 URL: http://svnweb.freebsd.org/changeset/base/247400 Log: Merge from vmobj-rwlock: VM_OBJECT_LOCKED() macro is only used to implement a custom version of lock assertions right now (which likely spread out thanks to copy and paste). Remove it and implement actual assertions. Sponsored by: EMC / Isilon storage division Reviewed by: alc Tested by:pho Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/booke/pmap.c head/sys/sparc64/sparc64/pmap.c head/sys/vm/vm_object.h Modified: head/sys/amd64/amd64/pmap.c == --- head/sys/amd64/amd64/pmap.c Wed Feb 27 18:12:04 2013(r247399) +++ head/sys/amd64/amd64/pmap.c Wed Feb 27 18:12:13 2013(r247400) @@ -3492,9 +3492,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, KASSERT((m->oflags & VPO_UNMANAGED) != 0 || va < kmi.clean_sva || va >= kmi.clean_eva, ("pmap_enter: managed mapping within the clean submap")); - KASSERT((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) != 0 || - VM_OBJECT_LOCKED(m->object), - ("pmap_enter: page %p is not busy", m)); + if ((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) == 0) + VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); pa = VM_PAGE_TO_PHYS(m); newpte = (pt_entry_t)(pa | PG_A | PG_V); if ((access & VM_PROT_WRITE) != 0) Modified: head/sys/i386/i386/pmap.c == --- head/sys/i386/i386/pmap.c Wed Feb 27 18:12:04 2013(r247399) +++ head/sys/i386/i386/pmap.c Wed Feb 27 18:12:13 2013(r247400) @@ -3456,9 +3456,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, KASSERT(va < UPT_MIN_ADDRESS || va >= UPT_MAX_ADDRESS, ("pmap_enter: invalid to pmap_enter page table pages (va: 0x%x)", va)); - KASSERT((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) != 0 || - VM_OBJECT_LOCKED(m->object), - ("pmap_enter: page %p is not busy", m)); + if ((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) == 0) + VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); mpte = NULL; Modified: head/sys/i386/xen/pmap.c == --- head/sys/i386/xen/pmap.cWed Feb 27 18:12:04 2013(r247399) +++ head/sys/i386/xen/pmap.cWed Feb 27 18:12:13 2013(r247400) @@ -2666,9 +2666,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, KASSERT(va < UPT_MIN_ADDRESS || va >= UPT_MAX_ADDRESS, ("pmap_enter: invalid to pmap_enter page table pages (va: 0x%x)", va)); - KASSERT((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) != 0 || - VM_OBJECT_LOCKED(m->object), - ("pmap_enter: page %p is not busy", m)); + if ((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) == 0) + VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); mpte = NULL; Modified: head/sys/powerpc/aim/mmu_oea.c == --- head/sys/powerpc/aim/mmu_oea.c Wed Feb 27 18:12:04 2013 (r247399) +++ head/sys/powerpc/aim/mmu_oea.c Wed Feb 27 18:12:13 2013 (r247400) @@ -1121,9 +1121,8 @@ moea_enter_locked(pmap_t pmap, vm_offset if (pmap_bootstrapped) rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - KASSERT((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) != 0 || - VM_OBJECT_LOCKED(m->object), - ("moea_enter_locked: page %p is not busy", m)); + if ((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) == 0) + VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); /* XXX change the pvo head for fake pages */ if ((m->oflags & VPO_UNMANAGED) != 0) { Modified: head/sys/powerpc/aim/mmu_oea64.c == --- head/sys/powerpc/aim/mmu_oea64.cWed Feb 27 18:12:04 2013 (r247399) +++ head/sys/powerpc/aim/mmu_oea64.cWed Feb 27 18:12:13 2013 (r247400) @@ -1183,9 +1183,8 @@ moea64_enter(mmu_t mmu, pmap_t pmap, vm_ pvo_flags = PVO_MANAGED; } - KASSERT((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) != 0 || - VM_OBJECT_LOCKED(m->object), - ("moea64_enter: page %p is not busy", m)); + if ((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) == 0) + VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); /* XXX change the pvo head for fake pages */ if ((m->oflags & VPO_UNMANAGED) != 0) { Modified: head/sys/powerpc/booke/pmap.c == --- head/sys/powerpc/booke/pmap.c
svn commit: r247399 - head/sbin/tunefs
Author: pho Date: Wed Feb 27 18:12:04 2013 New Revision: 247399 URL: http://svnweb.freebsd.org/changeset/base/247399 Log: The .journal file needs to reside on the ROOTINO which must not extend beyond direct blocks. A typo caused this check to fail. Modified: head/sbin/tunefs/tunefs.c Modified: head/sbin/tunefs/tunefs.c == --- head/sbin/tunefs/tunefs.c Wed Feb 27 14:45:23 2013(r247398) +++ head/sbin/tunefs/tunefs.c Wed Feb 27 18:12:04 2013(r247399) @@ -671,7 +671,7 @@ journal_findfile(void) return (ino); } } else { - if ((off_t)dp1->di_size >= lblktosize(&sblock, NDADDR)) { + if ((off_t)dp2->di_size >= lblktosize(&sblock, NDADDR)) { warnx("ROOTINO extends beyond direct blocks."); return (-1); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r247359 - head/sbin/reboot
On Tuesday, February 26, 2013 6:18:36 pm Nick Hibma wrote: > Author: n_hibma > Date: Tue Feb 26 23:18:35 2013 > New Revision: 247359 > URL: http://svnweb.freebsd.org/changeset/base/247359 > > Log: > Clarify that overriding the -h/-D flags through flags in device.hints > only works for sio(4) but not for uart(4) which no longer has this flag. You should probably just remove the flag entirely. sio(4) doesn't build on 8.x and later. -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r247398 - in head: cddl/contrib/opensolaris/cmd/zdb sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys
Author: mm Date: Wed Feb 27 14:45:23 2013 New Revision: 247398 URL: http://svnweb.freebsd.org/changeset/base/247398 Log: MFV 247176, 247178, 247315: Import metaslab_sync() speedup from vendor (illumos). Illumos ZFS issues: 3552 condensing one space map burns 3 seconds of CPU in spa_sync() thread 3564 spa_sync() spends 5-10% of its time in metaslab_sync() (when not condensing) 3578 transferring the freed map to the defer map should be constant time 3579 ztest trips assertion in metaslab_weight() References: https://www.illumos.org/issues/3552 https://www.illumos.org/issues/3564 https://www.illumos.org/issues/3578 https://www.illumos.org/issues/3579 MFC after:2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c == --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Feb 27 11:42:28 2013 (r247397) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Feb 27 14:45:23 2013 (r247398) @@ -545,7 +545,7 @@ static void dump_metaslab_stats(metaslab_t *msp) { char maxbuf[32]; - space_map_t *sm = &msp->ms_map; + space_map_t *sm = msp->ms_map; avl_tree_t *t = sm->sm_pp_root; int free_pct = sm->sm_space * 100 / sm->sm_size; @@ -561,7 +561,7 @@ dump_metaslab(metaslab_t *msp) { vdev_t *vd = msp->ms_group->mg_vd; spa_t *spa = vd->vdev_spa; - space_map_t *sm = &msp->ms_map; + space_map_t *sm = msp->ms_map; space_map_obj_t *smo = &msp->ms_smo; char freebuf[32]; @@ -2160,11 +2160,11 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) for (int m = 0; m < vd->vdev_ms_count; m++) { metaslab_t *msp = vd->vdev_ms[m]; mutex_enter(&msp->ms_lock); - space_map_unload(&msp->ms_map); - VERIFY(space_map_load(&msp->ms_map, + space_map_unload(msp->ms_map); + VERIFY(space_map_load(msp->ms_map, &zdb_space_map_ops, SM_ALLOC, &msp->ms_smo, spa->spa_meta_objset) == 0); - msp->ms_map.sm_ppd = vd; + msp->ms_map->sm_ppd = vd; mutex_exit(&msp->ms_lock); } } @@ -2187,7 +2187,7 @@ zdb_leak_fini(spa_t *spa) for (int m = 0; m < vd->vdev_ms_count; m++) { metaslab_t *msp = vd->vdev_ms[m]; mutex_enter(&msp->ms_lock); - space_map_unload(&msp->ms_map); + space_map_unload(msp->ms_map); mutex_exit(&msp->ms_lock); } } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Wed Feb 27 11:42:28 2013(r247397) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Wed Feb 27 14:45:23 2013(r247398) @@ -48,6 +48,14 @@ uint64_t metaslab_aliquot = 512ULL << 10 uint64_t metaslab_gang_bang = SPA_MAXBLOCKSIZE + 1;/* force gang blocks */ /* + * The in-core space map representation is more compact than its on-disk form. + * The zfs_condense_pct determines how much more compact the in-core + * space_map representation must be before we compact it on-disk. + * Values should be greater than or equal to 100. + */ +int zfs_condense_pct = 200; + +/* * This value defines the number of allowed allocation failures per vdev. * If a device reaches this threshold in a given txg then we consider skipping * allocations on that device. @@ -215,9 +223,9 @@ metaslab_compare(const void *x1, const v /* * If the weights are identical, use the offset to force uniqueness. */ - if (m1->ms_map.sm_start < m2->ms_map.sm_start) + if (m1->ms_map->sm_start < m2->ms_map->sm_start) return (-1); - if (m1->ms_map.sm_start > m2->ms_map.sm_start) + if (m1->ms_map->sm_start > m2->ms_map->sm_start) return (1); ASSERT3P(m1, ==, m2); @@ -7
svn commit: r247396 - head/libexec/rtld-elf
Author: tijl Date: Wed Feb 27 09:34:09 2013 New Revision: 247396 URL: http://svnweb.freebsd.org/changeset/base/247396 Log: Map libraries linked with -Ttext-segment=base_addr at base_addr. Normal libraries have base address 0 and are unaffected by this change. PR: 176216 Submitted by: Damjan Jovanovic Reviewed by: kib MFC after:1 week Modified: head/libexec/rtld-elf/map_object.c Modified: head/libexec/rtld-elf/map_object.c == --- head/libexec/rtld-elf/map_object.c Wed Feb 27 08:56:57 2013 (r247395) +++ head/libexec/rtld-elf/map_object.c Wed Feb 27 09:34:09 2013 (r247396) @@ -175,7 +175,7 @@ map_object(int fd, const char *path, con base_vaddr = trunc_page(segs[0]->p_vaddr); base_vlimit = round_page(segs[nsegs]->p_vaddr + segs[nsegs]->p_memsz); mapsize = base_vlimit - base_vaddr; -base_addr = hdr->e_type == ET_EXEC ? (caddr_t) base_vaddr : NULL; +base_addr = (caddr_t) base_vaddr; mapbase = mmap(base_addr, mapsize, PROT_NONE, MAP_ANON | MAP_PRIVATE | MAP_NOCORE, -1, 0); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r247391 - head/sys/arm/ti
Author: gonzo Date: Wed Feb 27 08:34:32 2013 New Revision: 247391 URL: http://svnweb.freebsd.org/changeset/base/247391 Log: Fix typo Modified: head/sys/arm/ti/ti_gpio.c Modified: head/sys/arm/ti/ti_gpio.c == --- head/sys/arm/ti/ti_gpio.c Wed Feb 27 08:32:34 2013(r247390) +++ head/sys/arm/ti/ti_gpio.c Wed Feb 27 08:34:32 2013(r247391) @@ -724,7 +724,7 @@ ti_gpio_attach(device_t dev) ti_gpio_write_4(sc, i, TI_GPIO_CLEARIRQENABLE1, 0x); ti_gpio_write_4(sc, i, TI_GPIO_CLEARIRQENABLE2, 0x); - /* Init OE registger based on pads configuration */ + /* Init OE register based on pads configuration */ reg_oe = 0x; for (pin = 0; pin < 32; pin++) { ti_scm_padconf_get_gpioflags( ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r247390 - head/sys/arm/ti
Author: gonzo Date: Wed Feb 27 08:32:34 2013 New Revision: 247390 URL: http://svnweb.freebsd.org/changeset/base/247390 Log: - Initialize GPIO_OE register based on pinmux configuration Although AM335x TRM states that GPIO_OE register is not used and just reflects pads configuration in practice it does control pin behavior and shoiuld be set in addition to pinmux setup Modified: head/sys/arm/ti/ti_gpio.c Modified: head/sys/arm/ti/ti_gpio.c == --- head/sys/arm/ti/ti_gpio.c Wed Feb 27 07:34:09 2013(r247389) +++ head/sys/arm/ti/ti_gpio.c Wed Feb 27 08:32:34 2013(r247390) @@ -653,6 +653,9 @@ ti_gpio_attach(device_t dev) struct ti_gpio_softc *sc = device_get_softc(dev); unsigned int i; int err = 0; + int pin; + uint32_t flags; + uint32_t reg_oe; sc->sc_dev = dev; @@ -720,6 +723,17 @@ ti_gpio_attach(device_t dev) /* Disable interrupts for all pins */ ti_gpio_write_4(sc, i, TI_GPIO_CLEARIRQENABLE1, 0x); ti_gpio_write_4(sc, i, TI_GPIO_CLEARIRQENABLE2, 0x); + + /* Init OE registger based on pads configuration */ + reg_oe = 0x; + for (pin = 0; pin < 32; pin++) { + ti_scm_padconf_get_gpioflags( + PINS_PER_BANK*i + pin, &flags); + if (flags & GPIO_PIN_OUTPUT) + reg_oe &= ~(1U << pin); + } + + ti_gpio_write_4(sc, i, TI_GPIO_OE, reg_oe); } } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r247274 - in head: bin/test tools/regression/bin/test
On 2013-Feb-26 01:02:27 +0100, Jilles Tjoelker wrote: >> Enhance test(1) by adding provision to compare any combination of the >> access, birth, change and modify times of two files, instead of only >> being able to compare modify times. The builtin test in sh(1) will >> automagically acquire the same expansion. > >What do you need this for? If it is not needed very often, this test can >be done more portably (older FreeBSD and GNU) as > [ -n "$(find -L FILE1 -prune -newerXY FILE2 2>/dev/null)" ] In my case I needed to compare the ctime on one set of files with the mtime in another set. I had a think about using find(1) and gave it away as too ugly. That expression needs serious thought to understand and about ½ the tokens in the find(1) are to handle special cases - which is a further indication that it isn't ideal. >I have generally been rather reluctant in adding things to sh(1) and >even more so if they are completely new. Someone proposed something >rather similar (except that it added a time string parser -- even more >code) in PR bin/57054 and I rejected it in 2009. Time parsing is a large can of worms - getting it right is messy (that patch includes 1KLOC of new code and still isn't locale aware). And the work-around of touching a dummy file to the wanted age isn't too horrrible. This is a much smaller patch and there's no equally clean work-around. >> +a=/tmp/test$$.1 >> +b=/tmp/test$$.2 > >Please use mktemp(1). Using $$ for temporary files is insecure on >multiuser systems. In this case, I want filenames that don't exist. I will look at using mktemp(1) to create a temporary directory. >> +sleep 2# Ensure $b is newer than $a >> +touch $b > >Please use touch -t instead of sleeping. I'm impatient while running >tests :) In this case, I want all the timestamps on $b to be later than $a. I initially tried without the sleep but that failed with the builtin test(1) because the FS timestamps weren't sufficiently granular to report the difference. I could create one of the files much earlier during the test and then use a conditional test to only sleep if the timestamps were indistinguishable (this probably needs to use the above find(1) horror to avoid using test(1) to test itself). I agree the other sleep(1)s should be able to be replaced with touch(1) but I ran into problems with my initial efforts to do everything using touch(1). I will revisit it. -- Peter Jeremy pgpB_uIyxsx0n.pgp Description: PGP signature