From owner-svn-src-all@FreeBSD.ORG Sun May 3 00:21:47 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1AAF106566C; Sun, 3 May 2009 00:21:47 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 5FDA08FC0C; Sun, 3 May 2009 00:21:47 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n430Kvqt030778; Sat, 2 May 2009 18:20:57 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 02 May 2009 18:21:03 -0600 (MDT) Message-Id: <20090502.182103.-895882057.imp@bsdimp.com> To: mav@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <49FCC404.6090105@FreeBSD.org> References: <200905012143.n41Lh4uS054073@svn.freebsd.org> <20090502.153808.-896932641.imp@bsdimp.com> <49FCC404.6090105@FreeBSD.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r191733 - in head/sys: amd64/isa isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 00:21:48 -0000 In message: <49FCC404.6090105@FreeBSD.org> Alexander Motin writes: : M. Warner Losh wrote: : > : Author: mav : > : Date: Fri May 1 21:43:04 2009 : > : New Revision: 191733 : > : URL: http://svn.freebsd.org/changeset/base/191733 : > : : > : Log: : > : Add resume methods to i8254 and atrtc devices. : > : > This likely obviates the need for pmtimer.c now. You might want to : > investigate... : : Yes, I have seen it. : : > : Modified: : > : head/sys/amd64/isa/clock.c : > : head/sys/isa/atrtc.c : > : > Shouldn't there be one for i386 too? : : For i386 it is done by pmtimer now (that's why I haven't done it there), : but there is no pmtimer driver for amd64. Actually both ways are not so : perfect, as both restore timer interrupts quite late on resume process. Yes. That's a problem... : In my case it is not fatal as i8254 is anyway ticking by default, just : slower. But it seems to increase my system resume time to 10 seconds : instead of usual 4-5. May be we should somehow enforce order of device : resuming, or build some special event timers control infrastructure : alike to PIC one. There's some work to do multi-pass probe/attach. Perhaps it should be generalized to do suspend/resume as well... : Also, except restoring clocks interrupts, pmtimer restores system time : on wakeup. For amd64 it is implemented in MD resume code now. We should : decide which way to go. I don't very like pmtimer approach, as there is : no any newbus relations between it and i8254/atrtc drivers. pmtimer should likely die, or at least be only used by APM. It was a hack that was tuned to APM and never really updated for ACPI... Warner From owner-svn-src-all@FreeBSD.ORG Sun May 3 02:37:13 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3F151065670; Sun, 3 May 2009 02:37:13 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1ED78FC14; Sun, 3 May 2009 02:37:13 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n432bDSj001880; Sun, 3 May 2009 02:37:13 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n432bD2x001879; Sun, 3 May 2009 02:37:13 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <200905030237.n432bD2x001879@svn.freebsd.org> From: Takahashi Yoshihiro Date: Sun, 3 May 2009 02:37:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191761 - head/sys/pc98/cbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 02:37:14 -0000 Author: nyan Date: Sun May 3 02:37:13 2009 New Revision: 191761 URL: http://svn.freebsd.org/changeset/base/191761 Log: MFi386: revision 191745 Add support for using i8254 and rtc timers as event sources for i386 SMP system. Redistribute hard-/stat-/profclock events to other CPUs using IPI. Modified: head/sys/pc98/cbus/clock.c Modified: head/sys/pc98/cbus/clock.c ============================================================================== --- head/sys/pc98/cbus/clock.c Sat May 2 22:30:33 2009 (r191760) +++ head/sys/pc98/cbus/clock.c Sun May 3 02:37:13 2009 (r191761) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -71,6 +72,7 @@ __FBSDID("$FreeBSD$"); #endif #include #include +#include #include #ifdef DEV_ISA @@ -123,6 +125,31 @@ static struct timecounter i8254_timecoun 0 /* quality */ }; +int +hardclockintr(struct trapframe *frame) +{ + + if (PCPU_GET(cpuid) == 0) + hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); + else + hardclock_cpu(TRAPF_USERMODE(frame)); + return (FILTER_HANDLED); +} + +int +statclockintr(struct trapframe *frame) +{ + + return (FILTER_HANDLED); +} + +int +profclockintr(struct trapframe *frame) +{ + + return (FILTER_HANDLED); +} + static int clkintr(struct trapframe *frame) { @@ -151,7 +178,14 @@ clkintr(struct trapframe *frame) (*lapic_cyclic_clock_func[cpu])(frame); #endif - hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); +#ifdef SMP + if (smp_started) + ipi_all_but_self(IPI_HARDCLOCK); +#endif + if (PCPU_GET(cpuid) == 0) + hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); + else + hardclock_cpu(TRAPF_USERMODE(frame)); return (FILTER_HANDLED); } From owner-svn-src-all@FreeBSD.ORG Sun May 3 03:57:04 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40A0B1065670; Sun, 3 May 2009 03:57:04 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 1BA388FC0C; Sun, 3 May 2009 03:57:04 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id AF8BF46B58; Sat, 2 May 2009 23:57:03 -0400 (EDT) Date: Sun, 3 May 2009 04:57:03 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Dmitry Chagin In-Reply-To: <200905021051.n42ApetI083033@svn.freebsd.org> Message-ID: References: <200905021051.n42ApetI083033@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r191742 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 03:57:04 -0000 On Sat, 2 May 2009, Dmitry Chagin wrote: > Linux socketpair() call expects explicit specified protocol for > AF_LOCAL domain unlike FreeBSD which expects 0 in this case. ... > @@ -859,7 +859,10 @@ linux_socketpair(struct thread *td, stru > return (EINVAL); > > bsd_args.type = args->type; > - bsd_args.protocol = args->protocol; > + if (bsd_args.domain == AF_LOCAL && args->protocol == PF_UNIX) > + bsd_args.protocol = 0; > + else > + bsd_args.protocol = args->protocol; > bsd_args.rsv = (int *)PTRIN(args->rsv); > return (socketpair(td, &bsd_args)); > } I think I'd tweak this to be more like: if (bsd_args.domain == PF_LOCAL) { if (bsd_args.protocol == PF_UNIX) bsd_args.protocl = 0; else if (bsd_args.protocol != 0) return (EPROTONOSUPPORT); } Because (a) the domain argument takes a protocol family in FreeBSD and you're passing arguments into the BSD ABI without a mapping for that field, and (b) for the protocol family the use of PF_UNIX is weird but must be supported, so I'd consider it to be an entirely mapped namespace and avoid passing through values that aren't 0 to the BSD layer as it's not clear what that would mean. Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-all@FreeBSD.ORG Sun May 3 04:01:43 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8821106566C; Sun, 3 May 2009 04:01:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C43198FC14; Sun, 3 May 2009 04:01:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4341hcw003808; Sun, 3 May 2009 04:01:43 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4341h9W003803; Sun, 3 May 2009 04:01:43 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200905030401.n4341h9W003803@svn.freebsd.org> From: Warner Losh Date: Sun, 3 May 2009 04:01:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191762 - in head/sys: conf dev/bwi modules/bwi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 04:01:44 -0000 Author: imp Date: Sun May 3 04:01:43 2009 New Revision: 191762 URL: http://svn.freebsd.org/changeset/base/191762 Log: Bring in Andrew Thompson's port of Sepherosa Ziehau's bwi driver for Broadcom BCM43xx chipsets. This driver uses the v3 firmware that needs to be fetched separately. A port will be committed to create the bwi firmware module. The driver matches the following chips: Broadcom BCM4301, BCM4307, BCM4306, BCM4309, BCM4311, BCM4312, BCM4318, BCM4319 The driver works for 802.11b and 802.11g. Limitations: This doesn't support the 802.11a or 802.11n portion of radios. Some BCM4306 and BCM4309 cards don't work with Channel 1, 2 or 3. Documenation for this firmware is reverse engineered from http://bcm.sipsolutions.net/ V4 of the firmware is needed for 11a or 11n support http://bcm-v4.sipsolutions.net/ Firmware needs to be fetched from a third party, port to be committed # I've tested this with a BCM4319 mini-pci and a BCM4318 CardBus card, and # not connected it to the build until the firmware port is committed. Obtained from: DragonFlyBSD, //depot/projects/vap Reviewed by: sam@, thompsa@ Added: head/sys/dev/bwi/ head/sys/dev/bwi/bitops.h (contents, props changed) head/sys/dev/bwi/bwimac.c (contents, props changed) head/sys/dev/bwi/bwimac.h (contents, props changed) head/sys/dev/bwi/bwiphy.c (contents, props changed) head/sys/dev/bwi/bwiphy.h (contents, props changed) head/sys/dev/bwi/bwirf.c (contents, props changed) head/sys/dev/bwi/bwirf.h (contents, props changed) head/sys/dev/bwi/if_bwi.c (contents, props changed) head/sys/dev/bwi/if_bwi_pci.c (contents, props changed) head/sys/dev/bwi/if_bwireg.h (contents, props changed) head/sys/dev/bwi/if_bwivar.h (contents, props changed) head/sys/modules/bwi/ head/sys/modules/bwi/Makefile (contents, props changed) Modified: head/sys/conf/files head/sys/conf/options Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun May 3 02:37:13 2009 (r191761) +++ head/sys/conf/files Sun May 3 04:01:43 2009 (r191762) @@ -712,6 +712,11 @@ dev/buslogic/bt_eisa.c optional bt eisa dev/buslogic/bt_isa.c optional bt isa dev/buslogic/bt_mca.c optional bt mca dev/buslogic/bt_pci.c optional bt pci +dev/bwi/bwiirf.c optional bwi +dev/bwi/bwimac.c optional bwi +dev/bwi/bwiphy.c optional bwi +dev/bwi/if_bwi.c optional bwi +dev/bwi/if_bwi_pci.c optional bwi pci dev/cardbus/cardbus.c optional cardbus dev/cardbus/cardbus_cis.c optional cardbus dev/cardbus/cardbus_device.c optional cardbus Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sun May 3 02:37:13 2009 (r191761) +++ head/sys/conf/options Sun May 3 04:01:43 2009 (r191762) @@ -763,6 +763,10 @@ AH_NEED_DESC_SWAP opt_ah.h AH_USE_INIPDGAIN opt_ah.h AH_MAXCHAN opt_ah.h +# options for the Broadcom BCM43xx driver (bwi) +BWI_DEBUG opt_bwi.h +BWI_DEBUG_VERBOSE opt_bwi.h + # options for the Marvell 8335 wireless driver MALO_DEBUG opt_malo.h MALO_TXBUF opt_malo.h Added: head/sys/dev/bwi/bitops.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/bwi/bitops.h Sun May 3 04:01:43 2009 (r191762) @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2004, 2005 David Young. All rights reserved. + * + * Programmed for NetBSD by David Young. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of David Young may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY David Young ``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 David + * Young 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. + * + * $DragonFly: src/sys/dev/netif/bwi/bitops.h,v 1.1 2007/09/08 06:15:54 sephe Exp $ + * $FreeBSD$ + */ + +#ifndef _BITOPS_H +#define _BITOPS_H + +/* + * __BIT(n): Return a bitmask with bit m set, where the least + * significant bit is bit 0. + * + * __BITS(m, n): Return a bitmask with bits m through n, inclusive, + * set. It does not matter whether m>n or m<=n. The + * least significant bit is bit 0. + * + * A "bitfield" is a span of consecutive bits defined by a bitmask, + * where 1s select the bits in the bitfield. __SHIFTIN, __SHIFTOUT, + * and SHIFTOUT_MASK help read and write bitfields from device registers. + * + * __SHIFTIN(v, mask): Left-shift bits `v' into the bitfield + * defined by `mask', and return them. No + * side-effects. + * + * __SHIFTOUT(v, mask): Extract and return the bitfield selected + * by `mask' from `v', right-shifting the + * bits so that the rightmost selected bit + * is at bit 0. No side-effects. + * + * __SHIFTOUT_MASK(mask): Right-shift the bits in `mask' so that + * the rightmost non-zero bit is at bit + * 0. This is useful for finding the + * greatest unsigned value that a bitfield + * can hold. No side-effects. Note that + * SHIFTOUT_MASK(m) = SHIFTOUT(m, m). + */ + +/* __BIT(n): nth bit, where __BIT(0) == 0x1. */ +#define __BIT(__n) (((__n) == 32) ? 0 : ((uint32_t)1 << (__n))) + +/* __BITS(m, n): bits m through n, m < n. */ +#define __BITS(__m, __n) \ + ((__BIT(MAX((__m), (__n)) + 1) - 1) ^ (__BIT(MIN((__m), (__n))) - 1)) + +/* Find least significant bit that is set */ +#define __LOWEST_SET_BIT(__mask) ((((__mask) - 1) & (__mask)) ^ (__mask)) + +#define __SHIFTOUT(__x, __mask) (((__x) & (__mask)) / __LOWEST_SET_BIT(__mask)) +#define __SHIFTIN(__x, __mask) ((__x) * __LOWEST_SET_BIT(__mask)) +#define __SHIFTOUT_MASK(__mask) __SHIFTOUT((__mask), (__mask)) + +#endif /* !_BITOPS_H */ Added: head/sys/dev/bwi/bwimac.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/bwi/bwimac.c Sun May 3 04:01:43 2009 (r191762) @@ -0,0 +1,1982 @@ +/* + * Copyright (c) 2007 The DragonFly Project. All rights reserved. + * + * This code is derived from software contributed to The DragonFly Project + * by Sepherosa Ziehau + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name of The DragonFly Project nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific, prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS 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. + * + * $DragonFly: src/sys/dev/netif/bwi/bwimac.c,v 1.13 2008/02/15 11:15:38 sephe Exp $ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_inet.h" +#include "opt_bwi.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + +struct bwi_retry_lim { + uint16_t shretry; + uint16_t shretry_fb; + uint16_t lgretry; + uint16_t lgretry_fb; +}; + +static int bwi_mac_test(struct bwi_mac *); +static int bwi_mac_get_property(struct bwi_mac *); + +static void bwi_mac_set_retry_lim(struct bwi_mac *, + const struct bwi_retry_lim *); +static void bwi_mac_set_ackrates(struct bwi_mac *, + const struct ieee80211_rate_table *rt, + const struct ieee80211_rateset *); + +static int bwi_mac_gpio_init(struct bwi_mac *); +static int bwi_mac_gpio_fini(struct bwi_mac *); +static void bwi_mac_opmode_init(struct bwi_mac *); +static void bwi_mac_hostflags_init(struct bwi_mac *); +static void bwi_mac_bss_param_init(struct bwi_mac *); + +static int bwi_mac_fw_alloc(struct bwi_mac *); +static void bwi_mac_fw_free(struct bwi_mac *); +static int bwi_mac_fw_load(struct bwi_mac *); +static int bwi_mac_fw_init(struct bwi_mac *); +static int bwi_mac_fw_load_iv(struct bwi_mac *, const struct firmware *); + +static void bwi_mac_setup_tpctl(struct bwi_mac *); +static void bwi_mac_adjust_tpctl(struct bwi_mac *, int, int); + +static void bwi_mac_lock(struct bwi_mac *); +static void bwi_mac_unlock(struct bwi_mac *); + +static const uint8_t bwi_sup_macrev[] = { 2, 4, 5, 6, 7, 9, 10 }; + +void +bwi_tmplt_write_4(struct bwi_mac *mac, uint32_t ofs, uint32_t val) +{ + struct bwi_softc *sc = mac->mac_sc; + + if (mac->mac_flags & BWI_MAC_F_BSWAP) + val = bswap32(val); + + CSR_WRITE_4(sc, BWI_MAC_TMPLT_CTRL, ofs); + CSR_WRITE_4(sc, BWI_MAC_TMPLT_DATA, val); +} + +void +bwi_hostflags_write(struct bwi_mac *mac, uint64_t flags) +{ + uint64_t val; + + val = flags & 0xffff; + MOBJ_WRITE_2(mac, BWI_COMM_MOBJ, BWI_COMM_MOBJ_HFLAGS_LO, val); + + val = (flags >> 16) & 0xffff; + MOBJ_WRITE_2(mac, BWI_COMM_MOBJ, BWI_COMM_MOBJ_HFLAGS_MI, val); + + /* HI has unclear meaning, so leave it as it is */ +} + +uint64_t +bwi_hostflags_read(struct bwi_mac *mac) +{ + uint64_t flags, val; + + /* HI has unclear meaning, so don't touch it */ + flags = 0; + + val = MOBJ_READ_2(mac, BWI_COMM_MOBJ, BWI_COMM_MOBJ_HFLAGS_MI); + flags |= val << 16; + + val = MOBJ_READ_2(mac, BWI_COMM_MOBJ, BWI_COMM_MOBJ_HFLAGS_LO); + flags |= val; + + return flags; +} + +uint16_t +bwi_memobj_read_2(struct bwi_mac *mac, uint16_t obj_id, uint16_t ofs0) +{ + struct bwi_softc *sc = mac->mac_sc; + uint32_t data_reg; + int ofs; + + data_reg = BWI_MOBJ_DATA; + ofs = ofs0 / 4; + + if (ofs0 % 4 != 0) + data_reg = BWI_MOBJ_DATA_UNALIGN; + + CSR_WRITE_4(sc, BWI_MOBJ_CTRL, BWI_MOBJ_CTRL_VAL(obj_id, ofs)); + return CSR_READ_2(sc, data_reg); +} + +uint32_t +bwi_memobj_read_4(struct bwi_mac *mac, uint16_t obj_id, uint16_t ofs0) +{ + struct bwi_softc *sc = mac->mac_sc; + int ofs; + + ofs = ofs0 / 4; + if (ofs0 % 4 != 0) { + uint32_t ret; + + CSR_WRITE_4(sc, BWI_MOBJ_CTRL, BWI_MOBJ_CTRL_VAL(obj_id, ofs)); + ret = CSR_READ_2(sc, BWI_MOBJ_DATA_UNALIGN); + ret <<= 16; + + CSR_WRITE_4(sc, BWI_MOBJ_CTRL, + BWI_MOBJ_CTRL_VAL(obj_id, ofs + 1)); + ret |= CSR_READ_2(sc, BWI_MOBJ_DATA); + + return ret; + } else { + CSR_WRITE_4(sc, BWI_MOBJ_CTRL, BWI_MOBJ_CTRL_VAL(obj_id, ofs)); + return CSR_READ_4(sc, BWI_MOBJ_DATA); + } +} + +void +bwi_memobj_write_2(struct bwi_mac *mac, uint16_t obj_id, uint16_t ofs0, + uint16_t v) +{ + struct bwi_softc *sc = mac->mac_sc; + uint32_t data_reg; + int ofs; + + data_reg = BWI_MOBJ_DATA; + ofs = ofs0 / 4; + + if (ofs0 % 4 != 0) + data_reg = BWI_MOBJ_DATA_UNALIGN; + + CSR_WRITE_4(sc, BWI_MOBJ_CTRL, BWI_MOBJ_CTRL_VAL(obj_id, ofs)); + CSR_WRITE_2(sc, data_reg, v); +} + +void +bwi_memobj_write_4(struct bwi_mac *mac, uint16_t obj_id, uint16_t ofs0, + uint32_t v) +{ + struct bwi_softc *sc = mac->mac_sc; + int ofs; + + ofs = ofs0 / 4; + if (ofs0 % 4 != 0) { + CSR_WRITE_4(sc, BWI_MOBJ_CTRL, BWI_MOBJ_CTRL_VAL(obj_id, ofs)); + CSR_WRITE_2(sc, BWI_MOBJ_DATA_UNALIGN, v >> 16); + + CSR_WRITE_4(sc, BWI_MOBJ_CTRL, + BWI_MOBJ_CTRL_VAL(obj_id, ofs + 1)); + CSR_WRITE_2(sc, BWI_MOBJ_DATA, v & 0xffff); + } else { + CSR_WRITE_4(sc, BWI_MOBJ_CTRL, BWI_MOBJ_CTRL_VAL(obj_id, ofs)); + CSR_WRITE_4(sc, BWI_MOBJ_DATA, v); + } +} + +int +bwi_mac_lateattach(struct bwi_mac *mac) +{ + int error; + + if (mac->mac_rev >= 5) + CSR_READ_4(mac->mac_sc, BWI_STATE_HI); /* dummy read */ + + bwi_mac_reset(mac, 1); + + error = bwi_phy_attach(mac); + if (error) + return error; + + error = bwi_rf_attach(mac); + if (error) + return error; + + /* Link 11B/G PHY, unlink 11A PHY */ + if (mac->mac_phy.phy_mode == IEEE80211_MODE_11A) + bwi_mac_reset(mac, 0); + else + bwi_mac_reset(mac, 1); + + error = bwi_mac_test(mac); + if (error) + return error; + + error = bwi_mac_get_property(mac); + if (error) + return error; + + error = bwi_rf_map_txpower(mac); + if (error) + return error; + + bwi_rf_off(mac); + CSR_WRITE_2(mac->mac_sc, BWI_BBP_ATTEN, BWI_BBP_ATTEN_MAGIC); + bwi_regwin_disable(mac->mac_sc, &mac->mac_regwin, 0); + + return 0; +} + +int +bwi_mac_init(struct bwi_mac *mac) +{ + struct bwi_softc *sc = mac->mac_sc; + int error, i; + + /* Clear MAC/PHY/RF states */ + bwi_mac_setup_tpctl(mac); + bwi_rf_clear_state(&mac->mac_rf); + bwi_phy_clear_state(&mac->mac_phy); + + /* Enable MAC and linked it to PHY */ + if (!bwi_regwin_is_enabled(sc, &mac->mac_regwin)) + bwi_mac_reset(mac, 1); + + /* Initialize backplane */ + error = bwi_bus_init(sc, mac); + if (error) + return error; + + /* XXX work around for hardware bugs? */ + if (sc->sc_bus_regwin.rw_rev <= 5 && + sc->sc_bus_regwin.rw_type != BWI_REGWIN_T_BUSPCIE) { + CSR_SETBITS_4(sc, BWI_CONF_LO, + __SHIFTIN(BWI_CONF_LO_SERVTO, BWI_CONF_LO_SERVTO_MASK) | + __SHIFTIN(BWI_CONF_LO_REQTO, BWI_CONF_LO_REQTO_MASK)); + } + + /* Calibrate PHY */ + error = bwi_phy_calibrate(mac); + if (error) { + device_printf(sc->sc_dev, "PHY calibrate failed\n"); + return error; + } + + /* Prepare to initialize firmware */ + CSR_WRITE_4(sc, BWI_MAC_STATUS, + BWI_MAC_STATUS_UCODE_JUMP0 | + BWI_MAC_STATUS_IHREN); + + /* + * Load and initialize firmwares + */ + error = bwi_mac_fw_alloc(mac); + if (error) + return error; + + error = bwi_mac_fw_load(mac); + if (error) + return error; + + error = bwi_mac_gpio_init(mac); + if (error) + return error; + + error = bwi_mac_fw_init(mac); + if (error) + return error; + + /* + * Turn on RF + */ + bwi_rf_on(mac); + + /* TODO: LED, hardware rf enabled is only related to LED setting */ + + /* + * Initialize PHY + */ + CSR_WRITE_2(sc, BWI_BBP_ATTEN, 0); + bwi_phy_init(mac); + + /* TODO: interference mitigation */ + + /* + * Setup antenna mode + */ + bwi_rf_set_ant_mode(mac, mac->mac_rf.rf_ant_mode); + + /* + * Initialize operation mode (RX configuration) + */ + bwi_mac_opmode_init(mac); + + /* XXX what's these */ + if (mac->mac_rev < 3) { + CSR_WRITE_2(sc, 0x60e, 0); + CSR_WRITE_2(sc, 0x610, 0x8000); + CSR_WRITE_2(sc, 0x604, 0); + CSR_WRITE_2(sc, 0x606, 0x200); + } else { + CSR_WRITE_4(sc, 0x188, 0x80000000); + CSR_WRITE_4(sc, 0x18c, 0x2000000); + } + + /* + * Initialize TX/RX interrupts' mask + */ + CSR_WRITE_4(sc, BWI_MAC_INTR_STATUS, BWI_INTR_TIMER1); + for (i = 0; i < BWI_TXRX_NRING; ++i) { + uint32_t intrs; + + if (BWI_TXRX_IS_RX(i)) + intrs = BWI_TXRX_RX_INTRS; + else + intrs = BWI_TXRX_TX_INTRS; + CSR_WRITE_4(sc, BWI_TXRX_INTR_MASK(i), intrs); + } + + /* XXX what's this */ + CSR_SETBITS_4(sc, BWI_STATE_LO, 0x100000); + + /* Setup MAC power up delay */ + CSR_WRITE_2(sc, BWI_MAC_POWERUP_DELAY, sc->sc_pwron_delay); + + /* Set MAC regwin revision */ + MOBJ_WRITE_2(mac, BWI_COMM_MOBJ, BWI_COMM_MOBJ_MACREV, mac->mac_rev); + + /* + * Initialize host flags + */ + bwi_mac_hostflags_init(mac); + + /* + * Initialize BSS parameters + */ + bwi_mac_bss_param_init(mac); + + /* + * Initialize TX rings + */ + for (i = 0; i < BWI_TX_NRING; ++i) { + error = sc->sc_init_tx_ring(sc, i); + if (error) { + device_printf(sc->sc_dev, + "can't initialize %dth TX ring\n", i); + return error; + } + } + + /* + * Initialize RX ring + */ + error = sc->sc_init_rx_ring(sc); + if (error) { + device_printf(sc->sc_dev, "can't initialize RX ring\n"); + return error; + } + + /* + * Initialize TX stats if the current MAC uses that + */ + if (mac->mac_flags & BWI_MAC_F_HAS_TXSTATS) { + error = sc->sc_init_txstats(sc); + if (error) { + device_printf(sc->sc_dev, + "can't initialize TX stats ring\n"); + return error; + } + } + + /* XXX what's these */ + CSR_WRITE_2(sc, 0x612, 0x50); /* Force Pre-TBTT to 80? */ + MOBJ_WRITE_2(mac, BWI_COMM_MOBJ, 0x416, 0x50); + MOBJ_WRITE_2(mac, BWI_COMM_MOBJ, 0x414, 0x1f4); + + mac->mac_flags |= BWI_MAC_F_INITED; + return 0; +} + +void +bwi_mac_reset(struct bwi_mac *mac, int link_phy) +{ + struct bwi_softc *sc = mac->mac_sc; + uint32_t flags, state_lo, status; + + flags = BWI_STATE_LO_FLAG_PHYRST | BWI_STATE_LO_FLAG_PHYCLKEN; + if (link_phy) + flags |= BWI_STATE_LO_FLAG_PHYLNK; + bwi_regwin_enable(sc, &mac->mac_regwin, flags); + DELAY(2000); + + state_lo = CSR_READ_4(sc, BWI_STATE_LO); + state_lo |= BWI_STATE_LO_GATED_CLOCK; + state_lo &= ~__SHIFTIN(BWI_STATE_LO_FLAG_PHYRST, + BWI_STATE_LO_FLAGS_MASK); + CSR_WRITE_4(sc, BWI_STATE_LO, state_lo); + /* Flush pending bus write */ + CSR_READ_4(sc, BWI_STATE_LO); + DELAY(1000); + + state_lo &= ~BWI_STATE_LO_GATED_CLOCK; + CSR_WRITE_4(sc, BWI_STATE_LO, state_lo); + /* Flush pending bus write */ + CSR_READ_4(sc, BWI_STATE_LO); + DELAY(1000); + + CSR_WRITE_2(sc, BWI_BBP_ATTEN, 0); + + status = CSR_READ_4(sc, BWI_MAC_STATUS); + status |= BWI_MAC_STATUS_IHREN; + if (link_phy) + status |= BWI_MAC_STATUS_PHYLNK; + else + status &= ~BWI_MAC_STATUS_PHYLNK; + CSR_WRITE_4(sc, BWI_MAC_STATUS, status); + + if (link_phy) { + DPRINTF(sc, BWI_DBG_MAC | BWI_DBG_ATTACH | BWI_DBG_INIT, + "%s\n", "PHY is linked"); + mac->mac_phy.phy_flags |= BWI_PHY_F_LINKED; + } else { + DPRINTF(sc, BWI_DBG_MAC | BWI_DBG_ATTACH | BWI_DBG_INIT, + "%s\n", "PHY is unlinked"); + mac->mac_phy.phy_flags &= ~BWI_PHY_F_LINKED; + } +} + +void +bwi_mac_set_tpctl_11bg(struct bwi_mac *mac, const struct bwi_tpctl *new_tpctl) +{ + struct bwi_rf *rf = &mac->mac_rf; + struct bwi_tpctl *tpctl = &mac->mac_tpctl; + + if (new_tpctl != NULL) { + KASSERT(new_tpctl->bbp_atten <= BWI_BBP_ATTEN_MAX, + ("bbp_atten %d", new_tpctl->bbp_atten)); + KASSERT(new_tpctl->rf_atten <= + (rf->rf_rev < 6 ? BWI_RF_ATTEN_MAX0 + : BWI_RF_ATTEN_MAX1), + ("rf_atten %d", new_tpctl->rf_atten)); + KASSERT(new_tpctl->tp_ctrl1 <= BWI_TPCTL1_MAX, + ("tp_ctrl1 %d", new_tpctl->tp_ctrl1)); + + tpctl->bbp_atten = new_tpctl->bbp_atten; + tpctl->rf_atten = new_tpctl->rf_atten; + tpctl->tp_ctrl1 = new_tpctl->tp_ctrl1; + } + + /* Set BBP attenuation */ + bwi_phy_set_bbp_atten(mac, tpctl->bbp_atten); + + /* Set RF attenuation */ + RF_WRITE(mac, BWI_RFR_ATTEN, tpctl->rf_atten); + MOBJ_WRITE_2(mac, BWI_COMM_MOBJ, BWI_COMM_MOBJ_RF_ATTEN, + tpctl->rf_atten); + + /* Set TX power */ + if (rf->rf_type == BWI_RF_T_BCM2050) { + RF_FILT_SETBITS(mac, BWI_RFR_TXPWR, ~BWI_RFR_TXPWR1_MASK, + __SHIFTIN(tpctl->tp_ctrl1, BWI_RFR_TXPWR1_MASK)); + } + + /* Adjust RF Local Oscillator */ + if (mac->mac_phy.phy_mode == IEEE80211_MODE_11G) + bwi_rf_lo_adjust(mac, tpctl); +} + +static int +bwi_mac_test(struct bwi_mac *mac) +{ + struct bwi_softc *sc = mac->mac_sc; + uint32_t orig_val, val; + +#define TEST_VAL1 0xaa5555aa +#define TEST_VAL2 0x55aaaa55 + + /* Save it for later restoring */ + orig_val = MOBJ_READ_4(mac, BWI_COMM_MOBJ, 0); + + /* Test 1 */ + MOBJ_WRITE_4(mac, BWI_COMM_MOBJ, 0, TEST_VAL1); + val = MOBJ_READ_4(mac, BWI_COMM_MOBJ, 0); + if (val != TEST_VAL1) { + device_printf(sc->sc_dev, "TEST1 failed\n"); + return ENXIO; + } + + /* Test 2 */ + MOBJ_WRITE_4(mac, BWI_COMM_MOBJ, 0, TEST_VAL2); + val = MOBJ_READ_4(mac, BWI_COMM_MOBJ, 0); + if (val != TEST_VAL2) { + device_printf(sc->sc_dev, "TEST2 failed\n"); + return ENXIO; + } + + /* Restore to the original value */ + MOBJ_WRITE_4(mac, BWI_COMM_MOBJ, 0, orig_val); + + val = CSR_READ_4(sc, BWI_MAC_STATUS); + if ((val & ~BWI_MAC_STATUS_PHYLNK) != BWI_MAC_STATUS_IHREN) { + device_printf(sc->sc_dev, "%s failed, MAC status 0x%08x\n", + __func__, val); + return ENXIO; + } + + val = CSR_READ_4(sc, BWI_MAC_INTR_STATUS); + if (val != 0) { + device_printf(sc->sc_dev, "%s failed, intr status %08x\n", + __func__, val); + return ENXIO; + } + +#undef TEST_VAL2 +#undef TEST_VAL1 + + return 0; +} + +static void +bwi_mac_setup_tpctl(struct bwi_mac *mac) +{ + struct bwi_softc *sc = mac->mac_sc; + struct bwi_rf *rf = &mac->mac_rf; + struct bwi_phy *phy = &mac->mac_phy; + struct bwi_tpctl *tpctl = &mac->mac_tpctl; + + /* Calc BBP attenuation */ + if (rf->rf_type == BWI_RF_T_BCM2050 && rf->rf_rev < 6) + tpctl->bbp_atten = 0; + else + tpctl->bbp_atten = 2; + + /* Calc TX power CTRL1?? */ + tpctl->tp_ctrl1 = 0; + if (rf->rf_type == BWI_RF_T_BCM2050) { + if (rf->rf_rev == 1) + tpctl->tp_ctrl1 = 3; + else if (rf->rf_rev < 6) + tpctl->tp_ctrl1 = 2; + else if (rf->rf_rev == 8) + tpctl->tp_ctrl1 = 1; + } + + /* Empty TX power CTRL2?? */ + tpctl->tp_ctrl2 = 0xffff; + + /* + * Calc RF attenuation + */ + if (phy->phy_mode == IEEE80211_MODE_11A) { + tpctl->rf_atten = 0x60; + goto back; + } + + if (BWI_IS_BRCM_BCM4309G(sc) && sc->sc_pci_revid < 0x51) { + tpctl->rf_atten = sc->sc_pci_revid < 0x43 ? 2 : 3; + goto back; + } + + tpctl->rf_atten = 5; + + if (rf->rf_type != BWI_RF_T_BCM2050) { + if (rf->rf_type == BWI_RF_T_BCM2053 && rf->rf_rev == 1) + tpctl->rf_atten = 6; + goto back; + } + + /* + * NB: If we reaches here and the card is BRCM_BCM4309G, + * then the card's PCI revision must >= 0x51 + */ + + /* BCM2050 RF */ + switch (rf->rf_rev) { + case 1: + if (phy->phy_mode == IEEE80211_MODE_11G) { + if (BWI_IS_BRCM_BCM4309G(sc) || BWI_IS_BRCM_BU4306(sc)) + tpctl->rf_atten = 3; + else + tpctl->rf_atten = 1; + } else { + if (BWI_IS_BRCM_BCM4309G(sc)) + tpctl->rf_atten = 7; + else + tpctl->rf_atten = 6; + } + break; + case 2: + if (phy->phy_mode == IEEE80211_MODE_11G) { + /* + * NOTE: Order of following conditions is critical + */ + if (BWI_IS_BRCM_BCM4309G(sc)) + tpctl->rf_atten = 3; + else if (BWI_IS_BRCM_BU4306(sc)) + tpctl->rf_atten = 5; + else if (sc->sc_bbp_id == BWI_BBPID_BCM4320) + tpctl->rf_atten = 4; + else + tpctl->rf_atten = 3; + } else { + tpctl->rf_atten = 6; + } + break; + case 4: + case 5: + tpctl->rf_atten = 1; + break; + case 8: + tpctl->rf_atten = 0x1a; + break; + } +back: + DPRINTF(sc, BWI_DBG_MAC | BWI_DBG_INIT | BWI_DBG_TXPOWER, + "bbp atten: %u, rf atten: %u, ctrl1: %u, ctrl2: %u\n", + tpctl->bbp_atten, tpctl->rf_atten, + tpctl->tp_ctrl1, tpctl->tp_ctrl2); +} + +void +bwi_mac_dummy_xmit(struct bwi_mac *mac) +{ +#define PACKET_LEN 5 + static const uint32_t packet_11a[PACKET_LEN] = + { 0x000201cc, 0x00d40000, 0x00000000, 0x01000000, 0x00000000 }; + static const uint32_t packet_11bg[PACKET_LEN] = + { 0x000b846e, 0x00d40000, 0x00000000, 0x01000000, 0x00000000 }; + + struct bwi_softc *sc = mac->mac_sc; + struct bwi_rf *rf = &mac->mac_rf; + const uint32_t *packet; + uint16_t val_50c; + int wait_max, i; + + if (mac->mac_phy.phy_mode == IEEE80211_MODE_11A) { + wait_max = 30; + packet = packet_11a; + val_50c = 1; + } else { + wait_max = 250; + packet = packet_11bg; + val_50c = 0; + } + + for (i = 0; i < PACKET_LEN; ++i) + TMPLT_WRITE_4(mac, i * 4, packet[i]); + + CSR_READ_4(sc, BWI_MAC_STATUS); /* dummy read */ + + CSR_WRITE_2(sc, 0x568, 0); + CSR_WRITE_2(sc, 0x7c0, 0); + CSR_WRITE_2(sc, 0x50c, val_50c); + CSR_WRITE_2(sc, 0x508, 0); + CSR_WRITE_2(sc, 0x50a, 0); + CSR_WRITE_2(sc, 0x54c, 0); + CSR_WRITE_2(sc, 0x56a, 0x14); + CSR_WRITE_2(sc, 0x568, 0x826); + CSR_WRITE_2(sc, 0x500, 0); + CSR_WRITE_2(sc, 0x502, 0x30); + + if (rf->rf_type == BWI_RF_T_BCM2050 && rf->rf_rev <= 5) + RF_WRITE(mac, 0x51, 0x17); + + for (i = 0; i < wait_max; ++i) { + if (CSR_READ_2(sc, 0x50e) & 0x80) + break; + DELAY(10); + } + for (i = 0; i < 10; ++i) { + if (CSR_READ_2(sc, 0x50e) & 0x400) + break; + DELAY(10); + } + for (i = 0; i < 10; ++i) { + if ((CSR_READ_2(sc, 0x690) & 0x100) == 0) + break; + DELAY(10); + } + + if (rf->rf_type == BWI_RF_T_BCM2050 && rf->rf_rev <= 5) + RF_WRITE(mac, 0x51, 0x37); +#undef PACKET_LEN +} + +void +bwi_mac_init_tpctl_11bg(struct bwi_mac *mac) +{ + struct bwi_softc *sc = mac->mac_sc; + struct bwi_phy *phy = &mac->mac_phy; + struct bwi_rf *rf = &mac->mac_rf; + struct bwi_tpctl tpctl_orig; + int restore_tpctl = 0; + + KASSERT(phy->phy_mode != IEEE80211_MODE_11A, + ("phy_mode %d", phy->phy_mode)); + + if (BWI_IS_BRCM_BU4306(sc)) + return; + + PHY_WRITE(mac, 0x28, 0x8018); + CSR_CLRBITS_2(sc, BWI_BBP_ATTEN, 0x20); + + if (phy->phy_mode == IEEE80211_MODE_11G) { + if ((phy->phy_flags & BWI_PHY_F_LINKED) == 0) + return; + PHY_WRITE(mac, 0x47a, 0xc111); + } + if (mac->mac_flags & BWI_MAC_F_TPCTL_INITED) + return; + + if (phy->phy_mode == IEEE80211_MODE_11B && phy->phy_rev >= 2 && + rf->rf_type == BWI_RF_T_BCM2050) { + RF_SETBITS(mac, 0x76, 0x84); + } else { + struct bwi_tpctl tpctl; + + /* Backup original TX power control variables */ + bcopy(&mac->mac_tpctl, &tpctl_orig, sizeof(tpctl_orig)); + restore_tpctl = 1; + + bcopy(&mac->mac_tpctl, &tpctl, sizeof(tpctl)); + tpctl.bbp_atten = 11; + tpctl.tp_ctrl1 = 0; +#ifdef notyet + if (rf->rf_rev >= 6 && rf->rf_rev <= 8) + tpctl.rf_atten = 31; + else +#endif + tpctl.rf_atten = 9; + + bwi_mac_set_tpctl_11bg(mac, &tpctl); + } + + bwi_mac_dummy_xmit(mac); + + mac->mac_flags |= BWI_MAC_F_TPCTL_INITED; + rf->rf_base_tssi = PHY_READ(mac, 0x29); + DPRINTF(sc, BWI_DBG_MAC | BWI_DBG_INIT | BWI_DBG_TXPOWER, + "base tssi %d\n", rf->rf_base_tssi); + + if (abs(rf->rf_base_tssi - rf->rf_idle_tssi) >= 20) { + device_printf(sc->sc_dev, "base tssi measure failed\n"); + mac->mac_flags |= BWI_MAC_F_TPCTL_ERROR; + } + + if (restore_tpctl) + bwi_mac_set_tpctl_11bg(mac, &tpctl_orig); + else + RF_CLRBITS(mac, 0x76, 0x84); + + bwi_rf_clear_tssi(mac); +} + +void +bwi_mac_detach(struct bwi_mac *mac) +{ + bwi_mac_fw_free(mac); +} + +static __inline int +bwi_fwimage_is_valid(struct bwi_softc *sc, const struct firmware *fw, + uint8_t fw_type) +{ + const struct bwi_fwhdr *hdr; + struct ifnet *ifp = sc->sc_ifp; + + if (fw->datasize < sizeof(*hdr)) { + if_printf(ifp, "invalid firmware (%s): invalid size %zu\n", + fw->name, fw->datasize); + return 0; + } + + hdr = (const struct bwi_fwhdr *)fw->data; + + if (fw_type != BWI_FW_T_IV) { + /* + * Don't verify IV's size, it has different meaning + */ + if (be32toh(hdr->fw_size) != fw->datasize - sizeof(*hdr)) { + if_printf(ifp, "invalid firmware (%s): size mismatch, " + "fw %u, real %zu\n", fw->name, + be32toh(hdr->fw_size), + fw->datasize - sizeof(*hdr)); + return 0; + } + } + + if (hdr->fw_type != fw_type) { + if_printf(ifp, "invalid firmware (%s): type mismatch, " + "fw \'%c\', target \'%c\'\n", fw->name, + hdr->fw_type, fw_type); + return 0; + } + + if (hdr->fw_gen != BWI_FW_GEN_1) { + if_printf(ifp, "invalid firmware (%s): wrong generation, " + "fw %d, target %d\n", fw->name, + hdr->fw_gen, BWI_FW_GEN_1); + return 0; + } + return 1; +} + +/* + * XXX Error cleanup + */ +static int +bwi_mac_fw_alloc(struct bwi_mac *mac) +{ + struct bwi_softc *sc = mac->mac_sc; + struct ifnet *ifp = sc->sc_ifp; + char fwname[64]; + int idx; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun May 3 04:28:44 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0BA51065675; Sun, 3 May 2009 04:28:44 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from pele.citylink.co.nz (pele.citylink.co.nz [202.8.44.226]) by mx1.freebsd.org (Postfix) with ESMTP id 7EE428FC0A; Sun, 3 May 2009 04:28:44 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by pele.citylink.co.nz (Postfix) with ESMTP id CA822FF38; Sun, 3 May 2009 16:28:43 +1200 (NZST) X-Virus-Scanned: Debian amavisd-new at citylink.co.nz Received: from pele.citylink.co.nz ([127.0.0.1]) by localhost (pele.citylink.co.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id klO+rkjIqhAv; Sun, 3 May 2009 16:28:39 +1200 (NZST) Received: from citylink.fud.org.nz (unknown [202.8.44.45]) by pele.citylink.co.nz (Postfix) with ESMTP; Sun, 3 May 2009 16:28:39 +1200 (NZST) Received: by citylink.fud.org.nz (Postfix, from userid 1001) id C873511432; Sun, 3 May 2009 16:28:38 +1200 (NZST) Date: Sat, 2 May 2009 21:28:38 -0700 From: Andrew Thompson To: Warner Losh Message-ID: <20090503042838.GA11965@citylink.fud.org.nz> References: <200905030401.n4341h9W003803@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200905030401.n4341h9W003803@svn.freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r191762 - in head/sys: conf dev/bwi modules/bwi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 04:28:45 -0000 On Sun, May 03, 2009 at 04:01:43AM +0000, Warner Losh wrote: > Author: imp > Date: Sun May 3 04:01:43 2009 > New Revision: 191762 > URL: http://svn.freebsd.org/changeset/base/191762 > > Log: > Bring in Andrew Thompson's port of Sepherosa Ziehau's bwi driver for > Broadcom BCM43xx chipsets. Actually Sam did the initial port, I just tinkered later on. Kudos to him. Andrew From owner-svn-src-all@FreeBSD.ORG Sun May 3 04:58:46 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6AE3106564A; Sun, 3 May 2009 04:58:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F7FC8FC0A; Sun, 3 May 2009 04:58:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n434wjop004827; Sun, 3 May 2009 04:58:45 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n434wjrI004826; Sun, 3 May 2009 04:58:45 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200905030458.n434wjrI004826@svn.freebsd.org> From: Alexander Motin Date: Sun, 3 May 2009 04:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191763 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 04:58:47 -0000 Author: mav Date: Sun May 3 04:58:44 2009 New Revision: 191763 URL: http://svn.freebsd.org/changeset/base/191763 Log: Remove unused variable and fix spelling in comment. Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Sun May 3 04:01:43 2009 (r191762) +++ head/sys/dev/acpica/acpi_cpu.c Sun May 3 04:58:44 2009 (r191763) @@ -79,7 +79,6 @@ struct acpi_cpu_softc { int cpu_features; /* Child driver supported features. */ /* Runtime state. */ int cpu_non_c3; /* Index of lowest non-C3 state. */ - int cpu_short_slp; /* Count of < 1us sleeps. */ u_int cpu_cx_stats[MAX_CX_STATES];/* Cx usage history. */ /* Values for sysctl. */ struct sysctl_ctx_list cpu_sysctl_ctx; @@ -882,7 +881,7 @@ acpi_cpu_idle() return; } - /* Find the lowest state that has small enougth latency. */ + /* Find the lowest state that has small enough latency. */ cx_next_idx = 0; for (i = sc->cpu_cx_lowest; i >= 0; i--) { if (sc->cpu_cx_states[i].trans_lat * 3 <= sc->cpu_prev_sleep) { From owner-svn-src-all@FreeBSD.ORG Sun May 3 05:15:30 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6B1B106566C; Sun, 3 May 2009 05:15:30 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id 77C448FC18; Sun, 3 May 2009 05:15:30 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=UTF-8; format=flowed Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7.0-5.01 32bit (built Feb 19 2009)) id <0KJ100B00VTSGH00@smtpauth1.wiscmail.wisc.edu>; Sat, 02 May 2009 23:15:28 -0500 (CDT) Received: from comporellon.tachypleus.net ([unknown] [76.204.99.228]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7.0-5.01 32bit (built Feb 19 2009)) with ESMTPSA id <0KJ100ABPVTRPY00@smtpauth1.wiscmail.wisc.edu>; Sat, 02 May 2009 23:15:28 -0500 (CDT) Date: Sat, 02 May 2009 23:15:27 -0500 From: Nathan Whitehorn In-reply-to: <200905030401.n4341h9W003803@svn.freebsd.org> To: Warner Losh Message-id: <49FD1A5F.6090503@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.204.99.228 X-Spam-PmxInfo: Server=avs-10, Version=5.5.1.360522, Antispam-Engine: 2.6.1.350677, Antispam-Data: 2009.5.3.35225, SenderIP=76.204.99.228 References: <200905030401.n4341h9W003803@svn.freebsd.org> User-Agent: Thunderbird 2.0.0.21 (X11/20090405) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r191762 - in head/sys: conf dev/bwi modules/bwi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 05:15:31 -0000 Warner Losh wrote: > Author: imp > Date: Sun May 3 04:01:43 2009 > New Revision: 191762 > URL: http://svn.freebsd.org/changeset/base/191762 > > Log: > Bring in Andrew Thompson's port of Sepherosa Ziehau's bwi driver for > Broadcom BCM43xx chipsets. This driver uses the v3 firmware that > needs to be fetched separately. A port will be committed to create > the bwi firmware module. > > Thanks for this! It's quite a useful thing to have on PowerPC where NDIS is not an option. > Modified: head/sys/conf/files > ============================================================================== > --- head/sys/conf/files Sun May 3 02:37:13 2009 (r191761) > +++ head/sys/conf/files Sun May 3 04:01:43 2009 (r191762) > @@ -712,6 +712,11 @@ dev/buslogic/bt_eisa.c optional bt eisa > dev/buslogic/bt_isa.c optional bt isa > dev/buslogic/bt_mca.c optional bt mca > dev/buslogic/bt_pci.c optional bt pci > +dev/bwi/bwiirf.c optional bwi > I think you have too many i's here (should be bwirf.c not bwiirf.c). -Nathan From owner-svn-src-all@FreeBSD.ORG Sun May 3 05:21:39 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E41741065672 for ; Sun, 3 May 2009 05:21:39 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forwards4.yandex.ru (forwards4.yandex.ru [77.88.32.20]) by mx1.freebsd.org (Postfix) with ESMTP id 94CBF8FC0C for ; Sun, 3 May 2009 05:21:39 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from smtp15.yandex.ru (smtp15.yandex.ru [77.88.32.85]) by forwards4.yandex.ru (Yandex) with ESMTP id 2B1664C574C for ; Sun, 3 May 2009 09:09:45 +0400 (MSD) Received: from [77.66.147.99] ([77.66.147.99]:32963 "EHLO smeshariki.local" smtp-auth: "cvs-src" TLS-CIPHER: "DHE-RSA-AES256-SHA keybits 256/256 version TLSv1/SSLv3" TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S4866158AbZECFJk (ORCPT ); Sun, 3 May 2009 09:09:40 +0400 X-Yandex-TimeMark: 1241327380 X-Yandex-Spam: 1 X-Yandex-Front: smtp15 X-BornDate: 1169586000 X-Yandex-Karma: 0 X-Yandex-KarmaStatus: 0 X-MsgDayCount: 1 X-Comment: RFC 2476 MSA function at smtp15.yandex.ru logged sender identity as: cvs-src Message-ID: <49FD264F.3070104@yandex.ru> Date: Sun, 03 May 2009 09:06:23 +0400 From: "R.Mahmatkhanov" User-Agent: Thunderbird 2.0.0.21 (X11/20090414) MIME-Version: 1.0 To: svn-src-all@freebsd.org References: <200905030401.n4341h9W003803@svn.freebsd.org> In-Reply-To: <200905030401.n4341h9W003803@svn.freebsd.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: svn commit: r191762 - in head/sys: conf dev/bwi modules/bwi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 05:21:40 -0000 Warner Losh пишет: > Author: imp > Date: Sun May 3 04:01:43 2009 > New Revision: 191762 > URL: http://svn.freebsd.org/changeset/base/191762 > > Log: > Bring in Andrew Thompson's port of Sepherosa Ziehau's bwi driver for > Broadcom BCM43xx chipsets. This driver uses the v3 firmware that > needs to be fetched separately. A port will be committed to create > the bwi firmware module. > Yay! Great news! Any plans to MFC the driver? From owner-svn-src-all@FreeBSD.ORG Sun May 3 06:25:37 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 852D6106564A; Sun, 3 May 2009 06:25:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73A118FC08; Sun, 3 May 2009 06:25:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n436Pbsj006491; Sun, 3 May 2009 06:25:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n436PbA3006490; Sun, 3 May 2009 06:25:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200905030625.n436PbA3006490@svn.freebsd.org> From: Alexander Motin Date: Sun, 3 May 2009 06:25:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191764 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 06:25:38 -0000 Author: mav Date: Sun May 3 06:25:37 2009 New Revision: 191764 URL: http://svn.freebsd.org/changeset/base/191764 Log: Make dev.cpu.X.cx_usage sysctl also report current average of sleep time. Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Sun May 3 04:58:44 2009 (r191763) +++ head/sys/dev/acpica/acpi_cpu.c Sun May 3 06:25:37 2009 (r191764) @@ -1105,8 +1105,9 @@ acpi_cpu_usage_sysctl(SYSCTL_HANDLER_ARG sbuf_printf(&sb, "%u.%02u%% ", (u_int)(whole / sum), (u_int)(fract / sum)); } else - sbuf_printf(&sb, "0%% "); + sbuf_printf(&sb, "0.00%% "); } + sbuf_printf(&sb, "last %dus", sc->cpu_prev_sleep); sbuf_trim(&sb); sbuf_finish(&sb); sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); From owner-svn-src-all@FreeBSD.ORG Sun May 3 13:21:01 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B2F11065838 for ; Sun, 3 May 2009 13:21:01 +0000 (UTC) (envelope-from cokane@FreeBSD.org) Received: from mail-out2.fuse.net (mail-out2.fuse.net [216.68.8.171]) by mx1.freebsd.org (Postfix) with ESMTP id CF92D8FC31 for ; Sun, 3 May 2009 13:21:00 +0000 (UTC) (envelope-from cokane@FreeBSD.org) X-CNFS-Analysis: v=1.0 c=1 a=7kiLsdLCEYIA:10 a=a0no3jnZOzYA:10 a=6I5d2MoRAAAA:8 a=JpAeFCUJe8WFZmOLBccA:9 a=cd5Ac-wYPOnxdmbkRbFTCAHxnTIA:4 a=kO1N3xBnoR9EXk7wiPoA:9 a=yaVwl9VSPNo9uXIUd1jMtyeTzr0A:4 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine Authentication-Results: gwout2 smtp.mail=cokane@FreeBSD.org; spf=softfail Received-SPF: softfail (gwout2: transitional domain FreeBSD.org does not designate 74.215.227.9 as permitted sender) Received: from [74.215.227.9] ([74.215.227.9:50487] helo=mail.colemankane.org) by gwout2 (envelope-from ) (ecelerity 2.2.2.37 r(28805/28810M)) with ESMTP id 77/89-15224-B3A9DF94; Sun, 03 May 2009 09:20:59 -0400 Received: from [172.20.1.193] (unknown [172.20.1.193]) by mail.colemankane.org (Postfix) with ESMTPSA id 55E871143C; Sun, 3 May 2009 10:26:22 -0400 (EDT) From: Coleman Kane To: Andrew Thompson In-Reply-To: <20090503042838.GA11965@citylink.fud.org.nz> References: <200905030401.n4341h9W003803@svn.freebsd.org> <20090503042838.GA11965@citylink.fud.org.nz> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-1eEABy7CqLT4qQacsooL" Organization: FreeBSD Project Date: Sun, 03 May 2009 09:18:50 -0400 Message-Id: <1241356730.1685.7.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1.1 FreeBSD GNOME Team Port Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh Subject: Re: svn commit: r191762 - in head/sys: conf dev/bwi modules/bwi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 13:21:01 -0000 --=-1eEABy7CqLT4qQacsooL Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sat, 2009-05-02 at 21:28 -0700, Andrew Thompson wrote: > On Sun, May 03, 2009 at 04:01:43AM +0000, Warner Losh wrote: > > Author: imp > > Date: Sun May 3 04:01:43 2009 > > New Revision: 191762 > > URL: http://svn.freebsd.org/changeset/base/191762 > >=20 > > Log: > > Bring in Andrew Thompson's port of Sepherosa Ziehau's bwi driver for > > Broadcom BCM43xx chipsets. >=20 > Actually Sam did the initial port, I just tinkered later on. Kudos to > him. >=20 > Andrew Any idea what still needs to be done to support the 4321 b/g/n parts? Are they completely different than the others? --=20 Coleman Kane --=-1eEABy7CqLT4qQacsooL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAkn9mbUACgkQcMSxQcXat5d0JQCeLu14l8jBY1rhdIJVH2gF4uMu 64sAn0S1nqImzNgnkfVLwshz1B61LNOe =p5wZ -----END PGP SIGNATURE----- --=-1eEABy7CqLT4qQacsooL-- From owner-svn-src-all@FreeBSD.ORG Sun May 3 16:36:16 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 716A2106564A; Sun, 3 May 2009 16:36:16 +0000 (UTC) (envelope-from dchagin@dchagin.static.corbina.ru) Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5]) by mx1.freebsd.org (Postfix) with ESMTP id 19C988FC1D; Sun, 3 May 2009 16:36:15 +0000 (UTC) (envelope-from dchagin@dchagin.static.corbina.ru) Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id 981089621F; Sun, 3 May 2009 20:36:13 +0400 (MSD) X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9 Received: from [10.208.17.3] (HELO dchagin.static.corbina.ru) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPS id 1770494657; Sun, 03 May 2009 20:36:13 +0400 Received: from dchagin.static.corbina.ru (localhost.chd.net [127.0.0.1]) by dchagin.static.corbina.ru (8.14.3/8.14.3) with ESMTP id n43GaDGX030515; Sun, 3 May 2009 20:36:13 +0400 (MSD) (envelope-from dchagin@dchagin.static.corbina.ru) Received: (from dchagin@localhost) by dchagin.static.corbina.ru (8.14.3/8.14.3/Submit) id n43Ga89I030514; Sun, 3 May 2009 20:36:08 +0400 (MSD) (envelope-from dchagin) Date: Sun, 3 May 2009 20:36:07 +0400 From: Chagin Dmitry To: Robert Watson Message-ID: <20090503163607.GA30330@dchagin.static.corbina.ru> References: <200905021051.n42ApetI083033@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="C7zPtVaVf+AK4Oqc" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r191742 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 16:36:17 -0000 --C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 03, 2009 at 04:57:03AM +0100, Robert Watson wrote: >=20 > On Sat, 2 May 2009, Dmitry Chagin wrote: >=20 > > Linux socketpair() call expects explicit specified protocol for > > AF_LOCAL domain unlike FreeBSD which expects 0 in this case. > ... > > @@ -859,7 +859,10 @@ linux_socketpair(struct thread *td, stru > > return (EINVAL); > > > > bsd_args.type =3D args->type; > > - bsd_args.protocol =3D args->protocol; > > + if (bsd_args.domain =3D=3D AF_LOCAL && args->protocol =3D=3D PF_UNIX) > > + bsd_args.protocol =3D 0; > > + else > > + bsd_args.protocol =3D args->protocol; > > bsd_args.rsv =3D (int *)PTRIN(args->rsv); > > return (socketpair(td, &bsd_args)); > > } >=20 > I think I'd tweak this to be more like: >=20 > if (bsd_args.domain =3D=3D PF_LOCAL) { > if (bsd_args.protocol =3D=3D PF_UNIX) > bsd_args.protocl =3D 0; > else if (bsd_args.protocol !=3D 0) > return (EPROTONOSUPPORT); > } >=20 > Because (a) the domain argument takes a protocol family in FreeBSD and yo= u're=20 > passing arguments into the BSD ABI without a mapping for that field, and = (b)=20 domain argument is mapped, I used value AF_LOCAL which is similar to the value of localdomain .dom_family member. It misleads :) > for the protocol family the use of PF_UNIX is weird but must be supported= , so=20 > I'd consider it to be an entirely mapped namespace and avoid passing thro= ugh=20 > values that aren't 0 to the BSD layer as it's not clear what that would m= ean. >=20 agree. I send a new patch to the mentor. Thank you! --=20 Have fun! chd --C7zPtVaVf+AK4Oqc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iEYEARECAAYFAkn9x/cACgkQ0t2Tb3OO/O0d2ACgvGszDvbZhoVUCMQsTw+Umcdv 3l8AoL5kU8Njsjy3o+sDzXNrLO3YOHvh =Ty+m -----END PGP SIGNATURE----- --C7zPtVaVf+AK4Oqc-- From owner-svn-src-all@FreeBSD.ORG Sun May 3 17:47:22 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61922106564A; Sun, 3 May 2009 17:47:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4DE588FC08; Sun, 3 May 2009 17:47:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n43HlM8i020063; Sun, 3 May 2009 17:47:22 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n43HlLHD020054; Sun, 3 May 2009 17:47:21 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200905031747.n43HlLHD020054@svn.freebsd.org> From: Alexander Motin Date: Sun, 3 May 2009 17:47:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191766 - in head/sys: amd64/include amd64/isa i386/bios i386/include i386/isa i386/xen isa pc98/cbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 17:47:22 -0000 Author: mav Date: Sun May 3 17:47:21 2009 New Revision: 191766 URL: http://svn.freebsd.org/changeset/base/191766 Log: Rename statclock_disable variable to atrtcclock_disable that it actually is, and hide it inside of atrtc driver. Add new tunable hint.atrtc.0.clock controlling it. Setting it to 0 disables using RTC clock as stat-/ profclock sources. Teach i386 and amd64 SMP platforms to emulate stat-/profclocks using i8254 hardclock, when LAPIC and RTC clocks are disabled. This allows to reduce global interrupt rate of idle system down to about 100 interrupts per core, permitting C3 and deeper C-states provide maximum CPU power efficiency. Modified: head/sys/amd64/include/clock.h head/sys/amd64/isa/clock.c head/sys/i386/bios/apm.c head/sys/i386/include/clock.h head/sys/i386/isa/clock.c head/sys/i386/xen/clock.c head/sys/isa/atrtc.c head/sys/isa/rtc.h head/sys/pc98/cbus/clock.c Modified: head/sys/amd64/include/clock.h ============================================================================== --- head/sys/amd64/include/clock.h Sun May 3 07:28:16 2009 (r191765) +++ head/sys/amd64/include/clock.h Sun May 3 17:47:21 2009 (r191766) @@ -15,7 +15,6 @@ * XXX large parts of the driver and its interface are misplaced. */ extern int clkintr_pending; -extern int statclock_disable; extern u_int i8254_freq; extern int i8254_max_count; extern uint64_t tsc_freq; Modified: head/sys/amd64/isa/clock.c ============================================================================== --- head/sys/amd64/isa/clock.c Sun May 3 07:28:16 2009 (r191765) +++ head/sys/amd64/isa/clock.c Sun May 3 17:47:21 2009 (r191766) @@ -76,7 +76,6 @@ __FBSDID("$FreeBSD$"); int clkintr_pending; static int pscnt = 1; static int psdiv = 1; -int statclock_disable; #ifndef TIMER_FREQ #define TIMER_FREQ 1193182 #endif @@ -91,6 +90,7 @@ static u_int32_t i8254_lastcount; static u_int32_t i8254_offset; static int (*i8254_pending)(struct intsrc *); static int i8254_ticked; +static int using_atrtc_timer; static int using_lapic_timer; /* Values for timerX_state: */ @@ -122,6 +122,8 @@ hardclockintr(struct trapframe *frame) hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); else hardclock_cpu(TRAPF_USERMODE(frame)); + if (!using_atrtc_timer) + statclockintr(frame); return (FILTER_HANDLED); } @@ -163,10 +165,7 @@ clkintr(struct trapframe *frame) if (smp_started) ipi_all_but_self(IPI_HARDCLOCK); #endif - if (PCPU_GET(cpuid) == 0) - hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); - else - hardclock_cpu(TRAPF_USERMODE(frame)); + hardclockintr(frame); return (FILTER_HANDLED); } @@ -461,7 +460,6 @@ startrtclock() void cpu_initclocks() { - int diag; using_lapic_timer = lapic_setup_clock(); /* @@ -493,21 +491,17 @@ cpu_initclocks() * kernel clocks, then setup the RTC to periodically interrupt to * drive statclock() and profclock(). */ - if (!statclock_disable && !using_lapic_timer) { - diag = rtcin(RTC_DIAG); - if (diag != 0) - printf("RTC BIOS diagnostic error %b\n", - diag, RTCDG_BITS); - - /* Setting stathz to nonzero early helps avoid races. */ - stathz = RTC_NOPROFRATE; - profhz = RTC_PROFRATE; - - /* Enable periodic interrupts from the RTC. */ - intr_add_handler("rtc", 8, - (driver_filter_t *)rtcintr, NULL, NULL, - INTR_TYPE_CLK, NULL); - atrtc_enable_intr(); + if (!using_lapic_timer) { + using_atrtc_timer = atrtc_setup_clock(); + if (using_atrtc_timer) { + /* Enable periodic interrupts from the RTC. */ + intr_add_handler("rtc", 8, + (driver_filter_t *)rtcintr, NULL, NULL, + INTR_TYPE_CLK, NULL); + atrtc_enable_intr(); + } else { + profhz = stathz = hz; + } } init_TSC_tc(); Modified: head/sys/i386/bios/apm.c ============================================================================== --- head/sys/i386/bios/apm.c Sun May 3 07:28:16 2009 (r191765) +++ head/sys/i386/bios/apm.c Sun May 3 17:47:21 2009 (r191766) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include /* Used by the apm_saver screen saver module */ int apm_display(int newstate); @@ -1155,7 +1156,7 @@ apm_attach(device_t dev) cv_init(&sc->cv, "cbb cv"); if (device_get_flags(dev) & 0x20) - statclock_disable = 1; + atrtcclock_disable = 1; sc->initialized = 0; Modified: head/sys/i386/include/clock.h ============================================================================== --- head/sys/i386/include/clock.h Sun May 3 07:28:16 2009 (r191765) +++ head/sys/i386/include/clock.h Sun May 3 17:47:21 2009 (r191766) @@ -15,7 +15,6 @@ * XXX large parts of the driver and its interface are misplaced. */ extern int clkintr_pending; -extern int statclock_disable; extern u_int i8254_freq; extern int i8254_max_count; extern uint64_t tsc_freq; Modified: head/sys/i386/isa/clock.c ============================================================================== --- head/sys/i386/isa/clock.c Sun May 3 07:28:16 2009 (r191765) +++ head/sys/i386/isa/clock.c Sun May 3 17:47:21 2009 (r191766) @@ -91,7 +91,6 @@ __FBSDID("$FreeBSD$"); int clkintr_pending; static int pscnt = 1; static int psdiv = 1; -int statclock_disable; #ifndef TIMER_FREQ #define TIMER_FREQ 1193182 #endif @@ -106,6 +105,7 @@ static u_int32_t i8254_lastcount; static u_int32_t i8254_offset; static int (*i8254_pending)(struct intsrc *); static int i8254_ticked; +static int using_atrtc_timer; static int using_lapic_timer; /* Values for timerX_state: */ @@ -137,6 +137,8 @@ hardclockintr(struct trapframe *frame) hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); else hardclock_cpu(TRAPF_USERMODE(frame)); + if (!using_atrtc_timer) + statclockintr(frame); return (FILTER_HANDLED); } @@ -190,10 +192,7 @@ clkintr(struct trapframe *frame) if (smp_started) ipi_all_but_self(IPI_HARDCLOCK); #endif - if (PCPU_GET(cpuid) == 0) - hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); - else - hardclock_cpu(TRAPF_USERMODE(frame)); + hardclockintr(frame); #ifdef DEV_MCA /* Reset clock interrupt by asserting bit 7 of port 0x61 */ if (MCA_system) @@ -508,7 +507,6 @@ startrtclock() void cpu_initclocks() { - int diag; #ifdef DEV_APIC using_lapic_timer = lapic_setup_clock(); @@ -542,21 +540,17 @@ cpu_initclocks() * kernel clocks, then setup the RTC to periodically interrupt to * drive statclock() and profclock(). */ - if (!statclock_disable && !using_lapic_timer) { - diag = rtcin(RTC_DIAG); - if (diag != 0) - printf("RTC BIOS diagnostic error %b\n", - diag, RTCDG_BITS); - - /* Setting stathz to nonzero early helps avoid races. */ - stathz = RTC_NOPROFRATE; - profhz = RTC_PROFRATE; - - /* Enable periodic interrupts from the RTC. */ - intr_add_handler("rtc", 8, - (driver_filter_t *)rtcintr, NULL, NULL, - INTR_TYPE_CLK, NULL); - atrtc_enable_intr(); + if (!using_lapic_timer) { + using_atrtc_timer = atrtc_setup_clock(); + if (using_atrtc_timer) { + /* Enable periodic interrupts from the RTC. */ + intr_add_handler("rtc", 8, + (driver_filter_t *)rtcintr, NULL, NULL, + INTR_TYPE_CLK, NULL); + atrtc_enable_intr(); + } else { + profhz = stathz = hz; + } } init_TSC_tc(); Modified: head/sys/i386/xen/clock.c ============================================================================== --- head/sys/i386/xen/clock.c Sun May 3 07:28:16 2009 (r191765) +++ head/sys/i386/xen/clock.c Sun May 3 17:47:21 2009 (r191766) @@ -120,7 +120,6 @@ int adjkerntz; /* local offset from GMT int clkintr_pending; int pscnt = 1; int psdiv = 1; -int statclock_disable; int wall_cmos_clock; u_int timer_freq = TIMER_FREQ; static int independent_wallclock; Modified: head/sys/isa/atrtc.c ============================================================================== --- head/sys/isa/atrtc.c Sun May 3 07:28:16 2009 (r191765) +++ head/sys/isa/atrtc.c Sun May 3 17:47:21 2009 (r191766) @@ -49,6 +49,8 @@ __FBSDID("$FreeBSD$"); #define RTC_LOCK mtx_lock_spin(&clock_lock) #define RTC_UNLOCK mtx_unlock_spin(&clock_lock) +int atrtcclock_disable = 0; + static int rtc_reg = -1; static u_char rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF; static u_char rtc_statusb = RTCSB_24HR; @@ -133,6 +135,27 @@ atrtc_restore(void) rtcin(RTC_INTR); } +int +atrtc_setup_clock(void) +{ + int diag; + + if (atrtcclock_disable) + return (0); + + diag = rtcin(RTC_DIAG); + if (diag != 0) { + printf("RTC BIOS diagnostic error %b\n", + diag, RTCDG_BITS); + return (0); + } + + stathz = RTC_NOPROFRATE; + profhz = RTC_PROFRATE; + + return (1); +} + /********************************************************************** * RTC driver for subr_rtc */ @@ -173,6 +196,7 @@ static int atrtc_attach(device_t dev) { struct atrtc_softc *sc; + int i; /* * Not that we need them or anything, but grab our resources @@ -187,6 +211,8 @@ atrtc_attach(device_t dev) &sc->intr_rid, 8, 8, 1, RF_ACTIVE))) device_printf(dev,"Warning: Couldn't map Interrupt.\n"); clock_register(dev, 1000000); + if (resource_int_value("atrtc", 0, "clock", &i) == 0 && i == 0) + atrtcclock_disable = 1; return(0); } Modified: head/sys/isa/rtc.h ============================================================================== --- head/sys/isa/rtc.h Sun May 3 07:28:16 2009 (r191765) +++ head/sys/isa/rtc.h Sun May 3 17:47:21 2009 (r191766) @@ -113,6 +113,8 @@ #ifdef _KERNEL extern struct mtx clock_lock; +extern int atrtcclock_disable; +int atrtc_setup_clock(void); int rtcin(int reg); void atrtc_start(void); void atrtc_rate(unsigned rate); Modified: head/sys/pc98/cbus/clock.c ============================================================================== --- head/sys/pc98/cbus/clock.c Sun May 3 07:28:16 2009 (r191765) +++ head/sys/pc98/cbus/clock.c Sun May 3 17:47:21 2009 (r191766) @@ -87,7 +87,6 @@ __FBSDID("$FreeBSD$"); #define TIMER_DIV(x) ((i8254_freq + (x) / 2) / (x)) int clkintr_pending; -int statclock_disable; #ifndef TIMER_FREQ #define TIMER_FREQ 2457600 #endif From owner-svn-src-all@FreeBSD.ORG Sun May 3 17:51:38 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5D181065672; Sun, 3 May 2009 17:51:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78CCA8FC25; Sun, 3 May 2009 17:51:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n43Hpcdr020176; Sun, 3 May 2009 17:51:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n43HpcGV020175; Sun, 3 May 2009 17:51:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200905031751.n43HpcGV020175@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 3 May 2009 17:51:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191767 - in stable/7/lib/libc: . stdlib string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 17:51:39 -0000 Author: kib Date: Sun May 3 17:51:38 2009 New Revision: 191767 URL: http://svn.freebsd.org/changeset/base/191767 Log: MFC r185514 (by jasone): Fix a lock order reversal bug that could cause deadlock during fork(2). Reported and tested by: makc Approved by: re (kensmith) Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdlib/malloc.c stable/7/lib/libc/string/ffsll.c (props changed) stable/7/lib/libc/string/flsll.c (props changed) Modified: stable/7/lib/libc/stdlib/malloc.c ============================================================================== --- stable/7/lib/libc/stdlib/malloc.c Sun May 3 17:47:21 2009 (r191766) +++ stable/7/lib/libc/stdlib/malloc.c Sun May 3 17:51:38 2009 (r191767) @@ -4715,16 +4715,41 @@ _malloc_thread_cleanup(void) void _malloc_prefork(void) { - unsigned i; + bool again; + unsigned i, j; + arena_t *larenas[narenas], *tarenas[narenas]; /* Acquire all mutexes in a safe order. */ - malloc_spin_lock(&arenas_lock); - for (i = 0; i < narenas; i++) { - if (arenas[i] != NULL) - malloc_spin_lock(&arenas[i]->lock); - } - malloc_spin_unlock(&arenas_lock); + /* + * arenas_lock must be acquired after all of the arena mutexes, in + * order to avoid potential deadlock with arena_lock_balance[_hard](). + * Since arenas_lock protects the arenas array, the following code has + * to race with arenas_extend() callers until it succeeds in locking + * all arenas before locking arenas_lock. + */ + memset(larenas, 0, sizeof(arena_t *) * narenas); + do { + again = false; + + malloc_spin_lock(&arenas_lock); + for (i = 0; i < narenas; i++) { + if (arenas[i] != larenas[i]) { + memcpy(tarenas, arenas, sizeof(arena_t *) * + narenas); + malloc_spin_unlock(&arenas_lock); + for (j = 0; j < narenas; j++) { + if (larenas[j] != tarenas[j]) { + larenas[j] = tarenas[j]; + malloc_spin_lock( + &larenas[j]->lock); + } + } + again = true; + break; + } + } + } while (again); malloc_mutex_lock(&base_mtx); @@ -4739,6 +4764,7 @@ void _malloc_postfork(void) { unsigned i; + arena_t *larenas[narenas]; /* Release all mutexes, now that fork() has completed. */ @@ -4750,12 +4776,12 @@ _malloc_postfork(void) malloc_mutex_unlock(&base_mtx); - malloc_spin_lock(&arenas_lock); + memcpy(larenas, arenas, sizeof(arena_t *) * narenas); + malloc_spin_unlock(&arenas_lock); for (i = 0; i < narenas; i++) { - if (arenas[i] != NULL) - malloc_spin_unlock(&arenas[i]->lock); + if (larenas[i] != NULL) + malloc_spin_unlock(&larenas[i]->lock); } - malloc_spin_unlock(&arenas_lock); } /* From owner-svn-src-all@FreeBSD.ORG Sun May 3 17:55:16 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDF7F1065673; Sun, 3 May 2009 17:55:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 7F32E8FC13; Sun, 3 May 2009 17:55:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1M0fuE-000Nfh-P4; Sun, 03 May 2009 20:55:14 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n43Ht6F6053368 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 3 May 2009 20:55:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n43Ht6FF076882; Sun, 3 May 2009 20:55:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n43Ht67n076881; Sun, 3 May 2009 20:55:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 3 May 2009 20:55:06 +0300 From: Kostik Belousov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Message-ID: <20090503175506.GM17826@deviant.kiev.zoral.com.ua> References: <200905031751.n43HpcGV020175@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WuedheRyq6FDfQ9j" Content-Disposition: inline In-Reply-To: <200905031751.n43HpcGV020175@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1M0fuE-000Nfh-P4 cd440303ab753cda8a13d631c6d6e8ef X-Terabit: YES Cc: Subject: Re: svn commit: r191767 - in stable/7/lib/libc: . stdlib string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 17:55:17 -0000 --WuedheRyq6FDfQ9j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 03, 2009 at 05:51:38PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Sun May 3 17:51:38 2009 > New Revision: 191767 > URL: http://svn.freebsd.org/changeset/base/191767 >=20 > Log: > MFC r185514 (by jasone): > Fix a lock order reversal bug that could cause deadlock during fork(2). > =20 > Reported and tested by: makc > Approved by: re (kensmith) It was diagnosed and tested after the 7.2 release passed the point of no return. We expect to issue errata notice after the patch settles in stable/7 shortly. --WuedheRyq6FDfQ9j Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkn92noACgkQC3+MBN1Mb4hZogCfdu/pt4/+3WN5aLIhh8m2oktj Oi4AoLMypMwAX7TXvsPZjaERVYonNVoV =J+l2 -----END PGP SIGNATURE----- --WuedheRyq6FDfQ9j-- From owner-svn-src-all@FreeBSD.ORG Sun May 3 17:58:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 166FE106564A; Sun, 3 May 2009 17:58:10 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from pele.citylink.co.nz (pele.citylink.co.nz [202.8.44.226]) by mx1.freebsd.org (Postfix) with ESMTP id BFE048FC15; Sun, 3 May 2009 17:58:09 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by pele.citylink.co.nz (Postfix) with ESMTP id 23642FEF5; Mon, 4 May 2009 05:58:09 +1200 (NZST) X-Virus-Scanned: Debian amavisd-new at citylink.co.nz Received: from pele.citylink.co.nz ([127.0.0.1]) by localhost (pele.citylink.co.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RldY-pfzJTRy; Mon, 4 May 2009 05:58:04 +1200 (NZST) Received: from citylink.fud.org.nz (unknown [202.8.44.45]) by pele.citylink.co.nz (Postfix) with ESMTP; Mon, 4 May 2009 05:58:04 +1200 (NZST) Received: by citylink.fud.org.nz (Postfix, from userid 1001) id 5863911432; Mon, 4 May 2009 05:58:04 +1200 (NZST) Date: Sun, 3 May 2009 10:58:04 -0700 From: Andrew Thompson To: Coleman Kane Message-ID: <20090503175804.GC11965@citylink.fud.org.nz> References: <200905030401.n4341h9W003803@svn.freebsd.org> <20090503042838.GA11965@citylink.fud.org.nz> <1241356730.1685.7.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1241356730.1685.7.camel@localhost> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh Subject: Re: svn commit: r191762 - in head/sys: conf dev/bwi modules/bwi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 17:58:10 -0000 On Sun, May 03, 2009 at 09:18:50AM -0400, Coleman Kane wrote: > On Sat, 2009-05-02 at 21:28 -0700, Andrew Thompson wrote: > > On Sun, May 03, 2009 at 04:01:43AM +0000, Warner Losh wrote: > > > Author: imp > > > Date: Sun May 3 04:01:43 2009 > > > New Revision: 191762 > > > URL: http://svn.freebsd.org/changeset/base/191762 > > > > > > Log: > > > Bring in Andrew Thompson's port of Sepherosa Ziehau's bwi driver for > > > Broadcom BCM43xx chipsets. > > > > Actually Sam did the initial port, I just tinkered later on. Kudos to > > him. > > > > Andrew > > Any idea what still needs to be done to support the 4321 b/g/n parts? > Are they completely different than the others? I believe we need to move to the v4 firmware for that. Andrew From owner-svn-src-all@FreeBSD.ORG Sun May 3 18:12:34 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16092106564A; Sun, 3 May 2009 18:12:34 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id BE13B8FC19; Sun, 3 May 2009 18:12:33 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n43IB6t6040427; Sun, 3 May 2009 12:11:06 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 03 May 2009 12:11:07 -0600 (MDT) Message-Id: <20090503.121107.-1437680051.imp@bsdimp.com> To: thompsa@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <20090503175804.GC11965@citylink.fud.org.nz> References: <20090503042838.GA11965@citylink.fud.org.nz> <1241356730.1685.7.camel@localhost> <20090503175804.GC11965@citylink.fud.org.nz> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, cokane@FreeBSD.org Subject: Re: svn commit: r191762 - in head/sys: conf dev/bwi modules/bwi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 18:12:34 -0000 In message: <20090503175804.GC11965@citylink.fud.org.nz> Andrew Thompson writes: : On Sun, May 03, 2009 at 09:18:50AM -0400, Coleman Kane wrote: : > On Sat, 2009-05-02 at 21:28 -0700, Andrew Thompson wrote: : > > On Sun, May 03, 2009 at 04:01:43AM +0000, Warner Losh wrote: : > > > Author: imp : > > > Date: Sun May 3 04:01:43 2009 : > > > New Revision: 191762 : > > > URL: http://svn.freebsd.org/changeset/base/191762 : > > > : > > > Log: : > > > Bring in Andrew Thompson's port of Sepherosa Ziehau's bwi driver for : > > > Broadcom BCM43xx chipsets. : > > : > > Actually Sam did the initial port, I just tinkered later on. Kudos to : > > him. : > > : > > Andrew : > : > Any idea what still needs to be done to support the 4321 b/g/n parts? : > Are they completely different than the others? : : I believe we need to move to the v4 firmware for that. I believe so too.... Warner From owner-svn-src-all@FreeBSD.ORG Sun May 3 18:29:04 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C43A01065670; Sun, 3 May 2009 18:29:04 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1A008FC16; Sun, 3 May 2009 18:29:04 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n43IT4Sq020978; Sun, 3 May 2009 18:29:04 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n43IT4t9020977; Sun, 3 May 2009 18:29:04 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200905031829.n43IT4t9020977@svn.freebsd.org> From: Andrew Thompson Date: Sun, 3 May 2009 18:29:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191768 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 18:29:05 -0000 Author: thompsa Date: Sun May 3 18:29:04 2009 New Revision: 191768 URL: http://svn.freebsd.org/changeset/base/191768 Log: Relax the condition for printing the lost state transition message. The new state will be set before the EXT_STATEWAIT flag is cleared and its ok to transition again at that point. Modified: head/sys/net80211/ieee80211_proto.c Modified: head/sys/net80211/ieee80211_proto.c ============================================================================== --- head/sys/net80211/ieee80211_proto.c Sun May 3 17:51:38 2009 (r191767) +++ head/sys/net80211/ieee80211_proto.c Sun May 3 18:29:04 2009 (r191768) @@ -1722,19 +1722,21 @@ ieee80211_new_state_locked(struct ieee80 * state changes until this is completed. */ return -1; - } + } else if (vap->iv_state != vap->iv_nstate) { #if 0 - /* Warn if the previous state hasn't completed. */ - IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE, - "%s: pending %s -> %s transition lost\n", __func__, - ieee80211_state_name[vap->iv_state], - ieee80211_state_name[vap->iv_nstate]); + /* Warn if the previous state hasn't completed. */ + IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE, + "%s: pending %s -> %s transition lost\n", __func__, + ieee80211_state_name[vap->iv_state], + ieee80211_state_name[vap->iv_nstate]); #else - /* XXX temporarily enable to identify issues */ - if_printf(vap->iv_ifp, "%s: pending %s -> %s transition lost\n", - __func__, ieee80211_state_name[vap->iv_state], - ieee80211_state_name[vap->iv_nstate]); + /* XXX temporarily enable to identify issues */ + if_printf(vap->iv_ifp, + "%s: pending %s -> %s transition lost\n", + __func__, ieee80211_state_name[vap->iv_state], + ieee80211_state_name[vap->iv_nstate]); #endif + } } nrunning = nscanning = 0; From owner-svn-src-all@FreeBSD.ORG Sun May 3 18:43:55 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B33510656C9 for ; Sun, 3 May 2009 18:43:55 +0000 (UTC) (envelope-from ddkprog@yahoo.com) Received: from web59103.mail.re1.yahoo.com (web59103.mail.re1.yahoo.com [66.196.101.14]) by mx1.freebsd.org (Postfix) with SMTP id E5D918FC0A for ; Sun, 3 May 2009 18:43:54 +0000 (UTC) (envelope-from ddkprog@yahoo.com) Received: (qmail 89446 invoked by uid 60001); 3 May 2009 18:17:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1241374634; bh=7JzBRTe2EYebcjm0nf3FTu569zNkOaW4QQAE3LPex+Q=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=LXaDzKqT2pFYJAF2rOD7qmRCjBcTsAJO0BXC4M/fWKNLe+yFSXUKSQkQCCTxadQ7t9G0QJtsIcz9Olo9dPjY4FPLkhXCViQASg0u4CVPcnmpKljT8wW4HJTlNeUwvMHyQpolZEQWu0Zrm1DRKXwap/uMfoGYp8SgjEcDKvLigNM= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=iR6hGBfQYeB7vlAw/VA0G/rtQ+k10+4kLdYwusGyHnGS5MJwVyog9kGeX0YGuD4WlvrLsdjWe463uqN6WkTwc9/SP6IbF7YLxi1wMp+eQ/wdqapsdbPLQPJZtuFVnQvHdIqZIs4r60M/sakA8TlDTPi7Mb5kY4Vrkf8gLiJbl8A=; Message-ID: <21791.87592.qm@web59103.mail.re1.yahoo.com> X-YMail-OSG: rBCQP2AVM1kyeM6rAMX7MTWpmwKh1MVNfayDHC.SRZ0paE2xce_Stzq47H09HBCiXuwQ.nv.VQOOT288tPi0QFwWiRA1qyLnQ2uLAYxbfuDTWuV0KBf9rPYAlhIHPzxwdbZoAgLWn44y9UlbCf7dpQ.8xHkGIks4qjC_OfoRmyuMGJhhcO0eYtcXHIcyp1rvvPHuZoqN1OUrJ0iCslRIHAvNomlNRhQz43Dl7rhC99e9NamTM6CIu_0xb1zHtF0LWvTGSLUVe24E_v5B8.P8X3k- Received: from [77.52.126.24] by web59103.mail.re1.yahoo.com via HTTP; Sun, 03 May 2009 11:17:13 PDT X-Mailer: YahooMailWebService/0.7.289.1 Date: Sun, 3 May 2009 11:17:13 -0700 (PDT) From: ddk ddk To: "M. Warner Losh" In-Reply-To: <20090503.121107.-1437680051.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, cokane@FreeBSD.org Subject: Re: svn commit: r191762 - in head/sys: conf dev/bwi modules/bwi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ddkprog@yahoo.com List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 18:43:56 -0000 --- On Sun, 5/3/09, M. Warner Losh wrote: > From: M. Warner Losh > Subject: Re: svn commit: r191762 - in head/sys: conf dev/bwi modules/bwi > To: thompsa@FreeBSD.org > Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, cokane@FreeBSD.org > Date: Sunday, May 3, 2009, 9:11 PM > In message: > <20090503175804.GC11965@citylink.fud.org.nz> > Andrew Thompson > writes: > : On Sun, May 03, 2009 at 09:18:50AM -0400, Coleman Kane > wrote: > : > On Sat, 2009-05-02 at 21:28 -0700, Andrew Thompson > wrote: > : > > On Sun, May 03, 2009 at 04:01:43AM +0000, > Warner Losh wrote: > : > > > Author: imp > : > > > Date: Sun May 3 04:01:43 2009 > : > > > New Revision: 191762 > : > > > URL: > http://svn.freebsd.org/changeset/base/191762 > : > > > > : > > > Log: > : > > > Bring in Andrew Thompson's port of > Sepherosa Ziehau's bwi driver for > : > > > Broadcom BCM43xx chipsets. > : > > > : > > Actually Sam did the initial port, I just > tinkered later on. Kudos to > : > > him. > : > > > : > > Andrew > : > > : > Any idea what still needs to be done to support the > 4321 b/g/n parts? > : > Are they completely different than the others? > : > : I believe we need to move to the v4 firmware for that. > > I believe so too.... > > Warner http://bcm.sipsolutions.net/ non exist correct http://bcm-specs.sipsolutions.net/ From owner-svn-src-all@FreeBSD.ORG Sun May 3 18:51:47 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1CE91065677 for ; Sun, 3 May 2009 18:51:47 +0000 (UTC) (envelope-from cokane@FreeBSD.org) Received: from mail-out2.fuse.net (mail-out2.fuse.net [216.68.8.171]) by mx1.freebsd.org (Postfix) with ESMTP id 7FEB98FC19 for ; Sun, 3 May 2009 18:51:47 +0000 (UTC) (envelope-from cokane@FreeBSD.org) X-CNFS-Analysis: v=1.0 c=1 a=7kiLsdLCEYIA:10 a=a0no3jnZOzYA:10 a=mAHV2QKMAAAA:8 a=6I5d2MoRAAAA:8 a=5O9k6Mw3HOMn4ePY3eMA:9 a=wC9jqm6gXsjONHCwzjOsqftLzFcA:4 a=SV7veod9ZcQA:10 a=sYbgYMueuuRH35op9-YA:9 a=jKcZ2XMpXPP4z_Q_SH5lMoyNYVMA:4 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine Authentication-Results: gwout2 smtp.mail=cokane@FreeBSD.org; spf=softfail Received-SPF: softfail (gwout2: transitional domain FreeBSD.org does not designate 74.215.227.9 as permitted sender) Received: from [74.215.227.9] ([74.215.227.9:50859] helo=mail.colemankane.org) by gwout2 (envelope-from ) (ecelerity 2.2.2.37 r(28805/28810M)) with ESMTP id A4/FE-15224-2C7EDF94; Sun, 03 May 2009 14:51:47 -0400 Received: from [10.0.1.3] (WS-ESR2-74-215-178-71.fuse.net [74.215.178.71]) by mail.colemankane.org (Postfix) with ESMTPSA id 4B4451143C; Sun, 3 May 2009 15:57:10 -0400 (EDT) From: Coleman Kane To: "M. Warner Losh" In-Reply-To: <20090503.121107.-1437680051.imp@bsdimp.com> References: <20090503042838.GA11965@citylink.fud.org.nz> <1241356730.1685.7.camel@localhost> <20090503175804.GC11965@citylink.fud.org.nz> <20090503.121107.-1437680051.imp@bsdimp.com> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-AHrHv9owHnGuIVyUROuV" Organization: FreeBSD Project Date: Sun, 03 May 2009 14:49:27 -0400 Message-Id: <1241376567.1655.3.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1.1 FreeBSD GNOME Team Port Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, thompsa@FreeBSD.org Subject: Re: svn commit: r191762 - in head/sys: conf dev/bwi modules/bwi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 18:51:48 -0000 --=-AHrHv9owHnGuIVyUROuV Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sun, 2009-05-03 at 12:11 -0600, M. Warner Losh wrote: > In message: <20090503175804.GC11965@citylink.fud.org.nz> > Andrew Thompson writes: > : On Sun, May 03, 2009 at 09:18:50AM -0400, Coleman Kane wrote: > : > On Sat, 2009-05-02 at 21:28 -0700, Andrew Thompson wrote: > : > > On Sun, May 03, 2009 at 04:01:43AM +0000, Warner Losh wrote: > : > > > Author: imp > : > > > Date: Sun May 3 04:01:43 2009 > : > > > New Revision: 191762 > : > > > URL: http://svn.freebsd.org/changeset/base/191762 > : > > >=20 > : > > > Log: > : > > > Bring in Andrew Thompson's port of Sepherosa Ziehau's bwi drive= r for > : > > > Broadcom BCM43xx chipsets. > : > >=20 > : > > Actually Sam did the initial port, I just tinkered later on. Kudos = to > : > > him. > : > >=20 > : > > Andrew > : >=20 > : > Any idea what still needs to be done to support the 4321 b/g/n parts? > : > Are they completely different than the others? > :=20 > : I believe we need to move to the v4 firmware for that. >=20 > I believe so too.... >=20 > Warner >=20 Well, I use one of these parts (0x14e4:0x4328) with if_ndis every day and I'd like to ditch that. I'm kind of ignorant of the bwi project, but would like to know where I could go to learn more.... I'd love to help. --=20 Coleman Kane --=-AHrHv9owHnGuIVyUROuV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAkn95zQACgkQcMSxQcXat5crSwCfTfxA4nWM7K9EiJ4RcKK36qRw jjkAn0DUkk1qIGgDcBRdxoqxjdHJTEOO =oGAv -----END PGP SIGNATURE----- --=-AHrHv9owHnGuIVyUROuV-- From owner-svn-src-all@FreeBSD.ORG Sun May 3 21:21:17 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 870DB1065676; Sun, 3 May 2009 21:21:17 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 748768FC16; Sun, 3 May 2009 21:21:17 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n43LLHZZ024825; Sun, 3 May 2009 21:21:17 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n43LLHif024824; Sun, 3 May 2009 21:21:17 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200905032121.n43LLHif024824@svn.freebsd.org> From: Hiroki Sato Date: Sun, 3 May 2009 21:21:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191769 - stable/7/release/doc/en_US.ISO8859-1/errata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2009 21:21:18 -0000 Author: hrs Date: Sun May 3 21:21:17 2009 New Revision: 191769 URL: http://svn.freebsd.org/changeset/base/191769 Log: Add an entry for a lock order reversal that can cause a deadlock. Reviewed by: kib Approved by: re (implicit) Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Sun May 3 18:29:04 2009 (r191768) +++ stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Sun May 3 21:21:17 2009 (r191769) @@ -169,6 +169,14 @@ workaround, you can boot using the bootonly or livefs CDROM and then swap in disc1 once sysinstall starts. + [20090504] A lock handling error has been found in + interaction between &man.malloc.3; implementation and threading + library. When a multi-threaded process calls the &man.fork.2; + system call in a thread and the &man.malloc.3; function in + another thread, it can cause a deadlock in the child process. + An Errata Notice to fix this problem is planned for this problem + after the release. + Late-Breaking News and Corrections From owner-svn-src-all@FreeBSD.ORG Mon May 4 00:19:01 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0805F10657AF; Mon, 4 May 2009 00:19:01 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E9B768FC18; Mon, 4 May 2009 00:19:00 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n440J06k028260; Mon, 4 May 2009 00:19:00 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n440J0JZ028259; Mon, 4 May 2009 00:19:00 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200905040019.n440J0JZ028259@svn.freebsd.org> From: Ken Smith Date: Mon, 4 May 2009 00:19:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191770 - stable/7/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 00:19:01 -0000 Author: kensmith Date: Mon May 4 00:19:00 2009 New Revision: 191770 URL: http://svn.freebsd.org/changeset/base/191770 Log: 7.2-RELEASE is done, shift over to -STABLE. Approved by: re (implicit) Modified: stable/7/sys/conf/newvers.sh Modified: stable/7/sys/conf/newvers.sh ============================================================================== --- stable/7/sys/conf/newvers.sh Sun May 3 21:21:17 2009 (r191769) +++ stable/7/sys/conf/newvers.sh Mon May 4 00:19:00 2009 (r191770) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="7.2" -BRANCH="PRERELEASE" +BRANCH="STABLE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@FreeBSD.ORG Mon May 4 00:37:45 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A5B8106566C; Mon, 4 May 2009 00:37:45 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 759768FC14; Mon, 4 May 2009 00:37:45 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n440bjdw028670; Mon, 4 May 2009 00:37:45 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n440biJ1028655; Mon, 4 May 2009 00:37:44 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200905040037.n440biJ1028655@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 May 2009 00:37:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191771 - in head: contrib/file contrib/file/Magdir contrib/file/tests lib/libmagic usr.bin/file X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 00:37:46 -0000 Author: obrien Date: Mon May 4 00:37:44 2009 New Revision: 191771 URL: http://svn.freebsd.org/changeset/base/191771 Log: Merge vendor/file/dist@191739, bringing FILE 5.00 to 8-CURRENT. Added: head/contrib/file/Magdir/wireless - copied unchanged from r191769, vendor/file/dist/Magdir/wireless head/contrib/file/Makefile.am-src - copied unchanged from r191769, vendor/file/dist/Makefile.am-src head/contrib/file/cdf.c - copied unchanged from r191769, vendor/file/dist/cdf.c head/contrib/file/cdf.h - copied unchanged from r191769, vendor/file/dist/cdf.h head/contrib/file/cdf_time.c - copied unchanged from r191769, vendor/file/dist/cdf_time.c head/contrib/file/encoding.c - copied unchanged from r191769, vendor/file/dist/encoding.c head/contrib/file/readcdf.c - copied unchanged from r191769, vendor/file/dist/readcdf.c Deleted: head/contrib/file/.cvsignore head/usr.bin/file/config.h Modified: head/contrib/file/ (props changed) head/contrib/file/ChangeLog head/contrib/file/Magdir/animation head/contrib/file/Magdir/audio head/contrib/file/Magdir/cafebabe head/contrib/file/Magdir/compress head/contrib/file/Magdir/elf head/contrib/file/Magdir/epoc head/contrib/file/Magdir/filesystems head/contrib/file/Magdir/graphviz head/contrib/file/Magdir/images head/contrib/file/Magdir/jpeg head/contrib/file/Magdir/mach head/contrib/file/Magdir/macintosh head/contrib/file/Magdir/msdos head/contrib/file/Magdir/perl head/contrib/file/Magdir/printer head/contrib/file/Magdir/timezone head/contrib/file/Magdir/xwindows head/contrib/file/Makefile.am head/contrib/file/Makefile.in head/contrib/file/README head/contrib/file/TODO head/contrib/file/apprentice.c head/contrib/file/apptype.c head/contrib/file/ascmagic.c head/contrib/file/asprintf.c (contents, props changed) head/contrib/file/compress.c head/contrib/file/config.h.in head/contrib/file/configure head/contrib/file/configure.ac head/contrib/file/elfclass.h (props changed) head/contrib/file/file.c head/contrib/file/file.h head/contrib/file/file.man head/contrib/file/file_opts.h head/contrib/file/fsmagic.c head/contrib/file/funcs.c head/contrib/file/getopt_long.c (contents, props changed) head/contrib/file/is_tar.c head/contrib/file/libmagic.man head/contrib/file/magic.c head/contrib/file/magic.h head/contrib/file/magic.man head/contrib/file/mygetopt.h (props changed) head/contrib/file/patchlevel.h head/contrib/file/print.c head/contrib/file/readelf.c head/contrib/file/softmagic.c head/contrib/file/tests/Makefile.am (props changed) head/contrib/file/tests/Makefile.in (props changed) head/contrib/file/tests/test.c (props changed) head/contrib/file/vasprintf.c (contents, props changed) head/lib/libmagic/Makefile head/lib/libmagic/config.h head/usr.bin/file/Makefile Modified: head/contrib/file/ChangeLog ============================================================================== --- head/contrib/file/ChangeLog Mon May 4 00:19:00 2009 (r191770) +++ head/contrib/file/ChangeLog Mon May 4 00:37:44 2009 (r191771) @@ -1,9 +1,105 @@ +2008-12-12 15:50 Christos Zoulas + + * fix initial offset calculation for non 4K sector files + + * add loop limits to avoid DoS attacks by constructing + looping sector references. + +2008-12-03 13:05 Christos Zoulas + + * fix memory botches on cdf file parsing. + + * exit with non-zero value for any error, not just for the last + file processed. + +2008-11-09 20:42 Charles Longeau + + * Replace all str{cpy,cat} functions with strl{cpy,cat} + * Ensure that strl{cpy,cat} are included in libmagic, + as needed. + +2008-11-06 18:18 Christos Zoulas + + * Handle ID3 format files. + +2008-11-06 23:00 Reuben Thomas + + * Fix --mime, --mime-type and --mime-encoding under new scheme. + + * Rename "ascii" to "text" and add "encoding" test. + + * Return a precise ("utf-16le" or "utf-16be") MIME charset for + UTF-16. + + * Fix error in comment caused by automatic indentation adding + words! + +2008-11-06 10:35 Christos Zoulas + + * use memchr instead of strchr because the string + might not be NUL terminated (Scott MacVicar) + +2008-11-03 07:31 Reuben Thomas + + * Fix a printf with a non-literal format string. + + * Fix formatting and punctuation of help for "--apple". + +2008-10-30 11:00 Reuben Thomas + + * Correct words counts in comments of struct magic. + + * Fix handle_annotation to allow both Apple and MIME types to be + printed, and to return correct code if MIME type is + printed (1, not 0) or if there's an error (-1 not 1). + + * Fix output of charset for MIME type (precede with semi-colon; + fixes Debian bug #501460). + + * Fix potential attacks via conversion specifications in magic + strings. + + * Add a FIXME for Debian bug #488562 (magic files should be + read in a defined order, by sorting the names). + +2008-10-18 16:45 Christos Zoulas + + * Added APPLE file creator/type + +2008-10-12 10:20 Christos Zoulas + + * Added CDF parsing + +2008-10-09 16:40 Christos Zoulas + + * filesystem and msdos patches (Joerg Jenderek) + +2008-10-09 13:20 Christos Zoulas + + * correct --exclude documentation issues: remove troff and fortran + and rename "token" to "tokens". (Randy McMurchy) + +2008-10-01 10:30 Christos Zoulas + + * Read ~/.magic in addition to the default magic file not instead + of, as documented in the man page. + +2008-09-10 21:30 Reuben Thomas + + * Comment out graphviz patterns, as they match too many files. + 2008-08-30 12:54 Christos Zoulas * Don't eat trailing \n in magic enties. * Cast defines to allow compilation using a c++ compiler. +2008-08-25 23:56 Reuben Thomas + + * Add text/x-lua MIME type for Lua scripts. + + * Escape { in regex in graphviz patterns. + 2008-07-26 00:59 Reuben Thomas * Add MIME types for special files. @@ -55,22 +151,22 @@ 2008-05-06 00:13 Robert Byrnes - * src/Makefile.am: + * src/Makefile.am: Ensure that getopt_long and [v]asprintf are included in libmagic, as needed. Remove unnecessary EXTRA_DIST. - * src/Makefile.in: + * src/Makefile.in: Rerun automake. - * src/vasprintf.c (dispatch): + * src/vasprintf.c (dispatch): Fix variable precision bug: be sure to step past '*'. - * src/vasprintf.c (core): + * src/vasprintf.c (core): Remove unreachable code. - * src/apprentice.c (set_test_type): + * src/apprentice.c (set_test_type): Add cast to avoid compiler warning. 2008-04-22 23:45 Christos Zoulas @@ -81,12 +177,12 @@ 2008-04-04 11:00 Christos Zoulas - * >= <= is not supported, so fix the magic and warn about it. + * >= <= is not supported, so fix the magic and warn about it. reported by: Thien-Thi Nguyen 2008-03-27 16:16 Robert Byrnes - * src/readelf.c (donote): + * src/readelf.c (donote): ELF core file command name/line bug fixes and enhancements: Try larger offsets first to avoid false matches @@ -112,7 +208,7 @@ * Clarify UTF-8 BOM message (Reuben Thomas) * Add HTML comment to token list in names.h - + 2007-02-04 15:50 Christos Zoulas * Debian fixes (Reuben Thomas) @@ -152,7 +248,7 @@ 2007-10-28 20:48 Christos Zoulas - * float and double magic support (Behan Webster) + * float and double magic support (Behan Webster) 2007-10-28 20:48 Christos Zoulas @@ -199,7 +295,7 @@ be easily parsed: mimetype [charset=character-set] [encoding=encoding-mime-type] - Remove spurious extra text from some MIME type printouts + Remove spurious extra text from some MIME type printouts (mostly in is_tar). Fix one case where -i produced nothing at all (for a 1-byte file, @@ -229,7 +325,7 @@ 2007-03-15 10:51 Christos Zoulas * fix fortran and nroff reversed tests (Dmitry V. Levin) - + * fix exclude option (Dmitry V. Levin) 2007-02-08 17:30 Christos Zoulas @@ -248,7 +344,7 @@ * Add exclude flag. 2007-01-18 05:29 Anon Ymous - + * Move the "type" detection code from parse() into its own table driven routine. This avoids maintaining multiple lists in file.h. @@ -256,7 +352,7 @@ * Add an optional conditional field (ust before the type field). This code is wrapped in "#ifdef ENABLE_CONDITIONALS" as it is likely to go away. - + 2007-01-16 23:24 Anon Ymous * Fix an initialization bug in check_mem(). @@ -327,7 +423,7 @@ 2006-12-08 16:32 Christos Zoulas * store and print the line number of the magic - entry for debugging. + entry for debugging. * if the magic entry did not print anything, don't treat it as a match @@ -342,7 +438,7 @@ file_softmagic. 2006-11-25 13:35 Christos Zoulas - + * Don't store the current offset in the magic struct, because it needs to be restored and it was not done properly all the time. Bug @@ -432,7 +528,7 @@ * Look for note sections in non executables. 2005-09-20 13:33 Christos Zoulas - + * Don't print SVR4 Style in core files multiple times (Radek Vokál) @@ -443,9 +539,9 @@ 2005-08-18 09:53 Christos Zoulas * Remove erroreous mention of /etc/magic in the file man page - This is gentoo bug 101639. (Mike Frysinger) + This is gentoo bug 101639. (Mike Frysinger) - * Cross-compile support and detection (Mike Frysinger) + * Cross-compile support and detection (Mike Frysinger) 2005-08-12 10:17 Christos Zoulas @@ -477,20 +573,20 @@ * Avoid NULL pointer dereference in time conversion. 2005-03-06 00:00 Joerg Walter - + * Add indirect magic offset support, and search mode. 2005-01-12 00:00 Stepan Kasal - * src/ascmagic.c (file_ascmagic): Fix three bugs about text files: - If a CRLF text file happens to have CR at offset HOWMANY - 1 - (currently 0xffff), it should not be counted as CR line - terminator. - If a line has length exactly MAXLINELEN, it should not yet be - treated as a ``very long line'', as MAXLINELEN is ``longest sane - line length''. - With CRLF, the line length was not computed correctly, and even - lines of length MAXLINELEN - 1 were treated as ``very long''. + * src/ascmagic.c (file_ascmagic): Fix three bugs about text files: + If a CRLF text file happens to have CR at offset HOWMANY - 1 + (currently 0xffff), it should not be counted as CR line + terminator. + If a line has length exactly MAXLINELEN, it should not yet be + treated as a ``very long line'', as MAXLINELEN is ``longest sane + line length''. + With CRLF, the line length was not computed correctly, and even + lines of length MAXLINELEN - 1 were treated as ``very long''. 2004-12-07 14:15 Christos Zoulas @@ -525,12 +621,12 @@ * Remove 3rd and 4th copyright clause; approved by Ian Darwin. - * Fix small memory leaks; caught by: Tamas Sarlos + * Fix small memory leaks; caught by: Tamas Sarlos 2004-07-24 16:33 Christos Zoulas - * magic.mime update Danny Milosavljevic + * magic.mime update Danny Milosavljevic * FreeBSD version update Oliver Eikemeier Modified: head/contrib/file/Magdir/animation ============================================================================== --- head/contrib/file/Magdir/animation Mon May 4 00:19:00 2009 (r191770) +++ head/contrib/file/Magdir/animation Mon May 4 00:37:44 2009 (r191771) @@ -325,6 +325,7 @@ # MP2, M1A 0 beshort&0xFFFE 0xFFFC MPEG ADTS, layer II, v1 +!:mime audio/mpeg # rates >2 byte&0xF0 0x10 \b, 32 kbps >2 byte&0xF0 0x20 \b, 48 kbps @@ -399,6 +400,7 @@ # MP3, M2A 0 beshort&0xFFFE 0xFFF2 MPEG ADTS, layer III, v2 +!:mime audio/mpeg # rate >2 byte&0xF0 0x10 \b, 8 kbps >2 byte&0xF0 0x20 \b, 16 kbps @@ -790,3 +792,24 @@ 0 belong 0x00000001 >4 byte&0x1F 0x07 !:mime video/h264 + +# Type: Bink Video +# URL: http://wiki.multimedia.cx/index.php?title=3DBink_Container +# From: 2008-07-18 +0 string BIK Bink Video +>3 regex =[a-z] rev.%s +#>4 ulelong x size %d +>20 ulelong x \b, %d +>24 ulelong x \bx%d +>8 ulelong x \b, %d frames +>32 ulelong x at rate %d/ +>28 ulelong >1 \b%d +>40 ulelong =0 \b, no audio +>40 ulelong !0 \b, %d audio track +>>40 ulelong !1 \bs +# follow properties of the first audio track only +>>48 uleshort x %dHz +>>51 byte&0x20 0 mono +>>51 byte&0x20 !0 stereo +#>>51 byte&0x10 0 FFT +#>>51 byte&0x10 !0 DCT Modified: head/contrib/file/Magdir/audio ============================================================================== --- head/contrib/file/Magdir/audio Mon May 4 00:19:00 2009 (r191770) +++ head/contrib/file/Magdir/audio Mon May 4 00:37:44 2009 (r191771) @@ -286,43 +286,14 @@ # SGI SoundTrack 0 string _SGI_SoundTrack SGI SoundTrack project file # ID3 version 2 tags -0 string ID3 Audio file with ID3 version 2. -# ??? Normally such a file is an MP3 file, but this will give false positives -!:mime audio/mpeg ->3 ubyte <0xff \b%d -#>4 ubyte <0xff \b%d tag ->2584 string fLaC \b, FLAC encoding ->>2588 byte&0x7f >0 \b, unknown version ->>2588 byte&0x7f 0 \b -# some common bits/sample values ->>>2600 beshort&0x1f0 0x030 \b, 4 bit ->>>2600 beshort&0x1f0 0x050 \b, 6 bit ->>>2600 beshort&0x1f0 0x070 \b, 8 bit ->>>2600 beshort&0x1f0 0x0b0 \b, 12 bit ->>>2600 beshort&0x1f0 0x0f0 \b, 16 bit ->>>2600 beshort&0x1f0 0x170 \b, 24 bit ->>>2600 byte&0xe 0x0 \b, mono ->>>2600 byte&0xe 0x2 \b, stereo ->>>2600 byte&0xe 0x4 \b, 3 channels ->>>2600 byte&0xe 0x6 \b, 4 channels ->>>2600 byte&0xe 0x8 \b, 5 channels ->>>2600 byte&0xe 0xa \b, 6 channels ->>>2600 byte&0xe 0xc \b, 7 channels ->>>2600 byte&0xe 0xe \b, 8 channels -# some common sample rates ->>>2597 belong&0xfffff0 0x0ac440 \b, 44.1 kHz ->>>2597 belong&0xfffff0 0x0bb800 \b, 48 kHz ->>>2597 belong&0xfffff0 0x07d000 \b, 32 kHz ->>>2597 belong&0xfffff0 0x056220 \b, 22.05 kHz ->>>2597 belong&0xfffff0 0x05dc00 \b, 24 kHz ->>>2597 belong&0xfffff0 0x03e800 \b, 16 kHz ->>>2597 belong&0xfffff0 0x02b110 \b, 11.025 kHz ->>>2597 belong&0xfffff0 0x02ee00 \b, 12 kHz ->>>2597 belong&0xfffff0 0x01f400 \b, 8 kHz ->>>2597 belong&0xfffff0 0x177000 \b, 96 kHz ->>>2597 belong&0xfffff0 0x0fa000 \b, 64 kHz ->>>2601 byte&0xf >0 \b, >4G samples ->2584 string !fLaC \b, MP3 encoding +0 string ID3 Audio file with ID3 version 2 +>3 byte x \b.%d +>4 byte x \b.%d +>>5 byte &0x80 \b, unsynchronized frames +>>5 byte &0x40 \b, extended header +>>5 byte &0x20 \b, experimental +>>5 byte &0x10 \b, footer present +>(6.I) indirect x \b, contains: # NSF (NES sound file) magic 0 string NESM\x1a NES Sound File Modified: head/contrib/file/Magdir/cafebabe ============================================================================== --- head/contrib/file/Magdir/cafebabe Mon May 4 00:19:00 2009 (r191770) +++ head/contrib/file/Magdir/cafebabe Mon May 4 00:37:44 2009 (r191771) @@ -12,16 +12,18 @@ # (and use as a hack). Let's not use 18, because the Mach-O people # might add another one or two as time goes by... # -0 beshort 0xcafe ->2 beshort 0xbabe +0 belong 0xcafebabe !:mime application/x-java-applet ->>2 belong >30 compiled Java class data, ->>>6 beshort x version %d. ->>>4 beshort x \b%d ->>4 belong 1 Mach-O fat file with 1 architecture ->>4 belong >1 ->>>4 belong <20 Mach-O fat file with %ld architectures ->2 beshort 0xd00d JAR compressed with pack200, +>4 belong >30 compiled Java class data, +>>6 beshort x version %d. +>>4 beshort x \b%d + +0 belong 0xcafebabe +>4 belong 1 Mach-O fat file with 1 architecture +>4 belong >1 +>>4 belong <20 Mach-O fat file with %ld architectures + +0 belong 0xcafed00d JAR compressed with pack200, >>5 byte x version %d. >>4 byte x \b%d !:mime application/x-java-pack200 Modified: head/contrib/file/Magdir/compress ============================================================================== --- head/contrib/file/Magdir/compress Mon May 4 00:19:00 2009 (r191770) +++ head/contrib/file/Magdir/compress Mon May 4 00:37:44 2009 (r191771) @@ -11,6 +11,7 @@ # standard unix compress 0 string \037\235 compress'd data !:mime application/x-compress +!:apple LZIVZIVU >2 byte&0x80 >0 block compressed >2 byte&0x1f x %d bits @@ -76,6 +77,11 @@ !:mime application/x-bzip2 >3 byte >47 \b, block size = %c00k +# lzip +0 string LZIP lzip compressed data +!:mime application/x-lzip +>4 byte x \b, version: %d + # squeeze and crunch # Michael Haardt 0 beshort 0x76FF squeezed data, Modified: head/contrib/file/Magdir/elf ============================================================================== --- head/contrib/file/Magdir/elf Mon May 4 00:19:00 2009 (r191770) +++ head/contrib/file/Magdir/elf Mon May 4 00:37:44 2009 (r191771) @@ -143,11 +143,13 @@ >>18 leshort 91 picoJava, >>18 leshort 92 OpenRISC, >>18 leshort 93 ARC Cores Tangent-A5, ->>18 leshort 0x3426 OpenRISC (obsolete), ->>18 leshort 0x8472 OpenRISC (obsolete), >>18 leshort 94 Tensilica Xtensa, >>18 leshort 97 NatSemi 32k, >>18 leshort 106 Analog Devices Blackfin, +>>18 leshort 113 Altera Nios II, +>>18 leshort 0xae META, +>>18 leshort 0x3426 OpenRISC (obsolete), +>>18 leshort 0x8472 OpenRISC (obsolete), >>18 leshort 0x9026 Alpha (unofficial), >>20 lelong 0 invalid version >>20 lelong 1 version 1 Modified: head/contrib/file/Magdir/epoc ============================================================================== --- head/contrib/file/Magdir/epoc Mon May 4 00:19:00 2009 (r191770) +++ head/contrib/file/Magdir/epoc Mon May 4 00:37:44 2009 (r191771) @@ -1,10 +1,11 @@ - #------------------------------------------------------------------------------ -# Epoc 32 : file(1) magic for Epoc Documents [psion/osaris +# EPOC : file(1) magic for EPOC documents [Psion Series 5/Osaris/Geofox 1] # Stefan Praszalowicz (hpicollo@worldnet.fr) -#0 lelong 0x10000037 Epoc32 +# Useful information for improving this file can be found at: +# http://software.frodo.looijaard.name/psiconv/formats/Index.html +0 lelong 0x10000037 >4 lelong 0x1000006D ->>8 lelong 0x1000007F Word ->>8 lelong 0x10000088 Sheet ->>8 lelong 0x1000007D Sketch ->>8 lelong 0x10000085 TextEd +>>8 lelong 0x1000007F Psion Word +>>8 lelong 0x10000088 Psion Sheet +>>8 lelong 0x1000007D Psion Sketch +>>8 lelong 0x10000085 Psion TextEd Modified: head/contrib/file/Magdir/filesystems ============================================================================== --- head/contrib/file/Magdir/filesystems Mon May 4 00:19:00 2009 (r191770) +++ head/contrib/file/Magdir/filesystems Mon May 4 00:37:44 2009 (r191771) @@ -104,9 +104,32 @@ >>>346 string des\ Betriebssystems >>>>366 string Betriebssystem\ nicht\ vorhanden \b, Microsoft Windows XP MBR (german) >>>>>0x1B8 ulelong >0 \b, Serial 0x%-.4x ->0x145 string Default:\ F \b, FREE-DOS MBR +#>0x145 string Default:\ F \b, FREE-DOS MBR +#>0x14B string Default:\ F \b, FREE-DOS 1.0 MBR +>0x145 search/7 Default:\ F \b, FREE-DOS MBR +#>>313 string F0\ .\ .\ . +#>>>322 string disk\ 1 +#>>>>382 string FAT3 >64 string no\ active\ partition\ found >>96 string read\ error\ while\ reading\ drive \b, FREE-DOS Beta 0.9 MBR +# Ranish Partition Manager http://www.ranish.com/part/ +>387 search/4 \0\ Error!\r +>>378 search/7 Virus! +>>>397 search/4 Booting\ +>>>>408 search/4 HD1/\0 \b, Ranish MBR ( +>>>>>416 string Writing\ changes... \b2.37 +>>>>>>438 ubyte x \b,0x%x dots +>>>>>>440 ubyte >0 \b,virus check +>>>>>>441 ubyte >0 \b,partition %c +#2.38,2.42,2.44 +>>>>>416 string !Writing\ changes... \b +>>>>>>418 ubyte 1 \bvirus check, +>>>>>>419 ubyte x \b0x%x seconds +>>>>>>420 ubyte&0x0F >0 \b,partition +>>>>>>>420 ubyte&0x0F <5 \b %x +>>>>>>>420 ubyte&0x0F 0Xf \b ask +>>>>>420 ubyte x \b) +# >271 string Operating\ system\ loading >>296 string error\r \b, SYSLINUX MBR (2.10) # http://www.acronis.de/ @@ -124,18 +147,20 @@ >0x40 string SBML # label with 11 characters of FAT 12 bit filesystem >>43 string SMART\ BTMGR ->>>430 string SBMK\ Bad!\r ->>>>3 string SBM \b, Smart Boot Manager ->>>>>6 string >\0 \b, version %s +>>>430 string SBMK\ Bad!\r \b, Smart Boot Manager +# OEM-ID not always "SBM" +#>>>>3 strings SBM +>>>>6 string >\0 \b, version %s >382 string XOSLLOADXCF \b, eXtended Operating System Loader >6 string LILO \b, LInux i386 boot LOader >>120 string LILO \b, version 22.3.4 SuSe >>172 string LILO \b, version 22.5.8 Debian -# updated by Joerg Jenderek +# updated by Joerg Jenderek at Oct 2008 # variables according to grub-0.97/stage1/stage1.S or # http://www.gnu.org/software/grub/manual/grub.html#Embedded-data # usual values are marked with comments to get only informations of strange GRUB loaders ->0 ulelong 0x009048EB +>342 search/60 \0Geom\0 +#>0 ulelong x %x=0x009048EB , 0x2a9048EB 0 >>0x41 ubyte <2 >>>0x3E ubyte >2 \b; GRand Unified Bootloader # 0x3 for 0.5.95,0.93,0.94,0.96 0x4 for 1.90 @@ -178,15 +203,14 @@ >3 string BCDL >>498 string BCDL\ \ \ \ BIN \b, Bootable CD Loader (1.50Z) # mbr partion table entries -# OEM-ID not Microsoft,SYSLINUX,or MTOOLs +# OEM-ID does not contain MicroSoft,NEWLDR,DOS,SYSLINUX,or MTOOLs >3 string !MS >>3 string !SYSLINUX >>>3 string !MTOOL +>>>>3 string !NEWLDR +>>>>>5 string !DOS # not FAT (32 bit) ->>>>82 string !FAT32 -#not IO.SYS ->>>>>472 string !IO\ \ \ \ \ \ SYS ->>>>>>480 string !IO\ \ \ \ \ \ SYS +>>>>>>82 string !FAT32 #not Linux kernel >>>>>>>514 string !HdrS #not BeOS @@ -272,6 +296,11 @@ >>>>>>>>>(1.b+11) ubyte 0xb >>>>>>>>>>(1.b+12) ubyte 0x56 >>>>>>>>>>(1.b+13) ubyte 0xb4 \b, mkdosfs boot message display +>214 string Please\ try\ to\ install\ FreeDOS\ \b, DOS Emulator boot message display +#>>244 string from\ dosemu-freedos-*-bin.tgz\r +#>>>170 string Sorry,\ could\ not\ load\ an\ +#>>>>195 string operating\ system.\r\n +# >103 string This\ is\ not\ a\ bootable\ disk.\ >>132 string Please\ insert\ a\ bootable\ >>>157 string floppy\ and\r\n @@ -374,12 +403,22 @@ >430 string Datentr\204ger\ entfernen\xFF\r\n >>454 string Medienfehler\xFF\r\n >>>469 string Neustart:\ Taste\ dr\201cken\r \b, Microsoft Windows XP Bootloader (4.german) ->>>>368 ubyte&0xDF >0 ->>>>>368 string x %-.5s ->>>>>>373 ubyte&0xDF >0 ->>>>>>>373 string x \b%-.3s ->>>>>376 ubyte&0xDF >0 ->>>>>>376 string x \b.%-.3s +>>>>379 string \0 +>>>>>368 ubyte&0xDF >0 +>>>>>>368 string x %-.5s +>>>>>>>373 ubyte&0xDF >0 +>>>>>>>>373 string x \b%-.3s +>>>>>>376 ubyte&0xDF >0 +>>>>>>>376 string x \b.%-.3s +# variant +>>>>417 ubyte&0xDF >0 +>>>>>417 string x %-.5s +>>>>>>422 ubyte&0xDF >0 +>>>>>>>422 string x \b%-.3s +>>>>>425 ubyte&0xDF >0 +>>>>>>425 string >\ \b.%-.3s +# + #>3 string NTFS\ \ \ \ >389 string Fehler\ beim\ Lesen\ >>407 string des\ Datentr\204gers @@ -567,12 +606,27 @@ >>>489 string Any\ key\ to\ retry \b, DR-DOS Bootloader >>471 string Cannot\ load\ DOS\ >>487 string press\ key\ to\ retry \b, Open-DOS Bootloader +#?? >444 string KERNEL\ \ SYS >>314 string BOOT\ error! \b, FREE-DOS Bootloader >499 string KERNEL\ \ SYS >>305 string BOOT\ err!\0 \b, Free-DOS Bootloader >449 string KERNEL\ \ SYS >>319 string BOOT\ error! \b, FREE-DOS 0.5 Bootloader +# +>449 string Loading\ FreeDOS +>>0x1AF ulelong >0 \b, FREE-DOS 0.95,1.0 Bootloader +>>>497 ubyte&0xDF >0 +>>>>497 string x \b %-.6s +>>>>>503 ubyte&0xDF >0 +>>>>>>503 string x \b%-.1s +>>>>>>>504 ubyte&0xDF >0 +>>>>>>>>504 string x \b%-.1s +>>>>505 ubyte&0xDF >0 +>>>>>505 string x \b.%-.3s +# +>331 string Error!.0 \b, FREE-DOS 1.0 bootloader +# >125 string Loading\ FreeDOS...\r >>311 string BOOT\ error!\r \b, FREE-DOS bootloader >>>441 ubyte&0xDF >0 @@ -706,13 +760,7 @@ #it also hangs with another message ("NF"). >>>>>492 string RENF \b, FAT (12 bit) >>>>>495 string RENF \b, FAT (16 bit) -# added by Joerg Jenderek -# http://syslinux.zytor.com/iso.php -0 ulelong 0x7c40eafa isolinux Loader -# http://syslinux.zytor.com/pxe.php -0 ulelong 0x007c05ea pxelinux Loader -0 ulelong 0x60669c66 pxelinux Loader -# loader end +# x86 bootloader end # updated by Joerg Jenderek at Sep 2007 >3 ubyte 0 #no active flag @@ -732,6 +780,7 @@ # older drives may use Near JuMP instruction E9 xx xx >0 lelong&0x009000EB 0x009000EB >0 lelong&0x000000E9 0x000000E9 +# minimal short forward jump found 03cx?? # maximal short forward jump is 07fx >1 ubyte <0xff \b, code offset 0x%x # mtools-3.9.8/msdos.h @@ -740,91 +789,92 @@ >>11 uleshort&0x000f x >>>11 uleshort <32769 >>>>11 uleshort >31 ->>>>>3 string >\0 \b, OEM-ID "%8.8s" +>>>>>21 ubyte&0xf0 0xF0 +>>>>>>3 string >\0 \b, OEM-ID "%8.8s" #http://mirror.href.com/thestarman/asm/debug/debug2.htm#IHC ->>>>>>8 string IHC \b cached by Windows 9M ->>>>>11 uleshort >512 \b, Bytes/sector %u -#>>>>>11 uleshort =512 \b, Bytes/sector %u=512 (usual) ->>>>>11 uleshort <512 \b, Bytes/sector %u ->>>>>13 ubyte >1 \b, sectors/cluster %u -#>>>>>13 ubyte =1 \b, sectors/cluster %u (usual on Floppies) ->>>>>14 uleshort >32 \b, reserved sectors %u -#>>>>>14 uleshort =32 \b, reserved sectors %u (usual Fat32) -#>>>>>14 uleshort >1 \b, reserved sectors %u -#>>>>>14 uleshort =1 \b, reserved sectors %u (usual FAT12,FAT16) ->>>>>14 uleshort <1 \b, reserved sectors %u ->>>>>16 ubyte >2 \b, FATs %u -#>>>>>16 ubyte =2 \b, FATs %u (usual) ->>>>>16 ubyte =1 \b, FAT %u ->>>>>16 ubyte >0 ->>>>>17 uleshort >0 \b, root entries %u -#>>>>>17 uleshort =0 \b, root entries %u=0 (usual Fat32) ->>>>>19 uleshort >0 \b, sectors %u (volumes <=32 MB) -#>>>>>19 uleshort =0 \b, sectors %u=0 (usual Fat32) ->>>>>21 ubyte >0xF0 \b, Media descriptor 0x%x -#>>>>>21 ubyte =0xF0 \b, Media descriptor 0x%x (usual floppy) ->>>>>21 ubyte <0xF0 \b, Media descriptor 0x%x ->>>>>22 uleshort >0 \b, sectors/FAT %u -#>>>>>22 uleshort =0 \b, sectors/FAT %u=0 (usual Fat32) ->>>>>26 ubyte >2 \b, heads %u -#>>>>>26 ubyte =2 \b, heads %u (usual floppy) ->>>>>26 ubyte =1 \b, heads %u +>>>>>>>8 string IHC \b cached by Windows 9M +>>>>>>11 uleshort >512 \b, Bytes/sector %u +#>>>>>>11 uleshort =512 \b, Bytes/sector %u=512 (usual) +>>>>>>11 uleshort <512 \b, Bytes/sector %u +>>>>>>13 ubyte >1 \b, sectors/cluster %u +#>>>>>>13 ubyte =1 \b, sectors/cluster %u (usual on Floppies) +>>>>>>14 uleshort >32 \b, reserved sectors %u +#>>>>>>14 uleshort =32 \b, reserved sectors %u (usual Fat32) +#>>>>>>14 uleshort >1 \b, reserved sectors %u +#>>>>>>14 uleshort =1 \b, reserved sectors %u (usual FAT12,FAT16) +>>>>>>14 uleshort <1 \b, reserved sectors %u +>>>>>>16 ubyte >2 \b, FATs %u +#>>>>>>16 ubyte =2 \b, FATs %u (usual) +>>>>>>16 ubyte =1 \b, FAT %u +>>>>>>16 ubyte >0 +>>>>>>17 uleshort >0 \b, root entries %u +#>>>>>>17 uleshort =0 \b, root entries %u=0 (usual Fat32) +>>>>>>19 uleshort >0 \b, sectors %u (volumes <=32 MB) +#>>>>>>19 uleshort =0 \b, sectors %u=0 (usual Fat32) +>>>>>>21 ubyte >0xF0 \b, Media descriptor 0x%x +#>>>>>>21 ubyte =0xF0 \b, Media descriptor 0x%x (usual floppy) +>>>>>>21 ubyte <0xF0 \b, Media descriptor 0x%x +>>>>>>22 uleshort >0 \b, sectors/FAT %u +#>>>>>>22 uleshort =0 \b, sectors/FAT %u=0 (usual Fat32) +>>>>>>26 ubyte >2 \b, heads %u +#>>>>>>26 ubyte =2 \b, heads %u (usual floppy) +>>>>>>26 ubyte =1 \b, heads %u #skip for Digital Research DOS (version 3.41) 1440 kB Bootdisk ->>>>>38 ubyte !0x70 ->>>>>>28 ulelong >0 \b, hidden sectors %u -#>>>>>>28 ulelong =0 \b, hidden sectors %u (usual floppy) ->>>>>>32 ulelong >0 \b, sectors %u (volumes > 32 MB) -#>>>>>>32 ulelong =0 \b, sectors %u (volumes > 32 MB) +>>>>>>38 ubyte !0x70 +>>>>>>>28 ulelong >0 \b, hidden sectors %u +#>>>>>>>28 ulelong =0 \b, hidden sectors %u (usual floppy) +>>>>>>>32 ulelong >0 \b, sectors %u (volumes > 32 MB) +#>>>>>>>32 ulelong =0 \b, sectors %u (volumes > 32 MB) # FAT<32 specific ->>>>>82 string !FAT32 -#>>>>>>36 ubyte 0x80 \b, physical drive 0x%x=0x80 (usual harddisk) -#>>>>>>36 ubyte 0 \b, physical drive 0x%x=0 (usual floppy) ->>>>>>36 ubyte !0x80 ->>>>>>>36 ubyte !0 \b, physical drive 0x%x ->>>>>>37 ubyte >0 \b, reserved 0x%x -#>>>>>>37 ubyte =0 \b, reserved 0x%x ->>>>>>38 ubyte >0x29 \b, dos < 4.0 BootSector (0x%x) ->>>>>>38 ubyte <0x29 \b, dos < 4.0 BootSector (0x%x) ->>>>>>38 ubyte =0x29 ->>>>>>>39 ulelong x \b, serial number 0x%x ->>>>>>>43 string >>>>>>43 string >NO\ NAME \b, label: "%11.11s" ->>>>>>>43 string =NO\ NAME \b, unlabeled ->>>>>>54 string FAT \b, FAT ->>>>>>>54 string FAT12 \b (12 bit) ->>>>>>>54 string FAT16 \b (16 bit) +>>>>>>82 string !FAT32 +#>>>>>>>36 ubyte 0x80 \b, physical drive 0x%x=0x80 (usual harddisk) +#>>>>>>>36 ubyte 0 \b, physical drive 0x%x=0 (usual floppy) +>>>>>>>36 ubyte !0x80 +>>>>>>>>36 ubyte !0 \b, physical drive 0x%x +>>>>>>>37 ubyte >0 \b, reserved 0x%x +#>>>>>>>37 ubyte =0 \b, reserved 0x%x +>>>>>>>38 ubyte >0x29 \b, dos < 4.0 BootSector (0x%x) +>>>>>>>38 ubyte <0x29 \b, dos < 4.0 BootSector (0x%x) +>>>>>>>38 ubyte =0x29 +>>>>>>>>39 ulelong x \b, serial number 0x%x +>>>>>>>>43 string >>>>>>>43 string >NO\ NAME \b, label: "%11.11s" +>>>>>>>>43 string =NO\ NAME \b, unlabeled +>>>>>>>54 string FAT \b, FAT +>>>>>>>>54 string FAT12 \b (12 bit) +>>>>>>>>54 string FAT16 \b (16 bit) # FAT32 specific ->>>>>82 string FAT32 \b, FAT (32 bit) ->>>>>>36 ulelong x \b, sectors/FAT %u ->>>>>>40 uleshort >0 \b, extension flags %u -#>>>>>>40 uleshort =0 \b, extension flags %u ->>>>>>42 uleshort >0 \b, fsVersion %u -#>>>>>>42 uleshort =0 \b, fsVersion %u (usual) ->>>>>>44 ulelong >2 \b, rootdir cluster %u -#>>>>>>44 ulelong =2 \b, rootdir cluster %u -#>>>>>>44 ulelong =1 \b, rootdir cluster %u ->>>>>>48 uleshort >1 \b, infoSector %u -#>>>>>>48 uleshort =1 \b, infoSector %u (usual) ->>>>>>48 uleshort <1 \b, infoSector %u ->>>>>>50 uleshort >6 \b, Backup boot sector %u -#>>>>>>50 uleshort =6 \b, Backup boot sector %u (usual) ->>>>>>50 uleshort <6 \b, Backup boot sector %u ->>>>>>54 ulelong >0 \b, reserved1 0x%x ->>>>>>58 ulelong >0 \b, reserved2 0x%x ->>>>>>62 ulelong >0 \b, reserved3 0x%x +>>>>>>82 string FAT32 \b, FAT (32 bit) +>>>>>>>36 ulelong x \b, sectors/FAT %u +>>>>>>>40 uleshort >0 \b, extension flags %u +#>>>>>>>40 uleshort =0 \b, extension flags %u +>>>>>>>42 uleshort >0 \b, fsVersion %u +#>>>>>>>42 uleshort =0 \b, fsVersion %u (usual) +>>>>>>>44 ulelong >2 \b, rootdir cluster %u +#>>>>>>>44 ulelong =2 \b, rootdir cluster %u +#>>>>>>>44 ulelong =1 \b, rootdir cluster %u +>>>>>>>48 uleshort >1 \b, infoSector %u +#>>>>>>>48 uleshort =1 \b, infoSector %u (usual) +>>>>>>>48 uleshort <1 \b, infoSector %u +>>>>>>>50 uleshort >6 \b, Backup boot sector %u +#>>>>>>>50 uleshort =6 \b, Backup boot sector %u (usual) +>>>>>>>50 uleshort <6 \b, Backup boot sector %u +>>>>>>>54 ulelong >0 \b, reserved1 0x%x +>>>>>>>58 ulelong >0 \b, reserved2 0x%x +>>>>>>>62 ulelong >0 \b, reserved3 0x%x # same structure as FAT1X ->>>>>>64 ubyte >0x80 \b, physical drive 0x%x -#>>>>>>64 ubyte =0x80 \b, physical drive 0x%x=80 (usual harddisk) ->>>>>>64 ubyte&0x7F >0 \b, physical drive 0x%x -#>>>>>>64 ubyte =0 \b, physical drive 0x%x=0 (usual floppy) ->>>>>>65 ubyte >0 \b, reserved 0x%x ->>>>>>66 ubyte >0x29 \b, dos < 4.0 BootSector (0x%x) ->>>>>>66 ubyte <0x29 \b, dos < 4.0 BootSector (0x%x) ->>>>>>66 ubyte =0x29 ->>>>>>>67 ulelong x \b, serial number 0x%x ->>>>>>>71 string >>>>>71 string >NO\ NAME \b, label: "%11.11s" ->>>>>>71 string =NO\ NAME \b, unlabeled +>>>>>>>64 ubyte >0x80 \b, physical drive 0x%x +#>>>>>>>64 ubyte =0x80 \b, physical drive 0x%x=80 (usual harddisk) +>>>>>>>64 ubyte&0x7F >0 \b, physical drive 0x%x +#>>>>>>>64 ubyte =0 \b, physical drive 0x%x=0 (usual floppy) +>>>>>>>65 ubyte >0 \b, reserved 0x%x +>>>>>>>66 ubyte >0x29 \b, dos < 4.0 BootSector (0x%x) +>>>>>>>66 ubyte <0x29 \b, dos < 4.0 BootSector (0x%x) +>>>>>>>66 ubyte =0x29 +>>>>>>>>67 ulelong x \b, serial number 0x%x +>>>>>>>>71 string >>>>>>71 string >NO\ NAME \b, label: "%11.11s" +>>>>>>>71 string =NO\ NAME \b, unlabeled ### FATs end >0x200 lelong 0x82564557 \b, BSD disklabel # FATX @@ -854,6 +904,13 @@ 0x18b string OS/2 OS/2 Boot Manager +# updated by Joerg Jenderek at Oct 2008!! +# http://syslinux.zytor.com/iso.php +0 ulelong 0x7c40eafa isolinux Loader +# http://syslinux.zytor.com/pxe.php +0 ulelong 0x007c05ea pxelinux Loader +0 ulelong 0x60669c66 pxelinux Loader + # added by Joerg Jenderek # In the second sector (+0x200) are variables according to grub-0.97/stage2/asm.S or # grub-1.94/kern/i386/pc/startup.S @@ -1324,6 +1381,14 @@ >0x10024 belong x (blocksize %d, >0x10060 string >\0 lockproto %s) +# BTRFS +0x10040 string _BHRfS_M BTRFS Filesystem +>0x1012b string >\0 (label "%s", +>0x10090 lelong x sectorsize %d, +>0x10094 lelong x nodesize %d, +>0x10098 lelong x leafsize %d) + + # dvdisaster's .ecc # From: "Nelson A. de Oliveira" 0 string *dvdisaster* dvdisaster error correction file Modified: head/contrib/file/Magdir/graphviz ============================================================================== --- head/contrib/file/Magdir/graphviz Mon May 4 00:19:00 2009 (r191770) +++ head/contrib/file/Magdir/graphviz Mon May 4 00:37:44 2009 (r191771) @@ -1,7 +1,10 @@ - #------------------------------------------------------------------------------ # graphviz: file(1) magic for http://www.graphviz.org/ -0 regex/100 [\r\n\t\ ]*graph[\r\n\t\ ]*.*\\{ graphviz graph text -!:mime text/vnd.graphviz -0 regex/100 [\r\n\t\ ]*digraph[\r\n\t\ ]*.*\\{ graphviz digraph text -!:mime text/vnd.graphviz + +# FIXME: These patterns match too generally. For example, the first +# line matches a LaTeX file containing the word "graph" (with a { +# following later) and the second line matches this file. +#0 regex/100 [\r\n\t\ ]*graph[\r\n\t\ ]+.*\\{ graphviz graph text +#!:mime text/vnd.graphviz +#0 regex/100 [\r\n\t\ ]*digraph[\r\n\t\ ]+.*\\{ graphviz digraph text +#!:mime text/vnd.graphviz Modified: head/contrib/file/Magdir/images ============================================================================== --- head/contrib/file/Magdir/images Mon May 4 00:19:00 2009 (r191770) +++ head/contrib/file/Magdir/images Mon May 4 00:37:44 2009 (r191771) @@ -110,6 +110,7 @@ # GIF 0 string GIF8 GIF image data !:mime image/gif +!:apple 8BIMGIFf >4 string 7a \b, version 8%s, >4 string 9a \b, version 8%s, >6 leshort >0 %hd x @@ -600,3 +601,7 @@ # Wavelet Scalar Quantization format used in gray-scale fingerprint images # From Tano M Fotang 0 string \xff\xa0\xff\xa8\x00 Wavelet Scalar Quantization image data + +# JPEG 2000 Code Stream Bitmap +# From Petr Splichal +0 string \xFF\x4F\xFF\x51\x00 JPEG-2000 Code Stream Bitmap data Modified: head/contrib/file/Magdir/jpeg ============================================================================== --- head/contrib/file/Magdir/jpeg Mon May 4 00:19:00 2009 (r191770) +++ head/contrib/file/Magdir/jpeg Mon May 4 00:37:44 2009 (r191771) @@ -10,6 +10,7 @@ # 0 beshort 0xffd8 JPEG image data !:mime image/jpeg +!:apple 8BIMJPEG !:strength +1 >6 string JFIF \b, JFIF standard # The following added by Erik Rossen 1999-09-06 Modified: head/contrib/file/Magdir/mach ============================================================================== --- head/contrib/file/Magdir/mach Mon May 4 00:19:00 2009 (r191770) +++ head/contrib/file/Magdir/mach Mon May 4 00:37:44 2009 (r191771) @@ -4,7 +4,7 @@ # Java ByteCode, so they are both handled in the file "cafebabe". # The "feedface" ones are handled herein. #------------------------------------------------------------ -0 lelong&0xfeffffff 0xfeedface Mach-O +0 lelong&0xfffffffe 0xfeedface Mach-O >0 byte 0xcf 64-bit >12 lelong 1 object >12 lelong 2 executable Modified: head/contrib/file/Magdir/macintosh ============================================================================== --- head/contrib/file/Magdir/macintosh Mon May 4 00:19:00 2009 (r191770) +++ head/contrib/file/Magdir/macintosh Mon May 4 00:37:44 2009 (r191771) @@ -11,6 +11,8 @@ # Stuffit archives are the de facto standard of compression for Macintosh # files obtained from most archives. (franklsm@tuns.ca) 0 string SIT! StuffIt Archive (data) +!:mime application/x-stuffit +!:apple SIT!SIT! >2 string x : %s 0 string SITD StuffIt Deluxe (data) >2 string x : %s @@ -20,6 +22,7 @@ # Newer StuffIt archives (grant@netbsd.org) 0 string StuffIt StuffIt Archive !:mime application/x-stuffit +!:apple SIT!SIT! #>162 string >0 : %s # Macintosh Applications and Installation binaries (franklsm@tuns.ca) Modified: head/contrib/file/Magdir/msdos ============================================================================== --- head/contrib/file/Magdir/msdos Mon May 4 00:19:00 2009 (r191770) +++ head/contrib/file/Magdir/msdos Mon May 4 00:37:44 2009 (r191771) @@ -4,15 +4,15 @@ # # .BAT files (Daniel Quinlan, quinlan@yggdrasil.com) -# updated by Joerg Jenderek +# updated by Joerg Jenderek at Oct 2008 0 string @ ->1 string/cB \ echo\ off MS-DOS batch file text +>1 string/cB \ echo\ off DOS batch file text !:mime text/x-msdos-batch ->1 string/cB echo\ off MS-DOS batch file text +>1 string/cB echo\ off DOS batch file text !:mime text/x-msdos-batch ->1 string/cB rem\ MS-DOS batch file text +>1 string/cB rem\ DOS batch file text !:mime text/x-msdos-batch ->1 string/cB set\ MS-DOS batch file text +>1 string/cB set\ DOS batch file text !:mime text/x-msdos-batch @@ -285,8 +285,9 @@ # Uncommenting only the first two lines will cover about 2/3 of COM files, # but it isn't feasible to match all COM files since there must be at least # two dozen different one-byte "magics". -#0 byte 0xe9 DOS executable (COM) -#>0x1FE leshort 0xAA55 \b, boot code +# test too generic ? +0 byte 0xe9 DOS executable (COM) +>0x1FE leshort 0xAA55 \b, boot code >6 string SFX\ of\ LHarc (%s) 0 belong 0xffffffff DOS executable (device driver) #CMD640X2.SYS @@ -309,25 +310,38 @@ >>77 string >\x40 >>>77 string <\x5B >>>>77 string x \b, name: %.8s -#0 byte 0x8c DOS executable (COM) -# 0xeb conflicts with "sequent" magic -#0 byte 0xeb DOS executable (COM) -#>0x1FE leshort 0xAA55 \b, boot code -#>85 string UPX \b, UPX compressed -#>4 string \ $ARX \b, ARX self-extracting archive -#>4 string \ $LHarc \b, LHarc self-extracting archive -#>0x20e string SFX\ by\ LARC \b, LARC self-extracting archive +# test too generic ? +0 byte 0x8c DOS executable (COM) +# updated by Joerg Jenderek at Oct 2008 +0 ulelong 0xffff10eb DR-DOS executable (COM) +# byte 0xeb conflicts with "sequent" magic leshort 0xn2eb +0 ubeshort&0xeb8d >0xeb00 +# DR-DOS STACKER.COM SCREATE.SYS missed +>0 byte 0xeb DOS executable (COM) +>>0x1FE leshort 0xAA55 \b, boot code +>>85 string UPX \b, UPX compressed +>>4 string \ $ARX \b, ARX self-extracting archive +>>4 string \ $LHarc \b, LHarc self-extracting archive +>>0x20e string SFX\ by\ LARC \b, LARC self-extracting archive +# updated by Joerg Jenderek at Oct 2008 #0 byte 0xb8 COM executable +0 uleshort&0x80ff 0x00b8 # modified by Joerg Jenderek ->1 lelong !0x21cd4cff for DOS +>1 lelong !0x21cd4cff COM executable for DOS # http://syslinux.zytor.com/comboot.php # (32-bit COMBOOT) programs *.C32 contain 32-bit code and run in flat-memory 32-bit protected mode # start with assembler instructions mov eax,21cd4cffh ->1 lelong 0x21cd4cff (32-bit COMBOOT) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon May 4 00:38:01 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B6FB10656BC; Mon, 4 May 2009 00:38:01 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 20C478FC08; Mon, 4 May 2009 00:38:01 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n440c1cu028709; Mon, 4 May 2009 00:38:01 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n440c1u4028708; Mon, 4 May 2009 00:38:01 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200905040038.n440c1u4028708@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 May 2009 00:38:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191772 - in vendor/file: 4.26 5.00 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 00:38:02 -0000 Author: obrien Date: Mon May 4 00:38:00 2009 New Revision: 191772 URL: http://svn.freebsd.org/changeset/base/191772 Log: "Tag" the file 4.26 and 5.00 vendor imports. Added: vendor/file/4.26/ - copied from r186690, vendor/file/dist/ vendor/file/5.00/ - copied from r191769, vendor/file/dist/ From owner-svn-src-all@FreeBSD.ORG Mon May 4 00:41:08 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E66A1065673; Mon, 4 May 2009 00:41:08 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CB038FC1B; Mon, 4 May 2009 00:41:08 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n440f8Zm028811; Mon, 4 May 2009 00:41:08 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n440f82f028810; Mon, 4 May 2009 00:41:08 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200905040041.n440f82f028810@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 May 2009 00:41:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191773 - vendor/file/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 00:41:09 -0000 Author: obrien Date: Mon May 4 00:41:07 2009 New Revision: 191773 URL: http://svn.freebsd.org/changeset/base/191773 Log: Update for 5.00. Modified: vendor/file/dist/FREEBSD-upgrade Modified: vendor/file/dist/FREEBSD-upgrade ============================================================================== --- vendor/file/dist/FREEBSD-upgrade Mon May 4 00:38:00 2009 (r191772) +++ vendor/file/dist/FREEBSD-upgrade Mon May 4 00:41:07 2009 (r191773) @@ -8,23 +8,24 @@ Imported by: mv magic/* . rmdir magic - mv -i src/* . + mv -n src/* . + mv src/Makefile.am Makefile.am-src rm -rf src - mv -i doc/* . + mv -n doc/* . rm -rf doc rm -rf python rm -f lt* rm -f missing depcomp rm -f config.{guess,sub} - cvs import -m "Virgin import of Christos Zoulas's FILE 4.21." \ - src/contrib/file ZOULAS file_4_21 + cvs import -m "Virgin import of Christos Zoulas's FILE 5.00." \ + src/contrib/file ZOULAS file_5_00 Never make local changes to ZOULAS `file'. Christos is very willing to work with us to meet our FreeBSD needs. Thus submit any desired changes to him and wait for the next release and vendor import to get them. - + obrien@NUXI.com -15-Sept-2002 +15-April-2009 From owner-svn-src-all@FreeBSD.ORG Mon May 4 00:42:15 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FF491065687; Mon, 4 May 2009 00:42:15 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 745BD8FC0A; Mon, 4 May 2009 00:42:15 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n440gFZZ028867; Mon, 4 May 2009 00:42:15 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n440gFgS028866; Mon, 4 May 2009 00:42:15 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200905040042.n440gFgS028866@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 May 2009 00:42:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191774 - head/contrib/file X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 00:42:16 -0000 Author: obrien Date: Mon May 4 00:42:15 2009 New Revision: 191774 URL: http://svn.freebsd.org/changeset/base/191774 Log: This belongs in //svn.freebsd.org/base/vendor/file/dist now. Deleted: head/contrib/file/FREEBSD-upgrade From owner-svn-src-all@FreeBSD.ORG Mon May 4 00:42:45 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4414010656C0; Mon, 4 May 2009 00:42:45 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 327308FC08; Mon, 4 May 2009 00:42:45 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n440gjSX028911; Mon, 4 May 2009 00:42:45 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n440gjZs028910; Mon, 4 May 2009 00:42:45 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200905040042.n440gjZs028910@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 May 2009 00:42:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191775 - vendor/file/5.00 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 00:42:45 -0000 Author: obrien Date: Mon May 4 00:42:44 2009 New Revision: 191775 URL: http://svn.freebsd.org/changeset/base/191775 Log: Update for 5.00. Modified: vendor/file/5.00/FREEBSD-upgrade Modified: vendor/file/5.00/FREEBSD-upgrade ============================================================================== --- vendor/file/5.00/FREEBSD-upgrade Mon May 4 00:42:15 2009 (r191774) +++ vendor/file/5.00/FREEBSD-upgrade Mon May 4 00:42:44 2009 (r191775) @@ -8,23 +8,24 @@ Imported by: mv magic/* . rmdir magic - mv -i src/* . + mv -n src/* . + mv src/Makefile.am Makefile.am-src rm -rf src - mv -i doc/* . + mv -n doc/* . rm -rf doc rm -rf python rm -f lt* rm -f missing depcomp rm -f config.{guess,sub} - cvs import -m "Virgin import of Christos Zoulas's FILE 4.21." \ - src/contrib/file ZOULAS file_4_21 + cvs import -m "Virgin import of Christos Zoulas's FILE 5.00." \ + src/contrib/file ZOULAS file_5_00 Never make local changes to ZOULAS `file'. Christos is very willing to work with us to meet our FreeBSD needs. Thus submit any desired changes to him and wait for the next release and vendor import to get them. - + obrien@NUXI.com -15-Sept-2002 +15-April-2009 From owner-svn-src-all@FreeBSD.ORG Mon May 4 02:06:39 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA3DF106566B; Mon, 4 May 2009 02:06:39 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 98AF98FC1E; Mon, 4 May 2009 02:06:39 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4426dsF030643; Mon, 4 May 2009 02:06:39 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4426dvQ030642; Mon, 4 May 2009 02:06:39 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200905040206.n4426dvQ030642@svn.freebsd.org> From: Robert Watson Date: Mon, 4 May 2009 02:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191776 - head/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 02:06:40 -0000 Author: rwatson Date: Mon May 4 02:06:39 2009 New Revision: 191776 URL: http://svn.freebsd.org/changeset/base/191776 Log: Fix typo in comment. MFC after: 1 month Modified: head/sys/nfsclient/nfs_kdtrace.c Modified: head/sys/nfsclient/nfs_kdtrace.c ============================================================================== --- head/sys/nfsclient/nfs_kdtrace.c Mon May 4 00:42:44 2009 (r191775) +++ head/sys/nfsclient/nfs_kdtrace.c Mon May 4 02:06:39 2009 (r191776) @@ -71,7 +71,7 @@ static dtrace_pattr_t dtnfsclient_attr = }; /* - * Descrition of NFSv3 and (optional) NFSv2 probes for a procedure. + * Description of NFSv3 and (optional) NFSv2 probes for a procedure. */ struct dtnfsclient_rpc { char *nr_v3_name; From owner-svn-src-all@FreeBSD.ORG Mon May 4 02:19:52 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A55F5106564A; Mon, 4 May 2009 02:19:52 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 93C118FC08; Mon, 4 May 2009 02:19:52 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n442JqqF030904; Mon, 4 May 2009 02:19:52 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n442Jq3V030903; Mon, 4 May 2009 02:19:52 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200905040219.n442Jq3V030903@svn.freebsd.org> From: Robert Watson Date: Mon, 4 May 2009 02:19:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191777 - head/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 02:19:53 -0000 Author: rwatson Date: Mon May 4 02:19:52 2009 New Revision: 191777 URL: http://svn.freebsd.org/changeset/base/191777 Log: Remove redundant NFSMNT_NFSV3 check in DTrace hooks for NFS RPC. MFC after: 1 month Modified: head/sys/nfsclient/nfs_krpc.c Modified: head/sys/nfsclient/nfs_krpc.c ============================================================================== --- head/sys/nfsclient/nfs_krpc.c Mon May 4 02:06:39 2009 (r191776) +++ head/sys/nfsclient/nfs_krpc.c Mon May 4 02:19:52 2009 (r191777) @@ -498,8 +498,7 @@ nfs_request(struct vnode *vp, struct mbu probe_procnum = procnum; } else { probe_id = nfsclient_nfs2_start_probes[procnum]; - probe_procnum = (nmp->nm_flag & NFSMNT_NFSV3) ? - procnum : nfsv2_procid[procnum]; + probe_procnum = nfsv2_procid[procnum]; } if (probe_id != 0) (dtrace_nfsclient_nfs23_start_probe)(probe_id, vp, From owner-svn-src-all@FreeBSD.ORG Mon May 4 06:30:00 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA2CD1065670; Mon, 4 May 2009 06:30:00 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D7AEB8FC19; Mon, 4 May 2009 06:30:00 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n446U09H036056; Mon, 4 May 2009 06:30:00 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n446U0qg036055; Mon, 4 May 2009 06:30:00 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200905040630.n446U0qg036055@svn.freebsd.org> From: Alan Cox Date: Mon, 4 May 2009 06:30:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191778 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 06:30:01 -0000 Author: alc Date: Mon May 4 06:30:00 2009 New Revision: 191778 URL: http://svn.freebsd.org/changeset/base/191778 Log: Eliminate vnode_pager_input_smlfs()'s pointless call to pmap_clear_modify(). The page can't possibly have any modified page table entries because it isn't even mapped. Modified: head/sys/vm/vnode_pager.c Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Mon May 4 02:19:52 2009 (r191777) +++ head/sys/vm/vnode_pager.c Mon May 4 06:30:00 2009 (r191778) @@ -559,9 +559,6 @@ vnode_pager_input_smlfs(object, m) } } sf_buf_free(sf); - vm_page_lock_queues(); - pmap_clear_modify(m); - vm_page_unlock_queues(); if (error) { return VM_PAGER_ERROR; } From owner-svn-src-all@FreeBSD.ORG Mon May 4 08:06:53 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 727EF106564A; Mon, 4 May 2009 08:06:53 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 474018FC12; Mon, 4 May 2009 08:06:53 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4486rQf037989; Mon, 4 May 2009 08:06:53 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4486rec037988; Mon, 4 May 2009 08:06:53 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200905040806.n4486rec037988@svn.freebsd.org> From: Ed Schouten Date: Mon, 4 May 2009 08:06:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191779 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 08:06:53 -0000 Author: ed Date: Mon May 4 08:06:52 2009 New Revision: 191779 URL: http://svn.freebsd.org/changeset/base/191779 Log: Fix whitespace and sorting in Symbol.map. Modified: head/lib/libc/gen/Symbol.map Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Mon May 4 06:30:00 2009 (r191778) +++ head/lib/libc/gen/Symbol.map Mon May 4 08:06:52 2009 (r191779) @@ -333,36 +333,36 @@ FBSD_1.1 { fdevname_r; fdopendir; feature_present; - fts_open; - fts_close; - fts_read; - fts_set; fts_children; + fts_close; fts_get_clientptr; fts_get_stream; + fts_open; + fts_read; + fts_set; fts_set_clientptr; + posix_spawn; + posix_spawn_file_actions_addclose; + posix_spawn_file_actions_adddup2; + posix_spawn_file_actions_addopen; + posix_spawn_file_actions_destroy; + posix_spawn_file_actions_init; + posix_spawnattr_destroy; + posix_spawnattr_getflags; + posix_spawnattr_getpgroup; + posix_spawnattr_getschedparam; + posix_spawnattr_getschedpolicy; + posix_spawnattr_getsigdefault; + posix_spawnattr_getsigmask; + posix_spawnattr_init; + posix_spawnattr_setflags; + posix_spawnattr_setpgroup; + posix_spawnattr_setschedparam; + posix_spawnattr_setschedpolicy; + posix_spawnattr_setsigdefault; + posix_spawnattr_setsigmask; + posix_spawnp; tcgetsid; - posix_spawn; - posix_spawn_file_actions_addclose; - posix_spawn_file_actions_adddup2; - posix_spawn_file_actions_addopen; - posix_spawn_file_actions_destroy; - posix_spawn_file_actions_init; - posix_spawnattr_destroy; - posix_spawnattr_getflags; - posix_spawnattr_getpgroup; - posix_spawnattr_getschedparam; - posix_spawnattr_getschedpolicy; - posix_spawnattr_getsigdefault; - posix_spawnattr_getsigmask; - posix_spawnattr_init; - posix_spawnattr_setflags; - posix_spawnattr_setpgroup; - posix_spawnattr_setschedparam; - posix_spawnattr_setschedpolicy; - posix_spawnattr_setsigdefault; - posix_spawnattr_setsigmask; - posix_spawnp; }; FBSDprivate_1.0 { From owner-svn-src-all@FreeBSD.ORG Mon May 4 08:36:48 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0552F1065677; Mon, 4 May 2009 08:36:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E87BA8FC29; Mon, 4 May 2009 08:36:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n448alLV038684; Mon, 4 May 2009 08:36:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n448alNp038683; Mon, 4 May 2009 08:36:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200905040836.n448alNp038683@svn.freebsd.org> From: Alexander Motin Date: Mon, 4 May 2009 08:36:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191780 - head/sys/i386/bios X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 08:36:48 -0000 Author: mav Date: Mon May 4 08:36:47 2009 New Revision: 191780 URL: http://svn.freebsd.org/changeset/base/191780 Log: There is no atrtc driver in pc98, so hide atrtcclock_disable variable usage in APM driver for this platform. This should fix pc98 build. Modified: head/sys/i386/bios/apm.c Modified: head/sys/i386/bios/apm.c ============================================================================== --- head/sys/i386/bios/apm.c Mon May 4 08:06:52 2009 (r191779) +++ head/sys/i386/bios/apm.c Mon May 4 08:36:47 2009 (r191780) @@ -1155,8 +1155,10 @@ apm_attach(device_t dev) mtx_init(&sc->mtx, device_get_nameunit(dev), "apm", MTX_DEF); cv_init(&sc->cv, "cbb cv"); +#ifdef PC98 if (device_get_flags(dev) & 0x20) atrtcclock_disable = 1; +#endif sc->initialized = 0; From owner-svn-src-all@FreeBSD.ORG Mon May 4 08:41:54 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C3561065673; Mon, 4 May 2009 08:41:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B3148FC15; Mon, 4 May 2009 08:41:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n448fsSj038815; Mon, 4 May 2009 08:41:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n448fsf2038814; Mon, 4 May 2009 08:41:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200905040841.n448fsf2038814@svn.freebsd.org> From: Alexander Motin Date: Mon, 4 May 2009 08:41:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191781 - head/sys/i386/bios X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 08:41:54 -0000 Author: mav Date: Mon May 4 08:41:54 2009 New Revision: 191781 URL: http://svn.freebsd.org/changeset/base/191781 Log: Oops, sorry. Fix for fix. Modified: head/sys/i386/bios/apm.c Modified: head/sys/i386/bios/apm.c ============================================================================== --- head/sys/i386/bios/apm.c Mon May 4 08:36:47 2009 (r191780) +++ head/sys/i386/bios/apm.c Mon May 4 08:41:54 2009 (r191781) @@ -1155,7 +1155,7 @@ apm_attach(device_t dev) mtx_init(&sc->mtx, device_get_nameunit(dev), "apm", MTX_DEF); cv_init(&sc->cv, "cbb cv"); -#ifdef PC98 +#ifndef PC98 if (device_get_flags(dev) & 0x20) atrtcclock_disable = 1; #endif From owner-svn-src-all@FreeBSD.ORG Mon May 4 10:15:34 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F87C106566B; Mon, 4 May 2009 10:15:34 +0000 (UTC) (envelope-from rink@rink.nu) Received: from mx1.rink.nu (gloom.rink.nu [213.34.49.2]) by mx1.freebsd.org (Postfix) with ESMTP id 5D9708FC17; Mon, 4 May 2009 10:15:34 +0000 (UTC) (envelope-from rink@rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx1.rink.nu (Postfix) with ESMTP id 337806D43C; Mon, 4 May 2009 11:58:10 +0200 (CEST) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([213.34.49.2]) by localhost (gloom.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EV4XX790Pxf9; Mon, 4 May 2009 11:58:06 +0200 (CEST) Received: by mx1.rink.nu (Postfix, from userid 1000) id A5D7B6D43B; Mon, 4 May 2009 11:58:06 +0200 (CEST) Date: Mon, 4 May 2009 11:58:06 +0200 From: Rink Springer To: Kostik Belousov Message-ID: <20090504095806.GD78380@rink.nu> References: <200905031751.n43HpcGV020175@svn.freebsd.org> <20090503175506.GM17826@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090503175506.GM17826@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r191767 - in stable/7/lib/libc: . stdlib string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 10:15:35 -0000 On Sun, May 03, 2009 at 08:55:06PM +0300, Kostik Belousov wrote: > On Sun, May 03, 2009 at 05:51:38PM +0000, Konstantin Belousov wrote: > > Author: kib > > Date: Sun May 3 17:51:38 2009 > > New Revision: 191767 > > URL: http://svn.freebsd.org/changeset/base/191767 > > > > Log: > > MFC r185514 (by jasone): > > Fix a lock order reversal bug that could cause deadlock during fork(2). > > > > Reported and tested by: makc > > Approved by: re (kensmith) > > It was diagnosed and tested after the 7.2 release passed the point of > no return. We expect to issue errata notice after the patch settles > in stable/7 shortly. Is this the same malloc/fork deadlock bug bug I reported about 6 months ago? -- Rink P.W. Springer - http://rink.nu "Talk to me." - Horatio Caine From owner-svn-src-all@FreeBSD.ORG Mon May 4 11:11:12 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49B0510656B6; Mon, 4 May 2009 11:11:12 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D3928FC0A; Mon, 4 May 2009 11:11:12 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n44BBC9J043761; Mon, 4 May 2009 11:11:12 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n44BBCts043760; Mon, 4 May 2009 11:11:12 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200905041111.n44BBCts043760@svn.freebsd.org> From: Ed Schouten Date: Mon, 4 May 2009 11:11:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191782 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 11:11:19 -0000 Author: ed Date: Mon May 4 11:11:10 2009 New Revision: 191782 URL: http://svn.freebsd.org/changeset/base/191782 Log: Remove unneeded check for SESS_LEADER(). We perform the same check ~10 lines above. Modified: head/sys/kern/tty.c Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Mon May 4 08:41:54 2009 (r191781) +++ head/sys/kern/tty.c Mon May 4 11:11:10 2009 (r191782) @@ -1473,7 +1473,7 @@ tty_generic_ioctl(struct tty *tp, u_long return (0); } - if (!SESS_LEADER(p) || p->p_session->s_ttyvp != NULL || + if (p->p_session->s_ttyvp != NULL || (tp->t_session != NULL && tp->t_session->s_ttyvp != NULL)) { /* * There is already a relation between a TTY and From owner-svn-src-all@FreeBSD.ORG Mon May 4 11:35:39 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 120581065670; Mon, 4 May 2009 11:35:39 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 9E9F78FC14; Mon, 4 May 2009 11:35:38 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (pD9E2E4BE.dip.t-dialin.net [217.226.228.190]) by redbull.bpaserver.net (Postfix) with ESMTP id C258F2E0AD; Mon, 4 May 2009 13:35:32 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 6983A22C5DB; Mon, 4 May 2009 13:35:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1241436928; bh=RPqiMOFFRJIyT3/hn631UZIbM3+daGXr1 DvaP8d/D3A=; h=Message-ID:Date:From:To:Cc:Subject:References: In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=zTgmC2a/vnPPC6hvi1AnblDsT8Wq8ka+H5M7p2jQOsg8KBH8Xvtit58Kbxdp+GHy2 Gr121x++r5sL0E69eLBplqxKYWWseMOK6/2rvttbXDDVOcLRLYF7zDvce1L+ABpGTD4 Y6LCOmfJBn7FZ2Sqjt8YMzY7U4V48sCb7dmlgBwrkwvTTXaN54zTYkjCokFx+FZOqOP gnstmg6k58jsjs3Sapowv4nkzBvz8nuhHzObOSZiKlLQYrNn3/WtrnLMZL3iBpeqF0S dfuBsBPq2WwMe51uxx+OECrcGkntSoB/IgeK7AGVRG+3CxllYbDNTIRR5AKkl+Otfm1 mIISVcnZg== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id n44BZRfV042695; Mon, 4 May 2009 13:35:27 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Mon, 04 May 2009 13:35:27 +0200 Message-ID: <20090504133527.43351tf1iwwi5sro@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Mon, 04 May 2009 13:35:27 +0200 From: Alexander Leidinger To: Robert Watson References: <200905040219.n442Jq3V030903@svn.freebsd.org> In-Reply-To: <200905040219.n442Jq3V030903@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) 4.3.3 / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: C258F2E0AD.BCD1B X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-14.746, required 6, BAYES_00 -15.00, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, RDNS_DYNAMIC 0.10, TW_SV 0.08, TW_TN 0.08) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r191777 - head/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 11:35:39 -0000 Quoting Robert Watson (from Mon, 4 May 2009 02:19:52 +0000 (UTC)): > Author: rwatson > Date: Mon May 4 02:19:52 2009 > New Revision: 191777 > URL: http://svn.freebsd.org/changeset/base/191777 > > Log: > Remove redundant NFSMNT_NFSV3 check in DTrace hooks for NFS RPC. BTW: I tried to load dtrace via modules after your nfs-dtrace commit, and it failed. I tried with ---snip--- dtrace_load="YES" dtnfsclient_load="YES" dtraceall_load="YES" ---snip--- and it moaned about some missing symbols. I also tried to not load the dtnfsclient module, but AFAIK it tries to load the dtnfsclient module as a dependency. I don't have NFS in the kernel or load it via modules there. Have you tried loading dtrace as modules? It seems there's something missing, either docs to tell what is necessary, or module dependencies or whatever. Bye, Alexander. -- A woman can look both moral and exciting -- if she also looks as if it were quite a struggle. -- Edna Ferber http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-svn-src-all@FreeBSD.ORG Mon May 4 11:39:02 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FE891065670; Mon, 4 May 2009 11:39:02 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 2B4818FC21; Mon, 4 May 2009 11:39:01 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1M0wVf-000COW-Ti; Mon, 04 May 2009 14:39:00 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n44Bcpo4021071 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 4 May 2009 14:38:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n44Bcpet058367; Mon, 4 May 2009 14:38:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n44Bcpa8058362; Mon, 4 May 2009 14:38:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 4 May 2009 14:38:51 +0300 From: Kostik Belousov To: Rink Springer Message-ID: <20090504113851.GA1948@deviant.kiev.zoral.com.ua> References: <200905031751.n43HpcGV020175@svn.freebsd.org> <20090503175506.GM17826@deviant.kiev.zoral.com.ua> <20090504095806.GD78380@rink.nu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OgqxwSJOaUobr8KG" Content-Disposition: inline In-Reply-To: <20090504095806.GD78380@rink.nu> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1M0wVf-000COW-Ti dcdf07f5b9e53ae2adacb8e0463b0def X-Terabit: YES Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r191767 - in stable/7/lib/libc: . stdlib string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 11:39:03 -0000 --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 04, 2009 at 11:58:06AM +0200, Rink Springer wrote: > On Sun, May 03, 2009 at 08:55:06PM +0300, Kostik Belousov wrote: > > On Sun, May 03, 2009 at 05:51:38PM +0000, Konstantin Belousov wrote: > > > Author: kib > > > Date: Sun May 3 17:51:38 2009 > > > New Revision: 191767 > > > URL: http://svn.freebsd.org/changeset/base/191767 > > >=20 > > > Log: > > > MFC r185514 (by jasone): > > > Fix a lock order reversal bug that could cause deadlock during fork= (2). > > > =20 > > > Reported and tested by: makc > > > Approved by: re (kensmith) > >=20 > > It was diagnosed and tested after the 7.2 release passed the point of > > no return. We expect to issue errata notice after the patch settles > > in stable/7 shortly. >=20 > Is this the same malloc/fork deadlock bug bug I reported about 6 months > ago? This was one of the bugs that was fixed after the investigation of your issues. --OgqxwSJOaUobr8KG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkn+08oACgkQC3+MBN1Mb4gFmACfV7nFJ2Scte30XTsCQdy7szxO YPUAoIt7k0JvvkkLVt2bCOsweaDKVoMY =rlVV -----END PGP SIGNATURE----- --OgqxwSJOaUobr8KG-- From owner-svn-src-all@FreeBSD.ORG Mon May 4 11:58:23 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79E041065674; Mon, 4 May 2009 11:58:23 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 53DCD8FC16; Mon, 4 May 2009 11:58:23 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 0FE3F46B17; Mon, 4 May 2009 07:58:23 -0400 (EDT) Date: Mon, 4 May 2009 12:58:22 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Leidinger In-Reply-To: <20090504133527.43351tf1iwwi5sro@webmail.leidinger.net> Message-ID: References: <200905040219.n442Jq3V030903@svn.freebsd.org> <20090504133527.43351tf1iwwi5sro@webmail.leidinger.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r191777 - head/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 11:58:24 -0000 On Mon, 4 May 2009, Alexander Leidinger wrote: >> Log: >> Remove redundant NFSMNT_NFSV3 check in DTrace hooks for NFS RPC. > > BTW: I tried to load dtrace via modules after your nfs-dtrace commit, and it > failed. I tried with Could you: (1) Confirm that you have options KDTRACE_HOOKS in your kernel (2) Try using just dtraceall_load Robert N M Watson Computer Laboratory University of Cambridge > ---snip--- > dtrace_load="YES" > dtnfsclient_load="YES" > dtraceall_load="YES" > ---snip--- > and it moaned about some missing symbols. I also tried to not load the > dtnfsclient module, but AFAIK it tries to load the dtnfsclient module as a > dependency. I don't have NFS in the kernel or load it via modules there. > > Have you tried loading dtrace as modules? It seems there's something missing, > either docs to tell what is necessary, or module dependencies or whatever. > > Bye, > Alexander. > > -- > A woman can look both moral and exciting -- if she also looks as if it > were quite a struggle. > -- Edna Ferber > > http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 > http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-svn-src-all@FreeBSD.ORG Mon May 4 12:22:42 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18770106566C; Mon, 4 May 2009 12:22:42 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id B54E08FC13; Mon, 4 May 2009 12:22:41 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (pD9E2E4BE.dip.t-dialin.net [217.226.228.190]) by redbull.bpaserver.net (Postfix) with ESMTP id BFEE62E0E2; Mon, 4 May 2009 14:22:33 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 7C18222CE11; Mon, 4 May 2009 14:22:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1241439748; bh=aZHOir8e9D0F7WPyti3cYBXabWlTMp5z7 X7iH/OJt6g=; h=Message-ID:Date:From:To:Cc:Subject:References: In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=i+G97w0Jfsr90eXcahuLVs9DmjRuYTyvTy0ihG3weHiVS6RHKbFJ2jWf+Su94rH2O rOtAK5jq2HWiKBzE1N22yEpS6YKdXMCoaUlV5wamRMa6IYrzFhpzDIR60u6i5csguPM y/+y96Mz3H/GPZGwPejHWU9kzm0nVXnVRfJxt0ywuifqwPIl+CO676G7CVj8iycLXex 1o75UKctCNhJNac0tr9zLHLwD1gJV7H7zFV2g9G32ndm3F8OOxf5veh95p+JTirR0D7 SGr/xcT8JbllZelGwBHWzZJJ6hef9Xo+cEJp8ci3o7kFC2+mYb6JLNvOLtGx9drbJ1K h5XATjXxw== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id n44CMRjD051954; Mon, 4 May 2009 14:22:27 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Mon, 04 May 2009 14:22:27 +0200 Message-ID: <20090504142227.11823qbind1lyyuc@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Mon, 04 May 2009 14:22:27 +0200 From: Alexander Leidinger To: Robert Watson References: <200905040219.n442Jq3V030903@svn.freebsd.org> <20090504133527.43351tf1iwwi5sro@webmail.leidinger.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) 4.3.3 / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: BFEE62E0E2.BAA18 X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-14.746, required 6, BAYES_00 -15.00, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, RDNS_DYNAMIC 0.10, TW_SV 0.08, TW_TN 0.08) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r191777 - head/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 12:22:42 -0000 Quoting Robert Watson (from Mon, 4 May 2009 12:58:22 +0100 (BST)): > > On Mon, 4 May 2009, Alexander Leidinger wrote: > >>> Log: >>> Remove redundant NFSMNT_NFSV3 check in DTrace hooks for NFS RPC. >> >> BTW: I tried to load dtrace via modules after your nfs-dtrace >> commit, and it failed. I tried with > > Could you: > > (1) Confirm that you have options KDTRACE_HOOKS in your kernel # grep -i dtrace /usr/src/sys/i386/conf/M87 options KDTRACE_HOOKS # dtrace support > (2) Try using just dtraceall_load This is what I had initially. Just when I've seen the error messages about missing symbols, I added the dtnfsclient_load. Maybe there's a module dependency in dtraceall on dtnfsclient? Bye, Alexander. > Robert N M Watson > Computer Laboratory > University of Cambridge > >> ---snip--- >> dtrace_load="YES" >> dtnfsclient_load="YES" >> dtraceall_load="YES" >> ---snip--- >> and it moaned about some missing symbols. I also tried to not load >> the dtnfsclient module, but AFAIK it tries to load the dtnfsclient >> module as a dependency. I don't have NFS in the kernel or load it >> via modules there. >> >> Have you tried loading dtrace as modules? It seems there's >> something missing, either docs to tell what is necessary, or module >> dependencies or whatever. >> >> Bye, >> Alexander. >> >> -- >> A woman can look both moral and exciting -- if she also looks as if it >> were quite a struggle. >> -- Edna Ferber >> >> http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 >> http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 > > -- The seven year itch comes from fooling around during the fourth, fifth, and sixth years. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-svn-src-all@FreeBSD.ORG Mon May 4 13:50:54 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2CF2106566C; Mon, 4 May 2009 13:50:54 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 9A7988FC12; Mon, 4 May 2009 13:50:54 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 3CBFA46BA4; Mon, 4 May 2009 09:50:54 -0400 (EDT) Date: Mon, 4 May 2009 14:50:54 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Leidinger In-Reply-To: <20090504142227.11823qbind1lyyuc@webmail.leidinger.net> Message-ID: References: <200905040219.n442Jq3V030903@svn.freebsd.org> <20090504133527.43351tf1iwwi5sro@webmail.leidinger.net> <20090504142227.11823qbind1lyyuc@webmail.leidinger.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r191777 - head/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 13:50:55 -0000 On Mon, 4 May 2009, Alexander Leidinger wrote: > Quoting Robert Watson (from Mon, 4 May 2009 12:58:22 > +0100 (BST)): > >> On Mon, 4 May 2009, Alexander Leidinger wrote: >> >>>> Log: Remove redundant NFSMNT_NFSV3 check in DTrace hooks for NFS RPC. >>> >>> BTW: I tried to load dtrace via modules after your nfs-dtrace commit, and >>> it failed. I tried with >> >> Could you: >> >> (1) Confirm that you have options KDTRACE_HOOKS in your kernel > > # grep -i dtrace /usr/src/sys/i386/conf/M87 > options KDTRACE_HOOKS # dtrace support > >> (2) Try using just dtraceall_load > > This is what I had initially. Just when I've seen the error messages about > missing symbols, I added the dtnfsclient_load. Maybe there's a module > dependency in dtraceall on dtnfsclient? Well, 'dtraceall' claims dependency on all the provider modules, so results in everything being loaded including dtnfsclient. In theory, dtnfsclient and other providers should contain the necessary module dependencies to cause them to load everything they depend on, but I also have the feeling I've run into the problem you're seeing. Could you provide the symbol missing errors from the console? It should be fairly easy to track down the missing graph edge using that. Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-all@FreeBSD.ORG Mon May 4 15:23:59 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 277E3106564A; Mon, 4 May 2009 15:23:59 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 136CD8FC17; Mon, 4 May 2009 15:23:59 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n44FNxFi048797; Mon, 4 May 2009 15:23:59 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n44FNxdS048794; Mon, 4 May 2009 15:23:59 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <200905041523.n44FNxdS048794@svn.freebsd.org> From: Rick Macklem Date: Mon, 4 May 2009 15:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191783 - in head/sys/fs: nfs nfsclient nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 15:24:00 -0000 Author: rmacklem Date: Mon May 4 15:23:58 2009 New Revision: 191783 URL: http://svn.freebsd.org/changeset/base/191783 Log: Add the experimental nfs subtree to the kernel, that includes support for NFSv4 as well as NFSv2 and 3. It lives in 3 subdirs under sys/fs: nfs - functions that are common to the client and server nfsclient - a mutation of sys/nfsclient that call generic functions to do RPCs and handle state. As such, it retains the buffer cache handling characteristics and vnode semantics that are found in sys/nfsclient, for the most part. nfsserver - the server. It includes a DRC designed specifically for NFSv4, that is used instead of the generic DRC in sys/rpc. The build glue will be checked in later, so at this point, it consists of 3 new subdirs that should not affect kernel building. Approved by: kib (mentor) Added: head/sys/fs/nfs/ head/sys/fs/nfs/nfs.h (contents, props changed) head/sys/fs/nfs/nfs_commonacl.c (contents, props changed) head/sys/fs/nfs/nfs_commonkrpc.c (contents, props changed) head/sys/fs/nfs/nfs_commonport.c (contents, props changed) head/sys/fs/nfs/nfs_commonsubs.c (contents, props changed) head/sys/fs/nfs/nfs_var.h (contents, props changed) head/sys/fs/nfs/nfscl.h (contents, props changed) head/sys/fs/nfs/nfsclstate.h (contents, props changed) head/sys/fs/nfs/nfsdport.h (contents, props changed) head/sys/fs/nfs/nfskpiport.h (contents, props changed) head/sys/fs/nfs/nfsm_subs.h (contents, props changed) head/sys/fs/nfs/nfsport.h (contents, props changed) head/sys/fs/nfs/nfsproto.h (contents, props changed) head/sys/fs/nfs/nfsrvcache.h (contents, props changed) head/sys/fs/nfs/nfsrvstate.h (contents, props changed) head/sys/fs/nfs/nfsv4_errstr.h (contents, props changed) head/sys/fs/nfs/rpcv2.h (contents, props changed) head/sys/fs/nfs/xdr_subs.h (contents, props changed) head/sys/fs/nfsclient/ head/sys/fs/nfsclient/nfs.h (contents, props changed) head/sys/fs/nfsclient/nfs_clbio.c (contents, props changed) head/sys/fs/nfsclient/nfs_clcomsubs.c (contents, props changed) head/sys/fs/nfsclient/nfs_clkrpc.c (contents, props changed) head/sys/fs/nfsclient/nfs_cllock.c (contents, props changed) head/sys/fs/nfsclient/nfs_clnfsiod.c (contents, props changed) head/sys/fs/nfsclient/nfs_clnode.c (contents, props changed) head/sys/fs/nfsclient/nfs_clport.c (contents, props changed) head/sys/fs/nfsclient/nfs_clrpcops.c (contents, props changed) head/sys/fs/nfsclient/nfs_clstate.c (contents, props changed) head/sys/fs/nfsclient/nfs_clsubs.c (contents, props changed) head/sys/fs/nfsclient/nfs_clvfsops.c (contents, props changed) head/sys/fs/nfsclient/nfs_clvnops.c (contents, props changed) head/sys/fs/nfsclient/nfs_lock.h (contents, props changed) head/sys/fs/nfsclient/nfsargs.h (contents, props changed) head/sys/fs/nfsclient/nfsdiskless.h (contents, props changed) head/sys/fs/nfsclient/nfsmount.h (contents, props changed) head/sys/fs/nfsclient/nfsnode.h (contents, props changed) head/sys/fs/nfsclient/nlminfo.h (contents, props changed) head/sys/fs/nfsserver/ head/sys/fs/nfsserver/nfs_nfsdcache.c (contents, props changed) head/sys/fs/nfsserver/nfs_nfsdkrpc.c (contents, props changed) head/sys/fs/nfsserver/nfs_nfsdport.c (contents, props changed) head/sys/fs/nfsserver/nfs_nfsdserv.c (contents, props changed) head/sys/fs/nfsserver/nfs_nfsdsocket.c (contents, props changed) head/sys/fs/nfsserver/nfs_nfsdstate.c (contents, props changed) head/sys/fs/nfsserver/nfs_nfsdsubs.c (contents, props changed) Added: head/sys/fs/nfs/nfs.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/fs/nfs/nfs.h Mon May 4 15:23:58 2009 (r191783) @@ -0,0 +1,704 @@ +/*- + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Rick Macklem at The University of Guelph. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _NFS_NFS_H_ +#define _NFS_NFS_H_ +/* + * Tunable constants for nfs + */ + +#define NFS_MAXIOVEC 34 +#define NFS_TICKINTVL 10 /* Desired time for a tick (msec) */ +#define NFS_HZ (hz / nfscl_ticks) /* Ticks/sec */ +#define NFS_TIMEO (1 * NFS_HZ) /* Default timeout = 1 second */ +#define NFS_MINTIMEO (1 * NFS_HZ) /* Min timeout to use */ +#define NFS_MAXTIMEO (60 * NFS_HZ) /* Max timeout to backoff to */ +#define NFS_TCPTIMEO 300 /* TCP timeout */ +#define NFS_MAXRCVTIMEO 60 /* 1 minute in seconds */ +#define NFS_MINIDEMTIMEO (5 * NFS_HZ) /* Min timeout for non-idempotent ops*/ +#define NFS_MAXREXMIT 100 /* Stop counting after this many */ +#define NFSV4_CALLBACKTIMEO (2 * NFS_HZ) /* Timeout in ticks */ +#define NFSV4_CALLBACKRETRY 5 /* Number of retries before failure */ +#define NFSV4_CBRETRYCNT 4 /* # of CBRecall retries upon err */ +#define NFSV4_UPCALLTIMEO (15 * NFS_HZ) /* Timeout in ticks for upcalls */ + /* to gssd or nfsuserd */ +#define NFSV4_UPCALLRETRY 4 /* Number of retries before failure */ +#define NFS_MAXWINDOW 1024 /* Max number of outstanding requests */ +#define NFS_RETRANS 10 /* Num of retrans for soft mounts */ +#define NFS_MAXGRPS 16 /* Max. size of groups list */ +#define NFS_TRYLATERDEL 15 /* Maximum delay timeout (sec) */ +#ifndef NFS_REMOVETIMEO +#define NFS_REMOVETIMEO 15 /* # sec to wait for delegret in local syscall */ +#endif +#ifndef NFS_MINATTRTIMO +#define NFS_MINATTRTIMO 5 /* Attribute cache timeout in sec */ +#endif +#ifndef NFS_MAXATTRTIMO +#define NFS_MAXATTRTIMO 60 +#endif +#define NFS_WSIZE 8192 /* Def. write data size <= 8192 */ +#define NFS_RSIZE 8192 /* Def. read data size <= 8192 */ +#define NFS_READDIRSIZE 8192 /* Def. readdir size */ +#define NFS_DEFRAHEAD 0 /* Def. read ahead # blocks */ +#define NFS_MAXRAHEAD 32 /* Max. read ahead # blocks */ +#define NFS_MAXUIDHASH 64 /* Max. # of hashed uid entries/mp */ +#ifndef NFSRV_LEASE +#define NFSRV_LEASE 120 /* Lease time in seconds for V4 */ +#endif /* assigned to nfsrv_lease */ +#ifndef NFSRV_STALELEASE +#define NFSRV_STALELEASE (5 * nfsrv_lease) +#endif +#ifndef NFSRV_MOULDYLEASE +#define NFSRV_MOULDYLEASE 604800 /* One week (in sec) */ +#endif +#ifndef NFSCLIENTHASHSIZE +#define NFSCLIENTHASHSIZE 20 /* Size of server client hash table */ +#endif +#ifndef NFSLOCKHASHSIZE +#define NFSLOCKHASHSIZE 20 /* Size of server nfslock hash table */ +#endif +#define NFSSTATEHASHSIZE 10 /* Size of server stateid hash table */ +#ifndef NFSUSERHASHSIZE +#define NFSUSERHASHSIZE 30 /* Size of user id hash table */ +#endif +#ifndef NFSGROUPHASHSIZE +#define NFSGROUPHASHSIZE 5 /* Size of group id hash table */ +#endif +#ifndef NFSCLDELEGHIGHWATER +#define NFSCLDELEGHIGHWATER 10000 /* limit for client delegations */ +#endif +#ifndef NFSNOOPEN /* Inactive open owner (sec) */ +#define NFSNOOPEN 120 +#endif +#define NFSRV_LEASEDELTA 15 /* # of seconds to delay beyond lease */ +#define NFS_IDMAXSIZE 4 /* max sizeof (in_addr_t) */ +#ifndef NFSRVCACHE_UDPTIMEOUT +#define NFSRVCACHE_UDPTIMEOUT 30 /* # of sec to hold cached rpcs(udp) */ +#endif +#ifndef NFSRVCACHE_UDPHIGHWATER +#define NFSRVCACHE_UDPHIGHWATER 500 /* Max # of udp cache entries */ +#endif +#ifndef NFSRVCACHE_TCPTIMEOUT +#define NFSRVCACHE_TCPTIMEOUT (3600*12) /*#of sec to hold cached rpcs(tcp) */ +#endif +#ifndef NFSRVCACHE_FLOODLEVEL +#define NFSRVCACHE_FLOODLEVEL 16384 /* Very high water mark for cache */ +#endif +#ifndef NFSRV_CLIENTHIGHWATER +#define NFSRV_CLIENTHIGHWATER 1000 +#endif +#ifndef NFSRV_MAXDUMPLIST +#define NFSRV_MAXDUMPLIST 10000 +#endif +#ifndef NFS_ACCESSCACHESIZE +#define NFS_ACCESSCACHESIZE 8 +#endif +#define NFSV4_CBPORT 7745 /* Callback port for testing */ + +/* + * This macro defines the high water mark for issuing V4 delegations. + * (It is currently set at a conservative 20% of NFSRV_V4STATELIMIT. This + * may want to increase when clients can make more effective use of + * delegations.) + */ +#define NFSRV_V4DELEGLIMIT(c) (((c) * 5) > NFSRV_V4STATELIMIT) + +#define NFS_READDIRBLKSIZ DIRBLKSIZ /* Minimal nm_readdirsize */ + +/* + * Oddballs + */ +#define NFS_CMPFH(n, f, s) \ + ((n)->n_fhp->nfh_len == (s) && !NFSBCMP((n)->n_fhp->nfh_fh, (caddr_t)(f), (s))) +#define NFSRV_CMPFH(nf, ns, f, s) \ + ((ns) == (s) && !NFSBCMP((caddr_t)(nf), (caddr_t)(f), (s))) +#define NFS_CMPTIME(t1, t2) \ + ((t1).tv_sec == (t2).tv_sec && (t1).tv_nsec == (t2).tv_nsec) +#define NFS_SETTIME(t) do { \ + (t).tv_sec = time.tv_sec; (t).tv_nsec = 1000 * time.tv_usec; } while (0) +#define NFS_SRVMAXDATA(n) \ + (((n)->nd_flag & (ND_NFSV3 | ND_NFSV4)) ? \ + NFS_MAXDATA : NFS_V2MAXDATA) +#define NFS64BITSSET 0xffffffffffffffffull +#define NFS64BITSMINUS1 0xfffffffffffffffeull + +/* + * Structures for the nfssvc(2) syscall. Not that anyone but nfsd, mount_nfs + * and nfsloaduser should ever try and use it. + */ +struct nfsd_args { + int sock; /* Socket to serve */ + caddr_t name; /* Client addr for connection based sockets */ + int namelen; /* Length of name */ +}; + +/* + * nfsd argument for new krpc. + */ +struct nfsd_nfsd_args { + const char *principal; /* GSS-API service principal name */ + int minthreads; /* minimum service thread count */ + int maxthreads; /* maximum service thread count */ +}; + +/* + * Arguments for use by the callback daemon. + */ +struct nfsd_nfscbd_args { + const char *principal; /* GSS-API service principal name */ +}; + +struct nfscbd_args { + int sock; /* Socket to serve */ + caddr_t name; /* Client addr for connection based sockets */ + int namelen; /* Length of name */ + u_short port; /* Port# for callbacks */ +}; + +struct nfsd_idargs { + int nid_flag; /* Flags (see below) */ + uid_t nid_uid; /* user/group id */ + gid_t nid_gid; + int nid_usermax; /* Upper bound on user name cache */ + int nid_usertimeout;/* User name timeout (minutes) */ + u_char *nid_name; /* Name */ + int nid_namelen; /* and its length */ +}; + +struct nfsd_clid { + int nclid_idlen; /* Length of client id */ + u_char nclid_id[NFSV4_OPAQUELIMIT]; /* and name */ +}; + +struct nfsd_dumplist { + int ndl_size; /* Number of elements */ + void *ndl_list; /* and the list of elements */ +}; + +struct nfsd_dumpclients { + u_int32_t ndcl_flags; /* LCL_xxx flags */ + u_int32_t ndcl_nopenowners; /* Number of openowners */ + u_int32_t ndcl_nopens; /* and opens */ + u_int32_t ndcl_nlockowners; /* and of lockowners */ + u_int32_t ndcl_nlocks; /* and of locks */ + u_int32_t ndcl_ndelegs; /* and of delegations */ + u_int32_t ndcl_nolddelegs; /* and old delegations */ + sa_family_t ndcl_addrfam; /* Callback address */ + union { + struct in_addr sin_addr; + struct in6_addr sin6_addr; + } ndcl_cbaddr; + struct nfsd_clid ndcl_clid; /* and client id */ +}; + +struct nfsd_dumplocklist { + char *ndllck_fname; /* File Name */ + int ndllck_size; /* Number of elements */ + void *ndllck_list; /* and the list of elements */ +}; + +struct nfsd_dumplocks { + u_int32_t ndlck_flags; /* state flags NFSLCK_xxx */ + nfsv4stateid_t ndlck_stateid; /* stateid */ + u_int64_t ndlck_first; /* lock byte range */ + u_int64_t ndlck_end; + struct nfsd_clid ndlck_owner; /* Owner of open/lock */ + sa_family_t ndlck_addrfam; /* Callback address */ + union { + struct in_addr sin_addr; + struct in6_addr sin6_addr; + } ndlck_cbaddr; + struct nfsd_clid ndlck_clid; /* and client id */ +}; + +/* + * Structure for referral information. + */ +struct nfsreferral { + u_char *nfr_srvlist; /* List of servers */ + int nfr_srvcnt; /* number of servers */ + vnode_t nfr_vp; /* vnode for referral */ + u_int32_t nfr_dfileno; /* assigned dir inode# */ +}; + +/* + * Flags for lc_flags and opsflags for nfsrv_getclient(). + */ +#define LCL_NEEDSCONFIRM 0x00000001 +#define LCL_DONTCLEAN 0x00000002 +#define LCL_WAKEUPWANTED 0x00000004 +#define LCL_TCPCALLBACK 0x00000008 +#define LCL_CALLBACKSON 0x00000010 +#define LCL_INDEXNOTOK 0x00000020 +#define LCL_STAMPEDSTABLE 0x00000040 +#define LCL_EXPIREIT 0x00000080 +#define LCL_CBDOWN 0x00000100 +#define LCL_KERBV 0x00000400 +#define LCL_NAME 0x00000800 +#define LCL_NEEDSCBNULL 0x00001000 +#define LCL_GSSINTEGRITY 0x00002000 +#define LCL_GSSPRIVACY 0x00004000 +#define LCL_ADMINREVOKED 0x00008000 + +#define LCL_GSS LCL_KERBV /* Or of all mechs */ + +/* + * Bits for flags in nfslock and nfsstate. + * The access, deny, NFSLCK_READ and NFSLCK_WRITE bits must be defined as + * below, in the correct order, so the shifts work for tests. + */ +#define NFSLCK_READACCESS 0x00000001 +#define NFSLCK_WRITEACCESS 0x00000002 +#define NFSLCK_ACCESSBITS (NFSLCK_READACCESS | NFSLCK_WRITEACCESS) +#define NFSLCK_SHIFT 2 +#define NFSLCK_READDENY 0x00000004 +#define NFSLCK_WRITEDENY 0x00000008 +#define NFSLCK_DENYBITS (NFSLCK_READDENY | NFSLCK_WRITEDENY) +#define NFSLCK_SHAREBITS \ + (NFSLCK_READACCESS|NFSLCK_WRITEACCESS|NFSLCK_READDENY|NFSLCK_WRITEDENY) +#define NFSLCK_LOCKSHIFT 4 +#define NFSLCK_READ 0x00000010 +#define NFSLCK_WRITE 0x00000020 +#define NFSLCK_BLOCKING 0x00000040 +#define NFSLCK_RECLAIM 0x00000080 +#define NFSLCK_OPENTOLOCK 0x00000100 +#define NFSLCK_TEST 0x00000200 +#define NFSLCK_LOCK 0x00000400 +#define NFSLCK_UNLOCK 0x00000800 +#define NFSLCK_OPEN 0x00001000 +#define NFSLCK_CLOSE 0x00002000 +#define NFSLCK_CHECK 0x00004000 +#define NFSLCK_RELEASE 0x00008000 +#define NFSLCK_NEEDSCONFIRM 0x00010000 +#define NFSLCK_CONFIRM 0x00020000 +#define NFSLCK_DOWNGRADE 0x00040000 +#define NFSLCK_DELEGREAD 0x00080000 +#define NFSLCK_DELEGWRITE 0x00100000 +#define NFSLCK_DELEGCUR 0x00200000 +#define NFSLCK_DELEGPREV 0x00400000 +#define NFSLCK_OLDDELEG 0x00800000 +#define NFSLCK_DELEGRECALL 0x01000000 +#define NFSLCK_SETATTR 0x02000000 +#define NFSLCK_DELEGPURGE 0x04000000 +#define NFSLCK_DELEGRETURN 0x08000000 + +/* And bits for nid_flag */ +#define NFSID_INITIALIZE 0x0001 +#define NFSID_ADDUID 0x0002 +#define NFSID_DELUID 0x0004 +#define NFSID_ADDUSERNAME 0x0008 +#define NFSID_DELUSERNAME 0x0010 +#define NFSID_ADDGID 0x0020 +#define NFSID_DELGID 0x0040 +#define NFSID_ADDGROUPNAME 0x0080 +#define NFSID_DELGROUPNAME 0x0100 + +/* + * Stats structure + */ +struct nfsstats { + int attrcache_hits; + int attrcache_misses; + int lookupcache_hits; + int lookupcache_misses; + int direofcache_hits; + int direofcache_misses; + int accesscache_hits; + int accesscache_misses; + int biocache_reads; + int read_bios; + int read_physios; + int biocache_writes; + int write_bios; + int write_physios; + int biocache_readlinks; + int readlink_bios; + int biocache_readdirs; + int readdir_bios; + int rpccnt[NFS_NPROCS]; + int rpcretries; + int srvrpccnt[NFSV4OP_NOPS + NFSV4OP_FAKENOPS]; + int srvrpc_errs; + int srv_errs; + int rpcrequests; + int rpctimeouts; + int rpcunexpected; + int rpcinvalid; + int srvcache_inproghits; + int srvcache_idemdonehits; + int srvcache_nonidemdonehits; + int srvcache_misses; + int srvcache_tcppeak; + int srvcache_size; + int srvclients; + int srvopenowners; + int srvopens; + int srvlockowners; + int srvlocks; + int srvdelegates; + int cbrpccnt[NFSV4OP_CBNOPS]; + int clopenowners; + int clopens; + int cllockowners; + int cllocks; + int cldelegates; + int cllocalopenowners; + int cllocalopens; + int cllocallockowners; + int cllocallocks; +}; + +/* + * fs.nfs sysctl(3) identifiers + */ +#define NFS_NFSSTATS 1 /* struct: struct nfsstats */ + +#define FS_NFS_NAMES { \ + { 0, 0 }, \ + { "nfsstats", CTLTYPE_STRUCT }, \ +} + +/* + * Here is the definition of the attribute bits array and macros that + * manipulate it. + * THE MACROS MUST BE MANUALLY MODIFIED IF NFSATTRBIT_MAXWORDS CHANGES!! + * It is (NFSATTRBIT_MAX + 31) / 32. + */ +#define NFSATTRBIT_MAXWORDS 2 + +typedef struct { + u_int32_t bits[NFSATTRBIT_MAXWORDS]; +} nfsattrbit_t; + +#define NFSZERO_ATTRBIT(b) do { (b)->bits[0] = 0; (b)->bits[1] = 0; } while (0) +#define NFSSET_ATTRBIT(t, f) do { (t)->bits[0] = (f)->bits[0]; \ + (t)->bits[1] = (f)->bits[1]; } while (0) +#define NFSSETSUPP_ATTRBIT(b) do { \ + (b)->bits[0] = NFSATTRBIT_SUPP0; \ + (b)->bits[1] = (NFSATTRBIT_SUPP1 | NFSATTRBIT_SUPPSETONLY); } while (0) +#define NFSISSET_ATTRBIT(b, p) ((b)->bits[(p) / 32] & (1 << ((p) % 32))) +#define NFSSETBIT_ATTRBIT(b, p) ((b)->bits[(p) / 32] |= (1 << ((p) % 32))) +#define NFSCLRBIT_ATTRBIT(b, p) ((b)->bits[(p) / 32] &= ~(1 << ((p) % 32))) +#define NFSCLRALL_ATTRBIT(b, a) do { \ + (b)->bits[0] &= ~((a)->bits[0]); \ + (b)->bits[1] &= ~((a)->bits[1]); \ + } while (0) +#define NFSCLRNOT_ATTRBIT(b, a) do { \ + (b)->bits[0] &= ((a)->bits[0]); \ + (b)->bits[1] &= ((a)->bits[1]); \ + } while (0) +#define NFSCLRNOTFILLABLE_ATTRBIT(b) do { \ + (b)->bits[0] &= NFSATTRBIT_SUPP0; \ + (b)->bits[1] &= NFSATTRBIT_SUPP1; } while (0) +#define NFSCLRNOTSETABLE_ATTRBIT(b) do { \ + (b)->bits[0] &= NFSATTRBIT_SETABLE0; \ + (b)->bits[1] &= NFSATTRBIT_SETABLE1; } while (0) +#define NFSNONZERO_ATTRBIT(b) ((b)->bits[0] || (b)->bits[1]) +#define NFSEQUAL_ATTRBIT(b, p) \ + ((b)->bits[0] == (p)->bits[0] && (b)->bits[1] == (p)->bits[1]) +#define NFSGETATTR_ATTRBIT(b) do { \ + (b)->bits[0] = NFSATTRBIT_GETATTR0; \ + (b)->bits[1] = NFSATTRBIT_GETATTR1; } while (0) +#define NFSWCCATTR_ATTRBIT(b) do { \ + (b)->bits[0] = NFSATTRBIT_WCCATTR0; \ + (b)->bits[1] = NFSATTRBIT_WCCATTR1; } while (0) +#define NFSWRITEGETATTR_ATTRBIT(b) do { \ + (b)->bits[0] = NFSATTRBIT_WRITEGETATTR0; \ + (b)->bits[1] = NFSATTRBIT_WRITEGETATTR1; } while (0) +#define NFSCBGETATTR_ATTRBIT(b, c) do { \ + (c)->bits[0] = ((b)->bits[0] & NFSATTRBIT_CBGETATTR0); \ + (c)->bits[1] = ((b)->bits[1] & NFSATTRBIT_CBGETATTR1); } while (0) +#define NFSPATHCONF_GETATTRBIT(b) do { \ + (b)->bits[0] = NFSGETATTRBIT_PATHCONF0; \ + (b)->bits[1] = NFSGETATTRBIT_PATHCONF1; } while (0) +#define NFSSTATFS_GETATTRBIT(b) do { \ + (b)->bits[0] = NFSGETATTRBIT_STATFS0; \ + (b)->bits[1] = NFSGETATTRBIT_STATFS1; } while (0) +#define NFSISSETSTATFS_ATTRBIT(b) \ + (((b)->bits[0] & NFSATTRBIT_STATFS0) || \ + ((b)->bits[1] & NFSATTRBIT_STATFS1)) +#define NFSCLRSTATFS_ATTRBIT(b) do { \ + (b)->bits[0] &= ~NFSATTRBIT_STATFS0; \ + (b)->bits[1] &= ~NFSATTRBIT_STATFS1; } while (0) +#define NFSREADDIRPLUS_ATTRBIT(b) do { \ + (b)->bits[0] = NFSATTRBIT_READDIRPLUS0; \ + (b)->bits[1] = NFSATTRBIT_READDIRPLUS1; } while (0) +#define NFSREFERRAL_ATTRBIT(b) do { \ + (b)->bits[0] = NFSATTRBIT_REFERRAL0; \ + (b)->bits[1] = NFSATTRBIT_REFERRAL1; } while (0) + +/* + * Store uid, gid creds that handle maps to. + * Since some BSDen define cr_gid as cr_groups[0], I'll just keep them + * all in nfsc_groups[NGROUPS + 1]. + */ +struct nfscred { + uid_t nfsc_uid; + gid_t nfsc_groups[NGROUPS + 1]; + int nfsc_ngroups; +}; + +/* + * Constants that define the file handle for the V4 root directory. + * (The FSID must never be used by other file systems that are exported.) + */ +#define NFSV4ROOT_FSID0 ((int32_t) -1) +#define NFSV4ROOT_FSID1 ((int32_t) -1) +#define NFSV4ROOT_REFERRAL ((int32_t) -2) +#define NFSV4ROOT_INO 2 /* It's traditional */ +#define NFSV4ROOT_GEN 1 + +/* + * The set of signals the interrupt an I/O in progress for NFSMNT_INT mounts. + * What should be in this set is open to debate, but I believe that since + * I/O system calls on ufs are never interrupted by signals the set should + * be minimal. My reasoning is that many current programs that use signals + * such as SIGALRM will not expect file I/O system calls to be interrupted + * by them and break. + */ +#if defined(_KERNEL) || defined(KERNEL) + +struct uio; struct buf; struct vattr; struct nameidata; /* XXX */ + +/* + * Socket errors ignored for connectionless sockets? + * For now, ignore them all + */ +#define NFSIGNORE_SOERROR(s, e) \ + ((e) != EINTR && (e) != ERESTART && (e) != EWOULDBLOCK && \ + ((s) & PR_CONNREQUIRED) == 0) + + +/* + * This structure holds socket information for a connection. Used by the + * client and the server for callbacks. + */ +struct nfssockreq { + NFSSOCKADDR_T nr_nam; + int nr_sotype; + int nr_soproto; + int nr_soflags; + struct ucred *nr_cred; + int nr_lock; + NFSMUTEX_T nr_mtx; + u_int32_t nr_prog; + u_int32_t nr_vers; + struct __rpc_client *nr_client; +}; + +/* + * And associated nr_lock bits. + */ +#define NFSR_SNDLOCK 0x01 +#define NFSR_WANTSND 0x02 +#define NFSR_RCVLOCK 0x04 +#define NFSR_WANTRCV 0x08 +#define NFSR_RESERVEDPORT 0x10 +#define NFSR_LOCALHOST 0x20 + +/* + * Queue head for nfsreq's + */ +TAILQ_HEAD(nfsreqhead, nfsreq); + +/* First 8 R_xxx flags defined in rpc/rpcclnt.h, the rest are here */ +#define R_DONTRECOVER 0x00000100 /* don't initiate recovery when this + rpc gets a stale state reply */ + +/* + * Network address hash list element + */ +union nethostaddr { + struct in_addr had_inet; + struct in6_addr had_inet6; +}; + +/* + * Structure of list of mechanisms. + */ +struct nfsgss_mechlist { + int len; + const u_char *str; + int totlen; +}; +#define KERBV_MECH 0 /* position in list */ + +/* + * This structure is used by the server for describing each request. + */ +struct nfsrv_descript { + mbuf_t nd_mrep; /* Request mbuf list */ + mbuf_t nd_md; /* Current dissect mbuf */ + mbuf_t nd_mreq; /* Reply mbuf list */ + mbuf_t nd_mb; /* Current build mbuf */ + NFSSOCKADDR_T nd_nam; /* and socket addr */ + NFSSOCKADDR_T nd_nam2; /* return socket addr */ + caddr_t nd_dpos; /* Current dissect pos */ + caddr_t nd_bpos; /* Current build pos */ + u_int16_t nd_procnum; /* RPC # */ + u_int32_t nd_flag; /* nd_flag */ + u_int32_t nd_repstat; /* Reply status */ + int *nd_errp; /* Pointer to ret status */ + u_int32_t nd_retxid; /* Reply xid */ + struct nfsrvcache *nd_rp; /* Assoc. cache entry */ + struct timeval nd_starttime; /* Time RPC initiated */ + fhandle_t nd_fh; /* File handle */ + struct ucred *nd_cred; /* Credentials */ + uid_t nd_saveduid; /* Saved uid */ + u_int64_t nd_sockref; /* Rcv socket ref# */ + u_int64_t nd_compref; /* Compound RPC ref# */ + time_t nd_tcpconntime; /* Time TCP connection est. */ + nfsquad_t nd_clientid; /* Implied clientid */ + int nd_credflavor; /* credential flavor */ + int nd_gssnamelen; /* principal name length */ + char *nd_gssname; /* principal name */ +}; + +#define nd_princlen nd_gssnamelen +#define nd_principal nd_gssname + +/* Bits for "nd_flag" */ +#define ND_DONTSAVEREPLY 0x00000001 +#define ND_SAVEREPLY 0x00000002 +#define ND_NFSV2 0x00000004 +#define ND_NFSV3 0x00000008 +#define ND_NFSV4 0x00000010 +#define ND_KERBV 0x00000020 +#define ND_GSSINTEGRITY 0x00000040 +#define ND_GSSPRIVACY 0x00000080 +#define ND_WINDOWVERF 0x00000100 +#define ND_GSSINITREPLY 0x00000200 +#define ND_STREAMSOCK 0x00000400 +#define ND_PUBLOOKUP 0x00000800 +#define ND_USEGSSNAME 0x00001000 +#define ND_SAMETCPCONN 0x00002000 +#define ND_IMPLIEDCLID 0x00004000 +#define ND_NOMOREDATA 0x00008000 +#define ND_V4WCCATTR 0x00010000 +#define ND_NFSCB 0x00020000 +#define ND_AUTHNONE 0x00040000 +#define ND_EXGSSONLY 0x00080000 +#define ND_INCRSEQID 0x00100000 + +/* + * ND_GSS should be the "or" of all GSS type authentications. + */ +#define ND_GSS (ND_KERBV) + +struct nfsv4_opflag { + int retfh; + int needscfh; + int savereply; + int modifyfs; +}; + +/* + * Flags used to indicate what to do w.r.t. seqid checking. + */ +#define NFSRVSEQID_FIRST 0x01 +#define NFSRVSEQID_LAST 0x02 +#define NFSRVSEQID_OPEN 0x04 + +/* + * MNT_EXGSSONLY is the Or of all the EXGSS bits. + */ +#define MNT_EXGSSONLY MNT_EXGSSKRB5 + +/* + * assign a doubly linked list to a new head + * and prepend one list into another. + */ +#define LIST_NEWHEAD(nhead, ohead, field) do { \ + if (((nhead)->lh_first = (ohead)->lh_first) != NULL) \ + (ohead)->lh_first->field.le_prev = &(nhead)->lh_first; \ + (ohead)->lh_first = NULL; \ + } while (0) + +#define LIST_PREPEND(head, phead, lelm, field) do { \ + if ((head)->lh_first != NULL) { \ + (lelm)->field.le_next = (head)->lh_first; \ + (lelm)->field.le_next->field.le_prev = \ + &(lelm)->field.le_next; \ + } \ + (head)->lh_first = (phead)->lh_first; \ + (head)->lh_first->field.le_prev = &(head)->lh_first; \ + } while (0) + +/* + * File handle structure for client. Malloc'd to the correct length with + * malloc type M_NFSFH. + */ +struct nfsfh { + u_int16_t nfh_len; /* Length of file handle */ + u_int8_t nfh_fh[1]; /* and the file handle */ +}; + +/* + * File handle structure for server. The NFSRV_MAXFH constant is + * set in nfsdport.h. I use a 32bit length, so that alignment is + * preserved. + */ +struct nfsrvfh { + u_int32_t nfsrvfh_len; + u_int8_t nfsrvfh_data[NFSRV_MAXFH]; +}; + +/* + * This structure is used for sleep locks on the NFSv4 nfsd threads and + * NFSv4 client data structures. + */ +struct nfsv4lock { + u_int32_t nfslock_usecnt; + u_int8_t nfslock_lock; +}; +#define NFSV4LOCK_LOCK 0x01 +#define NFSV4LOCK_LOCKWANTED 0x02 +#define NFSV4LOCK_WANTED 0x04 + +/* + * Values for the override argument for nfsvno_accchk(). + */ +#define NFSACCCHK_NOOVERRIDE 0 +#define NFSACCCHK_ALLOWROOT 1 +#define NFSACCCHK_ALLOWOWNER 2 + +/* + * and values for the vpislocked argument for nfsvno_accchk(). + */ +#define NFSACCCHK_VPNOTLOCKED 0 +#define NFSACCCHK_VPISLOCKED 1 + +#endif /* _KERNEL */ + +#endif /* _NFS_NFS_H */ Added: head/sys/fs/nfs/nfs_commonacl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/fs/nfs/nfs_commonacl.c Mon May 4 15:23:58 2009 (r191783) @@ -0,0 +1,750 @@ +/*- + * Copyright (c) 2009 Rick Macklem, University of Guelph + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#ifndef APPLEKEXT +#include + +extern int nfsrv_useacl; +#endif + +static int nfsrv_acemasktoperm(u_int32_t acetype, u_int32_t mask, int owner, + enum vtype type, acl_perm_t *permp); + +#if defined(NFS4_ACL_EXTATTR_NAME) +/* + * Handle xdr for an ace. + */ +APPLESTATIC int +nfsrv_dissectace(struct nfsrv_descript *nd, struct acl_entry *acep, + int *aceerrp, int *acesizep, NFSPROC_T *p) +{ + u_int32_t *tl; + int len, gotid = 0, owner = 0, error = 0, aceerr = 0; + u_char *name, namestr[NFSV4_SMALLSTR + 1]; + u_int32_t flag, mask, acetype; + gid_t gid; + uid_t uid; + + *aceerrp = 0; + acep->ae_flags = 0; + NFSM_DISSECT(tl, u_int32_t *, 4 * NFSX_UNSIGNED); + acetype = fxdr_unsigned(u_int32_t, *tl++); + flag = fxdr_unsigned(u_int32_t, *tl++); + mask = fxdr_unsigned(u_int32_t, *tl++); + len = fxdr_unsigned(int, *tl); + if (len < 0) { + return (NFSERR_BADXDR); + } else if (len == 0) { + /* Netapp filers return a 0 length who for nil users */ + acep->ae_tag = ACL_UNDEFINED_TAG; + acep->ae_id = ACL_UNDEFINED_ID; + acep->ae_perm = (acl_perm_t)0; + acep->ae_extended = ACL_EXTENDED_DENY; + if (acesizep) + *acesizep = 4 * NFSX_UNSIGNED; + return (0); + } + if (len > NFSV4_SMALLSTR) + name = malloc(len + 1, M_NFSSTRING, M_WAITOK); + else + name = namestr; + error = nfsrv_mtostr(nd, name, len); + if (error) { + if (len > NFSV4_SMALLSTR) + free(name, M_NFSSTRING); + return (error); + } + if (len == 6) { + if (!NFSBCMP(name, "OWNER@", 6)) { + acep->ae_tag = ACL_USER_OBJ; + acep->ae_id = ACL_UNDEFINED_ID; + owner = 1; + gotid = 1; + } else if (!NFSBCMP(name, "GROUP@", 6)) { + acep->ae_tag = ACL_GROUP_OBJ; + acep->ae_id = ACL_UNDEFINED_ID; + gotid = 1; + } + } else if (len == 9 && !NFSBCMP(name, "EVERYONE@", 9)) { + acep->ae_tag = ACL_EVERYONE; + acep->ae_id = ACL_UNDEFINED_ID; + gotid = 1; + } + if (gotid == 0) { + if (flag & NFSV4ACE_IDENTIFIERGROUP) { + acep->ae_tag = ACL_GROUP; + aceerr = nfsv4_strtogid(name, len, &gid, p); + if (aceerr == 0) + acep->ae_id = (uid_t)gid; + } else { + acep->ae_tag = ACL_USER; + aceerr = nfsv4_strtouid(name, len, &uid, p); + if (aceerr == 0) + acep->ae_id = uid; + } + } + if (len > NFSV4_SMALLSTR) + free(name, M_NFSSTRING); + + if (aceerr == 0) { + /* + * Handle the flags. + */ + flag &= ~NFSV4ACE_IDENTIFIERGROUP; + if (flag & NFSV4ACE_FILEINHERIT) { + flag &= ~NFSV4ACE_FILEINHERIT; + acep->ae_flags |= ACL_ENTRY_FILE_INHERIT; + } + if (flag & NFSV4ACE_DIRECTORYINHERIT) { + flag &= ~NFSV4ACE_DIRECTORYINHERIT; + acep->ae_flags |= ACL_ENTRY_DIRECTORY_INHERIT; + } + if (flag & NFSV4ACE_NOPROPAGATEINHERIT) { + flag &= ~NFSV4ACE_NOPROPAGATEINHERIT; + acep->ae_flags |= ACL_ENTRY_LIMIT_INHERIT; + } + if (flag & NFSV4ACE_INHERITONLY) { + flag &= ~NFSV4ACE_INHERITONLY; + acep->ae_flags |= ACL_ENTRY_ONLY_INHERIT; + } + if (flag & NFSV4ACE_SUCCESSFULACCESS) { + flag &= ~NFSV4ACE_SUCCESSFULACCESS; + acep->ae_flags |= ACL_ENTRY_SUCCESSFUL_ACCESS; + } + if (flag & NFSV4ACE_FAILEDACCESS) { + flag &= ~NFSV4ACE_FAILEDACCESS; + acep->ae_flags |= ACL_ENTRY_FAILED_ACCESS; + } + /* + * Set ae_extended. + */ + if (acetype == NFSV4ACE_ALLOWEDTYPE) + acep->ae_extended = ACL_EXTENDED_ALLOW; + else if (acetype == NFSV4ACE_DENIEDTYPE) + acep->ae_extended = ACL_EXTENDED_DENY; + else if (acetype == NFSV4ACE_AUDITTYPE) + acep->ae_extended = ACL_EXTENDED_AUDIT; + else if (acetype == NFSV4ACE_ALARMTYPE) + acep->ae_extended = ACL_EXTENDED_ALARM; + else + aceerr = NFSERR_ATTRNOTSUPP; + } + + /* + * Now, check for unsupported flag bits. + */ + if (aceerr == 0 && flag != 0) + aceerr = NFSERR_ATTRNOTSUPP; + + /* + * And turn the mask into perm bits. + */ + if (aceerr == 0) + aceerr = nfsrv_acemasktoperm(acetype, mask, owner, VREG, + &acep->ae_perm); + *aceerrp = aceerr; + if (acesizep) + *acesizep = NFSM_RNDUP(len) + (4 * NFSX_UNSIGNED); + return (0); +nfsmout: + return (error); +} + +/* + * Turn an NFSv4 ace mask into R/W/X flag bits. + */ +static int +nfsrv_acemasktoperm(u_int32_t acetype, u_int32_t mask, int owner, + enum vtype type, acl_perm_t *permp) +{ + acl_perm_t perm = 0x0; + + if (mask & NFSV4ACE_READDATA) { + mask &= ~NFSV4ACE_READDATA; + perm |= ACL_READ_DATA; + } + if (mask & NFSV4ACE_LISTDIRECTORY) { + mask &= ~NFSV4ACE_LISTDIRECTORY; + perm |= ACL_LIST_DIRECTORY; + } + if (mask & NFSV4ACE_WRITEDATA) { + mask &= ~NFSV4ACE_WRITEDATA; + perm |= ACL_WRITE_DATA; + } + if (mask & NFSV4ACE_ADDFILE) { + mask &= ~NFSV4ACE_ADDFILE; + perm |= ACL_ADD_FILE; + } + if (mask & NFSV4ACE_APPENDDATA) { + mask &= ~NFSV4ACE_APPENDDATA; + perm |= ACL_APPEND_DATA; + } + if (mask & NFSV4ACE_ADDSUBDIRECTORY) { + mask &= ~NFSV4ACE_ADDSUBDIRECTORY; + perm |= ACL_ADD_SUBDIRECTORY; + } + if (mask & NFSV4ACE_READNAMEDATTR) { + mask &= ~NFSV4ACE_READNAMEDATTR; + perm |= ACL_READ_NAMED_ATTRS; + } + if (mask & NFSV4ACE_WRITENAMEDATTR) { + mask &= ~NFSV4ACE_WRITENAMEDATTR; + perm |= ACL_WRITE_NAMED_ATTRS; + } + if (mask & NFSV4ACE_EXECUTE) { + mask &= ~NFSV4ACE_EXECUTE; + perm |= ACL_EXECUTE; + } + if (mask & NFSV4ACE_SEARCH) { + mask &= ~NFSV4ACE_SEARCH; + perm |= ACL_SEARCH; + } + if (mask & NFSV4ACE_DELETECHILD) { + mask &= ~NFSV4ACE_DELETECHILD; + perm |= ACL_DELETE_CHILD; + } + if (mask & NFSV4ACE_READATTRIBUTES) { + mask &= ~NFSV4ACE_READATTRIBUTES; + perm |= ACL_READ_ATTRIBUTES; + } + if (mask & NFSV4ACE_WRITEATTRIBUTES) { + mask &= ~NFSV4ACE_WRITEATTRIBUTES; + perm |= ACL_WRITE_ATTRIBUTES; + } + if (mask & NFSV4ACE_DELETE) { + mask &= ~NFSV4ACE_DELETE; + perm |= ACL_DELETE; + } + if (mask & NFSV4ACE_READACL) { + mask &= ~NFSV4ACE_READACL; + perm |= ACL_READ_ACL; + } + if (mask & NFSV4ACE_WRITEACL) { + mask &= ~NFSV4ACE_WRITEACL; + perm |= ACL_WRITE_ACL; + } + if (mask & NFSV4ACE_WRITEOWNER) { + mask &= ~NFSV4ACE_WRITEOWNER; + perm |= ACL_WRITE_OWNER; + } + if (mask & NFSV4ACE_SYNCHRONIZE) { + mask &= ~NFSV4ACE_SYNCHRONIZE; + perm |= ACL_SYNCHRONIZE; + } + if (mask != 0) + return (NFSERR_ATTRNOTSUPP); + *permp = perm; + return (0); +} +#else +/* + * Handle xdr for an ace. + */ +APPLESTATIC int +nfsrv_dissectace(struct nfsrv_descript *nd, struct acl_entry *acep, + int *aceerrp, int *acesizep, NFSPROC_T *p) +{ + u_int32_t *tl; + int len, gotid = 0, owner = 0, error = 0, aceerr = 0; + u_char *name, namestr[NFSV4_SMALLSTR + 1]; + u_int32_t flag, mask, acetype; + gid_t gid; + uid_t uid; + + *aceerrp = 0; + NFSM_DISSECT(tl, u_int32_t *, 4 * NFSX_UNSIGNED); + acetype = fxdr_unsigned(u_int32_t, *tl++); + flag = fxdr_unsigned(u_int32_t, *tl++); + mask = fxdr_unsigned(u_int32_t, *tl++); + len = fxdr_unsigned(int, *tl); + if (len < 0) { + return (NFSERR_BADXDR); + } else if (len == 0) { + /* Netapp filers return a 0 length who for nil users */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon May 4 16:10:38 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 687D2106564A; Mon, 4 May 2009 16:10:38 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 572258FC08; Mon, 4 May 2009 16:10:38 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n44GAcdc049751; Mon, 4 May 2009 16:10:38 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n44GAc3r049750; Mon, 4 May 2009 16:10:38 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200905041610.n44GAc3r049750@svn.freebsd.org> From: Ken Smith Date: Mon, 4 May 2009 16:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191784 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 16:10:39 -0000 Author: kensmith Date: Mon May 4 16:10:37 2009 New Revision: 191784 URL: http://svn.freebsd.org/changeset/base/191784 Log: Open stable/7 up to normal developer activity. Approved by: core (implicit) Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Mon May 4 15:23:58 2009 (r191783) +++ svnadmin/conf/approvers Mon May 4 16:10:37 2009 (r191784) @@ -17,7 +17,7 @@ # $FreeBSD$ # #^head/ re -^stable/7/ re +#^stable/7/ re #^stable/6/ re ^releng/7.2/ re ^releng/7.[0-1]/ (security-officer|so) From owner-svn-src-all@FreeBSD.ORG Mon May 4 17:25:53 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B01A106566B; Mon, 4 May 2009 17:25:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78E9D8FC0A; Mon, 4 May 2009 17:25:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n44HPr0l051560; Mon, 4 May 2009 17:25:53 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n44HPrft051559; Mon, 4 May 2009 17:25:53 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200905041725.n44HPrft051559@svn.freebsd.org> From: John Baldwin Date: Mon, 4 May 2009 17:25:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191785 - stable/7/lib/libstand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 17:25:54 -0000 Author: jhb Date: Mon May 4 17:25:53 2009 New Revision: 191785 URL: http://svn.freebsd.org/changeset/base/191785 Log: MFC: Fix an off-by-one buffer overflow in ngets(). Modified: stable/7/lib/libstand/ (props changed) stable/7/lib/libstand/gets.c Modified: stable/7/lib/libstand/gets.c ============================================================================== --- stable/7/lib/libstand/gets.c Mon May 4 16:10:37 2009 (r191784) +++ stable/7/lib/libstand/gets.c Mon May 4 17:25:53 2009 (r191785) @@ -74,7 +74,7 @@ ngets(char *buf, int n) putchar('\n'); break; default: - if ((n < 1) || ((lp - buf) < n)) { + if ((n < 1) || ((lp - buf) < n - 1)) { *lp++ = c; putchar(c); } From owner-svn-src-all@FreeBSD.ORG Mon May 4 17:26:02 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41A8810656B9; Mon, 4 May 2009 17:26:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 55ADB8FC16; Mon, 4 May 2009 17:26:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n44HQ1iU051600; Mon, 4 May 2009 17:26:01 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n44HQ12l051599; Mon, 4 May 2009 17:26:01 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200905041726.n44HQ12l051599@svn.freebsd.org> From: John Baldwin Date: Mon, 4 May 2009 17:26:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191786 - stable/6/lib/libstand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 17:26:04 -0000 Author: jhb Date: Mon May 4 17:26:01 2009 New Revision: 191786 URL: http://svn.freebsd.org/changeset/base/191786 Log: MFC: Fix an off-by-one buffer overflow in ngets(). Modified: stable/6/lib/libstand/ (props changed) stable/6/lib/libstand/gets.c Modified: stable/6/lib/libstand/gets.c ============================================================================== --- stable/6/lib/libstand/gets.c Mon May 4 17:25:53 2009 (r191785) +++ stable/6/lib/libstand/gets.c Mon May 4 17:26:01 2009 (r191786) @@ -78,7 +78,7 @@ ngets(char *buf, int n) putchar('\n'); break; default: - if ((n < 1) || ((lp - buf) < n)) { + if ((n < 1) || ((lp - buf) < n - 1)) { *lp++ = c; putchar(c); } From owner-svn-src-all@FreeBSD.ORG Mon May 4 17:30:20 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 764BE1065670; Mon, 4 May 2009 17:30:20 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64FAC8FC14; Mon, 4 May 2009 17:30:20 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n44HUKI9051763; Mon, 4 May 2009 17:30:20 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n44HUK3T051762; Mon, 4 May 2009 17:30:20 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200905041730.n44HUK3T051762@svn.freebsd.org> From: Ulf Lilleengen Date: Mon, 4 May 2009 17:30:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191787 - head/sys/geom/vinum X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 17:30:20 -0000 Author: lulf Date: Mon May 4 17:30:20 2009 New Revision: 191787 URL: http://svn.freebsd.org/changeset/base/191787 Log: - Make the gvinum softc invisible to userland, as it is not needed. Modified: head/sys/geom/vinum/geom_vinum_var.h Modified: head/sys/geom/vinum/geom_vinum_var.h ============================================================================== --- head/sys/geom/vinum/geom_vinum_var.h Mon May 4 17:26:01 2009 (r191786) +++ head/sys/geom/vinum/geom_vinum_var.h Mon May 4 17:30:20 2009 (r191787) @@ -221,7 +221,6 @@ struct gv_event { intmax_t arg4; TAILQ_ENTRY(gv_event) events; }; -#endif /* This struct contains the main vinum config. */ struct gv_softc { @@ -234,13 +233,10 @@ struct gv_softc { TAILQ_HEAD(,gv_event) equeue; /* Event queue. */ struct mtx queue_mtx; /* Queue lock. */ struct mtx config_mtx; /* Configuration lock. */ -#ifdef _KERNEL struct bio_queue_head *bqueue; /* BIO queue. */ -#else - char *padding; -#endif struct g_geom *geom; /* Pointer to our VINUM geom. */ }; +#endif /* softc for a drive. */ struct gv_drive { From owner-svn-src-all@FreeBSD.ORG Mon May 4 18:05:28 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45BF4106566B; Mon, 4 May 2009 18:05:28 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2928A8FC12; Mon, 4 May 2009 18:05:28 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n44I5S1e052658; Mon, 4 May 2009 18:05:28 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n44I5R1W052656; Mon, 4 May 2009 18:05:27 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200905041805.n44I5R1W052656@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 4 May 2009 18:05:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191788 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 18:05:28 -0000 Author: jkim Date: Mon May 4 18:05:27 2009 New Revision: 191788 URL: http://svn.freebsd.org/changeset/base/191788 Log: Unlock the largest standard CPUID on Intel CPUs for both amd64 and i386 and fix SMP topology detection. On i386, we extend it to cover Core, Core 2, and Core i7 processors, not just Pentium 4 family, and move it to better place. On amd64, all supported Intel CPUs should have this MSR. Modified: head/sys/amd64/amd64/identcpu.c head/sys/i386/i386/identcpu.c Modified: head/sys/amd64/amd64/identcpu.c ============================================================================== --- head/sys/amd64/amd64/identcpu.c Mon May 4 17:30:20 2009 (r191787) +++ head/sys/amd64/amd64/identcpu.c Mon May 4 18:05:27 2009 (r191788) @@ -472,6 +472,22 @@ identify_cpu(void) cpu_feature = regs[3]; cpu_feature2 = regs[2]; + /* + * Clear "Limit CPUID Maxval" bit and get the largest standard CPUID + * function number again if it is set from BIOS. It is necessary + * for probing correct CPU topology later. + * XXX This is only done on the BSP package. + */ + if (cpu_vendor_id == CPU_VENDOR_INTEL && cpu_high > 0 && cpu_high < 4) { + uint64_t msr; + msr = rdmsr(MSR_IA32_MISC_ENABLE); + if ((msr & 0x400000ULL) != 0) { + wrmsr(MSR_IA32_MISC_ENABLE, msr & ~0x400000ULL); + do_cpuid(0, regs); + cpu_high = regs[0]; + } + } + if (cpu_vendor_id == CPU_VENDOR_INTEL || cpu_vendor_id == CPU_VENDOR_AMD || cpu_vendor_id == CPU_VENDOR_CENTAUR) { Modified: head/sys/i386/i386/identcpu.c ============================================================================== --- head/sys/i386/i386/identcpu.c Mon May 4 17:30:20 2009 (r191787) +++ head/sys/i386/i386/identcpu.c Mon May 4 18:05:27 2009 (r191788) @@ -209,7 +209,6 @@ printcpuinfo(void) if (cpu_vendor_id == CPU_VENDOR_INTEL) { if ((cpu_id & 0xf00) > 0x300) { u_int brand_index; - u_int model; cpu_model[0] = '\0'; @@ -322,16 +321,6 @@ printcpuinfo(void) case 0xf00: strcat(cpu_model, "Pentium 4"); cpu = CPU_P4; - model = (cpu_id & 0x0f0) >> 4; - if (model == 3 || model == 4 || model == 6) { - uint64_t tmp; - - tmp = rdmsr(MSR_IA32_MISC_ENABLE); - wrmsr(MSR_IA32_MISC_ENABLE, - tmp & ~(1LL << 22)); - do_cpuid(0, regs); - cpu_high = regs[0]; - } break; default: strcat(cpu_model, "unknown"); @@ -1110,6 +1099,24 @@ finishidentcpu(void) cpu_vendor_id = find_cpu_vendor_id(); + /* + * Clear "Limit CPUID Maxval" bit and get the largest standard CPUID + * function number again if it is set from BIOS. It is necessary + * for probing correct CPU topology later. + * XXX This is only done on the BSP package. + */ + if (cpu_vendor_id == CPU_VENDOR_INTEL && cpu_high > 0 && cpu_high < 4 && + ((I386_CPU_FAMILY(cpu_id) == 0xf && I386_CPU_MODEL(cpu_id) >= 0x3) || + (I386_CPU_FAMILY(cpu_id) == 0x6 && I386_CPU_MODEL(cpu_id) >= 0xe))) { + uint64_t msr; + msr = rdmsr(MSR_IA32_MISC_ENABLE); + if ((msr & 0x400000ULL) != 0) { + wrmsr(MSR_IA32_MISC_ENABLE, msr & ~0x400000ULL); + do_cpuid(0, regs); + cpu_high = regs[0]; + } + } + /* Detect AMD features (PTE no-execute bit, 3dnow, 64 bit mode etc) */ if (cpu_vendor_id == CPU_VENDOR_INTEL || cpu_vendor_id == CPU_VENDOR_AMD) { From owner-svn-src-all@FreeBSD.ORG Mon May 4 18:14:45 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1EFF1065670; Mon, 4 May 2009 18:14:45 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0C628FC24; Mon, 4 May 2009 18:14:45 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n44IEj9K052899; Mon, 4 May 2009 18:14:45 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n44IEjn5052898; Mon, 4 May 2009 18:14:45 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200905041814.n44IEjn5052898@svn.freebsd.org> From: Ed Schouten Date: Mon, 4 May 2009 18:14:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191789 - head/lib/libc/stdlib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 18:14:46 -0000 Author: ed Date: Mon May 4 18:14:45 2009 New Revision: 191789 URL: http://svn.freebsd.org/changeset/base/191789 Log: Our grantpt(3) and unlockpt(3) don't comply with POSIX. Modified: head/lib/libc/stdlib/ptsname.3 Modified: head/lib/libc/stdlib/ptsname.3 ============================================================================== --- head/lib/libc/stdlib/ptsname.3 Mon May 4 18:05:27 2009 (r191788) +++ head/lib/libc/stdlib/ptsname.3 Mon May 4 18:14:45 2009 (r191789) @@ -132,12 +132,16 @@ The slave pseudo-terminal device could n .Xr tty 4 .Sh STANDARDS The -.Fn grantpt , .Fn ptsname +function conforms to +.St -p1003.1-2001 . +.Pp +This implementation of +.Fn grantpt and .Fn unlockpt -functions conform to -.St -p1003.1-2001 . +does not comply with any standard, because these functions assume the +pseudo-terminal has the correct attributes upon creation. .Sh HISTORY The .Fn grantpt , From owner-svn-src-all@FreeBSD.ORG Mon May 4 18:35:52 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 965E5106566B; Mon, 4 May 2009 18:35:52 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 691778FC19; Mon, 4 May 2009 18:35:52 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n44IZqsq053601; Mon, 4 May 2009 18:35:52 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n44IZqJS053600; Mon, 4 May 2009 18:35:52 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200905041835.n44IZqJS053600@svn.freebsd.org> From: Ulf Lilleengen Date: Mon, 4 May 2009 18:35:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191790 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 18:35:53 -0000 Author: lulf Date: Mon May 4 18:35:52 2009 New Revision: 191790 URL: http://svn.freebsd.org/changeset/base/191790 Log: MFC r179094: Play nice with DDB pager. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/geom/geom_subr.c Modified: stable/7/sys/geom/geom_subr.c ============================================================================== --- stable/7/sys/geom/geom_subr.c Mon May 4 18:14:45 2009 (r191789) +++ stable/7/sys/geom/geom_subr.c Mon May 4 18:35:52 2009 (r191790) @@ -1157,8 +1157,11 @@ db_show_geom_provider(int indent, struct printf("\n"); } if (!LIST_EMPTY(&pp->consumers)) { - LIST_FOREACH(cp, &pp->consumers, consumers) + LIST_FOREACH(cp, &pp->consumers, consumers) { db_show_geom_consumer(indent + 2, cp); + if (db_pager_quit) + break; + } } } @@ -1189,12 +1192,18 @@ db_show_geom_geom(int indent, struct g_g printf("\n"); } if (!LIST_EMPTY(&gp->provider)) { - LIST_FOREACH(pp, &gp->provider, provider) + LIST_FOREACH(pp, &gp->provider, provider) { db_show_geom_provider(indent + 2, pp); + if (db_pager_quit) + break; + } } if (!LIST_EMPTY(&gp->consumer)) { - LIST_FOREACH(cp, &gp->consumer, consumer) + LIST_FOREACH(cp, &gp->consumer, consumer) { db_show_geom_consumer(indent + 2, cp); + if (db_pager_quit) + break; + } } } @@ -1204,8 +1213,11 @@ db_show_geom_class(struct g_class *mp) struct g_geom *gp; printf("class: %s (%p)\n", mp->name, mp); - LIST_FOREACH(gp, &mp->geom, geom) + LIST_FOREACH(gp, &mp->geom, geom) { db_show_geom_geom(2, gp); + if (db_pager_quit) + break; + } } /* @@ -1220,6 +1232,8 @@ DB_SHOW_COMMAND(geom, db_show_geom) LIST_FOREACH(mp, &g_classes, class) { db_show_geom_class(mp); printf("\n"); + if (db_pager_quit) + break; } } else { switch (g_valid_obj((void *)addr)) { From owner-svn-src-all@FreeBSD.ORG Mon May 4 19:00:26 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 075031065676; Mon, 4 May 2009 19:00:26 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CBCF48FC25; Mon, 4 May 2009 19:00:25 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n44J0PgI054229; Mon, 4 May 2009 19:00:25 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n44J0PlF054228; Mon, 4 May 2009 19:00:25 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200905041900.n44J0PlF054228@svn.freebsd.org> From: Hiroki Sato Date: Mon, 4 May 2009 19:00:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191791 - stable/7/release/doc/en_US.ISO8859-1/errata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 19:00:30 -0000 Author: hrs Date: Mon May 4 19:00:25 2009 New Revision: 191791 URL: http://svn.freebsd.org/changeset/base/191791 Log: Update 7.2R Errata: Document bce(4) + lagg(4) issue, and A patch for lock order reversal committed. Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Mon May 4 18:35:52 2009 (r191790) +++ stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Mon May 4 19:00:25 2009 (r191791) @@ -167,19 +167,28 @@ bootable and fall through to booting off the next boot device. All affected machines did see the other discs as bootable. As a workaround, you can boot using the bootonly or livefs CDROM and - then swap in disc1 once sysinstall starts. + then swap in disc1 once &man.sysinstall.8; starts. [20090504] A lock handling error has been found in interaction between &man.malloc.3; implementation and threading library. When a multi-threaded process calls the &man.fork.2; system call in a thread and the &man.malloc.3; function in another thread, it can cause a deadlock in the child process. - An Errata Notice to fix this problem is planned for this problem - after the release. + An Errata Notice to fix this problem is planned after the + release. + + [20090505] A bug was found in the &man.bce.4; driver. This + prevents it from working with the &man.lagg.4; driver in the + LACP (IEEE 802.3ad Link Aggregation Control Protocol) mode. An + Errata Notice to fix this problem is planned after the + release. Late-Breaking News and Corrections - No news. + [20090504] A patch to solve the locking issue in the + &man.malloc.3; implementation and threading library has been + committed to the RELENG_7 branch for public + testing. From owner-svn-src-all@FreeBSD.ORG Mon May 4 19:06:06 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3126C106568C; Mon, 4 May 2009 19:06:06 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E79A8FC0C; Mon, 4 May 2009 19:06:06 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n44J66nO054380; Mon, 4 May 2009 19:06:06 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n44J662C054379; Mon, 4 May 2009 19:06:06 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <200905041906.n44J662C054379@svn.freebsd.org> From: Jamie Gritton Date: Mon, 4 May 2009 19:06:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191792 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 19:06:07 -0000 Author: jamie Date: Mon May 4 19:06:05 2009 New Revision: 191792 URL: http://svn.freebsd.org/changeset/base/191792 Log: Mark Linux MIB sysctls MPSAFE. Reviewed by: dchagin, kib Approved by: bz (mentor) Modified: head/sys/compat/linux/linux_mib.c Modified: head/sys/compat/linux/linux_mib.c ============================================================================== --- head/sys/compat/linux/linux_mib.c Mon May 4 19:00:25 2009 (r191791) +++ head/sys/compat/linux/linux_mib.c Mon May 4 19:06:05 2009 (r191792) @@ -78,7 +78,7 @@ linux_sysctl_osname(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_compat_linux, OID_AUTO, osname, - CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON, + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, 0, 0, linux_sysctl_osname, "A", "Linux kernel OS name"); @@ -100,7 +100,7 @@ linux_sysctl_osrelease(SYSCTL_HANDLER_AR } SYSCTL_PROC(_compat_linux, OID_AUTO, osrelease, - CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON, + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, 0, 0, linux_sysctl_osrelease, "A", "Linux kernel OS release"); @@ -121,7 +121,7 @@ linux_sysctl_oss_version(SYSCTL_HANDLER_ } SYSCTL_PROC(_compat_linux, OID_AUTO, oss_version, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_PRISON, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, 0, 0, linux_sysctl_oss_version, "I", "Linux OSS version"); From owner-svn-src-all@FreeBSD.ORG Mon May 4 19:19:14 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23BDC1065670; Mon, 4 May 2009 19:19:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 071C08FC20; Mon, 4 May 2009 19:19:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n44JJDgt054689; Mon, 4 May 2009 19:19:13 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n44JJDws054687; Mon, 4 May 2009 19:19:13 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200905041919.n44JJDws054687@svn.freebsd.org> From: John Baldwin Date: Mon, 4 May 2009 19:19:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191793 - in stable/7/sys: . amd64/amd64 contrib/pf dev/ath/ath_hal dev/cxgb i386/isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 19:19:14 -0000 Author: jhb Date: Mon May 4 19:19:13 2009 New Revision: 191793 URL: http://svn.freebsd.org/changeset/base/191793 Log: MFC: More refinements to the x86 FPU support: - Rename (fpu|npx)_cleanstate to (fpu|npx)_initialstate to better reflect their purpose. - Fix a few nits in the earlier changes to prevent local information leakage in AMD FPUs. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/fpu.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/isa/npx.c Modified: stable/7/sys/amd64/amd64/fpu.c ============================================================================== --- stable/7/sys/amd64/amd64/fpu.c Mon May 4 19:06:05 2009 (r191792) +++ stable/7/sys/amd64/amd64/fpu.c Mon May 4 19:19:13 2009 (r191793) @@ -101,7 +101,7 @@ static void fpu_clean_state(void); SYSCTL_INT(_hw, HW_FLOATINGPT, floatingpoint, CTLFLAG_RD, NULL, 1, "Floating point instructions executed in hardware"); -static struct savefpu fpu_cleanstate; +static struct savefpu fpu_initialstate; /* * Initialize the floating point unit. On the boot CPU we generate a @@ -123,13 +123,13 @@ fpuinit(void) mxcsr = __INITIAL_MXCSR__; ldmxcsr(mxcsr); if (PCPU_GET(cpuid) == 0) { - fxsave(&fpu_cleanstate); - if (fpu_cleanstate.sv_env.en_mxcsr_mask) - cpu_mxcsr_mask = fpu_cleanstate.sv_env.en_mxcsr_mask; + fxsave(&fpu_initialstate); + if (fpu_initialstate.sv_env.en_mxcsr_mask) + cpu_mxcsr_mask = fpu_initialstate.sv_env.en_mxcsr_mask; else cpu_mxcsr_mask = 0xFFBF; - bzero(fpu_cleanstate.sv_fp, sizeof(fpu_cleanstate.sv_fp)); - bzero(fpu_cleanstate.sv_xmm, sizeof(fpu_cleanstate.sv_xmm)); + bzero(fpu_initialstate.sv_fp, sizeof(fpu_initialstate.sv_fp)); + bzero(fpu_initialstate.sv_xmm, sizeof(fpu_initialstate.sv_xmm)); } start_emulating(); intr_restore(savecrit); @@ -416,10 +416,11 @@ fpudna(void) if ((pcb->pcb_flags & PCB_FPUINITDONE) == 0) { /* - * This is the first time this thread has used the FPU, - * explicitly load sanitized registers. + * This is the first time this thread has used the FPU or + * the PCB doesn't contain a clean FPU state. Explicitly + * load an initial state. */ - fxrstor(&fpu_cleanstate); + fxrstor(&fpu_initialstate); if (pcb->pcb_initial_fpucw != __INITIAL_FPUCW__) fldcw(&pcb->pcb_initial_fpucw); pcb->pcb_flags |= PCB_FPUINITDONE; @@ -453,7 +454,7 @@ fpugetregs(struct thread *td, struct sav register_t s; if ((td->td_pcb->pcb_flags & PCB_FPUINITDONE) == 0) { - bcopy(&fpu_cleanstate, addr, sizeof(fpu_cleanstate)); + bcopy(&fpu_initialstate, addr, sizeof(fpu_initialstate)); addr->sv_env.en_cw = td->td_pcb->pcb_initial_fpucw; return (_MC_FPOWNED_NONE); } @@ -479,7 +480,6 @@ fpusetregs(struct thread *td, struct sav s = intr_disable(); if (td == PCPU_GET(fpcurthread)) { - fpu_clean_state(); fxrstor(addr); intr_restore(s); } else { @@ -498,10 +498,10 @@ fpusetregs(struct thread *td, struct sav * In order to avoid leaking this information across processes, we clean * these values by performing a dummy load before executing fxrstor(). */ -static double dummy_variable = 0.0; static void fpu_clean_state(void) { + static float dummy_variable = 0.0; u_short status; /* Modified: stable/7/sys/i386/isa/npx.c ============================================================================== --- stable/7/sys/i386/isa/npx.c Mon May 4 19:06:05 2009 (r191792) +++ stable/7/sys/i386/isa/npx.c Mon May 4 19:19:13 2009 (r191793) @@ -172,7 +172,7 @@ SYSCTL_INT(_hw, HW_FLOATINGPT, floatingp static volatile u_int npx_intrs_while_probing; static volatile u_int npx_traps_while_probing; -static union savefpu npx_cleanstate; +static union savefpu npx_initialstate; static bool_t npx_ex16; static bool_t npx_exists; static bool_t npx_irq13; @@ -414,24 +414,24 @@ npx_attach(dev) s = intr_disable(); stop_emulating(); - fpusave(&npx_cleanstate); + fpusave(&npx_initialstate); start_emulating(); #ifdef CPU_ENABLE_SSE if (cpu_fxsr) { - if (npx_cleanstate.sv_xmm.sv_env.en_mxcsr_mask) + if (npx_initialstate.sv_xmm.sv_env.en_mxcsr_mask) cpu_mxcsr_mask = - npx_cleanstate.sv_xmm.sv_env.en_mxcsr_mask; + npx_initialstate.sv_xmm.sv_env.en_mxcsr_mask; else cpu_mxcsr_mask = 0xFFBF; - bzero(npx_cleanstate.sv_xmm.sv_fp, - sizeof(npx_cleanstate.sv_xmm.sv_fp)); - bzero(npx_cleanstate.sv_xmm.sv_xmm, - sizeof(npx_cleanstate.sv_xmm.sv_xmm)); + bzero(npx_initialstate.sv_xmm.sv_fp, + sizeof(npx_initialstate.sv_xmm.sv_fp)); + bzero(npx_initialstate.sv_xmm.sv_xmm, + sizeof(npx_initialstate.sv_xmm.sv_xmm)); /* XXX might need even more zeroing. */ } else #endif - bzero(npx_cleanstate.sv_87.sv_ac, - sizeof(npx_cleanstate.sv_87.sv_ac)); + bzero(npx_initialstate.sv_87.sv_ac, + sizeof(npx_initialstate.sv_87.sv_ac)); intr_restore(s); #ifdef I586_CPU_XXX if (cpu_class == CPUCLASS_586 && npx_ex16 && @@ -785,13 +785,18 @@ npxdna(void) PCPU_SET(fpcurthread, curthread); pcb = PCPU_GET(curpcb); +#ifdef CPU_ENABLE_SSE + if (cpu_fxsr) + fpu_clean_state(); +#endif + if ((pcb->pcb_flags & PCB_NPXINITDONE) == 0) { /* * This is the first time this thread has used the FPU or * the PCB doesn't contain a clean FPU state. Explicitly - * load sanitized registers. + * load an initial state. */ - fpurstor(&npx_cleanstate); + fpurstor(&npx_initialstate); if (pcb->pcb_initial_npxcw != __INITIAL_NPXCW__) fldcw(&pcb->pcb_initial_npxcw); pcb->pcb_flags |= PCB_NPXINITDONE; @@ -891,7 +896,7 @@ npxgetregs(td, addr) return (_MC_FPOWNED_NONE); if ((td->td_pcb->pcb_flags & PCB_NPXINITDONE) == 0) { - bcopy(&npx_cleanstate, addr, sizeof(npx_cleanstate)); + bcopy(&npx_initialstate, addr, sizeof(npx_initialstate)); SET_FPU_CW(addr, td->td_pcb->pcb_initial_npxcw); return (_MC_FPOWNED_NONE); } @@ -967,10 +972,10 @@ fpusave(addr) * In order to avoid leaking this information across processes, we clean * these values by performing a dummy load before executing fxrstor(). */ -static double dummy_variable = 0.0; static void fpu_clean_state(void) { + static float dummy_variable = 0.0; u_short status; /* @@ -996,10 +1001,9 @@ fpurstor(addr) { #ifdef CPU_ENABLE_SSE - if (cpu_fxsr) { - fpu_clean_state(); + if (cpu_fxsr) fxrstor(addr); - } else + else #endif frstor(addr); } From owner-svn-src-all@FreeBSD.ORG Mon May 4 19:22:17 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F187F1065689; Mon, 4 May 2009 19:22:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id C327D8FC08; Mon, 4 May 2009 19:22:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 613C246B8E; Mon, 4 May 2009 15:22:16 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 55D248A022; Mon, 4 May 2009 15:22:15 -0400 (EDT) From: John Baldwin To: Alexander Motin Date: Mon, 4 May 2009 09:41:00 -0400 User-Agent: KMail/1.9.7 References: <200905031747.n43HlLHD020054@svn.freebsd.org> In-Reply-To: <200905031747.n43HlLHD020054@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905040941.00641.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 04 May 2009 15:22:15 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_03_06,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r191766 - in head/sys: amd64/include amd64/isa i386/bios i386/include i386/isa i386/xen isa pc98/cbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 19:22:17 -0000 On Sunday 03 May 2009 1:47:21 pm Alexander Motin wrote: > Author: mav > Date: Sun May 3 17:47:21 2009 > New Revision: 191766 > URL: http://svn.freebsd.org/changeset/base/191766 > > Log: > Rename statclock_disable variable to atrtcclock_disable that it actually is, > and hide it inside of atrtc driver. Add new tunable hint.atrtc.0.clock > controlling it. Setting it to 0 disables using RTC clock as stat-/ > profclock sources. > > Teach i386 and amd64 SMP platforms to emulate stat-/profclocks using i8254 > hardclock, when LAPIC and RTC clocks are disabled. > > This allows to reduce global interrupt rate of idle system down to about > 100 interrupts per core, permitting C3 and deeper C-states provide maximum > CPU power efficiency. Note that IRQ0 is not going to work for many systems with the local APIC since I removed the mixed-mode handling from the x86 interrupt code. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon May 4 20:25:56 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C65E11065673; Mon, 4 May 2009 20:25:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B57188FC12; Mon, 4 May 2009 20:25:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n44KPup2056073; Mon, 4 May 2009 20:25:56 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n44KPuHj056072; Mon, 4 May 2009 20:25:56 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200905042025.n44KPuHj056072@svn.freebsd.org> From: John Baldwin Date: Mon, 4 May 2009 20:25:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191794 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 20:25:57 -0000 Author: jhb Date: Mon May 4 20:25:56 2009 New Revision: 191794 URL: http://svn.freebsd.org/changeset/base/191794 Log: Always compute the root of the kernel source tree and explicitly pass it to module builds. This avoids having to have the module builds walk up the tree to find the kernel sources. It also allows a kernel + module build to succeed when a new level of module subdirectories is added without requiring that the /usr/share/mk/bsd.kmod.mk file on the machine be patched. MFC after: 1 week Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Mon May 4 19:19:13 2009 (r191793) +++ head/sys/conf/kern.post.mk Mon May 4 20:25:56 2009 (r191794) @@ -12,7 +12,8 @@ .if defined(DESTDIR) MKMODULESENV+= DESTDIR="${DESTDIR}" .endif -MKMODULESENV+= KERNBUILDDIR="${.CURDIR}" +SYSDIR?= ${S:C;^[^/];${.CURDIR}/&;} +MKMODULESENV+= KERNBUILDDIR="${.CURDIR}" SYSDIR="${SYSDIR}" .MAIN: all @@ -29,7 +30,6 @@ modules-${target}: # Handle out of tree ports .if !defined(NO_MODULES) && defined(PORTS_MODULES) -SYSDIR?= ${S:C;^[^/];${.CURDIR}/&;} PORTSMODULESENV=SYSDIR=${SYSDIR} .for __target in all install reinstall clean ${__target}: ports-${__target} From owner-svn-src-all@FreeBSD.ORG Mon May 4 20:36:00 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43B54106566C; Mon, 4 May 2009 20:36:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2FD2C8FC1C; Mon, 4 May 2009 20:36:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n44Ka0TI056372; Mon, 4 May 2009 20:36:00 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n44Ka08v056369; Mon, 4 May 2009 20:36:00 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200905042036.n44Ka08v056369@svn.freebsd.org> From: John Baldwin Date: Mon, 4 May 2009 20:36:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191795 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 20:36:01 -0000 Author: jhb Date: Mon May 4 20:35:59 2009 New Revision: 191795 URL: http://svn.freebsd.org/changeset/base/191795 Log: MFC: Various fixes to the PCI resource allocation code: - Disabling decoding of BARs via the PCI command register before writing to the BARs to size them. - Don't free resources decoded by a BAR when the device driver releases a BAR. Instead, the PCI bus now owns unclaimed BARs and gives them to drivers on demand. When a driver releases a BAR, the PCI bus reclaims it and leaves the resource range allocated. This also prevents drivers from allocating the same resource multiple times. - Move the activation of BARs by enabling decoding in the PCI command register into bus_activate_resource() so that it always happens after the BAR is fully programmed. - Always read/write the full 64-bit value of 64-bit BARs. - Consolidate duplicated code for reading and sizing BARs and writing base address to BARs. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/pci/pci.c stable/7/sys/dev/pci/pci_private.h stable/7/sys/dev/pci/pcireg.h Modified: stable/7/sys/dev/pci/pci.c ============================================================================== --- stable/7/sys/dev/pci/pci.c Mon May 4 20:25:56 2009 (r191794) +++ stable/7/sys/dev/pci/pci.c Mon May 4 20:35:59 2009 (r191795) @@ -71,18 +71,17 @@ __FBSDID("$FreeBSD$"); #define ACPI_PWR_FOR_SLEEP(x, y, z) #endif -static uint32_t pci_mapbase(unsigned mapreg); -static const char *pci_maptype(unsigned mapreg); -static int pci_mapsize(unsigned testval); -static int pci_maprange(unsigned mapreg); +static pci_addr_t pci_mapbase(uint64_t mapreg); +static const char *pci_maptype(uint64_t mapreg); +static int pci_mapsize(uint64_t testval); +static int pci_maprange(uint64_t mapreg); static void pci_fixancient(pcicfgregs *cfg); -static int pci_porten(device_t pcib, int b, int s, int f); -static int pci_memen(device_t pcib, int b, int s, int f); +static int pci_porten(device_t dev); +static int pci_memen(device_t dev); static void pci_assign_interrupt(device_t bus, device_t dev, int force_route); -static int pci_add_map(device_t pcib, device_t bus, device_t dev, - int b, int s, int f, int reg, +static int pci_add_map(device_t bus, device_t dev, int reg, struct resource_list *rl, int force, int prefetch); static int pci_probe(device_t dev); static int pci_attach(device_t dev); @@ -136,7 +135,7 @@ static device_method_t pci_methods[] = { DEVMETHOD(bus_delete_resource, pci_delete_resource), DEVMETHOD(bus_alloc_resource, pci_alloc_resource), DEVMETHOD(bus_release_resource, bus_generic_rl_release_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_activate_resource, pci_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_child_pnpinfo_str, pci_child_pnpinfo_str_method), DEVMETHOD(bus_child_location_str, pci_child_location_str_method), @@ -316,8 +315,8 @@ pci_find_device(uint16_t vendor, uint16_ /* return base address of memory or port map */ -static uint32_t -pci_mapbase(uint32_t mapreg) +static pci_addr_t +pci_mapbase(uint64_t mapreg) { if (PCI_BAR_MEM(mapreg)) @@ -329,7 +328,7 @@ pci_mapbase(uint32_t mapreg) /* return map type of memory or port map */ static const char * -pci_maptype(unsigned mapreg) +pci_maptype(uint64_t mapreg) { if (PCI_BAR_IO(mapreg)) @@ -342,7 +341,7 @@ pci_maptype(unsigned mapreg) /* return log2 of map size decoded for memory or port map */ static int -pci_mapsize(uint32_t testval) +pci_mapsize(uint64_t testval) { int ln2size; @@ -361,7 +360,7 @@ pci_mapsize(uint32_t testval) /* return log2 of address range supported by map register */ static int -pci_maprange(unsigned mapreg) +pci_maprange(uint64_t mapreg) { int ln2range = 0; @@ -2257,17 +2256,75 @@ pci_print_verbose(struct pci_devinfo *di } static int -pci_porten(device_t pcib, int b, int s, int f) +pci_porten(device_t dev) { - return (PCIB_READ_CONFIG(pcib, b, s, f, PCIR_COMMAND, 2) - & PCIM_CMD_PORTEN) != 0; + return (pci_read_config(dev, PCIR_COMMAND, 2) & PCIM_CMD_PORTEN) != 0; } static int -pci_memen(device_t pcib, int b, int s, int f) +pci_memen(device_t dev) { - return (PCIB_READ_CONFIG(pcib, b, s, f, PCIR_COMMAND, 2) - & PCIM_CMD_MEMEN) != 0; + return (pci_read_config(dev, PCIR_COMMAND, 2) & PCIM_CMD_MEMEN) != 0; +} + +static void +pci_read_bar(device_t dev, int reg, pci_addr_t *mapp, pci_addr_t *testvalp) +{ + pci_addr_t map, testval; + int ln2range; + uint16_t cmd; + + map = pci_read_config(dev, reg, 4); + ln2range = pci_maprange(map); + if (ln2range == 64) + map |= (pci_addr_t)pci_read_config(dev, reg + 4, 4) << 32; + + /* + * Disable decoding via the command register before + * determining the BAR's length since we will be placing it in + * a weird state. + */ + cmd = pci_read_config(dev, PCIR_COMMAND, 2); + pci_write_config(dev, PCIR_COMMAND, + cmd & ~(PCI_BAR_MEM(map) ? PCIM_CMD_MEMEN : PCIM_CMD_PORTEN), 2); + + /* + * Determine the BAR's length by writing all 1's. The bottom + * log_2(size) bits of the BAR will stick as 0 when we read + * the value back. + */ + pci_write_config(dev, reg, 0xffffffff, 4); + testval = pci_read_config(dev, reg, 4); + if (ln2range == 64) { + pci_write_config(dev, reg + 4, 0xffffffff, 4); + testval |= (pci_addr_t)pci_read_config(dev, reg + 4, 4) << 32; + } + + /* + * Restore the original value of the BAR. We may have reprogrammed + * the BAR of the low-level console device and when booting verbose, + * we need the console device addressable. + */ + pci_write_config(dev, reg, map, 4); + if (ln2range == 64) + pci_write_config(dev, reg + 4, map >> 32, 4); + pci_write_config(dev, PCIR_COMMAND, cmd, 2); + + *mapp = map; + *testvalp = testval; +} + +static void +pci_write_bar(device_t dev, int reg, pci_addr_t base) +{ + pci_addr_t map; + int ln2range; + + map = pci_read_config(dev, reg, 4); + ln2range = pci_maprange(map); + pci_write_config(dev, reg, base, 4); + if (ln2range == 64) + pci_write_config(dev, reg + 4, base >> 32, 4); } /* @@ -2275,36 +2332,26 @@ pci_memen(device_t pcib, int b, int s, i * register is a 32bit map register or 2 if it is a 64bit register. */ static int -pci_add_map(device_t pcib, device_t bus, device_t dev, - int b, int s, int f, int reg, struct resource_list *rl, int force, - int prefetch) +pci_add_map(device_t bus, device_t dev, int reg, struct resource_list *rl, + int force, int prefetch) { - uint32_t map; - pci_addr_t base; + pci_addr_t base, map, testval; pci_addr_t start, end, count; - uint8_t ln2size; - uint8_t ln2range; - uint32_t testval; + int barlen, maprange, mapsize, type; uint16_t cmd; - int type; - int barlen; struct resource *res; - map = PCIB_READ_CONFIG(pcib, b, s, f, reg, 4); - PCIB_WRITE_CONFIG(pcib, b, s, f, reg, 0xffffffff, 4); - testval = PCIB_READ_CONFIG(pcib, b, s, f, reg, 4); - PCIB_WRITE_CONFIG(pcib, b, s, f, reg, map, 4); - + pci_read_bar(dev, reg, &map, &testval); if (PCI_BAR_MEM(map)) { type = SYS_RES_MEMORY; if (map & PCIM_BAR_MEM_PREFETCH) prefetch = 1; } else type = SYS_RES_IOPORT; - ln2size = pci_mapsize(testval); - ln2range = pci_maprange(testval); + mapsize = pci_mapsize(testval); base = pci_mapbase(map); - barlen = ln2range == 64 ? 2 : 1; + maprange = pci_maprange(map); + barlen = maprange == 64 ? 2 : 1; /* * For I/O registers, if bottom bit is set, and the next bit up @@ -2315,19 +2362,16 @@ pci_add_map(device_t pcib, device_t bus, */ if (PCI_BAR_IO(testval) && (testval & PCIM_BAR_IO_RESERVED) != 0) return (barlen); - if ((type == SYS_RES_MEMORY && ln2size < 4) || - (type == SYS_RES_IOPORT && ln2size < 2)) + if ((type == SYS_RES_MEMORY && mapsize < 4) || + (type == SYS_RES_IOPORT && mapsize < 2)) return (barlen); - if (ln2range == 64) - /* Read the other half of a 64bit map register */ - base |= (uint64_t) PCIB_READ_CONFIG(pcib, b, s, f, reg + 4, 4) << 32; if (bootverbose) { printf("\tmap[%02x]: type %s, range %2d, base %#jx, size %2d", - reg, pci_maptype(map), ln2range, (uintmax_t)base, ln2size); - if (type == SYS_RES_IOPORT && !pci_porten(pcib, b, s, f)) + reg, pci_maptype(map), maprange, (uintmax_t)base, mapsize); + if (type == SYS_RES_IOPORT && !pci_porten(dev)) printf(", port disabled\n"); - else if (type == SYS_RES_MEMORY && !pci_memen(pcib, b, s, f)) + else if (type == SYS_RES_MEMORY && !pci_memen(dev)) printf(", memory disabled\n"); else printf(", enabled\n"); @@ -2349,7 +2393,8 @@ pci_add_map(device_t pcib, device_t bus, if ((u_long)base != base) { device_printf(bus, "pci%d:%d:%d:%d bar %#x too many address bits", - pci_get_domain(dev), b, s, f, reg); + pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), + pci_get_function(dev), reg); return (barlen); } @@ -2362,30 +2407,30 @@ pci_add_map(device_t pcib, device_t bus, */ if (pci_enable_io_modes) { /* Turn on resources that have been left off by a lazy BIOS */ - if (type == SYS_RES_IOPORT && !pci_porten(pcib, b, s, f)) { - cmd = PCIB_READ_CONFIG(pcib, b, s, f, PCIR_COMMAND, 2); + if (type == SYS_RES_IOPORT && !pci_porten(dev)) { + cmd = pci_read_config(dev, PCIR_COMMAND, 2); cmd |= PCIM_CMD_PORTEN; - PCIB_WRITE_CONFIG(pcib, b, s, f, PCIR_COMMAND, cmd, 2); + pci_write_config(dev, PCIR_COMMAND, cmd, 2); } - if (type == SYS_RES_MEMORY && !pci_memen(pcib, b, s, f)) { - cmd = PCIB_READ_CONFIG(pcib, b, s, f, PCIR_COMMAND, 2); + if (type == SYS_RES_MEMORY && !pci_memen(dev)) { + cmd = pci_read_config(dev, PCIR_COMMAND, 2); cmd |= PCIM_CMD_MEMEN; - PCIB_WRITE_CONFIG(pcib, b, s, f, PCIR_COMMAND, cmd, 2); + pci_write_config(dev, PCIR_COMMAND, cmd, 2); } } else { - if (type == SYS_RES_IOPORT && !pci_porten(pcib, b, s, f)) + if (type == SYS_RES_IOPORT && !pci_porten(dev)) return (barlen); - if (type == SYS_RES_MEMORY && !pci_memen(pcib, b, s, f)) + if (type == SYS_RES_MEMORY && !pci_memen(dev)) return (barlen); } - count = 1 << ln2size; + count = 1 << mapsize; if (base == 0 || base == pci_mapbase(testval)) { start = 0; /* Let the parent decide. */ end = ~0ULL; } else { start = base; - end = base + (1 << ln2size) - 1; + end = base + (1 << mapsize) - 1; } resource_list_add(rl, type, reg, start, end, count); @@ -2406,11 +2451,11 @@ pci_add_map(device_t pcib, device_t bus, */ resource_list_delete(rl, type, reg); start = 0; - } else + } else { start = rman_get_start(res); - pci_write_config(dev, reg, start, 4); - if (ln2range == 64) - pci_write_config(dev, reg + 4, start >> 32, 4); + rman_set_device(res, bus); + } + pci_write_bar(dev, reg, start); return (barlen); } @@ -2422,9 +2467,10 @@ pci_add_map(device_t pcib, device_t bus, * addressing mode. */ static void -pci_ata_maps(device_t pcib, device_t bus, device_t dev, int b, - int s, int f, struct resource_list *rl, int force, uint32_t prefetchmask) +pci_ata_maps(device_t bus, device_t dev, struct resource_list *rl, int force, + uint32_t prefetchmask) { + struct resource *r; int rid, type, progif; #if 0 /* if this device supports PCI native addressing use it */ @@ -2440,38 +2486,42 @@ pci_ata_maps(device_t pcib, device_t bus progif = pci_read_config(dev, PCIR_PROGIF, 1); type = SYS_RES_IOPORT; if (progif & PCIP_STORAGE_IDE_MODEPRIM) { - pci_add_map(pcib, bus, dev, b, s, f, PCIR_BAR(0), rl, force, + pci_add_map(bus, dev, PCIR_BAR(0), rl, force, prefetchmask & (1 << 0)); - pci_add_map(pcib, bus, dev, b, s, f, PCIR_BAR(1), rl, force, + pci_add_map(bus, dev, PCIR_BAR(1), rl, force, prefetchmask & (1 << 1)); } else { rid = PCIR_BAR(0); resource_list_add(rl, type, rid, 0x1f0, 0x1f7, 8); - resource_list_alloc(rl, bus, dev, type, &rid, 0x1f0, 0x1f7, 8, - 0); + r = resource_list_alloc(rl, bus, dev, type, &rid, 0x1f0, 0x1f7, + 8, 0); + rman_set_device(r, bus); rid = PCIR_BAR(1); resource_list_add(rl, type, rid, 0x3f6, 0x3f6, 1); - resource_list_alloc(rl, bus, dev, type, &rid, 0x3f6, 0x3f6, 1, - 0); + r = resource_list_alloc(rl, bus, dev, type, &rid, 0x3f6, 0x3f6, + 1, 0); + rman_set_device(r, bus); } if (progif & PCIP_STORAGE_IDE_MODESEC) { - pci_add_map(pcib, bus, dev, b, s, f, PCIR_BAR(2), rl, force, + pci_add_map(bus, dev, PCIR_BAR(2), rl, force, prefetchmask & (1 << 2)); - pci_add_map(pcib, bus, dev, b, s, f, PCIR_BAR(3), rl, force, + pci_add_map(bus, dev, PCIR_BAR(3), rl, force, prefetchmask & (1 << 3)); } else { rid = PCIR_BAR(2); resource_list_add(rl, type, rid, 0x170, 0x177, 8); - resource_list_alloc(rl, bus, dev, type, &rid, 0x170, 0x177, 8, - 0); + r = resource_list_alloc(rl, bus, dev, type, &rid, 0x170, 0x177, + 8, 0); + rman_set_device(r, bus); rid = PCIR_BAR(3); resource_list_add(rl, type, rid, 0x376, 0x376, 1); - resource_list_alloc(rl, bus, dev, type, &rid, 0x376, 0x376, 1, - 0); + r = resource_list_alloc(rl, bus, dev, type, &rid, 0x376, 0x376, + 1, 0); + rman_set_device(r, bus); } - pci_add_map(pcib, bus, dev, b, s, f, PCIR_BAR(4), rl, force, + pci_add_map(bus, dev, PCIR_BAR(4), rl, force, prefetchmask & (1 << 4)); - pci_add_map(pcib, bus, dev, b, s, f, PCIR_BAR(5), rl, force, + pci_add_map(bus, dev, PCIR_BAR(5), rl, force, prefetchmask & (1 << 5)); } @@ -2526,18 +2576,11 @@ pci_assign_interrupt(device_t bus, devic void pci_add_resources(device_t bus, device_t dev, int force, uint32_t prefetchmask) { - device_t pcib; struct pci_devinfo *dinfo = device_get_ivars(dev); pcicfgregs *cfg = &dinfo->cfg; struct resource_list *rl = &dinfo->resources; struct pci_quirk *q; - int b, i, f, s; - - pcib = device_get_parent(bus); - - b = cfg->bus; - s = cfg->slot; - f = cfg->func; + int i; /* ATA devices needs special map treatment */ if ((pci_get_class(dev) == PCIC_STORAGE) && @@ -2545,11 +2588,11 @@ pci_add_resources(device_t bus, device_t ((pci_get_progif(dev) & PCIP_STORAGE_IDE_MASTERDEV) || (!pci_read_config(dev, PCIR_BAR(0), 4) && !pci_read_config(dev, PCIR_BAR(2), 4))) ) - pci_ata_maps(pcib, bus, dev, b, s, f, rl, force, prefetchmask); + pci_ata_maps(bus, dev, rl, force, prefetchmask); else for (i = 0; i < cfg->nummaps;) - i += pci_add_map(pcib, bus, dev, b, s, f, PCIR_BAR(i), - rl, force, prefetchmask & (1 << i)); + i += pci_add_map(bus, dev, PCIR_BAR(i), rl, force, + prefetchmask & (1 << i)); /* * Add additional, quirked resources. @@ -2557,8 +2600,7 @@ pci_add_resources(device_t bus, device_t for (q = &pci_quirks[0]; q->devid; q++) { if (q->devid == ((cfg->device << 16) | cfg->vendor) && q->type == PCI_QUIRK_MAP_REG) - pci_add_map(pcib, bus, dev, b, s, f, q->arg1, rl, - force, 0); + pci_add_map(bus, dev, q->arg1, rl, force, 0); } if (cfg->intpin > 0 && PCI_INTERRUPT_VALID(cfg->intline)) { @@ -3401,21 +3443,12 @@ pci_alloc_map(device_t dev, device_t chi * it fails here, that other code is broken. */ res = NULL; - map = pci_read_config(child, *rid, 4); - pci_write_config(child, *rid, 0xffffffff, 4); - testval = pci_read_config(child, *rid, 4); - if (pci_maprange(testval) == 64) - map |= (pci_addr_t)pci_read_config(child, *rid + 4, 4) << 32; + pci_read_bar(child, *rid, &map, &testval); + + /* Ignore a BAR with a base of 0. */ if (pci_mapbase(testval) == 0) goto out; - /* - * Restore the original value of the BAR. We may have reprogrammed - * the BAR of the low-level console device and when booting verbose, - * we need the console device addressable. - */ - pci_write_config(child, *rid, map, 4); - if (PCI_BAR_MEM(testval)) { if (type != SYS_RES_MEMORY) { if (bootverbose) @@ -3435,6 +3468,7 @@ pci_alloc_map(device_t dev, device_t chi goto out; } } + /* * For real BARs, we need to override the size that * the driver requests, because that's what the BAR @@ -3454,13 +3488,14 @@ pci_alloc_map(device_t dev, device_t chi * appropriate bar for that resource. */ res = BUS_ALLOC_RESOURCE(device_get_parent(dev), child, type, rid, - start, end, count, flags); + start, end, count, flags & ~RF_ACTIVE); if (res == NULL) { device_printf(child, "%#lx bytes of rid %#x res %d failed (%#lx, %#lx).\n", count, *rid, type, start, end); goto out; } + rman_set_device(res, dev); resource_list_add(rl, type, *rid, start, end, count); rle = resource_list_find(rl, type, *rid); if (rle == NULL) @@ -3474,10 +3509,8 @@ pci_alloc_map(device_t dev, device_t chi "Lazy allocation of %#lx bytes rid %#x type %d at %#lx\n", count, *rid, type, rman_get_start(res)); map = rman_get_start(res); + pci_write_bar(child, *rid, map); out:; - pci_write_config(child, *rid, map, 4); - if (pci_maprange(testval) == 64) - pci_write_config(child, *rid + 4, map >> 32, 4); return (res); } @@ -3489,68 +3522,63 @@ pci_alloc_resource(device_t dev, device_ struct pci_devinfo *dinfo = device_get_ivars(child); struct resource_list *rl = &dinfo->resources; struct resource_list_entry *rle; + struct resource *res; pcicfgregs *cfg = &dinfo->cfg; + if (device_get_parent(child) != dev) + return (BUS_ALLOC_RESOURCE(device_get_parent(dev), child, + type, rid, start, end, count, flags)); + /* * Perform lazy resource allocation */ - if (device_get_parent(child) == dev) { - switch (type) { - case SYS_RES_IRQ: - /* - * Can't alloc legacy interrupt once MSI messages - * have been allocated. - */ - if (*rid == 0 && (cfg->msi.msi_alloc > 0 || - cfg->msix.msix_alloc > 0)) + switch (type) { + case SYS_RES_IRQ: + /* + * Can't alloc legacy interrupt once MSI messages have + * been allocated. + */ + if (*rid == 0 && (cfg->msi.msi_alloc > 0 || + cfg->msix.msix_alloc > 0)) + return (NULL); + + /* + * If the child device doesn't have an interrupt + * routed and is deserving of an interrupt, try to + * assign it one. + */ + if (*rid == 0 && !PCI_INTERRUPT_VALID(cfg->intline) && + (cfg->intpin != 0)) + pci_assign_interrupt(dev, child, 0); + break; + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + /* Allocate resources for this BAR if needed. */ + rle = resource_list_find(rl, type, *rid); + if (rle == NULL) { + res = pci_alloc_map(dev, child, type, rid, start, end, + count, flags); + if (res == NULL) return (NULL); - /* - * If the child device doesn't have an - * interrupt routed and is deserving of an - * interrupt, try to assign it one. - */ - if (*rid == 0 && !PCI_INTERRUPT_VALID(cfg->intline) && - (cfg->intpin != 0)) - pci_assign_interrupt(dev, child, 0); - break; - case SYS_RES_IOPORT: - case SYS_RES_MEMORY: - if (*rid < PCIR_BAR(cfg->nummaps)) { - /* - * Enable the I/O mode. We should - * also be assigning resources too - * when none are present. The - * resource_list_alloc kind of sorta does - * this... - */ - if (PCI_ENABLE_IO(dev, child, type)) - return (NULL); - } rle = resource_list_find(rl, type, *rid); - if (rle == NULL) - return (pci_alloc_map(dev, child, type, rid, - start, end, count, flags)); - break; } + /* - * If we've already allocated the resource, then - * return it now. But first we may need to activate - * it, since we don't allocate the resource as active - * above. Normally this would be done down in the - * nexus, but since we short-circuit that path we have - * to do its job here. Not sure if we should free the - * resource if it fails to activate. + * If the resource belongs to the bus, then give it to + * the child. We need to activate it if requested + * since the bus always allocates inactive resources. */ - rle = resource_list_find(rl, type, *rid); - if (rle != NULL && rle->res != NULL) { + if (rle != NULL && rle->res != NULL && + rman_get_device(rle->res) == dev) { if (bootverbose) device_printf(child, "Reserved %#lx bytes for rid %#x type %d at %#lx\n", rman_get_size(rle->res), *rid, type, rman_get_start(rle->res)); + rman_set_device(rle->res, child); if ((flags & RF_ACTIVE) && - bus_generic_activate_resource(dev, child, type, - *rid, rle->res) != 0) + bus_activate_resource(child, type, *rid, + rle->res) != 0) return (NULL); return (rle->res); } @@ -3559,6 +3587,59 @@ pci_alloc_resource(device_t dev, device_ start, end, count, flags)); } +int +pci_release_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ + int error; + + if (device_get_parent(child) != dev) + return (BUS_RELEASE_RESOURCE(device_get_parent(dev), child, + type, rid, r)); + + /* + * For BARs we don't actually want to release the resource. + * Instead, we deactivate the resource if needed and then give + * ownership of the BAR back to the bus. + */ + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + if (rman_get_device(r) != child) + return (EINVAL); + if (rman_get_flags(r) & RF_ACTIVE) { + error = bus_deactivate_resource(child, type, rid, r); + if (error) + return (error); + } + rman_set_device(r, dev); + return (0); + } + return (bus_generic_rl_release_resource(dev, child, type, rid, r)); +} + +int +pci_activate_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ + int error; + + error = bus_generic_activate_resource(dev, child, type, rid, r); + if (error) + return (error); + + /* Enable decoding in the command register when activating BARs. */ + if (device_get_parent(child) == dev) { + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + error = PCI_ENABLE_IO(dev, child, type); + break; + } + } + return (error); +} + void pci_delete_resource(device_t dev, device_t child, int type, int rid) { @@ -3572,27 +3653,33 @@ pci_delete_resource(device_t dev, device dinfo = device_get_ivars(child); rl = &dinfo->resources; rle = resource_list_find(rl, type, rid); - if (rle) { - if (rle->res) { - if (rman_get_device(rle->res) != dev || - rman_get_flags(rle->res) & RF_ACTIVE) { - device_printf(dev, "delete_resource: " - "Resource still owned by child, oops. " - "(type=%d, rid=%d, addr=%lx)\n", - rle->type, rle->rid, - rman_get_start(rle->res)); - return; - } - bus_release_resource(dev, type, rid, rle->res); + if (rle == NULL) + return; + + if (rle->res) { + if (rman_get_device(rle->res) != dev || + rman_get_flags(rle->res) & RF_ACTIVE) { + device_printf(dev, "delete_resource: " + "Resource still owned by child, oops. " + "(type=%d, rid=%d, addr=%lx)\n", + rle->type, rle->rid, + rman_get_start(rle->res)); + return; } - resource_list_delete(rl, type, rid); + + /* + * If this is a BAR, clear the BAR so it stops + * decoding before releasing the resource. + */ + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + pci_write_bar(child, rid, 0); + break; + } + bus_release_resource(dev, type, rid, rle->res); } - /* - * Why do we turn off the PCI configuration BAR when we delete a - * resource? -- imp - */ - pci_write_config(child, rid, 0, 4); - BUS_DELETE_RESOURCE(device_get_parent(dev), child, type, rid); + resource_list_delete(rl, type, rid); } struct resource_list * Modified: stable/7/sys/dev/pci/pci_private.h ============================================================================== --- stable/7/sys/dev/pci/pci_private.h Mon May 4 20:25:56 2009 (r191794) +++ stable/7/sys/dev/pci/pci_private.h Mon May 4 20:35:59 2009 (r191795) @@ -82,6 +82,10 @@ int pci_msix_count_method(device_t dev, struct resource *pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags); +int pci_release_resource(device_t dev, device_t child, int type, + int rid, struct resource *r); +int pci_activate_resource(device_t dev, device_t child, int type, + int rid, struct resource *r); void pci_delete_resource(device_t dev, device_t child, int type, int rid); struct resource_list *pci_get_resource_list (device_t dev, device_t child); Modified: stable/7/sys/dev/pci/pcireg.h ============================================================================== --- stable/7/sys/dev/pci/pcireg.h Mon May 4 20:25:56 2009 (r191794) +++ stable/7/sys/dev/pci/pcireg.h Mon May 4 20:35:59 2009 (r191795) @@ -130,7 +130,7 @@ #define PCIM_BAR_MEM_1MB 2 /* Locate below 1MB in PCI <= 2.1 */ #define PCIM_BAR_MEM_64 4 #define PCIM_BAR_MEM_PREFETCH 0x00000008 -#define PCIM_BAR_MEM_BASE 0xfffffff0 +#define PCIM_BAR_MEM_BASE 0xfffffffffffffff0ULL #define PCIM_BAR_IO_RESERVED 0x00000002 #define PCIM_BAR_IO_BASE 0xfffffffc #define PCIR_CIS 0x28 From owner-svn-src-all@FreeBSD.ORG Mon May 4 20:48:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C420D106564A; Mon, 4 May 2009 20:48:07 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B18308FC0C; Mon, 4 May 2009 20:48:07 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n44Km7vd056704; Mon, 4 May 2009 20:48:07 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n44Km7tA056703; Mon, 4 May 2009 20:48:07 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <200905042048.n44Km7tA056703@svn.freebsd.org> From: Maksim Yevmenkin Date: Mon, 4 May 2009 20:48:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191796 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 20:48:08 -0000 Author: emax Date: Mon May 4 20:48:07 2009 New Revision: 191796 URL: http://svn.freebsd.org/changeset/base/191796 Log: MFC r191366 Fix sbappendrecord_locked(). The main problem is that sbappendrecord_locked() relies on sbcompress() to set sb_mbtail. This will not happen if sbappendrecord_locked() is called with mbuf chain made of exactly one mbuf (i.e. m0->m_next == NULL). In this case sbcompress() will be called with m == NULL and will do nothing. I'm not entirely sure if m == NULL is a valid argument for sbcompress(), and, it rather pointless to call it like that, but keep calling it so it can do SBLASTMBUFCHK(). PR: kern/126742 Investigated by: pluknet < pluknet -at- gmail -dot- com > No response from: freebsd-current@, freebsd-bluetooth@ Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/uipc_sockbuf.c Modified: stable/7/sys/kern/uipc_sockbuf.c ============================================================================== --- stable/7/sys/kern/uipc_sockbuf.c Mon May 4 20:35:59 2009 (r191795) +++ stable/7/sys/kern/uipc_sockbuf.c Mon May 4 20:48:07 2009 (r191796) @@ -576,10 +576,6 @@ sbappendrecord_locked(struct sockbuf *sb if (m0 == 0) return; - m = sb->sb_mb; - if (m) - while (m->m_nextpkt) - m = m->m_nextpkt; /* * Put the first mbuf on the queue. Note this permits zero length * records. @@ -587,16 +583,14 @@ sbappendrecord_locked(struct sockbuf *sb sballoc(sb, m0); SBLASTRECORDCHK(sb); SBLINKRECORD(sb, m0); - if (m) - m->m_nextpkt = m0; - else - sb->sb_mb = m0; + sb->sb_mbtail = m0; m = m0->m_next; m0->m_next = 0; if (m && (m0->m_flags & M_EOR)) { m0->m_flags &= ~M_EOR; m->m_flags |= M_EOR; } + /* always call sbcompress() so it can do SBLASTMBUFCHK() */ sbcompress(sb, m, m0); } From owner-svn-src-all@FreeBSD.ORG Mon May 4 20:53:19 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBDF21065691; Mon, 4 May 2009 20:53:19 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C80C08FC13; Mon, 4 May 2009 20:53:19 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n44KrJCT056855; Mon, 4 May 2009 20:53:19 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n44KrJjg056851; Mon, 4 May 2009 20:53:19 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <200905042053.n44KrJjg056851@svn.freebsd.org> From: Maksim Yevmenkin Date: Mon, 4 May 2009 20:53:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191797 - stable/7/lib/libbluetooth X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 20:53:21 -0000 Author: emax Date: Mon May 4 20:53:19 2009 New Revision: 191797 URL: http://svn.freebsd.org/changeset/base/191797 Log: MFC r191388 Implement low-level Bluetooth HCI API. This should make it easier to make Linux BlueZ libhci port. Reviewed by: Iain Hibbert < plunky -at- rya-online -dot- net > of NetBSD Inspired by: Linux BlueZ Inspired by: NetBSD Modified: stable/7/lib/libbluetooth/ (props changed) stable/7/lib/libbluetooth/Makefile stable/7/lib/libbluetooth/bluetooth.3 stable/7/lib/libbluetooth/bluetooth.h stable/7/lib/libbluetooth/hci.c Modified: stable/7/lib/libbluetooth/Makefile ============================================================================== --- stable/7/lib/libbluetooth/Makefile Mon May 4 20:48:07 2009 (r191796) +++ stable/7/lib/libbluetooth/Makefile Mon May 4 20:53:19 2009 (r191797) @@ -33,6 +33,19 @@ MLINKS+= bluetooth.3 bt_devname.3 MLINKS+= bluetooth.3 bt_devinfo.3 MLINKS+= bluetooth.3 bt_devenum.3 +MLINKS+= bluetooth.3 bt_devopen.3 +MLINKS+= bluetooth.3 bt_devclose.3 +MLINKS+= bluetooth.3 bt_devsend.3 +MLINKS+= bluetooth.3 bt_devreq.3 +MLINKS+= bluetooth.3 bt_devfilter.3 +MLINKS+= bluetooth.3 bt_devfilter_pkt_set.3 +MLINKS+= bluetooth.3 bt_devfilter_pkt_clr.3 +MLINKS+= bluetooth.3 bt_devfilter_pkt_tst.3 +MLINKS+= bluetooth.3 bt_devfilter_evt_set.3 +MLINKS+= bluetooth.3 bt_devfilter_evt_clr.3 +MLINKS+= bluetooth.3 bt_devfilter_evt_tst.3 +MLINKS+= bluetooth.3 bt_devinquiry.3 + MLINKS+= bluetooth.3 bdaddr_same.3 MLINKS+= bluetooth.3 bdaddr_any.3 MLINKS+= bluetooth.3 bdaddr_copy.3 Modified: stable/7/lib/libbluetooth/bluetooth.3 ============================================================================== --- stable/7/lib/libbluetooth/bluetooth.3 Mon May 4 20:48:07 2009 (r191796) +++ stable/7/lib/libbluetooth/bluetooth.3 Mon May 4 20:53:19 2009 (r191797) @@ -25,7 +25,7 @@ .\" $Id: bluetooth.3,v 1.5 2003/05/20 23:04:30 max Exp $ .\" $FreeBSD$ .\" -.Dd February 13, 2009 +.Dd April 9, 2009 .Dt BLUETOOTH 3 .Os .Sh NAME @@ -41,6 +41,23 @@ .Nm bt_endprotoent , .Nm bt_aton , .Nm bt_ntoa , +.Nm bt_devaddr , +.Nm bt_devname , +.Nm bt_devinfo , +.Nm bt_devenum , +.Nm bt_devopen , +.Nm bt_devclose , +.Nm bt_devsend , +.Nm bt_devrecv , +.Nm bt_devreq , +.Nm bt_devfilter , +.Nm bt_devfilter_pkt_set , +.Nm bt_devfilter_pkt_clr , +.Nm bt_devfilter_pkt_tst , +.Nm bt_devfilter_evt_set , +.Nm bt_devfilter_evt_clr , +.Nm bt_devfilter_evt_tst , +.Nm bt_devinquiry , .Nm bdaddr_same , .Nm bdaddr_any , .Nm bdaddr_copy @@ -84,6 +101,32 @@ .Ft int .Fn bt_devenum "bt_devenum_cb_t *cb" "void *arg" .Ft int +.Fn bt_devopen "char const *devname" +.Ft int +.Fn bt_devclose "int s" +.Ft int +.Fn bt_devsend "int s" "uint16_t opcode" "void *param" "size_t plen" +.Ft ssize_t +.Fn bt_devrecv "int s" "void *buf" "size_t size" "time_t to" +.Ft int +.Fn bt_devreq "int s" "struct bt_devreq *r" "time_t to" +.Ft int +.Fn bt_devfilter "int s" "struct bt_devfilter const *new" "struct bt_devfilter *old" +.Ft void +.Fn bt_devfilter_pkt_set "struct bt_devfilter *filter" "uint8_t type" +.Ft void +.Fn bt_devfilter_pkt_clt "struct bt_devfilter *filter" "uint8_t type" +.Ft int +.Fn bt_devfilter_pkt_tst "struct bt_devfilter const *filter" "uint8_t type" +.Ft void +.Fn bt_devfilter_evt_set "struct bt_devfilter *filter" "uint8_t event" +.Ft void +.Fn bt_devfilter_evt_clt "struct bt_devfilter *filter" "uint8_t event" +.Ft int +.Fn bt_devfilter_evt_tst "struct bt_devfilter const *filter" "uint8_t event" +.Ft int +.Fn bt_devinquiry "char const *devname" "time_t length" "int num_rsp" "struct bt_devinquiry **ii" +.Ft int .Fn bdaddr_same "const bdaddr_t *a" "const bdaddr_t *b" .Ft int .Fn bdaddr_any "const bdaddr_t *a" @@ -311,6 +354,240 @@ The function returns number of successfu or -1 if an error occurred. .Pp The +.Fn bt_devopen +function opens a Bluetooth device with the given +.Fa devname +and returns a connected and bound +.Dv HCI +socket handle. +The function returns -1 if an error has occurred. +.Pp +The +.Fn bt_devclose +closes the passed +.Dv HCI +socket handle +.Fa s , +previously obtained with +.Xr bt_devopen 3 . +.Pp +The +.Fn bt_devsend +function sends a Bluetooth +.Dv HCI +command with the given +.Fa opcode +to the provided socket +.Fa s , +previously obtained with +.Xr bt_devopen 3 . +The +.Fa opcode +parameter is exppected to be in the host byte order. +The +.Fa param +and +.Fa plen +parameters specify command parameters. +The +.Fn bt_devsend +function does not modify the +.Dv HCI +filter on the provided socket +.Fa s . +The function returns 0 on success, +or -1 if an error occurred. +.Pp +The +.Fn bt_devrecv +function receives one Bluetooth +.Dv HCI +packet from the socket +.Fa s , +previously obtained with +.Xr bt_devopen 3 . +The packet is placed into the provided buffer +.Fa buf +of size +.Fa size . +The +.Fa to +parameter specifies receive timeout in seconds. +Infinite timeout can be specified by passing negative value in the +.Fa to +parameter. +The +.Fn bt_devrecv +function does not modify the +.Dv HCI +filter on the provided socket +.Fa s . +The function returns total number of bytes recevied, +or -1 if an error occurred. +.Pp +The +.Fn bt_devreq +function makes a Bluetooth +.Dv HCI +request to the socket +.Fa s , +previously obtained with +.Xr bt_devopen 3 . +The function will send the specified command and will wait for the specified +event, +or timeout +.Fa to +seconds to occur. +The +.Vt bt_devreq +structure is defined as follows +.Bd -literal -offset indent +struct bt_devreq +{ + uint16_t opcode; + uint8_t event; + void *cparam; + size_t clen; + void *rparam; + size_t rlen; +}; +.Ed +.Pp +The +.Fa opcode +field specifies the command and is expected to be in the host byte order. +The +.Fa cparam +and +.Fa clen +fields specify command parameters data and command parameters data size +respectively. +The +.Fa event +field specifies which Bluetooth +.Dv HCI +event ID the function should wait for, otherwise it should be set to zero. +The +.Dv HCI +Command Complete and Command Status events are enabled by default. +The +.Fa rparam +and +.Fa rlen +parameters specify buffer and buffer size respectively where return +parameters should be placed. +The +.Fn bt_devreq +function temporarily modifies filter on the provided +.Dv HCI +socket +.Fa s . +The function returns 0 on success, or -1 if an error occurred. +.Pp +The +.Fn bt_devfilter +controls the local +.Dv HCI +filter associated with the socket +.Fa s , +previously obtained with +.Xr bt_devopen 3 . +Filtering can be done on packet types, i.e. +.Dv ACL , +.Dv SCO or +.Dv HCI , +command and event packets, and, in addition, on +.Dv HCI +event IDs. +Before applying the +.Fa new +filter (if provided) the function will try to obtain the current filter +from the socket +.Fa s +and place it into the +.Fa old +parameter (if provided). +The function returns 0 on success, or -1 if an error occurred. +.Pp +The +.Fn bt_devfilter_pkt_set , +.Fn bt_devfilter_pkt_clr +and +.Fn bt_devfilter_pkt_tst +functions can be used to modify and test the +.Dv HCI +filter +.Fa filter . +The +.Fa type +parameter specifies +.Dv HCI +packet type. +.Pp +The +.Fn bt_devfilter_evt_set , +.Fn bt_devfilter_evt_clr +and +.Fn bt_devfilter_evt_tst +functions can be used to modify and test the +.Dv HCI +event filter +.Fa filter . +The +.Fa event +parameter specifies +.Dv HCI +event ID. +.Pp +The +.Fn bt_devinquiry +function performs Bluetooth inquiry. +The +.Fa devname +parameter specifies which local Bluetooth device should perform an inquiry. +If not secified, i.e. +.Dv NULL , +then first available device will be used. +The +.Fa length +parameters specifies the total length of an inquiry in seconds. +If not specified, i.e. 0, default value will be used. +The +.Fa num_rsp +parameter specifies the number of responses that can be received before +the inquiry is halted. +If not specified, i.e. 0, default value will be used. +The +.Fa ii +parameter specifies where to place inquiry results. +On success, the function will return total number of inquiry results, +will allocate, +using +.Xr calloc 3 , +buffer to store all the inquiry results and +will return pointer to the allocated buffer in the +.Fa ii +parameter. +It is up to the caller of the function to dispose of the buffer using +.Xr free 3 +call. +The function returns -1 if an error has occurred. +The +.Vt bt_devinquiry +structure is defined as follows +.Bd -literal -offset indent +struct bt_devinquiry { + bdaddr_t bdaddr; + uint8_t pscan_rep_mode; + uint8_t pscan_period_mode; + uint8_t dev_class[3]; + uint16_t clock_offset; + int8_t rssi; + uint8_t data[240]; +}; +.Ed +.Pp +The .Fn bdaddr_same , .Fn bdaddr_any and @@ -444,6 +721,6 @@ will be bound and connected to the Bluet .Sh AUTHORS .An Maksim Yevmenkin Aq m_evmenkin@yahoo.com .Sh BUGS -These functions use static data storage; +Some of those functions use static data storage; if the data is needed for future use, it should be copied before any subsequent calls overwrite it. Modified: stable/7/lib/libbluetooth/bluetooth.h ============================================================================== --- stable/7/lib/libbluetooth/bluetooth.h Mon May 4 20:48:07 2009 (r191796) +++ stable/7/lib/libbluetooth/bluetooth.h Mon May 4 20:53:19 2009 (r191797) @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -46,6 +47,7 @@ #include #include #include +#include __BEGIN_DECLS @@ -129,8 +131,48 @@ struct bt_devinfo uint8_t _padding[20]; /* leave space for future additions */ }; +struct bt_devreq +{ + uint16_t opcode; + uint8_t event; + void *cparam; + size_t clen; + void *rparam; + size_t rlen; +}; + +struct bt_devfilter { + bitstr_t bit_decl(packet_mask, 8); + bitstr_t bit_decl(event_mask, 256); +}; + +struct bt_devinquiry { + bdaddr_t bdaddr; + uint8_t pscan_rep_mode; + uint8_t pscan_period_mode; + uint8_t dev_class[3]; + uint16_t clock_offset; + int8_t rssi; + uint8_t data[240]; +}; + typedef int (bt_devenum_cb_t)(int, struct bt_devinfo const *, void *); +int bt_devopen (char const *devname); +int bt_devclose(int s); +int bt_devsend (int s, uint16_t opcode, void *param, size_t plen); +ssize_t bt_devrecv (int s, void *buf, size_t size, time_t to); +int bt_devreq (int s, struct bt_devreq *r, time_t to); +int bt_devfilter(int s, struct bt_devfilter const *new, + struct bt_devfilter *old); +void bt_devfilter_pkt_set(struct bt_devfilter *filter, uint8_t type); +void bt_devfilter_pkt_clr(struct bt_devfilter *filter, uint8_t type); +int bt_devfilter_pkt_tst(struct bt_devfilter const *filter, uint8_t type); +void bt_devfilter_evt_set(struct bt_devfilter *filter, uint8_t event); +void bt_devfilter_evt_clr(struct bt_devfilter *filter, uint8_t event); +int bt_devfilter_evt_tst(struct bt_devfilter const *filter, uint8_t event); +int bt_devinquiry(char const *devname, time_t length, int num_rsp, + struct bt_devinquiry **ii); int bt_devinfo (struct bt_devinfo *di); int bt_devenum (bt_devenum_cb_t *cb, void *arg); Modified: stable/7/lib/libbluetooth/hci.c ============================================================================== --- stable/7/lib/libbluetooth/hci.c Mon May 4 20:48:07 2009 (r191796) +++ stable/7/lib/libbluetooth/hci.c Mon May 4 20:53:19 2009 (r191797) @@ -30,15 +30,505 @@ * $FreeBSD$ */ +#include #include +#include #include #include #include #include +#undef MIN +#define MIN(a, b) (((a) < (b))? (a) : (b)) + +static int bt_devany_cb(int s, struct bt_devinfo const *di, void *xdevname); static char * bt_dev2node (char const *devname, char *nodename, int nnlen); int +bt_devopen(char const *devname) +{ + struct sockaddr_hci ha; + bdaddr_t ba; + int s; + + if (devname == NULL) { + errno = EINVAL; + return (-1); + } + + memset(&ha, 0, sizeof(ha)); + ha.hci_len = sizeof(ha); + ha.hci_family = AF_BLUETOOTH; + + if (bt_aton(devname, &ba)) { + if (!bt_devname(ha.hci_node, &ba)) + return (-1); + } else if (bt_dev2node(devname, ha.hci_node, + sizeof(ha.hci_node)) == NULL) { + errno = ENXIO; + return (-1); + } + + s = socket(PF_BLUETOOTH, SOCK_RAW, BLUETOOTH_PROTO_HCI); + if (s < 0) + return (-1); + + if (bind(s, (struct sockaddr *) &ha, sizeof(ha)) < 0 || + connect(s, (struct sockaddr *) &ha, sizeof(ha)) < 0) { + close(s); + return (-1); + } + + return (s); +} + +int +bt_devclose(int s) +{ + return (close(s)); +} + +int +bt_devsend(int s, uint16_t opcode, void *param, size_t plen) +{ + ng_hci_cmd_pkt_t h; + struct iovec iv[2]; + int ivn; + + if ((plen == 0 && param != NULL) || + (plen > 0 && param == NULL) || + plen > UINT8_MAX) { + errno = EINVAL; + return (-1); + } + + iv[0].iov_base = &h; + iv[0].iov_len = sizeof(h); + ivn = 1; + + h.type = NG_HCI_CMD_PKT; + h.opcode = htole16(opcode); + if (plen > 0) { + h.length = plen; + + iv[1].iov_base = param; + iv[1].iov_len = plen; + ivn = 2; + } else + h.length = 0; + + while (writev(s, iv, ivn) < 0) { + if (errno == EAGAIN || errno == EINTR) + continue; + + return (-1); + } + + return (0); +} + +ssize_t +bt_devrecv(int s, void *buf, size_t size, time_t to) +{ + ssize_t n; + + if (buf == NULL || size == 0) { + errno = EINVAL; + return (-1); + } + + if (to >= 0) { + fd_set rfd; + struct timeval tv; + + FD_ZERO(&rfd); + FD_SET(s, &rfd); + + tv.tv_sec = to; + tv.tv_usec = 0; + + while ((n = select(s + 1, &rfd, NULL, NULL, &tv)) < 0) { + if (errno == EAGAIN || errno == EINTR) + continue; + + return (-1); + } + + if (n == 0) { + errno = ETIMEDOUT; + return (-1); + } + + assert(FD_ISSET(s, &rfd)); + } + + while ((n = read(s, buf, size)) < 0) { + if (errno == EAGAIN || errno == EINTR) + continue; + + return (-1); + } + + switch (*((uint8_t *) buf)) { + case NG_HCI_CMD_PKT: { + ng_hci_cmd_pkt_t *h = (ng_hci_cmd_pkt_t *) buf; + + if (n >= sizeof(*h) && n == (sizeof(*h) + h->length)) + return (n); + } break; + + case NG_HCI_ACL_DATA_PKT: { + ng_hci_acldata_pkt_t *h = (ng_hci_acldata_pkt_t *) buf; + + if (n >= sizeof(*h) && n == (sizeof(*h) + le16toh(h->length))) + return (n); + } break; + + case NG_HCI_SCO_DATA_PKT: { + ng_hci_scodata_pkt_t *h = (ng_hci_scodata_pkt_t *) buf; + + if (n >= sizeof(*h) && n == (sizeof(*h) + h->length)) + return (n); + } break; + + case NG_HCI_EVENT_PKT: { + ng_hci_event_pkt_t *h = (ng_hci_event_pkt_t *) buf; + + if (n >= sizeof(*h) && n == (sizeof(*h) + h->length)) + return (n); + } break; + } + + errno = EIO; + return (-1); +} + +int +bt_devreq(int s, struct bt_devreq *r, time_t to) +{ + uint8_t buf[320]; /* more than enough */ + ng_hci_event_pkt_t *e = (ng_hci_event_pkt_t *) buf; + ng_hci_command_compl_ep *cc = (ng_hci_command_compl_ep *)(e+1); + ng_hci_command_status_ep *cs = (ng_hci_command_status_ep*)(e+1); + struct bt_devfilter old, new; + time_t t_end; + uint16_t opcode; + ssize_t n; + int error; + + if (s < 0 || r == NULL || to < 0) { + errno = EINVAL; + return (-1); + } + + if ((r->rlen == 0 && r->rparam != NULL) || + (r->rlen > 0 && r->rparam == NULL)) { + errno = EINVAL; + return (-1); + } + + memset(&new, 0, sizeof(new)); + bt_devfilter_pkt_set(&new, NG_HCI_EVENT_PKT); + bt_devfilter_evt_set(&new, NG_HCI_EVENT_COMMAND_COMPL); + bt_devfilter_evt_set(&new, NG_HCI_EVENT_COMMAND_STATUS); + if (r->event != 0) + bt_devfilter_evt_set(&new, r->event); + + if (bt_devfilter(s, &new, &old) < 0) + return (-1); + + error = 0; + + n = bt_devsend(s, r->opcode, r->cparam, r->clen); + if (n < 0) { + error = errno; + goto out; + } + + opcode = htole16(r->opcode); + t_end = time(NULL) + to; + + do { + to = t_end - time(NULL); + if (to < 0) + to = 0; + + n = bt_devrecv(s, buf, sizeof(buf), to); + if (n < 0) { + error = errno; + goto out; + } + + if (e->type != NG_HCI_EVENT_PKT) { + error = EIO; + goto out; + } + + n -= sizeof(*e); + + switch (e->event) { + case NG_HCI_EVENT_COMMAND_COMPL: + if (cc->opcode == opcode) { + n -= sizeof(*cc); + + if (r->rlen >= n) { + r->rlen = n; + memcpy(r->rparam, cc + 1, r->rlen); + } + + goto out; + } + break; + + case NG_HCI_EVENT_COMMAND_STATUS: + if (cs->opcode == opcode) { + if (r->event != NG_HCI_EVENT_COMMAND_STATUS) { + if (cs->status != 0) { + error = EIO; + goto out; + } + } else { + if (r->rlen >= n) { + r->rlen = n; + memcpy(r->rparam, cs, r->rlen); + } + + goto out; + } + } + break; + + default: + if (e->event == r->event) { + if (r->rlen >= n) { + r->rlen = n; + memcpy(r->rparam, e + 1, r->rlen); + } + + goto out; + } + break; + } + } while (to > 0); + + error = ETIMEDOUT; +out: + bt_devfilter(s, &old, NULL); + + if (error != 0) { + errno = error; + return (-1); + } + + return (0); +} + +int +bt_devfilter(int s, struct bt_devfilter const *new, struct bt_devfilter *old) +{ + struct ng_btsocket_hci_raw_filter f; + socklen_t len; + + if (new == NULL && old == NULL) { + errno = EINVAL; + return (-1); + } + + if (old != NULL) { + len = sizeof(f); + if (getsockopt(s, SOL_HCI_RAW, SO_HCI_RAW_FILTER, &f, &len) < 0) + return (-1); + + memset(old, 0, sizeof(*old)); + memcpy(old->packet_mask, &f.packet_mask, + MIN(sizeof(old->packet_mask), sizeof(f.packet_mask))); + memcpy(old->event_mask, &f.event_mask, + MIN(sizeof(old->event_mask), sizeof(f.packet_mask))); + } + + if (new != NULL) { + memset(&f, 0, sizeof(f)); + memcpy(&f.packet_mask, new->packet_mask, + MIN(sizeof(f.packet_mask), sizeof(new->event_mask))); + memcpy(&f.event_mask, new->event_mask, + MIN(sizeof(f.event_mask), sizeof(new->event_mask))); + + len = sizeof(f); + if (setsockopt(s, SOL_HCI_RAW, SO_HCI_RAW_FILTER, &f, len) < 0) + return (-1); + } + + return (0); +} + +void +bt_devfilter_pkt_set(struct bt_devfilter *filter, uint8_t type) +{ + bit_set(filter->packet_mask, type - 1); +} + +void +bt_devfilter_pkt_clr(struct bt_devfilter *filter, uint8_t type) +{ + bit_clear(filter->packet_mask, type - 1); +} + +int +bt_devfilter_pkt_tst(struct bt_devfilter const *filter, uint8_t type) +{ + return (bit_test(filter->packet_mask, type - 1)); +} + +void +bt_devfilter_evt_set(struct bt_devfilter *filter, uint8_t event) +{ + bit_set(filter->event_mask, event - 1); +} + +void +bt_devfilter_evt_clr(struct bt_devfilter *filter, uint8_t event) +{ + bit_clear(filter->event_mask, event - 1); +} + +int +bt_devfilter_evt_tst(struct bt_devfilter const *filter, uint8_t event) +{ + return (bit_test(filter->event_mask, event - 1)); +} + +int +bt_devinquiry(char const *devname, time_t length, int num_rsp, + struct bt_devinquiry **ii) +{ + uint8_t buf[320]; + char _devname[HCI_DEVNAME_SIZE]; + struct bt_devfilter f; + ng_hci_inquiry_cp *cp = (ng_hci_inquiry_cp *) buf; + ng_hci_event_pkt_t *e = (ng_hci_event_pkt_t *) buf; + ng_hci_inquiry_result_ep *ep = (ng_hci_inquiry_result_ep *)(e+1); + ng_hci_inquiry_response *ir; + struct bt_devinquiry *i; + int s, n; + time_t to; + + if (ii == NULL) { + errno = EINVAL; + return (-1); + } + + if (devname == NULL) { + memset(_devname, 0, sizeof(_devname)); + devname = _devname; + + n = bt_devenum(bt_devany_cb, _devname); + if (n <= 0) { + if (n == 0) + *ii = NULL; + + return (n); + } + } + + s = bt_devopen(devname); + if (s < 0) + return (-1); + + if (bt_devfilter(s, NULL, &f) < 0) { + bt_devclose(s); + return (-1); + } + + bt_devfilter_evt_set(&f, NG_HCI_EVENT_INQUIRY_COMPL); + bt_devfilter_evt_set(&f, NG_HCI_EVENT_INQUIRY_RESULT); + + if (bt_devfilter(s, &f, NULL) < 0) { + bt_devclose(s); + return (-1); + } + + /* Always use GIAC LAP */ + cp->lap[0] = 0x33; + cp->lap[1] = 0x8b; + cp->lap[2] = 0x9e; + + /* Calculate inquire length in 1.28 second units */ + to = (time_t) ((double) length / 1.28); + if (to <= 0) + cp->inquiry_length = 4; /* 5.12 seconds */ + else if (to > 254) + cp->inquiry_length = 255; /* 326.40 seconds */ + else + cp->inquiry_length = to + 1; + + to = (time_t)((double) cp->inquiry_length * 1.28) + 1; + + if (num_rsp <= 0 || num_rsp > 255) + num_rsp = 8; + cp->num_responses = (uint8_t) num_rsp; + + i = *ii = calloc(num_rsp, sizeof(struct bt_devinquiry)); + if (i == NULL) { + bt_devclose(s); + errno = ENOMEM; + return (-1); + } + + if (bt_devsend(s, + NG_HCI_OPCODE(NG_HCI_OGF_LINK_CONTROL, NG_HCI_OCF_INQUIRY), + cp, sizeof(*cp)) < 0) { + free(i); + bt_devclose(s); + return (-1); + } + +wait_for_more: + + n = bt_devrecv(s, buf, sizeof(buf), to); + if (n < 0) { + free(i); + bt_devclose(s); + return (-1); + } + + if (n < sizeof(ng_hci_event_pkt_t)) { + free(i); + bt_devclose(s); + errno = EIO; + return (-1); + } + + switch (e->event) { + case NG_HCI_EVENT_INQUIRY_COMPL: + break; + + case NG_HCI_EVENT_INQUIRY_RESULT: + ir = (ng_hci_inquiry_response *)(ep + 1); + + for (n = 0; n < MIN(ep->num_responses, num_rsp); n ++) { + bdaddr_copy(&i->bdaddr, &ir->bdaddr); + i->pscan_rep_mode = ir->page_scan_rep_mode; + i->pscan_period_mode = ir->page_scan_period_mode; + memcpy(i->dev_class, ir->uclass, sizeof(i->dev_class)); + i->clock_offset = le16toh(ir->clock_offset); + + ir ++; + i ++; + num_rsp --; + } + /* FALLTHROUGH */ + + default: + goto wait_for_more; + /* NOT REACHED */ + } + + bt_devclose(s); + + return (i - *ii); +} + +int bt_devinfo(struct bt_devinfo *di) { union { @@ -53,6 +543,7 @@ bt_devinfo(struct bt_devinfo *di) struct ng_btsocket_hci_raw_node_debug r8; } rp; struct sockaddr_hci ha; + socklen_t halen; int s, rval; if (di == NULL) { @@ -60,27 +551,14 @@ bt_devinfo(struct bt_devinfo *di) return (-1); } - memset(&ha, 0, sizeof(ha)); - ha.hci_len = sizeof(ha); - ha.hci_family = AF_BLUETOOTH; - - if (bt_aton(di->devname, &rp.r1.bdaddr)) { - if (!bt_devname(ha.hci_node, &rp.r1.bdaddr)) - return (-1); - } else if (bt_dev2node(di->devname, ha.hci_node, - sizeof(ha.hci_node)) == NULL) { - errno = ENXIO; - return (-1); - } - - s = socket(PF_BLUETOOTH, SOCK_RAW, BLUETOOTH_PROTO_HCI); + s = bt_devopen(di->devname); if (s < 0) return (-1); rval = -1; - if (bind(s, (struct sockaddr *) &ha, sizeof(ha)) < 0 || - connect(s, (struct sockaddr *) &ha, sizeof(ha)) < 0) + halen = sizeof(ha); + if (getsockname(s, (struct sockaddr *) &ha, &halen) < 0) goto bad; strlcpy(di->devname, ha.hci_node, sizeof(di->devname)); @@ -138,7 +616,7 @@ bt_devinfo(struct bt_devinfo *di) rval = 0; bad: - close(s); + bt_devclose(s); return (rval); } @@ -205,6 +683,13 @@ bt_devenum(bt_devenum_cb_t cb, void *arg return (count); } +static int +bt_devany_cb(int s, struct bt_devinfo const *di, void *xdevname) +{ + strlcpy((char *) xdevname, di->devname, HCI_DEVNAME_SIZE); + return (1); +} + static char * bt_dev2node(char const *devname, char *nodename, int nnlen) { From owner-svn-src-all@FreeBSD.ORG Mon May 4 21:00:44 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BD031065676; Mon, 4 May 2009 21:00:44 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 28AA68FC20; Mon, 4 May 2009 21:00:44 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n44L0ia4057078; Mon, 4 May 2009 21:00:44 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n44L0icR057077; Mon, 4 May 2009 21:00:44 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <200905042100.n44L0icR057077@svn.freebsd.org> From: Maksim Yevmenkin Date: Mon, 4 May 2009 21:00:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191798 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/syscons X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 21:00:45 -0000 Author: emax Date: Mon May 4 21:00:43 2009 New Revision: 191798 URL: http://svn.freebsd.org/changeset/base/191798 Log: MFC r190868 Remove obsolete/bogus layering. Reviewed by: freebsd-current@, freebsd-hackers@ Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/syscons/syscons.c Modified: stable/7/sys/dev/syscons/syscons.c ============================================================================== --- stable/7/sys/dev/syscons/syscons.c Mon May 4 20:53:19 2009 (r191797) +++ stable/7/sys/dev/syscons/syscons.c Mon May 4 21:00:43 2009 (r191798) @@ -184,7 +184,6 @@ static void scshutdown(void *arg, int ho static u_int scgetc(sc_softc_t *sc, u_int flags); #define SCGETC_CN 1 #define SCGETC_NONBLOCK 2 -static int sccngetch(int flags); static void sccnupdate(scr_stat *scp); static scr_stat *alloc_scp(sc_softc_t *sc, int vty); static void init_scp(sc_softc_t *sc, int vty, scr_stat *scp); @@ -1569,12 +1568,6 @@ sc_cnputc(struct consdev *cd, int c) static int sc_cngetc(struct consdev *cd) { - return sccngetch(SCGETC_NONBLOCK); -} - -static int -sccngetch(int flags) -{ static struct fkeytab fkey; static int fkeycp; scr_stat *scp; @@ -1615,7 +1608,7 @@ sccngetch(int flags) kbd_ioctl(scp->sc->kbd, KDSKBMODE, (caddr_t)&scp->kbd_mode); kbd_poll(scp->sc->kbd, TRUE); - c = scgetc(scp->sc, SCGETC_CN | flags); + c = scgetc(scp->sc, SCGETC_CN | SCGETC_NONBLOCK); kbd_poll(scp->sc->kbd, FALSE); scp->kbd_mode = cur_mode; From owner-svn-src-all@FreeBSD.ORG Mon May 4 21:04:29 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8416F106566B; Mon, 4 May 2009 21:04:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F4B38FC12; Mon, 4 May 2009 21:04:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n44L4Tbb057211; Mon, 4 May 2009 21:04:29 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n44L4TcW057206; Mon, 4 May 2009 21:04:29 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200905042104.n44L4TcW057206@svn.freebsd.org> From: John Baldwin Date: Mon, 4 May 2009 21:04:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191799 - in stable/7/sys: . amd64/include amd64/pci contrib/pf dev/acpica dev/ath/ath_hal dev/cxgb i386/include i386/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 21:04:30 -0000 Author: jhb Date: Mon May 4 21:04:29 2009 New Revision: 191799 URL: http://svn.freebsd.org/changeset/base/191799 Log: MFC: Expand the support for PCI-e memory mapped configuration space access. Note that unlike in HEAD, this defaults to off and must be explicitly enabled by setting the loader tunable hw.pci.mcfg=1. - Add support for the Intel 915GM chipsets by reading the BAR. - Add parsing of the ACPI MCFG table to discover memory mapped configuration access on modern machines. - Port the memory mapped config acess to amd64. On amd64 it uses the direct map. - For config requests to busses not listed in ACPI's min/max valid buses, fall back to using type #1 configuration access instead. - Add a workaround for some K8 chipsets that do not expose all devices on bus 0 via MCFG and fall back to type #1 for those devices instead. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/include/pci_cfgreg.h stable/7/sys/amd64/pci/pci_cfgreg.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/acpica/acpi.c stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/include/pci_cfgreg.h stable/7/sys/i386/pci/pci_cfgreg.c Modified: stable/7/sys/amd64/include/pci_cfgreg.h ============================================================================== --- stable/7/sys/amd64/include/pci_cfgreg.h Mon May 4 21:00:43 2009 (r191798) +++ stable/7/sys/amd64/include/pci_cfgreg.h Mon May 4 21:04:29 2009 (r191799) @@ -37,6 +37,7 @@ #define CONF1_ENABLE_MSK1 0x80000001ul #define CONF1_ENABLE_RES1 0x80000000ul +int pcie_cfgregopen(uint64_t base, uint8_t minbus, uint8_t maxbus); int pci_cfgregopen(void); u_int32_t pci_cfgregread(int bus, int slot, int func, int reg, int bytes); void pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes); Modified: stable/7/sys/amd64/pci/pci_cfgreg.c ============================================================================== --- stable/7/sys/amd64/pci/pci_cfgreg.c Mon May 4 21:00:43 2009 (r191798) +++ stable/7/sys/amd64/pci/pci_cfgreg.c Mon May 4 21:04:29 2009 (r191799) @@ -33,15 +33,36 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include +#include +#include #include +enum { + CFGMECH_NONE = 0, + CFGMECH_1, + CFGMECH_PCIE, +}; + +static uint32_t pci_docfgregread(int bus, int slot, int func, int reg, + int bytes); +static int pciereg_cfgread(int bus, unsigned slot, unsigned func, + unsigned reg, unsigned bytes); +static void pciereg_cfgwrite(int bus, unsigned slot, unsigned func, + unsigned reg, int data, unsigned bytes); static int pcireg_cfgread(int bus, int slot, int func, int reg, int bytes); static void pcireg_cfgwrite(int bus, int slot, int func, int reg, int data, int bytes); +static int cfgmech; +static vm_offset_t pcie_base; +static int pcie_minbus, pcie_maxbus; +static uint32_t pcie_badslots; static struct mtx pcicfg_mtx; +static int mcfg_enable = 0; +TUNABLE_INT("hw.pci.mcfg", &mcfg_enable); /* * Initialise access to PCI configuration space @@ -49,15 +70,62 @@ static struct mtx pcicfg_mtx; int pci_cfgregopen(void) { - static int opened = 0; + static int once = 0; + uint64_t pciebar; + uint16_t did, vid; + + if (!once) { + mtx_init(&pcicfg_mtx, "pcicfg", NULL, MTX_SPIN); + once = 1; + } - if (opened) + if (cfgmech != CFGMECH_NONE) return (1); - mtx_init(&pcicfg_mtx, "pcicfg", NULL, MTX_SPIN); - opened = 1; + cfgmech = CFGMECH_1; + + /* + * Grope around in the PCI config space to see if this is a + * chipset that is capable of doing memory-mapped config cycles. + * This also implies that it can do PCIe extended config cycles. + */ + + /* Check for supported chipsets */ + vid = pci_cfgregread(0, 0, 0, PCIR_VENDOR, 2); + did = pci_cfgregread(0, 0, 0, PCIR_DEVICE, 2); + switch (vid) { + case 0x8086: + switch (did) { + case 0x3590: + case 0x3592: + /* Intel 7520 or 7320 */ + pciebar = pci_cfgregread(0, 0, 0, 0xce, 2) << 16; + pcie_cfgregopen(pciebar, 0, 255); + break; + case 0x2580: + case 0x2584: + case 0x2590: + /* Intel 915, 925, or 915GM */ + pciebar = pci_cfgregread(0, 0, 0, 0x48, 4); + pcie_cfgregopen(pciebar, 0, 255); + break; + } + } + return (1); } +static uint32_t +pci_docfgregread(int bus, int slot, int func, int reg, int bytes) +{ + + if (cfgmech == CFGMECH_PCIE && + (bus >= pcie_minbus && bus <= pcie_maxbus) && + (bus != 0 || !(1 << slot & pcie_badslots))) + return (pciereg_cfgread(bus, slot, func, reg, bytes)); + else + return (pcireg_cfgread(bus, slot, func, reg, bytes)); +} + /* * Read configuration space register */ @@ -75,12 +143,12 @@ pci_cfgregread(int bus, int slot, int fu * as an invalid IRQ. */ if (reg == PCIR_INTLINE && bytes == 1) { - line = pcireg_cfgread(bus, slot, func, PCIR_INTLINE, 1); + line = pci_docfgregread(bus, slot, func, PCIR_INTLINE, 1); if (line == 0 || line >= 128) line = PCI_INVALID_IRQ; return (line); } - return (pcireg_cfgread(bus, slot, func, reg, bytes)); + return (pci_docfgregread(bus, slot, func, reg, bytes)); } /* @@ -90,7 +158,12 @@ void pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes) { - pcireg_cfgwrite(bus, slot, func, reg, data, bytes); + if (cfgmech == CFGMECH_PCIE && + (bus >= pcie_minbus && bus <= pcie_maxbus) && + (bus != 0 || !(1 << slot & pcie_badslots))) + pciereg_cfgwrite(bus, slot, func, reg, data, bytes); + else + pcireg_cfgwrite(bus, slot, func, reg, data, bytes); } /* @@ -173,3 +246,106 @@ pcireg_cfgwrite(int bus, int slot, int f } mtx_unlock_spin(&pcicfg_mtx); } + +int +pcie_cfgregopen(uint64_t base, uint8_t minbus, uint8_t maxbus) +{ + uint32_t val1, val2; + int slot; + + if (!mcfg_enable) + return (0); + + if (minbus != 0) + return (0); + + if (bootverbose) + printf("PCIe: Memory Mapped configuration base @ 0x%lx\n", + base); + + /* XXX: We should make sure this really fits into the direct map. */ + pcie_base = (vm_offset_t)pmap_mapdev(base, (maxbus + 1) << 20); + pcie_minbus = minbus; + pcie_maxbus = maxbus; + cfgmech = CFGMECH_PCIE; + + /* + * On some AMD systems, some of the devices on bus 0 are + * inaccessible using memory-mapped PCI config access. Walk + * bus 0 looking for such devices. For these devices, we will + * fall back to using type 1 config access instead. + */ + if (pci_cfgregopen() != 0) { + for (slot = 0; slot < 32; slot++) { + val1 = pcireg_cfgread(0, slot, 0, 0, 4); + if (val1 == 0xffffffff) + continue; + + val2 = pciereg_cfgread(0, slot, 0, 0, 4); + if (val2 != val1) + pcie_badslots |= (1 << slot); + } + } + + return (1); +} + +#define PCIE_VADDR(base, reg, bus, slot, func) \ + ((base) + \ + ((((bus) & 0xff) << 20) | \ + (((slot) & 0x1f) << 15) | \ + (((func) & 0x7) << 12) | \ + ((reg) & 0xfff))) + +static int +pciereg_cfgread(int bus, unsigned slot, unsigned func, unsigned reg, + unsigned bytes) +{ + volatile vm_offset_t va; + int data = -1; + + if (bus < pcie_minbus || bus > pcie_maxbus || slot >= 32 || + func > PCI_FUNCMAX || reg >= 0x1000) + return (-1); + + va = PCIE_VADDR(pcie_base, reg, bus, slot, func); + + switch (bytes) { + case 4: + data = *(volatile uint32_t *)(va); + break; + case 2: + data = *(volatile uint16_t *)(va); + break; + case 1: + data = *(volatile uint8_t *)(va); + break; + } + + return (data); +} + +static void +pciereg_cfgwrite(int bus, unsigned slot, unsigned func, unsigned reg, int data, + unsigned bytes) +{ + volatile vm_offset_t va; + + if (bus < pcie_minbus || bus > pcie_maxbus || slot >= 32 || + func > PCI_FUNCMAX || reg >= 0x1000) + return; + + va = PCIE_VADDR(pcie_base, reg, bus, slot, func); + + switch (bytes) { + case 4: + *(volatile uint32_t *)(va) = data; + break; + case 2: + *(volatile uint16_t *)(va) = data; + break; + case 1: + *(volatile uint8_t *)(va) = data; + break; + } +} Modified: stable/7/sys/dev/acpica/acpi.c ============================================================================== --- stable/7/sys/dev/acpica/acpi.c Mon May 4 21:00:43 2009 (r191798) +++ stable/7/sys/dev/acpica/acpi.c Mon May 4 21:04:29 2009 (r191799) @@ -48,6 +48,9 @@ __FBSDID("$FreeBSD$"); #include #include +#if defined(__i386__) || defined(__amd64__) +#include +#endif #include #include #include @@ -153,6 +156,9 @@ static int acpi_child_location_str_metho char *buf, size_t buflen); static int acpi_child_pnpinfo_str_method(device_t acdev, device_t child, char *buf, size_t buflen); +#if defined(__i386__) || defined(__amd64__) +static void acpi_enable_pcie(void); +#endif static device_method_t acpi_methods[] = { /* Device interface */ @@ -455,6 +461,11 @@ acpi_attach(device_t dev) goto out; } +#if defined(__i386__) || defined(__amd64__) + /* Handle MCFG table if present. */ + acpi_enable_pcie(); +#endif + /* Install the default address space handlers. */ status = AcpiInstallAddressSpaceHandler(ACPI_ROOT_OBJECT, ACPI_ADR_SPACE_SYSTEM_MEMORY, ACPI_DEFAULT_HANDLER, NULL, NULL); @@ -1473,6 +1484,36 @@ acpi_isa_pnp_probe(device_t bus, device_ return_VALUE (result); } +#if defined(__i386__) || defined(__amd64__) +/* + * Look for a MCFG table. If it is present, use the settings for + * domain (segment) 0 to setup PCI config space access via the memory + * map. + */ +static void +acpi_enable_pcie(void) +{ + ACPI_TABLE_HEADER *hdr; + ACPI_MCFG_ALLOCATION *alloc, *end; + ACPI_STATUS status; + + status = AcpiGetTable(ACPI_SIG_MCFG, 1, &hdr); + if (ACPI_FAILURE(status)) + return; + + end = (ACPI_MCFG_ALLOCATION *)((char *)hdr + hdr->Length); + alloc = (ACPI_MCFG_ALLOCATION *)((ACPI_TABLE_MCFG *)hdr + 1); + while (alloc < end) { + if (alloc->PciSegment == 0) { + pcie_cfgregopen(alloc->Address, alloc->StartBusNumber, + alloc->EndBusNumber); + return; + } + alloc++; + } +} +#endif + /* * Scan all of the ACPI namespace and attach child devices. * Modified: stable/7/sys/i386/include/pci_cfgreg.h ============================================================================== --- stable/7/sys/i386/include/pci_cfgreg.h Mon May 4 21:00:43 2009 (r191798) +++ stable/7/sys/i386/include/pci_cfgreg.h Mon May 4 21:04:29 2009 (r191799) @@ -43,6 +43,7 @@ #define CONF2_ENABLE_CHK 0x0e #define CONF2_ENABLE_RES 0x0e +int pcie_cfgregopen(uint64_t base, uint8_t minbus, uint8_t maxbus); int pci_cfgregopen(void); u_int32_t pci_cfgregread(int bus, int slot, int func, int reg, int bytes); void pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes); Modified: stable/7/sys/i386/pci/pci_cfgreg.c ============================================================================== --- stable/7/sys/i386/pci/pci_cfgreg.c Mon May 4 21:00:43 2009 (r191798) +++ stable/7/sys/i386/pci/pci_cfgreg.c Mon May 4 21:04:29 2009 (r191799) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -75,20 +76,24 @@ enum { }; static TAILQ_HEAD(pcie_cfg_list, pcie_cfg_elem) pcie_list[MAXCPU]; -static uint32_t pciebar; +static uint64_t pcie_base; +static int pcie_minbus, pcie_maxbus; +static uint32_t pcie_badslots; static int cfgmech; static int devmax; static struct mtx pcicfg_mtx; +static int mcfg_enable = 0; +TUNABLE_INT("hw.pci.mcfg", &mcfg_enable); +static uint32_t pci_docfgregread(int bus, int slot, int func, int reg, + int bytes); static int pcireg_cfgread(int bus, int slot, int func, int reg, int bytes); static void pcireg_cfgwrite(int bus, int slot, int func, int reg, int data, int bytes); static int pcireg_cfgopen(void); - -static int pciereg_cfgopen(void); -static int pciereg_cfgread(int bus, int slot, int func, int reg, - int bytes); -static void pciereg_cfgwrite(int bus, int slot, int func, int reg, - int data, int bytes); +static int pciereg_cfgread(int bus, unsigned slot, unsigned func, + unsigned reg, unsigned bytes); +static void pciereg_cfgwrite(int bus, unsigned slot, unsigned func, + unsigned reg, int data, unsigned bytes); /* * Some BIOS writers seem to want to ignore the spec and put @@ -133,14 +138,15 @@ int pci_cfgregopen(void) { static int opened = 0; + uint64_t pciebar; u_int16_t vid, did; u_int16_t v; if (opened) - return(1); + return (1); - if (pcireg_cfgopen() == 0) - return(0); + if (cfgmech == CFGMECH_NONE && pcireg_cfgopen() == 0) + return (0); v = pcibios_get_version(); if (v > 0) @@ -153,6 +159,9 @@ pci_cfgregopen(void) if (v >= 0x0210) pci_pir_open(); + if (cfgmech == CFGMECH_PCIE) + return (1); + /* * Grope around in the PCI config space to see if this is a * chipset that is capable of doing memory-mapped config cycles. @@ -162,21 +171,40 @@ pci_cfgregopen(void) /* Check for supported chipsets */ vid = pci_cfgregread(0, 0, 0, PCIR_VENDOR, 2); did = pci_cfgregread(0, 0, 0, PCIR_DEVICE, 2); - if (vid == 0x8086) { - if (did == 0x3590 || did == 0x3592) { + switch (vid) { + case 0x8086: + switch (did) { + case 0x3590: + case 0x3592: /* Intel 7520 or 7320 */ pciebar = pci_cfgregread(0, 0, 0, 0xce, 2) << 16; - pciereg_cfgopen(); - } else if (did == 0x2580 || did == 0x2584) { - /* Intel 915 or 925 */ + pcie_cfgregopen(pciebar, 0, 255); + break; + case 0x2580: + case 0x2584: + case 0x2590: + /* Intel 915, 925, or 915GM */ pciebar = pci_cfgregread(0, 0, 0, 0x48, 4); - pciereg_cfgopen(); + pcie_cfgregopen(pciebar, 0, 255); + break; } } return(1); } +static uint32_t +pci_docfgregread(int bus, int slot, int func, int reg, int bytes) +{ + + if (cfgmech == CFGMECH_PCIE && + (bus >= pcie_minbus && bus <= pcie_maxbus) && + (bus != 0 || !(1 << slot & pcie_badslots))) + return (pciereg_cfgread(bus, slot, func, reg, bytes)); + else + return (pcireg_cfgread(bus, slot, func, reg, bytes)); +} + /* * Read configuration space register */ @@ -191,10 +219,10 @@ pci_cfgregread(int bus, int slot, int fu * the code uses 255 as an invalid IRQ. */ if (reg == PCIR_INTLINE && bytes == 1) { - line = pcireg_cfgread(bus, slot, func, PCIR_INTLINE, 1); + line = pci_docfgregread(bus, slot, func, PCIR_INTLINE, 1); return (pci_i386_map_intline(line)); } - return (pcireg_cfgread(bus, slot, func, reg, bytes)); + return (pci_docfgregread(bus, slot, func, reg, bytes)); } /* @@ -204,7 +232,12 @@ void pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes) { - pcireg_cfgwrite(bus, slot, func, reg, data, bytes); + if (cfgmech == CFGMECH_PCIE && + (bus >= pcie_minbus && bus <= pcie_maxbus) && + (bus != 0 || !(1 << slot & pcie_badslots))) + pciereg_cfgwrite(bus, slot, func, reg, data, bytes); + else + pcireg_cfgwrite(bus, slot, func, reg, data, bytes); } /* @@ -258,6 +291,7 @@ pci_cfgenable(unsigned bus, unsigned slo && (unsigned) bytes <= 4 && (reg & (bytes - 1)) == 0) { switch (cfgmech) { + case CFGMECH_PCIE: case CFGMECH_1: outl(CONF1_ADDR_PORT, (1 << 31) | (bus << 16) | (slot << 11) @@ -279,6 +313,7 @@ static void pci_cfgdisable(void) { switch (cfgmech) { + case CFGMECH_PCIE: case CFGMECH_1: /* * Do nothing for the config mechanism 1 case. @@ -299,11 +334,6 @@ pcireg_cfgread(int bus, int slot, int fu int data = -1; int port; - if (cfgmech == CFGMECH_PCIE) { - data = pciereg_cfgread(bus, slot, func, reg, bytes); - return (data); - } - mtx_lock_spin(&pcicfg_mtx); port = pci_cfgenable(bus, slot, func, reg, bytes); if (port != 0) { @@ -329,11 +359,6 @@ pcireg_cfgwrite(int bus, int slot, int f { int port; - if (cfgmech == CFGMECH_PCIE) { - pciereg_cfgwrite(bus, slot, func, reg, data, bytes); - return; - } - mtx_lock_spin(&pcicfg_mtx); port = pci_cfgenable(bus, slot, func, reg, bytes); if (port != 0) { @@ -481,8 +506,8 @@ pcireg_cfgopen(void) return (cfgmech); } -static int -pciereg_cfgopen(void) +int +pcie_cfgregopen(uint64_t base, uint8_t minbus, uint8_t maxbus) { struct pcie_cfg_list *pcielist; struct pcie_cfg_elem *pcie_array, *elem; @@ -490,10 +515,28 @@ pciereg_cfgopen(void) struct pcpu *pc; #endif vm_offset_t va; - int i; + uint32_t val1, val2; + int i, slot; + if (!mcfg_enable) + return (0); + + if (minbus != 0) + return (0); + +#ifndef PAE + if (base >= 0x100000000) { + if (bootverbose) + printf( + "PCI: Memory Mapped PCI configuration area base 0x%jx too high\n", + (uintmax_t)base); + return (0); + } +#endif + if (bootverbose) - printf("Setting up PCIe mappings for BAR 0x%x\n", pciebar); + printf("PCIe: Memory Mapped configuration base @ 0x%jx\n", + (uintmax_t)base); #ifdef SMP SLIST_FOREACH(pc, &cpuhead, pc_allcpu) @@ -525,9 +568,30 @@ pciereg_cfgopen(void) } } - + pcie_base = base; + pcie_minbus = minbus; + pcie_maxbus = maxbus; cfgmech = CFGMECH_PCIE; devmax = 32; + + /* + * On some AMD systems, some of the devices on bus 0 are + * inaccessible using memory-mapped PCI config access. Walk + * bus 0 looking for such devices. For these devices, we will + * fall back to using type 1 config access instead. + */ + if (pci_cfgregopen() != 0) { + for (slot = 0; slot < 32; slot++) { + val1 = pcireg_cfgread(0, slot, 0, 0, 4); + if (val1 == 0xffffffff) + continue; + + val2 = pciereg_cfgread(0, slot, 0, 0, 4); + if (val2 != val1) + pcie_badslots |= (1 << slot); + } + } + return (1); } @@ -574,15 +638,20 @@ pciereg_findelem(vm_paddr_t papage) } static int -pciereg_cfgread(int bus, int slot, int func, int reg, int bytes) +pciereg_cfgread(int bus, unsigned slot, unsigned func, unsigned reg, + unsigned bytes) { struct pcie_cfg_elem *elem; volatile vm_offset_t va; vm_paddr_t pa, papage; - int data; + int data = -1; + + if (bus < pcie_minbus || bus > pcie_maxbus || slot >= 32 || + func > PCI_FUNCMAX || reg >= 0x1000 || bytes > 4 || bytes == 3) + return (-1); critical_enter(); - pa = PCIE_PADDR(pciebar, reg, bus, slot, func); + pa = PCIE_PADDR(pcie_base, reg, bus, slot, func); papage = pa & ~PAGE_MASK; elem = pciereg_findelem(papage); va = elem->vapage | (pa & PAGE_MASK); @@ -597,8 +666,6 @@ pciereg_cfgread(int bus, int slot, int f case 1: data = *(volatile uint8_t *)(va); break; - default: - panic("pciereg_cfgread: invalid width"); } critical_exit(); @@ -606,14 +673,19 @@ pciereg_cfgread(int bus, int slot, int f } static void -pciereg_cfgwrite(int bus, int slot, int func, int reg, int data, int bytes) +pciereg_cfgwrite(int bus, unsigned slot, unsigned func, unsigned reg, int data, + unsigned bytes) { struct pcie_cfg_elem *elem; volatile vm_offset_t va; vm_paddr_t pa, papage; + if (bus < pcie_minbus || bus > pcie_maxbus || slot >= 32 || + func > PCI_FUNCMAX || reg >= 0x1000) + return; + critical_enter(); - pa = PCIE_PADDR(pciebar, reg, bus, slot, func); + pa = PCIE_PADDR(pcie_base, reg, bus, slot, func); papage = pa & ~PAGE_MASK; elem = pciereg_findelem(papage); va = elem->vapage | (pa & PAGE_MASK); @@ -628,8 +700,6 @@ pciereg_cfgwrite(int bus, int slot, int case 1: *(volatile uint8_t *)(va) = data; break; - default: - panic("pciereg_cfgwrite: invalid width"); } critical_exit(); From owner-svn-src-all@FreeBSD.ORG Mon May 4 21:13:06 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 817AC106564A; Mon, 4 May 2009 21:13:06 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EE088FC1A; Mon, 4 May 2009 21:13:06 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n44LD6pQ057441; Mon, 4 May 2009 21:13:06 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n44LD6gt057440; Mon, 4 May 2009 21:13:06 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <200905042113.n44LD6gt057440@svn.freebsd.org> From: Maksim Yevmenkin Date: Mon, 4 May 2009 21:13:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191800 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/kbd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 21:13:07 -0000 Author: emax Date: Mon May 4 21:13:06 2009 New Revision: 191800 URL: http://svn.freebsd.org/changeset/base/191800 Log: MFC r190869 Introduce KB_POLLED flag to struct keyboard's kb_flags field. Reviewed by: freebsd-current@, freebsd-hackers@ Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/kbd/kbdreg.h Modified: stable/7/sys/dev/kbd/kbdreg.h ============================================================================== --- stable/7/sys/dev/kbd/kbdreg.h Mon May 4 21:04:29 2009 (r191799) +++ stable/7/sys/dev/kbd/kbdreg.h Mon May 4 21:13:06 2009 (r191800) @@ -60,6 +60,7 @@ struct keyboard { #define KB_INITIALIZED (1 << 19) /* device initialized */ #define KB_REGISTERED (1 << 20) /* device registered to kbdio */ #define KB_BUSY (1 << 21) /* device used by a client */ +#define KB_POLLED (1 << 22) /* device is polled */ int kb_active; /* 0: inactive */ void *kb_token; /* id of the current client */ keyboard_callback_t kb_callback;/* callback function */ @@ -107,6 +108,9 @@ struct keyboard { #define KBD_IS_BUSY(k) ((k)->kb_flags & KB_BUSY) #define KBD_BUSY(k) ((k)->kb_flags |= KB_BUSY) #define KBD_UNBUSY(k) ((k)->kb_flags &= ~KB_BUSY) +#define KBD_IS_POLLED(k) ((k)->kb_flags & KB_POLLED) +#define KBD_POLL(k) ((k)->kb_flags |= KB_POLLED) +#define KBD_UNPOLL(k) ((k)->kb_flags &= ~KB_POLLED) #define KBD_IS_ACTIVE(k) ((k)->kb_active) #define KBD_ACTIVATE(k) (++(k)->kb_active) #define KBD_DEACTIVATE(k) (--(k)->kb_active) From owner-svn-src-all@FreeBSD.ORG Mon May 4 21:58:33 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32389106564A; Mon, 4 May 2009 21:58:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04B5D8FC1D; Mon, 4 May 2009 21:58:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n44LwWvi058515; Mon, 4 May 2009 21:58:32 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n44LwWjX058513; Mon, 4 May 2009 21:58:32 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200905042158.n44LwWjX058513@svn.freebsd.org> From: John Baldwin Date: Mon, 4 May 2009 21:58:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191801 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 21:58:33 -0000 Author: jhb Date: Mon May 4 21:58:32 2009 New Revision: 191801 URL: http://svn.freebsd.org/changeset/base/191801 Log: MFC: When a file lookup fails due to encountering a doomed vnode from a forced unmount, consistently return ENOENT rather than EBADF. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/vfs_cache.c stable/7/sys/kern/vfs_lookup.c Modified: stable/7/sys/kern/vfs_cache.c ============================================================================== --- stable/7/sys/kern/vfs_cache.c Mon May 4 21:13:06 2009 (r191800) +++ stable/7/sys/kern/vfs_cache.c Mon May 4 21:58:32 2009 (r191801) @@ -318,7 +318,7 @@ cache_zap(ncp) * (negative cacheing), a status of ENOENT is returned. If the lookup * fails, a status of zero is returned. If the directory vnode is * recycled out from under us due to a forced unmount, a status of - * EBADF is returned. + * ENOENT is returned. * * vpp is locked and ref'd on return. If we're looking up DOTDOT, dvp is * unlocked. If we're looking up . an extra ref is taken, but the lock is @@ -466,7 +466,7 @@ success: /* forced unmount */ vrele(*vpp); *vpp = NULL; - return (EBADF); + return (ENOENT); } } else vn_lock(*vpp, LK_DOWNGRADE | LK_RETRY, td); @@ -939,7 +939,7 @@ vn_fullpath1(struct thread *td, struct v while (vp != rdir && vp != rootvnode) { if (vp->v_vflag & VV_ROOT) { if (vp->v_iflag & VI_DOOMED) { /* forced unmount */ - error = EBADF; + error = ENOENT; break; } vp = vp->v_mount->mnt_vnodecovered; Modified: stable/7/sys/kern/vfs_lookup.c ============================================================================== --- stable/7/sys/kern/vfs_lookup.c Mon May 4 21:13:06 2009 (r191800) +++ stable/7/sys/kern/vfs_lookup.c Mon May 4 21:58:32 2009 (r191801) @@ -532,7 +532,7 @@ dirloop: if ((dp->v_vflag & VV_ROOT) == 0) break; if (dp->v_iflag & VI_DOOMED) { /* forced unmount */ - error = EBADF; + error = ENOENT; goto bad; } tdp = dp; @@ -691,9 +691,11 @@ unionlookup: *ndp->ni_next == '/')) { cnp->cn_flags |= ISSYMLINK; if (dp->v_iflag & VI_DOOMED) { - /* We can't know whether the directory was mounted with - * NOSYMFOLLOW, so we can't follow safely. */ - error = EBADF; + /* + * We can't know whether the directory was mounted with + * NOSYMFOLLOW, so we can't follow safely. + */ + error = ENOENT; goto bad2; } if (dp->v_mount->mnt_flag & MNT_NOSYMFOLLOW) { From owner-svn-src-all@FreeBSD.ORG Tue May 5 01:13:21 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FADC1065673; Tue, 5 May 2009 01:13:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F24F78FC13; Tue, 5 May 2009 01:13:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n451DK5p062909; Tue, 5 May 2009 01:13:20 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n451DK6D062907; Tue, 5 May 2009 01:13:20 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200905050113.n451DK6D062907@svn.freebsd.org> From: Alexander Motin Date: Tue, 5 May 2009 01:13:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191803 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 May 2009 01:13:21 -0000 Author: mav Date: Tue May 5 01:13:20 2009 New Revision: 191803 URL: http://svn.freebsd.org/changeset/base/191803 Log: Do not try to initialize LAPIC timer if we are not going to use it. It solves assertion, when kernel built with INVARIANTS configured to use i8254 timer. Modified: head/sys/amd64/amd64/local_apic.c head/sys/i386/i386/local_apic.c Modified: head/sys/amd64/amd64/local_apic.c ============================================================================== --- head/sys/amd64/amd64/local_apic.c Mon May 4 23:36:20 2009 (r191802) +++ head/sys/amd64/amd64/local_apic.c Tue May 5 01:13:20 2009 (r191803) @@ -319,7 +319,7 @@ lapic_setup(int boot) } /* We don't setup the timer during boot on the BSP until later. */ - if (!(boot && PCPU_GET(cpuid) == 0)) { + if (!(boot && PCPU_GET(cpuid) == 0) && lapic_timer_hz != 0) { KASSERT(lapic_timer_period != 0, ("lapic%u: zero divisor", lapic_id())); lapic_timer_set_divisor(lapic_timer_divisor); Modified: head/sys/i386/i386/local_apic.c ============================================================================== --- head/sys/i386/i386/local_apic.c Mon May 4 23:36:20 2009 (r191802) +++ head/sys/i386/i386/local_apic.c Tue May 5 01:13:20 2009 (r191803) @@ -321,7 +321,7 @@ lapic_setup(int boot) } /* We don't setup the timer during boot on the BSP until later. */ - if (!(boot && PCPU_GET(cpuid) == 0)) { + if (!(boot && PCPU_GET(cpuid) == 0) && lapic_timer_hz != 0) { KASSERT(lapic_timer_period != 0, ("lapic%u: zero divisor", lapic_id())); lapic_timer_set_divisor(lapic_timer_divisor); From owner-svn-src-all@FreeBSD.ORG Tue May 5 03:49:30 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 921981065676; Tue, 5 May 2009 03:49:30 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 764D38FC08; Tue, 5 May 2009 03:49:30 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n453nUAi066182; Tue, 5 May 2009 03:49:30 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n453nUCR066177; Tue, 5 May 2009 03:49:30 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <200905050349.n453nUCR066177@svn.freebsd.org> From: Dmitry Chagin Date: Tue, 5 May 2009 03:49:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191804 - in stable/7/sys: . amd64/linux32 contrib/pf dev/ath/ath_hal dev/cxgb i386/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 May 2009 03:49:31 -0000 Author: dchagin Date: Tue May 5 03:49:30 2009 New Revision: 191804 URL: http://svn.freebsd.org/changeset/base/191804 Log: Merge r178257 (jkim) from HEAD to stable/7: Add stubs for syscalls introduced in Linux 2.6.17 kernel. Some GNU libc version started using them before 2.6.17 was officially out. Approved by: kib (mentor) Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/linux32/linux32_dummy.c stable/7/sys/amd64/linux32/syscalls.master stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/linux/linux_dummy.c stable/7/sys/i386/linux/syscalls.master Modified: stable/7/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- stable/7/sys/amd64/linux32/linux32_dummy.c Tue May 5 01:13:20 2009 (r191803) +++ stable/7/sys/amd64/linux32/linux32_dummy.c Tue May 5 03:49:30 2009 (r191804) @@ -111,6 +111,12 @@ DUMMY(faccessat); DUMMY(pselect6); DUMMY(ppoll); DUMMY(unshare); +DUMMY(set_robust_list); +DUMMY(get_robust_list); +DUMMY(splice); +DUMMY(sync_file_range); +DUMMY(tee); +DUMMY(vmsplice); #define DUMMY_XATTR(s) \ int \ Modified: stable/7/sys/amd64/linux32/syscalls.master ============================================================================== --- stable/7/sys/amd64/linux32/syscalls.master Tue May 5 01:13:20 2009 (r191803) +++ stable/7/sys/amd64/linux32/syscalls.master Tue May 5 03:49:30 2009 (r191804) @@ -482,3 +482,9 @@ 308 AUE_NULL STD { int linux_pselect6(void); } 309 AUE_NULL STD { int linux_ppoll(void); } 310 AUE_NULL STD { int linux_unshare(void); } +311 AUE_NULL STD { int linux_set_robust_list(void); } +312 AUE_NULL STD { int linux_get_robust_list(void); } +313 AUE_NULL STD { int linux_splice(void); } +314 AUE_NULL STD { int linux_sync_file_range(void); } +315 AUE_NULL STD { int linux_tee(void); } +316 AUE_NULL STD { int linux_vmsplice(void); } Modified: stable/7/sys/i386/linux/linux_dummy.c ============================================================================== --- stable/7/sys/i386/linux/linux_dummy.c Tue May 5 01:13:20 2009 (r191803) +++ stable/7/sys/i386/linux/linux_dummy.c Tue May 5 03:49:30 2009 (r191804) @@ -102,6 +102,12 @@ DUMMY(faccessat); DUMMY(pselect6); DUMMY(ppoll); DUMMY(unshare); +DUMMY(set_robust_list); +DUMMY(get_robust_list); +DUMMY(splice); +DUMMY(sync_file_range); +DUMMY(tee); +DUMMY(vmsplice); #define DUMMY_XATTR(s) \ int \ Modified: stable/7/sys/i386/linux/syscalls.master ============================================================================== --- stable/7/sys/i386/linux/syscalls.master Tue May 5 01:13:20 2009 (r191803) +++ stable/7/sys/i386/linux/syscalls.master Tue May 5 03:49:30 2009 (r191804) @@ -492,3 +492,9 @@ 308 AUE_NULL STD { int linux_pselect6(void); } 309 AUE_NULL STD { int linux_ppoll(void); } 310 AUE_NULL STD { int linux_unshare(void); } +311 AUE_NULL STD { int linux_set_robust_list(void); } +312 AUE_NULL STD { int linux_get_robust_list(void); } +313 AUE_NULL STD { int linux_splice(void); } +314 AUE_NULL STD { int linux_sync_file_range(void); } +315 AUE_NULL STD { int linux_tee(void); } +316 AUE_NULL STD { int linux_vmsplice(void); } From owner-svn-src-all@FreeBSD.ORG Tue May 5 03:51:41 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A194D106567A; Tue, 5 May 2009 03:51:41 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8ECFF8FC1F; Tue, 5 May 2009 03:51:41 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n453pfdw066269; Tue, 5 May 2009 03:51:41 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n453pfbQ066263; Tue, 5 May 2009 03:51:41 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <200905050351.n453pfbQ066263@svn.freebsd.org> From: Dmitry Chagin Date: Tue, 5 May 2009 03:51:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191805 - in stable/7/sys: amd64/linux32 i386/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 May 2009 03:51:42 -0000 Author: dchagin Date: Tue May 5 03:51:41 2009 New Revision: 191805 URL: http://svn.freebsd.org/changeset/base/191805 Log: Regenerate syscall table after r191804. Approved by: kib (mentor) Modified: stable/7/sys/amd64/linux32/linux32_proto.h stable/7/sys/amd64/linux32/linux32_syscall.h stable/7/sys/amd64/linux32/linux32_sysent.c stable/7/sys/i386/linux/linux_proto.h stable/7/sys/i386/linux/linux_syscall.h stable/7/sys/i386/linux/linux_sysent.c Modified: stable/7/sys/amd64/linux32/linux32_proto.h ============================================================================== --- stable/7/sys/amd64/linux32/linux32_proto.h Tue May 5 03:49:30 2009 (r191804) +++ stable/7/sys/amd64/linux32/linux32_proto.h Tue May 5 03:51:41 2009 (r191805) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 184075 2008-10-20 11:15:57Z kib + * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 191804 2009-05-05 03:49:30Z dchagin */ #ifndef _LINUX_SYSPROTO_H_ @@ -936,6 +936,24 @@ struct linux_ppoll_args { struct linux_unshare_args { register_t dummy; }; +struct linux_set_robust_list_args { + register_t dummy; +}; +struct linux_get_robust_list_args { + register_t dummy; +}; +struct linux_splice_args { + register_t dummy; +}; +struct linux_sync_file_range_args { + register_t dummy; +}; +struct linux_tee_args { + register_t dummy; +}; +struct linux_vmsplice_args { + register_t dummy; +}; #define nosys linux_nosys int linux_fork(struct thread *, struct linux_fork_args *); int linux_open(struct thread *, struct linux_open_args *); @@ -1172,6 +1190,12 @@ int linux_faccessat(struct thread *, str int linux_pselect6(struct thread *, struct linux_pselect6_args *); int linux_ppoll(struct thread *, struct linux_ppoll_args *); int linux_unshare(struct thread *, struct linux_unshare_args *); +int linux_set_robust_list(struct thread *, struct linux_set_robust_list_args *); +int linux_get_robust_list(struct thread *, struct linux_get_robust_list_args *); +int linux_splice(struct thread *, struct linux_splice_args *); +int linux_sync_file_range(struct thread *, struct linux_sync_file_range_args *); +int linux_tee(struct thread *, struct linux_tee_args *); +int linux_vmsplice(struct thread *, struct linux_vmsplice_args *); #ifdef COMPAT_43 @@ -1428,6 +1452,12 @@ int linux_unshare(struct thread *, struc #define LINUX_SYS_AUE_linux_pselect6 AUE_NULL #define LINUX_SYS_AUE_linux_ppoll AUE_NULL #define LINUX_SYS_AUE_linux_unshare AUE_NULL +#define LINUX_SYS_AUE_linux_set_robust_list AUE_NULL +#define LINUX_SYS_AUE_linux_get_robust_list AUE_NULL +#define LINUX_SYS_AUE_linux_splice AUE_NULL +#define LINUX_SYS_AUE_linux_sync_file_range AUE_NULL +#define LINUX_SYS_AUE_linux_tee AUE_NULL +#define LINUX_SYS_AUE_linux_vmsplice AUE_NULL #undef PAD_ #undef PADL_ Modified: stable/7/sys/amd64/linux32/linux32_syscall.h ============================================================================== --- stable/7/sys/amd64/linux32/linux32_syscall.h Tue May 5 03:49:30 2009 (r191804) +++ stable/7/sys/amd64/linux32/linux32_syscall.h Tue May 5 03:51:41 2009 (r191805) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 184075 2008-10-20 11:15:57Z kib + * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 191804 2009-05-05 03:49:30Z dchagin */ #define LINUX_SYS_exit 1 @@ -283,4 +283,10 @@ #define LINUX_SYS_linux_pselect6 308 #define LINUX_SYS_linux_ppoll 309 #define LINUX_SYS_linux_unshare 310 -#define LINUX_SYS_MAXSYSCALL 311 +#define LINUX_SYS_linux_set_robust_list 311 +#define LINUX_SYS_linux_get_robust_list 312 +#define LINUX_SYS_linux_splice 313 +#define LINUX_SYS_linux_sync_file_range 314 +#define LINUX_SYS_linux_tee 315 +#define LINUX_SYS_linux_vmsplice 316 +#define LINUX_SYS_MAXSYSCALL 317 Modified: stable/7/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- stable/7/sys/amd64/linux32/linux32_sysent.c Tue May 5 03:49:30 2009 (r191804) +++ stable/7/sys/amd64/linux32/linux32_sysent.c Tue May 5 03:51:41 2009 (r191805) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 184075 2008-10-20 11:15:57Z kib + * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 191804 2009-05-05 03:49:30Z dchagin */ #include "opt_compat.h" @@ -330,4 +330,10 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)linux_pselect6, AUE_NULL, NULL, 0, 0 }, /* 308 = linux_pselect6 */ { 0, (sy_call_t *)linux_ppoll, AUE_NULL, NULL, 0, 0 }, /* 309 = linux_ppoll */ { 0, (sy_call_t *)linux_unshare, AUE_NULL, NULL, 0, 0 }, /* 310 = linux_unshare */ + { 0, (sy_call_t *)linux_set_robust_list, AUE_NULL, NULL, 0, 0 }, /* 311 = linux_set_robust_list */ + { 0, (sy_call_t *)linux_get_robust_list, AUE_NULL, NULL, 0, 0 }, /* 312 = linux_get_robust_list */ + { 0, (sy_call_t *)linux_splice, AUE_NULL, NULL, 0, 0 }, /* 313 = linux_splice */ + { 0, (sy_call_t *)linux_sync_file_range, AUE_NULL, NULL, 0, 0 }, /* 314 = linux_sync_file_range */ + { 0, (sy_call_t *)linux_tee, AUE_NULL, NULL, 0, 0 }, /* 315 = linux_tee */ + { 0, (sy_call_t *)linux_vmsplice, AUE_NULL, NULL, 0, 0 }, /* 316 = linux_vmsplice */ }; Modified: stable/7/sys/i386/linux/linux_proto.h ============================================================================== --- stable/7/sys/i386/linux/linux_proto.h Tue May 5 03:49:30 2009 (r191804) +++ stable/7/sys/i386/linux/linux_proto.h Tue May 5 03:51:41 2009 (r191805) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/i386/linux/syscalls.master 184075 2008-10-20 11:15:57Z kib + * created from FreeBSD: stable/7/sys/i386/linux/syscalls.master 191804 2009-05-05 03:49:30Z dchagin */ #ifndef _LINUX_SYSPROTO_H_ @@ -955,6 +955,24 @@ struct linux_ppoll_args { struct linux_unshare_args { register_t dummy; }; +struct linux_set_robust_list_args { + register_t dummy; +}; +struct linux_get_robust_list_args { + register_t dummy; +}; +struct linux_splice_args { + register_t dummy; +}; +struct linux_sync_file_range_args { + register_t dummy; +}; +struct linux_tee_args { + register_t dummy; +}; +struct linux_vmsplice_args { + register_t dummy; +}; #define nosys linux_nosys int linux_fork(struct thread *, struct linux_fork_args *); int linux_open(struct thread *, struct linux_open_args *); @@ -1192,6 +1210,12 @@ int linux_faccessat(struct thread *, str int linux_pselect6(struct thread *, struct linux_pselect6_args *); int linux_ppoll(struct thread *, struct linux_ppoll_args *); int linux_unshare(struct thread *, struct linux_unshare_args *); +int linux_set_robust_list(struct thread *, struct linux_set_robust_list_args *); +int linux_get_robust_list(struct thread *, struct linux_get_robust_list_args *); +int linux_splice(struct thread *, struct linux_splice_args *); +int linux_sync_file_range(struct thread *, struct linux_sync_file_range_args *); +int linux_tee(struct thread *, struct linux_tee_args *); +int linux_vmsplice(struct thread *, struct linux_vmsplice_args *); #ifdef COMPAT_43 @@ -1449,6 +1473,12 @@ int linux_unshare(struct thread *, struc #define LINUX_SYS_AUE_linux_pselect6 AUE_NULL #define LINUX_SYS_AUE_linux_ppoll AUE_NULL #define LINUX_SYS_AUE_linux_unshare AUE_NULL +#define LINUX_SYS_AUE_linux_set_robust_list AUE_NULL +#define LINUX_SYS_AUE_linux_get_robust_list AUE_NULL +#define LINUX_SYS_AUE_linux_splice AUE_NULL +#define LINUX_SYS_AUE_linux_sync_file_range AUE_NULL +#define LINUX_SYS_AUE_linux_tee AUE_NULL +#define LINUX_SYS_AUE_linux_vmsplice AUE_NULL #undef PAD_ #undef PADL_ Modified: stable/7/sys/i386/linux/linux_syscall.h ============================================================================== --- stable/7/sys/i386/linux/linux_syscall.h Tue May 5 03:49:30 2009 (r191804) +++ stable/7/sys/i386/linux/linux_syscall.h Tue May 5 03:51:41 2009 (r191805) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/i386/linux/syscalls.master 184075 2008-10-20 11:15:57Z kib + * created from FreeBSD: stable/7/sys/i386/linux/syscalls.master 191804 2009-05-05 03:49:30Z dchagin */ #define LINUX_SYS_exit 1 @@ -290,4 +290,10 @@ #define LINUX_SYS_linux_pselect6 308 #define LINUX_SYS_linux_ppoll 309 #define LINUX_SYS_linux_unshare 310 -#define LINUX_SYS_MAXSYSCALL 311 +#define LINUX_SYS_linux_set_robust_list 311 +#define LINUX_SYS_linux_get_robust_list 312 +#define LINUX_SYS_linux_splice 313 +#define LINUX_SYS_linux_sync_file_range 314 +#define LINUX_SYS_linux_tee 315 +#define LINUX_SYS_linux_vmsplice 316 +#define LINUX_SYS_MAXSYSCALL 317 Modified: stable/7/sys/i386/linux/linux_sysent.c ============================================================================== --- stable/7/sys/i386/linux/linux_sysent.c Tue May 5 03:49:30 2009 (r191804) +++ stable/7/sys/i386/linux/linux_sysent.c Tue May 5 03:51:41 2009 (r191805) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/i386/linux/syscalls.master 184075 2008-10-20 11:15:57Z kib + * created from FreeBSD: stable/7/sys/i386/linux/syscalls.master 191804 2009-05-05 03:49:30Z dchagin */ #include @@ -329,4 +329,10 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)linux_pselect6, AUE_NULL, NULL, 0, 0 }, /* 308 = linux_pselect6 */ { 0, (sy_call_t *)linux_ppoll, AUE_NULL, NULL, 0, 0 }, /* 309 = linux_ppoll */ { 0, (sy_call_t *)linux_unshare, AUE_NULL, NULL, 0, 0 }, /* 310 = linux_unshare */ + { 0, (sy_call_t *)linux_set_robust_list, AUE_NULL, NULL, 0, 0 }, /* 311 = linux_set_robust_list */ + { 0, (sy_call_t *)linux_get_robust_list, AUE_NULL, NULL, 0, 0 }, /* 312 = linux_get_robust_list */ + { 0, (sy_call_t *)linux_splice, AUE_NULL, NULL, 0, 0 }, /* 313 = linux_splice */ + { 0, (sy_call_t *)linux_sync_file_range, AUE_NULL, NULL, 0, 0 }, /* 314 = linux_sync_file_range */ + { 0, (sy_call_t *)linux_tee, AUE_NULL, NULL, 0, 0 }, /* 315 = linux_tee */ + { 0, (sy_call_t *)linux_vmsplice, AUE_NULL, NULL, 0, 0 }, /* 316 = linux_vmsplice */ }; From owner-svn-src-all@FreeBSD.ORG Tue May 5 05:49:09 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E34E10656C3; Tue, 5 May 2009 05:49:09 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D3E88FC0A; Tue, 5 May 2009 05:49:09 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n455n9kU068589; Tue, 5 May 2009 05:49:09 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n455n9mU068587; Tue, 5 May 2009 05:49:09 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <200905050549.n455n9mU068587@svn.freebsd.org> From: Jamie Gritton Date: Tue, 5 May 2009 05:49:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191806 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 May 2009 05:49:09 -0000 Author: jamie Date: Tue May 5 05:49:08 2009 New Revision: 191806 URL: http://svn.freebsd.org/changeset/base/191806 Log: Add a constant PR_MAXMETHOD to better define the jail/OSD interface. Reviewed by: dchagin, kib Approved by: bz (mentor) Modified: head/sys/kern/kern_osd.c head/sys/sys/jail.h Modified: head/sys/kern/kern_osd.c ============================================================================== --- head/sys/kern/kern_osd.c Tue May 5 03:51:41 2009 (r191805) +++ head/sys/kern/kern_osd.c Tue May 5 05:49:08 2009 (r191806) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -73,7 +74,7 @@ static osd_method_t *osd_methods[OSD_LAS static u_int osd_nslots[OSD_LAST + 1]; /* (m) */ static osd_destructor_t *osd_destructors[OSD_LAST + 1]; /* (o) */ static const u_int osd_nmethods[OSD_LAST + 1] = { - [OSD_JAIL] = 5, + [OSD_JAIL] = PR_MAXMETHOD, }; static struct sx osd_module_lock[OSD_LAST + 1]; Modified: head/sys/sys/jail.h ============================================================================== --- head/sys/sys/jail.h Tue May 5 03:51:41 2009 (r191805) +++ head/sys/sys/jail.h Tue May 5 05:49:08 2009 (r191806) @@ -189,6 +189,7 @@ struct prison { #define PR_METHOD_SET 2 #define PR_METHOD_CHECK 3 #define PR_METHOD_ATTACH 4 +#define PR_MAXMETHOD 5 /* * Sysctl-set variables that determine global jail policy From owner-svn-src-all@FreeBSD.ORG Tue May 5 07:05:13 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 752C91065670; Tue, 5 May 2009 07:05:13 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 56CDD8FC24; Tue, 5 May 2009 07:05:13 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4575DNH070168; Tue, 5 May 2009 07:05:13 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4575Dtk070167; Tue, 5 May 2009 07:05:13 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200905050705.n4575Dtk070167@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 5 May 2009 07:05:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191807 - stable/7/share/zoneinfo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 May 2009 07:05:14 -0000 Author: edwin Date: Tue May 5 07:05:13 2009 New Revision: 191807 URL: http://svn.freebsd.org/changeset/base/191807 Log: MFC of tzdata2009g: Egypt will have DST till the end of September the coming years. Modified: stable/7/share/zoneinfo/ (props changed) stable/7/share/zoneinfo/africa Modified: stable/7/share/zoneinfo/africa ============================================================================== --- stable/7/share/zoneinfo/africa Tue May 5 05:49:08 2009 (r191806) +++ stable/7/share/zoneinfo/africa Tue May 5 07:05:13 2009 (r191807) @@ -1,4 +1,4 @@ -# @(#)africa 8.18 +# @(#)africa 8.19 #
 
 # This data is by no means authoritative; if you think you know better,
@@ -236,7 +236,46 @@ Rule	Egypt	2007	only	-	Sep	Thu>=1	23:00s
 # unless discontinued, next DST may end Thursday 28 August 2008.
 # From Paul Eggert (2007-08-17):
 # For lack of better info, assume the new rule is last Thursday in August.
-Rule	Egypt	2008	max	-	Aug	lastThu	23:00s	0	-
+
+# From Petr Machata (2009-04-06):
+# The following appeared in Red Hat bugzilla[1] (edited):
+#
+# > $ zdump -v /usr/share/zoneinfo/Africa/Cairo | grep 2009
+# > /usr/share/zoneinfo/Africa/Cairo  Thu Apr 23 21:59:59 2009 UTC =3D Thu =
+# Apr 23
+# > 23:59:59 2009 EET isdst=3D0 gmtoff=3D7200
+# > /usr/share/zoneinfo/Africa/Cairo  Thu Apr 23 22:00:00 2009 UTC =3D Fri =
+# Apr 24
+# > 01:00:00 2009 EEST isdst=3D1 gmtoff=3D10800
+# > /usr/share/zoneinfo/Africa/Cairo  Thu Aug 27 20:59:59 2009 UTC =3D Thu =
+# Aug 27
+# > 23:59:59 2009 EEST isdst=3D1 gmtoff=3D10800
+# > /usr/share/zoneinfo/Africa/Cairo  Thu Aug 27 21:00:00 2009 UTC =3D Thu =
+# Aug 27
+# > 23:00:00 2009 EET isdst=3D0 gmtoff=3D7200
+#
+# > end date should be Thu Sep 24 2009 (Last Thursday in September at 23:59=
+# :59)
+# > http://support.microsoft.com/kb/958729/
+#
+# timeanddate[2] and another site I've found[3] also support that.
+#
+# [1] 
+# https://bugzilla.redhat.com/show_bug.cgi?id=3D492263
+# 
+# [2] 
+# http://www.timeanddate.com/worldclock/clockchange.html?n=3D53
+# 
+# [3] 
+# http://wwp.greenwichmeantime.com/time-zone/africa/egypt/
+# 
+
+# From Arthur David Olson (2009-04-20):
+# In 2009 (and for the next several years), Ramadan ends before the fourth
+# Thursday in September; Egypt is expected to revert to the last Thursday
+# in September.
+Rule	Egypt	2008	only	-	Aug	lastThu	23:00s	0	-
+Rule	Egypt	2009	max	-	Sep	lastThu	23:00s	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Cairo	2:05:00 -	LMT	1900 Oct

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 08:30:39 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 736801065676;
	Tue,  5 May 2009 08:30:39 +0000 (UTC)
	(envelope-from dwmalone@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 61F388FC19;
	Tue,  5 May 2009 08:30:39 +0000 (UTC)
	(envelope-from dwmalone@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n458UdlL071887;
	Tue, 5 May 2009 08:30:39 GMT (envelope-from dwmalone@svn.freebsd.org)
Received: (from dwmalone@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n458Udrb071885;
	Tue, 5 May 2009 08:30:39 GMT (envelope-from dwmalone@svn.freebsd.org)
Message-Id: <200905050830.n458Udrb071885@svn.freebsd.org>
From: David Malone 
Date: Tue, 5 May 2009 08:30:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-svnadmin@freebsd.org
X-SVN-Group: svnadmin
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191808 - svnadmin/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 08:30:39 -0000

Author: dwmalone
Date: Tue May  5 08:30:38 2009
New Revision: 191808
URL: http://svn.freebsd.org/changeset/base/191808

Log:
  chmod u+c snb
  
  Nick will be working on improving the memory allocation code in
  dirhash.  He's already implemented and tested a set of changes on
  last year's summer of code, and we'll be looking to get those changes
  into the tree soon. I will be Nick's mentor.
  
  Approved by:	core

Modified:
  svnadmin/conf/access
  svnadmin/conf/mentors

Modified: svnadmin/conf/access
==============================================================================
--- svnadmin/conf/access	Tue May  5 07:05:13 2009	(r191807)
+++ svnadmin/conf/access	Tue May  5 08:30:38 2009	(r191808)
@@ -194,6 +194,7 @@ sepotvin
 silby
 simokawa
 simon
+snb
 sobomax
 sos	commit@deepcore.dk
 sson

Modified: svnadmin/conf/mentors
==============================================================================
--- svnadmin/conf/mentors	Tue May  5 07:05:13 2009	(r191807)
+++ svnadmin/conf/mentors	Tue May  5 08:30:38 2009	(r191808)
@@ -23,6 +23,7 @@ rdivacky	ed
 remko		imp
 rmacklem	rwatson		Co-mentor: kib
 sbruno		scottl
+snb		dwmalone
 sson		jb
 vanhu		gnn
 versus		dds

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 09:08:37 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C4A5F106566C;
	Tue,  5 May 2009 09:08:37 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B0BDA8FC0C;
	Tue,  5 May 2009 09:08:37 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4598bFF072722;
	Tue, 5 May 2009 09:08:37 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4598bHc072718;
	Tue, 5 May 2009 09:08:37 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200905050908.n4598bHc072718@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 5 May 2009 09:08:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191809 - in stable/7/sys: . amd64/amd64 arm/arm
	contrib/pf dev/ath/ath_hal dev/cxgb i386/i386 ia64/ia64
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 09:08:38 -0000

Author: kib
Date: Tue May  5 09:08:37 2009
New Revision: 191809
URL: http://svn.freebsd.org/changeset/base/191809

Log:
  MFC r191011:
  The bus_dmamap_load_uio(9) shall use pmap of the thread recorded in the
  uio_td to extract pages from, instead of unconditionally use kernel
  pmap.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/amd64/amd64/busdma_machdep.c
  stable/7/sys/arm/arm/busdma_machdep.c
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/i386/i386/busdma_machdep.c
  stable/7/sys/ia64/ia64/busdma_machdep.c

Modified: stable/7/sys/amd64/amd64/busdma_machdep.c
==============================================================================
--- stable/7/sys/amd64/amd64/busdma_machdep.c	Tue May  5 08:30:38 2009	(r191808)
+++ stable/7/sys/amd64/amd64/busdma_machdep.c	Tue May  5 09:08:37 2009	(r191809)
@@ -602,7 +602,10 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm
 		vendaddr = (vm_offset_t)buf + buflen;
 
 		while (vaddr < vendaddr) {
-			paddr = pmap_kextract(vaddr);
+			if (pmap)
+				paddr = pmap_extract(pmap, vaddr);
+			else
+				paddr = pmap_kextract(vaddr);
 			if (run_filter(dmat, paddr) != 0)
 				map->pagesneeded++;
 			vaddr += PAGE_SIZE;

Modified: stable/7/sys/arm/arm/busdma_machdep.c
==============================================================================
--- stable/7/sys/arm/arm/busdma_machdep.c	Tue May  5 08:30:38 2009	(r191808)
+++ stable/7/sys/arm/arm/busdma_machdep.c	Tue May  5 09:08:37 2009	(r191809)
@@ -663,8 +663,8 @@ bus_dmamem_free(bus_dma_tag_t dmat, void
 }
 
 static int
-_bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
-			bus_size_t buflen, int flags)
+_bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, pmap_t pmap,
+    void *buf, bus_size_t buflen, int flags)
 {
 	vm_offset_t vaddr;
 	vm_offset_t vendaddr;
@@ -683,7 +683,10 @@ _bus_dmamap_count_pages(bus_dma_tag_t dm
 		vendaddr = (vm_offset_t)buf + buflen;
 
 		while (vaddr < vendaddr) {
-			paddr = pmap_kextract(vaddr);
+			if (pmap != NULL)
+				paddr = pmap_extract(pmap, vaddr);
+			else
+				paddr = pmap_kextract(vaddr);
 			if (((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) &&
 			    run_filter(dmat, paddr) != 0)
 				map->pagesneeded++;
@@ -739,7 +742,8 @@ bus_dmamap_load_buffer(bus_dma_tag_t dma
 	bmask = ~(dmat->boundary - 1);
 
 	if ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) {
-		error = _bus_dmamap_count_pages(dmat, map, buf, buflen, flags);
+		error = _bus_dmamap_count_pages(dmat, map, pmap, buf, buflen,
+		    flags);
 		if (error)
 			return (error);
 	}

Modified: stable/7/sys/i386/i386/busdma_machdep.c
==============================================================================
--- stable/7/sys/i386/i386/busdma_machdep.c	Tue May  5 08:30:38 2009	(r191808)
+++ stable/7/sys/i386/i386/busdma_machdep.c	Tue May  5 09:08:37 2009	(r191809)
@@ -141,8 +141,8 @@ static bus_addr_t add_bounce_page(bus_dm
 				   vm_offset_t vaddr, bus_size_t size);
 static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage);
 int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr);
-int _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
-			    bus_size_t buflen, int flags);
+int _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, pmap_t pmap,
+    void *buf, bus_size_t buflen, int flags);
 
 /*
  * Return true if a match is made.
@@ -568,8 +568,8 @@ bus_dmamem_free(bus_dma_tag_t dmat, void
 }
 
 int
-_bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
-			bus_size_t buflen, int flags)
+_bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, pmap_t pmap,
+    void *buf, bus_size_t buflen, int flags)
 {
 	vm_offset_t vaddr;
 	vm_offset_t vendaddr;
@@ -589,7 +589,10 @@ _bus_dmamap_count_pages(bus_dma_tag_t dm
 		vendaddr = (vm_offset_t)buf + buflen;
 
 		while (vaddr < vendaddr) {
-			paddr = pmap_kextract(vaddr);
+			if (pmap)
+				paddr = pmap_extract(pmap, vaddr);
+			else
+				paddr = pmap_kextract(vaddr);
 			if (((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) &&
 			    run_filter(dmat, paddr) != 0) {
 				map->pagesneeded++;
@@ -651,7 +654,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm
 		map = &nobounce_dmamap;
 
 	if ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) {
-		error = _bus_dmamap_count_pages(dmat, map, buf, buflen, flags);
+		error = _bus_dmamap_count_pages(dmat, map, pmap, buf, buflen, flags);
 		if (error)
 			return (error);
 	}

Modified: stable/7/sys/ia64/ia64/busdma_machdep.c
==============================================================================
--- stable/7/sys/ia64/ia64/busdma_machdep.c	Tue May  5 08:30:38 2009	(r191808)
+++ stable/7/sys/ia64/ia64/busdma_machdep.c	Tue May  5 09:08:37 2009	(r191809)
@@ -527,7 +527,10 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm
 		vendaddr = (vm_offset_t)buf + buflen;
 
 		while (vaddr < vendaddr) {
-			paddr = pmap_kextract(vaddr);
+			if (pmap != NULL)
+				paddr = pmap_extract(pmap, vaddr);
+			else
+				paddr = pmap_kextract(vaddr);
 			if (run_filter(dmat, paddr, 0) != 0)
 				map->pagesneeded++;
 			vaddr += PAGE_SIZE;

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 09:16:57 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BF2631065670;
	Tue,  5 May 2009 09:16:57 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A240A8FC0C;
	Tue,  5 May 2009 09:16:57 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n459GvMZ072941;
	Tue, 5 May 2009 09:16:57 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n459GvbI072939;
	Tue, 5 May 2009 09:16:57 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200905050916.n459GvbI072939@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 5 May 2009 09:16:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191810 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 09:16:58 -0000

Author: kib
Date: Tue May  5 09:16:57 2009
New Revision: 191810
URL: http://svn.freebsd.org/changeset/base/191810

Log:
  MFC r190886:
  When vm_map_wire(9) is allowed to skip holes in the wired region, skip
  the mappings without any of read and execution rights, in particular,
  the PROT_NONE entries. This makes mlockall(2) work for the process
  address space that has such mappings.
  
  Since protection mode of the entry may change between setting
  MAP_ENTRY_IN_TRANSITION and final pass over the region that records
  the wire status of the entries, allocate new map entry flag
  MAP_ENTRY_WIRE_SKIPPED to mark the skipped PROT_NONE entries.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/vm/vm_map.c
  stable/7/sys/vm/vm_map.h

Modified: stable/7/sys/vm/vm_map.c
==============================================================================
--- stable/7/sys/vm/vm_map.c	Tue May  5 09:08:37 2009	(r191809)
+++ stable/7/sys/vm/vm_map.c	Tue May  5 09:16:57 2009	(r191810)
@@ -2059,6 +2059,16 @@ vm_map_wire(vm_map_t map, vm_offset_t st
 		 *
 		 */
 		if (entry->wired_count == 0) {
+			if ((entry->protection & (VM_PROT_READ|VM_PROT_EXECUTE))
+			    == 0) {
+				if ((flags & VM_MAP_WIRE_HOLESOK) == 0) {
+					end = entry->end;
+					rv = KERN_INVALID_ADDRESS;
+					goto done;
+				}
+				entry->eflags |= MAP_ENTRY_WIRE_SKIPPED;
+				goto next_entry;
+			}
 			entry->wired_count++;
 			saved_start = entry->start;
 			saved_end = entry->end;
@@ -2116,6 +2126,7 @@ vm_map_wire(vm_map_t map, vm_offset_t st
 		 * Check the map for holes in the specified region.
 		 * If VM_MAP_WIRE_HOLESOK was specified, skip this check.
 		 */
+	next_entry:
 		if (((flags & VM_MAP_WIRE_HOLESOK) == 0) &&
 		    (entry->end < end && (entry->next == &map->header ||
 		    entry->next->start > entry->end))) {
@@ -2137,6 +2148,8 @@ done:
 	}
 	entry = first_entry;
 	while (entry != &map->header && entry->start < end) {
+		if ((entry->eflags & MAP_ENTRY_WIRE_SKIPPED) != 0)
+			goto next_entry_done;
 		if (rv == KERN_SUCCESS) {
 			if (user_wire)
 				entry->eflags |= MAP_ENTRY_USER_WIRED;
@@ -2159,9 +2172,10 @@ done:
 				    entry->object.vm_object->type == OBJT_DEVICE);
 			}
 		}
+	next_entry_done:
 		KASSERT(entry->eflags & MAP_ENTRY_IN_TRANSITION,
 			("vm_map_wire: in-transition flag missing"));
-		entry->eflags &= ~MAP_ENTRY_IN_TRANSITION;
+		entry->eflags &= ~(MAP_ENTRY_IN_TRANSITION|MAP_ENTRY_WIRE_SKIPPED);
 		if (entry->eflags & MAP_ENTRY_NEEDS_WAKEUP) {
 			entry->eflags &= ~MAP_ENTRY_NEEDS_WAKEUP;
 			need_wakeup = TRUE;

Modified: stable/7/sys/vm/vm_map.h
==============================================================================
--- stable/7/sys/vm/vm_map.h	Tue May  5 09:08:37 2009	(r191809)
+++ stable/7/sys/vm/vm_map.h	Tue May  5 09:16:57 2009	(r191810)
@@ -138,6 +138,8 @@ struct vm_map_entry {
 #define	MAP_ENTRY_GROWS_DOWN		0x1000	/* Top-down stacks */
 #define	MAP_ENTRY_GROWS_UP		0x2000	/* Bottom-up stacks */
 
+#define	MAP_ENTRY_WIRE_SKIPPED		0x4000
+
 #ifdef	_KERNEL
 static __inline u_char
 vm_map_entry_behavior(vm_map_entry_t entry)

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 09:20:08 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 286A6106564A;
	Tue,  5 May 2009 09:20:08 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CB6A78FC2D;
	Tue,  5 May 2009 09:20:07 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n459K7ue073053;
	Tue, 5 May 2009 09:20:07 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n459K7Tg073052;
	Tue, 5 May 2009 09:20:07 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200905050920.n459K7Tg073052@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 5 May 2009 09:20:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191811 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb ufs/ffs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 09:20:09 -0000

Author: kib
Date: Tue May  5 09:20:07 2009
New Revision: 191811
URL: http://svn.freebsd.org/changeset/base/191811

Log:
  MFC r190690:
  When removing or renaming snaphost, do not delve into request_cleanup().
  The later may need blocks from the underlying device that belongs
  to normal files, that should not be locked while snap lock is held.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/ufs/ffs/ffs_softdep.c

Modified: stable/7/sys/ufs/ffs/ffs_softdep.c
==============================================================================
--- stable/7/sys/ufs/ffs/ffs_softdep.c	Tue May  5 09:16:57 2009	(r191810)
+++ stable/7/sys/ufs/ffs/ffs_softdep.c	Tue May  5 09:20:07 2009	(r191811)
@@ -3315,7 +3315,7 @@ newdirrem(bp, dp, ip, isrmdir, prevdirre
 	 * the number of freefile and freeblks structures.
 	 */
 	ACQUIRE_LOCK(&lk);
-	if (num_dirrem > max_softdeps / 2)
+	if (!(ip->i_flags & SF_SNAPSHOT) && num_dirrem > max_softdeps / 2)
 		(void) request_cleanup(ITOV(dp)->v_mount, FLUSH_REMOVE);
 	num_dirrem += 1;
 	FREE_LOCK(&lk);

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 09:24:20 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9B811106566B;
	Tue,  5 May 2009 09:24:20 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 88A3C8FC18;
	Tue,  5 May 2009 09:24:20 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n459OKV0073194;
	Tue, 5 May 2009 09:24:20 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n459OK2f073193;
	Tue, 5 May 2009 09:24:20 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200905050924.n459OK2f073193@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 5 May 2009 09:24:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191812 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 09:24:21 -0000

Author: kib
Date: Tue May  5 09:24:20 2009
New Revision: 191812
URL: http://svn.freebsd.org/changeset/base/191812

Log:
  MFC r191313:
  On the exit of the child process which parent either set SA_NOCLDWAIT
  or ignored SIGCHLD, unconditionally wake up the parent instead of doing
  this only when the child is a last child.
  
  MFC r191319:
  Fix typo.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/kern/kern_exit.c

Modified: stable/7/sys/kern/kern_exit.c
==============================================================================
--- stable/7/sys/kern/kern_exit.c	Tue May  5 09:20:07 2009	(r191811)
+++ stable/7/sys/kern/kern_exit.c	Tue May  5 09:24:20 2009	(r191812)
@@ -511,13 +511,13 @@ retry:
 		proc_reparent(p, initproc);
 		p->p_sigparent = SIGCHLD;
 		PROC_LOCK(p->p_pptr);
+
 		/*
-		 * If this was the last child of our parent, notify
-		 * parent, so in case he was wait(2)ing, he will
+		 * Notify parent, so in case he was wait(2)ing or
+		 * executing waitpid(2) with our pid, he will
 		 * continue.
 		 */
-		if (LIST_EMPTY(&pp->p_children))
-			wakeup(pp);
+		wakeup(pp);
 	} else
 		mtx_unlock(&p->p_pptr->p_sigacts->ps_mtx);
 

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 10:34:44 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 584F51065670;
	Tue,  5 May 2009 10:34:44 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 42BD68FC0C;
	Tue,  5 May 2009 10:34:44 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45AYi2D074741;
	Tue, 5 May 2009 10:34:44 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45AYild074736;
	Tue, 5 May 2009 10:34:44 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200905051034.n45AYild074736@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 5 May 2009 10:34:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191813 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb gnu/fs/xfs/FreeBSD kern sys ufs/ffs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 10:34:44 -0000

Author: kib
Date: Tue May  5 10:34:43 2009
New Revision: 191813
URL: http://svn.freebsd.org/changeset/base/191813

Log:
  MFC r189878:
  Fix two issues with bufdaemon, often causing the processes to hang in
  the "nbufkv" sleep.
  
  Do not retry request for the new block from ffs_bufwrite() when write is done
  from bufdaemon and there is a buffer shortage.
  
  In getnewbuf(), help bufdaemon to flush dirty buffers owned by the vnode
  locked by curthread.
  
  For MFC, default value for sysctl vfs.flushbufqtarget is set to -1,
  disabling the helpers. The TDP_BUFNEED flag value from HEAD conflicts
  with TDP_UPCALLING KSE bit, so it is moved to the end of allocated bits.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/gnu/fs/xfs/FreeBSD/xfs_buf.c
  stable/7/sys/kern/vfs_bio.c
  stable/7/sys/sys/buf.h
  stable/7/sys/sys/proc.h
  stable/7/sys/ufs/ffs/ffs_vfsops.c

Modified: stable/7/sys/gnu/fs/xfs/FreeBSD/xfs_buf.c
==============================================================================
--- stable/7/sys/gnu/fs/xfs/FreeBSD/xfs_buf.c	Tue May  5 09:24:20 2009	(r191812)
+++ stable/7/sys/gnu/fs/xfs/FreeBSD/xfs_buf.c	Tue May  5 10:34:43 2009	(r191813)
@@ -81,7 +81,7 @@ xfs_buf_get_empty(size_t size,  xfs_buft
 {
 	struct buf *bp;
 
-	bp = geteblk(0);
+	bp = geteblk(0, 0);
 	if (bp != NULL) {
 		bp->b_bufsize = size;
 		bp->b_bcount = size;
@@ -101,7 +101,7 @@ xfs_buf_get_noaddr(size_t len, xfs_bufta
 	if (len >= MAXPHYS)
 		return (NULL);
 
-	bp = geteblk(len);
+	bp = geteblk(len, 0);
 	if (bp != NULL) {
 		KASSERT(BUF_REFCNT(bp) == 1,
 			("xfs_buf_get_empty: bp %p not locked",bp));

Modified: stable/7/sys/kern/vfs_bio.c
==============================================================================
--- stable/7/sys/kern/vfs_bio.c	Tue May  5 09:24:20 2009	(r191812)
+++ stable/7/sys/kern/vfs_bio.c	Tue May  5 10:34:43 2009	(r191813)
@@ -105,7 +105,8 @@ static void vfs_setdirty_locked_object(s
 static void vfs_vmio_release(struct buf *bp);
 static int vfs_bio_clcheck(struct vnode *vp, int size,
 		daddr_t lblkno, daddr_t blkno);
-static int flushbufqueues(int, int);
+static int buf_do_flush(struct vnode *vp);
+static int flushbufqueues(struct vnode *, int, int);
 static void buf_daemon(void);
 static void bremfreel(struct buf *bp);
 
@@ -187,6 +188,9 @@ SYSCTL_INT(_vfs, OID_AUTO, getnewbufcall
 static int getnewbufrestarts;
 SYSCTL_INT(_vfs, OID_AUTO, getnewbufrestarts, CTLFLAG_RW, &getnewbufrestarts, 0,
     "Number of times getnewbuf has had to restart a buffer aquisition");
+static int flushbufqtarget = -1;
+SYSCTL_INT(_vfs, OID_AUTO, flushbufqtarget, CTLFLAG_RW, &flushbufqtarget, 0,
+    "Amount of work to do in flushbufqueues when helping bufdaemon");
 
 /*
  * Wakeup point for bufdaemon, as well as indicator of whether it is already
@@ -258,6 +262,7 @@ static struct mtx bpinlock;
 #define QUEUE_DIRTY_GIANT 3	/* B_DELWRI buffers that need giant */
 #define QUEUE_EMPTYKVA	4	/* empty buffer headers w/KVA assignment */
 #define QUEUE_EMPTY	5	/* empty buffer headers */
+#define QUEUE_SENTINEL	1024	/* not an queue index, but mark for sentinel */
 
 /* Queues for free buffers with various properties */
 static TAILQ_HEAD(bqueues, buf) bufqueues[BUFFER_QUEUES] = { { 0 } };
@@ -1707,21 +1712,23 @@ vfs_bio_awrite(struct buf *bp)
  */
 
 static struct buf *
-getnewbuf(int slpflag, int slptimeo, int size, int maxsize)
+getnewbuf(struct vnode *vp, int slpflag, int slptimeo, int size, int maxsize,
+    int gbflags)
 {
+	struct thread *td;
 	struct buf *bp;
 	struct buf *nbp;
 	int defrag = 0;
 	int nqindex;
 	static int flushingbufs;
 
+	td = curthread;
 	/*
 	 * We can't afford to block since we might be holding a vnode lock,
 	 * which may prevent system daemons from running.  We deal with
 	 * low-memory situations by proactively returning memory and running
 	 * async I/O rather then sync I/O.
 	 */
-
 	atomic_add_int(&getnewbufcalls, 1);
 	atomic_subtract_int(&getnewbufrestarts, 1);
 restart:
@@ -1953,8 +1960,9 @@ restart:
 	 */
 
 	if (bp == NULL) {
-		int flags;
+		int flags, norunbuf;
 		char *waitmsg;
+		int fl;
 
 		if (defrag) {
 			flags = VFS_BIO_NEED_BUFSPACE;
@@ -1972,9 +1980,35 @@ restart:
 		mtx_unlock(&bqlock);
 
 		bd_speedup();	/* heeeelp */
+		if (gbflags & GB_NOWAIT_BD)
+			return (NULL);
 
 		mtx_lock(&nblock);
 		while (needsbuffer & flags) {
+			if (vp != NULL && (td->td_pflags & TDP_BUFNEED) == 0) {
+				mtx_unlock(&nblock);
+				/*
+				 * getblk() is called with a vnode
+				 * locked, and some majority of the
+				 * dirty buffers may as well belong to
+				 * the vnode. Flushing the buffers
+				 * there would make a progress that
+				 * cannot be achieved by the
+				 * buf_daemon, that cannot lock the
+				 * vnode.
+				 */
+				norunbuf = ~(TDP_BUFNEED | TDP_NORUNNINGBUF) |
+				    (td->td_pflags & TDP_NORUNNINGBUF);
+				/* play bufdaemon */
+				td->td_pflags |= TDP_BUFNEED | TDP_NORUNNINGBUF;
+				fl = buf_do_flush(vp);
+				td->td_pflags &= norunbuf;
+				mtx_lock(&nblock);
+				if (fl != 0)
+					continue;
+				if ((needsbuffer & flags) == 0)
+					break;
+			}
 			if (msleep(&needsbuffer, &nblock,
 			    (PRIBIO + 4) | slpflag, waitmsg, slptimeo)) {
 				mtx_unlock(&nblock);
@@ -2043,6 +2077,35 @@ static struct kproc_desc buf_kp = {
 };
 SYSINIT(bufdaemon, SI_SUB_KTHREAD_BUF, SI_ORDER_FIRST, kproc_start, &buf_kp);
 
+static int
+buf_do_flush(struct vnode *vp)
+{
+	int flushed;
+
+	flushed = flushbufqueues(vp, QUEUE_DIRTY, 0);
+	/* The list empty check here is slightly racy */
+	if (!TAILQ_EMPTY(&bufqueues[QUEUE_DIRTY_GIANT])) {
+		mtx_lock(&Giant);
+		flushed += flushbufqueues(vp, QUEUE_DIRTY_GIANT, 0);
+		mtx_unlock(&Giant);
+	}
+	if (flushed == 0) {
+		/*
+		 * Could not find any buffers without rollback
+		 * dependencies, so just write the first one
+		 * in the hopes of eventually making progress.
+		 */
+		flushbufqueues(vp, QUEUE_DIRTY, 1);
+		if (!TAILQ_EMPTY(
+			    &bufqueues[QUEUE_DIRTY_GIANT])) {
+			mtx_lock(&Giant);
+			flushbufqueues(vp, QUEUE_DIRTY_GIANT, 1);
+			mtx_unlock(&Giant);
+		}
+	}
+	return (flushed);
+}
+
 static void
 buf_daemon()
 {
@@ -2056,7 +2119,7 @@ buf_daemon()
 	/*
 	 * This process is allowed to take the buffer cache to the limit
 	 */
-	curthread->td_pflags |= TDP_NORUNNINGBUF;
+	curthread->td_pflags |= TDP_NORUNNINGBUF | TDP_BUFNEED;
 	mtx_lock(&bdlock);
 	for (;;) {
 		bd_request = 0;
@@ -2071,30 +2134,8 @@ buf_daemon()
 		 * normally would so they can run in parallel with our drain.
 		 */
 		while (numdirtybuffers > lodirtybuffers) {
-			int flushed;
-
-			flushed = flushbufqueues(QUEUE_DIRTY, 0);
-			/* The list empty check here is slightly racy */
-			if (!TAILQ_EMPTY(&bufqueues[QUEUE_DIRTY_GIANT])) {
-				mtx_lock(&Giant);
-				flushed += flushbufqueues(QUEUE_DIRTY_GIANT, 0);
-				mtx_unlock(&Giant);
-			}
-			if (flushed == 0) {
-				/*
-				 * Could not find any buffers without rollback
-				 * dependencies, so just write the first one
-				 * in the hopes of eventually making progress.
-				 */
-				flushbufqueues(QUEUE_DIRTY, 1);
-				if (!TAILQ_EMPTY(
-				    &bufqueues[QUEUE_DIRTY_GIANT])) {
-					mtx_lock(&Giant);
-					flushbufqueues(QUEUE_DIRTY_GIANT, 1);
-					mtx_unlock(&Giant);
-				}
+			if (buf_do_flush(NULL) == 0)
 				break;
-			}
 			uio_yield();
 		}
 
@@ -2140,7 +2181,7 @@ SYSCTL_INT(_vfs, OID_AUTO, flushwithdeps
     0, "Number of buffers flushed with dependecies that require rollbacks");
 
 static int
-flushbufqueues(int queue, int flushdeps)
+flushbufqueues(struct vnode *lvp, int queue, int flushdeps)
 {
 	struct thread *td = curthread;
 	struct buf sentinel;
@@ -2151,20 +2192,37 @@ flushbufqueues(int queue, int flushdeps)
 	int flushed;
 	int target;
 
-	target = numdirtybuffers - lodirtybuffers;
-	if (flushdeps && target > 2)
-		target /= 2;
+	if (lvp == NULL) {
+		target = numdirtybuffers - lodirtybuffers;
+		if (flushdeps && target > 2)
+			target /= 2;
+	} else
+		target = flushbufqtarget;
 	flushed = 0;
 	bp = NULL;
+	sentinel.b_qindex = QUEUE_SENTINEL;
 	mtx_lock(&bqlock);
-	TAILQ_INSERT_TAIL(&bufqueues[queue], &sentinel, b_freelist);
+	TAILQ_INSERT_HEAD(&bufqueues[queue], &sentinel, b_freelist);
 	while (flushed != target) {
-		bp = TAILQ_FIRST(&bufqueues[queue]);
-		if (bp == &sentinel)
+		bp = TAILQ_NEXT(&sentinel, b_freelist);
+		if (bp != NULL) {
+			TAILQ_REMOVE(&bufqueues[queue], &sentinel, b_freelist);
+			TAILQ_INSERT_AFTER(&bufqueues[queue], bp, &sentinel,
+			    b_freelist);
+		} else
 			break;
-		TAILQ_REMOVE(&bufqueues[queue], bp, b_freelist);
-		TAILQ_INSERT_TAIL(&bufqueues[queue], bp, b_freelist);
-
+		/*
+		 * Skip sentinels inserted by other invocations of the
+		 * flushbufqueues(), taking care to not reorder them.
+		 */
+		if (bp->b_qindex == QUEUE_SENTINEL)
+			continue;
+		/*
+		 * Only flush the buffers that belong to the
+		 * vnode locked by the curthread.
+		 */
+		if (lvp != NULL && bp->b_vp != lvp)
+			continue;
 		if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL) != 0)
 			continue;
 		if (bp->b_pin_count > 0) {
@@ -2212,16 +2270,28 @@ flushbufqueues(int queue, int flushdeps)
 			BUF_UNLOCK(bp);
 			continue;
 		}
-		if (vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT, td) == 0) {
+		if (vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_CANRECURSE,
+		    td) == 0) {
 			mtx_unlock(&bqlock);
 			CTR3(KTR_BUF, "flushbufqueue(%p) vp %p flags %X",
 			    bp, bp->b_vp, bp->b_flags);
-			vfs_bio_awrite(bp);
+			if (curproc == bufdaemonproc)
+				vfs_bio_awrite(bp);
+			else {
+				bremfree(bp);
+				bwrite(bp);
+			}
 			vn_finished_write(mp);
 			VOP_UNLOCK(vp, 0, td);
 			flushwithdeps += hasdeps;
 			flushed++;
-			waitrunningbufspace();
+
+			/*
+			 * Sleeping on runningbufspace while holding
+			 * vnode lock leads to deadlock.
+			 */
+			if (curproc == bufdaemonproc)
+				waitrunningbufspace();
 			numdirtywakeup((lodirtybuffers + hidirtybuffers) / 2);
 			mtx_lock(&bqlock);
 			continue;
@@ -2603,7 +2673,7 @@ loop:
 		maxsize = vmio ? size + (offset & PAGE_MASK) : size;
 		maxsize = imax(maxsize, bsize);
 
-		bp = getnewbuf(slpflag, slptimeo, size, maxsize);
+		bp = getnewbuf(vp, slpflag, slptimeo, size, maxsize, flags);
 		if (bp == NULL) {
 			if (slpflag || slptimeo)
 				return NULL;
@@ -2678,14 +2748,17 @@ loop:
  * set to B_INVAL.
  */
 struct buf *
-geteblk(int size)
+geteblk(int size, int flags)
 {
 	struct buf *bp;
 	int maxsize;
 
 	maxsize = (size + BKVAMASK) & ~BKVAMASK;
-	while ((bp = getnewbuf(0, 0, size, maxsize)) == 0)
-		continue;
+	while ((bp = getnewbuf(NULL, 0, 0, size, maxsize, flags)) == NULL) {
+		if ((flags & GB_NOWAIT_BD) &&
+		    (curthread->td_pflags & TDP_BUFNEED) != 0)
+			return (NULL);
+	}
 	allocbuf(bp, size);
 	bp->b_flags |= B_INVAL;	/* b_dep cleared by getnewbuf() */
 	KASSERT(BUF_REFCNT(bp) == 1, ("geteblk: bp %p not locked",bp));

Modified: stable/7/sys/sys/buf.h
==============================================================================
--- stable/7/sys/sys/buf.h	Tue May  5 09:24:20 2009	(r191812)
+++ stable/7/sys/sys/buf.h	Tue May  5 10:34:43 2009	(r191813)
@@ -475,6 +475,7 @@ buf_countdeps(struct buf *bp, int i)
  */
 #define	GB_LOCK_NOWAIT	0x0001		/* Fail if we block on a buf lock. */
 #define	GB_NOCREAT	0x0002		/* Don't create a buf if not found. */
+#define	GB_NOWAIT_BD	0x0004		/* Do not wait for bufdaemon */
 
 #ifdef _KERNEL
 extern int	nbuf;			/* The number of buffer headers */
@@ -519,7 +520,7 @@ struct buf *     getpbuf(int *);
 struct buf *incore(struct bufobj *, daddr_t);
 struct buf *gbincore(struct bufobj *, daddr_t);
 struct buf *getblk(struct vnode *, daddr_t, int, int, int, int);
-struct buf *geteblk(int);
+struct buf *geteblk(int, int);
 int	bufwait(struct buf *);
 int	bufwrite(struct buf *);
 void	bufdone(struct buf *);

Modified: stable/7/sys/sys/proc.h
==============================================================================
--- stable/7/sys/sys/proc.h	Tue May  5 09:24:20 2009	(r191812)
+++ stable/7/sys/sys/proc.h	Tue May  5 10:34:43 2009	(r191813)
@@ -380,6 +380,7 @@ do {									\
 #define	TDP_INBDFLUSH	0x00100000 /* Already in BO_BDFLUSH, do not recurse */
 #define	TDP_IGNSUSP	0x00800000 /* Permission to ignore the MNTK_SUSPEND* */
 #define	TDP_AUDITREC	0x01000000 /* Audit record pending on thread */
+#define	TDP_BUFNEED	0x02000000 /* Do not recurse into the buf flush */
 
 /*
  * Reasons that the current thread can not be run yet.

Modified: stable/7/sys/ufs/ffs/ffs_vfsops.c
==============================================================================
--- stable/7/sys/ufs/ffs/ffs_vfsops.c	Tue May  5 09:24:20 2009	(r191812)
+++ stable/7/sys/ufs/ffs/ffs_vfsops.c	Tue May  5 10:34:43 2009	(r191813)
@@ -1842,7 +1842,9 @@ ffs_bufwrite(struct buf *bp)
 		    ("bufwrite: needs chained iodone (%p)", bp->b_iodone));
 
 		/* get a new block */
-		newbp = geteblk(bp->b_bufsize);
+		newbp = geteblk(bp->b_bufsize, GB_NOWAIT_BD);
+		if (newbp == NULL)
+			goto normal_write;
 
 		/*
 		 * set it to be identical to the old block.  We have to
@@ -1882,6 +1884,7 @@ ffs_bufwrite(struct buf *bp)
 	}
 
 	/* Let the normal bufwrite do the rest for us */
+normal_write:
 	return (bufwrite(bp));
 }
 

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 10:43:14 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8C716106564A;
	Tue,  5 May 2009 10:43:14 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 787458FC13;
	Tue,  5 May 2009 10:43:14 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45AhE1M078963;
	Tue, 5 May 2009 10:43:14 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45AhE9E078962;
	Tue, 5 May 2009 10:43:14 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200905051043.n45AhE9E078962@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 5 May 2009 10:43:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191814 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 10:43:15 -0000

Author: kib
Date: Tue May  5 10:43:14 2009
New Revision: 191814
URL: http://svn.freebsd.org/changeset/base/191814

Log:
  MFC r191135:
  Export the number of times bufdaemon got help from the normal threads.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/kern/vfs_bio.c

Modified: stable/7/sys/kern/vfs_bio.c
==============================================================================
--- stable/7/sys/kern/vfs_bio.c	Tue May  5 10:34:43 2009	(r191813)
+++ stable/7/sys/kern/vfs_bio.c	Tue May  5 10:43:14 2009	(r191814)
@@ -191,6 +191,9 @@ SYSCTL_INT(_vfs, OID_AUTO, getnewbufrest
 static int flushbufqtarget = -1;
 SYSCTL_INT(_vfs, OID_AUTO, flushbufqtarget, CTLFLAG_RW, &flushbufqtarget, 0,
     "Amount of work to do in flushbufqueues when helping bufdaemon");
+static long notbufdflashes;
+SYSCTL_LONG(_vfs, OID_AUTO, notbufdflashes, CTLFLAG_RD, ¬bufdflashes, 0,
+    "Number of dirty buffer flushes done by the bufdaemon helpers");
 
 /*
  * Wakeup point for bufdaemon, as well as indicator of whether it is already
@@ -2280,6 +2283,7 @@ flushbufqueues(struct vnode *lvp, int qu
 			else {
 				bremfree(bp);
 				bwrite(bp);
+				notbufdflashes++;
 			}
 			vn_finished_write(mp);
 			VOP_UNLOCK(vp, 0, td);

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 10:46:49 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E99AA106567B;
	Tue,  5 May 2009 10:46:49 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BAEF38FC17;
	Tue,  5 May 2009 10:46:49 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45Akn6E079095;
	Tue, 5 May 2009 10:46:49 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45Akn7l079094;
	Tue, 5 May 2009 10:46:49 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200905051046.n45Akn7l079094@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 5 May 2009 10:46:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191815 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 10:46:50 -0000

Author: kib
Date: Tue May  5 10:46:49 2009
New Revision: 191815
URL: http://svn.freebsd.org/changeset/base/191815

Log:
  MFC r191136:
  In flushbufqueues(), do not allocate sentinel buffer on the stack,
  struct buf is large. Use sleeping malloc(9) call, and zero the allocated
  buf as a debugging feature.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/kern/vfs_bio.c

Modified: stable/7/sys/kern/vfs_bio.c
==============================================================================
--- stable/7/sys/kern/vfs_bio.c	Tue May  5 10:43:14 2009	(r191814)
+++ stable/7/sys/kern/vfs_bio.c	Tue May  5 10:46:49 2009	(r191815)
@@ -2187,7 +2187,7 @@ static int
 flushbufqueues(struct vnode *lvp, int queue, int flushdeps)
 {
 	struct thread *td = curthread;
-	struct buf sentinel;
+	struct buf *sentinel;
 	struct vnode *vp;
 	struct mount *mp;
 	struct buf *bp;
@@ -2203,14 +2203,15 @@ flushbufqueues(struct vnode *lvp, int qu
 		target = flushbufqtarget;
 	flushed = 0;
 	bp = NULL;
-	sentinel.b_qindex = QUEUE_SENTINEL;
+	sentinel = malloc(sizeof(struct buf), M_TEMP, M_WAITOK | M_ZERO);
+	sentinel->b_qindex = QUEUE_SENTINEL;
 	mtx_lock(&bqlock);
-	TAILQ_INSERT_HEAD(&bufqueues[queue], &sentinel, b_freelist);
+	TAILQ_INSERT_HEAD(&bufqueues[queue], sentinel, b_freelist);
 	while (flushed != target) {
-		bp = TAILQ_NEXT(&sentinel, b_freelist);
+		bp = TAILQ_NEXT(sentinel, b_freelist);
 		if (bp != NULL) {
-			TAILQ_REMOVE(&bufqueues[queue], &sentinel, b_freelist);
-			TAILQ_INSERT_AFTER(&bufqueues[queue], bp, &sentinel,
+			TAILQ_REMOVE(&bufqueues[queue], sentinel, b_freelist);
+			TAILQ_INSERT_AFTER(&bufqueues[queue], bp, sentinel,
 			    b_freelist);
 		} else
 			break;
@@ -2303,8 +2304,9 @@ flushbufqueues(struct vnode *lvp, int qu
 		vn_finished_write(mp);
 		BUF_UNLOCK(bp);
 	}
-	TAILQ_REMOVE(&bufqueues[queue], &sentinel, b_freelist);
+	TAILQ_REMOVE(&bufqueues[queue], sentinel, b_freelist);
 	mtx_unlock(&bqlock);
+	free(sentinel, M_TEMP);
 	return (flushed);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 10:56:13 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8BE0F106566B;
	Tue,  5 May 2009 10:56:13 +0000 (UTC) (envelope-from zec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 762DB8FC13;
	Tue,  5 May 2009 10:56:13 +0000 (UTC) (envelope-from zec@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45AuDj0079330;
	Tue, 5 May 2009 10:56:13 GMT (envelope-from zec@svn.freebsd.org)
Received: (from zec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45AuCho079307;
	Tue, 5 May 2009 10:56:12 GMT (envelope-from zec@svn.freebsd.org)
Message-Id: <200905051056.n45AuCho079307@svn.freebsd.org>
From: Marko Zec 
Date: Tue, 5 May 2009 10:56:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191816 - in head/sys: conf dev/cxgb/ulp/tom kern net
	net80211 netgraph netinet netinet6 netipsec nfsclient sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 10:56:14 -0000

Author: zec
Date: Tue May  5 10:56:12 2009
New Revision: 191816
URL: http://svn.freebsd.org/changeset/base/191816

Log:
  Change the curvnet variable from a global const struct vnet *,
  previously always pointing to the default vnet context, to a
  dynamically changing thread-local one.  The currvnet context
  should be set on entry to networking code via CURVNET_SET() macros,
  and reverted to previous state via CURVNET_RESTORE().  Recursions
  on curvnet are permitted, though strongly discuouraged.
  
  This change should have no functional impact on nooptions VIMAGE
  kernel builds, where CURVNET_* macros expand to whitespace.
  
  The curthread->td_vnet (aka curvnet) variable's purpose is to be an
  indicator of the vnet context in which the current network-related
  operation takes place, in case we cannot deduce the current vnet
  context from any other source, such as by looking at mbuf's
  m->m_pkthdr.rcvif->if_vnet, sockets's so->so_vnet etc.  Moreover, so
  far curvnet has turned out to be an invaluable consistency checking
  aid: it helps to catch cases when sockets, ifnets or any other
  vnet-aware structures may have leaked from one vnet to another.
  
  The exact placement of the CURVNET_SET() / CURVNET_RESTORE() macros
  was a result of an empirical iterative process, whith an aim to
  reduce recursions on CURVNET_SET() to a minimum, while still reducing
  the scope of CURVNET_SET() to networking only operations - the
  alternative would be calling CURVNET_SET() on each system call entry.
  In general, curvnet has to be set in three typicall cases: when
  processing socket-related requests from userspace or from within the
  kernel; when processing inbound traffic flowing from device drivers
  to upper layers of the networking stack, and when executing
  timer-driven networking functions.
  
  This change also introduces a DDB subcommand to show the list of all
  vnet instances.
  
  Approved by:	julian (mentor)

Modified:
  head/sys/conf/files
  head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
  head/sys/kern/init_main.c
  head/sys/kern/kern_fork.c
  head/sys/kern/kern_linker.c
  head/sys/kern/kern_vimage.c
  head/sys/kern/subr_pcpu.c
  head/sys/kern/sys_socket.c
  head/sys/kern/uipc_socket.c
  head/sys/kern/uipc_syscalls.c
  head/sys/kern/uipc_usrreq.c
  head/sys/net/bpf.c
  head/sys/net/if.c
  head/sys/net/if_clone.c
  head/sys/net/if_ethersubr.c
  head/sys/net/if_var.h
  head/sys/net/netisr.c
  head/sys/net/rtsock.c
  head/sys/net80211/ieee80211_freebsd.c
  head/sys/netgraph/netgraph.h
  head/sys/netinet/if_ether.c
  head/sys/netinet/igmp.c
  head/sys/netinet/in_rmx.c
  head/sys/netinet/ip_input.c
  head/sys/netinet/tcp_hostcache.c
  head/sys/netinet6/in6_rmx.c
  head/sys/netinet6/ip6_mroute.c
  head/sys/netinet6/mld6.c
  head/sys/netinet6/nd6.c
  head/sys/netinet6/nd6_nbr.c
  head/sys/netipsec/xform_tcp.c
  head/sys/nfsclient/nfs_vnops.c
  head/sys/sys/proc.h
  head/sys/sys/ucred.h
  head/sys/sys/vimage.h

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/conf/files	Tue May  5 10:56:12 2009	(r191816)
@@ -1952,8 +1952,8 @@ kern/kern_time.c		standard
 kern/kern_timeout.c		standard
 kern/kern_umtx.c		standard
 kern/kern_uuid.c		standard
-kern/kern_xxx.c			standard
 kern/kern_vimage.c		standard
+kern/kern_xxx.c			standard
 kern/link_elf.c			standard
 kern/linker_if.m		standard
 kern/md4c.c			optional netsmb

Modified: head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
==============================================================================
--- head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c	Tue May  5 10:56:12 2009	(r191816)
@@ -1217,7 +1217,7 @@ install_offload_ops(struct socket *so)
  * receive window.
  */
 static __inline int
-select_rcv_wscale(int space)
+select_rcv_wscale(int space, struct vnet *vnet)
 {
 	INIT_VNET_INET(so->so_vnet);
 	int wscale = 0;
@@ -1326,7 +1326,7 @@ static inline unsigned int
 calc_opt0h(struct socket *so, int mtu_idx)
 {
 	struct tcpcb *tp = so_sototcpcb(so);
-	int wscale = select_rcv_wscale(tp->rcv_wnd);
+	int wscale = select_rcv_wscale(tp->rcv_wnd, so->so_vnet);
 	
 	return V_NAGLE((tp->t_flags & TF_NODELAY) == 0) |
 	    V_KEEP_ALIVE((so_options_get(so) & SO_KEEPALIVE) != 0) | F_TCAM_BYPASS |

Modified: head/sys/kern/init_main.c
==============================================================================
--- head/sys/kern/init_main.c	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/kern/init_main.c	Tue May  5 10:56:12 2009	(r191816)
@@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -452,6 +453,9 @@ proc0_init(void *dummy __unused)
 	p->p_ucred->cr_uidinfo = uifind(0);
 	p->p_ucred->cr_ruidinfo = uifind(0);
 	p->p_ucred->cr_prison = NULL;	/* Don't jail it. */
+#ifdef VIMAGE
+	p->p_ucred->cr_vnet = LIST_FIRST(&vnet_head);
+#endif
 #ifdef AUDIT
 	audit_cred_kproc0(p->p_ucred);
 #endif

Modified: head/sys/kern/kern_fork.c
==============================================================================
--- head/sys/kern/kern_fork.c	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/kern/kern_fork.c	Tue May  5 10:56:12 2009	(r191816)
@@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -523,6 +524,11 @@ again:
 	td2->td_sigmask = td->td_sigmask;
 	td2->td_flags = TDF_INMEM;
 
+#ifdef VIMAGE
+	td2->td_vnet = NULL;
+	td2->td_vnet_lpush = NULL;
+#endif
+
 	/*
 	 * Duplicate sub-structures as needed.
 	 * Increase reference counts on shared objects.

Modified: head/sys/kern/kern_linker.c
==============================================================================
--- head/sys/kern/kern_linker.c	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/kern/kern_linker.c	Tue May  5 10:56:12 2009	(r191816)
@@ -993,6 +993,12 @@ kern_kldload(struct thread *td, const ch
 		return (error);
 
 	/*
+	 * It's possible that kldloaded module will attach a new ifnet,
+	 * so vnet context must be set when this ocurs.
+	 */
+	CURVNET_SET(TD_TO_VNET(td));
+
+	/*
 	 * If file does not contain a qualified name or any dot in it
 	 * (kldname.ko, or kldname.ver.ko) treat it as an interface
 	 * name.
@@ -1019,6 +1025,7 @@ kern_kldload(struct thread *td, const ch
 		*fileid = lf->id;
 unlock:
 	KLD_UNLOCK();
+	CURVNET_RESTORE();
 	return (error);
 }
 
@@ -1056,6 +1063,7 @@ kern_kldunload(struct thread *td, int fi
 	if ((error = priv_check(td, PRIV_KLD_UNLOAD)) != 0)
 		return (error);
 
+	CURVNET_SET(TD_TO_VNET(td));
 	KLD_LOCK();
 	lf = linker_find_file_by_id(fileid);
 	if (lf) {
@@ -1092,6 +1100,7 @@ kern_kldunload(struct thread *td, int fi
 		PMC_CALL_HOOK(td, PMC_FN_KLD_UNLOAD, (void *) &pkm);
 #endif
 	KLD_UNLOCK();
+	CURVNET_RESTORE();
 	return (error);
 }
 

Modified: head/sys/kern/kern_vimage.c
==============================================================================
--- head/sys/kern/kern_vimage.c	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/kern/kern_vimage.c	Tue May  5 10:56:12 2009	(r191816)
@@ -31,6 +31,8 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_ddb.h"
+
 #include 
 #include 
 #include 
@@ -38,6 +40,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#ifdef DDB
+#include 
+#endif
 
 #ifndef VIMAGE_GLOBALS
 
@@ -51,8 +56,6 @@ static int vnet_mod_constructor(struct v
 static int vnet_mod_destructor(struct vnet_modlink *);
 
 #ifdef VIMAGE
-/* curvnet should be thread-local - this is only a temporary step. */
-struct vnet *curvnet;
 struct vnet_list_head vnet_head;
 #endif
 
@@ -183,7 +186,8 @@ vnet_mod_deregister_multi(const struct v
 	free(vml, M_VIMAGE);
 }
 
-static int vnet_mod_constructor(struct vnet_modlink *vml)
+static int
+vnet_mod_constructor(struct vnet_modlink *vml)
 {
 	const struct vnet_modinfo *vmi = vml->vml_modinfo;
 
@@ -303,7 +307,9 @@ vi_init(void *unused)
 	if (vnet == NULL)
 		panic("vi_alloc: malloc failed");
 	LIST_INSERT_HEAD(&vnet_head, vnet, vnet_le);
+	vnet->vnet_magic_n = VNET_MAGIC_N;
 
+	/* We MUST clear curvnet in vi_init_done before going SMP. */
 	curvnet = LIST_FIRST(&vnet_head);
 #endif
 }
@@ -313,6 +319,10 @@ vi_init_done(void *unused)
 {
 	struct vnet_modlink *vml_iter;
 
+#ifdef VIMAGE
+	curvnet = NULL;
+#endif
+
 	if (TAILQ_EMPTY(&vnet_modpending_head))
 		return;
 
@@ -327,5 +337,45 @@ vi_init_done(void *unused)
 
 SYSINIT(vimage, SI_SUB_VIMAGE, SI_ORDER_FIRST, vi_init, NULL);
 SYSINIT(vimage_done, SI_SUB_VIMAGE_DONE, SI_ORDER_FIRST, vi_init_done, NULL);
-
 #endif /* !VIMAGE_GLOBALS */
+
+#ifdef VIMAGE
+#ifdef DDB
+static void
+db_vnet_ptr(void *arg)
+{
+
+	if (arg)
+		db_printf(" %p", arg);
+	else
+#if SIZE_MAX == UINT32_MAX /* 32-bit arch */
+		db_printf("          0");
+#else /* 64-bit arch, most probaly... */
+		db_printf("                  0");
+#endif
+}
+
+DB_SHOW_COMMAND(vnets, db_show_vnets)
+{
+	VNET_ITERATOR_DECL(vnet_iter);
+
+#if SIZE_MAX == UINT32_MAX /* 32-bit arch */
+	db_printf("      vnet ifs socks");
+	db_printf("        net       inet      inet6      ipsec   netgraph\n");
+#else /* 64-bit arch, most probaly... */
+	db_printf("              vnet ifs socks");
+	db_printf("                net               inet              inet6              ipsec           netgraph\n");
+#endif
+	VNET_FOREACH(vnet_iter) {
+		db_printf("%p %3d %5d",
+		    vnet_iter, vnet_iter->ifccnt, vnet_iter->sockcnt);
+		db_vnet_ptr(vnet_iter->mod_data[VNET_MOD_NET]);
+		db_vnet_ptr(vnet_iter->mod_data[VNET_MOD_INET]);
+		db_vnet_ptr(vnet_iter->mod_data[VNET_MOD_INET6]);
+		db_vnet_ptr(vnet_iter->mod_data[VNET_MOD_IPSEC]);
+		db_vnet_ptr(vnet_iter->mod_data[VNET_MOD_NETGRAPH]);
+		db_printf("\n");
+	}
+}
+#endif
+#endif /* VIMAGE */

Modified: head/sys/kern/subr_pcpu.c
==============================================================================
--- head/sys/kern/subr_pcpu.c	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/kern/subr_pcpu.c	Tue May  5 10:56:12 2009	(r191816)
@@ -135,6 +135,10 @@ show_pcpu(struct pcpu *pc)
 		db_printf("none\n");
 	db_show_mdpcpu(pc);
 		
+#ifdef VIMAGE
+	db_printf("curvnet      = %p\n", pc->pc_curthread->td_vnet);
+#endif
+
 #ifdef WITNESS
 	db_printf("spin locks held:\n");
 	witness_list_locks(&pc->pc_spinlocks);

Modified: head/sys/kern/sys_socket.c
==============================================================================
--- head/sys/kern/sys_socket.c	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/kern/sys_socket.c	Tue May  5 10:56:12 2009	(r191816)
@@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -74,16 +75,19 @@ soo_read(struct file *fp, struct uio *ui
     int flags, struct thread *td)
 {
 	struct socket *so = fp->f_data;
-#ifdef MAC
 	int error;
 
+#ifdef MAC
 	SOCK_LOCK(so);
 	error = mac_socket_check_receive(active_cred, so);
 	SOCK_UNLOCK(so);
 	if (error)
 		return (error);
 #endif
-	return (soreceive(so, 0, uio, 0, 0, 0));
+	CURVNET_SET(so->so_vnet);
+	error = soreceive(so, 0, uio, 0, 0, 0);
+	CURVNET_RESTORE();
+	return (error);
 }
 
 /* ARGSUSED */
@@ -125,6 +129,7 @@ soo_ioctl(struct file *fp, u_long cmd, v
 	struct socket *so = fp->f_data;
 	int error = 0;
 
+	CURVNET_SET(so->so_vnet);
 	switch (cmd) {
 	case FIONBIO:
 		SOCK_LOCK(so);
@@ -205,6 +210,7 @@ soo_ioctl(struct file *fp, u_long cmd, v
 			    (so, cmd, data, 0, td));
 		break;
 	}
+	CURVNET_RESTORE();
 	return (error);
 }
 

Modified: head/sys/kern/uipc_socket.c
==============================================================================
--- head/sys/kern/uipc_socket.c	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/kern/uipc_socket.c	Tue May  5 10:56:12 2009	(r191816)
@@ -264,7 +264,7 @@ SYSINIT(param, SI_SUB_TUNABLES, SI_ORDER
  * soalloc() returns a socket with a ref count of 0.
  */
 static struct socket *
-soalloc(void)
+soalloc(struct vnet *vnet)
 {
 	struct socket *so;
 
@@ -286,7 +286,8 @@ soalloc(void)
 	so->so_gencnt = ++so_gencnt;
 	++numopensockets;
 #ifdef VIMAGE
-	so->so_vnet = curvnet;
+	++vnet->sockcnt;	/* locked with so_global_mtx */
+	so->so_vnet = vnet;
 #endif
 	mtx_unlock(&so_global_mtx);
 	return (so);
@@ -307,6 +308,9 @@ sodealloc(struct socket *so)
 	mtx_lock(&so_global_mtx);
 	so->so_gencnt = ++so_gencnt;
 	--numopensockets;	/* Could be below, but faster here. */
+#ifdef VIMAGE
+	--so->so_vnet->sockcnt;
+#endif
 	mtx_unlock(&so_global_mtx);
 	if (so->so_rcv.sb_hiwat)
 		(void)chgsbsize(so->so_cred->cr_uidinfo,
@@ -356,7 +360,7 @@ socreate(int dom, struct socket **aso, i
 
 	if (prp->pr_type != type)
 		return (EPROTOTYPE);
-	so = soalloc();
+	so = soalloc(TD_TO_VNET(td));
 	if (so == NULL)
 		return (ENOBUFS);
 
@@ -382,7 +386,9 @@ socreate(int dom, struct socket **aso, i
 	 * Auto-sizing of socket buffers is managed by the protocols and
 	 * the appropriate flags must be set in the pru_attach function.
 	 */
+	CURVNET_SET(so->so_vnet);
 	error = (*prp->pr_usrreqs->pru_attach)(so, proto, td);
+	CURVNET_RESTORE();
 	if (error) {
 		KASSERT(so->so_count == 1, ("socreate: so_count %d",
 		    so->so_count));
@@ -424,7 +430,8 @@ sonewconn(struct socket *head, int conns
 	if (over)
 #endif
 		return (NULL);
-	so = soalloc();
+	VNET_ASSERT(head->so_vnet);
+	so = soalloc(head->so_vnet);
 	if (so == NULL)
 		return (NULL);
 	if ((head->so_options & SO_ACCEPTFILTER) != 0)
@@ -496,8 +503,12 @@ sonewconn(struct socket *head, int conns
 int
 sobind(struct socket *so, struct sockaddr *nam, struct thread *td)
 {
+	int error;
 
-	return ((*so->so_proto->pr_usrreqs->pru_bind)(so, nam, td));
+	CURVNET_SET(so->so_vnet);
+	error = (*so->so_proto->pr_usrreqs->pru_bind)(so, nam, td);
+	CURVNET_RESTORE();
+	return error;
 }
 
 /*
@@ -645,6 +656,7 @@ soclose(struct socket *so)
 
 	KASSERT(!(so->so_state & SS_NOFDREF), ("soclose: SS_NOFDREF on enter"));
 
+	CURVNET_SET(so->so_vnet);
 	funsetown(&so->so_sigio);
 	if (so->so_state & SS_ISCONNECTED) {
 		if ((so->so_state & SS_ISDISCONNECTING) == 0) {
@@ -696,6 +708,7 @@ drop:
 	KASSERT((so->so_state & SS_NOFDREF) == 0, ("soclose: NOFDREF"));
 	so->so_state |= SS_NOFDREF;
 	sorele(so);
+	CURVNET_RESTORE();
 	return (error);
 }
 
@@ -771,7 +784,9 @@ soconnect(struct socket *so, struct sock
 		 * biting us.
 		 */
 		so->so_error = 0;
+		CURVNET_SET(so->so_vnet);
 		error = (*so->so_proto->pr_usrreqs->pru_connect)(so, nam, td);
+		CURVNET_RESTORE();
 	}
 
 	return (error);
@@ -1287,9 +1302,13 @@ int
 sosend(struct socket *so, struct sockaddr *addr, struct uio *uio,
     struct mbuf *top, struct mbuf *control, int flags, struct thread *td)
 {
+	int error;
 
-	return (so->so_proto->pr_usrreqs->pru_sosend(so, addr, uio, top,
-	    control, flags, td));
+	CURVNET_SET(so->so_vnet);
+	error = so->so_proto->pr_usrreqs->pru_sosend(so, addr, uio, top,
+		control, flags, td);
+	CURVNET_RESTORE();
+	return (error);
 }
 
 /*
@@ -2037,6 +2056,7 @@ int
 soshutdown(struct socket *so, int how)
 {
 	struct protosw *pr = so->so_proto;
+	int error;
 
 	if (!(how == SHUT_RD || how == SHUT_WR || how == SHUT_RDWR))
 		return (EINVAL);
@@ -2045,8 +2065,12 @@ soshutdown(struct socket *so, int how)
 	}
 	if (how != SHUT_WR)
 		sorflush(so);
-	if (how != SHUT_RD)
-		return ((*pr->pr_usrreqs->pru_shutdown)(so));
+	if (how != SHUT_RD) {
+		CURVNET_SET(so->so_vnet);
+		error = (*pr->pr_usrreqs->pru_shutdown)(so);
+		CURVNET_RESTORE();
+		return (error);
+	}
 	return (0);
 }
 
@@ -2070,6 +2094,7 @@ sorflush(struct socket *so)
 	 * socket buffer.  Don't let our acquire be interrupted by a signal
 	 * despite any existing socket disposition on interruptable waiting.
 	 */
+	CURVNET_SET(so->so_vnet);
 	socantrcvmore(so);
 	(void) sblock(sb, SBL_WAIT | SBL_NOINTR);
 
@@ -2093,6 +2118,7 @@ sorflush(struct socket *so)
 	if (pr->pr_flags & PR_RIGHTS && pr->pr_domain->dom_dispose != NULL)
 		(*pr->pr_domain->dom_dispose)(asb.sb_mb);
 	sbrelease_internal(&asb, so);
+	CURVNET_RESTORE();
 }
 
 /*

Modified: head/sys/kern/uipc_syscalls.c
==============================================================================
--- head/sys/kern/uipc_syscalls.c	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/kern/uipc_syscalls.c	Tue May  5 10:56:12 2009	(r191816)
@@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #ifdef KTRACE
 #include 
 #endif
@@ -264,7 +265,9 @@ listen(td, uap)
 		if (error)
 			goto done;
 #endif
+		CURVNET_SET(so->so_vnet);
 		error = solisten(so, uap->backlog, td);
+		CURVNET_RESTORE();
 #ifdef MAC
 done:
 #endif
@@ -429,7 +432,9 @@ kern_accept(struct thread *td, int s, st
 	tmp = fflag & FASYNC;
 	(void) fo_ioctl(nfp, FIOASYNC, &tmp, td->td_ucred, td);
 	sa = 0;
+	CURVNET_SET(so->so_vnet);
 	error = soaccept(so, &sa);
+	CURVNET_RESTORE();
 	if (error) {
 		/*
 		 * return a namelen of zero for older code which might
@@ -976,9 +981,11 @@ kern_recvit(td, s, mp, fromseg, controlp
 		ktruio = cloneuio(&auio);
 #endif
 	len = auio.uio_resid;
+	CURVNET_SET(so->so_vnet);
 	error = soreceive(so, &fromsa, &auio, (struct mbuf **)0,
 	    (mp->msg_control || controlp) ? &control : (struct mbuf **)0,
 	    &mp->msg_flags);
+	CURVNET_RESTORE();
 	if (error) {
 		if (auio.uio_resid != (int)len && (error == ERESTART ||
 		    error == EINTR || error == EWOULDBLOCK))
@@ -1322,7 +1329,9 @@ kern_setsockopt(td, s, level, name, val,
 	error = getsock(td->td_proc->p_fd, s, &fp, NULL);
 	if (error == 0) {
 		so = fp->f_data;
+		CURVNET_SET(so->so_vnet);
 		error = sosetopt(so, &sopt);
+		CURVNET_RESTORE();
 		fdrop(fp, td);
 	}
 	return(error);
@@ -1400,7 +1409,9 @@ kern_getsockopt(td, s, level, name, val,
 	error = getsock(td->td_proc->p_fd, s, &fp, NULL);
 	if (error == 0) {
 		so = fp->f_data;
+		CURVNET_SET(so->so_vnet);
 		error = sogetopt(so, &sopt);
+		CURVNET_RESTORE();
 		*valsize = sopt.sopt_valsize;
 		fdrop(fp, td);
 	}
@@ -1463,7 +1474,9 @@ kern_getsockname(struct thread *td, int 
 		return (error);
 	so = fp->f_data;
 	*sa = NULL;
+	CURVNET_SET(so->so_vnet);
 	error = (*so->so_proto->pr_usrreqs->pru_sockaddr)(so, sa);
+	CURVNET_RESTORE();
 	if (error)
 		goto bad;
 	if (*sa == NULL)
@@ -1564,7 +1577,9 @@ kern_getpeername(struct thread *td, int 
 		goto done;
 	}
 	*sa = NULL;
+	CURVNET_SET(so->so_vnet);
 	error = (*so->so_proto->pr_usrreqs->pru_peeraddr)(so, sa);
+	CURVNET_RESTORE();
 	if (error)
 		goto bad;
 	if (*sa == NULL)
@@ -2176,9 +2191,11 @@ retry_space:
 				goto done;
 			}
 			SOCKBUF_UNLOCK(&so->so_snd);
+			CURVNET_SET(so->so_vnet);
 			/* Avoid error aliasing. */
 			err = (*so->so_proto->pr_usrreqs->pru_send)
 				    (so, 0, m, NULL, NULL, td);
+			CURVNET_RESTORE();
 			if (err == 0) {
 				/*
 				 * We need two counters to get the

Modified: head/sys/kern/uipc_usrreq.c
==============================================================================
--- head/sys/kern/uipc_usrreq.c	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/kern/uipc_usrreq.c	Tue May  5 10:56:12 2009	(r191816)
@@ -90,6 +90,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #ifdef DDB
 #include 
@@ -1647,6 +1648,10 @@ static void
 unp_init(void)
 {
 
+#ifdef VIMAGE
+	if (!IS_DEFAULT_VNET(curvnet))
+		return;
+#endif
 	unp_zone = uma_zcreate("unpcb", sizeof(struct unpcb), NULL, NULL,
 	    NULL, NULL, UMA_ALIGN_PTR, 0);
 	if (unp_zone == NULL)

Modified: head/sys/net/bpf.c
==============================================================================
--- head/sys/net/bpf.c	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/net/bpf.c	Tue May  5 10:56:12 2009	(r191816)
@@ -873,11 +873,10 @@ bpfwrite(struct cdev *dev, struct uio *u
 	m->m_len -= hlen;
 	m->m_data += hlen;	/* XXX */
 
+	CURVNET_SET(ifp->if_vnet);
 #ifdef MAC
 	BPFD_LOCK(d);
-	CURVNET_SET(ifp->if_vnet);
 	mac_bpfdesc_create_mbuf(d, m);
-	CURVNET_RESTORE();
 	if (mc != NULL)
 		mac_bpfdesc_create_mbuf(d, mc);
 	BPFD_UNLOCK(d);
@@ -893,6 +892,7 @@ bpfwrite(struct cdev *dev, struct uio *u
 		else
 			m_freem(mc);
 	}
+	CURVNET_RESTORE();
 
 	return (error);
 }

Modified: head/sys/net/if.c
==============================================================================
--- head/sys/net/if.c	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/net/if.c	Tue May  5 10:56:12 2009	(r191816)
@@ -53,6 +53,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -126,7 +127,6 @@ static void	if_attachdomain(void *);
 static void	if_attachdomain1(struct ifnet *);
 static int	ifconf(u_long, caddr_t);
 static void	if_freemulti(struct ifmultiaddr *);
-static void	if_grow(void);
 static void	if_init(void *);
 static void	if_check(void *);
 static void	if_route(struct ifnet *, int flag, int fam);
@@ -202,7 +202,7 @@ MALLOC_DEFINE(M_IFNET, "ifnet", "interfa
 MALLOC_DEFINE(M_IFADDR, "ifaddr", "interface address");
 MALLOC_DEFINE(M_IFMADDR, "ether_multi", "link-level multicast address");
 
-static struct ifnet *
+struct ifnet *
 ifnet_byindex_locked(u_short idx)
 {
 	INIT_VNET_NET(curvnet);
@@ -239,7 +239,7 @@ ifnet_byindex_ref(u_short idx)
 	return (ifp);
 }
 
-static void
+void
 ifnet_setbyindex(u_short idx, struct ifnet *ifp)
 {
 	INIT_VNET_NET(curvnet);
@@ -445,7 +445,7 @@ vnet_net_iattach(const void *unused __un
 	return (0);
 }
 
-static void
+void
 if_grow(void)
 {
 	INIT_VNET_NET(curvnet);
@@ -696,11 +696,13 @@ if_attach(struct ifnet *ifp)
 	mac_ifnet_create(ifp);
 #endif
 
-	ifdev_setbyindex(ifp->if_index, make_dev(&net_cdevsw,
-	    ifp->if_index, UID_ROOT, GID_WHEEL, 0600, "%s/%s",
-	    net_cdevsw.d_name, ifp->if_xname));
-	make_dev_alias(ifdev_byindex(ifp->if_index), "%s%d",
-	    net_cdevsw.d_name, ifp->if_index);
+	if (IS_DEFAULT_VNET(curvnet)) {
+		ifdev_setbyindex(ifp->if_index, make_dev(&net_cdevsw,
+		    ifp->if_index, UID_ROOT, GID_WHEEL, 0600, "%s/%s",
+		    net_cdevsw.d_name, ifp->if_xname));
+		make_dev_alias(ifdev_byindex(ifp->if_index), "%s%d",
+		    net_cdevsw.d_name, ifp->if_index);
+	}
 
 	ifq_attach(&ifp->if_snd, ifp);
 
@@ -742,13 +744,17 @@ if_attach(struct ifnet *ifp)
 
 	IFNET_WLOCK();
 	TAILQ_INSERT_TAIL(&V_ifnet, ifp, if_link);
+#ifdef VIMAGE
+	curvnet->ifccnt++;
+#endif
 	IFNET_WUNLOCK();
 
 	if (domain_init_status >= 2)
 		if_attachdomain1(ifp);
 
 	EVENTHANDLER_INVOKE(ifnet_arrival_event, ifp);
-	devctl_notify("IFNET", ifp->if_xname, "ATTACH", NULL);
+	if (IS_DEFAULT_VNET(curvnet))
+		devctl_notify("IFNET", ifp->if_xname, "ATTACH", NULL);
 
 	/* Announce the interface. */
 	rt_ifannouncemsg(ifp, IFAN_ARRIVAL);
@@ -895,6 +901,10 @@ if_detach(struct ifnet *ifp)
 			found = 1;
 			break;
 		}
+#ifdef VIMAGE
+	if (found)
+		curvnet->ifccnt--;
+#endif
 	IFNET_WUNLOCK();
 	if (!found)
 		return;
@@ -943,7 +953,8 @@ if_detach(struct ifnet *ifp)
 	 * Clean up all addresses.
 	 */
 	ifp->if_addr = NULL;
-	destroy_dev(ifdev_byindex(ifp->if_index));
+	if (IS_DEFAULT_VNET(curvnet))
+		destroy_dev(ifdev_byindex(ifp->if_index));
 	ifdev_setbyindex(ifp->if_index, NULL);	
 
 	/* We can now free link ifaddr. */
@@ -972,7 +983,8 @@ if_detach(struct ifnet *ifp)
 	/* Announce that the interface is gone. */
 	rt_ifannouncemsg(ifp, IFAN_DEPARTURE);
 	EVENTHANDLER_INVOKE(ifnet_departure_event, ifp);
-	devctl_notify("IFNET", ifp->if_xname, "DETACH", NULL);
+	if (IS_DEFAULT_VNET(curvnet))
+		devctl_notify("IFNET", ifp->if_xname, "DETACH", NULL);
 	if_delgroups(ifp);
 
 	IF_AFDATA_LOCK(ifp);
@@ -1701,8 +1713,10 @@ do_link_state_change(void *arg, int pend
 		(*lagg_linkstate_p)(ifp, link_state);
 	}
 
-	devctl_notify("IFNET", ifp->if_xname,
-	    (link_state == LINK_STATE_UP) ? "LINK_UP" : "LINK_DOWN", NULL);
+	if (IS_DEFAULT_VNET(curvnet))
+		devctl_notify("IFNET", ifp->if_xname,
+		    (link_state == LINK_STATE_UP) ? "LINK_UP" : "LINK_DOWN",
+		    NULL);
 	if (pending > 1)
 		if_printf(ifp, "%d link states coalesced\n", pending);
 	if (log_link_state_change)

Modified: head/sys/net/if_clone.c
==============================================================================
--- head/sys/net/if_clone.c	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/net/if_clone.c	Tue May  5 10:56:12 2009	(r191816)
@@ -39,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -49,6 +50,7 @@
 #include 
 #include 
 #include 
+#include 
 
 static void	if_clone_free(struct if_clone *ifc);
 static int	if_clone_createif(struct if_clone *ifc, char *name, size_t len,
@@ -203,15 +205,14 @@ if_clone_destroyif(struct if_clone *ifc,
 {
 	int err;
 
-	if (ifc->ifc_destroy == NULL) {
-		err = EOPNOTSUPP;
-		goto done;
-	}
+	if (ifc->ifc_destroy == NULL)
+		return(EOPNOTSUPP);
 
 	IF_CLONE_LOCK(ifc);
 	IFC_IFLIST_REMOVE(ifc, ifp);
 	IF_CLONE_UNLOCK(ifc);
 
+	CURVNET_SET_QUIET(ifp->if_vnet);
 	if_delgroup(ifp, ifc->ifc_name);
 
 	err =  (*ifc->ifc_destroy)(ifc, ifp);
@@ -223,8 +224,7 @@ if_clone_destroyif(struct if_clone *ifc,
 		IFC_IFLIST_INSERT(ifc, ifp);
 		IF_CLONE_UNLOCK(ifc);
 	}
-
-done:
+	CURVNET_RESTORE();
 	return (err);
 }
 

Modified: head/sys/net/if_ethersubr.c
==============================================================================
--- head/sys/net/if_ethersubr.c	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/net/if_ethersubr.c	Tue May  5 10:56:12 2009	(r191816)
@@ -602,6 +602,8 @@ ether_input(struct ifnet *ifp, struct mb
 	}
 #endif
 
+	CURVNET_SET_QUIET(ifp->if_vnet);
+
 	if (ETHER_IS_MULTICAST(eh->ether_dhost)) {
 		if (ETHER_IS_BROADCAST(eh->ether_dhost))
 			m->m_flags |= M_BCAST;
@@ -638,6 +640,7 @@ ether_input(struct ifnet *ifp, struct mb
 	/* Allow monitor mode to claim this frame, after stats are updated. */
 	if (ifp->if_flags & IFF_MONITOR) {
 		m_freem(m);
+		CURVNET_RESTORE();
 		return;
 	}
 
@@ -686,8 +689,10 @@ ether_input(struct ifnet *ifp, struct mb
 		    ("%s: ng_ether_input_p is NULL", __func__));
 		m->m_flags &= ~M_PROMISC;
 		(*ng_ether_input_p)(ifp, &m);
-		if (m == NULL)
+		if (m == NULL) {
+			CURVNET_RESTORE();
 			return;
+		}
 	}
 
 	/*
@@ -698,8 +703,10 @@ ether_input(struct ifnet *ifp, struct mb
 	if (ifp->if_bridge != NULL) {
 		m->m_flags &= ~M_PROMISC;
 		BRIDGE_INPUT(ifp, m);
-		if (m == NULL)
+		if (m == NULL) {
+			CURVNET_RESTORE();
 			return;
+		}
 	}
 
 #ifdef DEV_CARP
@@ -735,6 +742,7 @@ ether_input(struct ifnet *ifp, struct mb
 		random_harvest(m, 16, 3, 0, RANDOM_NET);
 
 	ether_demux(ifp, m);
+	CURVNET_RESTORE();
 }
 
 /*

Modified: head/sys/net/if_var.h
==============================================================================
--- head/sys/net/if_var.h	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/net/if_var.h	Tue May  5 10:56:12 2009	(r191816)
@@ -731,7 +731,9 @@ struct ifindex_entry {
  * to call ifnet_byindex() instead if ifnet_byindex_ref().
  */
 struct ifnet	*ifnet_byindex(u_short idx);
+struct ifnet	*ifnet_byindex_locked(u_short idx);
 struct ifnet	*ifnet_byindex_ref(u_short idx);
+void ifnet_setbyindex(u_short idx, struct ifnet *ifp);
 
 /*
  * Given the index, ifaddr_byindex() returns the one and only
@@ -755,6 +757,7 @@ int	if_allmulti(struct ifnet *, int);
 struct	ifnet* if_alloc(u_char);
 void	if_attach(struct ifnet *);
 void	if_dead(struct ifnet *);
+void	if_grow(void);
 int	if_delmulti(struct ifnet *, struct sockaddr *);
 void	if_delmulti_ifma(struct ifmultiaddr *);
 void	if_detach(struct ifnet *);

Modified: head/sys/net/netisr.c
==============================================================================
--- head/sys/net/netisr.c	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/net/netisr.c	Tue May  5 10:56:12 2009	(r191816)
@@ -43,6 +43,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -142,7 +143,10 @@ netisr_processqueue(struct netisr *ni)
 		IF_DEQUEUE(ni->ni_queue, m);
 		if (m == NULL)
 			break;
+		VNET_ASSERT(m->m_pkthdr.rcvif != NULL);
+		CURVNET_SET(m->m_pkthdr.rcvif->if_vnet);
 		ni->ni_handler(m);
+		CURVNET_RESTORE();
 	}
 }
 

Modified: head/sys/net/rtsock.c
==============================================================================
--- head/sys/net/rtsock.c	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/net/rtsock.c	Tue May  5 10:56:12 2009	(r191816)
@@ -1206,6 +1206,7 @@ rt_ifannouncemsg(struct ifnet *ifp, int 
 static void
 rt_dispatch(struct mbuf *m, const struct sockaddr *sa)
 {
+	INIT_VNET_NET(curvnet);
 	struct m_tag *tag;
 
 	/*
@@ -1223,6 +1224,14 @@ rt_dispatch(struct mbuf *m, const struct
 		*(unsigned short *)(tag + 1) = sa->sa_family;
 		m_tag_prepend(m, tag);
 	}
+#ifdef VIMAGE
+	if (V_loif)
+		m->m_pkthdr.rcvif = V_loif;
+	else {
+		m_freem(m);
+		return;
+	}
+#endif
 	netisr_queue(NETISR_ROUTE, m);	/* mbuf is free'd on failure. */
 }
 

Modified: head/sys/net80211/ieee80211_freebsd.c
==============================================================================
--- head/sys/net80211/ieee80211_freebsd.c	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/net80211/ieee80211_freebsd.c	Tue May  5 10:56:12 2009	(r191816)
@@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -498,9 +499,11 @@ notify_macaddr(struct ifnet *ifp, int op
 {
 	struct ieee80211_join_event iev;
 
+	CURVNET_SET(ifp->if_vnet);
 	memset(&iev, 0, sizeof(iev));
 	IEEE80211_ADDR_COPY(iev.iev_addr, mac);
 	rt_ieee80211msg(ifp, op, &iev, sizeof(iev));
+	CURVNET_RESTORE();
 }
 
 void
@@ -509,6 +512,7 @@ ieee80211_notify_node_join(struct ieee80
 	struct ieee80211vap *vap = ni->ni_vap;
 	struct ifnet *ifp = vap->iv_ifp;
 
+	CURVNET_SET_QUIET(ifp->if_vnet);
 	IEEE80211_NOTE(vap, IEEE80211_MSG_NODE, ni, "%snode join",
 	    (ni == vap->iv_bss) ? "bss " : "");
 
@@ -520,6 +524,7 @@ ieee80211_notify_node_join(struct ieee80
 		notify_macaddr(ifp, newassoc ?
 		    RTM_IEEE80211_JOIN : RTM_IEEE80211_REJOIN, ni->ni_macaddr);
 	}
+	CURVNET_RESTORE();
 }
 
 void
@@ -528,6 +533,7 @@ ieee80211_notify_node_leave(struct ieee8
 	struct ieee80211vap *vap = ni->ni_vap;
 	struct ifnet *ifp = vap->iv_ifp;
 
+	CURVNET_SET_QUIET(ifp->if_vnet);
 	IEEE80211_NOTE(vap, IEEE80211_MSG_NODE, ni, "%snode leave",
 	    (ni == vap->iv_bss) ? "bss " : "");
 
@@ -538,6 +544,7 @@ ieee80211_notify_node_leave(struct ieee8
 		/* fire off wireless event station leaving */
 		notify_macaddr(ifp, RTM_IEEE80211_LEAVE, ni->ni_macaddr);
 	}
+	CURVNET_RESTORE();
 }
 
 void
@@ -548,7 +555,9 @@ ieee80211_notify_scan_done(struct ieee80
 	IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, "%s\n", "notify scan done");
 
 	/* dispatch wireless event indicating scan completed */
+	CURVNET_SET(ifp->if_vnet);
 	rt_ieee80211msg(ifp, RTM_IEEE80211_SCAN, NULL, 0);
+	CURVNET_RESTORE();
 }
 
 void
@@ -576,7 +585,9 @@ ieee80211_notify_replay_failure(struct i
 			iev.iev_keyix = k->wk_keyix;
 		iev.iev_keyrsc = k->wk_keyrsc[0];	/* XXX need tid */
 		iev.iev_rsc = rsc;
+		CURVNET_SET(ifp->if_vnet);
 		rt_ieee80211msg(ifp, RTM_IEEE80211_REPLAY, &iev, sizeof(iev));
+		CURVNET_RESTORE();
 	}
 }
 
@@ -597,7 +608,9 @@ ieee80211_notify_michael_failure(struct 
 		IEEE80211_ADDR_COPY(iev.iev_src, wh->i_addr2);
 		iev.iev_cipher = IEEE80211_CIPHER_TKIP;
 		iev.iev_keyix = keyix;
+		CURVNET_SET(ifp->if_vnet);
 		rt_ieee80211msg(ifp, RTM_IEEE80211_MICHAEL, &iev, sizeof(iev));
+		CURVNET_RESTORE();
 	}
 }
 

Modified: head/sys/netgraph/netgraph.h
==============================================================================
--- head/sys/netgraph/netgraph.h	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/netgraph/netgraph.h	Tue May  5 10:56:12 2009	(r191816)
@@ -352,6 +352,7 @@ struct ng_node {
 	LIST_ENTRY(ng_node)	  nd_idnodes;	/* ID hash collision list */
 	struct	ng_queue	  nd_input_queue; /* input queue for locking */
 	int	nd_refs;		/* # of references to this node */
+	struct	vnet		 *nd_vnet;	/* network stack instance */
 #ifdef	NETGRAPH_DEBUG /*----------------------------------------------*/
 #define ND_MAGIC 0x59264837
 	int	nd_magic;

Modified: head/sys/netinet/if_ether.c
==============================================================================
--- head/sys/netinet/if_ether.c	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/netinet/if_ether.c	Tue May  5 10:56:12 2009	(r191816)
@@ -143,10 +143,12 @@ arp_ifscrub(struct ifnet *ifp, uint32_t 
 	addr4.sin_len    = sizeof(addr4);
 	addr4.sin_family = AF_INET;
 	addr4.sin_addr.s_addr = addr;
+	CURVNET_SET(ifp->if_vnet);
 	IF_AFDATA_LOCK(ifp);
 	lla_lookup(LLTABLE(ifp), (LLE_DELETE | LLE_IFADDR),
 	    (struct sockaddr *)&addr4);
 	IF_AFDATA_UNLOCK(ifp);
+	CURVNET_RESTORE();
 }
 #endif
 

Modified: head/sys/netinet/igmp.c
==============================================================================
--- head/sys/netinet/igmp.c	Tue May  5 10:46:49 2009	(r191815)
+++ head/sys/netinet/igmp.c	Tue May  5 10:56:12 2009	(r191816)
@@ -1117,6 +1117,9 @@ igmp_input_v3_group_query(struct in_mult
 
 	nsrc = ntohs(igmpv3->igmp_numsrc);
 
+	if (!IS_DEFAULT_VNET(curvnet))
+		return (retval);
+
 	/*
 	 * Deal with group-specific queries upfront.
 	 * If any group query is already pending, purge any recorded
@@ -3372,7 +3375,7 @@ igmp_intr(struct mbuf *m)
 	 * indexes to guard against interface detach, they are
 	 * unique to each VIMAGE and must be retrieved.
 	 */
-	CURVNET_SET(m->m_pkthdr.header);
+	CURVNET_SET((struct vnet *)(m->m_pkthdr.header));
 	INIT_VNET_NET(curvnet);
 	INIT_VNET_INET(curvnet);
 	ifindex = igmp_restore_context(m);
@@ -3654,9 +3657,7 @@ igmp_modevent(module_t mod, int type, vo
 	break;
     case MOD_UNLOAD:
 #ifndef VIMAGE_GLOBALS

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 12:57:16 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C45E3106566C;
	Tue,  5 May 2009 12:57:16 +0000 (UTC)
	(envelope-from stas@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AFEF48FC19;
	Tue,  5 May 2009 12:57:16 +0000 (UTC)
	(envelope-from stas@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45CvGAg081714;
	Tue, 5 May 2009 12:57:16 GMT (envelope-from stas@svn.freebsd.org)
Received: (from stas@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45CvGrl081713;
	Tue, 5 May 2009 12:57:16 GMT (envelope-from stas@svn.freebsd.org)
Message-Id: <200905051257.n45CvGrl081713@svn.freebsd.org>
From: Stanislav Sedov 
Date: Tue, 5 May 2009 12:57:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191817 - head/sys/arm/arm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 12:57:17 -0000

Author: stas
Date: Tue May  5 12:57:16 2009
New Revision: 191817
URL: http://svn.freebsd.org/changeset/base/191817

Log:
  - Add support for PXA270 cpu.
  
  Submitted by:	Jacques Fourie 

Modified:
  head/sys/arm/arm/cpufunc.c

Modified: head/sys/arm/arm/cpufunc.c
==============================================================================
--- head/sys/arm/arm/cpufunc.c	Tue May  5 10:56:12 2009	(r191816)
+++ head/sys/arm/arm/cpufunc.c	Tue May  5 12:57:16 2009	(r191817)
@@ -1192,6 +1192,7 @@ set_cpufuncs()
 #ifdef CPU_XSCALE_PXA2X0
 	/* ignore core revision to test PXA2xx CPUs */
 	if ((cputype & ~CPU_ID_XSCALE_COREREV_MASK) == CPU_ID_PXA250 ||
+	    (cputype & ~CPU_ID_XSCALE_COREREV_MASK) == CPU_ID_PXA27X ||
 	    (cputype & ~CPU_ID_XSCALE_COREREV_MASK) == CPU_ID_PXA210) {
 
 		cpufuncs = xscale_cpufuncs;

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 13:48:54 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4B7E71065677;
	Tue,  5 May 2009 13:48:54 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 38AD68FC1C;
	Tue,  5 May 2009 13:48:54 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45Dms17082856;
	Tue, 5 May 2009 13:48:54 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45Dms1Q082853;
	Tue, 5 May 2009 13:48:54 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <200905051348.n45Dms1Q082853@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Tue, 5 May 2009 13:48:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191818 - head/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 13:48:54 -0000

Author: trasz
Date: Tue May  5 13:48:53 2009
New Revision: 191818
URL: http://svn.freebsd.org/changeset/base/191818

Log:
  Make gmultipath(8) easier to find.

Modified:
  head/share/man/man4/geom_fox.4
  head/share/man/man4/isp.4
  head/share/man/man4/mpt.4

Modified: head/share/man/man4/geom_fox.4
==============================================================================
--- head/share/man/man4/geom_fox.4	Tue May  5 12:57:16 2009	(r191817)
+++ head/share/man/man4/geom_fox.4	Tue May  5 13:48:53 2009	(r191818)
@@ -175,7 +175,8 @@ da2.fox     N/A  da2
 .El
 .Sh SEE ALSO
 .Xr GEOM 4 ,
-.Xr geom 8
+.Xr geom 8 ,
+.Xr gmultipath 8
 .Sh CAVEATS
 The
 .Nm

Modified: head/share/man/man4/isp.4
==============================================================================
--- head/share/man/man4/isp.4	Tue May  5 12:57:16 2009	(r191817)
+++ head/share/man/man4/isp.4	Tue May  5 13:48:53 2009	(r191818)
@@ -224,7 +224,8 @@ This is the readonly World Wide Port Nam
 .Xr intro 4 ,
 .Xr ispfw 4 ,
 .Xr sa 4 ,
-.Xr scsi 4
+.Xr scsi 4 ,
+.Xr gmultipath 8
 .Sh AUTHORS
 The
 .Nm

Modified: head/share/man/man4/mpt.4
==============================================================================
--- head/share/man/man4/mpt.4	Tue May  5 12:57:16 2009	(r191817)
+++ head/share/man/man4/mpt.4	Tue May  5 13:48:53 2009	(r191818)
@@ -154,7 +154,8 @@ can take on - no separate compilation is
 .Xr pci 4 ,
 .Xr sa 4 ,
 .Xr scsi 4 ,
-.Xr targ 4
+.Xr targ 4 ,
+.Xr gmultipath 8
 .Rs
 .%T "LSI Logic Website"
 .%O http://www.lsilogic.com/

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 14:21:47 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D5102106564A;
	Tue,  5 May 2009 14:21:47 +0000 (UTC)
	(envelope-from alexander@leidinger.net)
Received: from redbull.bpaserver.net (redbullneu.bpaserver.net
	[213.198.78.217])
	by mx1.freebsd.org (Postfix) with ESMTP id 78F4B8FC0C;
	Tue,  5 May 2009 14:21:47 +0000 (UTC)
	(envelope-from alexander@leidinger.net)
Received: from outgoing.leidinger.net (pD9E2E3AD.dip.t-dialin.net
	[217.226.227.173])
	by redbull.bpaserver.net (Postfix) with ESMTP id B83192E0DC;
	Tue,  5 May 2009 16:21:42 +0200 (CEST)
Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102])
	by outgoing.leidinger.net (Postfix) with ESMTP id 88181A3D61;
	Tue,  5 May 2009 16:21:39 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net;
	s=outgoing-alex; t=1241533299;
	bh=OQT1KUnl6M8bOxZho4at6QU6j1wfo4f1EYj9NmvTfpU=;
	h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To:
	MIME-Version:Content-Type:Content-Transfer-Encoding;
	b=abV6mqxoeSiuY1Aa8gsu6YPojGRVQINc25OWwFQQnHiGEIhWvUzQw+z7VoOnY+eHV
	DR5VYBG7FeU5JN+8vvferyYyBKW6CpxhqjIlqFmQOfsjOcZqF5cJ0JlihF853ewyMV
	+ymN3tn7hFc/okspsjL9QVGfcYHIJjz1U/PkWOJbsn5MiYgtNWXEuppHYQkRDzJHKM
	bf9bUWIb/a3m3P9K8v5bAjOTlbdnAnn9iu6f7PiYKcCLBlt7vTij242B6WPRuWWjV+
	1/zN/MXLrd41G6541YtMpBtgu42o7pM+kALZj/lf2puDJHKR1FMtKGJETHHq0qlSDT
	Ug54jTQ6epqZQ==
Received: (from www@localhost)
	by webmail.leidinger.net (8.14.3/8.13.8/Submit) id n45ELcMq092937;
	Tue, 5 May 2009 16:21:39 +0200 (CEST)
	(envelope-from Alexander@Leidinger.net)
Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by
	webmail.leidinger.net (Horde Framework) with HTTP; Tue, 05 May 2009
	16:21:38 +0200
Message-ID: <20090505162138.14395avh7ehv6zcw@webmail.leidinger.net>
X-Priority: 3 (Normal)
Date: Tue, 05 May 2009 16:21:38 +0200
From: Alexander Leidinger 
To: Robert Watson 
References: <200905040219.n442Jq3V030903@svn.freebsd.org>
	<20090504133527.43351tf1iwwi5sro@webmail.leidinger.net>
	
	<20090504142227.11823qbind1lyyuc@webmail.leidinger.net>
	
In-Reply-To: 
MIME-Version: 1.0
Content-Type: text/plain;
 charset=UTF-8;
 DelSp="Yes";
 format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
User-Agent: Internet Messaging Program (IMP) 4.3.3 / FreeBSD-8.0
X-BPAnet-MailScanner-Information: Please contact the ISP for more information
X-MailScanner-ID: B83192E0DC.28D28
X-BPAnet-MailScanner: Found to be clean
X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, 
	score=-14.746, required 6, BAYES_00 -15.00,
	DKIM_SIGNED 0.00, 
	DKIM_VERIFIED -0.00, RDNS_DYNAMIC 0.10, TW_SV 0.08, TW_TN 0.08)
X-BPAnet-MailScanner-From: alexander@leidinger.net
X-Spam-Status: No
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r191777 - head/sys/nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 14:21:48 -0000

Quoting Robert Watson  (from Mon, 4 May 2009  
14:50:54 +0100 (BST)):

> Well, 'dtraceall' claims dependency on all the provider modules, so  
> results in everything being loaded including dtnfsclient.  In  
> theory, dtnfsclient and other providers should contain the necessary  
> module dependencies to cause them to load everything they depend on,  
> but I also have the feeling I've run into the problem you're seeing.  
>  Could you provide the symbol missing errors from the console?  It  
> should be fairly easy to track down the missing graph edge using that.

link_elf: symbol nfsclient_accesscache_flush_done_id undefined
KLD dtraceall.ko: depends on dtnfsclient - not available

Bye,
Alexander.

-- 
Calling you stupid is an insult to stupid people!
		-- Wanda, "A Fish Called Wanda"

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 14:23:59 2009
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 89722106564A;
	Tue,  5 May 2009 14:23:59 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 5F5168FC13;
	Tue,  5 May 2009 14:23:59 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from fledge.watson.org (fledge.watson.org [65.122.17.41])
	by cyrus.watson.org (Postfix) with ESMTPS id 1289B46B03;
	Tue,  5 May 2009 10:23:59 -0400 (EDT)
Date: Tue, 5 May 2009 15:23:58 +0100 (BST)
From: Robert Watson 
X-X-Sender: robert@fledge.watson.org
To: Alexander Leidinger 
In-Reply-To: <20090505162138.14395avh7ehv6zcw@webmail.leidinger.net>
Message-ID: 
References: <200905040219.n442Jq3V030903@svn.freebsd.org>
	<20090504133527.43351tf1iwwi5sro@webmail.leidinger.net>
	
	<20090504142227.11823qbind1lyyuc@webmail.leidinger.net>
	
	<20090505162138.14395avh7ehv6zcw@webmail.leidinger.net>
User-Agent: Alpine 2.00 (BSF 1167 2008-08-23)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r191777 - head/sys/nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 14:24:00 -0000


On Tue, 5 May 2009, Alexander Leidinger wrote:

> Quoting Robert Watson  (from Mon, 4 May 2009 14:50:54 
> +0100 (BST)):
>
>> Well, 'dtraceall' claims dependency on all the provider modules, so results 
>> in everything being loaded including dtnfsclient.  In theory, dtnfsclient 
>> and other providers should contain the necessary module dependencies to 
>> cause them to load everything they depend on, but I also have the feeling 
>> I've run into the problem you're seeing.  Could you provide the symbol 
>> missing errors from the console?  It should be fairly easy to track down 
>> the missing graph edge using that.
>
> link_elf: symbol nfsclient_accesscache_flush_done_id undefined KLD 
> dtraceall.ko: depends on dtnfsclient - not available

Is the nfsclient module loaded?  If so, was the module built using a kernel 
configured for KDTRACE_HOOKS?

Robert N M Watson
Computer Laboratory
University of Cambridge

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 14:34:00 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 171A71065673;
	Tue,  5 May 2009 14:34:00 +0000 (UTC)
	(envelope-from alexander@leidinger.net)
Received: from redbull.bpaserver.net (redbullneu.bpaserver.net
	[213.198.78.217])
	by mx1.freebsd.org (Postfix) with ESMTP id B23388FC08;
	Tue,  5 May 2009 14:33:59 +0000 (UTC)
	(envelope-from alexander@leidinger.net)
Received: from outgoing.leidinger.net (pD9E2E3AD.dip.t-dialin.net
	[217.226.227.173])
	by redbull.bpaserver.net (Postfix) with ESMTP id 52E802E0DC;
	Tue,  5 May 2009 16:33:56 +0200 (CEST)
Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102])
	by outgoing.leidinger.net (Postfix) with ESMTP id 01B898D884;
	Tue,  5 May 2009 16:33:52 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net;
	s=outgoing-alex; t=1241534033;
	bh=a1PMAkGEOJgKIHEo72AJ3Z4BSJKd1o41b1ZrkfVkXW4=;
	h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To:
	MIME-Version:Content-Type:Content-Transfer-Encoding;
	b=NK6lWRbGyItsooXbV6GMr4lJLOx/NqE50Tl13RYqh5Ogz8EGT7b66mnjehvOWRCS4
	DO9JFTdu2Qcnz8UVDSwtyX492eFmKLjmYWKMxToX00THMHq0xnHmSMr3yQGa9QyMWD
	P9C98K0mApOkoyPKdcB2aLk7wnaWcoFe+m0dAU+P7S46XYiJ4zOdil2gN1q/5mKQrA
	WUsXW4ox/be+rCuyK2kpBnt8+MSthekv97YpGlaKzHsBsZ+hiqg2JfgXdKK8z0s98I
	wpIO2EHCvaYUPKKZYaQqRA3+G1MleRL1i+ntOntysJv5ZnjPEvyP9gjCjLTv2AAdwl
	VpSrTjV9Xp9bQ==
Received: (from www@localhost)
	by webmail.leidinger.net (8.14.3/8.13.8/Submit) id n45EXqAa097082;
	Tue, 5 May 2009 16:33:52 +0200 (CEST)
	(envelope-from Alexander@Leidinger.net)
Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by
	webmail.leidinger.net (Horde Framework) with HTTP; Tue, 05 May 2009
	16:33:52 +0200
Message-ID: <20090505163352.810118qlbvxymfkg@webmail.leidinger.net>
X-Priority: 3 (Normal)
Date: Tue, 05 May 2009 16:33:52 +0200
From: Alexander Leidinger 
To: Marko Zec 
References: <200905051056.n45AuCho079307@svn.freebsd.org>
In-Reply-To: <200905051056.n45AuCho079307@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=UTF-8;
 DelSp="Yes";
 format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
User-Agent: Internet Messaging Program (IMP) 4.3.3 / FreeBSD-8.0
X-BPAnet-MailScanner-Information: Please contact the ISP for more information
X-MailScanner-ID: 52E802E0DC.72E8F
X-BPAnet-MailScanner: Found to be clean
X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, 
	score=-14.823, required 6, BAYES_00 -15.00,
	DKIM_SIGNED 0.00, 
	DKIM_VERIFIED -0.00, RDNS_DYNAMIC 0.10, TW_SV 0.08)
X-BPAnet-MailScanner-From: alexander@leidinger.net
X-Spam-Status: No
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r191816 - in head/sys: conf dev/cxgb/ulp/tom kern
 net net80211 netgraph netinet netinet6 netipsec nfsclient sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 14:34:00 -0000

Quoting Marko Zec  (from Tue, 5 May 2009 10:56:12  
+0000 (UTC)):

>   The exact placement of the CURVNET_SET() / CURVNET_RESTORE() macros
>   was a result of an empirical iterative process,

Was the linuxulator taken into account in this process?

Bye,
Alexander.

-- 
Thus spake the master programmer:
	"Time for you to leave."
		-- Geoffrey James, "The Tao of Programming"

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 14:37:59 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 315A1106566C;
	Tue,  5 May 2009 14:37:59 +0000 (UTC)
	(envelope-from alexander@leidinger.net)
Received: from redbull.bpaserver.net (redbullneu.bpaserver.net
	[213.198.78.217])
	by mx1.freebsd.org (Postfix) with ESMTP id BB6588FC16;
	Tue,  5 May 2009 14:37:58 +0000 (UTC)
	(envelope-from alexander@leidinger.net)
Received: from outgoing.leidinger.net (pD9E2E3AD.dip.t-dialin.net
	[217.226.227.173])
	by redbull.bpaserver.net (Postfix) with ESMTP id 6E8562E0DC;
	Tue,  5 May 2009 16:37:54 +0200 (CEST)
Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102])
	by outgoing.leidinger.net (Postfix) with ESMTP id 7929B8DAD1;
	Tue,  5 May 2009 16:37:51 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net;
	s=outgoing-alex; t=1241534271;
	bh=efoL16CXThAQz9ALA5ty2mf2Nej3J853kFjtQp/3/SA=;
	h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To:
	MIME-Version:Content-Type:Content-Transfer-Encoding;
	b=rLJr/vh7ga+Pjkx687GXo+R2G0w8r6yDqItyIcWlECqHIwO3avUqCFdmjYn0aHKVc
	/5ZXqagc3ovFHJssNJeMUUd6dWCJT6xKVqK45vzyT/t/mFODDqkJLDNMv8GFd6OIta
	0v79wrSZjWmq0+jXZB+a5d958Wj/P06/vA+EbkCQC0Ps3h5ogGcc2Ch/H+SYxSFCx5
	QGBFvrw3fgFi3dC1nEt9LQtzINGLuxUvjHvdC15yff0aCC7sJV28QxtpctQ3ogtwk+
	+bRE27wcqs86jVAopJi+frcsbPtI+NKXlsXawElnT9YFPgN7kVDnPtYpZrfa+mzx3L
	apoouJ6mwnnfw==
Received: (from www@localhost)
	by webmail.leidinger.net (8.14.3/8.13.8/Submit) id n45EbpoQ097874;
	Tue, 5 May 2009 16:37:51 +0200 (CEST)
	(envelope-from Alexander@Leidinger.net)
Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by
	webmail.leidinger.net (Horde Framework) with HTTP; Tue, 05 May 2009
	16:37:50 +0200
Message-ID: <20090505163750.82426dctf57hxzk8@webmail.leidinger.net>
X-Priority: 3 (Normal)
Date: Tue, 05 May 2009 16:37:50 +0200
From: Alexander Leidinger 
To: Robert Watson 
References: <200905040219.n442Jq3V030903@svn.freebsd.org>
	<20090504133527.43351tf1iwwi5sro@webmail.leidinger.net>
	
	<20090504142227.11823qbind1lyyuc@webmail.leidinger.net>
	
	<20090505162138.14395avh7ehv6zcw@webmail.leidinger.net>
	
In-Reply-To: 
MIME-Version: 1.0
Content-Type: text/plain;
 charset=UTF-8;
 DelSp="Yes";
 format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
User-Agent: Internet Messaging Program (IMP) 4.3.3 / FreeBSD-8.0
X-BPAnet-MailScanner-Information: Please contact the ISP for more information
X-MailScanner-ID: 6E8562E0DC.E11A5
X-BPAnet-MailScanner: Found to be clean
X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, 
	score=-13.546, required 6, BAYES_00 -15.00,
	DKIM_SIGNED 0.00, 
	DKIM_VERIFIED -0.00, J_CHICKENPOX_62 0.60, J_CHICKENPOX_92 0.60,
	RDNS_DYNAMIC 0.10, TW_SV 0.08, TW_TN 0.08)
X-BPAnet-MailScanner-From: alexander@leidinger.net
X-Spam-Status: No
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r191777 - head/sys/nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 14:37:59 -0000

Quoting Robert Watson  (from Tue, 5 May 2009  
15:23:58 +0100 (BST)):

>
> On Tue, 5 May 2009, Alexander Leidinger wrote:
>
>> Quoting Robert Watson  (from Mon, 4 May 2009  
>> 14:50:54 +0100 (BST)):
>>
>>> Well, 'dtraceall' claims dependency on all the provider modules,  
>>> so results in everything being loaded including dtnfsclient.  In  
>>> theory, dtnfsclient and other providers should contain the  
>>> necessary module dependencies to cause them to load everything  
>>> they depend on, but I also have the feeling I've run into the  
>>> problem you're seeing.  Could you provide the symbol missing  
>>> errors from the console?  It should be fairly easy to track down  
>>> the missing graph edge using that.
>>
>> link_elf: symbol nfsclient_accesscache_flush_done_id undefined KLD  
>> dtraceall.ko: depends on dtnfsclient - not available
>
> Is the nfsclient module loaded?  If so, was the module built using a  
> kernel configured for KDTRACE_HOOKS?

# kldstat -v | grep nfs
25    1 0x87019000 1a000    nfsserver.ko (/boot/kernel/nfsserver.ko)
                 256 nfsserver
27    1 0x86944000 2000     nfssvc.ko (/boot/kernel/nfssvc.ko)
                 255 nfssvc

The module was build (old style, "make cleandepend && make depend &&  
make && make install") together with the kernel which contains  
KDTRACE_HOOKS.

Bye,
Alexander.

-- 
Don't change the reason, just change the excuses!
		-- Joe Cointment

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 14:46:18 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AE2881065670;
	Tue,  5 May 2009 14:46:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9982B8FC1B;
	Tue,  5 May 2009 14:46:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45EkIRI084179;
	Tue, 5 May 2009 14:46:18 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45EkIhZ084178;
	Tue, 5 May 2009 14:46:18 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200905051446.n45EkIhZ084178@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 5 May 2009 14:46:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191819 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb dev/pci
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 14:46:19 -0000

Author: jhb
Date: Tue May  5 14:46:18 2009
New Revision: 191819
URL: http://svn.freebsd.org/changeset/base/191819

Log:
  MFC: Sync with HEAD
  - Proxy PCI MSI/MSI-X requests and bus interrupt requests for child devices
    instead of passing them through directly.  This allows child devices to use
    MSI/MSI-X interrupts.
  - Proxy PCI VPD requests.
  - Proxy bus resource allocation requests to allow multiple child devices to
    share access to a BAR.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/dev/pci/vga_pci.c

Modified: stable/7/sys/dev/pci/vga_pci.c
==============================================================================
--- stable/7/sys/dev/pci/vga_pci.c	Tue May  5 13:48:53 2009	(r191818)
+++ stable/7/sys/dev/pci/vga_pci.c	Tue May  5 14:46:18 2009	(r191819)
@@ -42,10 +42,22 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
 
+struct vga_resource {
+	struct resource	*vr_res;
+	int	vr_refs;
+};
+
+struct vga_pci_softc {
+	device_t	vga_msi_child;	/* Child driver using MSI. */
+	struct vga_resource vga_res[PCIR_MAX_BAR_0 + 1];
+};
+
 static int
 vga_pci_probe(device_t dev)
 {
@@ -106,11 +118,47 @@ vga_pci_write_ivar(device_t dev, device_
 	return (EINVAL);
 }
 
+static int
+vga_pci_setup_intr(device_t dev, device_t child, struct resource *irq,
+    int flags, driver_filter_t *filter, driver_intr_t *intr, void *arg,
+    void **cookiep)
+{
+	return (BUS_SETUP_INTR(device_get_parent(dev), dev, irq, flags,
+	    filter, intr, arg, cookiep));
+}
+
+static int
+vga_pci_teardown_intr(device_t dev, device_t child, struct resource *irq,
+    void *cookie)
+{
+	return (BUS_TEARDOWN_INTR(device_get_parent(dev), dev, irq, cookie));
+}
+
 static struct resource *
 vga_pci_alloc_resource(device_t dev, device_t child, int type, int *rid,
     u_long start, u_long end, u_long count, u_int flags)
 {
+	struct vga_pci_softc *sc;
+	int bar;
 
+	switch (type) {
+	case SYS_RES_MEMORY:
+	case SYS_RES_IOPORT:
+		/*
+		 * For BARs, we cache the resource so that we only allocate it
+		 * from the PCI bus once.
+		 */
+		bar = PCI_RID2BAR(*rid);
+		if (bar < 0 || bar > PCIR_MAX_BAR_0)
+			return (NULL);
+		sc = device_get_softc(dev);
+		if (sc->vga_res[bar].vr_res == NULL)
+			sc->vga_res[bar].vr_res = bus_alloc_resource(dev, type,
+			    rid, start, end, count, flags);
+		if (sc->vga_res[bar].vr_res != NULL)
+			sc->vga_res[bar].vr_refs++;
+		return (sc->vga_res[bar].vr_res);
+	}
 	return (bus_alloc_resource(dev, type, rid, start, end, count, flags));
 }
 
@@ -118,6 +166,37 @@ static int
 vga_pci_release_resource(device_t dev, device_t child, int type, int rid,
     struct resource *r)
 {
+	struct vga_pci_softc *sc;
+	int bar, error;
+
+	switch (type) {
+	case SYS_RES_MEMORY:
+	case SYS_RES_IOPORT:
+		/*
+		 * For BARs, we release the resource from the PCI bus
+		 * when the last child reference goes away.
+		 */
+		bar = PCI_RID2BAR(rid);
+		if (bar < 0 || bar > PCIR_MAX_BAR_0)
+			return (EINVAL);
+		sc = device_get_softc(dev);
+		if (sc->vga_res[bar].vr_res == NULL)
+			return (EINVAL);
+		KASSERT(sc->vga_res[bar].vr_res == r,
+		    ("vga_pci resource mismatch"));
+		if (sc->vga_res[bar].vr_refs > 1) {
+			sc->vga_res[bar].vr_refs--;
+			return (0);
+		}
+		KASSERT(sc->vga_res[bar].vr_refs > 0,
+		    ("vga_pci resource reference count underflow"));
+		error = bus_release_resource(dev, type, rid, r);
+		if (error == 0) {
+			sc->vga_res[bar].vr_res = NULL;
+			sc->vga_res[bar].vr_refs = 0;
+		}
+		return (error);
+	}
 
 	return (bus_release_resource(dev, type, rid, r));
 }
@@ -176,6 +255,21 @@ vga_pci_disable_io(device_t dev, device_
 }
 
 static int
+vga_pci_get_vpd_ident(device_t dev, device_t child, const char **identptr)
+{
+
+	return (pci_get_vpd_ident(dev, identptr));
+}
+
+static int
+vga_pci_get_vpd_readonly(device_t dev, device_t child, const char *kw,
+    const char **vptr)
+{
+
+	return (pci_get_vpd_readonly(dev, kw, vptr));
+}
+
+static int
 vga_pci_set_powerstate(device_t dev, device_t child, int state)
 {
 
@@ -210,6 +304,77 @@ vga_pci_find_extcap(device_t dev, device
 	return (pci_find_extcap(dev, capability, capreg));
 }
 
+static int
+vga_pci_alloc_msi(device_t dev, device_t child, int *count)
+{
+	struct vga_pci_softc *sc;
+	int error;
+
+	sc = device_get_softc(dev);
+	if (sc->vga_msi_child != NULL)
+		return (EBUSY);
+	error = pci_alloc_msi(dev, count);
+	if (error == 0)
+		sc->vga_msi_child = child;
+	return (error);
+}
+
+static int
+vga_pci_alloc_msix(device_t dev, device_t child, int *count)
+{
+	struct vga_pci_softc *sc;
+	int error;
+
+	sc = device_get_softc(dev);
+	if (sc->vga_msi_child != NULL)
+		return (EBUSY);
+	error = pci_alloc_msix(dev, count);
+	if (error == 0)
+		sc->vga_msi_child = child;
+	return (error);
+}
+
+static int
+vga_pci_remap_msix(device_t dev, device_t child, int count,
+    const u_int *vectors)
+{
+	struct vga_pci_softc *sc;
+
+	sc = device_get_softc(dev);
+	if (sc->vga_msi_child != child)
+		return (ENXIO);
+	return (pci_remap_msix(dev, count, vectors));
+}
+
+static int
+vga_pci_release_msi(device_t dev, device_t child)
+{
+	struct vga_pci_softc *sc;
+	int error;
+
+	sc = device_get_softc(dev);
+	if (sc->vga_msi_child != child)
+		return (ENXIO);
+	error = pci_release_msi(dev);
+	if (error == 0)
+		sc->vga_msi_child = NULL;
+	return (error);
+}
+
+static int
+vga_pci_msi_count(device_t dev, device_t child)
+{
+
+	return (pci_msi_count(dev));
+}
+
+static int
+vga_pci_msix_count(device_t dev, device_t child)
+{
+
+	return (pci_msix_count(dev));
+}
+
 static device_method_t vga_pci_methods[] = {
 	/* Device interface */
 	DEVMETHOD(device_probe,		vga_pci_probe),
@@ -221,8 +386,8 @@ static device_method_t vga_pci_methods[]
 	/* Bus interface */
 	DEVMETHOD(bus_read_ivar,	vga_pci_read_ivar),
 	DEVMETHOD(bus_write_ivar,	vga_pci_write_ivar),
-	DEVMETHOD(bus_setup_intr,	bus_generic_setup_intr),
-	DEVMETHOD(bus_teardown_intr,	bus_generic_teardown_intr),
+	DEVMETHOD(bus_setup_intr,	vga_pci_setup_intr),
+	DEVMETHOD(bus_teardown_intr,	vga_pci_teardown_intr),
 
 	DEVMETHOD(bus_alloc_resource,	vga_pci_alloc_resource),
 	DEVMETHOD(bus_release_resource,	vga_pci_release_resource),
@@ -236,10 +401,18 @@ static device_method_t vga_pci_methods[]
 	DEVMETHOD(pci_disable_busmaster, vga_pci_disable_busmaster),
 	DEVMETHOD(pci_enable_io,	vga_pci_enable_io),
 	DEVMETHOD(pci_disable_io,	vga_pci_disable_io),
+	DEVMETHOD(pci_get_vpd_ident,	vga_pci_get_vpd_ident),
+	DEVMETHOD(pci_get_vpd_readonly,	vga_pci_get_vpd_readonly),
 	DEVMETHOD(pci_get_powerstate,	vga_pci_get_powerstate),
 	DEVMETHOD(pci_set_powerstate,	vga_pci_set_powerstate),
 	DEVMETHOD(pci_assign_interrupt,	vga_pci_assign_interrupt),
 	DEVMETHOD(pci_find_extcap,	vga_pci_find_extcap),
+	DEVMETHOD(pci_alloc_msi,	vga_pci_alloc_msi),
+	DEVMETHOD(pci_alloc_msix,	vga_pci_alloc_msix),
+	DEVMETHOD(pci_remap_msix,	vga_pci_remap_msix),
+	DEVMETHOD(pci_release_msi,	vga_pci_release_msi),
+	DEVMETHOD(pci_msi_count,	vga_pci_msi_count),
+	DEVMETHOD(pci_msix_count,	vga_pci_msix_count),
 
 	{ 0, 0 }
 };
@@ -247,7 +420,7 @@ static device_method_t vga_pci_methods[]
 static driver_t vga_pci_driver = {
 	"vgapci",
 	vga_pci_methods,
-	1,
+	sizeof(struct vga_pci_softc),
 };
 
 static devclass_t vga_devclass;

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 14:53:58 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D1B60106566B;
	Tue,  5 May 2009 14:53:58 +0000 (UTC)
	(envelope-from dchagin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BBEF88FC21;
	Tue,  5 May 2009 14:53:58 +0000 (UTC)
	(envelope-from dchagin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45Erw07084373;
	Tue, 5 May 2009 14:53:58 GMT (envelope-from dchagin@svn.freebsd.org)
Received: (from dchagin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45ErwaK084362;
	Tue, 5 May 2009 14:53:58 GMT (envelope-from dchagin@svn.freebsd.org)
Message-Id: <200905051453.n45ErwaK084362@svn.freebsd.org>
From: Dmitry Chagin 
Date: Tue, 5 May 2009 14:53:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191820 - in stable/7/sys: . amd64/linux32 compat/linux
	contrib/pf dev/ath/ath_hal dev/cxgb i386/linux
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 14:53:59 -0000

Author: dchagin
Date: Tue May  5 14:53:58 2009
New Revision: 191820
URL: http://svn.freebsd.org/changeset/base/191820

Log:
  Merge from HEAD to stable/7:
  
  r178976 (rdivacky):
  Implement robust futexes. Most of the code is modelled after
  what Linux does. This is because robust futexes are mostly
  userspace thing which we cannot alter. Two syscalls maintain
  pointer to userspace list and when process exits a routine
  walks this list waking up processes sleeping on futexes
  from that list.
  
  r183871:
  Make robust futexes work on linux32/amd64. Use PTRIN to read
  user-mode pointers. Change types used in the structures definitions to
  properly-sized architecture-specific types.
  
  r185002:
  In the robust futexes list head, futex_offset shall be signed,
  and glibc actually supplies negative offsets. Change l_ulong to l_long.
  
  Approved by:	kib (mentor)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/amd64/linux32/linux.h
  stable/7/sys/amd64/linux32/linux32_dummy.c
  stable/7/sys/amd64/linux32/syscalls.master
  stable/7/sys/compat/linux/linux_emul.c
  stable/7/sys/compat/linux/linux_emul.h
  stable/7/sys/compat/linux/linux_futex.c
  stable/7/sys/compat/linux/linux_futex.h
  stable/7/sys/compat/linux/linux_misc.c
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/i386/linux/linux.h
  stable/7/sys/i386/linux/linux_dummy.c
  stable/7/sys/i386/linux/syscalls.master

Modified: stable/7/sys/amd64/linux32/linux.h
==============================================================================
--- stable/7/sys/amd64/linux32/linux.h	Tue May  5 14:46:18 2009	(r191819)
+++ stable/7/sys/amd64/linux32/linux.h	Tue May  5 14:53:58 2009	(r191820)
@@ -886,4 +886,15 @@ typedef int l_mqd_t;
 	(LINUX_CLONE_VM | LINUX_CLONE_FS | LINUX_CLONE_FILES |	\
 	LINUX_CLONE_SIGHAND | LINUX_CLONE_THREAD)
 
+/* robust futexes */
+struct linux_robust_list {
+	l_uintptr_t			next;
+};
+
+struct linux_robust_list_head {
+	struct linux_robust_list	list;
+	l_long				futex_offset;
+	l_uintptr_t			pending_list;
+};
+
 #endif /* !_AMD64_LINUX_H_ */

Modified: stable/7/sys/amd64/linux32/linux32_dummy.c
==============================================================================
--- stable/7/sys/amd64/linux32/linux32_dummy.c	Tue May  5 14:46:18 2009	(r191819)
+++ stable/7/sys/amd64/linux32/linux32_dummy.c	Tue May  5 14:53:58 2009	(r191820)
@@ -111,8 +111,6 @@ DUMMY(faccessat);
 DUMMY(pselect6);
 DUMMY(ppoll);
 DUMMY(unshare);
-DUMMY(set_robust_list);
-DUMMY(get_robust_list);
 DUMMY(splice);
 DUMMY(sync_file_range);
 DUMMY(tee);

Modified: stable/7/sys/amd64/linux32/syscalls.master
==============================================================================
--- stable/7/sys/amd64/linux32/syscalls.master	Tue May  5 14:46:18 2009	(r191819)
+++ stable/7/sys/amd64/linux32/syscalls.master	Tue May  5 14:53:58 2009	(r191820)
@@ -482,8 +482,10 @@
 308	AUE_NULL	STD	{ int linux_pselect6(void); }
 309	AUE_NULL	STD	{ int linux_ppoll(void); }
 310	AUE_NULL	STD	{ int linux_unshare(void); }
-311	AUE_NULL	STD	{ int linux_set_robust_list(void); }
-312	AUE_NULL	STD	{ int linux_get_robust_list(void); }
+311	AUE_NULL	STD	{ int linux_set_robust_list(struct linux_robust_list_head *head, \
+					l_size_t len); }
+312	AUE_NULL	STD	{ int linux_get_robust_list(l_int pid, struct linux_robust_list_head *head, \
+					l_size_t *len); }
 313	AUE_NULL	STD	{ int linux_splice(void); }
 314	AUE_NULL	STD	{ int linux_sync_file_range(void); }
 315	AUE_NULL	STD	{ int linux_tee(void); }

Modified: stable/7/sys/compat/linux/linux_emul.c
==============================================================================
--- stable/7/sys/compat/linux/linux_emul.c	Tue May  5 14:46:18 2009	(r191819)
+++ stable/7/sys/compat/linux/linux_emul.c	Tue May  5 14:53:58 2009	(r191820)
@@ -44,9 +44,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-#include 
-
 #ifdef COMPAT_LINUX32
 #include 
 #include 
@@ -55,6 +52,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #endif
 
+#include 
+#include 
+
 struct sx	emul_shared_lock;
 struct mtx	emul_lock;
 
@@ -86,6 +86,7 @@ linux_proc_init(struct thread *td, pid_t
 		em = malloc(sizeof *em, M_LINUX, M_WAITOK | M_ZERO);
 		em->pid = child;
 		em->pdeath_signal = 0;
+		em->robust_futexes = NULL;
 		if (flags & LINUX_CLONE_THREAD) {
 			/* handled later in the code */
 		} else {
@@ -161,6 +162,8 @@ linux_proc_exit(void *arg __unused, stru
 	if (__predict_true(p->p_sysent != &elf_linux_sysvec))
 		return;
 
+	release_futexes(p);
+
 	/* find the emuldata */
 	em = em_find(p, EMUL_DOLOCK);
 

Modified: stable/7/sys/compat/linux/linux_emul.h
==============================================================================
--- stable/7/sys/compat/linux/linux_emul.h	Tue May  5 14:46:18 2009	(r191819)
+++ stable/7/sys/compat/linux/linux_emul.h	Tue May  5 14:53:58 2009	(r191820)
@@ -31,6 +31,8 @@
 #ifndef _LINUX_EMUL_H_
 #define	_LINUX_EMUL_H_
 
+#include 
+
 struct linux_emuldata_shared {
 	int	refs;
 	pid_t	group_pid;
@@ -52,6 +54,8 @@ struct linux_emuldata {
 
 	int	pdeath_signal;		/* parent death signal */
 
+	struct	linux_robust_list_head	*robust_futexes;
+
 	LIST_ENTRY(linux_emuldata) threads;	/* list of linux threads */
 };
 

Modified: stable/7/sys/compat/linux/linux_futex.c
==============================================================================
--- stable/7/sys/compat/linux/linux_futex.c	Tue May  5 14:46:18 2009	(r191819)
+++ stable/7/sys/compat/linux/linux_futex.c	Tue May  5 14:53:58 2009	(r191820)
@@ -45,8 +45,11 @@ __KERNEL_RCSID(1, "$NetBSD: linux_futex.
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 
@@ -57,6 +60,7 @@ __KERNEL_RCSID(1, "$NetBSD: linux_futex.
 #include 
 #include 
 #endif
+#include 
 #include 
 
 struct futex;
@@ -533,3 +537,160 @@ futex_atomic_op(struct thread *td, int e
 		return (-ENOSYS);
 	}
 }
+
+int
+linux_set_robust_list(struct thread *td, struct linux_set_robust_list_args *args)
+{
+	struct linux_emuldata *em;
+
+#ifdef	DEBUG
+	if (ldebug(set_robust_list))
+		printf(ARGS(set_robust_list, ""));
+#endif
+	if (args->len != sizeof(struct linux_robust_list_head))
+		return (EINVAL);
+
+	em = em_find(td->td_proc, EMUL_DOLOCK);
+	em->robust_futexes = args->head;
+	EMUL_UNLOCK(&emul_lock);
+
+	return (0);	
+}
+
+int
+linux_get_robust_list(struct thread *td, struct linux_get_robust_list_args *args)
+{
+	struct linux_emuldata *em;
+	struct linux_robust_list_head *head;
+	l_size_t len = sizeof(struct linux_robust_list_head);
+	int error = 0;
+
+#ifdef	DEBUG
+	if (ldebug(get_robust_list))
+		printf(ARGS(get_robust_list, ""));
+#endif
+
+	if (!args->pid) {
+		em = em_find(td->td_proc, EMUL_DONTLOCK);
+		head = em->robust_futexes;		
+	} else {
+		struct proc *p;
+
+		p = pfind(args->pid);
+		if (p == NULL)
+			return (ESRCH);
+
+		em = em_find(p, EMUL_DONTLOCK);
+		/* XXX: ptrace? */
+		if (priv_check(td, PRIV_CRED_SETUID) || 
+		    priv_check(td, PRIV_CRED_SETEUID) ||
+		    p_candebug(td, p))
+			return (EPERM);
+		head = em->robust_futexes;
+		
+		PROC_UNLOCK(p);
+	}
+
+	error = copyout(&len, args->len, sizeof(l_size_t));
+	if (error)
+		return (EFAULT);
+
+	error = copyout(head, args->head, sizeof(struct linux_robust_list_head));
+
+	return (error);
+}
+
+static int
+handle_futex_death(void *uaddr, pid_t pid, int pi)
+{
+	int uval, nval, mval;
+	struct futex *f;
+
+retry:
+	if (copyin(uaddr, &uval, 4))
+		return (EFAULT);
+
+	if ((uval & FUTEX_TID_MASK) == pid) {
+		mval = (uval & FUTEX_WAITERS) | FUTEX_OWNER_DIED;
+		nval = casuword32(uaddr, uval, mval);
+
+		if (nval == -1)
+			return (EFAULT);
+
+		if (nval != uval)
+			goto retry;
+
+		if (!pi && (uval & FUTEX_WAITERS)) {
+			f = futex_get(uaddr, FUTEX_UNLOCKED);
+			futex_wake(f, 1, NULL, 0);
+		}
+	}
+
+	return (0);
+}
+
+static int
+fetch_robust_entry(struct linux_robust_list **entry,
+    struct linux_robust_list **head, int *pi)
+{
+	l_ulong uentry;
+
+	if (copyin((const void *)head, &uentry, sizeof(l_ulong)))
+		return (EFAULT);
+
+	*entry = (void *)(uentry & ~1UL);
+	*pi = uentry & 1;
+
+	return (0);
+}
+
+/* This walks the list of robust futexes releasing them. */
+void
+release_futexes(struct proc *p)
+{
+	struct linux_robust_list_head *head = NULL;
+	struct linux_robust_list *entry, *next_entry, *pending;
+	unsigned int limit = 2048, pi, next_pi, pip;
+	struct linux_emuldata *em;
+	l_long futex_offset;
+	int rc;
+
+	em = em_find(p, EMUL_DONTLOCK);
+	head = em->robust_futexes;
+
+	if (head == NULL)
+		return;
+
+	if (fetch_robust_entry(&entry, PTRIN(&head->list.next), &pi))
+		return;
+
+	if (copyin(&head->futex_offset, &futex_offset, sizeof(futex_offset)))
+		return;
+
+	if (fetch_robust_entry(&pending, PTRIN(&head->pending_list), &pip))
+		return;
+
+	while (entry != &head->list) {
+		rc = fetch_robust_entry(&next_entry, PTRIN(&entry->next), &next_pi);
+
+		if (entry != pending)
+			if (handle_futex_death((char *)entry + futex_offset,
+			    p->p_pid, pi))
+				return;
+
+		if (rc)
+			return;
+
+		entry = next_entry;
+		pi = next_pi;
+
+		if (!--limit)
+			break;
+
+		sched_relinquish(curthread);
+	}
+
+	if (pending)
+		handle_futex_death((char *) pending + futex_offset,
+		    p->p_pid, pip);
+}

Modified: stable/7/sys/compat/linux/linux_futex.h
==============================================================================
--- stable/7/sys/compat/linux/linux_futex.h	Tue May  5 14:46:18 2009	(r191819)
+++ stable/7/sys/compat/linux/linux_futex.h	Tue May  5 14:53:58 2009	(r191820)
@@ -63,4 +63,10 @@
 #define FUTEX_OP_CMP_GT         4	/* if (oldval > CMPARG) wake */
 #define FUTEX_OP_CMP_GE         5	/* if (oldval >= CMPARG) wake */
 
+#define	FUTEX_WAITERS		0x80000000
+#define	FUTEX_OWNER_DIED	0x40000000
+#define	FUTEX_TID_MASK		0x3fffffff
+
+void	release_futexes(struct proc *);
+
 #endif	/* !_LINUX_FUTEX_H */

Modified: stable/7/sys/compat/linux/linux_misc.c
==============================================================================
--- stable/7/sys/compat/linux/linux_misc.c	Tue May  5 14:46:18 2009	(r191819)
+++ stable/7/sys/compat/linux/linux_misc.c	Tue May  5 14:53:58 2009	(r191820)
@@ -75,10 +75,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
 #ifdef COMPAT_LINUX32
 #include 
 #include 
@@ -90,6 +86,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 #define BSD_TO_LINUX_SIGNAL(sig)	\
 	(((sig) <= LINUX_SIGTBLSZ) ? bsd_to_linux_signal[_SIG_IDX(sig)] : sig)

Modified: stable/7/sys/i386/linux/linux.h
==============================================================================
--- stable/7/sys/i386/linux/linux.h	Tue May  5 14:46:18 2009	(r191819)
+++ stable/7/sys/i386/linux/linux.h	Tue May  5 14:53:58 2009	(r191820)
@@ -851,4 +851,15 @@ typedef int l_mqd_t;
 	(LINUX_CLONE_VM | LINUX_CLONE_FS | LINUX_CLONE_FILES |	\
 	LINUX_CLONE_SIGHAND | LINUX_CLONE_THREAD)
 
+/* robust futexes */
+struct linux_robust_list {
+	struct linux_robust_list	*next;
+};
+
+struct linux_robust_list_head {
+	struct linux_robust_list	list;
+	l_long				futex_offset;
+	struct linux_robust_list	*pending_list;
+};
+
 #endif /* !_I386_LINUX_H_ */

Modified: stable/7/sys/i386/linux/linux_dummy.c
==============================================================================
--- stable/7/sys/i386/linux/linux_dummy.c	Tue May  5 14:46:18 2009	(r191819)
+++ stable/7/sys/i386/linux/linux_dummy.c	Tue May  5 14:53:58 2009	(r191820)
@@ -102,8 +102,6 @@ DUMMY(faccessat);
 DUMMY(pselect6);
 DUMMY(ppoll);
 DUMMY(unshare);
-DUMMY(set_robust_list);
-DUMMY(get_robust_list);
 DUMMY(splice);
 DUMMY(sync_file_range);
 DUMMY(tee);

Modified: stable/7/sys/i386/linux/syscalls.master
==============================================================================
--- stable/7/sys/i386/linux/syscalls.master	Tue May  5 14:46:18 2009	(r191819)
+++ stable/7/sys/i386/linux/syscalls.master	Tue May  5 14:53:58 2009	(r191820)
@@ -492,8 +492,10 @@
 308	AUE_NULL	STD	{ int linux_pselect6(void); }
 309	AUE_NULL	STD	{ int linux_ppoll(void); }
 310	AUE_NULL	STD	{ int linux_unshare(void); }
-311	AUE_NULL	STD	{ int linux_set_robust_list(void); }
-312	AUE_NULL	STD	{ int linux_get_robust_list(void); }
+311	AUE_NULL	STD	{ int linux_set_robust_list(struct linux_robust_list_head *head, \
+					l_size_t len); }
+312	AUE_NULL	STD	{ int linux_get_robust_list(l_int pid, struct linux_robust_list_head **head, \
+					l_size_t *len); }
 313	AUE_NULL	STD	{ int linux_splice(void); }
 314	AUE_NULL	STD	{ int linux_sync_file_range(void); }
 315	AUE_NULL	STD	{ int linux_tee(void); }

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 14:55:23 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E07371065670;
	Tue,  5 May 2009 14:55:23 +0000 (UTC)
	(envelope-from dchagin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CBCDF8FC13;
	Tue,  5 May 2009 14:55:23 +0000 (UTC)
	(envelope-from dchagin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45EtNTs084465;
	Tue, 5 May 2009 14:55:23 GMT (envelope-from dchagin@svn.freebsd.org)
Received: (from dchagin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45EtN7c084459;
	Tue, 5 May 2009 14:55:23 GMT (envelope-from dchagin@svn.freebsd.org)
Message-Id: <200905051455.n45EtN7c084459@svn.freebsd.org>
From: Dmitry Chagin 
Date: Tue, 5 May 2009 14:55:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191821 - in stable/7/sys: amd64/linux32 i386/linux
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 14:55:24 -0000

Author: dchagin
Date: Tue May  5 14:55:23 2009
New Revision: 191821
URL: http://svn.freebsd.org/changeset/base/191821

Log:
  Regenerate syscall table after 191820.
  
  Approved by:	kib (mentor)

Modified:
  stable/7/sys/amd64/linux32/linux32_proto.h
  stable/7/sys/amd64/linux32/linux32_syscall.h
  stable/7/sys/amd64/linux32/linux32_sysent.c
  stable/7/sys/i386/linux/linux_proto.h
  stable/7/sys/i386/linux/linux_syscall.h
  stable/7/sys/i386/linux/linux_sysent.c

Modified: stable/7/sys/amd64/linux32/linux32_proto.h
==============================================================================
--- stable/7/sys/amd64/linux32/linux32_proto.h	Tue May  5 14:53:58 2009	(r191820)
+++ stable/7/sys/amd64/linux32/linux32_proto.h	Tue May  5 14:55:23 2009	(r191821)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 191804 2009-05-05 03:49:30Z dchagin 
+ * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 191820 2009-05-05 14:53:58Z dchagin 
  */
 
 #ifndef _LINUX_SYSPROTO_H_
@@ -937,10 +937,13 @@ struct linux_unshare_args {
 	register_t dummy;
 };
 struct linux_set_robust_list_args {
-	register_t dummy;
+	char head_l_[PADL_(struct linux_robust_list_head *)]; struct linux_robust_list_head * head; char head_r_[PADR_(struct linux_robust_list_head *)];
+	char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)];
 };
 struct linux_get_robust_list_args {
-	register_t dummy;
+	char pid_l_[PADL_(l_int)]; l_int pid; char pid_r_[PADR_(l_int)];
+	char head_l_[PADL_(struct linux_robust_list_head *)]; struct linux_robust_list_head * head; char head_r_[PADR_(struct linux_robust_list_head *)];
+	char len_l_[PADL_(l_size_t *)]; l_size_t * len; char len_r_[PADR_(l_size_t *)];
 };
 struct linux_splice_args {
 	register_t dummy;

Modified: stable/7/sys/amd64/linux32/linux32_syscall.h
==============================================================================
--- stable/7/sys/amd64/linux32/linux32_syscall.h	Tue May  5 14:53:58 2009	(r191820)
+++ stable/7/sys/amd64/linux32/linux32_syscall.h	Tue May  5 14:55:23 2009	(r191821)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 191804 2009-05-05 03:49:30Z dchagin 
+ * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 191820 2009-05-05 14:53:58Z dchagin 
  */
 
 #define	LINUX_SYS_exit	1

Modified: stable/7/sys/amd64/linux32/linux32_sysent.c
==============================================================================
--- stable/7/sys/amd64/linux32/linux32_sysent.c	Tue May  5 14:53:58 2009	(r191820)
+++ stable/7/sys/amd64/linux32/linux32_sysent.c	Tue May  5 14:55:23 2009	(r191821)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 191804 2009-05-05 03:49:30Z dchagin 
+ * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 191820 2009-05-05 14:53:58Z dchagin 
  */
 
 #include "opt_compat.h"
@@ -330,8 +330,8 @@ struct sysent linux_sysent[] = {
 	{ 0, (sy_call_t *)linux_pselect6, AUE_NULL, NULL, 0, 0 },	/* 308 = linux_pselect6 */
 	{ 0, (sy_call_t *)linux_ppoll, AUE_NULL, NULL, 0, 0 },	/* 309 = linux_ppoll */
 	{ 0, (sy_call_t *)linux_unshare, AUE_NULL, NULL, 0, 0 },	/* 310 = linux_unshare */
-	{ 0, (sy_call_t *)linux_set_robust_list, AUE_NULL, NULL, 0, 0 },	/* 311 = linux_set_robust_list */
-	{ 0, (sy_call_t *)linux_get_robust_list, AUE_NULL, NULL, 0, 0 },	/* 312 = linux_get_robust_list */
+	{ AS(linux_set_robust_list_args), (sy_call_t *)linux_set_robust_list, AUE_NULL, NULL, 0, 0 },	/* 311 = linux_set_robust_list */
+	{ AS(linux_get_robust_list_args), (sy_call_t *)linux_get_robust_list, AUE_NULL, NULL, 0, 0 },	/* 312 = linux_get_robust_list */
 	{ 0, (sy_call_t *)linux_splice, AUE_NULL, NULL, 0, 0 },	/* 313 = linux_splice */
 	{ 0, (sy_call_t *)linux_sync_file_range, AUE_NULL, NULL, 0, 0 },	/* 314 = linux_sync_file_range */
 	{ 0, (sy_call_t *)linux_tee, AUE_NULL, NULL, 0, 0 },		/* 315 = linux_tee */

Modified: stable/7/sys/i386/linux/linux_proto.h
==============================================================================
--- stable/7/sys/i386/linux/linux_proto.h	Tue May  5 14:53:58 2009	(r191820)
+++ stable/7/sys/i386/linux/linux_proto.h	Tue May  5 14:55:23 2009	(r191821)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/7/sys/i386/linux/syscalls.master 191804 2009-05-05 03:49:30Z dchagin 
+ * created from FreeBSD: stable/7/sys/i386/linux/syscalls.master 191820 2009-05-05 14:53:58Z dchagin 
  */
 
 #ifndef _LINUX_SYSPROTO_H_
@@ -956,10 +956,13 @@ struct linux_unshare_args {
 	register_t dummy;
 };
 struct linux_set_robust_list_args {
-	register_t dummy;
+	char head_l_[PADL_(struct linux_robust_list_head *)]; struct linux_robust_list_head * head; char head_r_[PADR_(struct linux_robust_list_head *)];
+	char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)];
 };
 struct linux_get_robust_list_args {
-	register_t dummy;
+	char pid_l_[PADL_(l_int)]; l_int pid; char pid_r_[PADR_(l_int)];
+	char head_l_[PADL_(struct linux_robust_list_head **)]; struct linux_robust_list_head ** head; char head_r_[PADR_(struct linux_robust_list_head **)];
+	char len_l_[PADL_(l_size_t *)]; l_size_t * len; char len_r_[PADR_(l_size_t *)];
 };
 struct linux_splice_args {
 	register_t dummy;

Modified: stable/7/sys/i386/linux/linux_syscall.h
==============================================================================
--- stable/7/sys/i386/linux/linux_syscall.h	Tue May  5 14:53:58 2009	(r191820)
+++ stable/7/sys/i386/linux/linux_syscall.h	Tue May  5 14:55:23 2009	(r191821)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/7/sys/i386/linux/syscalls.master 191804 2009-05-05 03:49:30Z dchagin 
+ * created from FreeBSD: stable/7/sys/i386/linux/syscalls.master 191820 2009-05-05 14:53:58Z dchagin 
  */
 
 #define	LINUX_SYS_exit	1

Modified: stable/7/sys/i386/linux/linux_sysent.c
==============================================================================
--- stable/7/sys/i386/linux/linux_sysent.c	Tue May  5 14:53:58 2009	(r191820)
+++ stable/7/sys/i386/linux/linux_sysent.c	Tue May  5 14:55:23 2009	(r191821)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/7/sys/i386/linux/syscalls.master 191804 2009-05-05 03:49:30Z dchagin 
+ * created from FreeBSD: stable/7/sys/i386/linux/syscalls.master 191820 2009-05-05 14:53:58Z dchagin 
  */
 
 #include 
@@ -329,8 +329,8 @@ struct sysent linux_sysent[] = {
 	{ 0, (sy_call_t *)linux_pselect6, AUE_NULL, NULL, 0, 0 },	/* 308 = linux_pselect6 */
 	{ 0, (sy_call_t *)linux_ppoll, AUE_NULL, NULL, 0, 0 },	/* 309 = linux_ppoll */
 	{ 0, (sy_call_t *)linux_unshare, AUE_NULL, NULL, 0, 0 },	/* 310 = linux_unshare */
-	{ 0, (sy_call_t *)linux_set_robust_list, AUE_NULL, NULL, 0, 0 },	/* 311 = linux_set_robust_list */
-	{ 0, (sy_call_t *)linux_get_robust_list, AUE_NULL, NULL, 0, 0 },	/* 312 = linux_get_robust_list */
+	{ AS(linux_set_robust_list_args), (sy_call_t *)linux_set_robust_list, AUE_NULL, NULL, 0, 0 },	/* 311 = linux_set_robust_list */
+	{ AS(linux_get_robust_list_args), (sy_call_t *)linux_get_robust_list, AUE_NULL, NULL, 0, 0 },	/* 312 = linux_get_robust_list */
 	{ 0, (sy_call_t *)linux_splice, AUE_NULL, NULL, 0, 0 },	/* 313 = linux_splice */
 	{ 0, (sy_call_t *)linux_sync_file_range, AUE_NULL, NULL, 0, 0 },	/* 314 = linux_sync_file_range */
 	{ 0, (sy_call_t *)linux_tee, AUE_NULL, NULL, 0, 0 },		/* 315 = linux_tee */

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 15:03:20 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F170E1065688;
	Tue,  5 May 2009 15:03:19 +0000 (UTC) (envelope-from snb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C3FE78FC1A;
	Tue,  5 May 2009 15:03:19 +0000 (UTC) (envelope-from snb@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45F3J4D084713;
	Tue, 5 May 2009 15:03:19 GMT (envelope-from snb@svn.freebsd.org)
Received: (from snb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45F3JLT084711;
	Tue, 5 May 2009 15:03:19 GMT (envelope-from snb@svn.freebsd.org)
Message-Id: <200905051503.n45F3JLT084711@svn.freebsd.org>
From: Sean Nicholas Barkas 
Date: Tue, 5 May 2009 15:03:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191822 - in head: share/misc usr.bin/calendar/calendars
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 15:03:20 -0000

Author: snb
Date: Tue May  5 15:03:19 2009
New Revision: 191822
URL: http://svn.freebsd.org/changeset/base/191822

Log:
  Add myself as a mentee of dwmalone for the committers graph. Also add my
  birthday to the calendar.
  
  Approved by:	dwmalone (mentor)

Modified:
  head/share/misc/committers-src.dot
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/share/misc/committers-src.dot
==============================================================================
--- head/share/misc/committers-src.dot	Tue May  5 14:55:23 2009	(r191821)
+++ head/share/misc/committers-src.dot	Tue May  5 15:03:19 2009	(r191822)
@@ -168,6 +168,7 @@ sepotvin [label="Stephane E. Potvin\nsep
 shiba [label="Takeshi Shibagaki\nshiba@FreeBSD.org\n2000/06/19"]
 simon [label="Simon L. Nielsen\nsimon@FreeBSD.org\n2006/03/07"]
 sobomax [label="Maxim Sobolev\nsobomax@FreeBSD.org\n2001/07/25"]
+snb [label="Nick Barkas\nsnb@FreeBSD.org\n2009/05/05"]
 sson [label="Stacey Son\nsson@FreeBSD.org\n2008/07/08"]
 suz [label="SUZUKI Shinsuke\nsuz@FreeBSD.org\n2002/03/26"]
 syrinx [label="Shteryana Shopova\nsyrinx@FreeBSD.org\n2006/10/07"]
@@ -244,6 +245,7 @@ dds -> versus
 
 dwmalone -> fanf
 dwmalone -> peadar
+dwmalone -> snb
 
 eivind -> des
 eivind -> rwatson

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==============================================================================
--- head/usr.bin/calendar/calendars/calendar.freebsd	Tue May  5 14:55:23 2009	(r191821)
+++ head/usr.bin/calendar/calendars/calendar.freebsd	Tue May  5 15:03:19 2009	(r191822)
@@ -258,6 +258,7 @@
 10/17	Maho NAKATA  born in Osaka, Japan, 1974
 10/18	Sheldon Hearn  born in Cape Town, Western Cape, South Africa, 1974
 10/19	Nicholas Souchu  born in Suresnes, Hauts-de-Seine, France, 1972
+10/19	Nick Barkas  born in Longview, Washington, United States, 1981
 10/20	Joel Dahl  born in Lidkoping, Sweden, 1983
 10/20	Dmitry Marakasov  born in Moscow, Russian Federation, 1984
 10/21	Dan Moschuk  born in Halifax, Nova Scotia, Canada, 1980

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 15:19:46 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 602251065673;
	Tue,  5 May 2009 15:19:46 +0000 (UTC)
	(envelope-from dchagin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 42C1B8FC29;
	Tue,  5 May 2009 15:19:46 +0000 (UTC)
	(envelope-from dchagin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45FJkTP085116;
	Tue, 5 May 2009 15:19:46 GMT (envelope-from dchagin@svn.freebsd.org)
Received: (from dchagin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45FJkZ1085113;
	Tue, 5 May 2009 15:19:46 GMT (envelope-from dchagin@svn.freebsd.org)
Message-Id: <200905051519.n45FJkZ1085113@svn.freebsd.org>
From: Dmitry Chagin 
Date: Tue, 5 May 2009 15:19:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191823 - in stable/7/sys: . compat/linux contrib/pf
	dev/ath/ath_hal dev/cxgb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 15:19:47 -0000

Author: dchagin
Date: Tue May  5 15:19:45 2009
New Revision: 191823
URL: http://svn.freebsd.org/changeset/base/191823

Log:
  Merge from HEAD to stable/7:
  
  r189861:
  Include linux_futex.h before linux_emul.h
  
  r189862:
  Ignore FUTEX_FD op, as it is done by linux.
  
  r189867:
  Sort include files in the alphabetical order.
  
  Approved by:	kib (mentor)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/compat/linux/linux_emul.h
  stable/7/sys/compat/linux/linux_futex.c
  stable/7/sys/compat/linux/linux_futex.h
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)

Modified: stable/7/sys/compat/linux/linux_emul.h
==============================================================================
--- stable/7/sys/compat/linux/linux_emul.h	Tue May  5 15:03:19 2009	(r191822)
+++ stable/7/sys/compat/linux/linux_emul.h	Tue May  5 15:19:45 2009	(r191823)
@@ -31,8 +31,6 @@
 #ifndef _LINUX_EMUL_H_
 #define	_LINUX_EMUL_H_
 
-#include 
-
 struct linux_emuldata_shared {
 	int	refs;
 	pid_t	group_pid;

Modified: stable/7/sys/compat/linux/linux_futex.c
==============================================================================
--- stable/7/sys/compat/linux/linux_futex.c	Tue May  5 15:03:19 2009	(r191822)
+++ stable/7/sys/compat/linux/linux_futex.c	Tue May  5 15:19:45 2009	(r191823)
@@ -40,18 +40,17 @@ __KERNEL_RCSID(1, "$NetBSD: linux_futex.
 #include "opt_compat.h"
 
 #include 
-#include 
-#include 
 #include 
-#include 
-#include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
-#include 
 
 #ifdef COMPAT_LINUX32
 #include 
@@ -60,8 +59,8 @@ __KERNEL_RCSID(1, "$NetBSD: linux_futex.
 #include 
 #include 
 #endif
-#include 
 #include 
+#include 
 
 struct futex;
 
@@ -276,13 +275,6 @@ linux_sys_futex(struct thread *td, struc
 		FUTEX_SYSTEM_UNLOCK;
 		break;
 
-	case LINUX_FUTEX_FD:
-#ifdef DEBUG
-		printf("linux_sys_futex: unimplemented op %d\n",
-		    args->op);
-#endif
-		return (ENOSYS);
-
 	case LINUX_FUTEX_WAKE_OP:
 		FUTEX_SYSTEM_LOCK;
 #ifdef DEBUG

Modified: stable/7/sys/compat/linux/linux_futex.h
==============================================================================
--- stable/7/sys/compat/linux/linux_futex.h	Tue May  5 15:03:19 2009	(r191822)
+++ stable/7/sys/compat/linux/linux_futex.h	Tue May  5 15:19:45 2009	(r191823)
@@ -38,7 +38,7 @@
 
 #define LINUX_FUTEX_WAIT	0
 #define LINUX_FUTEX_WAKE	1
-#define LINUX_FUTEX_FD		2
+#define LINUX_FUTEX_FD		2	/* unused */
 #define LINUX_FUTEX_REQUEUE	3
 #define LINUX_FUTEX_CMP_REQUEUE	4
 #define LINUX_FUTEX_WAKE_OP	5

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 15:36:24 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3C2E71065670;
	Tue,  5 May 2009 15:36:24 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 28E678FC0A;
	Tue,  5 May 2009 15:36:24 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45FaORY085528;
	Tue, 5 May 2009 15:36:24 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45FaNSP085518;
	Tue, 5 May 2009 15:36:23 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200905051536.n45FaNSP085518@svn.freebsd.org>
From: Andrew Thompson 
Date: Tue, 5 May 2009 15:36:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191824 - in head/sys/dev/usb: . controller
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 15:36:24 -0000

Author: thompsa
Date: Tue May  5 15:36:23 2009
New Revision: 191824
URL: http://svn.freebsd.org/changeset/base/191824

Log:
  Revert part of r191494 which used the udev state to mark suspending, this needs
  to be set via two variables (peer_suspended and self_suspended) and can not be
  merged into one.
  
  Submitted by:	Hans Petter Selasky
  Pointy hat:	me

Modified:
  head/sys/dev/usb/controller/ehci.c
  head/sys/dev/usb/controller/ohci.c
  head/sys/dev/usb/controller/uhci.c
  head/sys/dev/usb/usb_core.h
  head/sys/dev/usb/usb_device.c
  head/sys/dev/usb/usb_device.h
  head/sys/dev/usb/usb_generic.c
  head/sys/dev/usb/usb_hub.c
  head/sys/dev/usb/usb_revision.h
  head/sys/dev/usb/usb_transfer.c

Modified: head/sys/dev/usb/controller/ehci.c
==============================================================================
--- head/sys/dev/usb/controller/ehci.c	Tue May  5 15:19:45 2009	(r191823)
+++ head/sys/dev/usb/controller/ehci.c	Tue May  5 15:36:23 2009	(r191824)
@@ -1964,7 +1964,7 @@ ehci_setup_standard_chain(struct usb2_xf
 
 	usb2_pc_cpu_flush(qh->page_cache);
 
-	if (xfer->xroot->udev->state != USB_STATE_SUSPENDED) {
+	if (xfer->xroot->udev->flags.self_suspended == 0) {
 		EHCI_APPEND_QH(qh, *qh_last);
 	}
 }

Modified: head/sys/dev/usb/controller/ohci.c
==============================================================================
--- head/sys/dev/usb/controller/ohci.c	Tue May  5 15:19:45 2009	(r191823)
+++ head/sys/dev/usb/controller/ohci.c	Tue May  5 15:36:23 2009	(r191824)
@@ -1020,7 +1020,7 @@ ohci_check_transfer_sub(struct usb2_xfer
 		 * writing the BLF and CLF bits:
 		 */
 
-		if (xfer->xroot->udev->state == USB_STATE_SUSPENDED) {
+		if (xfer->xroot->udev->flags.self_suspended) {
 			/* nothing to do */
 		} else if (xfer->pipe->methods == &ohci_device_bulk_methods) {
 			ohci_softc_t *sc = OHCI_BUS2SC(xfer->xroot->bus);
@@ -1589,7 +1589,7 @@ ohci_setup_standard_chain(struct usb2_xf
 
 	ed->ed_headp = td->td_self;
 
-	if (xfer->xroot->udev->state != USB_STATE_SUSPENDED) {
+	if (xfer->xroot->udev->flags.self_suspended == 0) {
 		/* the append function will flush the endpoint descriptor */
 		OHCI_APPEND_QH(ed, *ed_last);
 

Modified: head/sys/dev/usb/controller/uhci.c
==============================================================================
--- head/sys/dev/usb/controller/uhci.c	Tue May  5 15:19:45 2009	(r191823)
+++ head/sys/dev/usb/controller/uhci.c	Tue May  5 15:36:23 2009	(r191824)
@@ -1921,7 +1921,7 @@ uhci_device_bulk_start(struct usb2_xfer 
 	qh->e_next = td;
 	qh->qh_e_next = td->td_self;
 
-	if (xfer->xroot->udev->state != USB_STATE_SUSPENDED) {
+	if (xfer->xroot->udev->flags.self_suspended == 0) {
 		UHCI_APPEND_QH(qh, sc->sc_bulk_p_last);
 		uhci_add_loop(sc);
 		xfer->flags_int.bandwidth_reclaimed = 1;
@@ -1982,7 +1982,7 @@ uhci_device_ctrl_start(struct usb2_xfer 
 	 * NOTE: some devices choke on bandwidth- reclamation for control
 	 * transfers
 	 */
-	if (xfer->xroot->udev->state != USB_STATE_SUSPENDED) {
+	if (xfer->xroot->udev->flags.self_suspended == 0) {
 		if (xfer->xroot->udev->speed == USB_SPEED_LOW) {
 			UHCI_APPEND_QH(qh, sc->sc_ls_ctl_p_last);
 		} else {
@@ -2071,11 +2071,9 @@ uhci_device_intr_start(struct usb2_xfer 
 	qh->e_next = td;
 	qh->qh_e_next = td->td_self;
 
-	if (xfer->xroot->udev->state != USB_STATE_SUSPENDED) {
-
+	if (xfer->xroot->udev->flags.self_suspended == 0) {
 		/* enter QHs into the controller data structures */
 		UHCI_APPEND_QH(qh, sc->sc_intr_p_last[xfer->qh_pos]);
-
 	} else {
 		usb2_pc_cpu_flush(qh->page_cache);
 	}

Modified: head/sys/dev/usb/usb_core.h
==============================================================================
--- head/sys/dev/usb/usb_core.h	Tue May  5 15:19:45 2009	(r191823)
+++ head/sys/dev/usb/usb_core.h	Tue May  5 15:36:23 2009	(r191824)
@@ -515,7 +515,7 @@ typedef struct malloc_type *usb2_malloc_
 /* prototypes */
 
 const char *usb2_errstr(usb2_error_t error);
-const char *usb2_statestr(enum usb_dev_state state);
+const char *usb2_statestr(enum usb2_dev_state state);
 struct usb2_config_descriptor *usb2_get_config_descriptor(
 	    struct usb2_device *udev);
 struct usb2_device_descriptor *usb2_get_device_descriptor(
@@ -553,6 +553,6 @@ void	usb2_set_parent_iface(struct usb2_d
 uint8_t	usb2_get_bus_index(struct usb2_device *udev);
 uint8_t	usb2_get_device_index(struct usb2_device *udev);
 void	usb2_set_power_mode(struct usb2_device *udev, uint8_t power_mode);
-int	usb2_device_attached(struct usb2_device *udev);
+uint8_t	usb2_device_attached(struct usb2_device *udev);
 
 #endif					/* _USB2_CORE_H_ */

Modified: head/sys/dev/usb/usb_device.c
==============================================================================
--- head/sys/dev/usb/usb_device.c	Tue May  5 15:19:45 2009	(r191823)
+++ head/sys/dev/usb/usb_device.c	Tue May  5 15:36:23 2009	(r191824)
@@ -96,15 +96,12 @@ static const char* statestr[USB_STATE_MA
 	[USB_STATE_POWERED]	= "POWERED",
 	[USB_STATE_ADDRESSED]	= "ADDRESSED",
 	[USB_STATE_CONFIGURED]	= "CONFIGURED",
-	[USB_STATE_SUSPENDED]	= "SUSPENDED"
 };
 
 const char *
-usb2_statestr(enum usb_dev_state state)
+usb2_statestr(enum usb2_dev_state state)
 {
-	KASSERT(state < USB_STATE_MAX, ("invalid udev state"));
-
-	return (statestr[state]);
+	return ((state < USB_STATE_MAX) ? statestr[state] : "UNKNOWN");
 }
 
 /*------------------------------------------------------------------------*
@@ -999,7 +996,7 @@ usb2_detach_device_sub(struct usb2_devic
 		    udev->port_no, udev->address);
 
 		if (device_is_attached(dev)) {
-			if (udev->state == USB_STATE_SUSPENDED) {
+			if (udev->flags.peer_suspended) {
 				err = DEVICE_RESUME(dev);
 				if (err) {
 					device_printf(dev, "Resume failed!\n");
@@ -1139,7 +1136,7 @@ usb2_probe_and_attach_sub(struct usb2_de
 		uaa->temp_dev = NULL;
 		device_set_ivars(iface->subdev, NULL);
 
-		if (udev->state == USB_STATE_SUSPENDED) {
+		if (udev->flags.peer_suspended) {
 			err = DEVICE_SUSPEND(iface->subdev);
 			if (err)
 				device_printf(iface->subdev, "Suspend failed\n");
@@ -1360,12 +1357,12 @@ usb2_suspend_resume(struct usb2_device *
 
 	USB_BUS_LOCK(udev->bus);
 	/* filter the suspend events */
-	if ((udev->state == USB_STATE_SUSPENDED && do_suspend) ||
-	    (udev->state != USB_STATE_SUSPENDED && !do_suspend)) {
+	if (udev->flags.peer_suspended == do_suspend) {
 		USB_BUS_UNLOCK(udev->bus);
 		/* nothing to do */
 		return (0);
 	}
+	udev->flags.peer_suspended = do_suspend;
 	USB_BUS_UNLOCK(udev->bus);
 
 	/* do the suspend or resume */
@@ -2462,7 +2459,7 @@ usb2_peer_can_wakeup(struct usb2_device 
 }
 
 void
-usb2_set_device_state(struct usb2_device *udev, enum usb_dev_state state)
+usb2_set_device_state(struct usb2_device *udev, enum usb2_dev_state state)
 {
 
 	KASSERT(state < USB_STATE_MAX, ("invalid udev state"));
@@ -2472,7 +2469,7 @@ usb2_set_device_state(struct usb2_device
 	udev->state = state;
 }
 
-int
+uint8_t
 usb2_device_attached(struct usb2_device *udev)
 {
 	return (udev->state > USB_STATE_DETACHED);

Modified: head/sys/dev/usb/usb_device.h
==============================================================================
--- head/sys/dev/usb/usb_device.h	Tue May  5 15:19:45 2009	(r191823)
+++ head/sys/dev/usb/usb_device.h	Tue May  5 15:36:23 2009	(r191824)
@@ -89,6 +89,14 @@ struct usb2_device_flags {
 					 * strings */
 	uint8_t	remote_wakeup:1;	/* set if remote wakeup is enabled */
 	uint8_t	uq_bus_powered:1;	/* set if BUS powered quirk is present */
+
+	/*
+	 * NOTE: Although the flags below will reach the same value
+	 * over time, but the instant values may differ, and
+	 * consequently the flags cannot be merged into one!
+	 */
+	uint8_t peer_suspended:1;	/* set if peer is suspended */
+	uint8_t self_suspended:1;	/* set if self is suspended */
 };
 
 /*
@@ -137,7 +145,7 @@ struct usb2_device {
 #endif
 	usb2_ticks_t plugtime;		/* copy of "ticks" */
 
-	enum usb_dev_state state;
+	enum usb2_dev_state state;
 	uint16_t refcount;
 #define	USB_DEV_REF_MAX 0xffff
 
@@ -205,6 +213,6 @@ void	usb_linux_free_device(struct usb_de
 uint8_t	usb2_peer_can_wakeup(struct usb2_device *udev);
 struct usb2_pipe *usb2_pipe_foreach(struct usb2_device *udev, struct usb2_pipe *pipe);
 void	usb2_set_device_state(struct usb2_device *udev,
-	    enum usb_dev_state state);
+	    enum usb2_dev_state state);
 
 #endif					/* _USB2_DEVICE_H_ */

Modified: head/sys/dev/usb/usb_generic.c
==============================================================================
--- head/sys/dev/usb/usb_generic.c	Tue May  5 15:19:45 2009	(r191823)
+++ head/sys/dev/usb/usb_generic.c	Tue May  5 15:36:23 2009	(r191824)
@@ -823,11 +823,7 @@ usb2_gen_fill_deviceinfo(struct usb2_fif
 	di->udi_speed = udev->speed;
 	di->udi_mode = udev->flags.usb2_mode;
 	di->udi_power_mode = udev->power_mode;
-	if (udev->state == USB_STATE_SUSPENDED) {
-		di->udi_suspended = 1;
-	} else {
-		di->udi_suspended = 0;
-	}
+	di->udi_suspended = udev->flags.peer_suspended;
 
 	hub = udev->parent_hub;
 	if (hub) {

Modified: head/sys/dev/usb/usb_hub.c
==============================================================================
--- head/sys/dev/usb/usb_hub.c	Tue May  5 15:19:45 2009	(r191823)
+++ head/sys/dev/usb/usb_hub.c	Tue May  5 15:36:23 2009	(r191824)
@@ -544,7 +544,8 @@ uhub_explore(struct usb2_device *udev)
 	if (udev->depth > USB_HUB_MAX_DEPTH) {
 		return (USB_ERR_TOO_DEEP);
 	}
-	if (udev->state == USB_STATE_SUSPENDED) {
+
+	if (udev->flags.self_suspended) {
 		/* need to wait until the child signals resume */
 		DPRINTF("Device is suspended!\n");
 		return (0);
@@ -1518,7 +1519,7 @@ usb2_transfer_power_ref(struct usb2_xfer
 		udev->pwr_save.write_refs += val;
 	}
 
-	if (udev->state == USB_STATE_SUSPENDED)
+	if (udev->flags.self_suspended)
 		needs_explore =
 		    (udev->pwr_save.write_refs != 0) ||
 		    ((udev->pwr_save.read_refs != 0) &&
@@ -1600,7 +1601,7 @@ usb2_bus_powerd(struct usb2_bus *bus)
 		    (rem_wakeup == 0))) {
 
 			/* check if we are suspended */
-			if (udev->state == USB_STATE_SUSPENDED) {
+			if (udev->flags.self_suspended != 0) {
 				USB_BUS_UNLOCK(bus);
 				usb2_dev_resume_peer(udev);
 				USB_BUS_LOCK(bus);
@@ -1608,7 +1609,7 @@ usb2_bus_powerd(struct usb2_bus *bus)
 		} else if (temp >= limit) {
 
 			/* check if we are not suspended */
-			if (udev->state != USB_STATE_SUSPENDED) {
+			if (udev->flags.self_suspended == 0) {
 				USB_BUS_UNLOCK(bus);
 				usb2_dev_suspend_peer(udev);
 				USB_BUS_LOCK(bus);
@@ -1647,7 +1648,7 @@ usb2_bus_powerd(struct usb2_bus *bus)
 		if (temp < mintime)
 			mintime = temp;
 
-		if (udev->state != USB_STATE_SUSPENDED) {
+		if (udev->flags.self_suspended == 0) {
 			type_refs[0] += udev->pwr_save.type_refs[0];
 			type_refs[1] += udev->pwr_save.type_refs[1];
 			type_refs[2] += udev->pwr_save.type_refs[2];
@@ -1697,7 +1698,7 @@ usb2_dev_resume_peer(struct usb2_device 
 		return;
 
 	/* check if already resumed */
-	if (udev->state != USB_STATE_SUSPENDED)
+	if (udev->flags.self_suspended == 0)
 		return;
 
 	/* we need a parent HUB to do resume */
@@ -1737,7 +1738,7 @@ usb2_dev_resume_peer(struct usb2_device 
 	}
 	USB_BUS_LOCK(bus);
 	/* set that this device is now resumed */
-	usb2_set_device_state(udev, USB_STATE_CONFIGURED);
+	udev->flags.self_suspended = 0;
 #if USB_HAVE_POWERD
 	/* make sure that we don't go into suspend right away */
 	udev->pwr_save.last_xfer_time = ticks;
@@ -1797,7 +1798,7 @@ repeat:
 		return;
 
 	/* check if already suspended */
-	if (udev->state == USB_STATE_SUSPENDED)
+	if (udev->flags.self_suspended)
 		return;
 
 	/* we need a parent HUB to do suspend */
@@ -1819,7 +1820,7 @@ repeat:
 			if (child == NULL)
 				continue;
 
-			if (child->state == USB_STATE_SUSPENDED)
+			if (child->flags.self_suspended)
 				continue;
 
 			DPRINTFN(1, "Port %u is busy on the HUB!\n", x + 1);
@@ -1846,7 +1847,7 @@ repeat:
 	 * Set that this device is suspended. This variable must be set
 	 * before calling USB controller suspend callbacks.
 	 */
-	usb2_set_device_state(udev, USB_STATE_SUSPENDED);
+	udev->flags.self_suspended = 1;
 	USB_BUS_UNLOCK(udev->bus);
 
 	if (udev->bus->methods->device_suspend != NULL) {

Modified: head/sys/dev/usb/usb_revision.h
==============================================================================
--- head/sys/dev/usb/usb_revision.h	Tue May  5 15:19:45 2009	(r191823)
+++ head/sys/dev/usb/usb_revision.h	Tue May  5 15:36:23 2009	(r191824)
@@ -28,9 +28,9 @@
 #define	_USB2_REVISION_H_
 
 /*
- * The "USB_SPEED" macro defines all the supported USB speeds.
+ * The "USB_SPEED" macros defines all the supported USB speeds.
  */
-enum {
+enum usb2_speed {
 	USB_SPEED_VARIABLE,
 	USB_SPEED_LOW,
 	USB_SPEED_FULL,
@@ -40,9 +40,9 @@ enum {
 };
 
 /*
- * The "USB_REV" macro defines all the supported USB revisions.
+ * The "USB_REV" macros defines all the supported USB revisions.
  */
-enum {
+enum usb2_revision {
 	USB_REV_UNKNOWN,
 	USB_REV_PRE_1_0,
 	USB_REV_1_0,
@@ -54,24 +54,23 @@ enum {
 };
 
 /*
- * The "USB_MODE" macro defines all the supported USB modes.
+ * The "USB_MODE" macros defines all the supported USB modes.
  */
-enum {
+enum usb2_mode {
 	USB_MODE_HOST,
 	USB_MODE_DEVICE,
 	USB_MODE_MAX
 };
 
 /*
- * The "USB_MODE" macro defines all the supported device states.
+ * The "USB_MODE" macros defines all the supported device states.
  */
-enum usb_dev_state {
+enum usb2_dev_state {
 	USB_STATE_DETACHED,
 	USB_STATE_ATTACHED,
 	USB_STATE_POWERED,
 	USB_STATE_ADDRESSED,
 	USB_STATE_CONFIGURED,
-	USB_STATE_SUSPENDED,
 	USB_STATE_MAX,
 };
 #endif					/* _USB2_REVISION_H_ */

Modified: head/sys/dev/usb/usb_transfer.c
==============================================================================
--- head/sys/dev/usb/usb_transfer.c	Tue May  5 15:19:45 2009	(r191823)
+++ head/sys/dev/usb/usb_transfer.c	Tue May  5 15:36:23 2009	(r191824)
@@ -1376,14 +1376,6 @@ usb2_start_hardware(struct usb2_xfer *xf
 	    xfer, xfer->pipe, xfer->nframes, USB_GET_DATA_ISREAD(xfer) ?
 	    "read" : "write");
 
-	/* Check if the device is still alive */
-	if (info->udev->state < USB_STATE_POWERED) {
-		USB_BUS_LOCK(bus);
-		usb2_transfer_done(xfer, USB_ERR_NOT_CONFIGURED);
-		USB_BUS_UNLOCK(bus);
-		return;
-	}
-
 #if USB_DEBUG
 	if (USB_DEBUG_VAR > 0) {
 		USB_BUS_LOCK(bus);
@@ -1444,8 +1436,15 @@ usb2_start_hardware(struct usb2_xfer *xf
 	/* clear any previous errors */
 	xfer->error = 0;
 
-	/* sanity check */
+	/* Check if the device is still alive */
+	if (info->udev->state < USB_STATE_POWERED) {
+		USB_BUS_LOCK(bus);
+		usb2_transfer_done(xfer, USB_ERR_NOT_CONFIGURED);
+		USB_BUS_UNLOCK(bus);
+		return;
+	}
 
+	/* sanity check */
 	if (xfer->nframes == 0) {
 		if (xfer->flags.stall_pipe) {
 			/*

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 15:39:30 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3986A106564A;
	Tue,  5 May 2009 15:39:30 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 260CE8FC12;
	Tue,  5 May 2009 15:39:30 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45FdUGg085622;
	Tue, 5 May 2009 15:39:30 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45FdTPb085609;
	Tue, 5 May 2009 15:39:29 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200905051539.n45FdTPb085609@svn.freebsd.org>
From: Andrew Thompson 
Date: Tue, 5 May 2009 15:39:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191825 - in head/sys/dev/usb: . net storage
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 15:39:30 -0000

Author: thompsa
Date: Tue May  5 15:39:29 2009
New Revision: 191825
URL: http://svn.freebsd.org/changeset/base/191825

Log:
  Remove USB shutdown methods from device drivers as its the host controllers
  responsibility to detach the bus.
  
  PR:		usb/133896
  Submitted by:	Hans Petter Selasky

Modified:
  head/sys/dev/usb/net/if_aue.c
  head/sys/dev/usb/net/if_axe.c
  head/sys/dev/usb/net/if_cdce.c
  head/sys/dev/usb/net/if_cue.c
  head/sys/dev/usb/net/if_kue.c
  head/sys/dev/usb/net/if_rue.c
  head/sys/dev/usb/net/if_udav.c
  head/sys/dev/usb/net/usb_ethernet.c
  head/sys/dev/usb/net/usb_ethernet.h
  head/sys/dev/usb/storage/ustorage_fs.c
  head/sys/dev/usb/usb_compat_linux.c
  head/sys/dev/usb/usb_hub.c

Modified: head/sys/dev/usb/net/if_aue.c
==============================================================================
--- head/sys/dev/usb/net/if_aue.c	Tue May  5 15:36:23 2009	(r191824)
+++ head/sys/dev/usb/net/if_aue.c	Tue May  5 15:39:29 2009	(r191825)
@@ -173,7 +173,6 @@ static const struct usb2_device_id aue_d
 static device_probe_t aue_probe;
 static device_attach_t aue_attach;
 static device_detach_t aue_detach;
-static device_shutdown_t aue_shutdown;
 static miibus_readreg_t aue_miibus_readreg;
 static miibus_writereg_t aue_miibus_writereg;
 static miibus_statchg_t aue_miibus_statchg;
@@ -239,7 +238,6 @@ static device_method_t aue_methods[] = {
 	DEVMETHOD(device_probe, aue_probe),
 	DEVMETHOD(device_attach, aue_attach),
 	DEVMETHOD(device_detach, aue_detach),
-	DEVMETHOD(device_shutdown, aue_shutdown),
 
 	/* bus interface */
 	DEVMETHOD(bus_print_child, bus_generic_print_child),
@@ -1038,17 +1036,3 @@ aue_stop(struct usb2_ether *ue)
 	aue_csr_write_1(sc, AUE_CTL1, 0);
 	aue_reset(sc);
 }
-
-/*
- * Stop all chip I/O so that the kernel's probe routines don't
- * get confused by errant DMAs when rebooting.
- */
-static int
-aue_shutdown(device_t dev)
-{
-	struct aue_softc *sc = device_get_softc(dev);
-
-	usb2_ether_ifshutdown(&sc->sc_ue);
-
-	return (0);
-}

Modified: head/sys/dev/usb/net/if_axe.c
==============================================================================
--- head/sys/dev/usb/net/if_axe.c	Tue May  5 15:36:23 2009	(r191824)
+++ head/sys/dev/usb/net/if_axe.c	Tue May  5 15:39:29 2009	(r191825)
@@ -151,7 +151,6 @@ static const struct usb2_device_id axe_d
 static device_probe_t axe_probe;
 static device_attach_t axe_attach;
 static device_detach_t axe_detach;
-static device_shutdown_t axe_shutdown;
 
 static usb2_callback_t axe_intr_callback;
 static usb2_callback_t axe_bulk_read_callback;
@@ -216,7 +215,6 @@ static device_method_t axe_methods[] = {
 	DEVMETHOD(device_probe, axe_probe),
 	DEVMETHOD(device_attach, axe_attach),
 	DEVMETHOD(device_detach, axe_detach),
-	DEVMETHOD(device_shutdown, axe_shutdown),
 
 	/* bus interface */
 	DEVMETHOD(bus_print_child, bus_generic_print_child),
@@ -1060,17 +1058,3 @@ axe_stop(struct usb2_ether *ue)
 
 	axe_reset(sc);
 }
-
-/*
- * Stop all chip I/O so that the kernel's probe routines don't
- * get confused by errant DMAs when rebooting.
- */
-static int
-axe_shutdown(device_t dev)
-{
-	struct axe_softc *sc = device_get_softc(dev);
-
-	usb2_ether_ifshutdown(&sc->sc_ue);
-
-	return (0);
-}

Modified: head/sys/dev/usb/net/if_cdce.c
==============================================================================
--- head/sys/dev/usb/net/if_cdce.c	Tue May  5 15:36:23 2009	(r191824)
+++ head/sys/dev/usb/net/if_cdce.c	Tue May  5 15:39:29 2009	(r191825)
@@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$");
 static device_probe_t cdce_probe;
 static device_attach_t cdce_attach;
 static device_detach_t cdce_detach;
-static device_shutdown_t cdce_shutdown;
 static device_suspend_t cdce_suspend;
 static device_resume_t cdce_resume;
 static usb_handle_request_t cdce_handle_request;
@@ -157,7 +156,6 @@ static device_method_t cdce_methods[] = 
 	DEVMETHOD(device_detach, cdce_detach),
 	DEVMETHOD(device_suspend, cdce_suspend),
 	DEVMETHOD(device_resume, cdce_resume),
-	DEVMETHOD(device_shutdown, cdce_shutdown),
 
 	{0, 0}
 };
@@ -596,16 +594,6 @@ cdce_setpromisc(struct usb2_ether *ue)
 }
 
 static int
-cdce_shutdown(device_t dev)
-{
-	struct cdce_softc *sc = device_get_softc(dev);
-
-	usb2_ether_ifshutdown(&sc->sc_ue);
-
-	return (0);
-}
-
-static int
 cdce_suspend(device_t dev)
 {
 	device_printf(dev, "Suspending\n");

Modified: head/sys/dev/usb/net/if_cue.c
==============================================================================
--- head/sys/dev/usb/net/if_cue.c	Tue May  5 15:36:23 2009	(r191824)
+++ head/sys/dev/usb/net/if_cue.c	Tue May  5 15:39:29 2009	(r191825)
@@ -86,7 +86,6 @@ static const struct usb2_device_id cue_d
 static device_probe_t cue_probe;
 static device_attach_t cue_attach;
 static device_detach_t cue_detach;
-static device_shutdown_t cue_shutdown;
 
 static usb2_callback_t cue_bulk_read_callback;
 static usb2_callback_t cue_bulk_write_callback;
@@ -142,7 +141,6 @@ static device_method_t cue_methods[] = {
 	DEVMETHOD(device_probe, cue_probe),
 	DEVMETHOD(device_attach, cue_attach),
 	DEVMETHOD(device_detach, cue_detach),
-	DEVMETHOD(device_shutdown, cue_shutdown),
 
 	{0, 0}
 };
@@ -629,17 +627,3 @@ cue_stop(struct usb2_ether *ue)
 	cue_csr_write_1(sc, CUE_ETHCTL, 0);
 	cue_reset(sc);
 }
-
-/*
- * Stop all chip I/O so that the kernel's probe routines don't
- * get confused by errant DMAs when rebooting.
- */
-static int
-cue_shutdown(device_t dev)
-{
-	struct cue_softc *sc = device_get_softc(dev);
-
-	usb2_ether_ifshutdown(&sc->sc_ue);
-
-	return (0);
-}

Modified: head/sys/dev/usb/net/if_kue.c
==============================================================================
--- head/sys/dev/usb/net/if_kue.c	Tue May  5 15:36:23 2009	(r191824)
+++ head/sys/dev/usb/net/if_kue.c	Tue May  5 15:39:29 2009	(r191825)
@@ -129,7 +129,6 @@ static const struct usb2_device_id kue_d
 static device_probe_t kue_probe;
 static device_attach_t kue_attach;
 static device_detach_t kue_detach;
-static device_shutdown_t kue_shutdown;
 
 static usb2_callback_t kue_bulk_read_callback;
 static usb2_callback_t kue_bulk_write_callback;
@@ -185,7 +184,6 @@ static device_method_t kue_methods[] = {
 	DEVMETHOD(device_probe, kue_probe),
 	DEVMETHOD(device_attach, kue_attach),
 	DEVMETHOD(device_detach, kue_detach),
-	DEVMETHOD(device_shutdown, kue_shutdown),
 
 	{0, 0}
 };
@@ -688,17 +686,3 @@ kue_stop(struct usb2_ether *ue)
 	usb2_transfer_stop(sc->sc_xfer[KUE_BULK_DT_WR]);
 	usb2_transfer_stop(sc->sc_xfer[KUE_BULK_DT_RD]);
 }
-
-/*
- * Stop all chip I/O so that the kernel's probe routines don't
- * get confused by errant DMAs when rebooting.
- */
-static int
-kue_shutdown(device_t dev)
-{
-	struct kue_softc *sc = device_get_softc(dev);
-
-	usb2_ether_ifshutdown(&sc->sc_ue);
-
-	return (0);
-}

Modified: head/sys/dev/usb/net/if_rue.c
==============================================================================
--- head/sys/dev/usb/net/if_rue.c	Tue May  5 15:36:23 2009	(r191824)
+++ head/sys/dev/usb/net/if_rue.c	Tue May  5 15:39:29 2009	(r191825)
@@ -105,7 +105,6 @@ static const struct usb2_device_id rue_d
 static device_probe_t rue_probe;
 static device_attach_t rue_attach;
 static device_detach_t rue_detach;
-static device_shutdown_t rue_shutdown;
 
 static miibus_readreg_t rue_miibus_readreg;
 static miibus_writereg_t rue_miibus_writereg;
@@ -172,7 +171,6 @@ static device_method_t rue_methods[] = {
 	DEVMETHOD(device_probe, rue_probe),
 	DEVMETHOD(device_attach, rue_attach),
 	DEVMETHOD(device_detach, rue_detach),
-	DEVMETHOD(device_shutdown, rue_shutdown),
 
 	/* Bus interface */
 	DEVMETHOD(bus_print_child, bus_generic_print_child),
@@ -897,17 +895,3 @@ rue_stop(struct usb2_ether *ue)
 
 	rue_reset(sc);
 }
-
-/*
- * Stop all chip I/O so that the kernel's probe routines don't
- * get confused by errant DMAs when rebooting.
- */
-static int
-rue_shutdown(device_t dev)
-{
-	struct rue_softc *sc = device_get_softc(dev);
-
-	usb2_ether_ifshutdown(&sc->sc_ue);
-
-	return (0);
-}

Modified: head/sys/dev/usb/net/if_udav.c
==============================================================================
--- head/sys/dev/usb/net/if_udav.c	Tue May  5 15:36:23 2009	(r191824)
+++ head/sys/dev/usb/net/if_udav.c	Tue May  5 15:39:29 2009	(r191825)
@@ -69,7 +69,6 @@ __FBSDID("$FreeBSD$");
 static device_probe_t udav_probe;
 static device_attach_t udav_attach;
 static device_detach_t udav_detach;
-static device_shutdown_t udav_shutdown;
 
 static usb2_callback_t udav_bulk_write_callback;
 static usb2_callback_t udav_bulk_read_callback;
@@ -132,7 +131,6 @@ static device_method_t udav_methods[] = 
 	DEVMETHOD(device_probe, udav_probe),
 	DEVMETHOD(device_attach, udav_attach),
 	DEVMETHOD(device_detach, udav_detach),
-	DEVMETHOD(device_shutdown, udav_shutdown),
 
 	/* bus interface */
 	DEVMETHOD(bus_print_child, bus_generic_print_child),
@@ -840,17 +838,3 @@ udav_miibus_statchg(device_t dev)
 {
 	/* nothing to do */
 }
-
-/*
- * Stop all chip I/O so that the kernel's probe routines don't
- * get confused by errant DMAs when rebooting.
- */
-static int
-udav_shutdown(device_t dev)
-{
-	struct udav_softc *sc = device_get_softc(dev);
-
-	usb2_ether_ifshutdown(&sc->sc_ue);
-
-	return (0);
-}

Modified: head/sys/dev/usb/net/usb_ethernet.c
==============================================================================
--- head/sys/dev/usb/net/usb_ethernet.c	Tue May  5 15:36:23 2009	(r191824)
+++ head/sys/dev/usb/net/usb_ethernet.c	Tue May  5 15:39:29 2009	(r191825)
@@ -288,19 +288,6 @@ usb2_ether_ifdetach(struct usb2_ether *u
 	usb2_proc_free(&ue->ue_tq);
 }
 
-void
-usb2_ether_ifshutdown(struct usb2_ether *ue)
-{
-	struct ifnet *ifp = ue->ue_ifp;
-
-	UE_LOCK(ue);
-	if (ifp->if_drv_flags & IFF_DRV_RUNNING)
-		ue_queue_command(ue, ue_stop_task,
-		    &ue->ue_sync_task[0].hdr,
-		    &ue->ue_sync_task[1].hdr);
-	UE_UNLOCK(ue);
-}
-
 uint8_t
 usb2_ether_is_gone(struct usb2_ether *ue)
 {

Modified: head/sys/dev/usb/net/usb_ethernet.h
==============================================================================
--- head/sys/dev/usb/net/usb_ethernet.h	Tue May  5 15:36:23 2009	(r191824)
+++ head/sys/dev/usb/net/usb_ethernet.h	Tue May  5 15:39:29 2009	(r191825)
@@ -118,6 +118,5 @@ int		usb2_ether_rxbuf(struct usb2_ether 
 		    struct usb2_page_cache *, 
 		    unsigned int, unsigned int);
 void		usb2_ether_rxflush(struct usb2_ether *);
-void		usb2_ether_ifshutdown(struct usb2_ether *);
 uint8_t		usb2_ether_is_gone(struct usb2_ether *);
 #endif					/* _USB2_ETHERNET_H_ */

Modified: head/sys/dev/usb/storage/ustorage_fs.c
==============================================================================
--- head/sys/dev/usb/storage/ustorage_fs.c	Tue May  5 15:36:23 2009	(r191824)
+++ head/sys/dev/usb/storage/ustorage_fs.c	Tue May  5 15:39:29 2009	(r191825)
@@ -202,7 +202,6 @@ static device_attach_t ustorage_fs_attac
 static device_detach_t ustorage_fs_detach;
 static device_suspend_t ustorage_fs_suspend;
 static device_resume_t ustorage_fs_resume;
-static device_shutdown_t ustorage_fs_shutdown;
 static usb_handle_request_t ustorage_fs_handle_request;
 
 static usb2_callback_t ustorage_fs_t_bbb_command_callback;
@@ -239,7 +238,6 @@ static device_method_t ustorage_fs_metho
 	DEVMETHOD(device_detach, ustorage_fs_detach),
 	DEVMETHOD(device_suspend, ustorage_fs_suspend),
 	DEVMETHOD(device_resume, ustorage_fs_resume),
-	DEVMETHOD(device_shutdown, ustorage_fs_shutdown),
 
 	{0, 0}
 };
@@ -437,12 +435,6 @@ ustorage_fs_resume(device_t dev)
 	return (0);			/* success */
 }
 
-static int
-ustorage_fs_shutdown(device_t dev)
-{
-	return (0);			/* success */
-}
-
 /*
  * Generic functions to handle transfers
  */

Modified: head/sys/dev/usb/usb_compat_linux.c
==============================================================================
--- head/sys/dev/usb/usb_compat_linux.c	Tue May  5 15:36:23 2009	(r191824)
+++ head/sys/dev/usb/usb_compat_linux.c	Tue May  5 15:39:29 2009	(r191825)
@@ -59,7 +59,6 @@ static device_attach_t usb_linux_attach;
 static device_detach_t usb_linux_detach;
 static device_suspend_t usb_linux_suspend;
 static device_resume_t usb_linux_resume;
-static device_shutdown_t usb_linux_shutdown;
 
 static usb2_callback_t usb_linux_isoc_callback;
 static usb2_callback_t usb_linux_non_isoc_callback;
@@ -92,7 +91,6 @@ static device_method_t usb_linux_methods
 	DEVMETHOD(device_detach, usb_linux_detach),
 	DEVMETHOD(device_suspend, usb_linux_suspend),
 	DEVMETHOD(device_resume, usb_linux_resume),
-	DEVMETHOD(device_shutdown, usb_linux_shutdown),
 
 	{0, 0}
 };
@@ -360,23 +358,6 @@ usb_linux_resume(device_t dev)
 }
 
 /*------------------------------------------------------------------------*
- *	usb_linux_shutdown
- *
- * This function is the FreeBSD shutdown callback. Usually it does nothing.
- *------------------------------------------------------------------------*/
-static int
-usb_linux_shutdown(device_t dev)
-{
-	struct usb_linux_softc *sc = device_get_softc(dev);
-	struct usb_driver *udrv = usb_linux_get_usb_driver(sc);
-
-	if (udrv && udrv->shutdown) {
-		(udrv->shutdown) (sc->sc_ui);
-	}
-	return (0);
-}
-
-/*------------------------------------------------------------------------*
  * Linux emulation layer
  *------------------------------------------------------------------------*/
 

Modified: head/sys/dev/usb/usb_hub.c
==============================================================================
--- head/sys/dev/usb/usb_hub.c	Tue May  5 15:36:23 2009	(r191824)
+++ head/sys/dev/usb/usb_hub.c	Tue May  5 15:39:29 2009	(r191825)
@@ -132,7 +132,6 @@ static device_method_t uhub_methods[] = 
 
 	DEVMETHOD(device_suspend, uhub_suspend),
 	DEVMETHOD(device_resume, uhub_resume),
-	DEVMETHOD(device_shutdown, bus_generic_shutdown),
 
 	DEVMETHOD(bus_child_location_str, uhub_child_location_string),
 	DEVMETHOD(bus_child_pnpinfo_str, uhub_child_pnpinfo_string),

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 15:41:30 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 78DCF1065670;
	Tue,  5 May 2009 15:41:30 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 662578FC14;
	Tue,  5 May 2009 15:41:30 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45FfUpL085701;
	Tue, 5 May 2009 15:41:30 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45FfUYL085700;
	Tue, 5 May 2009 15:41:30 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200905051541.n45FfUYL085700@svn.freebsd.org>
From: Andrew Thompson 
Date: Tue, 5 May 2009 15:41:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191826 - head/sys/dev/usb/controller
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 15:41:31 -0000

Author: thompsa
Date: Tue May  5 15:41:30 2009
New Revision: 191826
URL: http://svn.freebsd.org/changeset/base/191826

Log:
  Make sure the frame list base address is re-programmed after stopping the USB
  schedule, in case the hardware clears the frame list base address.
  
  Submitted by:	Hans Petter Selasky
  Reported by:	Chao Shin

Modified:
  head/sys/dev/usb/controller/uhci.c

Modified: head/sys/dev/usb/controller/uhci.c
==============================================================================
--- head/sys/dev/usb/controller/uhci.c	Tue May  5 15:39:29 2009	(r191825)
+++ head/sys/dev/usb/controller/uhci.c	Tue May  5 15:41:30 2009	(r191826)
@@ -132,6 +132,7 @@ extern struct usb2_pipe_methods uhci_dev
 extern struct usb2_pipe_methods uhci_device_intr_methods;
 extern struct usb2_pipe_methods uhci_device_isoc_methods;
 
+static uint8_t	uhci_restart(uhci_softc_t *sc);
 static void	uhci_do_poll(struct usb2_bus *);
 static void	uhci_device_done(struct usb2_xfer *, usb2_error_t);
 static void	uhci_transfer_intr_enqueue(struct usb2_xfer *);
@@ -246,10 +247,51 @@ uhci_mem_layout_fixup(struct uhci_mem_la
 	ml->buf_offset += td->len;
 }
 
+/*
+ * Return values:
+ * 0: Success
+ * Else: Failure
+ */
+static uint8_t
+uhci_restart(uhci_softc_t *sc)
+{
+	struct usb2_page_search buf_res;
+
+	USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED);
+
+  	if (UREAD2(sc, UHCI_CMD) & UHCI_CMD_RS) {
+		DPRINTFN(2, "Already started\n");
+		return (0);
+	}
+
+	DPRINTFN(2, "Restarting\n");
+
+	usb2_get_page(&sc->sc_hw.pframes_pc, 0, &buf_res);
+
+	/* Reload fresh base address */
+	UWRITE4(sc, UHCI_FLBASEADDR, buf_res.physaddr);
+
+	/*
+	 * Assume 64 byte packets at frame end and start HC controller:
+	 */
+	UHCICMD(sc, (UHCI_CMD_MAXP | UHCI_CMD_RS));
+
+	/* wait 10 milliseconds */
+
+	usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 100);
+
+	/* check that controller has started */
+
+	if (UREAD2(sc, UHCI_STS) & UHCI_STS_HCH) {
+		DPRINTFN(2, "Failed\n");
+		return (1);
+	}
+	return (0);
+}
+
 void
 uhci_reset(uhci_softc_t *sc)
 {
-	struct usb2_page_search buf_res;
 	uint16_t n;
 
 	USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED);
@@ -309,8 +351,6 @@ done_1:
 done_2:
 
 	/* reload the configuration */
-	usb2_get_page(&sc->sc_hw.pframes_pc, 0, &buf_res);
-	UWRITE4(sc, UHCI_FLBASEADDR, buf_res.physaddr);
 	UWRITE2(sc, UHCI_FRNUM, sc->sc_saved_frnum);
 	UWRITE1(sc, UHCI_SOF, sc->sc_saved_sof);
 
@@ -337,30 +377,11 @@ uhci_start(uhci_softc_t *sc)
 	    UHCI_INTR_IOCE |
 	    UHCI_INTR_SPIE));
 
-	/*
-	 * assume 64 byte packets at frame end and start HC controller
-	 */
-
-	UHCICMD(sc, (UHCI_CMD_MAXP | UHCI_CMD_RS));
-
-	uint8_t n = 10;
-
-	while (n--) {
-		/* wait one millisecond */
-
-		usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000);
-
-		/* check that controller has started */
-
-		if (!(UREAD2(sc, UHCI_STS) & UHCI_STS_HCH)) {
-			goto done;
-		}
+	if (uhci_restart(sc)) {
+		device_printf(sc->sc_bus.bdev,
+		    "cannot start HC controller\n");
 	}
 
-	device_printf(sc->sc_bus.bdev,
-	    "cannot start HC controller\n");
-
-done:
 	/* start root interrupt */
 	uhci_root_intr(sc);
 }
@@ -2389,15 +2410,7 @@ uhci_portreset(uhci_softc_t *sc, uint16_
 	 * Before we do anything, turn on SOF messages on the USB
 	 * BUS. Some USB devices do not cope without them!
 	 */
-  	if (!(UREAD2(sc, UHCI_CMD) & UHCI_CMD_RS)) {
-
-		DPRINTF("Activating SOFs!\n");
-
-		UHCICMD(sc, (UHCI_CMD_MAXP | UHCI_CMD_RS));
-
-		/* wait a little bit */
-		usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 100);
-	}
+	uhci_restart(sc);
 
 	x = URWMASK(UREAD2(sc, port));
 	UWRITE2(sc, port, x | UHCI_PORTSC_PR);
@@ -3194,11 +3207,11 @@ uhci_set_hw_power(struct usb2_bus *bus)
 	    USB_HW_POWER_INTERRUPT |
 	    USB_HW_POWER_ISOC)) {
 		DPRINTF("Some USB transfer is "
-		    "active on %u.\n",
+		    "active on unit %u.\n",
 		    device_get_unit(sc->sc_bus.bdev));
-		UHCICMD(sc, (UHCI_CMD_MAXP | UHCI_CMD_RS));
+		uhci_restart(sc);
 	} else {
-		DPRINTF("Power save on %u.\n",
+		DPRINTF("Power save on unit %u.\n",
 		    device_get_unit(sc->sc_bus.bdev));
 		UHCICMD(sc, UHCI_CMD_MAXP);
 	}

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 16:26:06 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8836C1065672;
	Tue,  5 May 2009 16:26:06 +0000 (UTC) (envelope-from zec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 76BE98FC13;
	Tue,  5 May 2009 16:26:06 +0000 (UTC) (envelope-from zec@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45GQ6p3086815;
	Tue, 5 May 2009 16:26:06 GMT (envelope-from zec@svn.freebsd.org)
Received: (from zec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45GQ63A086813;
	Tue, 5 May 2009 16:26:06 GMT (envelope-from zec@svn.freebsd.org)
Message-Id: <200905051626.n45GQ63A086813@svn.freebsd.org>
From: Marko Zec 
Date: Tue, 5 May 2009 16:26:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191827 - in head/sys: netgraph sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 16:26:07 -0000

Author: zec
Date: Tue May  5 16:26:06 2009
New Revision: 191827
URL: http://svn.freebsd.org/changeset/base/191827

Log:
  Unbreak LINT build, caused by a change in struct ng_node layout introduced
  with r191816, which become uncovered only with NETGRAPH_DEBUG defined.
  
  NOT approved by mentor (julian) due to emergency.

Modified:
  head/sys/netgraph/ng_base.c
  head/sys/sys/vimage.h

Modified: head/sys/netgraph/ng_base.c
==============================================================================
--- head/sys/netgraph/ng_base.c	Tue May  5 15:41:30 2009	(r191826)
+++ head/sys/netgraph/ng_base.c	Tue May  5 16:26:06 2009	(r191827)
@@ -138,6 +138,7 @@ struct ng_node ng_deadnode = {
 		STAILQ_HEAD_INITIALIZER(ng_deadnode.nd_input_queue.queue),
 	},
 	1,	/* refs */
+	NULL,	/* vnet */
 #ifdef	NETGRAPH_DEBUG
 	ND_MAGIC,
 	__FILE__,

Modified: head/sys/sys/vimage.h
==============================================================================
--- head/sys/sys/vimage.h	Tue May  5 15:41:30 2009	(r191826)
+++ head/sys/sys/vimage.h	Tue May  5 16:26:06 2009	(r191827)
@@ -33,7 +33,6 @@
 #ifndef	_SYS_VIMAGE_H_
 #define	_SYS_VIMAGE_H_
 
-#include 
 #include 
 
 #if defined(VIMAGE) && defined(VIMAGE_GLOBALS)

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 16:27:45 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C9DDC1065678;
	Tue,  5 May 2009 16:27:45 +0000 (UTC) (envelope-from kan@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B83D28FC20;
	Tue,  5 May 2009 16:27:45 +0000 (UTC) (envelope-from kan@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45GRjs0086880;
	Tue, 5 May 2009 16:27:45 GMT (envelope-from kan@svn.freebsd.org)
Received: (from kan@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45GRjxC086879;
	Tue, 5 May 2009 16:27:45 GMT (envelope-from kan@svn.freebsd.org)
Message-Id: <200905051627.n45GRjxC086879@svn.freebsd.org>
From: Alexander Kabaev 
Date: Tue, 5 May 2009 16:27:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191828 - head/sys/netinet6
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 16:27:47 -0000

Author: kan
Date: Tue May  5 16:27:45 2009
New Revision: 191828
URL: http://svn.freebsd.org/changeset/base/191828

Log:
  Silence unsolicited spam printed out when KTR_MLD happens to be
  in KTR_COMPILE mask. Compiling KTR trace points in does not necessarily
  mean enabling them, use proper check against ktr_mask instead.

Modified:
  head/sys/netinet6/in6_mcast.c

Modified: head/sys/netinet6/in6_mcast.c
==============================================================================
--- head/sys/netinet6/in6_mcast.c	Tue May  5 16:26:06 2009	(r191827)
+++ head/sys/netinet6/in6_mcast.c	Tue May  5 16:27:45 2009	(r191828)
@@ -2691,7 +2691,7 @@ in6m_print(const struct in6_multi *inm)
 	int t;
 	char ip6tbuf[INET6_ADDRSTRLEN];
 
-	if ((KTR_COMPILE & KTR_MLD) == 0)
+	if ((ktr_mask & KTR_MLD) == 0)
 		return;
 
 	printf("%s: --- begin in6m %p ---\n", __func__, inm);

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 16:29:08 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8F68D106566B;
	Tue,  5 May 2009 16:29:08 +0000 (UTC) (envelope-from raj@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7C9C28FC2B;
	Tue,  5 May 2009 16:29:08 +0000 (UTC) (envelope-from raj@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45GT8n6086950;
	Tue, 5 May 2009 16:29:08 GMT (envelope-from raj@svn.freebsd.org)
Received: (from raj@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45GT8Lf086947;
	Tue, 5 May 2009 16:29:08 GMT (envelope-from raj@svn.freebsd.org)
Message-Id: <200905051629.n45GT8Lf086947@svn.freebsd.org>
From: Rafal Jaworowski 
Date: Tue, 5 May 2009 16:29:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191829 - head/sys/boot/uboot/lib
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 16:29:09 -0000

Author: raj
Date: Tue May  5 16:29:08 2009
New Revision: 191829
URL: http://svn.freebsd.org/changeset/base/191829

Log:
  GPT style partitioning for loader(8) with U-Boot support library (tested on
  ARM).
  
  Submitted by:	Piotr Ziecik kosmo ! semihalf dot com

Modified:
  head/sys/boot/uboot/lib/devicename.c
  head/sys/boot/uboot/lib/disk.c
  head/sys/boot/uboot/lib/libuboot.h

Modified: head/sys/boot/uboot/lib/devicename.c
==============================================================================
--- head/sys/boot/uboot/lib/devicename.c	Tue May  5 16:27:45 2009	(r191828)
+++ head/sys/boot/uboot/lib/devicename.c	Tue May  5 16:29:08 2009	(r191829)
@@ -90,7 +90,7 @@ uboot_parsedev(struct uboot_devdesc **de
 	struct devsw *dv;
 	char *cp;
 	const char *np;
-	int i, unit, partition, err;
+	int i, unit, pnum, ptype, err;
 
 	/* minimum length check */
 	if (strlen(devspec) < 2)
@@ -116,7 +116,8 @@ uboot_parsedev(struct uboot_devdesc **de
 
 	case DEVT_DISK:
 		unit = -1;
-		partition = -1;
+		pnum = -1;
+		ptype = -1;
 		if (*np && (*np != ':')) {
 			/* next comes the unit number */
 			unit = strtol(np, &cp, 10);
@@ -126,13 +127,20 @@ uboot_parsedev(struct uboot_devdesc **de
 			}
 			if (*cp && (*cp != ':')) {
 				/* get partition */
-				partition = *cp - 'a';
-				if ((partition < 0) ||
-				    (partition >= MAXPARTITIONS)) {
-					err = EPART;
-					goto fail;
+				if (*cp == 'p' && *(cp + 1) &&
+				    *(cp + 1) != ':') {
+					pnum = strtol(cp + 1, &cp, 10);
+					ptype = PTYPE_GPT;
+				} else {
+					pnum = *cp - 'a';
+					ptype = PTYPE_BSDLABEL;
+					if ((pnum < 0) ||
+					    (pnum >= MAXPARTITIONS)) {
+						err = EPART;
+						goto fail;
+					}
+					cp++;
 				}
-				cp++;
 			}
 		}
 		if (*cp && (*cp != ':')) {
@@ -141,7 +149,8 @@ uboot_parsedev(struct uboot_devdesc **de
 		}
 
 		idev->d_unit = unit;
-		idev->d_disk.partition = partition;
+		idev->d_disk.pnum = pnum;
+		idev->d_disk.ptype = ptype;
 		idev->d_disk.data = NULL;
 		if (path != NULL)
 			*path = (*cp == 0) ? cp : cp + 1;
@@ -202,9 +211,15 @@ uboot_fmtdev(void *vdev)
 	case DEVT_DISK:
 		cp = buf;
 		cp += sprintf(cp, "%s%d", dev->d_dev->dv_name, dev->d_unit);
-		if (dev->d_kind.disk.partition >= 0)
-			cp += sprintf(cp, "%c", dev->d_kind.disk.partition +
-			    'a');
+		if (dev->d_kind.disk.pnum >= 0) {
+			if (dev->d_kind.disk.ptype == PTYPE_BSDLABEL)
+				cp += sprintf(cp, "%c",
+				    dev->d_kind.disk.pnum + 'a');
+			else if (dev->d_kind.disk.ptype == PTYPE_GPT)
+				cp += sprintf(cp, "p%i",
+				    dev->d_kind.disk.pnum);
+		}
+
 		strcat(cp, ":");
 		break;
 

Modified: head/sys/boot/uboot/lib/disk.c
==============================================================================
--- head/sys/boot/uboot/lib/disk.c	Tue May  5 16:27:45 2009	(r191828)
+++ head/sys/boot/uboot/lib/disk.c	Tue May  5 16:29:08 2009	(r191829)
@@ -1,5 +1,6 @@
 /*-
  * Copyright (c) 2008 Semihalf, Rafal Jaworowski
+ * Copyright (c) 2009 Semihalf, Piotr Ziecik
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,6 +42,8 @@ __FBSDID("$FreeBSD$");
 
 #define FSTYPENAMES
 #include 
+#include 
+#include 
 
 #include "api_public.h"
 #include "bootstrap.h"
@@ -72,9 +75,6 @@ struct gpt_part {
 struct open_dev {
 	int		od_bsize;	/* block size */
 	int		od_bstart;	/* start block offset from beginning of disk */
-	int		od_type;
-#define OD_BSDLABEL	0x0001
-#define	OD_GPT		0x0002
 	union {
 		struct {
 			struct disklabel bsdlabel;
@@ -90,6 +90,13 @@ struct open_dev {
 #define	od_nparts	_data._gpt.gpt_nparts
 #define	od_partitions	_data._gpt.gpt_partitions
 
+static uuid_t efi = GPT_ENT_TYPE_EFI;
+static uuid_t freebsd_boot = GPT_ENT_TYPE_FREEBSD_BOOT;
+static uuid_t freebsd_ufs = GPT_ENT_TYPE_FREEBSD_UFS;
+static uuid_t freebsd_swap = GPT_ENT_TYPE_FREEBSD_SWAP;
+static uuid_t freebsd_zfs = GPT_ENT_TYPE_FREEBSD_ZFS;
+static uuid_t ms_basic_data = GPT_ENT_TYPE_MS_BASIC_DATA;
+
 static int stor_info[UB_MAX_DEV];
 static int stor_info_no = 0;
 static int stor_opendev(struct open_dev **, struct uboot_devdesc *);
@@ -213,9 +220,158 @@ stor_close(struct open_file *f)
 static int
 stor_open_gpt(struct open_dev *od, struct uboot_devdesc *dev)
 {
+	char *buf;
+	struct dos_partition *dp;
+	struct gpt_hdr *hdr;
+	struct gpt_ent *ent;
+	daddr_t slba, lba, elba;
+	int eps, part, i;
+	int err = 0;
+
+	od->od_nparts = 0;
+	od->od_partitions = NULL;
+
+	/* Devices with block size smaller than 512 bytes cannot use GPT */
+	if (od->od_bsize < 512)
+		return (ENXIO);
+
+	/* Allocate 1 block */
+	buf = malloc(od->od_bsize);
+	if (!buf) {
+		stor_printf("could not allocate memory for GPT\n");
+		return (ENOMEM);
+	}
+
+	/* Read MBR */
+	err = stor_readdev(dev, 0, 1, buf);
+	if (err) {
+		stor_printf("GPT read error=%d\n", err);
+		err = EIO;
+		goto out;
+	}
+
+	/* Check the slice table magic. */
+	if (*((uint16_t *)(buf + DOSMAGICOFFSET)) != DOSMAGIC) {
+		err = ENXIO;
+		goto out;
+	}
+
+	/* Check GPT slice */
+	dp = (struct dos_partition *)(buf + DOSPARTOFF);
+	part = 0;
+
+	for (i = 0; i < NDOSPART; i++) {
+		if (dp[i].dp_typ == 0xee)
+			part += 1;
+		else if (dp[i].dp_typ != 0x00) {
+			err = EINVAL;
+			goto out;
+		}
+	}
+
+	if (part != 1) {
+		err = EINVAL;
+		goto out;
+	}
+
+	/* Read primary GPT header */
+	err = stor_readdev(dev, 1, 1, buf);
+	if (err) {
+		stor_printf("GPT read error=%d\n", err);
+		err = EIO;
+		goto out;
+	}
+
+	hdr = (struct gpt_hdr *)buf;
+
+	/* Check GPT header */
+	if (bcmp(hdr->hdr_sig, GPT_HDR_SIG, sizeof(hdr->hdr_sig)) != 0 ||
+	    hdr->hdr_lba_self != 1 || hdr->hdr_revision < 0x00010000 ||
+	    hdr->hdr_entsz < sizeof(*ent) ||
+	    od->od_bsize % hdr->hdr_entsz != 0) {
+		debugf("Invalid GPT header!\n");
+		err = EINVAL;
+		goto out;
+	}
+
+	/* Count number of valid partitions */
+	part = 0;
+	eps = od->od_bsize / hdr->hdr_entsz;
+	slba = hdr->hdr_lba_table;
+	elba = slba + hdr->hdr_entries / eps;
+
+	for (lba = slba; lba < elba; lba++) {
+		err = stor_readdev(dev, lba, 1, buf);
+		if (err) {
+			stor_printf("GPT read error=%d\n", err);
+			err = EIO;
+			goto out;
+		}
+
+		ent = (struct gpt_ent *)buf;
 
-	/* TODO */
-	return (ENXIO);
+		for (i = 0; i < eps; i++) {
+			if (uuid_is_nil(&ent[i].ent_type, NULL) ||
+			    ent[i].ent_lba_start == 0 ||
+			    ent[i].ent_lba_end < ent[i].ent_lba_start)
+				continue;
+
+			part += 1;
+		}
+	}
+
+	/* Save information about partitions */
+	if (part != 0) {
+		od->od_nparts = part;
+		od->od_partitions = malloc(part * sizeof(struct gpt_part));
+		if (!od->od_partitions) {
+			stor_printf("could not allocate memory for GPT\n");
+			err = ENOMEM;
+			goto out;
+		}
+
+		part = 0;
+		for (lba = slba; lba < elba; lba++) {
+			err = stor_readdev(dev, lba, 1, buf);
+			if (err) {
+				stor_printf("GPT read error=%d\n", err);
+				err = EIO;
+				goto out;
+			}
+
+			ent = (struct gpt_ent *)buf;
+
+			for (i = 0; i < eps; i++) {
+				if (uuid_is_nil(&ent[i].ent_type, NULL) ||
+				    ent[i].ent_lba_start == 0 ||
+				    ent[i].ent_lba_end < ent[i].ent_lba_start)
+					continue;
+
+				od->od_partitions[part].gp_index = (lba - slba)
+				    * eps + i + 1;
+				od->od_partitions[part].gp_type =
+				    ent[i].ent_type;
+				od->od_partitions[part].gp_start =
+				    ent[i].ent_lba_start;
+				od->od_partitions[part].gp_end =
+				    ent[i].ent_lba_end;
+				part += 1;
+			}
+		}
+	}
+
+	dev->d_disk.ptype = PTYPE_GPT;
+
+	for (i = 0; i < od->od_nparts; i++)
+		if (od->od_partitions[i].gp_index == dev->d_disk.pnum)
+			od->od_bstart = od->od_partitions[i].gp_start;
+
+out:
+	if (err && od->od_partitions)
+		free(od->od_partitions);
+
+	free(buf);
+	return (err);
 }
 
 static int
@@ -247,8 +403,9 @@ stor_open_bsdlabel(struct open_dev *od, 
 		err = EUNLAB;
 		goto out;
 	}
-	od->od_type = OD_BSDLABEL;
-	od->od_bstart = dl->d_partitions[dev->d_disk.partition].p_offset;
+
+	od->od_bstart = dl->d_partitions[dev->d_disk.pnum].p_offset;
+	dev->d_disk.ptype = PTYPE_BSDLABEL;
 
 	debugf("bstart=%d\n", od->od_bstart);
 
@@ -314,7 +471,6 @@ stor_opendev(struct open_dev **odp, stru
 	}
 	od->od_bsize = di->di_stor.block_size;
 	od->od_bstart = 0;
-	od->od_type = 0;
 
 	if ((err = stor_open_gpt(od, dev)) != 0)
 		err = stor_open_bsdlabel(od, dev);
@@ -332,9 +488,14 @@ stor_opendev(struct open_dev **odp, stru
 static int
 stor_closedev(struct uboot_devdesc *dev)
 {
+	struct open_dev *od;
 	int err, h;
 
-	free((struct open_dev *)dev->d_disk.data);
+	od = (struct open_dev *)dev->d_disk.data;
+	if (dev->d_disk.ptype == PTYPE_GPT && od->od_nparts != 0)
+		free(od->od_partitions);
+
+	free(od);
 	dev->d_disk.data = NULL;
 
 	if (--stor_open_count == 0) {
@@ -420,6 +581,42 @@ stor_print_bsdlabel(struct uboot_devdesc
 }
 
 static void
+stor_print_gpt(struct uboot_devdesc *dev, char *prefix, int verbose)
+{
+	struct open_dev *od = (struct open_dev *)dev->d_disk.data;
+	struct gpt_part *gp;
+	char line[80];
+	char *fs;
+	int i;
+
+	for (i = 0; i < od->od_nparts; i++) {
+		gp = &od->od_partitions[i];
+
+		if (uuid_equal(&gp->gp_type, &efi, NULL))
+			fs = "EFI";
+		else if (uuid_equal(&gp->gp_type, &ms_basic_data, NULL))
+			fs = "FAT/NTFS";
+		else if (uuid_equal(&gp->gp_type, &freebsd_boot, NULL))
+			fs = "FreeBSD Boot";
+		else if (uuid_equal(&gp->gp_type, &freebsd_ufs, NULL))
+			fs = "FreeBSD UFS";
+		else if (uuid_equal(&gp->gp_type, &freebsd_swap, NULL))
+			fs = "FreeBSD Swap";
+		else if (uuid_equal(&gp->gp_type, &freebsd_zfs, NULL))
+			fs = "FreeBSD ZFS";
+		else
+			fs = "unknown";
+
+		sprintf(line, "  %sp%u: %s %s (%lld - %lld)\n", prefix,
+		    gp->gp_index, fs,
+		    display_size(gp->gp_end + 1 - gp->gp_start), gp->gp_start,
+		    gp->gp_end);
+
+		pager_output(line);
+	}
+}
+
+static void
 stor_print_one(int i, struct device_info *di, int verbose)
 {
 	struct uboot_devdesc dev;
@@ -431,16 +628,16 @@ stor_print_one(int i, struct device_info
 
 	dev.d_dev = &uboot_storage;
 	dev.d_unit = i;
-	dev.d_disk.partition = -1;
+	dev.d_disk.pnum = -1;
 	dev.d_disk.data = NULL;
 
 	if (stor_opendev(&od, &dev) == 0) {
 		dev.d_disk.data = od;
 
-		if (od->od_type == OD_GPT) {
-			/* TODO */
-
-		} else if (od->od_type == OD_BSDLABEL) {
+		if (dev.d_disk.ptype == PTYPE_GPT) {
+			sprintf(line, "\t\tdisk%d", i);
+			stor_print_gpt(&dev, line, verbose);
+		} else if (dev.d_disk.ptype == PTYPE_BSDLABEL) {
 			sprintf(line, "\t\tdisk%d", i);
 			stor_print_bsdlabel(&dev, line, verbose);
 		}

Modified: head/sys/boot/uboot/lib/libuboot.h
==============================================================================
--- head/sys/boot/uboot/lib/libuboot.h	Tue May  5 16:27:45 2009	(r191828)
+++ head/sys/boot/uboot/lib/libuboot.h	Tue May  5 16:29:08 2009	(r191829)
@@ -35,13 +35,17 @@ struct uboot_devdesc
 	union {
 		struct {
 			void	*data;
-			int	partition;
+			int	pnum;
+			int	ptype;
 		} disk;
 	} d_kind;
 };
 
 #define d_disk d_kind.disk
 
+#define PTYPE_BSDLABEL	1
+#define PTYPE_GPT	2
+
 /*
  * Default network packet alignment in memory
  */

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 16:37:34 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 20058106566B;
	Tue,  5 May 2009 16:37:34 +0000 (UTC)
	(envelope-from remko@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0D3688FC1A;
	Tue,  5 May 2009 16:37:34 +0000 (UTC)
	(envelope-from remko@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45GbXo8087204;
	Tue, 5 May 2009 16:37:33 GMT (envelope-from remko@svn.freebsd.org)
Received: (from remko@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45GbXCY087203;
	Tue, 5 May 2009 16:37:33 GMT (envelope-from remko@svn.freebsd.org)
Message-Id: <200905051637.n45GbXCY087203@svn.freebsd.org>
From: Remko Lodder 
Date: Tue, 5 May 2009 16:37:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191830 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb dev/usb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 16:37:34 -0000

Author: remko
Date: Tue May  5 16:37:33 2009
New Revision: 191830
URL: http://svn.freebsd.org/changeset/base/191830

Log:
  MFC r182896
  
    Add support for the CyberPower CP1500AVRLCD.
  
    PR: 126845
    Submitted by: gavin
    Approved by: imp (mentor, implicit)
    MFC after: 1 week
  
  Approved by:	imp (mentor, implicit)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/dev/usb/usb_quirks.c

Modified: stable/7/sys/dev/usb/usb_quirks.c
==============================================================================
--- stable/7/sys/dev/usb/usb_quirks.c	Tue May  5 16:29:08 2009	(r191829)
+++ stable/7/sys/dev/usb/usb_quirks.c	Tue May  5 16:37:33 2009	(r191830)
@@ -98,6 +98,8 @@ static const struct usbd_quirk_entry {
 	ANY, { UQ_HID_IGNORE }},
  { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F6C550AVR,
 	ANY, { UQ_HID_IGNORE }},
+ { USB_VENDOR_CYBERPOWER, USB_PRODUCT_CYBERPOWER_1500CAVRLCD,
+	ANY, { UQ_HID_IGNORE }},
  { USB_VENDOR_DELORME, USB_PRODUCT_DELORME_EARTHMATE,
 	ANY, { UQ_HID_IGNORE }},
  { USB_VENDOR_ITUNERNET, USB_PRODUCT_ITUNERNET_USBLCD2X20,

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 16:45:26 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0B234106566B;
	Tue,  5 May 2009 16:45:26 +0000 (UTC)
	(envelope-from rene@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id ED38B8FC15;
	Tue,  5 May 2009 16:45:25 +0000 (UTC)
	(envelope-from rene@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45GjPxp087404;
	Tue, 5 May 2009 16:45:25 GMT (envelope-from rene@svn.freebsd.org)
Received: (from rene@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45GjP9D087403;
	Tue, 5 May 2009 16:45:25 GMT (envelope-from rene@svn.freebsd.org)
Message-Id: <200905051645.n45GjP9D087403@svn.freebsd.org>
From: Rene Ladan 
Date: Tue, 5 May 2009 16:45:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191831 - head/usr.bin/calendar/calendars
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 16:45:26 -0000

Author: rene (doc committer)
Date: Tue May  5 16:45:25 2009
New Revision: 191831
URL: http://svn.freebsd.org/changeset/base/191831

Log:
  Add my birthday to the calendar.
  
  Approved by:	remko

Modified:
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==============================================================================
--- head/usr.bin/calendar/calendars/calendar.freebsd	Tue May  5 16:37:33 2009	(r191830)
+++ head/usr.bin/calendar/calendars/calendar.freebsd	Tue May  5 16:45:25 2009	(r191831)
@@ -116,6 +116,7 @@
 04/17	Dryice Liu  born in Jinan, Shandong, China, 1975
 04/22	Joerg Wunsch  born in Dresden, Sachsen, Germany, 1962
 04/22	Jun Kuriyama  born in Matsue, Shimane, Japan, 1973
+04/26	Rene Ladan  born in Geldrop, the Netherlands, 1980
 04/29	Adam Weinberger  born in Berkeley, California, United States, 1980
 04/29	Eric Anholt  born in Portland, Oregon, United States, 1983
 05/01	Randall Stewart  born in Spokane, Washington, United States, 1959

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 17:22:48 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 99DF7106564A;
	Tue,  5 May 2009 17:22:48 +0000 (UTC)
	(envelope-from remko@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6CEFB8FC1D;
	Tue,  5 May 2009 17:22:48 +0000 (UTC)
	(envelope-from remko@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45HMmf6088220;
	Tue, 5 May 2009 17:22:48 GMT (envelope-from remko@svn.freebsd.org)
Received: (from remko@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45HMmnN088218;
	Tue, 5 May 2009 17:22:48 GMT (envelope-from remko@svn.freebsd.org)
Message-Id: <200905051722.n45HMmnN088218@svn.freebsd.org>
From: Remko Lodder 
Date: Tue, 5 May 2009 17:22:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191832 - in stable/6/sys: . contrib/pf dev/cxgb dev/usb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 17:22:49 -0000

Author: remko
Date: Tue May  5 17:22:48 2009
New Revision: 191832
URL: http://svn.freebsd.org/changeset/base/191832

Log:
  MFC r182896
  
     Add support for the CyberPower CP1500AVRLCD.
  
     PR: 126845
     Submitted by: gavin
     Approved by: imp (mentor, implicit)
     MFC after: 1 week
  
  Approved by:	imp (mentor, implicit)

Modified:
  stable/6/sys/   (props changed)
  stable/6/sys/contrib/pf/   (props changed)
  stable/6/sys/dev/cxgb/   (props changed)
  stable/6/sys/dev/usb/usb_quirks.c
  stable/6/sys/dev/usb/usbdevs

Modified: stable/6/sys/dev/usb/usb_quirks.c
==============================================================================
--- stable/6/sys/dev/usb/usb_quirks.c	Tue May  5 16:45:25 2009	(r191831)
+++ stable/6/sys/dev/usb/usb_quirks.c	Tue May  5 17:22:48 2009	(r191832)
@@ -122,6 +122,8 @@ Static const struct usbd_quirk_entry {
 	ANY, { UQ_HID_IGNORE }},
  { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F6C550AVR,
 	ANY, { UQ_HID_IGNORE }},
+ { USB_VENDOR_CYBERPOWER, USB_PRODUCT_CYBERPOWER_1500CAVRLCD,
+	ANY, { UQ_HID_IGNORE }},
  { USB_VENDOR_DELORME, USB_PRODUCT_DELORME_EARTHMATE,
 	ANY, { UQ_HID_IGNORE }},
  { USB_VENDOR_MGE, USB_PRODUCT_MGE_UPS1,

Modified: stable/6/sys/dev/usb/usbdevs
==============================================================================
--- stable/6/sys/dev/usb/usbdevs	Tue May  5 16:45:25 2009	(r191831)
+++ stable/6/sys/dev/usb/usbdevs	Tue May  5 17:22:48 2009	(r191832)
@@ -351,6 +351,7 @@ vendor EICON		0x0734	Eicon Networks
 vendor DIGITALSTREAM	0x074e	Digital Stream
 vendor AUREAL		0x0755	Aureal
 vendor MIDIMAN		0x0763	Midiman
+vendor CYBERPOWER	0x0764	Cyber Power Systems, Inc.
 vendor LINKSYS2		0x077b	Linksys
 vendor GRIFFIN		0x077d	Griffin
 vendor SANDISK		0x0781	SanDisk
@@ -820,6 +821,9 @@ product CURITEL HX550C		0x1101	CDMA 2000
 product CURITEL HX57XB		0x2101	CDMA 2000 1xRTT USB modem (HX-570/575B/PR-600)
 product CURITEL PC5740		0x3701	Broadband wireless modem
 
+/* CyberPower products */
+product CYBERPOWER 1500CAVRLCD	0x0501	1500CAVRLCD
+
 /* Cypress Semiconductor products */
 product CYPRESS MOUSE		0x0001	mouse
 product CYPRESS THERMO		0x0002	thermometer

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 17:33:41 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F273C106566C;
	Tue,  5 May 2009 17:33:40 +0000 (UTC) (envelope-from xcllnt@mac.com)
Received: from asmtpout018.mac.com (asmtpout018.mac.com [17.148.16.93])
	by mx1.freebsd.org (Postfix) with ESMTP id DCAD98FC13;
	Tue,  5 May 2009 17:33:40 +0000 (UTC) (envelope-from xcllnt@mac.com)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Received: from iphone-2.jnpr.net (natint3.juniper.net [66.129.224.36])
	by asmtp018.mac.com
	(Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008;
	32bit)) with ESMTPSA id <0KJ600DKEM3M8970@asmtp018.mac.com>; Tue,
	05 May 2009 10:33:25 -0700 (PDT)
Message-id: <5A9FB04C-4E13-4105-B563-EADA30F2068F@mac.com>
From: Marcel Moolenaar 
To: Rafal Jaworowski 
In-reply-to: <200905051629.n45GT8Lf086947@svn.freebsd.org>
Date: Tue, 05 May 2009 10:33:21 -0700
References: <200905051629.n45GT8Lf086947@svn.freebsd.org>
X-Mailer: Apple Mail (2.930.3)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r191829 - head/sys/boot/uboot/lib
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 17:33:41 -0000


On May 5, 2009, at 9:29 AM, Rafal Jaworowski wrote:

> Author: raj
> Date: Tue May  5 16:29:08 2009
> New Revision: 191829
> URL: http://svn.freebsd.org/changeset/base/191829
>
> Log:
>  GPT style partitioning for loader(8) with U-Boot support library  
> (tested on
>  ARM).

Alas, this is broken for big-endian machines...

-- 
Marcel Moolenaar
xcllnt@mac.com




From owner-svn-src-all@FreeBSD.ORG  Tue May  5 17:44:17 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 556AA1065672;
	Tue,  5 May 2009 17:44:17 +0000 (UTC)
	(envelope-from raj@semihalf.com)
Received: from semihalf.com (semihalf.com [206.130.101.55])
	by mx1.freebsd.org (Postfix) with ESMTP id 1C7668FC18;
	Tue,  5 May 2009 17:44:16 +0000 (UTC)
	(envelope-from raj@semihalf.com)
Received: from mail.semihalf.com (mail.semihalf.com [83.15.139.206])
	by semihalf.com (8.13.1/8.13.1) with ESMTP id n45HiFGe009224;
	Tue, 5 May 2009 11:44:16 -0600
Message-Id: <4B87FAF2-6E73-4CBE-B659-47CC52C324E9@semihalf.com>
From: Rafal Jaworowski 
To: Marcel Moolenaar 
In-Reply-To: <5A9FB04C-4E13-4105-B563-EADA30F2068F@mac.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v930.3)
Date: Tue, 5 May 2009 19:44:10 +0200
References: <200905051629.n45GT8Lf086947@svn.freebsd.org>
	<5A9FB04C-4E13-4105-B563-EADA30F2068F@mac.com>
X-Mailer: Apple Mail (2.930.3)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r191829 - head/sys/boot/uboot/lib
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 17:44:18 -0000


On 2009-05-05, at 19:33, Marcel Moolenaar wrote:

> On May 5, 2009, at 9:29 AM, Rafal Jaworowski wrote:
>
>> Author: raj
>> Date: Tue May  5 16:29:08 2009
>> New Revision: 191829
>> URL: http://svn.freebsd.org/changeset/base/191829
>>
>> Log:
>> GPT style partitioning for loader(8) with U-Boot support library  
>> (tested on
>> ARM).
>
> Alas, this is broken for big-endian machines...


It's a known TODO item, but without a working BE storage environment  
at the moment we couldn't test this. Note the storage support in  
loader is only enabled for ARM at the moment (default LE).

Rafal


From owner-svn-src-all@FreeBSD.ORG  Tue May  5 18:02:07 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D5B6C1065700;
	Tue,  5 May 2009 18:02:07 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C2C558FC13;
	Tue,  5 May 2009 18:02:07 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45I27RL089305;
	Tue, 5 May 2009 18:02:07 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45I27T1089303;
	Tue, 5 May 2009 18:02:07 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <200905051802.n45I27T1089303@svn.freebsd.org>
From: Andriy Gapon 
Date: Tue, 5 May 2009 18:02:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191833 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 18:02:09 -0000

Author: avg
Date: Tue May  5 18:02:07 2009
New Revision: 191833
URL: http://svn.freebsd.org/changeset/base/191833

Log:
  MFC r174848 by julian: give thread0 the tid 100000
  
  ... and bumpt the others to start at 100001.
  This is convenient for ACPI code that needs a thread id that is
  never zero.
  
  Reviewed by:	jkim
  Approved by:	jhb (mentor)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/kern/init_main.c
  stable/7/sys/kern/kern_thread.c

Modified: stable/7/sys/kern/init_main.c
==============================================================================
--- stable/7/sys/kern/init_main.c	Tue May  5 17:22:48 2009	(r191832)
+++ stable/7/sys/kern/init_main.c	Tue May  5 18:02:07 2009	(r191833)
@@ -425,6 +425,7 @@ proc0_init(void *dummy __unused)
 	knlist_init(&p->p_klist, &p->p_mtx, NULL, NULL, NULL);
 	STAILQ_INIT(&p->p_ktr);
 	p->p_nice = NZERO;
+	td->td_tid = PID_MAX + 1;
 	td->td_state = TDS_RUNNING;
 	td->td_pri_class = PRI_TIMESHARE;
 	td->td_user_pri = PUSER;

Modified: stable/7/sys/kern/kern_thread.c
==============================================================================
--- stable/7/sys/kern/kern_thread.c	Tue May  5 17:22:48 2009	(r191832)
+++ stable/7/sys/kern/kern_thread.c	Tue May  5 18:02:07 2009	(r191833)
@@ -252,7 +252,8 @@ threadinit(void)
 {
 
 	mtx_init(&tid_lock, "TID lock", NULL, MTX_DEF);
-	tid_unrhdr = new_unrhdr(PID_MAX + 1, INT_MAX, &tid_lock);
+	/* leave one number for thread0 */
+	tid_unrhdr = new_unrhdr(PID_MAX + 2, INT_MAX, &tid_lock);
 
 	thread_zone = uma_zcreate("THREAD", sched_sizeof_thread(),
 	    thread_ctor, thread_dtor, thread_init, thread_fini,

From owner-svn-src-all@FreeBSD.ORG  Tue May  5 20:54:27 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 41392106566B;
	Tue,  5 May 2009 20:54:27 +0000 (UTC)
	(envelope-from maxim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2F9638FC19;
	Tue,  5 May 2009 20:54:27 +0000 (UTC)
	(envelope-from maxim@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n45KsRuS093819;
	Tue, 5 May 2009 20:54:27 GMT (envelope-from maxim@svn.freebsd.org)
Received: (from maxim@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n45KsRMw093818;
	Tue, 5 May 2009 20:54:27 GMT (envelope-from maxim@svn.freebsd.org)
Message-Id: <200905052054.n45KsRMw093818@svn.freebsd.org>
From: Maxim Konovalov 
Date: Tue, 5 May 2009 20:54:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191834 - head/share/misc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 05 May 2009 20:54:27 -0000

Author: maxim
Date: Tue May  5 20:54:26 2009
New Revision: 191834
URL: http://svn.freebsd.org/changeset/base/191834

Log:
  o FreeBSD 7.2 added.

Modified:
  head/share/misc/bsd-family-tree

Modified: head/share/misc/bsd-family-tree
==============================================================================
--- head/share/misc/bsd-family-tree	Tue May  5 18:02:07 2009	(r191833)
+++ head/share/misc/bsd-family-tree	Tue May  5 20:54:26 2009	(r191834)
@@ -227,7 +227,9 @@ FreeBSD 5.2           |      |          
  |     |              |      |                 |                       |
  |  FreeBSD 7.1       |      |                 |                       |
  |     |              |      |                 |                DragonFly 2.2.0
- |     V              |   NetBSD 5.0       OpenBSD 4.5                 |
+ |  FreeBSD 7.2       |   NetBSD 5.0       OpenBSD 4.5                 |
+ |     |              |      |                 |                       |
+ |     V              |      |                 |                       |
  |                    |      |                 |                       |
 FreeBSD 8 -current    |  NetBSD -current  OpenBSD -current             |
  |                    |      |                 |                       |
@@ -498,6 +500,7 @@ FreeBSD 7.1		2009-01-04 [FBD]
 DragonFly 2.2.0		2009-02-17 [DFB]
 NetBSD 5.0		2009-04-29 [NBD]
 OpenBSD 4.5		2009-05-01 [OBD]
+FreeBSD 7.2		2009-05-04 [FBD]
 
 Bibliography
 ------------------------

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 00:26:59 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C49301065674
	for ; Wed,  6 May 2009 00:26:59 +0000 (UTC)
	(envelope-from julian@elischer.org)
Received: from outF.internet-mail-service.net (outf.internet-mail-service.net
	[216.240.47.229])
	by mx1.freebsd.org (Postfix) with ESMTP id AA5E18FC1F
	for ; Wed,  6 May 2009 00:26:59 +0000 (UTC)
	(envelope-from julian@elischer.org)
Received: from idiom.com (mx0.idiom.com [216.240.32.160])
	by out.internet-mail-service.net (Postfix) with ESMTP id F0A94DAEB8;
	Tue,  5 May 2009 17:27:15 -0700 (PDT)
X-Client-Authorized: MaGic Cook1e
X-Client-Authorized: MaGic Cook1e
X-Client-Authorized: MaGic Cook1e
X-Client-Authorized: MaGic Cook1e
Received: from julian-mac.elischer.org (unknown [24.114.252.238])
	by idiom.com (Postfix) with ESMTP id 911432D6318;
	Tue,  5 May 2009 17:26:58 -0700 (PDT)
Message-ID: <4A00D951.6030409@elischer.org>
Date: Tue, 05 May 2009 17:26:57 -0700
From: Julian Elischer 
User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302)
MIME-Version: 1.0
To: Marko Zec 
References: <200905051626.n45GQ63A086813@svn.freebsd.org>
In-Reply-To: <200905051626.n45GQ63A086813@svn.freebsd.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r191827 - in head/sys: netgraph sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 00:27:00 -0000

Marko Zec wrote:
> Author: zec
> Date: Tue May  5 16:26:06 2009
> New Revision: 191827
> URL: http://svn.freebsd.org/changeset/base/191827
> 
> Log:
>   Unbreak LINT build, caused by a change in struct ng_node layout introduced
>   with r191816, which become uncovered only with NETGRAPH_DEBUG defined.

and the factthat Iwas flying to BSDCan.

retrospectively approved :-)

>   
>   NOT approved by mentor (julian) due to emergency.
> 
> Modified:
>   head/sys/netgraph/ng_base.c
>   head/sys/sys/vimage.h
> 
> Modified: head/sys/netgraph/ng_base.c
> ==============================================================================
> --- head/sys/netgraph/ng_base.c	Tue May  5 15:41:30 2009	(r191826)
> +++ head/sys/netgraph/ng_base.c	Tue May  5 16:26:06 2009	(r191827)
> @@ -138,6 +138,7 @@ struct ng_node ng_deadnode = {
>  		STAILQ_HEAD_INITIALIZER(ng_deadnode.nd_input_queue.queue),
>  	},
>  	1,	/* refs */
> +	NULL,	/* vnet */
>  #ifdef	NETGRAPH_DEBUG
>  	ND_MAGIC,
>  	__FILE__,
> 
> Modified: head/sys/sys/vimage.h
> ==============================================================================
> --- head/sys/sys/vimage.h	Tue May  5 15:41:30 2009	(r191826)
> +++ head/sys/sys/vimage.h	Tue May  5 16:26:06 2009	(r191827)
> @@ -33,7 +33,6 @@
>  #ifndef	_SYS_VIMAGE_H_
>  #define	_SYS_VIMAGE_H_
>  
> -#include 
>  #include 
>  
>  #if defined(VIMAGE) && defined(VIMAGE_GLOBALS)


From owner-svn-src-all@FreeBSD.ORG  Wed May  6 01:50:04 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B819A106564A;
	Wed,  6 May 2009 01:50:04 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9E4AC8FC27;
	Wed,  6 May 2009 01:50:04 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n461o4Dp000376;
	Wed, 6 May 2009 01:50:04 GMT (envelope-from sam@svn.freebsd.org)
Received: (from sam@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n461o4XD000375;
	Wed, 6 May 2009 01:50:04 GMT (envelope-from sam@svn.freebsd.org)
Message-Id: <200905060150.n461o4XD000375@svn.freebsd.org>
From: Sam Leffler 
Date: Wed, 6 May 2009 01:50:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191836 - head/lib/libc/arm/string
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 01:50:05 -0000

Author: sam
Date: Wed May  6 01:50:04 2009
New Revision: 191836
URL: http://svn.freebsd.org/changeset/base/191836

Log:
  revert r191633; this breaks at91 & xscale (likely all arm)

Modified:
  head/lib/libc/arm/string/strncmp.S

Modified: head/lib/libc/arm/string/strncmp.S
==============================================================================
--- head/lib/libc/arm/string/strncmp.S	Wed May  6 00:31:33 2009	(r191835)
+++ head/lib/libc/arm/string/strncmp.S	Wed May  6 01:50:04 2009	(r191836)
@@ -33,10 +33,10 @@
 __FBSDID("$FreeBSD$");
 
 ENTRY(strncmp)
-/* if (len == 0) return 0 */
-	cmp	r2, #0
-	moveq	r0, #0
-	RETeq
+/* if ((len - 1) < 0) return 0 */
+	subs	r2, r2, #1
+	movmi	r0, #0
+	movmi	pc, lr
 
 /* ip == last src address to compare */
 	add	ip, r0, r2

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 04:40:19 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 415E4106564A;
	Wed,  6 May 2009 04:40:19 +0000 (UTC)
	(envelope-from nyan@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2FC438FC19;
	Wed,  6 May 2009 04:40:19 +0000 (UTC)
	(envelope-from nyan@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n464eJKA004393;
	Wed, 6 May 2009 04:40:19 GMT (envelope-from nyan@svn.freebsd.org)
Received: (from nyan@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n464eJZ8004392;
	Wed, 6 May 2009 04:40:19 GMT (envelope-from nyan@svn.freebsd.org)
Message-Id: <200905060440.n464eJZ8004392@svn.freebsd.org>
From: Takahashi Yoshihiro 
Date: Wed, 6 May 2009 04:40:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191842 - head/sys/pc98/cbus
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 04:40:19 -0000

Author: nyan
Date: Wed May  6 04:40:18 2009
New Revision: 191842
URL: http://svn.freebsd.org/changeset/base/191842

Log:
  Reduce diffs against i386.
  Use the hardclockintr function.

Modified:
  head/sys/pc98/cbus/clock.c

Modified: head/sys/pc98/cbus/clock.c
==============================================================================
--- head/sys/pc98/cbus/clock.c	Wed May  6 02:55:43 2009	(r191841)
+++ head/sys/pc98/cbus/clock.c	Wed May  6 04:40:18 2009	(r191842)
@@ -181,10 +181,7 @@ clkintr(struct trapframe *frame)
 	if (smp_started)
 		ipi_all_but_self(IPI_HARDCLOCK);
 #endif 
-	if (PCPU_GET(cpuid) == 0)
-		hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame));
-	else
-		hardclock_cpu(TRAPF_USERMODE(frame));
+	hardclockintr(frame);
 	return (FILTER_HANDLED);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 05:08:23 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4D55D106566C;
	Wed,  6 May 2009 05:08:23 +0000 (UTC)
	(envelope-from obrien@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 37DB58FC0A;
	Wed,  6 May 2009 05:08:23 +0000 (UTC)
	(envelope-from obrien@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4658NXC005040;
	Wed, 6 May 2009 05:08:23 GMT (envelope-from obrien@svn.freebsd.org)
Received: (from obrien@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4658NYV005038;
	Wed, 6 May 2009 05:08:23 GMT (envelope-from obrien@svn.freebsd.org)
Message-Id: <200905060508.n4658NYV005038@svn.freebsd.org>
From: "David E. O'Brien" 
Date: Wed, 6 May 2009 05:08:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191843 - in vendor/binutils/dist: . bfd binutils
	config contrib etc gas gprof include ld libiberty opcodes x
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 05:08:23 -0000

Author: obrien
Date: Wed May  6 05:08:22 2009
New Revision: 191843
URL: http://svn.freebsd.org/changeset/base/191843

Log:
  Flatten vendor/binutils/dist.

Added:
  vendor/binutils/dist/ChangeLog
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/ChangeLog
  vendor/binutils/dist/MAINTAINERS
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/MAINTAINERS
  vendor/binutils/dist/Makefile.def
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/Makefile.def
  vendor/binutils/dist/Makefile.in
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/Makefile.in
  vendor/binutils/dist/Makefile.tpl
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/Makefile.tpl
  vendor/binutils/dist/README
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/README
  vendor/binutils/dist/README-maintainer-mode
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/README-maintainer-mode
  vendor/binutils/dist/bfd/
     - copied from r187631, vendor/binutils/dist/x/binutils/bfd/
  vendor/binutils/dist/binutils/
     - copied from r187631, vendor/binutils/dist/x/binutils/binutils/
  vendor/binutils/dist/config/
     - copied from r187631, vendor/binutils/dist/x/binutils/config/
  vendor/binutils/dist/config-ml.in
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/config-ml.in
  vendor/binutils/dist/config.guess
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/config.guess
  vendor/binutils/dist/config.if
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/config.if
  vendor/binutils/dist/config.sub
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/config.sub
  vendor/binutils/dist/configure
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/configure
  vendor/binutils/dist/configure.in
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/configure.in
  vendor/binutils/dist/contrib/
     - copied from r187631, vendor/binutils/dist/x/binutils/contrib/
  vendor/binutils/dist/etc/
     - copied from r187631, vendor/binutils/dist/x/binutils/etc/
  vendor/binutils/dist/gas/
     - copied from r187631, vendor/binutils/dist/x/binutils/gas/
  vendor/binutils/dist/gprof/
     - copied from r187631, vendor/binutils/dist/x/binutils/gprof/
  vendor/binutils/dist/include/
     - copied from r187631, vendor/binutils/dist/x/binutils/include/
  vendor/binutils/dist/install-sh
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/install-sh
  vendor/binutils/dist/install.sh
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/install.sh
  vendor/binutils/dist/ld/
     - copied from r187631, vendor/binutils/dist/x/binutils/ld/
  vendor/binutils/dist/libiberty/
     - copied from r187631, vendor/binutils/dist/x/binutils/libiberty/
  vendor/binutils/dist/libtool.m4
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/libtool.m4
  vendor/binutils/dist/ltcf-c.sh
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/ltcf-c.sh
  vendor/binutils/dist/ltcf-cxx.sh
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/ltcf-cxx.sh
  vendor/binutils/dist/ltcf-gcj.sh
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/ltcf-gcj.sh
  vendor/binutils/dist/ltconfig
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/ltconfig
  vendor/binutils/dist/ltmain.sh
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/ltmain.sh
  vendor/binutils/dist/md5.sum
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/md5.sum
  vendor/binutils/dist/missing
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/missing
  vendor/binutils/dist/mkinstalldirs
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/mkinstalldirs
  vendor/binutils/dist/move-if-change
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/move-if-change
  vendor/binutils/dist/opcodes/
     - copied from r187631, vendor/binutils/dist/x/binutils/opcodes/
  vendor/binutils/dist/symlink-tree
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/symlink-tree
  vendor/binutils/dist/x/
     - copied from r187631, vendor/binutils/dist/x/
  vendor/binutils/dist/ylwrap
     - copied unchanged from r187631, vendor/binutils/dist/x/binutils/ylwrap

Copied: vendor/binutils/dist/ChangeLog (from r187631, vendor/binutils/dist/x/binutils/ChangeLog)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/binutils/dist/ChangeLog	Wed May  6 05:08:22 2009	(r191843, copy of r187631, vendor/binutils/dist/x/binutils/ChangeLog)
@@ -0,0 +1,9597 @@
+2004-05-06  Daniel Jacobowitz  
+
+	* src-release (do-tar): Add directories to the tar file.
+
+2004-05-06  Daniel Jacobowitz  
+
+	Merge from mainline:
+	2004-04-15  James E Wilson  
+	* Makefile.tpl (configure-[+module+], configure-gcc,
+	configure-stage1-gcc, configure-stage2-gcc, configure-stage3-gcc):
+	Set and export LDFLAGS.
+	* Makefile.in: Regenerate.
+
+2004-04-19  Rainer Orth  
+
+	* configure.in (mips*-*-irix5*): Enable ld.
+	* configure: Regenerate.
+
+2004-04-09  Daniel Jacobowitz  
+
+	Merge from mainline:
+	2004-03-25  Stan Shebs  
+        Remove MPW support, no longer used.
+        * mpw-README, mpw-build.in, mpw-config.in, mpw-configure,
+        mpw-install: Remove files.
+        * src-release (DEVO_SUPPORT): Remove names of removed files.
+        * MAINTAINERS: Likewise.
+
+	2004-02-28  Andrew Cagney  
+	* src-release (CVS_NAMES): Define.
+	(do-tar, do-tar): Prune $(CVS_NAMES).
+
+	2004-02-23  Andrew Cagney  
+	* texinfo/texinfo.tex: Update from version 2003-02-03.16 to
+	2004-02-19.09.
+
+	2004-02-19  Andrew Cagney  
+	* config.guess: Update from version 2003-06-12 to 2004-02-16.
+	* config.sub: Update from version 2003-06-13 to 2004-02-16.
+
+2004-02-11  David Edelsohn  
+
+	* configure.in (powerpc-*-aix*): Add target-libada to noconfigdirs.
+	(rs6000-*-aix*): Same.
+	* configure: Regenerate.
+
+2004-02-11  Kelley Cook  
+
+	* configure.in (host): Add in missing $noconfigdirs to defines.
+	* configure: Regenerate.
+
+2004-02-10  Arnaud Charlet  ,
+	    Nathanael Nerode  
+
+	PR ada/6637, PR ada/5911
+        Merge with libada-branch:
+	* configure.in, Makefile.tpl, Makefile.def: Add target-libada,
+	with appropriate dependencies. Add --enable-libada configure switch.
+	* configure, Makefile.in: Regenerate.
+
+2004-02-05  Rainer Orth  
+
+	* configure.in: Don't pass --with-stabs on IRIX 5 either.
+	* configure: Regenerate.
+
+2004-02-02  Jeff Johnston  
+
+	* COPYING.NEWLIB: Update Red Hat license to 2004.
+	
+2004-01-23  DJ Delorie  
+
+	* Makefile.def (target_modules) [libiberty]: Don't stage.
+	* Makefile.in: Rebuilt.
+
+2004-01-23  Jeff Johnston  
+	
+	* COPYING.NEWLIB: Update to include copyrights for new
+	iconv code.
+
+2004-01-15  Andrew Cagney  
+
+	* src-release: Update copyright year.
+	(do-proto-toplev): Configure using i686-pc-linux-gnu.
+	(NEWLIB_SUPPORT_DIRS): Delete macro.
+	(newlib.tar.bz2): Delete rule.
+
+2004-01-14  Loren J. Rittle 
+
+	* Makefile.def (target_modules) [libtermcap, libiberty, zlib]: Stage.
+	* Makefile.tpl (configure-target-[+module+]): Support stage.
+	* Makefile.in: Rebuilt.
+
+2003-01-14  Maciej W. Rozycki  
+
+	* gettext.m4: Quote names of macros to be defined by AC_DEFUN
+	throughout.
+
+2004-01-04  Nathanael Nerode  
+
+	* configure.in: Use ./config.cache, not config.cache.
+	* configure: Regenerate.
+	* Makefile.tpl: Special-casing not needed for GCC any more.
+	* Makefile.in: Regenerate.
+
+	* configure.in: Don't share a cache file for host dirs.
+	* configure: Regenerate.
+
+	* config-ml.in: Don't mess with the cache file.
+
+2004-01-03  Nathanael Nerode  
+
+	* Makefile.tpl: Make GCC use a separate config.cache.
+	* Makefile.in: Regenerate.
+
+	PR bootstrap/11932, PR bootstrap/11933
+	(I don't know if it will fix either of them, but it relates
+	to them.)
+	* configure.in: Don't use shared config.cache for target
+	directories.
+	* configure: Regenerate.
+
+2003-12-31  Roger Sayle  
+
+	* configure.in (ia64*-*-hpux*): Disable building java libraries.
+	* configure: Regenerated.
+
+2003-12-21  Bernardo Innocenti  
+ 
+ 	* configure.in (*-*-uclinux): Exclude newlib, libgloss and rda.
+ 	* configure: Regenerated.
+
+2003-12-19  Nathanael Nerode  
+
+	Port change over from GCC:
+	2003-11-20  Kelley Cook  
+	* Makefile.tpl (BASE_FLAGS_TO_PASS): Pass along CONFIG_SHELL.
+	(configure-build-[+module+], configure-[+module+]): Likewise.
+	(configure-target-[+module+], configure-gcc, config.status): Likewise.
+	* Makefile.in: Regenerate.
+
+2003-12-08  Thomas Fitzsimmons  
+
+	* configure.in (raw_libstdcxx_flags): Remove the leading space.
+	* configure: Regenerate.
+
+2003-11-27  Jeff Johnston  
+
+        * COPYING.NEWLIB: Add license info for long long routines added to
+	stdlib.
+
+2003-11-14  Arnaud Charlet  
+
+	* Makefile.tpl (EXTRA_GCC_FLAGS): Pass BOOT_ADAFLAGS.
+	* Makefile.in: Regenerate.
+
+2003-10-20  Phil Edwards  
+
+	* configure.in (*-*-vxworks):  Add target-libiberty to noconfdirs.
+	* configure:  Regenerate.
+
+2003-10-13  Nathanael Nerode  
+
+	* Makefile.tpl: Make GCC_FLAGS_TO_PASS a superset of
+	HOST_FLAGS_TO_PASS.
+	* Makefile.in: Regenerate.
+
+2003-10-05  Mohan Embar  
+
+	* configure.in: Allow explicit specification of CFLAGS_FOR_BUILD.
+	* configure: Rebuilt
+	* Makefile.tpl: Use CFLAGS_FOR_BUILD computed by configure
+	* Makefile.in: Rebuilt
+
+2003-10-03  H.J. Lu  
+
+	* ltconfig (sys_lib_search_path_spec): Fix a typo for HPUX.
+
+2003-10-01  Phil Edwards  
+
+	* config-ml.in:  Use ac_configure_args directly instead of
+	ml_arguments.  Only set ml_norecursion if --no[-]recursion is
+	actually seen.
+
+2003-10-01  Eric Botcazou  
+
+	* config-ml.in: Propagate INSTALL variables.
+
+2003-09-21  Daniel Jacobowitz  
+
+	* configure.in: Pass a computed --program-transform-name
+	to subconfigures.
+	* configure: Regenerated.
+
+2003-09-20  Nathanael Nerode  
+
+	* Makefile.tpl: Don't pass down obsolete ENQUIRE variable.
+	* Makefile.in: Regenerate.
+
+	* Makefile.tpl: Don't pass (unused) DLLTOOL or WINDRES to gcc.
+	* Makefile.in: Regenerate.
+
+2003-09-17  Daniel Jacobowitz  
+
+	* configure.in (TOPLEVEL_CONFIGURE_ARGUMENTS, baseargs): Fix
+	quoting.
+	* configure: Regenerated.
+
+2003-09-12  Michael Chastain  
+
+	Fix PR gdb/857.
+	* src-release (do-proto-topleve): Remove junk files
+	intl/config.cache, intl/config.status,
+	intl/config.h, intl/stamp-h.
+
+2003-09-14  Andrew Cagney  
+
+	* src-release (dejagnu.tar): New target.
+	(dejagnu.tar.bz2): Recursively call "gdb-taz" rule.
+	(do-djunpack): Use $(PACKAGE) for the package name.
+
+2003-09-04  DJ Delorie  
+
+	* configure: Regenerate.
+
+2003-09-04  Robert Millan  
+
+	* configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
+	
+2003-09-02  Kaveh R. Ghazi  
+
+	* configure.in: Ensure arguments to sed are properly spaced.
+	* configure: Regenerate.
+
+2003-08-28  Daniel Jacobowitz  
+
+	Merge from gcc:
+	2003-07-20  Phil Edwards  
+	* install-sh:  Update to newer upstream versions (associated with
+	aclocal 1.7).
+	* missing:  Likewise, plus $1Help2man -> $1 typo fix.
+
+2003-08-27  Daniel Jacobowitz  
+
+	* configure.in: Set RAW_CXX_FOR_TARGET if unset.
+	* configure: Regenerated.
+
+2003-08-23  Phil Edwards  
+
+	* configure.in:  Use newline instead of semicolon when assuming
+	shell arguments in a for loop.
+	* configure:  Regenerated.
+
+2003-08-20  Geoffrey Keating  
+
+	PR 8180
+	* configure.in: When testing with_libs and with_headers, treat
+	'no' as unset.  Based on a patch by Dan Kegel .
+	* configure: Regenerate.
+	
+	* configure.in (TOPLEVEL_CONFIGURE_ARGUMENTS): Quote properly for
+	make, shell, etc.
+	(baseargs): Likewise.
+	* configure: Regenerate.
+
+2003-08-19  Geoffrey Keating  
+
+	* configure.in: Disable libgcj for darwin not on powerpc.
+	* configure: Rebuild.
+
+2003-08-15  Michael Chastain  
+
+	* src-release (do-proto-toplev): Remove junk files
+	dejagnu/example/calc/config.status,
+	dejagnu/example/calc/config.log.
+
+2003-08-14  Alexandre Duret-Lutz  
+
+	* config-ml.in, symlink-tree: Add license.
+
+2003-08-01  Nathanael Nerode  
+
+	Merge from gcc:
+
+	2003-08-01  Matt Kraai  
+	* Makefile.tpl (check, check-c++): Express dependencies using
+	dependencies rather than commands.
+	* Makefile.in: Regenerate.
+
+	2003-07-31  Geoffrey Keating  
+	* Makefile.tpl (libsubdir): Use gcc instead of gcc-lib.
+	* Makefile.in: Update.
+
+2003-08-01  Andrew Cagney  
+
+	* configure.in (noconfigdirs): Do not add GDB when m32r-*-*.
+	* configure: Ditto.
+
+2003-07-30  Andreas Tobler  
+
+	* configure.in: Enable libgcj for darwin.
+	* configure: Rebuild.
+
+2003-07-29  Nathanael Nerode  
+
+	* mkinstalldirs: Import autoconf 2.57 / automake 1.7 version.
+
+2003-07-27  Nathanael Nerode  
+
+	* Makefile.tpl: Use 'mkinstalldirs' rather than 'mkdir' when
+	creating target and build subdirs to build all parent dirs as needed.
+	* Makefile.in: Rebuild.
+	* configure.in: Don't build dirs explicitly here.
+	* configure: Rebuild.
+
+2003-07-22  Alexandre Oliva  
+
+	* Makefile.tpl (all-make): Depend on intl.
+	* Makefile.in: Rebuilt.
+
+2003-07-16  Nathanael Nerode  
+
+	* config.if: Remove unused libc_interface determination.
+
+2003-07-14  Nathanael Nerode  
+
+	* Makefile.in: Regenerate, correctly this time.
+
+2003-07-13  Nathanael Nerode  
+
+	* Makefile.tpl: Set INSTALL and friends using autoconf.  Remove
+	unused INSTALL_PROGRAM_ARGS.
+	* configure.in: Use AC_PROG_INSTALL.
+	* Makefile.in: Regenerate.
+	* configure: Regenerate.
+
+2003-07-10  Alexandre Oliva  
+
+	* configure: Rebuilt.
+	2001-09-26  Alexandre Oliva  
+	* configure.in (noconfigdirs) [am33_2.0-*-linux*]: Don't build
+	newlib nor libgloss.
+	Wed May  9 10:07:19 2001  Alexandre Oliva  
+	* configure.in (am33_2.0-*-linux*): Added.
+
+2003-07-09  Bob Wilson  
+
+	* configure.in: Add ${libgcj} to noconfigdirs for xtensa-*-* targets.
+	* configure: Regenerate.
+
+2003-07-06  H.J. Lu 
+
+	* config-ml.in: Replace PWD with PWD_COMMAND.
+	* Makefile.tpl: Likewise.
+	* Makefile.in: Regenerated.
+
+2003-06-27  Nathanael Nerode  
+
+	* configure.in: Clean up config-lang.in handling.  Delete
+	useless assignment to "subdirs".
+	* configure: Regenerate.
+
+2003-06-26  Nathanael Nerode  
+
+	* configure.in: Rename 'target_libs' to 'target_libraries'.
+	Remove useless reference to 'target_libs'.
+	* configure: Regenerate.
+
+2003-06-23  Keith Seitz  
+
+	* Makefile.tpl: Add maybe-configure-itcl to configure-gdb.
+	* Makefile.in: Regenerate.
+
+2003-06-23  Nathanael Nerode  
+
+	* Makefile.def: Introduce flags_to_pass.
+	* Makefile.tpl: Generate BASE_FLAGS_TO_PASS using it.
+	* Makefile.in: Regenerate.
+
+2003-06-23  Hans-Peter Nilsson  
+
+	* configure.in (noconfigdirs) : Disable target-newlib
+	and target-libgloss.
+	: Disable gdb.
+	: Disable libf2c and ${libgcj}.
+	* configure: Regenerate.
+
+2003-06-17  Benjamin Kosnik  
+
+	* configure.in: Update testsuite_flags to new location.
+	* configure. Regenerate.
+	
+2003-06-18  Nathanael Nerode  
+
+	* Makefile.tpl: Remove BUILD_CC stuff.
+	* Makefile.in: Regenerate.
+
+2003-06-14  H.J. Lu 
+ 
+	* config.guess: Update to 2003-06-12 version.
+	* config.sub: Update to 2003-06-13 version.
+
+2003-06-12  Thiemo Seufer 
+
+	* MAINTAINERS: Add myself as MIPS co-maintainer.
+
+2003-06-12  H.J. Lu 
+ 
+	* config.guess: Update to 2003-06-06 version.
+	* config.sub: Update to 2003-06-06 version.
+
+2003-06-11  Rainer Orth  
+
+	* configure.in: Don't pass --with-stabs for mips*-sgi-irix6*o32.
+	* configure. Regenerate.
+
+2003-06-10  Nathanael Nerode  
+
+	* configure.in: Disable serial configure by default.
+	* configure: Regenerate.
+	* Makefile.tpl: Abolish .NOTPARALLEL.
+	* Makefile.in: Regenerate.
+
+	* Makefile.tpl: Replace {build,host,target}_canonical by
+	{build,host,target}.
+	* Makefile.in: Regenerate.
+
+	* Makefile.tpl: Fix stupid pasto.
+	* Makefile.in: Regenerate.
+
+2003-06-09  Nathanael Nerode  
+
+	* Makefile.tpl: Remove bogus conditional.
+	* Makefile.in: Regenerate.
+
+2003-06-03  Nathanael Nerode  
+
+	* Makefile.tpl: Make 'recursive targets' using autogen rather
+	than shell loop.  Remove duplicate 'clean' targets and false
+	comments.
+	* Makefile.def: Add systematic dependencies to 'recursive' targets.
+	Add systematic method of specifying missing targets in subdirs.
+	Add copyright boilerplate.
+	* Makefile.in: Regenerate.
+	* configure.in: Add 'recursive targets' to maybe list.
+	* configure: Regenerate.
+
+	* Makefile.tpl: Rename [+target+] to [+make_target+].
+	* Makefile.def: Rename 'target' to 'make_target'.
+
+2003-05-30  Nick Clifton  
+
+	* README-maintainer-mode: Update URL for locating blessed config
+	tools.
+
+2003-05-29  Robert Millan  
+
+	* ltconfig: Import this patch and modify for use with current
+	version of ltconfig:
+
+	2003-05-21  Bruno Haible  
+
+	* libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER): Add support for
+	GNU/FreeBSD.
+
+2003-05-28  DJ Delorie  
+
+	* Makefile.tpl: Make maybe-check-gcc .PHONY.
+	* Makefile.in: Regenerate.
+
+2003-05-28  Jeff Johnston  
+
+        * COPYING.NEWLIB: Add license info for newlib/libc/sys/linux/stdlib.
+
+2003-05-21  DJ Delorie  
+	
+	* Makefile.tpl (configure-target-libiberty): Depend only on gcc, not
+	newlib or libgloss.
+	* Makefile.in: Regenerate.
+
+2003-05-21  DJ Delorie  
+
+	* Makefile.tpl: Add missing empty maybe-check-gcc target.
+	* Makefile.in: Regenerate.
+
+2003-05-20  Maciej W. Rozycki  
+
+	* configure.in: Use curly braces in the definition of tooldir.
+	* configure: Regenerate.
+
+2003-05-19  Nathanael Nerode  
+
+	* configure.in: Switch more things to use maybe dependencies.
+	* Makefile.tpl: Switch more things to use maybe dependencies.  
+	Factor out common code from autogen IF statements.
+	* configure: Regenerate.
+	* Makefile.in: Regenerate.
+
+2003-05-14  Kelley Cook  
+
+	* configure.in: Accept i[3456789]86 for machine type.
+	* configure: Regenerate.
+
+2003-05-18  Nathanael Nerode  
+
+	* configure.in: Switch more things to use maybe dependencies.
+	Rearrange a little.  Use GCC_TOPLEV_SUBDIRS.
+	* configure: Regenerate.
+	* Makefile.tpl: Switch more things to use maybe dependencies.
+	* Makefile.in: Regenerate.
+
+2003-05-16  Andreas Schwab  
+
+	* Makefile.tpl (install-opcodes): Define.
+	* Makefile.in: Rebuild.
+
+2003-05-13  Andreas Jaeger  
+
+	* config.guess: Update to 2003-05-09 version.
+	* config.sub: Update to 2003-05-09 version.
+
+2003-05-13  Michael Eager 
+
+	* configure.in: Correct sed script so that options in quotes are not
+	deleted.
+	* configure: Rebuild.
+
+2003-05-12  Corinna Vinschen  
+
+	* configure.in (FLAGS_FOR_TARGET): Remove $$s/newlib/libc/sys/cygwin
+	and $$s/newlib/libc/sys/cygwin32 include paths.
+	* configure: Ditto.
+
+2003-05-05  H.J. Lu 
+
+	* config-ml.in: Restored from gcc repository.
+
+2003-05-02  Chris Demetriou  
+
+        * Makefile.tpl: Require "makeinfo" from texinfo 4.2 or later.
+        * Makefile.in: Regenerate.
+
+2003-04-27  Daniel Jacobowitz  
+
+	* src-release (DEVO_SUPPORT): Add src-release, Makefile.tpl,
+	and Makefile.def.
+
+2003-04-27  Daniel Jacobowitz  
+
+	* Makefile.tpl: Clean $(BUILD_SUBDIR).
+	* Makefile.in: Regenerated.
+
+2003-04-18  Gerald Pfeifer  
+
+	* Makefile.tpl (MAKEINFOFLAGS): Default to --split-size=5000000.
+	* Makefile.in: Regenerate.
+
+2003-04-18  Jakub Jelinek  
+
+	* configure.in (powerpc64*-*-linux*): Remove.
+	* configure: Rebuilt.
+
+2003-04-17  Phil Edwards  
+
+	* Makefile.tpl (GCC_STRAP_TARGETS):  New variable containing all the
+	previous bootstrap targets, plus bubblestrap, quickstrap, cleanstrap,
+	and restrap.
+	* Makefile.in:  Regenerate.
+
+2003-04-16  Richard Earnshaw  
+
+	* configure.in (arm-*-netbsdelf*): Enable building java libraries.
+	* configure: Regenerated.
+
+2003-04-11  Alexandre Oliva  
+
+	* libtool.m4 (lt_cv_deplibs_check_method): Use pass_all on mips*.
+	* */configure: Rebuilt.
+
+2003-03-14  Nathanael Nerode  
+
+	* Makefile.tpl: Move .NOEXPORT, MAKEOVERRIDES back down.
+	* Makefile.in: Regenerate.
+
+2003-03-14  Michael Chastain  
+
+	* Makefile.in: Regenerate with correct Makefile.def.
+
+2003-03-12  Nathanael Nerode  
+
+	* Makefile.tpl: Move .NOEXPORT, MAKEOVERRIDES up.  Delete unused
+	Make macro.
+	* Makefile.in: Regenerate.
+	* configure.in: Clean up gxx_include_dir logic.
+	* configure: Regenerate.
+
+2003-03-09  Franz Sirl  
+
+	* configure.in (gxx_include_dir): Fix typo.
+	* configure: Regenerated.
+
+2003-03-06  Andrew Cagney  
+
+	* texinfo/texinfo.tex: Import version 2003-02-03.16.
+
+2003-03-04  Daniel Jacobowitz  
+
+	* configure.in: Include $(build_tooldir)/sys-include in
+	FLAGS_FOR_TARGET.
+	* configure: Regenerated.
+
+2003-03-04  Nathanael Nerode  
+
+	* Makefile.tpl: Reindent.
+	* Makefile.in: Regenerate.
+	* configure.in: Reindent.  Don't set unused variables.
+	* configure: Regenerate.
+
+	* Makefile.tpl: Always pass down RANLIB.
+	* Makefile.in: Regenerate.
+
+	* Makefile.tpl: Don't set unused enable_shared, enable_threads macros.
+	* Makefile.in: Regenerate.
+	* configure.in: Remove unused logic relating to --enable-shared
+	and --enable-threads.  Remove bogus comments.  Remove redundant
+	noconfigdirs.
+	* configure: Regenerate.
+
+	* configure.in: Replace ${libstdcxx_version} by its value.
+	Remove reference to mh-dgux.
+	* configure: Regenerate.
+
+2003-02-28  Nathanael Nerode  
+
+	* Makefile.tpl: Rearrange.
+	* Makefile.in: Regenerate.
+
+2003-02-25  Nick Clifton  
+
+	* configure: Remove site-file supprot - it is obsolete.
+
+2003-02-24  Uwe Stieber 
+
+	* configure.in: Add support for kaOS as cross build target system.
+	* configure: Regenerated.
+
+2003-02-20  Sean McNeil  
+
+	* Makefile.tpl: Add definition of CPPFLAGS to pass into
+	configure-target-* as some target builds may require additional
+	flags for preprocessor tests.
+	* Makefile.in: Regenerated.
+
+2003-02-19  Alexandre Oliva  
+
+	* libtool.m4 (LD): Append -melf* option to LD on IRIX with GNU ld.
+	* ltconfig: Handle it.
+	* ltcf-cxx.sh: Use with_gnu_ld passed as a shell variable instead of
+	auto-detecting it.
+
+2003-02-19  Alexandre Oliva  
+
+	* ltcf-cxx.sh: Replace $linker_flags with $compiler_flags wherever
+	it is used as argument to $CC.
+	* ltcf-gcj.sh: Likewise.
+
+2003-02-19  Alexandre Oliva  
+
+	* configure.in: Introduce --enable-maintainer-mode.
+	* configure: Rebuilt.
+	* Makefile.tpl (Makefile.in, configure): Enable dependencies only
+	for maintainer mode.
+	* Makefile.in: Rebuilt.
+
+2003-02-19  Andrew Cagney 
+
+	* configure: Regenerate using autoconf 2.13.
+
+2003-02-19  Alan Modra  
+
+	* config.guess: Import latest version.
+	* config.sub: Import latest version.
+
+2003-02-18  Jason Merrill  
+
+	* Makefile.tpl (check-c++): Allow parallelism.
+
+2003-02-17  Andrew Cagney  
+
+	* configure: Regenerate using autoconf 000227.
+
+2003-02-15  Geoffrey Keating  
+
+	* configure.in (*-*-darwin*): Rename from powerpc*-*-darwin*,
+	don't configure target-libobjc.
+	* configure: Regenerate.
+
+2003-02-14  Rainer Orth  
+
+	* Makefile.tpl (RANLIB): Define.
+	* Makefile.in: Regenerate.
+
+2003-02-06  Keith R Seitz  
+
+	* Makefile.def: Remove "snavigator", "grep", and "db" modules.
+	* Makefile.tpl: Remove "all-snavigator" and "all-grep".
+	* Makefile.in: Regenerated.
+	* configure.in: Remove all traces of snavigator, db, and grep.
+	* configure: Regenerated.
+
+2003-01-31  Frank Ch. Eigler  
+
+	* Makefile.tpl (all-sid): Add libiberty/bfd/opcodes dependencies.
+	* Makefile.in: Regenerated.
+
+2003-01-30  Alexandre Oliva  
+
+	* config.if: Copy from GCC.
+
+2003-01-27  Phil Edwards  
+
+	* configure.in:  Revert 24Jan change.
+	* configure:  Regenerate.
+
+2003-01-23  Nathanael Nerode  
+
+	* configure.in: Revert previous change.
+	* configure: Regenerate.
+
+2003-01-23  Nathanael Nerode  
+
+	* configure.in: Make rda native-only.
+	* configure: Regenerate.
+
+2003-01-19  Nathanael Nerode  
+
+	* configure.in: Add missing \.
+	* configure: Rebuilt.
+
+2003-01-17  Jakub Jelinek  
+
+	* configure.in (baseargs): Avoid using \| in sed regular
+	expressions.
+	* configure: Rebuilt.
+
+2003-01-16  Jakub Jelinek  
+
+	* configure.in (baseargs): Remove all supported forms of
+	--cache-file, --srcdir, --host, --build and --target options
+	from argument lists.
+	* configure: Rebuilt.
+
+2003-01-15  Alexandre Oliva  
+
+	* configure.in (noconfigdirs): Don't skip gas on IRIX 6.
+	* configure: Rebuilt.
+
+2003-01-09  Nathanael Nerode  
+
+	* configure.in: Substitute TOPLEVEL_CONFIGURE_ARGUMENTS.
+	* Makefile.tpl: Pass TOPLEVEL_CONFIGURE_ARGUMENTS to gcc.
+	* Makefile.in: Regenerate.
+	* configure: Regenerate.
+
+2003-01-09  Christian Cornelssen  
+
+	* Makefile.tpl (BASE_FLAGS_TO_PASS): Also pass DESTDIR.
+	(install-info, dir.info): Prepend $(DESTDIR) to $(infodir).
+	* Makefile.in: Regenerate.
+
+2003-01-09  Alexandre Oliva  
+
+	* configure.in: Remove Makefile in build, host and target modules
+	unless configure was run with --no-recursion.
+	* configure: Rebuilt.
+
+2003-01-08  Chris Demetriou  
+
+	* config.guess: Update to 2003-01-03 version.
+	* config.sub: Update to 2003-01-03 version.
+
+2003-01-07  Christopher Faylor  
+
+	* configure: Regenerate with proper autoconf 2.13.
+
+2003-01-07  Christopher Faylor  
+
+        * configure.in: Add AC_PREREQ for consistency.
+        * configure: Regenerate.
+
+2003-01-06  Andrew Cagney  
+
+	* configure.in (GDB_TK): Add tcl directories conditional on
+	gdb/gdbtk directory being present.
+	* configure: Regenerate.
+
+2003-01-04 John David Anglin  
+
+	* configure.in (LD): Improve test for gcc.  Try to set LD to the ld used
+	by gcc if LD is not defined and we are not doing a Canadian Cross.
+	* configure: Rebuilt.
+
+2003-01-01  Daniel Jacobowitz  
+
+	* src-release (ETC_SUPPORT): Add fdl.texi and texi2pod.pl.
+
+2002-12-31  Tom Tromey  
+
+	* Makefile.in: Rebuilt.
+	* Makefile.def (target_modules) [libffi]: Allow installation.
+
+2002-12-31  Andreas Schwab  
+
+	* configure.in: Fix use of $program_transform_name.
+	* configure: Regenerated.
+
+2002-12-30  Daniel Jacobowitz  
+
+	* configure.in (baseargs): Don't remove first configure argument.
+	* configure: Regenerated.
+
+2002-12-29  Alexandre Oliva  
+
+	* Makefile.tpl (local-distclean): Don't remove...
+	(multilib.ts): ... this.  Moved into...
+	(multilib.out): ... this.  Don't use sub-make.
+	($(BUILD_SUBDIR)/[+module+]/Makefile, [+module+]/Makefile,
+	$(TARGET_SUBDIR)/[+module+]/Makefile, gcc/Makefile): Moved into...
+	(configure-build-[+module+], configure-[+module+],
+	configure-target-[+module+], configure-gcc): ... these.  Test
+	for Makefile existence.  Drop config.status from dependencies.
+	* Makefile.in: Rebuilt.
+	* configure.in: Move gcc-version-trigger to the end of
+	ac_configure_args.  Add comments to maybedep.tmp and
+	serdep.tmp.  Introduce --disable-serial-configure.  Remove
+	nonopt from baseargs, matching and removing corresponding
+	whitespace while at it.
+	* configure: Rebuilt.
+
+2002-12-28  Alexandre Oliva  
+
+	* configure.in (host_configargs): Replace reference to
+	no-longer-defined buildopts with --build=${build_alias}.
+	* configure: Rebuilt.
+
+2002-12-28  Alexandre Oliva  
+
+	* Makefile.tpl ($(NOTPARALLEL)): Move to the end.  Bring uses of
+	program_transform_name to standard idiom.
+	(AUTOGEN, AUTOCONF): Define.
+	(Makefile.in): Use $(AUTOGEN).
+	(Makefile): Depend on config.status, and use autoconf-style rule to
+	build it.  Move original commands to...
+	(config.status): ... this new target.
+	(configure): Add $(srcdir).  Depend on config/acx.m4.  Use
+	$(AUTOCONF).
+	* Makefile.in: Rebuilt.
+
+2002-12-28  Nathanael Nerode  
+
+	* Makefile.tpl: Fix dramatic bustage due to change in
+	program_transform_name.
+	* Makefile.in: Regenerate.
+
+	* configure.in: Remove unnecessary PATH setting.
+	* configure: Regnerate.
+
+	* configure.in: Don't default to unprefixed tools unless
+	the native tools will work.
+	* configure: Regenerate.
+
+	* configure.in: Convert to autoconf script.  Blow away lots
+	of now-redundant Makefile fragments.
+	* configure: Generate using Autoconf.
+	* Makefile.tpl: Rewrite to reflect autoconfiscation.
+	* Makefile.in: Regenerate.
+
+2002-12-27  Nathanael Nerode  
+
+	* configure: Remove unneeded 'export's.  Make CC_FOR_TARGET,
+	CXX_FOR_TARGET, GCJ_FOR_TARGET substituted in configure.in only.
+
+	* ChangeLog: Move a couple of entries from here to winsup/cygwin,
+	where they belong.
+
+2002-12-24  Andreas Schwab  
+
+	* Makefile.tpl (multilib.out): Fix missing space.
+	* Makefile.in: Regenerate.
+
+2002-12-23  Nathanael Nerode  
+
+	* Makefile.tpl: Use shared multilib.out.  Use move-if-change for it.
+	Convert (cd foo; make) to (cd foo && make).  Clean up multilib.out.
+	* Makefile.in: Regenerate.
+	* configure.in: Remove unnecessary leftovers.
+
+2002-12-21  Geoffrey Keating  
+
+	* configure.in (extra_ranlibflags_for_target): New variable.
+	(*-*-darwin): Add -c to ranlib commands.
+	* configure (tooldir): Handle extra_ranlibflags_for_target.
+
+2002-12-20  Jeff Johnston  
+
+	* COPYING.NEWLIB: Updated.
+	* COPYING.LIBGLOSS: Ditto.
+
+2002-12-19  Nathanael Nerode  
+
+	* Makefile.tpl: Revert HJL's change.
+	* Makefile.in: Regenerated.
+	* configure.in: Put build_prefix before $(BUILD_SUBDIR) here, and
+	always.
+
+2002-12-19  Andreas Schwab  
+
+	* Makefile.tpl, configure.in: Substitute libstdcxx_incdir.
+	* Makefile.in: Regenerate.
+
+2002-12-18  H.J. Lu 
+
+	* Makefile.tpl: Add @build_prefix@ before $(BUILD_SUBDIR).
+	* Makefile.in: Regenerated.
+
+	* configure.in (build_prefix): New. Substitute.
+
+2002-12-18  Nathanael Nerode  
+
+	* Makefile.tpl: Don't let real targets depend on phony targets.
+	* Makefile.in: Regenerate.
+
+	* Makefile.tpl (do-info): Depend on maybe-all-texinfo, not all-texinfo.
+	* Makefile.in: Regenerate.
+
+2002-12-16  Jason Merrill  
+
+	* Makefile.tpl (all-gcc): Use 'make quickstrap' if there was a
+	previous 'make bootstrap'.
+	* Makefile.in: Regenerate.
+
+2002-12-17  Hans-Peter Nilsson  
+
+	* configure.in (noconfigdirs) [mmix-*-*]: Disable libgloss and gdb.
+
+2002-12-13  Jason Merrill  
+
+	* Makefile.tpl (check-gcc-c++): Renamed from check-c++.  Don't run
+	library tests.
+	(check-c++): Just depend on it and check-target-libstdc++-v3.
+	* Makefile.in: Regenerate.
+
+2002-12-13  Nathanael Nerode  
+
+	* configure.in, Makefile.tpl, Makefile.def: Remove tclX.
+	* Makefile.in: Regenerate.
+
+2002-12-12  Jeff Johnston  
+
+        * COPYING.NEWLIB: Update list of alternate Regent of California
+        licenses and discuss official revoking of advertising clause.
+        * COPYING.LIBGLOSS: Ditto.
+
+2002-12-12  Alexandre Oliva  
+
+	* Makefile.tpl (configure-target-rda): Depend on $(ALL_GCC_C).
+	* Makefile.in: Rebuilt.
+
+2002-12-10  Nathanael Nerode  
+
+	* configure: Fix bug put in by gremlins.
+
+	* Makefile.tpl: Substitute more autoconfily.
+	* configure: Substitute more autoconfily.
+	* Makefile.in: Regenerate.
+
+2002-12-08  Andrew Cagney  
+
+	* Makefile.tpl (all-sim): Depend on maybe-configure-gdb.
+	* Makefile.in (all-sim): Ditto.
+
+2002-12-06  DJ Delorie  
+
+	* Makefile.tpl: Change configure dependencies to not have real
+	targets depend on phony targets.
+
+2002-12-05  Nathanael Nerode  
+
+	* configure.in: Revert unintentional change.
+
+	* src-release: Configure host subdirs.
+
+	* Makefile.tpl: Change dependency for */multilib.out so that
+	it works when gcc isn't in the tree.
+
+	* configure.in: Substitute more.
+	* configure: Run subconfigures from the Makefile.
+	* Makefile.tpl: Run subconfigures from the Makefile; add a few

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 05:08:59 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1A0B41065674;
	Wed,  6 May 2009 05:08:59 +0000 (UTC)
	(envelope-from obrien@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E27C98FC1A;
	Wed,  6 May 2009 05:08:58 +0000 (UTC)
	(envelope-from obrien@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4658wMW005088;
	Wed, 6 May 2009 05:08:58 GMT (envelope-from obrien@svn.freebsd.org)
Received: (from obrien@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4658wB0005087;
	Wed, 6 May 2009 05:08:58 GMT (envelope-from obrien@svn.freebsd.org)
Message-Id: <200905060508.n4658wB0005087@svn.freebsd.org>
From: "David E. O'Brien" 
Date: Wed, 6 May 2009 05:08:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191844 - vendor/binutils/dist/x
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 05:08:59 -0000

Author: obrien
Date: Wed May  6 05:08:58 2009
New Revision: 191844
URL: http://svn.freebsd.org/changeset/base/191844

Log:
  Cleanup.

Deleted:
  vendor/binutils/dist/x/

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 08:49:39 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E58BB106566C;
	Wed,  6 May 2009 08:49:39 +0000 (UTC) (envelope-from zec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D49958FC15;
	Wed,  6 May 2009 08:49:39 +0000 (UTC) (envelope-from zec@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n468nd5B011325;
	Wed, 6 May 2009 08:49:39 GMT (envelope-from zec@svn.freebsd.org)
Received: (from zec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n468ndKs011322;
	Wed, 6 May 2009 08:49:39 GMT (envelope-from zec@svn.freebsd.org)
Message-Id: <200905060849.n468ndKs011322@svn.freebsd.org>
From: Marko Zec 
Date: Wed, 6 May 2009 08:49:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191845 - in head/sys: netinet sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 08:49:40 -0000

Author: zec
Date: Wed May  6 08:49:39 2009
New Revision: 191845
URL: http://svn.freebsd.org/changeset/base/191845

Log:
  Unbreak options VIMAGE kernel builds.
  
  Approved by:	julian (mentor)

Modified:
  head/sys/netinet/sctp_crc32.c
  head/sys/netinet/sctp_os_bsd.h
  head/sys/sys/vimage.h

Modified: head/sys/netinet/sctp_crc32.c
==============================================================================
--- head/sys/netinet/sctp_crc32.c	Wed May  6 05:08:58 2009	(r191844)
+++ head/sys/netinet/sctp_crc32.c	Wed May  6 08:49:39 2009	(r191845)
@@ -34,16 +34,11 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-#include 
-#include 
-#include 
-#include 
-#include 
+#include 
 #include 
 #include 
 #include 
 
-
 #if !defined(SCTP_WITH_NO_CSUM)
 
 static uint32_t

Modified: head/sys/netinet/sctp_os_bsd.h
==============================================================================
--- head/sys/netinet/sctp_os_bsd.h	Wed May  6 05:08:58 2009	(r191844)
+++ head/sys/netinet/sctp_os_bsd.h	Wed May  6 08:49:39 2009	(r191845)
@@ -84,6 +84,7 @@ __FBSDID("$FreeBSD$");
 #ifdef IPSEC
 #include 
 #include 
+#include 
 #endif				/* IPSEC */
 
 #ifdef INET6

Modified: head/sys/sys/vimage.h
==============================================================================
--- head/sys/sys/vimage.h	Wed May  6 05:08:58 2009	(r191844)
+++ head/sys/sys/vimage.h	Wed May  6 08:49:39 2009	(r191845)
@@ -33,6 +33,7 @@
 #ifndef	_SYS_VIMAGE_H_
 #define	_SYS_VIMAGE_H_
 
+#include 
 #include 
 
 #if defined(VIMAGE) && defined(VIMAGE_GLOBALS)

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 09:31:56 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BAB701065677;
	Wed,  6 May 2009 09:31:56 +0000 (UTC) (envelope-from zec@freebsd.org)
Received: from xaqua.tel.fer.hr (xaqua.tel.fer.hr [161.53.19.25])
	by mx1.freebsd.org (Postfix) with ESMTP id 747B38FC0A;
	Wed,  6 May 2009 09:31:56 +0000 (UTC) (envelope-from zec@freebsd.org)
Received: by xaqua.tel.fer.hr (Postfix, from userid 20006)
	id 196199B648; Wed,  6 May 2009 11:05:39 +0200 (CEST)
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on xaqua.tel.fer.hr
X-Spam-Level: 
X-Spam-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham 
	version=3.1.7
Received: from localhost (imunes.tel.fer.hr [161.53.19.8])
	by xaqua.tel.fer.hr (Postfix) with ESMTP id CDF609B64A;
	Wed,  6 May 2009 11:05:16 +0200 (CEST)
From: Marko Zec 
To: Alexander Leidinger 
Date: Wed, 6 May 2009 05:05:11 -0400
User-Agent: KMail/1.9.10
References: <200905051056.n45AuCho079307@svn.freebsd.org>
	<20090505163352.810118qlbvxymfkg@webmail.leidinger.net>
In-Reply-To: <20090505163352.810118qlbvxymfkg@webmail.leidinger.net>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200905060505.11598.zec@freebsd.org>
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r191816 - in head/sys: conf dev/cxgb/ulp/tom kern
	net net80211 netgraph netinet netinet6 netipsec nfsclient sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 09:31:57 -0000

On Tuesday 05 May 2009 10:33:52 Alexander Leidinger wrote:
> Quoting Marko Zec  (from Tue, 5 May 2009 10:56:12
>
> +0000 (UTC)):
> >   The exact placement of the CURVNET_SET() / CURVNET_RESTORE() macros
> >   was a result of an empirical iterative process,
>
> Was the linuxulator taken into account in this process?

Hmm I have no simple answer to that and similar questions, so:

- this change has no effect on nooptions VIMAGE builds whatsoever, including 
linuxulator;

- with options VIMAGE enabled, linuxulator builds fine and kldloads as well;

- on few occasions in 2008. I ran linux binaries (firefox I think, in hope to 
get flash working) on VIMAGE kernels from p4/vimage branch, and they had no 
trouble communicating over network sockets;

- I don't run linux binaries these days on -CURRENT, hence do not know whether 
any issues would be observable with linuxulator and options VIMAGE kernels;

- there are _many_ kernel subsystems that yet have to be made compatible with 
options VIMAGE, so I'd join Julian in his call to encourage people to start 
playing with VIMAGE kernels and report back any issues or suspicious 
behavior.

Cheers,

Marko

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 13:30:46 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B9ECC106566C;
	Wed,  6 May 2009 13:30:46 +0000 (UTC) (envelope-from zec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A750F8FC13;
	Wed,  6 May 2009 13:30:46 +0000 (UTC) (envelope-from zec@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n46DUkNd018837;
	Wed, 6 May 2009 13:30:46 GMT (envelope-from zec@svn.freebsd.org)
Received: (from zec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n46DUkv4018835;
	Wed, 6 May 2009 13:30:46 GMT (envelope-from zec@svn.freebsd.org)
Message-Id: <200905061330.n46DUkv4018835@svn.freebsd.org>
From: Marko Zec 
Date: Wed, 6 May 2009 13:30:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191846 - in head/sys: netinet netinet6
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 13:30:47 -0000

Author: zec
Date: Wed May  6 13:30:46 2009
New Revision: 191846
URL: http://svn.freebsd.org/changeset/base/191846

Log:
  Remove unnecessary CURVNET_SET() calls where curvnet context is
  (i.e. seems to be) already set.
  
  This should reduce console noise due to curvnet recursion reports.
  
  This change has no impact on nooptions VIMAGE builds.
  Approved by:	julian (mentor)

Modified:
  head/sys/netinet/igmp.c
  head/sys/netinet6/mld6.c

Modified: head/sys/netinet/igmp.c
==============================================================================
--- head/sys/netinet/igmp.c	Wed May  6 08:49:39 2009	(r191845)
+++ head/sys/netinet/igmp.c	Wed May  6 13:30:46 2009	(r191846)
@@ -528,9 +528,6 @@ igmp_ra_alloc(void)
 
 /*
  * Attach IGMP when PF_INET is attached to an interface.
- *
- * VIMAGE: Currently we set the vnet pointer, although it is
- * likely that it was already set by our caller.
  */
 struct igmp_ifinfo *
 igmp_domifattach(struct ifnet *ifp)
@@ -540,7 +537,6 @@ igmp_domifattach(struct ifnet *ifp)
 	CTR3(KTR_IGMPV3, "%s: called for ifp %p(%s)",
 	    __func__, ifp, ifp->if_xname);
 
-	CURVNET_SET(ifp->if_vnet);
 	IGMP_LOCK();
 
 	igi = igi_alloc_locked(ifp);
@@ -548,7 +544,6 @@ igmp_domifattach(struct ifnet *ifp)
 		igi->igi_flags |= IGIF_SILENT;
 
 	IGMP_UNLOCK();
-	CURVNET_RESTORE();
 
 	return (igi);
 }
@@ -600,9 +595,6 @@ out:
  *
  * SMPNG: igmp_ifdetach() needs to take IF_ADDR_LOCK().
  * XXX This is also bitten by unlocked ifma_protospec access.
- *
- * VIMAGE: curvnet should have been set by caller, but let's not assume
- * that for now.
  */
 void
 igmp_ifdetach(struct ifnet *ifp)
@@ -614,8 +606,6 @@ igmp_ifdetach(struct ifnet *ifp)
 	CTR3(KTR_IGMPV3, "%s: called for ifp %p(%s)", __func__, ifp,
 	    ifp->if_xname);
 
-	CURVNET_SET(ifp->if_vnet);
-
 	IGMP_LOCK();
 
 	igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp;
@@ -648,15 +638,10 @@ igmp_ifdetach(struct ifnet *ifp)
 	}
 
 	IGMP_UNLOCK();
-
-	CURVNET_RESTORE();
 }
 
 /*
  * Hook for domifdetach.
- *
- * VIMAGE: curvnet should have been set by caller, but let's not assume
- * that for now.
  */
 void
 igmp_domifdetach(struct ifnet *ifp)
@@ -666,14 +651,12 @@ igmp_domifdetach(struct ifnet *ifp)
 	CTR3(KTR_IGMPV3, "%s: called for ifp %p(%s)",
 	    __func__, ifp, ifp->if_xname);
 
-	CURVNET_SET(ifp->if_vnet);
 	IGMP_LOCK();
 
 	igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp;
 	igi_delete_locked(ifp);
 
 	IGMP_UNLOCK();
-	CURVNET_RESTORE();
 }
 
 static void

Modified: head/sys/netinet6/mld6.c
==============================================================================
--- head/sys/netinet6/mld6.c	Wed May  6 08:49:39 2009	(r191845)
+++ head/sys/netinet6/mld6.c	Wed May  6 13:30:46 2009	(r191846)
@@ -292,12 +292,10 @@ static __inline uint32_t
 mld_restore_context(struct mbuf *m)
 {
 
-#ifdef notyet
 #if defined(VIMAGE) && defined(INVARIANTS)
-	KASSERT(curvnet == (m->m_pkthdr.header),
+	KASSERT(curvnet == m->m_pkthdr.header,
 	    ("%s: called when curvnet was not restored", __func__));
 #endif
-#endif
 	return (m->m_pkthdr.flowid);
 }
 
@@ -455,8 +453,6 @@ mld_is_addr_reported(const struct in6_ad
  * Attach MLD when PF_INET6 is attached to an interface.
  *
  * SMPng: Normally called with IF_AFDATA_LOCK held.
- * VIMAGE: Currently we set the vnet pointer, although it is
- * likely that it was already set by our caller.
  */
 struct mld_ifinfo *
 mld_domifattach(struct ifnet *ifp)
@@ -466,7 +462,6 @@ mld_domifattach(struct ifnet *ifp)
 	CTR3(KTR_MLD, "%s: called for ifp %p(%s)",
 	    __func__, ifp, ifp->if_xname);
 
-	CURVNET_SET(ifp->if_vnet);
 	MLD_LOCK();
 
 	mli = mli_alloc_locked(ifp);
@@ -474,7 +469,6 @@ mld_domifattach(struct ifnet *ifp)
 		mli->mli_flags |= MLIF_SILENT;
 
 	MLD_UNLOCK();
-	CURVNET_RESTORE();
 
 	return (mli);
 }
@@ -528,9 +522,6 @@ out:
  * SMPng: Caller must hold IN6_MULTI_LOCK().
  * Must take IF_ADDR_LOCK() to cover if_multiaddrs iterator.
  * XXX This routine is also bitten by unlocked ifma_protospec access.
- *
- * VIMAGE: curvnet should have been set by caller, but let's not assume
- * that for now.
  */
 void
 mld_ifdetach(struct ifnet *ifp)
@@ -542,8 +533,6 @@ mld_ifdetach(struct ifnet *ifp)
 	CTR3(KTR_MLD, "%s: called for ifp %p(%s)", __func__, ifp,
 	    ifp->if_xname);
 
-	CURVNET_SET(ifp->if_vnet);
-
 	IN6_MULTI_LOCK_ASSERT();
 	MLD_LOCK();
 
@@ -570,7 +559,6 @@ mld_ifdetach(struct ifnet *ifp)
 	}
 
 	MLD_UNLOCK();
-	CURVNET_RESTORE();
 }
 
 /*
@@ -578,8 +566,6 @@ mld_ifdetach(struct ifnet *ifp)
  * Runs after link-layer cleanup; free MLD state.
  *
  * SMPng: Normally called with IF_AFDATA_LOCK held.
- * VIMAGE: curvnet should have been set by caller, but let's not assume
- * that for now.
  */
 void
 mld_domifdetach(struct ifnet *ifp)
@@ -588,13 +574,9 @@ mld_domifdetach(struct ifnet *ifp)
 	CTR3(KTR_MLD, "%s: called for ifp %p(%s)",
 	    __func__, ifp, ifp->if_xname);
 
-	CURVNET_SET(ifp->if_vnet);
-
 	MLD_LOCK();
 	mli_delete_locked(ifp);
 	MLD_UNLOCK();
-
-	CURVNET_RESTORE();
 }
 
 static void

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 17:48:39 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 948181065674;
	Wed,  6 May 2009 17:48:39 +0000 (UTC) (envelope-from dfr@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 841CA8FC18;
	Wed,  6 May 2009 17:48:39 +0000 (UTC) (envelope-from dfr@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n46HmdIL024830;
	Wed, 6 May 2009 17:48:39 GMT (envelope-from dfr@svn.freebsd.org)
Received: (from dfr@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n46Hmdm9024829;
	Wed, 6 May 2009 17:48:39 GMT (envelope-from dfr@svn.freebsd.org)
Message-Id: <200905061748.n46Hmdm9024829@svn.freebsd.org>
From: Doug Rabson 
Date: Wed, 6 May 2009 17:48:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191847 - head/sys/amd64/include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 17:48:40 -0000

Author: dfr
Date: Wed May  6 17:48:39 2009
New Revision: 191847
URL: http://svn.freebsd.org/changeset/base/191847

Log:
  Fix XENHVM build.

Modified:
  head/sys/amd64/include/pcpu.h

Modified: head/sys/amd64/include/pcpu.h
==============================================================================
--- head/sys/amd64/include/pcpu.h	Wed May  6 13:30:46 2009	(r191846)
+++ head/sys/amd64/include/pcpu.h	Wed May  6 17:48:39 2009	(r191847)
@@ -75,7 +75,7 @@
 	/* Pointer to the CPU LDT descriptor */				\
 	struct system_segment_descriptor *pc_ldt;			\
 	/* Pointer to the CPU TSS descriptor */				\
-	struct system_segment_descriptor *pc_tss
+	struct system_segment_descriptor *pc_tss			\
 	PCPU_XEN_FIELDS
 
 #ifdef _KERNEL

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 17:52:38 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EBD721065670;
	Wed,  6 May 2009 17:52:38 +0000 (UTC) (envelope-from dfr@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DBD768FC1A;
	Wed,  6 May 2009 17:52:38 +0000 (UTC) (envelope-from dfr@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n46HqcTs024998;
	Wed, 6 May 2009 17:52:38 GMT (envelope-from dfr@svn.freebsd.org)
Received: (from dfr@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n46HqcHp024997;
	Wed, 6 May 2009 17:52:38 GMT (envelope-from dfr@svn.freebsd.org)
Message-Id: <200905061752.n46HqcHp024997@svn.freebsd.org>
From: Doug Rabson 
Date: Wed, 6 May 2009 17:52:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191848 - head/sys/amd64/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 17:52:39 -0000

Author: dfr
Date: Wed May  6 17:52:38 2009
New Revision: 191848
URL: http://svn.freebsd.org/changeset/base/191848

Log:
  Disable adaptive mutexes and rwlocks for XENHVM.

Modified:
  head/sys/amd64/conf/XENHVM

Modified: head/sys/amd64/conf/XENHVM
==============================================================================
--- head/sys/amd64/conf/XENHVM	Wed May  6 17:48:39 2009	(r191847)
+++ head/sys/amd64/conf/XENHVM	Wed May  6 17:52:38 2009	(r191848)
@@ -73,6 +73,8 @@ options  	HWPMC_HOOKS		# Necessary kerne
 options 	AUDIT			# Security event auditing
 #options 	KDTRACE_FRAME		# Ensure frames are compiled in
 #options 	KDTRACE_HOOKS		# Kernel DTrace hooks
+options		NO_ADAPTIVE_MUTEXES
+options		NO_ADAPTIVE_RWLOCKS
 
 # Debugging for use in -current
 options 	KDB			# Enable kernel debugger support.

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 18:21:49 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 220D01065673;
	Wed,  6 May 2009 18:21:49 +0000 (UTC)
	(envelope-from lulf@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0FCFA8FC20;
	Wed,  6 May 2009 18:21:49 +0000 (UTC)
	(envelope-from lulf@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n46ILmrY025832;
	Wed, 6 May 2009 18:21:48 GMT (envelope-from lulf@svn.freebsd.org)
Received: (from lulf@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n46ILmw8025827;
	Wed, 6 May 2009 18:21:48 GMT (envelope-from lulf@svn.freebsd.org)
Message-Id: <200905061821.n46ILmw8025827@svn.freebsd.org>
From: Ulf Lilleengen 
Date: Wed, 6 May 2009 18:21:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191849 - head/sys/geom/vinum
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 18:21:50 -0000

Author: lulf
Date: Wed May  6 18:21:48 2009
New Revision: 191849
URL: http://svn.freebsd.org/changeset/base/191849

Log:
  - Split the queue mutex into one for the event queue and one for the BIO queue,
    as they do not really relate and to prepare for an additional queue to be
    covered by the BIO queue mutex.
  - Implement wrappers for fetching the next element from the event queue as well
    as for putting a new element into the BIO queue.

Modified:
  head/sys/geom/vinum/geom_vinum.c
  head/sys/geom/vinum/geom_vinum.h
  head/sys/geom/vinum/geom_vinum_events.c
  head/sys/geom/vinum/geom_vinum_plex.c
  head/sys/geom/vinum/geom_vinum_var.h

Modified: head/sys/geom/vinum/geom_vinum.c
==============================================================================
--- head/sys/geom/vinum/geom_vinum.c	Wed May  6 17:52:38 2009	(r191848)
+++ head/sys/geom/vinum/geom_vinum.c	Wed May  6 18:21:48 2009	(r191849)
@@ -81,6 +81,17 @@ gv_orphan(struct g_consumer *cp)
 }
 
 void
+gv_post_bio(struct gv_softc *sc, struct bio *bp)
+{
+
+	KASSERT(sc != NULL, ("NULL sc"));
+	mtx_lock(&sc->bqueue_mtx);
+	bioq_disksort(sc->bqueue, bp);
+	wakeup(sc);
+	mtx_unlock(&sc->bqueue_mtx);
+}
+
+void
 gv_start(struct bio *bp)
 {
 	struct g_geom *gp;
@@ -100,10 +111,7 @@ gv_start(struct bio *bp)
 		return;
 	}
 
-	mtx_lock(&sc->queue_mtx);
-	bioq_disksort(sc->bqueue, bp);
-	wakeup(sc);
-	mtx_unlock(&sc->queue_mtx);
+	gv_post_bio(sc, bp);
 }
 
 void
@@ -118,10 +126,7 @@ gv_done(struct bio *bp)
 	sc = gp->softc;
 	bp->bio_cflags |= GV_BIO_DONE;
 
-	mtx_lock(&sc->queue_mtx);
-	bioq_disksort(sc->bqueue, bp);
-	wakeup(sc);
-	mtx_unlock(&sc->queue_mtx);
+	gv_post_bio(sc, bp);
 }
 
 int
@@ -181,7 +186,8 @@ gv_init(struct g_class *mp)
 	LIST_INIT(&sc->volumes);
 	TAILQ_INIT(&sc->equeue);
 	mtx_init(&sc->config_mtx, "gv_config", NULL, MTX_DEF);
-	mtx_init(&sc->queue_mtx, "gv_queue", NULL, MTX_DEF);
+	mtx_init(&sc->equeue_mtx, "gv_equeue", NULL, MTX_DEF);
+	mtx_init(&sc->bqueue_mtx, "gv_bqueue", NULL, MTX_DEF);
 	kproc_create(gv_worker, sc, NULL, 0, 0, "gv_worker");
 }
 
@@ -637,13 +643,11 @@ gv_worker(void *arg)
 
 	sc = arg;
 	KASSERT(sc != NULL, ("NULL sc"));
-	mtx_lock(&sc->queue_mtx);
 	for (;;) {
 		/* Look at the events first... */
-		ev = TAILQ_FIRST(&sc->equeue);
+		ev = gv_get_event(sc);
 		if (ev != NULL) {
-			TAILQ_REMOVE(&sc->equeue, ev, events);
-			mtx_unlock(&sc->queue_mtx);
+			gv_remove_event(sc, ev);
 
 			switch (ev->type) {
 			case GV_EVENT_DRIVE_TASTED:
@@ -959,9 +963,11 @@ gv_worker(void *arg)
 			case GV_EVENT_THREAD_EXIT:
 				G_VINUM_DEBUG(2, "event 'thread exit'");
 				g_free(ev);
-				mtx_lock(&sc->queue_mtx);
+				mtx_lock(&sc->equeue_mtx);
+				mtx_lock(&sc->bqueue_mtx);
 				gv_cleanup(sc);
-				mtx_destroy(&sc->queue_mtx);
+				mtx_destroy(&sc->bqueue_mtx);
+				mtx_destroy(&sc->equeue_mtx);
 				g_free(sc->bqueue);
 				g_free(sc);
 				kproc_exit(ENXIO);
@@ -972,18 +978,18 @@ gv_worker(void *arg)
 			}
 
 			g_free(ev);
-
-			mtx_lock(&sc->queue_mtx);
 			continue;
 		}
 
 		/* ... then do I/O processing. */
+		mtx_lock(&sc->bqueue_mtx);
 		bp = bioq_takefirst(sc->bqueue);
 		if (bp == NULL) {
-			msleep(sc, &sc->queue_mtx, PRIBIO, "-", hz/10);
+			msleep(sc, &sc->bqueue_mtx, PRIBIO, "-", hz/10);
+			mtx_unlock(&sc->bqueue_mtx);
 			continue;
 		}
-		mtx_unlock(&sc->queue_mtx);
+		mtx_unlock(&sc->bqueue_mtx);
 
 		/* A bio that is coming up from an underlying device. */
 		if (bp->bio_cflags & GV_BIO_DONE) {
@@ -1009,8 +1015,6 @@ gv_worker(void *arg)
 		} else {
 			gv_volume_start(sc, bp);
 		}
-
-		mtx_lock(&sc->queue_mtx);
 	}
 }
 

Modified: head/sys/geom/vinum/geom_vinum.h
==============================================================================
--- head/sys/geom/vinum/geom_vinum.h	Wed May  6 17:52:38 2009	(r191848)
+++ head/sys/geom/vinum/geom_vinum.h	Wed May  6 18:21:48 2009	(r191849)
@@ -122,9 +122,12 @@ int			 gv_detach_sd(struct gv_sd *, int)
 void	gv_worker(void *);
 void	gv_post_event(struct gv_softc *, int, void *, void *, intmax_t,
 	    intmax_t);
+struct gv_event *gv_get_event(struct gv_softc *);
+void	gv_remove_event(struct gv_softc *, struct gv_event *);
 void	gv_drive_tasted(struct gv_softc *, struct g_provider *);
 void	gv_drive_lost(struct gv_softc *, struct gv_drive *);
 void	gv_setup_objects(struct gv_softc *);
+void	gv_post_bio(struct gv_softc *, struct bio *);
 void	gv_start(struct bio *);
 int	gv_access(struct g_provider *, int, int, int);
 void	gv_cleanup(struct gv_softc *);

Modified: head/sys/geom/vinum/geom_vinum_events.c
==============================================================================
--- head/sys/geom/vinum/geom_vinum_events.c	Wed May  6 17:52:38 2009	(r191848)
+++ head/sys/geom/vinum/geom_vinum_events.c	Wed May  6 18:21:48 2009	(r191849)
@@ -52,10 +52,33 @@ gv_post_event(struct gv_softc *sc, int e
 	ev->arg3 = arg3;
 	ev->arg4 = arg4;
 
-	mtx_lock(&sc->queue_mtx);
+	mtx_lock(&sc->equeue_mtx);
 	TAILQ_INSERT_TAIL(&sc->equeue, ev, events);
 	wakeup(sc);
-	mtx_unlock(&sc->queue_mtx);
+	mtx_unlock(&sc->equeue_mtx);
+}
+
+struct gv_event *
+gv_get_event(struct gv_softc *sc)
+{
+	struct gv_event *ev;
+
+	KASSERT(sc != NULL, ("NULL sc"));
+	mtx_lock(&sc->equeue_mtx);
+	ev = TAILQ_FIRST(&sc->equeue);
+	mtx_unlock(&sc->equeue_mtx);
+	return (ev);
+}
+
+void
+gv_remove_event(struct gv_softc *sc, struct gv_event *ev)
+{
+
+	KASSERT(sc != NULL, ("NULL sc"));
+	KASSERT(ev != NULL, ("NULL ev"));
+	mtx_lock(&sc->equeue_mtx);
+	TAILQ_REMOVE(&sc->equeue, ev, events);
+	mtx_unlock(&sc->equeue_mtx);
 }
 
 void

Modified: head/sys/geom/vinum/geom_vinum_plex.c
==============================================================================
--- head/sys/geom/vinum/geom_vinum_plex.c	Wed May  6 17:52:38 2009	(r191848)
+++ head/sys/geom/vinum/geom_vinum_plex.c	Wed May  6 18:21:48 2009	(r191849)
@@ -360,9 +360,7 @@ gv_plex_raid5_done(struct gv_plex *p, st
 				/* Bring the waiting bios back into the game. */
 				pbp = bioq_takefirst(p->wqueue);
 				while (pbp != NULL) {
-					mtx_lock(&sc->queue_mtx);
-					bioq_disksort(sc->bqueue, pbp);
-					mtx_unlock(&sc->queue_mtx);
+					gv_post_bio(sc, pbp);
 					pbp = bioq_takefirst(p->wqueue);
 				}
 			}
@@ -406,9 +404,7 @@ gv_plex_raid5_done(struct gv_plex *p, st
 				/* Bring the waiting bios back into the game. */
 				pbp = bioq_takefirst(p->wqueue);
 				while (pbp != NULL) {
-					mtx_lock(&sc->queue_mtx);
-					bioq_disksort(sc->bqueue, pbp);
-					mtx_unlock(&sc->queue_mtx);
+					gv_post_bio(sc, pbp);
 					pbp = bioq_takefirst(p->wqueue);
 				}
 				g_free(wp);
@@ -581,9 +577,7 @@ gv_sync_request(struct gv_plex *from, st
 	bp->bio_data = data;
 
 	/* Send down next. */
-	mtx_lock(&sc->queue_mtx);
-	bioq_disksort(sc->bqueue, bp);
-	mtx_unlock(&sc->queue_mtx);
+	gv_post_bio(sc, bp);
 	//gv_plex_start(from, bp);
 	return (0);
 }
@@ -696,9 +690,7 @@ gv_grow_request(struct gv_plex *p, off_t
 	bp->bio_cflags |= GV_BIO_MALLOC;
 	bp->bio_data = data;
 
-	mtx_lock(&sc->queue_mtx);
-	bioq_disksort(sc->bqueue, bp);
-	mtx_unlock(&sc->queue_mtx);
+	gv_post_bio(sc, bp);
 	//gv_plex_start(p, bp);
 	return (0);
 }
@@ -921,9 +913,7 @@ gv_parity_request(struct gv_plex *p, int
 
 	/* We still have more parity to build. */
 	bp->bio_offset = offset;
-	mtx_lock(&sc->queue_mtx);
-	bioq_disksort(sc->bqueue, bp);
-	mtx_unlock(&sc->queue_mtx);
+	gv_post_bio(sc, bp);
 	//gv_plex_start(p, bp); /* Send it down to the plex. */
 }
 

Modified: head/sys/geom/vinum/geom_vinum_var.h
==============================================================================
--- head/sys/geom/vinum/geom_vinum_var.h	Wed May  6 17:52:38 2009	(r191848)
+++ head/sys/geom/vinum/geom_vinum_var.h	Wed May  6 18:21:48 2009	(r191849)
@@ -231,7 +231,8 @@ struct gv_softc {
 	LIST_HEAD(,gv_volume)	volumes;	/* All volumes. */
 
 	TAILQ_HEAD(,gv_event)	equeue;		/* Event queue. */
-	struct mtx		queue_mtx;	/* Queue lock. */
+	struct mtx		equeue_mtx;	/* Event queue lock. */
+	struct mtx		bqueue_mtx;	/* BIO queue lock. */
 	struct mtx		config_mtx;	/* Configuration lock. */
 	struct bio_queue_head	*bqueue;	/* BIO queue. */
 	struct g_geom		*geom;		/* Pointer to our VINUM geom. */

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 18:24:56 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 77B6A106567F;
	Wed,  6 May 2009 18:24:56 +0000 (UTC)
	(envelope-from lulf@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 66A4C8FC13;
	Wed,  6 May 2009 18:24:56 +0000 (UTC)
	(envelope-from lulf@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n46IOuMY025936;
	Wed, 6 May 2009 18:24:56 GMT (envelope-from lulf@svn.freebsd.org)
Received: (from lulf@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n46IOuwP025935;
	Wed, 6 May 2009 18:24:56 GMT (envelope-from lulf@svn.freebsd.org)
Message-Id: <200905061824.n46IOuwP025935@svn.freebsd.org>
From: Ulf Lilleengen 
Date: Wed, 6 May 2009 18:24:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191850 - head/sys/geom/vinum
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 18:24:57 -0000

Author: lulf
Date: Wed May  6 18:24:56 2009
New Revision: 191850
URL: http://svn.freebsd.org/changeset/base/191850

Log:
  - GV_BIO_RETRY is not used, and it is actually impossible with more than 8
    values for bio_cflags/bio_pflags.

Modified:
  head/sys/geom/vinum/geom_vinum_var.h

Modified: head/sys/geom/vinum/geom_vinum_var.h
==============================================================================
--- head/sys/geom/vinum/geom_vinum_var.h	Wed May  6 18:21:48 2009	(r191849)
+++ head/sys/geom/vinum/geom_vinum_var.h	Wed May  6 18:24:56 2009	(r191850)
@@ -116,7 +116,6 @@
 #define	GV_BIO_REBUILD	0x20
 #define	GV_BIO_CHECK	0x40
 #define	GV_BIO_PARITY	0x80
-#define	GV_BIO_RETRY	0x100
 #define GV_BIO_INTERNAL \
     (GV_BIO_SYNCREQ | GV_BIO_INIT | GV_BIO_REBUILD |GV_BIO_CHECK)
 

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 18:27:29 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3817D1065670;
	Wed,  6 May 2009 18:27:29 +0000 (UTC)
	(envelope-from lulf@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 275C58FC1B;
	Wed,  6 May 2009 18:27:29 +0000 (UTC)
	(envelope-from lulf@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n46IRT70026059;
	Wed, 6 May 2009 18:27:29 GMT (envelope-from lulf@svn.freebsd.org)
Received: (from lulf@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n46IRTH1026058;
	Wed, 6 May 2009 18:27:29 GMT (envelope-from lulf@svn.freebsd.org)
Message-Id: <200905061827.n46IRTH1026058@svn.freebsd.org>
From: Ulf Lilleengen 
Date: Wed, 6 May 2009 18:27:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191852 - head/sys/geom/vinum
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 18:27:29 -0000

Author: lulf
Date: Wed May  6 18:27:28 2009
New Revision: 191852
URL: http://svn.freebsd.org/changeset/base/191852

Log:
  - Fix a bug where the bio_data field of the wrong BIO is freed if an error
    occurs when doing a RAID5 request.

Modified:
  head/sys/geom/vinum/geom_vinum_raid5.c

Modified: head/sys/geom/vinum/geom_vinum_raid5.c
==============================================================================
--- head/sys/geom/vinum/geom_vinum_raid5.c	Wed May  6 18:27:12 2009	(r191851)
+++ head/sys/geom/vinum/geom_vinum_raid5.c	Wed May  6 18:27:28 2009	(r191852)
@@ -122,7 +122,7 @@ gv_raid5_start(struct gv_plex *p, struct
 		/* If internal, stop and reset state. */
 		if (bp->bio_cflags & GV_BIO_INTERNAL) {
 			if (bp->bio_cflags & GV_BIO_MALLOC)
-				g_free(cbp->bio_data);
+				g_free(bp->bio_data);
 			g_destroy_bio(bp);
 			/* Reset flags. */
 			p->flags &= ~(GV_PLEX_SYNCING | GV_PLEX_REBUILDING |

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 18:37:32 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C84931065673;
	Wed,  6 May 2009 18:37:32 +0000 (UTC)
	(envelope-from lulf@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B75F38FC13;
	Wed,  6 May 2009 18:37:32 +0000 (UTC)
	(envelope-from lulf@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n46IbWP9026291;
	Wed, 6 May 2009 18:37:32 GMT (envelope-from lulf@svn.freebsd.org)
Received: (from lulf@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n46IbWUC026290;
	Wed, 6 May 2009 18:37:32 GMT (envelope-from lulf@svn.freebsd.org)
Message-Id: <200905061837.n46IbWUC026290@svn.freebsd.org>
From: Ulf Lilleengen 
Date: Wed, 6 May 2009 18:37:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191853 - head/sys/geom/vinum
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 18:37:33 -0000

Author: lulf
Date: Wed May  6 18:37:32 2009
New Revision: 191853
URL: http://svn.freebsd.org/changeset/base/191853

Log:
  - Add forgotten KASSERT.

Modified:
  head/sys/geom/vinum/geom_vinum.c

Modified: head/sys/geom/vinum/geom_vinum.c
==============================================================================
--- head/sys/geom/vinum/geom_vinum.c	Wed May  6 18:27:28 2009	(r191852)
+++ head/sys/geom/vinum/geom_vinum.c	Wed May  6 18:37:32 2009	(r191853)
@@ -85,6 +85,7 @@ gv_post_bio(struct gv_softc *sc, struct 
 {
 
 	KASSERT(sc != NULL, ("NULL sc"));
+	KASSERT(bp != NULL, ("NULL bp"));
 	mtx_lock(&sc->bqueue_mtx);
 	bioq_disksort(sc->bqueue, bp);
 	wakeup(sc);

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 19:06:28 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7AB32106566B;
	Wed,  6 May 2009 19:06:28 +0000 (UTC)
	(envelope-from lulf@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 699668FC08;
	Wed,  6 May 2009 19:06:28 +0000 (UTC)
	(envelope-from lulf@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n46J6SaW026984;
	Wed, 6 May 2009 19:06:28 GMT (envelope-from lulf@svn.freebsd.org)
Received: (from lulf@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n46J6Sfb026983;
	Wed, 6 May 2009 19:06:28 GMT (envelope-from lulf@svn.freebsd.org)
Message-Id: <200905061906.n46J6Sfb026983@svn.freebsd.org>
From: Ulf Lilleengen 
Date: Wed, 6 May 2009 19:06:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191854 - head/sys/geom/vinum
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 19:06:28 -0000

Author: lulf
Date: Wed May  6 19:06:28 2009
New Revision: 191854
URL: http://svn.freebsd.org/changeset/base/191854

Log:
  - Check if any plexes are doing internal maintenance before removing them.

Modified:
  head/sys/geom/vinum/geom_vinum_rm.c

Modified: head/sys/geom/vinum/geom_vinum_rm.c
==============================================================================
--- head/sys/geom/vinum/geom_vinum_rm.c	Wed May  6 18:37:32 2009	(r191853)
+++ head/sys/geom/vinum/geom_vinum_rm.c	Wed May  6 19:06:28 2009	(r191854)
@@ -172,6 +172,13 @@ gv_resetconfig(struct gv_softc *sc)
 			return (GV_ERR_ISBUSY);
 		}
 	}
+
+	/* Make sure nothing is going on internally. */
+	LIST_FOREACH_SAFE(p, &sc->plexes, plex, p2) {
+		if (p->flags & (GV_PLEX_REBUILDING | GV_PLEX_GROWING))
+			return (GV_ERR_ISBUSY);
+	}
+
 	/* Then if not, we remove everything. */
 	LIST_FOREACH_SAFE(s, &sc->subdisks, sd, s2)
 		gv_rm_sd(sc, s);

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 19:18:20 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0DC1F106564A;
	Wed,  6 May 2009 19:18:20 +0000 (UTC)
	(envelope-from lulf@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F0B268FC0A;
	Wed,  6 May 2009 19:18:19 +0000 (UTC)
	(envelope-from lulf@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n46JIJw3027246;
	Wed, 6 May 2009 19:18:19 GMT (envelope-from lulf@svn.freebsd.org)
Received: (from lulf@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n46JIJG5027245;
	Wed, 6 May 2009 19:18:19 GMT (envelope-from lulf@svn.freebsd.org)
Message-Id: <200905061918.n46JIJG5027245@svn.freebsd.org>
From: Ulf Lilleengen 
Date: Wed, 6 May 2009 19:18:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191855 - head/sys/geom/vinum
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 19:18:20 -0000

Author: lulf
Date: Wed May  6 19:18:19 2009
New Revision: 191855
URL: http://svn.freebsd.org/changeset/base/191855

Log:
  - Fix a case where a RAID5 volume would think that it is supposed to grow a new
    subdisk after a parity rebuild.

Modified:
  head/sys/geom/vinum/geom_vinum_subr.c

Modified: head/sys/geom/vinum/geom_vinum_subr.c
==============================================================================
--- head/sys/geom/vinum/geom_vinum_subr.c	Wed May  6 19:06:28 2009	(r191854)
+++ head/sys/geom/vinum/geom_vinum_subr.c	Wed May  6 19:18:19 2009	(r191855)
@@ -127,7 +127,6 @@ gv_parse_config(struct gv_softc *sc, cha
 			 * needed here (on-disk config parsing).
 			 */
 			p->flags &= ~GV_PLEX_ADDED;
-			p->flags &= ~GV_PLEX_NEWBORN;
 
 		} else if (!strcmp(token[0], "sd")) {
 			s = gv_new_sd(tokens, token);
@@ -381,7 +380,7 @@ gv_sd_to_plex(struct gv_sd *s, struct gv
 		if ((p->org == GV_PLEX_RAID5 ||
 		    p->org == GV_PLEX_STRIPED) &&
 		    !(p->flags & GV_PLEX_NEWBORN) && 
-		    p->state >= GV_PLEX_DEGRADED) {
+		    p->state == GV_PLEX_UP) {
 			s->flags |= GV_SD_GROW;
 		}
 		p->sdcount++;

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 19:34:33 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 34592106566C;
	Wed,  6 May 2009 19:34:33 +0000 (UTC)
	(envelope-from lulf@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 21BB68FC14;
	Wed,  6 May 2009 19:34:33 +0000 (UTC)
	(envelope-from lulf@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n46JYXJ9027598;
	Wed, 6 May 2009 19:34:33 GMT (envelope-from lulf@svn.freebsd.org)
Received: (from lulf@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n46JYWeB027593;
	Wed, 6 May 2009 19:34:32 GMT (envelope-from lulf@svn.freebsd.org)
Message-Id: <200905061934.n46JYWeB027593@svn.freebsd.org>
From: Ulf Lilleengen 
Date: Wed, 6 May 2009 19:34:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191856 - head/sys/geom/vinum
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 19:34:33 -0000

Author: lulf
Date: Wed May  6 19:34:32 2009
New Revision: 191856
URL: http://svn.freebsd.org/changeset/base/191856

Log:
  - Split up the BIO queue into a queue for new and one for completed requests.
    This is necessary for two reasons:
    1) In order to avoid collisions with the use of a BIOs flags set by a consumer
       or a provider
    2) Because GV_BIO_DONE was used to mark a BIO as done, not enough flags was
       available, so the consumer flags of a BIO had to be misused in order to
       support enough flags. The new queue makes it possible to recycle the
       GV_BIO_DONE flag into GV_BIO_GROW.
    As a consequence, gvinum will now work with any other GEOM class under it or
    on top of it.
  
  - Use bio_pflags for storing internal flags on downgoing BIOs, as the requests
    appear to come from a consumer of a gvinum volume. Use bio_cflags only for
    cloned BIOs.
  - Move gv_post_bio to be used internally for maintenance requests.
  - Remove some cases where flags where set without need.
  
  PR:		kern/133604

Modified:
  head/sys/geom/vinum/geom_vinum.c
  head/sys/geom/vinum/geom_vinum.h
  head/sys/geom/vinum/geom_vinum_plex.c
  head/sys/geom/vinum/geom_vinum_raid5.c
  head/sys/geom/vinum/geom_vinum_var.h

Modified: head/sys/geom/vinum/geom_vinum.c
==============================================================================
--- head/sys/geom/vinum/geom_vinum.c	Wed May  6 19:18:19 2009	(r191855)
+++ head/sys/geom/vinum/geom_vinum.c	Wed May  6 19:34:32 2009	(r191856)
@@ -81,18 +81,6 @@ gv_orphan(struct g_consumer *cp)
 }
 
 void
-gv_post_bio(struct gv_softc *sc, struct bio *bp)
-{
-
-	KASSERT(sc != NULL, ("NULL sc"));
-	KASSERT(bp != NULL, ("NULL bp"));
-	mtx_lock(&sc->bqueue_mtx);
-	bioq_disksort(sc->bqueue, bp);
-	wakeup(sc);
-	mtx_unlock(&sc->bqueue_mtx);
-}
-
-void
 gv_start(struct bio *bp)
 {
 	struct g_geom *gp;
@@ -111,8 +99,10 @@ gv_start(struct bio *bp)
 		g_io_deliver(bp, EOPNOTSUPP);
 		return;
 	}
-
-	gv_post_bio(sc, bp);
+	mtx_lock(&sc->bqueue_mtx);
+	bioq_disksort(sc->bqueue_down, bp);
+	wakeup(sc);
+	mtx_unlock(&sc->bqueue_mtx);
 }
 
 void
@@ -125,9 +115,11 @@ gv_done(struct bio *bp)
 
 	gp = bp->bio_from->geom;
 	sc = gp->softc;
-	bp->bio_cflags |= GV_BIO_DONE;
 
-	gv_post_bio(sc, bp);
+	mtx_lock(&sc->bqueue_mtx);
+	bioq_disksort(sc->bqueue_up, bp);
+	wakeup(sc);
+	mtx_unlock(&sc->bqueue_mtx);
 }
 
 int
@@ -179,8 +171,12 @@ gv_init(struct g_class *mp)
 	gp->softc = g_malloc(sizeof(struct gv_softc), M_WAITOK | M_ZERO);
 	sc = gp->softc;
 	sc->geom = gp;
-	sc->bqueue = g_malloc(sizeof(struct bio_queue_head), M_WAITOK | M_ZERO);
-	bioq_init(sc->bqueue);
+	sc->bqueue_down = g_malloc(sizeof(struct bio_queue_head),
+	    M_WAITOK | M_ZERO);
+	sc->bqueue_up = g_malloc(sizeof(struct bio_queue_head),
+	    M_WAITOK | M_ZERO);
+	bioq_init(sc->bqueue_down);
+	bioq_init(sc->bqueue_up);
 	LIST_INIT(&sc->drives);
 	LIST_INIT(&sc->subdisks);
 	LIST_INIT(&sc->plexes);
@@ -969,7 +965,8 @@ gv_worker(void *arg)
 				gv_cleanup(sc);
 				mtx_destroy(&sc->bqueue_mtx);
 				mtx_destroy(&sc->equeue_mtx);
-				g_free(sc->bqueue);
+				g_free(sc->bqueue_down);
+				g_free(sc->bqueue_up);
 				g_free(sc);
 				kproc_exit(ENXIO);
 				break;			/* not reached */
@@ -984,38 +981,40 @@ gv_worker(void *arg)
 
 		/* ... then do I/O processing. */
 		mtx_lock(&sc->bqueue_mtx);
-		bp = bioq_takefirst(sc->bqueue);
+		/* First do new requests. */
+		bp = bioq_takefirst(sc->bqueue_down);
+		if (bp != NULL) {
+			mtx_unlock(&sc->bqueue_mtx);
+			/* A bio that interfered with another bio. */
+			if (bp->bio_pflags & GV_BIO_ONHOLD) {
+				s = bp->bio_caller1;
+				p = s->plex_sc;
+				/* Is it still locked out? */
+				if (gv_stripe_active(p, bp)) {
+					/* Park the bio on the waiting queue. */
+					bioq_disksort(p->wqueue, bp);
+				} else {
+					bp->bio_pflags &= ~GV_BIO_ONHOLD;
+					g_io_request(bp, s->drive_sc->consumer);
+				}
+			/* A special request requireing special handling. */
+			} else if (bp->bio_pflags & GV_BIO_INTERNAL) {
+				p = bp->bio_caller1;
+				gv_plex_start(p, bp);
+			} else {
+				gv_volume_start(sc, bp);
+			}
+			mtx_lock(&sc->bqueue_mtx);
+		}
+		/* Then do completed requests. */
+		bp = bioq_takefirst(sc->bqueue_up);
 		if (bp == NULL) {
 			msleep(sc, &sc->bqueue_mtx, PRIBIO, "-", hz/10);
 			mtx_unlock(&sc->bqueue_mtx);
 			continue;
 		}
 		mtx_unlock(&sc->bqueue_mtx);
-
-		/* A bio that is coming up from an underlying device. */
-		if (bp->bio_cflags & GV_BIO_DONE) {
-			gv_bio_done(sc, bp);
-		/* A bio that interfered with another bio. */
-		} else if (bp->bio_cflags & GV_BIO_ONHOLD) {
-			s = bp->bio_caller1;
-			p = s->plex_sc;
-			/* Is it still locked out? */
-			if (gv_stripe_active(p, bp)) {
-				/* Park the bio on the waiting queue. */
-				bioq_disksort(p->wqueue, bp);
-			} else {
-				bp->bio_cflags &= ~GV_BIO_ONHOLD;
-				g_io_request(bp, s->drive_sc->consumer);
-			}
-		/* A special request requireing special handling. */
-		} else if (bp->bio_cflags & GV_BIO_INTERNAL ||
-		    bp->bio_pflags & GV_BIO_INTERNAL) {
-			p = bp->bio_caller1;
-			gv_plex_start(p, bp);
-		/* A fresh bio, scheduled it down. */
-		} else {
-			gv_volume_start(sc, bp);
-		}
+		gv_bio_done(sc, bp);
 	}
 }
 

Modified: head/sys/geom/vinum/geom_vinum.h
==============================================================================
--- head/sys/geom/vinum/geom_vinum.h	Wed May  6 19:18:19 2009	(r191855)
+++ head/sys/geom/vinum/geom_vinum.h	Wed May  6 19:34:32 2009	(r191856)
@@ -127,7 +127,6 @@ void	gv_remove_event(struct gv_softc *, 
 void	gv_drive_tasted(struct gv_softc *, struct g_provider *);
 void	gv_drive_lost(struct gv_softc *, struct gv_drive *);
 void	gv_setup_objects(struct gv_softc *);
-void	gv_post_bio(struct gv_softc *, struct bio *);
 void	gv_start(struct bio *);
 int	gv_access(struct g_provider *, int, int, int);
 void	gv_cleanup(struct gv_softc *);

Modified: head/sys/geom/vinum/geom_vinum_plex.c
==============================================================================
--- head/sys/geom/vinum/geom_vinum_plex.c	Wed May  6 19:18:19 2009	(r191855)
+++ head/sys/geom/vinum/geom_vinum_plex.c	Wed May  6 19:34:32 2009	(r191856)
@@ -48,6 +48,8 @@ static int	gv_plex_offset(struct gv_plex
 		    int *, int);
 static int 	gv_plex_normal_request(struct gv_plex *, struct bio *, off_t,
 		    off_t,  caddr_t);
+static void	gv_post_bio(struct gv_softc *, struct bio *);
+
 void
 gv_plex_start(struct gv_plex *p, struct bio *bp)
 {
@@ -111,7 +113,7 @@ gv_plex_start(struct gv_plex *p, struct 
 		 */
 		if (cbp->bio_caller2 != NULL && gv_stripe_active(p, cbp)) {
 			/* Park the bio on the waiting queue. */
-			cbp->bio_cflags |= GV_BIO_ONHOLD;
+			cbp->bio_pflags |= GV_BIO_ONHOLD;
 			bioq_disksort(p->wqueue, cbp);
 		} else {
 			s = cbp->bio_caller1;
@@ -209,7 +211,7 @@ gv_plex_normal_request(struct gv_plex *p
 		goto bad;
 
 	err = gv_plex_offset(p, boff, bcount, &real_off,
-	    &real_len, &sdno, (bp->bio_pflags & GV_BIO_SYNCREQ));
+	    &real_len, &sdno, (bp->bio_pflags & GV_BIO_GROW));
 	/* If the request was blocked, put it into wait. */
 	if (err == GV_ERR_ISBUSY) {
 		bioq_disksort(p->rqueue, bp);
@@ -239,12 +241,12 @@ gv_plex_normal_request(struct gv_plex *p
 		/* If the subdisk is up, just continue. */
 		break;
 	case GV_SD_DOWN:
-		if (bp->bio_cflags & GV_BIO_INTERNAL)
+		if (bp->bio_pflags & GV_BIO_INTERNAL)
 			G_VINUM_DEBUG(0, "subdisk must be in the stale state in"
 			    " order to perform administrative requests");
 		goto bad;
 	case GV_SD_STALE:
-		if (!(bp->bio_cflags & GV_BIO_SYNCREQ)) {
+		if (!(bp->bio_pflags & GV_BIO_SYNCREQ)) {
 			G_VINUM_DEBUG(0, "subdisk stale, unable to perform "
 			    "regular requests");
 			goto bad;
@@ -273,8 +275,6 @@ gv_plex_normal_request(struct gv_plex *p
 	cbp->bio_data = addr;
 	cbp->bio_done = gv_done;
 	cbp->bio_caller1 = s;
-	if ((bp->bio_cflags & GV_BIO_SYNCREQ))
-		cbp->bio_cflags |= GV_BIO_SYNCREQ;
 
 	/* Store the sub-requests now and let others issue them. */
 	bioq_insert_tail(p->bqueue, cbp); 
@@ -282,8 +282,8 @@ gv_plex_normal_request(struct gv_plex *p
 bad:
 	G_VINUM_LOGREQ(0, bp, "plex request failed.");
 	/* Building the sub-request failed. If internal BIO, do not deliver. */
-	if (bp->bio_cflags & GV_BIO_INTERNAL) {
-		if (bp->bio_cflags & GV_BIO_MALLOC)
+	if (bp->bio_pflags & GV_BIO_INTERNAL) {
+		if (bp->bio_pflags & GV_BIO_MALLOC)
 			g_free(bp->bio_data);
 		g_destroy_bio(bp);
 		p->flags &= ~(GV_PLEX_SYNCING | GV_PLEX_REBUILDING |
@@ -311,9 +311,9 @@ gv_plex_normal_done(struct gv_plex *p, s
 		/* Just set it to length since multiple plexes will
 		 * screw things up. */
 		pbp->bio_completed = pbp->bio_length;
-		if (pbp->bio_cflags & GV_BIO_SYNCREQ)
+		if (pbp->bio_pflags & GV_BIO_SYNCREQ)
 			gv_sync_complete(p, pbp);
-		else if (pbp->bio_pflags & GV_BIO_SYNCREQ)
+		else if (pbp->bio_pflags & GV_BIO_GROW)
 			gv_grow_complete(p, pbp);
 		else
 			g_io_deliver(pbp, pbp->bio_error);
@@ -392,7 +392,7 @@ gv_plex_raid5_done(struct gv_plex *p, st
 
 		/* Handle parity data. */
 		if (TAILQ_EMPTY(&wp->bits)) {
-			if (bp->bio_parent->bio_cflags & GV_BIO_CHECK)
+			if (bp->bio_parent->bio_pflags & GV_BIO_CHECK)
 				i = gv_check_parity(p, bp, wp);
 			else
 				i = gv_normal_parity(p, bp, wp);
@@ -424,16 +424,16 @@ gv_plex_raid5_done(struct gv_plex *p, st
 	if (pbp->bio_inbed == pbp->bio_children) {
 		/* Hand it over for checking or delivery. */
 		if (pbp->bio_cmd == BIO_WRITE &&
-		    (pbp->bio_cflags & GV_BIO_CHECK)) {
+		    (pbp->bio_pflags & GV_BIO_CHECK)) {
 			gv_parity_complete(p, pbp);
 		} else if (pbp->bio_cmd == BIO_WRITE &&
-		    (pbp->bio_cflags & GV_BIO_REBUILD)) {
+		    (pbp->bio_pflags & GV_BIO_REBUILD)) {
 			gv_rebuild_complete(p, pbp);
-		} else if (pbp->bio_cflags & GV_BIO_INIT) {
+		} else if (pbp->bio_pflags & GV_BIO_INIT) {
 			gv_init_complete(p, pbp);
-		} else if (pbp->bio_cflags & GV_BIO_SYNCREQ) {
-			gv_sync_complete(p, pbp);
 		} else if (pbp->bio_pflags & GV_BIO_SYNCREQ) {
+			gv_sync_complete(p, pbp);
+		} else if (pbp->bio_pflags & GV_BIO_GROW) {
 			gv_grow_complete(p, pbp);
 		} else {
 			g_io_deliver(pbp, pbp->bio_error);
@@ -480,7 +480,7 @@ gv_check_parity(struct gv_plex *p, struc
 			bp->bio_parent->bio_error = EAGAIN;
 
 			/* ... but we rebuild it. */
-			if (bp->bio_parent->bio_cflags & GV_BIO_PARITY) {
+			if (bp->bio_parent->bio_pflags & GV_BIO_PARITY) {
 				s = pbp->bio_caller1;
 				g_io_request(pbp, s->drive_sc->consumer);
 				finished = 0;
@@ -546,6 +546,18 @@ gv_plex_flush(struct gv_plex *p)
 	}
 }
 
+static void
+gv_post_bio(struct gv_softc *sc, struct bio *bp)
+{
+
+	KASSERT(sc != NULL, ("NULL sc"));
+	KASSERT(bp != NULL, ("NULL bp"));
+	mtx_lock(&sc->bqueue_mtx);
+	bioq_disksort(sc->bqueue_down, bp);
+	wakeup(sc);
+	mtx_unlock(&sc->bqueue_mtx);
+}
+
 int
 gv_sync_request(struct gv_plex *from, struct gv_plex *to, off_t offset,
     off_t length, int type, caddr_t data)
@@ -566,14 +578,14 @@ gv_sync_request(struct gv_plex *from, st
 	}
 	bp->bio_length = length;
 	bp->bio_done = gv_done;
-	bp->bio_cflags |= GV_BIO_SYNCREQ;
+	bp->bio_pflags |= GV_BIO_SYNCREQ;
 	bp->bio_offset = offset;
 	bp->bio_caller1 = from;		
 	bp->bio_caller2 = to;
 	bp->bio_cmd = type;
 	if (data == NULL)
 		data = g_malloc(length, M_WAITOK);
-	bp->bio_cflags |= GV_BIO_MALLOC; /* Free on the next run. */
+	bp->bio_pflags |= GV_BIO_MALLOC; /* Free on the next run. */
 	bp->bio_data = data;
 
 	/* Send down next. */
@@ -613,7 +625,7 @@ gv_sync_complete(struct gv_plex *to, str
 	    	    BIO_WRITE, bp->bio_data);
 	/* If it was a write, read the next one. */
 	} else if (bp->bio_cmd == BIO_WRITE) {
-		if (bp->bio_cflags & GV_BIO_MALLOC)
+		if (bp->bio_pflags & GV_BIO_MALLOC)
 			g_free(bp->bio_data);
 		to->synced += bp->bio_length;
 		/* If we're finished, clean up. */
@@ -684,10 +696,10 @@ gv_grow_request(struct gv_plex *p, off_t
 	bp->bio_caller1 = p;
 	bp->bio_offset = offset;
 	bp->bio_length = length;
-	bp->bio_pflags |= GV_BIO_SYNCREQ; /* XXX: misuse of pflags AND syncreq.*/
+	bp->bio_pflags |= GV_BIO_GROW;
 	if (data == NULL)
 		data = g_malloc(length, M_WAITOK);
-	bp->bio_cflags |= GV_BIO_MALLOC;
+	bp->bio_pflags |= GV_BIO_MALLOC;
 	bp->bio_data = data;
 
 	gv_post_bio(sc, bp);
@@ -720,7 +732,7 @@ gv_grow_complete(struct gv_plex *p, stru
 		    BIO_WRITE, bp->bio_data);
 	/* If it was a write, read next. */
 	} else if (bp->bio_cmd == BIO_WRITE) {
-		if (bp->bio_cflags & GV_BIO_MALLOC)
+		if (bp->bio_pflags & GV_BIO_MALLOC)
 			g_free(bp->bio_data);
 
 		/* Find the real size of the plex. */
@@ -790,7 +802,7 @@ gv_init_request(struct gv_sd *s, off_t s
 	bp->bio_done = gv_done;
 	bp->bio_error = 0;
 	bp->bio_length = length;
-	bp->bio_cflags |= GV_BIO_INIT;
+	bp->bio_pflags |= GV_BIO_INIT;
 	bp->bio_offset = start;
 	bp->bio_caller1 = s;
 
@@ -908,8 +920,8 @@ gv_parity_request(struct gv_plex *p, int
 		return;
 	}
 
-	bp->bio_cflags = flags;
-	bp->bio_cflags |= GV_BIO_MALLOC;
+	bp->bio_pflags = flags;
+	bp->bio_pflags |= GV_BIO_MALLOC;
 
 	/* We still have more parity to build. */
 	bp->bio_offset = offset;
@@ -927,14 +939,14 @@ gv_parity_complete(struct gv_plex *p, st
 	int error, flags;
 
 	error = bp->bio_error;
-	flags = bp->bio_cflags;
+	flags = bp->bio_pflags;
 	flags &= ~GV_BIO_MALLOC;
 
 	sc = p->vinumconf;
 	KASSERT(sc != NULL, ("gv_parity_complete: NULL sc"));
 
 	/* Clean up what we allocated. */
-	if (bp->bio_cflags & GV_BIO_MALLOC)
+	if (bp->bio_pflags & GV_BIO_MALLOC)
 		g_free(bp->bio_data);
 	g_destroy_bio(bp);
 
@@ -986,14 +998,14 @@ gv_rebuild_complete(struct gv_plex *p, s
 	off_t offset;
 
 	error = bp->bio_error;
-	flags = bp->bio_cflags;
+	flags = bp->bio_pflags;
 	offset = bp->bio_offset;
 	flags &= ~GV_BIO_MALLOC;
 	sc = p->vinumconf;
 	KASSERT(sc != NULL, ("gv_rebuild_complete: NULL sc"));
 
 	/* Clean up what we allocated. */
-	if (bp->bio_cflags & GV_BIO_MALLOC)
+	if (bp->bio_pflags & GV_BIO_MALLOC)
 		g_free(bp->bio_data);
 	g_destroy_bio(bp);
 

Modified: head/sys/geom/vinum/geom_vinum_raid5.c
==============================================================================
--- head/sys/geom/vinum/geom_vinum_raid5.c	Wed May  6 19:18:19 2009	(r191855)
+++ head/sys/geom/vinum/geom_vinum_raid5.c	Wed May  6 19:34:32 2009	(r191856)
@@ -65,9 +65,9 @@ gv_raid5_start(struct gv_plex *p, struct
 	wp->parity = NULL;
 	TAILQ_INIT(&wp->bits);
 
-	if (bp->bio_cflags & GV_BIO_REBUILD)
+	if (bp->bio_pflags & GV_BIO_REBUILD)
 		err = gv_raid5_rebuild(p, wp, bp, addr, boff, bcount);
-	else if (bp->bio_cflags & GV_BIO_CHECK)
+	else if (bp->bio_pflags & GV_BIO_CHECK)
 		err = gv_raid5_check(p, wp, bp, addr, boff, bcount);
 	else
 		err = gv_raid5_request(p, wp, bp, addr, boff, bcount, &delay);
@@ -120,8 +120,8 @@ gv_raid5_start(struct gv_plex *p, struct
 		}
 
 		/* If internal, stop and reset state. */
-		if (bp->bio_cflags & GV_BIO_INTERNAL) {
-			if (bp->bio_cflags & GV_BIO_MALLOC)
+		if (bp->bio_pflags & GV_BIO_INTERNAL) {
+			if (bp->bio_pflags & GV_BIO_MALLOC)
 				g_free(bp->bio_data);
 			g_destroy_bio(bp);
 			/* Reset flags. */
@@ -277,7 +277,7 @@ gv_raid5_rebuild(struct gv_plex *p, stru
 		return (EINVAL);
 
 	case GV_SD_STALE:
-		if (!(bp->bio_cflags & GV_BIO_REBUILD))
+		if (!(bp->bio_pflags & GV_BIO_REBUILD))
 			return (ENXIO);
 
 		G_VINUM_DEBUG(1, "sd %s is reviving", broken->name);
@@ -326,7 +326,6 @@ gv_raid5_rebuild(struct gv_plex *p, stru
 	cbp = gv_raid5_clone_bio(bp, broken, wp, NULL, 1);
 	if (cbp == NULL)
 		return (ENOMEM);
-	cbp->bio_cflags |= GV_BIO_REBUILD;
 	wp->parity = cbp;
 
 	p->synced = boff;
@@ -400,7 +399,7 @@ gv_raid5_request(struct gv_plex *p, stru
 
 	/* If synchronizing request, just write it if disks are stale. */
 	if (original->state == GV_SD_STALE && parity->state == GV_SD_STALE &&
-	    bp->bio_cflags & GV_BIO_SYNCREQ && bp->bio_cmd == BIO_WRITE) {
+	    bp->bio_pflags & GV_BIO_SYNCREQ && bp->bio_cmd == BIO_WRITE) {
 		type = REQ_TYPE_NORMAL;
 	/* Our parity stripe is missing. */
 	} else if (parity->state != GV_SD_UP) {

Modified: head/sys/geom/vinum/geom_vinum_var.h
==============================================================================
--- head/sys/geom/vinum/geom_vinum_var.h	Wed May  6 19:18:19 2009	(r191855)
+++ head/sys/geom/vinum/geom_vinum_var.h	Wed May  6 19:34:32 2009	(r191856)
@@ -108,7 +108,7 @@
 #define	GV_DFLT_SYNCSIZE	65536
 
 /* Flags for BIOs, as they are processed within vinum. */
-#define	GV_BIO_DONE	0x01
+#define	GV_BIO_GROW	0x01
 #define	GV_BIO_MALLOC	0x02
 #define	GV_BIO_ONHOLD	0x04
 #define	GV_BIO_SYNCREQ	0x08
@@ -117,7 +117,7 @@
 #define	GV_BIO_CHECK	0x40
 #define	GV_BIO_PARITY	0x80
 #define GV_BIO_INTERNAL \
-    (GV_BIO_SYNCREQ | GV_BIO_INIT | GV_BIO_REBUILD |GV_BIO_CHECK)
+    (GV_BIO_SYNCREQ | GV_BIO_INIT | GV_BIO_REBUILD | GV_BIO_CHECK | GV_BIO_GROW)
 
 /* Error codes to be used within gvinum. */
 #define	GV_ERR_SETSTATE		(-1)	/* Error setting state. */
@@ -233,7 +233,10 @@ struct gv_softc {
 	struct mtx		equeue_mtx;	/* Event queue lock. */
 	struct mtx		bqueue_mtx;	/* BIO queue lock. */
 	struct mtx		config_mtx;	/* Configuration lock. */
-	struct bio_queue_head	*bqueue;	/* BIO queue. */
+	struct bio_queue_head	*bqueue_down;	/* BIO queue incoming
+						   requests. */
+	struct bio_queue_head	*bqueue_up;	/* BIO queue for completed
+						   requests. */
 	struct g_geom		*geom;		/* Pointer to our VINUM geom. */
 };
 #endif

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 20:07:29 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 19D7F1065676;
	Wed,  6 May 2009 20:07:29 +0000 (UTC) (envelope-from jmg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 069BF8FC1B;
	Wed,  6 May 2009 20:07:29 +0000 (UTC) (envelope-from jmg@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n46K7SPc028307;
	Wed, 6 May 2009 20:07:28 GMT (envelope-from jmg@svn.freebsd.org)
Received: (from jmg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n46K7ShS028306;
	Wed, 6 May 2009 20:07:28 GMT (envelope-from jmg@svn.freebsd.org)
Message-Id: <200905062007.n46K7ShS028306@svn.freebsd.org>
From: John-Mark Gurney 
Date: Wed, 6 May 2009 20:07:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191857 - head/usr.sbin/freebsd-update
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 20:07:30 -0000

Author: jmg
Date: Wed May  6 20:07:28 2009
New Revision: 191857
URL: http://svn.freebsd.org/changeset/base/191857

Log:
  fix grammar...
  
  Reviewed by:	cperciva

Modified:
  head/usr.sbin/freebsd-update/freebsd-update.8

Modified: head/usr.sbin/freebsd-update/freebsd-update.8
==============================================================================
--- head/usr.sbin/freebsd-update/freebsd-update.8	Wed May  6 19:34:32 2009	(r191856)
+++ head/usr.sbin/freebsd-update/freebsd-update.8	Wed May  6 20:07:28 2009	(r191857)
@@ -151,7 +151,7 @@ on the server(s) hosting the updates.
 In spite of its name,
 .Cm
 IDS should not be relied upon as an "Intrusion Detection
-System", since it if the system has been tampered with
+System", since if the system has been tampered with
 it cannot be trusted to operate correctly.
 If you intend to use this command for intrusion-detection
 purposes, make sure you boot from a secure disk (e.g., a CD).

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 20:24:17 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 97C051065676;
	Wed,  6 May 2009 20:24:17 +0000 (UTC)
	(envelope-from cognet@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 78B6D8FC0C;
	Wed,  6 May 2009 20:24:17 +0000 (UTC)
	(envelope-from cognet@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n46KOHmC028676;
	Wed, 6 May 2009 20:24:17 GMT (envelope-from cognet@svn.freebsd.org)
Received: (from cognet@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n46KOH4j028675;
	Wed, 6 May 2009 20:24:17 GMT (envelope-from cognet@svn.freebsd.org)
Message-Id: <200905062024.n46KOH4j028675@svn.freebsd.org>
From: Olivier Houchard 
Date: Wed, 6 May 2009 20:24:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191858 - head/sys/arm/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 20:24:18 -0000

Author: cognet
Date: Wed May  6 20:24:17 2009
New Revision: 191858
URL: http://svn.freebsd.org/changeset/base/191858

Log:
  Use the good hints for the NSLU, it should fix the network adapter.
  
  PR:		arm/134092
  Submitted by:	gavin

Modified:
  head/sys/arm/conf/NSLU.hints

Modified: head/sys/arm/conf/NSLU.hints
==============================================================================
--- head/sys/arm/conf/NSLU.hints	Wed May  6 20:07:28 2009	(r191857)
+++ head/sys/arm/conf/NSLU.hints	Wed May  6 20:24:17 2009	(r191858)
@@ -17,17 +17,17 @@ hint.uart.1.irq=13
 # NPE Hardware Queue Manager
 hint.ixpqmgr.0.at="ixp0"
 
-# NPE wireless NIC's, requires ixpqmgr
+# NPE wired NICs, requires ixpqmgr
 hint.npe.0.at="ixp0"
-hint.npe.0.mac="A"
-hint.npe.0.mii="A"
+hint.npe.0.mac="B"
+hint.npe.0.mii="B"
 hint.npe.0.phy=1
 # The second MAC isn't used on the NSLU, but it needs to be configured or
 # we timeout on dhcp packets
 hint.npe.1.at="ixp0"
-hint.npe.1.mac="B"
-hint.npe.1.mii="A"
-hint.npe.1.phy=0
+#hint.npe.1.mac="B"
+#hint.npe.1.mii="A"
+#hint.npe.1.phy=0
 
 #not yet
 # RTC

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 22:26:04 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 60BAE10656CF;
	Wed,  6 May 2009 22:26:04 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4DBA78FC1C;
	Wed,  6 May 2009 22:26:04 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n46MQ4qa031715;
	Wed, 6 May 2009 22:26:04 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n46MQ4OI031714;
	Wed, 6 May 2009 22:26:04 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <200905062226.n46MQ4OI031714@svn.freebsd.org>
From: Xin LI 
Date: Wed, 6 May 2009 22:26:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191860 - stable/7/usr.bin/truss
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 22:26:05 -0000

Author: delphij
Date: Wed May  6 22:26:04 2009
New Revision: 191860
URL: http://svn.freebsd.org/changeset/base/191860

Log:
  MFC r191004:
  
  Correct a bug where pr_data should have been assigned.

Modified:
  stable/7/usr.bin/truss/   (props changed)
  stable/7/usr.bin/truss/setup.c

Modified: stable/7/usr.bin/truss/setup.c
==============================================================================
--- stable/7/usr.bin/truss/setup.c	Wed May  6 20:48:45 2009	(r191859)
+++ stable/7/usr.bin/truss/setup.c	Wed May  6 22:26:04 2009	(r191860)
@@ -1,4 +1,4 @@
-/*
+/*-
  * Copryight 1997 Sean Eric Fagan
  *
  * Redistribution and use in source and binary forms, with or without
@@ -214,8 +214,8 @@ waitevent(struct trussinfo *info)
 		}
 	}
 	if (WIFSIGNALED(waitval)) {
-	        info->pr_why = S_EXIT;
-		info->pr_why = 0;
-                return;
+		info->pr_why = S_EXIT;
+		info->pr_data = 0;
+		return;
 	}
 }

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 22:26:49 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E5BC51065675;
	Wed,  6 May 2009 22:26:49 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D33488FC17;
	Wed,  6 May 2009 22:26:49 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n46MQn1P031774;
	Wed, 6 May 2009 22:26:49 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n46MQnGK031773;
	Wed, 6 May 2009 22:26:49 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <200905062226.n46MQnGK031773@svn.freebsd.org>
From: Xin LI 
Date: Wed, 6 May 2009 22:26:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191861 - stable/7/usr.bin/truss
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 22:26:50 -0000

Author: delphij
Date: Wed May  6 22:26:49 2009
New Revision: 191861
URL: http://svn.freebsd.org/changeset/base/191861

Log:
  MFC r191005:
  
  Don't exit until all truss children were exit.

Modified:
  stable/7/usr.bin/truss/   (props changed)
  stable/7/usr.bin/truss/main.c

Modified: stable/7/usr.bin/truss/main.c
==============================================================================
--- stable/7/usr.bin/truss/main.c	Wed May  6 22:26:04 2009	(r191860)
+++ stable/7/usr.bin/truss/main.c	Wed May  6 22:26:49 2009	(r191861)
@@ -1,4 +1,4 @@
-/*
+/*-
  * Copryight 1997 Sean Eric Fagan
  *
  * Redistribution and use in source and binary forms, with or without
@@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -159,6 +160,8 @@ main(int ac, char **av)
 {
 	int c;
 	int i;
+	pid_t childpid;
+	int status;
 	char **command;
 	struct ex_types *funcs;
 	int initial_open;
@@ -283,8 +286,6 @@ START_TRACE:
 
 			if (trussinfo->curthread->in_fork &&
 			    (trussinfo->flags & FOLLOWFORKS)) {
-				int childpid;
-
 				trussinfo->curthread->in_fork = 0;
 				childpid =
 				    funcs->exit_syscall(trussinfo,
@@ -355,6 +356,11 @@ START_TRACE:
 		}
 	} while (trussinfo->pr_why != S_EXIT);
 	fflush(trussinfo->outfile);
-	
+
+	if (trussinfo->flags & FOLLOWFORKS)
+		do {
+			childpid = wait(&status);
+		} while (childpid != -1);
+
 	return (0);
 }

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 22:31:05 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 845A41065670;
	Wed,  6 May 2009 22:31:05 +0000 (UTC)
	(envelope-from gonzo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 582028FC1B;
	Wed,  6 May 2009 22:31:05 +0000 (UTC)
	(envelope-from gonzo@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n46MV5FT031902;
	Wed, 6 May 2009 22:31:05 GMT (envelope-from gonzo@svn.freebsd.org)
Received: (from gonzo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n46MV5Vl031901;
	Wed, 6 May 2009 22:31:05 GMT (envelope-from gonzo@svn.freebsd.org)
Message-Id: <200905062231.n46MV5Vl031901@svn.freebsd.org>
From: Oleksandr Tymoshenko 
Date: Wed, 6 May 2009 22:31:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-svnadmin@freebsd.org
X-SVN-Group: svnadmin
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191862 - svnadmin/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 22:31:05 -0000

Author: gonzo
Date: Wed May  6 22:31:04 2009
New Revision: 191862
URL: http://svn.freebsd.org/changeset/base/191862

Log:
  - Increase size limit for HEAD merge to projects/mips

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==============================================================================
--- svnadmin/conf/sizelimit.conf	Wed May  6 22:26:49 2009	(r191861)
+++ svnadmin/conf/sizelimit.conf	Wed May  6 22:31:04 2009	(r191862)
@@ -26,3 +26,4 @@ thompsa
 sam
 rpaulo
 rwatson
+gonzo

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 23:09:27 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6DA45106564A;
	Wed,  6 May 2009 23:09:27 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5AFE68FC17;
	Wed,  6 May 2009 23:09:27 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n46N9Q18032821;
	Wed, 6 May 2009 23:09:27 GMT (envelope-from sam@svn.freebsd.org)
Received: (from sam@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n46N9QrD032818;
	Wed, 6 May 2009 23:09:26 GMT (envelope-from sam@svn.freebsd.org)
Message-Id: <200905062309.n46N9QrD032818@svn.freebsd.org>
From: Sam Leffler 
Date: Wed, 6 May 2009 23:09:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191864 - in head/sys/dev/ath/ath_hal: ar5211 ar5212
	ar5416
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 23:09:27 -0000

Author: sam
Date: Wed May  6 23:09:26 2009
New Revision: 191864
URL: http://svn.freebsd.org/changeset/base/191864

Log:
  add support for the Beacon Not Ready (BNR) interrupt
  (available on 5211 and later)

Modified:
  head/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c
  head/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c

Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c	Wed May  6 22:40:01 2009	(r191863)
+++ head/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c	Wed May  6 23:09:26 2009	(r191864)
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5211_interrupts.c,v 1.6 2008/11/27 22:29:52 sam Exp $
+ * $FreeBSD$
  */
 #include "opt_ah.h"
 
@@ -64,6 +64,8 @@ ar5211GetPendingInterrupts(struct ath_ha
 		*masked |= HAL_INT_RX;
 	if (isr & (AR_ISR_TXOK | AR_ISR_TXDESC | AR_ISR_TXERR | AR_ISR_TXEOL))
 		*masked |= HAL_INT_TX;
+	if (isr & AR_ISR_BNR)
+		*masked |= HAL_INT_BNR;
 	/*
 	 * Receive overrun is usually non-fatal on Oahu/Spirit.
 	 * BUT on some parts rx could fail and the chip must be reset.
@@ -137,6 +139,8 @@ ar5211SetInterrupts(struct ath_hal *ah, 
 	}
 	if (ints & HAL_INT_RX)
 		mask |= AR_IMR_RXOK | AR_IMR_RXERR | AR_IMR_RXDESC;
+	if (ints & AR_ISR_BNR)
+		mask |= HAL_INT_BNR;
 	if (ints & HAL_INT_FATAL) {
 		/*
 		 * NB: ar5212Reset sets MCABT+SSERR+DPERR in AR_IMR_S2

Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c	Wed May  6 22:40:01 2009	(r191863)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c	Wed May  6 23:09:26 2009	(r191864)
@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5212_interrupts.c,v 1.6 2008/11/27 22:30:00 sam Exp $
+ * $FreeBSD$
  */
 #include "opt_ah.h"
 
@@ -92,6 +92,8 @@ ar5212GetPendingInterrupts(struct ath_ha
 		ahp->ah_intrTxqs |= MS(isr1, AR_ISR_S1_QCU_TXERR);
 		ahp->ah_intrTxqs |= MS(isr1, AR_ISR_S1_QCU_TXEOL);
 	}
+	if (isr & AR_ISR_BNR)
+		*masked |= HAL_INT_BNR;
 
 	/*
 	 * Receive overrun is usually non-fatal on Oahu/Spirit.
@@ -173,6 +175,8 @@ ar5212SetInterrupts(struct ath_hal *ah, 
 		if (ints & HAL_INT_CABEND)
 			mask2 |= (AR_IMR_S2_CABEND );
 	}
+	if (ints & HAL_INT_BNR)
+		mask |= AR_IMR_BNR;
 	if (ints & HAL_INT_FATAL) {
 		/*
 		 * NB: ar5212Reset sets MCABT+SSERR+DPERR in AR_IMR_S2

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c	Wed May  6 22:40:01 2009	(r191863)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c	Wed May  6 23:09:26 2009	(r191864)
@@ -119,6 +119,8 @@ ar5416GetPendingInterrupts(struct ath_ha
 			ahp->ah_intrTxqs |= MS(isr1, AR_ISR_S1_QCU_TXERR);
 			ahp->ah_intrTxqs |= MS(isr1, AR_ISR_S1_QCU_TXEOL);
 		}
+		if (isr & AR_ISR_BNR)
+			*masked |= HAL_INT_BNR;
 
 		/* Interrupt Mitigation on AR5416 */
 #ifdef AR5416_INT_MITIGATION
@@ -227,6 +229,8 @@ ar5416SetInterrupts(struct ath_hal *ah, 
 		if (ints & HAL_INT_TSFOOR)
 			mask2 |= AR_IMR_S2_TSFOOR;
 	}
+	if (ints & HAL_INT_BNR)
+		mask |= AR_IMR_BNR;
 
 	/* Write the new IMR and store off our SW copy. */
 	HALDEBUG(ah, HAL_DEBUG_INTERRUPT, "%s: new IMR 0x%x\n", __func__, mask);

From owner-svn-src-all@FreeBSD.ORG  Wed May  6 23:49:56 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1399F106566B;
	Wed,  6 May 2009 23:49:56 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EB2638FC16;
	Wed,  6 May 2009 23:49:55 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n46NntZE033666;
	Wed, 6 May 2009 23:49:55 GMT (envelope-from sam@svn.freebsd.org)
Received: (from sam@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n46NntRr033664;
	Wed, 6 May 2009 23:49:55 GMT (envelope-from sam@svn.freebsd.org)
Message-Id: <200905062349.n46NntRr033664@svn.freebsd.org>
From: Sam Leffler 
Date: Wed, 6 May 2009 23:49:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191865 - head/sys/dev/ath
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 06 May 2009 23:49:56 -0000

Author: sam
Date: Wed May  6 23:49:55 2009
New Revision: 191865
URL: http://svn.freebsd.org/changeset/base/191865

Log:
  o cleanup checks for which vap combinations are permitted and what to
    use for ic_opmode
  o fixes the case where creating ahdemo+wds vaps caused ic_opmode to be
    set to hostap

Modified:
  head/sys/dev/ath/if_ath.c

Modified: head/sys/dev/ath/if_ath.c
==============================================================================
--- head/sys/dev/ath/if_ath.c	Wed May  6 23:09:26 2009	(r191864)
+++ head/sys/dev/ath/if_ath.c	Wed May  6 23:49:55 2009	(r191865)
@@ -863,23 +863,26 @@ ath_vap_create(struct ieee80211com *ic,
 	IEEE80211_ADDR_COPY(mac, mac0);
 
 	ATH_LOCK(sc);
+	ic_opmode = opmode;		/* default to opmode of new vap */
 	switch (opmode) {
 	case IEEE80211_M_STA:
-		if (sc->sc_nstavaps != 0) {	/* XXX only 1 sta for now */
+		if (sc->sc_nstavaps != 0) {	/* XXX only 1 for now */
 			device_printf(sc->sc_dev, "only 1 sta vap supported\n");
 			goto bad;
 		}
 		if (sc->sc_nvaps) {
 			/*
-			 * When there are multiple vaps we must fall
-			 * back to s/w beacon miss handling.
+			 * With multiple vaps we must fall back
+			 * to s/w beacon miss handling.
 			 */
 			flags |= IEEE80211_CLONE_NOBEACONS;
 		}
-		if (flags & IEEE80211_CLONE_NOBEACONS)
+		if (flags & IEEE80211_CLONE_NOBEACONS) {
+			/*
+			 * Station mode w/o beacons are implemented w/ AP mode.
+			 */
 			ic_opmode = IEEE80211_M_HOSTAP;
-		else
-			ic_opmode = opmode;
+		}
 		break;
 	case IEEE80211_M_IBSS:
 		if (sc->sc_nvaps != 0) {	/* XXX only 1 for now */
@@ -887,12 +890,16 @@ ath_vap_create(struct ieee80211com *ic,
 			    "only 1 ibss vap supported\n");
 			goto bad;
 		}
-		ic_opmode = opmode;
 		needbeacon = 1;
 		break;
 	case IEEE80211_M_AHDEMO:
 #ifdef IEEE80211_SUPPORT_TDMA
 		if (flags & IEEE80211_CLONE_TDMA) {
+			if (sc->sc_nvaps != 0) {
+				device_printf(sc->sc_dev,
+				    "only 1 tdma vap supported\n");
+				goto bad;
+			}
 			needbeacon = 1;
 			flags |= IEEE80211_CLONE_NOBEACONS;
 		}
@@ -900,29 +907,34 @@ ath_vap_create(struct ieee80211com *ic,
 #endif
 	case IEEE80211_M_MONITOR:
 		if (sc->sc_nvaps != 0 && ic->ic_opmode != opmode) {
+			/*
+			 * Adopt existing mode.  Adding a monitor or ahdemo
+			 * vap to an existing configuration is of dubious
+			 * value but should be ok.
+			 */
 			/* XXX not right for monitor mode */
 			ic_opmode = ic->ic_opmode;
-		} else
-			ic_opmode = opmode;
+		}
 		break;
 	case IEEE80211_M_HOSTAP:
 		needbeacon = 1;
-		/* fall thru... */
+		break;
 	case IEEE80211_M_WDS:
-		if (sc->sc_nvaps && ic->ic_opmode == IEEE80211_M_STA) {
+		if (sc->sc_nvaps != 0 && ic->ic_opmode == IEEE80211_M_STA) {
 			device_printf(sc->sc_dev,
 			    "wds not supported in sta mode\n");
 			goto bad;
 		}
-		if (opmode == IEEE80211_M_WDS) {
-			/*
-			 * Silently remove any request for a unique
-			 * bssid; WDS vap's always share the local
-			 * mac address.
-			 */
-			flags &= ~IEEE80211_CLONE_BSSID;
-		}
-		ic_opmode = IEEE80211_M_HOSTAP;
+		/*
+		 * Silently remove any request for a unique
+		 * bssid; WDS vap's always share the local
+		 * mac address.
+		 */
+		flags &= ~IEEE80211_CLONE_BSSID;
+		if (sc->sc_nvaps == 0)
+			ic_opmode = IEEE80211_M_HOSTAP;
+		else
+			ic_opmode = ic->ic_opmode;
 		break;
 	default:
 		device_printf(sc->sc_dev, "unknown opmode %d\n", opmode);

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 00:35:33 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 558951065670;
	Thu,  7 May 2009 00:35:33 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 43A9D8FC17;
	Thu,  7 May 2009 00:35:33 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n470ZXrp034696;
	Thu, 7 May 2009 00:35:33 GMT (envelope-from sam@svn.freebsd.org)
Received: (from sam@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n470ZX7V034694;
	Thu, 7 May 2009 00:35:33 GMT (envelope-from sam@svn.freebsd.org)
Message-Id: <200905070035.n470ZX7V034694@svn.freebsd.org>
From: Sam Leffler 
Date: Thu, 7 May 2009 00:35:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191866 - head/sys/dev/ath
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 00:35:33 -0000

Author: sam
Date: Thu May  7 00:35:32 2009
New Revision: 191866
URL: http://svn.freebsd.org/changeset/base/191866

Log:
  optimize ath_tx_findrix: there's no need to walk the rates table as
  sc_rixmap is an inverse map
  
  NB: could eliminate the check for an invalid rate by filling in 0 for
      invalid entries but the rate control modules use it to identify
      bogus rates so leave it for now

Modified:
  head/sys/dev/ath/if_ath.c

Modified: head/sys/dev/ath/if_ath.c
==============================================================================
--- head/sys/dev/ath/if_ath.c	Wed May  6 23:49:55 2009	(r191865)
+++ head/sys/dev/ath/if_ath.c	Thu May  7 00:35:32 2009	(r191866)
@@ -4222,17 +4222,15 @@ ath_tx_cleanup(struct ath_softc *sc)
 }
 
 /*
- * Return h/w rate index for an IEEE rate (w/o basic rate bit).
+ * Return h/w rate index for an IEEE rate (w/o basic rate bit)
+ * using the current rates in sc_rixmap.
  */
-static int
-ath_tx_findrix(const HAL_RATE_TABLE *rt, int rate)
+static __inline int
+ath_tx_findrix(const struct ath_softc *sc, uint8_t rate)
 {
-	int i;
-
-	for (i = 0; i < rt->rateCount; i++)
-		if ((rt->info[i].dot11Rate & IEEE80211_RATE_VAL) == rate)
-			return i;
-	return 0;		/* NB: lowest rate */
+	int rix = sc->sc_rixmap[rate];
+	/* NB: return lowest rix for invalid rate */
+	return (rix == 0xff ? 0 : rix);
 }
 
 /*
@@ -5760,8 +5758,8 @@ ath_newassoc(struct ieee80211_node *ni, 
 	struct ath_softc *sc = vap->iv_ic->ic_ifp->if_softc;
 	const struct ieee80211_txparam *tp = ni->ni_txparms;
 
-	an->an_mcastrix = ath_tx_findrix(sc->sc_currates, tp->mcastrate);
-	an->an_mgmtrix = ath_tx_findrix(sc->sc_currates, tp->mgmtrate);
+	an->an_mcastrix = ath_tx_findrix(sc, tp->mcastrate);
+	an->an_mgmtrix = ath_tx_findrix(sc, tp->mgmtrate);
 
 	ath_rate_newassoc(sc, an, isnew);
 	if (isnew && 
@@ -6009,9 +6007,9 @@ ath_setcurmode(struct ath_softc *sc, enu
 	 * 11g, otherwise at 1Mb/s.
 	 */
 	if (mode == IEEE80211_MODE_11G)
-		sc->sc_protrix = ath_tx_findrix(rt, 2*2);
+		sc->sc_protrix = ath_tx_findrix(sc, 2*2);
 	else
-		sc->sc_protrix = ath_tx_findrix(rt, 2*1);
+		sc->sc_protrix = ath_tx_findrix(sc, 2*1);
 	/* NB: caller is responsible for reseting rate control state */
 #undef N
 }
@@ -6749,7 +6747,7 @@ ath_tx_raw_start(struct ath_softc *sc, s
 
 	rt = sc->sc_currates;
 	KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));
-	rix = ath_tx_findrix(rt, params->ibp_rate0);
+	rix = ath_tx_findrix(sc, params->ibp_rate0);
 	txrate = rt->info[rix].rateCode;
 	if (params->ibp_flags & IEEE80211_BPF_SHORTPRE)
 		txrate |= rt->info[rix].shortPreamble;
@@ -6761,7 +6759,7 @@ ath_tx_raw_start(struct ath_softc *sc, s
 		txantenna = sc->sc_txantenna;
 	ctsduration = 0;
 	if (flags & (HAL_TXDESC_CTSENA | HAL_TXDESC_RTSENA)) {
-		cix = ath_tx_findrix(rt, params->ibp_ctsrate);
+		cix = ath_tx_findrix(sc, params->ibp_ctsrate);
 		ctsrate = rt->info[cix].rateCode;
 		if (params->ibp_flags & IEEE80211_BPF_SHORTPRE) {
 			ctsrate |= rt->info[cix].shortPreamble;
@@ -6827,19 +6825,19 @@ ath_tx_raw_start(struct ath_softc *sc, s
 	bf->bf_txflags = flags;
 
 	if (ismrr) {
-		rix = ath_tx_findrix(rt, params->ibp_rate1);
+		rix = ath_tx_findrix(sc, params->ibp_rate1);
 		rate1 = rt->info[rix].rateCode;
 		if (params->ibp_flags & IEEE80211_BPF_SHORTPRE)
 			rate1 |= rt->info[rix].shortPreamble;
 		if (params->ibp_try2) {
-			rix = ath_tx_findrix(rt, params->ibp_rate2);
+			rix = ath_tx_findrix(sc, params->ibp_rate2);
 			rate2 = rt->info[rix].rateCode;
 			if (params->ibp_flags & IEEE80211_BPF_SHORTPRE)
 				rate2 |= rt->info[rix].shortPreamble;
 		} else
 			rate2 = 0;
 		if (params->ibp_try3) {
-			rix = ath_tx_findrix(rt, params->ibp_rate3);
+			rix = ath_tx_findrix(sc, params->ibp_rate3);
 			rate3 = rt->info[rix].rateCode;
 			if (params->ibp_flags & IEEE80211_BPF_SHORTPRE)
 				rate3 |= rt->info[rix].shortPreamble;
@@ -7063,9 +7061,9 @@ ath_tdma_config(struct ath_softc *sc, st
 	 */
 	tdma = vap->iv_tdma;
 	if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE)
-		rix = ath_tx_findrix(sc->sc_currates, tp->ucastrate);
+		rix = ath_tx_findrix(sc, tp->ucastrate);
 	else
-		rix = ath_tx_findrix(sc->sc_currates, tp->mcastrate);
+		rix = ath_tx_findrix(sc, tp->mcastrate);
 	/* XXX short preamble assumed */
 	sc->sc_tdmaguard = ath_hal_computetxtime(ah, sc->sc_currates,
 		ifp->if_mtu + IEEE80211_MAXOVERHEAD, rix, AH_TRUE);

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 01:14:59 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8A229106566C;
	Thu,  7 May 2009 01:14:59 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 770B48FC18;
	Thu,  7 May 2009 01:14:59 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n471ExG6035632;
	Thu, 7 May 2009 01:14:59 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n471Exp3035631;
	Thu, 7 May 2009 01:14:59 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <200905070114.n471Exp3035631@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Thu, 7 May 2009 01:14:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191867 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb dev/fxp
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 01:15:00 -0000

Author: yongari
Date: Thu May  7 01:14:59 2009
New Revision: 191867
URL: http://svn.freebsd.org/changeset/base/191867

Log:
  MFC r190982:
    Don't blindly set IP packet length from interface MTU in TSO case.
    Remote host can advertise smaller MSS than that of sender so upper
    stack might have adjusted the MSS which in turn generates IP
    packets that are less size than that of interface MTU.
  
    Reported by:	Bjoern Koenig ( bkoenig <> alpha-tierchen dot de )

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/dev/fxp/if_fxp.c

Modified: stable/7/sys/dev/fxp/if_fxp.c
==============================================================================
--- stable/7/sys/dev/fxp/if_fxp.c	Thu May  7 00:35:32 2009	(r191866)
+++ stable/7/sys/dev/fxp/if_fxp.c	Thu May  7 01:14:59 2009	(r191867)
@@ -1486,7 +1486,8 @@ fxp_encap(struct fxp_softc *sc, struct m
 		 * checksum in the first frame driver should compute it.
 		 */
 		ip->ip_sum = 0;
-		ip->ip_len = htons(ifp->if_mtu);
+		ip->ip_len = htons(m->m_pkthdr.tso_segsz + (ip->ip_hl << 2) +
+		    (tcp->th_off << 2));
 		tcp->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr,
 		    htons(IPPROTO_TCP + (tcp->th_off << 2) +
 		    m->m_pkthdr.tso_segsz));

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 02:13:57 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1936C1065670;
	Thu,  7 May 2009 02:13:57 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 061558FC13;
	Thu,  7 May 2009 02:13:57 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n472Du3R036937;
	Thu, 7 May 2009 02:13:56 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n472Dukv036936;
	Thu, 7 May 2009 02:13:56 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200905070213.n472Dukv036936@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 7 May 2009 02:13:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191868 - head/sys/dev/usb/serial
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 02:13:57 -0000

Author: thompsa
Date: Thu May  7 02:13:56 2009
New Revision: 191868
URL: http://svn.freebsd.org/changeset/base/191868

Log:
  Use vendor and product macro expansion to make the device table smaller and
  more readable.

Modified:
  head/sys/dev/usb/serial/u3g.c

Modified: head/sys/dev/usb/serial/u3g.c
==============================================================================
--- head/sys/dev/usb/serial/u3g.c	Thu May  7 01:14:59 2009	(r191867)
+++ head/sys/dev/usb/serial/u3g.c	Thu May  7 02:13:56 2009	(r191868)
@@ -71,7 +71,6 @@ SYSCTL_INT(_hw_usb2_u3g, OID_AUTO, debug
 #define	U3GSP_HSPA		6
 #define	U3GSP_MAX		7
 
-#define	U3GFL_NONE		0x0000	/* No flags */
 #define	U3GFL_HUAWEI_INIT	0x0001	/* Init command required */
 #define	U3GFL_SCSI_EJECT	0x0002	/* SCSI eject command required */
 #define	U3GFL_SIERRA_INIT	0x0004	/* Init command required */
@@ -158,70 +157,70 @@ MODULE_DEPEND(u3g, ucom, 1, 1, 1);
 MODULE_DEPEND(u3g, usb, 1, 1, 1);
 
 static const struct usb2_device_id u3g_devs[] = {
+#define	U3G_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) }
 	/* OEM: Option */
-	{USB_VPI(USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GT3G, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GT3GQUAD, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GT3GPLUS, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAX36, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAXHSUPA, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_OPTION, USB_PRODUCT_OPTION_VODAFONEMC3G, U3GFL_NONE)},
+	U3G_DEV(OPTION, GT3G, 0),
+	U3G_DEV(OPTION, GT3GQUAD, 0),
+	U3G_DEV(OPTION, GT3GPLUS, 0),
+	U3G_DEV(OPTION, GTMAX36, 0),
+	U3G_DEV(OPTION, GTMAXHSUPA, 0),
+	U3G_DEV(OPTION, VODAFONEMC3G, 0),
 	/* OEM: Qualcomm, Inc. */
-	{USB_VPI(USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_ZTE_STOR, U3GFL_SCSI_EJECT)},
-	{USB_VPI(USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_CDMA_MSM, U3GFL_SCSI_EJECT)},
+	U3G_DEV(QUALCOMMINC, ZTE_STOR, U3GFL_SCSI_EJECT),
+	U3G_DEV(QUALCOMMINC, CDMA_MSM, U3GFL_SCSI_EJECT),
 	/* OEM: Huawei */
-	{USB_VPI(USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_MOBILE, U3GFL_HUAWEI_INIT)},
-	{USB_VPI(USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E220, U3GFL_HUAWEI_INIT)},
+	U3G_DEV(HUAWEI, MOBILE, U3GFL_HUAWEI_INIT),
+	U3G_DEV(HUAWEI, E220, U3GFL_HUAWEI_INIT),
 	/* OEM: Novatel */
-	{USB_VPI(USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_CDMA_MODEM, U3GFL_SCSI_EJECT)},
-	{USB_VPI(USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_ES620, U3GFL_SCSI_EJECT)},
-	{USB_VPI(USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_MC950D, U3GFL_SCSI_EJECT)},
-	{USB_VPI(USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U720, U3GFL_SCSI_EJECT)},
-	{USB_VPI(USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U727, U3GFL_SCSI_EJECT)},
-	{USB_VPI(USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U740, U3GFL_SCSI_EJECT)},
-	{USB_VPI(USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U740_2, U3GFL_SCSI_EJECT)},
-	{USB_VPI(USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U870, U3GFL_SCSI_EJECT)},
-	{USB_VPI(USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V620, U3GFL_SCSI_EJECT)},
-	{USB_VPI(USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V640, U3GFL_SCSI_EJECT)},
-	{USB_VPI(USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V720, U3GFL_SCSI_EJECT)},
-	{USB_VPI(USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V740, U3GFL_SCSI_EJECT)},
-	{USB_VPI(USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_X950D, U3GFL_SCSI_EJECT)},
-	{USB_VPI(USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_XU870, U3GFL_SCSI_EJECT)},
-	{USB_VPI(USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_ZEROCD, U3GFL_SCSI_EJECT)},
-	{USB_VPI(USB_VENDOR_DELL, USB_PRODUCT_DELL_U740, U3GFL_SCSI_EJECT)},
+	U3G_DEV(NOVATEL, CDMA_MODEM, 0),
+	U3G_DEV(NOVATEL, ES620, 0),
+	U3G_DEV(NOVATEL, MC950D, 0),
+	U3G_DEV(NOVATEL, U720, 0),
+	U3G_DEV(NOVATEL, U727, 0),
+	U3G_DEV(NOVATEL, U740, 0),
+	U3G_DEV(NOVATEL, U740_2, 0),
+	U3G_DEV(NOVATEL, U870, 0),
+	U3G_DEV(NOVATEL, V620, 0),
+	U3G_DEV(NOVATEL, V640, 0),
+	U3G_DEV(NOVATEL, V720, 0),
+	U3G_DEV(NOVATEL, V740, 0),
+	U3G_DEV(NOVATEL, X950D, 0),
+	U3G_DEV(NOVATEL, XU870, 0),
+	U3G_DEV(NOVATEL, ZEROCD, U3GFL_SCSI_EJECT),
+	U3G_DEV(DELL, U740, 0),
 	/* OEM: Merlin */
-	{USB_VPI(USB_VENDOR_MERLIN, USB_PRODUCT_MERLIN_V620, U3GFL_NONE)},
+	U3G_DEV(MERLIN, V620, 0),
 	/* OEM: Sierra Wireless: */
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AIRCARD580, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AIRCARD595, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC595U, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC597E, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_C597, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC880, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC880E, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC880U, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC881, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC881E, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC881U, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_EM5625, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720_2, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5725, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MINI5725, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AIRCARD875, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8755, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8755_2, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8755_3, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8765, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC875U, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8775_2, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_HP, USB_PRODUCT_HP_HS2300, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8780, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8781, U3GFL_NONE)},
-	{USB_VPI(USB_VENDOR_HP, USB_PRODUCT_HP_HS2300, U3GFL_NONE)},
+	U3G_DEV(SIERRA, AIRCARD580, 0),
+	U3G_DEV(SIERRA, AIRCARD595, 0),
+	U3G_DEV(SIERRA, AC595U, 0),
+	U3G_DEV(SIERRA, AC597E, 0),
+	U3G_DEV(SIERRA, C597, 0),
+	U3G_DEV(SIERRA, AC880, 0),
+	U3G_DEV(SIERRA, AC880E, 0),
+	U3G_DEV(SIERRA, AC880U, 0),
+	U3G_DEV(SIERRA, AC881, 0),
+	U3G_DEV(SIERRA, AC881E, 0),
+	U3G_DEV(SIERRA, AC881U, 0),
+	U3G_DEV(SIERRA, EM5625, 0),
+	U3G_DEV(SIERRA, MC5720, 0),
+	U3G_DEV(SIERRA, MC5720_2, 0),
+	U3G_DEV(SIERRA, MC5725, 0),
+	U3G_DEV(SIERRA, MINI5725, 0),
+	U3G_DEV(SIERRA, AIRCARD875, 0),
+	U3G_DEV(SIERRA, MC8755, 0),
+	U3G_DEV(SIERRA, MC8755_2, 0),
+	U3G_DEV(SIERRA, MC8755_3, 0),
+	U3G_DEV(SIERRA, MC8765, 0),
+	U3G_DEV(SIERRA, AC875U, 0),
+	U3G_DEV(SIERRA, MC8775_2, 0),
+	U3G_DEV(SIERRA, MC8780, 0),
+	U3G_DEV(SIERRA, MC8781, 0),
+	U3G_DEV(HP, HS2300, 0),
 	/* Sierra TruInstaller device ID */
-	{USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_TRUINSTALL, U3GFL_SIERRA_INIT)},
+	U3G_DEV(SIERRA, TRUINSTALL, U3GFL_SIERRA_INIT),
 	/* PRUEBA SILABS */
-	{USB_VPI(USB_VENDOR_SILABS, USB_PRODUCT_SILABS_SAEL, U3GFL_SAEL_M460_INIT)},
+	U3G_DEV(SILABS, SAEL, U3GFL_SAEL_M460_INIT),
 };
 
 static void

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 02:15:59 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0B052106566B;
	Thu,  7 May 2009 02:15:59 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id ED4348FC1E;
	Thu,  7 May 2009 02:15:58 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n472FwGX037026;
	Thu, 7 May 2009 02:15:58 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n472Fwfa037025;
	Thu, 7 May 2009 02:15:58 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200905070215.n472Fwfa037025@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 7 May 2009 02:15:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191869 - head/sys/dev/usb/serial
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 02:15:59 -0000

Author: thompsa
Date: Thu May  7 02:15:58 2009
New Revision: 191869
URL: http://svn.freebsd.org/changeset/base/191869

Log:
  - Fix the u3g port detection where it would not calculate the correct number of
    ports when multiple interfaces are present.
  - Claim all interfaces regardless of how many are attached

Modified:
  head/sys/dev/usb/serial/u3g.c

Modified: head/sys/dev/usb/serial/u3g.c
==============================================================================
--- head/sys/dev/usb/serial/u3g.c	Thu May  7 02:13:56 2009	(r191868)
+++ head/sys/dev/usb/serial/u3g.c	Thu May  7 02:15:58 2009	(r191869)
@@ -439,12 +439,9 @@ u3g_attach(device_t dev)
 	struct u3g_softc *sc = device_get_softc(dev);
 	struct usb2_interface *iface;
 	struct usb2_interface_descriptor *id;
-	uint32_t flags;
-	uint8_t m;
-	uint8_t n;
+	int error, iface_valid, flags, nports;
+	int ep, n;
 	uint8_t i;
-	uint8_t x;
-	int error;
 
 	DPRINTF("sc=%p\n", sc);
 
@@ -462,72 +459,68 @@ u3g_attach(device_t dev)
 
 	sc->sc_udev = uaa->device;
 
-	x = 0;		/* interface index */
-	i = 0;		/* endpoint index */
-	m = 0;		/* number of ports */
-
-	while (m != U3G_MAXPORTS) {
-
-		/* update BULK endpoint index */
-		for (n = 0; n != U3G_N_TRANSFER; n++) 
-			u3g_config_tmp[n].ep_index = i;
-
-		iface = usb2_get_iface(uaa->device, x);
-		if (iface == NULL) {
-			if (m != 0)
-				break;	/* end of interfaces */
-			DPRINTF("did not find any modem endpoints\n");
-			goto detach;
-		}
-
+	/* Claim all interfaces on the device */
+	iface_valid = 0;
+	for (i = uaa->info.bIfaceIndex; i < USB_IFACE_MAX; i++) {
+		iface = usb2_get_iface(uaa->device, i);
+		if (iface == NULL)
+			break;
 		id = usb2_get_interface_descriptor(iface);
-		if ((id == NULL) || 
-		    (id->bInterfaceClass != UICLASS_VENDOR)) {
-			/* next interface */
-			x++;
-			i = 0;
+		if (id == NULL || id->bInterfaceClass != UICLASS_VENDOR)
+			continue;
+		usb2_set_parent_iface(uaa->device, i, uaa->info.bIfaceIndex);
+		iface_valid |= (1<device, &x,
-		    sc->sc_xfer[m], u3g_config_tmp, U3G_N_TRANSFER, 
-		    &sc->sc_ucom[m], &sc->sc_mtx);
+		error = usb2_transfer_setup(uaa->device, &i,
+		    sc->sc_xfer[nports], u3g_config_tmp, U3G_N_TRANSFER,
+		    &sc->sc_ucom[nports], &sc->sc_mtx);
 		if (error) {
 			/* next interface */
-			x++;
-			i = 0;
+			i++;
+			ep = 0;
 			continue;
 		}
 
-		/* grab other interface, if any */
-                if (x != uaa->info.bIfaceIndex)
-                        usb2_set_parent_iface(uaa->device, x,
-                            uaa->info.bIfaceIndex);
-
 		/* set stall by default */
 		mtx_lock(&sc->sc_mtx);
-		usb2_transfer_set_stall(sc->sc_xfer[m][U3G_BULK_WR]);
-		usb2_transfer_set_stall(sc->sc_xfer[m][U3G_BULK_RD]);
+		usb2_transfer_set_stall(sc->sc_xfer[nports][U3G_BULK_WR]);
+		usb2_transfer_set_stall(sc->sc_xfer[nports][U3G_BULK_RD]);
 		mtx_unlock(&sc->sc_mtx);
 
-		m++;	/* found one port */
-		i++;	/* next endpoint index */
+		nports++;	/* found one port */
+		ep++;
+		if (nports == U3G_MAXPORTS)
+			break;
 	}
+	if (nports == 0) {
+		device_printf(dev, "no ports found\n");
+		goto detach;
+	}
+	sc->sc_numports = nports;
 
-	sc->sc_numports = m;
-
-	error = usb2_com_attach(&sc->sc_super_ucom, sc->sc_ucom, 
+	error = usb2_com_attach(&sc->sc_super_ucom, sc->sc_ucom,
 	    sc->sc_numports, sc, &u3g_callback, &sc->sc_mtx);
 	if (error) {
 		DPRINTF("usb2_com_attach failed\n");
 		goto detach;
 	}
-	if (sc->sc_numports != 1) {
-		/* be verbose */
-		device_printf(dev, "Found %u ports.\n",
-		    (unsigned int)sc->sc_numports);
-	}
+	if (sc->sc_numports > 1)
+		device_printf(dev, "Found %u ports.\n", sc->sc_numports);
 	return (0);
 
 detach:

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 02:17:10 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 06AF4106566B;
	Thu,  7 May 2009 02:17:10 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E8D458FC0C;
	Thu,  7 May 2009 02:17:09 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n472H9Xn037086;
	Thu, 7 May 2009 02:17:09 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n472H9vE037085;
	Thu, 7 May 2009 02:17:09 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200905070217.n472H9vE037085@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 7 May 2009 02:17:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191870 - head/sys/dev/usb/serial
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 02:17:10 -0000

Author: thompsa
Date: Thu May  7 02:17:09 2009
New Revision: 191870
URL: http://svn.freebsd.org/changeset/base/191870

Log:
  Add the Sierra AC885U and increase the max ports to 8.

Modified:
  head/sys/dev/usb/serial/u3g.c

Modified: head/sys/dev/usb/serial/u3g.c
==============================================================================
--- head/sys/dev/usb/serial/u3g.c	Thu May  7 02:15:58 2009	(r191869)
+++ head/sys/dev/usb/serial/u3g.c	Thu May  7 02:17:09 2009	(r191870)
@@ -58,7 +58,7 @@ SYSCTL_INT(_hw_usb2_u3g, OID_AUTO, debug
     &u3g_debug, 0, "Debug level");
 #endif
 
-#define	U3G_MAXPORTS		4
+#define	U3G_MAXPORTS		8
 #define	U3G_CONFIG_INDEX	0
 #define	U3G_BSIZE		2048
 
@@ -202,6 +202,7 @@ static const struct usb2_device_id u3g_d
 	U3G_DEV(SIERRA, AC881, 0),
 	U3G_DEV(SIERRA, AC881E, 0),
 	U3G_DEV(SIERRA, AC881U, 0),
+	U3G_DEV(SIERRA, AC885U, 0),
 	U3G_DEV(SIERRA, EM5625, 0),
 	U3G_DEV(SIERRA, MC5720, 0),
 	U3G_DEV(SIERRA, MC5720_2, 0),

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 03:23:22 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DAA24106564A;
	Thu,  7 May 2009 03:23:22 +0000 (UTC)
	(envelope-from dchagin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C93118FC13;
	Thu,  7 May 2009 03:23:22 +0000 (UTC)
	(envelope-from dchagin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n473NM71038830;
	Thu, 7 May 2009 03:23:22 GMT (envelope-from dchagin@svn.freebsd.org)
Received: (from dchagin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n473NM0o038829;
	Thu, 7 May 2009 03:23:22 GMT (envelope-from dchagin@svn.freebsd.org)
Message-Id: <200905070323.n473NM0o038829@svn.freebsd.org>
From: Dmitry Chagin 
Date: Thu, 7 May 2009 03:23:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191871 - head/sys/compat/linux
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 03:23:23 -0000

Author: dchagin
Date: Thu May  7 03:23:22 2009
New Revision: 191871
URL: http://svn.freebsd.org/changeset/base/191871

Log:
  Rework r191742.
  Use the protocol family constants for the domain argument validation.
  
  Return EAFNOSUPPORT in case when the incorrect domain argument
  is specified.
  
  Return EPROTONOSUPPORT instead of passing values that are not 0
  to the BSD layer.
  
  Suggested by:   rwatson
  
  Approved by:	kib (mentor)
  MFC after:	1 month

Modified:
  head/sys/compat/linux/linux_socket.c

Modified: head/sys/compat/linux/linux_socket.c
==============================================================================
--- head/sys/compat/linux/linux_socket.c	Thu May  7 02:17:09 2009	(r191870)
+++ head/sys/compat/linux/linux_socket.c	Thu May  7 03:23:22 2009	(r191871)
@@ -855,14 +855,21 @@ linux_socketpair(struct thread *td, stru
 	} */ bsd_args;
 
 	bsd_args.domain = linux_to_bsd_domain(args->domain);
-	if (bsd_args.domain == -1)
-		return (EINVAL);
+	if (bsd_args.domain != PF_LOCAL)
+		return (EAFNOSUPPORT);
 
 	bsd_args.type = args->type;
-	if (bsd_args.domain == AF_LOCAL && args->protocol == PF_UNIX)
-		bsd_args.protocol = 0;
+	if (args->protocol != 0 && args->protocol != PF_UNIX)
+
+		/*
+		 * Use of PF_UNIX as protocol argument is not right,
+		 * but Linux does it.
+		 * Do not map PF_UNIX as its Linux value is identical
+		 * to FreeBSD one.
+		 */
+		return (EPROTONOSUPPORT);
 	else
-		bsd_args.protocol = args->protocol;
+		bsd_args.protocol = 0;
 	bsd_args.rsv = (int *)PTRIN(args->rsv);
 	return (socketpair(td, &bsd_args));
 }

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 05:42:13 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C91CF106566B;
	Thu,  7 May 2009 05:42:13 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B7A6D8FC2A;
	Thu,  7 May 2009 05:42:13 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n475gDft041777;
	Thu, 7 May 2009 05:42:13 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n475gDxe041775;
	Thu, 7 May 2009 05:42:13 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <200905070542.n475gDxe041775@svn.freebsd.org>
From: Alan Cox 
Date: Thu, 7 May 2009 05:42:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191873 - in head/sys/arm: arm include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 05:42:14 -0000

Author: alc
Date: Thu May  7 05:42:13 2009
New Revision: 191873
URL: http://svn.freebsd.org/changeset/base/191873

Log:
  Define the kernel pmap in the same way on arm as on every other
  architecture.
  
  Eliminate an unused definition.
  
  Tested by:	cognet

Modified:
  head/sys/arm/arm/pmap.c
  head/sys/arm/include/pmap.h

Modified: head/sys/arm/arm/pmap.c
==============================================================================
--- head/sys/arm/arm/pmap.c	Thu May  7 03:39:23 2009	(r191872)
+++ head/sys/arm/arm/pmap.c	Thu May  7 05:42:13 2009	(r191873)
@@ -224,7 +224,6 @@ extern void *end;
 vm_offset_t kernel_vm_end = 0;
 
 struct pmap kernel_pmap_store;
-pmap_t kernel_pmap;
 
 static pt_entry_t *csrc_pte, *cdst_pte;
 static vm_offset_t csrcp, cdstp;
@@ -2337,7 +2336,6 @@ pmap_bootstrap(vm_offset_t firstaddr, vm
 	    firstaddr, loadaddr));
 	
 	virtual_avail = firstaddr;
-	kernel_pmap = &kernel_pmap_store;
 	kernel_pmap->pm_l1 = l1;
 	kernel_l1pa = l1pt->pv_pa;
 	

Modified: head/sys/arm/include/pmap.h
==============================================================================
--- head/sys/arm/include/pmap.h	Thu May  7 03:39:23 2009	(r191872)
+++ head/sys/arm/include/pmap.h	Thu May  7 05:42:13 2009	(r191873)
@@ -138,7 +138,8 @@ struct	pmap {
 typedef struct pmap *pmap_t;
 
 #ifdef _KERNEL
-extern pmap_t	kernel_pmap;
+extern struct pmap	kernel_pmap_store;
+#define kernel_pmap	(&kernel_pmap_store)
 #define pmap_kernel() kernel_pmap
 
 #define	PMAP_ASSERT_LOCKED(pmap) \
@@ -166,8 +167,6 @@ typedef struct pv_entry {
 	int		pv_flags;	/* flags (wired, etc...) */
 } *pv_entry_t;
 
-#define PV_ENTRY_NULL   ((pv_entry_t) 0)
-
 #ifdef _KERNEL
 
 boolean_t pmap_get_pde_pte(pmap_t, vm_offset_t, pd_entry_t **, pt_entry_t **);

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 05:44:14 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F40D61065670;
	Thu,  7 May 2009 05:44:13 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C92CF8FC22;
	Thu,  7 May 2009 05:44:13 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n475iDam041933;
	Thu, 7 May 2009 05:44:13 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n475iDN7041932;
	Thu, 7 May 2009 05:44:13 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <200905070544.n475iDN7041932@svn.freebsd.org>
From: Alan Cox 
Date: Thu, 7 May 2009 05:44:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191874 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 05:44:14 -0000

Author: alc
Date: Thu May  7 05:44:13 2009
New Revision: 191874
URL: http://svn.freebsd.org/changeset/base/191874

Log:
  Eliminate an incorrect comment.

Modified:
  head/sys/vm/vm_fault.c

Modified: head/sys/vm/vm_fault.c
==============================================================================
--- head/sys/vm/vm_fault.c	Thu May  7 05:42:13 2009	(r191873)
+++ head/sys/vm/vm_fault.c	Thu May  7 05:44:13 2009	(r191874)
@@ -1248,8 +1248,6 @@ vm_fault_copy_entry(dst_map, src_map, ds
  *
  * Return value:
  *  number of pages in marray
- *
- * This routine can't block.
  */
 static int
 vm_fault_additional_pages(m, rbehind, rahead, marray, reqpage)

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 09:34:03 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 60588106566B;
	Thu,  7 May 2009 09:34:03 +0000 (UTC)
	(envelope-from dchagin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4E77E8FC12;
	Thu,  7 May 2009 09:34:03 +0000 (UTC)
	(envelope-from dchagin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n479Y25v047901;
	Thu, 7 May 2009 09:34:02 GMT (envelope-from dchagin@svn.freebsd.org)
Received: (from dchagin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n479Y2MM047900;
	Thu, 7 May 2009 09:34:02 GMT (envelope-from dchagin@svn.freebsd.org)
Message-Id: <200905070934.n479Y2MM047900@svn.freebsd.org>
From: Dmitry Chagin 
Date: Thu, 7 May 2009 09:34:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191875 - head/sys/compat/linux
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 09:34:03 -0000

Author: dchagin
Date: Thu May  7 09:34:02 2009
New Revision: 191875
URL: http://svn.freebsd.org/changeset/base/191875

Log:
  Return EAFNOSUPPORT instead of EINVAL in case when the incorrect or
  unsupported domain argument is specified.
  
  Approved by:	kib (mentor)

Modified:
  head/sys/compat/linux/linux_socket.c

Modified: head/sys/compat/linux/linux_socket.c
==============================================================================
--- head/sys/compat/linux/linux_socket.c	Thu May  7 05:44:13 2009	(r191874)
+++ head/sys/compat/linux/linux_socket.c	Thu May  7 09:34:02 2009	(r191875)
@@ -599,7 +599,7 @@ linux_socket(struct thread *td, struct l
 	bsd_args.type = args->type;
 	bsd_args.domain = linux_to_bsd_domain(args->domain);
 	if (bsd_args.domain == -1)
-		return (EINVAL);
+		return (EAFNOSUPPORT);
 
 	retval_socket = socket(td, &bsd_args);
 	if (bsd_args.type == SOCK_RAW

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 09:39:21 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7F5CF106566B;
	Thu,  7 May 2009 09:39:21 +0000 (UTC)
	(envelope-from dchagin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5284A8FC0C;
	Thu,  7 May 2009 09:39:21 +0000 (UTC)
	(envelope-from dchagin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n479dKk8048034;
	Thu, 7 May 2009 09:39:20 GMT (envelope-from dchagin@svn.freebsd.org)
Received: (from dchagin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n479dKUg048030;
	Thu, 7 May 2009 09:39:20 GMT (envelope-from dchagin@svn.freebsd.org)
Message-Id: <200905070939.n479dKUg048030@svn.freebsd.org>
From: Dmitry Chagin 
Date: Thu, 7 May 2009 09:39:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191876 - in head/sys: amd64/linux32 compat/linux
	i386/linux
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 09:39:21 -0000

Author: dchagin
Date: Thu May  7 09:39:20 2009
New Revision: 191876
URL: http://svn.freebsd.org/changeset/base/191876

Log:
  To avoid excessive code duplication move MI definitions to the MI
  header file. As it is defined in Linux.
  
  Approved by:	kib (mentor)
  MFC after:	1 month

Modified:
  head/sys/amd64/linux32/linux.h
  head/sys/compat/linux/linux_ioctl.c
  head/sys/compat/linux/linux_socket.h
  head/sys/i386/linux/linux.h

Modified: head/sys/amd64/linux32/linux.h
==============================================================================
--- head/sys/amd64/linux32/linux.h	Thu May  7 09:34:02 2009	(r191875)
+++ head/sys/amd64/linux32/linux.h	Thu May  7 09:39:20 2009	(r191876)
@@ -669,14 +669,6 @@ union l_semun {
 #define	LINUX_SENDMSG		16
 #define	LINUX_RECVMSG		17
 
-#define	LINUX_AF_UNSPEC		0
-#define	LINUX_AF_UNIX		1
-#define	LINUX_AF_INET		2
-#define	LINUX_AF_AX25		3
-#define	LINUX_AF_IPX		4
-#define	LINUX_AF_APPLETALK	5
-#define	LINUX_AF_INET6		10
-
 #define	LINUX_SOL_SOCKET	1
 #define	LINUX_SOL_IP		0
 #define	LINUX_SOL_IPX		256

Modified: head/sys/compat/linux/linux_ioctl.c
==============================================================================
--- head/sys/compat/linux/linux_ioctl.c	Thu May  7 09:34:02 2009	(r191875)
+++ head/sys/compat/linux/linux_ioctl.c	Thu May  7 09:39:20 2009	(r191876)
@@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
 
 CTASSERT(LINUX_IFNAMSIZ == IFNAMSIZ);

Modified: head/sys/compat/linux/linux_socket.h
==============================================================================
--- head/sys/compat/linux/linux_socket.h	Thu May  7 09:34:02 2009	(r191875)
+++ head/sys/compat/linux/linux_socket.h	Thu May  7 09:39:20 2009	(r191876)
@@ -80,4 +80,14 @@
 #define CMSG_HDRSZ		CMSG_LEN(0)
 #define L_CMSG_HDRSZ		LINUX_CMSG_LEN(0)
 
+/* Supported address families */
+
+#define	LINUX_AF_UNSPEC		0
+#define	LINUX_AF_UNIX		1
+#define	LINUX_AF_INET		2
+#define	LINUX_AF_AX25		3
+#define	LINUX_AF_IPX		4
+#define	LINUX_AF_APPLETALK	5
+#define	LINUX_AF_INET6		10
+
 #endif /* _LINUX_SOCKET_H_ */

Modified: head/sys/i386/linux/linux.h
==============================================================================
--- head/sys/i386/linux/linux.h	Thu May  7 09:34:02 2009	(r191875)
+++ head/sys/i386/linux/linux.h	Thu May  7 09:39:20 2009	(r191876)
@@ -645,14 +645,6 @@ union l_semun {
 #define	LINUX_SENDMSG		16
 #define	LINUX_RECVMSG		17
 
-#define	LINUX_AF_UNSPEC		0
-#define	LINUX_AF_UNIX		1
-#define	LINUX_AF_INET		2
-#define	LINUX_AF_AX25		3
-#define	LINUX_AF_IPX		4
-#define	LINUX_AF_APPLETALK	5
-#define	LINUX_AF_INET6		10
-
 #define	LINUX_SOL_SOCKET	1
 #define	LINUX_SOL_IP		0
 #define	LINUX_SOL_IPX		256

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 10:01:05 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C3D14106568E;
	Thu,  7 May 2009 10:01:05 +0000 (UTC)
	(envelope-from dchagin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A78A28FC1C;
	Thu,  7 May 2009 10:01:05 +0000 (UTC)
	(envelope-from dchagin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47A15qY048563;
	Thu, 7 May 2009 10:01:05 GMT (envelope-from dchagin@svn.freebsd.org)
Received: (from dchagin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47A15Rj048560;
	Thu, 7 May 2009 10:01:05 GMT (envelope-from dchagin@svn.freebsd.org)
Message-Id: <200905071001.n47A15Rj048560@svn.freebsd.org>
From: Dmitry Chagin 
Date: Thu, 7 May 2009 10:01:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191877 - in head/sys: compat/linux modules/linux
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 10:01:07 -0000

Author: dchagin
Date: Thu May  7 10:01:05 2009
New Revision: 191877
URL: http://svn.freebsd.org/changeset/base/191877

Log:
  Add preliminary KTR(9) support to the linux emulation layer.
  
  Approved by:	kib (mentor)
  MFC after:	1 month

Modified:
  head/sys/compat/linux/linux_mib.c
  head/sys/compat/linux/linux_util.h
  head/sys/modules/linux/Makefile

Modified: head/sys/compat/linux/linux_mib.c
==============================================================================
--- head/sys/compat/linux/linux_mib.c	Thu May  7 09:39:20 2009	(r191876)
+++ head/sys/compat/linux/linux_mib.c	Thu May  7 10:01:05 2009	(r191877)
@@ -318,7 +318,7 @@ linux_set_oss_version(struct thread *td,
 	return (0);
 }
 
-#ifdef DEBUG
+#if defined(DEBUG) || defined(KTR)
 
 u_char linux_debug_map[howmany(LINUX_SYS_MAXSYSCALL, sizeof(u_char))];
 
@@ -377,4 +377,4 @@ SYSCTL_PROC(_compat_linux, OID_AUTO, deb
             0, 0, linux_sysctl_debug, "A",
             "Linux debugging control");
 
-#endif /* DEBUG */
+#endif /* DEBUG || KTR */

Modified: head/sys/compat/linux/linux_util.h
==============================================================================
--- head/sys/compat/linux/linux_util.h	Thu May  7 09:39:20 2009	(r191876)
+++ head/sys/compat/linux/linux_util.h	Thu May  7 10:01:05 2009	(r191877)
@@ -106,4 +106,33 @@ int	linux_driver_get_major_minor(char *n
 char	*linux_get_char_devices(void);
 void	linux_free_get_char_devices(char *string);
 
+#if defined(KTR)
+
+#define	KTR_LINUX				KTR_SUBSYS
+#define	LINUX_CTRFMT(nm, fmt)	#nm"("fmt")"
+
+#define	LINUX_CTR6(f, m, p1, p2, p3, p4, p5, p6) do {			\
+	if (ldebug(f))							\
+		CTR6(KTR_LINUX, LINUX_CTRFMT(f, m),			\
+		    p1, p2, p3, p4, p5, p6);				\
+} while (0)
+
+#define	LINUX_CTR(f)			LINUX_CTR6(f, "", 0, 0, 0, 0, 0, 0)
+#define	LINUX_CTR0(f, m)		LINUX_CTR6(f, m, 0, 0, 0, 0, 0, 0)
+#define	LINUX_CTR1(f, m, p1)		LINUX_CTR6(f, m, p1, 0, 0, 0, 0, 0)
+#define	LINUX_CTR2(f, m, p1, p2)	LINUX_CTR6(f, m, p1, p2, 0, 0, 0, 0)
+#define	LINUX_CTR3(f, m, p1, p2, p3)	LINUX_CTR6(f, m, p1, p2, p3, 0, 0, 0)
+#define	LINUX_CTR4(f, m, p1, p2, p3, p4)	LINUX_CTR6(f, m, p1, p2, p3, p4, 0, 0)
+#define	LINUX_CTR5(f, m, p1, p2, p3, p4, p5)	LINUX_CTR6(f, m, p1, p2, p3, p4, p5, 0)
+#else
+#define	LINUX_CTR(f)
+#define	LINUX_CTR0(f, m)
+#define	LINUX_CTR1(f, m, p1)
+#define	LINUX_CTR2(f, m, p1, p2)
+#define	LINUX_CTR3(f, m, p1, p2, p3)
+#define	LINUX_CTR4(f, m, p1, p2, p3, p4)
+#define	LINUX_CTR5(f, m, p1, p2, p3, p4, p5)
+#define	LINUX_CTR6(f, m, p1, p2, p3, p4, p5, p6)
+#endif
+
 #endif /* !_LINUX_UTIL_H_ */

Modified: head/sys/modules/linux/Makefile
==============================================================================
--- head/sys/modules/linux/Makefile	Thu May  7 09:39:20 2009	(r191876)
+++ head/sys/modules/linux/Makefile	Thu May  7 10:01:05 2009	(r191877)
@@ -55,6 +55,9 @@ linux${SFX}_genassym.o: linux${SFX}_gena
 .if !defined(KERNBUILDDIR)
 opt_inet6.h:
 	echo "#define INET6 1" > ${.TARGET}
+.if defined(KTR)
+CFLAGS+=	-DKTR
+.endif
 .endif
 
 .include 

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 10:37:24 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2A398106566C;
	Thu,  7 May 2009 10:37:24 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 52AA48FC24;
	Thu,  7 May 2009 10:37:23 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47AbM8h053189;
	Thu, 7 May 2009 10:37:22 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47AbM9M053188;
	Thu, 7 May 2009 10:37:22 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200905071037.n47AbM9M053188@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 7 May 2009 10:37:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191878 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 10:37:25 -0000

Author: kib
Date: Thu May  7 10:37:22 2009
New Revision: 191878
URL: http://svn.freebsd.org/changeset/base/191878

Log:
  MFC r191439:
  Do not call vm_page_lookup() from the ddb routine, namely from "show
  vmopag" implementation. Iterate over memq to calculate the runs. Make
  the code slightly more style-compliant.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/vm/vm_object.c

Modified: stable/7/sys/vm/vm_object.c
==============================================================================
--- stable/7/sys/vm/vm_object.c	Thu May  7 10:01:05 2009	(r191877)
+++ stable/7/sys/vm/vm_object.c	Thu May  7 10:37:22 2009	(r191878)
@@ -2197,16 +2197,13 @@ vm_object_print(
 DB_SHOW_COMMAND(vmopag, vm_object_print_pages)
 {
 	vm_object_t object;
-	int nl = 0;
-	int c;
+	vm_pindex_t fidx;
+	vm_paddr_t pa;
+	vm_page_t m, prev_m;
+	int rcount, nl, c;
 
+	nl = 0;
 	TAILQ_FOREACH(object, &vm_object_list, object_list) {
-		vm_pindex_t idx, fidx;
-		vm_pindex_t osize;
-		vm_paddr_t pa = -1;
-		int rcount;
-		vm_page_t m;
-
 		db_printf("new object: %p\n", (void *)object);
 		if (nl > 18) {
 			c = cngetc();
@@ -2217,12 +2214,12 @@ DB_SHOW_COMMAND(vmopag, vm_object_print_
 		nl++;
 		rcount = 0;
 		fidx = 0;
-		osize = object->size;
-		if (osize > 128)
-			osize = 128;
-		for (idx = 0; idx < osize; idx++) {
-			m = vm_page_lookup(object, idx);
-			if (m == NULL) {
+		pa = -1;
+		TAILQ_FOREACH(m, &object->memq, listq) {
+			if (m->pindex > 128)
+				break;
+			if ((prev_m = TAILQ_PREV(m, pglist, listq)) != NULL &&
+			    prev_m->pindex + 1 != m->pindex) {
 				if (rcount) {
 					db_printf(" index(%ld)run(%d)pa(0x%lx)\n",
 						(long)fidx, rcount, (long)pa);
@@ -2235,10 +2232,7 @@ DB_SHOW_COMMAND(vmopag, vm_object_print_
 					nl++;
 					rcount = 0;
 				}
-				continue;
-			}
-
-				
+			}				
 			if (rcount &&
 				(VM_PAGE_TO_PHYS(m) == pa + rcount * PAGE_SIZE)) {
 				++rcount;
@@ -2255,7 +2249,7 @@ DB_SHOW_COMMAND(vmopag, vm_object_print_
 				}
 				nl++;
 			}
-			fidx = idx;
+			fidx = m->pindex;
 			pa = VM_PAGE_TO_PHYS(m);
 			rcount = 1;
 		}

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 12:55:59 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 55465106564A;
	Thu,  7 May 2009 12:55:59 +0000 (UTC)
	(envelope-from dchagin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 445B98FC12;
	Thu,  7 May 2009 12:55:59 +0000 (UTC)
	(envelope-from dchagin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47CtxqN056153;
	Thu, 7 May 2009 12:55:59 GMT (envelope-from dchagin@svn.freebsd.org)
Received: (from dchagin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47CtxFb056152;
	Thu, 7 May 2009 12:55:59 GMT (envelope-from dchagin@svn.freebsd.org)
Message-Id: <200905071255.n47CtxFb056152@svn.freebsd.org>
From: Dmitry Chagin 
Date: Thu, 7 May 2009 12:55:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191880 - head/sys/compat/linux
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 12:55:59 -0000

Author: dchagin
Date: Thu May  7 12:55:58 2009
New Revision: 191880
URL: http://svn.freebsd.org/changeset/base/191880

Log:
  Change linux struct tms definition to match actual linux one.
  
  Approved by:	kib (mentor)
  MFC after:	2 weeks

Modified:
  head/sys/compat/linux/linux_misc.c

Modified: head/sys/compat/linux/linux_misc.c
==============================================================================
--- head/sys/compat/linux/linux_misc.c	Thu May  7 11:47:51 2009	(r191879)
+++ head/sys/compat/linux/linux_misc.c	Thu May  7 12:55:58 2009	(r191880)
@@ -653,10 +653,10 @@ linux_time(struct thread *td, struct lin
 }
 
 struct l_times_argv {
-	l_long	tms_utime;
-	l_long	tms_stime;
-	l_long	tms_cutime;
-	l_long	tms_cstime;
+	l_clock_t	tms_utime;
+	l_clock_t	tms_stime;
+	l_clock_t	tms_cutime;
+	l_clock_t	tms_cstime;
 };
 
 #define CLK_TCK 100			/* Linux uses 100 */

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 13:49:50 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CF8111065678;
	Thu,  7 May 2009 13:49:48 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BC8958FC2E;
	Thu,  7 May 2009 13:49:48 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47Dnm0A057399;
	Thu, 7 May 2009 13:49:48 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47DnmLI057392;
	Thu, 7 May 2009 13:49:48 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <200905071349.n47DnmLI057392@svn.freebsd.org>
From: Ed Schouten 
Date: Thu, 7 May 2009 13:49:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191882 - in head: lib/libc/gen lib/libutil sys/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 13:49:53 -0000

Author: ed
Date: Thu May  7 13:49:48 2009
New Revision: 191882
URL: http://svn.freebsd.org/changeset/base/191882

Log:
  Add tcsetsid(3).
  
  The entire world seems to use the non-standard TIOCSCTTY ioctl to make a
  TTY a controlling terminal of a session. Even though tcsetsid(3) is also
  non-standard, I think it's a lot better to use in our own source code,
  mainly because it's similar to tcsetpgrp(), tcgetpgrp() and tcgetsid().
  
  I stole the idea from QNX. They do it the other way around; their
  TIOCSCTTY is just a wrapper around tcsetsid(). tcsetsid() then calls
  into an IPC framework.

Added:
  head/lib/libc/gen/tcsetsid.3   (contents, props changed)
Modified:
  head/lib/libc/gen/Makefile.inc
  head/lib/libc/gen/Symbol.map
  head/lib/libc/gen/tcgetsid.3
  head/lib/libc/gen/termios.c
  head/lib/libutil/login_tty.c
  head/sys/sys/termios.h

Modified: head/lib/libc/gen/Makefile.inc
==============================================================================
--- head/lib/libc/gen/Makefile.inc	Thu May  7 13:08:26 2009	(r191881)
+++ head/lib/libc/gen/Makefile.inc	Thu May  7 13:49:48 2009	(r191882)
@@ -70,8 +70,8 @@ MAN+=	alarm.3 arc4random.3 \
 	siginterrupt.3 signal.3 sigsetops.3 sleep.3 \
 	statvfs.3 stringlist.3 \
 	strtofflags.3 sysconf.3 sysctl.3 syslog.3 tcgetpgrp.3 tcgetsid.3 \
-	tcsendbreak.3 tcsetattr.3 tcsetpgrp.3 time.3 times.3 timezone.3 \
-	ttyname.3 tzset.3 ualarm.3 ucontext.3 ulimit.3 uname.3 \
+	tcsendbreak.3 tcsetattr.3 tcsetpgrp.3 tcsetsid.3 time.3 times.3 \
+	timezone.3 ttyname.3 tzset.3 ualarm.3 ucontext.3 ulimit.3 uname.3 \
 	unvis.3 usleep.3 utime.3 valloc.3 vis.3 wordexp.3
 
 MLINKS+=arc4random.3 arc4random_addrandom.3 arc4random.3 arc4random_stir.3 \

Modified: head/lib/libc/gen/Symbol.map
==============================================================================
--- head/lib/libc/gen/Symbol.map	Thu May  7 13:08:26 2009	(r191881)
+++ head/lib/libc/gen/Symbol.map	Thu May  7 13:49:48 2009	(r191882)
@@ -363,6 +363,7 @@ FBSD_1.1 {
 	posix_spawnattr_setsigmask;
 	posix_spawnp;
 	tcgetsid;
+	tcsetsid;
 };
 
 FBSDprivate_1.0 {

Modified: head/lib/libc/gen/tcgetsid.3
==============================================================================
--- head/lib/libc/gen/tcgetsid.3	Thu May  7 13:08:26 2009	(r191881)
+++ head/lib/libc/gen/tcgetsid.3	Thu May  7 13:49:48 2009	(r191882)
@@ -63,7 +63,8 @@ is not the controlling terminal.
 .Sh SEE ALSO
 .Xr getsid 2 ,
 .Xr setsid 2 ,
-.Xr tcgetpgrp 3
+.Xr tcgetpgrp 3 ,
+.Xr tcsetsid 3
 .Sh STANDARDS
 The
 .Fn tcgetsid

Added: head/lib/libc/gen/tcsetsid.3
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/gen/tcsetsid.3	Thu May  7 13:49:48 2009	(r191882)
@@ -0,0 +1,92 @@
+.\" Copyright (c) 2009 Ed Schouten 
+.\" 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 REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 4, 2009
+.Dt TCSETSID 3
+.Os
+.Sh NAME
+.Nm tcsetsid
+.Nd set session ID associated with a controlling terminal
+.Sh LIBRARY
+.Lb libc
+.Sh SYNOPSIS
+.In sys/types.h
+.In termios.h
+.Ft int
+.Fn tcsetsid "int fd" "pid_t pid"
+.Sh DESCRIPTION
+The
+.Fn tcsetsid
+function sets associates a session identified by
+.Fa pid
+with a controlling terminal specified by
+.Fa fd .
+.Pp
+This implementation only allows the controlling terminal to be changed
+by the session leader itself.
+This implies that
+.Fa pid
+always has to be equal to the process ID.
+.Pp
+It is unsupported to associate with a terminal that already has an
+associated session.
+Conversely, it is also unsupported to associate to a terminal when
+the session is already associated with a different terminal.
+.Sh ERRORS
+If an error occurs,
+.Fn tcsetsid
+returns -1 and the global variable
+.Va errno
+is set to indicate the error, as follows:
+.Bl -tag -width Er
+.It Bq Er EBADF
+The
+.Fa fd
+argument is not a valid file descriptor.
+.It Bq Er ENOTTY
+The file descriptor represented by
+.Fa fd
+is not a terminal.
+.It Bq Er EINVAL
+The
+.Fa pid
+argument is not equal to the session ID of the calling process.
+.It Bq Er EPERM
+The calling process is not a session leader.
+.It Bq Er EPERM
+The session already has an associated terminal or the terminal already
+has an associated session.
+.El
+.Sh SEE ALSO
+.Xr getsid 2 ,
+.Xr setsid 2 ,
+.Xr tcgetpgrp 3 ,
+.Xr tcgetsid 3
+.Sh HISTORY
+A
+.Fn tcsetsid
+function first appeared in QNX.
+It does not comply to any standard.

Modified: head/lib/libc/gen/termios.c
==============================================================================
--- head/lib/libc/gen/termios.c	Thu May  7 13:08:26 2009	(r191881)
+++ head/lib/libc/gen/termios.c	Thu May  7 13:49:48 2009	(r191882)
@@ -110,6 +110,18 @@ tcgetsid(int fd)
 	return ((pid_t)s);
 }
 
+int
+tcsetsid(int fd, pid_t pid)
+{
+
+	if (pid != getsid(0)) {
+		errno = EINVAL;
+		return (-1);
+	}
+
+	return (_ioctl(fd, TIOCSCTTY, NULL));
+}
+
 speed_t
 cfgetospeed(t)
 	const struct termios *t;

Modified: head/lib/libutil/login_tty.c
==============================================================================
--- head/lib/libutil/login_tty.c	Thu May  7 13:08:26 2009	(r191881)
+++ head/lib/libutil/login_tty.c	Thu May  7 13:49:48 2009	(r191882)
@@ -37,17 +37,21 @@ static char sccsid[] = "@(#)login_tty.c	
 #endif /* LIBC_SCCS and not lint */
 
 #include 
-#include 
 
 #include 
 #include 
+#include 
 #include 
 
 int
 login_tty(int fd)
 {
-	(void) setsid();
-	if (ioctl(fd, TIOCSCTTY, (char *)NULL) == -1)
+	pid_t s;
+
+	s = setsid();
+	if (s == -1)
+		return (-1);
+	if (tcsetsid(fd, s) == -1)
 		return (-1);
 	(void) dup2(fd, 0);
 	(void) dup2(fd, 1);

Modified: head/sys/sys/termios.h
==============================================================================
--- head/sys/sys/termios.h	Thu May  7 13:08:26 2009	(r191881)
+++ head/sys/sys/termios.h	Thu May  7 13:49:48 2009	(r191882)
@@ -272,8 +272,9 @@ int	tcsendbreak(int, int);
 #if __POSIX_VISIBLE >= 200112 || __BSD_VISIBLE
 pid_t	tcgetsid(int);
 #endif
-
 #if __BSD_VISIBLE
+int	tcsetsid(int, pid_t);
+
 void	cfmakeraw(struct termios *);
 int	cfsetspeed(struct termios *, speed_t);
 #endif

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 14:24:50 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D2A8D1065672;
	Thu,  7 May 2009 14:24:50 +0000 (UTC)
	(envelope-from dchagin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C14BF8FC2B;
	Thu,  7 May 2009 14:24:50 +0000 (UTC)
	(envelope-from dchagin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47EOoaI058370;
	Thu, 7 May 2009 14:24:50 GMT (envelope-from dchagin@svn.freebsd.org)
Received: (from dchagin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47EOos1058369;
	Thu, 7 May 2009 14:24:50 GMT (envelope-from dchagin@svn.freebsd.org)
Message-Id: <200905071424.n47EOos1058369@svn.freebsd.org>
From: Dmitry Chagin 
Date: Thu, 7 May 2009 14:24:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191883 - head/sys/compat/linux
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 14:24:52 -0000

Author: dchagin
Date: Thu May  7 14:24:50 2009
New Revision: 191883
URL: http://svn.freebsd.org/changeset/base/191883

Log:
  Linux exports HZ value to user space via AT_CLKTCK auxiliary vector entry,
  which is available for Glibc as sysconf(_SC_CLK_TCK). If AT_CLKTCK entry is
  not exported, Glibc uses 100.
  
  linux_times() shall use the value that is exported to user space.
  
  Pointyhat to:	dchagin
  
  PR:		kern/134251
  Approved by:	kib (mentor)
  MFC after:	2 weeks

Modified:
  head/sys/compat/linux/linux_misc.c

Modified: head/sys/compat/linux/linux_misc.c
==============================================================================
--- head/sys/compat/linux/linux_misc.c	Thu May  7 13:49:48 2009	(r191882)
+++ head/sys/compat/linux/linux_misc.c	Thu May  7 14:24:50 2009	(r191883)
@@ -659,9 +659,7 @@ struct l_times_argv {
 	l_clock_t	tms_cstime;
 };
 
-#define CLK_TCK 100			/* Linux uses 100 */
-
-#define CONVTCK(r)	(r.tv_sec * CLK_TCK + r.tv_usec / (1000000 / CLK_TCK))
+#define CONVTCK(r)	(r.tv_sec * hz + r.tv_usec / (1000000 / hz))
 
 int
 linux_times(struct thread *td, struct linux_times_args *args)

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 14:34:50 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 235A81065670;
	Thu,  7 May 2009 14:34:50 +0000 (UTC)
	(envelope-from emaste@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1246E8FC26;
	Thu,  7 May 2009 14:34:50 +0000 (UTC)
	(envelope-from emaste@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47EYnr1058654;
	Thu, 7 May 2009 14:34:49 GMT (envelope-from emaste@svn.freebsd.org)
Received: (from emaste@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47EYnCb058653;
	Thu, 7 May 2009 14:34:49 GMT (envelope-from emaste@svn.freebsd.org)
Message-Id: <200905071434.n47EYnCb058653@svn.freebsd.org>
From: Ed Maste 
Date: Thu, 7 May 2009 14:34:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191884 - head/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 14:34:50 -0000

Author: emaste
Date: Thu May  7 14:34:49 2009
New Revision: 191884
URL: http://svn.freebsd.org/changeset/base/191884

Log:
  s/ath0/wlan0/ since we no longer use the real device directly.

Modified:
  head/share/man/man4/if_bridge.4

Modified: head/share/man/man4/if_bridge.4
==============================================================================
--- head/share/man/man4/if_bridge.4	Thu May  7 14:24:50 2009	(r191883)
+++ head/share/man/man4/if_bridge.4	Thu May  7 14:34:49 2009	(r191884)
@@ -342,7 +342,7 @@ The following when placed in the file
 will cause a bridge called
 .Dq Li bridge0
 to be created, and will add the interfaces
-.Dq Li ath0
+.Dq Li wlan0
 and
 .Dq Li fxp0
 to the bridge, and then enable packet forwarding.
@@ -351,14 +351,14 @@ Such a configuration could be used to im
 in ad-hoc mode).
 .Bd -literal -offset indent
 cloned_interfaces="bridge0"
-ifconfig_bridge0="addm ath0 addm fxp0 up"
+ifconfig_bridge0="addm wlan0 addm fxp0 up"
 .Ed
 .Pp
 For the bridge to forward packets all member interfaces and the bridge need
 to be up.
 The above example would also require:
 .Bd -literal -offset indent
-ifconfig_ath0="up ssid my_ap mode 11g mediaopt hostap"
+ifconfig_wlan0="up ssid my_ap mode 11g mediaopt hostap"
 ifconfig_fxp0="up"
 .Ed
 .Pp

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 14:39:02 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 56F33106566C;
	Thu,  7 May 2009 14:39:02 +0000 (UTC)
	(envelope-from skreuzer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4597E8FC0A;
	Thu,  7 May 2009 14:39:02 +0000 (UTC)
	(envelope-from skreuzer@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47Ed1Pm058790;
	Thu, 7 May 2009 14:39:01 GMT (envelope-from skreuzer@svn.freebsd.org)
Received: (from skreuzer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47Ed127058789;
	Thu, 7 May 2009 14:39:01 GMT (envelope-from skreuzer@svn.freebsd.org)
Message-Id: <200905071439.n47Ed127058789@svn.freebsd.org>
From: Steven Kreuzer 
Date: Thu, 7 May 2009 14:39:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191885 - head/share/misc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 14:39:02 -0000

Author: skreuzer (ports committer)
Date: Thu May  7 14:39:01 2009
New Revision: 191885
URL: http://svn.freebsd.org/changeset/base/191885

Log:
  Adding myself as a ports committer
  
  Approved by:	wxs (mentor)

Modified:
  head/share/misc/committers-ports.dot

Modified: head/share/misc/committers-ports.dot
==============================================================================
--- head/share/misc/committers-ports.dot	Thu May  7 14:34:49 2009	(r191884)
+++ head/share/misc/committers-ports.dot	Thu May  7 14:39:01 2009	(r191885)
@@ -137,6 +137,7 @@ sem [label="Sergey Matveychuk\nsem@FreeB
 sergei [label="Sergei Kolobov\nsergei@FreeBSD.org\n2003/10/21"]
 shaun [label="Shaun Amott\nshaun@FreeBSD.org\n2006/06/19"]
 simon [label="Simon L. Nielsen\nsimon@FreeBSD.org\n2005/01/08"]
+skreuzer [label="Steven Kreuzer\nskreuzer@FreeBSD.org\n2009/03/25"]
 sobomax[label="Maxim Sobolev\nsobomax@FreeBSD.org\n2000/05/17"]
 stas [label="Stanislav Sedov\nstas@FreeBSD.org\n2006/09/18"]
 stefan [label="Stefan Walter\nstefan@FreeBSD.org\n2006/05/07"]
@@ -328,4 +329,6 @@ tmclaugh -> xride
 
 will -> lioux
 
+wxs -> skreuzer
+
 }

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 14:51:04 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D80F7106566B;
	Thu,  7 May 2009 14:51:04 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from pele.citylink.co.nz (pele.citylink.co.nz [202.8.44.226])
	by mx1.freebsd.org (Postfix) with ESMTP id 91EDE8FC12;
	Thu,  7 May 2009 14:51:04 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from localhost (localhost [127.0.0.1])
	by pele.citylink.co.nz (Postfix) with ESMTP id C829DFF31;
	Fri,  8 May 2009 02:51:03 +1200 (NZST)
X-Virus-Scanned: Debian amavisd-new at citylink.co.nz
Received: from pele.citylink.co.nz ([127.0.0.1])
	by localhost (pele.citylink.co.nz [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id EnDoipDY702X; Fri,  8 May 2009 02:50:59 +1200 (NZST)
Received: from citylink.fud.org.nz (unknown [202.8.44.45])
	by pele.citylink.co.nz (Postfix) with ESMTP;
	Fri,  8 May 2009 02:50:59 +1200 (NZST)
Received: by citylink.fud.org.nz (Postfix, from userid 1001)
	id 80F8E11432; Fri,  8 May 2009 02:50:58 +1200 (NZST)
Date: Thu, 7 May 2009 07:50:58 -0700
From: Andrew Thompson 
To: Ed Maste 
Message-ID: <20090507145058.GB85054@citylink.fud.org.nz>
References: <200905071434.n47EYnCb058653@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200905071434.n47EYnCb058653@svn.freebsd.org>
User-Agent: Mutt/1.5.17 (2007-11-01)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r191884 - head/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 14:51:05 -0000

On Thu, May 07, 2009 at 02:34:49PM +0000, Ed Maste wrote:
> Author: emaste
> Date: Thu May  7 14:34:49 2009
> New Revision: 191884
> URL: http://svn.freebsd.org/changeset/base/191884
> 
> Log:
>   s/ath0/wlan0/ since we no longer use the real device directly.
> 
> Modified:
>   head/share/man/man4/if_bridge.4
> 
> Modified: head/share/man/man4/if_bridge.4
> ==============================================================================
> --- head/share/man/man4/if_bridge.4	Thu May  7 14:24:50 2009	(r191883)
> +++ head/share/man/man4/if_bridge.4	Thu May  7 14:34:49 2009	(r191884)
> @@ -342,7 +342,7 @@ The following when placed in the file
>  will cause a bridge called
>  .Dq Li bridge0
>  to be created, and will add the interfaces
> -.Dq Li ath0
> +.Dq Li wlan0
>  and
>  .Dq Li fxp0
>  to the bridge, and then enable packet forwarding.
> @@ -351,14 +351,14 @@ Such a configuration could be used to im
>  in ad-hoc mode).
>  .Bd -literal -offset indent
>  cloned_interfaces="bridge0"
> -ifconfig_bridge0="addm ath0 addm fxp0 up"
> +ifconfig_bridge0="addm wlan0 addm fxp0 up"
>  .Ed
>  .Pp
>  For the bridge to forward packets all member interfaces and the bridge need
>  to be up.
>  The above example would also require:
>  .Bd -literal -offset indent
> -ifconfig_ath0="up ssid my_ap mode 11g mediaopt hostap"
> +ifconfig_wlan0="up ssid my_ap mode 11g mediaopt hostap"

Not quite right, I dont believe you can use mediaopt anymore. The vap
gets the mode on creation so it would be,

create_args_wlan0="wlanmode hostap"
ifconfig_wlan0="up ssid my_ap mode 11g"

cheers,
Andrew

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 15:32:14 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0A105106566C;
	Thu,  7 May 2009 15:32:14 +0000 (UTC)
	(envelope-from skreuzer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E71D08FC1B;
	Thu,  7 May 2009 15:32:13 +0000 (UTC)
	(envelope-from skreuzer@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47FWDOU060046;
	Thu, 7 May 2009 15:32:13 GMT (envelope-from skreuzer@svn.freebsd.org)
Received: (from skreuzer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47FWDt4060045;
	Thu, 7 May 2009 15:32:13 GMT (envelope-from skreuzer@svn.freebsd.org)
Message-Id: <200905071532.n47FWDt4060045@svn.freebsd.org>
From: Steven Kreuzer 
Date: Thu, 7 May 2009 15:32:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191886 - head/usr.bin/calendar/calendars
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 15:32:14 -0000

Author: skreuzer (ports committer)
Date: Thu May  7 15:32:13 2009
New Revision: 191886
URL: http://svn.freebsd.org/changeset/base/191886

Log:
  Add my birthday
  
  Approved by:	wxs (mentor)

Modified:
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==============================================================================
--- head/usr.bin/calendar/calendars/calendar.freebsd	Thu May  7 14:39:01 2009	(r191885)
+++ head/usr.bin/calendar/calendars/calendar.freebsd	Thu May  7 15:32:13 2009	(r191886)
@@ -39,6 +39,7 @@
 02/01	Paul Saab  born in Champaign-Urbana, Illinois, United States, 1978
 02/01	Martin Wilke  born in Ludwigsfelde, Brandenburg, Germany, 1980
 02/01	Christian Brueffer  born in Gronau, Nordrhein-Westfalen, Germany, 1982
+02/01	Steven Kreuzer  born in Oceanside, New York, 1982
 02/01	Juli Mallett  born in Washington, Pennsylvania, United States, 1985
 02/02   Michael W Lucas  born in Detroit, Michigan, United States, 1967
 02/02	Diomidis D. Spinellis  born in Athens, Greece, 1967

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 16:14:31 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8745B106564A;
	Thu,  7 May 2009 16:14:31 +0000 (UTC)
	(envelope-from dchagin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6A2EB8FC12;
	Thu,  7 May 2009 16:14:31 +0000 (UTC)
	(envelope-from dchagin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47GEVC2060922;
	Thu, 7 May 2009 16:14:31 GMT (envelope-from dchagin@svn.freebsd.org)
Received: (from dchagin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47GEV6S060921;
	Thu, 7 May 2009 16:14:31 GMT (envelope-from dchagin@svn.freebsd.org)
Message-Id: <200905071614.n47GEV6S060921@svn.freebsd.org>
From: Dmitry Chagin 
Date: Thu, 7 May 2009 16:14:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191887 - head/sys/compat/linux
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 16:14:32 -0000

Author: dchagin
Date: Thu May  7 16:14:31 2009
New Revision: 191887
URL: http://svn.freebsd.org/changeset/base/191887

Log:
  Add KTR(9) tracing for futex emulation.
  
  Approved by:	kib (mentor)
  MFC after:	1 month

Modified:
  head/sys/compat/linux/linux_futex.c

Modified: head/sys/compat/linux/linux_futex.c
==============================================================================
--- head/sys/compat/linux/linux_futex.c	Thu May  7 15:32:13 2009	(r191886)
+++ head/sys/compat/linux/linux_futex.c	Thu May  7 16:14:31 2009	(r191887)
@@ -43,6 +43,7 @@ __KERNEL_RCSID(1, "$NetBSD: linux_futex.
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -61,6 +62,7 @@ __KERNEL_RCSID(1, "$NetBSD: linux_futex.
 #endif
 #include 
 #include 
+#include 
 
 MALLOC_DEFINE(M_FUTEX, "futex", "Linux futexes");
 MALLOC_DEFINE(M_FUTEX_WP, "futex wp", "Linux futexes wp");
@@ -131,11 +133,15 @@ futex_put(struct futex *f, struct waitin
 		FUTEXES_UNLOCK;
 		FUTEX_UNLOCK(f);
 
+		LINUX_CTR2(sys_futex, "futex_put destroy uaddr %p ref %d",
+		    f->f_uaddr, f->f_refcount);
 		FUTEX_DESTROY(f);
 		free(f, M_FUTEX);
 		return;
 	}
 
+	LINUX_CTR2(sys_futex, "futex_put uaddr %p ref %d",
+	    f->f_uaddr, f->f_refcount);
 	FUTEXES_UNLOCK;
 	FUTEX_UNLOCK(f);
 }
@@ -170,12 +176,15 @@ retry:
 
 			FUTEX_LOCK(f);
 			*newf = f;
+			LINUX_CTR2(sys_futex, "futex_get uaddr %p ref %d",
+			    uaddr, f->f_refcount);
 			return (0);
 		}
 	}
 
 	if (flags & FUTEX_DONTCREATE) {
 		FUTEXES_UNLOCK;
+		LINUX_CTR1(sys_futex, "futex_get uaddr %p null", uaddr);
 		return (0);
 	}
 
@@ -198,6 +207,8 @@ retry:
 	LIST_INSERT_HEAD(&futex_list, tmpf, f_list);
 	FUTEXES_UNLOCK;
 
+	LINUX_CTR2(sys_futex, "futex_get uaddr %p ref %d new",
+	    uaddr, tmpf->f_refcount);
 	*newf = tmpf;
 	return (0);
 }
@@ -232,13 +243,21 @@ futex_sleep(struct futex *f, struct wait
 	int error;
 
 	FUTEX_ASSERT_LOCKED(f);
+	LINUX_CTR4(sys_futex, "futex_sleep enter uaddr %p wp %p timo %ld ref %d",
+	    f->f_uaddr, wp, timeout, f->f_refcount);
 	error = sx_sleep(wp, &f->f_lck, PCATCH, "futex", timeout);
 	if (wp->wp_flags & FUTEX_WP_REQUEUED) {
 		KASSERT(f != wp->wp_futex, ("futex != wp_futex"));
+		LINUX_CTR5(sys_futex, "futex_sleep out error %d uaddr %p w"
+		    " %p requeued uaddr %p ref %d",
+		    error, f->f_uaddr, wp, wp->wp_futex->f_uaddr,
+		    wp->wp_futex->f_refcount);
 		futex_put(f, NULL);
 		f = wp->wp_futex;
 		FUTEX_LOCK(f);
-	}
+	} else
+		LINUX_CTR3(sys_futex, "futex_sleep out error %d uaddr %p wp %p",
+		    error, f->f_uaddr, wp);
 
 	futex_put(f, wp);
 	return (error);
@@ -252,6 +271,8 @@ futex_wake(struct futex *f, int n)
 
 	FUTEX_ASSERT_LOCKED(f);
 	TAILQ_FOREACH_SAFE(wp, &f->f_waiting_proc, wp_list, wpt) {
+		LINUX_CTR3(sys_futex, "futex_wake uaddr %p wp %p ref %d",
+		    f->f_uaddr, wp, f->f_refcount);
 		wp->wp_flags |= FUTEX_WP_REMOVED;
 		TAILQ_REMOVE(&f->f_waiting_proc, wp, wp_list);
 		wakeup_one(wp);
@@ -273,10 +294,14 @@ futex_requeue(struct futex *f, int n, st
 
 	TAILQ_FOREACH_SAFE(wp, &f->f_waiting_proc, wp_list, wpt) {
 		if (++count <= n) {
+			LINUX_CTR2(sys_futex, "futex_req_wake uaddr %p wp %p",
+			    f->f_uaddr, wp);
 			wp->wp_flags |= FUTEX_WP_REMOVED;
 			TAILQ_REMOVE(&f->f_waiting_proc, wp, wp_list);
 			wakeup_one(wp);
 		} else {
+			LINUX_CTR3(sys_futex, "futex_requeue uaddr %p wp %p to %p",
+			    f->f_uaddr, wp, f2->f_uaddr);
 			wp->wp_flags |= FUTEX_WP_REQUEUED;
 			/* Move wp to wp_list of f2 futex */
 			TAILQ_REMOVE(&f->f_waiting_proc, wp, wp_list);
@@ -421,6 +446,8 @@ linux_sys_futex(struct thread *td, struc
 	switch (args->op) {
 	case LINUX_FUTEX_WAIT:
 
+		LINUX_CTR2(sys_futex, "WAIT val %d uaddr %p",
+		    args->val, args->uaddr);
 #ifdef DEBUG
 		if (ldebug(sys_futex))
 			printf(ARGS(sys_futex, "futex_wait val %d uaddr %p"),
@@ -431,15 +458,14 @@ linux_sys_futex(struct thread *td, struc
 			return (error);
 		error = copyin(args->uaddr, &val, sizeof(val));
 		if (error) {
+			LINUX_CTR1(sys_futex, "WAIT copyin failed %d",
+			    error);
 			futex_put(f, wp);
 			return (error);
 		}
 		if (val != args->val) {
-#ifdef DEBUG
-			if (ldebug(sys_futex))
-				printf(ARGS(sys_futex, "futex_wait uaddr %p WHOOPS %d != %d"),
-				    args->uaddr, args->val, val);
-#endif
+			LINUX_CTR3(sys_futex, "WAIT uaddr %p val %d != uval %d",
+			    args->uaddr, args->val, val);
 			futex_put(f, wp);
 			return (EWOULDBLOCK);
 		}
@@ -449,6 +475,9 @@ linux_sys_futex(struct thread *td, struc
 
 	case LINUX_FUTEX_WAKE:
 
+		LINUX_CTR2(sys_futex, "WAKE val %d uaddr %p",
+		    args->val, args->uaddr);
+
 		/*
 		 * XXX: Linux is able to cope with different addresses
 		 * corresponding to the same mapped memory in the sleeping
@@ -472,6 +501,11 @@ linux_sys_futex(struct thread *td, struc
 
 	case LINUX_FUTEX_CMP_REQUEUE:
 
+		LINUX_CTR5(sys_futex, "CMP_REQUEUE uaddr %p "
+		    "val %d val3 %d uaddr2 %p val2 %d",
+		    args->uaddr, args->val, args->val3, args->uaddr2,
+		    (int)(unsigned long)args->timeout);
+
 #ifdef DEBUG
 		if (ldebug(sys_futex))
 			printf(ARGS(sys_futex, "futex_cmp_requeue uaddr %p "
@@ -505,16 +539,15 @@ linux_sys_futex(struct thread *td, struc
 		}
 		error = copyin(args->uaddr, &val, sizeof(val));
 		if (error) {
+			LINUX_CTR1(sys_futex, "CMP_REQUEUE copyin failed %d",
+			    error);
 			futex_put(f2, NULL);
 			futex_put(f, NULL);
 			return (error);
 		}
 		if (val != args->val3) {
-#ifdef DEBUG
-			if (ldebug(sys_futex))
-				printf(ARGS(sys_futex, "futex_cmp_requeue WHOOPS"
-				    " VAL %d != UVAL %d"), args->val, val);
-#endif
+			LINUX_CTR2(sys_futex, "CMP_REQUEUE val %d != uval %d",
+			    args->val, val);
 			futex_put(f2, NULL);
 			futex_put(f, NULL);
 			return (EAGAIN);
@@ -528,6 +561,11 @@ linux_sys_futex(struct thread *td, struc
 
 	case LINUX_FUTEX_WAKE_OP:
 
+		LINUX_CTR5(sys_futex, "WAKE_OP "
+		    "uaddr %p op %d val %x uaddr2 %p val3 %x",
+		    args->uaddr, args->op, args->val,
+		    args->uaddr2, args->val3);
+
 #ifdef DEBUG
 		if (ldebug(sys_futex))
 			printf(ARGS(sys_futex, "futex_wake_op "

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 16:31:50 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E114A1065741;
	Thu,  7 May 2009 16:31:50 +0000 (UTC)
	(envelope-from emaste@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CFBAF8FC18;
	Thu,  7 May 2009 16:31:50 +0000 (UTC)
	(envelope-from emaste@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47GVoBl061408;
	Thu, 7 May 2009 16:31:50 GMT (envelope-from emaste@svn.freebsd.org)
Received: (from emaste@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47GVoQ8061407;
	Thu, 7 May 2009 16:31:50 GMT (envelope-from emaste@svn.freebsd.org)
Message-Id: <200905071631.n47GVoQ8061407@svn.freebsd.org>
From: Ed Maste 
Date: Thu, 7 May 2009 16:31:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191889 - head/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 16:31:51 -0000

Author: emaste
Date: Thu May  7 16:31:50 2009
New Revision: 191889
URL: http://svn.freebsd.org/changeset/base/191889

Log:
  Update example with feedback from thompsa@.

Modified:
  head/share/man/man4/if_bridge.4

Modified: head/share/man/man4/if_bridge.4
==============================================================================
--- head/share/man/man4/if_bridge.4	Thu May  7 16:31:38 2009	(r191888)
+++ head/share/man/man4/if_bridge.4	Thu May  7 16:31:50 2009	(r191889)
@@ -358,7 +358,8 @@ For the bridge to forward packets all me
 to be up.
 The above example would also require:
 .Bd -literal -offset indent
-ifconfig_wlan0="up ssid my_ap mode 11g mediaopt hostap"
+create_args_wlan0="wlanmode hostap"
+ifconfig_wlan0="up ssid my_ap mode 11g"
 ifconfig_fxp0="up"
 .Ed
 .Pp

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 16:42:45 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DE8241065677;
	Thu,  7 May 2009 16:42:45 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CD4C28FC08;
	Thu,  7 May 2009 16:42:45 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47GgjRV061755;
	Thu, 7 May 2009 16:42:45 GMT (envelope-from rrs@svn.freebsd.org)
Received: (from rrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47GgjmJ061754;
	Thu, 7 May 2009 16:42:45 GMT (envelope-from rrs@svn.freebsd.org)
Message-Id: <200905071642.n47GgjmJ061754@svn.freebsd.org>
From: Randall Stewart 
Date: Thu, 7 May 2009 16:42:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191890 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 16:42:46 -0000

Author: rrs
Date: Thu May  7 16:42:45 2009
New Revision: 191890
URL: http://svn.freebsd.org/changeset/base/191890

Log:
  ABI expansions to hopefully future-proof our MIB/netstat code for 8.0

Modified:
  head/sys/netinet/sctp_uio.h

Modified: head/sys/netinet/sctp_uio.h
==============================================================================
--- head/sys/netinet/sctp_uio.h	Thu May  7 16:31:50 2009	(r191889)
+++ head/sys/netinet/sctp_uio.h	Thu May  7 16:42:45 2009	(r191890)
@@ -764,6 +764,8 @@ struct sctp_timeval {
 };
 
 struct sctpstat {
+	struct sctp_timeval sctps_discontinuitytime;	/* sctpStats 18
+							 * (TimeStamp) */
 	/* MIB according to RFC 3873 */
 	uint32_t sctps_currestab;	/* sctpStats  1   (Gauge32) */
 	uint32_t sctps_activeestab;	/* sctpStats  2 (Counter32) */
@@ -948,8 +950,8 @@ struct sctpstat {
 	uint32_t sctps_fwdtsn_map_over;	/* number of map array over-runs via
 					 * fwd-tsn's */
 
-	struct sctp_timeval sctps_discontinuitytime;	/* sctpStats 18
-							 * (TimeStamp) */
+	uint32_t sctps_reserved[32];	/* Future ABI compat - remove int's
+					 * from here when adding new */
 };
 
 #define SCTP_STAT_INCR(_x) SCTP_STAT_INCR_BY(_x,1)

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 16:43:49 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9797D1065670;
	Thu,  7 May 2009 16:43:49 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6BFA78FC1A;
	Thu,  7 May 2009 16:43:49 +0000 (UTC) (envelope-from rrs@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47Ghn3o061823;
	Thu, 7 May 2009 16:43:49 GMT (envelope-from rrs@svn.freebsd.org)
Received: (from rrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47GhnIN061822;
	Thu, 7 May 2009 16:43:49 GMT (envelope-from rrs@svn.freebsd.org)
Message-Id: <200905071643.n47GhnIN061822@svn.freebsd.org>
From: Randall Stewart 
Date: Thu, 7 May 2009 16:43:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191891 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 16:43:50 -0000

Author: rrs
Date: Thu May  7 16:43:49 2009
New Revision: 191891
URL: http://svn.freebsd.org/changeset/base/191891

Log:
  repository sync to multi-OS repo ... spaceing change

Modified:
  head/sys/netinet/sctp_crc32.c

Modified: head/sys/netinet/sctp_crc32.c
==============================================================================
--- head/sys/netinet/sctp_crc32.c	Thu May  7 16:42:45 2009	(r191890)
+++ head/sys/netinet/sctp_crc32.c	Thu May  7 16:43:49 2009	(r191891)
@@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+
 #if !defined(SCTP_WITH_NO_CSUM)
 
 static uint32_t

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 17:05:04 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 161BD106566C;
	Thu,  7 May 2009 17:05:04 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 044838FC1F;
	Thu,  7 May 2009 17:05:04 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47H53Ct062343;
	Thu, 7 May 2009 17:05:03 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47H53sG062342;
	Thu, 7 May 2009 17:05:03 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200905071705.n47H53sG062342@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 7 May 2009 17:05:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191892 - head/sys/dev/usb/serial
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 17:05:04 -0000

Author: thompsa
Date: Thu May  7 17:05:03 2009
New Revision: 191892
URL: http://svn.freebsd.org/changeset/base/191892

Log:
  Use a 32 bit type for the interface mask as this equals the max interface
  count.

Modified:
  head/sys/dev/usb/serial/u3g.c

Modified: head/sys/dev/usb/serial/u3g.c
==============================================================================
--- head/sys/dev/usb/serial/u3g.c	Thu May  7 16:43:49 2009	(r191891)
+++ head/sys/dev/usb/serial/u3g.c	Thu May  7 17:05:03 2009	(r191892)
@@ -440,7 +440,8 @@ u3g_attach(device_t dev)
 	struct u3g_softc *sc = device_get_softc(dev);
 	struct usb2_interface *iface;
 	struct usb2_interface_descriptor *id;
-	int error, iface_valid, flags, nports;
+	uint32_t iface_valid;
+	int error, flags, nports;
 	int ep, n;
 	uint8_t i;
 

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 17:39:23 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EC6F4106564A;
	Thu,  7 May 2009 17:39:23 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DB0938FC17;
	Thu,  7 May 2009 17:39:23 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47HdNmc063138;
	Thu, 7 May 2009 17:39:23 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47HdNjl063137;
	Thu, 7 May 2009 17:39:23 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <200905071739.n47HdNjl063137@svn.freebsd.org>
From: Ed Schouten 
Date: Thu, 7 May 2009 17:39:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191893 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 17:39:24 -0000

Author: ed
Date: Thu May  7 17:39:23 2009
New Revision: 191893
URL: http://svn.freebsd.org/changeset/base/191893

Log:
  If we have a regular rint handler, never go into rint_bypass mode.
  
  It turns out if we called cfmakeraw() on a TTY with only a rint handler
  in place, it could inject data into the TTY, even though it should be
  redirected. Always take a look at the hooks before looking at the
  termios flags.

Modified:
  head/sys/kern/tty_ttydisc.c

Modified: head/sys/kern/tty_ttydisc.c
==============================================================================
--- head/sys/kern/tty_ttydisc.c	Thu May  7 17:05:03 2009	(r191892)
+++ head/sys/kern/tty_ttydisc.c	Thu May  7 17:39:23 2009	(r191893)
@@ -560,12 +560,15 @@ ttydisc_optimize(struct tty *tp)
 {
 	tty_lock_assert(tp, MA_OWNED);
 
-	if ((!CMP_FLAG(i, ICRNL|IGNCR|IMAXBEL|INLCR|ISTRIP|IXON) &&
+	if (ttyhook_hashook(tp, rint_bypass)) {
+		tp->t_flags |= TF_BYPASS;
+	} else if (ttyhook_hashook(tp, rint)) {
+		tp->t_flags &= ~TF_BYPASS;
+	} else if (!CMP_FLAG(i, ICRNL|IGNCR|IMAXBEL|INLCR|ISTRIP|IXON) &&
 	    (!CMP_FLAG(i, BRKINT) || CMP_FLAG(i, IGNBRK)) &&
 	    (!CMP_FLAG(i, PARMRK) ||
 	        CMP_FLAG(i, IGNPAR|IGNBRK) == (IGNPAR|IGNBRK)) &&
-	    !CMP_FLAG(l, ECHO|ICANON|IEXTEN|ISIG|PENDIN)) ||
-	    ttyhook_hashook(tp, rint_bypass)) {
+	    !CMP_FLAG(l, ECHO|ICANON|IEXTEN|ISIG|PENDIN)) {
 		tp->t_flags |= TF_BYPASS;
 	} else {
 		tp->t_flags &= ~TF_BYPASS;

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 18:03:47 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B133D1065673;
	Thu,  7 May 2009 18:03:47 +0000 (UTC)
	(envelope-from philip@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 851E08FC0C;
	Thu,  7 May 2009 18:03:47 +0000 (UTC)
	(envelope-from philip@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47I3lhX063710;
	Thu, 7 May 2009 18:03:47 GMT (envelope-from philip@svn.freebsd.org)
Received: (from philip@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47I3lra063708;
	Thu, 7 May 2009 18:03:47 GMT (envelope-from philip@svn.freebsd.org)
Message-Id: <200905071803.n47I3lra063708@svn.freebsd.org>
From: Philip Paeps 
Date: Thu, 7 May 2009 18:03:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191894 - head/sys/dev/ubsec
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 18:03:48 -0000

Author: philip
Date: Thu May  7 18:03:47 2009
New Revision: 191894
URL: http://svn.freebsd.org/changeset/base/191894

Log:
  Add PCI IDs for the Broadcom 5825 incarnation.
  
  Submitted by:	Brian A. Seklecki 
  MFC after:	1 day

Modified:
  head/sys/dev/ubsec/ubsec.c
  head/sys/dev/ubsec/ubsecreg.h

Modified: head/sys/dev/ubsec/ubsec.c
==============================================================================
--- head/sys/dev/ubsec/ubsec.c	Thu May  7 17:39:23 2009	(r191893)
+++ head/sys/dev/ubsec/ubsec.c	Thu May  7 18:03:47 2009	(r191894)
@@ -220,7 +220,8 @@ ubsec_probe(device_t dev)
 	     pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5820 ||
 	     pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5821 ||
 	     pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5822 ||
-	     pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5823
+	     pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5823 ||
+	     pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5825
 	     ))
 		return (BUS_PROBE_DEFAULT);
 	return (ENXIO);
@@ -240,6 +241,7 @@ ubsec_partname(struct ubsec_softc *sc)
 		case PCI_PRODUCT_BROADCOM_5821:	return "Broadcom 5821";
 		case PCI_PRODUCT_BROADCOM_5822:	return "Broadcom 5822";
 		case PCI_PRODUCT_BROADCOM_5823:	return "Broadcom 5823";
+		case PCI_PRODUCT_BROADCOM_5825:	return "Broadcom 5825";
 		}
 		return "Broadcom unknown-part";
 	case PCI_VENDOR_BLUESTEEL:
@@ -301,7 +303,8 @@ ubsec_attach(device_t dev)
 	if ((pci_get_vendor(dev) == PCI_VENDOR_BROADCOM &&
 	     (pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5821 ||
 	      pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5822 ||
-	      pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5823)) ||
+	      pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5823 ||
+	      pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5825)) ||
 	    (pci_get_vendor(dev) == PCI_VENDOR_SUN &&
 	     (pci_get_device(dev) == PCI_PRODUCT_SUN_SCA1K ||
 	      pci_get_device(dev) == PCI_PRODUCT_SUN_5821))) {

Modified: head/sys/dev/ubsec/ubsecreg.h
==============================================================================
--- head/sys/dev/ubsec/ubsecreg.h	Thu May  7 17:39:23 2009	(r191893)
+++ head/sys/dev/ubsec/ubsecreg.h	Thu May  7 18:03:47 2009	(r191894)
@@ -62,6 +62,7 @@
 #define	PCI_PRODUCT_BROADCOM_5821	0x5821		/* 5821 */
 #define	PCI_PRODUCT_BROADCOM_5822	0x5822		/* 5822 */
 #define	PCI_PRODUCT_BROADCOM_5823	0x5823		/* 5823 */
+#define	PCI_PRODUCT_BROADCOM_5825	0x5825		/* 5825 */
 
 /* Sun Microsystems */
 #define PCI_PRODUCT_SUN_5821		0x5454		/* Crypto 5821 */

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 18:14:22 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 248C6106566C;
	Thu,  7 May 2009 18:14:22 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 12A338FC18;
	Thu,  7 May 2009 18:14:22 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47IELT2063952;
	Thu, 7 May 2009 18:14:21 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47IELHo063951;
	Thu, 7 May 2009 18:14:21 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200905071814.n47IELHo063951@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 7 May 2009 18:14:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191895 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 18:14:23 -0000

Author: kib
Date: Thu May  7 18:14:21 2009
New Revision: 191895
URL: http://svn.freebsd.org/changeset/base/191895

Log:
  Eliminate the loop and the call to pause(9) in vfs_vget_ino(). If
  vfs_busy(MBF_NOWAIT) failed, unlock the vnode and sleep in vfs_busy().
  
  Suggested and reviewed by:	jeff
  Tested by:	pho
  MFC after:	3 weeks

Modified:
  head/sys/kern/vfs_vnops.c

Modified: head/sys/kern/vfs_vnops.c
==============================================================================
--- head/sys/kern/vfs_vnops.c	Thu May  7 18:03:47 2009	(r191894)
+++ head/sys/kern/vfs_vnops.c	Thu May  7 18:14:21 2009	(r191895)
@@ -1292,15 +1292,17 @@ vn_vget_ino(struct vnode *vp, ino_t ino,
 	ltype = VOP_ISLOCKED(vp);
 	KASSERT(ltype == LK_EXCLUSIVE || ltype == LK_SHARED,
 	    ("vn_vget_ino: vp not locked"));
-	for (;;) {
-		error = vfs_busy(mp, MBF_NOWAIT);
-		if (error == 0)
-			break;
+	error = vfs_busy(mp, MBF_NOWAIT);
+	if (error != 0) {
 		VOP_UNLOCK(vp, 0);
-		pause("vn_vget", 1);
+		error = vfs_busy(mp, 0);
 		vn_lock(vp, ltype | LK_RETRY);
-		if (vp->v_iflag & VI_DOOMED)
+		if (error != 0)
+			return (ENOENT);
+		if (vp->v_iflag & VI_DOOMED) {
+			vfs_unbusy(mp);
 			return (ENOENT);
+		}
 	}
 	VOP_UNLOCK(vp, 0);
 	error = VFS_VGET(mp, ino, lkflags, rvp);

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 18:36:48 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 29200106564A;
	Thu,  7 May 2009 18:36:48 +0000 (UTC)
	(envelope-from jamie@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 151128FC18;
	Thu,  7 May 2009 18:36:48 +0000 (UTC)
	(envelope-from jamie@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47Iamq5064572;
	Thu, 7 May 2009 18:36:48 GMT (envelope-from jamie@svn.freebsd.org)
Received: (from jamie@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47IalFi064565;
	Thu, 7 May 2009 18:36:47 GMT (envelope-from jamie@svn.freebsd.org)
Message-Id: <200905071836.n47IalFi064565@svn.freebsd.org>
From: Jamie Gritton 
Date: Thu, 7 May 2009 18:36:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191896 - in head/sys: amd64/linux32 compat/linux
	i386/linux kern sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 18:36:48 -0000

Author: jamie
Date: Thu May  7 18:36:47 2009
New Revision: 191896
URL: http://svn.freebsd.org/changeset/base/191896

Log:
  Move the per-prison Linux MIB from a private one-off pointer to the new
  OSD-based jail extensions.  This allows the Linux MIB to accessed via
  jail_set and jail_get, and serves as a demonstration of adding jail support
  to a module.
  
  Reviewed by:	dchagin, kib
  Approved by:	bz (mentor)

Modified:
  head/sys/amd64/linux32/linux32_sysvec.c
  head/sys/compat/linux/linux_mib.c
  head/sys/compat/linux/linux_mib.h
  head/sys/compat/linux/linux_stats.c
  head/sys/i386/linux/linux_sysvec.c
  head/sys/kern/kern_jail.c
  head/sys/sys/jail.h

Modified: head/sys/amd64/linux32/linux32_sysvec.c
==============================================================================
--- head/sys/amd64/linux32/linux32_sysvec.c	Thu May  7 18:14:21 2009	(r191895)
+++ head/sys/amd64/linux32/linux32_sysvec.c	Thu May  7 18:36:47 2009	(r191896)
@@ -1124,6 +1124,7 @@ linux_elf_modevent(module_t mod, int typ
 			    linux_proc_exec, NULL, 1000);
 			linux_szplatform = roundup(strlen(linux_platform) + 1,
 			    sizeof(char *));
+			linux_osd_jail_register();
 			if (bootverbose)
 				printf("Linux ELF exec handler installed\n");
 		} else
@@ -1151,6 +1152,7 @@ linux_elf_modevent(module_t mod, int typ
 			EVENTHANDLER_DEREGISTER(process_exit, linux_exit_tag);
 			EVENTHANDLER_DEREGISTER(schedtail, linux_schedtail_tag);
 			EVENTHANDLER_DEREGISTER(process_exec, linux_exec_tag);
+			linux_osd_jail_deregister();
 			if (bootverbose)
 				printf("Linux ELF exec handler removed\n");
 		} else

Modified: head/sys/compat/linux/linux_mib.c
==============================================================================
--- head/sys/compat/linux/linux_mib.c	Thu May  7 18:14:21 2009	(r191895)
+++ head/sys/compat/linux/linux_mib.c	Thu May  7 18:36:47 2009	(r191896)
@@ -35,9 +35,11 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
+#include 
 
 #include "opt_compat.h"
 
@@ -55,6 +57,8 @@ struct linux_prison {
 	int	pr_use_linux26;	/* flag to determine whether to use 2.6 emulation */
 };
 
+static unsigned linux_osd_jail_slot;
+
 SYSCTL_NODE(_compat, OID_AUTO, linux, CTLFLAG_RW, 0,
 	    "Linux mode");
 
@@ -128,58 +132,308 @@ SYSCTL_PROC(_compat_linux, OID_AUTO, oss
 /*
  * Returns holding the prison mutex if return non-NULL.
  */
-static struct prison *
-linux_get_prison(struct thread *td)
+static struct linux_prison *
+linux_get_prison(struct thread *td, struct prison **prp)
 {
-	register struct prison *pr;
-	register struct linux_prison *lpr;
+	struct prison *pr;
+	struct linux_prison *lpr;
 
 	KASSERT(td == curthread, ("linux_get_prison() called on !curthread"));
-	if (!jailed(td->td_ucred))
+	*prp = pr = td->td_ucred->cr_prison;
+	if (pr == NULL || !linux_osd_jail_slot)
 		return (NULL);
-	pr = td->td_ucred->cr_prison;
 	mtx_lock(&pr->pr_mtx);
-	if (pr->pr_linux == NULL) {
+	lpr = osd_jail_get(pr, linux_osd_jail_slot);
+	if (lpr == NULL)
+		mtx_unlock(&pr->pr_mtx);
+	return (lpr);
+}
+
+/*
+ * Ensure a prison has its own Linux info.  The prison should be locked on
+ * entrance and will be locked on exit (though it may get unlocked in the
+ * interrim).
+ */
+static int
+linux_alloc_prison(struct prison *pr, struct linux_prison **lprp)
+{
+	struct linux_prison *lpr, *nlpr;
+	int error;
+
+	/* If this prison already has Linux info, return that. */
+	error = 0;
+	mtx_assert(&pr->pr_mtx, MA_OWNED);
+	lpr = osd_jail_get(pr, linux_osd_jail_slot);
+	if (lpr != NULL)
+		goto done;
+	/*
+	 * Allocate a new info record.  Then check again, in case something
+	 * changed during the allocation.
+	 */
+	mtx_unlock(&pr->pr_mtx);
+	nlpr = malloc(sizeof(struct linux_prison), M_PRISON, M_WAITOK);
+	mtx_lock(&pr->pr_mtx);
+	lpr = osd_jail_get(pr, linux_osd_jail_slot);
+	if (lpr != NULL) {
+		free(nlpr, M_PRISON);
+		goto done;
+	}
+	error = osd_jail_set(pr, linux_osd_jail_slot, nlpr);
+	if (error)
+		free(nlpr, M_PRISON);
+	else {
+		lpr = nlpr;
+		mtx_lock(&osname_lock);
+		strncpy(lpr->pr_osname, linux_osname, LINUX_MAX_UTSNAME);
+		strncpy(lpr->pr_osrelease, linux_osrelease, LINUX_MAX_UTSNAME);
+		lpr->pr_oss_version = linux_oss_version;
+		lpr->pr_use_linux26 = linux_use_linux26;
+		mtx_unlock(&osname_lock);
+	}
+done:
+	if (lprp != NULL)
+		*lprp = lpr;
+	return (error);
+}
+
+/*
+ * Jail OSD methods for Linux prison data.
+ */
+static int
+linux_prison_create(void *obj, void *data)
+{
+	int error;
+	struct prison *pr = obj;
+	struct vfsoptlist *opts = data;
+
+	if (vfs_flagopt(opts, "nolinux", NULL, 0))
+		return (0);
+	/*
+	 * Inherit a prison's initial values from its parent
+	 * (different from NULL which also inherits changes).
+	 */
+	mtx_lock(&pr->pr_mtx);
+	error = linux_alloc_prison(pr, NULL);
+	mtx_unlock(&pr->pr_mtx);
+	return (error);
+}
+
+static int
+linux_prison_check(void *obj __unused, void *data)
+{
+	struct vfsoptlist *opts = data;
+	char *osname, *osrelease;
+	size_t len;
+	int error, oss_version;
+
+	/* Check that the parameters are correct. */
+	(void)vfs_flagopt(opts, "linux", NULL, 0);
+	(void)vfs_flagopt(opts, "nolinux", NULL, 0);
+	error = vfs_getopt(opts, "linux.osname", (void **)&osname, &len);
+	if (error != ENOENT) {
+		if (error != 0)
+			return (error);
+		if (len == 0 || osname[len - 1] != '\0')
+			return (EINVAL);
+		if (len > LINUX_MAX_UTSNAME) {
+			vfs_opterror(opts, "linux.osname too long");
+			return (ENAMETOOLONG);
+		}
+	}
+	error = vfs_getopt(opts, "linux.osrelease", (void **)&osrelease, &len);
+	if (error != ENOENT) {
+		if (error != 0)
+			return (error);
+		if (len == 0 || osrelease[len - 1] != '\0')
+			return (EINVAL);
+		if (len > LINUX_MAX_UTSNAME) {
+			vfs_opterror(opts, "linux.osrelease too long");
+			return (ENAMETOOLONG);
+		}
+	}
+	error = vfs_copyopt(opts, "linux.oss_version", &oss_version,
+	    sizeof(oss_version));
+	return (error == ENOENT ? 0 : error);
+}
+
+static int
+linux_prison_set(void *obj, void *data)
+{
+	struct linux_prison *lpr;
+	struct prison *pr = obj;
+	struct vfsoptlist *opts = data;
+	char *osname, *osrelease;
+	size_t len;
+	int error, gotversion, nolinux, oss_version, yeslinux;
+
+	/* Set the parameters, which should be correct. */
+	yeslinux = vfs_flagopt(opts, "linux", NULL, 0);
+	nolinux = vfs_flagopt(opts, "nolinux", NULL, 0);
+	error = vfs_getopt(opts, "linux.osname", (void **)&osname, &len);
+	if (error == ENOENT)
+		osname = NULL;
+	else
+		yeslinux = 1;
+	error = vfs_getopt(opts, "linux.osrelease", (void **)&osrelease, &len);
+	if (error == ENOENT)
+		osrelease = NULL;
+	else
+		yeslinux = 1;
+	error = vfs_copyopt(opts, "linux.oss_version", &oss_version,
+	    sizeof(oss_version));
+	gotversion = error == 0;
+	yeslinux |= gotversion;
+	if (nolinux) {
+		/* "nolinux": inherit the parent's Linux info. */
+		mtx_lock(&pr->pr_mtx);
+		osd_jail_del(pr, linux_osd_jail_slot);
+		mtx_unlock(&pr->pr_mtx);
+	} else if (yeslinux) {
 		/*
-		 * If we don't have a linux prison structure yet, allocate
-		 * one.  We have to handle the race where another thread
-		 * could be adding a linux prison to this process already.
+		 * "linux" or "linux.*":
+		 * the prison gets its own Linux info.
 		 */
-		mtx_unlock(&pr->pr_mtx);
-		lpr = malloc(sizeof(struct linux_prison), M_PRISON,
-		    M_WAITOK | M_ZERO);
 		mtx_lock(&pr->pr_mtx);
-		if (pr->pr_linux == NULL)
-			pr->pr_linux = lpr;
-		else
-			free(lpr, M_PRISON);
+		error = linux_alloc_prison(pr, &lpr);
+		if (error) {
+			mtx_unlock(&pr->pr_mtx);
+			return (error);
+		}
+		if (osname)
+			strlcpy(lpr->pr_osname, osname, LINUX_MAX_UTSNAME);
+		if (osrelease) {
+			strlcpy(lpr->pr_osrelease, osrelease,
+			    LINUX_MAX_UTSNAME);
+			lpr->pr_use_linux26 = strlen(osrelease) >= 3 &&
+			    osrelease[2] == '6';
+		}
+		if (gotversion)
+			lpr->pr_oss_version = oss_version;
+		mtx_unlock(&pr->pr_mtx);
+	}
+	return (0);
+}
+
+SYSCTL_JAIL_PARAM_NODE(linux, "Jail Linux parameters");
+SYSCTL_JAIL_PARAM(, nolinux, CTLTYPE_INT | CTLFLAG_RW,
+    "BN", "Jail w/ no Linux parameters");
+SYSCTL_JAIL_PARAM_STRING(_linux, osname, CTLFLAG_RW, LINUX_MAX_UTSNAME,
+    "Jail Linux kernel OS name");
+SYSCTL_JAIL_PARAM_STRING(_linux, osrelease, CTLFLAG_RW, LINUX_MAX_UTSNAME,
+    "Jail Linux kernel OS release");
+SYSCTL_JAIL_PARAM(_linux, oss_version, CTLTYPE_INT | CTLFLAG_RW,
+    "I", "Jail Linux OSS version");
+
+static int
+linux_prison_get(void *obj, void *data)
+{
+	struct linux_prison *lpr;
+	struct prison *pr = obj;
+	struct vfsoptlist *opts = data;
+	int error, i;
+
+	mtx_lock(&pr->pr_mtx);
+	/* Tell whether this prison has its own Linux info. */
+	lpr = osd_jail_get(pr, linux_osd_jail_slot);
+	i = lpr != NULL;
+	error = vfs_setopt(opts, "linux", &i, sizeof(i));
+	if (error != 0 && error != ENOENT)
+		goto done;
+	i = !i;
+	error = vfs_setopt(opts, "nolinux", &i, sizeof(i));
+	if (error != 0 && error != ENOENT)
+		goto done;
+	/*
+	 * It's kind of bogus to give the root info, but leave it to the caller
+	 * to check the above flag.
+	 */
+	if (lpr != NULL) {
+		error = vfs_setopts(opts, "linux.osname", lpr->pr_osname);
+		if (error != 0 && error != ENOENT)
+			goto done;
+		error = vfs_setopts(opts, "linux.osrelease", lpr->pr_osrelease);
+		if (error != 0 && error != ENOENT)
+			goto done;
+		error = vfs_setopt(opts, "linux.oss_version",
+		    &lpr->pr_oss_version, sizeof(lpr->pr_oss_version));
+		if (error != 0 && error != ENOENT)
+			goto done;
+	} else {
+		mtx_lock(&osname_lock);
+		error = vfs_setopts(opts, "linux.osname", linux_osname);
+		if (error != 0 && error != ENOENT)
+			goto done;
+		error = vfs_setopts(opts, "linux.osrelease", linux_osrelease);
+		if (error != 0 && error != ENOENT)
+			goto done;
+		error = vfs_setopt(opts, "linux.oss_version",
+		    &linux_oss_version, sizeof(linux_oss_version));
+		if (error != 0 && error != ENOENT)
+			goto done;
+		mtx_unlock(&osname_lock);
 	}
-	return (pr);
+	error = 0;
+
+ done:
+	mtx_unlock(&pr->pr_mtx);
+	return (error);
+}
+
+static void
+linux_prison_destructor(void *data)
+{
+
+	free(data, M_PRISON);
+}
+
+void
+linux_osd_jail_register(void)
+{
+	struct prison *pr;
+	osd_method_t methods[PR_MAXMETHOD] = {
+	    [PR_METHOD_CREATE] =	linux_prison_create,
+	    [PR_METHOD_GET] =		linux_prison_get,
+	    [PR_METHOD_SET] =		linux_prison_set,
+	    [PR_METHOD_CHECK] =		linux_prison_check
+	};
+
+	linux_osd_jail_slot =
+	    osd_jail_register(linux_prison_destructor, methods);
+	if (linux_osd_jail_slot > 0) {
+		/* Copy the system linux info to any current prisons. */
+		sx_xlock(&allprison_lock);
+		TAILQ_FOREACH(pr, &allprison, pr_list) {
+			mtx_lock(&pr->pr_mtx);
+			(void)linux_alloc_prison(pr, NULL);
+			mtx_unlock(&pr->pr_mtx);
+		}
+		sx_xunlock(&allprison_lock);
+	}
+}
+
+void
+linux_osd_jail_deregister(void)
+{
+
+	if (linux_osd_jail_slot)
+		osd_jail_deregister(linux_osd_jail_slot);
 }
 
 void
 linux_get_osname(struct thread *td, char *dst)
 {
-	register struct prison *pr;
-	register struct linux_prison *lpr;
+	struct prison *pr;
+	struct linux_prison *lpr;
 
-	pr = td->td_ucred->cr_prison;
-	if (pr != NULL) {
-		mtx_lock(&pr->pr_mtx);
-		if (pr->pr_linux != NULL) {
-			lpr = (struct linux_prison *)pr->pr_linux;
-			if (lpr->pr_osname[0]) {
-				bcopy(lpr->pr_osname, dst, LINUX_MAX_UTSNAME);
-				mtx_unlock(&pr->pr_mtx);
-				return;
-			}
-		}
+	lpr = linux_get_prison(td, &pr);
+	if (lpr != NULL) {
+		bcopy(lpr->pr_osname, dst, LINUX_MAX_UTSNAME);
 		mtx_unlock(&pr->pr_mtx);
+	} else {
+		mtx_lock(&osname_lock);
+		bcopy(linux_osname, dst, LINUX_MAX_UTSNAME);
+		mtx_unlock(&osname_lock);
 	}
-
-	mtx_lock(&osname_lock);
-	bcopy(linux_osname, dst, LINUX_MAX_UTSNAME);
-	mtx_unlock(&osname_lock);
 }
 
 int
@@ -188,10 +442,9 @@ linux_set_osname(struct thread *td, char
 	struct prison *pr;
 	struct linux_prison *lpr;
 
-	pr = linux_get_prison(td);
-	if (pr != NULL) {
-		lpr = (struct linux_prison *)pr->pr_linux;
-		strcpy(lpr->pr_osname, osname);
+	lpr = linux_get_prison(td, &pr);
+	if (lpr != NULL) {
+		strlcpy(lpr->pr_osname, osname, LINUX_MAX_UTSNAME);
 		mtx_unlock(&pr->pr_mtx);
 	} else {
 		mtx_lock(&osname_lock);
@@ -205,27 +458,18 @@ linux_set_osname(struct thread *td, char
 void
 linux_get_osrelease(struct thread *td, char *dst)
 {
-	register struct prison *pr;
+	struct prison *pr;
 	struct linux_prison *lpr;
 
-	pr = td->td_ucred->cr_prison;
-	if (pr != NULL) {
-		mtx_lock(&pr->pr_mtx);
-		if (pr->pr_linux != NULL) {
-			lpr = (struct linux_prison *)pr->pr_linux;
-			if (lpr->pr_osrelease[0]) {
-				bcopy(lpr->pr_osrelease, dst,
-				    LINUX_MAX_UTSNAME);
-				mtx_unlock(&pr->pr_mtx);
-				return;
-			}
-		}
+	lpr = linux_get_prison(td, &pr);
+	if (lpr != NULL) {
+		bcopy(lpr->pr_osrelease, dst, LINUX_MAX_UTSNAME);
 		mtx_unlock(&pr->pr_mtx);
+	} else {
+		mtx_lock(&osname_lock);
+		bcopy(linux_osrelease, dst, LINUX_MAX_UTSNAME);
+		mtx_unlock(&osname_lock);
 	}
-
-	mtx_lock(&osname_lock);
-	bcopy(linux_osrelease, dst, LINUX_MAX_UTSNAME);
-	mtx_unlock(&osname_lock);
 }
 
 int
@@ -233,16 +477,14 @@ linux_use26(struct thread *td)
 {
 	struct prison *pr;
 	struct linux_prison *lpr;
-	int use26 = linux_use_linux26;
+	int use26;
 
-	pr = td->td_ucred->cr_prison;
-	if (pr != NULL) {
-		if (pr->pr_linux != NULL) {
-			lpr = (struct linux_prison *)pr->pr_linux;
-			use26 = lpr->pr_use_linux26;
-		}
-	}
-	
+	lpr = linux_get_prison(td, &pr);
+	if (lpr != NULL) {
+		use26 = lpr->pr_use_linux26;
+		mtx_unlock(&pr->pr_mtx);
+	} else
+		use26 = linux_use_linux26;
 	return (use26);
 }
 
@@ -251,20 +493,18 @@ linux_set_osrelease(struct thread *td, c
 {
 	struct prison *pr;
 	struct linux_prison *lpr;
-	int use26;
-
-	use26 = (strlen(osrelease) >= 3 && osrelease[2] == '6');
 
-	pr = linux_get_prison(td);
-	if (pr != NULL) {
-		lpr = (struct linux_prison *)pr->pr_linux;
-		strcpy(lpr->pr_osrelease, osrelease);
-		lpr->pr_use_linux26 = use26;
+	lpr = linux_get_prison(td, &pr);
+	if (lpr != NULL) {
+		strlcpy(lpr->pr_osrelease, osrelease, LINUX_MAX_UTSNAME);
+		lpr->pr_use_linux26 =
+		    strlen(osrelease) >= 3 && osrelease[2] == '6';
 		mtx_unlock(&pr->pr_mtx);
 	} else {
 		mtx_lock(&osname_lock);
 		strcpy(linux_osrelease, osrelease);
-		linux_use_linux26 = use26;
+		linux_use_linux26 =
+		    strlen(osrelease) >= 3 && osrelease[2] == '6';
 		mtx_unlock(&osname_lock);
 	}
 
@@ -274,27 +514,16 @@ linux_set_osrelease(struct thread *td, c
 int
 linux_get_oss_version(struct thread *td)
 {
-	register struct prison *pr;
-	register struct linux_prison *lpr;
+	struct prison *pr;
+	struct linux_prison *lpr;
 	int version;
 
-	pr = td->td_ucred->cr_prison;
-	if (pr != NULL) {
-		mtx_lock(&pr->pr_mtx);
-		if (pr->pr_linux != NULL) {
-			lpr = (struct linux_prison *)pr->pr_linux;
-			if (lpr->pr_oss_version) {
-				version = lpr->pr_oss_version;
-				mtx_unlock(&pr->pr_mtx);
-				return (version);
-			}
-		}
+	lpr = linux_get_prison(td, &pr);
+	if (lpr != NULL) {
+		version = lpr->pr_oss_version;
 		mtx_unlock(&pr->pr_mtx);
-	}
-
-	mtx_lock(&osname_lock);
-	version = linux_oss_version;
-	mtx_unlock(&osname_lock);
+	} else
+		version = linux_oss_version;
 	return (version);
 }
 
@@ -304,9 +533,8 @@ linux_set_oss_version(struct thread *td,
 	struct prison *pr;
 	struct linux_prison *lpr;
 
-	pr = linux_get_prison(td);
-	if (pr != NULL) {
-		lpr = (struct linux_prison *)pr->pr_linux;
+	lpr = linux_get_prison(td, &pr);
+	if (lpr != NULL) {
 		lpr->pr_oss_version = oss_version;
 		mtx_unlock(&pr->pr_mtx);
 	} else {

Modified: head/sys/compat/linux/linux_mib.h
==============================================================================
--- head/sys/compat/linux/linux_mib.h	Thu May  7 18:14:21 2009	(r191895)
+++ head/sys/compat/linux/linux_mib.h	Thu May  7 18:36:47 2009	(r191896)
@@ -31,6 +31,9 @@
 #ifndef _LINUX_MIB_H_
 #define _LINUX_MIB_H_
 
+void	linux_osd_jail_register(void);
+void	linux_osd_jail_deregister(void);
+
 void	linux_get_osname(struct thread *td, char *dst);
 int	linux_set_osname(struct thread *td, char *osname);
 

Modified: head/sys/compat/linux/linux_stats.c
==============================================================================
--- head/sys/compat/linux/linux_stats.c	Thu May  7 18:14:21 2009	(r191895)
+++ head/sys/compat/linux/linux_stats.c	Thu May  7 18:36:47 2009	(r191896)
@@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: head/sys/i386/linux/linux_sysvec.c
==============================================================================
--- head/sys/i386/linux/linux_sysvec.c	Thu May  7 18:14:21 2009	(r191895)
+++ head/sys/i386/linux/linux_sysvec.c	Thu May  7 18:36:47 2009	(r191896)
@@ -1091,6 +1091,7 @@ linux_elf_modevent(module_t mod, int typ
 			linux_get_machine(&linux_platform);
 			linux_szplatform = roundup(strlen(linux_platform) + 1,
 			    sizeof(char *));
+			linux_osd_jail_register();
 			if (bootverbose)
 				printf("Linux ELF exec handler installed\n");
 		} else
@@ -1118,6 +1119,7 @@ linux_elf_modevent(module_t mod, int typ
 			EVENTHANDLER_DEREGISTER(process_exit, linux_exit_tag);
 			EVENTHANDLER_DEREGISTER(schedtail, linux_schedtail_tag);
 			EVENTHANDLER_DEREGISTER(process_exec, linux_exec_tag);
+			linux_osd_jail_deregister();
 			if (bootverbose)
 				printf("Linux ELF exec handler removed\n");
 		} else

Modified: head/sys/kern/kern_jail.c
==============================================================================
--- head/sys/kern/kern_jail.c	Thu May  7 18:14:21 2009	(r191895)
+++ head/sys/kern/kern_jail.c	Thu May  7 18:36:47 2009	(r191896)
@@ -1713,7 +1713,6 @@ prison_deref(struct prison *pr, int flag
 		VFS_UNLOCK_GIANT(vfslocked);
 	}
 	mtx_destroy(&pr->pr_mtx);
-	free(pr->pr_linux, M_PRISON);
 #ifdef INET
 	free(pr->pr_ip4, M_PRISON);
 #endif

Modified: head/sys/sys/jail.h
==============================================================================
--- head/sys/sys/jail.h	Thu May  7 18:14:21 2009	(r191895)
+++ head/sys/sys/jail.h	Thu May  7 18:36:47 2009	(r191896)
@@ -162,7 +162,7 @@ struct prison {
 	struct vnode	*pr_root;			/* (c) vnode to rdir */
 	char		 pr_host[MAXHOSTNAMELEN];	/* (p) jail hostname */
 	char		 pr_name[MAXHOSTNAMELEN];	/* (p) admin jail name */
-	void		*pr_linux;			/* (p) linux abi */
+	void		*pr_spare;			/*     was pr_linux */
 	int		 pr_securelevel;		/* (p) securelevel */
 	struct task	 pr_task;			/* (d) destroy task */
 	struct mtx	 pr_mtx;

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 18:57:38 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EF85B106566B;
	Thu,  7 May 2009 18:57:38 +0000 (UTC)
	(envelope-from dchagin@dchagin.static.corbina.ru)
Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5])
	by mx1.freebsd.org (Postfix) with ESMTP id 9636F8FC2C;
	Thu,  7 May 2009 18:57:38 +0000 (UTC)
	(envelope-from dchagin@dchagin.static.corbina.ru)
Received: from corbina.ru (mail.post.ru [195.14.50.16])
	by contrabass.post.ru (Postfix) with ESMTP id 498C299E7B;
	Thu,  7 May 2009 22:57:37 +0400 (MSD)
X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9
Received: from [10.208.17.3] (HELO dchagin.static.corbina.ru)
	by corbina.ru (CommuniGate Pro SMTP 5.1.14)
	with ESMTPS id 1777708808; Thu, 07 May 2009 22:57:37 +0400
Received: from dchagin.static.corbina.ru (localhost.chd.net [127.0.0.1])
	by dchagin.static.corbina.ru (8.14.3/8.14.3) with ESMTP id
	n47Ivapm031386; Thu, 7 May 2009 22:57:36 +0400 (MSD)
	(envelope-from dchagin@dchagin.static.corbina.ru)
Received: (from dchagin@localhost)
	by dchagin.static.corbina.ru (8.14.3/8.14.3/Submit) id n47IvVU7031385; 
	Thu, 7 May 2009 22:57:31 +0400 (MSD) (envelope-from dchagin)
Date: Thu, 7 May 2009 22:57:31 +0400
From: Chagin Dmitry 
To: Jamie Gritton 
Message-ID: <20090507185731.GA31336@dchagin.static.corbina.ru>
References: <200905071836.n47IalFi064565@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="liOOAslEiF7prFVr"
Content-Disposition: inline
In-Reply-To: <200905071836.n47IalFi064565@svn.freebsd.org>
User-Agent: Mutt/1.5.19 (2009-01-05)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r191896 - in head/sys: amd64/linux32 compat/linux
	i386/linux kern sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 18:57:39 -0000


--liOOAslEiF7prFVr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, May 07, 2009 at 06:36:47PM +0000, Jamie Gritton wrote:
> Author: jamie
> Date: Thu May  7 18:36:47 2009
> New Revision: 191896
> URL: http://svn.freebsd.org/changeset/base/191896
>=20
> Log:
>   Move the per-prison Linux MIB from a private one-off pointer to the new
>   OSD-based jail extensions.  This allows the Linux MIB to accessed via
>   jail_set and jail_get, and serves as a demonstration of adding jail sup=
port
>   to a module.
>  =20
>   Reviewed by:	dchagin, kib
>   Approved by:	bz (mentor)
>=20


whoops

-Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-ex=
tensions -c /work/pub/head/sys/modules/linux/../../compat/linux/linux_mib.c
cc1: warnings being treated as errors
/work/pub/head/sys/modules/linux/../../compat/linux/linux_mib.c: In functio=
n 'linux_prison_check':
/work/pub/head/sys/modules/linux/../../compat/linux/linux_mib.c:232: warnin=
g: passing argument 4 of 'vfs_getopt' from incompatible pointer type
/work/pub/head/sys/modules/linux/../../compat/linux/linux_mib.c:243: warnin=
g: passing argument 4 of 'vfs_getopt' from incompatible pointer type
/work/pub/head/sys/modules/linux/../../compat/linux/linux_mib.c: In functio=
n 'linux_prison_set':
/work/pub/head/sys/modules/linux/../../compat/linux/linux_mib.c:272: warnin=
g: passing argument 4 of 'vfs_getopt' from incompatible pointer type
/work/pub/head/sys/modules/linux/../../compat/linux/linux_mib.c:277: warnin=
g: passing argument 4 of 'vfs_getopt' from incompatible pointer type
*** Error code 1

Stop in /work/pub/head/sys/modules/linux.
*** Error code 1


--=20
Have fun!
chd

--liOOAslEiF7prFVr
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (FreeBSD)

iEYEARECAAYFAkoDLxsACgkQ0t2Tb3OO/O1yyACcDU8Kakkm0c20FpAx7rt/x2Ax
ezwAn3P4bIfbK/adN3QXslFYgGfMsGI+
=nsBq
-----END PGP SIGNATURE-----

--liOOAslEiF7prFVr--

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 19:17:06 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C088D106564A;
	Thu,  7 May 2009 19:17:06 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AE8928FC16;
	Thu,  7 May 2009 19:17:06 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47JH606065560;
	Thu, 7 May 2009 19:17:06 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47JH6nw065558;
	Thu, 7 May 2009 19:17:06 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200905071917.n47JH6nw065558@svn.freebsd.org>
From: Alexander Motin 
Date: Thu, 7 May 2009 19:17:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191897 - in head/sys/dev/ata: . chipsets
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 19:17:07 -0000

Author: mav
Date: Thu May  7 19:17:06 2009
New Revision: 191897
URL: http://svn.freebsd.org/changeset/base/191897

Log:
  Add ID of one more SII3132 revision found on adaptec aar-1225sa rev a2.
  
  PR:		kern/127289

Modified:
  head/sys/dev/ata/ata-pci.h
  head/sys/dev/ata/chipsets/ata-siliconimage.c

Modified: head/sys/dev/ata/ata-pci.h
==============================================================================
--- head/sys/dev/ata/ata-pci.h	Thu May  7 18:36:47 2009	(r191896)
+++ head/sys/dev/ata/ata-pci.h	Thu May  7 19:17:06 2009	(r191897)
@@ -345,6 +345,7 @@ struct ata_pci_controller {
 #define ATA_SII3124		0x31241095
 #define ATA_SII3132		0x31321095
 #define ATA_SII3132_1		0x02421095
+#define ATA_SII3132_2		0x02441095
 #define ATA_SII0680             0x06801095
 #define ATA_CMD646              0x06461095
 #define ATA_CMD648              0x06481095

Modified: head/sys/dev/ata/chipsets/ata-siliconimage.c
==============================================================================
--- head/sys/dev/ata/chipsets/ata-siliconimage.c	Thu May  7 18:36:47 2009	(r191896)
+++ head/sys/dev/ata/chipsets/ata-siliconimage.c	Thu May  7 19:17:06 2009	(r191897)
@@ -99,6 +99,7 @@ ata_sii_probe(device_t dev)
      { ATA_SII3124,   0x00, SII_PRBIO, SII_4CH,    ATA_SA300, "3124" },
      { ATA_SII3132,   0x00, SII_PRBIO, 0,          ATA_SA300, "3132" },
      { ATA_SII3132_1, 0x00, SII_PRBIO, 0,          ATA_SA300, "3132" },
+     { ATA_SII3132_2, 0x00, SII_PRBIO, 0,          ATA_SA300, "3132" },
      { ATA_SII0680,   0x00, SII_MEMIO, SII_SETCLK, ATA_UDMA6, "680" },
      { ATA_CMD649,    0x00, 0,         SII_INTR,   ATA_UDMA5, "(CMD) 649" },
      { ATA_CMD648,    0x00, 0,         SII_INTR,   ATA_UDMA4, "(CMD) 648" },

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 19:18:03 2009
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BCF371065674;
	Thu,  7 May 2009 19:18:03 +0000 (UTC)
	(envelope-from jamie@FreeBSD.org)
Received: from gritton.org (gritton.org [161.58.222.4])
	by mx1.freebsd.org (Postfix) with ESMTP id 80F9D8FC17;
	Thu,  7 May 2009 19:18:03 +0000 (UTC)
	(envelope-from jamie@FreeBSD.org)
Received: from guppy.corp.verio.net (fw.oremut02.us.wh.verio.net
	[198.65.168.24]) (authenticated bits=0)
	by gritton.org (8.13.6.20060614/8.13.6) with ESMTP id n47JI2ou006965;
	Thu, 7 May 2009 13:18:02 -0600 (MDT)
Message-ID: <4A0333E4.1070101@FreeBSD.org>
Date: Thu, 07 May 2009 13:17:56 -0600
From: Jamie Gritton 
User-Agent: Thunderbird 2.0.0.19 (X11/20090109)
MIME-Version: 1.0
To: Chagin Dmitry 
References: <200905071836.n47IalFi064565@svn.freebsd.org>
	<20090507185731.GA31336@dchagin.static.corbina.ru>
In-Reply-To: <20090507185731.GA31336@dchagin.static.corbina.ru>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV 0.94.2/9342/Thu May  7 11:33:10 2009 on gritton.org
X-Virus-Status: Clean
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r191896 - in head/sys: amd64/linux32 compat/linux
 i386/linux kern sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 19:18:04 -0000

Chagin Dmitry wrote:
> On Thu, May 07, 2009 at 06:36:47PM +0000, Jamie Gritton wrote:
>> Author: jamie
>> Date: Thu May  7 18:36:47 2009
>> New Revision: 191896
>> URL: http://svn.freebsd.org/changeset/base/191896
>>
>> Log:
>>   Move the per-prison Linux MIB from a private one-off pointer to the new
>>   OSD-based jail extensions.  This allows the Linux MIB to accessed via
>>   jail_set and jail_get, and serves as a demonstration of adding jail support
>>   to a module.
>>   
>>   Reviewed by:	dchagin, kib
>>   Approved by:	bz (mentor)
>>
> 
> 
> whoops
> 
> -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c /work/pub/head/sys/modules/linux/../../compat/linux/linux_mib.c
> cc1: warnings being treated as errors
> /work/pub/head/sys/modules/linux/../../compat/linux/linux_mib.c: In function 'linux_prison_check':
> /work/pub/head/sys/modules/linux/../../compat/linux/linux_mib.c:232: warning: passing argument 4 of 'vfs_getopt' from incompatible pointer type
> /work/pub/head/sys/modules/linux/../../compat/linux/linux_mib.c:243: warning: passing argument 4 of 'vfs_getopt' from incompatible pointer type
> /work/pub/head/sys/modules/linux/../../compat/linux/linux_mib.c: In function 'linux_prison_set':
> /work/pub/head/sys/modules/linux/../../compat/linux/linux_mib.c:272: warning: passing argument 4 of 'vfs_getopt' from incompatible pointer type
> /work/pub/head/sys/modules/linux/../../compat/linux/linux_mib.c:277: warning: passing argument 4 of 'vfs_getopt' from incompatible pointer type
> *** Error code 1
> 
> Stop in /work/pub/head/sys/modules/linux.
> *** Error code 1

Never saw that - must be something funny about compiling a Current
kernel on a Release 7 box.

- Jamie

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 19:21:20 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1FC671065673;
	Thu,  7 May 2009 19:21:20 +0000 (UTC)
	(envelope-from dchagin@dchagin.static.corbina.ru)
Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5])
	by mx1.freebsd.org (Postfix) with ESMTP id A8D6D8FC22;
	Thu,  7 May 2009 19:21:19 +0000 (UTC)
	(envelope-from dchagin@dchagin.static.corbina.ru)
Received: from corbina.ru (mail.post.ru [195.14.50.16])
	by contrabass.post.ru (Postfix) with ESMTP id 6792E99830;
	Thu,  7 May 2009 23:21:18 +0400 (MSD)
X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9
Received: from [10.208.17.3] (HELO dchagin.static.corbina.ru)
	by corbina.ru (CommuniGate Pro SMTP 5.1.14)
	with ESMTPS id 1777728691; Thu, 07 May 2009 23:21:18 +0400
Received: from dchagin.static.corbina.ru (localhost.chd.net [127.0.0.1])
	by dchagin.static.corbina.ru (8.14.3/8.14.3) with ESMTP id
	n47JLHNM038758; Thu, 7 May 2009 23:21:17 +0400 (MSD)
	(envelope-from dchagin@dchagin.static.corbina.ru)
Received: (from dchagin@localhost)
	by dchagin.static.corbina.ru (8.14.3/8.14.3/Submit) id n47JLC9f038757; 
	Thu, 7 May 2009 23:21:12 +0400 (MSD) (envelope-from dchagin)
Date: Thu, 7 May 2009 23:21:12 +0400
From: Chagin Dmitry 
To: Jamie Gritton 
Message-ID: <20090507192112.GA37183@dchagin.static.corbina.ru>
References: <200905071836.n47IalFi064565@svn.freebsd.org>
	<20090507185731.GA31336@dchagin.static.corbina.ru>
	<4A0333E4.1070101@FreeBSD.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="J/dobhs11T7y2rNN"
Content-Disposition: inline
In-Reply-To: <4A0333E4.1070101@FreeBSD.org>
User-Agent: Mutt/1.5.19 (2009-01-05)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r191896 - in head/sys: amd64/linux32 compat/linux
	i386/linux kern sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 19:21:20 -0000


--J/dobhs11T7y2rNN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, May 07, 2009 at 01:17:56PM -0600, Jamie Gritton wrote:
> Chagin Dmitry wrote:
> > On Thu, May 07, 2009 at 06:36:47PM +0000, Jamie Gritton wrote:
> >> Author: jamie
> >> Date: Thu May  7 18:36:47 2009
> >> New Revision: 191896
> >> URL: http://svn.freebsd.org/changeset/base/191896
> >>
> >> Log:
> >>   Move the per-prison Linux MIB from a private one-off pointer to the =
new
> >>   OSD-based jail extensions.  This allows the Linux MIB to accessed via
> >>   jail_set and jail_get, and serves as a demonstration of adding jail =
support
> >>   to a module.
> >>  =20
> >>   Reviewed by:	dchagin, kib
> >>   Approved by:	bz (mentor)
> >>
> >=20
> >=20
> > whoops
> >=20
> > -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fforma=
t-extensions -c /work/pub/head/sys/modules/linux/../../compat/linux/linux_m=
ib.c
> > cc1: warnings being treated as errors
> > /work/pub/head/sys/modules/linux/../../compat/linux/linux_mib.c: In fun=
ction 'linux_prison_check':
> > /work/pub/head/sys/modules/linux/../../compat/linux/linux_mib.c:232: wa=
rning: passing argument 4 of 'vfs_getopt' from incompatible pointer type
> > /work/pub/head/sys/modules/linux/../../compat/linux/linux_mib.c:243: wa=
rning: passing argument 4 of 'vfs_getopt' from incompatible pointer type
> > /work/pub/head/sys/modules/linux/../../compat/linux/linux_mib.c: In fun=
ction 'linux_prison_set':
> > /work/pub/head/sys/modules/linux/../../compat/linux/linux_mib.c:272: wa=
rning: passing argument 4 of 'vfs_getopt' from incompatible pointer type
> > /work/pub/head/sys/modules/linux/../../compat/linux/linux_mib.c:277: wa=
rning: passing argument 4 of 'vfs_getopt' from incompatible pointer type
> > *** Error code 1
> >=20
> > Stop in /work/pub/head/sys/modules/linux.
> > *** Error code 1
>=20
> Never saw that - must be something funny about compiling a Current
> kernel on a Release 7 box.
>=20
> - Jamie

size_t !=3D int on some arch.


# cat __tmp.patch
diff --git a/sys/compat/linux/linux_mib.c b/sys/compat/linux/linux_mib.c
index fd17773..c5734a0 100644
--- a/sys/compat/linux/linux_mib.c
+++ b/sys/compat/linux/linux_mib.c
@@ -223,7 +223,7 @@ linux_prison_check(void *obj __unused, void *data)
 {
        struct vfsoptlist *opts =3D data;
        char *osname, *osrelease;
-       size_t len;
+       int len;
        int error, oss_version;

        /* Check that the parameters are correct. */
@@ -263,7 +263,7 @@ linux_prison_set(void *obj, void *data)
        struct prison *pr =3D obj;
        struct vfsoptlist *opts =3D data;
        char *osname, *osrelease;
-       size_t len;
+       int len;
        int error, gotversion, nolinux, oss_version, yeslinux;

        /* Set the parameters, which should be correct. */

--=20
Have fun!
chd

--J/dobhs11T7y2rNN
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (FreeBSD)

iEYEARECAAYFAkoDNKcACgkQ0t2Tb3OO/O3u0QCcD3Y0vPgOS3e6i1LKoctwqDTw
VfwAnix41v6v+raihuIY7u4zyql7a7Ru
=N0OA
-----END PGP SIGNATURE-----

--J/dobhs11T7y2rNN--

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 19:46:29 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8CD9010657E3;
	Thu,  7 May 2009 19:46:29 +0000 (UTC)
	(envelope-from jamie@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6172D8FC23;
	Thu,  7 May 2009 19:46:29 +0000 (UTC)
	(envelope-from jamie@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47JkTmh066267;
	Thu, 7 May 2009 19:46:29 GMT (envelope-from jamie@svn.freebsd.org)
Received: (from jamie@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47JkTmQ066266;
	Thu, 7 May 2009 19:46:29 GMT (envelope-from jamie@svn.freebsd.org)
Message-Id: <200905071946.n47JkTmQ066266@svn.freebsd.org>
From: Jamie Gritton 
Date: Thu, 7 May 2009 19:46:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191898 - head/sys/compat/linux
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 19:46:31 -0000

Author: jamie
Date: Thu May  7 19:46:29 2009
New Revision: 191898
URL: http://svn.freebsd.org/changeset/base/191898

Log:
  Give vfs_getopt the type it's expecting.
  Write 100 times: "32 bits is so twentieth century."
  
  Noticed by:	dchagin

Modified:
  head/sys/compat/linux/linux_mib.c

Modified: head/sys/compat/linux/linux_mib.c
==============================================================================
--- head/sys/compat/linux/linux_mib.c	Thu May  7 19:17:06 2009	(r191897)
+++ head/sys/compat/linux/linux_mib.c	Thu May  7 19:46:29 2009	(r191898)
@@ -223,8 +223,7 @@ linux_prison_check(void *obj __unused, v
 {
 	struct vfsoptlist *opts = data;
 	char *osname, *osrelease;
-	size_t len;
-	int error, oss_version;
+	int error, len, oss_version;
 
 	/* Check that the parameters are correct. */
 	(void)vfs_flagopt(opts, "linux", NULL, 0);
@@ -263,8 +262,7 @@ linux_prison_set(void *obj, void *data)
 	struct prison *pr = obj;
 	struct vfsoptlist *opts = data;
 	char *osname, *osrelease;
-	size_t len;
-	int error, gotversion, nolinux, oss_version, yeslinux;
+	int error, gotversion, len, nolinux, oss_version, yeslinux;
 
 	/* Set the parameters, which should be correct. */
 	yeslinux = vfs_flagopt(opts, "linux", NULL, 0);

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 19:48:31 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D25C510656F7;
	Thu,  7 May 2009 19:48:31 +0000 (UTC)
	(envelope-from juli@clockworksquid.com)
Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.29])
	by mx1.freebsd.org (Postfix) with ESMTP id 548948FC26;
	Thu,  7 May 2009 19:48:31 +0000 (UTC)
	(envelope-from juli@clockworksquid.com)
Received: by yx-out-2324.google.com with SMTP id 8so574266yxb.13
	for ; Thu, 07 May 2009 12:48:30 -0700 (PDT)
MIME-Version: 1.0
Sender: juli@clockworksquid.com
Received: by 10.90.66.14 with SMTP id o14mr1359631aga.10.1241725710629; Thu, 
	07 May 2009 12:48:30 -0700 (PDT)
In-Reply-To: <200905071946.n47JkTmQ066266@svn.freebsd.org>
References: <200905071946.n47JkTmQ066266@svn.freebsd.org>
From: Juli Mallett 
Date: Thu, 7 May 2009 12:48:10 -0700
X-Google-Sender-Auth: f970ee702ea1c869
Message-ID: 
To: Jamie Gritton 
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r191898 - head/sys/compat/linux
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 19:48:32 -0000

Worth remembering: the difference is not just that their sizes may
(often do) differ.  size_t is unsigned.  ssize_t is signed.  An
unqualified int is signed.

On Thu, May 7, 2009 at 12:46 PM, Jamie Gritton  wrote:
> Author: jamie
> Date: Thu May =A07 19:46:29 2009
> New Revision: 191898
> URL: http://svn.freebsd.org/changeset/base/191898
>
> Log:
> =A0Give vfs_getopt the type it's expecting.
> =A0Write 100 times: "32 bits is so twentieth century."
>
> =A0Noticed by: =A0 dchagin
>
> Modified:
> =A0head/sys/compat/linux/linux_mib.c
>
> Modified: head/sys/compat/linux/linux_mib.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sys/compat/linux/linux_mib.c =A0 Thu May =A07 19:17:06 2009 =A0 =
=A0 =A0 =A0(r191897)
> +++ head/sys/compat/linux/linux_mib.c =A0 Thu May =A07 19:46:29 2009 =A0 =
=A0 =A0 =A0(r191898)
> @@ -223,8 +223,7 @@ linux_prison_check(void *obj __unused, v
> =A0{
> =A0 =A0 =A0 =A0struct vfsoptlist *opts =3D data;
> =A0 =A0 =A0 =A0char *osname, *osrelease;
> - =A0 =A0 =A0 size_t len;
> - =A0 =A0 =A0 int error, oss_version;
> + =A0 =A0 =A0 int error, len, oss_version;
>
> =A0 =A0 =A0 =A0/* Check that the parameters are correct. */
> =A0 =A0 =A0 =A0(void)vfs_flagopt(opts, "linux", NULL, 0);
> @@ -263,8 +262,7 @@ linux_prison_set(void *obj, void *data)
> =A0 =A0 =A0 =A0struct prison *pr =3D obj;
> =A0 =A0 =A0 =A0struct vfsoptlist *opts =3D data;
> =A0 =A0 =A0 =A0char *osname, *osrelease;
> - =A0 =A0 =A0 size_t len;
> - =A0 =A0 =A0 int error, gotversion, nolinux, oss_version, yeslinux;
> + =A0 =A0 =A0 int error, gotversion, len, nolinux, oss_version, yeslinux;
>
> =A0 =A0 =A0 =A0/* Set the parameters, which should be correct. */
> =A0 =A0 =A0 =A0yeslinux =3D vfs_flagopt(opts, "linux", NULL, 0);
>

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 19:57:14 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5851D1065674;
	Thu,  7 May 2009 19:57:14 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 46AF18FC15;
	Thu,  7 May 2009 19:57:14 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47JvEBo066532;
	Thu, 7 May 2009 19:57:14 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47JvEWe066531;
	Thu, 7 May 2009 19:57:14 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <200905071957.n47JvEWe066531@svn.freebsd.org>
From: Kip Macy 
Date: Thu, 7 May 2009 19:57:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191899 - head/sys/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 19:57:14 -0000

Author: kmacy
Date: Thu May  7 19:57:14 2009
New Revision: 191899
URL: http://svn.freebsd.org/changeset/base/191899

Log:
  No man page currently exists so comment the two uncommented
  non-trivial functions

Modified:
  head/sys/sys/buf_ring.h

Modified: head/sys/sys/buf_ring.h
==============================================================================
--- head/sys/sys/buf_ring.h	Thu May  7 19:46:29 2009	(r191898)
+++ head/sys/sys/buf_ring.h	Thu May  7 19:57:14 2009	(r191899)
@@ -1,6 +1,6 @@
 /**************************************************************************
  *
- * Copyright (c) 2007,2008 Kip Macy kmacy@freebsd.org
+ * Copyright (c) 2007-2009 Kip Macy kmacy@freebsd.org
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -69,7 +69,10 @@ struct buf_ring {
 	void			*br_ring[0];
 };
 
-
+/*
+ * multi-producer safe lock-free ring buffer enqueue
+ *
+ */
 static __inline int
 buf_ring_enqueue(struct buf_ring *br, void *buf)
 {
@@ -169,8 +172,9 @@ buf_ring_dequeue_mc(struct buf_ring *br)
 }
 
 /*
- * Single-Consumer dequeue for uses where dequeue
- * is protected by a lock
+ * single-consumer dequeue 
+ * use where dequeue is protected by a lock
+ * e.g. a network driver's tx queue lock
  */
 static __inline void *
 buf_ring_dequeue_sc(struct buf_ring *br)
@@ -208,6 +212,11 @@ buf_ring_dequeue_sc(struct buf_ring *br)
 	return (buf);
 }
 
+/*
+ * return a pointer to the first entry in the ring
+ * without modifying it, or NULL if the ring is empty
+ * race-prone if not protected by a lock
+ */
 static __inline void *
 buf_ring_peek(struct buf_ring *br)
 {

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 20:13:17 2009
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7B1B3106566B;
	Thu,  7 May 2009 20:13:17 +0000 (UTC)
	(envelope-from jamie@FreeBSD.org)
Received: from gritton.org (gritton.org [161.58.222.4])
	by mx1.freebsd.org (Postfix) with ESMTP id 240D88FC0C;
	Thu,  7 May 2009 20:13:16 +0000 (UTC)
	(envelope-from jamie@FreeBSD.org)
Received: from guppy.corp.verio.net (fw.oremut02.us.wh.verio.net
	[198.65.168.24]) (authenticated bits=0)
	by gritton.org (8.13.6.20060614/8.13.6) with ESMTP id n47KDFv9014439;
	Thu, 7 May 2009 14:13:16 -0600 (MDT)
Message-ID: <4A0340D6.3060704@FreeBSD.org>
Date: Thu, 07 May 2009 14:13:10 -0600
From: Jamie Gritton 
User-Agent: Thunderbird 2.0.0.19 (X11/20090109)
MIME-Version: 1.0
To: Juli Mallett 
References: <200905071946.n47JkTmQ066266@svn.freebsd.org>
	
In-Reply-To: 
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV 0.94.2/9342/Thu May  7 11:33:10 2009 on gritton.org
X-Virus-Status: Clean
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r191898 - head/sys/compat/linux
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 20:13:18 -0000

True.  Int isn't really the proper type for the situation, but it's what
the function uses, signed and too-short as it may be.  I fall into this
habit of thinking "lengths are size_t" when it's untrue in a lot of
existing code.

Juli Mallett wrote:
> Worth remembering: the difference is not just that their sizes may
> (often do) differ.  size_t is unsigned.  ssize_t is signed.  An
> unqualified int is signed.
> 
> On Thu, May 7, 2009 at 12:46 PM, Jamie Gritton  wrote:
>> Author: jamie
>> Date: Thu May  7 19:46:29 2009
>> New Revision: 191898
>> URL: http://svn.freebsd.org/changeset/base/191898
>>
>> Log:
>>  Give vfs_getopt the type it's expecting.
>>  Write 100 times: "32 bits is so twentieth century."
>>
>>  Noticed by:   dchagin
>>
>> Modified:
>>  head/sys/compat/linux/linux_mib.c
>>
>> Modified: head/sys/compat/linux/linux_mib.c
>> ==============================================================================
>> --- head/sys/compat/linux/linux_mib.c   Thu May  7 19:17:06 2009        (r191897)
>> +++ head/sys/compat/linux/linux_mib.c   Thu May  7 19:46:29 2009        (r191898)
>> @@ -223,8 +223,7 @@ linux_prison_check(void *obj __unused, v
>>  {
>>        struct vfsoptlist *opts = data;
>>        char *osname, *osrelease;
>> -       size_t len;
>> -       int error, oss_version;
>> +       int error, len, oss_version;
>>
>>        /* Check that the parameters are correct. */
>>        (void)vfs_flagopt(opts, "linux", NULL, 0);
>> @@ -263,8 +262,7 @@ linux_prison_set(void *obj, void *data)
>>        struct prison *pr = obj;
>>        struct vfsoptlist *opts = data;
>>        char *osname, *osrelease;
>> -       size_t len;
>> -       int error, gotversion, nolinux, oss_version, yeslinux;
>> +       int error, gotversion, len, nolinux, oss_version, yeslinux;
>>
>>        /* Set the parameters, which should be correct. */
>>        yeslinux = vfs_flagopt(opts, "linux", NULL, 0);
>>
> 

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 20:28:07 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 87BA3106566C;
	Thu,  7 May 2009 20:28:07 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7441E8FC18;
	Thu,  7 May 2009 20:28:07 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47KS7Mg067254;
	Thu, 7 May 2009 20:28:07 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47KS6Zc067249;
	Thu, 7 May 2009 20:28:06 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <200905072028.n47KS6Zc067249@svn.freebsd.org>
From: Kip Macy 
Date: Thu, 7 May 2009 20:28:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191900 - in
	head/sys/cddl/contrib/opensolaris/uts/common: fs fs/zfs sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 20:28:08 -0000

Author: kmacy
Date: Thu May  7 20:28:06 2009
New Revision: 191900
URL: http://svn.freebsd.org/changeset/base/191900

Log:
  Asynchronously release vnodes to avoid blocking on range locks when calling back in to zfs.
  This is based on a fix that went in to opensolaris on March 9th. However, it uses a dedicated
  thread instead of a Solaris' taskq to avoid doing a blocking memory allocation with the vnode
  interlock held.
  
  This fixes a long-time deadlock in ZFS. This is not, strictly speaking, an LOR. The spa_zio
  thread releases a vnode, this calls in to vn_reclaim which in turn needs to acquire range locks
  to sync dirty data out to disk. The range locks are already held by a user-level process waiting
  on a condition variable that it the process is waiting on a spa_zio thread to signal it on. The
  process could not be signalled because the spa_zio thread could not proceed.
  
  The nature of this problem was not apparent due to ZFS locks opting out of witness which meant
  that DDB did not know about the locks that were held by ZFS.
  
  Reviewed by:	pjd
  MFC after:	7 days

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
  head/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c	Thu May  7 19:57:14 2009	(r191899)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c	Thu May  7 20:28:06 2009	(r191900)
@@ -41,6 +41,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 /* Extensible attribute (xva) routines. */
@@ -72,3 +73,139 @@ xva_getxoptattr(xvattr_t *xvap)
 		xoap = &xvap->xva_xoptattrs;
 	return (xoap);
 }
+
+static STAILQ_HEAD(, vnode) vn_rele_async_list;
+static struct mtx vn_rele_async_lock;
+static struct cv vn_rele_async_cv;
+static int vn_rele_list_length;
+static int vn_rele_async_thread_exit;
+
+typedef struct  {
+	struct vnode *stqe_next;
+} vnode_link_t;
+
+/*
+ * Like vn_rele() except if we are going to call VOP_INACTIVE() then do it
+ * asynchronously using a taskq. This can avoid deadlocks caused by re-entering
+ * the file system as a result of releasing the vnode. Note, file systems
+ * already have to handle the race where the vnode is incremented before the
+ * inactive routine is called and does its locking.
+ *
+ * Warning: Excessive use of this routine can lead to performance problems.
+ * This is because taskqs throttle back allocation if too many are created.
+ */
+void
+vn_rele_async(vnode_t *vp, taskq_t *taskq /* unused */)
+{
+	
+	KASSERT(vp != NULL, ("vrele: null vp"));
+	VFS_ASSERT_GIANT(vp->v_mount);
+	VI_LOCK(vp);
+
+	if (vp->v_usecount > 1 || ((vp->v_iflag & VI_DOINGINACT) &&
+	    vp->v_usecount == 1)) {
+		vp->v_usecount--;
+		vdropl(vp);
+		return;
+	}	
+	if (vp->v_usecount != 1) {
+#ifdef DIAGNOSTIC
+		vprint("vrele: negative ref count", vp);
+#endif
+		VI_UNLOCK(vp);
+		panic("vrele: negative ref cnt");
+	}
+	/*
+	 * We are exiting
+	 */
+	if (vn_rele_async_thread_exit != 0) {
+		vrele(vp);
+		return;
+	}
+	
+	mtx_lock(&vn_rele_async_lock);
+
+	/*  STAILQ_INSERT_TAIL 			*/
+	(*(vnode_link_t *)&vp->v_cstart).stqe_next = NULL;
+	*vn_rele_async_list.stqh_last = vp;
+	vn_rele_async_list.stqh_last =
+	    &((vnode_link_t *)&vp->v_cstart)->stqe_next;
+
+	/****************************************/
+	vn_rele_list_length++;
+	if ((vn_rele_list_length % 100) == 0)
+		cv_signal(&vn_rele_async_cv);
+	mtx_unlock(&vn_rele_async_lock);
+	VI_UNLOCK(vp);
+}
+
+static void
+vn_rele_async_init(void *arg)
+{
+
+	mtx_init(&vn_rele_async_lock, "valock", NULL, MTX_DEF);
+	STAILQ_INIT(&vn_rele_async_list);
+
+	/* cv_init(&vn_rele_async_cv, "vacv"); */
+	vn_rele_async_cv.cv_description = "vacv";
+	vn_rele_async_cv.cv_waiters = 0;
+}
+
+void
+vn_rele_async_fini(void)
+{
+
+	mtx_lock(&vn_rele_async_lock);
+	vn_rele_async_thread_exit = 1;
+	cv_signal(&vn_rele_async_cv);
+	while (vn_rele_async_thread_exit != 0)
+		cv_wait(&vn_rele_async_cv, &vn_rele_async_lock);
+	mtx_unlock(&vn_rele_async_lock);
+	mtx_destroy(&vn_rele_async_lock);
+}
+
+
+static void
+vn_rele_async_cleaner(void)
+{
+	STAILQ_HEAD(, vnode) vn_tmp_list;
+	struct vnode *curvnode;
+
+	STAILQ_INIT(&vn_tmp_list);
+	mtx_lock(&vn_rele_async_lock);
+	while (vn_rele_async_thread_exit == 0) {
+		STAILQ_CONCAT(&vn_tmp_list, &vn_rele_async_list);
+		vn_rele_list_length = 0;
+		mtx_unlock(&vn_rele_async_lock);
+		
+		while (!STAILQ_EMPTY(&vn_tmp_list)) {
+			curvnode = STAILQ_FIRST(&vn_tmp_list);
+
+			/*   STAILQ_REMOVE_HEAD */
+			STAILQ_FIRST(&vn_tmp_list) =
+			    ((vnode_link_t *)&curvnode->v_cstart)->stqe_next;
+			if (STAILQ_FIRST(&vn_tmp_list) == NULL)
+				         vn_tmp_list.stqh_last = &STAILQ_FIRST(&vn_tmp_list);
+			/***********************/
+			vrele(curvnode);
+		}
+		mtx_lock(&vn_rele_async_lock);
+		if (vn_rele_list_length == 0)
+			cv_timedwait(&vn_rele_async_cv, &vn_rele_async_lock,
+			    hz/10);
+	}
+
+	vn_rele_async_thread_exit = 0;
+	cv_broadcast(&vn_rele_async_cv);
+	mtx_unlock(&vn_rele_async_lock);
+	thread_exit();
+}
+
+static struct proc *vn_rele_async_proc;
+static struct kproc_desc up_kp = {
+	"vaclean",
+	vn_rele_async_cleaner,
+	&vn_rele_async_proc
+};
+SYSINIT(vaclean, SI_SUB_KTHREAD_UPDATE, SI_ORDER_FIRST, kproc_start, &up_kp);
+SYSINIT(vn_rele_async_setup, SI_SUB_VFS, SI_ORDER_FIRST, vn_rele_async_init, NULL);

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c	Thu May  7 19:57:14 2009	(r191899)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c	Thu May  7 20:28:06 2009	(r191900)
@@ -1199,6 +1199,7 @@ dmu_init(void)
 void
 dmu_fini(void)
 {
+	vn_rele_async_fini();
 	arc_fini();
 	dnode_fini();
 	dbuf_fini();

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Thu May  7 19:57:14 2009	(r191899)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Thu May  7 20:28:06 2009	(r191900)
@@ -93,6 +93,7 @@
  *	pushing cached pages (which acquires range locks) and syncing out
  *	cached atime changes.  Third, zfs_zinactive() may require a new tx,
  *	which could deadlock the system if you were already holding one.
+ *	If you must call VN_RELE() within a tx then use VN_RELE_ASYNC().
  *
  *  (3)	All range locks must be grabbed before calling dmu_tx_assign(),
  *	as they can span dmu_tx_assign() calls.
@@ -928,7 +929,11 @@ zfs_get_done(dmu_buf_t *db, void *vzgd)
 	vfslocked = VFS_LOCK_GIANT(vp->v_vfsp);
 	dmu_buf_rele(db, vzgd);
 	zfs_range_unlock(rl);
-	VN_RELE(vp);
+	/*
+	 * Release the vnode asynchronously as we currently have the
+	 * txg stopped from syncing.
+	 */
+	VN_RELE_ASYNC(vp, NULL);
 	zil_add_block(zgd->zgd_zilog, zgd->zgd_bp);
 	kmem_free(zgd, sizeof (zgd_t));
 	VFS_UNLOCK_GIANT(vfslocked);
@@ -959,7 +964,12 @@ zfs_get_data(void *arg, lr_write_t *lr, 
 	if (zfs_zget(zfsvfs, lr->lr_foid, &zp) != 0)
 		return (ENOENT);
 	if (zp->z_unlinked) {
-		VN_RELE(ZTOV(zp));
+		/*
+		 * Release the vnode asynchronously as we currently have the
+		 * txg stopped from syncing.
+		 */
+		VN_RELE_ASYNC(ZTOV(zp), NULL);
+
 		return (ENOENT);
 	}
 
@@ -1031,7 +1041,11 @@ zfs_get_data(void *arg, lr_write_t *lr, 
 	}
 out:
 	zfs_range_unlock(rl);
-	VN_RELE(ZTOV(zp));
+	/*
+	 * Release the vnode asynchronously as we currently have the
+	 * txg stopped from syncing.
+	 */
+	VN_RELE_ASYNC(ZTOV(zp), NULL);
 	return (error);
 }
 

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c	Thu May  7 19:57:14 2009	(r191899)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c	Thu May  7 20:28:06 2009	(r191900)
@@ -1041,7 +1041,7 @@ zil_clean(zilog_t *zilog)
 	if ((itx != NULL) &&
 	    (itx->itx_lr.lrc_txg <= spa_last_synced_txg(zilog->zl_spa))) {
 		(void) taskq_dispatch(zilog->zl_clean_taskq,
-		    (void (*)(void *))zil_itx_clean, zilog, TQ_NOSLEEP);
+		    (task_func_t *)zil_itx_clean, zilog, TQ_SLEEP);
 	}
 	mutex_exit(&zilog->zl_lock);
 }

Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h	Thu May  7 19:57:14 2009	(r191899)
+++ head/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h	Thu May  7 20:28:06 2009	(r191900)
@@ -377,6 +377,15 @@ typedef struct caller_context {
 void		xva_init(xvattr_t *);
 xoptattr_t	*xva_getxoptattr(xvattr_t *);	/* Get ptr to xoptattr_t */
 
+struct taskq;
+void	vn_rele_async(struct vnode *vp, struct taskq *taskq);
+void	vn_rele_async_fini(void);
+	
+	
+#define	VN_RELE_ASYNC(vp, taskq)	{ \
+	vn_rele_async(vp, taskq); \
+}
+
 /*
  * Flags to VOP_SETATTR/VOP_GETATTR.
  */

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 20:57:06 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8BF7F106564A;
	Thu,  7 May 2009 20:57:06 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 79CE78FC1D;
	Thu,  7 May 2009 20:57:06 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47Kv6s7067999;
	Thu, 7 May 2009 20:57:06 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47Kv6wW067998;
	Thu, 7 May 2009 20:57:06 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <200905072057.n47Kv6wW067998@svn.freebsd.org>
From: Kip Macy 
Date: Thu, 7 May 2009 20:57:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191902 -
	head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 20:57:07 -0000

Author: kmacy
Date: Thu May  7 20:57:06 2009
New Revision: 191902
URL: http://svn.freebsd.org/changeset/base/191902

Log:
  Allow the VM to provide backpressure on the ARC cache as it does
  on Solaris.

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Thu May  7 20:39:23 2009	(r191901)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Thu May  7 20:57:06 2009	(r191902)
@@ -131,6 +131,8 @@
 #include 
 #include 
 
+#include 
+
 static kmutex_t		arc_reclaim_thr_lock;
 static kcondvar_t	arc_reclaim_thr_cv;	/* used to signal reclaim thr */
 static uint8_t		arc_thread_exit;
@@ -1809,6 +1811,13 @@ arc_reclaim_needed(void)
 
 #ifdef _KERNEL
 
+	/*
+	 * If pages are needed or we're within 2048 pages 
+	 * of needing to page need to reclaim
+	 */
+	if (vm_pages_needed || (vm_paging_target() > -2048))
+		return (1);
+
 	if (needfree)
 		return (1);
 

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 21:27:25 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 948F21065670;
	Thu,  7 May 2009 21:27:25 +0000 (UTC)
	(envelope-from asmrookie@gmail.com)
Received: from mail-bw0-f165.google.com (mail-bw0-f165.google.com
	[209.85.218.165])
	by mx1.freebsd.org (Postfix) with ESMTP id 85DB58FC27;
	Thu,  7 May 2009 21:27:24 +0000 (UTC)
	(envelope-from asmrookie@gmail.com)
Received: by bwz9 with SMTP id 9so1031834bwz.43
	for ; Thu, 07 May 2009 14:27:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=dMaBPHu/wzZ/7s1ClcTF14jFDNG6EXj9VVtnNtnDtJs=;
	b=XcoUgqiIgqHi0bNo1KecOxzG/8JJCHXEty5IQ+95dzssnFp3hkb/kz706Fx6QrPCgE
	zs1YXA6lMi6XzIUfhG9uLUy9LKHIMwDMTkbJYPZkaXj2vsAmXQIynge0vOsJq808xPV3
	B8P+MsZae8FvOaYVpjHlTOm1p3/kIc0T7Y2lQ=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	b=e/XzOiZpvI8o/BGVksouHRQRRRG+r+0OUlaCcDkkL3Uyvm+fY8I9ef5i1fqrb1EiB1
	FLyvNF4M5Wj4r3vunm5Br/LO/Unsz7NwvqPv9j2nbXb+vLNwIlBSzierKuILLDeMJOgK
	gZtAYg9GP/Po4WPa6fz0r6vBLjI+uX3hG7bw8=
MIME-Version: 1.0
Sender: asmrookie@gmail.com
Received: by 10.223.120.197 with SMTP id e5mr1904486far.25.1241731643475; Thu, 
	07 May 2009 14:27:23 -0700 (PDT)
In-Reply-To: <200905072028.n47KS6Zc067249@svn.freebsd.org>
References: <200905072028.n47KS6Zc067249@svn.freebsd.org>
Date: Thu, 7 May 2009 23:27:23 +0200
X-Google-Sender-Auth: 16c63dd36810bef3
Message-ID: <3bbf2fe10905071427x21e2dcf6q6e8bdcbd39915ec7@mail.gmail.com>
From: Attilio Rao 
To: Kip Macy 
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r191900 - in
	head/sys/cddl/contrib/opensolaris/uts/common: fs fs/zfs sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 21:27:25 -0000

2009/5/7 Kip Macy :
> Author: kmacy
> Date: Thu May =C2=A07 20:28:06 2009
> New Revision: 191900
> URL: http://svn.freebsd.org/changeset/base/191900
>
> Log:
> =C2=A0Asynchronously release vnodes to avoid blocking on range locks when=
 calling back in to zfs.
> =C2=A0This is based on a fix that went in to opensolaris on March 9th. Ho=
wever, it uses a dedicated
> =C2=A0thread instead of a Solaris' taskq to avoid doing a blocking memory=
 allocation with the vnode
> =C2=A0interlock held.

So did we decide to follow this route?
I thought we were exploring cleaner ideas about that.

Thanks,
Attilio


--=20
Peace can only be achieved by understanding - A. Einstein

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 21:46:11 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8DE46106564A;
	Thu,  7 May 2009 21:46:11 +0000 (UTC)
	(envelope-from mat.macy@gmail.com)
Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.30])
	by mx1.freebsd.org (Postfix) with ESMTP id 04BD08FC08;
	Thu,  7 May 2009 21:46:10 +0000 (UTC)
	(envelope-from mat.macy@gmail.com)
Received: by yx-out-2324.google.com with SMTP id 8so612988yxb.13
	for ; Thu, 07 May 2009 14:46:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:date:x-google-sender-auth:message-id:subject:from:to:cc
	:content-type:content-transfer-encoding;
	bh=XP3D1Q69Ntj9DeSuSuIHRxN5opbGX3VuBxoSCS8LMW4=;
	b=emHc0vACtgLjL5TnOO0vztVX1Cqd+Ew65Cf4RtMNBWzRM9LA7YMThuc6INXaobdLUo
	ujjP70beTt9Gl/bc0iP8WARYt0acOrTT1SQHqzse/S6VEjqjYnciyvE7VsE+0vL6HYCe
	2nkAJop0rVwYB2xgf0NdWWi1CtEqk4g8oa1OQ=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	b=cwDPq3sy5t6nFjlvEQ3fTidrklqP62NHD7v9oLVwmbty1LyZGHHHMK5ytlFBjDccyn
	99u3splN49Sl6KHMfqFcLFP3EcBmHWgg147Ux8/Qp0a56rxcKZAR9tdIseBrF12a1nu3
	J7/RQs32hqMZTH8EtiRPw5xEXBF3frtXcuUuM=
MIME-Version: 1.0
Sender: mat.macy@gmail.com
Received: by 10.100.120.19 with SMTP id s19mr6518632anc.54.1241732767833; Thu, 
	07 May 2009 14:46:07 -0700 (PDT)
In-Reply-To: <3bbf2fe10905071427x21e2dcf6q6e8bdcbd39915ec7@mail.gmail.com>
References: <200905072028.n47KS6Zc067249@svn.freebsd.org>
	<3bbf2fe10905071427x21e2dcf6q6e8bdcbd39915ec7@mail.gmail.com>
Date: Thu, 7 May 2009 14:46:07 -0700
X-Google-Sender-Auth: a9082a33798a6700
Message-ID: <3c1674c90905071446h66a24696x538f4a30fd5b9913@mail.gmail.com>
From: Kip Macy 
To: Attilio Rao 
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r191900 - in
	head/sys/cddl/contrib/opensolaris/uts/common: fs fs/zfs sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 21:46:11 -0000

No sufficient solutions have been put forward to date.

-Kip

On Thu, May 7, 2009 at 2:27 PM, Attilio Rao  wrote:
> 2009/5/7 Kip Macy :
>> Author: kmacy
>> Date: Thu May =A07 20:28:06 2009
>> New Revision: 191900
>> URL: http://svn.freebsd.org/changeset/base/191900
>>
>> Log:
>> =A0Asynchronously release vnodes to avoid blocking on range locks when c=
alling back in to zfs.
>> =A0This is based on a fix that went in to opensolaris on March 9th. Howe=
ver, it uses a dedicated
>> =A0thread instead of a Solaris' taskq to avoid doing a blocking memory a=
llocation with the vnode
>> =A0interlock held.
>
> So did we decide to follow this route?
> I thought we were exploring cleaner ideas about that.
>
> Thanks,
> Attilio
>
>
> --
> Peace can only be achieved by understanding - A. Einstein
>



--=20
All that is necessary for the triumph of evil is that good men do nothing.
    Edmund Burke

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 21:51:14 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A9DA4106566B;
	Thu,  7 May 2009 21:51:13 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 97F958FC14;
	Thu,  7 May 2009 21:51:13 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47LpDoT069226;
	Thu, 7 May 2009 21:51:13 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47LpDu1069225;
	Thu, 7 May 2009 21:51:13 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <200905072151.n47LpDu1069225@svn.freebsd.org>
From: Kip Macy 
Date: Thu, 7 May 2009 21:51:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191903 -
	head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 21:51:15 -0000

Author: kmacy
Date: Thu May  7 21:51:13 2009
New Revision: 191903
URL: http://svn.freebsd.org/changeset/base/191903

Log:
  avoid LOR and gratuitous extra lock acquisitions by moving user_evict list buffers to
  a temporary list

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Thu May  7 20:57:06 2009	(r191902)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Thu May  7 21:51:13 2009	(r191903)
@@ -1712,14 +1712,23 @@ arc_adjust(void)
 static void
 arc_do_user_evicts(void)
 {
+	static arc_buf_t *tmp_arc_eviction_list;
+
+	/*
+	 * Move list over to avoid LOR
+	 */
+restart:	
 	mutex_enter(&arc_eviction_mtx);
-	while (arc_eviction_list != NULL) {
-		arc_buf_t *buf = arc_eviction_list;
-		arc_eviction_list = buf->b_next;
+	tmp_arc_eviction_list = arc_eviction_list;
+	arc_eviction_list = NULL;
+	mutex_exit(&arc_eviction_mtx);
+
+	while (tmp_arc_eviction_list != NULL) {
+		arc_buf_t *buf = tmp_arc_eviction_list;
+		tmp_arc_eviction_list = buf->b_next;
 		rw_enter(&buf->b_lock, RW_WRITER);
 		buf->b_hdr = NULL;
 		rw_exit(&buf->b_lock);
-		mutex_exit(&arc_eviction_mtx);
 
 		if (buf->b_efunc != NULL)
 			VERIFY(buf->b_efunc(buf) == 0);
@@ -1727,9 +1736,10 @@ arc_do_user_evicts(void)
 		buf->b_efunc = NULL;
 		buf->b_private = NULL;
 		kmem_cache_free(buf_cache, buf);
-		mutex_enter(&arc_eviction_mtx);
 	}
-	mutex_exit(&arc_eviction_mtx);
+
+	if (arc_eviction_list != NULL)
+		goto restart;
 }
 
 /*

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 23:01:04 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E77331065709;
	Thu,  7 May 2009 23:01:03 +0000 (UTC)
	(envelope-from kientzle@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D4E978FC20;
	Thu,  7 May 2009 23:01:03 +0000 (UTC)
	(envelope-from kientzle@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47N134H070890;
	Thu, 7 May 2009 23:01:03 GMT (envelope-from kientzle@svn.freebsd.org)
Received: (from kientzle@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47N13Bv070889;
	Thu, 7 May 2009 23:01:03 GMT (envelope-from kientzle@svn.freebsd.org)
Message-Id: <200905072301.n47N13Bv070889@svn.freebsd.org>
From: Tim Kientzle 
Date: Thu, 7 May 2009 23:01:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191904 - head/lib/libarchive
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 23:01:04 -0000

Author: kientzle
Date: Thu May  7 23:01:03 2009
New Revision: 191904
URL: http://svn.freebsd.org/changeset/base/191904

Log:
  Partially revert r191171, which went too far in trying
  to eliminate some duplicated code.  In particular,
  archive_read_open_filename() has different close
  handling than archive_read_open_fd(), so delegating
  the former to the latter in the degenerate case
  (a NULL filename is treated as stdin) broke reading
  from pipelines.  In particular, this fixes occasional
  port failures that were seen when using "gunzip | tar"
  pipelines under /bin/csh.
  
  Thanks to Alexey Shuvaev for reporting this failure and
  patiently helping me to track down the cause.

Modified:
  head/lib/libarchive/archive_read_open_filename.c

Modified: head/lib/libarchive/archive_read_open_filename.c
==============================================================================
--- head/lib/libarchive/archive_read_open_filename.c	Thu May  7 21:51:13 2009	(r191903)
+++ head/lib/libarchive/archive_read_open_filename.c	Thu May  7 23:01:03 2009	(r191904)
@@ -85,20 +85,32 @@ archive_read_open_filename(struct archiv
 	int fd;
 
 	archive_clear_error(a);
-	if (filename == NULL || filename[0] == '\0')
-		return (archive_read_open_fd(a, 0, block_size));
-
-	fd = open(filename, O_RDONLY | O_BINARY);
-	if (fd < 0) {
-		archive_set_error(a, errno, "Failed to open '%s'", filename);
-		return (ARCHIVE_FATAL);
+	if (filename == NULL || filename[0] == '\0') {
+		/* We used to invoke archive_read_open_fd(a,0,block_size)
+		 * here, but that doesn't (and shouldn't) handle the
+		 * end-of-file flush when reading stdout from a pipe.
+		 * Basically, read_open_fd() is intended for folks who
+		 * are willing to handle such details themselves.  This
+		 * API is intended to be a little smarter for folks who
+		 * want easy handling of the common case.
+		 */
+		filename = ""; /* Normalize NULL to "" */
+		fd = 0;
+	} else {
+		fd = open(filename, O_RDONLY | O_BINARY);
+		if (fd < 0) {
+			archive_set_error(a, errno,
+			    "Failed to open '%s'", filename);
+			return (ARCHIVE_FATAL);
+		}
 	}
 	if (fstat(fd, &st) != 0) {
 		archive_set_error(a, errno, "Can't stat '%s'", filename);
 		return (ARCHIVE_FATAL);
 	}
 
-	mine = (struct read_file_data *)malloc(sizeof(*mine) + strlen(filename));
+	mine = (struct read_file_data *)calloc(1,
+	    sizeof(*mine) + strlen(filename));
 	b = malloc(block_size);
 	if (mine == NULL || b == NULL) {
 		archive_set_error(a, ENOMEM, "No memory");
@@ -117,15 +129,20 @@ archive_read_open_filename(struct archiv
 	if (S_ISREG(st.st_mode)) {
 		archive_read_extract_set_skip_file(a, st.st_dev, st.st_ino);
 		/*
-		 * Skip is a performance optimization for anything
-		 * that supports lseek().  Generally, that only
-		 * includes regular files and possibly raw disk
-		 * devices, but there's no good portable way to detect
-		 * raw disks.
+		 * Enabling skip here is a performance optimization
+		 * for anything that supports lseek().  On FreeBSD
+		 * (and probably many other systems), only regular
+		 * files and raw disk devices support lseek() (on
+		 * other input types, lseek() returns success but
+		 * doesn't actually change the file pointer, which
+		 * just completely screws up the position-tracking
+		 * logic).  In addition, I've yet to find a portable
+		 * way to determine if a device is a raw disk device.
+		 * So I don't see a way to do much better than to only
+		 * enable this optimization for regular files.
 		 */
 		mine->can_skip = 1;
-	} else
-		mine->can_skip = 0;
+	}
 	return (archive_read_open2(a, mine,
 		NULL, file_read, file_skip, file_close));
 }
@@ -139,8 +156,11 @@ file_read(struct archive *a, void *clien
 	*buff = mine->buffer;
 	bytes_read = read(mine->fd, mine->buffer, mine->block_size);
 	if (bytes_read < 0) {
-		archive_set_error(a, errno, "Error reading '%s'",
-		    mine->filename);
+		if (mine->filename[0] == '\0')
+			archive_set_error(a, errno, "Error reading stdin");
+		else
+			archive_set_error(a, errno, "Error reading '%s'",
+			    mine->filename);
 	}
 	return (bytes_read);
 }
@@ -190,8 +210,15 @@ file_skip(struct archive *a, void *clien
 		 * likely caused by a programmer error (too large request)
 		 * or a corrupted archive file.
 		 */
-		archive_set_error(a, errno, "Error seeking in '%s'",
-		    mine->filename);
+		if (mine->filename[0] == '\0')
+			/*
+			 * Should never get here, since lseek() on stdin ought
+			 * to return an ESPIPE error.
+			 */
+			archive_set_error(a, errno, "Error seeking in stdin");
+		else
+			archive_set_error(a, errno, "Error seeking in '%s'",
+			    mine->filename);
 		return (-1);
 	}
 	return (new_offset - old_offset);
@@ -225,7 +252,9 @@ file_close(struct archive *a, void *clie
 				    mine->block_size);
 			} while (bytesRead > 0);
 		}
-		close(mine->fd);
+		/* If a named file was opened, then it needs to be closed. */
+		if (mine->filename[0] != '\0')
+			close(mine->fd);
 	}
 	free(mine->buffer);
 	free(mine);

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 23:02:16 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3296D10656B3;
	Thu,  7 May 2009 23:02:16 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1FE7D8FC1A;
	Thu,  7 May 2009 23:02:16 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47N2Gju070948;
	Thu, 7 May 2009 23:02:16 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47N2Fac070946;
	Thu, 7 May 2009 23:02:15 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <200905072302.n47N2Fac070946@svn.freebsd.org>
From: Kip Macy 
Date: Thu, 7 May 2009 23:02:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191905 - in head/sys/cddl: compat/opensolaris/sys
	contrib/opensolaris/uts/common/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 23:02:17 -0000

Author: kmacy
Date: Thu May  7 23:02:15 2009
New Revision: 191905
URL: http://svn.freebsd.org/changeset/base/191905

Log:
  move VN_RELE_ASYNC to the compatibility layer with the rest of the VN_* defines

Modified:
  head/sys/cddl/compat/opensolaris/sys/vnode.h
  head/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h

Modified: head/sys/cddl/compat/opensolaris/sys/vnode.h
==============================================================================
--- head/sys/cddl/compat/opensolaris/sys/vnode.h	Thu May  7 23:01:03 2009	(r191904)
+++ head/sys/cddl/compat/opensolaris/sys/vnode.h	Thu May  7 23:02:15 2009	(r191905)
@@ -75,6 +75,7 @@ vn_is_readonly(vnode_t *vp)
 #define	VN_HOLD(v)	vref(v)
 #define	VN_RELE(v)	vrele(v)
 #define	VN_URELE(v)	vput(v)
+#define	VN_RELE_ASYNC(v, tq)	vn_rele_async(v, tq); 
 
 #define	VOP_REALVP(vp, vpp, ct)	(*(vpp) = (vp), 0)
 

Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h	Thu May  7 23:01:03 2009	(r191904)
+++ head/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h	Thu May  7 23:02:15 2009	(r191905)
@@ -381,11 +381,6 @@ struct taskq;
 void	vn_rele_async(struct vnode *vp, struct taskq *taskq);
 void	vn_rele_async_fini(void);
 	
-	
-#define	VN_RELE_ASYNC(vp, taskq)	{ \
-	vn_rele_async(vp, taskq); \
-}
-
 /*
  * Flags to VOP_SETATTR/VOP_GETATTR.
  */

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 23:02:52 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 07BE510656F3;
	Thu,  7 May 2009 23:02:52 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E9C748FC17;
	Thu,  7 May 2009 23:02:51 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47N2pac070993;
	Thu, 7 May 2009 23:02:51 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47N2pil070992;
	Thu, 7 May 2009 23:02:51 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <200905072302.n47N2pil070992@svn.freebsd.org>
From: Kip Macy 
Date: Thu, 7 May 2009 23:02:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191906 -
	head/cddl/contrib/opensolaris/lib/libzpool/common/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 23:02:53 -0000

Author: kmacy
Date: Thu May  7 23:02:51 2009
New Revision: 191906
URL: http://svn.freebsd.org/changeset/base/191906

Log:
  define VN_RELE_ASYNC for use by libzpool

Modified:
  head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h

Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h	Thu May  7 23:02:15 2009	(r191905)
+++ head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h	Thu May  7 23:02:51 2009	(r191906)
@@ -418,6 +418,7 @@ typedef struct vsecattr {
 #define	VOP_FSYNC(vp, f, cr, ct)	fsync((vp)->v_fd)
 
 #define	VN_RELE(vp)	vn_close(vp, 0, NULL, NULL)
+#define	VN_RELE_ASYNC(vp, taskq)	vn_close(vp, 0, NULL, NULL)
 
 #define	vn_lock(vp, type)
 #define	VOP_UNLOCK(vp, type)

From owner-svn-src-all@FreeBSD.ORG  Thu May  7 23:34:41 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D0F9E106566C;
	Thu,  7 May 2009 23:34:41 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B8AF28FC18;
	Thu,  7 May 2009 23:34:41 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n47NYfup071658;
	Thu, 7 May 2009 23:34:41 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n47NYf3g071657;
	Thu, 7 May 2009 23:34:41 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <200905072334.n47NYf3g071657@svn.freebsd.org>
From: Kip Macy 
Date: Thu, 7 May 2009 23:34:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191907 -
	head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 07 May 2009 23:34:47 -0000

Author: kmacy
Date: Thu May  7 23:34:41 2009
New Revision: 191907
URL: http://svn.freebsd.org/changeset/base/191907

Log:
  don't call vn_rele_async_fini in the !_KERNEL case

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c	Thu May  7 23:02:51 2009	(r191906)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c	Thu May  7 23:34:41 2009	(r191907)
@@ -1199,7 +1199,9 @@ dmu_init(void)
 void
 dmu_fini(void)
 {
+#ifdef _KERNEL
 	vn_rele_async_fini();
+#endif
 	arc_fini();
 	dnode_fini();
 	dbuf_fini();

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 00:15:27 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F1B01106564A;
	Fri,  8 May 2009 00:15:27 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E061A8FC17;
	Fri,  8 May 2009 00:15:27 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n480FRVJ072495;
	Fri, 8 May 2009 00:15:27 GMT (envelope-from sam@svn.freebsd.org)
Received: (from sam@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n480FRfd072493;
	Fri, 8 May 2009 00:15:27 GMT (envelope-from sam@svn.freebsd.org)
Message-Id: <200905080015.n480FRfd072493@svn.freebsd.org>
From: Sam Leffler 
Date: Fri, 8 May 2009 00:15:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191908 - head/sys/dev/ath
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 00:15:28 -0000

Author: sam
Date: Fri May  8 00:15:27 2009
New Revision: 191908
URL: http://svn.freebsd.org/changeset/base/191908

Log:
  kill unused OS_GETUPTIME

Modified:
  head/sys/dev/ath/ah_osdep.c
  head/sys/dev/ath/ah_osdep.h

Modified: head/sys/dev/ath/ah_osdep.c
==============================================================================
--- head/sys/dev/ath/ah_osdep.c	Thu May  7 23:34:41 2009	(r191907)
+++ head/sys/dev/ath/ah_osdep.c	Fri May  8 00:15:27 2009	(r191908)
@@ -363,15 +363,6 @@ ath_hal_delay(int n)
 	DELAY(n);
 }
 
-u_int32_t
-ath_hal_getuptime(struct ath_hal *ah)
-{
-	struct bintime bt;
-	getbinuptime(&bt);
-	return (bt.sec * 1000) +
-		(((uint64_t)1000 * (uint32_t)(bt.frac >> 32)) >> 32);
-}
-
 void
 ath_hal_memzero(void *dst, size_t n)
 {

Modified: head/sys/dev/ath/ah_osdep.h
==============================================================================
--- head/sys/dev/ath/ah_osdep.h	Thu May  7 23:34:41 2009	(r191907)
+++ head/sys/dev/ath/ah_osdep.h	Fri May  8 00:15:27 2009	(r191908)
@@ -70,8 +70,6 @@ extern void *ath_hal_memcpy(void *, cons
 #define	abs(_a)		__builtin_abs(_a)
 
 struct ath_hal;
-extern	u_int32_t ath_hal_getuptime(struct ath_hal *);
-#define	OS_GETUPTIME(_ah)	ath_hal_getuptime(_ah)
 
 /*
  * Register read/write operations are either handled through

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 00:23:01 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 60AB91065675;
	Fri,  8 May 2009 00:23:01 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 34E3E8FC22;
	Fri,  8 May 2009 00:23:01 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n480N0jL072731;
	Fri, 8 May 2009 00:23:00 GMT (envelope-from sam@svn.freebsd.org)
Received: (from sam@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n480N0eV072728;
	Fri, 8 May 2009 00:23:00 GMT (envelope-from sam@svn.freebsd.org)
Message-Id: <200905080023.n480N0eV072728@svn.freebsd.org>
From: Sam Leffler 
Date: Fri, 8 May 2009 00:23:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191909 - in head/sys/dev/ath: . ath_hal/ar5416
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 00:23:02 -0000

Author: sam
Date: Fri May  8 00:23:00 2009
New Revision: 191909
URL: http://svn.freebsd.org/changeset/base/191909

Log:
  kill more portability functions that are no longer useful

Modified:
  head/sys/dev/ath/ah_osdep.c
  head/sys/dev/ath/ah_osdep.h
  head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c

Modified: head/sys/dev/ath/ah_osdep.c
==============================================================================
--- head/sys/dev/ath/ah_osdep.c	Fri May  8 00:15:27 2009	(r191908)
+++ head/sys/dev/ath/ah_osdep.c	Fri May  8 00:23:00 2009	(r191909)
@@ -353,24 +353,3 @@ ath_hal_assert_failed(const char* filena
 	panic("ath_hal_assert");
 }
 #endif /* AH_ASSERT */
-
-/*
- * Delay n microseconds.
- */
-void
-ath_hal_delay(int n)
-{
-	DELAY(n);
-}
-
-void
-ath_hal_memzero(void *dst, size_t n)
-{
-	bzero(dst, n);
-}
-
-void *
-ath_hal_memcpy(void *dst, const void *src, size_t n)
-{
-	return memcpy(dst, src, n);
-}

Modified: head/sys/dev/ath/ah_osdep.h
==============================================================================
--- head/sys/dev/ath/ah_osdep.h	Fri May  8 00:15:27 2009	(r191908)
+++ head/sys/dev/ath/ah_osdep.h	Fri May  8 00:23:00 2009	(r191909)
@@ -58,14 +58,11 @@ typedef bus_space_handle_t HAL_BUS_HANDL
 /*
  * Delay n microseconds.
  */
-extern	void ath_hal_delay(int);
-#define	OS_DELAY(_n)	ath_hal_delay(_n)
+#define	OS_DELAY(_n)	DELAY(_n)
 
 #define	OS_INLINE	__inline
-#define	OS_MEMZERO(_a, _n)	ath_hal_memzero((_a), (_n))
-extern void ath_hal_memzero(void *, size_t);
-#define	OS_MEMCPY(_d, _s, _n)	ath_hal_memcpy(_d,_s,_n)
-extern void *ath_hal_memcpy(void *, const void *, size_t);
+#define	OS_MEMZERO(_a, _n)	bzero((_a), (_n))
+#define	OS_MEMCPY(_d, _s, _n)	memcpy(_d,_s,_n)
 
 #define	abs(_a)		__builtin_abs(_a)
 

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Fri May  8 00:15:27 2009	(r191908)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Fri May  8 00:23:00 2009	(r191909)
@@ -818,7 +818,7 @@ ar5416SetTransmitPower(struct ath_hal *a
     HALASSERT(AH_PRIVATE(ah)->ah_eeversion >= AR_EEPROM_VER14_1);
 
     /* Setup info for the actual eeprom */
-    ath_hal_memzero(ratesArray, sizeof(ratesArray));
+    OS_MEMZERO(ratesArray, sizeof(ratesArray));
     cfgCtl = ath_hal_getctl(ah, chan);
     powerLimit = chan->ic_maxregpower * 2;
     twiceAntennaReduction = chan->ic_maxantgain;
@@ -1759,7 +1759,7 @@ ar5416SetPowerCalTable(struct ath_hal *a
     uint16_t xpdGainValues[AR5416_NUM_PD_GAINS];
     uint32_t reg32, regOffset, regChainOffset;
 
-    ath_hal_memzero(xpdGainValues, sizeof(xpdGainValues));
+    OS_MEMZERO(xpdGainValues, sizeof(xpdGainValues));
     
     xpdMask = pEepData->modalHeader[IEEE80211_IS_CHAN_2GHZ(chan)].xpdGain;
 

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 01:45:21 2009
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0432F106564A;
	Fri,  8 May 2009 01:45:21 +0000 (UTC)
	(envelope-from brde@optusnet.com.au)
Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au
	[211.29.132.187])
	by mx1.freebsd.org (Postfix) with ESMTP id 946F48FC0A;
	Fri,  8 May 2009 01:45:20 +0000 (UTC)
	(envelope-from brde@optusnet.com.au)
Received: from besplex.bde.org (c122-106-172-38.carlnfd1.nsw.optusnet.com.au
	[122.106.172.38])
	by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id
	n481jH50015891
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 8 May 2009 11:45:18 +1000
Date: Fri, 8 May 2009 11:45:16 +1000 (EST)
From: Bruce Evans 
X-X-Sender: bde@besplex.bde.org
To: Dmitry Chagin 
In-Reply-To: <200905071424.n47EOos1058369@svn.freebsd.org>
Message-ID: <20090508111302.C1275@besplex.bde.org>
References: <200905071424.n47EOos1058369@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r191883 - head/sys/compat/linux
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 01:45:21 -0000

On Thu, 7 May 2009, Dmitry Chagin wrote:

> Log:
>  Linux exports HZ value to user space via AT_CLKTCK auxiliary vector entry,
>  which is available for Glibc as sysconf(_SC_CLK_TCK). If AT_CLKTCK entry is
>  not exported, Glibc uses 100.

This cannot work for older applications/glibc's that have CLK_TCK hard-coded.

>  linux_times() shall use the value that is exported to user space.

FreeBSD handles the problem by "exporting" the old constant value of CLK_TCK
(128) although this value has always been bogus and the "export" is actually
hard-coded into libc:sysconf() (and into  except in post-2001
pure-POSIX case -- in particular, the bogus macro CLK_TCK is still hard-
coded to the bogus value 128 in the BSD_VISIBLE case to avoid breaking
bogus BSD applications that use it).

> Modified: head/sys/compat/linux/linux_misc.c
> ==============================================================================
> --- head/sys/compat/linux/linux_misc.c	Thu May  7 13:49:48 2009	(r191882)
> +++ head/sys/compat/linux/linux_misc.c	Thu May  7 14:24:50 2009	(r191883)
> @@ -659,9 +659,7 @@ struct l_times_argv {
> 	l_clock_t	tms_cstime;
> };
>
> -#define CLK_TCK 100			/* Linux uses 100 */
> -
> -#define CONVTCK(r)	(r.tv_sec * CLK_TCK + r.tv_usec / (1000000 / CLK_TCK))
> +#define CONVTCK(r)	(r.tv_sec * hz + r.tv_usec / (1000000 / hz))

hz has very little to do with statistics clock ticks.  The frequency of the
statistics clock in FreeBSD is given by stathz.  stathz will normally only
equal hz if the statistics clock is the same as the scheduling clock.
stathz is a bogus value too since the clock most relevant for them is the
cputicker and the statistics clock is only used to divide them up.

Anyway, this patch is backwards.  The bug was that the value exported to
user space didn't match the value here.  The value cannot be changed in
either FreeBSD or Linux without breaking compatibility.  It is even
harder to change in emulators than in a full O/S distribution since the
full distribution can more reasonably drop support for all old
applications.  A correct emulator would have to have an array of values
for each "constant" sysconf() value with the arrays index by the O/S
version and maybe the libc version being emulated :-(.

Bruce

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 02:18:47 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 556D9106564A;
	Fri,  8 May 2009 02:18:47 +0000 (UTC)
	(envelope-from sepotvin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4222A8FC0A;
	Fri,  8 May 2009 02:18:47 +0000 (UTC)
	(envelope-from sepotvin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n482IlKT075265;
	Fri, 8 May 2009 02:18:47 GMT (envelope-from sepotvin@svn.freebsd.org)
Received: (from sepotvin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n482IkKp075258;
	Fri, 8 May 2009 02:18:46 GMT (envelope-from sepotvin@svn.freebsd.org)
Message-Id: <200905080218.n482IkKp075258@svn.freebsd.org>
From: "Stephane E. Potvin" 
Date: Fri, 8 May 2009 02:18:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191910 - in head: gnu/usr.bin/patch sys/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 02:18:47 -0000

Author: sepotvin
Date: Fri May  8 02:18:46 2009
New Revision: 191910
URL: http://svn.freebsd.org/changeset/base/191910

Log:
  Change the internal buffer used to store input lines from a static buffer
  to a dynamically allocated one in order to support input lines of
  arbitrary length.
  
  Approved by:	kan (mentor)
  MFC after:	1 month

Modified:
  head/gnu/usr.bin/patch/common.h
  head/gnu/usr.bin/patch/inp.c
  head/gnu/usr.bin/patch/patch.c
  head/gnu/usr.bin/patch/pch.c
  head/gnu/usr.bin/patch/pch.h
  head/gnu/usr.bin/patch/util.c
  head/sys/sys/param.h

Modified: head/gnu/usr.bin/patch/common.h
==============================================================================
--- head/gnu/usr.bin/patch/common.h	Fri May  8 00:23:00 2009	(r191909)
+++ head/gnu/usr.bin/patch/common.h	Fri May  8 02:18:46 2009	(r191910)
@@ -63,7 +63,7 @@
 
 #define MAXHUNKSIZE 200000		/* is this enough lines? */
 #define INITHUNKMAX 125			/* initial dynamic allocation size */
-#define MAXLINELEN 4096
+#define INITLINELEN 4096
 #define BUFFERSIZE 4096
 
 #define SCCSPREFIX "s."
@@ -105,7 +105,8 @@ EXT int optind_last;			/* for restarting
 EXT struct stat filestat;		/* file statistics area */
 EXT int filemode INIT(0644);
 
-EXT char buf[MAXLINELEN];		/* general purpose buffer */
+EXT char *buf;				/* general purpose buffer */
+EXT size_t buf_size;			/* size of the general purpose buffer */
 EXT FILE *ofp INIT(Nullfp);		/* output file pointer */
 EXT FILE *rejfp INIT(Nullfp);		/* reject file pointer */
 

Modified: head/gnu/usr.bin/patch/inp.c
==============================================================================
--- head/gnu/usr.bin/patch/inp.c	Fri May  8 00:23:00 2009	(r191909)
+++ head/gnu/usr.bin/patch/inp.c	Fri May  8 02:18:46 2009	(r191910)
@@ -79,7 +79,7 @@ plan_a(char *filename)
 	int ifd, statfailed;
 	Reg1 char *s;
 	Reg2 LINENUM iline;
-	char lbuf[MAXLINELEN];
+	char lbuf[INITLINELEN];
 	int output_elsewhere = strcmp(filename, outname);
 	extern int check_patch;
 
@@ -284,7 +284,7 @@ plan_b(char *filename)
 		pfatal2("can't open file %s", filename);
 	if ((tifd = creat(TMPINNAME, 0666)) < 0)
 		pfatal2("can't open file %s", TMPINNAME);
-	while (fgets(buf, sizeof buf, ifp) != Nullch) {
+	while (fgets(buf, buf_size, ifp) != Nullch) {
 		if (revision != Nullch && !found_revision && rev_in_string(buf))
 			found_revision = TRUE;
 		if ((i = strlen(buf)) > maxlen)

Modified: head/gnu/usr.bin/patch/patch.c
==============================================================================
--- head/gnu/usr.bin/patch/patch.c	Fri May  8 00:23:00 2009	(r191909)
+++ head/gnu/usr.bin/patch/patch.c	Fri May  8 02:18:46 2009	(r191910)
@@ -155,6 +155,11 @@ char **argv;
     for (i = 0; i= 0L) {
 				/* nothing but deletes!? */
 				p_start = first_command_line;
@@ -427,15 +427,15 @@ next_intuit_at(long file_pos, long file_
 void
 skip_to(long file_pos, long file_line)
 {
-	char *ret;
+	size_t len;
 
 	assert(p_base <= file_pos);
 	if (verbose && p_base < file_pos) {
 		Fseek(pfp, p_base, 0);
 		say1("The text leading up to this was:\n--------------------------\n");
 		while (ftell(pfp) < file_pos) {
-			ret = fgets(buf, sizeof buf, pfp);
-			assert(ret != Nullch);
+			len = pgets(FALSE);
+			assert(len != 0);
 			say2("|%s", buf);
 		}
 		say1("--------------------------\n");
@@ -486,7 +486,7 @@ bool
 another_hunk(void)
 {
     Reg1 char *s;
-    Reg8 char *ret;
+    size_t len;
     Reg2 int context = 0;
 
     while (p_end >= 0) {
@@ -517,9 +517,9 @@ another_hunk(void)
 	Reg7 LINENUM ptrn_copiable = 0;
 					/* # of copiable lines in ptrn */
 
-	ret = pgets(buf, sizeof buf, pfp);
+	len = pgets(TRUE);
 	p_input_line++;
-	if (ret == Nullch || strnNE(buf, "********", 8)) {
+	if (len == 0 || strnNE(buf, "********", 8)) {
 	    next_intuit_at(line_beginning,p_input_line);
 	    return FALSE;
 	}
@@ -527,9 +527,9 @@ another_hunk(void)
 	p_hunk_beg = p_input_line + 1;
 	while (p_end < p_max) {
 	    line_beginning = ftell(pfp);
-	    ret = pgets(buf, sizeof buf, pfp);
+	    len = pgets(TRUE);
 	    p_input_line++;
-	    if (ret == Nullch) {
+	    if (len == 0) {
 		if (p_max - p_end < 4)
 		    Strcpy(buf, "  \n");  /* assume blank lines got chopped */
 		else {
@@ -839,9 +839,9 @@ another_hunk(void)
 	Reg5 LINENUM filldst;		/* index of new lines */
 	char ch;
 
-	ret = pgets(buf, sizeof buf, pfp);
+	len = pgets(TRUE);
 	p_input_line++;
-	if (ret == Nullch || strnNE(buf, "@@ -", 4)) {
+	if (len == 0 || strnNE(buf, "@@ -", 4)) {
 	    next_intuit_at(line_beginning,p_input_line);
 	    return FALSE;
 	}
@@ -895,9 +895,9 @@ another_hunk(void)
 	p_hunk_beg = p_input_line + 1;
 	while (fillsrc <= p_ptrn_lines || filldst <= p_end) {
 	    line_beginning = ftell(pfp);
-	    ret = pgets(buf, sizeof buf, pfp);
+	    len = pgets(TRUE);
 	    p_input_line++;
-	    if (ret == Nullch) {
+	    if (len == 0) {
 		if (p_max - filldst < 3)
 		    Strcpy(buf, " \n");  /* assume blank lines got chopped */
 		else {
@@ -994,9 +994,9 @@ another_hunk(void)
 	long line_beginning = ftell(pfp);
 
 	p_context = 0;
-	ret = pgets(buf, sizeof buf, pfp);
+	len = pgets(TRUE);
 	p_input_line++;
-	if (ret == Nullch || !isdigit((unsigned char)*buf)) {
+	if (len == 0 || !isdigit((unsigned char)*buf)) {
 	    next_intuit_at(line_beginning,p_input_line);
 	    return FALSE;
 	}
@@ -1035,9 +1035,9 @@ another_hunk(void)
 	}
 	p_Char[0] = '*';
 	for (i=1; i<=p_ptrn_lines; i++) {
-	    ret = pgets(buf, sizeof buf, pfp);
+	    len = pgets(TRUE);
 	    p_input_line++;
-	    if (ret == Nullch)
+	    if (len == 0)
 		fatal2("unexpected end of file in patch at line %ld\n",
 		  p_input_line);
 	    if (*buf != '<')
@@ -1057,9 +1057,9 @@ another_hunk(void)
 	}
 
 	if (hunk_type == 'c') {
-	    ret = pgets(buf, sizeof buf, pfp);
+	    len = pgets(TRUE);
 	    p_input_line++;
-	    if (ret == Nullch)
+	    if (len == 0)
 		fatal2("unexpected end of file in patch at line %ld\n",
 		    p_input_line);
 	    if (*buf != '-')
@@ -1073,9 +1073,9 @@ another_hunk(void)
 	}
 	p_Char[i] = '=';
 	for (i++; i<=p_end; i++) {
-	    ret = pgets(buf, sizeof buf, pfp);
+	    len = pgets(TRUE);
 	    p_input_line++;
-	    if (ret == Nullch)
+	    if (len == 0)
 		fatal2("unexpected end of file in patch at line %ld\n",
 		    p_input_line);
 	    if (*buf != '>')
@@ -1118,28 +1118,43 @@ another_hunk(void)
 }
 
 /*
- * Input a line from the patch file, worrying about indentation.
- */
-char *
-pgets(char *bf, int sz, FILE *fp)
-{
-	char *ret = fgets(bf, sz, fp);
-	Reg1 char *s;
-	Reg2 int indent = 0;
-
-	if (p_indent && ret != Nullch) {
-		for (s=buf;
-		    indent < p_indent && (*s == ' ' || *s == '\t' || *s == 'X');
-		    s++) {
-			if (*s == '\t')
-				indent += 8 - (indent % 7);
-			else
-				indent++;
+ * Input a line from the patch file.
+ * Worry about indentation if do_indent is true.
+ * The line is read directly into the buf global variable which
+ * is resized if necessary in order to hold the complete line.
+ * Returns the number of characters read including the terminating
+ * '\n', if any.
+ */
+size_t
+pgets(bool do_indent)
+{
+	char *line;
+	size_t len;
+	int indent = 0, skipped = 0;
+
+	line = fgetln(pfp, &len);
+	if (line != Nullch) {
+		if (len + 1 > buf_size) {
+			while (len + 1 > buf_size)
+				buf_size *= 2;
+			free(buf);
+			buf = malloc(buf_size);
+			if (buf == Nullch)
+				fatal1("out of memory\n");
+		}
+		if (do_indent == TRUE && p_indent) {
+			for (;
+			    indent < p_indent && (*line == ' ' || *line == '\t' || *line == 'X');
+			    line++, skipped++) {
+				if (*line == '\t')
+					indent += 8 - (indent %7);
+				else
+					indent++;
+			}
 		}
-		if (buf != s)
-			Strcpy(buf, s);
+		Strlcpy(buf, line, len + 1 - skipped);
 	}
-	return ret;
+	return len;
 }
 
 /*
@@ -1360,7 +1375,7 @@ do_ed_script(void)
 	}
 	for (;;) {
 		beginning_of_this_line = ftell(pfp);
-		if (pgets(buf, sizeof buf, pfp) == Nullch) {
+		if (pgets(TRUE) == 0) {
 			next_intuit_at(beginning_of_this_line, p_input_line);
 			break;
 		}
@@ -1373,7 +1388,7 @@ do_ed_script(void)
 			if (!skip_rest_of_patch)
 				fputs(buf, pipefp);
 			if (*t != 'd') {
-				while (pgets(buf, sizeof buf, pfp) != Nullch) {
+				while (pgets(TRUE) != 0) {
 					p_input_line++;
 					if (!skip_rest_of_patch)
 						fputs(buf, pipefp);

Modified: head/gnu/usr.bin/patch/pch.h
==============================================================================
--- head/gnu/usr.bin/patch/pch.h	Fri May  8 00:23:00 2009	(r191909)
+++ head/gnu/usr.bin/patch/pch.h	Fri May  8 02:18:46 2009	(r191910)
@@ -32,5 +32,5 @@ LINENUM	 pch_context(void);
 LINENUM	 pch_hunk_beg(void);
 char	 pch_char(LINENUM _line);
 char	*pfetch(LINENUM _line);
-char	*pgets(char *_bf, int _sz, FILE *_fp);
+size_t	 pgets(bool _do_indent);
 void	 do_ed_script(void);

Modified: head/gnu/usr.bin/patch/util.c
==============================================================================
--- head/gnu/usr.bin/patch/util.c	Fri May  8 00:23:00 2009	(r191909)
+++ head/gnu/usr.bin/patch/util.c	Fri May  8 02:18:46 2009	(r191910)
@@ -46,7 +46,7 @@ move_file(char *from, char *to)
 		fromfd = open(from, 0);
 		if (fromfd < 0)
 			pfatal2("internal error, can't reopen %s", from);
-		while ((i = read(fromfd, buf, sizeof buf)) > 0)
+		while ((i = read(fromfd, buf, buf_size)) > 0)
 			if (write(1, buf, i) != 1)
 				pfatal1("write failed");
 		Close(fromfd);
@@ -126,7 +126,7 @@ move_file(char *from, char *to)
 		fromfd = open(from, 0);
 		if (fromfd < 0)
 			pfatal2("internal error, can't reopen %s", from);
-		while ((i = read(fromfd, buf, sizeof buf)) > 0)
+		while ((i = read(fromfd, buf, buf_size)) > 0)
 			if (write(tofd, buf, i) != i)
 				pfatal1("write failed");
 		Close(fromfd);
@@ -152,7 +152,7 @@ copy_file(char *from, char *to)
 	fromfd = open(from, 0);
 	if (fromfd < 0)
 		pfatal2("internal error, can't reopen %s", from);
-	while ((i = read(fromfd, buf, sizeof buf)) > 0)
+	while ((i = read(fromfd, buf, buf_size)) > 0)
 		if (write(tofd, buf, i) != i)
 			pfatal2("write to %s failed", to);
 	Close(fromfd);
@@ -256,20 +256,20 @@ long arg1,arg2,arg3;
 	Fflush(stderr);
 	write(2, buf, strlen(buf));
 	if (tty2) {			/* might be redirected to a file */
-		r = read(2, buf, sizeof buf);
+		r = read(2, buf, buf_size);
 	} else if (isatty(1)) {		/* this may be new file output */
 		Fflush(stdout);
 		write(1, buf, strlen(buf));
-		r = read(1, buf, sizeof buf);
+		r = read(1, buf, buf_size);
 	} else if ((ttyfd = open(_PATH_TTY, 2)) >= 0 && isatty(ttyfd)) {
 					/* might be deleted or unwriteable */
 		write(ttyfd, buf, strlen(buf));
-		r = read(ttyfd, buf, sizeof buf);
+		r = read(ttyfd, buf, buf_size);
 		Close(ttyfd);
 	} else if (isatty(0)) {		/* this is probably patch input */
 		Fflush(stdin);
 		write(0, buf, strlen(buf));
-		r = read(0, buf, sizeof buf);
+		r = read(0, buf, buf_size);
 	} else {			/* no terminal at all--default it */
 		buf[0] = '\n';
 		buf[1] = 0;

Modified: head/sys/sys/param.h
==============================================================================
--- head/sys/sys/param.h	Fri May  8 00:23:00 2009	(r191909)
+++ head/sys/sys/param.h	Fri May  8 02:18:46 2009	(r191910)
@@ -57,7 +57,7 @@
  *		is created, otherwise 1.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 800085	/* Master, propagated to newvers */
+#define __FreeBSD_version 800086	/* Master, propagated to newvers */
 
 #ifndef LOCORE
 #include 

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 03:19:57 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 90478106564A;
	Fri,  8 May 2009 03:19:57 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7EA288FC0C;
	Fri,  8 May 2009 03:19:57 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n483JvKd076962;
	Fri, 8 May 2009 03:19:57 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n483JvdU076961;
	Fri, 8 May 2009 03:19:57 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200905080319.n483JvdU076961@svn.freebsd.org>
From: Alexander Motin 
Date: Fri, 8 May 2009 03:19:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191911 - head/sys/dev/sound/pci
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 03:19:58 -0000

Author: mav
Date: Fri May  8 03:19:57 2009
New Revision: 191911
URL: http://svn.freebsd.org/changeset/base/191911

Log:
  Add one more board ID with inverted external amplifier control.
  
  PR:		kern/121156

Modified:
  head/sys/dev/sound/pci/ich.c

Modified: head/sys/dev/sound/pci/ich.c
==============================================================================
--- head/sys/dev/sound/pci/ich.c	Fri May  8 02:18:46 2009	(r191910)
+++ head/sys/dev/sound/pci/ich.c	Fri May  8 03:19:57 2009	(r191911)
@@ -1009,6 +1009,7 @@ ich_pci_attach(device_t dev)
 	switch (subdev) {
 	case 0x202f161f:	/* Gateway 7326GZ */
 	case 0x203a161f:	/* Gateway 4028GZ */
+	case 0x203e161f:	/* Gateway 3520GZ/M210 */
 	case 0x204c161f:	/* Kvazar-Micro Senator 3592XT */
 	case 0x8144104d:	/* Sony VAIO PCG-TR* */
 	case 0x8197104d:	/* Sony S1XP */

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 04:22:44 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9C3E0106567E
	for ; Fri,  8 May 2009 04:22:44 +0000 (UTC)
	(envelope-from lauren@rhodamine.com.au)
Received: from rhodamine.com.au (dsl-210-15-212-138-static.VIC.netspace.net.au
	[210.15.212.138])
	by mx1.freebsd.org (Postfix) with ESMTP id 30A668FC17
	for ; Fri,  8 May 2009 04:22:44 +0000 (UTC)
	(envelope-from lauren@rhodamine.com.au)
Received: by rhodamine.com.au (Postfix, from userid 1036)
	id 27F43221295A; Fri,  8 May 2009 13:53:58 +1000 (EST)
To: svn-src-all@freebsd.org
From: received@postcard.org 
Message-Id: <20090508035358.27F43221295A@rhodamine.com.au>
Date: Fri,  8 May 2009 13:53:58 +1000 (EST)
MIME-Version: 1.0
Content-Type: text/plain
X-Content-Filtered-By: Mailman/MimeDel 2.1.5
Subject: You have just received a virtual postcard from a friend !
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 04:22:45 -0000



   You have just received a virtual postcard from a friend !

   .

   You can pick up your postcard at the following web address:

   .

   [1]http:.exe

   .

   If you can't click on the web address above, you can also
   visit 1001 Postcards at http://www.postcards.org/postcards/
   and enter your pickup code, which is: d21-sea-sunset

   .

   (Your postcard will be available for 60 days.)

   .

   Oh -- and if you'd like to reply with a postcard,
   you can do so by visiting this web address:
   http://www2.postcards.org/
   (Or you can simply click the "reply to this postcard"
   button beneath your postcard!)

   .

   We hope you enjoy your postcard, and if you do,
   please take a moment to send a few yourself!

   .

   Regards,
   1001 Postcards
   http://www.postcards.org/postcards/

References

   1. http://85.17.150.185/~paco/postcard.gif.exe

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 13:44:34 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 666B7106566C;
	Fri,  8 May 2009 13:44:34 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 549418FC25;
	Fri,  8 May 2009 13:44:34 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n48DiYw6092607;
	Fri, 8 May 2009 13:44:34 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n48DiYJI092605;
	Fri, 8 May 2009 13:44:34 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <200905081344.n48DiYJI092605@svn.freebsd.org>
From: Andrew Thompson 
Date: Fri, 8 May 2009 13:44:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191912 - in head/sys/dev: ipw iwi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 13:44:34 -0000

Author: thompsa
Date: Fri May  8 13:44:33 2009
New Revision: 191912
URL: http://svn.freebsd.org/changeset/base/191912

Log:
  Drain the tasks before the interface stop call in case a restart was queued.

Modified:
  head/sys/dev/ipw/if_ipw.c
  head/sys/dev/iwi/if_iwi.c

Modified: head/sys/dev/ipw/if_ipw.c
==============================================================================
--- head/sys/dev/ipw/if_ipw.c	Fri May  8 03:19:57 2009	(r191911)
+++ head/sys/dev/ipw/if_ipw.c	Fri May  8 13:44:33 2009	(r191912)
@@ -404,13 +404,13 @@ ipw_detach(device_t dev)
 	struct ifnet *ifp = sc->sc_ifp;
 	struct ieee80211com *ic = ifp->if_l2com;
 
+	ieee80211_draintask(ic, &sc->sc_init_task);
 	ipw_stop(sc);
 
 	bpfdetach(ifp);
 	ieee80211_ifdetach(ic);
 
 	callout_drain(&sc->sc_wdtimer);
-	ieee80211_draintask(ic, &sc->sc_init_task);
 
 	ipw_release(sc);
 

Modified: head/sys/dev/iwi/if_iwi.c
==============================================================================
--- head/sys/dev/iwi/if_iwi.c	Fri May  8 03:19:57 2009	(r191911)
+++ head/sys/dev/iwi/if_iwi.c	Fri May  8 13:44:33 2009	(r191912)
@@ -459,17 +459,17 @@ iwi_detach(device_t dev)
 	struct ifnet *ifp = sc->sc_ifp;
 	struct ieee80211com *ic = ifp->if_l2com;
 
-	iwi_stop(sc);
-
-	bpfdetach(ifp);
-	ieee80211_ifdetach(ic);
-
 	/* NB: do early to drain any pending tasks */
 	ieee80211_draintask(ic, &sc->sc_radiontask);
 	ieee80211_draintask(ic, &sc->sc_radiofftask);
 	ieee80211_draintask(ic, &sc->sc_restarttask);
 	ieee80211_draintask(ic, &sc->sc_disassoctask);
 
+	iwi_stop(sc);
+
+	bpfdetach(ifp);
+	ieee80211_ifdetach(ic);
+
 	iwi_put_firmware(sc);
 	iwi_release_fw_dma(sc);
 

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 14:01:40 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A21861065674;
	Fri,  8 May 2009 14:01:40 +0000 (UTC)
	(envelope-from philip@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 749B98FC21;
	Fri,  8 May 2009 14:01:40 +0000 (UTC)
	(envelope-from philip@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n48E1eWJ093043;
	Fri, 8 May 2009 14:01:40 GMT (envelope-from philip@svn.freebsd.org)
Received: (from philip@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n48E1eWA093041;
	Fri, 8 May 2009 14:01:40 GMT (envelope-from philip@svn.freebsd.org)
Message-Id: <200905081401.n48E1eWA093041@svn.freebsd.org>
From: Philip Paeps 
Date: Fri, 8 May 2009 14:01:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191913 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb dev/ubsec
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 14:01:41 -0000

Author: philip
Date: Fri May  8 14:01:40 2009
New Revision: 191913
URL: http://svn.freebsd.org/changeset/base/191913

Log:
  MFC r191894: Add PCI IDs for the Broadcom 5825 incarnation.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/dev/ubsec/ubsec.c
  stable/7/sys/dev/ubsec/ubsecreg.h

Modified: stable/7/sys/dev/ubsec/ubsec.c
==============================================================================
--- stable/7/sys/dev/ubsec/ubsec.c	Fri May  8 13:44:33 2009	(r191912)
+++ stable/7/sys/dev/ubsec/ubsec.c	Fri May  8 14:01:40 2009	(r191913)
@@ -220,7 +220,8 @@ ubsec_probe(device_t dev)
 	     pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5820 ||
 	     pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5821 ||
 	     pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5822 ||
-	     pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5823
+	     pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5823 ||
+	     pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5825
 	     ))
 		return (BUS_PROBE_DEFAULT);
 	return (ENXIO);
@@ -240,6 +241,7 @@ ubsec_partname(struct ubsec_softc *sc)
 		case PCI_PRODUCT_BROADCOM_5821:	return "Broadcom 5821";
 		case PCI_PRODUCT_BROADCOM_5822:	return "Broadcom 5822";
 		case PCI_PRODUCT_BROADCOM_5823:	return "Broadcom 5823";
+		case PCI_PRODUCT_BROADCOM_5825:	return "Broadcom 5825";
 		}
 		return "Broadcom unknown-part";
 	case PCI_VENDOR_BLUESTEEL:
@@ -301,7 +303,8 @@ ubsec_attach(device_t dev)
 	if ((pci_get_vendor(dev) == PCI_VENDOR_BROADCOM &&
 	     (pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5821 ||
 	      pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5822 ||
-	      pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5823)) ||
+	      pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5823 ||
+	      pci_get_device(dev) == PCI_PRODUCT_BROADCOM_5825)) ||
 	    (pci_get_vendor(dev) == PCI_VENDOR_SUN &&
 	     (pci_get_device(dev) == PCI_PRODUCT_SUN_SCA1K ||
 	      pci_get_device(dev) == PCI_PRODUCT_SUN_5821))) {

Modified: stable/7/sys/dev/ubsec/ubsecreg.h
==============================================================================
--- stable/7/sys/dev/ubsec/ubsecreg.h	Fri May  8 13:44:33 2009	(r191912)
+++ stable/7/sys/dev/ubsec/ubsecreg.h	Fri May  8 14:01:40 2009	(r191913)
@@ -62,6 +62,7 @@
 #define	PCI_PRODUCT_BROADCOM_5821	0x5821		/* 5821 */
 #define	PCI_PRODUCT_BROADCOM_5822	0x5822		/* 5822 */
 #define	PCI_PRODUCT_BROADCOM_5823	0x5823		/* 5823 */
+#define	PCI_PRODUCT_BROADCOM_5825	0x5825		/* 5825 */
 
 /* Sun Microsystems */
 #define PCI_PRODUCT_SUN_5821		0x5454		/* Crypto 5821 */

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 14:09:32 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3540D1065672;
	Fri,  8 May 2009 14:09:32 +0000 (UTC)
	(envelope-from philip@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 239878FC19;
	Fri,  8 May 2009 14:09:32 +0000 (UTC)
	(envelope-from philip@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n48E9WuF093286;
	Fri, 8 May 2009 14:09:32 GMT (envelope-from philip@svn.freebsd.org)
Received: (from philip@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n48E9WqW093285;
	Fri, 8 May 2009 14:09:32 GMT (envelope-from philip@svn.freebsd.org)
Message-Id: <200905081409.n48E9WqW093285@svn.freebsd.org>
From: Philip Paeps 
Date: Fri, 8 May 2009 14:09:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191914 - head/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 14:09:32 -0000

Author: philip
Date: Fri May  8 14:09:31 2009
New Revision: 191914
URL: http://svn.freebsd.org/changeset/base/191914

Log:
  Sync ubsec(4) with reality, note BCM5825 support.
  
  Pointed out by:	brueffer
  MFC after:	1 minute

Modified:
  head/share/man/man4/ubsec.4

Modified: head/share/man/man4/ubsec.4
==============================================================================
--- head/share/man/man4/ubsec.4	Fri May  8 14:01:40 2009	(r191913)
+++ head/share/man/man4/ubsec.4	Fri May  8 14:09:31 2009	(r191914)
@@ -102,6 +102,8 @@ Faster version of the BCM5820.
 Faster version of the BCM5820.
 .It Broadcom BCM5823
 A BCM5822 with AES capability.
+.It Broadcom BCM5825
+Faster version of the BCM5823.
 .El
 .Sh SEE ALSO
 .Xr crypt 3 ,

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 14:11:07 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AB840106566C;
	Fri,  8 May 2009 14:11:07 +0000 (UTC) (envelope-from zec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 979168FC0A;
	Fri,  8 May 2009 14:11:07 +0000 (UTC) (envelope-from zec@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n48EB7u1093407;
	Fri, 8 May 2009 14:11:07 GMT (envelope-from zec@svn.freebsd.org)
Received: (from zec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n48EB67N093389;
	Fri, 8 May 2009 14:11:06 GMT (envelope-from zec@svn.freebsd.org)
Message-Id: <200905081411.n48EB67N093389@svn.freebsd.org>
From: Marko Zec 
Date: Fri, 8 May 2009 14:11:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191915 - in head/sys: cddl/compat/opensolaris/kern
	compat/svr4 i386/ibcs2 kern nlm sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 14:11:08 -0000

Author: zec
Date: Fri May  8 14:11:06 2009
New Revision: 191915
URL: http://svn.freebsd.org/changeset/base/191915

Log:
  Introduce a new virtualization container, provisionally named vprocg, to hold
  virtualized instances of hostname and domainname, as well as a new top-level
  virtualization struct vimage, which holds pointers to struct vnet and struct
  vprocg.  Struct vprocg is likely to become replaced in the near future with
  a new jail management API import.
  
  As a consequence of this change, change struct ucred to point to a struct
  vimage, instead of directly pointing to a vnet.
  
  Merge vnet / vimage / ucred refcounting infrastructure from p4 / vimage
  branch.
  
  Permit kldload / kldunload operations to be executed only from the default
  vimage context.
  
  This change should have no functional impact on nooptions VIMAGE kernel
  builds.
  
  Reviewed by:	bz
  Approved by:	julian (mentor)

Modified:
  head/sys/cddl/compat/opensolaris/kern/opensolaris.c
  head/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c
  head/sys/compat/svr4/svr4_stat.c
  head/sys/i386/ibcs2/ibcs2_socksys.c
  head/sys/kern/init_main.c
  head/sys/kern/kern_exit.c
  head/sys/kern/kern_fork.c
  head/sys/kern/kern_jail.c
  head/sys/kern/kern_linker.c
  head/sys/kern/kern_mib.c
  head/sys/kern/kern_prot.c
  head/sys/kern/kern_vimage.c
  head/sys/nlm/nlm_advlock.c
  head/sys/sys/kernel.h
  head/sys/sys/sysctl.h
  head/sys/sys/ucred.h
  head/sys/sys/vimage.h

Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris.c
==============================================================================
--- head/sys/cddl/compat/opensolaris/kern/opensolaris.c	Fri May  8 14:09:31 2009	(r191914)
+++ head/sys/cddl/compat/opensolaris/kern/opensolaris.c	Fri May  8 14:11:06 2009	(r191915)
@@ -32,8 +32,10 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
 
 cpu_core_t	cpu_core[MAXCPU];
 kmutex_t	cpu_lock;
@@ -81,6 +83,7 @@ opensolaris_modevent(module_t mod __unus
 
 	switch (type) {
 	case MOD_LOAD:
+		utsname.nodename = G_hostname;
 		break;
 
 	case MOD_UNLOAD:

Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c
==============================================================================
--- head/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c	Fri May  8 14:09:31 2009	(r191914)
+++ head/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c	Fri May  8 14:11:06 2009	(r191915)
@@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
 char hw_serial[11] = "0";
 
 struct opensolaris_utsname utsname = {
-	.nodename = hostname
+	.nodename = "unset"
 };
 
 int

Modified: head/sys/compat/svr4/svr4_stat.c
==============================================================================
--- head/sys/compat/svr4/svr4_stat.c	Fri May  8 14:09:31 2009	(r191914)
+++ head/sys/compat/svr4/svr4_stat.c	Fri May  8 14:11:06 2009	(r191915)
@@ -412,6 +412,7 @@ svr4_sys_systeminfo(td, uap)
 	struct thread *td;
 	struct svr4_sys_systeminfo_args *uap;
 {
+	INIT_VPROCG(TD_TO_VPROCG(td));
 	char		*str = NULL;
 	int		error = 0;
 	register_t	*retval = td->td_retval;

Modified: head/sys/i386/ibcs2/ibcs2_socksys.c
==============================================================================
--- head/sys/i386/ibcs2/ibcs2_socksys.c	Fri May  8 14:09:31 2009	(r191914)
+++ head/sys/i386/ibcs2/ibcs2_socksys.c	Fri May  8 14:11:06 2009	(r191915)
@@ -174,6 +174,7 @@ ibcs2_setipdomainname(td, uap)
         struct thread *td;
         struct setipdomainname_args *uap;
 {
+	INIT_VPROCG(TD_TO_VPROCG(td));
 	char hname[MAXHOSTNAMELEN], *ptr;
 	int error, sctl[2], hlen;
 

Modified: head/sys/kern/init_main.c
==============================================================================
--- head/sys/kern/init_main.c	Fri May  8 14:09:31 2009	(r191914)
+++ head/sys/kern/init_main.c	Fri May  8 14:11:06 2009	(r191915)
@@ -454,7 +454,10 @@ proc0_init(void *dummy __unused)
 	p->p_ucred->cr_ruidinfo = uifind(0);
 	p->p_ucred->cr_prison = NULL;	/* Don't jail it. */
 #ifdef VIMAGE
-	p->p_ucred->cr_vnet = LIST_FIRST(&vnet_head);
+	KASSERT(LIST_FIRST(&vimage_head) != NULL, ("vimage_head empty"));
+	P_TO_VIMAGE(p) =  LIST_FIRST(&vimage_head); /* set ucred->cr_vimage */
+	refcount_acquire(&P_TO_VIMAGE(p)->vi_ucredrefc);
+	LIST_FIRST(&vprocg_head)->nprocs++;
 #endif
 #ifdef AUDIT
 	audit_cred_kproc0(p->p_ucred);

Modified: head/sys/kern/kern_exit.c
==============================================================================
--- head/sys/kern/kern_exit.c	Fri May  8 14:09:31 2009	(r191914)
+++ head/sys/kern/kern_exit.c	Fri May  8 14:11:06 2009	(r191915)
@@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #ifdef KTRACE
 #include 
 #endif
@@ -737,6 +738,7 @@ loop:
 		nfound++;
 		PROC_SLOCK(p);
 		if (p->p_state == PRS_ZOMBIE) {
+			INIT_VPROCG(P_TO_VPROCG(p));
 			if (rusage) {
 				*rusage = p->p_ru;
 				calcru(p, &rusage->ru_utime, &rusage->ru_stime);
@@ -837,6 +839,9 @@ loop:
 			uma_zfree(proc_zone, p);
 			sx_xlock(&allproc_lock);
 			nprocs--;
+#ifdef VIMAGE
+			vprocg->nprocs--;
+#endif
 			sx_xunlock(&allproc_lock);
 			return (0);
 		}

Modified: head/sys/kern/kern_fork.c
==============================================================================
--- head/sys/kern/kern_fork.c	Fri May  8 14:09:31 2009	(r191914)
+++ head/sys/kern/kern_fork.c	Fri May  8 14:11:06 2009	(r191915)
@@ -350,6 +350,9 @@ norfproc_fail:
 	 * are hard-limits as to the number of processes that can run.
 	 */
 	nprocs++;
+#ifdef VIMAGE
+	P_TO_VPROCG(p1)->nprocs++;
+#endif
 
 	/*
 	 * Find an unused process ID.  We remember a range of unused IDs

Modified: head/sys/kern/kern_jail.c
==============================================================================
--- head/sys/kern/kern_jail.c	Fri May  8 14:09:31 2009	(r191914)
+++ head/sys/kern/kern_jail.c	Fri May  8 14:11:06 2009	(r191915)
@@ -2218,6 +2218,10 @@ prison_check(struct ucred *cred1, struct
 		if (cred2->cr_prison != cred1->cr_prison)
 			return (ESRCH);
 	}
+#ifdef VIMAGE
+	if (cred2->cr_vimage->v_procg != cred1->cr_vimage->v_procg)
+		return (ESRCH);
+#endif
 
 	return (0);
 }

Modified: head/sys/kern/kern_linker.c
==============================================================================
--- head/sys/kern/kern_linker.c	Fri May  8 14:09:31 2009	(r191914)
+++ head/sys/kern/kern_linker.c	Fri May  8 14:11:06 2009	(r191915)
@@ -992,6 +992,12 @@ kern_kldload(struct thread *td, const ch
 	if ((error = priv_check(td, PRIV_KLD_LOAD)) != 0)
 		return (error);
 
+#ifdef VIMAGE
+	/* Only the default vimage is permitted to kldload modules. */
+	if (!IS_DEFAULT_VIMAGE(TD_TO_VIMAGE(td)))
+		return (EPERM);
+#endif
+
 	/*
 	 * It's possible that kldloaded module will attach a new ifnet,
 	 * so vnet context must be set when this ocurs.
@@ -1063,6 +1069,12 @@ kern_kldunload(struct thread *td, int fi
 	if ((error = priv_check(td, PRIV_KLD_UNLOAD)) != 0)
 		return (error);
 
+#ifdef VIMAGE
+	/* Only the default vimage is permitted to kldunload modules. */
+	if (!IS_DEFAULT_VIMAGE(TD_TO_VIMAGE(td)))
+		return (EPERM);
+#endif
+
 	CURVNET_SET(TD_TO_VNET(td));
 	KLD_LOCK();
 	lf = linker_find_file_by_id(fileid);

Modified: head/sys/kern/kern_mib.c
==============================================================================
--- head/sys/kern/kern_mib.c	Fri May  8 14:09:31 2009	(r191914)
+++ head/sys/kern/kern_mib.c	Fri May  8 14:11:06 2009	(r191915)
@@ -208,8 +208,9 @@ static char	machine_arch[] = MACHINE_ARC
 SYSCTL_STRING(_hw, HW_MACHINE_ARCH, machine_arch, CTLFLAG_RD,
     machine_arch, 0, "System architecture");
 
-/* should become #ifndef VIMAGE */
+#ifdef VIMAGE_GLOBALS
 char hostname[MAXHOSTNAMELEN];
+#endif
 
 /*
  * This mutex is used to protect the hostname and domainname variables, and
@@ -348,12 +349,14 @@ SYSCTL_PROC(_kern, OID_AUTO, conftxt, CT
     0, 0, sysctl_kern_config, "", "Kernel configuration file");
 #endif
 
-/* should become #ifndef VIMAGE */
+#ifdef VIMAGE_GLOBALS
 char domainname[MAXHOSTNAMELEN];	/* Protected by hostname_mtx. */
+#endif
 
 static int
 sysctl_domainname(SYSCTL_HANDLER_ARGS)
 {
+	INIT_VPROCG(TD_TO_VPROCG(req->td));
 	char tmpdomainname[MAXHOSTNAMELEN];
 	int error;
 

Modified: head/sys/kern/kern_prot.c
==============================================================================
--- head/sys/kern/kern_prot.c	Fri May  8 14:09:31 2009	(r191914)
+++ head/sys/kern/kern_prot.c	Fri May  8 14:11:06 2009	(r191915)
@@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #if defined(INET) || defined(INET6)
 #include 
@@ -1824,6 +1825,11 @@ crfree(struct ucred *cr)
 		 */
 		if (jailed(cr))
 			prison_free(cr->cr_prison);
+#ifdef VIMAGE
+	/* XXX TODO: find out why and when cr_vimage can be NULL here! */
+	if (cr->cr_vimage != NULL)
+		refcount_release(&cr->cr_vimage->vi_ucredrefc);
+#endif
 #ifdef AUDIT
 		audit_cred_destroy(cr);
 #endif
@@ -1859,6 +1865,10 @@ crcopy(struct ucred *dest, struct ucred 
 	uihold(dest->cr_ruidinfo);
 	if (jailed(dest))
 		prison_hold(dest->cr_prison);
+#ifdef VIMAGE
+	KASSERT(src->cr_vimage != NULL, ("cr_vimage == NULL"));
+	refcount_acquire(&dest->cr_vimage->vi_ucredrefc);
+#endif
 #ifdef AUDIT
 	audit_cred_copy(src, dest);
 #endif

Modified: head/sys/kern/kern_vimage.c
==============================================================================
--- head/sys/kern/kern_vimage.c	Fri May  8 14:09:31 2009	(r191914)
+++ head/sys/kern/kern_vimage.c	Fri May  8 14:11:06 2009	(r191915)
@@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$");
 
 MALLOC_DEFINE(M_VIMAGE, "vimage", "vimage resource container");
 MALLOC_DEFINE(M_VNET, "vnet", "network stack control block");
+MALLOC_DEFINE(M_VPROCG, "vprocg", "process group control block");
 
 static TAILQ_HEAD(vnet_modlink_head, vnet_modlink) vnet_modlink_head;
 static TAILQ_HEAD(vnet_modpending_head, vnet_modlink) vnet_modpending_head;
@@ -56,7 +57,13 @@ static int vnet_mod_constructor(struct v
 static int vnet_mod_destructor(struct vnet_modlink *);
 
 #ifdef VIMAGE
+struct vimage_list_head vimage_head;
 struct vnet_list_head vnet_head;
+struct vprocg_list_head vprocg_head;
+#else
+#ifndef VIMAGE_GLOBALS
+struct vprocg vprocg_0;
+#endif
 #endif
 
 void
@@ -294,6 +301,8 @@ static void
 vi_init(void *unused)
 {
 #ifdef VIMAGE
+	struct vimage *vip;
+	struct vprocg *vprocg;
 	struct vnet *vnet;
 #endif
 
@@ -301,13 +310,27 @@ vi_init(void *unused)
 	TAILQ_INIT(&vnet_modpending_head);
 
 #ifdef VIMAGE
+	LIST_INIT(&vimage_head);
+	LIST_INIT(&vprocg_head);
 	LIST_INIT(&vnet_head);
 
+	vip = malloc(sizeof(struct vimage), M_VIMAGE, M_NOWAIT | M_ZERO);
+	if (vip == NULL)
+		panic("malloc failed for struct vimage");
+	LIST_INSERT_HEAD(&vimage_head, vip, vi_le);
+
+	vprocg = malloc(sizeof(struct vprocg), M_VPROCG, M_NOWAIT | M_ZERO);
+	if (vprocg == NULL)
+		panic("malloc failed for struct vprocg");
+	vip->v_procg = vprocg;
+	LIST_INSERT_HEAD(&vprocg_head, vprocg, vprocg_le);
+
 	vnet = malloc(sizeof(struct vnet), M_VNET, M_NOWAIT | M_ZERO);
 	if (vnet == NULL)
 		panic("vi_alloc: malloc failed");
 	LIST_INSERT_HEAD(&vnet_head, vnet, vnet_le);
 	vnet->vnet_magic_n = VNET_MAGIC_N;
+	vip->v_net = vnet;
 
 	/* We MUST clear curvnet in vi_init_done before going SMP. */
 	curvnet = LIST_FIRST(&vnet_head);

Modified: head/sys/nlm/nlm_advlock.c
==============================================================================
--- head/sys/nlm/nlm_advlock.c	Fri May  8 14:09:31 2009	(r191914)
+++ head/sys/nlm/nlm_advlock.c	Fri May  8 14:11:06 2009	(r191915)
@@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -1222,12 +1223,12 @@ nlm_init_lock(struct flock *fl, int flag
 	}
 
 	mtx_lock(&hostname_mtx);
-	snprintf(oh_space, 32, "%d@%s", svid, hostname);
+	snprintf(oh_space, 32, "%d@%s", svid, G_hostname);
 	mtx_unlock(&hostname_mtx);
 	oh_len = strlen(oh_space);
 
 	memset(lock, 0, sizeof(*lock));
-	lock->caller_name = hostname;
+	lock->caller_name = G_hostname;
 	lock->fh.n_len = fhlen;
 	lock->fh.n_bytes = fh;
 	lock->oh.n_len = oh_len;

Modified: head/sys/sys/kernel.h
==============================================================================
--- head/sys/sys/kernel.h	Fri May  8 14:09:31 2009	(r191914)
+++ head/sys/sys/kernel.h	Fri May  8 14:11:06 2009	(r191915)
@@ -58,8 +58,10 @@
 extern struct mtx hostname_mtx;
 extern unsigned long hostid;
 extern char hostuuid[64];
+#ifdef VIMAGE_GLOBALS
 extern char hostname[MAXHOSTNAMELEN];
 extern char domainname[MAXHOSTNAMELEN];
+#endif
 extern char kernelname[MAXPATHLEN];
 
 extern int tick;			/* usec per tick (1000000 / hz) */

Modified: head/sys/sys/sysctl.h
==============================================================================
--- head/sys/sys/sysctl.h	Fri May  8 14:09:31 2009	(r191914)
+++ head/sys/sys/sysctl.h	Fri May  8 14:11:06 2009	(r191915)
@@ -459,6 +459,10 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e
 		    TD_TO_VNET(curthread)->mod_data[oidp->oid_v_mod];	\
 		arg1 = cp + (size_t) arg1;				\
 		break;							\
+	case V_PROCG:							\
+		cp = (char *) TD_TO_VPROCG(curthread);			\
+		arg1 = cp + (size_t) arg1;				\
+		break;							\
 	default:							\
 		panic("unsupported module id %d", oidp->oid_v_subs);	\
 	}								\

Modified: head/sys/sys/ucred.h
==============================================================================
--- head/sys/sys/ucred.h	Fri May  8 14:09:31 2009	(r191914)
+++ head/sys/sys/ucred.h	Fri May  8 14:11:06 2009	(r191915)
@@ -55,7 +55,7 @@ struct ucred {
 	struct uidinfo	*cr_uidinfo;	/* per euid resource consumption */
 	struct uidinfo	*cr_ruidinfo;	/* per ruid resource consumption */
 	struct prison	*cr_prison;	/* jail(2) */
-	struct vnet	*cr_vnet;	/* vimage / vnet */
+	struct vimage	*cr_vimage;	/* vimage */
 	void 		*cr_pspare[2];	/* general use 2 */
 #define	cr_endcopy	cr_label
 	struct label	*cr_label;	/* MAC label */

Modified: head/sys/sys/vimage.h
==============================================================================
--- head/sys/sys/vimage.h	Fri May  8 14:09:31 2009	(r191914)
+++ head/sys/sys/vimage.h	Fri May  8 14:11:06 2009	(r191915)
@@ -44,13 +44,15 @@
 #define	VNET_DEBUG
 #endif
 
+struct vprocg;
+struct vnet;
+struct kld_sym_lookup;
+
 typedef int vnet_attach_fn(const void *);
 typedef int vnet_detach_fn(const void *);
 
 #ifndef VIMAGE_GLOBALS
 
-struct kld_sym_lookup;
-
 struct vnet_symmap {
 	char	*name;
 	size_t	 offset;
@@ -111,6 +113,7 @@ struct vnet_modlink {
 /* Major module IDs for vimage sysctl virtualization. */
 #define	V_GLOBAL		0	/* global variable - no indirection */
 #define	V_NET			1
+#define	V_PROCG			2
 
 /* Name mappings for minor module IDs in vimage sysctl virtualization. */
 #define	V_MOD_vnet_net		VNET_MOD_NET
@@ -121,6 +124,8 @@ struct vnet_modlink {
 #define	V_MOD_vnet_pf		VNET_MOD_PF
 #define	V_MOD_vnet_gif		VNET_MOD_GIF
 #define	V_MOD_vnet_ipsec	VNET_MOD_IPSEC
+ 
+#define	V_MOD_vprocg		0	/* no minor module ids like in vnet */
 
 int	vi_symlookup(struct kld_sym_lookup *, char *);
 void	vnet_mod_register(const struct vnet_modinfo *);
@@ -157,21 +162,45 @@ void	vnet_mod_deregister_multi(const str
 #define	VNET_SYMMAP_END		{ NULL, 0 }
 #endif /* !VIMAGE_GLOBALS */
 
-#ifdef VIMAGE
+struct vimage {
+	LIST_ENTRY(vimage)	 vi_le;		/* all vimage list */
+	LIST_ENTRY(vimage)	 vi_sibling;	/* vimages with same parent */
+	LIST_HEAD(, vimage)	 vi_child_head;	/* direct offspring list */
+	struct vimage		*vi_parent;	/* ptr to parent vimage */
+	u_int			 vi_id;		/* ID num */
+	u_int			 vi_ucredrefc;	/* # of ucreds pointing to us */
+	char			 vi_name[MAXHOSTNAMELEN];
+	struct vnet		*v_net;
+	struct vprocg		*v_procg;
+};
+
 struct vnet {
-	void		*mod_data[VNET_MOD_MAX];
-	LIST_ENTRY(vnet) vnet_le;	/* all vnets list */
-	u_int		 vnet_magic_n;
-	u_int		 ifccnt;
-	u_int		 sockcnt;
+	void			*mod_data[VNET_MOD_MAX];
+	LIST_ENTRY(vnet)	 vnet_le;	/* all vnets list */
+	u_int			 vnet_magic_n;
+	u_int			 vnet_id;	/* ID num */
+	u_int			 ifccnt;
+	u_int			 sockcnt;
 };
-#endif
 
+struct vprocg {
+	LIST_ENTRY(vprocg)	 vprocg_le;
+	u_int			 vprocg_id;	/* ID num */
+	u_int			 nprocs;
+	char			 _hostname[MAXHOSTNAMELEN];
+	char			 _domainname[MAXHOSTNAMELEN];
+};
+
+#ifndef VIMAGE_GLOBALS
 #ifdef VIMAGE
-#define curvnet curthread->td_vnet
+LIST_HEAD(vimage_list_head, vimage);
+extern struct vimage_list_head vimage_head;
 #else
-#define	curvnet NULL
+extern struct vprocg vprocg_0;
+#endif
 #endif
+ 
+#define curvnet curthread->td_vnet
 
 #define VNET_MAGIC_N 0x3e0d8f29
 
@@ -251,28 +280,57 @@ extern struct vnet_list_head vnet_head;
 #define	VNET_FOREACH(arg)
 #endif
 
-#define	TD_TO_VNET(td)	(td)->td_ucred->cr_vnet
+#ifdef VIMAGE
+LIST_HEAD(vprocg_list_head, vprocg);
+extern struct vprocg_list_head vprocg_head;
+#define	INIT_VPROCG(arg)	struct vprocg *vprocg = (arg);
+#else
+#define	INIT_VPROCG(arg)
+#endif
+
+#ifdef VIMAGE
+#define	IS_DEFAULT_VIMAGE(arg)	((arg)->vi_id == 0)
+#define	IS_DEFAULT_VNET(arg)	((arg)->vnet_id == 0)
+#else
+#define	IS_DEFAULT_VIMAGE(arg)	1
+#define	IS_DEFAULT_VNET(arg)	1
+#endif
+
+#ifdef VIMAGE
+#define	TD_TO_VIMAGE(td)	(td)->td_ucred->cr_vimage
+#define	TD_TO_VNET(td)		(td)->td_ucred->cr_vimage->v_net
+#define	TD_TO_VPROCG(td)	(td)->td_ucred->cr_vimage->v_procg
+#define	P_TO_VIMAGE(p)		(p)->p_ucred->cr_vimage
+#define	P_TO_VNET(p)		(p)->p_ucred->cr_vimage->v_net
+#define	P_TO_VPROCG(p)		(p)->p_ucred->cr_vimage->v_procg
+#else
+#define	TD_TO_VIMAGE(td)	NULL
+#define	TD_TO_VNET(td)		NULL
+#define	P_TO_VIMAGE(p)		NULL
+#define	P_TO_VNET(p)		NULL
+#ifdef VIMAGE_GLOBALS
+#define	TD_TO_VPROCG(td)	NULL
+#define	P_TO_VPROCG(p)		NULL
+#else
+#define	TD_TO_VPROCG(td)	&vprocg_0
+#define	P_TO_VPROCG(p)		&vprocg_0
+#endif
+#endif
 
 /* Non-VIMAGE null-macros */
-#define	IS_DEFAULT_VNET(arg) 1
 #define	VNET_LIST_RLOCK()
 #define	VNET_LIST_RUNLOCK()
-#define	INIT_VPROCG(arg)
-#define	INIT_VCPU(arg)
-#define	TD_TO_VIMAGE(td)
-#define	TD_TO_VPROCG(td)
-#define	TD_TO_VCPU(td)
-#define	P_TO_VIMAGE(p)
-#define	P_TO_VNET(p)
-#define	P_TO_VPROCG(p)
-#define	P_TO_VCPU(p)
 
 /* XXX those defines bellow should probably go into vprocg.h and vcpu.h */
-#define	VPROCG(sym)		(sym)
-#define	VCPU(sym)		(sym)
+#define	VPROCG(sym)		VSYM(vprocg, sym)
+
+#ifdef VIMAGE
+#define	G_hostname		TD_TO_VPROCG(&thread0)->_hostname
+#else
+#define	G_hostname		VPROCG(hostname)
+#endif
 
 #define	V_hostname		VPROCG(hostname)
-#define	G_hostname		VPROCG(hostname) /* global hostname */
 #define	V_domainname		VPROCG(domainname)
 
 /*

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 14:28:06 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B6C681065670;
	Fri,  8 May 2009 14:28:06 +0000 (UTC) (envelope-from zec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A4F4C8FC14;
	Fri,  8 May 2009 14:28:06 +0000 (UTC) (envelope-from zec@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n48ES6aa094017;
	Fri, 8 May 2009 14:28:06 GMT (envelope-from zec@svn.freebsd.org)
Received: (from zec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n48ES6lY094016;
	Fri, 8 May 2009 14:28:06 GMT (envelope-from zec@svn.freebsd.org)
Message-Id: <200905081428.n48ES6lY094016@svn.freebsd.org>
From: Marko Zec 
Date: Fri, 8 May 2009 14:28:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191916 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 14:28:07 -0000

Author: zec
Date: Fri May  8 14:28:06 2009
New Revision: 191916
URL: http://svn.freebsd.org/changeset/base/191916

Log:
  Remove a bogus check that unintentionally slipped in r191816.
  
  This change has no functional impact on nooptions VIMAGE builds.
  Submitted by:	bz

Modified:
  head/sys/netinet/igmp.c

Modified: head/sys/netinet/igmp.c
==============================================================================
--- head/sys/netinet/igmp.c	Fri May  8 14:11:06 2009	(r191915)
+++ head/sys/netinet/igmp.c	Fri May  8 14:28:06 2009	(r191916)
@@ -1100,9 +1100,6 @@ igmp_input_v3_group_query(struct in_mult
 
 	nsrc = ntohs(igmpv3->igmp_numsrc);
 
-	if (!IS_DEFAULT_VNET(curvnet))
-		return (retval);
-
 	/*
 	 * Deal with group-specific queries upfront.
 	 * If any group query is already pending, purge any recorded

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 14:34:25 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E73281065673;
	Fri,  8 May 2009 14:34:25 +0000 (UTC) (envelope-from zec@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CA2D88FC1A;
	Fri,  8 May 2009 14:34:25 +0000 (UTC) (envelope-from zec@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n48EYP83094309;
	Fri, 8 May 2009 14:34:25 GMT (envelope-from zec@svn.freebsd.org)
Received: (from zec@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n48EYPBx094303;
	Fri, 8 May 2009 14:34:25 GMT (envelope-from zec@svn.freebsd.org)
Message-Id: <200905081434.n48EYPBx094303@svn.freebsd.org>
From: Marko Zec 
Date: Fri, 8 May 2009 14:34:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191917 - in head/sys: kern netinet sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 14:34:26 -0000

Author: zec
Date: Fri May  8 14:34:25 2009
New Revision: 191917
URL: http://svn.freebsd.org/changeset/base/191917

Log:
  A NOP change: style / whitespace cleanup of the noise that slipped
  into r191816.
  
  Spotted by:	bz
  Approved by:	julian (mentor) (an earlier version of the diff)

Modified:
  head/sys/kern/kern_linker.c
  head/sys/kern/uipc_socket.c
  head/sys/kern/uipc_syscalls.c
  head/sys/netinet/tcp_hostcache.c
  head/sys/sys/proc.h
  head/sys/sys/vimage.h

Modified: head/sys/kern/kern_linker.c
==============================================================================
--- head/sys/kern/kern_linker.c	Fri May  8 14:28:06 2009	(r191916)
+++ head/sys/kern/kern_linker.c	Fri May  8 14:34:25 2009	(r191917)
@@ -999,7 +999,7 @@ kern_kldload(struct thread *td, const ch
 #endif
 
 	/*
-	 * It's possible that kldloaded module will attach a new ifnet,
+	 * It is possible that kldloaded module will attach a new ifnet,
 	 * so vnet context must be set when this ocurs.
 	 */
 	CURVNET_SET(TD_TO_VNET(td));

Modified: head/sys/kern/uipc_socket.c
==============================================================================
--- head/sys/kern/uipc_socket.c	Fri May  8 14:28:06 2009	(r191916)
+++ head/sys/kern/uipc_socket.c	Fri May  8 14:34:25 2009	(r191917)
@@ -286,7 +286,7 @@ soalloc(struct vnet *vnet)
 	so->so_gencnt = ++so_gencnt;
 	++numopensockets;
 #ifdef VIMAGE
-	++vnet->sockcnt;	/* locked with so_global_mtx */
+	++vnet->sockcnt;	/* Locked with so_global_mtx. */
 	so->so_vnet = vnet;
 #endif
 	mtx_unlock(&so_global_mtx);
@@ -1306,7 +1306,7 @@ sosend(struct socket *so, struct sockadd
 
 	CURVNET_SET(so->so_vnet);
 	error = so->so_proto->pr_usrreqs->pru_sosend(so, addr, uio, top,
-		control, flags, td);
+	    control, flags, td);
 	CURVNET_RESTORE();
 	return (error);
 }

Modified: head/sys/kern/uipc_syscalls.c
==============================================================================
--- head/sys/kern/uipc_syscalls.c	Fri May  8 14:28:06 2009	(r191916)
+++ head/sys/kern/uipc_syscalls.c	Fri May  8 14:34:25 2009	(r191917)
@@ -63,8 +63,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
+#include 
 #ifdef KTRACE
 #include 
 #endif

Modified: head/sys/netinet/tcp_hostcache.c
==============================================================================
--- head/sys/netinet/tcp_hostcache.c	Fri May  8 14:28:06 2009	(r191916)
+++ head/sys/netinet/tcp_hostcache.c	Fri May  8 14:34:25 2009	(r191917)
@@ -637,7 +637,7 @@ tcp_hc_purge(void *arg)
 	CURVNET_SET((struct vnet *) arg);
 	INIT_VNET_INET(curvnet);
 	struct hc_metrics *hc_entry, *hc_next;
-	int all = 0;	/* XXX was: (intptr_t)arg - makes no sense? */
+	int all = 0;
 	int i;
 
 	if (V_tcp_hostcache.purgeall) {

Modified: head/sys/sys/proc.h
==============================================================================
--- head/sys/sys/proc.h	Fri May  8 14:28:06 2009	(r191916)
+++ head/sys/sys/proc.h	Fri May  8 14:34:25 2009	(r191917)
@@ -275,8 +275,8 @@ struct thread {
 	struct lpohead	td_lprof[2];	/* (a) lock profiling objects. */
 	struct kdtrace_thread	*td_dtrace; /* (*) DTrace-specific data. */
 	int		td_errno;	/* Error returned by last syscall. */
-	struct vnet	*td_vnet;	/* (*) Effective vnet */
-	const char	*td_vnet_lpush;	/* (*) Debugging vnet push / pop */
+	struct vnet	*td_vnet;	/* (*) Effective vnet. */
+	const char	*td_vnet_lpush;	/* (*) Debugging vnet push / pop. */
 };
 
 struct mtx *thread_lock_block(struct thread *);

Modified: head/sys/sys/vimage.h
==============================================================================
--- head/sys/sys/vimage.h	Fri May  8 14:28:06 2009	(r191916)
+++ head/sys/sys/vimage.h	Fri May  8 14:34:25 2009	(r191917)
@@ -200,51 +200,51 @@ extern struct vprocg vprocg_0;
 #endif
 #endif
  
-#define curvnet curthread->td_vnet
+#define	curvnet curthread->td_vnet
 
-#define VNET_MAGIC_N 0x3e0d8f29
+#define	VNET_MAGIC_N 0x3e0d8f29
 
 #ifdef VIMAGE
 #ifdef VNET_DEBUG
-#define VNET_ASSERT(condition)						\
+#define	VNET_ASSERT(condition)						\
 	if (!(condition)) {						\
 		printf("VNET_ASSERT @ %s:%d %s():\n",			\
 			__FILE__, __LINE__, __FUNCTION__);		\
 		panic(#condition);					\
 	}
 
-#define CURVNET_SET_QUIET(arg)						\
+#define	CURVNET_SET_QUIET(arg)						\
 	VNET_ASSERT((arg)->vnet_magic_n == VNET_MAGIC_N);		\
 	struct vnet *saved_vnet = curvnet;				\
 	const char *saved_vnet_lpush = curthread->td_vnet_lpush;	\
 	curvnet = arg;							\
 	curthread->td_vnet_lpush = __FUNCTION__;
  
-#define CURVNET_SET_VERBOSE(arg)					\
+#define	CURVNET_SET_VERBOSE(arg)					\
 	CURVNET_SET_QUIET(arg)						\
 	if (saved_vnet)							\
-		printf("curvnet_set(%p) in %s() on cpu %d, prev %p in %s()\n", curvnet,			\
-		       curthread->td_vnet_lpush, curcpu,		\
+		printf("CURVNET_SET(%p) in %s() on cpu %d, prev %p in %s()\n", \
+		       curvnet,	curthread->td_vnet_lpush, curcpu,	\
 		       saved_vnet, saved_vnet_lpush);
 
-#define CURVNET_SET(arg)	CURVNET_SET_VERBOSE(arg)
+#define	CURVNET_SET(arg)	CURVNET_SET_VERBOSE(arg)
  
-#define CURVNET_RESTORE()						\
+#define	CURVNET_RESTORE()						\
 	VNET_ASSERT(saved_vnet == NULL ||				\
 		    saved_vnet->vnet_magic_n == VNET_MAGIC_N);		\
 	curvnet = saved_vnet;						\
 	curthread->td_vnet_lpush = saved_vnet_lpush;
 #else /* !VNET_DEBUG */
-#define VNET_ASSERT(condition)
+#define	VNET_ASSERT(condition)
 
-#define CURVNET_SET(arg)						\
+#define	CURVNET_SET(arg)						\
 	struct vnet *saved_vnet = curvnet;				\
 	curvnet = arg;	
  
-#define CURVNET_SET_VERBOSE(arg)	CURVNET_SET(arg)
-#define CURVNET_SET_QUIET(arg)		CURVNET_SET(arg)
+#define	CURVNET_SET_VERBOSE(arg)	CURVNET_SET(arg)
+#define	CURVNET_SET_QUIET(arg)		CURVNET_SET(arg)
  
-#define CURVNET_RESTORE()						\
+#define	CURVNET_RESTORE()						\
 	curvnet = saved_vnet;
 #endif /* !VNET_DEBUG */
 #else /* !VIMAGE */

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 15:14:52 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 787DA1065698;
	Fri,  8 May 2009 15:14:52 +0000 (UTC) (envelope-from dfr@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5CA3F8FC1F;
	Fri,  8 May 2009 15:14:52 +0000 (UTC) (envelope-from dfr@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n48FEq9O095118;
	Fri, 8 May 2009 15:14:52 GMT (envelope-from dfr@svn.freebsd.org)
Received: (from dfr@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n48FEqpD095117;
	Fri, 8 May 2009 15:14:52 GMT (envelope-from dfr@svn.freebsd.org)
Message-Id: <200905081514.n48FEqpD095117@svn.freebsd.org>
From: Doug Rabson 
Date: Fri, 8 May 2009 15:14:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191918 - head/sys/nlm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 15:14:59 -0000

Author: dfr
Date: Fri May  8 15:14:52 2009
New Revision: 191918
URL: http://svn.freebsd.org/changeset/base/191918

Log:
  Use log(9) for debug and status messages and hide some of the details with
  macros to allow for future flexibility in logging.
  
  Submitted by:	zachary dot loafman at isilon dot com

Modified:
  head/sys/nlm/nlm_prot_impl.c

Modified: head/sys/nlm/nlm_prot_impl.c
==============================================================================
--- head/sys/nlm/nlm_prot_impl.c	Fri May  8 14:34:25 2009	(r191917)
+++ head/sys/nlm/nlm_prot_impl.c	Fri May  8 15:14:52 2009	(r191918)
@@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -104,6 +105,16 @@ static bool_t nlm_syscall_registered = F
 static int nlm_debug_level;
 SYSCTL_INT(_debug, OID_AUTO, nlm_debug, CTLFLAG_RW, &nlm_debug_level, 0, "");
 
+#define NLM_DEBUG(_level, args...)			\
+	do {						\
+		if (nlm_debug_level >= (_level))	\
+			log(LOG_DEBUG, args);		\
+	} while(0)
+#define NLM_ERR(args...)			\
+	do {					\
+		log(LOG_ERR, args);		\
+	} while(0)
+
 /*
  * Grace period handling. The value of nlm_grace_threshold is the
  * value of time_uptime after which we are serving requests normally.
@@ -254,7 +265,7 @@ nlm_init(void *dummy)
 	error = syscall_register(&nlm_syscall_offset, &nlm_syscall_sysent,
 	    &nlm_syscall_prev_sysent);
 	if (error)
-		printf("Can't register NLM syscall\n");
+		NLM_ERR("Can't register NLM syscall\n");
 	else
 		nlm_syscall_registered = TRUE;
 }
@@ -450,9 +461,8 @@ again:
 		}
 
 		/* Otherwise, bad news. */
-		printf("NLM: failed to contact remote rpcbind, "
-		    "stat = %d, port = %d\n",
-		    (int) stat, port);
+		NLM_ERR("NLM: failed to contact remote rpcbind, "
+		    "stat = %d, port = %d\n", (int) stat, port);
 		CLNT_DESTROY(rpcb);
 		return (NULL);
 	}
@@ -506,10 +516,8 @@ nlm_lock_callback(void *arg, int pending
 	struct nlm_async_lock *af = (struct nlm_async_lock *) arg;
 	struct rpc_callextra ext;
 
-	if (nlm_debug_level >= 2)
-		printf("NLM: async lock %p for %s (sysid %d) granted\n",
-		    af, af->af_host->nh_caller_name,
-		    af->af_host->nh_sysid);
+	NLM_DEBUG(2, "NLM: async lock %p for %s (sysid %d) granted\n",
+	    af, af->af_host->nh_caller_name, af->af_host->nh_sysid);
 
 	/*
 	 * Send the results back to the host.
@@ -608,10 +616,8 @@ nlm_cancel_async_lock(struct nlm_async_l
 	mtx_lock(&host->nh_lock);
 	
 	if (!error) {
-		if (nlm_debug_level >= 2)
-			printf("NLM: async lock %p for %s (sysid %d) "
-			    "cancelled\n",
-			    af, host->nh_caller_name, host->nh_sysid);
+		NLM_DEBUG(2, "NLM: async lock %p for %s (sysid %d) "
+		    "cancelled\n", af, host->nh_caller_name, host->nh_sysid);
 
 		/*
 		 * Remove from the nh_pending list and free now that
@@ -672,15 +678,13 @@ nlm_client_recovery_start(void *arg)
 {
 	struct nlm_host *host = (struct nlm_host *) arg;
 
-	if (nlm_debug_level >= 1)
-		printf("NLM: client lock recovery for %s started\n",
-		    host->nh_caller_name);
+	NLM_DEBUG(1, "NLM: client lock recovery for %s started\n",
+	    host->nh_caller_name);
 
 	nlm_client_recovery(host);
 
-	if (nlm_debug_level >= 1)
-		printf("NLM: client lock recovery for %s completed\n",
-		    host->nh_caller_name);
+	NLM_DEBUG(1, "NLM: client lock recovery for %s completed\n",
+	    host->nh_caller_name);
 
 	host->nh_monstate = NLM_MONITORED;
 	nlm_host_release(host);
@@ -703,10 +707,9 @@ nlm_host_notify(struct nlm_host *host, i
 	struct nlm_async_lock *af;
 
 	if (newstate) {
-		if (nlm_debug_level >= 1)
-			printf("NLM: host %s (sysid %d) rebooted, new "
-			    "state is %d\n",
-			    host->nh_caller_name, host->nh_sysid, newstate);
+		NLM_DEBUG(1, "NLM: host %s (sysid %d) rebooted, new "
+		    "state is %d\n", host->nh_caller_name,
+		    host->nh_sysid, newstate);
 	}
 
 	/*
@@ -786,9 +789,8 @@ nlm_create_host(const char* caller_name)
 
 	mtx_assert(&nlm_global_lock, MA_OWNED);
 
-	if (nlm_debug_level >= 1)
-		printf("NLM: new host %s (sysid %d)\n",
-		    caller_name, nlm_next_sysid);
+	NLM_DEBUG(1, "NLM: new host %s (sysid %d)\n",
+	    caller_name, nlm_next_sysid);
 	host = malloc(sizeof(struct nlm_host), M_NLM, M_NOWAIT|M_ZERO);
 	if (!host)
 		return (NULL);
@@ -1078,9 +1080,8 @@ nlm_host_unmonitor(struct nlm_host *host
 	struct timeval timo;
 	enum clnt_stat stat;
 
-	if (nlm_debug_level >= 1)
-		printf("NLM: unmonitoring %s (sysid %d)\n",
-		    host->nh_caller_name, host->nh_sysid);
+	NLM_DEBUG(1, "NLM: unmonitoring %s (sysid %d)\n",
+	    host->nh_caller_name, host->nh_sysid);
 
 	/*
 	 * We put our assigned system ID value in the priv field to
@@ -1100,11 +1101,11 @@ nlm_host_unmonitor(struct nlm_host *host
 	    (xdrproc_t) xdr_sm_stat, &smstat, timo);
 
 	if (stat != RPC_SUCCESS) {
-		printf("Failed to contact local NSM - rpc error %d\n", stat);
+		NLM_ERR("Failed to contact local NSM - rpc error %d\n", stat);
 		return;
 	}
 	if (smstat.res_stat == stat_fail) {
-		printf("Local NSM refuses to unmonitor %s\n",
+		NLM_ERR("Local NSM refuses to unmonitor %s\n",
 		    host->nh_caller_name);
 		return;
 	}
@@ -1131,9 +1132,8 @@ nlm_host_monitor(struct nlm_host *host, 
 		 * detect host reboots.
 		 */
 		host->nh_state = state;
-		if (nlm_debug_level >= 1)
-			printf("NLM: host %s (sysid %d) has NSM state %d\n",
-			    host->nh_caller_name, host->nh_sysid, state);
+		NLM_DEBUG(1, "NLM: host %s (sysid %d) has NSM state %d\n",
+		    host->nh_caller_name, host->nh_sysid, state);
 	}
 
 	mtx_lock(&host->nh_lock);
@@ -1144,9 +1144,8 @@ nlm_host_monitor(struct nlm_host *host, 
 	host->nh_monstate = NLM_MONITORED;
 	mtx_unlock(&host->nh_lock);
 
-	if (nlm_debug_level >= 1)
-		printf("NLM: monitoring %s (sysid %d)\n",
-		    host->nh_caller_name, host->nh_sysid);
+	NLM_DEBUG(1, "NLM: monitoring %s (sysid %d)\n",
+	    host->nh_caller_name, host->nh_sysid);
 
 	/*
 	 * We put our assigned system ID value in the priv field to
@@ -1167,11 +1166,11 @@ nlm_host_monitor(struct nlm_host *host, 
 	    (xdrproc_t) xdr_sm_stat, &smstat, timo);
 
 	if (stat != RPC_SUCCESS) {
-		printf("Failed to contact local NSM - rpc error %d\n", stat);
+		NLM_ERR("Failed to contact local NSM - rpc error %d\n", stat);
 		return;
 	}
 	if (smstat.res_stat == stat_fail) {
-		printf("Local NSM refuses to monitor %s\n",
+		NLM_ERR("Local NSM refuses to monitor %s\n",
 		    host->nh_caller_name);
 		mtx_lock(&host->nh_lock);
 		host->nh_monstate = NLM_MONITOR_FAILED;
@@ -1369,7 +1368,7 @@ nlm_register_services(SVCPOOL *pool, int
 	int i, j, error;
 
 	if (!addr_count) {
-		printf("NLM: no service addresses given - can't start server");
+		NLM_ERR("NLM: no service addresses given - can't start server");
 		return (EINVAL);
 	}
 
@@ -1402,7 +1401,7 @@ nlm_register_services(SVCPOOL *pool, int
 					goto out;
 				nconf = getnetconfigent(netid);
 				if (!nconf) {
-					printf("Can't lookup netid %s\n",
+					NLM_ERR("Can't lookup netid %s\n",
 					    netid);
 					error = EINVAL;
 					goto out;
@@ -1410,7 +1409,7 @@ nlm_register_services(SVCPOOL *pool, int
 				xprts[j] = svc_tp_create(pool, dispatchers[i],
 				    NLM_PROG, versions[i], uaddr, nconf);
 				if (!xprts[j]) {
-					printf("NLM: unable to create "
+					NLM_ERR("NLM: unable to create "
 					    "(NLM_PROG, %d).\n", versions[i]);
 					error = EINVAL;
 					goto out;
@@ -1421,7 +1420,7 @@ nlm_register_services(SVCPOOL *pool, int
 				rpcb_unset(NLM_PROG, versions[i], nconf);
 				if (!svc_reg(xprts[j], NLM_PROG, versions[i],
 					dispatchers[i], nconf)) {
-					printf("NLM: can't register "
+					NLM_ERR("NLM: can't register "
 					    "(NLM_PROG, %d)\n", versions[i]);
 					error = EINVAL;
 					goto out;
@@ -1469,7 +1468,8 @@ nlm_server_main(int addr_count, char **a
 #endif
 
 	if (nlm_socket) {
-		printf("NLM: can't start server - it appears to be running already\n");
+		NLM_ERR("NLM: can't start server - "
+		    "it appears to be running already\n");
 		return (EPERM);
 	}
 
@@ -1479,7 +1479,7 @@ nlm_server_main(int addr_count, char **a
 	error = socreate(AF_INET, &nlm_socket, SOCK_DGRAM, 0,
 	    td->td_ucred, td);
 	if (error) {
-		printf("NLM: can't create IPv4 socket - error %d\n", error);
+		NLM_ERR("NLM: can't create IPv4 socket - error %d\n", error);
 		return (error);
 	}
 	opt.sopt_dir = SOPT_SET;
@@ -1495,7 +1495,7 @@ nlm_server_main(int addr_count, char **a
 	error = socreate(AF_INET6, &nlm_socket6, SOCK_DGRAM, 0,
 	    td->td_ucred, td);
 	if (error) {
-		printf("NLM: can't create IPv6 socket - error %d\n", error);
+		NLM_ERR("NLM: can't create IPv6 socket - error %d\n", error);
 		goto out;
 		return (error);
 	}
@@ -1529,7 +1529,7 @@ nlm_server_main(int addr_count, char **a
 #endif
 
 	if (!nlm_nsm) {
-		printf("Can't start NLM - unable to contact NSM\n");
+		NLM_ERR("Can't start NLM - unable to contact NSM\n");
 		error = EINVAL;
 		goto out;
 	}
@@ -1553,14 +1553,13 @@ nlm_server_main(int addr_count, char **a
 		struct rpc_err err;
 
 		CLNT_GETERR(nlm_nsm, &err);
-		printf("NLM: unexpected error contacting NSM, stat=%d, errno=%d\n",
-		    stat, err.re_errno);
+		NLM_ERR("NLM: unexpected error contacting NSM, "
+		    "stat=%d, errno=%d\n", stat, err.re_errno);
 		error = EINVAL;
 		goto out;
 	}
 
-	if (nlm_debug_level >= 1)
-		printf("NLM: local NSM state is %d\n", smstat.state);
+	NLM_DEBUG(1, "NLM: local NSM state is %d\n", smstat.state);
 	nlm_nsm_state = smstat.state;
 
 #ifdef NFSCLIENT
@@ -1692,8 +1691,7 @@ nlm_sm_notify(struct nlm_sm_status *argp
 	uint32_t sysid;
 	struct nlm_host *host;
 
-	if (nlm_debug_level >= 3)
-		printf("nlm_sm_notify(): mon_name = %s\n", argp->mon_name);
+	NLM_DEBUG(3, "nlm_sm_notify(): mon_name = %s\n", argp->mon_name);
 	memcpy(&sysid, &argp->priv, sizeof(sysid));
 	host = nlm_find_host_by_sysid(sysid);
 	if (host) {
@@ -1822,9 +1820,8 @@ nlm_do_test(nlm4_testargs *argp, nlm4_te
 		return (ENOMEM);
 	}
 
-	if (nlm_debug_level >= 3)
-		printf("nlm_do_test(): caller_name = %s (sysid = %d)\n",
-		    host->nh_caller_name, host->nh_sysid);
+	NLM_DEBUG(3, "nlm_do_test(): caller_name = %s (sysid = %d)\n",
+	    host->nh_caller_name, host->nh_sysid);
 
 	nlm_free_finished_locks(host);
 	sysid = host->nh_sysid;
@@ -1919,9 +1916,8 @@ nlm_do_lock(nlm4_lockargs *argp, nlm4_re
 		return (ENOMEM);
 	}
 
-	if (nlm_debug_level >= 3)
-		printf("nlm_do_lock(): caller_name = %s (sysid = %d)\n",
-		    host->nh_caller_name, host->nh_sysid);
+	NLM_DEBUG(3, "nlm_do_lock(): caller_name = %s (sysid = %d)\n",
+	    host->nh_caller_name, host->nh_sysid);
 
 	if (monitor && host->nh_state && argp->state
 	    && host->nh_state != argp->state) {
@@ -2043,10 +2039,8 @@ nlm_do_lock(nlm4_lockargs *argp, nlm4_re
 			    &af->af_granted);
 			free(af, M_NLM);
 		} else {
-			if (nlm_debug_level >= 2)
-				printf("NLM: pending async lock %p for %s "
-				    "(sysid %d)\n",
-				    af, host->nh_caller_name, sysid);
+			NLM_DEBUG(2, "NLM: pending async lock %p for %s "
+			    "(sysid %d)\n", af, host->nh_caller_name, sysid);
 			/*
 			 * Don't vrele the vnode just yet - this must
 			 * wait until either the async callback
@@ -2103,9 +2097,8 @@ nlm_do_cancel(nlm4_cancargs *argp, nlm4_
 		return (ENOMEM);
 	}
 
-	if (nlm_debug_level >= 3)
-		printf("nlm_do_cancel(): caller_name = %s (sysid = %d)\n",
-		    host->nh_caller_name, host->nh_sysid);
+	NLM_DEBUG(3, "nlm_do_cancel(): caller_name = %s (sysid = %d)\n",
+	    host->nh_caller_name, host->nh_sysid);
 
 	nlm_free_finished_locks(host);
 	sysid = host->nh_sysid;
@@ -2193,9 +2186,8 @@ nlm_do_unlock(nlm4_unlockargs *argp, nlm
 		return (ENOMEM);
 	}
 
-	if (nlm_debug_level >= 3)
-		printf("nlm_do_unlock(): caller_name = %s (sysid = %d)\n",
-		    host->nh_caller_name, host->nh_sysid);
+	NLM_DEBUG(3, "nlm_do_unlock(): caller_name = %s (sysid = %d)\n",
+	    host->nh_caller_name, host->nh_sysid);
 
 	nlm_free_finished_locks(host);
 	sysid = host->nh_sysid;

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 17:40:59 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 42454106564A;
	Fri,  8 May 2009 17:40:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 132338FC0A;
	Fri,  8 May 2009 17:40:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id A829D46B09;
	Fri,  8 May 2009 13:40:58 -0400 (EDT)
Received: from John-Baldwins-Macbook-Pro.local (localhost [127.0.0.1])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 392CA8A022;
	Fri,  8 May 2009 13:40:57 -0400 (EDT)
Message-ID: <4A046EB0.9060009@FreeBSD.org>
Date: Fri, 08 May 2009 13:41:04 -0400
From: John Baldwin 
User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302)
MIME-Version: 1.0
To: Andrew Thompson 
References: <200905081344.n48DiYJI092605@svn.freebsd.org>
In-Reply-To: <200905081344.n48DiYJI092605@svn.freebsd.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Fri, 08 May 2009 13:40:57 -0400 (EDT)
X-Virus-Scanned: clamav-milter 0.95 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00
	autolearn=ham version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r191912 - in head/sys/dev: ipw iwi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 17:40:59 -0000

Andrew Thompson wrote:
> Author: thompsa
> Date: Fri May  8 13:44:33 2009
> New Revision: 191912
> URL: http://svn.freebsd.org/changeset/base/191912
> 
> Log:
>   Drain the tasks before the interface stop call in case a restart was queued.

Actually, you have to drain it after if_detach() so you can safely 
destroy the lock.  The proper order should be something like this:

	bpfdetach(ifp);
	ieee80211_ifdetach(ic);

	ipw_stop(sc);

	callout_drain();
	ieee80211_draintask();

	ipw_release(sc);

This is the order other NIC drivers use where they do something like:

	ether_ifdetach(ifp);
	FOO_LOCK(sc);
	foo_stop(sc);		// calls callout_stop()
	FOO_UNLOCK(sc);

	callout_drain();
	taskqueue_drain();	// only if it uses tasks

	if_free();
	mtx_destroy();

> 
> Modified:
>   head/sys/dev/ipw/if_ipw.c
>   head/sys/dev/iwi/if_iwi.c
> 
> Modified: head/sys/dev/ipw/if_ipw.c
> ==============================================================================
> --- head/sys/dev/ipw/if_ipw.c	Fri May  8 03:19:57 2009	(r191911)
> +++ head/sys/dev/ipw/if_ipw.c	Fri May  8 13:44:33 2009	(r191912)
> @@ -404,13 +404,13 @@ ipw_detach(device_t dev)
>  	struct ifnet *ifp = sc->sc_ifp;
>  	struct ieee80211com *ic = ifp->if_l2com;
>  
> +	ieee80211_draintask(ic, &sc->sc_init_task);
>  	ipw_stop(sc);
>  
>  	bpfdetach(ifp);
>  	ieee80211_ifdetach(ic);
>  
>  	callout_drain(&sc->sc_wdtimer);
> -	ieee80211_draintask(ic, &sc->sc_init_task);
>  
>  	ipw_release(sc);
>  
> 
> Modified: head/sys/dev/iwi/if_iwi.c
> ==============================================================================
> --- head/sys/dev/iwi/if_iwi.c	Fri May  8 03:19:57 2009	(r191911)
> +++ head/sys/dev/iwi/if_iwi.c	Fri May  8 13:44:33 2009	(r191912)
> @@ -459,17 +459,17 @@ iwi_detach(device_t dev)
>  	struct ifnet *ifp = sc->sc_ifp;
>  	struct ieee80211com *ic = ifp->if_l2com;
>  
> -	iwi_stop(sc);
> -
> -	bpfdetach(ifp);
> -	ieee80211_ifdetach(ic);
> -
>  	/* NB: do early to drain any pending tasks */
>  	ieee80211_draintask(ic, &sc->sc_radiontask);
>  	ieee80211_draintask(ic, &sc->sc_radiofftask);
>  	ieee80211_draintask(ic, &sc->sc_restarttask);
>  	ieee80211_draintask(ic, &sc->sc_disassoctask);
>  
> +	iwi_stop(sc);
> +
> +	bpfdetach(ifp);
> +	ieee80211_ifdetach(ic);
> +
>  	iwi_put_firmware(sc);
>  	iwi_release_fw_dma(sc);
>  


-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 17:49:21 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0BCA010656D0;
	Fri,  8 May 2009 17:49:21 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from pele.citylink.co.nz (pele.citylink.co.nz [202.8.44.226])
	by mx1.freebsd.org (Postfix) with ESMTP id C02BA8FC13;
	Fri,  8 May 2009 17:49:20 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from localhost (localhost [127.0.0.1])
	by pele.citylink.co.nz (Postfix) with ESMTP id BF70CFF14;
	Sat,  9 May 2009 05:49:19 +1200 (NZST)
X-Virus-Scanned: Debian amavisd-new at citylink.co.nz
Received: from pele.citylink.co.nz ([127.0.0.1])
	by localhost (pele.citylink.co.nz [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id f-s5gh7U6G7r; Sat,  9 May 2009 05:49:14 +1200 (NZST)
Received: from citylink.fud.org.nz (unknown [202.8.44.45])
	by pele.citylink.co.nz (Postfix) with ESMTP;
	Sat,  9 May 2009 05:49:14 +1200 (NZST)
Received: by citylink.fud.org.nz (Postfix, from userid 1001)
	id 4DFCA11432; Sat,  9 May 2009 05:49:14 +1200 (NZST)
Date: Fri, 8 May 2009 10:49:14 -0700
From: Andrew Thompson 
To: John Baldwin 
Message-ID: <20090508174914.GC93351@citylink.fud.org.nz>
References: <200905081344.n48DiYJI092605@svn.freebsd.org>
	<4A046EB0.9060009@FreeBSD.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4A046EB0.9060009@FreeBSD.org>
User-Agent: Mutt/1.5.17 (2007-11-01)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r191912 - in head/sys/dev: ipw iwi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 17:49:21 -0000

On Fri, May 08, 2009 at 01:41:04PM -0400, John Baldwin wrote:
> Andrew Thompson wrote:
>> Author: thompsa
>> Date: Fri May  8 13:44:33 2009
>> New Revision: 191912
>> URL: http://svn.freebsd.org/changeset/base/191912
>> 
>> Log:
>>   Drain the tasks before the interface stop call in case a restart was queued.
> 
> Actually, you have to drain it after if_detach() so you can safely destroy 
> the lock.  The proper order should be something like this:
> 
> 	bpfdetach(ifp);
> 	ieee80211_ifdetach(ic);
> 
> 	ipw_stop(sc);
> 
> 	callout_drain();
> 	ieee80211_draintask();
> 
> 	ipw_release(sc);
> 
> This is the order other NIC drivers use where they do something like:
> 
> 	ether_ifdetach(ifp);
> 	FOO_LOCK(sc);
> 	foo_stop(sc);		// calls callout_stop()
> 	FOO_UNLOCK(sc);
> 
> 	callout_drain();
> 	taskqueue_drain();	// only if it uses tasks
> 
> 	if_free();
> 	mtx_destroy();

ieee80211_ifdetach() will actually free the taskqueue, it doesnt use one
of the persistent system ones. It wasnt incorrect before as the
interface would still be brought down before net80211 detached, it was
just to reduce the flip flopping. With that noted does it still need
reordering?


Andrew

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 18:50:08 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2F9BF1065674;
	Fri,  8 May 2009 18:50:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id F3B908FC28;
	Fri,  8 May 2009 18:50:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 900C246B82;
	Fri,  8 May 2009 14:50:07 -0400 (EDT)
Received: from John-Baldwins-Macbook-Pro.local (localhost [127.0.0.1])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 8FE938A022;
	Fri,  8 May 2009 14:50:05 -0400 (EDT)
Message-ID: <4A047EE4.4080007@FreeBSD.org>
Date: Fri, 08 May 2009 14:50:12 -0400
From: John Baldwin 
User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302)
MIME-Version: 1.0
To: Andrew Thompson 
References: <200905081344.n48DiYJI092605@svn.freebsd.org>
	<4A046EB0.9060009@FreeBSD.org>
	<20090508174914.GC93351@citylink.fud.org.nz>
In-Reply-To: <20090508174914.GC93351@citylink.fud.org.nz>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Fri, 08 May 2009 14:50:05 -0400 (EDT)
X-Virus-Scanned: clamav-milter 0.95 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00
	autolearn=ham version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r191912 - in head/sys/dev: ipw iwi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 18:50:08 -0000

Andrew Thompson wrote:
> On Fri, May 08, 2009 at 01:41:04PM -0400, John Baldwin wrote:
>> Andrew Thompson wrote:
>>> Author: thompsa
>>> Date: Fri May  8 13:44:33 2009
>>> New Revision: 191912
>>> URL: http://svn.freebsd.org/changeset/base/191912
>>>
>>> Log:
>>>   Drain the tasks before the interface stop call in case a restart was queued.
>> Actually, you have to drain it after if_detach() so you can safely destroy 
>> the lock.  The proper order should be something like this:
>>
>> 	bpfdetach(ifp);
>> 	ieee80211_ifdetach(ic);
>>
>> 	ipw_stop(sc);
>>
>> 	callout_drain();
>> 	ieee80211_draintask();
>>
>> 	ipw_release(sc);
>>
>> This is the order other NIC drivers use where they do something like:
>>
>> 	ether_ifdetach(ifp);
>> 	FOO_LOCK(sc);
>> 	foo_stop(sc);		// calls callout_stop()
>> 	FOO_UNLOCK(sc);
>>
>> 	callout_drain();
>> 	taskqueue_drain();	// only if it uses tasks
>>
>> 	if_free();
>> 	mtx_destroy();
> 
> ieee80211_ifdetach() will actually free the taskqueue, it doesnt use one
> of the persistent system ones. It wasnt incorrect before as the
> interface would still be brought down before net80211 detached, it was
> just to reduce the flip flopping. With that noted does it still need
> reordering?

Assuming that free'ing a taskqueue drains any tasks, then you don't 
actually need to drain the task queue in that case.  However, you should 
still move the foo_stop() after if_detach() as userland ioctl requests 
are still able to call your driver's ioctl() routine until if_detach() 
returns.  So perhaps something like this:

	bpfdetach()
	ieee80211_ifdetach()

	ipw_stop();

	callout_drain();

	ipw_release();

In general, it isn't really safe to shutdown the hardware (foo_stop()) 
until you have detached the driver from external code paths (ifnet, bpf, 
etc.).

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 20:06:38 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1EF8D106566C;
	Fri,  8 May 2009 20:06:38 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 03F1A8FC08;
	Fri,  8 May 2009 20:06:38 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n48K6bQI001195;
	Fri, 8 May 2009 20:06:37 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n48K6bom001187;
	Fri, 8 May 2009 20:06:37 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <200905082006.n48K6bom001187@svn.freebsd.org>
From: Ed Schouten 
Date: Fri, 8 May 2009 20:06:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191919 - in head/sys: compat/svr4 conf i386/ibcs2
	modules/svr4 sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 20:06:38 -0000

Author: ed
Date: Fri May  8 20:06:37 2009
New Revision: 191919
URL: http://svn.freebsd.org/changeset/base/191919

Log:
  Burn TTY ioctl bridges in compat layers.
  
  I really don't want any pieces of code to include ioctl_compat.h, so let
  the ibcs2 and svr4 compat leave sgtty alone. If they want to support
  sgtty, they should emulate it on top of termios, not sgtty.
  
  The code has been marked with BURN_BRIDGES for a long time. ibcs2 and
  svr4 are not really popular pieces of code anyway.

Deleted:
  head/sys/compat/svr4/svr4_ttold.c
  head/sys/compat/svr4/svr4_ttold.h
Modified:
  head/sys/compat/svr4/svr4_ioctl.c
  head/sys/compat/svr4/svr4_ioctl.h
  head/sys/conf/files.i386
  head/sys/conf/files.pc98
  head/sys/i386/ibcs2/ibcs2_ioctl.c
  head/sys/i386/ibcs2/syscalls.master
  head/sys/modules/svr4/Makefile
  head/sys/sys/ioctl_compat.h

Modified: head/sys/compat/svr4/svr4_ioctl.c
==============================================================================
--- head/sys/compat/svr4/svr4_ioctl.c	Fri May  8 15:14:52 2009	(r191918)
+++ head/sys/compat/svr4/svr4_ioctl.c	Fri May  8 20:06:37 2009	(r191919)
@@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -119,13 +118,6 @@ svr4_sys_ioctl(td, uap)
 #endif
 
 	switch (cmd & 0xff00) {
-#ifndef BURN_BRIDGES
-	case SVR4_tIOC:
-	        DPRINTF(("ttold\n"));
-		fun = svr4_ttold_ioctl;
-		break;
-#endif
-
 	case SVR4_TIOC:
 	        DPRINTF(("term\n"));
 		fun = svr4_term_ioctl;

Modified: head/sys/compat/svr4/svr4_ioctl.h
==============================================================================
--- head/sys/compat/svr4/svr4_ioctl.h	Fri May  8 15:14:52 2009	(r191918)
+++ head/sys/compat/svr4/svr4_ioctl.h	Fri May  8 20:06:37 2009	(r191919)
@@ -52,8 +52,6 @@ int	svr4_stream_ioctl(struct file *, str
 				  int, u_long, caddr_t);
 int	svr4_term_ioctl(struct file *, struct thread *, register_t *,
 				  int, u_long, caddr_t);
-int	svr4_ttold_ioctl(struct file *, struct thread *, register_t *,
-				  int, u_long, caddr_t);
 int	svr4_fil_ioctl	(struct file *, struct thread *, register_t *,
 				  int, u_long, caddr_t);
 int	svr4_sock_ioctl	(struct file *, struct thread *, register_t *,

Modified: head/sys/conf/files.i386
==============================================================================
--- head/sys/conf/files.i386	Fri May  8 15:14:52 2009	(r191918)
+++ head/sys/conf/files.i386	Fri May  8 20:06:37 2009	(r191919)
@@ -108,7 +108,6 @@ compat/svr4/svr4_syscallnames.c	optional
 compat/svr4/svr4_sysent.c	optional compat_svr4
 compat/svr4/svr4_sysvec.c	optional compat_svr4
 compat/svr4/svr4_termios.c	optional compat_svr4
-compat/svr4/svr4_ttold.c	optional compat_svr4
 bf_enc.o			optional crypto | ipsec	\
 	dependency	"$S/crypto/blowfish/arch/i386/bf_enc.S $S/crypto/blowfish/arch/i386/bf_enc_586.S $S/crypto/blowfish/arch/i386/bf_enc_686.S" \
 	compile-with	"${CC} -c -I$S/crypto/blowfish/arch/i386 ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}" \

Modified: head/sys/conf/files.pc98
==============================================================================
--- head/sys/conf/files.pc98	Fri May  8 15:14:52 2009	(r191918)
+++ head/sys/conf/files.pc98	Fri May  8 20:06:37 2009	(r191919)
@@ -71,7 +71,6 @@ compat/svr4/svr4_syscallnames.c	optional
 compat/svr4/svr4_sysent.c	optional compat_svr4
 compat/svr4/svr4_sysvec.c	optional compat_svr4
 compat/svr4/svr4_termios.c	optional compat_svr4
-compat/svr4/svr4_ttold.c	optional compat_svr4
 bf_enc.o			optional crypto | ipsec	\
 	dependency	"$S/crypto/blowfish/arch/i386/bf_enc.S $S/crypto/blowfish/arch/i386/bf_enc_586.S $S/crypto/blowfish/arch/i386/bf_enc_686.S" \
 	compile-with	"${CC} -c -I$S/crypto/blowfish/arch/i386 ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}" \

Modified: head/sys/i386/ibcs2/ibcs2_ioctl.c
==============================================================================
--- head/sys/i386/ibcs2/ibcs2_ioctl.c	Fri May  8 15:14:52 2009	(r191918)
+++ head/sys/i386/ibcs2/ibcs2_ioctl.c	Fri May  8 20:06:37 2009	(r191919)
@@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -56,34 +55,6 @@ static void btios2stios(struct termios *
 static void stios2stio(struct ibcs2_termios *, struct ibcs2_termio *);
 static void stio2stios(struct ibcs2_termio *, struct ibcs2_termios *);
 
-
-#ifndef BURN_BRIDGES
-int
-ibcs2_gtty(struct thread *td, struct ibcs2_gtty_args *args)
-{
-	struct ioctl_args ioctl_arg;
-
-	ioctl_arg.fd = args->fd;
-	ioctl_arg.com = TIOCGETC;
-	ioctl_arg.data = (caddr_t)args->buf;
-
-	return ioctl(td, &ioctl_arg);
-}
-
-int
-ibcs2_stty(struct thread *td, struct ibcs2_stty_args *args)
-{
-	struct ioctl_args ioctl_arg;
-
-	ioctl_arg.fd = args->fd;
-	ioctl_arg.com = TIOCSETC;
-	ioctl_arg.data = (caddr_t)args->buf;
-
-	return ioctl(td, &ioctl_arg);
-}
-#endif /* BURN BRIDGES */
-
-
 /*
  * iBCS2 ioctl calls.
  */

Modified: head/sys/i386/ibcs2/syscalls.master
==============================================================================
--- head/sys/i386/ibcs2/syscalls.master	Fri May  8 15:14:52 2009	(r191918)
+++ head/sys/i386/ibcs2/syscalls.master	Fri May  8 20:06:37 2009	(r191919)
@@ -79,10 +79,8 @@
 29	AUE_NULL	STD	{ int ibcs2_pause(void); }
 30	AUE_NULL	STD	{ int ibcs2_utime(char *path, \
 				    struct ibcs2_utimbuf *buf); }
-31	AUE_NULL	STD	{ int ibcs2_stty(int fd, \
-				    struct sgttyb *buf); }
-32	AUE_NULL	STD	{ int ibcs2_gtty(int fd, \
-				    struct sgttyb *buf); }
+31	AUE_NULL	UNIMPL	ibcs2_stty
+32	AUE_NULL	UNIMPL	ibcs2_gtty
 33	AUE_ACCESS	STD	{ int ibcs2_access(char *path, int flags); }
 34	AUE_NICE	STD	{ int ibcs2_nice(int incr); }
 35	AUE_STATFS	STD	{ int ibcs2_statfs(char *path, \

Modified: head/sys/modules/svr4/Makefile
==============================================================================
--- head/sys/modules/svr4/Makefile	Fri May  8 15:14:52 2009	(r191918)
+++ head/sys/modules/svr4/Makefile	Fri May  8 20:06:37 2009	(r191919)
@@ -4,7 +4,7 @@
 KMOD=	svr4
 SRCS=	svr4_sysent.c svr4_sysvec.c opt_compat.h opt_mac.h opt_svr4.h \
 	vnode_if.h imgact_svr4.c svr4_signal.c svr4_fcntl.c \
-	svr4_misc.c svr4_ioctl.c svr4_stat.c svr4_filio.c svr4_ttold.c \
+	svr4_misc.c svr4_ioctl.c svr4_stat.c svr4_filio.c \
 	svr4_termios.c svr4_stream.c svr4_socket.c svr4_sockio.c \
 	svr4_machdep.c svr4_resource.c svr4_ipc.c
 OBJS=	svr4_locore.o 

Modified: head/sys/sys/ioctl_compat.h
==============================================================================
--- head/sys/sys/ioctl_compat.h	Fri May  8 15:14:52 2009	(r191918)
+++ head/sys/sys/ioctl_compat.h	Fri May  8 20:06:37 2009	(r191919)
@@ -40,6 +40,10 @@
 
 #ifdef _KERNEL
 
+#ifndef COMPAT_43TTY
+#error "Definitions not available without TTY ioctl compat."
+#endif
+
 struct tchars {
 	char	t_intrc;	/* interrupt */
 	char	t_quitc;	/* quit */

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 20:08:44 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 38DC1106566B;
	Fri,  8 May 2009 20:08:44 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 26EA18FC18;
	Fri,  8 May 2009 20:08:44 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n48K8iKw001274;
	Fri, 8 May 2009 20:08:44 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n48K8hEF001271;
	Fri, 8 May 2009 20:08:43 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <200905082008.n48K8hEF001271@svn.freebsd.org>
From: Ed Schouten 
Date: Fri, 8 May 2009 20:08:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191920 - head/sys/i386/ibcs2
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 20:08:44 -0000

Author: ed
Date: Fri May  8 20:08:43 2009
New Revision: 191920
URL: http://svn.freebsd.org/changeset/base/191920

Log:
  Regenerate ibcs2 system call table.

Modified:
  head/sys/i386/ibcs2/ibcs2_proto.h
  head/sys/i386/ibcs2/ibcs2_syscall.h
  head/sys/i386/ibcs2/ibcs2_sysent.c

Modified: head/sys/i386/ibcs2/ibcs2_proto.h
==============================================================================
--- head/sys/i386/ibcs2/ibcs2_proto.h	Fri May  8 20:06:37 2009	(r191919)
+++ head/sys/i386/ibcs2/ibcs2_proto.h	Fri May  8 20:08:43 2009	(r191920)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: src/sys/i386/ibcs2/syscalls.master,v 1.28 2006/07/28 19:05:27 jhb Exp 
+ * created from FreeBSD: head/sys/i386/ibcs2/syscalls.master 191919 2009-05-08 20:06:37Z ed 
  */
 
 #ifndef _IBCS2_SYSPROTO_H_
@@ -11,6 +11,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -117,14 +118,6 @@ struct ibcs2_utime_args {
 	char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
 	char buf_l_[PADL_(struct ibcs2_utimbuf *)]; struct ibcs2_utimbuf * buf; char buf_r_[PADR_(struct ibcs2_utimbuf *)];
 };
-struct ibcs2_stty_args {
-	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
-	char buf_l_[PADL_(struct sgttyb *)]; struct sgttyb * buf; char buf_r_[PADR_(struct sgttyb *)];
-};
-struct ibcs2_gtty_args {
-	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
-	char buf_l_[PADL_(struct sgttyb *)]; struct sgttyb * buf; char buf_r_[PADR_(struct sgttyb *)];
-};
 struct ibcs2_access_args {
 	char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
 	char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
@@ -302,8 +295,6 @@ int	ibcs2_alarm(struct thread *, struct 
 int	ibcs2_fstat(struct thread *, struct ibcs2_fstat_args *);
 int	ibcs2_pause(struct thread *, struct ibcs2_pause_args *);
 int	ibcs2_utime(struct thread *, struct ibcs2_utime_args *);
-int	ibcs2_stty(struct thread *, struct ibcs2_stty_args *);
-int	ibcs2_gtty(struct thread *, struct ibcs2_gtty_args *);
 int	ibcs2_access(struct thread *, struct ibcs2_access_args *);
 int	ibcs2_nice(struct thread *, struct ibcs2_nice_args *);
 int	ibcs2_statfs(struct thread *, struct ibcs2_statfs_args *);
@@ -348,6 +339,12 @@ int	ibcs2_isc(struct thread *, struct ib
 
 #endif /* COMPAT_FREEBSD4 */
 
+
+#ifdef COMPAT_FREEBSD6
+
+
+#endif /* COMPAT_FREEBSD6 */
+
 #define	IBCS2_SYS_AUE_ibcs2_read	AUE_NULL
 #define	IBCS2_SYS_AUE_ibcs2_open	AUE_OPEN_RWTC
 #define	IBCS2_SYS_AUE_ibcs2_wait	AUE_WAIT4
@@ -369,8 +366,6 @@ int	ibcs2_isc(struct thread *, struct ib
 #define	IBCS2_SYS_AUE_ibcs2_fstat	AUE_FSTAT
 #define	IBCS2_SYS_AUE_ibcs2_pause	AUE_NULL
 #define	IBCS2_SYS_AUE_ibcs2_utime	AUE_NULL
-#define	IBCS2_SYS_AUE_ibcs2_stty	AUE_NULL
-#define	IBCS2_SYS_AUE_ibcs2_gtty	AUE_NULL
 #define	IBCS2_SYS_AUE_ibcs2_access	AUE_ACCESS
 #define	IBCS2_SYS_AUE_ibcs2_nice	AUE_NICE
 #define	IBCS2_SYS_AUE_ibcs2_statfs	AUE_STATFS

Modified: head/sys/i386/ibcs2/ibcs2_syscall.h
==============================================================================
--- head/sys/i386/ibcs2/ibcs2_syscall.h	Fri May  8 20:06:37 2009	(r191919)
+++ head/sys/i386/ibcs2/ibcs2_syscall.h	Fri May  8 20:08:43 2009	(r191920)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: src/sys/i386/ibcs2/syscalls.master,v 1.28 2006/07/28 19:05:27 jhb Exp 
+ * created from FreeBSD: head/sys/i386/ibcs2/syscalls.master 191919 2009-05-08 20:06:37Z ed 
  */
 
 #define	IBCS2_SYS_syscall	0
@@ -37,8 +37,6 @@
 #define	IBCS2_SYS_ibcs2_fstat	28
 #define	IBCS2_SYS_ibcs2_pause	29
 #define	IBCS2_SYS_ibcs2_utime	30
-#define	IBCS2_SYS_ibcs2_stty	31
-#define	IBCS2_SYS_ibcs2_gtty	32
 #define	IBCS2_SYS_ibcs2_access	33
 #define	IBCS2_SYS_ibcs2_nice	34
 #define	IBCS2_SYS_ibcs2_statfs	35

Modified: head/sys/i386/ibcs2/ibcs2_sysent.c
==============================================================================
--- head/sys/i386/ibcs2/ibcs2_sysent.c	Fri May  8 20:06:37 2009	(r191919)
+++ head/sys/i386/ibcs2/ibcs2_sysent.c	Fri May  8 20:08:43 2009	(r191920)
@@ -3,10 +3,9 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: src/sys/i386/ibcs2/syscalls.master,v 1.28 2006/07/28 19:05:27 jhb Exp 
+ * created from FreeBSD: head/sys/i386/ibcs2/syscalls.master 191919 2009-05-08 20:06:37Z ed 
  */
 
-#include 
 #include 
 #include 
 #include 
@@ -49,8 +48,8 @@ struct sysent ibcs2_sysent[] = {
 	{ AS(ibcs2_fstat_args), (sy_call_t *)ibcs2_fstat, AUE_FSTAT, NULL, 0, 0 },	/* 28 = ibcs2_fstat */
 	{ 0, (sy_call_t *)ibcs2_pause, AUE_NULL, NULL, 0, 0 },	/* 29 = ibcs2_pause */
 	{ AS(ibcs2_utime_args), (sy_call_t *)ibcs2_utime, AUE_NULL, NULL, 0, 0 },	/* 30 = ibcs2_utime */
-	{ AS(ibcs2_stty_args), (sy_call_t *)ibcs2_stty, AUE_NULL, NULL, 0, 0 },	/* 31 = ibcs2_stty */
-	{ AS(ibcs2_gtty_args), (sy_call_t *)ibcs2_gtty, AUE_NULL, NULL, 0, 0 },	/* 32 = ibcs2_gtty */
+	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },			/* 31 = ibcs2_stty */
+	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },			/* 32 = ibcs2_gtty */
 	{ AS(ibcs2_access_args), (sy_call_t *)ibcs2_access, AUE_ACCESS, NULL, 0, 0 },	/* 33 = ibcs2_access */
 	{ AS(ibcs2_nice_args), (sy_call_t *)ibcs2_nice, AUE_NICE, NULL, 0, 0 },	/* 34 = ibcs2_nice */
 	{ AS(ibcs2_statfs_args), (sy_call_t *)ibcs2_statfs, AUE_STATFS, NULL, 0, 0 },	/* 35 = ibcs2_statfs */

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 20:16:05 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 89C5B106566B;
	Fri,  8 May 2009 20:16:05 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 777A48FC14;
	Fri,  8 May 2009 20:16:05 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n48KG5w2001467;
	Fri, 8 May 2009 20:16:05 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n48KG5Nx001458;
	Fri, 8 May 2009 20:16:05 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <200905082016.n48KG5Nx001458@svn.freebsd.org>
From: Ed Schouten 
Date: Fri, 8 May 2009 20:16:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191921 - in head/sys: compat/svr4 i386/ibcs2
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 20:16:06 -0000

Author: ed
Date: Fri May  8 20:16:04 2009
New Revision: 191921
URL: http://svn.freebsd.org/changeset/base/191921

Log:
  Regenerate system call tables to use SVN ids.

Modified:
  head/sys/compat/svr4/svr4_proto.h
  head/sys/compat/svr4/svr4_syscall.h
  head/sys/compat/svr4/svr4_syscallnames.c
  head/sys/compat/svr4/svr4_sysent.c
  head/sys/i386/ibcs2/ibcs2_isc_syscall.h
  head/sys/i386/ibcs2/ibcs2_isc_sysent.c
  head/sys/i386/ibcs2/ibcs2_xenix.h
  head/sys/i386/ibcs2/ibcs2_xenix_syscall.h
  head/sys/i386/ibcs2/ibcs2_xenix_sysent.c

Modified: head/sys/compat/svr4/svr4_proto.h
==============================================================================
--- head/sys/compat/svr4/svr4_proto.h	Fri May  8 20:08:43 2009	(r191920)
+++ head/sys/compat/svr4/svr4_proto.h	Fri May  8 20:16:04 2009	(r191921)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: src/sys/compat/svr4/syscalls.master,v 1.28 2006/07/28 19:05:27 jhb Exp 
+ * created from FreeBSD: head/sys/compat/svr4/syscalls.master 160798 2006-07-28 19:05:28Z jhb 
  */
 
 #ifndef _SVR4_SYSPROTO_H_
@@ -11,6 +11,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -496,6 +497,12 @@ int	svr4_sys_sendto(struct thread *, str
 
 #endif /* COMPAT_FREEBSD4 */
 
+
+#ifdef COMPAT_FREEBSD6
+
+
+#endif /* COMPAT_FREEBSD6 */
+
 #define	SVR4_SYS_AUE_svr4_sys_open	AUE_NULL
 #define	SVR4_SYS_AUE_svr4_sys_wait	AUE_NULL
 #define	SVR4_SYS_AUE_svr4_sys_creat	AUE_NULL

Modified: head/sys/compat/svr4/svr4_syscall.h
==============================================================================
--- head/sys/compat/svr4/svr4_syscall.h	Fri May  8 20:08:43 2009	(r191920)
+++ head/sys/compat/svr4/svr4_syscall.h	Fri May  8 20:16:04 2009	(r191921)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: src/sys/compat/svr4/syscalls.master,v 1.28 2006/07/28 19:05:27 jhb Exp 
+ * created from FreeBSD: head/sys/compat/svr4/syscalls.master 160798 2006-07-28 19:05:28Z jhb 
  */
 
 #define	SVR4_SYS_exit	1

Modified: head/sys/compat/svr4/svr4_syscallnames.c
==============================================================================
--- head/sys/compat/svr4/svr4_syscallnames.c	Fri May  8 20:08:43 2009	(r191920)
+++ head/sys/compat/svr4/svr4_syscallnames.c	Fri May  8 20:16:04 2009	(r191921)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: src/sys/compat/svr4/syscalls.master,v 1.28 2006/07/28 19:05:27 jhb Exp 
+ * created from FreeBSD: head/sys/compat/svr4/syscalls.master 160798 2006-07-28 19:05:28Z jhb 
  */
 
 const char *svr4_syscallnames[] = {

Modified: head/sys/compat/svr4/svr4_sysent.c
==============================================================================
--- head/sys/compat/svr4/svr4_sysent.c	Fri May  8 20:08:43 2009	(r191920)
+++ head/sys/compat/svr4/svr4_sysent.c	Fri May  8 20:16:04 2009	(r191921)
@@ -3,10 +3,9 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: src/sys/compat/svr4/syscalls.master,v 1.28 2006/07/28 19:05:27 jhb Exp 
+ * created from FreeBSD: head/sys/compat/svr4/syscalls.master 160798 2006-07-28 19:05:28Z jhb 
  */
 
-#include 
 #include 
 #include 
 #include 

Modified: head/sys/i386/ibcs2/ibcs2_isc_syscall.h
==============================================================================
--- head/sys/i386/ibcs2/ibcs2_isc_syscall.h	Fri May  8 20:08:43 2009	(r191920)
+++ head/sys/i386/ibcs2/ibcs2_isc_syscall.h	Fri May  8 20:16:04 2009	(r191921)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: src/sys/i386/ibcs2/syscalls.isc,v 1.12 2006/07/28 19:05:27 jhb Exp 
+ * created from FreeBSD: head/sys/i386/ibcs2/syscalls.isc 160798 2006-07-28 19:05:28Z jhb 
  */
 
 #define	IBCS2_ISC_ibcs2_rename	2

Modified: head/sys/i386/ibcs2/ibcs2_isc_sysent.c
==============================================================================
--- head/sys/i386/ibcs2/ibcs2_isc_sysent.c	Fri May  8 20:08:43 2009	(r191920)
+++ head/sys/i386/ibcs2/ibcs2_isc_sysent.c	Fri May  8 20:16:04 2009	(r191921)
@@ -3,10 +3,9 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: src/sys/i386/ibcs2/syscalls.isc,v 1.12 2006/07/28 19:05:27 jhb Exp 
+ * created from FreeBSD: head/sys/i386/ibcs2/syscalls.isc 160798 2006-07-28 19:05:28Z jhb 
  */
 
-#include 
 #include 
 #include 
 #include 

Modified: head/sys/i386/ibcs2/ibcs2_xenix.h
==============================================================================
--- head/sys/i386/ibcs2/ibcs2_xenix.h	Fri May  8 20:08:43 2009	(r191920)
+++ head/sys/i386/ibcs2/ibcs2_xenix.h	Fri May  8 20:16:04 2009	(r191921)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: src/sys/i386/ibcs2/syscalls.xenix,v 1.14 2006/07/28 19:05:27 jhb Exp 
+ * created from FreeBSD: head/sys/i386/ibcs2/syscalls.xenix 160798 2006-07-28 19:05:28Z jhb 
  */
 
 #ifndef _IBCS2_XENIX_H_
@@ -11,6 +11,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -122,6 +123,12 @@ int	xenix_utsname(struct thread *, struc
 
 #endif /* COMPAT_FREEBSD4 */
 
+
+#ifdef COMPAT_FREEBSD6
+
+
+#endif /* COMPAT_FREEBSD6 */
+
 #define	IBCS2_XENIX_AUE_xenix_rdchk	AUE_NULL
 #define	IBCS2_XENIX_AUE_xenix_chsize	AUE_FTRUNCATE
 #define	IBCS2_XENIX_AUE_xenix_ftime	AUE_NULL

Modified: head/sys/i386/ibcs2/ibcs2_xenix_syscall.h
==============================================================================
--- head/sys/i386/ibcs2/ibcs2_xenix_syscall.h	Fri May  8 20:08:43 2009	(r191920)
+++ head/sys/i386/ibcs2/ibcs2_xenix_syscall.h	Fri May  8 20:16:04 2009	(r191921)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: src/sys/i386/ibcs2/syscalls.xenix,v 1.14 2006/07/28 19:05:27 jhb Exp 
+ * created from FreeBSD: head/sys/i386/ibcs2/syscalls.xenix 160798 2006-07-28 19:05:28Z jhb 
  */
 
 #define	IBCS2_XENIX_xenix_rdchk	7

Modified: head/sys/i386/ibcs2/ibcs2_xenix_sysent.c
==============================================================================
--- head/sys/i386/ibcs2/ibcs2_xenix_sysent.c	Fri May  8 20:08:43 2009	(r191920)
+++ head/sys/i386/ibcs2/ibcs2_xenix_sysent.c	Fri May  8 20:16:04 2009	(r191921)
@@ -3,10 +3,9 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: src/sys/i386/ibcs2/syscalls.xenix,v 1.14 2006/07/28 19:05:27 jhb Exp 
+ * created from FreeBSD: head/sys/i386/ibcs2/syscalls.xenix 160798 2006-07-28 19:05:28Z jhb 
  */
 
-#include 
 #include 
 #include 
 #include 

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 22:20:45 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EAC891065675;
	Fri,  8 May 2009 22:20:45 +0000 (UTC)
	(envelope-from davidch@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D94608FC1A;
	Fri,  8 May 2009 22:20:45 +0000 (UTC)
	(envelope-from davidch@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n48MKjZq004013;
	Fri, 8 May 2009 22:20:45 GMT (envelope-from davidch@svn.freebsd.org)
Received: (from davidch@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n48MKjnl004011;
	Fri, 8 May 2009 22:20:45 GMT (envelope-from davidch@svn.freebsd.org)
Message-Id: <200905082220.n48MKjnl004011@svn.freebsd.org>
From: David Christensen 
Date: Fri, 8 May 2009 22:20:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191923 - head/sys/dev/bce
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 22:20:46 -0000

Author: davidch
Date: Fri May  8 22:20:45 2009
New Revision: 191923
URL: http://svn.freebsd.org/changeset/base/191923

Log:
  - Fixed incorrect packet length problem caused be earlier change to
    support ZERO_COPY_SOCKETS.
  - Created #define for context initialization retry count.
  
  MFC after:	1 week

Modified:
  head/sys/dev/bce/if_bce.c
  head/sys/dev/bce/if_bcereg.h

Modified: head/sys/dev/bce/if_bce.c
==============================================================================
--- head/sys/dev/bce/if_bce.c	Fri May  8 20:48:06 2009	(r191922)
+++ head/sys/dev/bce/if_bce.c	Fri May  8 22:20:45 2009	(r191923)
@@ -4204,8 +4204,7 @@ bce_init_ctx(struct bce_softc *sc)
 
 	if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) ||
 		(BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) {
-		/* DRC: Replace this constant value with a #define. */
-		int i, retry_cnt = 10;
+		int i, retry_cnt = CTX_INIT_RETRY_COUNT;
 		u32 val;
 
 		DBPRINT(sc, BCE_INFO_CTX, "Initializing 5709 context.\n");
@@ -5895,6 +5894,9 @@ bce_rx_intr(struct bce_softc *sc)
 			/* Set the total packet length. */
 			m0->m_pkthdr.len = m0->m_len = pkt_len;
 		}
+#else
+        /* Set the total packet length. */
+		m0->m_pkthdr.len = m0->m_len = pkt_len;
 #endif
 
 		/* Remove the trailing Ethernet FCS. */

Modified: head/sys/dev/bce/if_bcereg.h
==============================================================================
--- head/sys/dev/bce/if_bcereg.h	Fri May  8 20:48:06 2009	(r191922)
+++ head/sys/dev/bce/if_bcereg.h	Fri May  8 22:20:45 2009	(r191923)
@@ -6232,6 +6232,8 @@ struct l2_fhdr {
 
 #endif /* ZERO_COPY_SOCKETS */
 
+#define CTX_INIT_RETRY_COUNT        10
+
 /* Context size. */
 #define CTX_SHIFT                   7
 #define CTX_SIZE                    (1 << CTX_SHIFT)

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 23:34:18 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 694E9106564A;
	Fri,  8 May 2009 23:34:18 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 57EA98FC13;
	Fri,  8 May 2009 23:34:18 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n48NYIZx005550;
	Fri, 8 May 2009 23:34:18 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n48NYIwC005549;
	Fri, 8 May 2009 23:34:18 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <200905082334.n48NYIwC005549@svn.freebsd.org>
From: Xin LI 
Date: Fri, 8 May 2009 23:34:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-svnadmin@freebsd.org
X-SVN-Group: svnadmin
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191924 - svnadmin/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 23:34:18 -0000

Author: delphij
Date: Fri May  8 23:34:17 2009
New Revision: 191924
URL: http://svn.freebsd.org/changeset/base/191924

Log:
  Add less.  While I'm there sort the list.

Modified:
  svnadmin/conf/paths

Modified: svnadmin/conf/paths
==============================================================================
--- svnadmin/conf/paths	Fri May  8 22:20:45 2009	(r191923)
+++ svnadmin/conf/paths	Fri May  8 23:34:17 2009	(r191924)
@@ -44,14 +44,22 @@
 # misc.
 ^ROADMAP.txt
 
-^vendor/cpio
+^vendor-crypto/openssh
+^vendor-crypto/openssl
+
+^vendor-sys/ath
+^vendor-sys/pf
+
 ^vendor/bind9
-^vendor/bsnmp
 ^vendor/binutils
+^vendor/bsnmp
+^vendor/cpio
 ^vendor/file
 ^vendor/gdb
 ^vendor/gdtoa
+^vendor/less
 ^vendor/libbegemot
+^vendor/libpcap
 ^vendor/ncurses
 ^vendor/netcat
 ^vendor/ntp
@@ -60,14 +68,10 @@
 ^vendor/pf
 ^vendor/resolver
 ^vendor/sendmail
+^vendor/tcpdump
 ^vendor/tcsh
 ^vendor/top
 ^vendor/tzcode
 ^vendor/tzdata
 ^vendor/wpa
-^vendor-crypto/openssh
-^vendor-crypto/openssl
-^vendor-sys/pf
-^vendor-sys/ath
-^vendor/tcpdump
-^vendor/libpcap
+

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 23:34:37 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0462F106564A;
	Fri,  8 May 2009 23:34:37 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E050E8FC13;
	Fri,  8 May 2009 23:34:36 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n48NYato005598;
	Fri, 8 May 2009 23:34:36 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n48NYa0M005588;
	Fri, 8 May 2009 23:34:36 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <200905082334.n48NYa0M005588@svn.freebsd.org>
From: Xin LI 
Date: Fri, 8 May 2009 23:34:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191925 - in vendor/less: dist dist/contrib v354
	v354/contrib v358 v358/contrib v371 v371/contrib v381
	v381/contrib v394 v394/contrib v403 v403/contrib v406
	v406/contrib v408 v408/contr...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 23:34:37 -0000

Author: delphij
Date: Fri May  8 23:34:35 2009
New Revision: 191925
URL: http://svn.freebsd.org/changeset/base/191925

Log:
  Flatten all tags of the dist tree of less.

Added:
  vendor/less/dist/COPYING
     - copied unchanged from r191923, vendor/less/dist/contrib/less/COPYING
  vendor/less/dist/INSTALL
     - copied unchanged from r191923, vendor/less/dist/contrib/less/INSTALL
  vendor/less/dist/LICENSE
     - copied unchanged from r191923, vendor/less/dist/contrib/less/LICENSE
  vendor/less/dist/Makefile.aut
     - copied unchanged from r191923, vendor/less/dist/contrib/less/Makefile.aut
  vendor/less/dist/Makefile.dsb
     - copied unchanged from r191923, vendor/less/dist/contrib/less/Makefile.dsb
  vendor/less/dist/Makefile.dsg
     - copied unchanged from r191923, vendor/less/dist/contrib/less/Makefile.dsg
  vendor/less/dist/Makefile.dsu
     - copied unchanged from r191923, vendor/less/dist/contrib/less/Makefile.dsu
  vendor/less/dist/Makefile.in
     - copied unchanged from r191923, vendor/less/dist/contrib/less/Makefile.in
  vendor/less/dist/Makefile.o2e
     - copied unchanged from r191923, vendor/less/dist/contrib/less/Makefile.o2e
  vendor/less/dist/Makefile.o9c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/Makefile.o9c
  vendor/less/dist/Makefile.o9u
     - copied unchanged from r191923, vendor/less/dist/contrib/less/Makefile.o9u
  vendor/less/dist/Makefile.wnb
     - copied unchanged from r191923, vendor/less/dist/contrib/less/Makefile.wnb
  vendor/less/dist/Makefile.wnm
     - copied unchanged from r191923, vendor/less/dist/contrib/less/Makefile.wnm
  vendor/less/dist/NEWS
     - copied unchanged from r191923, vendor/less/dist/contrib/less/NEWS
  vendor/less/dist/README
     - copied unchanged from r191923, vendor/less/dist/contrib/less/README
  vendor/less/dist/brac.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/brac.c
  vendor/less/dist/ch.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/ch.c
  vendor/less/dist/charset.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/charset.c
  vendor/less/dist/charset.h
     - copied unchanged from r191923, vendor/less/dist/contrib/less/charset.h
  vendor/less/dist/cmd.h
     - copied unchanged from r191923, vendor/less/dist/contrib/less/cmd.h
  vendor/less/dist/cmdbuf.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/cmdbuf.c
  vendor/less/dist/command.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/command.c
  vendor/less/dist/configure
     - copied unchanged from r191923, vendor/less/dist/contrib/less/configure
  vendor/less/dist/configure.ac
     - copied unchanged from r191923, vendor/less/dist/contrib/less/configure.ac
  vendor/less/dist/decode.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/decode.c
  vendor/less/dist/defines.ds
     - copied unchanged from r191923, vendor/less/dist/contrib/less/defines.ds
  vendor/less/dist/defines.h.in
     - copied unchanged from r191923, vendor/less/dist/contrib/less/defines.h.in
  vendor/less/dist/defines.o2
     - copied unchanged from r191923, vendor/less/dist/contrib/less/defines.o2
  vendor/less/dist/defines.o9
     - copied unchanged from r191923, vendor/less/dist/contrib/less/defines.o9
  vendor/less/dist/defines.wn
     - copied unchanged from r191923, vendor/less/dist/contrib/less/defines.wn
  vendor/less/dist/edit.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/edit.c
  vendor/less/dist/filename.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/filename.c
  vendor/less/dist/forwback.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/forwback.c
  vendor/less/dist/funcs.h
     - copied unchanged from r191923, vendor/less/dist/contrib/less/funcs.h
  vendor/less/dist/help.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/help.c
  vendor/less/dist/ifile.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/ifile.c
  vendor/less/dist/input.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/input.c
  vendor/less/dist/install.sh
     - copied unchanged from r191923, vendor/less/dist/contrib/less/install.sh
  vendor/less/dist/jump.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/jump.c
  vendor/less/dist/less.h
     - copied unchanged from r191923, vendor/less/dist/contrib/less/less.h
  vendor/less/dist/less.hlp
     - copied unchanged from r191923, vendor/less/dist/contrib/less/less.hlp
  vendor/less/dist/less.man
     - copied unchanged from r191923, vendor/less/dist/contrib/less/less.man
  vendor/less/dist/less.nro
     - copied unchanged from r191923, vendor/less/dist/contrib/less/less.nro
  vendor/less/dist/lessecho.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/lessecho.c
  vendor/less/dist/lessecho.man
     - copied unchanged from r191923, vendor/less/dist/contrib/less/lessecho.man
  vendor/less/dist/lessecho.nro
     - copied unchanged from r191923, vendor/less/dist/contrib/less/lessecho.nro
  vendor/less/dist/lesskey.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/lesskey.c
  vendor/less/dist/lesskey.h
     - copied unchanged from r191923, vendor/less/dist/contrib/less/lesskey.h
  vendor/less/dist/lesskey.man
     - copied unchanged from r191923, vendor/less/dist/contrib/less/lesskey.man
  vendor/less/dist/lesskey.nro
     - copied unchanged from r191923, vendor/less/dist/contrib/less/lesskey.nro
  vendor/less/dist/lglob.h
     - copied unchanged from r191923, vendor/less/dist/contrib/less/lglob.h
  vendor/less/dist/line.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/line.c
  vendor/less/dist/linenum.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/linenum.c
  vendor/less/dist/lsystem.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/lsystem.c
  vendor/less/dist/main.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/main.c
  vendor/less/dist/mark.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/mark.c
  vendor/less/dist/mkfuncs.awk
     - copied unchanged from r191923, vendor/less/dist/contrib/less/mkfuncs.awk
  vendor/less/dist/mkhelp.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/mkhelp.c
  vendor/less/dist/mkinstalldirs
     - copied unchanged from r191923, vendor/less/dist/contrib/less/mkinstalldirs
  vendor/less/dist/optfunc.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/optfunc.c
  vendor/less/dist/option.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/option.c
  vendor/less/dist/option.h
     - copied unchanged from r191923, vendor/less/dist/contrib/less/option.h
  vendor/less/dist/opttbl.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/opttbl.c
  vendor/less/dist/os.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/os.c
  vendor/less/dist/output.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/output.c
  vendor/less/dist/pckeys.h
     - copied unchanged from r191923, vendor/less/dist/contrib/less/pckeys.h
  vendor/less/dist/position.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/position.c
  vendor/less/dist/position.h
     - copied unchanged from r191923, vendor/less/dist/contrib/less/position.h
  vendor/less/dist/prompt.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/prompt.c
  vendor/less/dist/regexp.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/regexp.c
  vendor/less/dist/regexp.h
     - copied unchanged from r191923, vendor/less/dist/contrib/less/regexp.h
  vendor/less/dist/screen.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/screen.c
  vendor/less/dist/scrsize.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/scrsize.c
  vendor/less/dist/search.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/search.c
  vendor/less/dist/signal.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/signal.c
  vendor/less/dist/tags.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/tags.c
  vendor/less/dist/ttyin.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/ttyin.c
  vendor/less/dist/version.c
     - copied unchanged from r191923, vendor/less/dist/contrib/less/version.c
  vendor/less/v354/COPYING
     - copied unchanged from r191923, vendor/less/v354/contrib/less/COPYING
  vendor/less/v354/INSTALL
     - copied unchanged from r191923, vendor/less/v354/contrib/less/INSTALL
  vendor/less/v354/LICENSE
     - copied unchanged from r191923, vendor/less/v354/contrib/less/LICENSE
  vendor/less/v354/Makefile.aut
     - copied unchanged from r191923, vendor/less/v354/contrib/less/Makefile.aut
  vendor/less/v354/Makefile.dsb
     - copied unchanged from r191923, vendor/less/v354/contrib/less/Makefile.dsb
  vendor/less/v354/Makefile.dsg
     - copied unchanged from r191923, vendor/less/v354/contrib/less/Makefile.dsg
  vendor/less/v354/Makefile.dsm
     - copied unchanged from r191923, vendor/less/v354/contrib/less/Makefile.dsm
  vendor/less/v354/Makefile.in
     - copied unchanged from r191923, vendor/less/v354/contrib/less/Makefile.in
  vendor/less/v354/Makefile.o2e
     - copied unchanged from r191923, vendor/less/v354/contrib/less/Makefile.o2e
  vendor/less/v354/Makefile.o9c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/Makefile.o9c
  vendor/less/v354/Makefile.o9u
     - copied unchanged from r191923, vendor/less/v354/contrib/less/Makefile.o9u
  vendor/less/v354/Makefile.wnb
     - copied unchanged from r191923, vendor/less/v354/contrib/less/Makefile.wnb
  vendor/less/v354/Makefile.wnm
     - copied unchanged from r191923, vendor/less/v354/contrib/less/Makefile.wnm
  vendor/less/v354/NEWS
     - copied unchanged from r191923, vendor/less/v354/contrib/less/NEWS
  vendor/less/v354/README
     - copied unchanged from r191923, vendor/less/v354/contrib/less/README
  vendor/less/v354/acconfig.h
     - copied unchanged from r191923, vendor/less/v354/contrib/less/acconfig.h
  vendor/less/v354/brac.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/brac.c
  vendor/less/v354/ch.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/ch.c
  vendor/less/v354/charset.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/charset.c
  vendor/less/v354/cmd.h
     - copied unchanged from r191923, vendor/less/v354/contrib/less/cmd.h
  vendor/less/v354/cmdbuf.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/cmdbuf.c
  vendor/less/v354/command.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/command.c
  vendor/less/v354/configure
     - copied unchanged from r191923, vendor/less/v354/contrib/less/configure
  vendor/less/v354/configure.in
     - copied unchanged from r191923, vendor/less/v354/contrib/less/configure.in
  vendor/less/v354/decode.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/decode.c
  vendor/less/v354/defines.ds
     - copied unchanged from r191923, vendor/less/v354/contrib/less/defines.ds
  vendor/less/v354/defines.h.in
     - copied unchanged from r191923, vendor/less/v354/contrib/less/defines.h.in
  vendor/less/v354/defines.h.top
     - copied unchanged from r191923, vendor/less/v354/contrib/less/defines.h.top
  vendor/less/v354/defines.o2
     - copied unchanged from r191923, vendor/less/v354/contrib/less/defines.o2
  vendor/less/v354/defines.o9
     - copied unchanged from r191923, vendor/less/v354/contrib/less/defines.o9
  vendor/less/v354/defines.wn
     - copied unchanged from r191923, vendor/less/v354/contrib/less/defines.wn
  vendor/less/v354/edit.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/edit.c
  vendor/less/v354/filename.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/filename.c
  vendor/less/v354/forwback.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/forwback.c
  vendor/less/v354/funcs.h
     - copied unchanged from r191923, vendor/less/v354/contrib/less/funcs.h
  vendor/less/v354/help.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/help.c
  vendor/less/v354/ifile.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/ifile.c
  vendor/less/v354/input.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/input.c
  vendor/less/v354/install.sh
     - copied unchanged from r191923, vendor/less/v354/contrib/less/install.sh
  vendor/less/v354/jump.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/jump.c
  vendor/less/v354/less.h
     - copied unchanged from r191923, vendor/less/v354/contrib/less/less.h
  vendor/less/v354/less.hlp
     - copied unchanged from r191923, vendor/less/v354/contrib/less/less.hlp
  vendor/less/v354/less.man
     - copied unchanged from r191923, vendor/less/v354/contrib/less/less.man
  vendor/less/v354/less.nro
     - copied unchanged from r191923, vendor/less/v354/contrib/less/less.nro
  vendor/less/v354/lessecho.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/lessecho.c
  vendor/less/v354/lesskey.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/lesskey.c
  vendor/less/v354/lesskey.h
     - copied unchanged from r191923, vendor/less/v354/contrib/less/lesskey.h
  vendor/less/v354/lesskey.man
     - copied unchanged from r191923, vendor/less/v354/contrib/less/lesskey.man
  vendor/less/v354/lesskey.nro
     - copied unchanged from r191923, vendor/less/v354/contrib/less/lesskey.nro
  vendor/less/v354/lglob.h
     - copied unchanged from r191923, vendor/less/v354/contrib/less/lglob.h
  vendor/less/v354/line.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/line.c
  vendor/less/v354/linenum.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/linenum.c
  vendor/less/v354/lsystem.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/lsystem.c
  vendor/less/v354/main.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/main.c
  vendor/less/v354/mark.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/mark.c
  vendor/less/v354/mkfuncs.awk
     - copied unchanged from r191923, vendor/less/v354/contrib/less/mkfuncs.awk
  vendor/less/v354/mkhelp.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/mkhelp.c
  vendor/less/v354/mkinstalldirs
     - copied unchanged from r191923, vendor/less/v354/contrib/less/mkinstalldirs
  vendor/less/v354/optfunc.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/optfunc.c
  vendor/less/v354/option.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/option.c
  vendor/less/v354/option.h
     - copied unchanged from r191923, vendor/less/v354/contrib/less/option.h
  vendor/less/v354/opttbl.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/opttbl.c
  vendor/less/v354/os.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/os.c
  vendor/less/v354/output.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/output.c
  vendor/less/v354/pckeys.h
     - copied unchanged from r191923, vendor/less/v354/contrib/less/pckeys.h
  vendor/less/v354/position.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/position.c
  vendor/less/v354/position.h
     - copied unchanged from r191923, vendor/less/v354/contrib/less/position.h
  vendor/less/v354/prompt.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/prompt.c
  vendor/less/v354/regexp.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/regexp.c
  vendor/less/v354/regexp.h
     - copied unchanged from r191923, vendor/less/v354/contrib/less/regexp.h
  vendor/less/v354/screen.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/screen.c
  vendor/less/v354/search.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/search.c
  vendor/less/v354/signal.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/signal.c
  vendor/less/v354/tags.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/tags.c
  vendor/less/v354/ttyin.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/ttyin.c
  vendor/less/v354/version.c
     - copied unchanged from r191923, vendor/less/v354/contrib/less/version.c
  vendor/less/v358/COPYING
     - copied unchanged from r191923, vendor/less/v358/contrib/less/COPYING
  vendor/less/v358/INSTALL
     - copied unchanged from r191923, vendor/less/v358/contrib/less/INSTALL
  vendor/less/v358/LICENSE
     - copied unchanged from r191923, vendor/less/v358/contrib/less/LICENSE
  vendor/less/v358/Makefile.aut
     - copied unchanged from r191923, vendor/less/v358/contrib/less/Makefile.aut
  vendor/less/v358/Makefile.dsb
     - copied unchanged from r191923, vendor/less/v358/contrib/less/Makefile.dsb
  vendor/less/v358/Makefile.dsg
     - copied unchanged from r191923, vendor/less/v358/contrib/less/Makefile.dsg
  vendor/less/v358/Makefile.dsu
     - copied unchanged from r191923, vendor/less/v358/contrib/less/Makefile.dsu
  vendor/less/v358/Makefile.in
     - copied unchanged from r191923, vendor/less/v358/contrib/less/Makefile.in
  vendor/less/v358/Makefile.o2e
     - copied unchanged from r191923, vendor/less/v358/contrib/less/Makefile.o2e
  vendor/less/v358/Makefile.o9c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/Makefile.o9c
  vendor/less/v358/Makefile.o9u
     - copied unchanged from r191923, vendor/less/v358/contrib/less/Makefile.o9u
  vendor/less/v358/Makefile.wnb
     - copied unchanged from r191923, vendor/less/v358/contrib/less/Makefile.wnb
  vendor/less/v358/Makefile.wnm
     - copied unchanged from r191923, vendor/less/v358/contrib/less/Makefile.wnm
  vendor/less/v358/NEWS
     - copied unchanged from r191923, vendor/less/v358/contrib/less/NEWS
  vendor/less/v358/README
     - copied unchanged from r191923, vendor/less/v358/contrib/less/README
  vendor/less/v358/acconfig.h
     - copied unchanged from r191923, vendor/less/v358/contrib/less/acconfig.h
  vendor/less/v358/brac.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/brac.c
  vendor/less/v358/ch.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/ch.c
  vendor/less/v358/charset.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/charset.c
  vendor/less/v358/cmd.h
     - copied unchanged from r191923, vendor/less/v358/contrib/less/cmd.h
  vendor/less/v358/cmdbuf.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/cmdbuf.c
  vendor/less/v358/command.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/command.c
  vendor/less/v358/configure
     - copied unchanged from r191923, vendor/less/v358/contrib/less/configure
  vendor/less/v358/configure.in
     - copied unchanged from r191923, vendor/less/v358/contrib/less/configure.in
  vendor/less/v358/decode.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/decode.c
  vendor/less/v358/defines.ds
     - copied unchanged from r191923, vendor/less/v358/contrib/less/defines.ds
  vendor/less/v358/defines.h.in
     - copied unchanged from r191923, vendor/less/v358/contrib/less/defines.h.in
  vendor/less/v358/defines.h.top
     - copied unchanged from r191923, vendor/less/v358/contrib/less/defines.h.top
  vendor/less/v358/defines.o2
     - copied unchanged from r191923, vendor/less/v358/contrib/less/defines.o2
  vendor/less/v358/defines.o9
     - copied unchanged from r191923, vendor/less/v358/contrib/less/defines.o9
  vendor/less/v358/defines.wn
     - copied unchanged from r191923, vendor/less/v358/contrib/less/defines.wn
  vendor/less/v358/edit.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/edit.c
  vendor/less/v358/filename.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/filename.c
  vendor/less/v358/forwback.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/forwback.c
  vendor/less/v358/funcs.h
     - copied unchanged from r191923, vendor/less/v358/contrib/less/funcs.h
  vendor/less/v358/help.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/help.c
  vendor/less/v358/ifile.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/ifile.c
  vendor/less/v358/input.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/input.c
  vendor/less/v358/install.sh
     - copied unchanged from r191923, vendor/less/v358/contrib/less/install.sh
  vendor/less/v358/jump.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/jump.c
  vendor/less/v358/less.h
     - copied unchanged from r191923, vendor/less/v358/contrib/less/less.h
  vendor/less/v358/less.hlp
     - copied unchanged from r191923, vendor/less/v358/contrib/less/less.hlp
  vendor/less/v358/less.man
     - copied unchanged from r191923, vendor/less/v358/contrib/less/less.man
  vendor/less/v358/less.nro
     - copied unchanged from r191923, vendor/less/v358/contrib/less/less.nro
  vendor/less/v358/lessecho.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/lessecho.c
  vendor/less/v358/lesskey.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/lesskey.c
  vendor/less/v358/lesskey.h
     - copied unchanged from r191923, vendor/less/v358/contrib/less/lesskey.h
  vendor/less/v358/lesskey.man
     - copied unchanged from r191923, vendor/less/v358/contrib/less/lesskey.man
  vendor/less/v358/lesskey.nro
     - copied unchanged from r191923, vendor/less/v358/contrib/less/lesskey.nro
  vendor/less/v358/lglob.h
     - copied unchanged from r191923, vendor/less/v358/contrib/less/lglob.h
  vendor/less/v358/line.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/line.c
  vendor/less/v358/linenum.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/linenum.c
  vendor/less/v358/lsystem.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/lsystem.c
  vendor/less/v358/main.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/main.c
  vendor/less/v358/mark.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/mark.c
  vendor/less/v358/mkfuncs.awk
     - copied unchanged from r191923, vendor/less/v358/contrib/less/mkfuncs.awk
  vendor/less/v358/mkhelp.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/mkhelp.c
  vendor/less/v358/mkinstalldirs
     - copied unchanged from r191923, vendor/less/v358/contrib/less/mkinstalldirs
  vendor/less/v358/optfunc.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/optfunc.c
  vendor/less/v358/option.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/option.c
  vendor/less/v358/option.h
     - copied unchanged from r191923, vendor/less/v358/contrib/less/option.h
  vendor/less/v358/opttbl.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/opttbl.c
  vendor/less/v358/os.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/os.c
  vendor/less/v358/output.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/output.c
  vendor/less/v358/pckeys.h
     - copied unchanged from r191923, vendor/less/v358/contrib/less/pckeys.h
  vendor/less/v358/position.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/position.c
  vendor/less/v358/position.h
     - copied unchanged from r191923, vendor/less/v358/contrib/less/position.h
  vendor/less/v358/prompt.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/prompt.c
  vendor/less/v358/regexp.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/regexp.c
  vendor/less/v358/regexp.h
     - copied unchanged from r191923, vendor/less/v358/contrib/less/regexp.h
  vendor/less/v358/screen.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/screen.c
  vendor/less/v358/search.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/search.c
  vendor/less/v358/signal.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/signal.c
  vendor/less/v358/tags.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/tags.c
  vendor/less/v358/ttyin.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/ttyin.c
  vendor/less/v358/version.c
     - copied unchanged from r191923, vendor/less/v358/contrib/less/version.c
  vendor/less/v371/COPYING
     - copied unchanged from r191923, vendor/less/v371/contrib/less/COPYING
  vendor/less/v371/INSTALL
     - copied unchanged from r191923, vendor/less/v371/contrib/less/INSTALL
  vendor/less/v371/LICENSE
     - copied unchanged from r191923, vendor/less/v371/contrib/less/LICENSE
  vendor/less/v371/Makefile.aut
     - copied unchanged from r191923, vendor/less/v371/contrib/less/Makefile.aut
  vendor/less/v371/Makefile.dsb
     - copied unchanged from r191923, vendor/less/v371/contrib/less/Makefile.dsb
  vendor/less/v371/Makefile.dsg
     - copied unchanged from r191923, vendor/less/v371/contrib/less/Makefile.dsg
  vendor/less/v371/Makefile.dsu
     - copied unchanged from r191923, vendor/less/v371/contrib/less/Makefile.dsu
  vendor/less/v371/Makefile.in
     - copied unchanged from r191923, vendor/less/v371/contrib/less/Makefile.in
  vendor/less/v371/Makefile.o2e
     - copied unchanged from r191923, vendor/less/v371/contrib/less/Makefile.o2e
  vendor/less/v371/Makefile.o9c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/Makefile.o9c
  vendor/less/v371/Makefile.o9u
     - copied unchanged from r191923, vendor/less/v371/contrib/less/Makefile.o9u
  vendor/less/v371/Makefile.wnb
     - copied unchanged from r191923, vendor/less/v371/contrib/less/Makefile.wnb
  vendor/less/v371/Makefile.wnm
     - copied unchanged from r191923, vendor/less/v371/contrib/less/Makefile.wnm
  vendor/less/v371/NEWS
     - copied unchanged from r191923, vendor/less/v371/contrib/less/NEWS
  vendor/less/v371/README
     - copied unchanged from r191923, vendor/less/v371/contrib/less/README
  vendor/less/v371/acconfig.h
     - copied unchanged from r191923, vendor/less/v371/contrib/less/acconfig.h
  vendor/less/v371/brac.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/brac.c
  vendor/less/v371/ch.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/ch.c
  vendor/less/v371/charset.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/charset.c
  vendor/less/v371/cmd.h
     - copied unchanged from r191923, vendor/less/v371/contrib/less/cmd.h
  vendor/less/v371/cmdbuf.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/cmdbuf.c
  vendor/less/v371/command.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/command.c
  vendor/less/v371/configure
     - copied unchanged from r191923, vendor/less/v371/contrib/less/configure
  vendor/less/v371/configure.in
     - copied unchanged from r191923, vendor/less/v371/contrib/less/configure.in
  vendor/less/v371/decode.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/decode.c
  vendor/less/v371/defines.ds
     - copied unchanged from r191923, vendor/less/v371/contrib/less/defines.ds
  vendor/less/v371/defines.h.in
     - copied unchanged from r191923, vendor/less/v371/contrib/less/defines.h.in
  vendor/less/v371/defines.h.top
     - copied unchanged from r191923, vendor/less/v371/contrib/less/defines.h.top
  vendor/less/v371/defines.o2
     - copied unchanged from r191923, vendor/less/v371/contrib/less/defines.o2
  vendor/less/v371/defines.o9
     - copied unchanged from r191923, vendor/less/v371/contrib/less/defines.o9
  vendor/less/v371/defines.wn
     - copied unchanged from r191923, vendor/less/v371/contrib/less/defines.wn
  vendor/less/v371/edit.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/edit.c
  vendor/less/v371/filename.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/filename.c
  vendor/less/v371/forwback.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/forwback.c
  vendor/less/v371/funcs.h
     - copied unchanged from r191923, vendor/less/v371/contrib/less/funcs.h
  vendor/less/v371/help.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/help.c
  vendor/less/v371/ifile.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/ifile.c
  vendor/less/v371/input.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/input.c
  vendor/less/v371/install.sh
     - copied unchanged from r191923, vendor/less/v371/contrib/less/install.sh
  vendor/less/v371/jump.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/jump.c
  vendor/less/v371/less.h
     - copied unchanged from r191923, vendor/less/v371/contrib/less/less.h
  vendor/less/v371/less.hlp
     - copied unchanged from r191923, vendor/less/v371/contrib/less/less.hlp
  vendor/less/v371/less.man
     - copied unchanged from r191923, vendor/less/v371/contrib/less/less.man
  vendor/less/v371/less.nro
     - copied unchanged from r191923, vendor/less/v371/contrib/less/less.nro
  vendor/less/v371/lessecho.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/lessecho.c
  vendor/less/v371/lesskey.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/lesskey.c
  vendor/less/v371/lesskey.h
     - copied unchanged from r191923, vendor/less/v371/contrib/less/lesskey.h
  vendor/less/v371/lesskey.man
     - copied unchanged from r191923, vendor/less/v371/contrib/less/lesskey.man
  vendor/less/v371/lesskey.nro
     - copied unchanged from r191923, vendor/less/v371/contrib/less/lesskey.nro
  vendor/less/v371/lglob.h
     - copied unchanged from r191923, vendor/less/v371/contrib/less/lglob.h
  vendor/less/v371/line.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/line.c
  vendor/less/v371/linenum.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/linenum.c
  vendor/less/v371/lsystem.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/lsystem.c
  vendor/less/v371/main.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/main.c
  vendor/less/v371/mark.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/mark.c
  vendor/less/v371/mkfuncs.awk
     - copied unchanged from r191923, vendor/less/v371/contrib/less/mkfuncs.awk
  vendor/less/v371/mkhelp.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/mkhelp.c
  vendor/less/v371/mkinstalldirs
     - copied unchanged from r191923, vendor/less/v371/contrib/less/mkinstalldirs
  vendor/less/v371/optfunc.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/optfunc.c
  vendor/less/v371/option.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/option.c
  vendor/less/v371/option.h
     - copied unchanged from r191923, vendor/less/v371/contrib/less/option.h
  vendor/less/v371/opttbl.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/opttbl.c
  vendor/less/v371/os.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/os.c
  vendor/less/v371/output.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/output.c
  vendor/less/v371/pckeys.h
     - copied unchanged from r191923, vendor/less/v371/contrib/less/pckeys.h
  vendor/less/v371/position.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/position.c
  vendor/less/v371/position.h
     - copied unchanged from r191923, vendor/less/v371/contrib/less/position.h
  vendor/less/v371/prompt.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/prompt.c
  vendor/less/v371/regexp.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/regexp.c
  vendor/less/v371/regexp.h
     - copied unchanged from r191923, vendor/less/v371/contrib/less/regexp.h
  vendor/less/v371/screen.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/screen.c
  vendor/less/v371/scrsize.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/scrsize.c
  vendor/less/v371/search.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/search.c
  vendor/less/v371/signal.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/signal.c
  vendor/less/v371/tags.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/tags.c
  vendor/less/v371/ttyin.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/ttyin.c
  vendor/less/v371/version.c
     - copied unchanged from r191923, vendor/less/v371/contrib/less/version.c
  vendor/less/v381/COPYING
     - copied unchanged from r191923, vendor/less/v381/contrib/less/COPYING
  vendor/less/v381/INSTALL
     - copied unchanged from r191923, vendor/less/v381/contrib/less/INSTALL
  vendor/less/v381/LICENSE
     - copied unchanged from r191923, vendor/less/v381/contrib/less/LICENSE
  vendor/less/v381/Makefile.aut
     - copied unchanged from r191923, vendor/less/v381/contrib/less/Makefile.aut
  vendor/less/v381/Makefile.dsb
     - copied unchanged from r191923, vendor/less/v381/contrib/less/Makefile.dsb
  vendor/less/v381/Makefile.dsg
     - copied unchanged from r191923, vendor/less/v381/contrib/less/Makefile.dsg
  vendor/less/v381/Makefile.dsu
     - copied unchanged from r191923, vendor/less/v381/contrib/less/Makefile.dsu
  vendor/less/v381/Makefile.in
     - copied unchanged from r191923, vendor/less/v381/contrib/less/Makefile.in
  vendor/less/v381/Makefile.o2e
     - copied unchanged from r191923, vendor/less/v381/contrib/less/Makefile.o2e
  vendor/less/v381/Makefile.o9c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/Makefile.o9c
  vendor/less/v381/Makefile.o9u
     - copied unchanged from r191923, vendor/less/v381/contrib/less/Makefile.o9u
  vendor/less/v381/Makefile.wnb
     - copied unchanged from r191923, vendor/less/v381/contrib/less/Makefile.wnb
  vendor/less/v381/Makefile.wnm
     - copied unchanged from r191923, vendor/less/v381/contrib/less/Makefile.wnm
  vendor/less/v381/NEWS
     - copied unchanged from r191923, vendor/less/v381/contrib/less/NEWS
  vendor/less/v381/README
     - copied unchanged from r191923, vendor/less/v381/contrib/less/README
  vendor/less/v381/brac.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/brac.c
  vendor/less/v381/ch.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/ch.c
  vendor/less/v381/charset.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/charset.c
  vendor/less/v381/cmd.h
     - copied unchanged from r191923, vendor/less/v381/contrib/less/cmd.h
  vendor/less/v381/cmdbuf.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/cmdbuf.c
  vendor/less/v381/command.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/command.c
  vendor/less/v381/configure
     - copied unchanged from r191923, vendor/less/v381/contrib/less/configure
  vendor/less/v381/configure.ac
     - copied unchanged from r191923, vendor/less/v381/contrib/less/configure.ac
  vendor/less/v381/decode.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/decode.c
  vendor/less/v381/defines.ds
     - copied unchanged from r191923, vendor/less/v381/contrib/less/defines.ds
  vendor/less/v381/defines.h.in
     - copied unchanged from r191923, vendor/less/v381/contrib/less/defines.h.in
  vendor/less/v381/defines.o2
     - copied unchanged from r191923, vendor/less/v381/contrib/less/defines.o2
  vendor/less/v381/defines.o9
     - copied unchanged from r191923, vendor/less/v381/contrib/less/defines.o9
  vendor/less/v381/defines.wn
     - copied unchanged from r191923, vendor/less/v381/contrib/less/defines.wn
  vendor/less/v381/edit.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/edit.c
  vendor/less/v381/filename.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/filename.c
  vendor/less/v381/forwback.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/forwback.c
  vendor/less/v381/funcs.h
     - copied unchanged from r191923, vendor/less/v381/contrib/less/funcs.h
  vendor/less/v381/help.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/help.c
  vendor/less/v381/ifile.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/ifile.c
  vendor/less/v381/input.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/input.c
  vendor/less/v381/install.sh
     - copied unchanged from r191923, vendor/less/v381/contrib/less/install.sh
  vendor/less/v381/jump.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/jump.c
  vendor/less/v381/less.h
     - copied unchanged from r191923, vendor/less/v381/contrib/less/less.h
  vendor/less/v381/less.hlp
     - copied unchanged from r191923, vendor/less/v381/contrib/less/less.hlp
  vendor/less/v381/less.man
     - copied unchanged from r191923, vendor/less/v381/contrib/less/less.man
  vendor/less/v381/less.nro
     - copied unchanged from r191923, vendor/less/v381/contrib/less/less.nro
  vendor/less/v381/lessecho.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/lessecho.c
  vendor/less/v381/lesskey.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/lesskey.c
  vendor/less/v381/lesskey.h
     - copied unchanged from r191923, vendor/less/v381/contrib/less/lesskey.h
  vendor/less/v381/lesskey.man
     - copied unchanged from r191923, vendor/less/v381/contrib/less/lesskey.man
  vendor/less/v381/lesskey.nro
     - copied unchanged from r191923, vendor/less/v381/contrib/less/lesskey.nro
  vendor/less/v381/lglob.h
     - copied unchanged from r191923, vendor/less/v381/contrib/less/lglob.h
  vendor/less/v381/line.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/line.c
  vendor/less/v381/linenum.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/linenum.c
  vendor/less/v381/lsystem.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/lsystem.c
  vendor/less/v381/main.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/main.c
  vendor/less/v381/mark.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/mark.c
  vendor/less/v381/mkfuncs.awk
     - copied unchanged from r191923, vendor/less/v381/contrib/less/mkfuncs.awk
  vendor/less/v381/mkhelp.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/mkhelp.c
  vendor/less/v381/mkinstalldirs
     - copied unchanged from r191923, vendor/less/v381/contrib/less/mkinstalldirs
  vendor/less/v381/optfunc.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/optfunc.c
  vendor/less/v381/option.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/option.c
  vendor/less/v381/option.h
     - copied unchanged from r191923, vendor/less/v381/contrib/less/option.h
  vendor/less/v381/opttbl.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/opttbl.c
  vendor/less/v381/os.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/os.c
  vendor/less/v381/output.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/output.c
  vendor/less/v381/pckeys.h
     - copied unchanged from r191923, vendor/less/v381/contrib/less/pckeys.h
  vendor/less/v381/position.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/position.c
  vendor/less/v381/position.h
     - copied unchanged from r191923, vendor/less/v381/contrib/less/position.h
  vendor/less/v381/prompt.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/prompt.c
  vendor/less/v381/regexp.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/regexp.c
  vendor/less/v381/regexp.h
     - copied unchanged from r191923, vendor/less/v381/contrib/less/regexp.h
  vendor/less/v381/screen.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/screen.c
  vendor/less/v381/scrsize.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/scrsize.c
  vendor/less/v381/search.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/search.c
  vendor/less/v381/signal.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/signal.c
  vendor/less/v381/tags.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/tags.c
  vendor/less/v381/ttyin.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/ttyin.c
  vendor/less/v381/version.c
     - copied unchanged from r191923, vendor/less/v381/contrib/less/version.c
  vendor/less/v394/COPYING
     - copied unchanged from r191923, vendor/less/v394/contrib/less/COPYING
  vendor/less/v394/INSTALL
     - copied unchanged from r191923, vendor/less/v394/contrib/less/INSTALL
  vendor/less/v394/LICENSE
     - copied unchanged from r191923, vendor/less/v394/contrib/less/LICENSE
  vendor/less/v394/Makefile.aut
     - copied unchanged from r191923, vendor/less/v394/contrib/less/Makefile.aut
  vendor/less/v394/Makefile.dsb
     - copied unchanged from r191923, vendor/less/v394/contrib/less/Makefile.dsb
  vendor/less/v394/Makefile.dsg
     - copied unchanged from r191923, vendor/less/v394/contrib/less/Makefile.dsg
  vendor/less/v394/Makefile.dsu
     - copied unchanged from r191923, vendor/less/v394/contrib/less/Makefile.dsu
  vendor/less/v394/Makefile.in
     - copied unchanged from r191923, vendor/less/v394/contrib/less/Makefile.in
  vendor/less/v394/Makefile.o2e
     - copied unchanged from r191923, vendor/less/v394/contrib/less/Makefile.o2e
  vendor/less/v394/Makefile.o9c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/Makefile.o9c
  vendor/less/v394/Makefile.o9u
     - copied unchanged from r191923, vendor/less/v394/contrib/less/Makefile.o9u
  vendor/less/v394/Makefile.wnb
     - copied unchanged from r191923, vendor/less/v394/contrib/less/Makefile.wnb
  vendor/less/v394/Makefile.wnm
     - copied unchanged from r191923, vendor/less/v394/contrib/less/Makefile.wnm
  vendor/less/v394/NEWS
     - copied unchanged from r191923, vendor/less/v394/contrib/less/NEWS
  vendor/less/v394/README
     - copied unchanged from r191923, vendor/less/v394/contrib/less/README
  vendor/less/v394/brac.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/brac.c
  vendor/less/v394/ch.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/ch.c
  vendor/less/v394/charset.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/charset.c
  vendor/less/v394/charset.h
     - copied unchanged from r191923, vendor/less/v394/contrib/less/charset.h
  vendor/less/v394/cmd.h
     - copied unchanged from r191923, vendor/less/v394/contrib/less/cmd.h
  vendor/less/v394/cmdbuf.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/cmdbuf.c
  vendor/less/v394/command.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/command.c
  vendor/less/v394/configure
     - copied unchanged from r191923, vendor/less/v394/contrib/less/configure
  vendor/less/v394/configure.ac
     - copied unchanged from r191923, vendor/less/v394/contrib/less/configure.ac
  vendor/less/v394/decode.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/decode.c
  vendor/less/v394/defines.ds
     - copied unchanged from r191923, vendor/less/v394/contrib/less/defines.ds
  vendor/less/v394/defines.h.in
     - copied unchanged from r191923, vendor/less/v394/contrib/less/defines.h.in
  vendor/less/v394/defines.o2
     - copied unchanged from r191923, vendor/less/v394/contrib/less/defines.o2
  vendor/less/v394/defines.o9
     - copied unchanged from r191923, vendor/less/v394/contrib/less/defines.o9
  vendor/less/v394/defines.wn
     - copied unchanged from r191923, vendor/less/v394/contrib/less/defines.wn
  vendor/less/v394/edit.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/edit.c
  vendor/less/v394/filename.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/filename.c
  vendor/less/v394/forwback.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/forwback.c
  vendor/less/v394/funcs.h
     - copied unchanged from r191923, vendor/less/v394/contrib/less/funcs.h
  vendor/less/v394/help.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/help.c
  vendor/less/v394/ifile.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/ifile.c
  vendor/less/v394/input.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/input.c
  vendor/less/v394/install.sh
     - copied unchanged from r191923, vendor/less/v394/contrib/less/install.sh
  vendor/less/v394/jump.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/jump.c
  vendor/less/v394/less.h
     - copied unchanged from r191923, vendor/less/v394/contrib/less/less.h
  vendor/less/v394/less.hlp
     - copied unchanged from r191923, vendor/less/v394/contrib/less/less.hlp
  vendor/less/v394/less.man
     - copied unchanged from r191923, vendor/less/v394/contrib/less/less.man
  vendor/less/v394/less.nro
     - copied unchanged from r191923, vendor/less/v394/contrib/less/less.nro
  vendor/less/v394/lessecho.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/lessecho.c
  vendor/less/v394/lessecho.man
     - copied unchanged from r191923, vendor/less/v394/contrib/less/lessecho.man
  vendor/less/v394/lessecho.nro
     - copied unchanged from r191923, vendor/less/v394/contrib/less/lessecho.nro
  vendor/less/v394/lesskey.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/lesskey.c
  vendor/less/v394/lesskey.h
     - copied unchanged from r191923, vendor/less/v394/contrib/less/lesskey.h
  vendor/less/v394/lesskey.man
     - copied unchanged from r191923, vendor/less/v394/contrib/less/lesskey.man
  vendor/less/v394/lesskey.nro
     - copied unchanged from r191923, vendor/less/v394/contrib/less/lesskey.nro
  vendor/less/v394/lglob.h
     - copied unchanged from r191923, vendor/less/v394/contrib/less/lglob.h
  vendor/less/v394/line.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/line.c
  vendor/less/v394/linenum.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/linenum.c
  vendor/less/v394/lsystem.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/lsystem.c
  vendor/less/v394/main.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/main.c
  vendor/less/v394/mark.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/mark.c
  vendor/less/v394/mkfuncs.awk
     - copied unchanged from r191923, vendor/less/v394/contrib/less/mkfuncs.awk
  vendor/less/v394/mkhelp.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/mkhelp.c
  vendor/less/v394/mkinstalldirs
     - copied unchanged from r191923, vendor/less/v394/contrib/less/mkinstalldirs
  vendor/less/v394/optfunc.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/optfunc.c
  vendor/less/v394/option.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/option.c
  vendor/less/v394/option.h
     - copied unchanged from r191923, vendor/less/v394/contrib/less/option.h
  vendor/less/v394/opttbl.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/opttbl.c
  vendor/less/v394/os.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/os.c
  vendor/less/v394/output.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/output.c
  vendor/less/v394/pckeys.h
     - copied unchanged from r191923, vendor/less/v394/contrib/less/pckeys.h
  vendor/less/v394/position.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/position.c
  vendor/less/v394/position.h
     - copied unchanged from r191923, vendor/less/v394/contrib/less/position.h
  vendor/less/v394/prompt.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/prompt.c
  vendor/less/v394/regexp.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/regexp.c
  vendor/less/v394/regexp.h
     - copied unchanged from r191923, vendor/less/v394/contrib/less/regexp.h
  vendor/less/v394/screen.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/screen.c
  vendor/less/v394/scrsize.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/scrsize.c
  vendor/less/v394/search.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/search.c
  vendor/less/v394/signal.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/signal.c
  vendor/less/v394/tags.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/tags.c
  vendor/less/v394/ttyin.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/ttyin.c
  vendor/less/v394/version.c
     - copied unchanged from r191923, vendor/less/v394/contrib/less/version.c
  vendor/less/v403/COPYING
     - copied unchanged from r191923, vendor/less/v403/contrib/less/COPYING
  vendor/less/v403/INSTALL
     - copied unchanged from r191923, vendor/less/v403/contrib/less/INSTALL
  vendor/less/v403/LICENSE
     - copied unchanged from r191923, vendor/less/v403/contrib/less/LICENSE
  vendor/less/v403/Makefile.aut
     - copied unchanged from r191923, vendor/less/v403/contrib/less/Makefile.aut
  vendor/less/v403/Makefile.dsb
     - copied unchanged from r191923, vendor/less/v403/contrib/less/Makefile.dsb
  vendor/less/v403/Makefile.dsg
     - copied unchanged from r191923, vendor/less/v403/contrib/less/Makefile.dsg
  vendor/less/v403/Makefile.dsu
     - copied unchanged from r191923, vendor/less/v403/contrib/less/Makefile.dsu
  vendor/less/v403/Makefile.in
     - copied unchanged from r191923, vendor/less/v403/contrib/less/Makefile.in
  vendor/less/v403/Makefile.o2e
     - copied unchanged from r191923, vendor/less/v403/contrib/less/Makefile.o2e
  vendor/less/v403/Makefile.o9c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/Makefile.o9c
  vendor/less/v403/Makefile.o9u
     - copied unchanged from r191923, vendor/less/v403/contrib/less/Makefile.o9u
  vendor/less/v403/Makefile.wnb
     - copied unchanged from r191923, vendor/less/v403/contrib/less/Makefile.wnb
  vendor/less/v403/Makefile.wnm
     - copied unchanged from r191923, vendor/less/v403/contrib/less/Makefile.wnm
  vendor/less/v403/NEWS
     - copied unchanged from r191923, vendor/less/v403/contrib/less/NEWS
  vendor/less/v403/README
     - copied unchanged from r191923, vendor/less/v403/contrib/less/README
  vendor/less/v403/brac.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/brac.c
  vendor/less/v403/ch.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/ch.c
  vendor/less/v403/charset.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/charset.c
  vendor/less/v403/charset.h
     - copied unchanged from r191923, vendor/less/v403/contrib/less/charset.h
  vendor/less/v403/cmd.h
     - copied unchanged from r191923, vendor/less/v403/contrib/less/cmd.h
  vendor/less/v403/cmdbuf.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/cmdbuf.c
  vendor/less/v403/command.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/command.c
  vendor/less/v403/configure
     - copied unchanged from r191923, vendor/less/v403/contrib/less/configure
  vendor/less/v403/configure.ac
     - copied unchanged from r191923, vendor/less/v403/contrib/less/configure.ac
  vendor/less/v403/decode.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/decode.c
  vendor/less/v403/defines.ds
     - copied unchanged from r191923, vendor/less/v403/contrib/less/defines.ds
  vendor/less/v403/defines.h.in
     - copied unchanged from r191923, vendor/less/v403/contrib/less/defines.h.in
  vendor/less/v403/defines.o2
     - copied unchanged from r191923, vendor/less/v403/contrib/less/defines.o2
  vendor/less/v403/defines.o9
     - copied unchanged from r191923, vendor/less/v403/contrib/less/defines.o9
  vendor/less/v403/defines.wn
     - copied unchanged from r191923, vendor/less/v403/contrib/less/defines.wn
  vendor/less/v403/edit.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/edit.c
  vendor/less/v403/filename.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/filename.c
  vendor/less/v403/forwback.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/forwback.c
  vendor/less/v403/funcs.h
     - copied unchanged from r191923, vendor/less/v403/contrib/less/funcs.h
  vendor/less/v403/help.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/help.c
  vendor/less/v403/ifile.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/ifile.c
  vendor/less/v403/input.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/input.c
  vendor/less/v403/install.sh
     - copied unchanged from r191923, vendor/less/v403/contrib/less/install.sh
  vendor/less/v403/jump.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/jump.c
  vendor/less/v403/less.h
     - copied unchanged from r191923, vendor/less/v403/contrib/less/less.h
  vendor/less/v403/less.hlp
     - copied unchanged from r191923, vendor/less/v403/contrib/less/less.hlp
  vendor/less/v403/less.man
     - copied unchanged from r191923, vendor/less/v403/contrib/less/less.man
  vendor/less/v403/less.nro
     - copied unchanged from r191923, vendor/less/v403/contrib/less/less.nro
  vendor/less/v403/lessecho.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/lessecho.c
  vendor/less/v403/lessecho.man
     - copied unchanged from r191923, vendor/less/v403/contrib/less/lessecho.man
  vendor/less/v403/lessecho.nro
     - copied unchanged from r191923, vendor/less/v403/contrib/less/lessecho.nro
  vendor/less/v403/lesskey.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/lesskey.c
  vendor/less/v403/lesskey.h
     - copied unchanged from r191923, vendor/less/v403/contrib/less/lesskey.h
  vendor/less/v403/lesskey.man
     - copied unchanged from r191923, vendor/less/v403/contrib/less/lesskey.man
  vendor/less/v403/lesskey.nro
     - copied unchanged from r191923, vendor/less/v403/contrib/less/lesskey.nro
  vendor/less/v403/lglob.h
     - copied unchanged from r191923, vendor/less/v403/contrib/less/lglob.h
  vendor/less/v403/line.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/line.c
  vendor/less/v403/linenum.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/linenum.c
  vendor/less/v403/lsystem.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/lsystem.c
  vendor/less/v403/main.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/main.c
  vendor/less/v403/mark.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/mark.c
  vendor/less/v403/mkfuncs.awk
     - copied unchanged from r191923, vendor/less/v403/contrib/less/mkfuncs.awk
  vendor/less/v403/mkhelp.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/mkhelp.c
  vendor/less/v403/mkinstalldirs
     - copied unchanged from r191923, vendor/less/v403/contrib/less/mkinstalldirs
  vendor/less/v403/optfunc.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/optfunc.c
  vendor/less/v403/option.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/option.c
  vendor/less/v403/option.h
     - copied unchanged from r191923, vendor/less/v403/contrib/less/option.h
  vendor/less/v403/opttbl.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/opttbl.c
  vendor/less/v403/os.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/os.c
  vendor/less/v403/output.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/output.c
  vendor/less/v403/pckeys.h
     - copied unchanged from r191923, vendor/less/v403/contrib/less/pckeys.h
  vendor/less/v403/position.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/position.c
  vendor/less/v403/position.h
     - copied unchanged from r191923, vendor/less/v403/contrib/less/position.h
  vendor/less/v403/prompt.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/prompt.c
  vendor/less/v403/regexp.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/regexp.c
  vendor/less/v403/regexp.h
     - copied unchanged from r191923, vendor/less/v403/contrib/less/regexp.h
  vendor/less/v403/screen.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/screen.c
  vendor/less/v403/scrsize.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/scrsize.c
  vendor/less/v403/search.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/search.c
  vendor/less/v403/signal.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/signal.c
  vendor/less/v403/tags.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/tags.c
  vendor/less/v403/ttyin.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/ttyin.c
  vendor/less/v403/version.c
     - copied unchanged from r191923, vendor/less/v403/contrib/less/version.c
  vendor/less/v406/COPYING
     - copied unchanged from r191923, vendor/less/v406/contrib/less/COPYING
  vendor/less/v406/INSTALL
     - copied unchanged from r191923, vendor/less/v406/contrib/less/INSTALL
  vendor/less/v406/LICENSE
     - copied unchanged from r191923, vendor/less/v406/contrib/less/LICENSE
  vendor/less/v406/Makefile.aut
     - copied unchanged from r191923, vendor/less/v406/contrib/less/Makefile.aut
  vendor/less/v406/Makefile.dsb
     - copied unchanged from r191923, vendor/less/v406/contrib/less/Makefile.dsb
  vendor/less/v406/Makefile.dsg
     - copied unchanged from r191923, vendor/less/v406/contrib/less/Makefile.dsg
  vendor/less/v406/Makefile.dsu
     - copied unchanged from r191923, vendor/less/v406/contrib/less/Makefile.dsu
  vendor/less/v406/Makefile.in
     - copied unchanged from r191923, vendor/less/v406/contrib/less/Makefile.in
  vendor/less/v406/Makefile.o2e
     - copied unchanged from r191923, vendor/less/v406/contrib/less/Makefile.o2e
  vendor/less/v406/Makefile.o9c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/Makefile.o9c
  vendor/less/v406/Makefile.o9u
     - copied unchanged from r191923, vendor/less/v406/contrib/less/Makefile.o9u
  vendor/less/v406/Makefile.wnb
     - copied unchanged from r191923, vendor/less/v406/contrib/less/Makefile.wnb
  vendor/less/v406/Makefile.wnm
     - copied unchanged from r191923, vendor/less/v406/contrib/less/Makefile.wnm
  vendor/less/v406/NEWS
     - copied unchanged from r191923, vendor/less/v406/contrib/less/NEWS
  vendor/less/v406/README
     - copied unchanged from r191923, vendor/less/v406/contrib/less/README
  vendor/less/v406/brac.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/brac.c
  vendor/less/v406/ch.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/ch.c
  vendor/less/v406/charset.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/charset.c
  vendor/less/v406/charset.h
     - copied unchanged from r191923, vendor/less/v406/contrib/less/charset.h
  vendor/less/v406/cmd.h
     - copied unchanged from r191923, vendor/less/v406/contrib/less/cmd.h
  vendor/less/v406/cmdbuf.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/cmdbuf.c
  vendor/less/v406/command.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/command.c
  vendor/less/v406/configure
     - copied unchanged from r191923, vendor/less/v406/contrib/less/configure
  vendor/less/v406/configure.ac
     - copied unchanged from r191923, vendor/less/v406/contrib/less/configure.ac
  vendor/less/v406/decode.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/decode.c
  vendor/less/v406/defines.ds
     - copied unchanged from r191923, vendor/less/v406/contrib/less/defines.ds
  vendor/less/v406/defines.h.in
     - copied unchanged from r191923, vendor/less/v406/contrib/less/defines.h.in
  vendor/less/v406/defines.o2
     - copied unchanged from r191923, vendor/less/v406/contrib/less/defines.o2
  vendor/less/v406/defines.o9
     - copied unchanged from r191923, vendor/less/v406/contrib/less/defines.o9
  vendor/less/v406/defines.wn
     - copied unchanged from r191923, vendor/less/v406/contrib/less/defines.wn
  vendor/less/v406/edit.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/edit.c
  vendor/less/v406/filename.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/filename.c
  vendor/less/v406/forwback.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/forwback.c
  vendor/less/v406/funcs.h
     - copied unchanged from r191923, vendor/less/v406/contrib/less/funcs.h
  vendor/less/v406/help.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/help.c
  vendor/less/v406/ifile.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/ifile.c
  vendor/less/v406/input.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/input.c
  vendor/less/v406/install.sh
     - copied unchanged from r191923, vendor/less/v406/contrib/less/install.sh
  vendor/less/v406/jump.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/jump.c
  vendor/less/v406/less.h
     - copied unchanged from r191923, vendor/less/v406/contrib/less/less.h
  vendor/less/v406/less.hlp
     - copied unchanged from r191923, vendor/less/v406/contrib/less/less.hlp
  vendor/less/v406/less.man
     - copied unchanged from r191923, vendor/less/v406/contrib/less/less.man
  vendor/less/v406/less.nro
     - copied unchanged from r191923, vendor/less/v406/contrib/less/less.nro
  vendor/less/v406/lessecho.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/lessecho.c
  vendor/less/v406/lessecho.man
     - copied unchanged from r191923, vendor/less/v406/contrib/less/lessecho.man
  vendor/less/v406/lessecho.nro
     - copied unchanged from r191923, vendor/less/v406/contrib/less/lessecho.nro
  vendor/less/v406/lesskey.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/lesskey.c
  vendor/less/v406/lesskey.h
     - copied unchanged from r191923, vendor/less/v406/contrib/less/lesskey.h
  vendor/less/v406/lesskey.man
     - copied unchanged from r191923, vendor/less/v406/contrib/less/lesskey.man
  vendor/less/v406/lesskey.nro
     - copied unchanged from r191923, vendor/less/v406/contrib/less/lesskey.nro
  vendor/less/v406/lglob.h
     - copied unchanged from r191923, vendor/less/v406/contrib/less/lglob.h
  vendor/less/v406/line.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/line.c
  vendor/less/v406/linenum.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/linenum.c
  vendor/less/v406/lsystem.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/lsystem.c
  vendor/less/v406/main.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/main.c
  vendor/less/v406/mark.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/mark.c
  vendor/less/v406/mkfuncs.awk
     - copied unchanged from r191923, vendor/less/v406/contrib/less/mkfuncs.awk
  vendor/less/v406/mkhelp.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/mkhelp.c
  vendor/less/v406/mkinstalldirs
     - copied unchanged from r191923, vendor/less/v406/contrib/less/mkinstalldirs
  vendor/less/v406/optfunc.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/optfunc.c
  vendor/less/v406/option.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/option.c
  vendor/less/v406/option.h
     - copied unchanged from r191923, vendor/less/v406/contrib/less/option.h
  vendor/less/v406/opttbl.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/opttbl.c
  vendor/less/v406/os.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/os.c
  vendor/less/v406/output.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/output.c
  vendor/less/v406/pckeys.h
     - copied unchanged from r191923, vendor/less/v406/contrib/less/pckeys.h
  vendor/less/v406/position.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/position.c
  vendor/less/v406/position.h
     - copied unchanged from r191923, vendor/less/v406/contrib/less/position.h
  vendor/less/v406/prompt.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/prompt.c
  vendor/less/v406/regexp.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/regexp.c
  vendor/less/v406/regexp.h
     - copied unchanged from r191923, vendor/less/v406/contrib/less/regexp.h
  vendor/less/v406/screen.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/screen.c
  vendor/less/v406/scrsize.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/scrsize.c
  vendor/less/v406/search.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/search.c
  vendor/less/v406/signal.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/signal.c
  vendor/less/v406/tags.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/tags.c
  vendor/less/v406/ttyin.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/ttyin.c
  vendor/less/v406/version.c
     - copied unchanged from r191923, vendor/less/v406/contrib/less/version.c
  vendor/less/v408/COPYING
     - copied unchanged from r191923, vendor/less/v408/contrib/less/COPYING
  vendor/less/v408/INSTALL
     - copied unchanged from r191923, vendor/less/v408/contrib/less/INSTALL
  vendor/less/v408/LICENSE
     - copied unchanged from r191923, vendor/less/v408/contrib/less/LICENSE
  vendor/less/v408/Makefile.aut
     - copied unchanged from r191923, vendor/less/v408/contrib/less/Makefile.aut
  vendor/less/v408/Makefile.dsb
     - copied unchanged from r191923, vendor/less/v408/contrib/less/Makefile.dsb
  vendor/less/v408/Makefile.dsg
     - copied unchanged from r191923, vendor/less/v408/contrib/less/Makefile.dsg
  vendor/less/v408/Makefile.dsu
     - copied unchanged from r191923, vendor/less/v408/contrib/less/Makefile.dsu
  vendor/less/v408/Makefile.in
     - copied unchanged from r191923, vendor/less/v408/contrib/less/Makefile.in
  vendor/less/v408/Makefile.o2e
     - copied unchanged from r191923, vendor/less/v408/contrib/less/Makefile.o2e
  vendor/less/v408/Makefile.o9c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/Makefile.o9c
  vendor/less/v408/Makefile.o9u
     - copied unchanged from r191923, vendor/less/v408/contrib/less/Makefile.o9u
  vendor/less/v408/Makefile.wnb
     - copied unchanged from r191923, vendor/less/v408/contrib/less/Makefile.wnb
  vendor/less/v408/Makefile.wnm
     - copied unchanged from r191923, vendor/less/v408/contrib/less/Makefile.wnm
  vendor/less/v408/NEWS
     - copied unchanged from r191923, vendor/less/v408/contrib/less/NEWS
  vendor/less/v408/README
     - copied unchanged from r191923, vendor/less/v408/contrib/less/README
  vendor/less/v408/brac.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/brac.c
  vendor/less/v408/ch.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/ch.c
  vendor/less/v408/charset.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/charset.c
  vendor/less/v408/charset.h
     - copied unchanged from r191923, vendor/less/v408/contrib/less/charset.h
  vendor/less/v408/cmd.h
     - copied unchanged from r191923, vendor/less/v408/contrib/less/cmd.h
  vendor/less/v408/cmdbuf.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/cmdbuf.c
  vendor/less/v408/command.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/command.c
  vendor/less/v408/configure
     - copied unchanged from r191923, vendor/less/v408/contrib/less/configure
  vendor/less/v408/configure.ac
     - copied unchanged from r191923, vendor/less/v408/contrib/less/configure.ac
  vendor/less/v408/decode.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/decode.c
  vendor/less/v408/defines.ds
     - copied unchanged from r191923, vendor/less/v408/contrib/less/defines.ds
  vendor/less/v408/defines.h.in
     - copied unchanged from r191923, vendor/less/v408/contrib/less/defines.h.in
  vendor/less/v408/defines.o2
     - copied unchanged from r191923, vendor/less/v408/contrib/less/defines.o2
  vendor/less/v408/defines.o9
     - copied unchanged from r191923, vendor/less/v408/contrib/less/defines.o9
  vendor/less/v408/defines.wn
     - copied unchanged from r191923, vendor/less/v408/contrib/less/defines.wn
  vendor/less/v408/edit.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/edit.c
  vendor/less/v408/filename.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/filename.c
  vendor/less/v408/forwback.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/forwback.c
  vendor/less/v408/funcs.h
     - copied unchanged from r191923, vendor/less/v408/contrib/less/funcs.h
  vendor/less/v408/help.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/help.c
  vendor/less/v408/ifile.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/ifile.c
  vendor/less/v408/input.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/input.c
  vendor/less/v408/install.sh
     - copied unchanged from r191923, vendor/less/v408/contrib/less/install.sh
  vendor/less/v408/jump.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/jump.c
  vendor/less/v408/less.h
     - copied unchanged from r191923, vendor/less/v408/contrib/less/less.h
  vendor/less/v408/less.hlp
     - copied unchanged from r191923, vendor/less/v408/contrib/less/less.hlp
  vendor/less/v408/less.man
     - copied unchanged from r191923, vendor/less/v408/contrib/less/less.man
  vendor/less/v408/less.nro
     - copied unchanged from r191923, vendor/less/v408/contrib/less/less.nro
  vendor/less/v408/lessecho.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/lessecho.c
  vendor/less/v408/lessecho.man
     - copied unchanged from r191923, vendor/less/v408/contrib/less/lessecho.man
  vendor/less/v408/lessecho.nro
     - copied unchanged from r191923, vendor/less/v408/contrib/less/lessecho.nro
  vendor/less/v408/lesskey.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/lesskey.c
  vendor/less/v408/lesskey.h
     - copied unchanged from r191923, vendor/less/v408/contrib/less/lesskey.h
  vendor/less/v408/lesskey.man
     - copied unchanged from r191923, vendor/less/v408/contrib/less/lesskey.man
  vendor/less/v408/lesskey.nro
     - copied unchanged from r191923, vendor/less/v408/contrib/less/lesskey.nro
  vendor/less/v408/lglob.h
     - copied unchanged from r191923, vendor/less/v408/contrib/less/lglob.h
  vendor/less/v408/line.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/line.c
  vendor/less/v408/linenum.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/linenum.c
  vendor/less/v408/lsystem.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/lsystem.c
  vendor/less/v408/main.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/main.c
  vendor/less/v408/mark.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/mark.c
  vendor/less/v408/mkfuncs.awk
     - copied unchanged from r191923, vendor/less/v408/contrib/less/mkfuncs.awk
  vendor/less/v408/mkhelp.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/mkhelp.c
  vendor/less/v408/mkinstalldirs
     - copied unchanged from r191923, vendor/less/v408/contrib/less/mkinstalldirs
  vendor/less/v408/optfunc.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/optfunc.c
  vendor/less/v408/option.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/option.c
  vendor/less/v408/option.h
     - copied unchanged from r191923, vendor/less/v408/contrib/less/option.h
  vendor/less/v408/opttbl.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/opttbl.c
  vendor/less/v408/os.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/os.c
  vendor/less/v408/output.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/output.c
  vendor/less/v408/pckeys.h
     - copied unchanged from r191923, vendor/less/v408/contrib/less/pckeys.h
  vendor/less/v408/position.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/position.c
  vendor/less/v408/position.h
     - copied unchanged from r191923, vendor/less/v408/contrib/less/position.h
  vendor/less/v408/prompt.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/prompt.c
  vendor/less/v408/regexp.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/regexp.c
  vendor/less/v408/regexp.h
     - copied unchanged from r191923, vendor/less/v408/contrib/less/regexp.h
  vendor/less/v408/screen.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/screen.c
  vendor/less/v408/scrsize.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/scrsize.c
  vendor/less/v408/search.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/search.c
  vendor/less/v408/signal.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/signal.c
  vendor/less/v408/tags.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/tags.c
  vendor/less/v408/ttyin.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/ttyin.c
  vendor/less/v408/version.c
     - copied unchanged from r191923, vendor/less/v408/contrib/less/version.c
  vendor/less/v409/COPYING
     - copied unchanged from r191923, vendor/less/v409/contrib/less/COPYING
  vendor/less/v409/INSTALL
     - copied unchanged from r191923, vendor/less/v409/contrib/less/INSTALL
  vendor/less/v409/LICENSE
     - copied unchanged from r191923, vendor/less/v409/contrib/less/LICENSE
  vendor/less/v409/Makefile.aut
     - copied unchanged from r191923, vendor/less/v409/contrib/less/Makefile.aut
  vendor/less/v409/Makefile.dsb
     - copied unchanged from r191923, vendor/less/v409/contrib/less/Makefile.dsb
  vendor/less/v409/Makefile.dsg
     - copied unchanged from r191923, vendor/less/v409/contrib/less/Makefile.dsg
  vendor/less/v409/Makefile.dsu
     - copied unchanged from r191923, vendor/less/v409/contrib/less/Makefile.dsu
  vendor/less/v409/Makefile.in
     - copied unchanged from r191923, vendor/less/v409/contrib/less/Makefile.in
  vendor/less/v409/Makefile.o2e
     - copied unchanged from r191923, vendor/less/v409/contrib/less/Makefile.o2e
  vendor/less/v409/Makefile.o9c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/Makefile.o9c
  vendor/less/v409/Makefile.o9u
     - copied unchanged from r191923, vendor/less/v409/contrib/less/Makefile.o9u
  vendor/less/v409/Makefile.wnb
     - copied unchanged from r191923, vendor/less/v409/contrib/less/Makefile.wnb
  vendor/less/v409/Makefile.wnm
     - copied unchanged from r191923, vendor/less/v409/contrib/less/Makefile.wnm
  vendor/less/v409/NEWS
     - copied unchanged from r191923, vendor/less/v409/contrib/less/NEWS
  vendor/less/v409/README
     - copied unchanged from r191923, vendor/less/v409/contrib/less/README
  vendor/less/v409/brac.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/brac.c
  vendor/less/v409/ch.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/ch.c
  vendor/less/v409/charset.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/charset.c
  vendor/less/v409/charset.h
     - copied unchanged from r191923, vendor/less/v409/contrib/less/charset.h
  vendor/less/v409/cmd.h
     - copied unchanged from r191923, vendor/less/v409/contrib/less/cmd.h
  vendor/less/v409/cmdbuf.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/cmdbuf.c
  vendor/less/v409/command.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/command.c
  vendor/less/v409/configure
     - copied unchanged from r191923, vendor/less/v409/contrib/less/configure
  vendor/less/v409/configure.ac
     - copied unchanged from r191923, vendor/less/v409/contrib/less/configure.ac
  vendor/less/v409/decode.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/decode.c
  vendor/less/v409/defines.ds
     - copied unchanged from r191923, vendor/less/v409/contrib/less/defines.ds
  vendor/less/v409/defines.h.in
     - copied unchanged from r191923, vendor/less/v409/contrib/less/defines.h.in
  vendor/less/v409/defines.o2
     - copied unchanged from r191923, vendor/less/v409/contrib/less/defines.o2
  vendor/less/v409/defines.o9
     - copied unchanged from r191923, vendor/less/v409/contrib/less/defines.o9
  vendor/less/v409/defines.wn
     - copied unchanged from r191923, vendor/less/v409/contrib/less/defines.wn
  vendor/less/v409/edit.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/edit.c
  vendor/less/v409/filename.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/filename.c
  vendor/less/v409/forwback.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/forwback.c
  vendor/less/v409/funcs.h
     - copied unchanged from r191923, vendor/less/v409/contrib/less/funcs.h
  vendor/less/v409/help.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/help.c
  vendor/less/v409/ifile.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/ifile.c
  vendor/less/v409/input.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/input.c
  vendor/less/v409/install.sh
     - copied unchanged from r191923, vendor/less/v409/contrib/less/install.sh
  vendor/less/v409/jump.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/jump.c
  vendor/less/v409/less.h
     - copied unchanged from r191923, vendor/less/v409/contrib/less/less.h
  vendor/less/v409/less.hlp
     - copied unchanged from r191923, vendor/less/v409/contrib/less/less.hlp
  vendor/less/v409/less.man
     - copied unchanged from r191923, vendor/less/v409/contrib/less/less.man
  vendor/less/v409/less.nro
     - copied unchanged from r191923, vendor/less/v409/contrib/less/less.nro
  vendor/less/v409/lessecho.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/lessecho.c
  vendor/less/v409/lessecho.man
     - copied unchanged from r191923, vendor/less/v409/contrib/less/lessecho.man
  vendor/less/v409/lessecho.nro
     - copied unchanged from r191923, vendor/less/v409/contrib/less/lessecho.nro
  vendor/less/v409/lesskey.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/lesskey.c
  vendor/less/v409/lesskey.h
     - copied unchanged from r191923, vendor/less/v409/contrib/less/lesskey.h
  vendor/less/v409/lesskey.man
     - copied unchanged from r191923, vendor/less/v409/contrib/less/lesskey.man
  vendor/less/v409/lesskey.nro
     - copied unchanged from r191923, vendor/less/v409/contrib/less/lesskey.nro
  vendor/less/v409/lglob.h
     - copied unchanged from r191923, vendor/less/v409/contrib/less/lglob.h
  vendor/less/v409/line.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/line.c
  vendor/less/v409/linenum.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/linenum.c
  vendor/less/v409/lsystem.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/lsystem.c
  vendor/less/v409/main.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/main.c
  vendor/less/v409/mark.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/mark.c
  vendor/less/v409/mkfuncs.awk
     - copied unchanged from r191923, vendor/less/v409/contrib/less/mkfuncs.awk
  vendor/less/v409/mkhelp.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/mkhelp.c
  vendor/less/v409/mkinstalldirs
     - copied unchanged from r191923, vendor/less/v409/contrib/less/mkinstalldirs
  vendor/less/v409/optfunc.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/optfunc.c
  vendor/less/v409/option.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/option.c
  vendor/less/v409/option.h
     - copied unchanged from r191923, vendor/less/v409/contrib/less/option.h
  vendor/less/v409/opttbl.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/opttbl.c
  vendor/less/v409/os.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/os.c
  vendor/less/v409/output.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/output.c
  vendor/less/v409/pckeys.h
     - copied unchanged from r191923, vendor/less/v409/contrib/less/pckeys.h
  vendor/less/v409/position.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/position.c
  vendor/less/v409/position.h
     - copied unchanged from r191923, vendor/less/v409/contrib/less/position.h
  vendor/less/v409/prompt.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/prompt.c
  vendor/less/v409/regexp.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/regexp.c
  vendor/less/v409/regexp.h
     - copied unchanged from r191923, vendor/less/v409/contrib/less/regexp.h
  vendor/less/v409/screen.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/screen.c
  vendor/less/v409/scrsize.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/scrsize.c
  vendor/less/v409/search.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/search.c
  vendor/less/v409/signal.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/signal.c
  vendor/less/v409/tags.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/tags.c
  vendor/less/v409/ttyin.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/ttyin.c
  vendor/less/v409/version.c
     - copied unchanged from r191923, vendor/less/v409/contrib/less/version.c
  vendor/less/v415/COPYING
     - copied unchanged from r191923, vendor/less/v415/contrib/less/COPYING
  vendor/less/v415/INSTALL
     - copied unchanged from r191923, vendor/less/v415/contrib/less/INSTALL
  vendor/less/v415/LICENSE
     - copied unchanged from r191923, vendor/less/v415/contrib/less/LICENSE
  vendor/less/v415/Makefile.aut
     - copied unchanged from r191923, vendor/less/v415/contrib/less/Makefile.aut
  vendor/less/v415/Makefile.dsb
     - copied unchanged from r191923, vendor/less/v415/contrib/less/Makefile.dsb
  vendor/less/v415/Makefile.dsg
     - copied unchanged from r191923, vendor/less/v415/contrib/less/Makefile.dsg
  vendor/less/v415/Makefile.dsu
     - copied unchanged from r191923, vendor/less/v415/contrib/less/Makefile.dsu
  vendor/less/v415/Makefile.in
     - copied unchanged from r191923, vendor/less/v415/contrib/less/Makefile.in
  vendor/less/v415/Makefile.o2e
     - copied unchanged from r191923, vendor/less/v415/contrib/less/Makefile.o2e
  vendor/less/v415/Makefile.o9c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/Makefile.o9c
  vendor/less/v415/Makefile.o9u
     - copied unchanged from r191923, vendor/less/v415/contrib/less/Makefile.o9u
  vendor/less/v415/Makefile.wnb
     - copied unchanged from r191923, vendor/less/v415/contrib/less/Makefile.wnb
  vendor/less/v415/Makefile.wnm
     - copied unchanged from r191923, vendor/less/v415/contrib/less/Makefile.wnm
  vendor/less/v415/NEWS
     - copied unchanged from r191923, vendor/less/v415/contrib/less/NEWS
  vendor/less/v415/README
     - copied unchanged from r191923, vendor/less/v415/contrib/less/README
  vendor/less/v415/brac.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/brac.c
  vendor/less/v415/ch.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/ch.c
  vendor/less/v415/charset.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/charset.c
  vendor/less/v415/charset.h
     - copied unchanged from r191923, vendor/less/v415/contrib/less/charset.h
  vendor/less/v415/cmd.h
     - copied unchanged from r191923, vendor/less/v415/contrib/less/cmd.h
  vendor/less/v415/cmdbuf.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/cmdbuf.c
  vendor/less/v415/command.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/command.c
  vendor/less/v415/configure
     - copied unchanged from r191923, vendor/less/v415/contrib/less/configure
  vendor/less/v415/configure.ac
     - copied unchanged from r191923, vendor/less/v415/contrib/less/configure.ac
  vendor/less/v415/decode.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/decode.c
  vendor/less/v415/defines.ds
     - copied unchanged from r191923, vendor/less/v415/contrib/less/defines.ds
  vendor/less/v415/defines.h.in
     - copied unchanged from r191923, vendor/less/v415/contrib/less/defines.h.in
  vendor/less/v415/defines.o2
     - copied unchanged from r191923, vendor/less/v415/contrib/less/defines.o2
  vendor/less/v415/defines.o9
     - copied unchanged from r191923, vendor/less/v415/contrib/less/defines.o9
  vendor/less/v415/defines.wn
     - copied unchanged from r191923, vendor/less/v415/contrib/less/defines.wn
  vendor/less/v415/edit.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/edit.c
  vendor/less/v415/filename.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/filename.c
  vendor/less/v415/forwback.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/forwback.c
  vendor/less/v415/funcs.h
     - copied unchanged from r191923, vendor/less/v415/contrib/less/funcs.h
  vendor/less/v415/help.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/help.c
  vendor/less/v415/ifile.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/ifile.c
  vendor/less/v415/input.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/input.c
  vendor/less/v415/install.sh
     - copied unchanged from r191923, vendor/less/v415/contrib/less/install.sh
  vendor/less/v415/jump.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/jump.c
  vendor/less/v415/less.h
     - copied unchanged from r191923, vendor/less/v415/contrib/less/less.h
  vendor/less/v415/less.hlp
     - copied unchanged from r191923, vendor/less/v415/contrib/less/less.hlp
  vendor/less/v415/less.man
     - copied unchanged from r191923, vendor/less/v415/contrib/less/less.man
  vendor/less/v415/less.nro
     - copied unchanged from r191923, vendor/less/v415/contrib/less/less.nro
  vendor/less/v415/lessecho.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/lessecho.c
  vendor/less/v415/lessecho.man
     - copied unchanged from r191923, vendor/less/v415/contrib/less/lessecho.man
  vendor/less/v415/lessecho.nro
     - copied unchanged from r191923, vendor/less/v415/contrib/less/lessecho.nro
  vendor/less/v415/lesskey.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/lesskey.c
  vendor/less/v415/lesskey.h
     - copied unchanged from r191923, vendor/less/v415/contrib/less/lesskey.h
  vendor/less/v415/lesskey.man
     - copied unchanged from r191923, vendor/less/v415/contrib/less/lesskey.man
  vendor/less/v415/lesskey.nro
     - copied unchanged from r191923, vendor/less/v415/contrib/less/lesskey.nro
  vendor/less/v415/lglob.h
     - copied unchanged from r191923, vendor/less/v415/contrib/less/lglob.h
  vendor/less/v415/line.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/line.c
  vendor/less/v415/linenum.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/linenum.c
  vendor/less/v415/lsystem.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/lsystem.c
  vendor/less/v415/main.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/main.c
  vendor/less/v415/mark.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/mark.c
  vendor/less/v415/mkfuncs.awk
     - copied unchanged from r191923, vendor/less/v415/contrib/less/mkfuncs.awk
  vendor/less/v415/mkhelp.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/mkhelp.c
  vendor/less/v415/mkinstalldirs
     - copied unchanged from r191923, vendor/less/v415/contrib/less/mkinstalldirs
  vendor/less/v415/optfunc.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/optfunc.c
  vendor/less/v415/option.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/option.c
  vendor/less/v415/option.h
     - copied unchanged from r191923, vendor/less/v415/contrib/less/option.h
  vendor/less/v415/opttbl.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/opttbl.c
  vendor/less/v415/os.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/os.c
  vendor/less/v415/output.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/output.c
  vendor/less/v415/pckeys.h
     - copied unchanged from r191923, vendor/less/v415/contrib/less/pckeys.h
  vendor/less/v415/position.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/position.c
  vendor/less/v415/position.h
     - copied unchanged from r191923, vendor/less/v415/contrib/less/position.h
  vendor/less/v415/prompt.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/prompt.c
  vendor/less/v415/regexp.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/regexp.c
  vendor/less/v415/regexp.h
     - copied unchanged from r191923, vendor/less/v415/contrib/less/regexp.h
  vendor/less/v415/screen.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/screen.c
  vendor/less/v415/scrsize.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/scrsize.c
  vendor/less/v415/search.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/search.c
  vendor/less/v415/signal.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/signal.c
  vendor/less/v415/tags.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/tags.c
  vendor/less/v415/ttyin.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/ttyin.c
  vendor/less/v415/version.c
     - copied unchanged from r191923, vendor/less/v415/contrib/less/version.c
  vendor/less/v416/COPYING
     - copied unchanged from r191923, vendor/less/v416/contrib/less/COPYING
  vendor/less/v416/INSTALL
     - copied unchanged from r191923, vendor/less/v416/contrib/less/INSTALL
  vendor/less/v416/LICENSE
     - copied unchanged from r191923, vendor/less/v416/contrib/less/LICENSE
  vendor/less/v416/Makefile.aut
     - copied unchanged from r191923, vendor/less/v416/contrib/less/Makefile.aut
  vendor/less/v416/Makefile.dsb
     - copied unchanged from r191923, vendor/less/v416/contrib/less/Makefile.dsb
  vendor/less/v416/Makefile.dsg
     - copied unchanged from r191923, vendor/less/v416/contrib/less/Makefile.dsg
  vendor/less/v416/Makefile.dsu
     - copied unchanged from r191923, vendor/less/v416/contrib/less/Makefile.dsu
  vendor/less/v416/Makefile.in
     - copied unchanged from r191923, vendor/less/v416/contrib/less/Makefile.in
  vendor/less/v416/Makefile.o2e
     - copied unchanged from r191923, vendor/less/v416/contrib/less/Makefile.o2e
  vendor/less/v416/Makefile.o9c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/Makefile.o9c
  vendor/less/v416/Makefile.o9u
     - copied unchanged from r191923, vendor/less/v416/contrib/less/Makefile.o9u
  vendor/less/v416/Makefile.wnb
     - copied unchanged from r191923, vendor/less/v416/contrib/less/Makefile.wnb
  vendor/less/v416/Makefile.wnm
     - copied unchanged from r191923, vendor/less/v416/contrib/less/Makefile.wnm
  vendor/less/v416/NEWS
     - copied unchanged from r191923, vendor/less/v416/contrib/less/NEWS
  vendor/less/v416/README
     - copied unchanged from r191923, vendor/less/v416/contrib/less/README
  vendor/less/v416/brac.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/brac.c
  vendor/less/v416/ch.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/ch.c
  vendor/less/v416/charset.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/charset.c
  vendor/less/v416/charset.h
     - copied unchanged from r191923, vendor/less/v416/contrib/less/charset.h
  vendor/less/v416/cmd.h
     - copied unchanged from r191923, vendor/less/v416/contrib/less/cmd.h
  vendor/less/v416/cmdbuf.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/cmdbuf.c
  vendor/less/v416/command.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/command.c
  vendor/less/v416/configure
     - copied unchanged from r191923, vendor/less/v416/contrib/less/configure
  vendor/less/v416/configure.ac
     - copied unchanged from r191923, vendor/less/v416/contrib/less/configure.ac
  vendor/less/v416/decode.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/decode.c
  vendor/less/v416/defines.ds
     - copied unchanged from r191923, vendor/less/v416/contrib/less/defines.ds
  vendor/less/v416/defines.h.in
     - copied unchanged from r191923, vendor/less/v416/contrib/less/defines.h.in
  vendor/less/v416/defines.o2
     - copied unchanged from r191923, vendor/less/v416/contrib/less/defines.o2
  vendor/less/v416/defines.o9
     - copied unchanged from r191923, vendor/less/v416/contrib/less/defines.o9
  vendor/less/v416/defines.wn
     - copied unchanged from r191923, vendor/less/v416/contrib/less/defines.wn
  vendor/less/v416/edit.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/edit.c
  vendor/less/v416/filename.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/filename.c
  vendor/less/v416/forwback.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/forwback.c
  vendor/less/v416/funcs.h
     - copied unchanged from r191923, vendor/less/v416/contrib/less/funcs.h
  vendor/less/v416/help.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/help.c
  vendor/less/v416/ifile.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/ifile.c
  vendor/less/v416/input.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/input.c
  vendor/less/v416/install.sh
     - copied unchanged from r191923, vendor/less/v416/contrib/less/install.sh
  vendor/less/v416/jump.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/jump.c
  vendor/less/v416/less.h
     - copied unchanged from r191923, vendor/less/v416/contrib/less/less.h
  vendor/less/v416/less.hlp
     - copied unchanged from r191923, vendor/less/v416/contrib/less/less.hlp
  vendor/less/v416/less.man
     - copied unchanged from r191923, vendor/less/v416/contrib/less/less.man
  vendor/less/v416/less.nro
     - copied unchanged from r191923, vendor/less/v416/contrib/less/less.nro
  vendor/less/v416/lessecho.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/lessecho.c
  vendor/less/v416/lessecho.man
     - copied unchanged from r191923, vendor/less/v416/contrib/less/lessecho.man
  vendor/less/v416/lessecho.nro
     - copied unchanged from r191923, vendor/less/v416/contrib/less/lessecho.nro
  vendor/less/v416/lesskey.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/lesskey.c
  vendor/less/v416/lesskey.h
     - copied unchanged from r191923, vendor/less/v416/contrib/less/lesskey.h
  vendor/less/v416/lesskey.man
     - copied unchanged from r191923, vendor/less/v416/contrib/less/lesskey.man
  vendor/less/v416/lesskey.nro
     - copied unchanged from r191923, vendor/less/v416/contrib/less/lesskey.nro
  vendor/less/v416/lglob.h
     - copied unchanged from r191923, vendor/less/v416/contrib/less/lglob.h
  vendor/less/v416/line.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/line.c
  vendor/less/v416/linenum.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/linenum.c
  vendor/less/v416/lsystem.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/lsystem.c
  vendor/less/v416/main.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/main.c
  vendor/less/v416/mark.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/mark.c
  vendor/less/v416/mkfuncs.awk
     - copied unchanged from r191923, vendor/less/v416/contrib/less/mkfuncs.awk
  vendor/less/v416/mkhelp.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/mkhelp.c
  vendor/less/v416/mkinstalldirs
     - copied unchanged from r191923, vendor/less/v416/contrib/less/mkinstalldirs
  vendor/less/v416/optfunc.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/optfunc.c
  vendor/less/v416/option.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/option.c
  vendor/less/v416/option.h
     - copied unchanged from r191923, vendor/less/v416/contrib/less/option.h
  vendor/less/v416/opttbl.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/opttbl.c
  vendor/less/v416/os.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/os.c
  vendor/less/v416/output.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/output.c
  vendor/less/v416/pckeys.h
     - copied unchanged from r191923, vendor/less/v416/contrib/less/pckeys.h
  vendor/less/v416/position.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/position.c
  vendor/less/v416/position.h
     - copied unchanged from r191923, vendor/less/v416/contrib/less/position.h
  vendor/less/v416/prompt.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/prompt.c
  vendor/less/v416/regexp.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/regexp.c
  vendor/less/v416/regexp.h
     - copied unchanged from r191923, vendor/less/v416/contrib/less/regexp.h
  vendor/less/v416/screen.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/screen.c
  vendor/less/v416/scrsize.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/scrsize.c
  vendor/less/v416/search.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/search.c
  vendor/less/v416/signal.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/signal.c
  vendor/less/v416/tags.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/tags.c
  vendor/less/v416/ttyin.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/ttyin.c
  vendor/less/v416/version.c
     - copied unchanged from r191923, vendor/less/v416/contrib/less/version.c
Deleted:
  vendor/less/dist/contrib/
  vendor/less/v354/contrib/
  vendor/less/v358/contrib/
  vendor/less/v371/contrib/
  vendor/less/v381/contrib/
  vendor/less/v394/contrib/
  vendor/less/v403/contrib/
  vendor/less/v406/contrib/
  vendor/less/v408/contrib/
  vendor/less/v409/contrib/
  vendor/less/v415/contrib/
  vendor/less/v416/contrib/

Copied: vendor/less/dist/COPYING (from r191923, vendor/less/dist/contrib/less/COPYING)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/less/dist/COPYING	Fri May  8 23:34:35 2009	(r191925, copy of r191923, vendor/less/dist/contrib/less/COPYING)
@@ -0,0 +1,340 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    
+    Copyright (C)   
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  , 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.

Copied: vendor/less/dist/INSTALL (from r191923, vendor/less/dist/contrib/less/INSTALL)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/less/dist/INSTALL	Fri May  8 23:34:35 2009	(r191925, copy of r191923, vendor/less/dist/contrib/less/INSTALL)
@@ -0,0 +1,186 @@
+   This file describes how to build and install less using 
+the "configure" script.  This only works on Unix systems.  
+To install on other systems, read the README file.
+
+
+Basic Installation
+==================
+
+   These are generic installation instructions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+   The file `configure.in' is used to create `configure' by a program
+called `autoconf'.  You only need `configure.in' if you want to change
+it or regenerate `configure' using a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes awhile.  While running, it prints some
+     messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  You can give `configure'
+initial values for variables by setting them in the environment.  Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+Or on systems that have the `env' program, you can do it like this:
+     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory.  After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Installation Names
+==================
+
+   By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc.  You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on.  Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+     CPU-COMPANY-SYSTEM
+
+See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the host type.
+
+   If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Operation Controls
+==================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+     Use and save the results of the tests in FILE instead of
+     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
+     debugging `configure'.
+
+`--help'
+     Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--version'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`configure' also accepts some other, not widely useful, options.
+

Copied: vendor/less/dist/LICENSE (from r191923, vendor/less/dist/contrib/less/LICENSE)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/less/dist/LICENSE	Fri May  8 23:34:35 2009	(r191925, copy of r191923, vendor/less/dist/contrib/less/LICENSE)
@@ -0,0 +1,27 @@
+                          Less License
+                          ------------
+
+Less
+Copyright (C) 1984-2007  Mark Nudelman
+
+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 in the documentation and/or other materials provided with 
+   the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+

Copied: vendor/less/dist/Makefile.aut (from r191923, vendor/less/dist/contrib/less/Makefile.aut)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/less/dist/Makefile.aut	Fri May  8 23:34:35 2009	(r191925, copy of r191923, vendor/less/dist/contrib/less/Makefile.aut)
@@ -0,0 +1,122 @@
+# Makefile for authoring less.
+
+EMAIL = markn@greenwoodsoftware.com
+HOMEPAGE = http://www.greenwoodsoftware.com/less
+SHELL = /bin/sh
+RCS = rcs
+NROFF = nroff -man
+
+srcdir = .
+
+SRC = \
+	main.c screen.c brac.c ch.c charset.c cmdbuf.c \
+	command.c decode.c edit.c filename.c forwback.c \
+	help.c ifile.c input.c jump.c line.c linenum.c \
+	lsystem.c mark.c optfunc.c option.c opttbl.c os.c \
+	output.c position.c prompt.c search.c signal.c \
+	tags.c ttyin.c version.c  
+DISTFILES_W = \
+	defines.ds  Makefile.dsb Makefile.dsg Makefile.dsu \
+	defines.o2  Makefile.o2e \
+	defines.o9  Makefile.o9c Makefile.o9u \
+	defines.wn  Makefile.wnm Makefile.wnb
+DISTFILES = \
+	${SRC} regexp.c regexp.h \
+	COPYING INSTALL LICENSE Makefile.in Makefile.aut NEWS README \
+	configure configure.ac lesskey.c lessecho.c scrsize.c \
+	charset.h cmd.h funcs.h lglob.h less.h lesskey.h option.h pckeys.h position.h \
+	install.sh defines.h.in mkinstalldirs \
+	less.nro less.man lesskey.nro lesskey.man lessecho.nro lessecho.man \
+	less.hlp \
+	mkfuncs.awk mkhelp.c \
+	${DISTFILES_W}
+
+all: help.c funcs.h ${srcdir}/configure 
+
+help.c: less.hlp mkhelp
+	-mv -f ${srcdir}/help.c ${srcdir}/help.c.old
+	rm -rf help.c
+	./mkhelp < less.hlp > help.c
+	if cmp -s help.c help.c.old; then mv help.c.old help.c; fi
+
+mkhelp: mkhelp.c
+	${CC} -o mkhelp mkhelp.c
+
+${srcdir}/configure: ${srcdir}/configure.ac \
+		${srcdir}/Makefile.in
+	cd ${srcdir}; autoheader; autoconf
+
+funcs.h: ${SRC:%=${srcdir}/%}
+	-mv -f ${srcdir}/funcs.h ${srcdir}/funcs.h.old
+	awk -f ${srcdir}/mkfuncs.awk ${SRC:%=${srcdir}/%} >${srcdir}/funcs.h
+	if cmp -s funcs.h funcs.h.old; then mv funcs.h.old funcs.h; fi
+
+lint:
+	lint -I. ${CPPFLAGS} ${SRC}
+
+clean: 
+	rm -f Makefile config.status config.log config.cache defines.h stamp-h \
+		README NEWS \
+		less.nro less.man lesskey.nro lesskey.man lessecho.nro lessecho.man 
+
+distclean: clean
+realclean: clean
+
+REPLACE_VERSION = \
+	@REL=`sed -e '/char version/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q ${srcdir}/version.c`; \
+	DT=`date '+%d %h %Y'`; \
+	echo "Stuffing version number $$REL into $@"; \
+	sed \
+		-e "s;@@VERSION@@;$$REL;" \
+		-e "s;@@DATE@@;$$DT;" \
+		-e "s;@@EMAIL@@;${EMAIL};" \
+		-e "s;@@HOMEPAGE@@;${HOMEPAGE};" >$@
+
+${srcdir}/README: ${srcdir}/README.VER ${srcdir}/version.c
+	${REPLACE_VERSION} ${srcdir}/README.VER
+${srcdir}/NEWS: ${srcdir}/NEWS.VER ${srcdir}/version.c
+	${REPLACE_VERSION} ${srcdir}/NEWS.VER
+${srcdir}/less.nro: ${srcdir}/less.nro.VER ${srcdir}/version.c
+	${REPLACE_VERSION} ${srcdir}/less.nro.VER
+${srcdir}/lesskey.nro: ${srcdir}/lesskey.nro.VER ${srcdir}/version.c
+	${REPLACE_VERSION} ${srcdir}/lesskey.nro.VER
+${srcdir}/lessecho.nro: ${srcdir}/lessecho.nro.VER ${srcdir}/version.c
+	${REPLACE_VERSION} ${srcdir}/lessecho.nro.VER
+${srcdir}/less.hlp: ${srcdir}/less.hlp.VER ${srcdir}/version.c
+	${REPLACE_VERSION} ${srcdir}/less.hlp.VER
+
+${srcdir}/less.man: ${srcdir}/less.nro
+	${NROFF} ${srcdir}/less.nro >${srcdir}/less.man
+${srcdir}/lesskey.man: ${srcdir}/lesskey.nro
+	${NROFF} ${srcdir}/lesskey.nro >${srcdir}/lesskey.man
+${srcdir}/lessecho.man: ${srcdir}/lessecho.nro
+	${NROFF} ${srcdir}/lessecho.nro >${srcdir}/lessecho.man
+
+
+distfiles: ${DISTFILES}
+
+dist: ${DISTFILES}
+	if [ ! -d ${srcdir}/release ]; then mkdir ${srcdir}/release; fi
+	@cd ${srcdir}; \
+	REL=`sed -e '/char version/!d' -e 's/[^0-9.]*\([0-9.]*\).*/less-\1/' -e q version.c`; \
+	rm -rf release/$$REL; mkdir release/$$REL; \
+	echo "Preparing $$REL"; \
+	rm -rf $$REL; mkdir $$REL; \
+	for file in ${DISTFILES}; do \
+	  cp -p $$file $$REL; \
+	  chmod -w $$REL/$$file; \
+	done; \
+	cd $$REL; chmod +w ${DISTFILES_W}; cd ..; \
+	echo "Creating release/$$REL/$$REL.tar.gz"; \
+	tar -cf - $$REL | gzip -c >release/$$REL/$$REL.tar.gz; \
+	echo "Creating release/$$REL/$$REL.zip"; \
+	zip -rq release/$$REL/$$REL.zip $$REL; \
+	rm -rf $$REL
+
+tagall:
+	@REL=`sed -e '/char version/!d' -e 's/[^0-9.]*\([0-9.]*\).*/v\1/' -e q ${srcdir}/version.c`; \
+	echo "tagging $$REL"; \
+	for f in ${srcdir}/RCS/*,v; do \
+	  REV=`co -p $$f 2>&1 | sed -e '1d' -e '3,$$d' -e 's/revision //'`; \
+	  ${RCS} -N$$REL:$$REV $$f; \
+	done

Copied: vendor/less/dist/Makefile.dsb (from r191923, vendor/less/dist/contrib/less/Makefile.dsb)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/less/dist/Makefile.dsb	Fri May  8 23:34:35 2009	(r191925, copy of r191923, vendor/less/dist/contrib/less/Makefile.dsb)
@@ -0,0 +1,50 @@
+# Makefile for less.
+# MS-DOS version (Borland C/C++ 4.02)
+
+#### Start of system configuration section. ####
+
+CC = bcc
+LIBDIR = \bc\lib
+
+CFLAGS = -A- -mm -O2 -w- -1- -2- -a -d -Z
+LDFLAGS = -mm
+LIBS =
+EXT = .EXE
+
+#### End of system configuration section. ####
+
+# This rule allows us to supply the necessary -D options
+# in addition to whatever the user asks for.
+.c.obj:
+	$(CC) -c -I. $(CPPFLAGS) $(CFLAGS) $<
+
+OBJ =	main.obj screen.obj brac.obj ch.obj charset.obj cmdbuf.obj command.obj \
+	decode.obj edit.obj filename.obj forwback.obj help.obj ifile.obj \
+	input.obj jump.obj line.obj linenum.obj lsystem.obj \
+	mark.obj optfunc.obj option.obj opttbl.obj os.obj output.obj \
+	position.obj prompt.obj search.obj signal.obj tags.obj \
+	ttyin.obj version.obj
+
+all: less$(EXT) lesskey$(EXT)
+
+# This is really horrible, but the command line is too long for 
+# MS-DOS if we try to link $(OBJ).
+less$(EXT): $(OBJ)
+	ren lesskey.obj lesskey.obo
+	$(CC) $(LDFLAGS) -e$@ *.obj $(LIBS)
+	ren lesskey.obo lesskey.obj
+
+lesskey$(EXT): lesskey.obj version.obj
+	$(CC) $(LDFLAGS) -e$@ lesskey.obj version.obj $(LIBS)
+
+defines.h: defines.ds
+	-del defines.h
+	-copy defines.ds defines.h
+
+$(OBJ): less.h defines.h
+
+clean:
+	-del *.obj 
+	-del less.exe
+	-del lesskey.exe
+

Copied: vendor/less/dist/Makefile.dsg (from r191923, vendor/less/dist/contrib/less/Makefile.dsg)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/less/dist/Makefile.dsg	Fri May  8 23:34:35 2009	(r191925, copy of r191923, vendor/less/dist/contrib/less/Makefile.dsg)
@@ -0,0 +1,91 @@
+# Makefile for less under DJGPP v2.0 or later.
+
+#### Start of system configuration section. ####
+
+srcdir = .
+VPATH = .
+
+CC = gcc
+INSTALL = ginstall -c
+INSTALL_PROGRAM = ginstall
+INSTALL_DATA = ginstall -m 644
+AWK = gawk
+
+CFLAGS = -O2 -g
+CFLAGS_COMPILE_ONLY = -c
+#LDFLAGS = -s
+LDFLAGS = -g
+O=o
+
+LIBS =
+prefix = /dev/env/DJDIR
+exec_prefix = ${prefix}
+
+bindir = ${exec_prefix}/bin
+sysconfdir = ${prefix}/etc
+mandir = ${prefix}/man
+manext = 1
+
+#### End of system configuration section. ####
+
+# This rule allows us to supply the necessary -D options
+# in addition to whatever the user asks for.
+.c.o:
+	${CC} -I. ${CFLAGS_COMPILE_ONLY} -DBINDIR=\"${bindir}\" -DSYSDIR=\"${sysconfdir}\" ${CPPFLAGS} ${CFLAGS} $<
+
+OBJ =	main.${O} screen.${O} brac.${O} ch.${O} charset.${O} cmdbuf.${O} \
+	command.${O} decode.${O} edit.${O} filename.${O} forwback.${O} \
+	help.${O} ifile.${O} input.${O} jump.${O} line.${O} linenum.${O} \
+	lsystem.${O} mark.${O} optfunc.${O} option.${O} opttbl.${O} os.${O} \
+	output.${O} position.${O} prompt.${O} search.${O} signal.${O} \
+	tags.${O} ttyin.${O} version.${O}
+
+all: less lesskey lessecho
+
+less: ${OBJ}
+	${CC} ${LDFLAGS} -o $@ ${OBJ} ${LIBS}
+
+lesskey: lesskey.${O} version.${O}
+	${CC} ${LDFLAGS} -o $@ lesskey.${O} version.${O}
+
+lessecho: lessecho.${O} version.${O}
+	${CC} ${LDFLAGS} -o $@ lessecho.${O} version.${O}
+
+defines.h: defines.ds
+	command.com /c copy $< $@
+
+${OBJ}: ${srcdir}/less.h defines.h ${srcdir}/funcs.h
+
+install: all ${srcdir}/less.man ${srcdir}/lesskey.man
+	${INSTALL_PROGRAM} less.exe ${bindir}/less.exe
+	${INSTALL_PROGRAM} lesskey.exe ${bindir}/lesskey.exe
+	${INSTALL_PROGRAM} lessecho.exe ${bindir}/lessecho.exe
+	${INSTALL_DATA} ${srcdir}/less.man ${mandir}/man${manext}/less.${manext}
+	${INSTALL_DATA} ${srcdir}/lesskey.man ${mandir}/man${manext}/lesskey.${manext}
+
+info:
+install-info:
+dvi:
+check:
+installcheck:
+
+TAGS:
+	etags *.c *.h
+
+newfuncs:
+	command.com /c if exist funcs.h del funcs.h
+	${AWK} -f mkfuncs.awk ${OBJ:.${O}=.c} > funcs.h
+
+clean:
+	command.com /c for %f in (*.${O} less lesskey lessecho *.exe) do if exist %f del %f
+
+mostlyclean: clean
+
+distclean: clean
+	command.com /c if not exist Makefile.dsg ren Makefile Makefile.dsg
+	command.com /c if not exist defines.ds ren defines.h defines.ds
+	command.com /c for %f in (Makefile defines.h) do if exist %f del %f
+
+realclean: distclean
+	command.com /c if exist TAGS del TAGS
+

Copied: vendor/less/dist/Makefile.dsu (from r191923, vendor/less/dist/contrib/less/Makefile.dsu)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/less/dist/Makefile.dsu	Fri May  8 23:34:35 2009	(r191925, copy of r191923, vendor/less/dist/contrib/less/Makefile.dsu)
@@ -0,0 +1,58 @@
+# Makefile for less.
+# MS-DOS version
+
+#### Start of system configuration section. ####
+
+CC = cl
+# Change the following directories to match your installation.
+LIBDIR = c:\msvc\lib
+INCDIR = c:\msvc\include
+
+# CFLAGS are compile-time options and LDFLAGS are link-time options. They are
+# customized for MSVC 1.0 (MSC 8.0). If you have a different version of the
+# compiler, you may need to change some of the options to their equivalents.
+# -Ot     optimize for speed
+# -AL     large memory model
+# -Za     ANSI C conformance
+# -nologo suppress MSVC banners
+# -onerror:noexe   no .EXE file if link errors occur
+CFLAGS = -Ot -AL -Za -nologo
+LDFLAGS = -onerror:noexe -nologo
+LIBS = $(LIBDIR)\llibce.lib $(LIBDIR)\graphics.lib
+
+#### End of system configuration section. ####
+
+# This rule allows us to supply the necessary -D options
+# in addition to whatever the user asks for.
+.c.obj:
+	$(CC) -c -I. -I$(INCDIR) $(CPPFLAGS) $(CFLAGS) $<
+
+OBJ =	main.obj screen.obj brac.obj ch.obj charset.obj cmdbuf.obj command.obj \
+	decode.obj edit.obj filename.obj forwback.obj help.obj ifile.obj \
+	input.obj jump.obj line.obj linenum.obj lsystem.obj \
+	mark.obj optfunc.obj option.obj opttbl.obj os.obj output.obj \
+	position.obj prompt.obj search.obj signal.obj tags.obj \
+	ttyin.obj version.obj
+
+all: less lesskey
+
+# This is really horrible, but the command line is too long for 
+# MS-DOS if we try to link $(OBJ).
+less: $(OBJ)
+	-if exist lesskey.obj del lesskey.obj
+	$(CC) $(LDFLAGS) -o $@ *.obj $(LIBS)
+
+lesskey: lesskey.obj version.obj
+	$(CC) $(LDFLAGS) -o $@ lesskey.obj version.obj $(LIBS)
+
+defines.h: defines.ds
+	-del defines.h
+	-copy defines.ds defines.h
+
+$(OBJ): less.h defines.h
+
+clean:
+	-del *.obj 
+	-del less.exe
+	-del lesskey.exe
+

Copied: vendor/less/dist/Makefile.in (from r191923, vendor/less/dist/contrib/less/Makefile.in)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/less/dist/Makefile.in	Fri May  8 23:34:35 2009	(r191925, copy of r191923, vendor/less/dist/contrib/less/Makefile.in)
@@ -0,0 +1,120 @@
+# Makefile for less.
+
+#### Start of system configuration section. ####
+
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+CC = @CC@
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+CFLAGS = @CFLAGS@
+CFLAGS_COMPILE_ONLY = -c
+LDFLAGS = @LDFLAGS@
+CPPFLAGS = @CPPFLAGS@
+O=o
+
+LIBS = @LIBS@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+# Where the installed binary goes.
+bindir = @bindir@
+binprefix = 
+
+sysconfdir = @sysconfdir@
+datarootdir = @datarootdir@
+
+mandir = @mandir@
+manext = 1
+manprefix = 
+DESTDIR =
+
+#### End of system configuration section. ####
+
+SHELL = /bin/sh
+
+# This rule allows us to supply the necessary -D options
+# in addition to whatever the user asks for.
+.c.o:
+	${CC} -I. ${CFLAGS_COMPILE_ONLY} -DBINDIR=\"${bindir}\" -DSYSDIR=\"${sysconfdir}\" ${CPPFLAGS} ${CFLAGS} $<
+
+OBJ =	main.${O} screen.${O} brac.${O} ch.${O} charset.${O} cmdbuf.${O} \
+	command.${O} decode.${O} edit.${O} filename.${O} forwback.${O} \
+	help.${O} ifile.${O} input.${O} jump.${O} line.${O} linenum.${O} \
+	lsystem.${O} mark.${O} optfunc.${O} option.${O} opttbl.${O} os.${O} \
+	output.${O} position.${O} prompt.${O} search.${O} signal.${O} \
+	tags.${O} ttyin.${O} version.${O}  @REGEX_O@
+
+all: less lesskey lessecho
+
+less: ${OBJ}
+	${CC} ${LDFLAGS} -o $@ ${OBJ} ${LIBS}
+
+lesskey: lesskey.${O} version.${O}
+	${CC} ${LDFLAGS} -o $@ lesskey.${O} version.${O}
+
+lessecho: lessecho.${O} version.${O}
+	${CC} ${LDFLAGS} -o $@ lessecho.${O} version.${O}
+
+${OBJ}: ${srcdir}/less.h ${srcdir}/funcs.h defines.h 
+
+install: all ${srcdir}/less.nro ${srcdir}/lesskey.nro ${srcdir}/lessecho.nro installdirs
+	${INSTALL_PROGRAM} less ${DESTDIR}${bindir}/${binprefix}less
+	${INSTALL_PROGRAM} lesskey ${DESTDIR}${bindir}/${binprefix}lesskey
+	${INSTALL_PROGRAM} lessecho ${DESTDIR}${bindir}/${binprefix}lessecho
+	${INSTALL_DATA} ${srcdir}/less.nro ${DESTDIR}${mandir}/man${manext}/${manprefix}less.${manext}
+	${INSTALL_DATA} ${srcdir}/lesskey.nro ${DESTDIR}${mandir}/man${manext}/${manprefix}lesskey.${manext}
+	${INSTALL_DATA} ${srcdir}/lessecho.nro ${DESTDIR}${mandir}/man${manext}/${manprefix}lessecho.${manext}
+
+install-strip:
+	${MAKE} INSTALL_PROGRAM='${INSTALL_PROGRAM} -s' install
+
+installdirs: mkinstalldirs
+	${srcdir}/mkinstalldirs ${DESTDIR}${bindir} ${DESTDIR}${mandir}/man${manext}
+
+uninstall:
+	rm -f ${DESTDIR}${bindir}/${binprefix}less 
+	rm -f ${DESTDIR}${bindir}/${binprefix}lesskey
+	rm -f ${DESTDIR}${bindir}/${binprefix}lessecho
+	rm -f ${DESTDIR}${mandir}/man${manext}/${manprefix}less.${manext}
+	rm -f ${DESTDIR}${mandir}/man${manext}/${manprefix}lesskey.${manext}
+	rm -f ${DESTDIR}${mandir}/man${manext}/${manprefix}lessecho.${manext}
+
+info:
+install-info:
+dvi:
+check:
+installcheck:
+
+TAGS:
+	cd ${srcdir} && etags *.c *.h
+
+# config.status might not change defines.h
+# Don't rerun config.status if we just configured (so there's no stamp-h).
+defines.h: stamp-h
+stamp-h: defines.h.in config.status
+	test ! -f stamp-h || CONFIG_FILES= CONFIG_HEADERS=defines.h ./config.status
+	touch stamp-h
+Makefile: ${srcdir}/Makefile.in config.status

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 23:37:42 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 270A91065672;
	Fri,  8 May 2009 23:37:42 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EF9FB8FC19;
	Fri,  8 May 2009 23:37:41 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n48NbfOZ005722;
	Fri, 8 May 2009 23:37:41 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n48NbfaX005720;
	Fri, 8 May 2009 23:37:41 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <200905082337.n48NbfaX005720@svn.freebsd.org>
From: Xin LI 
Date: Fri, 8 May 2009 23:37:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191926 - head/contrib/less
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 23:37:42 -0000

Author: delphij
Date: Fri May  8 23:37:41 2009
New Revision: 191926
URL: http://svn.freebsd.org/changeset/base/191926

Log:
  Bootstrap merge history for less.

Modified:
  head/contrib/less/   (props changed)

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 23:45:28 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 16301106564A;
	Fri,  8 May 2009 23:45:27 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C15CE8FC0A;
	Fri,  8 May 2009 23:45:27 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n48NjRln005913;
	Fri, 8 May 2009 23:45:27 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n48NjRFC005909;
	Fri, 8 May 2009 23:45:27 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <200905082345.n48NjRFC005909@svn.freebsd.org>
From: Xin LI 
Date: Fri, 8 May 2009 23:45:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191927 - vendor/less/dist
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 23:45:28 -0000

Author: delphij
Date: Fri May  8 23:45:27 2009
New Revision: 191927
URL: http://svn.freebsd.org/changeset/base/191927

Log:
  Vendor import of less v429

Modified:
  vendor/less/dist/COPYING
  vendor/less/dist/LICENSE
  vendor/less/dist/Makefile.in
  vendor/less/dist/NEWS
  vendor/less/dist/README
  vendor/less/dist/brac.c
  vendor/less/dist/ch.c
  vendor/less/dist/charset.c
  vendor/less/dist/charset.h
  vendor/less/dist/cmd.h
  vendor/less/dist/cmdbuf.c
  vendor/less/dist/command.c
  vendor/less/dist/configure
  vendor/less/dist/configure.ac
  vendor/less/dist/decode.c
  vendor/less/dist/defines.ds
  vendor/less/dist/defines.o2
  vendor/less/dist/defines.o9
  vendor/less/dist/defines.wn
  vendor/less/dist/edit.c
  vendor/less/dist/filename.c
  vendor/less/dist/forwback.c
  vendor/less/dist/funcs.h
  vendor/less/dist/help.c
  vendor/less/dist/ifile.c
  vendor/less/dist/input.c
  vendor/less/dist/install.sh
  vendor/less/dist/jump.c
  vendor/less/dist/less.h
  vendor/less/dist/less.hlp
  vendor/less/dist/less.man
  vendor/less/dist/less.nro
  vendor/less/dist/lessecho.c
  vendor/less/dist/lessecho.man
  vendor/less/dist/lessecho.nro
  vendor/less/dist/lesskey.c
  vendor/less/dist/lesskey.h
  vendor/less/dist/lesskey.man
  vendor/less/dist/lesskey.nro
  vendor/less/dist/lglob.h
  vendor/less/dist/line.c
  vendor/less/dist/linenum.c
  vendor/less/dist/lsystem.c
  vendor/less/dist/main.c
  vendor/less/dist/mark.c
  vendor/less/dist/mkhelp.c
  vendor/less/dist/optfunc.c
  vendor/less/dist/option.c
  vendor/less/dist/option.h
  vendor/less/dist/opttbl.c
  vendor/less/dist/os.c
  vendor/less/dist/output.c
  vendor/less/dist/pckeys.h
  vendor/less/dist/position.c
  vendor/less/dist/position.h
  vendor/less/dist/prompt.c
  vendor/less/dist/screen.c
  vendor/less/dist/scrsize.c
  vendor/less/dist/search.c
  vendor/less/dist/signal.c
  vendor/less/dist/tags.c
  vendor/less/dist/ttyin.c
  vendor/less/dist/version.c

Modified: vendor/less/dist/COPYING
==============================================================================
--- vendor/less/dist/COPYING	Fri May  8 23:37:41 2009	(r191926)
+++ vendor/less/dist/COPYING	Fri May  8 23:45:27 2009	(r191927)
@@ -1,285 +1,626 @@
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
 
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Copyright (C) 2007 Free Software Foundation, Inc. 
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
-			    Preamble
+                            Preamble
 
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
 your programs, too.
 
   When we speak of free software, we are referring to freedom, not
 price.  Our General Public Licenses are designed to make sure that you
 have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
 
   For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
 
   The precise terms and conditions for copying, distribution and
 modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
 this License.
 
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
 otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
 
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
 be similar in spirit to the present version, but may differ in detail to
 address new problems or concerns.
 
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-	    How to Apply These Terms to Your New Programs
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
 
   If you develop a new program, and you want it to be of the greatest
 possible use to the public, the best way to achieve this is to make it
@@ -287,15 +628,15 @@ free software which everyone can redistr
 
   To do so, attach the following notices to the program.  It is safest
 to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
+state the exclusion of warranty; and each file should have at least
 the "copyright" line and a pointer to where the full notice is found.
 
     
     Copyright (C)   
 
-    This program is free software; you can redistribute it and/or modify
+    This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
+    the Free Software Foundation, either version 3 of the License, or
     (at your option) any later version.
 
     This program is distributed in the hope that it will be useful,
@@ -304,37 +645,30 @@ the "copyright" line and a pointer to wh
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
+    along with this program.  If not, see .
 
 Also add information on how to contact you by electronic and paper mail.
 
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
 
-    Gnomovision version 69, Copyright (C) year  name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+      Copyright (C)   
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
     This is free software, and you are welcome to redistribute it
     under certain conditions; type `show c' for details.
 
 The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  , 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+.

Modified: vendor/less/dist/LICENSE
==============================================================================
--- vendor/less/dist/LICENSE	Fri May  8 23:37:41 2009	(r191926)
+++ vendor/less/dist/LICENSE	Fri May  8 23:45:27 2009	(r191927)
@@ -2,7 +2,7 @@
                           ------------
 
 Less
-Copyright (C) 1984-2007  Mark Nudelman
+Copyright (C) 1984-2008  Mark Nudelman
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions

Modified: vendor/less/dist/Makefile.in
==============================================================================
--- vendor/less/dist/Makefile.in	Fri May  8 23:37:41 2009	(r191926)
+++ vendor/less/dist/Makefile.in	Fri May  8 23:45:27 2009	(r191927)
@@ -14,6 +14,7 @@ CFLAGS = @CFLAGS@
 CFLAGS_COMPILE_ONLY = -c
 LDFLAGS = @LDFLAGS@
 CPPFLAGS = @CPPFLAGS@
+EXEEXT = @EXEEXT@
 O=o
 
 LIBS = @LIBS@
@@ -49,23 +50,23 @@ OBJ =	main.${O} screen.${O} brac.${O} ch
 	output.${O} position.${O} prompt.${O} search.${O} signal.${O} \
 	tags.${O} ttyin.${O} version.${O}  @REGEX_O@
 
-all: less lesskey lessecho
+all: less$(EXEEXT) lesskey$(EXEEXT) lessecho$(EXEEXT)
 
-less: ${OBJ}
+less$(EXEEXT): ${OBJ}
 	${CC} ${LDFLAGS} -o $@ ${OBJ} ${LIBS}
 
-lesskey: lesskey.${O} version.${O}
+lesskey$(EXEEXT): lesskey.${O} version.${O}
 	${CC} ${LDFLAGS} -o $@ lesskey.${O} version.${O}

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Fri May  8 23:47:49 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BC80B106564A;
	Fri,  8 May 2009 23:47:49 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 90A1C8FC22;
	Fri,  8 May 2009 23:47:49 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n48NlnIW005986;
	Fri, 8 May 2009 23:47:49 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n48Nln0a005985;
	Fri, 8 May 2009 23:47:49 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <200905082347.n48Nln0a005985@svn.freebsd.org>
From: Xin LI 
Date: Fri, 8 May 2009 23:47:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191928 - vendor/less/v429
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 08 May 2009 23:47:50 -0000

Author: delphij
Date: Fri May  8 23:47:49 2009
New Revision: 191928
URL: http://svn.freebsd.org/changeset/base/191928

Log:
  Tag for less v429.

Added:
  vendor/less/v429/
     - copied from r191927, vendor/less/dist/

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 00:35:39 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4BDC5106564A;
	Sat,  9 May 2009 00:35:39 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3788F8FC20;
	Sat,  9 May 2009 00:35:39 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n490Zc6C006956;
	Sat, 9 May 2009 00:35:38 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n490Zcal006955;
	Sat, 9 May 2009 00:35:38 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <200905090035.n490Zcal006955@svn.freebsd.org>
From: Xin LI 
Date: Sat, 9 May 2009 00:35:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191929 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 00:35:41 -0000

Author: delphij
Date: Sat May  9 00:35:38 2009
New Revision: 191929
URL: http://svn.freebsd.org/changeset/base/191929

Log:
  MFC r176093 (glebius):
  
  If the vhid already present, return EEXIST instead of
  non-informative EINVAL.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/netinet/ip_carp.c

Modified: stable/7/sys/netinet/ip_carp.c
==============================================================================
--- stable/7/sys/netinet/ip_carp.c	Fri May  8 23:47:49 2009	(r191928)
+++ stable/7/sys/netinet/ip_carp.c	Sat May  9 00:35:38 2009	(r191929)
@@ -1534,7 +1534,7 @@ carp_set_addr(struct carp_softc *sc, str
 		TAILQ_FOREACH(vr, &cif->vhif_vrs, sc_list)
 			if (vr != sc && vr->sc_vhid == sc->sc_vhid) {
 				CARP_UNLOCK(cif);
-				error = EINVAL;
+				error = EEXIST;
 				goto cleanup;
 			}
 	}

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 01:35:28 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 53F82106566C;
	Sat,  9 May 2009 01:35:28 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 404F08FC1C;
	Sat,  9 May 2009 01:35:28 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n491ZSRn008190;
	Sat, 9 May 2009 01:35:28 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n491ZSmw008187;
	Sat, 9 May 2009 01:35:28 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <200905090135.n491ZSmw008187@svn.freebsd.org>
From: Xin LI 
Date: Sat, 9 May 2009 01:35:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191930 - head/contrib/less
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 01:35:28 -0000

Author: delphij
Date: Sat May  9 01:35:27 2009
New Revision: 191930
URL: http://svn.freebsd.org/changeset/base/191930

Log:
  Update to less v429.

Modified:
  head/contrib/less/   (props changed)
  head/contrib/less/COPYING
  head/contrib/less/FREEBSD-upgrade
  head/contrib/less/LICENSE
  head/contrib/less/Makefile.in
  head/contrib/less/NEWS
  head/contrib/less/README
  head/contrib/less/brac.c
  head/contrib/less/ch.c
  head/contrib/less/charset.c
  head/contrib/less/charset.h
  head/contrib/less/cmd.h
  head/contrib/less/cmdbuf.c
  head/contrib/less/command.c
  head/contrib/less/configure
  head/contrib/less/configure.ac
  head/contrib/less/decode.c
  head/contrib/less/defines.ds
  head/contrib/less/defines.o2
  head/contrib/less/defines.o9
  head/contrib/less/defines.wn
  head/contrib/less/edit.c
  head/contrib/less/filename.c
  head/contrib/less/forwback.c
  head/contrib/less/funcs.h
  head/contrib/less/help.c
  head/contrib/less/ifile.c
  head/contrib/less/input.c
  head/contrib/less/install.sh
  head/contrib/less/jump.c
  head/contrib/less/less.h
  head/contrib/less/less.hlp
  head/contrib/less/less.man
  head/contrib/less/less.nro
  head/contrib/less/lessecho.c
  head/contrib/less/lessecho.man
  head/contrib/less/lessecho.nro
  head/contrib/less/lesskey.c
  head/contrib/less/lesskey.h
  head/contrib/less/lesskey.man
  head/contrib/less/lesskey.nro
  head/contrib/less/lglob.h
  head/contrib/less/line.c
  head/contrib/less/linenum.c
  head/contrib/less/lsystem.c
  head/contrib/less/main.c
  head/contrib/less/mark.c
  head/contrib/less/mkhelp.c
  head/contrib/less/optfunc.c
  head/contrib/less/option.c
  head/contrib/less/option.h
  head/contrib/less/opttbl.c
  head/contrib/less/os.c
  head/contrib/less/output.c
  head/contrib/less/pckeys.h
  head/contrib/less/position.c
  head/contrib/less/position.h
  head/contrib/less/prompt.c
  head/contrib/less/screen.c
  head/contrib/less/scrsize.c
  head/contrib/less/search.c
  head/contrib/less/signal.c
  head/contrib/less/tags.c
  head/contrib/less/ttyin.c
  head/contrib/less/version.c

Modified: head/contrib/less/COPYING
==============================================================================
--- head/contrib/less/COPYING	Sat May  9 00:35:38 2009	(r191929)
+++ head/contrib/less/COPYING	Sat May  9 01:35:27 2009	(r191930)
@@ -1,285 +1,626 @@
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
 
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Copyright (C) 2007 Free Software Foundation, Inc. 
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
-			    Preamble
+                            Preamble
 
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
 your programs, too.
 
   When we speak of free software, we are referring to freedom, not
 price.  Our General Public Licenses are designed to make sure that you
 have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
 
   For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
 
   The precise terms and conditions for copying, distribution and
 modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
 this License.
 
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
 otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
 
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
 be similar in spirit to the present version, but may differ in detail to
 address new problems or concerns.
 
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-	    How to Apply These Terms to Your New Programs
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
 
   If you develop a new program, and you want it to be of the greatest
 possible use to the public, the best way to achieve this is to make it
@@ -287,15 +628,15 @@ free software which everyone can redistr
 
   To do so, attach the following notices to the program.  It is safest
 to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
+state the exclusion of warranty; and each file should have at least
 the "copyright" line and a pointer to where the full notice is found.
 
     
     Copyright (C)   
 
-    This program is free software; you can redistribute it and/or modify
+    This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
+    the Free Software Foundation, either version 3 of the License, or
     (at your option) any later version.
 
     This program is distributed in the hope that it will be useful,
@@ -304,37 +645,30 @@ the "copyright" line and a pointer to wh
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
+    along with this program.  If not, see .
 
 Also add information on how to contact you by electronic and paper mail.
 
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
 
-    Gnomovision version 69, Copyright (C) year  name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+      Copyright (C)   
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
     This is free software, and you are welcome to redistribute it
     under certain conditions; type `show c' for details.
 
 The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  , 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+.

Modified: head/contrib/less/FREEBSD-upgrade
==============================================================================
--- head/contrib/less/FREEBSD-upgrade	Sat May  9 00:35:38 2009	(r191929)
+++ head/contrib/less/FREEBSD-upgrade	Sat May  9 01:35:27 2009	(r191930)
@@ -2,23 +2,26 @@ $FreeBSD$
 
  1. Download latest less(1) tarball.  The homepage of less(1) is at:
 	http://www.greenwoodsoftware.com/less/
- 2. Export the tarball into a directory, (say "v-less").
- 3. Checkout our contrib/less code into another directory (say "f-less"),
-    with -rLESS.
- 4. Copy v-less/ files over f-less, check if there is any files that is
-    removed by vendor, or newly added, note them.
- 5. do cvs up -A in f-less, resolve the conflicts.
- 6. Regenerate defines.h:
+ 2. Checkout $FSVN/vendor/less/ into less/
+ 3. Extract new code to, say, less/lessv429
+ 4. cd less/dist
+ 5. svn list -R | grep -v '/$' | sort >../old
+ 6. cd ../lessv429
+ 7. find . -type f | cut -c 3- | sort >../new
+ 8. tar cf - . | tar xf - -C ../dist
+ 9. cd ../dist
+10. comm -23 ../old ../new | xargs svn rm
+11. comm -13 ../old ../new | xargs svn add
+12. Check svn status output and make sure that all changes are appropriate.
+13. Commit and tag the result.
+14. Resolve any conflicts that happen in head/contrib/less.
+15. Regenerate defines.h:
 	./configure --prefix=/ --bindir=/usr/bin --sbindir=/usr/sbin \
 		    --libexecdir=/usr/libexec --datarootdir=/usr/share
- 7. Manually merge changes into src/usr.bin/less/defines.h; adjust
+16. Manually merge changes into src/usr.bin/less/defines.h; adjust
     Makefile glue to reflect added/removed files.
- 8. Replace your src/contrib/less with the merged copy, and do a ``make
+17. Replace your src/contrib/less with the merged copy, and do a ``make
     universe'' to make sure that nothing was broken;

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 01:45:56 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 49BC7106564A;
	Sat,  9 May 2009 01:45:56 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 338E08FC08;
	Sat,  9 May 2009 01:45:56 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n491ju92008423;
	Sat, 9 May 2009 01:45:56 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n491jtfC008415;
	Sat, 9 May 2009 01:45:55 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <200905090145.n491jtfC008415@svn.freebsd.org>
From: Kip Macy 
Date: Sat, 9 May 2009 01:45:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191931 - in head/sys:
	cddl/contrib/opensolaris/common/acl
	cddl/contrib/opensolaris/common/atomic/amd64
	cddl/contrib/opensolaris/common/atomic/i386
	cddl/contrib/opensolaris/common/atomi...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 01:45:56 -0000

Author: kmacy
Date: Sat May  9 01:45:55 2009
New Revision: 191931
URL: http://svn.freebsd.org/changeset/base/191931

Log:
  - rename atomic.S and crc32.c to avoid collisions when linking zfs in to the kernel
  - update Makefile
  - ifdef out acl_{alloc, free}, they aren't used by zfs and conflict with existing in-kernel routines

Added:
  head/sys/cddl/contrib/opensolaris/common/atomic/amd64/opensolaris_atomic.S   (props changed)
     - copied unchanged from r191903, head/sys/cddl/contrib/opensolaris/common/atomic/amd64/atomic.S
  head/sys/cddl/contrib/opensolaris/common/atomic/i386/opensolaris_atomic.S   (props changed)
     - copied unchanged from r191903, head/sys/cddl/contrib/opensolaris/common/atomic/i386/atomic.S
  head/sys/cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S   (props changed)
     - copied unchanged from r191903, head/sys/cddl/contrib/opensolaris/common/atomic/ia64/atomic.S
  head/sys/cddl/contrib/opensolaris/common/atomic/sparc64/opensolaris_atomic.S   (props changed)
     - copied unchanged from r191903, head/sys/cddl/contrib/opensolaris/common/atomic/sparc64/atomic.S
  head/sys/cddl/contrib/opensolaris/uts/common/zmod/opensolaris_crc32.c   (props changed)
     - copied unchanged from r191903, head/sys/cddl/contrib/opensolaris/uts/common/zmod/crc32.c
Deleted:
  head/sys/cddl/contrib/opensolaris/common/atomic/amd64/atomic.S
  head/sys/cddl/contrib/opensolaris/common/atomic/i386/atomic.S
  head/sys/cddl/contrib/opensolaris/common/atomic/ia64/atomic.S
  head/sys/cddl/contrib/opensolaris/common/atomic/sparc64/atomic.S
  head/sys/cddl/contrib/opensolaris/uts/common/zmod/crc32.c
Modified:
  head/sys/cddl/contrib/opensolaris/common/acl/acl_common.c
  head/sys/modules/zfs/Makefile

Modified: head/sys/cddl/contrib/opensolaris/common/acl/acl_common.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/common/acl/acl_common.c	Sat May  9 01:35:27 2009	(r191930)
+++ head/sys/cddl/contrib/opensolaris/common/acl/acl_common.c	Sat May  9 01:45:55 2009	(r191931)
@@ -424,6 +424,7 @@ cacl_free(void *ptr, size_t size)
 #endif
 }
 
+#ifndef __FreeBSD__
 acl_t *
 acl_alloc(enum acl_type type)
 {
@@ -469,6 +470,7 @@ acl_free(acl_t *aclp)
 
 	cacl_free(aclp, sizeof (acl_t));
 }
+#endif
 
 static uint32_t
 access_mask_set(int haswriteperm, int hasreadperm, int isowner, int isallow)

Copied: head/sys/cddl/contrib/opensolaris/common/atomic/amd64/opensolaris_atomic.S (from r191903, head/sys/cddl/contrib/opensolaris/common/atomic/amd64/atomic.S)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/cddl/contrib/opensolaris/common/atomic/amd64/opensolaris_atomic.S	Sat May  9 01:45:55 2009	(r191931, copy of r191903, head/sys/cddl/contrib/opensolaris/common/atomic/amd64/atomic.S)
@@ -0,0 +1,66 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+	.file	"atomic.s"
+
+#define	_ASM
+#include 
+
+	ENTRY(atomic_add_64_nv)
+	movq	(%rdi), %rax
+1:
+	movq	%rsi, %rcx
+	addq	%rax, %rcx
+	lock
+	cmpxchgq %rcx, (%rdi)
+	jne	1b
+	movq	%rcx, %rax
+	ret
+	SET_SIZE(atomic_add_64_nv)
+
+	ENTRY(atomic_or_8_nv)
+	movb	(%rdi), %al	// %al = old value
+1:
+	movb	%sil, %cl
+	orb	%al, %cl	// %cl = new value
+	lock
+	cmpxchgb %cl, (%rdi)	// try to stick it in
+	jne	1b
+	movzbl	%cl, %eax	// return new value
+	ret
+	SET_SIZE(atomic_or_8_nv)
+
+	ENTRY(atomic_cas_64)
+	movq	%rsi, %rax
+	lock
+	cmpxchgq %rdx, (%rdi)
+	ret
+	SET_SIZE(atomic_cas_64)
+
+	ENTRY(membar_producer)
+	sfence
+	ret
+	SET_SIZE(membar_producer)

Copied: head/sys/cddl/contrib/opensolaris/common/atomic/i386/opensolaris_atomic.S (from r191903, head/sys/cddl/contrib/opensolaris/common/atomic/i386/atomic.S)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/cddl/contrib/opensolaris/common/atomic/i386/opensolaris_atomic.S	Sat May  9 01:45:55 2009	(r191931, copy of r191903, head/sys/cddl/contrib/opensolaris/common/atomic/i386/atomic.S)
@@ -0,0 +1,133 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+	.file	"atomic.s"
+
+#define	_ASM
+#include 
+
+	/*
+	 * NOTE: If atomic_dec_64 and atomic_dec_64_nv are ever
+	 * separated, it is important to edit the libc i386 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_dec_64_nv.
+	 */
+	ENTRY(atomic_dec_64)
+	ALTENTRY(atomic_dec_64_nv)
+	pushl	%edi
+	pushl	%ebx
+	movl	12(%esp), %edi	// %edi = target address
+	movl	(%edi), %eax
+	movl	4(%edi), %edx	// %edx:%eax = old value
+1:
+	xorl	%ebx, %ebx
+	xorl	%ecx, %ecx
+	not	%ecx
+	not	%ebx		// %ecx:%ebx = -1
+	addl	%eax, %ebx
+	adcl	%edx, %ecx	// add in the carry from inc
+	lock
+	cmpxchg8b (%edi)	// try to stick it in
+	jne	1b
+	movl	%ebx, %eax
+	movl	%ecx, %edx	// return new value
+	popl	%ebx
+	popl	%edi
+	ret
+	SET_SIZE(atomic_dec_64_nv)
+	SET_SIZE(atomic_dec_64)
+
+	/*
+	 * NOTE: If atomic_add_64 and atomic_add_64_nv are ever
+	 * separated, it is important to edit the libc i386 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_add_64_nv.
+	 */
+	ENTRY(atomic_add_64)
+	ALTENTRY(atomic_add_64_nv)
+	pushl	%edi
+	pushl	%ebx
+	movl	12(%esp), %edi	// %edi = target address
+	movl	(%edi), %eax
+	movl	4(%edi), %edx	// %edx:%eax = old value
+1:
+	movl	16(%esp), %ebx
+	movl	20(%esp), %ecx	// %ecx:%ebx = delta
+	addl	%eax, %ebx
+	adcl	%edx, %ecx	// %ecx:%ebx = new value
+	lock
+	cmpxchg8b (%edi)	// try to stick it in
+	jne	1b
+	movl	%ebx, %eax
+	movl	%ecx, %edx	// return new value
+	popl	%ebx
+	popl	%edi
+	ret
+	SET_SIZE(atomic_add_64_nv)
+	SET_SIZE(atomic_add_64)
+
+	ENTRY(atomic_or_8_nv)
+	movl	4(%esp), %edx	// %edx = target address
+	movb	(%edx), %al	// %al = old value
+1:
+	movl	8(%esp), %ecx	// %ecx = delta
+	orb	%al, %cl	// %cl = new value
+	lock
+	cmpxchgb %cl, (%edx)	// try to stick it in
+	jne	1b
+	movzbl	%cl, %eax	// return new value
+	ret
+	SET_SIZE(atomic_or_8_nv)
+
+	ENTRY(atomic_cas_ptr)
+	movl	4(%esp), %edx
+	movl	8(%esp), %eax
+	movl	12(%esp), %ecx
+	lock
+	cmpxchgl %ecx, (%edx)
+	ret
+	SET_SIZE(atomic_cas_ptr)
+
+	ENTRY(atomic_cas_64)
+	pushl	%ebx
+	pushl	%esi
+	movl	12(%esp), %esi
+	movl	16(%esp), %eax
+	movl	20(%esp), %edx
+	movl	24(%esp), %ebx
+	movl	28(%esp), %ecx
+	lock
+	cmpxchg8b (%esi)
+	popl	%esi
+	popl	%ebx
+	ret
+	SET_SIZE(atomic_cas_64)
+
+	ENTRY(membar_producer)
+	lock
+	xorl	$0, (%esp)
+	ret
+	SET_SIZE(membar_producer)

Copied: head/sys/cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S (from r191903, head/sys/cddl/contrib/opensolaris/common/atomic/ia64/atomic.S)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S	Sat May  9 01:45:55 2009	(r191931, copy of r191903, head/sys/cddl/contrib/opensolaris/common/atomic/ia64/atomic.S)
@@ -0,0 +1,82 @@
+/*-
+ * Copyright (c) 2007 Marcel Moolenaar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include 
+
+	.text
+
+/*
+ * uint64_t atomic_cas_64(volatile uint64_t *p, uint64_t cmp, uint64_t v)
+ */
+ENTRY(atomic_cas_64, 3)
+	mov             ar.ccv = r33
+	;;
+	cmpxchg8.acq    r8 = [r32], r34, ar.ccv
+	;;
+	br.ret.sptk     rp
+END(atomic_cas_64)
+
+/*
+ * uint64_t atomic_add_64_nv(volatile uint64_t *p, uint64_t v)
+ */
+ENTRY(atomic_add_64_nv, 2)
+1:
+	ld8		r16 = [r32]
+	;;
+	mov		ar.ccv = r16
+	add		r8 = r16, r33
+	;;
+	cmpxchg8.acq	r17 = [r32], r8, ar.ccv
+	;;
+	cmp.eq		p6, p7 = r16, r17
+(p6)	br.ret.sptk	rp
+(p7)	br.cond.spnt	1b
+END(atomic_add_64_nv)
+
+/*
+ * uint8_t atomic_or_8_nv(volatile uint8_t *p, uint8_t v)
+ */
+ENTRY(atomic_or_8_nv, 2)
+1:
+	ld8		r16 = [r32]
+	;;
+	mov		ar.ccv = r16
+	or		r8 = r16, r33
+	;;
+	cmpxchg1.acq	r17 = [r32], r8, ar.ccv
+	;;
+	cmp.eq		p6, p7 = r16, r17
+(p6)	br.ret.sptk	rp
+(p7)	br.cond.spnt	1b
+END(atomic_or_8_nv)
+
+ENTRY(membar_producer, 0)
+	mf.a
+	;;
+	br.ret.sptk	rp
+END(membar_producer)

Copied: head/sys/cddl/contrib/opensolaris/common/atomic/sparc64/opensolaris_atomic.S (from r191903, head/sys/cddl/contrib/opensolaris/common/atomic/sparc64/atomic.S)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/cddl/contrib/opensolaris/common/atomic/sparc64/opensolaris_atomic.S	Sat May  9 01:45:55 2009	(r191931, copy of r191903, head/sys/cddl/contrib/opensolaris/common/atomic/sparc64/atomic.S)
@@ -0,0 +1,115 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+	.ident	"%Z%%M%	%I%	%E% SMI"
+
+	.file	"%M%"
+
+#define	_ASM
+#include 
+
+#include 
+
+/* Userland needs different ASIs. */
+#ifdef _KERNEL
+#define	__ASI_ATOMIC	ASI_N
+#else
+#define	__ASI_ATOMIC	ASI_P
+#endif
+
+	/*
+	 * NOTE: If atomic_add_64 and atomic_add_64_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_add_64_nv.
+	 */
+	ENTRY(atomic_add_64)
+	ALTENTRY(atomic_add_64_nv)
+	ALTENTRY(atomic_add_ptr)
+	ALTENTRY(atomic_add_ptr_nv)
+	ALTENTRY(atomic_add_long)
+	ALTENTRY(atomic_add_long_nv)
+add_64:
+	ldx	[%o0], %o2
+1:
+	add	%o2, %o1, %o3
+	casxa	[%o0] __ASI_ATOMIC, %o2, %o3
+	cmp	%o2, %o3
+	bne,a,pn %xcc, 1b
+	  mov	%o3, %o2
+	retl
+	add	%o2, %o1, %o0		! return new value
+	SET_SIZE(atomic_add_long_nv)
+	SET_SIZE(atomic_add_long)
+	SET_SIZE(atomic_add_ptr_nv)
+	SET_SIZE(atomic_add_ptr)
+	SET_SIZE(atomic_add_64_nv)
+	SET_SIZE(atomic_add_64)
+
+	/*
+	 * NOTE: If atomic_or_8 and atomic_or_8_nv are ever
+	 * separated, you need to also edit the libc sparcv9 platform
+	 * specific mapfile and remove the NODYNSORT attribute
+	 * from atomic_or_8_nv.
+	 */
+	ENTRY(atomic_or_8)
+	ALTENTRY(atomic_or_8_nv)
+	ALTENTRY(atomic_or_uchar)
+	ALTENTRY(atomic_or_uchar_nv)
+	and	%o0, 0x3, %o4		! %o4 = byte offset, left-to-right
+	xor	%o4, 0x3, %g1		! %g1 = byte offset, right-to-left
+	sll	%g1, 3, %g1		! %g1 = bit offset, right-to-left
+	set	0xff, %o3		! %o3 = mask
+	sll	%o3, %g1, %o3		! %o3 = shifted to bit offset
+	sll	%o1, %g1, %o1		! %o1 = shifted to bit offset
+	and	%o1, %o3, %o1		! %o1 = single byte value
+	andn	%o0, 0x3, %o0		! %o0 = word address
+	ld	[%o0], %o2		! read old value
+1:
+	or	%o2, %o1, %o5		! or in the new value
+	casa	[%o0] __ASI_ATOMIC, %o2, %o5
+	cmp	%o2, %o5
+	bne,a,pn %icc, 1b
+	  mov	%o5, %o2		! %o2 = old value
+	or	%o2, %o1, %o5
+	and	%o5, %o3, %o5
+	retl
+	srl	%o5, %g1, %o0		! %o0 = new value
+	SET_SIZE(atomic_or_uchar_nv)
+	SET_SIZE(atomic_or_uchar)
+	SET_SIZE(atomic_or_8_nv)
+	SET_SIZE(atomic_or_8)
+
+	/*
+	 * Spitfires and Blackbirds have a problem with membars in the
+	 * delay slot (SF_ERRATA_51).  For safety's sake, we assume
+	 * that the whole world needs the workaround.
+	 */
+
+	ENTRY(membar_producer)
+	membar	#StoreStore
+	retl
+	nop
+	SET_SIZE(membar_producer)

Copied: head/sys/cddl/contrib/opensolaris/uts/common/zmod/opensolaris_crc32.c (from r191903, head/sys/cddl/contrib/opensolaris/uts/common/zmod/crc32.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/cddl/contrib/opensolaris/uts/common/zmod/opensolaris_crc32.c	Sat May  9 01:45:55 2009	(r191931, copy of r191903, head/sys/cddl/contrib/opensolaris/uts/common/zmod/crc32.c)
@@ -0,0 +1,428 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/* crc32.c -- compute the CRC-32 of a data stream
+ * Copyright (C) 1995-2005 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ *
+ * Thanks to Rodney Brown  for his contribution of faster
+ * CRC methods: exclusive-oring 32 bits of data at a time, and pre-computing
+ * tables for updating the shift register in one step with three exclusive-ors
+ * instead of four steps with four exclusive-ors.  This results in about a
+ * factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3.
+ */
+
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
+/*
+  Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore
+  protection on the static variables used to control the first-use generation
+  of the crc tables.  Therefore, if you #define DYNAMIC_CRC_TABLE, you should
+  first call get_crc_table() to initialize the tables before allowing more than
+  one thread to use crc32().
+ */
+
+#ifdef MAKECRCH
+#  include 
+#  ifndef DYNAMIC_CRC_TABLE
+#    define DYNAMIC_CRC_TABLE
+#  endif /* !DYNAMIC_CRC_TABLE */
+#endif /* MAKECRCH */
+
+#include "zutil.h"      /* for STDC and FAR definitions */
+
+#define local static
+
+/* Find a four-byte integer type for crc32_little() and crc32_big(). */
+#ifndef NOBYFOUR
+#  ifdef STDC           /* need ANSI C limits.h to determine sizes */
+#    include 
+#    define BYFOUR
+#    if (UINT_MAX == 0xffffffffUL)
+       typedef unsigned int u4;
+#    else
+#      if (ULONG_MAX == 0xffffffffUL)
+         typedef unsigned long u4;
+#      else
+#        if (USHRT_MAX == 0xffffffffUL)
+           typedef unsigned short u4;
+#        else
+#          undef BYFOUR     /* can't find a four-byte integer type! */
+#        endif
+#      endif
+#    endif
+#  endif /* STDC */
+#endif /* !NOBYFOUR */
+
+/* Definitions for doing the crc four data bytes at a time. */
+#ifdef BYFOUR
+#  define REV(w) (((w)>>24)+(((w)>>8)&0xff00)+ \
+                (((w)&0xff00)<<8)+(((w)&0xff)<<24))
+   local unsigned long crc32_little OF((unsigned long,
+                        const unsigned char FAR *, unsigned));
+   local unsigned long crc32_big OF((unsigned long,
+                        const unsigned char FAR *, unsigned));
+#  define TBLS 8
+#else
+#  define TBLS 1
+#endif /* BYFOUR */
+
+/* Local functions for crc concatenation */
+local unsigned long gf2_matrix_times OF((unsigned long *mat,
+                                         unsigned long vec));
+local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat));
+
+#ifdef DYNAMIC_CRC_TABLE
+
+local volatile int crc_table_empty = 1;
+local unsigned long FAR crc_table[TBLS][256];
+local void make_crc_table OF((void));
+#ifdef MAKECRCH
+   local void write_table OF((FILE *, const unsigned long FAR *));
+#endif /* MAKECRCH */
+/*
+  Generate tables for a byte-wise 32-bit CRC calculation on the polynomial:
+  x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1.
+
+  Polynomials over GF(2) are represented in binary, one bit per coefficient,
+  with the lowest powers in the most significant bit.  Then adding polynomials
+  is just exclusive-or, and multiplying a polynomial by x is a right shift by
+  one.  If we call the above polynomial p, and represent a byte as the
+  polynomial q, also with the lowest power in the most significant bit (so the
+  byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,
+  where a mod b means the remainder after dividing a by b.
+
+  This calculation is done using the shift-register method of multiplying and
+  taking the remainder.  The register is initialized to zero, and for each
+  incoming bit, x^32 is added mod p to the register if the bit is a one (where
+  x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by
+  x (which is shifting right by one and adding x^32 mod p if the bit shifted
+  out is a one).  We start with the highest power (least significant bit) of
+  q and repeat for all eight bits of q.
+
+  The first table is simply the CRC of all possible eight bit values.  This is
+  all the information needed to generate CRCs on data a byte at a time for all
+  combinations of CRC register values and incoming bytes.  The remaining tables
+  allow for word-at-a-time CRC calculation for both big-endian and little-
+  endian machines, where a word is four bytes.
+*/
+local void make_crc_table()
+{
+    unsigned long c;
+    int n, k;
+    unsigned long poly;                 /* polynomial exclusive-or pattern */
+    /* terms of polynomial defining this crc (except x^32): */
+    static volatile int first = 1;      /* flag to limit concurrent making */
+    static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
+
+    /* See if another task is already doing this (not thread-safe, but better
+       than nothing -- significantly reduces duration of vulnerability in
+       case the advice about DYNAMIC_CRC_TABLE is ignored) */
+    if (first) {
+        first = 0;
+
+        /* make exclusive-or pattern from polynomial (0xedb88320UL) */
+        poly = 0UL;
+        for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++)
+            poly |= 1UL << (31 - p[n]);
+
+        /* generate a crc for every 8-bit value */
+        for (n = 0; n < 256; n++) {
+            c = (unsigned long)n;
+            for (k = 0; k < 8; k++)
+                c = c & 1 ? poly ^ (c >> 1) : c >> 1;
+            crc_table[0][n] = c;
+        }
+
+#ifdef BYFOUR
+        /* generate crc for each value followed by one, two, and three zeros,
+           and then the byte reversal of those as well as the first table */
+        for (n = 0; n < 256; n++) {
+            c = crc_table[0][n];
+            crc_table[4][n] = REV(c);
+            for (k = 1; k < 4; k++) {
+                c = crc_table[0][c & 0xff] ^ (c >> 8);
+                crc_table[k][n] = c;
+                crc_table[k + 4][n] = REV(c);
+            }
+        }
+#endif /* BYFOUR */
+
+        crc_table_empty = 0;
+    }
+    else {      /* not first */
+        /* wait for the other guy to finish (not efficient, but rare) */
+        while (crc_table_empty)
+            ;
+    }
+
+#ifdef MAKECRCH
+    /* write out CRC tables to crc32.h */
+    {
+        FILE *out;
+
+        out = fopen("crc32.h", "w");
+        if (out == NULL) return;
+        fprintf(out, "/* crc32.h -- tables for rapid CRC calculation\n");
+        fprintf(out, " * Generated automatically by crc32.c\n */\n\n");
+        fprintf(out, "local const unsigned long FAR ");
+        fprintf(out, "crc_table[TBLS][256] =\n{\n  {\n");
+        write_table(out, crc_table[0]);
+#  ifdef BYFOUR
+        fprintf(out, "#ifdef BYFOUR\n");
+        for (k = 1; k < 8; k++) {
+            fprintf(out, "  },\n  {\n");
+            write_table(out, crc_table[k]);
+        }
+        fprintf(out, "#endif\n");
+#  endif /* BYFOUR */
+        fprintf(out, "  }\n};\n");
+        fclose(out);
+    }
+#endif /* MAKECRCH */
+}
+
+#ifdef MAKECRCH
+local void write_table(out, table)
+    FILE *out;
+    const unsigned long FAR *table;
+{
+    int n;
+
+    for (n = 0; n < 256; n++)
+        fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : "    ", table[n],
+                n == 255 ? "\n" : (n % 5 == 4 ? ",\n" : ", "));
+}
+#endif /* MAKECRCH */
+
+#else /* !DYNAMIC_CRC_TABLE */
+/* ========================================================================
+ * Tables of CRC-32s of all single-byte values, made by make_crc_table().
+ */
+#include "crc32.h"
+#endif /* DYNAMIC_CRC_TABLE */
+
+/* =========================================================================
+ * This function can be used by asm versions of crc32()
+ */
+const unsigned long FAR * ZEXPORT get_crc_table()
+{
+#ifdef DYNAMIC_CRC_TABLE
+    if (crc_table_empty)
+        make_crc_table();
+#endif /* DYNAMIC_CRC_TABLE */
+    return (const unsigned long FAR *)crc_table;
+}
+
+/* ========================================================================= */
+#define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
+#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1
+
+/* ========================================================================= */
+unsigned long ZEXPORT crc32(crc, buf, len)
+    unsigned long crc;
+    const unsigned char FAR *buf;
+    unsigned len;
+{
+    if (buf == Z_NULL) return 0UL;
+
+#ifdef DYNAMIC_CRC_TABLE
+    if (crc_table_empty)
+        make_crc_table();
+#endif /* DYNAMIC_CRC_TABLE */
+
+#ifdef BYFOUR
+    if (sizeof(void *) == sizeof(ptrdiff_t)) {
+        u4 endian;
+
+        endian = 1;
+        if (*((unsigned char *)(&endian)))
+            return crc32_little(crc, buf, len);
+        else
+            return crc32_big(crc, buf, len);
+    }
+#endif /* BYFOUR */
+    crc = crc ^ 0xffffffffUL;
+    while (len >= 8) {
+        DO8;
+        len -= 8;
+    }
+    if (len) do {
+        DO1;
+    } while (--len);
+    return crc ^ 0xffffffffUL;
+}
+
+#ifdef BYFOUR
+
+/* ========================================================================= */
+#define DOLIT4 c ^= *buf4++; \
+        c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \
+            crc_table[1][(c >> 16) & 0xff] ^ crc_table[0][c >> 24]
+#define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4
+
+/* ========================================================================= */
+local unsigned long crc32_little(crc, buf, len)
+    unsigned long crc;
+    const unsigned char FAR *buf;
+    unsigned len;
+{
+    register u4 c;
+    register const u4 FAR *buf4;
+
+    c = (u4)crc;
+    c = ~c;
+    while (len && ((ptrdiff_t)buf & 3)) {
+        c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
+        len--;
+    }
+
+    buf4 = (const u4 FAR *)(const void FAR *)buf;
+    while (len >= 32) {
+        DOLIT32;
+        len -= 32;
+    }
+    while (len >= 4) {
+        DOLIT4;
+        len -= 4;
+    }
+    buf = (const unsigned char FAR *)buf4;
+
+    if (len) do {
+        c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
+    } while (--len);
+    c = ~c;
+    return (unsigned long)c;
+}
+
+/* ========================================================================= */
+#define DOBIG4 c ^= *++buf4; \
+        c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \
+            crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24]
+#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4
+
+/* ========================================================================= */
+local unsigned long crc32_big(crc, buf, len)
+    unsigned long crc;
+    const unsigned char FAR *buf;
+    unsigned len;
+{
+    register u4 c;
+    register const u4 FAR *buf4;
+
+    c = REV((u4)crc);
+    c = ~c;
+    while (len && ((ptrdiff_t)buf & 3)) {
+        c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
+        len--;
+    }
+
+    buf4 = (const u4 FAR *)(const void FAR *)buf;
+    buf4--;
+    while (len >= 32) {
+        DOBIG32;
+        len -= 32;
+    }
+    while (len >= 4) {
+        DOBIG4;
+        len -= 4;
+    }
+    buf4++;
+    buf = (const unsigned char FAR *)buf4;
+
+    if (len) do {
+        c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
+    } while (--len);
+    c = ~c;
+    return (unsigned long)(REV(c));
+}
+
+#endif /* BYFOUR */
+
+#define GF2_DIM 32      /* dimension of GF(2) vectors (length of CRC) */
+
+/* ========================================================================= */
+local unsigned long gf2_matrix_times(mat, vec)
+    unsigned long *mat;
+    unsigned long vec;
+{
+    unsigned long sum;
+
+    sum = 0;
+    while (vec) {
+        if (vec & 1)
+            sum ^= *mat;
+        vec >>= 1;
+        mat++;
+    }
+    return sum;
+}
+
+/* ========================================================================= */
+local void gf2_matrix_square(square, mat)
+    unsigned long *square;
+    unsigned long *mat;
+{
+    int n;
+
+    for (n = 0; n < GF2_DIM; n++)
+        square[n] = gf2_matrix_times(mat, mat[n]);
+}
+
+/* ========================================================================= */
+uLong ZEXPORT crc32_combine(crc1, crc2, len2)
+    uLong crc1;
+    uLong crc2;
+    z_off_t len2;
+{
+    int n;
+    unsigned long row;
+    unsigned long even[GF2_DIM];    /* even-power-of-two zeros operator */
+    unsigned long odd[GF2_DIM];     /* odd-power-of-two zeros operator */
+
+    /* degenerate case */
+    if (len2 == 0)
+        return crc1;
+
+    /* put operator for one zero bit in odd */
+    odd[0] = 0xedb88320UL;          /* CRC-32 polynomial */
+    row = 1;
+    for (n = 1; n < GF2_DIM; n++) {
+        odd[n] = row;
+        row <<= 1;
+    }
+
+    /* put operator for two zero bits in even */
+    gf2_matrix_square(even, odd);
+
+    /* put operator for four zero bits in odd */
+    gf2_matrix_square(odd, even);
+
+    /* apply len2 zeros to crc1 (first square will put the operator for one
+       zero byte, eight zero bits, in even) */
+    do {
+        /* apply zeros operator for this bit of len2 */
+        gf2_matrix_square(even, odd);
+        if (len2 & 1)
+            crc1 = gf2_matrix_times(even, crc1);
+        len2 >>= 1;
+
+        /* if no more bits set, then done */
+        if (len2 == 0)
+            break;
+
+        /* another iteration of the loop with odd and even swapped */
+        gf2_matrix_square(odd, even);
+        if (len2 & 1)
+            crc1 = gf2_matrix_times(odd, crc1);
+        len2 >>= 1;
+
+        /* if no more bits set, then done */
+    } while (len2 != 0);
+
+    /* return combined crc */
+    crc1 ^= crc2;
+    return crc1;
+}

Modified: head/sys/modules/zfs/Makefile
==============================================================================
--- head/sys/modules/zfs/Makefile	Sat May  9 01:35:27 2009	(r191930)
+++ head/sys/modules/zfs/Makefile	Sat May  9 01:45:55 2009	(r191931)
@@ -28,7 +28,7 @@ SRCS+=	opensolaris_zone.c
 
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64"
 .PATH:	${SUNW}/common/atomic/${MACHINE_ARCH}
-SRCS+=	atomic.S
+SRCS+=	opensolaris_atomic.S
 .else
 .PATH:	${.CURDIR}/../../cddl/compat/opensolaris/kern
 SRCS+=	opensolaris_atomic.c
@@ -51,7 +51,7 @@ SRCS+=	xdr_mem.c
 
 .PATH:	${SUNW}/uts/common/zmod
 SRCS+=	adler32.c
-SRCS+=	crc32.c
+SRCS+=	opensolaris_crc32.c
 SRCS+=	deflate.c
 SRCS+=	inffast.c
 SRCS+=	inflate.c

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 05:07:36 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E4CC2106566B;
	Sat,  9 May 2009 05:07:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D2FFF8FC0C;
	Sat,  9 May 2009 05:07:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4957a7K012713;
	Sat, 9 May 2009 05:07:36 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4957aVs012712;
	Sat, 9 May 2009 05:07:36 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200905090507.n4957aVs012712@svn.freebsd.org>
From: John Baldwin 
Date: Sat, 9 May 2009 05:07:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191932 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 05:07:37 -0000

Author: jhb
Date: Sat May  9 05:07:36 2009
New Revision: 191932
URL: http://svn.freebsd.org/changeset/base/191932

Log:
  Convert IPFW_DEFAULT_TO_ACCEPT into a loader tunable
  'net.inet.ip.fw.default_to_accept'.  The current value can also be queried
  via a read-only sysctl of the same name.
  
  Requested by:	plosher
  MFC after:	1 week

Modified:
  head/sys/netinet/ip_fw2.c

Modified: head/sys/netinet/ip_fw2.c
==============================================================================
--- head/sys/netinet/ip_fw2.c	Sat May  9 01:45:55 2009	(r191931)
+++ head/sys/netinet/ip_fw2.c	Sat May  9 05:07:36 2009	(r191932)
@@ -127,6 +127,11 @@ static struct callout ipfw_timeout;
 static int verbose_limit;
 #endif
 
+#ifdef IPFIREWALL_DEFAULT_TO_ACCEPT
+static int default_to_accept = 1;
+#else
+static int default_to_accept;
+#endif
 static uma_zone_t ipfw_dyn_rule_zone;
 
 /*
@@ -190,6 +195,9 @@ SYSCTL_UINT(_net_inet_ip_fw, OID_AUTO, d
     NULL, IPFW_DEFAULT_RULE, "The default/max possible rule number.");
 SYSCTL_UINT(_net_inet_ip_fw, OID_AUTO, tables_max, CTLFLAG_RD,
     NULL, IPFW_TABLES_MAX, "The maximum number of tables.");
+SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, default_to_accept, CTLFLAG_RDTUN,
+    &default_to_accept, 0, "Make the default rule accept all packets.");
+TUNABLE_INT("net.inet.ip.fw.default_to_accept", &default_to_accept);
 #endif /* SYSCTL_NODE */
 
 /*
@@ -4636,11 +4644,7 @@ ipfw_init(void)
 	default_rule.set = RESVD_SET;
 
 	default_rule.cmd[0].len = 1;
-	default_rule.cmd[0].opcode =
-#ifdef IPFIREWALL_DEFAULT_TO_ACCEPT
-				1 ? O_ACCEPT :
-#endif
-				O_DENY;
+	default_rule.cmd[0].opcode = default_to_accept ? O_ACCEPT : O_DENY;
 
 	error = add_rule(&V_layer3_chain, &default_rule);
 	if (error != 0) {

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 05:39:35 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 860DA106566B;
	Sat,  9 May 2009 05:39:35 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 746AC8FC08;
	Sat,  9 May 2009 05:39:35 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n495dZj5013332;
	Sat, 9 May 2009 05:39:35 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n495dZHv013331;
	Sat, 9 May 2009 05:39:35 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <200905090539.n495dZHv013331@svn.freebsd.org>
From: Kip Macy 
Date: Sat, 9 May 2009 05:39:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191933 - head/cddl/lib/libzpool
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 05:39:36 -0000

Author: kmacy
Date: Sat May  9 05:39:35 2009
New Revision: 191933
URL: http://svn.freebsd.org/changeset/base/191933

Log:
  atomic.S has been renamed opensolaris_atomic.S to avoid collisions

Modified:
  head/cddl/lib/libzpool/Makefile

Modified: head/cddl/lib/libzpool/Makefile
==============================================================================
--- head/cddl/lib/libzpool/Makefile	Sat May  9 05:07:36 2009	(r191932)
+++ head/cddl/lib/libzpool/Makefile	Sat May  9 05:39:35 2009	(r191933)
@@ -13,7 +13,7 @@
 # ATOMIC_SRCS
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64"
 .PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH}
-ATOMIC_SRCS=	atomic.S
+ATOMIC_SRCS=	opensolaris_atomic.S
 .else
 .PATH: ${.CURDIR}/../../../sys/cddl/compat/opensolaris/kern
 ATOMIC_SRCS=	opensolaris_atomic.c

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 05:45:13 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C47D3106566C;
	Sat,  9 May 2009 05:45:13 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B26D68FC13;
	Sat,  9 May 2009 05:45:13 +0000 (UTC)
	(envelope-from kmacy@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n495jDGr013497;
	Sat, 9 May 2009 05:45:13 GMT (envelope-from kmacy@svn.freebsd.org)
Received: (from kmacy@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n495jD6u013495;
	Sat, 9 May 2009 05:45:13 GMT (envelope-from kmacy@svn.freebsd.org)
Message-Id: <200905090545.n495jD6u013495@svn.freebsd.org>
From: Kip Macy 
Date: Sat, 9 May 2009 05:45:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191934 - in head/sys/modules: opensolaris zfs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 05:45:14 -0000

Author: kmacy
Date: Sat May  9 05:45:13 2009
New Revision: 191934
URL: http://svn.freebsd.org/changeset/base/191934

Log:
  fix atomic.S rename and vimage breakage
  
  The latter was pointed out by Artem Belevich

Modified:
  head/sys/modules/opensolaris/Makefile
  head/sys/modules/zfs/Makefile

Modified: head/sys/modules/opensolaris/Makefile
==============================================================================
--- head/sys/modules/opensolaris/Makefile	Sat May  9 05:39:35 2009	(r191933)
+++ head/sys/modules/opensolaris/Makefile	Sat May  9 05:45:13 2009	(r191934)
@@ -5,15 +5,16 @@
 KMOD=		opensolaris
 SRCS=		opensolaris.c		\
 		opensolaris_cmn_err.c	\
-		opensolaris_kmem.c
+		opensolaris_kmem.c	\
+		opensolaris_misc.c
 
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64"
 .PATH:	${.CURDIR}/../../cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH}
-SRCS+=		atomic.S
+SRCS+=		opensolaris_atomic.S
 .else
 SRCS+=		opensolaris_atomic.c
 .endif
-		
+
 CFLAGS+=	-I${.CURDIR}/../../cddl/compat/opensolaris		\
 		-I${.CURDIR}/../../cddl/contrib/opensolaris/uts/common	\
 		-I${.CURDIR}/../..

Modified: head/sys/modules/zfs/Makefile
==============================================================================
--- head/sys/modules/zfs/Makefile	Sat May  9 05:39:35 2009	(r191933)
+++ head/sys/modules/zfs/Makefile	Sat May  9 05:45:13 2009	(r191934)
@@ -20,7 +20,6 @@ SRCS+=	opensolaris_kmem.c
 SRCS+=	opensolaris_kobj.c
 SRCS+=	opensolaris_kstat.c
 SRCS+=	opensolaris_lookup.c
-SRCS+=	opensolaris_misc.c
 SRCS+=	opensolaris_policy.c
 SRCS+=	opensolaris_string.c
 SRCS+=	opensolaris_vfs.c

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 08:30:44 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5CA38106566C;
	Sat,  9 May 2009 08:30:44 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4B7D38FC1D;
	Sat,  9 May 2009 08:30:44 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n498UiDf016519;
	Sat, 9 May 2009 08:30:44 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n498Ui1D016518;
	Sat, 9 May 2009 08:30:44 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <200905090830.n498Ui1D016518@svn.freebsd.org>
From: Alan Cox 
Date: Sat, 9 May 2009 08:30:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191935 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 08:30:44 -0000

Author: alc
Date: Sat May  9 08:30:44 2009
New Revision: 191935
URL: http://svn.freebsd.org/changeset/base/191935

Log:
  Fix a race involving vnode_pager_input_smlfs().  Specifically, in the case
  that vnode_pager_input_smlfs() zeroes the page, it should not mark the page
  as valid until after the page is zeroed.  Otherwise, the page could be
  mapped for read access (e.g., by vm_map_pmap_enter()) before the page is
  zeroed.  Reviewed by: tegge
  
  Eliminate gratuitous clearing of the page's dirty mask by
  vnode_pager_input_smlfs().  Instead, assert that the page is clean.
  Reviewed by: tegge
  
  Eliminate some blank lines.
  
  Eliminate pointless calls to pmap_clear_modify() and vm_page_undirty() from
  vnode_pager_input_old().  The page is not mapped.  Therefore, it cannot have
  any page table entries that are modified.
  
  Eliminate an incorrect comment from vnode_pager_generic_getpages().

Modified:
  head/sys/vm/vnode_pager.c

Modified: head/sys/vm/vnode_pager.c
==============================================================================
--- head/sys/vm/vnode_pager.c	Sat May  9 05:45:13 2009	(r191934)
+++ head/sys/vm/vnode_pager.c	Sat May  9 08:30:44 2009	(r191935)
@@ -476,7 +476,7 @@ vnode_pager_input_smlfs(object, m)
 	vm_object_t object;
 	vm_page_t m;
 {
-	int i;
+	int bits, i;
 	struct vnode *vp;
 	struct bufobj *bo;
 	struct buf *bp;
@@ -498,7 +498,8 @@ vnode_pager_input_smlfs(object, m)
 	for (i = 0; i < PAGE_SIZE / bsize; i++) {
 		vm_ooffset_t address;
 
-		if (vm_page_bits(i * bsize, bsize) & m->valid)
+		bits = vm_page_bits(i * bsize, bsize);
+		if (m->valid & bits)
 			continue;
 
 		address = IDX_TO_OFF(m->pindex) + i * bsize;
@@ -543,30 +544,21 @@ vnode_pager_input_smlfs(object, m)
 			relpbuf(bp, &vnode_pbuf_freecnt);
 			if (error)
 				break;
-
-			VM_OBJECT_LOCK(object);
-			vm_page_lock_queues();
-			vm_page_set_validclean(m, (i * bsize) & PAGE_MASK, bsize);
-			vm_page_unlock_queues();
-			VM_OBJECT_UNLOCK(object);
-		} else {
-			VM_OBJECT_LOCK(object);
-			vm_page_lock_queues();
-			vm_page_set_validclean(m, (i * bsize) & PAGE_MASK, bsize);
-			vm_page_unlock_queues();
-			VM_OBJECT_UNLOCK(object);
+		} else
 			bzero((caddr_t)sf_buf_kva(sf) + i * bsize, bsize);
-		}
+		KASSERT((m->dirty & bits) == 0,
+		    ("vnode_pager_input_smlfs: page %p is dirty", m));
+		VM_OBJECT_LOCK(object);
+		m->valid |= bits;
+		VM_OBJECT_UNLOCK(object);
 	}
 	sf_buf_free(sf);
 	if (error) {
 		return VM_PAGER_ERROR;
 	}
 	return VM_PAGER_OK;
-
 }
 
-
 /*
  * old style vnode pager input routine
  */
@@ -627,10 +619,7 @@ vnode_pager_input_old(object, m)
 
 		VM_OBJECT_LOCK(object);
 	}
-	vm_page_lock_queues();
-	pmap_clear_modify(m);
-	vm_page_undirty(m);
-	vm_page_unlock_queues();
+	KASSERT(m->dirty == 0, ("vnode_pager_input_old: page %p is dirty", m));
 	if (!error)
 		m->valid = VM_PAGE_BITS_ALL;
 	return error ? VM_PAGER_ERROR : VM_PAGER_OK;
@@ -960,8 +949,6 @@ vnode_pager_generic_getpages(vp, m, byte
 			 */
 			vm_page_set_validclean(mt, 0,
 			    object->un_pager.vnp.vnp_size - tfoff);
-			/* handled by vm_fault now */
-			/* vm_page_zero_invalid(mt, FALSE); */
 		}
 		
 		if (i != reqpage) {

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 15:09:41 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 56F57106564A;
	Sat,  9 May 2009 15:09:41 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 44FCA8FC20;
	Sat,  9 May 2009 15:09:41 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n49F9fLw026865;
	Sat, 9 May 2009 15:09:41 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n49F9fw2026863;
	Sat, 9 May 2009 15:09:41 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <200905091509.n49F9fw2026863@svn.freebsd.org>
From: Ed Schouten 
Date: Sat, 9 May 2009 15:09:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191936 - in head: sys/sys usr.bin/kdump
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 15:09:41 -0000

Author: ed
Date: Sat May  9 15:09:40 2009
New Revision: 191936
URL: http://svn.freebsd.org/changeset/base/191936

Log:
  Add support for old TTY ioctls to kdump.
  
  At first I allowed ioctl_compat.h to be included, but it just returned
  an empty file. I had to do this, to keep kdump happy. I really want to
  raise a compiler error when including this header, so now it will just
  throw an error if you don't set COMPAT_43TTY.

Modified:
  head/sys/sys/ioctl_compat.h
  head/usr.bin/kdump/mkioctls

Modified: head/sys/sys/ioctl_compat.h
==============================================================================
--- head/sys/sys/ioctl_compat.h	Sat May  9 08:30:44 2009	(r191935)
+++ head/sys/sys/ioctl_compat.h	Sat May  9 15:09:40 2009	(r191936)
@@ -38,8 +38,6 @@
 #ifndef _SYS_IOCTL_COMPAT_H_
 #define	_SYS_IOCTL_COMPAT_H_
 
-#ifdef _KERNEL
-
 #ifndef COMPAT_43TTY
 #error "Definitions not available without TTY ioctl compat."
 #endif
@@ -151,6 +149,4 @@ struct sgttyb {
 #define	TIOCGLTC	_IOR('t',116,struct ltchars)/* get local special chars*/
 #define OTIOCCONS	_IO('t', 98)	/* for hp300 -- sans int arg */
 
-#endif /* _KERNEL */
-
 #endif /* !_SYS_IOCTL_COMPAT_H_ */

Modified: head/usr.bin/kdump/mkioctls
==============================================================================
--- head/usr.bin/kdump/mkioctls	Sat May  9 08:30:44 2009	(r191935)
+++ head/usr.bin/kdump/mkioctls	Sat May  9 15:09:40 2009	(r191936)
@@ -37,6 +37,7 @@ awk -v x="$ioctl_includes" 'BEGIN {print
 BEGIN {
 	print "/* XXX obnoxious prerequisites. */"
 	print "#define COMPAT_43"
+	print "#define COMPAT_43TTY"
 	print "#include "
 	print "#include "
 	print "#include "

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 15:41:22 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B8C55106566C;
	Sat,  9 May 2009 15:41:22 +0000 (UTC) (envelope-from dfr@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8CCFD8FC12;
	Sat,  9 May 2009 15:41:22 +0000 (UTC) (envelope-from dfr@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n49FfMYK027554;
	Sat, 9 May 2009 15:41:22 GMT (envelope-from dfr@svn.freebsd.org)
Received: (from dfr@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n49FfMn5027553;
	Sat, 9 May 2009 15:41:22 GMT (envelope-from dfr@svn.freebsd.org)
Message-Id: <200905091541.n49FfMn5027553@svn.freebsd.org>
From: Doug Rabson 
Date: Sat, 9 May 2009 15:41:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191937 - head/sys/nlm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 15:41:23 -0000

Author: dfr
Date: Sat May  9 15:41:22 2009
New Revision: 191937
URL: http://svn.freebsd.org/changeset/base/191937

Log:
  Work around non-standard behaviour of rpcbind in some versions of Linux (FC4?).
  
  Submitted by:	zachary dot loafman at isilon dot com

Modified:
  head/sys/nlm/nlm_prot_impl.c

Modified: head/sys/nlm/nlm_prot_impl.c
==============================================================================
--- head/sys/nlm/nlm_prot_impl.c	Sat May  9 15:09:40 2009	(r191936)
+++ head/sys/nlm/nlm_prot_impl.c	Sat May  9 15:41:22 2009	(r191937)
@@ -312,6 +312,7 @@ nlm_get_rpc(struct sockaddr *sa, rpcprog
 	enum clnt_stat stat = RPC_SUCCESS;
 	int rpcvers = RPCBVERS4;
 	bool_t do_tcp = FALSE;
+	bool_t tryagain = FALSE;
 	struct portmap mapping;
 	u_short port = 0;
 
@@ -373,14 +374,7 @@ again:
 		stat = CLNT_CALL(rpcb, (rpcprog_t) RPCBPROC_GETADDR,
 		    (xdrproc_t) xdr_rpcb, &parms,
 		    (xdrproc_t) xdr_wrapstring, &uaddr, timo);
-		if (stat == RPC_PROGVERSMISMATCH) {
-			if (rpcvers == RPCBVERS4)
-				rpcvers = RPCBVERS;
-			else if (rpcvers == RPCBVERS)
-				rpcvers = PMAPVERS;
-			CLNT_CONTROL(rpcb, CLSET_VERS, &rpcvers);
-			goto again;
-		} else if (stat == RPC_SUCCESS) {
+		if (stat == RPC_SUCCESS) {
 			/*
 			 * We have a reply from the remote RPCBIND - turn it
 			 * into an appropriate address and make a new client
@@ -391,13 +385,22 @@ again:
 			struct netbuf *a;
 			a = __rpc_uaddr2taddr_af(ss.ss_family, uaddr);
 			if (!a) {
-				CLNT_DESTROY(rpcb);
-				return (NULL);
+				tryagain = TRUE;
+			} else {
+				tryagain = FALSE;
+				memcpy(&ss, a->buf, a->len);
+				free(a->buf, M_RPC);
+				free(a, M_RPC);
+				xdr_free((xdrproc_t) xdr_wrapstring, &uaddr);
 			}
-			memcpy(&ss, a->buf, a->len);
-			free(a->buf, M_RPC);
-			free(a, M_RPC);
-			xdr_free((xdrproc_t) xdr_wrapstring, &uaddr);
+		}
+		if (tryagain || stat == RPC_PROGVERSMISMATCH) {
+			if (rpcvers == RPCBVERS4)
+				rpcvers = RPCBVERS;
+			else if (rpcvers == RPCBVERS)
+				rpcvers = PMAPVERS;
+			CLNT_CONTROL(rpcb, CLSET_VERS, &rpcvers);
+			goto again;
 		}
 		break;
 	case PMAPVERS:

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 16:42:58 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5DDA11065670;
	Sat,  9 May 2009 16:42:58 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4C4CF8FC13;
	Sat,  9 May 2009 16:42:58 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n49GgvQO028769;
	Sat, 9 May 2009 16:42:57 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n49GgvNd028768;
	Sat, 9 May 2009 16:42:57 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <200905091642.n49GgvNd028768@svn.freebsd.org>
From: Ed Schouten 
Date: Sat, 9 May 2009 16:42:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191938 - head/lib/libc/gen
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 16:42:58 -0000

Author: ed
Date: Sat May  9 16:42:57 2009
New Revision: 191938
URL: http://svn.freebsd.org/changeset/base/191938

Log:
  TTYs don't necessarily use /dev/ttyxx.
  
  Submitted by:	csjp

Modified:
  head/lib/libc/gen/ttyname.3

Modified: head/lib/libc/gen/ttyname.3
==============================================================================
--- head/lib/libc/gen/ttyname.3	Sat May  9 15:41:22 2009	(r191937)
+++ head/lib/libc/gen/ttyname.3	Sat May  9 16:42:57 2009	(r191938)
@@ -57,11 +57,10 @@ These descriptors are not related to the
 .Dv FILE
 typedef, but refer to the special device files found in
 .Pa /dev
-and named
-.Pa /dev/tty Ns Ar xx
 and for which an entry exists
 in the initialization file
-.Pa /etc/ttys .
+.Pa /etc/ttys
+or pseudo-terminals.
 (See
 .Xr ttys 5 . )
 .Pp

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 17:47:42 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DE46D106566C;
	Sat,  9 May 2009 17:47:42 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CCC518FC12;
	Sat,  9 May 2009 17:47:42 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n49HlgK4030006;
	Sat, 9 May 2009 17:47:42 GMT (envelope-from imp@svn.freebsd.org)
Received: (from imp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n49Hlgaf030005;
	Sat, 9 May 2009 17:47:42 GMT (envelope-from imp@svn.freebsd.org)
Message-Id: <200905091747.n49Hlgaf030005@svn.freebsd.org>
From: Warner Losh 
Date: Sat, 9 May 2009 17:47:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191939 - head/sys/dev/asr
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 17:47:43 -0000

Author: imp
Date: Sat May  9 17:47:42 2009
New Revision: 191939
URL: http://svn.freebsd.org/changeset/base/191939

Log:
  Unmark the ASR Compat IOCTLs as BURN_BRIDGES, per scottl@

Modified:
  head/sys/dev/asr/asr.c

Modified: head/sys/dev/asr/asr.c
==============================================================================
--- head/sys/dev/asr/asr.c	Sat May  9 16:42:57 2009	(r191938)
+++ head/sys/dev/asr/asr.c	Sat May  9 17:47:42 2009	(r191939)
@@ -142,11 +142,9 @@
 #include "opt_asr.h"
 #include 
 
-#ifndef BURN_BRIDGES
 #if defined(ASR_COMPAT)
 #define ASR_IOCTL_COMPAT
 #endif /* ASR_COMPAT */
-#endif /* !BURN_BRIDGES */
 #endif
 #include 
 

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 18:09:18 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 679A01065673;
	Sat,  9 May 2009 18:09:18 +0000 (UTC) (envelope-from kan@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 544A08FC0A;
	Sat,  9 May 2009 18:09:18 +0000 (UTC) (envelope-from kan@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n49I9I6e030480;
	Sat, 9 May 2009 18:09:18 GMT (envelope-from kan@svn.freebsd.org)
Received: (from kan@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n49I9HPg030473;
	Sat, 9 May 2009 18:09:17 GMT (envelope-from kan@svn.freebsd.org)
Message-Id: <200905091809.n49I9HPg030473@svn.freebsd.org>
From: Alexander Kabaev 
Date: Sat, 9 May 2009 18:09:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191940 - in head/sys: fs/nfs fs/nfsserver kern
	nfsserver nlm ufs/ufs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 18:09:18 -0000

Author: kan
Date: Sat May  9 18:09:17 2009
New Revision: 191940
URL: http://svn.freebsd.org/changeset/base/191940

Log:
  Do not embed struct ucred into larger netcred parent structures.
  
  Credential might need to hang around longer than its parent and be used
  outside of mnt_explock scope controlling netcred lifetime. Use separate
  reference-counted ucred allocated separately instead.
  
  While there, extend mnt_explock coverage in vfs_stdexpcheck and clean-up
  some unused declarations in new NFS code.
  
  Reported by:	John Hickey
  PR:		kern/133439
  Reviewed by:	dfr, kib

Modified:
  head/sys/fs/nfs/nfsport.h
  head/sys/fs/nfsserver/nfs_nfsdport.c
  head/sys/fs/nfsserver/nfs_nfsdsocket.c
  head/sys/kern/vfs_export.c
  head/sys/nfsserver/nfs_srvsubs.c
  head/sys/nlm/nlm_prot_impl.c
  head/sys/ufs/ufs/ufs_extern.h

Modified: head/sys/fs/nfs/nfsport.h
==============================================================================
--- head/sys/fs/nfs/nfsport.h	Sat May  9 17:47:42 2009	(r191939)
+++ head/sys/fs/nfs/nfsport.h	Sat May  9 18:09:17 2009	(r191940)
@@ -446,16 +446,6 @@ int nfsmsleep(void *, void *, int, const
 #define	VT_NFSV4ROOT		"nfsv4root"
 
 /*
- * XXX - not in any system .h file, just vfs_export.c
- * Network address lookup element
- */
-struct netcred {
-	struct	radix_node netc_rnodes[2];
-	int	netc_exflags;
-	struct	ucred netc_anon;
-};
-
-/*
  * Define whatever it takes to do a vn_rdwr().
  */
 #define	NFSD_RDWR(r, v, b, l, o, s, i, c, a, p) \

Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdport.c	Sat May  9 17:47:42 2009	(r191939)
+++ head/sys/fs/nfsserver/nfs_nfsdport.c	Sat May  9 18:09:17 2009	(r191940)
@@ -2565,6 +2565,8 @@ nfsd_fhtovp(struct nfsrv_descript *nd, s
 		if (nd->nd_repstat)
 			vput(*vpp);
 	}
+	if (credanon != NULL)
+		crfree(credanon);
 	if (nd->nd_repstat) {
 		if (startwrite)
 			vn_finished_write(mp);
@@ -2598,16 +2600,6 @@ fp_getfvp(struct thread *p, int fd, stru
 }
 
 /*
- * Network export information
- */
-struct netexport {
-	struct	netcred ne_defexported;		      /* Default export */
-	struct	radix_node_head *ne_rtable[AF_MAX+1]; /* Individual exports */
-};
-
-struct netexport nfsv4root_export;
-
-/*
  * Called from newnfssvc() to update the exports list. Just call
  * vfs_export(). This has to be done, since the v4 root fake fs isn't
  * in the mount list.
@@ -2861,6 +2853,8 @@ nfsvno_v4rootexport(struct nfsrv_descrip
 		return (NFSERR_PROGUNAVAIL);
 	if ((exflags & MNT_EXGSSONLY))
 		nd->nd_flag |= ND_EXGSSONLY;
+	if (credanon != NULL)
+		crfree(credanon);
 	return (0);
 }
 

Modified: head/sys/fs/nfsserver/nfs_nfsdsocket.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdsocket.c	Sat May  9 17:47:42 2009	(r191939)
+++ head/sys/fs/nfsserver/nfs_nfsdsocket.c	Sat May  9 18:09:17 2009	(r191940)
@@ -870,6 +870,8 @@ nfsrvd_compound(struct nfsrv_descript *n
 				    if (!nd->nd_repstat)
 					nd->nd_repstat = nfsd_excred(nd,
 					    &nes, credanon);
+				    if (credanon != NULL)
+					crfree(credanon);
 				    if (!nd->nd_repstat) {
 					if (vpnes.nes_vfslocked)
 					    nfsvno_unlockvfs(mp);

Modified: head/sys/kern/vfs_export.c
==============================================================================
--- head/sys/kern/vfs_export.c	Sat May  9 17:47:42 2009	(r191939)
+++ head/sys/kern/vfs_export.c	Sat May  9 18:09:17 2009	(r191940)
@@ -68,7 +68,7 @@ static struct netcred *vfs_export_lookup
 struct netcred {
 	struct	radix_node netc_rnodes[2];
 	int	netc_exflags;
-	struct	ucred netc_anon;
+	struct	ucred *netc_anon;
 	int	netc_numsecflavors;
 	int	netc_secflavors[MAXSECFLAVORS];
 };
@@ -83,7 +83,7 @@ struct netexport {
 
 /*
  * Build hash lists of net addresses and hang them off the mount point.
- * Called by ufs_mount() to set up the lists of export addresses.
+ * Called by vfs_export() to set up the lists of export addresses.
  */
 static int
 vfs_hang_addrlist(struct mount *mp, struct netexport *nep,
@@ -118,15 +118,14 @@ vfs_hang_addrlist(struct mount *mp, stru
 		}
 		np = &nep->ne_defexported;
 		np->netc_exflags = argp->ex_flags;
-		bzero(&np->netc_anon, sizeof(np->netc_anon));
-		np->netc_anon.cr_uid = argp->ex_anon.cr_uid;
-		np->netc_anon.cr_ngroups = argp->ex_anon.cr_ngroups;
-		bcopy(argp->ex_anon.cr_groups, np->netc_anon.cr_groups,
-		    sizeof(np->netc_anon.cr_groups));
+		np->netc_anon = crget();
+		np->netc_anon->cr_uid = argp->ex_anon.cr_uid;
+		np->netc_anon->cr_ngroups = argp->ex_anon.cr_ngroups;
+		bcopy(argp->ex_anon.cr_groups, np->netc_anon->cr_groups,
+		    sizeof(np->netc_anon->cr_groups));
 		np->netc_numsecflavors = argp->ex_numsecflavors;
 		bcopy(argp->ex_secflavors, np->netc_secflavors,
 		    sizeof(np->netc_secflavors));
-		refcount_init(&np->netc_anon.cr_ref, 1);
 		MNT_ILOCK(mp);
 		mp->mnt_flag |= MNT_DEFEXPORTED;
 		MNT_IUNLOCK(mp);
@@ -204,15 +203,14 @@ vfs_hang_addrlist(struct mount *mp, stru
 		goto out;
 	}
 	np->netc_exflags = argp->ex_flags;
-	bzero(&np->netc_anon, sizeof(np->netc_anon));
-	np->netc_anon.cr_uid = argp->ex_anon.cr_uid;
-	np->netc_anon.cr_ngroups = argp->ex_anon.cr_ngroups;
-	bcopy(argp->ex_anon.cr_groups, np->netc_anon.cr_groups,
-	    sizeof(np->netc_anon.cr_groups));
+	np->netc_anon = crget();
+	np->netc_anon->cr_uid = argp->ex_anon.cr_uid;
+	np->netc_anon->cr_ngroups = argp->ex_anon.cr_ngroups;
+	bcopy(argp->ex_anon.cr_groups, np->netc_anon->cr_groups,
+	    sizeof(np->netc_anon->cr_groups));
 	np->netc_numsecflavors = argp->ex_numsecflavors;
 	bcopy(argp->ex_secflavors, np->netc_secflavors,
 	    sizeof(np->netc_secflavors));
-	refcount_init(&np->netc_anon.cr_ref, 1);
 	return (0);
 out:
 	free(np, M_NETADDR);
@@ -267,9 +265,9 @@ vfs_export(struct mount *mp, struct expo
 	    || argp->ex_numsecflavors >= MAXSECFLAVORS)
 		return (EINVAL);
 
-	nep = mp->mnt_export;
 	error = 0;
 	lockmgr(&mp->mnt_explock, LK_EXCLUSIVE, NULL);
+	nep = mp->mnt_export;
 	if (argp->ex_flags & MNT_DELEXPORT) {
 		if (nep == NULL) {
 			error = ENOENT;
@@ -375,8 +373,9 @@ vfs_setpublicfs(struct mount *mp, struct
 	 * If an indexfile was specified, pull it in.
 	 */
 	if (argp->ex_indexfile != NULL) {
-		nfs_pub.np_index = malloc(MAXNAMLEN + 1, M_TEMP,
-		    M_WAITOK);
+		if (nfs_pub.np_index != NULL)
+			nfs_pub.np_index = malloc(MAXNAMLEN + 1, M_TEMP,
+			    M_WAITOK);
 		error = copyinstr(argp->ex_indexfile, nfs_pub.np_index,
 		    MAXNAMLEN, (size_t *)0);
 		if (!error) {
@@ -392,6 +391,7 @@ vfs_setpublicfs(struct mount *mp, struct
 		}
 		if (error) {
 			free(nfs_pub.np_index, M_TEMP);
+			nfs_pub.np_index = NULL;
 			return (error);
 		}
 	}
@@ -461,15 +461,19 @@ vfs_stdcheckexp(struct mount *mp, struct
 
 	lockmgr(&mp->mnt_explock, LK_SHARED, NULL);
 	np = vfs_export_lookup(mp, nam);
-	lockmgr(&mp->mnt_explock, LK_RELEASE, NULL);
-	if (np == NULL)
+	if (np == NULL) {
+		lockmgr(&mp->mnt_explock, LK_RELEASE, NULL);
+		*credanonp = NULL;
 		return (EACCES);
+	}
 	*extflagsp = np->netc_exflags;
-	*credanonp = &np->netc_anon;
+	if ((*credanonp = np->netc_anon) != NULL)
+		crhold(*credanonp);
 	if (numsecflavors)
 		*numsecflavors = np->netc_numsecflavors;
 	if (secflavors)
 		*secflavors = np->netc_secflavors;
+	lockmgr(&mp->mnt_explock, LK_RELEASE, NULL);
 	return (0);
 }
 

Modified: head/sys/nfsserver/nfs_srvsubs.c
==============================================================================
--- head/sys/nfsserver/nfs_srvsubs.c	Sat May  9 17:47:42 2009	(r191939)
+++ head/sys/nfsserver/nfs_srvsubs.c	Sat May  9 18:09:17 2009	(r191940)
@@ -1193,6 +1193,9 @@ nfsrv_fhtovp(fhandle_t *fhp, int lockfla
 	if (!lockflag)
 		VOP_UNLOCK(*vpp, 0);
 out:
+	if (credanon != NULL)
+		crfree(credanon);
+
 	if (error) {
 		VFS_UNLOCK_GIANT(vfslocked);
 	} else

Modified: head/sys/nlm/nlm_prot_impl.c
==============================================================================
--- head/sys/nlm/nlm_prot_impl.c	Sat May  9 17:47:42 2009	(r191939)
+++ head/sys/nlm/nlm_prot_impl.c	Sat May  9 18:09:17 2009	(r191940)
@@ -1752,7 +1752,8 @@ nlm_get_vfs_state(struct nlm_host *host,
 	}
 	if (cred->cr_uid == 0 || (exflags & MNT_EXPORTANON)) {
 		crfree(cred);
-		cred = crhold(credanon);
+		cred = credanon;
+		credanon = NULL;
 	}
 
 	/*
@@ -1772,6 +1773,8 @@ nlm_get_vfs_state(struct nlm_host *host,
 out:
 	if (cred)
 		crfree(cred);
+	if (credanon)
+		crfree(credanon);
 
 	return (error);
 }

Modified: head/sys/ufs/ufs/ufs_extern.h
==============================================================================
--- head/sys/ufs/ufs/ufs_extern.h	Sat May  9 17:47:42 2009	(r191939)
+++ head/sys/ufs/ufs/ufs_extern.h	Sat May  9 18:09:17 2009	(r191940)
@@ -38,7 +38,6 @@ struct direct;
 struct indir;
 struct inode;
 struct mount;
-struct netcred;
 struct thread;
 struct sockaddr;
 struct ucred;

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 18:09:19 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2A4BC1065674;
	Sat,  9 May 2009 18:09:19 +0000 (UTC)
	(envelope-from roberto@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 18B078FC12;
	Sat,  9 May 2009 18:09:19 +0000 (UTC)
	(envelope-from roberto@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n49I9IMe030514;
	Sat, 9 May 2009 18:09:18 GMT (envelope-from roberto@svn.freebsd.org)
Received: (from roberto@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n49I9I10030513;
	Sat, 9 May 2009 18:09:18 GMT (envelope-from roberto@svn.freebsd.org)
Message-Id: <200905091809.n49I9I10030513@svn.freebsd.org>
From: Ollivier Robert 
Date: Sat, 9 May 2009 18:09:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191941 - head/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 18:09:19 -0000

Author: roberto
Date: Sat May  9 18:09:18 2009
New Revision: 191941
URL: http://svn.freebsd.org/changeset/base/191941

Log:
  Remove reference to nonexistant manpage.
  
  PR:		    ports/131898
  Submitted by:	    Niclas Zeising 
  Prodded by:         sbruno

Modified:
  head/share/man/man4/iwn.4

Modified: head/share/man/man4/iwn.4
==============================================================================
--- head/share/man/man4/iwn.4	Sat May  9 18:09:17 2009	(r191940)
+++ head/share/man/man4/iwn.4	Sat May  9 18:09:18 2009	(r191941)
@@ -146,7 +146,6 @@ failed.
 This should not happen.
 .El
 .Sh SEE ALSO
-.Xr iwnfw 4 ,
 .Xr pci 4 ,
 .Xr wlan 4 ,
 .Xr wlan_ccmp 4 ,

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 18:25:59 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 719E7106568F;
	Sat,  9 May 2009 18:25:59 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 44EA18FC18;
	Sat,  9 May 2009 18:25:59 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n49IPx1v030863;
	Sat, 9 May 2009 18:25:59 GMT (envelope-from imp@svn.freebsd.org)
Received: (from imp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n49IPxab030861;
	Sat, 9 May 2009 18:25:59 GMT (envelope-from imp@svn.freebsd.org)
Message-Id: <200905091825.n49IPxab030861@svn.freebsd.org>
From: Warner Losh 
Date: Sat, 9 May 2009 18:25:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191942 - head/sys/netinet6
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 18:26:00 -0000

Author: imp
Date: Sat May  9 18:25:58 2009
New Revision: 191942
URL: http://svn.freebsd.org/changeset/base/191942

Log:
  Implement RFC 5095 more fully.  Rather than marking this no-op code as
  BURN_BRIDGES, just remove it.  Adjust comments.
  
  Reviewed by:	dwhite, emaste, battlez

Modified:
  head/sys/netinet6/ip6_output.c
  head/sys/netinet6/route6.c

Modified: head/sys/netinet6/ip6_output.c
==============================================================================
--- head/sys/netinet6/ip6_output.c	Sat May  9 18:09:18 2009	(r191941)
+++ head/sys/netinet6/ip6_output.c	Sat May  9 18:25:58 2009	(r191942)
@@ -435,34 +435,11 @@ skip_ipsec2:;
 #endif /* IPSEC */
 
 	/*
-	 * If there is a routing header, replace the destination address field
-	 * with the first hop of the routing header.
+	 * If there is a routing header, discard the packet.
 	 */
 	if (exthdrs.ip6e_rthdr) {
-		struct ip6_rthdr *rh =
-			(struct ip6_rthdr *)(mtod(exthdrs.ip6e_rthdr,
-						  struct ip6_rthdr *));
-
-		/*
-		 * While this switch may look gratuitous, leave it in
-		 * in favour of RH2 implementations, etc.
-		 */
-		switch (rh->ip6r_type) {
-#ifndef BURN_BRIDGES
-		case IPV6_RTHDR_TYPE_0:
-			/*
-			 * According to RFC 5095 we should not implement
-			 * it in any way but we may want to give the user
-			 * a hint for now.
-			 */
-			log(LOG_INFO, "[%s:%d] IPv6 Type 0 Routing Headers are "
-			    "deprecated.\n", __func__, __LINE__);
-			/* FALLTHROUGH */
-#endif
-		default:	/* is it possible? */
-			 error = EINVAL;
-			 goto bad;
-		}
+		 error = EINVAL;
+		 goto bad;
 	}
 
 	/* Source address validation */

Modified: head/sys/netinet6/route6.c
==============================================================================
--- head/sys/netinet6/route6.c	Sat May  9 18:09:18 2009	(r191941)
+++ head/sys/netinet6/route6.c	Sat May  9 18:25:58 2009	(r191942)
@@ -95,15 +95,6 @@ route6_input(struct mbuf **mp, int *offp
 	 * in favour of RH2 implementations, etc.
 	 */
 	switch (rh->ip6r_type) {
-#ifndef BURN_BRIDGES
-	case IPV6_RTHDR_TYPE_0:
-		/*
-		 * According to RFC 5095, 3.  Deprecation of RH0,
-		 * we must handle RH0 like the default (unknown
-		 * routing header type) case.
-		 */
-		/* FALLTHROUGH */
-#endif
 	default:
 		/* Unknown routing header type. */
 		if (rh->ip6r_segleft == 0) {

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 18:43:15 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5B500106566C;
	Sat,  9 May 2009 18:43:15 +0000 (UTC) (envelope-from sam@freebsd.org)
Received: from ebb.errno.com (ebb.errno.com [69.12.149.25])
	by mx1.freebsd.org (Postfix) with ESMTP id 303D58FC08;
	Sat,  9 May 2009 18:43:15 +0000 (UTC) (envelope-from sam@freebsd.org)
Received: from trouble.errno.com (trouble.errno.com [10.0.0.248])
	(authenticated bits=0)
	by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n49IhEZG075716
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Sat, 9 May 2009 11:43:14 -0700 (PDT) (envelope-from sam@freebsd.org)
Message-ID: <4A05CEC1.4060903@freebsd.org>
Date: Sat, 09 May 2009 11:43:13 -0700
From: Sam Leffler 
Organization: FreeBSD Project
User-Agent: Thunderbird 2.0.0.21 (X11/20090411)
MIME-Version: 1.0
To: Ollivier Robert 
References: <200905091809.n49I9I10030513@svn.freebsd.org>
In-Reply-To: <200905091809.n49I9I10030513@svn.freebsd.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-DCC-x.dcc-servers-Metrics: ebb.errno.com; whitelist
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r191941 - head/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 18:43:15 -0000

Ollivier Robert wrote:
> Author: roberto
> Date: Sat May  9 18:09:18 2009
> New Revision: 191941
> URL: http://svn.freebsd.org/changeset/base/191941
>
> Log:
>   Remove reference to nonexistant manpage.
>   
>   PR:		    ports/131898
>   Submitted by:	    Niclas Zeising 
>   Prodded by:         sbruno
>
> Modified:
>   head/share/man/man4/iwn.4
>
> Modified: head/share/man/man4/iwn.4
> ==============================================================================
> --- head/share/man/man4/iwn.4	Sat May  9 18:09:17 2009	(r191940)
> +++ head/share/man/man4/iwn.4	Sat May  9 18:09:18 2009	(r191941)
> @@ -146,7 +146,6 @@ failed.
>  This should not happen.
>  .El
>  .Sh SEE ALSO
> -.Xr iwnfw 4 ,
>  .Xr pci 4 ,
>  .Xr wlan 4 ,
>  .Xr wlan_ccmp 4 ,
>
>
>   
Please back this out; the right fix is to add an iwnfw man page.

    Sam


From owner-svn-src-all@FreeBSD.ORG  Sat May  9 18:50:01 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BFCA21065679;
	Sat,  9 May 2009 18:50:01 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AE43F8FC0A;
	Sat,  9 May 2009 18:50:01 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n49Io1T8031389;
	Sat, 9 May 2009 18:50:01 GMT (envelope-from imp@svn.freebsd.org)
Received: (from imp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n49Io1vX031388;
	Sat, 9 May 2009 18:50:01 GMT (envelope-from imp@svn.freebsd.org)
Message-Id: <200905091850.n49Io1vX031388@svn.freebsd.org>
From: Warner Losh 
Date: Sat, 9 May 2009 18:50:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191943 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 18:50:02 -0000

Author: imp
Date: Sat May  9 18:50:01 2009
New Revision: 191943
URL: http://svn.freebsd.org/changeset/base/191943

Log:
  Remove bogus comment.

Modified:
  head/sys/netinet/in_var.h

Modified: head/sys/netinet/in_var.h
==============================================================================
--- head/sys/netinet/in_var.h	Sat May  9 18:25:58 2009	(r191942)
+++ head/sys/netinet/in_var.h	Sat May  9 18:50:01 2009	(r191943)
@@ -336,7 +336,7 @@ SYSCTL_DECL(_net_inet_raw);
 LIST_HEAD(in_multihead, in_multi);	/* XXX unused */
 #ifdef VIMAGE_GLOBALS
 extern struct in_multihead in_multihead;
-#endif /* BURN_BRIDGES */
+#endif
 
 /*
  * Lock macros for IPv4 layer multicast address lists.  IPv4 lock goes

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 18:53:08 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 17DA210656AB;
	Sat,  9 May 2009 18:53:08 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B63838FC1E;
	Sat,  9 May 2009 18:53:07 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n49Ir7Uh031488;
	Sat, 9 May 2009 18:53:07 GMT (envelope-from sam@svn.freebsd.org)
Received: (from sam@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n49Ir7mI031486;
	Sat, 9 May 2009 18:53:07 GMT (envelope-from sam@svn.freebsd.org)
Message-Id: <200905091853.n49Ir7mI031486@svn.freebsd.org>
From: Sam Leffler 
Date: Sat, 9 May 2009 18:53:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191944 - head/sys/contrib/dev/iwi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 18:53:13 -0000

Author: sam
Date: Sat May  9 18:53:07 2009
New Revision: 191944
URL: http://svn.freebsd.org/changeset/base/191944

Log:
  update to v3.1

Modified:
  head/sys/contrib/dev/iwi/ipw2200-bss.fw.uu
  head/sys/contrib/dev/iwi/ipw2200-ibss.fw.uu
  head/sys/contrib/dev/iwi/ipw2200-sniffer.fw.uu

Modified: head/sys/contrib/dev/iwi/ipw2200-bss.fw.uu
==============================================================================
--- head/sys/contrib/dev/iwi/ipw2200-bss.fw.uu	Sat May  9 18:50:01 2009	(r191943)
+++ head/sys/contrib/dev/iwi/ipw2200-bss.fw.uu	Sat May  9 18:53:07 2009	(r191944)
@@ -1,213 +1,216 @@
-/*-
- *                              TERMS AND CONDITIONS
- *     IMPORTANT - PLEASE READ BEFORE INSTALLING OR USING THIS INTEL(C) SOFTWARE
- * 
- * Do not use or load this firmware (the "Software") until you have carefully read
- * the following terms and conditions. By loading or using the Software, you agree
- * to the terms of this Agreement. If you do not wish to so agree, do not install
- * or use the Software.
- * 
- * LICENSEES:
- * 
- * Please note: 
- * 
- * * If you are an End-User, only Exhibit A, the SOFTWARE LICENSE AGREEMENT,
- *   applies.
- * * If you are an Original Equipment Manufacturer (OEM), Independent Hardware
- *   Vendor (IHV), or Independent Software Vendor (ISV), this complete Agreement
- *   applies 
- * 
- * --------------------------------------------------------------------------------
- * 
- * For OEMs, IHVs, and ISVs:
- * 
- * LICENSE. This Software is licensed for use only in conjunction with Intel
- * component products. Use of the Software in conjunction with non-Intel component
- * products is not licensed hereunder. Subject to the terms of this Agreement,
- * Intel grants to you a nonexclusive, nontransferable, worldwide, fully paid-up
- * license under Intel's copyrights to: (i) copy the Software internally for your
- * own development and maintenance purposes; (ii) copy and distribute the Software
- * to your end-users, but only under a license agreement with terms at least as
- * restrictive as those contained in Intel's Final, Single User License Agreement,
- * attached as Exhibit A; and (iii) modify, copy and distribute the end-user
- * documentation which may accompany the Software, but only in association with
- * the Software.  
- * 
- * If you are not the final manufacturer or vendor of a computer system or software
- * program incorporating the Software, then you may transfer a copy of the
- * Software, including any related documentation (modified or unmodified) to your
- * recipient for use in accordance with the terms of this Agreement, provided such
- * recipient agrees to be fully bound by the terms hereof. You shall not otherwise
- * assign, sublicense, lease, or in any other way transfer or disclose Software to
- * any third party. You may not, nor may you assist any other person or entity to
- * modify, translate, convert to another programming language, decompile, reverse
- * engineer, or disassemble any portion of the Software or otherwise attempt to
- * derive source code from any object code modules of the Software or any internal
- * data files generated by the Software. Your rights to redistribute the Software
- * shall be contingent upon your installation of this Agreement in its entirety in
- * the same directory as the Software.
- * 
- * CONTRACTORS. For the purpose of this Agreement, and notwithstanding anything 
- * to the contrary hereunder, solely with respect to the requirements for 
- * compliance with the terms hereunder, any contractors or consultants that You 
- * use to perform the work or otherwise assist You in the development or products 
- * using this Software shall be deemed to be End Users and accordingly, upon 
- * receipt of the Software, shall be bound by the terms of Exhibit A, Software 
- * License Agreement. No additional agreement between You and such consultants or 
- * contractors is required under this Agreement to detail such compliance.
- * 
- * TRADEMARKS. Except as expressly provided herein, you shall not use Intel's 
- * name in any publications, advertisements, or other announcements without 
- * Intel's prior written consent. You do not have any rights to use any Intel 
- * trademarks or logos.
- * 
- * OWNERSHIP OF SOFTWARE AND COPYRIGHTS. Software and accompanying materials, if
- * any, are owned by Intel or its suppliers and licensors and may be protected by
- * copyright, trademark, patent and trade secret law and international treaties. 
- * Any rights, express or implied, in the intellectual property embodied in the
- * foregoing, other than those specified in this Agreement, are reserved by Intel
- * and its suppliers and licensors or otherwise as set forth in any applicable
- * open source license agreement. You will keep the Software free of liens,
- * attachments, and other encumbrances.  You agree not to remove any proprietary
- * notices and/or any labels from the Software and accompanying materials without
- * prior written approval by Intel
- * 
- * LIMITATION OF LIABILITY. IN NO EVENT SHALL INTEL OR ITS SUPPLIERS AND LICENSORS
- * BE LIABLE FOR ANY DAMAGES WHATSOEVER FROM ANY CAUSE OF ACTION OF ANY KIND
- * (INCLUDING, WITHOUT LIMITATION, LOST PROFITS, BUSINESS INTERRUPTION, OR LOST
- * INFORMATION) ARISING OUT OF THE USE, MODIFICATION, OR INABILITY TO USE THE
- * INTEL SOFTWARE, OR OTHERWISE, NOR FOR PUNITIVE, INCIDENTAL, CONSEQUENTIAL, OR
- * SPECIAL DAMAGES OF ANY KIND, EVEN IF INTEL OR ITS SUPPLIERS AND LICENSORS HAS
- * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.   SOME JURISDICTIONS PROHIBIT
- * EXCLUSION OR LIMITATION OF LIABILITY FOR IMPLIED WARRANTIES, CONSEQUENTIAL OR
- * INCIDENTAL DAMAGES, SO CERTAIN LIMITATIONS MAY NOT APPLY.  YOU MAY ALSO HAVE
- * OTHER LEGAL RIGHTS THAT VARY BETWEEN JURISDICTIONS. 
- * 
- * EXCLUSION OF WARRANTIES.  THE SOFTWARE IS PROVIDED "AS IS" AND POSSIBLY WITH
- * FAULTS. UNLESS EXPRESSLY AGREED OTHERWISE, INTEL AND ITS SUPPLIERS AND
- * LICENSORS DISCLAIM ANY AND ALL WARRANTIES AND GUARANTEES, EXPRESS, IMPLIED OR
- * OTHERWISE, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * NONINFRINGEMENT, OR FITNESS FOR A PARTICULAR PURPOSE.  Intel does not warrant
- * or assume responsibility for the accuracy or completeness of any information,
- * text, graphics, links or other items contained within the Software.  You assume
- * all liability, financial or otherwise, associated with Your use or disposition
- * of the Software.
- * 		
- * APPLICABLE LAW. Claims arising under this Agreement shall be governed by the
- * laws of State of California], excluding its principles of conflict of laws and
- * the United Nations Convention on Contracts for the Sale of Goods.  
- * 
- * WAIVER AND AMENDMENT. No modification, amendment or waiver of any provision of
- * this Agreement shall be effective unless in writing and signed by an officer of
- * Intel.  No failure or delay in exercising any right, power, or remedy under
- * this Agreement shall operate as a waiver of any such right, power or remedy. 
- * Without limiting the foregoing, terms and conditions on any purchase orders or
- * similar materials submitted by you to Intel, and any terms contained in IntelÂ’s
- * standard acknowledgment form that are in conflict with these terms, shall be of
- * no force or effect.
- * 
- * SEVERABILITY.  If any provision of this Agreement is held by a court of
- * competent jurisdiction to be contrary to law, such provision shall be changed
- * and interpreted so as to best accomplish the objectives of the original
- * provision to the fullest extent allowed by law and the remaining provisions of
- * this Agreement shall remain in full force and effect.
- * 
- * EXPORT RESTRICTIONS.  Each party acknowledges that the Software is subject to
- * applicable import and export regulations of the United States and of the
- * countries in which each party transacts business, specifically including U.S.
- * Export Administration Act and Export Administration Regulations.  Each party
- * shall comply with such laws and regulations, as well as all other laws and
- * regulations applicable to the Software.  Without limiting the generality of the
- * foregoing, each party agrees that it will not export, re-export, transfer or
- * divert any of the Software or the direct programs thereof to any restricted
- * place or party in accordance with U.S. export regulations.  Note that Software
- * containing encryption may be subject to additional restrictions.
- * 
- * GOVERNMENT RESTRICTED RIGHTS. The Software is provided with "RESTRICTED RIGHTS."
- * Use, duplication, or disclosure by the Government is subject to restrictions as
- * set forth in FAR52.227-14 and DFAR252.227-7013 et seq. or their successors. Use
- * of the Software by the Government constitutes acknowledgment of Intel's
- * proprietary rights therein. Contractor or Manufacturer is Intel Corporation,
- * 2200 Mission College Blvd., Santa Clara, CA  95052.
- * 
- * TERMINATION OF THE AGREEMENT. Intel may terminate this Agreement if you violate
- * its terms. Upon termination, you will immediately destroy the Software or
- * return all copies of the Software to Intel.
- * 
- * --------------------------------------------------------------------------------
- * 
- * EXHIBIT "A"
- * 
- * SOFTWARE LICENSE AGREEMENT (Final, Single User)
- * 
- * IMPORTANT - READ BEFORE COPYING, INSTALLING OR USING.
- * 
- * Do not use or load this firmware image (the "Software") until you have carefully
- * read the following terms and conditions. By loading or using the Software, you
- * agree to the terms of this Agreement. If you do not wish to so agree, do not
- * install or use the Software.
- * 
- * LICENSE. You may copy and use the Software, subject to these conditions: 
- * 1. This Software is licensed for use only in conjunction with Intel component
- *    products. Use of the Software in conjunction with non-Intel component 
- *    products is not licensed hereunder. 
- * 2. You may not copy, modify, rent, sell, distribute or transfer any part of the
- *    Software except as provided in this Agreement, and you agree to prevent
- *    unauthorized copying of the Software. 
- * 3. You may not reverse engineer, decompile, or disassemble the Software. 
- * 4. You may not sublicense the Software. 
- * 5. The Software may contain the software or other property of third party
- *    suppliers. 
- * 
- * OWNERSHIP OF SOFTWARE AND COPYRIGHTS. Title to all copies of the Software
- * remains with Intel or its suppliers. The Software is copyrighted and protected
- * by the laws of the United States and other countries, and international treaty
- * provisions. You may not remove any copyright notices from the Software. Intel
- * may make changes to the Software, or items referenced therein, at any time
- * without notice, but is not obligated to support or update the Software. Except
- * as otherwise expressly provided, Intel grants no express or implied right under
- * Intel patents, copyrights, trademarks, or other intellectual property rights.
- * You may transfer the Software only if a copy of this license accompanies the 
- * Software and the recipient agrees to be fully bound by these terms.
- * 
- * EXCLUSION OF OTHER WARRANTIES EXCEPT AS PROVIDED ABOVE, THE SOFTWARE IS PROVIDED
- * "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTY OF ANY KIND INCLUDING
- * WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, OR FITNESS FOR A PARTICULAR
- * PURPOSE. Intel does not warrant or assume responsibility for the accuracy or
- * completeness of any information, text, graphics, links or other items contained
- * within the Software.
- * 
- * LIMITATION OF LIABILITY. IN NO EVENT SHALL INTEL OR ITS SUPPLIERS BE LIABLE FOR
- * ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, LOST PROFITS, BUSINESS
- * INTERRUPTION, OR LOST INFORMATION) ARISING OUT OF THE USE OF OR INABILITY TO
- * USE THE SOFTWARE, EVEN IF INTEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGES. SOME JURISDICTIONS PROHIBIT EXCLUSION OR LIMITATION OF LIABILITY FOR
- * IMPLIED WARRANTIES OR CONSEQUENTIAL OR INCIDENTAL DAMAGES, SO THE ABOVE
- * LIMITATION MAY NOT APPLY TO YOU. YOU MAY ALSO HAVE OTHER LEGAL RIGHTS THAT VARY
- * BETWEEN JURISDICTIONS.
- * 
- * TERMINATION OF THIS AGREEMENT. Intel may terminate this Agreement at any time if
- * you violate its terms. Upon termination, you will immediately destroy the
- * Software.
- * 
- * APPLICABLE LAWS. Claims arising under this Agreement shall be governed by the
- * laws of California, excluding its principles of conflict of laws and the United
- * Nations Convention on Contracts for the Sale of Goods. You may not export the
- * Software in violation of applicable export laws and regulations. Intel is not
- * obligated under any other agreements unless they are in writing and signed by
- * an authorized representative 
- * of Intel.
- * 
- * GOVERNMENT RESTRICTED RIGHTS. The Software is provided with "RESTRICTED RIGHTS."
- * Use, duplication, or disclosure by the Government is subject to restrictions as
- * set forth in FAR52.227-14 and DFAR252.227-7013 et seq. or their successors. Use
- * of the Software by the Government constitutes acknowledgment of Intel's
- * proprietary rights therein. Contractor or Manufacturer is Intel Corporation,
- * 2200 Mission College Blvd., Santa Clara, CA 95052.
- */
-#define IWI_FW_VERSION 3.0
+                             TERMS AND CONDITIONS
+    IMPORTANT - PLEASE READ BEFORE INSTALLING OR USING THIS INTEL(C) SOFTWARE
+
+Do not use or load this firmware (the "Software") until you have carefully read
+the following terms and conditions. By loading or using the Software, you agree
+to the terms of this Agreement. If you do not wish to so agree, do not install
+or use the Software.
+
+LICENSEES:
+
+Please note: 
+
+* If you are an End-User, only Exhibit A, the SOFTWARE LICENSE AGREEMENT,
+  applies.
+* If you are an Original Equipment Manufacturer (OEM), Independent Hardware
+  Vendor (IHV), or Independent Software Vendor (ISV), this complete Agreement
+  applies 
+
+--------------------------------------------------------------------------------
+
+For OEMs, IHVs, and ISVs:
+
+LICENSE. This Software is licensed for use only in conjunction with Intel
+component products. Use of the Software in conjunction with non-Intel component
+products is not licensed hereunder. Subject to the terms of this Agreement,
+Intel grants to you a nonexclusive, nontransferable, worldwide, fully paid-up
+license under Intel's copyrights to: (i) copy the Software internally for your
+own development and maintenance purposes; (ii) copy and distribute the Software
+to your end-users, but only under a license agreement with terms at least as
+restrictive as those contained in Intel's Final, Single User License Agreement,
+attached as Exhibit A; and (iii) modify, copy and distribute the end-user
+documentation which may accompany the Software, but only in association with
+the Software.  
+
+If you are not the final manufacturer or vendor of a computer system or software
+program incorporating the Software, then you may transfer a copy of the
+Software, including any related documentation (modified or unmodified) to your
+recipient for use in accordance with the terms of this Agreement, provided such
+recipient agrees to be fully bound by the terms hereof. You shall not otherwise
+assign, sublicense, lease, or in any other way transfer or disclose Software to
+any third party. You may not, nor may you assist any other person or entity to
+modify, translate, convert to another programming language, decompile, reverse
+engineer, or disassemble any portion of the Software or otherwise attempt to
+derive source code from any object code modules of the Software or any internal
+data files generated by the Software. Your rights to redistribute the Software
+shall be contingent upon your installation of this Agreement in its entirety in
+the same directory as the Software.
+
+CONTRACTORS. For the purpose of this Agreement, and notwithstanding anything 
+to the contrary hereunder, solely with respect to the requirements for 
+compliance with the terms hereunder, any contractors or consultants that You 
+use to perform the work or otherwise assist You in the development or products 
+using this Software shall be deemed to be End Users and accordingly, upon 
+receipt of the Software, shall be bound by the terms of Exhibit A, Software 
+License Agreement. No additional agreement between You and such consultants or 
+contractors is required under this Agreement to detail such compliance.
+
+TRADEMARKS. Except as expressly provided herein, you shall not use Intel's 
+name in any publications, advertisements, or other announcements without 
+Intel's prior written consent. You do not have any rights to use any Intel 
+trademarks or logos.
+
+OWNERSHIP OF SOFTWARE AND COPYRIGHTS. Software and accompanying materials, if
+any, are owned by Intel or its suppliers and licensors and may be protected by
+copyright, trademark, patent and trade secret law and international treaties. 
+Any rights, express or implied, in the intellectual property embodied in the
+foregoing, other than those specified in this Agreement, are reserved by Intel
+and its suppliers and licensors or otherwise as set forth in any applicable
+open source license agreement. You will keep the Software free of liens,
+attachments, and other encumbrances.  You agree not to remove any proprietary
+notices and/or any labels from the Software and accompanying materials without
+prior written approval by Intel
+
+LIMITATION OF LIABILITY. IN NO EVENT SHALL INTEL OR ITS SUPPLIERS AND LICENSORS
+BE LIABLE FOR ANY DAMAGES WHATSOEVER FROM ANY CAUSE OF ACTION OF ANY KIND
+(INCLUDING, WITHOUT LIMITATION, LOST PROFITS, BUSINESS INTERRUPTION, OR LOST
+INFORMATION) ARISING OUT OF THE USE, MODIFICATION, OR INABILITY TO USE THE
+INTEL SOFTWARE, OR OTHERWISE, NOR FOR PUNITIVE, INCIDENTAL, CONSEQUENTIAL, OR
+SPECIAL DAMAGES OF ANY KIND, EVEN IF INTEL OR ITS SUPPLIERS AND LICENSORS HAS
+BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.   SOME JURISDICTIONS PROHIBIT
+EXCLUSION OR LIMITATION OF LIABILITY FOR IMPLIED WARRANTIES, CONSEQUENTIAL OR
+INCIDENTAL DAMAGES, SO CERTAIN LIMITATIONS MAY NOT APPLY.  YOU MAY ALSO HAVE
+OTHER LEGAL RIGHTS THAT VARY BETWEEN JURISDICTIONS. 
+
+EXCLUSION OF WARRANTIES.  THE SOFTWARE IS PROVIDED "AS IS" AND POSSIBLY WITH
+FAULTS. UNLESS EXPRESSLY AGREED OTHERWISE, INTEL AND ITS SUPPLIERS AND
+LICENSORS DISCLAIM ANY AND ALL WARRANTIES AND GUARANTEES, EXPRESS, IMPLIED OR
+OTHERWISE, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+NONINFRINGEMENT, OR FITNESS FOR A PARTICULAR PURPOSE.  Intel does not warrant
+or assume responsibility for the accuracy or completeness of any information,
+text, graphics, links or other items contained within the Software.  You assume
+all liability, financial or otherwise, associated with Your use or disposition
+of the Software.
+		
+APPLICABLE LAW. Claims arising under this Agreement shall be governed by the
+laws of State of California], excluding its principles of conflict of laws and
+the United Nations Convention on Contracts for the Sale of Goods.  
+
+WAIVER AND AMENDMENT. No modification, amendment or waiver of any provision of
+this Agreement shall be effective unless in writing and signed by an officer of
+Intel.  No failure or delay in exercising any right, power, or remedy under
+this Agreement shall operate as a waiver of any such right, power or remedy. 
+Without limiting the foregoing, terms and conditions on any purchase orders or
+similar materials submitted by you to Intel, and any terms contained in IntelÂ’s
+standard acknowledgment form that are in conflict with these terms, shall be of
+no force or effect.
+
+SEVERABILITY.  If any provision of this Agreement is held by a court of
+competent jurisdiction to be contrary to law, such provision shall be changed
+and interpreted so as to best accomplish the objectives of the original
+provision to the fullest extent allowed by law and the remaining provisions of
+this Agreement shall remain in full force and effect.
+
+EXPORT RESTRICTIONS.  Each party acknowledges that the Software is subject to
+applicable import and export regulations of the United States and of the
+countries in which each party transacts business, specifically including U.S.
+Export Administration Act and Export Administration Regulations.  Each party
+shall comply with such laws and regulations, as well as all other laws and
+regulations applicable to the Software.  Without limiting the generality of the
+foregoing, each party agrees that it will not export, re-export, transfer or
+divert any of the Software or the direct programs thereof to any restricted
+place or party in accordance with U.S. export regulations.  Note that Software
+containing encryption may be subject to additional restrictions.
+
+GOVERNMENT RESTRICTED RIGHTS. The Software is provided with "RESTRICTED RIGHTS."
+Use, duplication, or disclosure by the Government is subject to restrictions as
+set forth in FAR52.227-14 and DFAR252.227-7013 et seq. or their successors. Use
+of the Software by the Government constitutes acknowledgment of Intel's
+proprietary rights therein. Contractor or Manufacturer is Intel Corporation,
+2200 Mission College Blvd., Santa Clara, CA  95052.
+
+TERMINATION OF THE AGREEMENT. Intel may terminate this Agreement if you violate
+its terms. Upon termination, you will immediately destroy the Software or
+return all copies of the Software to Intel.
+
+--------------------------------------------------------------------------------
+
+EXHIBIT "A"
+
+SOFTWARE LICENSE AGREEMENT (Final, Single User)
+
+IMPORTANT - READ BEFORE COPYING, INSTALLING OR USING.
+
+Do not use or load this firmware image (the "Software") until you have carefully
+read the following terms and conditions. By loading or using the Software, you
+agree to the terms of this Agreement. If you do not wish to so agree, do not
+install or use the Software.
+
+LICENSE. You may copy and use the Software, subject to these conditions: 
+1. This Software is licensed for use only in conjunction with Intel component
+   products. Use of the Software in conjunction with non-Intel component 
+   products is not licensed hereunder. 
+2. You may not copy, modify, rent, sell, distribute or transfer any part of the
+   Software except as provided in this Agreement, and you agree to prevent
+   unauthorized copying of the Software. 
+3. You may not reverse engineer, decompile, or disassemble the Software. 
+4. You may not sublicense the Software. 
+5. The Software may contain the software or other property of third party
+   suppliers. 
+
+OWNERSHIP OF SOFTWARE AND COPYRIGHTS. Title to all copies of the Software
+remains with Intel or its suppliers. The Software is copyrighted and protected
+by the laws of the United States and other countries, and international treaty
+provisions. You may not remove any copyright notices from the Software. Intel
+may make changes to the Software, or items referenced therein, at any time
+without notice, but is not obligated to support or update the Software. Except
+as otherwise expressly provided, Intel grants no express or implied right under
+Intel patents, copyrights, trademarks, or other intellectual property rights.
+You may transfer the Software only if a copy of this license accompanies the 
+Software and the recipient agrees to be fully bound by these terms.
+
+EXCLUSION OF OTHER WARRANTIES EXCEPT AS PROVIDED ABOVE, THE SOFTWARE IS PROVIDED
+"AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTY OF ANY KIND INCLUDING
+WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, OR FITNESS FOR A PARTICULAR
+PURPOSE. Intel does not warrant or assume responsibility for the accuracy or
+completeness of any information, text, graphics, links or other items contained
+within the Software.
+
+LIMITATION OF LIABILITY. IN NO EVENT SHALL INTEL OR ITS SUPPLIERS BE LIABLE FOR
+ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, LOST PROFITS, BUSINESS
+INTERRUPTION, OR LOST INFORMATION) ARISING OUT OF THE USE OF OR INABILITY TO
+USE THE SOFTWARE, EVEN IF INTEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES. SOME JURISDICTIONS PROHIBIT EXCLUSION OR LIMITATION OF LIABILITY FOR
+IMPLIED WARRANTIES OR CONSEQUENTIAL OR INCIDENTAL DAMAGES, SO THE ABOVE
+LIMITATION MAY NOT APPLY TO YOU. YOU MAY ALSO HAVE OTHER LEGAL RIGHTS THAT VARY
+BETWEEN JURISDICTIONS.
+
+TERMINATION OF THIS AGREEMENT. Intel may terminate this Agreement at any time if
+you violate its terms. Upon termination, you will immediately destroy the
+Software.
+
+APPLICABLE LAWS. Claims arising under this Agreement shall be governed by the
+laws of California, excluding its principles of conflict of laws and the United
+Nations Convention on Contracts for the Sale of Goods. You may not export the
+Software in violation of applicable export laws and regulations. Intel is not
+obligated under any other agreements unless they are in writing and signed by
+an authorized representative 
+of Intel.
+
+GOVERNMENT RESTRICTED RIGHTS. The Software is provided with "RESTRICTED RIGHTS."
+Use, duplication, or disclosure by the Government is subject to restrictions as
+set forth in FAR52.227-14 and DFAR252.227-7013 et seq. or their successors. Use
+of the Software by the Government constitutes acknowledgment of Intel's
+proprietary rights therein. Contractor or Manufacturer is Intel Corporation,
+2200 Mission College Blvd., Santa Clara, CA 95052.
+
+
+
+		
+
+#define IWI_FW_VERSION 3.1
 begin 644 ipw2200-bss.fw
-M```#`$`9``#&/P``D)$"``````!(```````?.!@`````_O\?`/[_'P#^_Q\`
+M`0`#`$`9``!^/P``Y)$"``````!(```````?.!@`````_O\?`/[_'P#^_Q\`
 M_O\?`/[_'P#^_Q\`_O\?`/[_'P#^_Q\`_O\?`/[_'P#^_Q\`_O\?`/[_'P``
 M'S@5````4````!0&````@`\X`'X?$@(```D``0\X`/X?8`#^/V``_E]@`/Y_
 M8`#^GV``_K]@`/[?8`#^_V``_A]A`/X_80#^7V$`_G]A`/Z?80#^OV$`_M]A
@@ -351,11 +354,11 @@ M```````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
-M```'L`L`%@`$`!0`&P````!@$&)3H```!6X`:@)P*$$!$`Z0P(8!8"A!Q(L`
+M```'L`4`"0`&``L`!`````!@$&)4H```!6X`:@)P*$$!$`Z0P(8!8"A!Q(L`
 M8!!!_F`100!J&4KP:H!*`6I`2@``0%`CH```FK#,L%*QHK$_LLBRY++XL@``
 M`&"I0$!0,:```)NP^[!`6D`:(54"8`#7*$%!4```_]`&`)R00>`6`&R2$>
-M!&`#R2(0MH\(``T`%P`'S`;8(E$``");04IIH"RP3K/(L,BP4+-2LV&S<;/T
+M!&`#R2(0MX\(``T`%P`'S`;8(E$``");04IIH"RP3K/(L,BP4+-2LV&S<;/T
 MM/FTR+#(L(JWR+#(L#*U-+4VMP+]6I4`$?`LBBMP!@4$`A42(?`L[8H,BP3K/(L,BP4+`TL%"P4+!0L%"P
 MR+#(L(JWR+#(L%"P4+!0L,BP4+!0L%"P4+!-L\BP3;-0L%"P4+!0L#2PR+!0
 ML,BP4+!0L!;<1=W]@I2(_8($@_V"/X/]@@WW)`&HM2I.X
 M+ELA(>?)E(@N6R$AX\FVN(!0_!_@R"!0(3,*R0+B?[$#8,A`6U`A-`+(#+('
-MLA]0(3,/R%!1(3(,R,Y0(3`)R2$S!LD(&T`;SD#P;#:.4K$`8!-`CU`A,03)
+MLA]0(3,/R%!1(3(,R,Y0(3`)R2$S!LD(&T`;SD#P;#>.4K$`8!-`CU`A,03)
 M(3,"R0(!0]!F`0`-@0$`*8*5``[19
+M&4-*#\8.R;&"4"$P*,@B5/&!%P`8SD>.8&!>0(!0]!F`0`-@0$`*8*5``[19
 M#\P.Q%`A,`7((P\C#@)@0$``9,1$(+``'P+)`16#0(90`!\"R0$5AD`D#H)@
 M"K$@L`!B`&9V4!<`!\P`8'9`#U"+0!!0C$!V4`$1=D"#4`$1@T`!`%M0[QE;
 M0`&S``!+#P``$5'*0`!@R%`#'P3(+EM`(!O(%&2%9MR$#P`/&01D%P`8R!,D"8$!`\K(!8$!`SUH!'@+((+#]@I2(_8($@_V"(+`$W:8/`6!`0""P
-M+ELA(0+)`0``8!!B'J)/4!D`@@$:41<`!0"Y;(2''R1I1`Q_[S@$`4%``
 M'PO)45!24EQ47587``7,`&!00!5@R[8!`,BP(E$LL`-@R[8":E5+0%#P04%0
@@ -394,7 +397,7 @@ M8$!`!6#+M@%D`&888.&$$&YVDPQD#T4;6P(:&TM
 M60XB411`(E$50!)NKFPB40`!BY,B419`(E$70")1&$``'P+(\K0%'_[."VX9
 M;")1``&;DR!0(3`$R1]0QQD?0"!J54L4;D!L(E$``:B3`6I52R!0(38$R11J
 M3TJULPEJ3TH*8`!D`FY";*H!``$0```!$````1!@N9,`8*5``6I52QM;_A@;
-M2R!0(3,%R`%@4&209N&$(%`(&;Z/7V209N&$#&[6DQM;`1H;2R1DA6;AA-R$
+M2R!0(3,%R`%@4&209N&$(%`(&;^/7V209N&$#&[6DQM;`1H;2R1DA6;AA-R$
 M(3`$R`D`(3``R"!0`1D;6_X8&TMM9-)FX8044"$P%L@54"9DTF;AA!1N\Y,4
 M4"$Q#<@;6P$:&TL64!MDA6;AA!=0'&2%9N&$W(0``"!J54LO43)4%``O00%J
 M54L.;@V4&UL]2B!0(3,DR,Y:(24AR4!:!1X>R00>',D!8!M;_A@;2U]DD&;A
@@ -403,19 +406,19 @@ M(%`!&0$?#,D$9`]%&T<%9`]%+UOS&"]+A6HO2Y"
 M4"$S*,C.6B$E!\E`6@4>`LA:M`0>'\@`8!M;/4K^&!M+7V209N%'X44``.%!
 MX4,6;F>4&UL!&AM+)&2%9N%'X44``.%!X4,0;G.4/5H;2PKB>K0A-0?)#&0/
 M11M'#60/18:T#&0/10=D&T4.9`]%0%H$'@3(CUHA(07)`6HO2P5J+TL`8*50
-MDZ2@M`!@$&(@HP*]`&`08B.MUK*QLMBQG[$\L2!0A0$0&#A*'U`@,`;)`VHA
+MDZ2@M`!@$&+XH@*]`&`08OVLUK*QLMBQG[$\L2!0A0$0&#A*'U`@,`;)`VHA
 M,0+(!6JMM`!JDTH(#P[B`V2!9MR$^&#_8A0`J@$`9A4``V2!9N&$Y[0$9(%F
 MW(3^8/]B%`"O`0$8J@$`9A4`!&2!9N&$N`$9`(4!!62!9MR$_&#_8A0``QBJ
 M`0!F%0`%9(%FX83GM.)'XD7D5>-7`0#A1^%%``#A0>%#`0!9#\P.6`\!:E9+
 M`&!>0`)@0$`&8,NV!F1*L%D.`6!`0`=@R[8`:E1*(E$":E5+A0$#&8(!0V`0
-M`(8!J`$P&;V/``&0`0%J54O"CX8!(E$0'QC)`!\&R04?$LP-'Q#.`Q$":E5+
+M`(8!J`$P&;Z/``&0`0%J54O#CX8!(E$0'QC)`!\&R04?$LP-'Q#.`Q$":E5+
 M``$-;B)1``$;E0%J54L#;B)1(94(8,NV!&1*L`%J5$H0;@)J54LB40`!+)4!
 M:E5+([4!9$JP`61*L")1A0$B50\9.Z4_M4*U2[5MM0ANU86CM0%HP0%)#@AN
 M$&TB40`!1Y6CM0%HP0%)#@``$%$14R)5(E<0`!!!$4,241-3(E4B5Q$`$D$3
 M0Q11%5,B52)7$0`4015#%E$74R)5(E<1`!9!%T,"9(ZU`6C!`4D.```041%3
 M(E4B5Q(`$$$10Q)1$U,B52)7$P`201-#%%$54R)5(E<3`!1!%4,641=3(E4B
 M5Q,`%D$70P)D$%$14Q``$$$10Q)1$U,`9!$`$D$30Q11%5,1`!1!%4,641=3
-M$0`601=#`&"H`;V/IZ6JM;&UKK4,;M6%20_3M0ENU86YM4@.````;=B%"6W8
+M$0`601=#`&"H`;Z/IZ6JM;&UKK4,;M6%20_3M0ENU86YM4@.````;=B%"6W8
 MA0QMV(4!:,$!20](#P-MV(4!:,$!_F`#0?]@!$$%00%HP0%+#P``"%$A,P?(
 M`%$#00%1!$$"405!$&#+MB)1U94!``-N(E$``=F5`0`LL!1@*$%!4"A!X&P@
 M;D`!*$'DE01N*$'HE2!J54L"4"A!`U`H00Q0*$$-4`%J54O`ABA!Q(O@;"!N
@@ -439,61 +442,61 @@ M(E4)P14`A0$+``$5"@`%`6&7`0`6`&6W(E,.``H
 M``4!;IH`1D`&0`9`!D``QD!`*@!&`"(`0$`++`@8%5!`&!B0`%@
 M54$`8,Y`Q$",@"UD%P`"S)FW++"0#R)1(E%!0`!L`VXB40`!GY>,@$-D%P`)
 MSP!4`58>%1<`!,\!8*E`^[``8*E``VP#;B)1``&REP10(3<$R,Y0`1O.0`-0
-MCT`A-2W)!5`A-0[)#@"]CS`9"@`":E5+0`&$092/`6I52[:.Z[>>C@1:0"(+
-MR`50(38$R1!DA$7;MPADA$6VCOFW0R()R4$B`LGYMP50(38#R`ADZ+<09(1%
-MD0_YM\10(3`$R2(/(@XD#V!185,/9!``8$%A0R)1)`[$4"$P`L@7OP9L#&XB
+MCT`A-2W)!5`A-0[)#@"^CS`9"@`":E5+0`&$096/`6I52[>.Z[>?C@1:0"(+
+MR`50(38$R1!DA$7;MPADA$6WCOFW0R()R4$B`LGYMP50(38#R`ADZ+<09(1%
+MD0_YM\10(3`$R2(/(@XD#V!185,/9!``8$%A0R)1)`[$4"$P`L@8OP9L#&XB
 M50(!_Y<"4`<9`!\&R0$5@@$8`!@`$``@:E5+0&00`(8!0`%!`4(!0P%'`0%J
 M54LG0"A"*40J1BM.`FI52R)1P$`!:E5+03(3R`!0`5($$8=`B$*!0@!:`12O
-M`0)@54'!;")1``$PF`%J54M&N`)J54O!;!=N(E$``3J8`6I52P!@@4#*BPV.
-M(@\B#B0/`6"M0`!@$&(@6B$G!L@$6B$@!EH'R0>O!%HA(`9:`LD3KSBO``"$
-M2L10(3`"R%Z_@%#T&8!`&%!D,`S(`FI52\!0`6I52T`R!.N!%HA(`9:`LGOKA2O``"$
+M2L10(3`"R%^_@%#T&8!`&%!D,`S(`FI52\!0`6I52T`R!GL(]TN&BQ@%`A,A/)Q@]+#P``&%$94\8.
 M`&07`!;(@%`$&X!`3U`:05Y0@!M>0`$`Q@]+#P``&%$94\8.`&07``3)@%#[
 M&8!``0!>4"$U6,B`4"$R`LEPL8!0(3,"R'"Q7E`A,!K)`1M>0%Q075(K5!<`
 M!,T2``@`S[@`9(U0CE(7``/*`N!(`C4".0BM0+$``8%Q`74"-4(Y2+%05
 M``!D%P`JR5Y0(30-]"2EH"'@3(.E0[5F6YAU2(5@1:(2`&
-M4!3(AP$$:CE*`&`08CVN```)``-:(2("R6`18!'>5-]6$`!"5!(`C[D%:JM*
-M6+X&6@5@K4``8!!B$Z\```!@J`$9`(4!DA"VCQ``1500`-Y4WU80`$I:`AX"
+M4!3(AP$$:CE*`&`08AFN```)``-:(2("R6`18!'>5-]6$`!"5!(`C[D%:JM*
+M6;X&6@5@K4``8!!B[ZX```!@J`$9`(4!DA"WCQ``1500`-Y4WU80`$I:`AX"
 MR`ZZWD#?0MQL!&Y%`4!+FIF/6B$A"\D":E5+Q&P,;D4!0$NDF0%J54NRN09N
 MKFQ%`4!+K)D`8$)0M[D#XD90M[E#4!<1`0\`:JQ*RXP$8$!``&""0(]:(2$"
-MR2"PAU2(5@!@$&(DK@!@$&+VJ[^+AU2(5@90`&JF2A:\```!9`!F!F#AA*^/
+MR2"PAU2(5@!@$&(`K@!@$&+0J[^+AU2(5@90`&JF2A:\```!9`!F!F#AA+"/
 M`FI52P!@PD##0@%J54N!4"$R+L@*4`M2`UHA)0C)"&00`(%:(28%R2$G`\D$
-M9!``"``Z0#M"!E`6X@%JJTI8OI`!`^)%5/VY0E00`!``$``(`(10&0"%`9(0
-MMH\/`!``$``NN@)J2DJ$4$2Y+KH#4"$W)\@5XH10A0$@4"$W!\@&6@A@K4``
-M8!!B$Z\``*@!&0"%`9(0MH]%5!``+KJ$4`!J2DI$N0D`0E00``)J54O"0,-"
+M9!``"``Z0#M"!E`6X@%JJTI9OI`!`^)%5/VY0E00`!``$``(`(10&0"%`9(0
+MMX\/`!``$``NN@)J2DJ$4$2Y+KH#4"$W)\@5XH10A0$@4"$W!\@&6@A@K4``
+M8!!B[ZX``*@!&0"%`9(0MX]%5!``+KJ$4`!J2DI$N0D`0E00``)J54O"0,-"
 M`6I52X%:(24"R,BY`FI52\!L0`$!:E5+0$%!,A+(I0^*-`3(:5`0&VE``%H!
 M%*\!`FI52T`!0$%,F@%J54O]NH%0`FI52Q=N0@%`15::(30&R`)N0@%`15R:
 M9KHA,07(!FY"`4!%8YH!:E5+@5HA)A+("&H"8%5!X&RO`4`!0$%PF@%@54&)
 M4(I2J@$2`)P.D@^9NB$G`\@$:FRZ(2`(R0-:(29$R8E0BE*PC?VZ\%%`0?%1
-M0$'R44!!!5*_C\`90$$"_J[0U`7$0$/!6I`
+M=T(D#L10_1G$0&R/`6`_CL"&*$'$BP)@0$#%CB"P`^)&4">[0U`7$0$/!6I`
 M2@!JK$K+C`5@0$``8()`(+"&8`JQ$;$`:JQ*RXS\W/G5C(`>9!<`];H;L&8F=#(0\B47!!(E%Q02)1$$B47E!(E%Z02)1>T$B47Q!
-M(E%]02)1?D$B47]!D0\":E5+P&P8;B)1``&EFP%J54L89.&+#8XB#R(.)`^!
+M(E%]02)1?D$B47]!D0\":E5+P&P8;B)1``&EFP%J54L89.&+#HXB#R(.)`^!
 M4/,9(2("R`0;@4`@8%5!8E`A,0%@54$"R=*Y=K(`#@$.`@X##@$````$VP!J
 M*$O$NP$``FI52\!0P5(!:E5+&&2%`0@>",B-`4,@!<@>9(%J`AJ!2HT!(2*!
 M6@+(!!J!2@!0`5(2``1:(20&R`)D$@"!6A`:@4J)0(I"`%`!4@1D$``#6B$E
 M'\D$6D,B!\@$9!``@5I`&H%*$[Q`(@?("&00`(%:`1J!2A.\0B('R`AD$`"!
 M6B`:@4H3O`1D$`"!6H`:@4J'0(A"`0"%`0%@`&(``.%#X4$``.%#X4.H`1IN
-M(9R'`<=.`UH*&``>!,D@6B$G(,D$6B$@'!,D@6B$G(,D$6B$@'`LC[&0X`J`$!9(!FX82"
-M`0T`EP$(``%J.4H`8!!B/:X```D``&2`9N&$J`'^&00;`V2`9N&$Q%`A,`+(
-M:K]9#B];@!HO2P!@QD#9O13B+UOS&"]+(%HA(`?)GHT/6_P8`1H/2Z"\ZFHO
+M`0T`EP$(``%J.4H`8!!B&:X```D``&2`9N&$J`'^&00;`V2`9N&$Q%`A,`+(
+M:[]9#B];@!HO2P!@QD#9O13B+UOS&"]+(%HA(`?)GHT/6_P8`1H/2Z"\ZFHO
 M2P];_!@!&@]+H+PO6_,8+TOJ:B]+#UO\&`(:#TLC;J&`'PL8/2@X811E'2@_&#@%D`&888`!B``#A1^%%``#A0>%#```@
-M8%5!`&!B0`%@54&L4$VM`0``8!!B(*@`8!!BXJ@`8!!B,ZL``,8/2@X#XD=0
-M7KU$4`45&$$90TH/Q@[.4"$U!.H&!KO81@/XX*L0```60`9@!@X819
 M#@%@QD#9O2]1@!LO02];\Q@O2R!0(3`#R9Z-@[WJ:B]+(VZ$G009P/'U`A-!+(
 M4%$A,@_(SE`A,`S)(3('R2$Q!`6!50<90"ZZ#O':]@5`":E5+
-M(30)R")5`@$B50(!`FXB51>>(KXA,0?(!FXB50(!'9XB52)5X!D`'P[)`6I5
-M2PAJ(3<"R`1J`F151:\!X&PB50(!+Y[!6@%D544!`+KX;8))!
-M@[X88))!@[X28))!@[X,8))!@[X)8))!@[X&8))!@[X)8))!"0`"9!``&`"&
-MO@-@DD$)``)D$`"009%#P0\`````T@&049%3`600`!@`&`"J`1``"```8*M0
-MF*XSN?BY`&`08B*G?[D&8F=#(0\/42`;#T%P;01N(E$``<)!IIX`8F=#(0\,
-M;B)1``'"0:Z>#U'?&0]!`0"$#P``\%%P0?%1<4'R47)!D0\!````Q%`"&\1`
-MQ%`!&\1`+5`"&RU`.]PZU2%1"Q\WR"(/(@XD#R)1C(`B9!<`+,T2`");PTK$
-M6B$A`\G#6D%*(E4B5P!$`487`![,(E$"0"$W&LA+#\)4"%$7``G,%,X&40=3
-MP%3!5A<`!$%``7E!0`%Z04`!
-M>T%``7Q!0`%]04`!?D%``7]!`0``8%Q`74!>0"M0+$`!`*X!$&I52T`!`6I5
-M2P$`&0`9`!D`&0`!`!@`&``8`!@``0``````````````````````````````
+M#@];WQ@/2S6[(%`A,P7)`60`9@!@X83#N@```&3'4!D`A0$08%5!&^*J$+>/
+M"@`08%5!@&#E04`!YD$*8-)BX4/A04(!X47A1R-@TF+A0^%!``#A1>%'%&[Y
+MG0B^@&#E01Q0YD$%8()BX4/A01U4X47A1RAN!YX!8%5!QE`,KH.\=KV!4`)J
+M54LA-`G((E4"`2)5`@$";B)5&)XCOB$Q!\@&;B)5`@$>GB)5(E7@&0`?#LD!
+M:E5+"&HA-P+(!&H"9%5%KP'@;")5`@$PGL%:`61510$`MP%``4$!`1&^`0`!
+M`0$!`,Y4`&(/`$`9%0``9,Y$`0`I9"IFBU",4A<`!^`V"200D``F00`)!!D4/!#P````#2`9!1D5,!9!``&``8`*H!$``(``!@
+MJU"9KC.Y^+D`8!!B_*9_N09B9T,A#P]1(!L/07!M!&XB40`!PD&GG@!B9T,A
+M#PQN(E$``<)!KYX/4=\9#T$!`(0/``#P47!!\5%Q0?)14%``7I!
+M0`%[04`!?$%``7U!0`%^04`!?T$!``!@7$!=0%Y`*U`L0`$`K@$0:E5+0`$!
+M:E5+`0`9`!D`&0`9``$`&``8`!@`&``!````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
-M``````````````````````````````````````````````!)#\8/20_&#@!O
-M`&P`:@4!6Y`@:E5+!&YP;`!J!0%BD`)J54NP;E%L`&H%`6F0`6I52P!@S4!F
-M8$M`(&I52P!@84`(:E5+&&#/0$!@SD``8.U`!V#L0`)@ZT`!:E5+'F!N0`!@
-M;T`:8*-``&I02R];[QB`&B]+`6`H00%@*$%:8"A!T6`H00-@*$$);@!@*$&;
-MD`1NT&Q``2A!GY``8"A!*$$`8!!B"Z`(:E5+'^IH8)!B$X*%`-3&``8`/!"C+$!
-M:E5+"&!H50AJ54L7`/G.:&"08A."R$#)0L%`;&"08A."RT#,0@%D@6;B1^)%
-MY%'C4Q@`&`#P0AD`8!F"`0A@54'!4)\9%0#!0$=@D&(3@N1`Y4)"8)!B$X(9
-M`!D`XT(!8(%B$X*%`1@`&`#F0J@!&0`9`!D`&0`#&>!``1\,R3A@D&(3@N=`
-MZ$(68)!B$X(_&>E`'[$W8)!B$X+G0.A"%F"08A."&``8`.E"`&``9.-4Z5`5
-M$1(`YD#K5!``A0$_&`!@J`$8`(4!`!#UCN14Y587``//`6KJ2N90[%00`(4!
-M/Q@P'@+,,&H`8*@!&`"%`0`0]8[G5.A6%P`$S^I:`AKJ2@%J54L68)!B$X*%
-M`1@`&``.`#\9VD`_&-M*`6"!8A."&``8`!@`&``.``,903`#R-I09K';4`AJ
-M54L`9,]4%P`'S.I:(2`1R2$A#\F,L0AJ54O!6B$D%LGJ6B$@!LDA(03)*FR]
-MCQ:S!M,N6R$A`LA_L1:S!.(!:E5+.;(.;+V/.;(!:E5+'U`@,"7)(3$#R05@
-MEK$#8`-D@688@M0!U`$4;IR1`6"!8N)#XD'D4>-3&``8``AD547N0@%J54L?
-M4"$Q`\D#8+"Q!6`#9(%F&(((9%5%`FR]CPAJ54M9#@]1_!D/00```AL/01M;
-M`QH;2R];\Q@O2Q!NQY$%:B]+`6`$9(%F&((!9%5%'U`(9%5%(#`'R0%D(3$"
-MR`)DD`'>L<%0WH\.``!B!62!9AB"`61511]:("`#R01D%0`^0`A@54'+4'\9
-M`!$*`$`!RD#O0"9DA688@ED/`6I52Q!N^I$;6_X8&TL!8%!DD&88@A!N`Y(;
-M6P<:&TLI8(5B$X(A,?S((3`"R(6Q60X,;+V/%K/B0^)!Y%'C4P$`X4?A10``
-MX4'A0P$``````.Q0[5(!$>Q`[4((8%5!`&#J0`%@54$`;+V/0%`%'P?)!!\%
-MR2!0(3,"R*BP+EM#(/[(#.(68)!B$X*%`=^/#@`_&=I`/QC;2DNR`&"A8A."
-MA0%_&-M*!.(2;+V/4;(0;+V/X&S)CP)@6$#%0FE0$!EI0%M0(34)R-\96T#&
-M#TH.`&`801E!Q@Y>4"$V#4+\97D"-4(Y27%1=5A<`!,\`8%Q`74`K4"Q`
-M`MFG#YL.F@Z3#@+3>K($X@!@@6*%LFE0`AMI0`)@@6(3@H\!`N*YLB$P!,DA
-M,P+)C[(,O0!D@6;B1^)%Y%7C5Z=$J$:%`0X`"A\(R10?"B``#&#TH.
-M`&`#XD=0B+-$4!A!&4-*#\8.#N(?6B`@!L@#9(%F8%!A4AB"(F329J)0&((`
-M8).Y`PZ`4/L9@$""4`$;@D``8!-`-U#^&3=`!.($;+V/K;,6;+V/`MVPLTZT
-M2%%J0$`P!,D`#@$.QK?\&71`VH^'`4A;:TI(46Q`2%%M0'!0<5($9!(`0R`$
-MR``.`0_(M[T!#P!2$.Z.:UHA)@+("!$7``3-``\!#LBW=%!!,A#(V(\)'P+.
-MYK,*%>"CW[=VN/:X1KF%N86Y``X!#\:W85#\&8(!/E`'&14`/D`X:EA+!0\"
-MTO:SW+T`+6WM`"UP[3FL^:SR+0`M?&TM[3ZM+>TYK/FLTG&`61E1#*Z"&`#9&1$
-MK;H(;M!!P)0]M6E0"!MI0$;&M[0`8'5``PYI4`0;:4`94"$T")\\`8&9`
-M2[H&;DA1*$'001J52%$H00\9T$%(42A!`!G001E:(2`(R6M00C`1R"$B`\@A
-M-@W(!<,A(`+)/+4##B$@!\D&QP3$(2$#R3RUS+D88&=``0X"#FE0(3(+R'AL
-M"&Y(42A!``%&E6=0"!%G0$BV:E",&8@?#LA(42A!GD!!-0/(!&#%0$A3*$.?
-M0F=0`A%G0!SGQ5`A,AK)&<8"TVZU%NI+#P``&%$%'Q'.`--OM5D.#.8,Q@#S
-M`6"J0`!@$&)MK0```6!80'RUS+D`:G5*:UHA)C;(S%H!'@7)&5HA(P;(2+8:
-M6B$A`LA(M@!@$T`$;D=L`F!504A1``&2E0%@54%&41)`(3`LR;>U`FI52T=0
-M2%))5$I6`6I52Z!M*$$``2A#`0$H10(!*$>8`6=:!!!G2B$U=<@`:A-*@&IU
-M2DBV`FI52TI0P!D8`!@`#@!#9!``A@%``0%J54L30-JE`L=(MH4!&0`9`)9D
-M$``*`$`!(2$$R0,9$T#7M3`9V(\30`%D547:I9RUWK4XN^&U@&IU2DBV#U'?
-M&0]!`FI52P1N1VQ"`2A%Z)6@10)J54MB5&-61U!(4F)`8T(7`$A1*$%(4RA#
-M9%1E5F1`94(!:E5+"L@7``C(``\"#Y8/DP\0:I1+#+8`#I,.`@[%4"$R"L@)
-MP0!@$T!G4`819T"`8'5`2+9(52A%AD5(52A%AT5G4`@19T#%#C!J=4K%#TBV
-MVH\P&88!#U'?&0]!Q0X"#Y8/DP\`:G5*Q0_%#L4/`FI52T`!`6I52P`?E$$%
-MR(!J=4J3#@(.!&Y(42A!0I9G4`019T`"YTNV\K9G5`1@$``(`'!0<5(7``//
-M`&!6MA(`#```ZSD.I`^=#G50@!\%R1-00C`"R+.[#0"P0Y]!`&07`!7)G0\3
-MQ)E1FE.;09Q#F@\-Q'50`!\*R`)J54O3C@%J54N;#Y@/0&!U0`+3D[834$,P
-M$L@1P`CJ`L=\MDL/```840,*$&R
-MC)*WW+?8CPL1$&I52X8!10$!9%5%IU"H4@5D$`"J`2NW`6!30+6^:5`A-0/(
-M"V`-MP-@`N8-MP)@R(DH0;*,`&!H4&E:(2,#R"$AW7*$$H0[!0*$&Q4"A!LE`H00!@*$$!:E5+(&!5
-M00%@,T`!8%5!65`H05I0*$$`8"A!IXPH0;*,:5`A,SC)(34VR1E0(34SR#+F
-M`FI52^A4`6I52P%HP0%+#P``$%$7``/+$@!TMX4!_V`2`*H!$`!95%I6$``"
-M$0@`20YX4'E2$``001%#`&1Z4'M2$0`201-#?%!]4A$`%$$50WY0?U(1`!9!
-M%T,!:,$!20\84`0?(,AI4"$R+L@A-2S)`&`"4]V/"```40%3V(\5`(AD$V87
-M``+."0"009%#3V"20<$/`````-(!D%&14W)`:W2%%"`1<`
-M`\CBE^RW`PY>QAA0`1\$R0(?`LE*N-1L!FY(40`!]9<"W?NW=;@`TUD.`N8`
-MN'2X`/,$8*I``&`08FVM``#48-!`.%#10`!@TD#30LY0`1O.0-!L"FY``4!!
-M$Y@#XD=4&KA$5`$/`6"L0`!@$&+,K```SE#^&,*$&RC%D/S`Z3N0#3*>9H4!D`A0&2$.Z.`^)%5%6X0E00`()'5!```V0DND14$``%9!(`J@$2`%54$@`851E7%P`#S!A!&4-*#\8.
-M`0#4;`-N2%$``2A!T$%&04A1``$H0=!!1D$TF@O=95!"JJ*TN[2BM**T`+4`
-MM=RT/+6^NN90YU(!$>9`YT)I6@$/M%1(42A!T$%&0;14M59(4RA#T$-&0R$F
-M`\G40-5"%P`'R>10Y5(!$>1`Y4(!#K942%$H0=!!1D&W5M2/1D,A)@/)UD#7
-M0A<``LD!#KA42%$H0=!!1D&Y5M2/1D,A)@/)V$#90A<``LD!#@!N`&PUW690
-MC*H9M:*TW[2IN@"U`0\`:DA1*$'_'PW(!6Y(42A!_Q\"R0$.(=V8F@+"!FH!
-M#JFZ`V1F1+1L`VX!#U>Z8U"KJJ*T`+4`Z[!#GT&=#P+VL;J=#@K=9%"WJJ*T
-MHK2BM+^TU;3NM":U.@XY#I:Y%,25#^B*U;K^4/]2`1'^0/]"`6#-0)]1L%,,
-M``!D%P#PR55@XHH`TS=:(2`"R9T.F8FGC"A!LHS-2@/F!(H3O=6Y`L25#P#7
-M*$'DF@;$`MGHNIL.F@Z3#@$`U^<"YO.ZY/;QNL50(3("R0+'L+8`\PU@JD``
-M8!!B;:T``%N_!`[0;`IN10%`2P.;!@[.4`$;SD`34$,P!\@.P'5:
-M4`\9QT'&0=!!`�D``A48:F2["0``9,=%QD4"9%5%@$"!0D)DRT75#ZH!
-M(&`2``(5@D`!9%5%!F[4;$`!QT'&072;`F1510U@`FY';$(!*$710=)!`17'
-M1<9%?9M)5"A%2EHH2P1N2%4H1=%!TD$!%<=%QD6*FPY@T4'208%2QT.`4,=!
-M@5((``!@QD$!8,9!`61516=0"!%G0`)D547`&`!BJ`$9`!D`A@$0;D`!Q4&M
-MFP%D545(M@%D545P4'%2!!5G5!(`L$.?0=$/-U`!&S=``F1510!B@E`,``!@
-MT$'&FP%D546=#WRVP!@`8*@!&``8``X`A0&O`1)0A0$9`!D`FF00`+H!"@!`
-M`0!B(2$/R8<9$!L;00]1(!M`&P]!T0X``-`/`FI52UE@Q$$!8,-!`6I5
-M2P!0`5(@9!(`%FH(``10(30+R`)N54_84`\9Q$'#00D``A48:B&\"0``9,1%
-MPT4"9%5%@$"!0D)DR44@9,U'S44@$\!FY``4!!T$%:G$`!0$$/&=!!0`%`
-M00`9T$$!9%5%!%`A-`S(`F151=A00$$/&=!!V5!`00!@T$%XO`)D547@;`AN
-M0`%`07J11XU,'X@\`
-M(%`A,`\`!,@8`!@`#@#_&0+BX;P8`!@`[[P(``T`$``,``$4`!X'R0T`%F[K
-MO.N<#`"ZO`T`"&151>U:`61510`>#,CT0`X`@!OU0`AD544!:NU*`61510N]
-M_$`.`(`;_4``8`AD547M0`%D544!``%@@6(3@B$Q`LG-L@#J`N(6O5D.&U'G
-M&1M!#U'?&0]!`6I62P5@I4``8!!B`Z0``%D/S`X@:E5+`&`S4`%J54L!'V'(
-M`&`@:E5+,T`!:E5+.;W,6@$>5\A6Q57F*>)56@`>4<@#8(%B$X)70E9`^!D:
-M6B`E`LD#&P-D@688@M0!("4"R=0!N(P:6B`E"LE74E90^!D%&P-D@688@M0!
-MU`&XC%=25E`#9(%F&(*.O01@@6(3@E="5D#^&0$;!&2!9AB"!6"!8A."E4*4
-M0/P9`1L%9(%F&(((:,$!N(R54I10_!D"&P5D@688@@AHP0&XC%=25E`$9(%F
-M&(*54I10!62!9AB"_XF3N0`."^I+#U50!!%50`/B15":O4)0`A5)0'!0<5(.
-M9!<`1%#
-MDU`A,`/(&0`5OF%0`QD.`!D`&0`.``%D%0`!9(!FX4?A1>%!X4.GOH"^```&
-M4,=`_8Z/6B$C!LDA(03(Q%HA(`W)`&2`9AB"`&`'4AD`&0`.``$;`62`9AB"
-M%+D``+@!`&JO`0H?!LD4'PG)-Q\+R5>^#P`8`!@`&`!VO@\`&``8`':^#P`8
-M`!@`&``8`%V^`6JO`0\`&``8`!@`D$&10PMJDDO!#P````#2`9!5D5>26Y)1
-MO0$`'P/("0!VOB$@!<@`:@,?`LZ`&@D``1$(`#E0>:X!``!@$&)MK`!@$&)O
-MJ0D``F2`9AB"#```8&%0V(\$&0!D8505``<9"AX"R/L9#@"H`0%D@&88@H(!
-M#0"7`0@`N`$`:CE*/XX)``!D@&88@J@!_AD$&P-D@&88@@!@`&1)4%54$@#'
-M#DH.`NJQOLI`$U'K0!11[$`54>U`
-M%E'N0!=1[T`&4;!`!U&Q0`A1LD`!:E5+4U#1K@>Z!+=``:-!0`&D04`!I4%`
-M`:9!0`&G04`!J$%``:E!0`&J04`!JT%``:Q!0`&M04`!KD%``:]!`0"N`1!J
-M54M``0%J54L!`*X!0&I52T`!00$(:E5+`0`;6_X8&TL.`!@`&``8`!@`%0`!
-M`````&"H`1D`!1\<6CG.0[\```!@J`$IX@```&"H`1M:&0`9KR2_(;\PORV_
-M*K\GOS:_,[\#8"$F*LD!8"$E)\D+8"$D),D)8"$C(JM1@T$`X4-%``&!K
-M6B$B`LB1B-)`TT(`NQ@`&``@`!P`'``8`"P`)``O5!4`85I`&*H!%0`O0&A0
-M+D`!``E@*$%!4"A!"&!50>Y0*$'O4"A!`6!500IN`&`H08:?:%`H02!0(3,0
-MR#Y0(34-R!]0(#`*R0A@54'P4"A![U`H00%@54&GOV!0*$%A4`7B03`#R-I0
-MIK_;4"A!!6X`8"A!J9\@4"$S!,@^4"$U`LEA4"A!`&`H02Y0*$$O4"A!`&`N
-M0"]``0`@8%5!MP%``4$!`1&^`0`!`0$!8%5!`0"W`4`!00$!$;X!``$!`0$`
-M2%$H0=!!2%,H0]!#`0`9`!D`&0`9``$`&``8`!@`&``!`````````$@`````
-M`!\X&`````#^_Q\`_O\?`/[_'P#^_Q\`_O\?`/[_'P#^_Q\`_O\?`/[_'P#^
-M_Q\`_O\?`/[_'P#^_Q\`_O\?```?.!4```!0````0``"``"`#S@`?A\2`@``
-M"0`!#S@`_A]@`/X_8`#^7V``_G]@`/Z?8`#^OV``_M]@`/[_8`#^'V$`_C]A
-M`/Y?80#^?V$`_I]A`/Z_80#^WV$`_O]A`/X?8@#^/V(`_E]B`/Y_8@#^GV(`
-M_K]B`/[?8@#^_V(`_A]C`/X_8P!\GV,DZ@(`$'Z.4P!\7V,@TP(`(&1`*`#^
-M?V,`_O\?(`$`(`1^CE,0_I]A("H`(``8CE,@`0`@!'Z.4Q3^GV$@)P`@`!B.
-M4R`!`"`$?HY3&/Z?82`D`"``&(Y3(`$`(`1^CE,<_I]A("$`(``8CE,@`0`@
-M!'Z.4R#^GV$@'@`@`!B.4R`!`"`$?HY3)/Z?82`;`"``&(Y3(`$`(`1^CE,H
-M_I]A(!@`(``8CE,@`0`@!'Z.4RS^GV$@%0`@`!B.4R`!`"`$?HY3,/Z?82`2
-M`"``&(Y3(`$`(`1^CE,T_I]A(`\`(``8CE,@`0`@!'Z.4SC^GV$@#``@`!B.
-M4R`!`"`$?HY3//Z?82`)`"``&(Y3(`$`(`1^CE-`_I]A(`8`(``8CE,@`0`@
-M!'Z.4T3^GV$@`P`@`!B.4R`!`"`$?HY32/Z?80`8CE-$-`X00#(.$#PP#A`X
-M+@X0-"P.$#`J#A`L*`X0*"8.$"0D#A`@(@X0'"`.$!@>#A`4'`X0$!H.$``8
-M3D$`-@40(($/.``8;D,@%0`@$/Z?8:`3`"`4_I]A(!(`(!C^GV&@$``@'/Z?
-M82`/`"`@_I]AH`T`("3^GV$@#``@*/Z?8:`*`"`L_I]A(`D`(##^GV&@!P`@
-M-/Z?82`&`"`X_I]AH`0`(#S^GV$@`P`@0/Z?8:`!`"!$_I]A2/Z?840`3@M`
-M`"X+/``."S@`[@HT`,X*,`"N"BP`C@HH`&X*)`!."B``+@H<``X*&`#N"10`
-MS@D0`*X)!(#M"R"`#S@(&&X#J'Z.4Q`^#A"`D0`HH+DZ*!!^CE,0?HY#`*H`
-M(*A^CE,```X0!`(.$`@^#A`0?HY3`(XN*!!^CD,(`.X+@-4`(/___W____]_
-M____?____W____]_____?____W____]_____?____W____]_____?____W__
-M__]_____?____W____]_____?____W____]_J'Z.4Q`^#A"`?P`HH/HZ*!!^
-MCE,0?HY#`)@`(/___W____]_____?____W____]_____?____W____]_____
+M`````````````````````````````````````````````````$D/Q@])#\8.
+M`&\`;`!J!0%8&Y`
+M`&!O0!I@HT``:E!++UOO&(`:+TL!8"A!`6`H06!@*$'18"A!`V`H00EN`&`H
+M09R0!&[0;$`!*$&@D`!@*$$H00!@$&(+H`AJ54L?ZFA@D&+K@84!R$#)0A`8
+M(3<"R4!@(&"XL*H!%0#!0&E@D&+K@11XU,8`!@`\$*-
+ML0%J54L(8&A5"&I52Q<`^-3&``8`/!"&0!@&8(!"&!50<%0GQD5`,%`1V"08NN!Y$#E0D)@D&+K
+M@1D`&0#C0@%@@6+K@84!&``8`.9"J`$9`!D`&0`9``,9X$`!'PS).&"08NN!
+MYT#H0A9@D&+K@3\9Z4`@L3=@D&+K@>=`Z$(68)!BZX$8`!@`Z4(`8`!DXU3I
+M4!41$@#F0.M4$`"%`3\8`&"H`1@`A0$`$-&.Y%3E5A<``\\!:NI*YE#L5!``
+MA0$_&#`>`LPP:@!@J`$8`(4!`!#1CN=4Z%87``3/ZEH"&NI*`6I52Q9@D&+K
+M@84!&``8``X`/QG:0#\8VTH!8(%BZX$8`!@`&``8``X``QE!,`/(VE!GL=M0
+M"&I52P!DSU07``?,ZEHA(!')(2$/R8VQ"&I52\%:(206R>I:(2`&R2$A!,DJ
+M;)F/[K(&TRY;(2$"R("Q[K($X@%J54L1L@YLF8\1L@)LF8\(:E5+60X/4?P9
+M#T$```(;#T$;6P,:&TLO6_,8+TL0;I^1!6HO2P%@!&2!9O"!`61511]0"&15
+M12`P!\D!9"$Q`L@"9)`!MK'!4+J/#@``8@5D@6;P@0%D544?6B`@`\D$9!4`
+M/D`(8%5!RU!_&0`1"@!``11
+MXU,!`.%'X44``.%!X4,!``````#L4.U2`1'L0.U""&!500!@ZD`!8%5!`&R9
+MCT!0!1\'R00?!RYKP`9(%FXD?B1>15XU>G1*A&A0$.``H?",D4'PG)
+M-Q\*R6X?#\FEL@D`M8^4L@D`MH^4L@D`NX\0`!@`$`"TCY2R"0"[CQ``&``0
+M`+6/(2<"R`$5E++_9`]F%``.9!<`3LPF9`EF%P!*SG!`<4*X`0/BM(\/&6A`
+M#.(A,`K)!.(&;)F/J[(4;)F/XFREC^ZR`6"!8NN!%N(A/_+(03($R`-D543`
+MLD(R!,@'9%5$P+(`9%5$NX]@0KN/#@`#&6%`V+(`9%5$(3';R"$T(LD8`&!"
+MM8\A,P/)0!O5LK\90QD@&V%`'U`@,`C)85#\&0\`DU`9`!4`84`+W6J]!.(&
+M;)F/ZK(4;)F/XFREC^ZR<+D`:`%J54M9#M0!`6"E0`!@$&(#I```6`]9#\P.
+M5^+4`0@/`6"!8NN!&0`9`!D`!AD!&X(!`V"!8N)#XD$``.118$#X&>-384(5
+M`!]:("`$R`-D@6;P@2)@TF+K@:)`(F329@!@\($`#@!@#6(*``1J`&X!8(%B
+MZX&[CPX`_QD(``T`$``,``$4`!X&R0T`%FXVDPP`)[-N5&]6HU`0``@`#0#X
+M0/E"%P`0S`L``14*``!D%P#=R`3!``\>;"6S]E#W4@$1]D#W0EBS`&#(0`!@
+M$&('H@``Q@]*#@!@`^)'4&"S1%`801E#2@_&#@[B'UH@(`;(`V2!9F!085+P
+M@2)DTF:B4/"!`&!MN0,.@%#[&8!`@E`!&X)``&`30#=0_ADW0`3B!&R9CX6S
+M%FR9CP+=B+,FM$A1:D!`,`3)``X!#J"W_!ET0+:/AP%(6VM*2%%L0$A1;4!P
+M4'%2!&02`$,@!,@`#@$/HK>]`0\`4A#*CFM:(28"R`@1%P`$S0`/`0ZBMW10
+M03(0R+2/"1\"SKZS"A6XH[FW4+C0N""Y7[E?N0`.`0^@MV%0_!F"`3Y0!QD5
+M`#Y`.&I82P4/`M+.L[:W.0]5CP$.`@YP4'%2!&02`"A!*$,/42`;#T'1#M`.
+M(&3/1\]%<%!Q4@1D$@`6:@@`:E",&8@?"<@)``)D$@`(%TKFP`:LQ*3K2M
+MCT(!0P$7``/(3918M`,.5[2MCU:4SMUT4$`R"LD('Q3)B!\2R<@?$,E('P[)
+MOK,!#FE00!MI0!A0:Z0``'JT>K1[M!>U%K4!#AA0=*0``'JT>K3HM.BT[;2F
+MN710M(\/&7^DV+2/M-BTC[38M)NTOK.^LZ"TV+3)M(^TTK2/M+ZSOK-)Q@%D
+M940,N@A@`V1D1(>Z"&[009B4%[5I4`@;:4!&QH^T`&!U0`,.:5`$&VE`&5`A
+M-`G)#F`$9&1$A[H.;M!!KI07M09D940,N@)@9D`EN@O#:5`A,B;(&5`A-@+)
+MW+1I4"`;:4`"8`5D9$2'NM!!T$$7M1E0(30"R,^T`P[8M`+&L;38M!E0(32[
+MR`+&L;38M!I:(23/R1:U&EHA(^')%K4:6B$DX,D6M1I:(2/#R1:U&5`A-`/)
+M(3&P(;DA1*$$``2"59U`($6=`(K9J4(P9B!\.R$A1*$&>
+M0$$U`\@$8,5`2%,H0Y]"9U`"$6=`'.?%4"$R&LD9Q@+32+46ZDL/```8404?
+M$!<9&T%U4!4``^5`&ZZVP!NNMIT.
+ME0^"`0]1WQF_&0]!D`&9B8&,*$'*M@!D@@&=#FE0(3(AR2$S',D#8!4`@@$`
+M8!-0N8\5`**)@8PH08R,;+>VM[2/"Q$0:E5+A@%%`0%D546G4*A2!600`*H!
+M!;V`V`"YN>V`F"BB2A!C(P`8&A0:5HA(P/((2'=
+MR=SB<%1Q5AD`AP&%`0)@JT``8!!B7*X```!@55`0``@`O0&B$,J.#P`2`%E`
+M6D((``)J54OH4.E2$@``9`-NZFPH02A#0`%!`1,`$95(0`!!!$4,`9'I0>U(1`!)!$T-\4'U2
+M$0`4015#?E!_4A$`%D$70P%HP0%)#QA0!!\@R&E0(3(NR"$U+,D`8`)3N8\(
+M``!1`5.TCQ4`B&039A<``LX)`)!!D4-/8))!P0\`````T@&049%3V\.@XY#@O#!.((
+M;)F/J;<8;)F/Z&REC]F)[K(`TP7FZFREC]Z)M+>ON=F)[;SZ;*6/IKFN;`9N
+M`P\#ZTA1P+=(44(!%P`#R+R7QK<##E[&&%`!'P3)`A\"R22XU&P&;DA1``'/
+MEP+=U;=/N`#360X"YMJW3K@`\P1@JD``8!!B;:T``-1@T$`X4-%``--"
+MSE`!&\Y`T&P*;D`!0$'MEP/B1U3TMT14`0\!8*Q``&`08LRL``#.4/X9SD!9
+M#F%0_!F"`3Y0!QD5`#Y`58\08"A!*$-J4"A!:U`H06Q0*$%M4"A!KFP&;D`!
+M*$$4F-1L!FY``2A!&9BD#P-@@8PH08R,60_,#FVY`-,IYFA0&0"%`9(0RHX#
+MXD54+[A"5!``AP$050!F`&)+#P``$%$7``3+$@"%`4*XA0'_8!(`J@$0`(4!
+MJ@&X`1(`5502`,8/2@X801E#2@_&#NV\K[EPN0%@2X^N;`9N`P\#ZTA16;A(
+M44(!%P`#R%687[@##L8/2P\#XD=49;A$5!A1&5/&#A<`*,S-N&A:!&"M0.N^
+MJ`$9``7BA0%#?T54A[@9`!D`&0!A6A!D544A)@+)!!&&`4`!,!\"R`%B`6I5
+M2T)4$``/`&Q0;5(7``/*R&"0N!(``0!KB-)`TT+4;`9N2%$``9:8`-,UW3/F
+M`L?!N`,.`/,'8*I``&`08FVM``#$8-!`.%#10-!L"FY%`4!+K)C.4`$;SD`!
+M#P/B1U2WN$14!&"L0`!@$&+,K```SE#^&M"F"J0`!@$&)MK0```&`08@-J0$K$6B$@`LA=K]*IWHGMO*^YKFP&;@,/
+M2%%"`1<``\@CF2JY`PX`TS/F`L=9N4!0!1\%R0!@;$!M0%FY)`X`8'9`=T"!
+M4"$R(,D/4(M`$%",0,10`1DM0,1"`&`08L&N````8!!B;*\```%@SE0/`$`9
+M%0"!C"A!C(P"8$!``&!L0&U`WHGMO`!@$&(XJZ^Y#P`0'P/(`P_!LZRS`PX`
+M#W!0<5((9!(`#``RM@!@$&(@H`!@$&)!H6E0(30%R`!@:4`$8'NY`&`"Y@$;
+M$UH"'A?(-UHA(!3(`.&=#@AN`&0H18:9&UOG&!M+=505``/E0!N2N<`;#UO?
+M&+\8#TL"YP(;"L25#P+FH+F5#QANU`&>F754%0`!:E9+E0\!``]1WQD/03H.
+M.0X`TP/FWHGMO`!F$%5+#P``$%$7``3+$@"%`;^YA0'_8!(`J@$0`(4!Q@]*
+M#@/B7F#%N6QAJ@$2`%54$@`801E#2@_&#EM0(!M;0`3B"FR9C]:Y&FR9C^YL
+MI8_MO``.`0X"#@,.`0``8%-`D;X`9DL/```041<`!,L2`(4!\+F%`?]@$@"J
+M`1``A0%L4&U2(3\8R<8/2@X%XD=4$``#9/ZY1%00``5D$@"J`1(`5502`!A5
+M&5<7``/,&$$90TH/Q@X!`-1L`VY(40`!*$'0049!2%$``2A!T$%&00Z:"]UE
+M4!RJ>K23M'JT>K38M-BTM+06M9BZYE#G4@$1YD#G0FE:`0^T5$A1*$'0049!
+MM%2U5DA3*$/00T9#(28#R=1`U4(7``?)Y%#E4@$1Y$#E0@$.ME1(42A!T$%&
+M0;=6L(]&0R$F`\G60-="%P`"R0$.N%1(42A!T$%&0;E6L(]&0R$F`\G80-E"
+M%P`"R0$.`&X`;#7=9E!FJO.T>K2WM(.ZV+0!#P!J2%$H0?\?#<@%;DA1*$'_
+M'P+)`0XAW7*:`L(&:@$.@[H#9&9$M&P#;@$/,;IC4(6J>K38M`#KL$.?09T/
+M`O:+NIT."MUD4)&J>K1ZM'JTE[2MM,:T`+4Z#CD.<+D4Q)4/PHJONOY0_U(!
+M$?Y`_T(!8,U`GU&P4PP``&07`/#)56"\B@#3-UHA(`+)G0YSB8&,*$&,C,U*
+M`^;>B>V\K[D"Q)4/`-*M@#S#6"J0`!@$&)MK0``-[\$#M!L"FY%`4!+W9H&#LY0`1O.0!-0
+M0S`'R`[`=5IP'A3)`F!F0!'$=5!`'P[)];IP:G5*_KH":E5+KXX!:E5+FP^8
+M#T!@=4#%4"$R`\@##A&[`^)'5`>[1%0!#P=@K$``8!!BSZP``,Y0_AG.0(JV
+M=5`@&W5`&U'G&1`;&T$/42`;0!L/00)J54M98,=!`6#&00%J54MP4'%2+&02
+M`!9J"`!J4(P9B!\,R)Y0#QG'0<9!T$$`8-!!"0`"%1AJ/KL)``!DQT7&10)D
+M546`0(%"0F3+1=4/J@$@8!(``A6"0`%D544&;M1L0`''0<9!3IL"9%5%#6`"
+M;D=L0@$H1=%!TD$!%<=%QD57FTE4*$5*6BA+!&Y(52A%T4'200$5QT7&162;
+M#F#10=)!@5+'0X!0QT&!4@@``&#&00%@QD$!9%5%9U`($6=``F151<`8`&*H
+M`1D`&0"&`1!N0`'%08>;`61512*V`61517!0<5($%6=4$@"P0Y]!T0\W4`$;
+M-T`"9%5%`&*"4`P``�:";`61519T/5K;`&`!@J`$8`!@`#@"%`:\!$E"%
+M`1D`&0":9!``N@$*`$`!`&(A(0_)AP$#&1<``\@`:@$`N`$9`!D``QD7``C(
+M`6H!`!D`&0`9`!D`NKN`:G5*`0```!M1YQD0&QM!#U$@&T`;#T'1#@``T`\"
+M:E5+66#$00%@PT$!:E5+`%`!4B!D$@`6:@@`!%`A-`O(`FY53]A0#QG$0<-!
+M"0`"%1AJ^[L)``!DQ$7#10)D546`0(%"0F3)12!DS4?-12`1S$/,0=4/J@$@
+M8!(``A6"0-(/`O\.O```````````T$?01
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9DDA51065670;
	Sat,  9 May 2009 18:54:18 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8C5668FC14;
	Sat,  9 May 2009 18:54:18 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n49IsIBM031544;
	Sat, 9 May 2009 18:54:18 GMT (envelope-from sam@svn.freebsd.org)
Received: (from sam@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n49IsI5e031543;
	Sat, 9 May 2009 18:54:18 GMT (envelope-from sam@svn.freebsd.org)
Message-Id: <200905091854.n49IsI5e031543@svn.freebsd.org>
From: Sam Leffler 
Date: Sat, 9 May 2009 18:54:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191945 - head/sys/contrib/dev/iwi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 18:54:19 -0000

Author: sam
Date: Sat May  9 18:54:18 2009
New Revision: 191945
URL: http://svn.freebsd.org/changeset/base/191945

Log:
  Makefile to record the technique by which the .uu files are generated
  from the Intel-distributed .fw files

Added:
  head/sys/contrib/dev/iwi/Makefile   (contents, props changed)

Added: head/sys/contrib/dev/iwi/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/contrib/dev/iwi/Makefile	Sat May  9 18:54:18 2009	(r191945)
@@ -0,0 +1,24 @@
+#	$FreeBSD$
+
+FW_VERSION=3.1
+ALL=	ipw2200-bss.fw.uu ipw2200-ibss.fw.uu ipw2200-sniffer.fw.uu
+
+all:	${ALL}
+
+ipw2200-bss.fw.uu: ipw2200-bss.fw LICENSE
+	(cat LICENSE; \
+	 echo '#define IWI_FW_VERSION' ${FW_VERSION}; \
+	 uuencode ipw2200-bss.fw ipw2200-bss.fw) > ${.TARGET}
+
+ipw2200-ibss.fw.uu: ipw2200-ibss.fw LICENSE
+	(cat LICENSE; \
+	 echo '#define IWI_FW_VERSION ' ${FW_VERSION}; \
+	 uuencode ipw2200-ibss.fw ipw2200-ibss.fw) > ${.TARGET}
+
+ipw2200-sniffer.fw.uu: ipw2200-sniffer.fw LICENSE
+	(cat LICENSE; \
+	 echo '#define IWI_FW_VERSION ' ${FW_VERSION}; \
+	 uuencode ipw2200-sniffer.fw ipw2200-sniffer.fw) > ${.TARGET}
+
+clean:
+	rm -f ${ALL}

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 19:00:48 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1396E1065673;
	Sat,  9 May 2009 19:00:48 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 01F0D8FC1A;
	Sat,  9 May 2009 19:00:48 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n49J0ltR031750;
	Sat, 9 May 2009 19:00:47 GMT (envelope-from imp@svn.freebsd.org)
Received: (from imp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n49J0lrY031749;
	Sat, 9 May 2009 19:00:47 GMT (envelope-from imp@svn.freebsd.org)
Message-Id: <200905091900.n49J0lrY031749@svn.freebsd.org>
From: Warner Losh 
Date: Sat, 9 May 2009 19:00:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191946 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 19:00:49 -0000

Author: imp
Date: Sat May  9 19:00:47 2009
New Revision: 191946
URL: http://svn.freebsd.org/changeset/base/191946

Log:
  Retire kern.vm.kmem.size.  It was marked as obsolete prior to 5.2, so
  it can go.

Modified:
  head/sys/kern/kern_malloc.c

Modified: head/sys/kern/kern_malloc.c
==============================================================================
--- head/sys/kern/kern_malloc.c	Sat May  9 18:54:18 2009	(r191945)
+++ head/sys/kern/kern_malloc.c	Sat May  9 19:00:47 2009	(r191946)
@@ -603,10 +603,6 @@ kmeminit(void *dummy)
 		vm_kmem_size = vm_kmem_size_max;
 
 	/* Allow final override from the kernel environment */
-#ifndef BURN_BRIDGES
-	if (TUNABLE_ULONG_FETCH("kern.vm.kmem.size", &vm_kmem_size) != 0)
-		printf("kern.vm.kmem.size is now called vm.kmem_size!\n");
-#endif
 	TUNABLE_ULONG_FETCH("vm.kmem_size", &vm_kmem_size);
 
 	/*

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 19:01:25 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2FA2F10656C4;
	Sat,  9 May 2009 19:01:25 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1E71E8FC12;
	Sat,  9 May 2009 19:01:25 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n49J1Ppf031799;
	Sat, 9 May 2009 19:01:25 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n49J1PDO031798;
	Sat, 9 May 2009 19:01:25 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <200905091901.n49J1PDO031798@svn.freebsd.org>
From: Ed Schouten 
Date: Sat, 9 May 2009 19:01:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191947 - head/sys/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 19:01:25 -0000

Author: ed
Date: Sat May  9 19:01:24 2009
New Revision: 191947
URL: http://svn.freebsd.org/changeset/base/191947

Log:
  Clean up .
  
  - Just use #error when including  in the kernel. Code
    hasn't used this header for years now and probably doesn't compile
    anyway, because of -Werror.
  
  - Get rid of struct ttysize, TIOCGSIZE and TIOCSSIZE. All code nowadays
    use both TIOC[GS]SIZE and TIOC[GS]WINSZ. Because we have other popular
    systems that don't implement the first, it's of little use to support
    interfaces nowadays.

Modified:
  head/sys/sys/ioctl.h

Modified: head/sys/sys/ioctl.h
==============================================================================
--- head/sys/sys/ioctl.h	Sat May  9 19:00:47 2009	(r191946)
+++ head/sys/sys/ioctl.h	Sat May  9 19:01:24 2009	(r191947)
@@ -39,33 +39,13 @@
 #define	_SYS_IOCTL_H_
 
 #ifdef _KERNEL
-#ifndef _SYS_CDEFS_H_
-#error this file needs sys/cdefs.h as a prerequisite
-#endif
-#ifdef __CC_SUPPORTS_WARNING
-#warning "Don't #include ioctl.h in the kernel.  Include xxxio.h instead."
-#endif
+#error "Don't #include ioctl.h in the kernel.  Include xxxio.h instead."
 #endif /* _KERNEL */
 
-#include 
-
-/*
- * Pun for SunOS prior to 3.2.  SunOS 3.2 and later support TIOCGWINSZ
- * and TIOCSWINSZ (yes, even 3.2-3.5, the fact that it wasn't documented
- * notwithstanding).
- */
-struct ttysize {
-	unsigned short	ts_lines;
-	unsigned short	ts_cols;
-	unsigned short	ts_xxx;
-	unsigned short	ts_yyy;
-};
-#define	TIOCGSIZE	TIOCGWINSZ
-#define	TIOCSSIZE	TIOCSWINSZ
-
 #include 
 
 #include 
 #include 
+#include 
 
 #endif /* !_SYS_IOCTL_H_ */

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 19:08:23 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0910C106566C;
	Sat,  9 May 2009 19:08:23 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D16E18FC14;
	Sat,  9 May 2009 19:08:22 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n49J8MtG031964;
	Sat, 9 May 2009 19:08:22 GMT (envelope-from imp@svn.freebsd.org)
Received: (from imp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n49J8MZC031963;
	Sat, 9 May 2009 19:08:22 GMT (envelope-from imp@svn.freebsd.org)
Message-Id: <200905091908.n49J8MZC031963@svn.freebsd.org>
From: Warner Losh 
Date: Sat, 9 May 2009 19:08:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191948 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 19:08:23 -0000

Author: imp
Date: Sat May  9 19:08:22 2009
New Revision: 191948
URL: http://svn.freebsd.org/changeset/base/191948

Log:
  Spell NULL properly, use (void) rather than () for functions with no
  parameters.  Mark two items as static that aren't used elsewhere...

Modified:
  head/sys/kern/subr_kdb.c

Modified: head/sys/kern/subr_kdb.c
==============================================================================
--- head/sys/kern/subr_kdb.c	Sat May  9 19:01:24 2009	(r191947)
+++ head/sys/kern/subr_kdb.c	Sat May  9 19:08:22 2009	(r191948)
@@ -47,9 +47,9 @@ __FBSDID("$FreeBSD$");
 #endif
 
 int kdb_active = 0;
-void *kdb_jmpbufp = NULL;
+static void *kdb_jmpbufp = NULL;
 struct kdb_dbbe *kdb_dbbe = NULL;
-struct pcb kdb_pcb;
+static struct pcb kdb_pcb;
 struct pcb *kdb_thrctx = NULL;
 struct thread *kdb_thread = NULL;
 struct trapframe *kdb_frame = NULL;
@@ -66,22 +66,22 @@ static int kdb_sysctl_trap_code(SYSCTL_H
 
 SYSCTL_NODE(_debug, OID_AUTO, kdb, CTLFLAG_RW, NULL, "KDB nodes");
 
-SYSCTL_PROC(_debug_kdb, OID_AUTO, available, CTLTYPE_STRING | CTLFLAG_RD, 0, 0,
-    kdb_sysctl_available, "A", "list of available KDB backends");
+SYSCTL_PROC(_debug_kdb, OID_AUTO, available, CTLTYPE_STRING | CTLFLAG_RD, NULL,
+    0, kdb_sysctl_available, "A", "list of available KDB backends");
 
-SYSCTL_PROC(_debug_kdb, OID_AUTO, current, CTLTYPE_STRING | CTLFLAG_RW, 0, 0,
-    kdb_sysctl_current, "A", "currently selected KDB backend");
+SYSCTL_PROC(_debug_kdb, OID_AUTO, current, CTLTYPE_STRING | CTLFLAG_RW, NULL,
+    0, kdb_sysctl_current, "A", "currently selected KDB backend");
 
-SYSCTL_PROC(_debug_kdb, OID_AUTO, enter, CTLTYPE_INT | CTLFLAG_RW, 0, 0,
+SYSCTL_PROC(_debug_kdb, OID_AUTO, enter, CTLTYPE_INT | CTLFLAG_RW, NULL, 0,
     kdb_sysctl_enter, "I", "set to enter the debugger");
 
-SYSCTL_PROC(_debug_kdb, OID_AUTO, panic, CTLTYPE_INT | CTLFLAG_RW, 0, 0,
+SYSCTL_PROC(_debug_kdb, OID_AUTO, panic, CTLTYPE_INT | CTLFLAG_RW, NULL, 0,
     kdb_sysctl_panic, "I", "set to panic the kernel");
 
-SYSCTL_PROC(_debug_kdb, OID_AUTO, trap, CTLTYPE_INT | CTLFLAG_RW, 0, 0,
+SYSCTL_PROC(_debug_kdb, OID_AUTO, trap, CTLTYPE_INT | CTLFLAG_RW, NULL, 0,
     kdb_sysctl_trap, "I", "set to cause a page fault via data access");
 
-SYSCTL_PROC(_debug_kdb, OID_AUTO, trap_code, CTLTYPE_INT | CTLFLAG_RW, 0, 0,
+SYSCTL_PROC(_debug_kdb, OID_AUTO, trap_code, CTLTYPE_INT | CTLFLAG_RW, NULL, 0,
     kdb_sysctl_trap_code, "I", "set to cause a page fault via code access");
 
 /*
@@ -292,7 +292,7 @@ kdb_alt_break(int key, int *state)
  */
 
 void
-kdb_backtrace()
+kdb_backtrace(void)
 {
 
 	if (kdb_dbbe != NULL && kdb_dbbe->dbbe_trace != NULL) {
@@ -346,7 +346,7 @@ kdb_enter(const char *why, const char *m
  */
 
 void
-kdb_init()
+kdb_init(void)
 {
 	struct kdb_dbbe *be, **iter;
 	int cur_pri, pri;

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 19:19:19 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CE7EB1065677;
	Sat,  9 May 2009 19:19:19 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A28CA8FC08;
	Sat,  9 May 2009 19:19:19 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n49JJJpA032231;
	Sat, 9 May 2009 19:19:19 GMT (envelope-from sam@svn.freebsd.org)
Received: (from sam@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n49JJJin032230;
	Sat, 9 May 2009 19:19:19 GMT (envelope-from sam@svn.freebsd.org)
Message-Id: <200905091919.n49JJJin032230@svn.freebsd.org>
From: Sam Leffler 
Date: Sat, 9 May 2009 19:19:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191949 - head/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 19:19:20 -0000

Author: sam
Date: Sat May  9 19:19:19 2009
New Revision: 191949
URL: http://svn.freebsd.org/changeset/base/191949

Log:
  iwn firmware

Added:
  head/share/man/man4/iwnfw.4   (contents, props changed)

Added: head/share/man/man4/iwnfw.4
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/share/man/man4/iwnfw.4	Sat May  9 19:19:19 2009	(r191949)
@@ -0,0 +1,52 @@
+.\" Copyright (c) 2009 Sam Leffler, Errno Consulting
+.\" 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. The name of the author may not be used to endorse or promote products
+.\"    derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 9, 2009
+.Dt IWNFW 4
+.Os
+.Sh NAME
+.Nm iwnfw
+.Nd "Firmware Module for Intel Wireless driver"
+.Sh SYNOPSIS
+To compile this module into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device iwnfw"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+iwnfw_load="YES"
+.Ed
+.Sh DESCRIPTION
+This module provides access to firmware sets for the
+Intel Wireless WiFi Link 4965AGN IEEE 802.11n adapters.
+It may be
+statically linked into the kernel, or loaded as a module.
+.Sh SEE ALSO
+.Xr iwn 4 ,
+.Xr firmware 8

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 19:19:31 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 95D001065679;
	Sat,  9 May 2009 19:19:31 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6ABD58FC1C;
	Sat,  9 May 2009 19:19:31 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n49JJVRY032272;
	Sat, 9 May 2009 19:19:31 GMT (envelope-from sam@svn.freebsd.org)
Received: (from sam@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n49JJVX1032271;
	Sat, 9 May 2009 19:19:31 GMT (envelope-from sam@svn.freebsd.org)
Message-Id: <200905091919.n49JJVX1032271@svn.freebsd.org>
From: Sam Leffler 
Date: Sat, 9 May 2009 19:19:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191950 - head/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 19:19:32 -0000

Author: sam
Date: Sat May  9 19:19:30 2009
New Revision: 191950
URL: http://svn.freebsd.org/changeset/base/191950

Log:
  restore ref to iwnfw

Modified:
  head/share/man/man4/iwn.4

Modified: head/share/man/man4/iwn.4
==============================================================================
--- head/share/man/man4/iwn.4	Sat May  9 19:19:19 2009	(r191949)
+++ head/share/man/man4/iwn.4	Sat May  9 19:19:30 2009	(r191950)
@@ -146,6 +146,7 @@ failed.
 This should not happen.
 .El
 .Sh SEE ALSO
+.Xr iwnfw 4 ,
 .Xr pci 4 ,
 .Xr wlan 4 ,
 .Xr wlan_ccmp 4 ,

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 19:22:38 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 564E71065706;
	Sat,  9 May 2009 19:22:38 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 450228FC19;
	Sat,  9 May 2009 19:22:38 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n49JMcVG032395;
	Sat, 9 May 2009 19:22:38 GMT (envelope-from sam@svn.freebsd.org)
Received: (from sam@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n49JMceQ032393;
	Sat, 9 May 2009 19:22:38 GMT (envelope-from sam@svn.freebsd.org)
Message-Id: <200905091922.n49JMceQ032393@svn.freebsd.org>
From: Sam Leffler 
Date: Sat, 9 May 2009 19:22:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191951 - head/sys/dev/iwi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 19:22:38 -0000

Author: sam
Date: Sat May  9 19:22:37 2009
New Revision: 191951
URL: http://svn.freebsd.org/changeset/base/191951

Log:
  push wme parameter setting to the taskq thread; the update callback from
  net80211 can happen from the ithread and submitting the fw cmd requires
  a sleepable context

Modified:
  head/sys/dev/iwi/if_iwi.c
  head/sys/dev/iwi/if_iwivar.h

Modified: head/sys/dev/iwi/if_iwi.c
==============================================================================
--- head/sys/dev/iwi/if_iwi.c	Sat May  9 19:19:30 2009	(r191950)
+++ head/sys/dev/iwi/if_iwi.c	Sat May  9 19:22:37 2009	(r191951)
@@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
@@ -154,6 +153,7 @@ static void	iwi_media_status(struct ifne
 static int	iwi_newstate(struct ieee80211vap *, enum ieee80211_state, int);
 static void	iwi_wme_init(struct iwi_softc *);
 static int	iwi_wme_setparams(struct iwi_softc *, struct ieee80211com *);
+static void	iwi_update_wme(void *, int);
 static int	iwi_wme_update(struct ieee80211com *);
 static uint16_t	iwi_read_prom_word(struct iwi_softc *, uint8_t);
 static void	iwi_frame_intr(struct iwi_softc *, struct iwi_rx_data *, int,
@@ -291,6 +291,7 @@ iwi_attach(device_t dev)
 	TASK_INIT(&sc->sc_radiofftask, 0, iwi_radio_off, sc);
 	TASK_INIT(&sc->sc_restarttask, 0, iwi_restart, sc);
 	TASK_INIT(&sc->sc_disassoctask, 0, iwi_disassoc, sc);
+	TASK_INIT(&sc->sc_wmetask, 0, iwi_update_wme, sc);
 
 	callout_init_mtx(&sc->sc_wdtimer, &sc->sc_mtx, 0);
 	callout_init_mtx(&sc->sc_rftimer, &sc->sc_mtx, 0);
@@ -1082,6 +1083,18 @@ iwi_wme_setparams(struct iwi_softc *sc, 
 #undef IWI_USEC
 #undef IWI_EXP2
 
+static void
+iwi_update_wme(void *arg, int npending)
+{
+	struct ieee80211com *ic = arg;
+	struct iwi_softc *sc = ic->ic_ifp->if_softc;
+	IWI_LOCK_DECL;
+
+	IWI_LOCK(sc);
+	(void) iwi_wme_setparams(sc, ic);
+	IWI_UNLOCK(sc);
+}
+
 static int
 iwi_wme_update(struct ieee80211com *ic)
 {
@@ -1091,13 +1104,13 @@ iwi_wme_update(struct ieee80211com *ic)
 	/*
 	 * We may be called to update the WME parameters in
 	 * the adapter at various places.  If we're already
-	 * associated then initiate the request immediately
-	 * (via the taskqueue); otherwise we assume the params
-	 * will get sent down to the adapter as part of the
-	 * work iwi_auth_and_assoc does.
+	 * associated then initiate the request immediately;
+	 * otherwise we assume the params will get sent down
+	 * to the adapter as part of the work iwi_auth_and_assoc
+	 * does.
 	 */
 	if (vap->iv_state == IEEE80211_S_RUN)
-		(void) iwi_wme_setparams(sc, ic);
+		ieee80211_runtask(ic, &sc->sc_wmetask);
 	return (0);
 }
 

Modified: head/sys/dev/iwi/if_iwivar.h
==============================================================================
--- head/sys/dev/iwi/if_iwivar.h	Sat May  9 19:19:30 2009	(r191950)
+++ head/sys/dev/iwi/if_iwivar.h	Sat May  9 19:22:37 2009	(r191951)
@@ -190,6 +190,7 @@ struct iwi_softc {
 	struct task		sc_radiofftask;	/* radio off processing */
 	struct task		sc_restarttask;	/* restart adapter processing */
 	struct task		sc_disassoctask;
+	struct task		sc_wmetask;	/* set wme parameters */
 
 	unsigned int		sc_softled : 1,	/* enable LED gpio status */
 				sc_ledstate: 1,	/* LED on/off state */
@@ -220,7 +221,7 @@ struct iwi_softc {
 
 #define	IWI_STATE_BEGIN(_sc, _state)	do {			\
 	KASSERT(_sc->fw_state == IWI_FW_IDLE,			\
-	    ("iwi firmware not idle"));				\
+	    ("iwi firmware not idle, state %s", iwi_fw_states[_sc->fw_state]));\
 	_sc->fw_state = _state;					\
 	_sc->sc_state_timer = 5;				\
 	DPRINTF(("enter %s state\n", iwi_fw_states[_state]));	\

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 19:44:23 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EE931106566B;
	Sat,  9 May 2009 19:44:23 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C2A1D8FC1D;
	Sat,  9 May 2009 19:44:23 +0000 (UTC) (envelope-from sam@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n49JiNWq032821;
	Sat, 9 May 2009 19:44:23 GMT (envelope-from sam@svn.freebsd.org)
Received: (from sam@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n49JiNHU032820;
	Sat, 9 May 2009 19:44:23 GMT (envelope-from sam@svn.freebsd.org)
Message-Id: <200905091944.n49JiNHU032820@svn.freebsd.org>
From: Sam Leffler 
Date: Sat, 9 May 2009 19:44:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191952 - head/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 19:44:24 -0000

Author: sam
Date: Sat May  9 19:44:23 2009
New Revision: 191952
URL: http://svn.freebsd.org/changeset/base/191952

Log:
  hookup iwnfw.4

Modified:
  head/share/man/man4/Makefile

Modified: head/share/man/man4/Makefile
==============================================================================
--- head/share/man/man4/Makefile	Sat May  9 19:22:37 2009	(r191951)
+++ head/share/man/man4/Makefile	Sat May  9 19:44:23 2009	(r191952)
@@ -151,6 +151,7 @@ MAN=	aac.4 \
 	ispfw.4 \
 	iwi.4 \
 	iwn.4 \
+	iwnfw.4 \
 	ixgb.4 \
 	ixgbe.4 \
 	jme.4 \

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 20:18:21 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 54C601065672;
	Sat,  9 May 2009 20:18:21 +0000 (UTC)
	(envelope-from ivoras@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 42ED98FC12;
	Sat,  9 May 2009 20:18:21 +0000 (UTC)
	(envelope-from ivoras@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n49KIKc1033469;
	Sat, 9 May 2009 20:18:20 GMT (envelope-from ivoras@svn.freebsd.org)
Received: (from ivoras@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n49KIK6K033468;
	Sat, 9 May 2009 20:18:20 GMT (envelope-from ivoras@svn.freebsd.org)
Message-Id: <200905092018.n49KIK6K033468@svn.freebsd.org>
From: Ivan Voras 
Date: Sat, 9 May 2009 20:18:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r191953 - head/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 20:18:21 -0000

Author: ivoras
Date: Sat May  9 20:18:20 2009
New Revision: 191953
URL: http://svn.freebsd.org/changeset/base/191953

Log:
  Describe the topology_spec sysctl and do some minor adjustments to
  relating documentation.
  
  Reviewed by:	brooks (older version)
  Approved by:	gnn (mentor)

Modified:
  head/share/man/man4/smp.4

Modified: head/share/man/man4/smp.4
==============================================================================
--- head/share/man/man4/smp.4	Sat May  9 19:44:23 2009	(r191952)
+++ head/share/man/man4/smp.4	Sat May  9 20:18:20 2009	(r191953)
@@ -23,7 +23,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 17, 2004
+.Dd May 7, 2008
 .Dt SMP 4
 .Os
 .Sh NAME
@@ -69,12 +69,63 @@ is an integer bitmask denoting CPUs to h
 Setting a bit to 1 will result in the corresponding CPU being
 disabled.
 .Pp
+The
+.Xr sched_ule 4
+scheduler implements CPU topology detection and adjusts the scheduling
+algorithms to make better use of modern multi-core CPUs.
+The sysctl variable
+.Va kern.sched.topology_spec
+reflects the detected CPU hardware in a parsable XML format.
+The top level XML tag is , which encloses one or more  tags
+containing data about individual CPU groups.
+A CPU group contains CPUs that are detected to be "close" together, usually
+by being cores in a single multi-core processor.
+Attributes available in a  tag are "level", corresponding to the
+nesting level of the CPU group and "cache-level", corresponding to the
+level of CPU caches shared by the CPUs in the group.
+The  tag contains the  and  tags.
+The  tag describes CPUs in the group.
+Its attributes are "count", corresponding to the number of CPUs in the
+group and "mask", corresponding to the integer binary mask in which
+each bit position set to 1 signifies a CPU belonging to the group.
+The contents (CDATA) of the  tag is the comma-delimited list
+of CPU indexes (derived from the "mask" attribute).
+The  tag contains special tags (if any) describing the relation
+of the CPUs in the group.
+The possible flags are currently "HTT" and "SMT", corresponding to
+the various implementations of hardware multithreading.
+An example topology_spec output for a system consisting of
+two quad-core processors is:
+.Bd -literal
+
+  
+    0, 1, 2, 3, 4, 5, 6, 7
+    
+    
+      
+        0, 1, 2, 3
+        
+      
+      
+        4, 5, 6, 7
+        
+      
+    
+  
+
+.Ed
+.Pp
+This information is used internally by the kernel to schedule related
+tasks on CPUs that are closely grouped together.
+.Pp
 .Fx
-supports hyperthreading on Intel CPU's on the i386 platform.
+supports hyperthreading on Intel CPU's on the i386 and AMD64 platforms.
 Since using logical CPUs can cause performance penalties under certain loads,
 the logical CPUs can be disabled by setting the
 .Va machdep.hlt_logical_cpus
-sysctl to one.
+sysctl to one. 
+Note that this operation is different from the mechanism used by the
+.Xr cpuset 1 .
 .Sh SEE ALSO
 .Xr mptable 1 ,
 .Xr sysctl 8 ,
@@ -83,7 +134,11 @@ sysctl to one.
 .Xr mtx_pool 9 ,
 .Xr mutex 9 ,
 .Xr sema 9 ,
-.Xr sx 9
+.Xr sx 9 ,
+.Xr rwlock 9 ,
+.Xr sched_4bsd 4 ,
+.Xr sched_ule 4 ,
+.Xr cpuset 1
 .Sh HISTORY
 The
 .Nm

From owner-svn-src-all@FreeBSD.ORG  Sat May  9 20:46:08 2009
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AD2911065670;
	Sat,  9 May 2009 20:46:08 +0000 (UTC)
	(envelope-from dchagin@dchagin.static.corbina.ru)
Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5])
	by mx1.freebsd.org (Postfix) with ESMTP id 2D28B8FC1B;
	Sat,  9 May 2009 20:46:07 +0000 (UTC)
	(envelope-from dchagin@dchagin.static.corbina.ru)
Received: from corbina.ru (mail.post.ru [195.14.50.16])
	by contrabass.post.ru (Postfix) with ESMTP id 2068E99675;
	Sun, 10 May 2009 00:46:06 +0400 (MSD)
X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9
Received: from [10.208.17.3] (HELO dchagin.static.corbina.ru)
	by corbina.ru (CommuniGate Pro SMTP 5.1.14)
	with ESMTPS id 1779600641; Sun, 10 May 2009 00:46:06 +0400
Received: from dchagin.static.corbina.ru (localhost.chd.net [127.0.0.1])
	by dchagin.static.corbina.ru (8.14.3/8.14.3) with ESMTP id
	n49Kk5LL004809; Sun, 10 May 2009 00:46:05 +0400 (MSD)
	(envelope-from dchagin@dchagin.static.corbina.ru)
Received: (from dchagin@localhost)
	by dchagin.static.corbina.ru (8.14.3/8.14.3/Submit) id n49KjxYu004808; 
	Sun, 10 May 2009 00:45:59 +0400 (MSD) (envelope-from dchagin)
Date: Sun, 10 May 2009 00:45:59 +0400
From: Chagin Dmitry 
To: Bruce Evans 
Message-ID: <20090509204559.GA4626@dchagin.static.corbina.ru>
References: <200905071424.n47EOos1058369@svn.freebsd.org>
	<20090508111302.C1275@besplex.bde.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="HcAYCG3uE/tztfnV"
Content-Disposition: inline
In-Reply-To: <20090508111302.C1275@besplex.bde.org>
User-Agent: Mutt/1.5.19 (2009-01-05)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r191883 - head/sys/compat/linux
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 09 May 2009 20:46:09 -0000


--HcAYCG3uE/tztfnV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, May 08, 2009 at 11:45:16AM +1000, Bruce Evans wrote:
> On Thu, 7 May 2009, Dmitry Chagin wrote:
>=20
> > Log:
> >  Linux exports HZ value to user space via AT_CLKTCK auxiliary vector en=
try,
> >  which is available for Glibc as sysconf(_SC_CLK_TCK). If AT_CLKTCK ent=
ry is
> >  not exported, Glibc uses 100.
>=20
> This cannot work for older applications/glibc's that have CLK_TCK hard-co=
ded.
>=20

yes, I know. Glibc versions prior to 2.2.1 uses hardcoded CLK_TCK value.


> >  linux_times() shall use the value that is exported to user space.
>=20
> FreeBSD handles the problem by "exporting" the old constant value of CLK_=
TCK
> (128) although this value has always been bogus and the "export" is actua=
lly
> hard-coded into libc:sysconf() (and into  except in post-2001
> pure-POSIX case -- in particular, the bogus macro CLK_TCK is still hard-
> coded to the bogus value 128 in the BSD_VISIBLE case to avoid breaking
> bogus BSD applications that use it).
>=20
> > Modified: head/sys/compat/linux/linux_misc.c
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
> > --- head/sys/compat/linux/linux_misc.c	Thu May  7 13:49:48 2009	(r19188=
2)
> > +++ head/sys/compat/linux/linux_misc.c	Thu May  7 14:24:50 2009	(r19188=
3)
> > @@ -659,9 +659,7 @@ struct l_times_argv {
> > 	l_clock_t	tms_cstime;
> > };
> >
> > -#define CLK_TCK 100			/* Linux uses 100 */
> > -
> > -#define CONVTCK(r)	(r.tv_sec * CLK_TCK + r.tv_usec / (1000000 / CLK_TC=
K))
> > +#define CONVTCK(r)	(r.tv_sec * hz + r.tv_usec / (1000000 / hz))
>=20
> hz has very little to do with statistics clock ticks.  The frequency of t=
he
> statistics clock in FreeBSD is given by stathz.  stathz will normally only
> equal hz if the statistics clock is the same as the scheduling clock.
> stathz is a bogus value too since the clock most relevant for them is the
> cputicker and the statistics clock is only used to divide them up.
>=20

Thank you!

> Anyway, this patch is backwards.  The bug was that the value exported to
> user space didn't match the value here.  The value cannot be changed in

hmm, r189362. hz exported to user space via AT_CLKTCK.

> either FreeBSD or Linux without breaking compatibility.  It is even
> harder to change in emulators than in a full O/S distribution since the
> full distribution can more reasonably drop support for all old
> applications.  A correct emulator would have to have an array of values
> for each "constant" sysconf() value with the arrays index by the O/S
> version and maybe the libc version being emulated :-(.
>=20

I will try to make the hard-coded CLK_TCK support. It will depend
on value of compat.linux.osrelease (2.2 I guess).


--=20
Have fun!
chd

--HcAYCG3uE/tztfnV
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (FreeBSD)

iEYEARECAAYFAkoF64cACgkQ0t2Tb3OO/O2wcgCdH1PhcLiJT9gDouR/lB38J4qT
J20An3FOzMSWCi8G3+kRGv9E3tGTDB3T
=sW/f
-----END PGP SIGNATURE-----

--HcAYCG3uE/tztfnV--