From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 00:20:10 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D3B0F1065677; Sun, 7 Oct 2012 00:20:09 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id 904558FC1B; Sun, 7 Oct 2012 00:20:07 +0000 (UTC) Received: from sa-nc-cs-116.static.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id q970JwEl048542 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 6 Oct 2012 17:20:00 -0700 (PDT) (envelope-from marcel@xcllnt.net) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) From: Marcel Moolenaar In-Reply-To: <5070A4FC.4080802@FreeBSD.org> Date: Sat, 6 Oct 2012 17:19:52 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <31A2ABA0-49C8-458B-A055-152C3266D9B0@xcllnt.net> References: <201210062001.q96K16Or030755@svn.freebsd.org> <5070A4FC.4080802@FreeBSD.org> To: Dimitry Andric X-Mailer: Apple Mail (2.1499) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r241298 - in head: . gnu/usr.bin/cc/cc_int gnu/usr.bin/cc/include kerberos5 kerberos5/tools/asn1_compile kerberos5/tools/slc lib/clang/include share/mk tools/build/make_check usr.sbin/c... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Oct 2012 00:20:10 -0000 On Oct 6, 2012, at 2:39 PM, Dimitry Andric wrote: > On 2012-10-06 22:01, Marcel Moolenaar wrote: >> 2. Remove the use of -E. It's not needed in our build because we = use ?=3D for >> the respective variables, which means that we'll take the = environment >> value (if any) anyway. >=20 > No, this will break builds of 32-bit libraries on amd64, at least when > CC/CXX etc are set in make.conf. I put this in specifically in = r227120. >=20 > Please revert this particular change, unless you have tested that it > works correctly, with e.g. CC=3Dclang in make.conf. I'll double-check to make sure all is fine. I'll revert if I hit a problem and don't have an immediate fix for it. FYI, --=20 Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 01:58:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6FF671065686; Sun, 7 Oct 2012 01:58:33 +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 5A2488FC19; Sun, 7 Oct 2012 01:58:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q971wXiZ089976; Sun, 7 Oct 2012 01:58:33 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q971wXQk089972; Sun, 7 Oct 2012 01:58:33 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210070158.q971wXQk089972@svn.freebsd.org> From: Warner Losh Date: Sun, 7 Oct 2012 01:58: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: r241307 - head/sys/arm/at91 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 01:58:33 -0000 Author: imp Date: Sun Oct 7 01:58:32 2012 New Revision: 241307 URL: http://svn.freebsd.org/changeset/base/241307 Log: Use the RTC unit to get the time. This works on all known AT91SAM9* processors, either on reboot or after power down with battery backup. However, the AT91RM9200 RTC always resets on reboot making it just about useless at the moment (if we support a low-power mode or an extended sleep mode, it might become useful). Submitted by: Ian Lepore Modified: head/sys/arm/at91/at91_rtc.c head/sys/arm/at91/at91_rtcreg.h Modified: head/sys/arm/at91/at91_rtc.c ============================================================================== --- head/sys/arm/at91/at91_rtc.c Sat Oct 6 22:14:19 2012 (r241306) +++ head/sys/arm/at91/at91_rtc.c Sun Oct 7 01:58:32 2012 (r241307) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * Copyright (c) 2012 Ian Lepore. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,6 +24,18 @@ * SUCH DAMAGE. */ +/* + * Driver for the at91 on-chip realtime clock. + * + * This driver does not currently support alarms, just date and time. + * + * Note that on an rm9200 the RTC is not your typical battery-driven clock that + * keeps time while the system is powered down. In fact, it doesn't even + * survive a chip reset to keep time across a reboot. About the only thing it + * might be good for is keeping time while the cpu clock is turned off for power + * savings. On later chips, a battery backup feature is available. + */ + #include __FBSDID("$FreeBSD$"); @@ -39,11 +52,20 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "clock_if.h" +/* + * The driver has all the infrastructure to use interrupts but doesn't actually + * have any need to do so right now. There's a non-zero cost for installing the + * handler because the RTC shares the system interrupt (IRQ 1), and thus will + * get called a lot for no reason at all. + */ +#define AT91_RTC_USE_INTERRUPTS_NOT + struct at91_rtc_softc { device_t dev; /* Myself */ @@ -81,12 +103,32 @@ static devclass_t at91_rtc_devclass; static int at91_rtc_probe(device_t dev); static int at91_rtc_attach(device_t dev); static int at91_rtc_detach(device_t dev); -static int at91_rtc_intr(void *); /* helper routines */ static int at91_rtc_activate(device_t dev); static void at91_rtc_deactivate(device_t dev); +#ifdef AT91_RTC_USE_INTERRUPTS +static int +at91_rtc_intr(void *xsc) +{ + struct at91_rtc_softc *sc; + uint32_t status; + + sc = xsc; + /* Must clear the status bits after reading them to re-arm. */ + status = RD4(sc, RTC_SR); + WR4(sc, RTC_SCCR, status); + if (status == 0) + return; + AT91_RTC_LOCK(sc); + /* Do something here */ + AT91_RTC_UNLOCK(sc); + wakeup(sc); + return (FILTER_HANDLED); +} +#endif + static int at91_rtc_probe(device_t dev) { @@ -108,15 +150,35 @@ at91_rtc_attach(device_t dev) AT91_RTC_LOCK_INIT(sc); /* - * Activate the interrupt, but disable all interrupts in the hardware + * Disable all interrupts in the hardware. + * Clear all bits in the status register. + * Set 24-hour-clock mode. */ WR4(sc, RTC_IDR, 0xffffffff); + WR4(sc, RTC_SCCR, 0x1f); + WR4(sc, RTC_MR, 0); + +#ifdef AT91_RTC_USE_INTERRUPTS err = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_MISC, at91_rtc_intr, NULL, sc, &sc->intrhand); if (err) { AT91_RTC_LOCK_DESTROY(sc); goto out; } +#endif + + /* + * Read the calendar register. If the century is 19 then the clock has + * never been set. Try to store an invalid value into the register, + * which will turn on the error bit in RTC_VER, and our getclock code + * knows to return EINVAL if any error bits are on. + */ + if (RTC_CALR_CEN(RD4(sc, RTC_CALR)) == 19) + WR4(sc, RTC_CALR, 0); + + /* + * Register as a time of day clock with 1-second resolution. + */ clock_register(dev, 1000000); out: if (err) @@ -142,11 +204,13 @@ at91_rtc_activate(device_t dev) RF_ACTIVE); if (sc->mem_res == NULL) goto errout; +#ifdef AT91_RTC_USE_INTERRUPTS rid = 0; sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE | RF_SHAREABLE); if (sc->irq_res == NULL) goto errout; +#endif return (0); errout: at91_rtc_deactivate(dev); @@ -159,39 +223,26 @@ at91_rtc_deactivate(device_t dev) struct at91_rtc_softc *sc; sc = device_get_softc(dev); +#ifdef AT91_RTC_USE_INTERRUPTS + WR4(sc, RTC_IDR, 0xffffffff); if (sc->intrhand) bus_teardown_intr(dev, sc->irq_res, sc->intrhand); sc->intrhand = 0; +#endif bus_generic_detach(sc->dev); if (sc->mem_res) - bus_release_resource(dev, SYS_RES_IOPORT, + bus_release_resource(dev, SYS_RES_MEMORY, rman_get_rid(sc->mem_res), sc->mem_res); sc->mem_res = 0; +#ifdef AT91_RTC_USE_INTERRUPTS if (sc->irq_res) bus_release_resource(dev, SYS_RES_IRQ, rman_get_rid(sc->irq_res), sc->irq_res); sc->irq_res = 0; +#endif return; } -static int -at91_rtc_intr(void *xsc) -{ - struct at91_rtc_softc *sc = xsc; -#if 0 - uint32_t status; - - /* Reading the status also clears the interrupt */ - status = RD4(sc, RTC_SR); - if (status == 0) - return; - AT91_RTC_LOCK(sc); - AT91_RTC_UNLOCK(sc); -#endif - wakeup(sc); - return (FILTER_HANDLED); -} - /* * Get the time of day clock and return it in ts. * Return 0 on success, an error number otherwise. @@ -204,6 +255,12 @@ at91_rtc_gettime(device_t dev, struct ti struct at91_rtc_softc *sc; sc = device_get_softc(dev); + + /* If the error bits are set we can't return useful values. */ + + if (RD4(sc, RTC_VER) & (RTC_VER_NVTIM | RTC_VER_NVCAL)) + return EINVAL; + timr = RD4(sc, RTC_TIMR); calr = RD4(sc, RTC_CALR); ct.nsec = 0; @@ -226,11 +283,46 @@ at91_rtc_settime(device_t dev, struct ti { struct at91_rtc_softc *sc; struct clocktime ct; + int rv; sc = device_get_softc(dev); clock_ts_to_ct(ts, &ct); + + /* + * Can't set the clock unless a second has elapsed since we last did so. + */ + while ((RD4(sc, RTC_SR) & RTC_SR_SECEV) == 0) + cpu_spinwait(); + + /* + * Stop the clocks for an update; wait until hardware is ready. + * Clear the update-ready status after it gets asserted (the manual says + * to do this before updating the value registers). + */ + WR4(sc, RTC_CR, RTC_CR_UPDCAL | RTC_CR_UPDTIM); + while ((RD4(sc, RTC_SR) & RTC_SR_ACKUPD) == 0) + cpu_spinwait(); + WR4(sc, RTC_SCCR, RTC_SR_ACKUPD); + + /* + * Set the values in the hardware, then check whether the hardware was + * happy with them so we can return the correct status. + */ WR4(sc, RTC_TIMR, RTC_TIMR_MK(ct.hour, ct.min, ct.sec)); - WR4(sc, RTC_CALR, RTC_CALR_MK(ct.year, ct.mon, ct.day, ct.dow)); + WR4(sc, RTC_CALR, RTC_CALR_MK(ct.year, ct.mon, ct.day, ct.dow+1)); + + if (RD4(sc, RTC_VER) & (RTC_VER_NVTIM | RTC_VER_NVCAL)) + rv = EINVAL; + else + rv = 0; + + /* + * Restart the clocks (turn off the update bits). + * Clear the second-event bit (because the manual says to). + */ + WR4(sc, RTC_CR, RD4(sc, RTC_CR) & ~(RTC_CR_UPDCAL | RTC_CR_UPDTIM)); + WR4(sc, RTC_SCCR, RTC_SR_SECEV); + return (0); } @@ -244,7 +336,7 @@ static device_method_t at91_rtc_methods[ DEVMETHOD(clock_gettime, at91_rtc_gettime), DEVMETHOD(clock_settime, at91_rtc_settime), - { 0, 0 } + DEVMETHOD_END }; static driver_t at91_rtc_driver = { Modified: head/sys/arm/at91/at91_rtcreg.h ============================================================================== --- head/sys/arm/at91/at91_rtcreg.h Sat Oct 6 22:14:19 2012 (r241306) +++ head/sys/arm/at91/at91_rtcreg.h Sun Oct 7 01:58:32 2012 (r241307) @@ -42,6 +42,10 @@ #define RTC_IMR 0x28 /* RTC Interrupt Mask Register */ #define RTC_VER 0x2c /* RTC Valid Entry Register */ +/* CR */ +#define RTC_CR_UPDTIM (0x1u << 0) /* Request update of time register */ +#define RTC_CR_UPDCAL (0x1u << 1) /* Request update of calendar reg. */ + /* TIMR */ #define RTC_TIMR_SEC_M 0x7fUL #define RTC_TIMR_SEC_S 0 @@ -71,14 +75,29 @@ #define RTC_CALR_DOW_M 0x00d0000UL #define RTC_CALR_DOW_S 21 #define RTC_CALR_DOW(x) FROMBCD(((x) & RTC_CALR_DOW_M) >> RTC_CALR_DOW_S) -#define RTC_CALR_DAY_M 0x3f00000UL +#define RTC_CALR_DAY_M 0x3f000000UL #define RTC_CALR_DAY_S 24 #define RTC_CALR_DAY(x) FROMBCD(((x) & RTC_CALR_DAY_M) >> RTC_CALR_DAY_S) #define RTC_CALR_MK(yr, mon, day, dow) \ - ((TOBCD((yr) / 100 + 19) << RTC_CALR_CEN_S) | \ + ((TOBCD((yr) / 100) << RTC_CALR_CEN_S) | \ (TOBCD((yr) % 100) << RTC_CALR_YEAR_S) | \ (TOBCD(mon) << RTC_CALR_MON_S) | \ (TOBCD(dow) << RTC_CALR_DOW_S) | \ (TOBCD(day) << RTC_CALR_DAY_S)) +/* SR */ + +#define RTC_SR_ACKUPD (0x1u << 0) /* Acknowledge for Update */ +#define RTC_SR_ALARM (0x1u << 1) /* Alarm Flag */ +#define RTC_SR_SECEV (0x1u << 2) /* Second Event */ +#define RTC_SR_TIMEV (0x1u << 3) /* Time Event */ +#define RTC_SR_CALEV (0x1u << 4) /* Calendar event */ + +/* VER */ + +#define RTC_VER_NVTIM (0x1 << 0) /* Non-valid time */ +#define RTC_VER_NVCAL (0x1 << 1) /* Non-valid calendar */ +#define RTC_VER_NVTIMALR (0x1 << 2) /* Non-valid time alarm */ +#define RTC_VER_NVCALALR (0x1 << 3) /* Non-valid calendar alarm */ + #endif /* ARM_AT91_AT91_RTCREG_H */ From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 02:08:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BE66D1065670; Sun, 7 Oct 2012 02:08:19 +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 A8A5A8FC08; Sun, 7 Oct 2012 02:08:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9728JH9091702; Sun, 7 Oct 2012 02:08:19 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9728JT7091700; Sun, 7 Oct 2012 02:08:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210070208.q9728JT7091700@svn.freebsd.org> From: Warner Losh Date: Sun, 7 Oct 2012 02:08: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: r241308 - head/sys/arm/at91 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 02:08:19 -0000 Author: imp Date: Sun Oct 7 02:08:19 2012 New Revision: 241308 URL: http://svn.freebsd.org/changeset/base/241308 Log: Improve a few comments. Modified: head/sys/arm/at91/at91_rtc.c Modified: head/sys/arm/at91/at91_rtc.c ============================================================================== --- head/sys/arm/at91/at91_rtc.c Sun Oct 7 01:58:32 2012 (r241307) +++ head/sys/arm/at91/at91_rtc.c Sun Oct 7 02:08:19 2012 (r241308) @@ -29,11 +29,13 @@ * * This driver does not currently support alarms, just date and time. * - * Note that on an rm9200 the RTC is not your typical battery-driven clock that - * keeps time while the system is powered down. In fact, it doesn't even - * survive a chip reset to keep time across a reboot. About the only thing it - * might be good for is keeping time while the cpu clock is turned off for power - * savings. On later chips, a battery backup feature is available. + * The RTC on the AT91RM9200 resets when the core rests, so it is useless as a + * source of time (except when the CPU clock is powered down to save power, + * which we don't currently do). On AT91SAM9 chips, the RTC survives chip + * reset, and there's provisions for it to keep time via battery backup if the + * system loses power. On those systems, we use it as a RTC. We tell the two + * apart because the century field is 19 on AT91RM9200 on reset, or on AT91SAM9 + * chips that haven't had their time properly set. */ #include @@ -186,10 +188,13 @@ out: return (err); } +/* + * Cannot support detach, since there's no clock_unregister function. + */ static int at91_rtc_detach(device_t dev) { - return (EBUSY); /* XXX */ + return (EBUSY); } static int From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 05:11:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ECFD2106566C; Sun, 7 Oct 2012 05:11:29 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D52E08FC0A; Sun, 7 Oct 2012 05:11:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q975BT9c023809; Sun, 7 Oct 2012 05:11:29 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q975BTMo023801; Sun, 7 Oct 2012 05:11:29 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201210070511.q975BTMo023801@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 7 Oct 2012 05:11:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241309 - in stable/9: include/rpc lib/libc/rpc sys/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 05:11:30 -0000 Author: pfg Date: Sun Oct 7 05:11:29 2012 New Revision: 241309 URL: http://svn.freebsd.org/changeset/base/241309 Log: MFC r241141, r241165, r241165, r241181; rpc: convert all uid and gid variables to u_int. Follow a similar change in Solaris and linux where the uid and gid variables were made more similar to what the system expects. In our case we use u_int which is what XDR can manage, Reviewed by: bde Modified: stable/9/include/rpc/auth.h stable/9/include/rpc/auth_unix.h stable/9/lib/libc/rpc/auth_unix.c stable/9/lib/libc/rpc/authunix_prot.c stable/9/lib/libc/rpc/rpc_soc.3 stable/9/lib/libc/rpc/svc_auth_unix.c stable/9/sys/rpc/auth.h Modified: stable/9/include/rpc/auth.h ============================================================================== --- stable/9/include/rpc/auth.h Sun Oct 7 02:08:19 2012 (r241308) +++ stable/9/include/rpc/auth.h Sun Oct 7 05:11:29 2012 (r241309) @@ -243,14 +243,13 @@ __END_DECLS * System style authentication * AUTH *authunix_create(machname, uid, gid, len, aup_gids) * char *machname; - * int uid; - * int gid; + * u_int uid; + * u_int gid; * int len; - * int *aup_gids; + * u_int *aup_gids; */ __BEGIN_DECLS -extern AUTH *authunix_create(char *, int, int, int, - int *); +extern AUTH *authunix_create(char *, u_int, u_int, int, u_int *); extern AUTH *authunix_create_default(void); /* takes no parameters */ extern AUTH *authnone_create(void); /* takes no parameters */ __END_DECLS Modified: stable/9/include/rpc/auth_unix.h ============================================================================== --- stable/9/include/rpc/auth_unix.h Sun Oct 7 02:08:19 2012 (r241308) +++ stable/9/include/rpc/auth_unix.h Sun Oct 7 05:11:29 2012 (r241309) @@ -60,10 +60,10 @@ struct authunix_parms { u_long aup_time; char *aup_machname; - int aup_uid; - int aup_gid; + u_int aup_uid; + u_int aup_gid; u_int aup_len; - int *aup_gids; + u_int *aup_gids; }; #define authsys_parms authunix_parms Modified: stable/9/lib/libc/rpc/auth_unix.c ============================================================================== --- stable/9/lib/libc/rpc/auth_unix.c Sun Oct 7 02:08:19 2012 (r241308) +++ stable/9/lib/libc/rpc/auth_unix.c Sun Oct 7 05:11:29 2012 (r241309) @@ -94,10 +94,10 @@ struct audata { AUTH * authunix_create(machname, uid, gid, len, aup_gids) char *machname; - int uid; - int gid; + u_int uid; + u_int gid; int len; - int *aup_gids; + u_int *aup_gids; { struct authunix_parms aup; char mymem[MAX_AUTH_BYTES]; @@ -189,9 +189,9 @@ authunix_create_default() int ngids; long ngids_max; char machname[MAXHOSTNAMELEN + 1]; - uid_t uid; - gid_t gid; - gid_t *gids; + u_int uid; + u_int gid; + u_int *gids; ngids_max = sysconf(_SC_NGROUPS_MAX) + 1; gids = malloc(sizeof(gid_t) * ngids_max); @@ -207,9 +207,8 @@ authunix_create_default() abort(); if (ngids > NGRPS) ngids = NGRPS; - /* XXX: interface problem; those should all have been unsigned */ - auth = authunix_create(machname, (int)uid, (int)gid, ngids, - (int *)gids); + /* XXX: interface problem; we should translate from uid_t and gid_t */ + auth = authunix_create(machname, uid, gid, ngids, gids); free(gids); return (auth); } Modified: stable/9/lib/libc/rpc/authunix_prot.c ============================================================================== --- stable/9/lib/libc/rpc/authunix_prot.c Sun Oct 7 02:08:19 2012 (r241308) +++ stable/9/lib/libc/rpc/authunix_prot.c Sun Oct 7 05:11:29 2012 (r241309) @@ -60,19 +60,19 @@ xdr_authunix_parms(xdrs, p) XDR *xdrs; struct authunix_parms *p; { - int **paup_gids; + u_int **paup_gids; assert(xdrs != NULL); assert(p != NULL); paup_gids = &p->aup_gids; - if (xdr_u_long(xdrs, &(p->aup_time)) - && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) - && xdr_int(xdrs, &(p->aup_uid)) - && xdr_int(xdrs, &(p->aup_gid)) - && xdr_array(xdrs, (char **) paup_gids, - &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { + if (xdr_u_long(xdrs, &(p->aup_time)) && + xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) && + xdr_u_int(xdrs, &(p->aup_uid)) && + xdr_u_int(xdrs, &(p->aup_gid)) && + xdr_array(xdrs, (char **) paup_gids, + &(p->aup_len), NGRPS, sizeof(u_int), (xdrproc_t)xdr_u_int) ) { return (TRUE); } return (FALSE); Modified: stable/9/lib/libc/rpc/rpc_soc.3 ============================================================================== --- stable/9/lib/libc/rpc/rpc_soc.3 Sun Oct 7 02:08:19 2012 (r241308) +++ stable/9/lib/libc/rpc/rpc_soc.3 Sun Oct 7 05:11:29 2012 (r241309) @@ -148,7 +148,7 @@ default authentication used by .Ft "AUTH *" .Xc .It Xo -.Fn authunix_create "char *host" "int uid" "int gid" "int len" "int *aup_gids" +.Fn authunix_create "char *host" "u_int uid" "u_int gid" "int len" "u_int *aup_gids" .Xc .Pp Create and return an Modified: stable/9/lib/libc/rpc/svc_auth_unix.c ============================================================================== --- stable/9/lib/libc/rpc/svc_auth_unix.c Sun Oct 7 02:08:19 2012 (r241308) +++ stable/9/lib/libc/rpc/svc_auth_unix.c Sun Oct 7 05:11:29 2012 (r241309) @@ -68,7 +68,7 @@ _svcauth_unix(rqst, msg) struct area { struct authunix_parms area_aup; char area_machname[MAX_MACHINE_NAME+1]; - int area_gids[NGRPS]; + u_int area_gids[NGRPS]; } *area; u_int auth_len; size_t str_len, gid_len; Modified: stable/9/sys/rpc/auth.h ============================================================================== --- stable/9/sys/rpc/auth.h Sun Oct 7 02:08:19 2012 (r241308) +++ stable/9/sys/rpc/auth.h Sun Oct 7 05:11:29 2012 (r241309) @@ -234,18 +234,17 @@ __END_DECLS * System style authentication * AUTH *authunix_create(machname, uid, gid, len, aup_gids) * char *machname; - * int uid; - * int gid; + * u_int uid; + * u_int gid; * int len; - * int *aup_gids; + * u_int *aup_gids; */ __BEGIN_DECLS #ifdef _KERNEL struct ucred; extern AUTH *authunix_create(struct ucred *); #else -extern AUTH *authunix_create(char *, int, int, int, - int *); +extern AUTH *authunix_create(char *, u_int, u_int, int, u_int *); extern AUTH *authunix_create_default(void); /* takes no parameters */ #endif extern AUTH *authnone_create(void); /* takes no parameters */ From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 05:31:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A35A4106564A; Sun, 7 Oct 2012 05:31:43 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id 1E2208FC08; Sun, 7 Oct 2012 05:31:42 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q975VXU4021151 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 7 Oct 2012 16:31:34 +1100 Date: Sun, 7 Oct 2012 16:31:33 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Marcel Moolenaar In-Reply-To: <201210062001.q96K16Or030755@svn.freebsd.org> Message-ID: <20121007161440.C7605@besplex.bde.org> References: <201210062001.q96K16Or030755@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: r241298 - in head: . gnu/usr.bin/cc/cc_int gnu/usr.bin/cc/include kerberos5 kerberos5/tools/asn1_compile kerberos5/tools/slc lib/clang/include share/mk tools/build/make_check usr.sbin/c... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Oct 2012 05:31:43 -0000 On Sat, 6 Oct 2012, Marcel Moolenaar wrote: > Log: > Add support for bmake. This includes: > .... > Modified: head/share/mk/bsd.dep.mk > ============================================================================== > --- head/share/mk/bsd.dep.mk Sat Oct 6 19:57:27 2012 (r241297) > +++ head/share/mk/bsd.dep.mk Sat Oct 6 20:01:05 2012 (r241298) > @@ -102,8 +102,8 @@ ${_YC} y.tab.h: ${_YSRC} > CLEANFILES+= y.tab.c y.tab.h > .elif !empty(YFLAGS:M-d) > .for _YH in ${_YC:R}.h > -.ORDER: ${_YC} ${_YH} > -${_YC} ${_YH}: ${_YSRC} > +${_YH}: ${_YC} > +${_YC}: ${_YSRC} > ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC} > SRCS+= ${_YH} > CLEANFILES+= ${_YH} This is broken. Yacc headers don't depend on generated yacc .c files. Now there is only a null rule to create the headers. One broken case is when the header somehow gets deleted. It bcomes out of date, but running make to update it only runs the null rule, so it remains nonexistent. Bruce From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 13:27:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3A4AB106564A; Sun, 7 Oct 2012 13:27:08 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from emx.nitro.dk (leto.nitro.dk [178.63.52.6]) by mx1.freebsd.org (Postfix) with ESMTP id E43E98FC23; Sun, 7 Oct 2012 13:27:07 +0000 (UTC) Received: from mailscan.leto.nitro.dk (mailscan.leto.nitro.dk [127.0.1.4]) by emx.nitro.dk (Postfix) with ESMTP id C0A5F30F10C; Sun, 7 Oct 2012 13:27:00 +0000 (UTC) Received: from emx.nitro.dk ([127.0.1.2]) by mailscan.leto.nitro.dk (mailscan.leto.nitro.dk [127.0.1.4]) (amavisd-new, port 10024) with LMTP id Xz8OiCQsfejt; Sun, 7 Oct 2012 13:26:58 +0000 (UTC) Received: from [192.168.4.24] (unknown [89.100.2.68]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by emx.nitro.dk (Postfix) with ESMTPSA id 4824530F102; Sun, 7 Oct 2012 13:26:58 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) From: "Simon L. B. Nielsen" In-Reply-To: <201210021744.q92Hi8dt077996@svn.freebsd.org> Date: Sun, 7 Oct 2012 14:26:57 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201210021744.q92Hi8dt077996@svn.freebsd.org> To: Andrey A. Chernov X-Mailer: Apple Mail (2.1499) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241137 - 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: Sun, 07 Oct 2012 13:27:08 -0000 On 2 Oct 2012, at 18:44, Andrey A. Chernov wrote: > Author: ache > Date: Tue Oct 2 17:44:08 2012 > New Revision: 241137 > URL: http://svn.freebsd.org/changeset/base/241137 >=20 > Log: > Using putenv() and later direct pointer contents modification it is = possibe > to craft environment variables with similar names like that: > a=3D1 > a=3D2 > ... > unsetenv("a") should remove them all to make later getenv("a") = impossible. > Fix it to do so (this is GNU autoconf test #3 failure too). >=20 > PR: 172273 > MFC after: 1 week >=20 > Modified: > head/lib/libc/stdlib/getenv.c Reviewed by ? This needs to be reviewed by someone with clue about the pittfals if = environment manipulation before any MFC. PS. env functions are mentioned in MAINTAINERS. --=20 Simon L. B. Nielsen FreeBSD Security Officer From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 15:37:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A134D1065672; Sun, 7 Oct 2012 15:37:31 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BDAA8FC14; Sun, 7 Oct 2012 15:37:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97FbV6P024731; Sun, 7 Oct 2012 15:37:31 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97FbVGx024728; Sun, 7 Oct 2012 15:37:31 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201210071537.q97FbVGx024728@svn.freebsd.org> From: Devin Teske Date: Sun, 7 Oct 2012 15:37: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: r241310 - head/sys/boot/forth X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Oct 2012 15:37:31 -0000 Author: dteske Date: Sun Oct 7 15:37:30 2012 New Revision: 241310 URL: http://svn.freebsd.org/changeset/base/241310 Log: Comment and Copyright fixes/updates. Reviewed by: adrian (co-mentor) Approved by: adrian (co-mentor) Modified: head/sys/boot/forth/menu-commands.4th head/sys/boot/forth/menu.4th Modified: head/sys/boot/forth/menu-commands.4th ============================================================================== --- head/sys/boot/forth/menu-commands.4th Sun Oct 7 05:11:29 2012 (r241309) +++ head/sys/boot/forth/menu-commands.4th Sun Oct 7 15:37:30 2012 (r241310) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2011 Devin Teske +\ Copyright (c) 2006-2012 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -144,10 +144,6 @@ marker task-menu-commands.4th @ \ dereference address into value 48 + \ convert to ASCII numeral - \ Since we are [in this file] going to override the standard `boot' - \ routine with a custom one, you should know that we use $kernel - \ when referencing the desired kernel. Set $kernel below. - s" set kernel=${kernel_prefix}${kernel[N]}${kernel_suffix}" \ command to assemble full kernel-path -rot tuck 36 + c! swap \ replace 'N' with array index value @@ -168,10 +164,6 @@ marker task-menu-commands.4th @ \ dereference address into value 48 + \ convert to ASCII numeral - \ Since we are [in this file] going to override the standard `boot' - \ routine with a custom one, you should know that we use $root when - \ booting. Set $root below. - s" set root=${root_prefix}${root[N]}${root_prefix}" \ command to assemble full kernel-path -rot tuck 30 + c! swap \ replace 'N' with array index value Modified: head/sys/boot/forth/menu.4th ============================================================================== --- head/sys/boot/forth/menu.4th Sun Oct 7 05:11:29 2012 (r241309) +++ head/sys/boot/forth/menu.4th Sun Oct 7 15:37:30 2012 (r241310) @@ -1,6 +1,6 @@ \ Copyright (c) 2003 Scott Long \ Copyright (c) 2003 Aleksander Fafula -\ Copyright (c) 2006-2011 Devin Teske +\ Copyright (c) 2006-2012 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -384,7 +384,7 @@ create init_text8 255 allot \ ACPI option is to be presented to the user, otherwise returns -1. Used \ internally by menu-create, you need not (nor should you) call this directly. \ -: acpimenuitem ( -- C-Addr | -1 ) +: acpimenuitem ( -- C-Addr/U | -1 ) arch-i386? if acpipresent? if @@ -493,7 +493,7 @@ create init_text8 255 allot \ If this is the ACPI menu option, act accordingly. dup menuacpi @ = if - acpimenuitem ( -- C-Addr | -1 ) + acpimenuitem ( -- C-Addr/U | -1 ) else loader_color? if s" ansi_caption[x]" @@ -502,14 +502,14 @@ create init_text8 255 allot then then - ( C-Addr | -1 ) + ( C-Addr/U | -1 ) dup -1 <> if \ replace 'x' with current iteration -rot 2dup 13 + c! rot \ test for environment variable getenv dup -1 <> if - printmenuitem ( C-Addr -- N ) + printmenuitem ( C-Addr/U -- N ) s" menukeyN !" \ generate cmd to store result -rot 2dup 7 + c! rot From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 16:45:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 494501065672; Sun, 7 Oct 2012 16:45:39 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A81C8FC12; Sun, 7 Oct 2012 16:45:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97GjcYN033919; Sun, 7 Oct 2012 16:45:38 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97Gjcj4033917; Sun, 7 Oct 2012 16:45:38 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201210071645.q97Gjcj4033917@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 7 Oct 2012 16:45: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: r241311 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 16:45:39 -0000 Author: marcel Date: Sun Oct 7 16:45:38 2012 New Revision: 241311 URL: http://svn.freebsd.org/changeset/base/241311 Log: Fix 32-bit library builds after the removal of adding -E to make for AS, CC, CXX and LD. This fix implements the intended as it should have been implemented all along: by passing AS, CC, CXX and LD on the commandline of the sub-make instead of in the environment of the sub-make. Breakage pointed-out by: dim@ Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Oct 7 15:37:30 2012 (r241310) +++ head/Makefile.inc1 Sun Oct 7 16:45:38 2012 (r241311) @@ -295,9 +295,10 @@ LIB32CPUFLAGS= -march=i686 -mmmx -msse - LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} .endif LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \ - MACHINE_CPU="i686 mmx sse sse2" \ - LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \ - AS="${AS} --32" + MACHINE_CPU="i686 mmx sse sse2" +LIB32WMAKEFLAGS= \ + AS="${AS} --32" \ + LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" .elif ${TARGET_ARCH} == "powerpc64" .if empty(TARGET_CPUTYPE) @@ -305,7 +306,8 @@ LIB32CPUFLAGS= -mcpu=powerpc .else LIB32CPUFLAGS= -mcpu=${TARGET_CPUTYPE} .endif -LIB32WMAKEENV= MACHINE=powerpc MACHINE_ARCH=powerpc \ +LIB32WMAKEENV= MACHINE=powerpc MACHINE_ARCH=powerpc +LIB32WMAKEFLAGS= \ LD="${LD} -m elf32ppc_fbsd" .endif @@ -322,16 +324,20 @@ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTR VERSION="${VERSION}" \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} \ - CC="${CC} ${LIB32FLAGS}" \ - CXX="${CXX} ${LIB32FLAGS}" \ LIBDIR=/usr/lib32 \ SHLIBDIR=/usr/lib32 \ COMPILER_TYPE=${WMAKE_COMPILER_TYPE} +LIB32WMAKEFLAGS+= \ + CC="${CC} ${LIB32FLAGS}" \ + CXX="${CXX} ${LIB32FLAGS}" \ + DESTDIR=${LIB32TMP} \ + -DCOMPAT_32BIT \ + -DNO_CPU_CFLAGS \ + -DNO_CTF \ + -DNO_LINT -LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \ - -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \ - -DWITHOUT_HTML -DNO_CTF -DNO_LINT \ - DESTDIR=${LIB32TMP} +LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} ${LIB32WMAKEFLAGS} \ + -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO -DWITHOUT_HTML LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS .endif From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 17:48:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1FC87106566C; Sun, 7 Oct 2012 17:48:39 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F28AB8FC0A; Sun, 7 Oct 2012 17:48:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97HmcVA042310; Sun, 7 Oct 2012 17:48:38 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97HmcDM042308; Sun, 7 Oct 2012 17:48:38 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201210071748.q97HmcDM042308@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 7 Oct 2012 17:48: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: r241312 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 17:48:39 -0000 Author: marcel Date: Sun Oct 7 17:48:38 2012 New Revision: 241312 URL: http://svn.freebsd.org/changeset/base/241312 Log: Fix the showconfig target. bmake sends debug output to stderr. Submitted by: Simon Garrety Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Oct 7 16:45:38 2012 (r241311) +++ head/Makefile.inc1 Sun Oct 7 17:48:38 2012 (r241312) @@ -1569,7 +1569,7 @@ check-old: check-old-files check-old-lib # showconfig - show build configuration. # showconfig: - @${MAKE} -n -f bsd.own.mk -V dummy -dg1 | grep ^MK_ | sort + @${MAKE} -n -f bsd.own.mk -V dummy -dg1 2>&1 | grep ^MK_ | sort .if !empty(KRNLOBJDIR) && !empty(KERNCONF) DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF}/ From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 18:07:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4C041106564A; Sun, 7 Oct 2012 18:07:46 +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 1D84B8FC08; Sun, 7 Oct 2012 18:07:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97I7jMo044929; Sun, 7 Oct 2012 18:07:45 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97I7jCM044927; Sun, 7 Oct 2012 18:07:45 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210071807.q97I7jCM044927@svn.freebsd.org> From: Alan Cox Date: Sun, 7 Oct 2012 18:07: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: r241313 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Oct 2012 18:07:46 -0000 Author: alc Date: Sun Oct 7 18:07:45 2012 New Revision: 241313 URL: http://svn.freebsd.org/changeset/base/241313 Log: Optimize the TLB invalidations performed by pmap_protect(). Use the new range-based invalidation function instead of performing per-page invalidations. Don't bother invalidating mappings that don't have PTE_D set, since they don't allow write access. Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Sun Oct 7 17:48:38 2012 (r241312) +++ head/sys/mips/mips/pmap.c Sun Oct 7 18:07:45 2012 (r241313) @@ -1913,9 +1913,11 @@ pmap_remove_all(vm_page_t m) void pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot) { - pt_entry_t *pte; + pt_entry_t pbits, *pte; pd_entry_t *pde, *pdpe; - vm_offset_t va_next; + vm_offset_t va, va_next; + vm_paddr_t pa; + vm_page_t m; if ((prot & VM_PROT_READ) == VM_PROT_NONE) { pmap_remove(pmap, sva, eva); @@ -1927,10 +1929,6 @@ pmap_protect(pmap_t pmap, vm_offset_t sv rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); for (; sva < eva; sva = va_next) { - pt_entry_t pbits; - vm_page_t m; - vm_paddr_t pa; - pdpe = pmap_segmap(pmap, sva); #ifdef __mips_n64 if (*pdpe == 0) { @@ -1947,29 +1945,52 @@ pmap_protect(pmap_t pmap, vm_offset_t sv pde = pmap_pdpe_to_pde(pdpe, sva); if (*pde == NULL) continue; + + /* + * Limit our scan to either the end of the va represented + * by the current page table page, or to the end of the + * range being write protected. + */ if (va_next > eva) va_next = eva; + va = va_next; for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; pte++, - sva += PAGE_SIZE) { - - /* Skip invalid PTEs */ - if (!pte_test(pte, PTE_V)) - continue; + sva += PAGE_SIZE) { pbits = *pte; - if (pte_test(&pbits, PTE_MANAGED | PTE_D)) { - pa = TLBLO_PTE_TO_PA(pbits); - m = PHYS_TO_VM_PAGE(pa); - vm_page_dirty(m); + if (!pte_test(&pbits, PTE_V) || pte_test(&pbits, + PTE_RO)) { + if (va != va_next) { + pmap_invalidate_range(pmap, va, sva); + va = va_next; + } + continue; } - pte_clear(&pbits, PTE_D); pte_set(&pbits, PTE_RO); - - if (pbits != *pte) { - *pte = pbits; - pmap_update_page(pmap, sva, pbits); + if (pte_test(&pbits, PTE_D)) { + pte_clear(&pbits, PTE_D); + if (pte_test(&pbits, PTE_MANAGED)) { + pa = TLBLO_PTE_TO_PA(pbits); + m = PHYS_TO_VM_PAGE(pa); + vm_page_dirty(m); + } + if (va == va_next) + va = sva; + } else { + /* + * Unless PTE_D is set, any TLB entries + * mapping "sva" don't allow write access, so + * they needn't be invalidated. + */ + if (va != va_next) { + pmap_invalidate_range(pmap, va, sva); + va = va_next; + } } + *pte = pbits; } + if (va != va_next) + pmap_invalidate_range(pmap, va, sva); } rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 18:18:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D5120106564A; Sun, 7 Oct 2012 18:18:59 +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 BF2BD8FC0A; Sun, 7 Oct 2012 18:18:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97IIx30046381; Sun, 7 Oct 2012 18:18:59 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97IIxDd046379; Sun, 7 Oct 2012 18:18:59 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210071818.q97IIxDd046379@svn.freebsd.org> From: John Baldwin Date: Sun, 7 Oct 2012 18:18:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241314 - stable/9/sys/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: Sun, 07 Oct 2012 18:19:00 -0000 Author: jhb Date: Sun Oct 7 18:18:59 2012 New Revision: 241314 URL: http://svn.freebsd.org/changeset/base/241314 Log: MFC 239913: Attach interrupt handlers during attach instead of during the first time the interface is brought up. Without this, the boot time interrupt round-robin assignment does not think the allocated interrupt resources are active and leaves them assigned to CPU 0. While here, add descriptive tags to each interrupt handler when MSI-X is used. Modified: stable/9/sys/dev/cxgb/cxgb_main.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_main.c Sun Oct 7 18:07:45 2012 (r241313) +++ stable/9/sys/dev/cxgb/cxgb_main.c Sun Oct 7 18:18:59 2012 (r241314) @@ -675,6 +675,9 @@ cxgb_controller_attach(device_t dev) for (i = 0; i < NUM_CPL_HANDLERS; i++) sc->cpl_handler[i] = cpl_not_handled; #endif + + t3_intr_clear(sc); + error = cxgb_setup_interrupts(sc); out: if (error) cxgb_free(sc); @@ -922,6 +925,7 @@ cxgb_setup_interrupts(adapter_t *sc) if (!(intr_flag & USING_MSIX) || err) return (err); + bus_describe_intr(sc->dev, sc->irq_res, sc->intr_tag, "err"); for (i = 0; i < sc->msi_count - 1; i++) { rid = i + 2; res = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, &rid, @@ -945,6 +949,7 @@ cxgb_setup_interrupts(adapter_t *sc) sc->msix_irq_rid[i] = rid; sc->msix_irq_res[i] = res; sc->msix_intr_tag[i] = tag; + bus_describe_intr(sc->dev, res, tag, "qs%d", i); } if (err) @@ -1611,11 +1616,6 @@ cxgb_up(struct adapter *sc) alloc_filters(sc); setup_rss(sc); - t3_intr_clear(sc); - err = cxgb_setup_interrupts(sc); - if (err) - goto out; - t3_add_configured_sysctls(sc); sc->flags |= FULL_INIT_DONE; } From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 18:19:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 85252106578F; Sun, 7 Oct 2012 18: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 548988FC14; Sun, 7 Oct 2012 18:19:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97IJEjh046444; Sun, 7 Oct 2012 18:19:14 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97IJEJJ046442; Sun, 7 Oct 2012 18:19:14 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210071819.q97IJEJJ046442@svn.freebsd.org> From: John Baldwin Date: Sun, 7 Oct 2012 18:19:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241315 - stable/8/sys/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: Sun, 07 Oct 2012 18:19:14 -0000 Author: jhb Date: Sun Oct 7 18:19:13 2012 New Revision: 241315 URL: http://svn.freebsd.org/changeset/base/241315 Log: MFC 239913: Attach interrupt handlers during attach instead of during the first time the interface is brought up. Without this, the boot time interrupt round-robin assignment does not think the allocated interrupt resources are active and leaves them assigned to CPU 0. While here, add descriptive tags to each interrupt handler when MSI-X is used. Modified: stable/8/sys/dev/cxgb/cxgb_main.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/cxgb/ (props changed) Modified: stable/8/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/8/sys/dev/cxgb/cxgb_main.c Sun Oct 7 18:18:59 2012 (r241314) +++ stable/8/sys/dev/cxgb/cxgb_main.c Sun Oct 7 18:19:13 2012 (r241315) @@ -662,6 +662,9 @@ cxgb_controller_attach(device_t dev) device_printf(sc->dev, "Firmware Version %s\n", &sc->fw_version[0]); callout_reset(&sc->cxgb_tick_ch, hz, cxgb_tick, sc); t3_add_attach_sysctls(sc); + + t3_intr_clear(sc); + error = cxgb_setup_interrupts(sc); out: if (error) cxgb_free(sc); @@ -917,6 +920,7 @@ cxgb_setup_interrupts(adapter_t *sc) if (!(intr_flag & USING_MSIX) || err) return (err); + bus_describe_intr(sc->dev, sc->irq_res, sc->intr_tag, "err"); for (i = 0; i < sc->msi_count - 1; i++) { rid = i + 2; res = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, &rid, @@ -940,6 +944,7 @@ cxgb_setup_interrupts(adapter_t *sc) sc->msix_irq_rid[i] = rid; sc->msix_irq_res[i] = res; sc->msix_intr_tag[i] = tag; + bus_describe_intr(sc->dev, res, tag, "qs%d", i); } if (err) @@ -1660,11 +1665,6 @@ cxgb_up(struct adapter *sc) alloc_filters(sc); setup_rss(sc); - t3_intr_clear(sc); - err = cxgb_setup_interrupts(sc); - if (err) - goto out; - t3_add_configured_sysctls(sc); sc->flags |= FULL_INIT_DONE; } From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 18:23:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F0BE1106564A; Sun, 7 Oct 2012 18:22:59 +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 DA4B68FC0A; Sun, 7 Oct 2012 18:22:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97IMxJ7047052; Sun, 7 Oct 2012 18:22:59 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97IMx7g047050; Sun, 7 Oct 2012 18:22:59 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210071822.q97IMx7g047050@svn.freebsd.org> From: John Baldwin Date: Sun, 7 Oct 2012 18:22:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241316 - stable/9/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 18:23:00 -0000 Author: jhb Date: Sun Oct 7 18:22:59 2012 New Revision: 241316 URL: http://svn.freebsd.org/changeset/base/241316 Log: MFC 240132: When WIFCONTINUED was added, the number of "first" macros grew from three to four. Modified: stable/9/lib/libc/sys/wait.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/sys/wait.2 ============================================================================== --- stable/9/lib/libc/sys/wait.2 Sun Oct 7 18:19:13 2012 (r241315) +++ stable/9/lib/libc/sys/wait.2 Sun Oct 7 18:22:59 2012 (r241316) @@ -177,7 +177,7 @@ with a value of -1. .Pp The following macros may be used to test the manner of exit of the process. -One of the first three macros will evaluate to a non-zero (true) value: +One of the first four macros will evaluate to a non-zero (true) value: .Bl -tag -width Ds .It Fn WIFCONTINUED status True if the process has not terminated, and From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 18:23:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 24308106567B; Sun, 7 Oct 2012 18:23:16 +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 0EFDE8FC08; Sun, 7 Oct 2012 18:23:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97INFOI047119; Sun, 7 Oct 2012 18:23:15 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97INFWh047117; Sun, 7 Oct 2012 18:23:15 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210071823.q97INFWh047117@svn.freebsd.org> From: John Baldwin Date: Sun, 7 Oct 2012 18:23:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241317 - stable/8/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 18:23:16 -0000 Author: jhb Date: Sun Oct 7 18:23:15 2012 New Revision: 241317 URL: http://svn.freebsd.org/changeset/base/241317 Log: MFC 240132: When WIFCONTINUED was added, the number of "first" macros grew from three to four. Modified: stable/8/lib/libc/sys/wait.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/sys/wait.2 ============================================================================== --- stable/8/lib/libc/sys/wait.2 Sun Oct 7 18:22:59 2012 (r241316) +++ stable/8/lib/libc/sys/wait.2 Sun Oct 7 18:23:15 2012 (r241317) @@ -164,7 +164,7 @@ with a value of -1. .Pp The following macros may be used to test the manner of exit of the process. -One of the first three macros will evaluate to a non-zero (true) value: +One of the first four macros will evaluate to a non-zero (true) value: .Bl -tag -width Ds .It Fn WIFCONTINUED status True if the process has not terminated, and From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 18:25:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 96606106566C; Sun, 7 Oct 2012 18:25:34 +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 815D88FC08; Sun, 7 Oct 2012 18:25:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97IPY34047461; Sun, 7 Oct 2012 18:25:34 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97IPYXn047458; Sun, 7 Oct 2012 18:25:34 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210071825.q97IPYXn047458@svn.freebsd.org> From: John Baldwin Date: Sun, 7 Oct 2012 18:25:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241318 - stable/9/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 18:25:34 -0000 Author: jhb Date: Sun Oct 7 18:25:33 2012 New Revision: 241318 URL: http://svn.freebsd.org/changeset/base/241318 Log: MFC 239906: Clarify that bus_dma does not stall future load requests once a load is deferred. The caller is required to enforce that if that is desired. Modified: stable/9/share/man/man9/bus_dma.9 Directory Properties: stable/9/share/man/man9/ (props changed) Modified: stable/9/share/man/man9/bus_dma.9 ============================================================================== --- stable/9/share/man/man9/bus_dma.9 Sun Oct 7 18:23:15 2012 (r241317) +++ stable/9/share/man/man9/bus_dma.9 Sun Oct 7 18:25:33 2012 (r241318) @@ -580,8 +580,13 @@ The status of the mapping has been deliv The mapping has been deferred for lack of resources. The callback will be called as soon as resources are available. Callbacks are serviced in FIFO order. -To ensure that ordering is guaranteed, all subsequent load requests will also -be deferred until all callbacks have been processed. +.Pp +Note that subsequent load operations for the same tag that do not require +extra resources will still succeed. +This may result in out-of-order processing of requests. +If the caller requires the order of requests to be preserved, +then the caller is required to stall subsequent requests until a pending +request's callback is invoked. .It Er ENOMEM The load request has failed due to insufficient resources, and the caller specifically used the From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 18:25:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 311821065670; Sun, 7 Oct 2012 18:25:49 +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 1B8408FC12; Sun, 7 Oct 2012 18:25:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97IPmXg047525; Sun, 7 Oct 2012 18:25:48 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97IPmsb047523; Sun, 7 Oct 2012 18:25:48 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210071825.q97IPmsb047523@svn.freebsd.org> From: John Baldwin Date: Sun, 7 Oct 2012 18:25:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241319 - stable/8/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 18:25:49 -0000 Author: jhb Date: Sun Oct 7 18:25:48 2012 New Revision: 241319 URL: http://svn.freebsd.org/changeset/base/241319 Log: MFC 239906: Clarify that bus_dma does not stall future load requests once a load is deferred. The caller is required to enforce that if that is desired. Modified: stable/8/share/man/man9/bus_dma.9 Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/bus_dma.9 ============================================================================== --- stable/8/share/man/man9/bus_dma.9 Sun Oct 7 18:25:33 2012 (r241318) +++ stable/8/share/man/man9/bus_dma.9 Sun Oct 7 18:25:48 2012 (r241319) @@ -580,8 +580,13 @@ The status of the mapping has been deliv The mapping has been deferred for lack of resources. The callback will be called as soon as resources are available. Callbacks are serviced in FIFO order. -To ensure that ordering is guaranteed, all subsequent load requests will also -be deferred until all callbacks have been processed. +.Pp +Note that subsequent load operations for the same tag that do not require +extra resources will still succeed. +This may result in out-of-order processing of requests. +If the caller requires the order of requests to be preserved, +then the caller is required to stall subsequent requests until a pending +request's callback is invoked. .It Er ENOMEM The load request has failed due to insufficient resources, and the caller specifically used the From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 18:31:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B79001065672; Sun, 7 Oct 2012 18:31: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 96FC48FC0A; Sun, 7 Oct 2012 18:31:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97IV1Db048285; Sun, 7 Oct 2012 18:31:01 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97IV1AA048281; Sun, 7 Oct 2012 18:31:01 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210071831.q97IV1AA048281@svn.freebsd.org> From: John Baldwin Date: Sun, 7 Oct 2012 18:31:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241320 - stable/9/bin/mv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Oct 2012 18:31:01 -0000 Author: jhb Date: Sun Oct 7 18:31:01 2012 New Revision: 241320 URL: http://svn.freebsd.org/changeset/base/241320 Log: MFC 226961,239951: Add a -h flag similar to the -h flag for ln to force mv(1) to treat a symbolic link to a directory for the target as a symbolic link instead of a directory. This makes it possible to atomically update a symbolic link using rename(). Modified: stable/9/bin/mv/mv.1 stable/9/bin/mv/mv.c Directory Properties: stable/9/bin/mv/ (props changed) Modified: stable/9/bin/mv/mv.1 ============================================================================== --- stable/9/bin/mv/mv.1 Sun Oct 7 18:25:48 2012 (r241319) +++ stable/9/bin/mv/mv.1 Sun Oct 7 18:31:01 2012 (r241320) @@ -32,7 +32,7 @@ .\" @(#)mv.1 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.Dd May 12, 2007 +.Dd August 28, 2012 .Dt MV 1 .Os .Sh NAME @@ -41,7 +41,7 @@ .Sh SYNOPSIS .Nm .Op Fl f | i | n -.Op Fl v +.Op Fl hv .Ar source target .Nm .Op Fl f | i | n @@ -81,6 +81,21 @@ option overrides any previous or .Fl n options.) +.It Fl h +If the +.Ar target +operand is a symbolic link to a directory, +do not follow it. +This causes the +.Nm +utility to rename the file +.Ar source +to the destination path +.Ar target +rather than moving +.Ar source +into the directory referenced by +.Ar target . .It Fl i Cause .Nm @@ -142,7 +157,8 @@ rm -rf source_file .Ex -std .Sh COMPATIBILITY The -.Fl n +.Fl h , +.Fl n , and .Fl v options are non-standard and their use in scripts is not recommended. Modified: stable/9/bin/mv/mv.c ============================================================================== --- stable/9/bin/mv/mv.c Sun Oct 7 18:25:48 2012 (r241319) +++ stable/9/bin/mv/mv.c Sun Oct 7 18:31:01 2012 (r241320) @@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$"); /* Exit code for a failed exec. */ #define EXEC_FAILED 127 -int fflg, iflg, nflg, vflg; +static int fflg, hflg, iflg, nflg, vflg; static int copy(const char *, const char *); static int do_move(const char *, const char *); @@ -87,8 +87,11 @@ main(int argc, char *argv[]) int ch; char path[PATH_MAX]; - while ((ch = getopt(argc, argv, "finv")) != -1) + while ((ch = getopt(argc, argv, "fhinv")) != -1) switch (ch) { + case 'h': + hflg = 1; + break; case 'i': iflg = 1; fflg = nflg = 0; @@ -123,6 +126,17 @@ main(int argc, char *argv[]) exit(do_move(argv[0], argv[1])); } + /* + * If -h was specified, treat the target as a symlink instead of + * directory. + */ + if (hflg) { + if (argc > 2) + usage(); + if (lstat(argv[1], &sb) == 0 && S_ISLNK(sb.st_mode)) + exit(do_move(argv[0], argv[1])); + } + /* It's a directory, move each file into it. */ if (strlen(argv[argc - 1]) > sizeof(path) - 1) errx(1, "%s: destination pathname too long", *argv); @@ -489,7 +503,7 @@ usage(void) { (void)fprintf(stderr, "%s\n%s\n", - "usage: mv [-f | -i | -n] [-v] source target", + "usage: mv [-f | -i | -n] [-hv] source target", " mv [-f | -i | -n] [-v] source ... directory"); exit(EX_USAGE); } From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 18:31:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 794D910657BD; Sun, 7 Oct 2012 18:31: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 596468FC12; Sun, 7 Oct 2012 18:31:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97IVIsN048357; Sun, 7 Oct 2012 18:31:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97IVIQZ048354; Sun, 7 Oct 2012 18:31:18 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210071831.q97IVIQZ048354@svn.freebsd.org> From: John Baldwin Date: Sun, 7 Oct 2012 18:31:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241321 - stable/8/bin/mv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Oct 2012 18:31:18 -0000 Author: jhb Date: Sun Oct 7 18:31:17 2012 New Revision: 241321 URL: http://svn.freebsd.org/changeset/base/241321 Log: MFC 226961,239951: Add a -h flag similar to the -h flag for ln to force mv(1) to treat a symbolic link to a directory for the target as a symbolic link instead of a directory. This makes it possible to atomically update a symbolic link using rename(). Modified: stable/8/bin/mv/mv.1 stable/8/bin/mv/mv.c Directory Properties: stable/8/bin/mv/ (props changed) Modified: stable/8/bin/mv/mv.1 ============================================================================== --- stable/8/bin/mv/mv.1 Sun Oct 7 18:31:01 2012 (r241320) +++ stable/8/bin/mv/mv.1 Sun Oct 7 18:31:17 2012 (r241321) @@ -32,7 +32,7 @@ .\" @(#)mv.1 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.Dd May 12, 2007 +.Dd August 28, 2012 .Dt MV 1 .Os .Sh NAME @@ -41,7 +41,7 @@ .Sh SYNOPSIS .Nm .Op Fl f | i | n -.Op Fl v +.Op Fl hv .Ar source target .Nm .Op Fl f | i | n @@ -81,6 +81,21 @@ option overrides any previous or .Fl n options.) +.It Fl h +If the +.Ar target +operand is a symbolic link to a directory, +do not follow it. +This causes the +.Nm +utility to rename the file +.Ar source +to the destination path +.Ar target +rather than moving +.Ar source +into the directory referenced by +.Ar target . .It Fl i Cause .Nm @@ -142,7 +157,8 @@ rm -rf source_file .Ex -std .Sh COMPATIBILITY The -.Fl n +.Fl h , +.Fl n , and .Fl v options are non-standard and their use in scripts is not recommended. Modified: stable/8/bin/mv/mv.c ============================================================================== --- stable/8/bin/mv/mv.c Sun Oct 7 18:31:01 2012 (r241320) +++ stable/8/bin/mv/mv.c Sun Oct 7 18:31:17 2012 (r241321) @@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$"); /* Exit code for a failed exec. */ #define EXEC_FAILED 127 -int fflg, iflg, nflg, vflg; +static int fflg, hflg, iflg, nflg, vflg; static int copy(const char *, const char *); static int do_move(const char *, const char *); @@ -87,8 +87,11 @@ main(int argc, char *argv[]) int ch; char path[PATH_MAX]; - while ((ch = getopt(argc, argv, "finv")) != -1) + while ((ch = getopt(argc, argv, "fhinv")) != -1) switch (ch) { + case 'h': + hflg = 1; + break; case 'i': iflg = 1; fflg = nflg = 0; @@ -123,6 +126,17 @@ main(int argc, char *argv[]) exit(do_move(argv[0], argv[1])); } + /* + * If -h was specified, treat the target as a symlink instead of + * directory. + */ + if (hflg) { + if (argc > 2) + usage(); + if (lstat(argv[1], &sb) == 0 && S_ISLNK(sb.st_mode)) + exit(do_move(argv[0], argv[1])); + } + /* It's a directory, move each file into it. */ if (strlen(argv[argc - 1]) > sizeof(path) - 1) errx(1, "%s: destination pathname too long", *argv); @@ -489,7 +503,7 @@ usage(void) { (void)fprintf(stderr, "%s\n%s\n", - "usage: mv [-f | -i | -n] [-v] source target", + "usage: mv [-f | -i | -n] [-hv] source target", " mv [-f | -i | -n] [-v] source ... directory"); exit(EX_USAGE); } From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 18:37:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2308E106566C; Sun, 7 Oct 2012 18:37:48 +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 0E5308FC17; Sun, 7 Oct 2012 18:37:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97IblsO049402; Sun, 7 Oct 2012 18:37:47 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97IblVq049400; Sun, 7 Oct 2012 18:37:47 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210071837.q97IblVq049400@svn.freebsd.org> From: John Baldwin Date: Sun, 7 Oct 2012 18:37:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241322 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 18:37:48 -0000 Author: jhb Date: Sun Oct 7 18:37:47 2012 New Revision: 241322 URL: http://svn.freebsd.org/changeset/base/241322 Log: MFC 239335: Remove D_NEEDGIANT from dead_devsw. biofinish() (and thus dead_strategy) does not need Giant. Modified: stable/9/sys/kern/kern_conf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_conf.c ============================================================================== --- stable/9/sys/kern/kern_conf.c Sun Oct 7 18:31:17 2012 (r241321) +++ stable/9/sys/kern/kern_conf.c Sun Oct 7 18:37:47 2012 (r241322) @@ -306,7 +306,6 @@ dead_strategy(struct bio *bp) static struct cdevsw dead_cdevsw = { .d_version = D_VERSION, - .d_flags = D_NEEDGIANT, /* XXX: does dead_strategy need this ? */ .d_open = dead_open, .d_close = dead_close, .d_read = dead_read, From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 18:37:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C676E10657D9; Sun, 7 Oct 2012 18:37:59 +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 AFCF38FC08; Sun, 7 Oct 2012 18:37:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97Ibx8v049462; Sun, 7 Oct 2012 18:37:59 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97IbxHV049460; Sun, 7 Oct 2012 18:37:59 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210071837.q97IbxHV049460@svn.freebsd.org> From: John Baldwin Date: Sun, 7 Oct 2012 18:37:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241323 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 18:37:59 -0000 Author: jhb Date: Sun Oct 7 18:37:59 2012 New Revision: 241323 URL: http://svn.freebsd.org/changeset/base/241323 Log: MFC 239335: Remove D_NEEDGIANT from dead_devsw. biofinish() (and thus dead_strategy) does not need Giant. Modified: stable/8/sys/kern/kern_conf.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/kern_conf.c ============================================================================== --- stable/8/sys/kern/kern_conf.c Sun Oct 7 18:37:47 2012 (r241322) +++ stable/8/sys/kern/kern_conf.c Sun Oct 7 18:37:59 2012 (r241323) @@ -306,7 +306,6 @@ dead_strategy(struct bio *bp) static struct cdevsw dead_cdevsw = { .d_version = D_VERSION, - .d_flags = D_NEEDGIANT, /* XXX: does dead_strategy need this ? */ .d_open = dead_open, .d_close = dead_close, .d_read = dead_read, From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 18:41:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1822A106566B; Sun, 7 Oct 2012 18:41:49 +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 03A818FC08; Sun, 7 Oct 2012 18:41:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97IfmiS050037; Sun, 7 Oct 2012 18:41:48 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97IfmJt050035; Sun, 7 Oct 2012 18:41:48 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210071841.q97IfmJt050035@svn.freebsd.org> From: John Baldwin Date: Sun, 7 Oct 2012 18:41:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241324 - stable/9/sys/dev/mfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Oct 2012 18:41:49 -0000 Author: jhb Date: Sun Oct 7 18:41:48 2012 New Revision: 241324 URL: http://svn.freebsd.org/changeset/base/241324 Log: MFC 240962: Grab the mfi_config_lock while performing a MFI_DCMD_CFG_FOREIGN_IMPORT request on behalf of a user utility. Modified: stable/9/sys/dev/mfi/mfi.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/mfi/mfi.c ============================================================================== --- stable/9/sys/dev/mfi/mfi.c Sun Oct 7 18:37:59 2012 (r241323) +++ stable/9/sys/dev/mfi/mfi.c Sun Oct 7 18:41:48 2012 (r241324) @@ -2550,6 +2550,7 @@ mfi_config_lock(struct mfi_softc *sc, ui case MFI_DCMD_LD_DELETE: case MFI_DCMD_CFG_ADD: case MFI_DCMD_CFG_CLEAR: + case MFI_DCMD_CFG_FOREIGN_IMPORT: sx_xlock(&sc->mfi_config_lock); return (1); default: From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 18:42:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1903F10657C4; Sun, 7 Oct 2012 18:42:03 +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 049638FC0A; Sun, 7 Oct 2012 18:42:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97Ig2ts050107; Sun, 7 Oct 2012 18:42:02 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97Ig2s4050104; Sun, 7 Oct 2012 18:42:02 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210071842.q97Ig2s4050104@svn.freebsd.org> From: John Baldwin Date: Sun, 7 Oct 2012 18:42:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241325 - stable/8/sys/dev/mfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Oct 2012 18:42:03 -0000 Author: jhb Date: Sun Oct 7 18:42:02 2012 New Revision: 241325 URL: http://svn.freebsd.org/changeset/base/241325 Log: MFC 240962: Grab the mfi_config_lock while performing a MFI_DCMD_CFG_FOREIGN_IMPORT request on behalf of a user utility. Modified: stable/8/sys/dev/mfi/mfi.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/mfi/ (props changed) Modified: stable/8/sys/dev/mfi/mfi.c ============================================================================== --- stable/8/sys/dev/mfi/mfi.c Sun Oct 7 18:41:48 2012 (r241324) +++ stable/8/sys/dev/mfi/mfi.c Sun Oct 7 18:42:02 2012 (r241325) @@ -2550,6 +2550,7 @@ mfi_config_lock(struct mfi_softc *sc, ui case MFI_DCMD_LD_DELETE: case MFI_DCMD_CFG_ADD: case MFI_DCMD_CFG_CLEAR: + case MFI_DCMD_CFG_FOREIGN_IMPORT: sx_xlock(&sc->mfi_config_lock); return (1); default: From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 18:47:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D72BD106575F; Sun, 7 Oct 2012 18:47: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 C179E8FC08; Sun, 7 Oct 2012 18:47:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97IlrOG051078; Sun, 7 Oct 2012 18:47:53 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97Ilrp5051076; Sun, 7 Oct 2012 18:47:53 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210071847.q97Ilrp5051076@svn.freebsd.org> From: John Baldwin Date: Sun, 7 Oct 2012 18:47:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241326 - stable/9/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 18:47:54 -0000 Author: jhb Date: Sun Oct 7 18:47:53 2012 New Revision: 241326 URL: http://svn.freebsd.org/changeset/base/241326 Log: MFC 239354: Allow static DMA allocations that allow for enough segments to do page-sized segments for the entire allocation to use kmem_alloc_attr() to allocate KVM rather than using kmem_alloc_contig(). This avoids requiring a single physically contiguous chunk in this case. Modified: stable/9/sys/x86/x86/busdma_machdep.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/x86/x86/busdma_machdep.c ============================================================================== --- stable/9/sys/x86/x86/busdma_machdep.c Sun Oct 7 18:42:02 2012 (r241325) +++ stable/9/sys/x86/x86/busdma_machdep.c Sun Oct 7 18:47:53 2012 (r241326) @@ -541,13 +541,14 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, voi dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem) && attr == VM_MEMATTR_DEFAULT) { *vaddr = malloc(dmat->maxsize, M_DEVBUF, mflags); + } else if (dmat->nsegments >= btoc(dmat->maxsize) && + dmat->alignment <= PAGE_SIZE && + (dmat->boundary == 0 || dmat->boundary >= dmat->lowaddr)) { + /* Page-based multi-segment allocations allowed */ + *vaddr = (void *)kmem_alloc_attr(kernel_map, dmat->maxsize, + mflags, 0ul, dmat->lowaddr, attr); + *mapp = &contig_dmamap; } else { - /* - * XXX Use Contigmalloc until it is merged into this facility - * and handles multi-seg allocations. Nobody is doing - * multi-seg allocations yet though. - * XXX Certain AGP hardware does. - */ *vaddr = (void *)kmem_alloc_contig(kernel_map, dmat->maxsize, mflags, 0ul, dmat->lowaddr, dmat->alignment ? dmat->alignment : 1ul, dmat->boundary, attr); From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 18:57:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BCD111065670; Sun, 7 Oct 2012 18:57: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 A641A8FC17; Sun, 7 Oct 2012 18:57:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97IvTJd052578; Sun, 7 Oct 2012 18:57:29 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97IvTNO052576; Sun, 7 Oct 2012 18:57:29 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210071857.q97IvTNO052576@svn.freebsd.org> From: John Baldwin Date: Sun, 7 Oct 2012 18:57:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241327 - stable/9/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 18:57:30 -0000 Author: jhb Date: Sun Oct 7 18:57:29 2012 New Revision: 241327 URL: http://svn.freebsd.org/changeset/base/241327 Log: MFC 239440,239519: Refine the changes made in r208212 to avoid bogus failures from if_delmulti() when clearing the configuration for a subinterface when the parent interface is being detached. The current code was still triggering an assertion in if_delmulti() due to the parent interface being partially detached. Fix this by not calling if_delmulti() at all if the parent interface is being detached. Warn if if_delmulti() fails when the parent is not being detached (but similar to 208212, still proceed with tearing down the vlan state). Modified: stable/9/sys/net/if_vlan.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/net/if_vlan.c ============================================================================== --- stable/9/sys/net/if_vlan.c Sun Oct 7 18:47:53 2012 (r241326) +++ stable/9/sys/net/if_vlan.c Sun Oct 7 18:57:29 2012 (r241327) @@ -190,7 +190,7 @@ static int vlan_setflags(struct ifnet *i static int vlan_setmulti(struct ifnet *ifp); static int vlan_transmit(struct ifnet *ifp, struct mbuf *m); static void vlan_unconfig(struct ifnet *ifp); -static void vlan_unconfig_locked(struct ifnet *ifp); +static void vlan_unconfig_locked(struct ifnet *ifp, int departing); static int vlan_config(struct ifvlan *ifv, struct ifnet *p, uint16_t tag); static void vlan_link_state(struct ifnet *ifp); static void vlan_capabilities(struct ifvlan *ifv); @@ -575,7 +575,7 @@ vlan_ifdetach(void *arg __unused, struct #ifdef VLAN_ARRAY for (i = 0; i < VLAN_ARRAY_SIZE; i++) if ((ifv = ifp->if_vlantrunk->vlans[i])) { - vlan_unconfig_locked(ifv->ifv_ifp); + vlan_unconfig_locked(ifv->ifv_ifp, 1); if (ifp->if_vlantrunk == NULL) break; } @@ -583,7 +583,7 @@ vlan_ifdetach(void *arg __unused, struct restart: for (i = 0; i < (1 << ifp->if_vlantrunk->hwidth); i++) if ((ifv = LIST_FIRST(&ifp->if_vlantrunk->hash[i]))) { - vlan_unconfig_locked(ifv->ifv_ifp); + vlan_unconfig_locked(ifv->ifv_ifp, 1); if (ifp->if_vlantrunk) goto restart; /* trunk->hwidth can change */ else @@ -959,7 +959,7 @@ vlan_clone_create(struct if_clone *ifc, error = vlan_config(ifv, p, tag); if (error != 0) { /* - * Since we've partialy failed, we need to back + * Since we've partially failed, we need to back * out all the way, otherwise userland could get * confused. Thus, we destroy the interface. */ @@ -1298,17 +1298,18 @@ vlan_unconfig(struct ifnet *ifp) { VLAN_LOCK(); - vlan_unconfig_locked(ifp); + vlan_unconfig_locked(ifp, 0); VLAN_UNLOCK(); } static void -vlan_unconfig_locked(struct ifnet *ifp) +vlan_unconfig_locked(struct ifnet *ifp, int departing) { struct ifvlantrunk *trunk; struct vlan_mc_entry *mc; struct ifvlan *ifv; struct ifnet *parent; + int error; VLAN_LOCK_ASSERT(); @@ -1328,14 +1329,21 @@ vlan_unconfig_locked(struct ifnet *ifp) */ while ((mc = SLIST_FIRST(&ifv->vlan_mc_listhead)) != NULL) { /* - * This may fail if the parent interface is - * being detached. Regardless, we should do a - * best effort to free this interface as much - * as possible as all callers expect vlan - * destruction to succeed. + * If the parent interface is being detached, + * all its multicast addresses have already + * been removed. Warn about errors if + * if_delmulti() does fail, but don't abort as + * all callers expect vlan destruction to + * succeed. */ - (void)if_delmulti(parent, - (struct sockaddr *)&mc->mc_addr); + if (!departing) { + error = if_delmulti(parent, + (struct sockaddr *)&mc->mc_addr); + if (error) + if_printf(ifp, + "Failed to delete multicast address from parent: %d\n", + error); + } SLIST_REMOVE_HEAD(&ifv->vlan_mc_listhead, mc_entries); free(mc, M_VLAN); } From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 18:57:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 032251065690; Sun, 7 Oct 2012 18:57: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 E17008FC08; Sun, 7 Oct 2012 18:57:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97IvqNH052665; Sun, 7 Oct 2012 18:57:52 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97IvqVO052663; Sun, 7 Oct 2012 18:57:52 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210071857.q97IvqVO052663@svn.freebsd.org> From: John Baldwin Date: Sun, 7 Oct 2012 18:57:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241328 - stable/8/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 18:57:53 -0000 Author: jhb Date: Sun Oct 7 18:57:52 2012 New Revision: 241328 URL: http://svn.freebsd.org/changeset/base/241328 Log: MFC 239440,239519: Refine the changes made in r208212 to avoid bogus failures from if_delmulti() when clearing the configuration for a subinterface when the parent interface is being detached. The current code was still triggering an assertion in if_delmulti() due to the parent interface being partially detached. Fix this by not calling if_delmulti() at all if the parent interface is being detached. Warn if if_delmulti() fails when the parent is not being detached (but similar to 208212, still proceed with tearing down the vlan state). Modified: stable/8/sys/net/if_vlan.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/net/ (props changed) Modified: stable/8/sys/net/if_vlan.c ============================================================================== --- stable/8/sys/net/if_vlan.c Sun Oct 7 18:57:29 2012 (r241327) +++ stable/8/sys/net/if_vlan.c Sun Oct 7 18:57:52 2012 (r241328) @@ -188,7 +188,7 @@ static int vlan_setflags(struct ifnet *i static int vlan_setmulti(struct ifnet *ifp); static int vlan_transmit(struct ifnet *ifp, struct mbuf *m); static void vlan_unconfig(struct ifnet *ifp); -static void vlan_unconfig_locked(struct ifnet *ifp); +static void vlan_unconfig_locked(struct ifnet *ifp, int departing); static int vlan_config(struct ifvlan *ifv, struct ifnet *p, uint16_t tag); static void vlan_link_state(struct ifnet *ifp, int link); static void vlan_capabilities(struct ifvlan *ifv); @@ -543,7 +543,7 @@ vlan_ifdetach(void *arg __unused, struct #ifdef VLAN_ARRAY for (i = 0; i < VLAN_ARRAY_SIZE; i++) if ((ifv = ifp->if_vlantrunk->vlans[i])) { - vlan_unconfig_locked(ifv->ifv_ifp); + vlan_unconfig_locked(ifv->ifv_ifp, 1); if (ifp->if_vlantrunk == NULL) break; } @@ -551,7 +551,7 @@ vlan_ifdetach(void *arg __unused, struct restart: for (i = 0; i < (1 << ifp->if_vlantrunk->hwidth); i++) if ((ifv = LIST_FIRST(&ifp->if_vlantrunk->hash[i]))) { - vlan_unconfig_locked(ifv->ifv_ifp); + vlan_unconfig_locked(ifv->ifv_ifp, 1); if (ifp->if_vlantrunk) goto restart; /* trunk->hwidth can change */ else @@ -821,7 +821,7 @@ vlan_clone_create(struct if_clone *ifc, error = vlan_config(ifv, p, tag); if (error != 0) { /* - * Since we've partialy failed, we need to back + * Since we've partially failed, we need to back * out all the way, otherwise userland could get * confused. Thus, we destroy the interface. */ @@ -1163,17 +1163,18 @@ vlan_unconfig(struct ifnet *ifp) { VLAN_LOCK(); - vlan_unconfig_locked(ifp); + vlan_unconfig_locked(ifp, 0); VLAN_UNLOCK(); } static void -vlan_unconfig_locked(struct ifnet *ifp) +vlan_unconfig_locked(struct ifnet *ifp, int departing) { struct ifvlantrunk *trunk; struct vlan_mc_entry *mc; struct ifvlan *ifv; struct ifnet *parent; + int error; VLAN_LOCK_ASSERT(); @@ -1204,13 +1205,21 @@ vlan_unconfig_locked(struct ifnet *ifp) ETHER_ADDR_LEN); /* - * This may fail if the parent interface is - * being detached. Regardless, we should do a - * best effort to free this interface as much - * as possible as all callers expect vlan - * destruction to succeed. + * If the parent interface is being detached, + * all its multicast addresses have already + * been removed. Warn about errors if + * if_delmulti() does fail, but don't abort as + * all callers expect vlan destruction to + * succeed. */ - (void)if_delmulti(parent, (struct sockaddr *)&sdl); + if (!departing) { + error = if_delmulti(parent, + (struct sockaddr *)&sdl); + if (error) + if_printf(ifp, + "Failed to delete multicast address from parent: %d\n", + error); + } SLIST_REMOVE_HEAD(&ifv->vlan_mc_listhead, mc_entries); free(mc, M_VLAN); } From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 19:30:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 666141065670; Sun, 7 Oct 2012 19:30:17 +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 4FDE88FC08; Sun, 7 Oct 2012 19:30:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97JUHKx056957; Sun, 7 Oct 2012 19:30:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97JUHCZ056952; Sun, 7 Oct 2012 19:30:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210071930.q97JUHCZ056952@svn.freebsd.org> From: Alexander Motin Date: Sun, 7 Oct 2012 19:30: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: r241329 - head/sys/geom/raid X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 19:30:17 -0000 Author: mav Date: Sun Oct 7 19:30:16 2012 New Revision: 241329 URL: http://svn.freebsd.org/changeset/base/241329 Log: Make graid command line a bit more friendly by allowing volume name or provider name to be specified instead of geom name (first argument in all subcommands except label). In most cases there is only one array used any way, so it is not really useful to make user type ugly geom names like Intel-f0bdf223 or SiI-732c2b9448cf. Though they can be used in some cases. Sponsored by: iXsystems, Inc. MFC after: 1 month Modified: head/sys/geom/raid/g_raid_ctl.c head/sys/geom/raid/md_ddf.c head/sys/geom/raid/md_intel.c head/sys/geom/raid/md_promise.c Modified: head/sys/geom/raid/g_raid_ctl.c ============================================================================== --- head/sys/geom/raid/g_raid_ctl.c Sun Oct 7 18:57:52 2012 (r241328) +++ head/sys/geom/raid/g_raid_ctl.c Sun Oct 7 19:30:16 2012 (r241329) @@ -51,7 +51,10 @@ g_raid_find_node(struct g_class *mp, con { struct g_raid_softc *sc; struct g_geom *gp; + struct g_provider *pp; + struct g_raid_volume *vol; + /* Look for geom with specified name. */ LIST_FOREACH(gp, &mp->geom, geom) { sc = gp->softc; if (sc == NULL) @@ -61,6 +64,35 @@ g_raid_find_node(struct g_class *mp, con if (strcasecmp(sc->sc_name, name) == 0) return (sc); } + + /* Look for provider with specified name. */ + LIST_FOREACH(gp, &mp->geom, geom) { + sc = gp->softc; + if (sc == NULL) + continue; + if (sc->sc_stopping != 0) + continue; + LIST_FOREACH(pp, &gp->provider, provider) { + if (strcmp(pp->name, name) == 0) + return (sc); + if (strncmp(pp->name, "raid/", 5) == 0 && + strcmp(pp->name + 5, name) == 0) + return (sc); + } + } + + /* Look for volume with specified name. */ + LIST_FOREACH(gp, &mp->geom, geom) { + sc = gp->softc; + if (sc == NULL) + continue; + if (sc->sc_stopping != 0) + continue; + TAILQ_FOREACH(vol, &sc->sc_volumes, v_next) { + if (strcmp(vol->v_name, name) == 0) + return (sc); + } + } return (NULL); } Modified: head/sys/geom/raid/md_ddf.c ============================================================================== --- head/sys/geom/raid/md_ddf.c Sun Oct 7 18:57:52 2012 (r241328) +++ head/sys/geom/raid/md_ddf.c Sun Oct 7 19:30:16 2012 (r241329) @@ -2231,7 +2231,7 @@ g_raid_md_ctl_ddf(struct g_raid_md_objec struct g_consumer *cp; struct g_provider *pp; char arg[16]; - const char *verb, *volname, *levelname, *diskname; + const char *nodename, *verb, *volname, *levelname, *diskname; char *tmp; int *nargs, *force; off_t size, sectorsize, strip, offs[DDF_MAX_DISKS_HARD], esize; @@ -2502,8 +2502,12 @@ g_raid_md_ctl_ddf(struct g_raid_md_objec } if (strcmp(verb, "delete") == 0) { + nodename = gctl_get_asciiparam(req, "arg0"); + if (nodename != NULL && strcasecmp(sc->sc_name, nodename) != 0) + nodename = NULL; + /* Full node destruction. */ - if (*nargs == 1) { + if (*nargs == 1 && nodename != NULL) { /* Check if some volume is still open. */ force = gctl_get_paraml(req, "force", sizeof(*force)); if (force != NULL && *force == 0 && @@ -2521,11 +2525,12 @@ g_raid_md_ctl_ddf(struct g_raid_md_objec } /* Destroy specified volume. If it was last - all node. */ - if (*nargs != 2) { + if (*nargs > 2) { gctl_error(req, "Invalid number of arguments."); return (-1); } - volname = gctl_get_asciiparam(req, "arg1"); + volname = gctl_get_asciiparam(req, + nodename != NULL ? "arg1" : "arg0"); if (volname == NULL) { gctl_error(req, "No volume name."); return (-2); @@ -2535,6 +2540,14 @@ g_raid_md_ctl_ddf(struct g_raid_md_objec TAILQ_FOREACH(vol, &sc->sc_volumes, v_next) { if (strcmp(vol->v_name, volname) == 0) break; + pp = vol->v_provider; + if (pp == NULL) + continue; + if (strcmp(pp->name, volname) == 0) + break; + if (strncmp(pp->name, "raid/", 5) == 0 && + strcmp(pp->name + 5, volname) == 0) + break; } if (vol == NULL) { i = strtol(volname, &tmp, 10); Modified: head/sys/geom/raid/md_intel.c ============================================================================== --- head/sys/geom/raid/md_intel.c Sun Oct 7 18:57:52 2012 (r241328) +++ head/sys/geom/raid/md_intel.c Sun Oct 7 19:30:16 2012 (r241329) @@ -1461,7 +1461,7 @@ g_raid_md_ctl_intel(struct g_raid_md_obj struct g_consumer *cp; struct g_provider *pp; char arg[16], serial[INTEL_SERIAL_LEN]; - const char *verb, *volname, *levelname, *diskname; + const char *nodename, *verb, *volname, *levelname, *diskname; char *tmp; int *nargs, *force; off_t off, size, sectorsize, strip, disk_sectors; @@ -1876,8 +1876,12 @@ g_raid_md_ctl_intel(struct g_raid_md_obj } if (strcmp(verb, "delete") == 0) { + nodename = gctl_get_asciiparam(req, "arg0"); + if (nodename != NULL && strcasecmp(sc->sc_name, nodename) != 0) + nodename = NULL; + /* Full node destruction. */ - if (*nargs == 1) { + if (*nargs == 1 && nodename != NULL) { /* Check if some volume is still open. */ force = gctl_get_paraml(req, "force", sizeof(*force)); if (force != NULL && *force == 0 && @@ -1895,11 +1899,12 @@ g_raid_md_ctl_intel(struct g_raid_md_obj } /* Destroy specified volume. If it was last - all node. */ - if (*nargs != 2) { + if (*nargs > 2) { gctl_error(req, "Invalid number of arguments."); return (-1); } - volname = gctl_get_asciiparam(req, "arg1"); + volname = gctl_get_asciiparam(req, + nodename != NULL ? "arg1" : "arg0"); if (volname == NULL) { gctl_error(req, "No volume name."); return (-2); @@ -1909,6 +1914,14 @@ g_raid_md_ctl_intel(struct g_raid_md_obj TAILQ_FOREACH(vol, &sc->sc_volumes, v_next) { if (strcmp(vol->v_name, volname) == 0) break; + pp = vol->v_provider; + if (pp == NULL) + continue; + if (strcmp(pp->name, volname) == 0) + break; + if (strncmp(pp->name, "raid/", 5) == 0 && + strcmp(pp->name + 5, volname) == 0) + break; } if (vol == NULL) { i = strtol(volname, &tmp, 10); Modified: head/sys/geom/raid/md_promise.c ============================================================================== --- head/sys/geom/raid/md_promise.c Sun Oct 7 18:57:52 2012 (r241328) +++ head/sys/geom/raid/md_promise.c Sun Oct 7 19:30:16 2012 (r241329) @@ -1217,7 +1217,7 @@ g_raid_md_ctl_promise(struct g_raid_md_o struct g_consumer *cp; struct g_provider *pp; char arg[16]; - const char *verb, *volname, *levelname, *diskname; + const char *nodename, *verb, *volname, *levelname, *diskname; char *tmp; int *nargs, *force; off_t size, sectorsize, strip; @@ -1478,8 +1478,12 @@ g_raid_md_ctl_promise(struct g_raid_md_o } if (strcmp(verb, "delete") == 0) { + nodename = gctl_get_asciiparam(req, "arg0"); + if (nodename != NULL && strcasecmp(sc->sc_name, nodename) != 0) + nodename = NULL; + /* Full node destruction. */ - if (*nargs == 1) { + if (*nargs == 1 && nodename != NULL) { /* Check if some volume is still open. */ force = gctl_get_paraml(req, "force", sizeof(*force)); if (force != NULL && *force == 0 && @@ -1497,11 +1501,12 @@ g_raid_md_ctl_promise(struct g_raid_md_o } /* Destroy specified volume. If it was last - all node. */ - if (*nargs != 2) { + if (*nargs > 2) { gctl_error(req, "Invalid number of arguments."); return (-1); } - volname = gctl_get_asciiparam(req, "arg1"); + volname = gctl_get_asciiparam(req, + nodename != NULL ? "arg1" : "arg0"); if (volname == NULL) { gctl_error(req, "No volume name."); return (-2); @@ -1511,6 +1516,14 @@ g_raid_md_ctl_promise(struct g_raid_md_o TAILQ_FOREACH(vol, &sc->sc_volumes, v_next) { if (strcmp(vol->v_name, volname) == 0) break; + pp = vol->v_provider; + if (pp == NULL) + continue; + if (strcmp(pp->name, volname) == 0) + break; + if (strncmp(pp->name, "raid/", 5) == 0 && + strcmp(pp->name + 5, volname) == 0) + break; } if (vol == NULL) { i = strtol(volname, &tmp, 10); From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 19:51:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5826D106568A; Sun, 7 Oct 2012 19:51:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id 0F3CB8FC21; Sun, 7 Oct 2012 19:51:28 +0000 (UTC) Received: from [192.168.0.6] (spaceball.home.andric.com [192.168.0.6]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id BBEF65C59; Sun, 7 Oct 2012 21:51:26 +0200 (CEST) Message-ID: <5071DD3B.4020301@FreeBSD.org> Date: Sun, 07 Oct 2012 21:51:23 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121002 Thunderbird/16.0 MIME-Version: 1.0 To: Marcel Moolenaar References: <201210071645.q97Gjcj4033917@svn.freebsd.org> In-Reply-To: <201210071645.q97Gjcj4033917@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: r241311 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 19:51:28 -0000 On 2012-10-07 18:45, Marcel Moolenaar wrote: > Author: marcel > Date: Sun Oct 7 16:45:38 2012 > New Revision: 241311 > URL: http://svn.freebsd.org/changeset/base/241311 > > Log: > Fix 32-bit library builds after the removal of adding -E to make for AS, > CC, CXX and LD. This fix implements the intended as it should have been > implemented all along: by passing AS, CC, CXX and LD on the commandline > of the sub-make instead of in the environment of the sub-make. Thanks! This works very nicely. From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 19:53:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D4B7A106566B; Sun, 7 Oct 2012 19:53:05 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86BCE8FC22; Sun, 7 Oct 2012 19:53:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97Jr5lJ059994; Sun, 7 Oct 2012 19:53:05 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97Jr5u0059990; Sun, 7 Oct 2012 19:53:05 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201210071953.q97Jr5u0059990@svn.freebsd.org> From: Joel Dahl Date: Sun, 7 Oct 2012 19:53: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: r241330 - in head/usr.sbin: bsdconfig chroot mountd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Oct 2012 19:53:10 -0000 Author: joel (doc committer) Date: Sun Oct 7 19:53:04 2012 New Revision: 241330 URL: http://svn.freebsd.org/changeset/base/241330 Log: Minor mdoc fixes. Modified: head/usr.sbin/bsdconfig/bsdconfig.8 head/usr.sbin/chroot/chroot.8 head/usr.sbin/mountd/exports.5 Modified: head/usr.sbin/bsdconfig/bsdconfig.8 ============================================================================== --- head/usr.sbin/bsdconfig/bsdconfig.8 Sun Oct 7 19:30:16 2012 (r241329) +++ head/usr.sbin/bsdconfig/bsdconfig.8 Sun Oct 7 19:53:04 2012 (r241330) @@ -129,7 +129,7 @@ Generate a graphviz language file .Pq printed on stdout visualizing the -.Xr bsdconfig 8 +.Nm menu, include, and shortcut structure and relationships. See .Dq bsdconfig dot -h for more details. Modified: head/usr.sbin/chroot/chroot.8 ============================================================================== --- head/usr.sbin/chroot/chroot.8 Sun Oct 7 19:30:16 2012 (r241329) +++ head/usr.sbin/chroot/chroot.8 Sun Oct 7 19:53:04 2012 (r241330) @@ -60,7 +60,7 @@ options are given, the user, group and group list of the process are set to these values after the -.Xr chroot 8 +.Nm has taken place. .Sh ENVIRONMENT The following environment variable is referenced by Modified: head/usr.sbin/mountd/exports.5 ============================================================================== --- head/usr.sbin/mountd/exports.5 Sun Oct 7 19:30:16 2012 (r241329) +++ head/usr.sbin/mountd/exports.5 Sun Oct 7 19:53:04 2012 (r241330) @@ -101,7 +101,7 @@ This line does not export any file syste of the server's directory tree is for NFSv4 clients. The exported file systems for NFSv4 are specified via the other lines in the -.Xr exports 5 +.Nm file in the same way as for NFSv2 and NFSv3. The pathnames must not have any symbolic links in them and should not have any From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 20:01:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0ADD9106572A; Sun, 7 Oct 2012 20:01:42 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7CBC8FC16; Sun, 7 Oct 2012 20:01:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97K1f3S061129; Sun, 7 Oct 2012 20:01:41 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97K1foA061122; Sun, 7 Oct 2012 20:01:41 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201210072001.q97K1foA061122@svn.freebsd.org> From: Joel Dahl Date: Sun, 7 Oct 2012 20:01: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: r241331 - in head/usr.bin: calendar m4 m4/lib script unzip who X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 07 Oct 2012 20:01:42 -0000 Author: joel (doc committer) Date: Sun Oct 7 20:01:41 2012 New Revision: 241331 URL: http://svn.freebsd.org/changeset/base/241331 Log: Remove contractions. Modified: head/usr.bin/calendar/calendar.1 head/usr.bin/m4/lib/ohash_init.3 head/usr.bin/m4/m4.1 head/usr.bin/script/script.1 head/usr.bin/unzip/unzip.1 head/usr.bin/who/who.1 Modified: head/usr.bin/calendar/calendar.1 ============================================================================== --- head/usr.bin/calendar/calendar.1 Sun Oct 7 19:53:04 2012 (r241330) +++ head/usr.bin/calendar/calendar.1 Sun Oct 7 20:01:41 2012 (r241331) @@ -313,7 +313,7 @@ the time-difference towards Greenwich. The new and full moons are happening on the day indicated: They might happen in the time period in the early night or in the late evening. -It doesn't indicate that they are starting in the night on that date. +It does not indicate that they are starting in the night on that date. .Pp Because of minor differences between the output of the formulas used and other sources on the Internet, Druids and Werewolves should Modified: head/usr.bin/m4/lib/ohash_init.3 ============================================================================== --- head/usr.bin/m4/lib/ohash_init.3 Sun Oct 7 19:53:04 2012 (r241330) +++ head/usr.bin/m4/lib/ohash_init.3 Sun Oct 7 20:01:41 2012 (r241331) @@ -166,7 +166,7 @@ for (n = ohash_first(h, &i); n != NULL; points to an auxiliary unsigned integer used to record the current position in the ohash table. Those functions are safe to use even while entries are added to/removed -from the table, but in such a case they don't guarantee that new entries +from the table, but in such a case they do not guarantee that new entries will be returned. As a special case, they can safely be used to free elements in the table. .Pp Modified: head/usr.bin/m4/m4.1 ============================================================================== --- head/usr.bin/m4/m4.1 Sun Oct 7 19:53:04 2012 (r241330) +++ head/usr.bin/m4/m4.1 Sun Oct 7 20:01:41 2012 (r241331) @@ -97,7 +97,7 @@ You can change the quote characters with .Ic changequote built-in macro. .Pp -Most built-ins don't make any sense without arguments, and hence are not +Most built-ins do not make any sense without arguments, and hence are not recognized as special when not followed by an open parenthesis. .Pp The options are as follows: Modified: head/usr.bin/script/script.1 ============================================================================== --- head/usr.bin/script/script.1 Sun Oct 7 19:53:04 2012 (r241330) +++ head/usr.bin/script/script.1 Sun Oct 7 20:01:41 2012 (r241331) @@ -75,7 +75,7 @@ retaining the prior contents. .It Fl d When playing back a session with the .Fl p -flag, don't sleep between records when playing back a timestamped session. +flag, do not sleep between records when playing back a timestamped session. .It Fl k Log keys sent to the program as well as output. .It Fl p Modified: head/usr.bin/unzip/unzip.1 ============================================================================== --- head/usr.bin/unzip/unzip.1 Sun Oct 7 19:53:04 2012 (r241330) +++ head/usr.bin/unzip/unzip.1 Sun Oct 7 20:01:41 2012 (r241331) @@ -50,7 +50,7 @@ Extract to stdout/screen. When extracting files from the zipfile, they are written to stdout. This is similar to .Fl p , -but doesn't suppress normal output. +but does not suppress normal output. .It Fl d Ar dir Extract files into the specified directory rather than the current directory. Modified: head/usr.bin/who/who.1 ============================================================================== --- head/usr.bin/who/who.1 Sun Oct 7 19:53:04 2012 (r241330) +++ head/usr.bin/who/who.1 Sun Oct 7 20:01:41 2012 (r241331) @@ -51,7 +51,7 @@ The options are as follows: .It Fl a Equivalent to .Fl bTu , -with the exception that output isn't restricted to the time and date of +with the exception that output is not restricted to the time and date of the last system reboot. .It Fl b Write the time and date of the last system reboot. From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 20:17:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8A771106566C; Sun, 7 Oct 2012 20:17:25 +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 746668FC08; Sun, 7 Oct 2012 20:17:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97KHPCP063175; Sun, 7 Oct 2012 20:17:25 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97KHPPE063173; Sun, 7 Oct 2012 20:17:25 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210072017.q97KHPPE063173@svn.freebsd.org> From: John Baldwin Date: Sun, 7 Oct 2012 20:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241332 - stable/8/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 20:17:25 -0000 Author: jhb Date: Sun Oct 7 20:17:24 2012 New Revision: 241332 URL: http://svn.freebsd.org/changeset/base/241332 Log: MFC 212429: Add real dependancies on the uuencoded firmwares. Now when one does 'make kernel ; make kernel' the second invocation only does: `kernel.ko' is up to date. rather than reproduce all the .fw files and relink the kernel. Modified: stable/8/sys/conf/files Directory Properties: stable/8/sys/ (props changed) stable/8/sys/conf/ (props changed) Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Sun Oct 7 20:01:41 2012 (r241331) +++ stable/8/sys/conf/files Sun Oct 7 20:17:24 2012 (r241332) @@ -1027,7 +1027,7 @@ ipw_bss.fwo optional ipwbssfw | ipwfw no-implicit-rule \ clean "ipw_bss.fwo" ipw_bss.fw optional ipwbssfw | ipwfw \ - dependency ".PHONY" \ + dependency "$S/contrib/dev/ipw/ipw2100-1.3.fw.uu" \ compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ipw/ipw2100-1.3.fw.uu" \ no-obj no-implicit-rule \ clean "ipw_bss.fw" @@ -1041,7 +1041,7 @@ ipw_ibss.fwo optional ipwibssfw | ipwf no-implicit-rule \ clean "ipw_ibss.fwo" ipw_ibss.fw optional ipwibssfw | ipwfw \ - dependency ".PHONY" \ + dependency "$S/contrib/dev/ipw/ipw2100-1.3-i.fw.uu" \ compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ipw/ipw2100-1.3-i.fw.uu" \ no-obj no-implicit-rule \ clean "ipw_ibss.fw" @@ -1055,7 +1055,7 @@ ipw_monitor.fwo optional ipwmonitorfw no-implicit-rule \ clean "ipw_monitor.fwo" ipw_monitor.fw optional ipwmonitorfw | ipwfw \ - dependency ".PHONY" \ + dependency "$S/contrib/dev/ipw/ipw2100-1.3-p.fw.uu" \ compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ipw/ipw2100-1.3-p.fw.uu" \ no-obj no-implicit-rule \ clean "ipw_monitor.fw" @@ -1083,7 +1083,7 @@ iwi_bss.fwo optional iwibssfw | iwifw no-implicit-rule \ clean "iwi_bss.fwo" iwi_bss.fw optional iwibssfw | iwifw \ - dependency ".PHONY" \ + dependency "$S/contrib/dev/iwi/ipw2200-bss.fw.uu" \ compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwi/ipw2200-bss.fw.uu" \ no-obj no-implicit-rule \ clean "iwi_bss.fw" @@ -1097,7 +1097,7 @@ iwi_ibss.fwo optional iwiibssfw | iwif no-implicit-rule \ clean "iwi_ibss.fwo" iwi_ibss.fw optional iwiibssfw | iwifw \ - dependency ".PHONY" \ + dependency "$S/contrib/dev/iwi/ipw2200-ibss.fw.uu" \ compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwi/ipw2200-ibss.fw.uu" \ no-obj no-implicit-rule \ clean "iwi_ibss.fw" @@ -1111,7 +1111,7 @@ iwi_monitor.fwo optional iwimonitorfw no-implicit-rule \ clean "iwi_monitor.fwo" iwi_monitor.fw optional iwimonitorfw | iwifw \ - dependency ".PHONY" \ + dependency "$S/contrib/dev/iwi/ipw2200-sniffer.fw.uu" \ compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwi/ipw2200-sniffer.fw.uu" \ no-obj no-implicit-rule \ clean "iwi_monitor.fw" @@ -1140,7 +1140,7 @@ iwn4965fw.fwo optional iwn4965fw | iwn no-implicit-rule \ clean "iwn4965fw.fwo" iwn4965.fw optional iwn4965fw | iwnfw \ - dependency ".PHONY" \ + dependency "$S/contrib/dev/iwn/iwlwifi-4965-228.61.2.24.fw.uu" \ compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-4965-228.61.2.24.fw.uu" \ no-obj no-implicit-rule \ clean "iwn4965.fw" @@ -1168,7 +1168,7 @@ iwn5150fw.fwo optional iwn5150fw | iwn no-implicit-rule \ clean "iwn5150fw.fwo" iwn5150.fw optional iwn5150fw | iwnfw \ - dependency ".PHONY" \ + dependency "$S/contrib/dev/iwn/iwlwifi-5150-8.24.2.2.fw.uu"\ compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-5150-8.24.2.2.fw.uu" \ no-obj no-implicit-rule \ clean "iwn5150.fw" @@ -1182,7 +1182,7 @@ iwn6000fw.fwo optional iwn6000fw | iwn no-implicit-rule \ clean "iwn6000fw.fwo" iwn6000.fw optional iwn6000fw | iwnfw \ - dependency ".PHONY" \ + dependency "$S/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu" \ compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu" \ no-obj no-implicit-rule \ clean "iwn6000.fw" @@ -1365,7 +1365,7 @@ mw88W8363.fwo optional mwlfw \ no-implicit-rule \ clean "mw88W8363.fwo" mw88W8363.fw optional mwlfw \ - dependency ".PHONY" \ + dependency "$S/contrib/dev/mwl/mw88W8363.fw.uu" \ compile-with "uudecode -o ${.TARGET} $S/contrib/dev/mwl/mw88W8363.fw.uu" \ no-obj no-implicit-rule \ clean "mw88W8363.fw" @@ -1375,7 +1375,7 @@ mwlboot.fwo optional mwlfw \ no-implicit-rule \ clean "mwlboot.fwo" mwlboot.fw optional mwlfw \ - dependency ".PHONY" \ + dependency "$S/contrib/dev/mwl/mwlboot.fw.uu" \ compile-with "uudecode -o ${.TARGET} $S/contrib/dev/mwl/mwlboot.fw.uu" \ no-obj no-implicit-rule \ clean "mwlboot.fw" @@ -1487,7 +1487,7 @@ rt2561fw.fwo optional rt2561fw | ralfw no-implicit-rule \ clean "rt2561fw.fwo" rt2561.fw optional rt2561fw | ralfw \ - dependency ".PHONY" \ + dependency "$S/contrib/dev/ral/rt2561.fw.uu" \ compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ral/rt2561.fw.uu" \ no-obj no-implicit-rule \ clean "rt2561.fw" @@ -1501,7 +1501,7 @@ rt2561sfw.fwo optional rt2561sfw | ral no-implicit-rule \ clean "rt2561sfw.fwo" rt2561s.fw optional rt2561sfw | ralfw \ - dependency ".PHONY" \ + dependency "$S/contrib/dev/ral/rt2561s.fw.uu" \ compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ral/rt2561s.fw.uu" \ no-obj no-implicit-rule \ clean "rt2561s.fw" @@ -1515,7 +1515,7 @@ rt2661fw.fwo optional rt2661fw | ralfw no-implicit-rule \ clean "rt2661fw.fwo" rt2661.fw optional rt2661fw | ralfw \ - dependency ".PHONY" \ + dependency "$S/contrib/dev/ral/rt2661.fw.uu" \ compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ral/rt2661.fw.uu" \ no-obj no-implicit-rule \ clean "rt2661.fw" @@ -1529,7 +1529,7 @@ rt2860fw.fwo optional rt2860fw | ralfw no-implicit-rule \ clean "rt2860fw.fwo" rt2860.fw optional rt2860fw | ralfw \ - dependency ".PHONY" \ + dependency "$S/contrib/dev/ral/rt2860.fw.uu" \ compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ral/rt2860.fw.uu" \ no-obj no-implicit-rule \ clean "rt2860.fw" @@ -1894,7 +1894,7 @@ wpifw.fwo optional wpifw \ no-implicit-rule \ clean "wpifw.fwo" wpi.fw optional wpifw \ - dependency ".PHONY" \ + dependency "$S/contrib/dev/wpi/iwlwifi-3945-2.14.4.fw.uu" \ compile-with "uudecode -o ${.TARGET} $S/contrib/dev/wpi/iwlwifi-3945-2.14.4.fw.uu" \ no-obj no-implicit-rule \ clean "wpi.fw" From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 20:36:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 642911065708; Sun, 7 Oct 2012 20:36:47 +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 4F0468FC23; Sun, 7 Oct 2012 20:36:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97Kal7O066722; Sun, 7 Oct 2012 20:36:47 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97KalP6066720; Sun, 7 Oct 2012 20:36:47 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210072036.q97KalP6066720@svn.freebsd.org> From: Warner Losh Date: Sun, 7 Oct 2012 20: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: r241333 - head/sys/arm/at91 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 20:36:47 -0000 Author: imp Date: Sun Oct 7 20:36:46 2012 New Revision: 241333 URL: http://svn.freebsd.org/changeset/base/241333 Log: Loop reading the RTC registers until the same values are obtained twice, as advised in the atmel docs. Submitted by: Ian Lapore Modified: head/sys/arm/at91/at91_rtc.c Modified: head/sys/arm/at91/at91_rtc.c ============================================================================== --- head/sys/arm/at91/at91_rtc.c Sun Oct 7 20:17:24 2012 (r241332) +++ head/sys/arm/at91/at91_rtc.c Sun Oct 7 20:36:46 2012 (r241333) @@ -256,7 +256,7 @@ static int at91_rtc_gettime(device_t dev, struct timespec *ts) { struct clocktime ct; - uint32_t timr, calr; + uint32_t calr, calr2, timr, timr2; struct at91_rtc_softc *sc; sc = device_get_softc(dev); @@ -266,8 +266,19 @@ at91_rtc_gettime(device_t dev, struct ti if (RD4(sc, RTC_VER) & (RTC_VER_NVTIM | RTC_VER_NVCAL)) return EINVAL; - timr = RD4(sc, RTC_TIMR); - calr = RD4(sc, RTC_CALR); + /* + * The RTC hardware can update registers while the CPU is reading them. + * The manual advises reading until you obtain the same values twice. + * Interleaving the reads (rather than timr, timr2, calr, calr2 order) + * also ensures we don't miss a midnight rollover/carry between reads. + */ + do { + timr = RD4(sc, RTC_TIMR); + calr = RD4(sc, RTC_CALR); + timr2 = RD4(sc, RTC_TIMR); + calr2 = RD4(sc, RTC_CALR); + } while (timr != timr2 || calr != calr2); + ct.nsec = 0; ct.sec = RTC_TIMR_SEC(timr); ct.min = RTC_TIMR_MIN(timr); From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 21:32:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8055A106566C; Sun, 7 Oct 2012 21:32:42 +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 66DCF8FC08; Sun, 7 Oct 2012 21:32:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97LWgmS074081; Sun, 7 Oct 2012 21:32:42 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97LWgDc074078; Sun, 7 Oct 2012 21:32:42 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210072132.q97LWgDc074078@svn.freebsd.org> From: John Baldwin Date: Sun, 7 Oct 2012 21:32:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241334 - stable/9/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 21:32:42 -0000 Author: jhb Date: Sun Oct 7 21:32:41 2012 New Revision: 241334 URL: http://svn.freebsd.org/changeset/base/241334 Log: MFC 239955-239957: Cleanups and fixes for building firmware modules into a kernel: - Add common rules for building firmware object files (NORMAL_FW to run uudecode, and NORMAL_FWO to use ld to build the .fwo file) and use those instead of explicit ld/uudecode invocations in sys/conf/files. Apart from increasing readability, this makes it possible to adjust the flags used for firmware objects in one place. - Similar to how r171350 fixed linking of kernel modules containing firmware objects by adding --no-warn-mismatch to the linker flags, add --no-warn-mismatch when linking firmware objects (*.fwo) as well as to the link of the main kernel file. This permits firmware modules to be statically linked into an ia64 kernel. Modified: stable/9/sys/conf/files stable/9/sys/conf/kern.pre.mk Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Sun Oct 7 20:36:46 2012 (r241333) +++ stable/9/sys/conf/files Sun Oct 7 21:32:41 2012 (r241334) @@ -1163,12 +1163,12 @@ ipwbssfw.c optional ipwbssfw | ipwfw clean "ipwbssfw.c" ipw_bss.fwo optional ipwbssfw | ipwfw \ dependency "ipw_bss.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} ipw_bss.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "ipw_bss.fwo" ipw_bss.fw optional ipwbssfw | ipwfw \ dependency "$S/contrib/dev/ipw/ipw2100-1.3.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ipw/ipw2100-1.3.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "ipw_bss.fw" ipwibssfw.c optional ipwibssfw | ipwfw \ @@ -1177,12 +1177,12 @@ ipwibssfw.c optional ipwibssfw | ipwfw clean "ipwibssfw.c" ipw_ibss.fwo optional ipwibssfw | ipwfw \ dependency "ipw_ibss.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} ipw_ibss.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "ipw_ibss.fwo" ipw_ibss.fw optional ipwibssfw | ipwfw \ dependency "$S/contrib/dev/ipw/ipw2100-1.3-i.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ipw/ipw2100-1.3-i.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "ipw_ibss.fw" ipwmonitorfw.c optional ipwmonitorfw | ipwfw \ @@ -1191,12 +1191,12 @@ ipwmonitorfw.c optional ipwmonitorfw | clean "ipwmonitorfw.c" ipw_monitor.fwo optional ipwmonitorfw | ipwfw \ dependency "ipw_monitor.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} ipw_monitor.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "ipw_monitor.fwo" ipw_monitor.fw optional ipwmonitorfw | ipwfw \ dependency "$S/contrib/dev/ipw/ipw2100-1.3-p.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ipw/ipw2100-1.3-p.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "ipw_monitor.fw" dev/iscsi/initiator/iscsi.c optional iscsi_initiator scbus @@ -1219,12 +1219,12 @@ iwibssfw.c optional iwibssfw | iwifw clean "iwibssfw.c" iwi_bss.fwo optional iwibssfw | iwifw \ dependency "iwi_bss.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwi_bss.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwi_bss.fwo" iwi_bss.fw optional iwibssfw | iwifw \ dependency "$S/contrib/dev/iwi/ipw2200-bss.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwi/ipw2200-bss.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwi_bss.fw" iwiibssfw.c optional iwiibssfw | iwifw \ @@ -1233,12 +1233,12 @@ iwiibssfw.c optional iwiibssfw | iwifw clean "iwiibssfw.c" iwi_ibss.fwo optional iwiibssfw | iwifw \ dependency "iwi_ibss.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwi_ibss.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwi_ibss.fwo" iwi_ibss.fw optional iwiibssfw | iwifw \ dependency "$S/contrib/dev/iwi/ipw2200-ibss.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwi/ipw2200-ibss.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwi_ibss.fw" iwimonitorfw.c optional iwimonitorfw | iwifw \ @@ -1247,12 +1247,12 @@ iwimonitorfw.c optional iwimonitorfw | clean "iwimonitorfw.c" iwi_monitor.fwo optional iwimonitorfw | iwifw \ dependency "iwi_monitor.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwi_monitor.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwi_monitor.fwo" iwi_monitor.fw optional iwimonitorfw | iwifw \ dependency "$S/contrib/dev/iwi/ipw2200-sniffer.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwi/ipw2200-sniffer.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwi_monitor.fw" dev/iwn/if_iwn.c optional iwn @@ -1262,12 +1262,12 @@ iwn1000fw.c optional iwn1000fw | iwnfw clean "iwn1000fw.c" iwn1000fw.fwo optional iwn1000fw | iwnfw \ dependency "iwn1000.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn1000.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn1000fw.fwo" iwn1000.fw optional iwn1000fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-1000-39.31.5.1.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-1000-39.31.5.1.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn1000.fw" iwn4965fw.c optional iwn4965fw | iwnfw \ @@ -1276,12 +1276,12 @@ iwn4965fw.c optional iwn4965fw | iwnfw clean "iwn4965fw.c" iwn4965fw.fwo optional iwn4965fw | iwnfw \ dependency "iwn4965.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn4965.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn4965fw.fwo" iwn4965.fw optional iwn4965fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-4965-228.61.2.24.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-4965-228.61.2.24.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn4965.fw" iwn5000fw.c optional iwn5000fw | iwnfw \ @@ -1290,12 +1290,12 @@ iwn5000fw.c optional iwn5000fw | iwnfw clean "iwn5000fw.c" iwn5000fw.fwo optional iwn5000fw | iwnfw \ dependency "iwn5000.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn5000.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn5000fw.fwo" iwn5000.fw optional iwn5000fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-5000-8.83.5.1.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-5000-8.83.5.1.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn5000.fw" iwn5150fw.c optional iwn5150fw | iwnfw \ @@ -1304,12 +1304,12 @@ iwn5150fw.c optional iwn5150fw | iwnfw clean "iwn5150fw.c" iwn5150fw.fwo optional iwn5150fw | iwnfw \ dependency "iwn5150.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn5150.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn5150fw.fwo" iwn5150.fw optional iwn5150fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-5150-8.24.2.2.fw.uu"\ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-5150-8.24.2.2.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn5150.fw" iwn6000fw.c optional iwn6000fw | iwnfw \ @@ -1318,12 +1318,12 @@ iwn6000fw.c optional iwn6000fw | iwnfw clean "iwn6000fw.c" iwn6000fw.fwo optional iwn6000fw | iwnfw \ dependency "iwn6000.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn6000.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn6000fw.fwo" iwn6000.fw optional iwn6000fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6000.fw" iwn6000g2afw.c optional iwn6000g2afw | iwnfw \ @@ -1332,12 +1332,12 @@ iwn6000g2afw.c optional iwn6000g2afw | clean "iwn6000g2afw.c" iwn6000g2afw.fwo optional iwn6000g2afw | iwnfw \ dependency "iwn6000g2a.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn6000g2a.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn6000g2afw.fwo" iwn6000g2a.fw optional iwn6000g2afw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-6000g2a-17.168.5.2.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6000g2a-17.168.5.2.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6000g2a.fw" iwn6000g2bfw.c optional iwn6000g2bfw | iwnfw \ @@ -1346,12 +1346,12 @@ iwn6000g2bfw.c optional iwn6000g2bfw | clean "iwn6000g2bfw.c" iwn6000g2bfw.fwo optional iwn6000g2bfw | iwnfw \ dependency "iwn6000g2b.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn6000g2b.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn6000g2bfw.fwo" iwn6000g2b.fw optional iwn6000g2bfw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-6000g2b-17.168.5.2.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6000g2b-17.168.5.2.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6000g2b.fw" iwn6050fw.c optional iwn6050fw | iwnfw \ @@ -1360,12 +1360,12 @@ iwn6050fw.c optional iwn6050fw | iwnfw clean "iwn6050fw.c" iwn6050fw.fwo optional iwn6050fw | iwnfw \ dependency "iwn6050.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn6050.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn6050fw.fwo" iwn6050.fw optional iwn6050fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-6050-41.28.5.1.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6050-41.28.5.1.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6050.fw" dev/ixgb/if_ixgb.c optional ixgb @@ -1494,22 +1494,22 @@ mwlfw.c optional mwlfw \ clean "mwlfw.c" mw88W8363.fwo optional mwlfw \ dependency "mw88W8363.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} mw88W8363.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "mw88W8363.fwo" mw88W8363.fw optional mwlfw \ dependency "$S/contrib/dev/mwl/mw88W8363.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/mwl/mw88W8363.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "mw88W8363.fw" mwlboot.fwo optional mwlfw \ dependency "mwlboot.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} mwlboot.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "mwlboot.fwo" mwlboot.fw optional mwlfw \ dependency "$S/contrib/dev/mwl/mwlboot.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/mwl/mwlboot.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "mwlboot.fw" dev/mxge/if_mxge.c optional mxge pci @@ -1626,12 +1626,12 @@ rt2561fw.c optional rt2561fw | ralfw clean "rt2561fw.c" rt2561fw.fwo optional rt2561fw | ralfw \ dependency "rt2561.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} rt2561.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rt2561fw.fwo" rt2561.fw optional rt2561fw | ralfw \ dependency "$S/contrib/dev/ral/rt2561.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ral/rt2561.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rt2561.fw" rt2561sfw.c optional rt2561sfw | ralfw \ @@ -1640,12 +1640,12 @@ rt2561sfw.c optional rt2561sfw | ralfw clean "rt2561sfw.c" rt2561sfw.fwo optional rt2561sfw | ralfw \ dependency "rt2561s.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} rt2561s.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rt2561sfw.fwo" rt2561s.fw optional rt2561sfw | ralfw \ dependency "$S/contrib/dev/ral/rt2561s.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ral/rt2561s.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rt2561s.fw" rt2661fw.c optional rt2661fw | ralfw \ @@ -1654,12 +1654,12 @@ rt2661fw.c optional rt2661fw | ralfw clean "rt2661fw.c" rt2661fw.fwo optional rt2661fw | ralfw \ dependency "rt2661.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} rt2661.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rt2661fw.fwo" rt2661.fw optional rt2661fw | ralfw \ dependency "$S/contrib/dev/ral/rt2661.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ral/rt2661.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rt2661.fw" rt2860fw.c optional rt2860fw | ralfw \ @@ -1668,12 +1668,12 @@ rt2860fw.c optional rt2860fw | ralfw clean "rt2860fw.c" rt2860fw.fwo optional rt2860fw | ralfw \ dependency "rt2860.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} rt2860.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rt2860fw.fwo" rt2860.fw optional rt2860fw | ralfw \ dependency "$S/contrib/dev/ral/rt2860.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ral/rt2860.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rt2860.fw" dev/random/harvest.c standard @@ -1958,12 +1958,12 @@ runfw.c optional runfw \ clean "runfw.c" runfw.fwo optional runfw \ dependency "runfw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} runfw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "runfw.fwo" runfw optional runfw \ dependency "$S/contrib/dev/run/rt2870.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/run/rt2870.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "runfw" dev/usb/wlan/if_uath.c optional uath @@ -2071,12 +2071,12 @@ wpifw.c optional wpifw \ clean "wpifw.c" wpifw.fwo optional wpifw \ dependency "wpi.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} wpi.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "wpifw.fwo" wpi.fw optional wpifw \ dependency "$S/contrib/dev/wpi/iwlwifi-3945-15.32.2.9.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/wpi/iwlwifi-3945-15.32.2.9.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "wpi.fw" dev/xe/if_xe.c optional xe Modified: stable/9/sys/conf/kern.pre.mk ============================================================================== --- stable/9/sys/conf/kern.pre.mk Sun Oct 7 20:36:46 2012 (r241333) +++ stable/9/sys/conf/kern.pre.mk Sun Oct 7 21:32:41 2012 (r241334) @@ -131,6 +131,10 @@ NORMAL_C_NOWERROR= ${CC} -c ${CFLAGS} ${ NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \ ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c +NORMAL_FW= uudecode -o ${.TARGET} ${.ALLSRC} +NORMAL_FWO= ${LD} -b binary --no-warn-mismatch -d -warn-common -r \ + -o ${.TARGET} ${.ALLSRC:M*.fw} + NORMAL_CTFCONVERT= [ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} @@ -151,7 +155,7 @@ SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS} SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o} SYSTEM_OBJS+= hack.So SYSTEM_CTFMERGE= [ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o -SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} \ +SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} --no-warn-mismatch \ -warn-common -export-dynamic -dynamic-linker /red/herring \ -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \ From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 21:33:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 27D9110656C2; Sun, 7 Oct 2012 21:33:05 +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 0F5168FC14; Sun, 7 Oct 2012 21:33:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97LX5nG074178; Sun, 7 Oct 2012 21:33:05 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97LX4eC074175; Sun, 7 Oct 2012 21:33:04 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210072133.q97LX4eC074175@svn.freebsd.org> From: John Baldwin Date: Sun, 7 Oct 2012 21:33:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241335 - stable/8/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 21:33:05 -0000 Author: jhb Date: Sun Oct 7 21:33:04 2012 New Revision: 241335 URL: http://svn.freebsd.org/changeset/base/241335 Log: MFC 239955-239957: Cleanups and fixes for building firmware modules into a kernel: - Add common rules for building firmware object files (NORMAL_FW to run uudecode, and NORMAL_FWO to use ld to build the .fwo file) and use those instead of explicit ld/uudecode invocations in sys/conf/files. Apart from increasing readability, this makes it possible to adjust the flags used for firmware objects in one place. - Similar to how r171350 fixed linking of kernel modules containing firmware objects by adding --no-warn-mismatch to the linker flags, add --no-warn-mismatch when linking firmware objects (*.fwo) as well as to the link of the main kernel file. This permits firmware modules to be statically linked into an ia64 kernel. Modified: stable/8/sys/conf/files stable/8/sys/conf/kern.pre.mk Directory Properties: stable/8/sys/ (props changed) stable/8/sys/conf/ (props changed) Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Sun Oct 7 21:32:41 2012 (r241334) +++ stable/8/sys/conf/files Sun Oct 7 21:33:04 2012 (r241335) @@ -1023,12 +1023,12 @@ ipwbssfw.c optional ipwbssfw | ipwfw clean "ipwbssfw.c" ipw_bss.fwo optional ipwbssfw | ipwfw \ dependency "ipw_bss.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} ipw_bss.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "ipw_bss.fwo" ipw_bss.fw optional ipwbssfw | ipwfw \ dependency "$S/contrib/dev/ipw/ipw2100-1.3.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ipw/ipw2100-1.3.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "ipw_bss.fw" ipwibssfw.c optional ipwibssfw | ipwfw \ @@ -1037,12 +1037,12 @@ ipwibssfw.c optional ipwibssfw | ipwfw clean "ipwibssfw.c" ipw_ibss.fwo optional ipwibssfw | ipwfw \ dependency "ipw_ibss.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} ipw_ibss.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "ipw_ibss.fwo" ipw_ibss.fw optional ipwibssfw | ipwfw \ dependency "$S/contrib/dev/ipw/ipw2100-1.3-i.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ipw/ipw2100-1.3-i.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "ipw_ibss.fw" ipwmonitorfw.c optional ipwmonitorfw | ipwfw \ @@ -1051,12 +1051,12 @@ ipwmonitorfw.c optional ipwmonitorfw | clean "ipwmonitorfw.c" ipw_monitor.fwo optional ipwmonitorfw | ipwfw \ dependency "ipw_monitor.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} ipw_monitor.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "ipw_monitor.fwo" ipw_monitor.fw optional ipwmonitorfw | ipwfw \ dependency "$S/contrib/dev/ipw/ipw2100-1.3-p.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ipw/ipw2100-1.3-p.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "ipw_monitor.fw" dev/iscsi/initiator/iscsi.c optional iscsi_initiator scbus @@ -1079,12 +1079,12 @@ iwibssfw.c optional iwibssfw | iwifw clean "iwibssfw.c" iwi_bss.fwo optional iwibssfw | iwifw \ dependency "iwi_bss.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwi_bss.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwi_bss.fwo" iwi_bss.fw optional iwibssfw | iwifw \ dependency "$S/contrib/dev/iwi/ipw2200-bss.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwi/ipw2200-bss.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwi_bss.fw" iwiibssfw.c optional iwiibssfw | iwifw \ @@ -1093,12 +1093,12 @@ iwiibssfw.c optional iwiibssfw | iwifw clean "iwiibssfw.c" iwi_ibss.fwo optional iwiibssfw | iwifw \ dependency "iwi_ibss.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwi_ibss.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwi_ibss.fwo" iwi_ibss.fw optional iwiibssfw | iwifw \ dependency "$S/contrib/dev/iwi/ipw2200-ibss.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwi/ipw2200-ibss.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwi_ibss.fw" iwimonitorfw.c optional iwimonitorfw | iwifw \ @@ -1107,12 +1107,12 @@ iwimonitorfw.c optional iwimonitorfw | clean "iwimonitorfw.c" iwi_monitor.fwo optional iwimonitorfw | iwifw \ dependency "iwi_monitor.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwi_monitor.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwi_monitor.fwo" iwi_monitor.fw optional iwimonitorfw | iwifw \ dependency "$S/contrib/dev/iwi/ipw2200-sniffer.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwi/ipw2200-sniffer.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwi_monitor.fw" dev/iwn/if_iwn.c optional iwn @@ -1122,12 +1122,12 @@ iwn1000fw.c optional iwn1000fw | iwnfw clean "iwn1000fw.c" iwn1000fw.fwo optional iwn1000fw | iwnfw \ dependency "iwn1000.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn1000.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn1000fw.fwo" iwn1000.fw optional iwn1000fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-1000-39.31.5.1.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-1000-39.31.5.1.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn1000.fw" iwn4965fw.c optional iwn4965fw | iwnfw \ @@ -1136,12 +1136,12 @@ iwn4965fw.c optional iwn4965fw | iwnfw clean "iwn4965fw.c" iwn4965fw.fwo optional iwn4965fw | iwnfw \ dependency "iwn4965.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn4965.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn4965fw.fwo" iwn4965.fw optional iwn4965fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-4965-228.61.2.24.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-4965-228.61.2.24.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn4965.fw" iwn5000fw.c optional iwn5000fw | iwnfw \ @@ -1150,12 +1150,12 @@ iwn5000fw.c optional iwn5000fw | iwnfw clean "iwn5000fw.c" iwn5000fw.fwo optional iwn5000fw | iwnfw \ dependency "iwn5000.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn5000.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn5000fw.fwo" iwn5000.fw optional iwn5000fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-5000-8.83.5.1.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-5000-8.83.5.1.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn5000.fw" iwn5150fw.c optional iwn5150fw | iwnfw \ @@ -1164,12 +1164,12 @@ iwn5150fw.c optional iwn5150fw | iwnfw clean "iwn5150fw.c" iwn5150fw.fwo optional iwn5150fw | iwnfw \ dependency "iwn5150.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn5150.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn5150fw.fwo" iwn5150.fw optional iwn5150fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-5150-8.24.2.2.fw.uu"\ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-5150-8.24.2.2.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn5150.fw" iwn6000fw.c optional iwn6000fw | iwnfw \ @@ -1178,12 +1178,12 @@ iwn6000fw.c optional iwn6000fw | iwnfw clean "iwn6000fw.c" iwn6000fw.fwo optional iwn6000fw | iwnfw \ dependency "iwn6000.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn6000.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn6000fw.fwo" iwn6000.fw optional iwn6000fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6000.fw" iwn6000g2afw.c optional iwn6000g2afw | iwnfw \ @@ -1192,12 +1192,12 @@ iwn6000g2afw.c optional iwn6000g2afw | clean "iwn6000g2afw.c" iwn6000g2afw.fwo optional iwn6000g2afw | iwnfw \ dependency "iwn6000g2a.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn6000g2a.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn6000g2afw.fwo" iwn6000g2a.fw optional iwn6000g2afw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-6000g2a-17.168.5.2.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6000g2a-17.168.5.2.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6000g2a.fw" iwn6000g2bfw.c optional iwn6000g2bfw | iwnfw \ @@ -1206,12 +1206,12 @@ iwn6000g2bfw.c optional iwn6000g2bfw | clean "iwn6000g2bfw.c" iwn6000g2bfw.fwo optional iwn6000g2bfw | iwnfw \ dependency "iwn6000g2b.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn6000g2b.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn6000g2bfw.fwo" iwn6000g2b.fw optional iwn6000g2bfw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-6000g2b-17.168.5.2.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6000g2b-17.168.5.2.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6000g2b.fw" iwn6050fw.c optional iwn6050fw | iwnfw \ @@ -1220,12 +1220,12 @@ iwn6050fw.c optional iwn6050fw | iwnfw clean "iwn6050fw.c" iwn6050fw.fwo optional iwn6050fw | iwnfw \ dependency "iwn6050.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn6050.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn6050fw.fwo" iwn6050.fw optional iwn6050fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-6050-41.28.5.1.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6050-41.28.5.1.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6050.fw" dev/ixgb/if_ixgb.c optional ixgb @@ -1361,22 +1361,22 @@ mwlfw.c optional mwlfw \ clean "mwlfw.c" mw88W8363.fwo optional mwlfw \ dependency "mw88W8363.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} mw88W8363.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "mw88W8363.fwo" mw88W8363.fw optional mwlfw \ dependency "$S/contrib/dev/mwl/mw88W8363.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/mwl/mw88W8363.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "mw88W8363.fw" mwlboot.fwo optional mwlfw \ dependency "mwlboot.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} mwlboot.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "mwlboot.fwo" mwlboot.fw optional mwlfw \ dependency "$S/contrib/dev/mwl/mwlboot.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/mwl/mwlboot.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "mwlboot.fw" dev/mxge/if_mxge.c optional mxge pci @@ -1483,12 +1483,12 @@ rt2561fw.c optional rt2561fw | ralfw clean "rt2561fw.c" rt2561fw.fwo optional rt2561fw | ralfw \ dependency "rt2561.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} rt2561.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rt2561fw.fwo" rt2561.fw optional rt2561fw | ralfw \ dependency "$S/contrib/dev/ral/rt2561.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ral/rt2561.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rt2561.fw" rt2561sfw.c optional rt2561sfw | ralfw \ @@ -1497,12 +1497,12 @@ rt2561sfw.c optional rt2561sfw | ralfw clean "rt2561sfw.c" rt2561sfw.fwo optional rt2561sfw | ralfw \ dependency "rt2561s.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} rt2561s.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rt2561sfw.fwo" rt2561s.fw optional rt2561sfw | ralfw \ dependency "$S/contrib/dev/ral/rt2561s.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ral/rt2561s.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rt2561s.fw" rt2661fw.c optional rt2661fw | ralfw \ @@ -1511,12 +1511,12 @@ rt2661fw.c optional rt2661fw | ralfw clean "rt2661fw.c" rt2661fw.fwo optional rt2661fw | ralfw \ dependency "rt2661.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} rt2661.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rt2661fw.fwo" rt2661.fw optional rt2661fw | ralfw \ dependency "$S/contrib/dev/ral/rt2661.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ral/rt2661.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rt2661.fw" rt2860fw.c optional rt2860fw | ralfw \ @@ -1525,12 +1525,12 @@ rt2860fw.c optional rt2860fw | ralfw clean "rt2860fw.c" rt2860fw.fwo optional rt2860fw | ralfw \ dependency "rt2860.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} rt2860.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rt2860fw.fwo" rt2860.fw optional rt2860fw | ralfw \ dependency "$S/contrib/dev/ral/rt2860.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/ral/rt2860.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rt2860.fw" dev/random/harvest.c standard @@ -1890,12 +1890,12 @@ wpifw.c optional wpifw \ clean "wpifw.c" wpifw.fwo optional wpifw \ dependency "wpi.fw" \ - compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} wpi.fw" \ + compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "wpifw.fwo" wpi.fw optional wpifw \ dependency "$S/contrib/dev/wpi/iwlwifi-3945-2.14.4.fw.uu" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/wpi/iwlwifi-3945-2.14.4.fw.uu" \ + compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "wpi.fw" dev/xe/if_xe.c optional xe Modified: stable/8/sys/conf/kern.pre.mk ============================================================================== --- stable/8/sys/conf/kern.pre.mk Sun Oct 7 21:32:41 2012 (r241334) +++ stable/8/sys/conf/kern.pre.mk Sun Oct 7 21:33:04 2012 (r241335) @@ -131,6 +131,10 @@ NORMAL_C_NOWERROR= ${CC} -c ${CFLAGS} ${ NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \ ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c +NORMAL_FW= uudecode -o ${.TARGET} ${.ALLSRC} +NORMAL_FWO= ${LD} -b binary --no-warn-mismatch -d -warn-common -r \ + -o ${.TARGET} ${.ALLSRC:M*.fw} + .if defined(CTFCONVERT) NORMAL_CTFCONVERT= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .else @@ -149,7 +153,7 @@ SYSTEM_OBJS+= hack.So SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o LD+= -g .endif -SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} \ +SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} --no-warn-mismatch \ -warn-common -export-dynamic -dynamic-linker /red/herring \ -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \ From owner-svn-src-all@FreeBSD.ORG Sun Oct 7 23:45:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 39930106566B; Sun, 7 Oct 2012 23:45:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2227B8FC08; Sun, 7 Oct 2012 23:45:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q97NjJhn091566; Sun, 7 Oct 2012 23:45:19 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q97NjJ0i091562; Sun, 7 Oct 2012 23:45:19 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210072345.q97NjJ0i091562@svn.freebsd.org> From: Adrian Chadd Date: Sun, 7 Oct 2012 23:45: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: r241336 - 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: Sun, 07 Oct 2012 23:45:20 -0000 Author: adrian Date: Sun Oct 7 23:45:19 2012 New Revision: 241336 URL: http://svn.freebsd.org/changeset/base/241336 Log: Migrate the TID TXQ accesses to a new set of macros, rather than reusing the ATH_TXQ_* macros. * Introduce the new macros; * rename the TID queue and TID filtered frame queue so the compiler tells me I'm using the wrong macro. These should correspond 1:1 to the existing code. Modified: head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_ath_tx_ht.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Sun Oct 7 21:33:04 2012 (r241335) +++ head/sys/dev/ath/if_ath_tx.c Sun Oct 7 23:45:19 2012 (r241336) @@ -2669,7 +2669,7 @@ ath_tx_xmit_aggr(struct ath_softc *sc, s /* paused? queue */ if (tid->paused) { - ATH_TXQ_INSERT_HEAD(tid, bf, bf_list); + ATH_TID_INSERT_HEAD(tid, bf, bf_list); /* XXX don't sched - we're paused! */ return; } @@ -2678,7 +2678,7 @@ ath_tx_xmit_aggr(struct ath_softc *sc, s if (bf->bf_state.bfs_dobaw && (! BAW_WITHIN(tap->txa_start, tap->txa_wnd, SEQNO(bf->bf_state.bfs_seqno)))) { - ATH_TXQ_INSERT_HEAD(tid, bf, bf_list); + ATH_TID_INSERT_HEAD(tid, bf, bf_list); ath_tx_tid_sched(sc, tid); return; } @@ -2777,11 +2777,11 @@ ath_tx_swq(struct ath_softc *sc, struct if (atid->paused) { /* TID is paused, queue */ DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: paused\n", __func__); - ATH_TXQ_INSERT_TAIL(atid, bf, bf_list); + ATH_TID_INSERT_TAIL(atid, bf, bf_list); } else if (ath_tx_ampdu_pending(sc, an, tid)) { /* AMPDU pending; queue */ DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: pending\n", __func__); - ATH_TXQ_INSERT_TAIL(atid, bf, bf_list); + ATH_TID_INSERT_TAIL(atid, bf, bf_list); /* XXX sched? */ } else if (ath_tx_ampdu_running(sc, an, tid)) { /* AMPDU running, attempt direct dispatch if possible */ @@ -2789,7 +2789,7 @@ ath_tx_swq(struct ath_softc *sc, struct /* * Always queue the frame to the tail of the list. */ - ATH_TXQ_INSERT_TAIL(atid, bf, bf_list); + ATH_TID_INSERT_TAIL(atid, bf, bf_list); /* * If the hardware queue isn't busy, direct dispatch @@ -2799,8 +2799,8 @@ ath_tx_swq(struct ath_softc *sc, struct * Otherwise, schedule the TID. */ if (txq->axq_depth < sc->sc_hwq_limit) { - bf = TAILQ_FIRST(&atid->axq_q); - ATH_TXQ_REMOVE(atid, bf, bf_list); + bf = ATH_TID_FIRST(atid); + ATH_TID_REMOVE(atid, bf, bf_list); /* * Ensure it's definitely treated as a non-AMPDU @@ -2831,7 +2831,7 @@ ath_tx_swq(struct ath_softc *sc, struct } else { /* Busy; queue */ DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: swq'ing\n", __func__); - ATH_TXQ_INSERT_TAIL(atid, bf, bf_list); + ATH_TID_INSERT_TAIL(atid, bf, bf_list); ath_tx_tid_sched(sc, atid); } } @@ -2856,8 +2856,8 @@ ath_tx_tid_init(struct ath_softc *sc, st /* XXX now with this bzer(), is the field 0'ing needed? */ bzero(atid, sizeof(*atid)); - TAILQ_INIT(&atid->axq_q); - TAILQ_INIT(&atid->filtq.axq_q); + TAILQ_INIT(&atid->tid_q); + TAILQ_INIT(&atid->filtq.tid_q); atid->tid = i; atid->an = an; for (j = 0; j < ATH_TID_MAX_BUFS; j++) @@ -2948,7 +2948,7 @@ ath_tx_tid_filt_addbuf(struct ath_softc ath_tx_set_retry(sc, bf); sc->sc_stats.ast_tx_swfiltered++; - ATH_TXQ_INSERT_TAIL(&tid->filtq, bf, bf_list); + ATH_TID_INSERT_TAIL(&tid->filtq, bf, bf_list); } /* @@ -2997,9 +2997,9 @@ ath_tx_tid_filt_comp_complete(struct ath tid->clrdmask = 1; /* XXX this is really quite inefficient */ - while ((bf = TAILQ_LAST(&tid->filtq.axq_q, ath_bufhead_s)) != NULL) { - ATH_TXQ_REMOVE(&tid->filtq, bf, bf_list); - ATH_TXQ_INSERT_HEAD(tid, bf, bf_list); + while ((bf = ATH_TID_LAST(&tid->filtq, ath_bufhead_s)) != NULL) { + ATH_TID_REMOVE(&tid->filtq, bf, bf_list); + ATH_TID_INSERT_HEAD(tid, bf, bf_list); } ath_tx_tid_resume(sc, tid); @@ -3392,7 +3392,7 @@ ath_tx_tid_drain(struct ath_softc *sc, s /* Walk the queue, free frames */ t = 0; for (;;) { - bf = TAILQ_FIRST(&tid->axq_q); + bf = ATH_TID_FIRST(tid); if (bf == NULL) { break; } @@ -3402,14 +3402,14 @@ ath_tx_tid_drain(struct ath_softc *sc, s t = 1; } - ATH_TXQ_REMOVE(tid, bf, bf_list); + ATH_TID_REMOVE(tid, bf, bf_list); ath_tx_tid_drain_pkt(sc, an, tid, bf_cq, bf); } /* And now, drain the filtered frame queue */ t = 0; for (;;) { - bf = TAILQ_FIRST(&tid->filtq.axq_q); + bf = ATH_TID_FIRST(&tid->filtq); if (bf == NULL) break; @@ -3418,7 +3418,7 @@ ath_tx_tid_drain(struct ath_softc *sc, s t = 1; } - ATH_TXQ_REMOVE(&tid->filtq, bf, bf_list); + ATH_TID_REMOVE(&tid->filtq, bf, bf_list); ath_tx_tid_drain_pkt(sc, an, tid, bf_cq, bf); } @@ -3668,9 +3668,9 @@ ath_tx_tid_cleanup(struct ath_softc *sc, * we run off and discard/process things. */ /* XXX this is really quite inefficient */ - while ((bf = TAILQ_LAST(&atid->filtq.axq_q, ath_bufhead_s)) != NULL) { - ATH_TXQ_REMOVE(&atid->filtq, bf, bf_list); - ATH_TXQ_INSERT_HEAD(atid, bf, bf_list); + while ((bf = ATH_TID_LAST(&atid->filtq, ath_bufhead_s)) != NULL) { + ATH_TID_REMOVE(&atid->filtq, bf, bf_list); + ATH_TID_INSERT_HEAD(atid, bf, bf_list); } /* @@ -3679,11 +3679,11 @@ ath_tx_tid_cleanup(struct ath_softc *sc, * + Discard retry frames in the queue * + Fix the completion function to be non-aggregate */ - bf = TAILQ_FIRST(&atid->axq_q); + bf = ATH_TID_FIRST(atid); while (bf) { if (bf->bf_state.bfs_isretried) { bf_next = TAILQ_NEXT(bf, bf_list); - TAILQ_REMOVE(&atid->axq_q, bf, bf_list); + ATH_TID_REMOVE(atid, bf, bf_list); atid->axq_depth--; if (bf->bf_state.bfs_dobaw) { ath_tx_update_baw(sc, an, atid, bf); @@ -3888,7 +3888,7 @@ ath_tx_aggr_retry_unaggr(struct ath_soft * Insert this at the head of the queue, so it's * retried before any current/subsequent frames. */ - ATH_TXQ_INSERT_HEAD(atid, bf, bf_list); + ATH_TID_INSERT_HEAD(atid, bf, bf_list); ath_tx_tid_sched(sc, atid); /* Send the BAR if there are no other frames waiting */ if (ath_tx_tid_bar_tx_ready(sc, atid)) @@ -4017,7 +4017,7 @@ ath_tx_comp_aggr_error(struct ath_softc /* Prepend all frames to the beginning of the queue */ while ((bf = TAILQ_LAST(&bf_q, ath_bufhead_s)) != NULL) { TAILQ_REMOVE(&bf_q, bf, bf_list); - ATH_TXQ_INSERT_HEAD(tid, bf, bf_list); + ATH_TID_INSERT_HEAD(tid, bf, bf_list); } /* @@ -4387,7 +4387,7 @@ ath_tx_aggr_comp_aggr(struct ath_softc * /* Prepend all frames to the beginning of the queue */ while ((bf = TAILQ_LAST(&bf_q, ath_bufhead_s)) != NULL) { TAILQ_REMOVE(&bf_q, bf, bf_list); - ATH_TXQ_INSERT_HEAD(atid, bf, bf_list); + ATH_TID_INSERT_HEAD(atid, bf, bf_list); } /* @@ -4665,7 +4665,7 @@ ath_tx_tid_hw_queue_aggr(struct ath_soft if (tid->paused) break; - bf = TAILQ_FIRST(&tid->axq_q); + bf = ATH_TID_FIRST(tid); if (bf == NULL) { break; } @@ -4678,7 +4678,7 @@ ath_tx_tid_hw_queue_aggr(struct ath_soft DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR, "%s: non-baw packet\n", __func__); - ATH_TXQ_REMOVE(tid, bf, bf_list); + ATH_TID_REMOVE(tid, bf, bf_list); if (bf->bf_state.bfs_nframes > 1) device_printf(sc->sc_dev, @@ -4868,12 +4868,12 @@ ath_tx_tid_hw_queue_norm(struct ath_soft if (tid->paused) break; - bf = TAILQ_FIRST(&tid->axq_q); + bf = ATH_TID_FIRST(tid); if (bf == NULL) { break; } - ATH_TXQ_REMOVE(tid, bf, bf_list); + ATH_TID_REMOVE(tid, bf, bf_list); KASSERT(txq == bf->bf_state.bfs_txq, ("txqs not equal!\n")); Modified: head/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_ht.c Sun Oct 7 21:33:04 2012 (r241335) +++ head/sys/dev/ath/if_ath_tx_ht.c Sun Oct 7 23:45:19 2012 (r241336) @@ -661,7 +661,7 @@ ath_tx_form_aggr(struct ath_softc *sc, s h_baw = tap->txa_wnd / 2; for (;;) { - bf = TAILQ_FIRST(&tid->axq_q); + bf = ATH_TID_FIRST(tid); if (bf_first == NULL) bf_first = bf; if (bf == NULL) { @@ -760,7 +760,7 @@ ath_tx_form_aggr(struct ath_softc *sc, s /* * this packet is part of an aggregate. */ - ATH_TXQ_REMOVE(tid, bf, bf_list); + ATH_TID_REMOVE(tid, bf, bf_list); /* The TID lock is required for the BAW update */ ath_tx_addto_baw(sc, an, tid, bf); Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Sun Oct 7 21:33:04 2012 (r241335) +++ head/sys/dev/ath/if_athvar.h Sun Oct 7 23:45:19 2012 (r241336) @@ -99,7 +99,7 @@ struct ath_buf; * Note that TID 16 (WME_NUM_TID+1) is for handling non-QoS frames. */ struct ath_tid { - TAILQ_HEAD(,ath_buf) axq_q; /* pending buffers */ + TAILQ_HEAD(,ath_buf) tid_q; /* pending buffers */ u_int axq_depth; /* SW queue depth */ char axq_name[48]; /* lock name */ struct ath_node *an; /* pointer to parent */ @@ -108,7 +108,7 @@ struct ath_tid { int hwq_depth; /* how many buffers are on HW */ struct { - TAILQ_HEAD(,ath_buf) axq_q; /* filtered queue */ + TAILQ_HEAD(,ath_buf) tid_q; /* filtered queue */ u_int axq_depth; /* SW queue depth */ char axq_name[48]; /* lock name */ } filtq; @@ -355,6 +355,9 @@ struct ath_txq { #define ATH_TID_UNLOCK_ASSERT(_sc, _tid) \ ATH_TXQ_UNLOCK_ASSERT((_sc)->sc_ac2q[(_tid)->ac]) +/* + * These are for the hardware queue. + */ #define ATH_TXQ_INSERT_HEAD(_tq, _elm, _field) do { \ TAILQ_INSERT_HEAD(&(_tq)->axq_q, (_elm), _field); \ (_tq)->axq_depth++; \ @@ -370,6 +373,24 @@ struct ath_txq { #define ATH_TXQ_FIRST(_tq) TAILQ_FIRST(&(_tq)->axq_q) #define ATH_TXQ_LAST(_tq, _field) TAILQ_LAST(&(_tq)->axq_q, _field) +/* + * These are for the TID software queue and filtered frames queues. + */ +#define ATH_TID_INSERT_HEAD(_tq, _elm, _field) do { \ + TAILQ_INSERT_HEAD(&(_tq)->tid_q, (_elm), _field); \ + (_tq)->axq_depth++; \ +} while (0) +#define ATH_TID_INSERT_TAIL(_tq, _elm, _field) do { \ + TAILQ_INSERT_TAIL(&(_tq)->tid_q, (_elm), _field); \ + (_tq)->axq_depth++; \ +} while (0) +#define ATH_TID_REMOVE(_tq, _elm, _field) do { \ + TAILQ_REMOVE(&(_tq)->tid_q, _elm, _field); \ + (_tq)->axq_depth--; \ +} while (0) +#define ATH_TID_FIRST(_tq) TAILQ_FIRST(&(_tq)->tid_q) +#define ATH_TID_LAST(_tq, _field) TAILQ_LAST(&(_tq)->tid_q, _field) + struct ath_vap { struct ieee80211vap av_vap; /* base class */ int av_bslot; /* beacon slot index */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 01:49:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C2524106564A; Mon, 8 Oct 2012 01:49:52 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx1.freebsd.org (Postfix) with ESMTP id 366BF8FC0A; Mon, 8 Oct 2012 01:49:52 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id bi1so3880293pad.13 for ; Sun, 07 Oct 2012 18:49:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=hvB0t057ve8Zpj5lebf9GxEvCAItRxw0vWhg8kGOylI=; b=K112Fpl9ODsdshXa1uIa4HvzxBMKexz3k1zuFODttrvS5JerWZbI6rckwDbuDa7ZCa /mlhdgXmNedsgleiROGxvHeLlecnsOtvwhMy6nqgm0EHSZqkCkJbQUOu0tCBELqaDi6e 8gJCq5hIKDkREy8jPJlOmipi8Hf09j84HJRXtYSpz+hvIUWiiPE9JMOGhY+5FfQMUIap Yb9HvvSg/yBPSer+Rw/0A/iO89N8y0sTWBOQ5q1Ma8B+G48Zzf/wo0hOK/1fRZrrOKO6 Ue89Ass00azTP1Xi/a0KFMLfFtzivDsPjyDoi5TeXMc0CR41ID8A9MurpQPVF9o2UyQK lBgA== MIME-Version: 1.0 Received: by 10.68.202.6 with SMTP id ke6mr48811633pbc.82.1349660991740; Sun, 07 Oct 2012 18:49:51 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.68.223.136 with HTTP; Sun, 7 Oct 2012 18:49:51 -0700 (PDT) In-Reply-To: <201210061002.q96A2BFf039772@svn.freebsd.org> References: <201210061002.q96A2BFf039772@svn.freebsd.org> Date: Sun, 7 Oct 2012 18:49:51 -0700 X-Google-Sender-Auth: cKyJ-P70C3x8vV0ApnymQTSXxE8 Message-ID: From: Adrian Chadd To: Gleb Smirnoff , FreeBSD Net Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241245 - in head: . share/man/man9 sys/contrib/ipfilter/netinet sys/net sys/netinet sys/netpfil/ipfw sys/netpfil/pf 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: Mon, 08 Oct 2012 01:49:52 -0000 Hi, People have been reporting this: Oct 7 18:35:19 alix kernel: in_cksum_skip: out of data by 53295 Oct 7 18:35:19 alix kernel: in_cksum_skip: out of data by 55335 Would you please investigate this, or back the patch out? Also, if this is actually due to this patch - why is it that you didn't pick it up in testing? Thanks, Adrian On 6 October 2012 03:02, Gleb Smirnoff wrote: > Author: glebius > Date: Sat Oct 6 10:02:11 2012 > New Revision: 241245 > URL: http://svn.freebsd.org/changeset/base/241245 > > Log: > A step in resolving mess with byte ordering for AF_INET. After this change: > > - All packets in NETISR_IP queue are in net byte order. > - ip_input() is entered in net byte order and converts packet > to host byte order right _after_ processing pfil(9) hooks. > - ip_output() is entered in host byte order and converts packet > to net byte order right _before_ processing pfil(9) hooks. > - ip_fragment() accepts and emits packet in net byte order. > - ip_forward(), ip_mloopback() use host byte order (untouched actually). > - ip_fastforward() no longer modifies packet at all (except ip_ttl). > - Swapping of byte order there and back removed from the following modules: > pf(4), ipfw(4), enc(4), if_bridge(4). > - Swapping of byte order added to ipfilter(4), based on __FreeBSD_version > - __FreeBSD_version bumped. > - pfil(9) manual page updated. > > Reviewed by: ray, luigi, eri, melifaro > Tested by: glebius (LE), ray (BE) > > Modified: > head/UPDATING > head/share/man/man9/pfil.9 > head/sys/contrib/ipfilter/netinet/fil.c > head/sys/net/if_bridge.c > head/sys/net/if_enc.c > head/sys/netinet/ip_fastfwd.c > head/sys/netinet/ip_input.c > head/sys/netinet/ip_output.c > head/sys/netpfil/ipfw/ip_fw_pfil.c > head/sys/netpfil/pf/pf_ioctl.c > head/sys/sys/param.h > > Modified: head/UPDATING > ============================================================================== > --- head/UPDATING Sat Oct 6 07:06:57 2012 (r241244) > +++ head/UPDATING Sat Oct 6 10:02:11 2012 (r241245) > @@ -24,6 +24,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 > disable the most expensive debugging functionality run > "ln -s 'abort:false,junk:false' /etc/malloc.conf".) > > +20121006: > + The pfil(9) API/ABI for AF_INET family has been changed. Packet > + filtering modules: pf(4), ipfw(4), ipfilter(4) need to be recompiled > + with new kernel. > + > 20121001: > The net80211(4) ABI has been changed to allow for improved driver > PS-POLL and power-save support. All wireless drivers need to be > > Modified: head/share/man/man9/pfil.9 > ============================================================================== > --- head/share/man/man9/pfil.9 Sat Oct 6 07:06:57 2012 (r241244) > +++ head/share/man/man9/pfil.9 Sat Oct 6 10:02:11 2012 (r241245) > @@ -28,7 +28,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd September 16, 2012 > +.Dd October 6, 2012 > .Dt PFIL 9 > .Os > .Sh NAME > @@ -127,10 +127,9 @@ Currently, filtering points are implemen > .Pp > .Bl -tag -width "AF_INET6" -offset XXX -compact > .It AF_INET > +IPv4 packets. > .It AF_INET6 > -IPv4 and IPv6 packets. Note that packet header is already > -.Cm converted to host format. > -Host format has to be preserved in case of header modifications. > +IPv6 packets. > .It AF_LINK > Link-layer packets. > .El > > Modified: head/sys/contrib/ipfilter/netinet/fil.c > ============================================================================== > --- head/sys/contrib/ipfilter/netinet/fil.c Sat Oct 6 07:06:57 2012 (r241244) > +++ head/sys/contrib/ipfilter/netinet/fil.c Sat Oct 6 10:02:11 2012 (r241245) > @@ -2513,7 +2513,7 @@ int out; > } else > #endif > { > -#if (defined(OpenBSD) && (OpenBSD >= 200311)) && defined(_KERNEL) > +#if ((defined(OpenBSD) && (OpenBSD >= 200311)) || (defined(FreeBSD) && (__FreeBSD_version >= 1000019))) && defined(_KERNEL) > ip->ip_len = ntohs(ip->ip_len); > ip->ip_off = ntohs(ip->ip_off); > #endif > @@ -2777,7 +2777,7 @@ finished: > RWLOCK_EXIT(&ipf_global); > > #ifdef _KERNEL > -# if (defined(OpenBSD) && (OpenBSD >= 200311)) > +# if (defined(OpenBSD) && (OpenBSD >= 200311)) || (defined(FreeBSD) && (__FreeBSD_version >= 1000019)) > if (FR_ISPASS(pass) && (v == 4)) { > ip = fin->fin_ip; > ip->ip_len = ntohs(ip->ip_len); > > Modified: head/sys/net/if_bridge.c > ============================================================================== > --- head/sys/net/if_bridge.c Sat Oct 6 07:06:57 2012 (r241244) > +++ head/sys/net/if_bridge.c Sat Oct 6 10:02:11 2012 (r241245) > @@ -3093,15 +3093,6 @@ bridge_pfil(struct mbuf **mp, struct ifn > switch (ether_type) { > case ETHERTYPE_IP: > /* > - * before calling the firewall, swap fields the same as > - * IP does. here we assume the header is contiguous > - */ > - ip = mtod(*mp, struct ip *); > - > - ip->ip_len = ntohs(ip->ip_len); > - ip->ip_off = ntohs(ip->ip_off); > - > - /* > * Run pfil on the member interface and the bridge, both can > * be skipped by clearing pfil_member or pfil_bridge. > * > @@ -3139,7 +3130,7 @@ bridge_pfil(struct mbuf **mp, struct ifn > } > } > > - /* Recalculate the ip checksum and restore byte ordering */ > + /* Recalculate the ip checksum. */ > ip = mtod(*mp, struct ip *); > hlen = ip->ip_hl << 2; > if (hlen < sizeof(struct ip)) > @@ -3151,8 +3142,6 @@ bridge_pfil(struct mbuf **mp, struct ifn > if (ip == NULL) > goto bad; > } > - ip->ip_len = htons(ip->ip_len); > - ip->ip_off = htons(ip->ip_off); > ip->ip_sum = 0; > if (hlen == sizeof(struct ip)) > ip->ip_sum = in_cksum_hdr(ip); > > Modified: head/sys/net/if_enc.c > ============================================================================== > --- head/sys/net/if_enc.c Sat Oct 6 07:06:57 2012 (r241244) > +++ head/sys/net/if_enc.c Sat Oct 6 10:02:11 2012 (r241245) > @@ -270,23 +270,8 @@ ipsec_filter(struct mbuf **mp, int dir, > switch (ip->ip_v) { > #ifdef INET > case 4: > - /* > - * before calling the firewall, swap fields the same as > - * IP does. here we assume the header is contiguous > - */ > - ip->ip_len = ntohs(ip->ip_len); > - ip->ip_off = ntohs(ip->ip_off); > - > error = pfil_run_hooks(&V_inet_pfil_hook, mp, > encif, dir, NULL); > - > - if (*mp == NULL || error != 0) > - break; > - > - /* restore byte ordering */ > - ip = mtod(*mp, struct ip *); > - ip->ip_len = htons(ip->ip_len); > - ip->ip_off = htons(ip->ip_off); > break; > #endif > #ifdef INET6 > > Modified: head/sys/netinet/ip_fastfwd.c > ============================================================================== > --- head/sys/netinet/ip_fastfwd.c Sat Oct 6 07:06:57 2012 (r241244) > +++ head/sys/netinet/ip_fastfwd.c Sat Oct 6 10:02:11 2012 (r241245) > @@ -164,7 +164,7 @@ ip_fastforward(struct mbuf *m) > struct sockaddr_in *dst = NULL; > struct ifnet *ifp; > struct in_addr odest, dest; > - u_short sum, ip_len; > + uint16_t sum, ip_len, ip_off; > int error = 0; > int hlen, mtu; > #ifdef IPFIREWALL_FORWARD > @@ -340,12 +340,6 @@ ip_fastforward(struct mbuf *m) > * Step 3: incoming packet firewall processing > */ > > - /* > - * Convert to host representation > - */ > - ip->ip_len = ntohs(ip->ip_len); > - ip->ip_off = ntohs(ip->ip_off); > - > odest.s_addr = dest.s_addr = ip->ip_dst.s_addr; > > /* > @@ -472,8 +466,6 @@ passin: > forwardlocal: > /* > * Return packet for processing by ip_input(). > - * Keep host byte order as expected at ip_input's > - * "ours"-label. > */ > m->m_flags |= M_FASTFWD_OURS; > if (ro.ro_rt) > @@ -500,6 +492,8 @@ passout: > /* > * Step 6: send off the packet > */ > + ip_len = ntohs(ip->ip_len); > + ip_off = ntohs(ip->ip_off); > > /* > * Check if route is dampned (when ARP is unable to resolve) > @@ -515,7 +509,7 @@ passout: > /* > * Check if there is enough space in the interface queue > */ > - if ((ifp->if_snd.ifq_len + ip->ip_len / ifp->if_mtu + 1) >= > + if ((ifp->if_snd.ifq_len + ip_len / ifp->if_mtu + 1) >= > ifp->if_snd.ifq_maxlen) { > IPSTAT_INC(ips_odropped); > /* would send source quench here but that is depreciated */ > @@ -539,13 +533,8 @@ passout: > else > mtu = ifp->if_mtu; > > - if (ip->ip_len <= mtu || > - (ifp->if_hwassist & CSUM_FRAGMENT && (ip->ip_off & IP_DF) == 0)) { > - /* > - * Restore packet header fields to original values > - */ > - ip->ip_len = htons(ip->ip_len); > - ip->ip_off = htons(ip->ip_off); > + if (ip_len <= mtu || > + (ifp->if_hwassist & CSUM_FRAGMENT && (ip_off & IP_DF) == 0)) { > /* > * Send off the packet via outgoing interface > */ > @@ -555,7 +544,7 @@ passout: > /* > * Handle EMSGSIZE with icmp reply needfrag for TCP MTU discovery > */ > - if (ip->ip_off & IP_DF) { > + if (ip_off & IP_DF) { > IPSTAT_INC(ips_cantfrag); > icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_NEEDFRAG, > 0, mtu); > @@ -565,10 +554,6 @@ passout: > * We have to fragment the packet > */ > m->m_pkthdr.csum_flags |= CSUM_IP; > - /* > - * ip_fragment expects ip_len and ip_off in host byte > - * order but returns all packets in network byte order > - */ > if (ip_fragment(ip, &m, mtu, ifp->if_hwassist, > (~ifp->if_hwassist & CSUM_DELAY_IP))) { > goto drop; > > Modified: head/sys/netinet/ip_input.c > ============================================================================== > --- head/sys/netinet/ip_input.c Sat Oct 6 07:06:57 2012 (r241244) > +++ head/sys/netinet/ip_input.c Sat Oct 6 10:02:11 2012 (r241245) > @@ -380,20 +380,18 @@ ip_input(struct mbuf *m) > struct ifaddr *ifa; > struct ifnet *ifp; > int checkif, hlen = 0; > - u_short sum; > + uint16_t sum, ip_len; > int dchg = 0; /* dest changed after fw */ > struct in_addr odst; /* original dst address */ > > M_ASSERTPKTHDR(m); > > if (m->m_flags & M_FASTFWD_OURS) { > - /* > - * Firewall or NAT changed destination to local. > - * We expect ip_len and ip_off to be in host byte order. > - */ > m->m_flags &= ~M_FASTFWD_OURS; > /* Set up some basics that will be used later. */ > ip = mtod(m, struct ip *); > + ip->ip_len = ntohs(ip->ip_len); > + ip->ip_off = ntohs(ip->ip_off); > hlen = ip->ip_hl << 2; > goto ours; > } > @@ -458,15 +456,11 @@ ip_input(struct mbuf *m) > return; > #endif > > - /* > - * Convert fields to host representation. > - */ > - ip->ip_len = ntohs(ip->ip_len); > - if (ip->ip_len < hlen) { > + ip_len = ntohs(ip->ip_len); > + if (ip_len < hlen) { > IPSTAT_INC(ips_badlen); > goto bad; > } > - ip->ip_off = ntohs(ip->ip_off); > > /* > * Check that the amount of data in the buffers > @@ -474,17 +468,17 @@ ip_input(struct mbuf *m) > * Trim mbufs if longer than we expect. > * Drop packet if shorter than we expect. > */ > - if (m->m_pkthdr.len < ip->ip_len) { > + if (m->m_pkthdr.len < ip_len) { > tooshort: > IPSTAT_INC(ips_tooshort); > goto bad; > } > - if (m->m_pkthdr.len > ip->ip_len) { > + if (m->m_pkthdr.len > ip_len) { > if (m->m_len == m->m_pkthdr.len) { > - m->m_len = ip->ip_len; > - m->m_pkthdr.len = ip->ip_len; > + m->m_len = ip_len; > + m->m_pkthdr.len = ip_len; > } else > - m_adj(m, ip->ip_len - m->m_pkthdr.len); > + m_adj(m, ip_len - m->m_pkthdr.len); > } > #ifdef IPSEC > /* > @@ -519,6 +513,8 @@ tooshort: > #ifdef IPFIREWALL_FORWARD > if (m->m_flags & M_FASTFWD_OURS) { > m->m_flags &= ~M_FASTFWD_OURS; > + ip->ip_len = ntohs(ip->ip_len); > + ip->ip_off = ntohs(ip->ip_off); > goto ours; > } > if ((dchg = (m_tag_find(m, PACKET_TAG_IPFORWARD, NULL) != NULL)) != 0) { > @@ -527,6 +523,8 @@ tooshort: > * packets originally destined to us to some other directly > * connected host. > */ > + ip->ip_len = ntohs(ip->ip_len); > + ip->ip_off = ntohs(ip->ip_off); > ip_forward(m, dchg); > return; > } > @@ -534,6 +532,13 @@ tooshort: > > passin: > /* > + * From now and up to output pfil(9) processing in ip_output() > + * the header is in host byte order. > + */ > + ip->ip_len = ntohs(ip->ip_len); > + ip->ip_off = ntohs(ip->ip_off); > + > + /* > * Process options and, if not destined for us, > * ship it on. ip_dooptions returns 1 when an > * error was detected (causing an icmp message > @@ -1360,6 +1365,8 @@ u_char inetctlerrmap[PRC_NCMDS] = { > * > * The srcrt parameter indicates whether the packet is being forwarded > * via a source route. > + * > + * IP header in host byte order. > */ > void > ip_forward(struct mbuf *m, int srcrt) > > Modified: head/sys/netinet/ip_output.c > ============================================================================== > --- head/sys/netinet/ip_output.c Sat Oct 6 07:06:57 2012 (r241244) > +++ head/sys/netinet/ip_output.c Sat Oct 6 10:02:11 2012 (r241245) > @@ -125,7 +125,8 @@ ip_output(struct mbuf *m, struct mbuf *o > int error = 0; > struct sockaddr_in *dst; > struct in_ifaddr *ia; > - int isbroadcast, sw_csum; > + int isbroadcast; > + uint16_t ip_len, ip_off, sw_csum; > struct route iproute; > struct rtentry *rte; /* cache for ro->ro_rt */ > struct in_addr odst; > @@ -501,6 +502,12 @@ sendit: > hlen = ip->ip_hl << 2; > #endif /* IPSEC */ > > + /* > + * To network byte order. pfil(9) hooks and ip_fragment() expect this. > + */ > + ip->ip_len = htons(ip->ip_len); > + ip->ip_off = htons(ip->ip_off); > + > /* Jump over all PFIL processing if hooks are not active. */ > if (!PFIL_HOOKED(&V_inet_pfil_hook)) > goto passout; > @@ -537,6 +544,8 @@ sendit: > } else { > if (ia != NULL) > ifa_free(&ia->ia_ifa); > + ip->ip_len = ntohs(ip->ip_len); > + ip->ip_off = ntohs(ip->ip_off); > goto again; /* Redo the routing table lookup. */ > } > } > @@ -570,11 +579,16 @@ sendit: > m_tag_delete(m, fwd_tag); > if (ia != NULL) > ifa_free(&ia->ia_ifa); > + ip->ip_len = ntohs(ip->ip_len); > + ip->ip_off = ntohs(ip->ip_off); > goto again; > } > #endif /* IPFIREWALL_FORWARD */ > > passout: > + ip_len = ntohs(ip->ip_len); > + ip_off = ntohs(ip->ip_off); > + > /* 127/8 must not appear on wire - RFC1122. */ > if ((ntohl(ip->ip_dst.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET || > (ntohl(ip->ip_src.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) { > @@ -603,11 +617,9 @@ passout: > * If small enough for interface, or the interface will take > * care of the fragmentation for us, we can just send directly. > */ > - if (ip->ip_len <= mtu || > + if (ip_len <= mtu || > (m->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0 || > - ((ip->ip_off & IP_DF) == 0 && (ifp->if_hwassist & CSUM_FRAGMENT))) { > - ip->ip_len = htons(ip->ip_len); > - ip->ip_off = htons(ip->ip_off); > + ((ip_off & IP_DF) == 0 && (ifp->if_hwassist & CSUM_FRAGMENT))) { > ip->ip_sum = 0; > if (sw_csum & CSUM_DELAY_IP) > ip->ip_sum = in_cksum(m, hlen); > @@ -641,7 +653,7 @@ passout: > } > > /* Balk when DF bit is set or the interface didn't support TSO. */ > - if ((ip->ip_off & IP_DF) || (m->m_pkthdr.csum_flags & CSUM_TSO)) { > + if ((ip_off & IP_DF) || (m->m_pkthdr.csum_flags & CSUM_TSO)) { > error = EMSGSIZE; > IPSTAT_INC(ips_cantfrag); > goto bad; > @@ -710,8 +722,12 @@ ip_fragment(struct ip *ip, struct mbuf * > int firstlen; > struct mbuf **mnext; > int nfrags; > + uint16_t ip_len, ip_off; > + > + ip_len = ntohs(ip->ip_len); > + ip_off = ntohs(ip->ip_off); > > - if (ip->ip_off & IP_DF) { /* Fragmentation not allowed */ > + if (ip_off & IP_DF) { /* Fragmentation not allowed */ > IPSTAT_INC(ips_cantfrag); > return EMSGSIZE; > } > @@ -785,7 +801,7 @@ smart_frag_failure: > * The fragments are linked off the m_nextpkt of the original > * packet, which after processing serves as the first fragment. > */ > - for (nfrags = 1; off < ip->ip_len; off += len, nfrags++) { > + for (nfrags = 1; off < ip_len; off += len, nfrags++) { > struct ip *mhip; /* ip header on the fragment */ > struct mbuf *m; > int mhlen = sizeof (struct ip); > @@ -811,10 +827,10 @@ smart_frag_failure: > mhip->ip_hl = mhlen >> 2; > } > m->m_len = mhlen; > - /* XXX do we need to add ip->ip_off below ? */ > - mhip->ip_off = ((off - hlen) >> 3) + ip->ip_off; > - if (off + len >= ip->ip_len) { /* last fragment */ > - len = ip->ip_len - off; > + /* XXX do we need to add ip_off below ? */ > + mhip->ip_off = ((off - hlen) >> 3) + ip_off; > + if (off + len >= ip_len) { /* last fragment */ > + len = ip_len - off; > m->m_flags |= M_LASTFRAG; > } else > mhip->ip_off |= IP_MF; > @@ -849,11 +865,10 @@ smart_frag_failure: > * Update first fragment by trimming what's been copied out > * and updating header. > */ > - m_adj(m0, hlen + firstlen - ip->ip_len); > + m_adj(m0, hlen + firstlen - ip_len); > m0->m_pkthdr.len = hlen + firstlen; > ip->ip_len = htons((u_short)m0->m_pkthdr.len); > - ip->ip_off |= IP_MF; > - ip->ip_off = htons(ip->ip_off); > + ip->ip_off = htons(ip_off | IP_MF); > ip->ip_sum = 0; > if (sw_csum & CSUM_DELAY_IP) > ip->ip_sum = in_cksum(m0, hlen); > @@ -1279,6 +1294,8 @@ ip_ctloutput(struct socket *so, struct s > * calls the output routine of the loopback "driver", but with an interface > * pointer that might NOT be a loopback interface -- evil, but easier than > * replicating that code here. > + * > + * IP header in host byte order. > */ > static void > ip_mloopback(struct ifnet *ifp, struct mbuf *m, struct sockaddr_in *dst, > > Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c > ============================================================================== > --- head/sys/netpfil/ipfw/ip_fw_pfil.c Sat Oct 6 07:06:57 2012 (r241244) > +++ head/sys/netpfil/ipfw/ip_fw_pfil.c Sat Oct 6 10:02:11 2012 (r241245) > @@ -125,10 +125,6 @@ ipfw_check_packet(void *arg, struct mbuf > int ipfw; > int ret; > > - /* all the processing now uses ip_len in net format */ > - if (mtod(*m0, struct ip *)->ip_v == 4) > - SET_NET_IPLEN(mtod(*m0, struct ip *)); > - > /* convert dir to IPFW values */ > dir = (dir == PFIL_IN) ? DIR_IN : DIR_OUT; > bzero(&args, sizeof(args)); > @@ -288,8 +284,7 @@ again: > FREE_PKT(*m0); > *m0 = NULL; > } > - if (*m0 && mtod(*m0, struct ip *)->ip_v == 4) > - SET_HOST_IPLEN(mtod(*m0, struct ip *)); > + > return ret; > } > > > Modified: head/sys/netpfil/pf/pf_ioctl.c > ============================================================================== > --- head/sys/netpfil/pf/pf_ioctl.c Sat Oct 6 07:06:57 2012 (r241244) > +++ head/sys/netpfil/pf/pf_ioctl.c Sat Oct 6 10:02:11 2012 (r241245) > @@ -3473,23 +3473,8 @@ static int > pf_check_in(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, > struct inpcb *inp) > { > - /* > - * XXX Wed Jul 9 22:03:16 2003 UTC > - * OpenBSD has changed its byte ordering convention on ip_len/ip_off > - * in network stack. OpenBSD's network stack have converted > - * ip_len/ip_off to host byte order frist as FreeBSD. > - * Now this is not true anymore , so we should convert back to network > - * byte order. > - */ > - struct ip *h = NULL; > int chk; > > - if ((*m)->m_pkthdr.len >= (int)sizeof(struct ip)) { > - /* if m_pkthdr.len is less than ip header, pf will handle. */ > - h = mtod(*m, struct ip *); > - HTONS(h->ip_len); > - HTONS(h->ip_off); > - } > CURVNET_SET(ifp->if_vnet); > chk = pf_test(PF_IN, ifp, m, inp); > CURVNET_RESTORE(); > @@ -3497,28 +3482,14 @@ pf_check_in(void *arg, struct mbuf **m, > m_freem(*m); > *m = NULL; > } > - if (*m != NULL) { > - /* pf_test can change ip header location */ > - h = mtod(*m, struct ip *); > - NTOHS(h->ip_len); > - NTOHS(h->ip_off); > - } > - return chk; > + > + return (chk); > } > > static int > pf_check_out(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, > struct inpcb *inp) > { > - /* > - * XXX Wed Jul 9 22:03:16 2003 UTC > - * OpenBSD has changed its byte ordering convention on ip_len/ip_off > - * in network stack. OpenBSD's network stack have converted > - * ip_len/ip_off to host byte order frist as FreeBSD. > - * Now this is not true anymore , so we should convert back to network > - * byte order. > - */ > - struct ip *h = NULL; > int chk; > > /* We need a proper CSUM befor we start (s. OpenBSD ip_output) */ > @@ -3526,12 +3497,7 @@ pf_check_out(void *arg, struct mbuf **m, > in_delayed_cksum(*m); > (*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; > } > - if ((*m)->m_pkthdr.len >= (int)sizeof(*h)) { > - /* if m_pkthdr.len is less than ip header, pf will handle. */ > - h = mtod(*m, struct ip *); > - HTONS(h->ip_len); > - HTONS(h->ip_off); > - } > + > CURVNET_SET(ifp->if_vnet); > chk = pf_test(PF_OUT, ifp, m, inp); > CURVNET_RESTORE(); > @@ -3539,13 +3505,8 @@ pf_check_out(void *arg, struct mbuf **m, > m_freem(*m); > *m = NULL; > } > - if (*m != NULL) { > - /* pf_test can change ip header location */ > - h = mtod(*m, struct ip *); > - NTOHS(h->ip_len); > - NTOHS(h->ip_off); > - } > - return chk; > + > + return (chk); > } > #endif > > @@ -3554,10 +3515,6 @@ static int > pf_check6_in(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, > struct inpcb *inp) > { > - > - /* > - * IPv6 is not affected by ip_len/ip_off byte order changes. > - */ > int chk; > > /* > @@ -3579,9 +3536,6 @@ static int > pf_check6_out(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, > struct inpcb *inp) > { > - /* > - * IPv6 does not affected ip_len/ip_off byte order changes. > - */ > int chk; > > /* We need a proper CSUM before we start (s. OpenBSD ip_output) */ > > Modified: head/sys/sys/param.h > ============================================================================== > --- head/sys/sys/param.h Sat Oct 6 07:06:57 2012 (r241244) > +++ head/sys/sys/param.h Sat Oct 6 10:02:11 2012 (r241245) > @@ -58,7 +58,7 @@ > * in the range 5 to 9. > */ > #undef __FreeBSD_version > -#define __FreeBSD_version 1000018 /* Master, propagated to newvers */ > +#define __FreeBSD_version 1000019 /* Master, propagated to newvers */ > > /* > * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 04:11:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E5771065670; Mon, 8 Oct 2012 04:11:46 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id 3B4568FC0C; Mon, 8 Oct 2012 04:11:46 +0000 (UTC) Received: from dhcp-192-168-2-58.wifi.xcllnt.net (wifi.xcllnt.net [70.36.220.6] (may be forged)) (authenticated bits=0) by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id q984BcNN072532 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 7 Oct 2012 21:11:39 -0700 (PDT) (envelope-from marcel@xcllnt.net) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) From: Marcel Moolenaar In-Reply-To: <20121007161440.C7605@besplex.bde.org> Date: Sun, 7 Oct 2012 21:11:38 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <81CB9A3A-4BFF-41B2-A1F9-3721A40F6260@xcllnt.net> References: <201210062001.q96K16Or030755@svn.freebsd.org> <20121007161440.C7605@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1499) Cc: "svn-src-head@FreeBSD.org" , "svn-src-all@FreeBSD.org" , "src-committers@FreeBSD.org" , Simon Gerraty Subject: Re: svn commit: r241298 - in head: . gnu/usr.bin/cc/cc_int gnu/usr.bin/cc/include kerberos5 kerberos5/tools/asn1_compile kerberos5/tools/slc lib/clang/include share/mk tools/build/make_check usr.sbin/c... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Oct 2012 04:11:46 -0000 On Oct 6, 2012, at 10:31 PM, Bruce Evans wrote: > On Sat, 6 Oct 2012, Marcel Moolenaar wrote: >=20 >> Log: >> Add support for bmake. This includes: >> .... >> Modified: head/share/mk/bsd.dep.mk >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/share/mk/bsd.dep.mk Sat Oct 6 19:57:27 2012 = (r241297) >> +++ head/share/mk/bsd.dep.mk Sat Oct 6 20:01:05 2012 = (r241298) >> @@ -102,8 +102,8 @@ ${_YC} y.tab.h: ${_YSRC} >> CLEANFILES+=3D y.tab.c y.tab.h >> .elif !empty(YFLAGS:M-d) >> .for _YH in ${_YC:R}.h >> -.ORDER: ${_YC} ${_YH} >> -${_YC} ${_YH}: ${_YSRC} >> +${_YH}: ${_YC} >> +${_YC}: ${_YSRC} >> ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC} >> SRCS+=3D ${_YH} >> CLEANFILES+=3D ${_YH} >=20 > This is broken. Yacc headers don't depend on generated yacc .c files. > Now there is only a null rule to create the headers. One broken case > is when the header somehow gets deleted. It bcomes out of date, but > running make to update it only runs the null rule, so it remains > nonexistent. The problem with the old rule is that it's broken as well. The change attempts to fix a real parallel build problem. Your comment is valid though. What about the following (possibly white-space corrupted) patch from Simon: Index: share/mk/bsd.dep.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- share/mk/bsd.dep.mk (revision 241871) +++ share/mk/bsd.dep.mk (working copy) @@ -95,16 +95,17 @@ CLEANFILES+=3D ${_LC} SRCS:=3D ${SRCS:S/${_YSRC}/${_YC}/} CLEANFILES+=3D ${_YC} .if !empty(YFLAGS:M-d) && !empty(SRCS:My.tab.h) -.ORDER: ${_YC} y.tab.h -${_YC} y.tab.h: ${_YSRC} +y.tab.h: ${_YSRC} ${YACC} ${YFLAGS} ${.ALLSRC} +${_YC}: y.tab.h cp y.tab.c ${_YC} CLEANFILES+=3D y.tab.c y.tab.h .elif !empty(YFLAGS:M-d) .for _YH in ${_YC:R}.h -${_YH}: ${_YC} -${_YC}: ${_YSRC} +${_YH}: ${_YSRC} ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC} +${_YC}: ${_YH} + @touch ${.TARGET} SRCS+=3D ${_YH} CLEANFILES+=3D ${_YH} .endfor This makes sure the C file is always more recent than the H file and important to keep make happy in all situations. It doesn't fix the the problem of removing the C file entirely. At least the C file is recreated, but not with the right contents. Thoughts? --=20 Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 05:04:22 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 33973106575A; Mon, 8 Oct 2012 05:04:22 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 9E6F58FC14; Mon, 8 Oct 2012 05:04:21 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q9854K6I066739; Mon, 8 Oct 2012 09:04:20 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q9854Kv6066738; Mon, 8 Oct 2012 09:04:20 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 8 Oct 2012 09:04:20 +0400 From: Gleb Smirnoff To: Adrian Chadd Message-ID: <20121008050420.GO34622@FreeBSD.org> References: <201210061002.q96A2BFf039772@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, FreeBSD Net , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r241245 - in head: . share/man/man9 sys/contrib/ipfilter/netinet sys/net sys/netinet sys/netpfil/ipfw sys/netpfil/pf 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: Mon, 08 Oct 2012 05:04:22 -0000 On Sun, Oct 07, 2012 at 06:49:51PM -0700, Adrian Chadd wrote: A> Hi, A> A> People have been reporting this: A> A> A> Oct 7 18:35:19 alix kernel: in_cksum_skip: out of data by 53295 A> Oct 7 18:35:19 alix kernel: in_cksum_skip: out of data by 55335 A> A> Would you please investigate this, or back the patch out? I'm working on it. A> Also, if this is actually due to this patch - why is it that you A> didn't pick it up in testing? Because this debugging printf is only on i386, not on amd64. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 05:50:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2AC01106566B; Mon, 8 Oct 2012 05:50:59 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B5328FC0C; Mon, 8 Oct 2012 05:50:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q985owNx040756; Mon, 8 Oct 2012 05:50:58 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q985owp7040754; Mon, 8 Oct 2012 05:50:58 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201210080550.q985owp7040754@svn.freebsd.org> From: Doug Barton Date: Mon, 8 Oct 2012 05:50:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241337 - stable/9/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Oct 2012 05:50:59 -0000 Author: dougb Date: Mon Oct 8 05:50:58 2012 New Revision: 241337 URL: http://svn.freebsd.org/changeset/base/241337 Log: MFC r241218: Remove references to CVS so that people will stop bringing it up For -p: The localtime update should have been excluded in the first place The make.conf comparison has been OBE for some time now, and there is no src.conf equivalent to share/examples/make.conf, so remove the whole thing. Update copyright Modified: stable/9/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/9/usr.sbin/mergemaster/ (props changed) Modified: stable/9/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/9/usr.sbin/mergemaster/mergemaster.sh Sun Oct 7 23:45:19 2012 (r241336) +++ stable/9/usr.sbin/mergemaster/mergemaster.sh Mon Oct 8 05:50:58 2012 (r241337) @@ -5,8 +5,8 @@ # Compare files created by /usr/src/etc/Makefile (or the directory # the user specifies) with the currently installed copies. -# Copyright 1998-2011 Douglas Barton -# dougb@FreeBSD.org +# Copyright (c) 1998-2012 Douglas Barton, All rights reserved +# Please see detailed copyright below # $FreeBSD$ @@ -532,9 +532,9 @@ if [ -t 0 ]; then esac fi -# Define what CVS $Id tag to look for to aid portability. +# Define what $Id tag to look for to aid portability. # -CVS_ID_TAG=FreeBSD +ID_TAG=FreeBSD delete_temproot () { rm -rf "${TEMPROOT}" 2>/dev/null @@ -1095,17 +1095,17 @@ for COMPFILE in `find . -type f | sort`; case "${STRICT}" in '' | [Nn][Oo]) - # Compare CVS $Id's first so if the file hasn't been modified + # Compare $Id's first so if the file hasn't been modified # local changes will be ignored. # If the files have the same $Id, delete the one in temproot so the # user will have less to wade through if files are left to merge by hand. # - CVSID1=`grep "[$]${CVS_ID_TAG}:" ${DESTDIR}${COMPFILE#.} 2>/dev/null` - CVSID2=`grep "[$]${CVS_ID_TAG}:" ${COMPFILE} 2>/dev/null` || CVSID2=none + ID1=`grep "[$]${ID_TAG}:" ${DESTDIR}${COMPFILE#.} 2>/dev/null` + ID2=`grep "[$]${ID_TAG}:" ${COMPFILE} 2>/dev/null` || ID2=none - case "${CVSID2}" in - "${CVSID1}") - echo " *** Temp ${COMPFILE} and installed have the same CVS Id, deleting" + case "${ID2}" in + "${ID1}") + echo " *** Temp ${COMPFILE} and installed have the same Id, deleting" rm "${COMPFILE}" ;; esac @@ -1334,7 +1334,7 @@ case "${NEED_PWD_MKDB}" in ;; esac -if [ -e "${DESTDIR}/etc/localtime" ]; then # Ignore if TZ == UTC +if [ -e "${DESTDIR}/etc/localtime" -a -z "${PRE_WORLD}" ]; then # Ignore if TZ == UTC echo '' [ -n "${DESTDIR}" ] && tzs_args="-C ${DESTDIR}" if [ -f "${DESTDIR}/var/db/zoneinfo" ]; then @@ -1380,29 +1380,35 @@ case "${COMP_CONFS}" in ;; esac -case "${PRE_WORLD}" in -'') ;; -*) - MAKE_CONF="${SOURCEDIR}/share/examples/etc/make.conf" - - (echo '' - echo '*** Comparing make variables' - echo '' - echo "*** From ${DESTDIR}/etc/make.conf" - echo "*** From ${MAKE_CONF}" - - for MAKE_VAR in `grep -i ^[a-z] ${DESTDIR}/etc/make.conf | cut -d '=' -f 1`; do - echo '' - grep -w ^${MAKE_VAR} ${DESTDIR}/etc/make.conf - grep -w ^#${MAKE_VAR} ${MAKE_CONF} || - echo ' * No example variable with this name' - done) | ${PAGER} - ;; -esac - if [ -n "${PRESERVE_FILES}" ]; then find -d $PRESERVE_FILES_DIR -type d -empty -delete 2>/dev/null rmdir $PRESERVE_FILES_DIR 2>/dev/null fi exit 0 + +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Copyright (c) 1998-2012 Douglas Barton +# 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. From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 05:51:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE7461065680; Mon, 8 Oct 2012 05:51:26 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD9C88FC08; Mon, 8 Oct 2012 05:51:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q985pQOq040861; Mon, 8 Oct 2012 05:51:26 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q985pQck040858; Mon, 8 Oct 2012 05:51:26 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201210080551.q985pQck040858@svn.freebsd.org> From: Doug Barton Date: Mon, 8 Oct 2012 05:51:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241338 - stable/8/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Oct 2012 05:51:27 -0000 Author: dougb Date: Mon Oct 8 05:51:26 2012 New Revision: 241338 URL: http://svn.freebsd.org/changeset/base/241338 Log: MFC r241218: Remove references to CVS so that people will stop bringing it up For -p: The localtime update should have been excluded in the first place The make.conf comparison has been OBE for some time now, and there is no src.conf equivalent to share/examples/make.conf, so remove the whole thing. Update copyright Modified: stable/8/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/8/usr.sbin/mergemaster/ (props changed) Modified: stable/8/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/8/usr.sbin/mergemaster/mergemaster.sh Mon Oct 8 05:50:58 2012 (r241337) +++ stable/8/usr.sbin/mergemaster/mergemaster.sh Mon Oct 8 05:51:26 2012 (r241338) @@ -5,8 +5,8 @@ # Compare files created by /usr/src/etc/Makefile (or the directory # the user specifies) with the currently installed copies. -# Copyright 1998-2011 Douglas Barton -# dougb@FreeBSD.org +# Copyright (c) 1998-2012 Douglas Barton, All rights reserved +# Please see detailed copyright below # $FreeBSD$ @@ -532,9 +532,9 @@ if [ -t 0 ]; then esac fi -# Define what CVS $Id tag to look for to aid portability. +# Define what $Id tag to look for to aid portability. # -CVS_ID_TAG=FreeBSD +ID_TAG=FreeBSD delete_temproot () { rm -rf "${TEMPROOT}" 2>/dev/null @@ -1097,17 +1097,17 @@ for COMPFILE in `find . -type f | sort`; case "${STRICT}" in '' | [Nn][Oo]) - # Compare CVS $Id's first so if the file hasn't been modified + # Compare $Id's first so if the file hasn't been modified # local changes will be ignored. # If the files have the same $Id, delete the one in temproot so the # user will have less to wade through if files are left to merge by hand. # - CVSID1=`grep "[$]${CVS_ID_TAG}:" ${DESTDIR}${COMPFILE#.} 2>/dev/null` - CVSID2=`grep "[$]${CVS_ID_TAG}:" ${COMPFILE} 2>/dev/null` || CVSID2=none + ID1=`grep "[$]${ID_TAG}:" ${DESTDIR}${COMPFILE#.} 2>/dev/null` + ID2=`grep "[$]${ID_TAG}:" ${COMPFILE} 2>/dev/null` || ID2=none - case "${CVSID2}" in - "${CVSID1}") - echo " *** Temp ${COMPFILE} and installed have the same CVS Id, deleting" + case "${ID2}" in + "${ID1}") + echo " *** Temp ${COMPFILE} and installed have the same Id, deleting" rm "${COMPFILE}" ;; esac @@ -1336,7 +1336,7 @@ case "${NEED_PWD_MKDB}" in ;; esac -if [ -e "${DESTDIR}/etc/localtime" ]; then # Ignore if TZ == UTC +if [ -e "${DESTDIR}/etc/localtime" -a -z "${PRE_WORLD}" ]; then # Ignore if TZ == UTC echo '' [ -n "${DESTDIR}" ] && tzs_args="-C ${DESTDIR}" if [ -f "${DESTDIR}/var/db/zoneinfo" ]; then @@ -1382,29 +1382,35 @@ case "${COMP_CONFS}" in ;; esac -case "${PRE_WORLD}" in -'') ;; -*) - MAKE_CONF="${SOURCEDIR}/share/examples/etc/make.conf" - - (echo '' - echo '*** Comparing make variables' - echo '' - echo "*** From ${DESTDIR}/etc/make.conf" - echo "*** From ${MAKE_CONF}" - - for MAKE_VAR in `grep -i ^[a-z] ${DESTDIR}/etc/make.conf | cut -d '=' -f 1`; do - echo '' - grep -w ^${MAKE_VAR} ${DESTDIR}/etc/make.conf - grep -w ^#${MAKE_VAR} ${MAKE_CONF} || - echo ' * No example variable with this name' - done) | ${PAGER} - ;; -esac - if [ -n "${PRESERVE_FILES}" ]; then find -d $PRESERVE_FILES_DIR -type d -empty -delete 2>/dev/null rmdir $PRESERVE_FILES_DIR 2>/dev/null fi exit 0 + +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Copyright (c) 1998-2012 Douglas Barton +# 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. From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 05:51:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 173AD1065680; Mon, 8 Oct 2012 05:51:48 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB7388FC08; Mon, 8 Oct 2012 05:51:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q985plus040952; Mon, 8 Oct 2012 05:51:47 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q985plqJ040950; Mon, 8 Oct 2012 05:51:47 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201210080551.q985plqJ040950@svn.freebsd.org> From: Doug Barton Date: Mon, 8 Oct 2012 05:51:47 +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: r241339 - stable/7/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Oct 2012 05:51:48 -0000 Author: dougb Date: Mon Oct 8 05:51:47 2012 New Revision: 241339 URL: http://svn.freebsd.org/changeset/base/241339 Log: MFC r241218: Remove references to CVS so that people will stop bringing it up For -p: The localtime update should have been excluded in the first place The make.conf comparison has been OBE for some time now, and there is no src.conf equivalent to share/examples/make.conf, so remove the whole thing. Update copyright Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/7/usr.sbin/mergemaster/ (props changed) Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/7/usr.sbin/mergemaster/mergemaster.sh Mon Oct 8 05:51:26 2012 (r241338) +++ stable/7/usr.sbin/mergemaster/mergemaster.sh Mon Oct 8 05:51:47 2012 (r241339) @@ -5,8 +5,8 @@ # Compare files created by /usr/src/etc/Makefile (or the directory # the user specifies) with the currently installed copies. -# Copyright 1998-2011 Douglas Barton -# dougb@FreeBSD.org +# Copyright (c) 1998-2012 Douglas Barton, All rights reserved +# Please see detailed copyright below # $FreeBSD$ @@ -532,9 +532,9 @@ if [ -t 0 ]; then esac fi -# Define what CVS $Id tag to look for to aid portability. +# Define what $Id tag to look for to aid portability. # -CVS_ID_TAG=FreeBSD +ID_TAG=FreeBSD delete_temproot () { rm -rf "${TEMPROOT}" 2>/dev/null @@ -1094,17 +1094,17 @@ for COMPFILE in `find . -type f | sort`; case "${STRICT}" in '' | [Nn][Oo]) - # Compare CVS $Id's first so if the file hasn't been modified + # Compare $Id's first so if the file hasn't been modified # local changes will be ignored. # If the files have the same $Id, delete the one in temproot so the # user will have less to wade through if files are left to merge by hand. # - CVSID1=`grep "[$]${CVS_ID_TAG}:" ${DESTDIR}${COMPFILE#.} 2>/dev/null` - CVSID2=`grep "[$]${CVS_ID_TAG}:" ${COMPFILE} 2>/dev/null` || CVSID2=none + ID1=`grep "[$]${ID_TAG}:" ${DESTDIR}${COMPFILE#.} 2>/dev/null` + ID2=`grep "[$]${ID_TAG}:" ${COMPFILE} 2>/dev/null` || ID2=none - case "${CVSID2}" in - "${CVSID1}") - echo " *** Temp ${COMPFILE} and installed have the same CVS Id, deleting" + case "${ID2}" in + "${ID1}") + echo " *** Temp ${COMPFILE} and installed have the same Id, deleting" rm "${COMPFILE}" ;; esac @@ -1322,7 +1322,7 @@ case "${NEED_PWD_MKDB}" in ;; esac -if [ -e "${DESTDIR}/etc/localtime" ]; then # Ignore if TZ == UTC +if [ -e "${DESTDIR}/etc/localtime" -a -z "${PRE_WORLD}" ]; then # Ignore if TZ == UTC echo '' [ -n "${DESTDIR}" ] && tzs_args="-C ${DESTDIR}" if [ -f "${DESTDIR}/var/db/zoneinfo" ]; then @@ -1368,29 +1368,35 @@ case "${COMP_CONFS}" in ;; esac -case "${PRE_WORLD}" in -'') ;; -*) - MAKE_CONF="${SOURCEDIR}/share/examples/etc/make.conf" - - (echo '' - echo '*** Comparing make variables' - echo '' - echo "*** From ${DESTDIR}/etc/make.conf" - echo "*** From ${MAKE_CONF}" - - for MAKE_VAR in `grep -i ^[a-z] ${DESTDIR}/etc/make.conf | cut -d '=' -f 1`; do - echo '' - grep -w ^${MAKE_VAR} ${DESTDIR}/etc/make.conf - grep -w ^#${MAKE_VAR} ${MAKE_CONF} || - echo ' * No example variable with this name' - done) | ${PAGER} - ;; -esac - if [ -n "${PRESERVE_FILES}" ]; then find -d $PRESERVE_FILES_DIR -type d -empty -delete 2>/dev/null rmdir $PRESERVE_FILES_DIR 2>/dev/null fi exit 0 + +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Copyright (c) 1998-2012 Douglas Barton +# 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. From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 07:01:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 24D3A1065672; Mon, 8 Oct 2012 07:01:08 +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 0EB7A8FC0A; Mon, 8 Oct 2012 07:01:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q987176X050347; Mon, 8 Oct 2012 07:01:07 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q98717js050345; Mon, 8 Oct 2012 07:01:07 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210080701.q98717js050345@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 8 Oct 2012 07:01: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: r241340 - head/sys/dev/ale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Oct 2012 07:01:08 -0000 Author: yongari Date: Mon Oct 8 07:01:07 2012 New Revision: 241340 URL: http://svn.freebsd.org/changeset/base/241340 Log: Fix typo. Check against number of allocated MSI-X vectors. There is no ale(4) controller that supports MSI-X so this is not real issue. PR: kern/171825 Modified: head/sys/dev/ale/if_ale.c Modified: head/sys/dev/ale/if_ale.c ============================================================================== --- head/sys/dev/ale/if_ale.c Mon Oct 8 05:51:47 2012 (r241339) +++ head/sys/dev/ale/if_ale.c Mon Oct 8 07:01:07 2012 (r241340) @@ -551,7 +551,7 @@ ale_attach(device_t dev) if (msix_disable == 0 || msi_disable == 0) { if (msix_disable == 0 && msixc == ALE_MSIX_MESSAGES && pci_alloc_msix(dev, &msixc) == 0) { - if (msic == ALE_MSIX_MESSAGES) { + if (msixc == ALE_MSIX_MESSAGES) { device_printf(dev, "Using %d MSIX messages.\n", msixc); sc->ale_flags |= ALE_FLAG_MSIX; From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 07:13:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 466C41065672; Mon, 8 Oct 2012 07:13:46 +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 3070F8FC08; Mon, 8 Oct 2012 07:13:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q987DktO052254; Mon, 8 Oct 2012 07:13:46 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q987DjEC052252; Mon, 8 Oct 2012 07:13:45 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210080713.q987DjEC052252@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 8 Oct 2012 07:13: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: r241341 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Oct 2012 07:13:46 -0000 Author: yongari Date: Mon Oct 8 07:13:45 2012 New Revision: 241341 URL: http://svn.freebsd.org/changeset/base/241341 Log: Limit applying TX data corruption and FIFO workaround to BCM5719 A0. It's believed BCM5720 does not have the issue. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Mon Oct 8 07:01:07 2012 (r241340) +++ head/sys/dev/bge/if_bge.c Mon Oct 8 07:13:45 2012 (r241341) @@ -2121,8 +2121,8 @@ bge_blockinit(struct bge_softc *sc) * Adjust tx margin to prevent TX data corruption and * fix internal FIFO overflow. */ - if (sc->bge_asicrev == BGE_ASICREV_BCM5719 || - sc->bge_asicrev == BGE_ASICREV_BCM5720) { + if (sc->bge_asicrev == BGE_ASICREV_BCM5719 && + sc->bge_chipid == BGE_CHIPID_BCM5719_A0) { dmactl &= ~(BGE_RDMA_RSRVCTRL_FIFO_LWM_MASK | BGE_RDMA_RSRVCTRL_FIFO_HWM_MASK | BGE_RDMA_RSRVCTRL_TXMRGN_MASK); From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 07:21:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 96D0A1065670; Mon, 8 Oct 2012 07:21:33 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 81B1E8FC0A; Mon, 8 Oct 2012 07:21:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q987LX7s053397; Mon, 8 Oct 2012 07:21:33 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q987LXZ0053394; Mon, 8 Oct 2012 07:21:33 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210080721.q987LXZ0053394@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 8 Oct 2012 07:21: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: r241342 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Oct 2012 07:21:33 -0000 Author: glebius Date: Mon Oct 8 07:21:32 2012 New Revision: 241342 URL: http://svn.freebsd.org/changeset/base/241342 Log: No reason to play with IP header before calling sctp_delayed_cksum() with offset beyond the IP header. Modified: head/sys/netinet/ip_divert.c Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Mon Oct 8 07:13:45 2012 (r241341) +++ head/sys/netinet/ip_divert.c Mon Oct 8 07:21:32 2012 (r241342) @@ -215,10 +215,8 @@ divert_packet(struct mbuf *m, int incomi } #ifdef SCTP if (m->m_pkthdr.csum_flags & CSUM_SCTP) { - ip->ip_len = ntohs(ip->ip_len); sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2)); m->m_pkthdr.csum_flags &= ~CSUM_SCTP; - ip->ip_len = htons(ip->ip_len); } #endif bzero(&divsrc, sizeof(divsrc)); From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 07:33:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D82F106564A; Mon, 8 Oct 2012 07:33:44 +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 E71238FC14; Mon, 8 Oct 2012 07:33:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q987XhIm055178; Mon, 8 Oct 2012 07:33:43 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q987XhK8055176; Mon, 8 Oct 2012 07:33:43 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210080733.q987XhK8055176@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 8 Oct 2012 07:33: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: r241343 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Oct 2012 07:33:44 -0000 Author: yongari Date: Mon Oct 8 07:33:43 2012 New Revision: 241343 URL: http://svn.freebsd.org/changeset/base/241343 Log: Rework device detach. While here, move driver lock/callout initialization to the beginning of device attach for readability. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Mon Oct 8 07:21:32 2012 (r241342) +++ head/sys/dev/bge/if_bge.c Mon Oct 8 07:33:43 2012 (r241343) @@ -2875,7 +2875,9 @@ bge_attach(device_t dev) sc = device_get_softc(dev); sc->bge_dev = dev; + BGE_LOCK_INIT(sc, device_get_nameunit(dev)); TASK_INIT(&sc->bge_intr_task, 0, bge_intr_task, sc); + callout_init_mtx(&sc->bge_stat_ch, &sc->bge_mtx, 0); /* * Map control/status registers. @@ -3234,8 +3236,6 @@ bge_attach(device_t dev) bge_devinfo(sc); - BGE_LOCK_INIT(sc, device_get_nameunit(dev)); - /* Try to reset the chip. */ if (bge_reset(sc)) { device_printf(sc->bge_dev, "chip reset failed\n"); @@ -3439,7 +3439,6 @@ again: * Call MI attach routine. */ ether_ifattach(ifp, eaddr); - callout_init_mtx(&sc->bge_stat_ch, &sc->bge_mtx, 0); /* Tell upper layer we support long frames. */ ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); @@ -3456,7 +3455,7 @@ again: if (sc->bge_tq == NULL) { device_printf(dev, "could not create taskqueue.\n"); ether_ifdetach(ifp); - error = ENXIO; + error = ENOMEM; goto fail; } taskqueue_start_threads(&sc->bge_tq, 1, PI_NET, "%s taskq", @@ -3464,23 +3463,19 @@ again: error = bus_setup_intr(dev, sc->bge_irq, INTR_TYPE_NET | INTR_MPSAFE, bge_msi_intr, NULL, sc, &sc->bge_intrhand); - if (error) - ether_ifdetach(ifp); } else error = bus_setup_intr(dev, sc->bge_irq, INTR_TYPE_NET | INTR_MPSAFE, NULL, bge_intr, sc, &sc->bge_intrhand); if (error) { - bge_detach(dev); + ether_ifdetach(ifp); device_printf(sc->bge_dev, "couldn't set up irq\n"); } - return (0); - fail: - bge_release_resources(sc); - + if (error) + bge_detach(dev); return (error); } @@ -3498,16 +3493,16 @@ bge_detach(device_t dev) ether_poll_deregister(ifp); #endif - BGE_LOCK(sc); - bge_stop(sc); - bge_reset(sc); - BGE_UNLOCK(sc); - - callout_drain(&sc->bge_stat_ch); + if (device_is_attached(dev)) { + ether_ifdetach(ifp); + BGE_LOCK(sc); + bge_stop(sc); + BGE_UNLOCK(sc); + callout_drain(&sc->bge_stat_ch); + } if (sc->bge_tq) taskqueue_drain(sc->bge_tq, &sc->bge_intr_task); - ether_ifdetach(ifp); if (sc->bge_flags & BGE_FLAG_TBI) { ifmedia_removeall(&sc->bge_ifmedia); From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 08:03:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AB1F21065672; Mon, 8 Oct 2012 08:03:59 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 943B08FC16; Mon, 8 Oct 2012 08:03:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9883xoo059515; Mon, 8 Oct 2012 08:03:59 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9883xrS059506; Mon, 8 Oct 2012 08:03:59 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210080803.q9883xrS059506@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 8 Oct 2012 08:03: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: r241344 - in head/sys: netgraph netinet netinet6 netpfil/ipfw netpfil/pf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Oct 2012 08:03:59 -0000 Author: glebius Date: Mon Oct 8 08:03:58 2012 New Revision: 241344 URL: http://svn.freebsd.org/changeset/base/241344 Log: After r241245 it appeared that in_delayed_cksum(), which still expects host byte order, was sometimes called with net byte order. Since we are moving towards net byte order throughout the stack, the function was converted to expect net byte order, and its consumers fixed appropriately: - ip_output(), ipfilter(4) not changed, since already call in_delayed_cksum() with header in net byte order. - divert(4), ng_nat(4), ipfw_nat(4) now don't need to swap byte order there and back. - mrouting code and IPv6 ipsec now need to switch byte order there and back, but I hope, this is temporary solution. - In ipsec(4) shifted switch to net byte order prior to in_delayed_cksum(). - pf_route() catches up on r241245 changes to ip_output(). Modified: head/sys/netgraph/ng_nat.c head/sys/netinet/ip_divert.c head/sys/netinet/ip_ipsec.c head/sys/netinet/ip_mroute.c head/sys/netinet/ip_output.c head/sys/netinet6/ip6_ipsec.c head/sys/netpfil/ipfw/ip_fw_nat.c head/sys/netpfil/pf/pf.c Modified: head/sys/netgraph/ng_nat.c ============================================================================== --- head/sys/netgraph/ng_nat.c Mon Oct 8 07:33:43 2012 (r241343) +++ head/sys/netgraph/ng_nat.c Mon Oct 8 08:03:58 2012 (r241344) @@ -756,18 +756,18 @@ ng_nat_rcvdata(hook_p hook, item_p item */ if (th->th_x2) { + uint16_t ip_len = ntohs(ip->ip_len); + th->th_x2 = 0; - ip->ip_len = ntohs(ip->ip_len); th->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, htons(IPPROTO_TCP + - ip->ip_len - (ip->ip_hl << 2))); + ip_len - (ip->ip_hl << 2))); if ((m->m_pkthdr.csum_flags & CSUM_TCP) == 0) { m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum); in_delayed_cksum(m); } - ip->ip_len = htons(ip->ip_len); } } Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Mon Oct 8 07:33:43 2012 (r241343) +++ head/sys/netinet/ip_divert.c Mon Oct 8 08:03:58 2012 (r241344) @@ -208,10 +208,8 @@ divert_packet(struct mbuf *m, int incomi /* Delayed checksums are currently not compatible with divert. */ if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { - ip->ip_len = ntohs(ip->ip_len); in_delayed_cksum(m); m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; - ip->ip_len = htons(ip->ip_len); } #ifdef SCTP if (m->m_pkthdr.csum_flags & CSUM_SCTP) { Modified: head/sys/netinet/ip_ipsec.c ============================================================================== --- head/sys/netinet/ip_ipsec.c Mon Oct 8 07:33:43 2012 (r241343) +++ head/sys/netinet/ip_ipsec.c Mon Oct 8 08:03:58 2012 (r241344) @@ -332,6 +332,9 @@ ip_ipsec_output(struct mbuf **m, struct } } + ip->ip_len = htons(ip->ip_len); + ip->ip_off = htons(ip->ip_off); + /* * Do delayed checksums now because we send before * this is done in the normal processing path. @@ -346,8 +349,6 @@ ip_ipsec_output(struct mbuf **m, struct (*m)->m_pkthdr.csum_flags &= ~CSUM_SCTP; } #endif - ip->ip_len = htons(ip->ip_len); - ip->ip_off = htons(ip->ip_off); /* NB: callee frees mbuf */ *error = ipsec4_process_packet(*m, sp->req, *flags, 0); Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Mon Oct 8 07:33:43 2012 (r241343) +++ head/sys/netinet/ip_mroute.c Mon Oct 8 08:03:58 2012 (r241344) @@ -2376,7 +2376,10 @@ pim_register_prepare(struct ip *ip, stru /* Take care of delayed checksums */ if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { + /* XXX: in_delayed_cksum() expects net byte order */ + ip->ip_len = htons(ip->ip_len); in_delayed_cksum(m); + ip->ip_len = ntohs(ip->ip_len); m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Mon Oct 8 07:33:43 2012 (r241343) +++ head/sys/netinet/ip_output.c Mon Oct 8 08:03:58 2012 (r241344) @@ -882,11 +882,12 @@ void in_delayed_cksum(struct mbuf *m) { struct ip *ip; - u_short csum, offset; + uint16_t csum, offset, ip_len; ip = mtod(m, struct ip *); offset = ip->ip_hl << 2 ; - csum = in_cksum_skip(m, ip->ip_len, offset); + ip_len = ntohs(ip->ip_len); + csum = in_cksum_skip(m, ip_len, offset); if (m->m_pkthdr.csum_flags & CSUM_UDP && csum == 0) csum = 0xffff; offset += m->m_pkthdr.csum_data; /* checksum offset */ Modified: head/sys/netinet6/ip6_ipsec.c ============================================================================== --- head/sys/netinet6/ip6_ipsec.c Mon Oct 8 07:33:43 2012 (r241343) +++ head/sys/netinet6/ip6_ipsec.c Mon Oct 8 08:03:58 2012 (r241344) @@ -295,9 +295,15 @@ ip6_ipsec_output(struct mbuf **m, struct */ #ifdef INET if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { + struct ip *ip; + ipseclog((LOG_DEBUG, "%s: we do not support IPv4 over IPv6", __func__)); + /* XXX: in_delayed_cksum() expects net byte order */ + ip = mtod(m, struct ip *); + ip->ip_len = htons(ip->ip_len); in_delayed_cksum(*m); + ip->ip_len = ntohs(ip->ip_len); (*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } #endif Modified: head/sys/netpfil/ipfw/ip_fw_nat.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_nat.c Mon Oct 8 07:33:43 2012 (r241343) +++ head/sys/netpfil/ipfw/ip_fw_nat.c Mon Oct 8 08:03:58 2012 (r241344) @@ -336,11 +336,11 @@ ipfw_nat(struct ip_fw_args *args, struct if (ldt) { struct tcphdr *th; struct udphdr *uh; - u_short cksum; + uint16_t ip_len, cksum; - ip->ip_len = ntohs(ip->ip_len); + ip_len = ntohs(ip->ip_len); cksum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, - htons(ip->ip_p + ip->ip_len - (ip->ip_hl << 2))); + htons(ip->ip_p + ip_len - (ip->ip_hl << 2))); switch (ip->ip_p) { case IPPROTO_TCP: @@ -366,7 +366,6 @@ ipfw_nat(struct ip_fw_args *args, struct in_delayed_cksum(mcl); mcl->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } - ip->ip_len = htons(ip->ip_len); } args->m = mcl; return (IP_FW_NAT); Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Mon Oct 8 07:33:43 2012 (r241343) +++ head/sys/netpfil/pf/pf.c Mon Oct 8 08:03:58 2012 (r241344) @@ -5149,7 +5149,7 @@ pf_route(struct mbuf **m, struct pf_rule struct pf_addr naddr; struct pf_src_node *sn = NULL; int error = 0; - int sw_csum; + uint16_t ip_len, ip_off, sw_csum; KASSERT(m && *m && r && oifp, ("%s: invalid parameters", __func__)); KASSERT(dir == PF_IN || dir == PF_OUT, ("%s: invalid direction", @@ -5244,9 +5244,8 @@ pf_route(struct mbuf **m, struct pf_rule if (ifp->if_flags & IFF_LOOPBACK) m0->m_flags |= M_SKIP_FIREWALL; - /* Back to host byte order. */ - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); + ip_len = ntohs(ip->ip_len); + ip_off = ntohs(ip->ip_off); /* Copied from FreeBSD 10.0-CURRENT ip_output. */ m0->m_pkthdr.csum_flags |= CSUM_IP; @@ -5267,11 +5266,9 @@ pf_route(struct mbuf **m, struct pf_rule * If small enough for interface, or the interface will take * care of the fragmentation for us, we can just send directly. */ - if (ip->ip_len <= ifp->if_mtu || + if (ip_len <= ifp->if_mtu || (m0->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0 || - ((ip->ip_off & IP_DF) == 0 && (ifp->if_hwassist & CSUM_FRAGMENT))) { - ip->ip_len = htons(ip->ip_len); - ip->ip_off = htons(ip->ip_off); + ((ip_off & IP_DF) == 0 && (ifp->if_hwassist & CSUM_FRAGMENT))) { ip->ip_sum = 0; if (sw_csum & CSUM_DELAY_IP) ip->ip_sum = in_cksum(m0, ip->ip_hl << 2); @@ -5281,7 +5278,7 @@ pf_route(struct mbuf **m, struct pf_rule } /* Balk when DF bit is set or the interface didn't support TSO. */ - if ((ip->ip_off & IP_DF) || (m0->m_pkthdr.csum_flags & CSUM_TSO)) { + if ((ip_off & IP_DF) || (m0->m_pkthdr.csum_flags & CSUM_TSO)) { error = EMSGSIZE; KMOD_IPSTAT_INC(ips_cantfrag); if (r->rt != PF_DUPTO) { From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 08:08:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0176C106564A; Mon, 8 Oct 2012 08:08:37 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail15.syd.optusnet.com.au (mail15.syd.optusnet.com.au [211.29.132.196]) by mx1.freebsd.org (Postfix) with ESMTP id 11DDE8FC08; Mon, 8 Oct 2012 08:08:35 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail15.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q9888Ol4026684 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Oct 2012 19:08:26 +1100 Date: Mon, 8 Oct 2012 19:08:24 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Marcel Moolenaar In-Reply-To: <81CB9A3A-4BFF-41B2-A1F9-3721A40F6260@xcllnt.net> Message-ID: <20121008165228.F7997@besplex.bde.org> References: <201210062001.q96K16Or030755@svn.freebsd.org> <20121007161440.C7605@besplex.bde.org> <81CB9A3A-4BFF-41B2-A1F9-3721A40F6260@xcllnt.net> 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" , Bruce Evans , Simon Gerraty Subject: Re: svn commit: r241298 - in head: . gnu/usr.bin/cc/cc_int gnu/usr.bin/cc/include kerberos5 kerberos5/tools/asn1_compile kerberos5/tools/slc lib/clang/include share/mk tools/build/make_check usr.sbin/c... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Oct 2012 08:08:37 -0000 On Sun, 7 Oct 2012, Marcel Moolenaar wrote: > On Oct 6, 2012, at 10:31 PM, Bruce Evans wrote: > >> On Sat, 6 Oct 2012, Marcel Moolenaar wrote: >> >>> Log: >>> Add support for bmake. This includes: >>> .... >>> Modified: head/share/mk/bsd.dep.mk >>> ============================================================================== >>> --- head/share/mk/bsd.dep.mk Sat Oct 6 19:57:27 2012 (r241297) >>> +++ head/share/mk/bsd.dep.mk Sat Oct 6 20:01:05 2012 (r241298) >>> @@ -102,8 +102,8 @@ ${_YC} y.tab.h: ${_YSRC} >>> CLEANFILES+= y.tab.c y.tab.h >>> .elif !empty(YFLAGS:M-d) >>> .for _YH in ${_YC:R}.h >>> -.ORDER: ${_YC} ${_YH} >>> -${_YC} ${_YH}: ${_YSRC} >>> +${_YH}: ${_YC} >>> +${_YC}: ${_YSRC} >>> ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC} >>> SRCS+= ${_YH} >>> CLEANFILES+= ${_YH} >> >> This is broken. Yacc headers don't depend on generated yacc .c files. >> Now there is only a null rule to create the headers. One broken case >> is when the header somehow gets deleted. It bcomes out of date, but >> running make to update it only runs the null rule, so it remains >> nonexistent. > > The problem with the old rule is that it's broken as well. The > change attempts to fix a real parallel build problem. Your > comment is valid though. What about the following (possibly > white-space corrupted) patch from Simon: What's wrong with the old rule? It uses the .ORDER directive to force creation of the 2 generated files in sequential order, so that parallel builds can't happen. > Index: share/mk/bsd.dep.mk > =================================================================== > --- share/mk/bsd.dep.mk (revision 241871) > +++ share/mk/bsd.dep.mk (working copy) > @@ -95,16 +95,17 @@ CLEANFILES+= ${_LC} > SRCS:= ${SRCS:S/${_YSRC}/${_YC}/} > CLEANFILES+= ${_YC} > .if !empty(YFLAGS:M-d) && !empty(SRCS:My.tab.h) > -.ORDER: ${_YC} y.tab.h > -${_YC} y.tab.h: ${_YSRC} > +y.tab.h: ${_YSRC} > ${YACC} ${YFLAGS} ${.ALLSRC} > +${_YC}: y.tab.h > cp y.tab.c ${_YC} > CLEANFILES+= y.tab.c y.tab.h > .elif !empty(YFLAGS:M-d) > .for _YH in ${_YC:R}.h > -${_YH}: ${_YC} > -${_YC}: ${_YSRC} > +${_YH}: ${_YSRC} > ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC} > +${_YC}: ${_YH} > + @touch ${.TARGET} > SRCS+= ${_YH} > CLEANFILES+= ${_YH} > .endfor > > This makes sure the C file is always more recent than the H > file and important to keep make happy in all situations. It > doesn't fix the the problem of removing the C file entirely. > At least the C file is recreated, but not with the right > contents. I don't like it much. With better yacc(1) options, we could run separate yacc commands to create each file, but that requires 2 commands in all cases so it is not more efficient than a working .ORDER. It could avoid the separate cp command. Hmm, is that command the only actual problem? The dependencies and ordering are incomplete for the intermediate file y.tab.c, so it might be clobbered before it is copied. This case is just compatibility cruft for sources that don't name the yacc header sensibily, but use the bad old default name y.tab.h even if they don't use y.tab.c directly. Such sources are still too common. I see many ways to make the cp step more robust, so this is easy to fix if it is the problem. A mv instead of a cp would be more robust, but is intentionally not used, since the y.tab.c has self references which are used by at least (gdb) debugging. y.tab.c is kept so that these references are to an existent file (just not the actual source file). Bruce From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 10:34:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 72E51106564A; Mon, 8 Oct 2012 10:34:50 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DC258FC0C; Mon, 8 Oct 2012 10:34:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q98AYosv079864; Mon, 8 Oct 2012 10:34:50 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q98AYoDH079862; Mon, 8 Oct 2012 10:34:50 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201210081034.q98AYoDH079862@svn.freebsd.org> From: Doug Barton Date: Mon, 8 Oct 2012 10:34: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: r241345 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Oct 2012 10:34:50 -0000 Author: dougb Date: Mon Oct 8 10:34:49 2012 New Revision: 241345 URL: http://svn.freebsd.org/changeset/base/241345 Log: Remove my pre-commit review request for mergemaster Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Mon Oct 8 08:03:58 2012 (r241344) +++ head/MAINTAINERS Mon Oct 8 10:34:49 2012 (r241345) @@ -21,7 +21,6 @@ It is not a registry of 'turf' or privat subsystem login notes ----------------------------- kqueue jmg Pre-commit review requested. -mergemaster dougb Prefers to pre-approve commits libc/posix1e rwatson Pre-commit review requested. POSIX.1e ACLs rwatson Pre-commit review requested. UFS EAs rwatson Pre-commit review requested. From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 10:44:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E285E1065689; Mon, 8 Oct 2012 10:44:01 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B192C8FC19; Mon, 8 Oct 2012 10:44:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q98Ai01N081860; Mon, 8 Oct 2012 10:44:00 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q98Ai0jr081858; Mon, 8 Oct 2012 10:44:00 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201210081044.q98Ai0jr081858@svn.freebsd.org> From: Doug Barton Date: Mon, 8 Oct 2012 10:44:00 +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: r241346 - 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, 08 Oct 2012 10:44:02 -0000 Author: dougb Date: Mon Oct 8 10:43:59 2012 New Revision: 241346 URL: http://svn.freebsd.org/changeset/base/241346 Log: Good night. :) Approved by: core (implicit) Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Mon Oct 8 10:34:49 2012 (r241345) +++ svnadmin/conf/access Mon Oct 8 10:43:59 2012 (r241346) @@ -71,7 +71,6 @@ dfr dg dim dmarion -dougb dteske dumbbell dwhite From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 10:53:58 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0D3B0106564A; Mon, 8 Oct 2012 10:53:58 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (host-122-100-2-194.octopus.com.au [122.100.2.194]) by mx1.freebsd.org (Postfix) with ESMTP id 8E75E8FC1B; Mon, 8 Oct 2012 10:53:56 +0000 (UTC) Received: from server.rulingia.com (c220-239-248-178.belrs5.nsw.optusnet.com.au [220.239.248.178]) by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id q98ArnpM025381 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 8 Oct 2012 21:53:49 +1100 (EST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.5/8.14.5) with ESMTP id q98ArhV6069892 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Oct 2012 21:53:43 +1100 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.5/8.14.5/Submit) id q98Arhjl069891; Mon, 8 Oct 2012 21:53:43 +1100 (EST) (envelope-from peter) Date: Mon, 8 Oct 2012 21:53:43 +1100 From: Peter Jeremy To: Gleb Smirnoff Message-ID: <20121008105343.GI22291@server.rulingia.com> References: <201210050751.q957pL1X020732@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HCdXmnRlPgeNBad2" Content-Disposition: inline In-Reply-To: <201210050751.q957pL1X020732@svn.freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r241221 - in head: contrib/tcpdump usr.sbin/tcpdump/tcpdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Oct 2012 10:53:58 -0000 --HCdXmnRlPgeNBad2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-Oct-05 07:51:21 +0000, Gleb Smirnoff wrote: > Provide ability for printing and decoding pfsync(4) traffic. This > doesn't mean supporting IFT_PFSYNC (which I hope will eventually > die). This means decoding packets with IP protocol of 240 caught > on any normal interface like Ethernet. You might like to look at bin/124825 as well. --=20 Peter Jeremy --HCdXmnRlPgeNBad2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlBysLcACgkQ/opHv/APuIfqjACfQNYkBxFe/VHL38vPWMEn2S5z 64IAnjcsmrPjjaeuqSP54uxt4HTsEx74 =2tPZ -----END PGP SIGNATURE----- --HCdXmnRlPgeNBad2-- From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 12:59:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CB7B9106564A; Mon, 8 Oct 2012 12:59:09 +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 B4AAE8FC1A; Mon, 8 Oct 2012 12:59:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q98Cx9i6003791; Mon, 8 Oct 2012 12:59:09 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q98Cx9WS003789; Mon, 8 Oct 2012 12:59:09 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201210081259.q98Cx9WS003789@svn.freebsd.org> From: Rick Macklem Date: Mon, 8 Oct 2012 12:59:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241347 - stable/9/usr.sbin/mountd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Oct 2012 12:59:09 -0000 Author: rmacklem Date: Mon Oct 8 12:59:09 2012 New Revision: 241347 URL: http://svn.freebsd.org/changeset/base/241347 Log: MFC: r240902 Attila Bogar reported a bug in mountd when multiple export entries with different security flavors are in the exports(5) file. For that case, mountd replies with the security flavors of the last entry and not the correct one for the client host. This patch fixes that by storing separate copies of the flavors for each host/net case, plus a default one for the case where no hosts/nets are specified on an entry in the exports(5) file. Unlike the patch in the PR, it replies with the security flavors for the entry instead of merging the security flavors for all the entries and replying with that. Modified: stable/9/usr.sbin/mountd/mountd.c Directory Properties: stable/9/usr.sbin/mountd/ (props changed) Modified: stable/9/usr.sbin/mountd/mountd.c ============================================================================== --- stable/9/usr.sbin/mountd/mountd.c Mon Oct 8 10:43:59 2012 (r241346) +++ stable/9/usr.sbin/mountd/mountd.c Mon Oct 8 12:59:09 2012 (r241347) @@ -117,6 +117,8 @@ struct exportlist { char *ex_indexfile; int ex_numsecflavors; int ex_secflavors[MAXSECFLAVORS]; + int ex_defnumsecflavors; + int ex_defsecflavors[MAXSECFLAVORS]; }; /* ex_flag bits */ #define EX_LINKED 0x1 @@ -136,6 +138,8 @@ struct grouplist { int gr_type; union grouptypes gr_ptr; struct grouplist *gr_next; + int gr_numsecflavors; + int gr_secflavors[MAXSECFLAVORS]; }; /* Group types */ #define GT_NULL 0x0 @@ -163,12 +167,13 @@ struct fhreturn { /* Global defs */ char *add_expdir(struct dirlist **, char *, int); void add_dlist(struct dirlist **, struct dirlist *, - struct grouplist *, int); + struct grouplist *, int, struct exportlist *); void add_mlist(char *, char *); int check_dirpath(char *); int check_options(struct dirlist *); int checkmask(struct sockaddr *sa); -int chk_host(struct dirlist *, struct sockaddr *, int *, int *); +int chk_host(struct dirlist *, struct sockaddr *, int *, int *, int *, + int **); static int create_service(struct netconfig *nconf); static void complete_service(struct netconfig *nconf, char *port_str); static void clearout_service(void); @@ -938,6 +943,7 @@ mntsrv(struct svc_req *rqstp, SVCXPRT *t char rpcpath[MNTPATHLEN + 1], dirpath[MAXPATHLEN]; int bad = 0, defset, hostset; sigset_t sighup_mask; + int numsecflavors, *secflavorsp; sigemptyset(&sighup_mask); sigaddset(&sighup_mask, SIGHUP); @@ -1000,9 +1006,11 @@ mntsrv(struct svc_req *rqstp, SVCXPRT *t sigprocmask(SIG_BLOCK, &sighup_mask, NULL); ep = ex_search(&fsb.f_fsid); hostset = defset = 0; - if (ep && (chk_host(ep->ex_defdir, saddr, &defset, &hostset) || + if (ep && (chk_host(ep->ex_defdir, saddr, &defset, &hostset, + &numsecflavors, &secflavorsp) || ((dp = dirp_search(ep->ex_dirl, dirpath)) && - chk_host(dp, saddr, &defset, &hostset)) || + chk_host(dp, saddr, &defset, &hostset, &numsecflavors, + &secflavorsp)) || (defset && scan_tree(ep->ex_defdir, saddr) == 0 && scan_tree(ep->ex_dirl, saddr) == 0))) { if (bad) { @@ -1012,10 +1020,15 @@ mntsrv(struct svc_req *rqstp, SVCXPRT *t sigprocmask(SIG_UNBLOCK, &sighup_mask, NULL); return; } - if (hostset & DP_HOSTSET) + if (hostset & DP_HOSTSET) { fhr.fhr_flag = hostset; - else + fhr.fhr_numsecflavors = numsecflavors; + fhr.fhr_secflavors = secflavorsp; + } else { fhr.fhr_flag = defset; + fhr.fhr_numsecflavors = ep->ex_defnumsecflavors; + fhr.fhr_secflavors = ep->ex_defsecflavors; + } fhr.fhr_vers = rqstp->rq_vers; /* Get the file handle */ memset(&fhr.fhr_fh, 0, sizeof(nfsfh_t)); @@ -1028,8 +1041,6 @@ mntsrv(struct svc_req *rqstp, SVCXPRT *t sigprocmask(SIG_UNBLOCK, &sighup_mask, NULL); return; } - fhr.fhr_numsecflavors = ep->ex_numsecflavors; - fhr.fhr_secflavors = ep->ex_secflavors; if (!svc_sendreply(transp, (xdrproc_t)xdr_fhs, (caddr_t)&fhr)) syslog(LOG_ERR, "can't send reply"); @@ -1884,11 +1895,21 @@ hang_dirp(struct dirlist *dp, struct gro ep->ex_defdir = dp; if (grp == (struct grouplist *)NULL) { ep->ex_defdir->dp_flag |= DP_DEFSET; + /* Save the default security flavors list. */ + ep->ex_defnumsecflavors = ep->ex_numsecflavors; + if (ep->ex_numsecflavors > 0) + memcpy(ep->ex_defsecflavors, ep->ex_secflavors, + sizeof(ep->ex_secflavors)); } else while (grp) { hp = get_ht(); hp->ht_grp = grp; hp->ht_next = ep->ex_defdir->dp_hosts; ep->ex_defdir->dp_hosts = hp; + /* Save the security flavors list for this host set. */ + grp->gr_numsecflavors = ep->ex_numsecflavors; + if (ep->ex_numsecflavors > 0) + memcpy(grp->gr_secflavors, ep->ex_secflavors, + sizeof(ep->ex_secflavors)); grp = grp->gr_next; } } else { @@ -1898,7 +1919,7 @@ hang_dirp(struct dirlist *dp, struct gro */ while (dp) { dp2 = dp->dp_left; - add_dlist(&ep->ex_dirl, dp, grp, flags); + add_dlist(&ep->ex_dirl, dp, grp, flags, ep); dp = dp2; } } @@ -1910,7 +1931,7 @@ hang_dirp(struct dirlist *dp, struct gro */ void add_dlist(struct dirlist **dpp, struct dirlist *newdp, struct grouplist *grp, - int flags) + int flags, struct exportlist *ep) { struct dirlist *dp; struct hostlist *hp; @@ -1920,10 +1941,10 @@ add_dlist(struct dirlist **dpp, struct d if (dp) { cmp = strcmp(dp->dp_dirp, newdp->dp_dirp); if (cmp > 0) { - add_dlist(&dp->dp_left, newdp, grp, flags); + add_dlist(&dp->dp_left, newdp, grp, flags, ep); return; } else if (cmp < 0) { - add_dlist(&dp->dp_right, newdp, grp, flags); + add_dlist(&dp->dp_right, newdp, grp, flags, ep); return; } else free((caddr_t)newdp); @@ -1942,10 +1963,20 @@ add_dlist(struct dirlist **dpp, struct d hp->ht_grp = grp; hp->ht_next = dp->dp_hosts; dp->dp_hosts = hp; + /* Save the security flavors list for this host set. */ + grp->gr_numsecflavors = ep->ex_numsecflavors; + if (ep->ex_numsecflavors > 0) + memcpy(grp->gr_secflavors, ep->ex_secflavors, + sizeof(ep->ex_secflavors)); grp = grp->gr_next; } while (grp); } else { dp->dp_flag |= DP_DEFSET; + /* Save the default security flavors list. */ + ep->ex_defnumsecflavors = ep->ex_numsecflavors; + if (ep->ex_numsecflavors > 0) + memcpy(ep->ex_defsecflavors, ep->ex_secflavors, + sizeof(ep->ex_secflavors)); } } @@ -1974,7 +2005,7 @@ dirp_search(struct dirlist *dp, char *di */ int chk_host(struct dirlist *dp, struct sockaddr *saddr, int *defsetp, - int *hostsetp) + int *hostsetp, int *numsecflavors, int **secflavorsp) { struct hostlist *hp; struct grouplist *grp; @@ -1993,6 +2024,12 @@ chk_host(struct dirlist *dp, struct sock if (!sacmp(ai->ai_addr, saddr, NULL)) { *hostsetp = (hp->ht_flag | DP_HOSTSET); + if (numsecflavors != NULL) { + *numsecflavors = + grp->gr_numsecflavors; + *secflavorsp = + grp->gr_secflavors; + } return (1); } } @@ -2003,6 +2040,12 @@ chk_host(struct dirlist *dp, struct sock (struct sockaddr *) &grp->gr_ptr.gt_net.nt_mask)) { *hostsetp = (hp->ht_flag | DP_HOSTSET); + if (numsecflavors != NULL) { + *numsecflavors = + grp->gr_numsecflavors; + *secflavorsp = + grp->gr_secflavors; + } return (1); } break; @@ -2024,7 +2067,7 @@ scan_tree(struct dirlist *dp, struct soc if (dp) { if (scan_tree(dp->dp_left, saddr)) return (1); - if (chk_host(dp, saddr, &defset, &hostset)) + if (chk_host(dp, saddr, &defset, &hostset, NULL, NULL)) return (1); if (scan_tree(dp->dp_right, saddr)) return (1); From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 13:14:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A6C21065670; Mon, 8 Oct 2012 13:14:01 +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 E51EF8FC0C; Mon, 8 Oct 2012 13:14:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q98DE0Fg006082; Mon, 8 Oct 2012 13:14:00 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q98DE0Rn006080; Mon, 8 Oct 2012 13:14:00 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201210081314.q98DE0Rn006080@svn.freebsd.org> From: Rick Macklem Date: Mon, 8 Oct 2012 13:14:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241348 - stable/8/usr.sbin/mountd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Oct 2012 13:14:01 -0000 Author: rmacklem Date: Mon Oct 8 13:14:00 2012 New Revision: 241348 URL: http://svn.freebsd.org/changeset/base/241348 Log: MFC: r240902 Attila Bogar reported a bug in mountd when multiple export entries with different security flavors are in the exports(5) file. For that case, mountd replies with the security flavors of the last entry and not the correct one for the client host. This patch fixes that by storing separate copies of the flavors for each host/net case, plus a default one for the case where no hosts/nets are specified on an entry in the exports(5) file. Unlike the patch in the PR, it replies with the security flavors for the entry instead of merging the security flavors for all the entries and replying with that. Modified: stable/8/usr.sbin/mountd/mountd.c Directory Properties: stable/8/usr.sbin/mountd/ (props changed) Modified: stable/8/usr.sbin/mountd/mountd.c ============================================================================== --- stable/8/usr.sbin/mountd/mountd.c Mon Oct 8 12:59:09 2012 (r241347) +++ stable/8/usr.sbin/mountd/mountd.c Mon Oct 8 13:14:00 2012 (r241348) @@ -117,6 +117,8 @@ struct exportlist { char *ex_indexfile; int ex_numsecflavors; int ex_secflavors[MAXSECFLAVORS]; + int ex_defnumsecflavors; + int ex_defsecflavors[MAXSECFLAVORS]; }; /* ex_flag bits */ #define EX_LINKED 0x1 @@ -136,6 +138,8 @@ struct grouplist { int gr_type; union grouptypes gr_ptr; struct grouplist *gr_next; + int gr_numsecflavors; + int gr_secflavors[MAXSECFLAVORS]; }; /* Group types */ #define GT_NULL 0x0 @@ -163,12 +167,13 @@ struct fhreturn { /* Global defs */ char *add_expdir(struct dirlist **, char *, int); void add_dlist(struct dirlist **, struct dirlist *, - struct grouplist *, int); + struct grouplist *, int, struct exportlist *); void add_mlist(char *, char *); int check_dirpath(char *); int check_options(struct dirlist *); int checkmask(struct sockaddr *sa); -int chk_host(struct dirlist *, struct sockaddr *, int *, int *); +int chk_host(struct dirlist *, struct sockaddr *, int *, int *, int *, + int **); static int create_service(struct netconfig *nconf); static void complete_service(struct netconfig *nconf, char *port_str); static void clearout_service(void); @@ -938,6 +943,7 @@ mntsrv(struct svc_req *rqstp, SVCXPRT *t char rpcpath[MNTPATHLEN + 1], dirpath[MAXPATHLEN]; int bad = 0, defset, hostset; sigset_t sighup_mask; + int numsecflavors, *secflavorsp; sigemptyset(&sighup_mask); sigaddset(&sighup_mask, SIGHUP); @@ -1000,9 +1006,11 @@ mntsrv(struct svc_req *rqstp, SVCXPRT *t sigprocmask(SIG_BLOCK, &sighup_mask, NULL); ep = ex_search(&fsb.f_fsid); hostset = defset = 0; - if (ep && (chk_host(ep->ex_defdir, saddr, &defset, &hostset) || + if (ep && (chk_host(ep->ex_defdir, saddr, &defset, &hostset, + &numsecflavors, &secflavorsp) || ((dp = dirp_search(ep->ex_dirl, dirpath)) && - chk_host(dp, saddr, &defset, &hostset)) || + chk_host(dp, saddr, &defset, &hostset, &numsecflavors, + &secflavorsp)) || (defset && scan_tree(ep->ex_defdir, saddr) == 0 && scan_tree(ep->ex_dirl, saddr) == 0))) { if (bad) { @@ -1012,10 +1020,15 @@ mntsrv(struct svc_req *rqstp, SVCXPRT *t sigprocmask(SIG_UNBLOCK, &sighup_mask, NULL); return; } - if (hostset & DP_HOSTSET) + if (hostset & DP_HOSTSET) { fhr.fhr_flag = hostset; - else + fhr.fhr_numsecflavors = numsecflavors; + fhr.fhr_secflavors = secflavorsp; + } else { fhr.fhr_flag = defset; + fhr.fhr_numsecflavors = ep->ex_defnumsecflavors; + fhr.fhr_secflavors = ep->ex_defsecflavors; + } fhr.fhr_vers = rqstp->rq_vers; /* Get the file handle */ memset(&fhr.fhr_fh, 0, sizeof(nfsfh_t)); @@ -1028,8 +1041,6 @@ mntsrv(struct svc_req *rqstp, SVCXPRT *t sigprocmask(SIG_UNBLOCK, &sighup_mask, NULL); return; } - fhr.fhr_numsecflavors = ep->ex_numsecflavors; - fhr.fhr_secflavors = ep->ex_secflavors; if (!svc_sendreply(transp, (xdrproc_t)xdr_fhs, (caddr_t)&fhr)) syslog(LOG_ERR, "can't send reply"); @@ -1884,11 +1895,21 @@ hang_dirp(struct dirlist *dp, struct gro ep->ex_defdir = dp; if (grp == (struct grouplist *)NULL) { ep->ex_defdir->dp_flag |= DP_DEFSET; + /* Save the default security flavors list. */ + ep->ex_defnumsecflavors = ep->ex_numsecflavors; + if (ep->ex_numsecflavors > 0) + memcpy(ep->ex_defsecflavors, ep->ex_secflavors, + sizeof(ep->ex_secflavors)); } else while (grp) { hp = get_ht(); hp->ht_grp = grp; hp->ht_next = ep->ex_defdir->dp_hosts; ep->ex_defdir->dp_hosts = hp; + /* Save the security flavors list for this host set. */ + grp->gr_numsecflavors = ep->ex_numsecflavors; + if (ep->ex_numsecflavors > 0) + memcpy(grp->gr_secflavors, ep->ex_secflavors, + sizeof(ep->ex_secflavors)); grp = grp->gr_next; } } else { @@ -1898,7 +1919,7 @@ hang_dirp(struct dirlist *dp, struct gro */ while (dp) { dp2 = dp->dp_left; - add_dlist(&ep->ex_dirl, dp, grp, flags); + add_dlist(&ep->ex_dirl, dp, grp, flags, ep); dp = dp2; } } @@ -1910,7 +1931,7 @@ hang_dirp(struct dirlist *dp, struct gro */ void add_dlist(struct dirlist **dpp, struct dirlist *newdp, struct grouplist *grp, - int flags) + int flags, struct exportlist *ep) { struct dirlist *dp; struct hostlist *hp; @@ -1920,10 +1941,10 @@ add_dlist(struct dirlist **dpp, struct d if (dp) { cmp = strcmp(dp->dp_dirp, newdp->dp_dirp); if (cmp > 0) { - add_dlist(&dp->dp_left, newdp, grp, flags); + add_dlist(&dp->dp_left, newdp, grp, flags, ep); return; } else if (cmp < 0) { - add_dlist(&dp->dp_right, newdp, grp, flags); + add_dlist(&dp->dp_right, newdp, grp, flags, ep); return; } else free((caddr_t)newdp); @@ -1942,10 +1963,20 @@ add_dlist(struct dirlist **dpp, struct d hp->ht_grp = grp; hp->ht_next = dp->dp_hosts; dp->dp_hosts = hp; + /* Save the security flavors list for this host set. */ + grp->gr_numsecflavors = ep->ex_numsecflavors; + if (ep->ex_numsecflavors > 0) + memcpy(grp->gr_secflavors, ep->ex_secflavors, + sizeof(ep->ex_secflavors)); grp = grp->gr_next; } while (grp); } else { dp->dp_flag |= DP_DEFSET; + /* Save the default security flavors list. */ + ep->ex_defnumsecflavors = ep->ex_numsecflavors; + if (ep->ex_numsecflavors > 0) + memcpy(ep->ex_defsecflavors, ep->ex_secflavors, + sizeof(ep->ex_secflavors)); } } @@ -1974,7 +2005,7 @@ dirp_search(struct dirlist *dp, char *di */ int chk_host(struct dirlist *dp, struct sockaddr *saddr, int *defsetp, - int *hostsetp) + int *hostsetp, int *numsecflavors, int **secflavorsp) { struct hostlist *hp; struct grouplist *grp; @@ -1993,6 +2024,12 @@ chk_host(struct dirlist *dp, struct sock if (!sacmp(ai->ai_addr, saddr, NULL)) { *hostsetp = (hp->ht_flag | DP_HOSTSET); + if (numsecflavors != NULL) { + *numsecflavors = + grp->gr_numsecflavors; + *secflavorsp = + grp->gr_secflavors; + } return (1); } } @@ -2003,6 +2040,12 @@ chk_host(struct dirlist *dp, struct sock (struct sockaddr *) &grp->gr_ptr.gt_net.nt_mask)) { *hostsetp = (hp->ht_flag | DP_HOSTSET); + if (numsecflavors != NULL) { + *numsecflavors = + grp->gr_numsecflavors; + *secflavorsp = + grp->gr_secflavors; + } return (1); } break; @@ -2024,7 +2067,7 @@ scan_tree(struct dirlist *dp, struct soc if (dp) { if (scan_tree(dp->dp_left, saddr)) return (1); - if (chk_host(dp, saddr, &defset, &hostset)) + if (chk_host(dp, saddr, &defset, &hostset, NULL, NULL)) return (1); if (scan_tree(dp->dp_right, saddr)) return (1); From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 13:45:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B8B2B106564A; Mon, 8 Oct 2012 13:45:40 +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 9F4F98FC08; Mon, 8 Oct 2012 13:45:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q98Dje65010423; Mon, 8 Oct 2012 13:45:40 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q98Djei3010421; Mon, 8 Oct 2012 13:45:40 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210081345.q98Djei3010421@svn.freebsd.org> From: Andriy Gapon Date: Mon, 8 Oct 2012 13:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241349 - 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: Mon, 08 Oct 2012 13:45:40 -0000 Author: avg Date: Mon Oct 8 13:45:40 2012 New Revision: 241349 URL: http://svn.freebsd.org/changeset/base/241349 Log: ip6_ipsec_output: fix a typo in r241344 Acting as a remote drone of glebius. Modified: head/sys/netinet6/ip6_ipsec.c Modified: head/sys/netinet6/ip6_ipsec.c ============================================================================== --- head/sys/netinet6/ip6_ipsec.c Mon Oct 8 13:14:00 2012 (r241348) +++ head/sys/netinet6/ip6_ipsec.c Mon Oct 8 13:45:40 2012 (r241349) @@ -300,7 +300,7 @@ ip6_ipsec_output(struct mbuf **m, struct ipseclog((LOG_DEBUG, "%s: we do not support IPv4 over IPv6", __func__)); /* XXX: in_delayed_cksum() expects net byte order */ - ip = mtod(m, struct ip *); + ip = mtod(*m, struct ip *); ip->ip_len = htons(ip->ip_len); in_delayed_cksum(*m); ip->ip_len = ntohs(ip->ip_len); From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 14:05:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C0164106566C; Mon, 8 Oct 2012 14:05:00 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4D6B8FC0A; Mon, 8 Oct 2012 14:05:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q98E50vA013131; Mon, 8 Oct 2012 14:05:00 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q98E50xm013129; Mon, 8 Oct 2012 14:05:00 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201210081405.q98E50xm013129@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 8 Oct 2012 14:05:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241350 - stable/8/libexec/atrun X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Oct 2012 14:05:00 -0000 Author: jilles Date: Mon Oct 8 14:05:00 2012 New Revision: 241350 URL: http://svn.freebsd.org/changeset/base/241350 Log: MFC r240974: atrun: Do not assume that MAXLOGNAME <= 100. The reserved space for fmt was exactly sufficient for a two-digit value of MAXLOGNAME - 1. PR: bin/171815 Submitted by: Jeremy Huddleston Sequoia Modified: stable/8/libexec/atrun/atrun.c Directory Properties: stable/8/libexec/atrun/ (props changed) Modified: stable/8/libexec/atrun/atrun.c ============================================================================== --- stable/8/libexec/atrun/atrun.c Mon Oct 8 13:45:40 2012 (r241349) +++ stable/8/libexec/atrun/atrun.c Mon Oct 8 14:05:00 2012 (r241350) @@ -130,7 +130,7 @@ run_file(const char *filename, uid_t uid pid_t pid; int fd_out, fd_in; int queue; - char mailbuf[LOGNAMESIZE + 1], fmt[49]; + char mailbuf[LOGNAMESIZE + 1], fmt[64]; char *mailname = NULL; FILE *stream; int send_mail = 0; From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 14:08:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 30B14106566C; Mon, 8 Oct 2012 14:08:14 +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 1A99A8FC17; Mon, 8 Oct 2012 14:08:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q98E8DNd013663; Mon, 8 Oct 2012 14:08:13 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q98E8DFU013661; Mon, 8 Oct 2012 14:08:13 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201210081408.q98E8DFU013661@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 8 Oct 2012 14:08: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: r241351 - head/sys/modules X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Oct 2012 14:08:14 -0000 Author: obrien Date: Mon Oct 8 14:08:13 2012 New Revision: 241351 URL: http://svn.freebsd.org/changeset/base/241351 Log: Restrict the module to varied environments. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Oct 8 14:05:00 2012 (r241350) +++ head/sys/modules/Makefile Mon Oct 8 14:08:13 2012 (r241351) @@ -108,7 +108,7 @@ SUBDIR= \ fdc \ fdescfs \ ${_fe} \ - filemon \ + ${_filemon} \ firewire \ firmware \ ${_fxp} \ @@ -364,6 +364,10 @@ SUBDIR= \ ${_zfs} \ zlib \ +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +_filemon= filemon +.endif + .if ${MACHINE_CPUARCH} != "powerpc" && ${MACHINE_CPUARCH} != "arm" && \ ${MACHINE_CPUARCH} != "mips" _syscons= syscons From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 16:00:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7DD97106566B; Mon, 8 Oct 2012 16:00:34 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 689858FC08; Mon, 8 Oct 2012 16:00:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q98G0YM8029854; Mon, 8 Oct 2012 16:00:34 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q98G0YYW029851; Mon, 8 Oct 2012 16:00:34 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201210081600.q98G0YYW029851@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 8 Oct 2012 16:00:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241352 - stable/8/usr.bin/find X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Oct 2012 16:00:34 -0000 Author: jilles Date: Mon Oct 8 16:00:33 2012 New Revision: 241352 URL: http://svn.freebsd.org/changeset/base/241352 Log: MFC r240973: find: Do not pass fd to save current directory to child processes. This removes one of the two wrongly passed file descriptors. The other one appears to be from fts(3). Modified: stable/8/usr.bin/find/main.c Directory Properties: stable/8/usr.bin/find/ (props changed) Modified: stable/8/usr.bin/find/main.c ============================================================================== --- stable/8/usr.bin/find/main.c Mon Oct 8 14:08:13 2012 (r241351) +++ stable/8/usr.bin/find/main.c Mon Oct 8 16:00:33 2012 (r241352) @@ -154,7 +154,7 @@ main(int argc, char *argv[]) usage(); *p = NULL; - if ((dotfd = open(".", O_RDONLY, 0)) < 0) + if ((dotfd = open(".", O_RDONLY | O_CLOEXEC, 0)) < 0) err(1, "."); exit(find_execute(find_formplan(argv), start)); From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 16:57:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D0B471065670; Mon, 8 Oct 2012 16:57:05 +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 BAAED8FC0C; Mon, 8 Oct 2012 16:57:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q98Gv5f3037729; Mon, 8 Oct 2012 16:57:05 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q98Gv5fH037726; Mon, 8 Oct 2012 16:57:05 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210081657.q98Gv5fH037726@svn.freebsd.org> From: Alan Cox Date: Mon, 8 Oct 2012 16:57: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: r241353 - in head/sys/i386: i386 xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Oct 2012 16:57:06 -0000 Author: alc Date: Mon Oct 8 16:57:05 2012 New Revision: 241353 URL: http://svn.freebsd.org/changeset/base/241353 Log: In a few places, like the implementation of ptrace(), a thread may call upon pmap_enter() to create a mapping within a different address space, i.e., not the thread's own address space. On i386, this entails the creation of a temporary mapping to the affected page table page (PTP). In general, pmap_enter() will read from this PTP, allocate a PV entry, and write to this PTP. The trouble comes when the system is short of memory. In order to allocate a new PV entry, an older PV entry has to be reclaimed. Reclaiming a PV entry involves destroying a mapping, which requires access to the affected PTP. Thus, the PTP mapped at the beginning of pmap_enter() is no longer mapped at the end of pmap_enter(), which leads to pmap_enter() modifying the wrong PTP. To address this problem, pmap_pv_reclaim() is changed to use an alternate method of mapping PTPs. Update a related comment. Reported by: pho Diagnosed by: kib MFC after: 5 days Modified: head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Mon Oct 8 16:00:33 2012 (r241352) +++ head/sys/i386/i386/pmap.c Mon Oct 8 16:57:05 2012 (r241353) @@ -475,7 +475,8 @@ pmap_bootstrap(vm_paddr_t firstaddr) KPTmap -= i386_btop(KPTDI << PDRSHIFT); /* - * ptemap is used for pmap_pte_quick + * PADDR1 and PADDR2 are used by pmap_pte_quick() and pmap_pte(), + * respectively. */ SYSMAP(pt_entry_t *, PMAP1, PADDR1, 1) SYSMAP(pt_entry_t *, PMAP2, PADDR2, 1) @@ -2228,7 +2229,6 @@ pmap_pv_reclaim(pmap_t locked_pmap) pmap = NULL; free = m_pc = NULL; TAILQ_INIT(&newtail); - sched_pin(); while ((pc = TAILQ_FIRST(&pv_chunks)) != NULL && (pv_vafree == 0 || free == NULL)) { TAILQ_REMOVE(&pv_chunks, pc, pc_lru); @@ -2262,10 +2262,13 @@ pmap_pv_reclaim(pmap_t locked_pmap) pde = pmap_pde(pmap, va); if ((*pde & PG_PS) != 0) continue; - pte = pmap_pte_quick(pmap, va); - if ((*pte & PG_W) != 0) + pte = pmap_pte(pmap, va); + tpte = *pte; + if ((tpte & PG_W) == 0) + tpte = pte_load_clear(pte); + pmap_pte_release(pte); + if ((tpte & PG_W) != 0) continue; - tpte = pte_load_clear(pte); if ((tpte & PG_G) != 0) pmap_invalidate_page(pmap, va); m = PHYS_TO_VM_PAGE(tpte & PG_FRAME); @@ -2323,7 +2326,6 @@ pmap_pv_reclaim(pmap_t locked_pmap) } } out: - sched_unpin(); TAILQ_CONCAT(&pv_chunks, &newtail, pc_lru); if (pmap != NULL) { pmap_invalidate_all(pmap); Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Mon Oct 8 16:00:33 2012 (r241352) +++ head/sys/i386/xen/pmap.c Mon Oct 8 16:57:05 2012 (r241353) @@ -429,7 +429,8 @@ pmap_bootstrap(vm_paddr_t firstaddr) SYSMAP(struct msgbuf *, unused, msgbufp, atop(round_page(msgbufsize))) /* - * ptemap is used for pmap_pte_quick + * PADDR1 and PADDR2 are used by pmap_pte_quick() and pmap_pte(), + * respectively. */ SYSMAP(pt_entry_t *, PMAP1, PADDR1, 1) SYSMAP(pt_entry_t *, PMAP2, PADDR2, 1) @@ -1976,7 +1977,6 @@ pmap_pv_reclaim(pmap_t locked_pmap) pmap = NULL; free = m_pc = NULL; TAILQ_INIT(&newtail); - sched_pin(); while ((pc = TAILQ_FIRST(&pv_chunks)) != NULL && (pv_vafree == 0 || free == NULL)) { TAILQ_REMOVE(&pv_chunks, pc, pc_lru); @@ -2007,10 +2007,13 @@ pmap_pv_reclaim(pmap_t locked_pmap) bit = bsfl(inuse); pv = &pc->pc_pventry[field * 32 + bit]; va = pv->pv_va; - pte = pmap_pte_quick(pmap, va); - if ((*pte & PG_W) != 0) + pte = pmap_pte(pmap, va); + tpte = *pte; + if ((tpte & PG_W) == 0) + tpte = pte_load_clear(pte); + pmap_pte_release(pte); + if ((tpte & PG_W) != 0) continue; - tpte = pte_load_clear(pte); if ((tpte & PG_G) != 0) pmap_invalidate_page(pmap, va); m = PHYS_TO_VM_PAGE(tpte & PG_FRAME); @@ -2062,7 +2065,6 @@ pmap_pv_reclaim(pmap_t locked_pmap) } } out: - sched_unpin(); TAILQ_CONCAT(&pv_chunks, &newtail, pc_lru); if (pmap != NULL) { pmap_invalidate_all(pmap); From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 17:50:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 636C6106566C; Mon, 8 Oct 2012 17:50:40 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id 1A0E88FC14; Mon, 8 Oct 2012 17:50:39 +0000 (UTC) Received: from sa-nc-cs-116.static.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id q98HocJJ083517 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 8 Oct 2012 10:50:39 -0700 (PDT) (envelope-from marcel@xcllnt.net) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) From: Marcel Moolenaar In-Reply-To: <20121008165228.F7997@besplex.bde.org> Date: Mon, 8 Oct 2012 10:50:33 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <965E2363-6866-4A10-A7B1-C428B3C78925@xcllnt.net> References: <201210062001.q96K16Or030755@svn.freebsd.org> <20121007161440.C7605@besplex.bde.org> <81CB9A3A-4BFF-41B2-A1F9-3721A40F6260@xcllnt.net> <20121008165228.F7997@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1499) Cc: "svn-src-head@FreeBSD.org" , "svn-src-all@FreeBSD.org" , "src-committers@FreeBSD.org" , Simon Gerraty Subject: Re: svn commit: r241298 - in head: . gnu/usr.bin/cc/cc_int gnu/usr.bin/cc/include kerberos5 kerberos5/tools/asn1_compile kerberos5/tools/slc lib/clang/include share/mk tools/build/make_check usr.sbin/c... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 08 Oct 2012 17:50:40 -0000 On Oct 8, 2012, at 1:08 AM, Bruce Evans wrote: > On Sun, 7 Oct 2012, Marcel Moolenaar wrote: >=20 >> On Oct 6, 2012, at 10:31 PM, Bruce Evans = wrote: >>=20 >>> On Sat, 6 Oct 2012, Marcel Moolenaar wrote: >>>=20 >>>> Log: >>>> Add support for bmake. This includes: >>>> .... >>>> Modified: head/share/mk/bsd.dep.mk >>>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>>> --- head/share/mk/bsd.dep.mk Sat Oct 6 19:57:27 2012 = (r241297) >>>> +++ head/share/mk/bsd.dep.mk Sat Oct 6 20:01:05 2012 = (r241298) >>>> @@ -102,8 +102,8 @@ ${_YC} y.tab.h: ${_YSRC} >>>> CLEANFILES+=3D y.tab.c y.tab.h >>>> .elif !empty(YFLAGS:M-d) >>>> .for _YH in ${_YC:R}.h >>>> -.ORDER: ${_YC} ${_YH} >>>> -${_YC} ${_YH}: ${_YSRC} >>>> +${_YH}: ${_YC} >>>> +${_YC}: ${_YSRC} >>>> ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC} >>>> SRCS+=3D ${_YH} >>>> CLEANFILES+=3D ${_YH} >>>=20 >>> This is broken. Yacc headers don't depend on generated yacc .c = files. >>> Now there is only a null rule to create the headers. One broken = case >>> is when the header somehow gets deleted. It bcomes out of date, but >>> running make to update it only runs the null rule, so it remains >>> nonexistent. >>=20 >> The problem with the old rule is that it's broken as well. The >> change attempts to fix a real parallel build problem. Your >> comment is valid though. What about the following (possibly >> white-space corrupted) patch from Simon: >=20 > What's wrong with the old rule? It uses the .ORDER directive to force > creation of the 2 generated files in sequential order, so that = parallel > builds can't happen. Since the source file is re-created when the header is created, any parallel work done with the C file is a problem. At HP, where we used clearcase & clearmake, we had to create an intermediate tarfile, the result of the yacc(1) rule and then have the .h and .c file depend on the tarfile. Each got unique created by extracting only ${.TARGET}. Roughly and loosely speaking: .tar: .y yacc and create tar file .c: .tar tar x y.tab.c .h: .tar tar x y.tab.h I think something like this is the only way to get something that's 100% correct. --=20 Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-all@FreeBSD.ORG Mon Oct 8 18:33:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5F0011065670; Mon, 8 Oct 2012 18:33:09 +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 49A1E8FC14; Mon, 8 Oct 2012 18:33:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q98IX90O050574; Mon, 8 Oct 2012 18:33:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q98IX9wW050572; Mon, 8 Oct 2012 18:33:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201210081833.q98IX9wW050572@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 8 Oct 2012 18:33: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: r241356 - head/sys/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, 08 Oct 2012 18:33:09 -0000 Author: kib Date: Mon Oct 8 18:33:08 2012 New Revision: 241356 URL: http://svn.freebsd.org/changeset/base/241356 Log: Add several asserts to i386 pmap, which mostly state that pv entry shall have corresponding pte. Reviewed by: alc Tested by: pho MFC after: 3 days Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Mon Oct 8 17:27:54 2012 (r241355) +++ head/sys/i386/i386/pmap.c Mon Oct 8 18:33:08 2012 (r241356) @@ -2269,6 +2269,9 @@ pmap_pv_reclaim(pmap_t locked_pmap) pmap_pte_release(pte); if ((tpte & PG_W) != 0) continue; + KASSERT(tpte != 0, + ("pmap_pv_reclaim: pmap %p va %x zero pte", + pmap, va)); if ((tpte & PG_G) != 0) pmap_invalidate_page(pmap, va); m = PHYS_TO_VM_PAGE(tpte & PG_FRAME); @@ -2865,6 +2868,8 @@ pmap_remove_pte(pmap_t pmap, pt_entry_t rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); oldpte = pte_load_clear(ptq); + KASSERT(oldpte != 0, + ("pmap_remove_pte: pmap %p va %x zero pte", pmap, va)); if (oldpte & PG_W) pmap->pm_stats.wired_count -= 1; /* @@ -3069,6 +3074,8 @@ small_mappings: " a 4mpage in page %p's pv list", m)); pte = pmap_pte_quick(pmap, pv->pv_va); tpte = pte_load_clear(pte); + KASSERT(tpte != 0, ("pmap_remove_all: pmap %p va %x zero pte", + pmap, pv->pv_va)); if (tpte & PG_W) pmap->pm_stats.wired_count--; if (tpte & PG_A) @@ -4368,6 +4375,8 @@ pmap_remove_pages(pmap_t pmap) PMAP_LOCK(pmap); sched_pin(); TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { + KASSERT(pc->pc_pmap == pmap, ("Wrong pmap %p %p", pmap, + pc->pc_pmap)); allfree = 1; for (field = 0; field < _NPCM; field++) { inuse = ~pc->pc_map[field] & pc_freemask[field]; From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 09:19:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D775A827 for ; Tue, 9 Oct 2012 09:19:07 +0000 (UTC) (envelope-from vicky@goldsuno.com) Received: from hw-hk50.sino-i.com (hw-hk50.sino-i.com [63.219.16.50]) by mx1.freebsd.org (Postfix) with SMTP id 175E08FC0A for ; Tue, 9 Oct 2012 09:19:05 +0000 (UTC) Received: (ce send program); Tue, 09 Oct 2012 17:17:45 +0800 Received: from 123.100.7.94 (HELO smtp.zmail.net.cn) (123.100.7.94) by 63.219.16.50 with SMTP; Tue, 09 Oct 2012 17:17:45 +0800 Received: (ce send program); Tue, 09 Oct 2012 17:17:45 +0800 X-CE-MAILC: huvh=fmicqrmm{bmj| X-EYOUMAIL-SMTPAUTH: vicky@goldsuno.com Received: from 123.100.1.157 (HELO vicky) (123.100.1.157) by 123.100.7.121 with SMTP; Tue, 09 Oct 2012 17:17:45 +0800 Received: from [27.46.122.91] by 123.100.5.27 with surfront esmtp id 433481108097965; Tue, 9 Oct 2012 17:05:49 +0800 (CST) Date: Tue, 9 Oct 2012 17:18:37 +0800 From: "vicky" To: "svn-src-all" Subject: Welcome to our booth 5E-G37, HKTDC Hong Kong International Lighting Fair 2012(Autumn Edition). Message-ID: <201210091702005313478@goldsuno.com> Organization: goldsuno X-mailer: Foxmail 6, 15, 201, 22 [cn] Mime-Version: 1.0 Content-Type: multipart/related; boundary="=====002_Dragon775063833888_====="; type="multipart/alternative" X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 09:19:07 -0000 This is a multi-part message in MIME format. --=====002_Dragon775063833888_===== Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 SGVsbG8sDQoNClRoaXMgaXMgdmlja3kgZnJvbSBnb2xkc3Vuby53ZSBhcmUgdGhlIHByb2Zlc3Np b25hbCBMRUQgaW50ZXJpb3IgbGlnaHRpbmcgc3VwcGxpZXIgaW4gQ2hpbmEuDQoNCldlIGFyZSBk ZXNpcm91cyB0byBlbnRlciBpbnRvIGJ1c2luZXNzIHJlbGF0aW9ucyB3aXRoIHlvdXIgY29tcGFu eS4NCg0KT3VyIGhvbWVwYWdlIGlzIHd3dy5kb3dubGlnaHRzLWxlZC5jb20gIHlvdSBjYW4gYnJv d3NlIGl0IHRvIGdldCBtb3JlIGluZm9ybWF0aW9uLg0KSGVyZSBJIHNlbnQgeW91IGFuIEUtaW52 aXRhdGlvbiBvZiB0aGUgIkhLVERDIEhvbmcgS29uZyBJbnRlcm5hdGlvbmFsIExpZ2h0aW5nIEZh aXIgMjAxMiAoQXV0dW1uIEVkaXRpb24pICIuDQoNCg0KRmFpciBEZXRhaWxzDQoNCkZhaXIgRGF0 ZXM6ICAgICAgMjctMzAgT2N0b2JlciAyMDEyIChTYXR1cmRheSAtIFR1ZXNkYXkpDQoNClZlbnVl OiAgICAgICAgICAgICBIb25nIEtvbmcgQ29udmVudGlvbiBhbmQgRXhoaWJpdGlvbiBDZW50cmUg DQogICAgICAgICAgICAgICAgICAgICAgICAgMSBFeHBvIERyaXZlLCBXYW5jaGFpLCBIb25nIEtv bmcgKEhhcmJvdXIgUm9hZCBFbnRyYW5jZSkNCg0KT3BlbmluZyBIb3VyOiAgRmFpciBEYXRlT3Bl bmluZyBIb3Vyc0J1eWVyIFJlZ2lzdHJhdGlvbiBIb3Vycw0KMjcgLSAyOSBPY3RvYmVyDQooU2F0 IKhDIE1vbik5OjMwYW0gqEMgNzowMHBtOWFtLTY6MzBwbQ0KMzAgT2N0b2JlciAoVHVlKTk6MzBh bSCoQyA0OjAwcG05YW0tMjozMHBtDQoNCg0KV2UgdHJlYXN1cmUgZXZlcnkgb3Bwb3J0dW5pdHkg dG8gbWVldCB3aXRoIHlvdSwgb3VyIHZhbHVlZCBjdXN0b21lci4gV2UgY29yZGlhbGx5IGludml0 ZSB5b3UgdG8gdmlzaXQgdXMuIA0KT3VyIGJvb3RoIG51bWJlciBpcyA1RS1HMzcuDQoNClRoYW5r cw0KDQpCZXN0IFJlZ2FyZHMsDQoNCjIwMTItMTAtMDkgDQoNCg0KDQp2aWNreQ0KLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLQ0KU2hlbnpoZW4gR29sZHN1bm8gT3B0b2VsZWN0cm9uaWNzIFRlY2hub2xvZ3kg Q28uLCBMdGQuIA0KQWRkOjUzdGggSW5kdXN0cnkgUnVudGFuZyBGdW1pbiBHdWFubGFuIEJhbydh biBTaGVuemhlbiBDaGluYSA1MTgxMTANCk1vYmlsZTorODYtMTU4MTg3MTc0MDkgICAgVGVsOis4 Ni03NTUtMjgwMjg1MDkgICBGYXg6Kzg2LTc1NS0yODAyNTk4NA0KU2t5cGU6dmlja3kyMDA4NzYx NiAgICBNU046dmlja3kyMDA4MDFAbGl2ZS5jbg0Kd3d3LmdvbGRzdW5vLmNvbQ0Kd3d3LmRvd25s aWdodHMtbGVkLmNvbQ0K --=====002_Dragon775063833888_=====-- From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 06:29:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CD270C6; Tue, 9 Oct 2012 06:29:03 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E07390308; Mon, 8 Oct 2012 23:02:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q98N2ZtP084962; Mon, 8 Oct 2012 23:02:35 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q98N2ZGD084958; Mon, 8 Oct 2012 23:02:35 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201210082302.q98N2ZGD084958@svn.freebsd.org> From: Devin Teske Date: Mon, 8 Oct 2012 23:02:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241361 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 06:29:13 -0000 Author: dteske Date: Mon Oct 8 23:02:35 2012 New Revision: 241361 URL: http://svn.freebsd.org/changeset/base/241361 Log: Add an echo to say we're "Booting..." when the overloaded "boot" Ficl word is executed to better differentiate between loader-specific errors and kernel- specific errors (if ever any of either). This type of functionality hasn't been required before the introduction of the advanced menu system (r222417). Adding this functionality will help different- iate errors at the loader-level such as a BTX halt caused by heap exhaustion and errors that may be involved with executing the kernel (wrong architecture for example). A user can learn that messages before "Booting..." are related to the loader(8) environment and it's Forth-ilk, while those after are not related to loader(8) -- the point that loader(8) has ``left the building''. This patch also includes a man-page update to color.4th(8) as the color logic moves to a lower-level (from being included by beastie.4th to being included by loader.4th). After noticing a delay between execution of the overloaded "boot" FICL word and the display of text on-screen, gcooper confirmed that the introduction of a builtin memory test (disabled by adding hw.memtest.tests="0" to loader.conf(5)) was the cause of the delay. This patch adds an echo to produce "Booting..." when the overloaded "boot" word is executed (this includes from the interactive command-prompt on all arches, from the menu system on arches that run the beastie menu, and even those arches that run the menu but disable it by setting beastie_disable="YES" in loader.conf(5)). When loader_color="YES" in loader.conf(5), the same message is produced but in white text on a blue background (only the letters produced have this background -- opposed to perhaps the entire line). Modified: head/sys/boot/forth/beastie.4th head/sys/boot/forth/color.4th.8 head/sys/boot/forth/loader.4th Modified: head/sys/boot/forth/beastie.4th ============================================================================== --- head/sys/boot/forth/beastie.4th Mon Oct 8 23:02:32 2012 (r241360) +++ head/sys/boot/forth/beastie.4th Mon Oct 8 23:02:35 2012 (r241361) @@ -28,7 +28,6 @@ marker task-beastie.4th -include /boot/color.4th include /boot/delay.4th variable logoX Modified: head/sys/boot/forth/color.4th.8 ============================================================================== --- head/sys/boot/forth/color.4th.8 Mon Oct 8 23:02:32 2012 (r241360) +++ head/sys/boot/forth/color.4th.8 Mon Oct 8 23:02:35 2012 (r241361) @@ -50,7 +50,7 @@ through the command: .Dl include color.4th .Pp This line is present in -.Pa /boot/beastie.4th +.Pa /boot/loader.4th file, so it is not needed (and should not be re-issued) in a normal setup. .Pp The commands provided by it are: @@ -102,7 +102,6 @@ loader_color="YES" .Sh SEE ALSO .Xr loader.conf 5 , .Xr loader 8 , -.Xr beastie.4th 8 , .Xr loader.4th 8 .Sh HISTORY The Modified: head/sys/boot/forth/loader.4th ============================================================================== --- head/sys/boot/forth/loader.4th Mon Oct 8 23:02:32 2012 (r241360) +++ head/sys/boot/forth/loader.4th Mon Oct 8 23:02:35 2012 (r241361) @@ -40,6 +40,7 @@ s" arch-i386" environment? [if] [if] 2048 dictincrease ! \ 2048 additional cells each time include /boot/support.4th +include /boot/color.4th only forth also support-functions also builtins definitions @@ -64,6 +65,12 @@ only forth also support-functions also b : boot 0= if ( interpreted ) get_arguments then + loader_color? if + ." Booting..." cr + else + ." Booting..." cr + then + \ Unload only if a path was passed dup if >r over r> swap From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 06:29:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A3637571; Tue, 9 Oct 2012 06:29:18 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77469902F5; Mon, 8 Oct 2012 22:58:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q98MwTw2084378; Mon, 8 Oct 2012 22:58:29 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q98MwSQG084374; Mon, 8 Oct 2012 22:58:28 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210082258.q98MwSQG084374@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 8 Oct 2012 22:58:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241359 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 06:29:18 -0000 Author: glebius Date: Mon Oct 8 22:58:28 2012 New Revision: 241359 URL: http://svn.freebsd.org/changeset/base/241359 Log: Catch up with r241245 and do not return packet back in host byte order. Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_pfil.c Mon Oct 8 22:38:15 2012 (r241358) +++ head/sys/netpfil/ipfw/ip_fw_pfil.c Mon Oct 8 22:58:28 2012 (r241359) @@ -138,11 +138,8 @@ again: if (tag != NULL) { args.rule = *((struct ipfw_rule_ref *)(tag+1)); m_tag_delete(*m0, tag); - if (args.rule.info & IPFW_ONEPASS) { - if (mtod(*m0, struct ip *)->ip_v == 4) - SET_HOST_IPLEN(mtod(*m0, struct ip *)); + if (args.rule.info & IPFW_ONEPASS) return (0); - } } args.m = *m0; From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 06:32:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EC81D1078; Tue, 9 Oct 2012 06:32:26 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B91348FC1D; Tue, 9 Oct 2012 06:32:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q996FGcg051580; Tue, 9 Oct 2012 06:15:16 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q996FGxQ051576; Tue, 9 Oct 2012 06:15:16 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201210090615.q996FGxQ051576@svn.freebsd.org> From: Kevin Lo Date: Tue, 9 Oct 2012 06:15:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241369 - in head/sys: dev/arcmsr netgraph/netflow netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 06:32:27 -0000 Author: kevlo Date: Tue Oct 9 06:15:16 2012 New Revision: 241369 URL: http://svn.freebsd.org/changeset/base/241369 Log: Fix typo: s/unknow/unknown Modified: head/sys/dev/arcmsr/arcmsr.c head/sys/netgraph/netflow/ng_netflow.c head/sys/netpfil/ipfw/ip_dn_glue.c Modified: head/sys/dev/arcmsr/arcmsr.c ============================================================================== --- head/sys/dev/arcmsr/arcmsr.c Tue Oct 9 05:06:30 2012 (r241368) +++ head/sys/dev/arcmsr/arcmsr.c Tue Oct 9 06:15:16 2012 (r241369) @@ -753,11 +753,11 @@ static void arcmsr_report_srb_state(stru } break; default: - printf("arcmsr%d: scsi id=%d lun=%d isr got command error done,but got unknow DeviceStatus=0x%x \n" + printf("arcmsr%d: scsi id=%d lun=%d isr got command error done,but got unknown DeviceStatus=0x%x \n" , acb->pci_unit, target, lun ,srb->arcmsr_cdb.DeviceStatus); acb->devstate[target][lun]=ARECA_RAID_GONE; srb->pccb->ccb_h.status |= CAM_UNCOR_PARITY; - /*unknow error or crc error just for retry*/ + /*unknown error or crc error just for retry*/ arcmsr_srb_complete(srb, 1); break; } @@ -1789,7 +1789,7 @@ static void arcmsr_interrupt(struct Adap break; default: printf("arcmsr%d: interrupt service," - " unknow adapter type =%d\n", acb->pci_unit, acb->adapter_type); + " unknown adapter type =%d\n", acb->pci_unit, acb->adapter_type); break; } } Modified: head/sys/netgraph/netflow/ng_netflow.c ============================================================================== --- head/sys/netgraph/netflow/ng_netflow.c Tue Oct 9 05:06:30 2012 (r241368) +++ head/sys/netgraph/netflow/ng_netflow.c Tue Oct 9 06:15:16 2012 (r241369) @@ -832,7 +832,7 @@ ng_netflow_rcvdata (hook_p hook, item_p goto loopend; #endif /* - * Any unknow header (new extension or IPv6/IPv4 + * Any unknown header (new extension or IPv6/IPv4 * header for tunnels) ends loop. */ default: Modified: head/sys/netpfil/ipfw/ip_dn_glue.c ============================================================================== --- head/sys/netpfil/ipfw/ip_dn_glue.c Tue Oct 9 05:06:30 2012 (r241368) +++ head/sys/netpfil/ipfw/ip_dn_glue.c Tue Oct 9 06:15:16 2012 (r241369) @@ -315,10 +315,10 @@ static size_t pipesizemax8 = sizeof(stru /* Indicate 'ipfw' version * 1: from FreeBSD 7.2 * 0: from FreeBSD 8 - * -1: unknow (for now is unused) + * -1: unknown (for now is unused) * * It is update when a IP_DUMMYNET_DEL or IP_DUMMYNET_CONFIGURE request arrives - * NOTE: if a IP_DUMMYNET_GET arrives and the 'ipfw' version is unknow, + * NOTE: if a IP_DUMMYNET_GET arrives and the 'ipfw' version is unknown, * it is suppose to be the FreeBSD 8 version. */ static int is7 = 0; From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 06:32:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3BF1D107B; Tue, 9 Oct 2012 06:32:27 +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 1EA7C8FC20; Tue, 9 Oct 2012 06:32:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9956UMS041278; Tue, 9 Oct 2012 05:06:30 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9956U2Z041272; Tue, 9 Oct 2012 05:06:30 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201210090506.q9956U2Z041272@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 9 Oct 2012 05:06:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241368 - in stable/8: tools/regression/usr.bin/make tools/regression/usr.bin/make/variables/modifier_t tools/regression/usr.bin/make/variables/opt_V usr.bin/make X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 06:32:27 -0000 Author: obrien Date: Tue Oct 9 05:06:30 2012 New Revision: 241368 URL: http://svn.freebsd.org/changeset/base/241368 Log: MF9: r237100: MFC r236338, r236339, r236346, r236347, r236365, & r236977 * Deprecate the FreeBSD 10's make's ":U" (to-upper case) and ":L" (to-lower case) modifiers for ":tu" and ":tl". * make it easier to test newly-built make. * Add "-V '${VAR}'" variable expansion from Portable Berkeley Make. * regression test for '-V' command line option and the :t[lu] modifiers. MF9: r241364: Update MAKE_VERSION for r237100. MFC: r201225: add missing `void' keyword. Added: stable/8/tools/regression/usr.bin/make/test-new.mk - copied unchanged from r237100, stable/9/tools/regression/usr.bin/make/test-new.mk stable/8/tools/regression/usr.bin/make/variables/modifier_t/ - copied from r237100, stable/9/tools/regression/usr.bin/make/variables/modifier_t/ stable/8/tools/regression/usr.bin/make/variables/opt_V/ - copied from r237100, stable/9/tools/regression/usr.bin/make/variables/opt_V/ Modified: stable/8/usr.bin/make/Makefile stable/8/usr.bin/make/job.c stable/8/usr.bin/make/make.1 stable/8/usr.bin/make/var.c Directory Properties: stable/8/ (props changed) stable/8/tools/ (props changed) stable/8/tools/regression/usr.bin/ (props changed) stable/8/tools/regression/usr.bin/make/all.sh (props changed) stable/8/tools/regression/usr.bin/make/common.sh (props changed) stable/8/usr.bin/ (props changed) stable/8/usr.bin/make/ (props changed) Copied: stable/8/tools/regression/usr.bin/make/test-new.mk (from r237100, stable/9/tools/regression/usr.bin/make/test-new.mk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/usr.bin/make/test-new.mk Tue Oct 9 05:06:30 2012 (r241368, copy of r237100, stable/9/tools/regression/usr.bin/make/test-new.mk) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +NEW_DIR!= make -C ${.CURDIR}/../../../../usr.bin/make -V .OBJDIR + +all: + rm -rf /tmp/${USER}.make.test + env MAKE_PROG=${NEW_DIR}/make ${.SHELL} ./all.sh + +.include Modified: stable/8/usr.bin/make/Makefile ============================================================================== --- stable/8/usr.bin/make/Makefile Tue Oct 9 03:54:53 2012 (r241367) +++ stable/8/usr.bin/make/Makefile Tue Oct 9 05:06:30 2012 (r241368) @@ -11,7 +11,9 @@ SRCS= arch.c buf.c cond.c dir.c for.c ha WARNS?= 6 NO_SHARED?= YES -CFLAGS+=-DMAKE_VERSION=\"5200408120\" +# Version has the RYYYYMMDDX format, where R is from RELENG_ +CFLAGS+=-DMAKE_VERSION=\"8201210080\" + # There is no obvious performance improvement currently. # CFLAGS+=-DUSE_KQUEUE Modified: stable/8/usr.bin/make/job.c ============================================================================== --- stable/8/usr.bin/make/job.c Tue Oct 9 03:54:53 2012 (r241367) +++ stable/8/usr.bin/make/job.c Tue Oct 9 05:06:30 2012 (r241368) @@ -485,7 +485,7 @@ catch_child(int sig __unused) /** */ void -Proc_Init() +Proc_Init(void) { /* * Catch SIGCHLD so that we get kicked out of select() when we Modified: stable/8/usr.bin/make/make.1 ============================================================================== --- stable/8/usr.bin/make/make.1 Tue Oct 9 03:54:53 2012 (r241367) +++ stable/8/usr.bin/make/make.1 Tue Oct 9 05:06:30 2012 (r241368) @@ -32,7 +32,7 @@ .\" @(#)make.1 8.8 (Berkeley) 6/13/95 .\" $FreeBSD$ .\" -.Dd November 5, 2011 +.Dd May 30, 2012 .Dt MAKE 1 .Os .Sh NAME @@ -290,6 +290,11 @@ Do not build any targets. Multiple instances of this option may be specified; the variables will be printed one per line, with a blank line for each null or undefined variable. +If +.Ar variable +contains a +.Sq Ic $ +then the value will be expanded before printing. .It Fl v Be extra verbose. Print any extra information. @@ -873,6 +878,7 @@ Replaces each word in the variable with .It Cm L Converts variable to lower-case letters. .It Cm M Ns Ar pattern +(deprecated) Select only those words that match the rest of the modifier. The standard shell wildcard characters .Pf ( Ql * , @@ -963,8 +969,13 @@ to be replaced in .Ar new_string . .It Cm T Replaces each word in the variable with its last component. +.It Cm tl +Converts variable to lower-case letters. +.It Cm tu +Converts variable to upper-case letters. .It Cm U Converts variable to upper-case letters. +(deprecated) .It Cm u Remove adjacent duplicate words (like .Xr uniq 1 ) . @@ -1711,6 +1722,19 @@ is set to the same value as .Va .MAKE ; support for this may be removed in the future. .Pp +The use of the +.Cm :L +and +.Cm :U +modifiers will be deprecated +in +.Fx 10.0 +and the more portable (among Pmake decedents) +.Cm :tl +and +.Cm :tu +should be used instead. +.Pp Most of the more esoteric features of .Nm should probably be avoided for greater compatibility. Modified: stable/8/usr.bin/make/var.c ============================================================================== --- stable/8/usr.bin/make/var.c Tue Oct 9 03:54:53 2012 (r241367) +++ stable/8/usr.bin/make/var.c Tue Oct 9 05:06:30 2012 (r241368) @@ -1748,6 +1748,19 @@ ParseModifier(VarParser *vp, char startc case 'C': newStr = modifier_C(vp, value, v); break; + case 't': + /* :tl :tu for OSF ODE & NetBSD make compatibility */ + switch (vp->ptr[1]) { + case 'l': + vp->ptr++; + goto mod_lower; + break; + case 'u': + vp->ptr++; + goto mod_upper; + break; + } + /* FALLTHROUGH */ default: if (vp->ptr[1] != endc && vp->ptr[1] != ':') { #ifdef SUNSHCMD @@ -1776,6 +1789,7 @@ ParseModifier(VarParser *vp, char startc switch (vp->ptr[0]) { case 'L': + mod_lower: { const char *cp; Buffer *buf; @@ -1801,6 +1815,7 @@ ParseModifier(VarParser *vp, char startc vp->ptr++; break; case 'U': + mod_upper: { const char *cp; Buffer *buf; @@ -2580,7 +2595,7 @@ void Var_Print(Lst *vlist, Boolean expandVars) { LstNode *n; - const char *name; + char *name; LST_FOREACH(n, vlist) { name = Lst_Datum(n); @@ -2588,13 +2603,17 @@ Var_Print(Lst *vlist, Boolean expandVars char *value; char *v; - v = emalloc(strlen(name) + 1 + 3); - sprintf(v, "${%s}", name); - + if (*name == '$') { + v = name; + } else { + v = emalloc(strlen(name) + 1 + 3); + sprintf(v, "${%s}", name); + } value = Buf_Peel(Var_Subst(v, VAR_GLOBAL, FALSE)); printf("%s\n", value); - free(v); + if (v != name) + free(v); free(value); } else { const char *value = Var_Value(name, VAR_GLOBAL); From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 06:32:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C6DC107D; Tue, 9 Oct 2012 06:32:27 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 633C48FC21; Tue, 9 Oct 2012 06:32:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q993sruf026363; Tue, 9 Oct 2012 03:54:53 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q993srnT026361; Tue, 9 Oct 2012 03:54:53 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201210090354.q993srnT026361@svn.freebsd.org> From: Devin Teske Date: Tue, 9 Oct 2012 03:54:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241367 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 06:32:27 -0000 Author: dteske Date: Tue Oct 9 03:54:53 2012 New Revision: 241367 URL: http://svn.freebsd.org/changeset/base/241367 Log: Fix a typo (s/prefix/suffix/) and comment. NOTE: This is in an unused portion of the menu framework. Reviewed by: eadler, adrian (co-mentor) Approved by: adrian (co-mentor) Modified: head/sys/boot/forth/menu-commands.4th Modified: head/sys/boot/forth/menu-commands.4th ============================================================================== --- head/sys/boot/forth/menu-commands.4th Tue Oct 9 03:41:59 2012 (r241366) +++ head/sys/boot/forth/menu-commands.4th Tue Oct 9 03:54:53 2012 (r241367) @@ -164,8 +164,8 @@ marker task-menu-commands.4th @ \ dereference address into value 48 + \ convert to ASCII numeral - s" set root=${root_prefix}${root[N]}${root_prefix}" - \ command to assemble full kernel-path + s" set root=${root_prefix}${root[N]}${root_suffix}" + \ command to assemble root image-path -rot tuck 30 + c! swap \ replace 'N' with array index value evaluate \ sets $kernel to full kernel-path From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 06:32:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A9695107E; Tue, 9 Oct 2012 06:32:27 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 769868FC22; Tue, 9 Oct 2012 06:32:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q993fxM4024283; Tue, 9 Oct 2012 03:41:59 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q993fx8F024277; Tue, 9 Oct 2012 03:41:59 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201210090341.q993fx8F024277@svn.freebsd.org> From: Sean Bruno Date: Tue, 9 Oct 2012 03:41:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241366 - stable/9/sys/dev/e1000 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 06:32:27 -0000 Author: sbruno Date: Tue Oct 9 03:41:59 2012 New Revision: 241366 URL: http://svn.freebsd.org/changeset/base/241366 Log: MFC r240879 This patch fixes a nit in the em, lem, and igb driver statistics. Increment adapter->dropped_pkts instead of if_ierrors because if_ierrors is overwritten by hw stats collection. Submitted by: Andrew Boyer Reviewed by: Jack F Vogel Modified: stable/9/sys/dev/e1000/if_em.c stable/9/sys/dev/e1000/if_igb.c stable/9/sys/dev/e1000/if_lem.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) Modified: stable/9/sys/dev/e1000/if_em.c ============================================================================== --- stable/9/sys/dev/e1000/if_em.c Tue Oct 9 03:11:15 2012 (r241365) +++ stable/9/sys/dev/e1000/if_em.c Tue Oct 9 03:41:59 2012 (r241366) @@ -4434,7 +4434,7 @@ em_rxeof(struct rx_ring *rxr, int count, if ((cur->errors & E1000_RXD_ERR_FRAME_ERR_MASK) || (rxr->discard == TRUE)) { - ifp->if_ierrors++; + adapter->dropped_pkts++; ++rxr->rx_discarded; if (!eop) /* Catch subsequent segs */ rxr->discard = TRUE; Modified: stable/9/sys/dev/e1000/if_igb.c ============================================================================== --- stable/9/sys/dev/e1000/if_igb.c Tue Oct 9 03:11:15 2012 (r241365) +++ stable/9/sys/dev/e1000/if_igb.c Tue Oct 9 03:41:59 2012 (r241366) @@ -4752,7 +4752,7 @@ igb_rxeof(struct igb_queue *que, int cou /* Make sure all segments of a bad packet are discarded */ if (((staterr & E1000_RXDEXT_ERR_FRAME_ERR_MASK) != 0) || (rxr->discard)) { - ifp->if_ierrors++; + adapter->dropped_pkts++; ++rxr->rx_discarded; if (!eop) /* Catch subsequent segs */ rxr->discard = TRUE; Modified: stable/9/sys/dev/e1000/if_lem.c ============================================================================== --- stable/9/sys/dev/e1000/if_lem.c Tue Oct 9 03:11:15 2012 (r241365) +++ stable/9/sys/dev/e1000/if_lem.c Tue Oct 9 03:41:59 2012 (r241366) @@ -3597,7 +3597,7 @@ skip: adapter->lmp = NULL; } } else { - ifp->if_ierrors++; + adapter->dropped_pkts++; discard: /* Reuse loaded DMA map and just update mbuf chain */ mp = adapter->rx_buffer_area[i].m_head; From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 06:32:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E52F91081; Tue, 9 Oct 2012 06:32:27 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB1158FC26; Tue, 9 Oct 2012 06:32:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q993BGIO019899; Tue, 9 Oct 2012 03:11:16 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q993BGGB019897; Tue, 9 Oct 2012 03:11:16 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201210090311.q993BGGB019897@svn.freebsd.org> From: Devin Teske Date: Tue, 9 Oct 2012 03:11:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241365 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 06:32:28 -0000 Author: dteske Date: Tue Oct 9 03:11:15 2012 New Revision: 241365 URL: http://svn.freebsd.org/changeset/base/241365 Log: Fix an oversight that cyclic menu items actually are zero-based and can accommodate 10 different states. Reviewed by: eadler, adrian (co-mentor) Approved by: adrian (co-mentor) Modified: head/sys/boot/forth/menu.4th Modified: head/sys/boot/forth/menu.4th ============================================================================== --- head/sys/boot/forth/menu.4th Tue Oct 9 02:52:56 2012 (r241364) +++ head/sys/boot/forth/menu.4th Tue Oct 9 03:11:15 2012 (r241365) @@ -935,23 +935,23 @@ create init_text8 255 allot s" menu_caption[x][y]" \ cycle_menuitem caption -rot 2dup 13 + c! rot \ replace 'x' - 49 -rot + 48 -rot begin 16 2over rot + c! \ replace 'y' 2dup unsetenv - rot 1+ dup 56 > 2swap rot + rot 1+ dup 57 > 2swap rot until 2drop drop s" ansi_caption[x][y]" \ cycle_menuitem ANSI caption -rot 2dup 13 + c! rot \ replace 'x' - 49 -rot + 48 -rot begin 16 2over rot + c! \ replace 'y' 2dup unsetenv - rot 1+ dup 56 > 2swap rot + rot 1+ dup 57 > 2swap rot until 2drop drop From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 12:22:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A5A6B154; Tue, 9 Oct 2012 12:22:44 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8AD458FC16; Tue, 9 Oct 2012 12:22:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q99CMiNL003876; Tue, 9 Oct 2012 12:22:44 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q99CMixu003864; Tue, 9 Oct 2012 12:22:44 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201210091222.q99CMixu003864@svn.freebsd.org> From: Attilio Rao Date: Tue, 9 Oct 2012 12:22:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241371 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 sparc64/include sparc64/sparc64 x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 12:22:44 -0000 Author: attilio Date: Tue Oct 9 12:22:43 2012 New Revision: 241371 URL: http://svn.freebsd.org/changeset/base/241371 Log: Reverts r234074,234105,234564,234723,234989,235231-235232 and part of r234247. Use, instead, the static intializer introduced in r239923 for x86 and sparc64 intr_cpus, unwinding the code to the initial version. Reviewed by: marius Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/include/intr_machdep.h head/sys/i386/i386/machdep.c head/sys/i386/i386/mp_machdep.c head/sys/i386/include/intr_machdep.h head/sys/pc98/pc98/machdep.c head/sys/sparc64/include/intr_machdep.h head/sys/sparc64/sparc64/intr_machdep.c head/sys/sparc64/sparc64/machdep.c head/sys/x86/x86/intr_machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Tue Oct 9 08:27:40 2012 (r241370) +++ head/sys/amd64/amd64/machdep.c Tue Oct 9 12:22:43 2012 (r241371) @@ -298,11 +298,6 @@ cpu_startup(dummy) vm_pager_bufferinit(); cpu_setregs(); - - /* - * Add BSP as an interrupt target. - */ - intr_add_cpu(0); } /* Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Tue Oct 9 08:27:40 2012 (r241370) +++ head/sys/amd64/amd64/mp_machdep.c Tue Oct 9 12:22:43 2012 (r241371) @@ -784,6 +784,8 @@ init_secondary(void) * We tell the I/O APIC code about all the CPUs we want to receive * interrupts. If we don't want certain CPUs to receive IRQs we * can simply not tell the I/O APIC code about them in this function. + * We also do not tell it about the BSP since it tells itself about + * the BSP internally to work with UP kernels and on UP machines. */ static void set_interrupt_apic_ids(void) @@ -794,6 +796,8 @@ set_interrupt_apic_ids(void) apic_id = cpu_apic_ids[i]; if (apic_id == -1) continue; + if (cpu_info[apic_id].cpu_bsp) + continue; if (cpu_info[apic_id].cpu_disabled) continue; Modified: head/sys/amd64/include/intr_machdep.h ============================================================================== --- head/sys/amd64/include/intr_machdep.h Tue Oct 9 08:27:40 2012 (r241370) +++ head/sys/amd64/include/intr_machdep.h Tue Oct 9 12:22:43 2012 (r241371) @@ -140,7 +140,9 @@ int elcr_probe(void); enum intr_trigger elcr_read_trigger(u_int irq); void elcr_resume(void); void elcr_write_trigger(u_int irq, enum intr_trigger trigger); +#ifdef SMP void intr_add_cpu(u_int cpu); +#endif int intr_add_handler(const char *name, int vector, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep); Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Tue Oct 9 08:27:40 2012 (r241370) +++ head/sys/i386/i386/machdep.c Tue Oct 9 12:22:43 2012 (r241371) @@ -338,11 +338,6 @@ cpu_startup(dummy) #ifndef XEN cpu_setregs(); #endif - - /* - * Add BSP as an interrupt target. - */ - intr_add_cpu(0); } /* Modified: head/sys/i386/i386/mp_machdep.c ============================================================================== --- head/sys/i386/i386/mp_machdep.c Tue Oct 9 08:27:40 2012 (r241370) +++ head/sys/i386/i386/mp_machdep.c Tue Oct 9 12:22:43 2012 (r241371) @@ -823,6 +823,8 @@ init_secondary(void) * We tell the I/O APIC code about all the CPUs we want to receive * interrupts. If we don't want certain CPUs to receive IRQs we * can simply not tell the I/O APIC code about them in this function. + * We also do not tell it about the BSP since it tells itself about + * the BSP internally to work with UP kernels and on UP machines. */ static void set_interrupt_apic_ids(void) @@ -833,6 +835,8 @@ set_interrupt_apic_ids(void) apic_id = cpu_apic_ids[i]; if (apic_id == -1) continue; + if (cpu_info[apic_id].cpu_bsp) + continue; if (cpu_info[apic_id].cpu_disabled) continue; Modified: head/sys/i386/include/intr_machdep.h ============================================================================== --- head/sys/i386/include/intr_machdep.h Tue Oct 9 08:27:40 2012 (r241370) +++ head/sys/i386/include/intr_machdep.h Tue Oct 9 12:22:43 2012 (r241371) @@ -131,7 +131,9 @@ int elcr_probe(void); enum intr_trigger elcr_read_trigger(u_int irq); void elcr_resume(void); void elcr_write_trigger(u_int irq, enum intr_trigger trigger); +#ifdef SMP void intr_add_cpu(u_int cpu); +#endif int intr_add_handler(const char *name, int vector, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep); #ifdef SMP Modified: head/sys/pc98/pc98/machdep.c ============================================================================== --- head/sys/pc98/pc98/machdep.c Tue Oct 9 08:27:40 2012 (r241370) +++ head/sys/pc98/pc98/machdep.c Tue Oct 9 12:22:43 2012 (r241371) @@ -273,11 +273,6 @@ cpu_startup(dummy) bufinit(); vm_pager_bufferinit(); cpu_setregs(); - - /* - * Add BSP as an interrupt target. - */ - intr_add_cpu(0); } /* Modified: head/sys/sparc64/include/intr_machdep.h ============================================================================== --- head/sys/sparc64/include/intr_machdep.h Tue Oct 9 08:27:40 2012 (r241370) +++ head/sys/sparc64/include/intr_machdep.h Tue Oct 9 12:22:43 2012 (r241371) @@ -91,10 +91,10 @@ struct intr_vector { extern ih_func_t *intr_handlers[]; extern struct intr_vector intr_vectors[]; -void intr_add_cpu(u_int cpu); #ifdef SMP -int intr_bind(int vec, u_char cpu); +void intr_add_cpu(u_int cpu); #endif +int intr_bind(int vec, u_char cpu); int intr_describe(int vec, void *ih, const char *descr); void intr_setup(int level, ih_func_t *ihf, int pri, iv_func_t *ivf, void *iva); Modified: head/sys/sparc64/sparc64/intr_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/intr_machdep.c Tue Oct 9 08:27:40 2012 (r241370) +++ head/sys/sparc64/sparc64/intr_machdep.c Tue Oct 9 12:22:43 2012 (r241371) @@ -456,7 +456,7 @@ intr_describe(int vec, void *ih, const c * allocate CPUs round-robin. */ -static cpuset_t intr_cpus; +static cpuset_t intr_cpus = CPUSET_T_INITIALIZER(0x1); static int current_cpu; static void @@ -554,11 +554,4 @@ intr_shuffle_irqs(void *arg __unused) } SYSINIT(intr_shuffle_irqs, SI_SUB_SMP, SI_ORDER_SECOND, intr_shuffle_irqs, NULL); -#else /* !SMP */ -/* Use an empty stub for compatibility. */ -void -intr_add_cpu(u_int cpu __unused) -{ - -} #endif Modified: head/sys/sparc64/sparc64/machdep.c ============================================================================== --- head/sys/sparc64/sparc64/machdep.c Tue Oct 9 08:27:40 2012 (r241370) +++ head/sys/sparc64/sparc64/machdep.c Tue Oct 9 12:22:43 2012 (r241371) @@ -196,11 +196,6 @@ cpu_startup(void *arg) printf("machine: %s\n", sparc64_model); cpu_identify(rdpr(ver), PCPU_GET(clock), curcpu); - - /* - * Add BSP as an interrupt target. - */ - intr_add_cpu(0); } void Modified: head/sys/x86/x86/intr_machdep.c ============================================================================== --- head/sys/x86/x86/intr_machdep.c Tue Oct 9 08:27:40 2012 (r241370) +++ head/sys/x86/x86/intr_machdep.c Tue Oct 9 12:22:43 2012 (r241371) @@ -452,7 +452,7 @@ DB_SHOW_COMMAND(irqs, db_show_irqs) * allocate CPUs round-robin. */ -static cpuset_t intr_cpus; +static cpuset_t intr_cpus = CPUSET_T_INITIALIZER(0x1); static int current_cpu; /* @@ -565,11 +565,4 @@ intr_next_cpu(void) return (PCPU_GET(apic_id)); } - -/* Use an empty stub for compatibility. */ -void -intr_add_cpu(u_int cpu __unused) -{ - -} #endif From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 13:21:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2B04C13B; Tue, 9 Oct 2012 13:21:09 +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 0F9278FC0C; Tue, 9 Oct 2012 13:21:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q99DL8VS011520; Tue, 9 Oct 2012 13:21:08 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q99DL8gl011515; Tue, 9 Oct 2012 13:21:08 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201210091321.q99DL8gl011515@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 9 Oct 2012 13:21:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r241372 - in stable/7: tools/regression/usr.bin/make tools/regression/usr.bin/make/variables/modifier_t tools/regression/usr.bin/make/variables/opt_V usr.bin/make X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 13:21:09 -0000 Author: obrien Date: Tue Oct 9 13:21:08 2012 New Revision: 241372 URL: http://svn.freebsd.org/changeset/base/241372 Log: MF8: r241368: MF9: r237100: MFC r236338, r236339, r236346, r236347, r236365, & r236977 * Deprecate the FreeBSD 10's make's ":U" (to-upper case) and ":L" (to-lower case) modifiers for ":tu" and ":tl". * make it easier to test newly-built make. * Add "-V '${VAR}'" variable expansion from Portable Berkeley Make. * regression test for '-V' command line option and the :t[lu] modifiers. MF9: r241364: Update MAKE_VERSION for r237100. MFC: r201225: add missing `void' keyword. Added: stable/7/tools/regression/usr.bin/make/test-new.mk - copied unchanged from r241368, stable/8/tools/regression/usr.bin/make/test-new.mk stable/7/tools/regression/usr.bin/make/variables/modifier_t/ - copied from r241368, stable/8/tools/regression/usr.bin/make/variables/modifier_t/ stable/7/tools/regression/usr.bin/make/variables/opt_V/ - copied from r241368, stable/8/tools/regression/usr.bin/make/variables/opt_V/ Modified: stable/7/usr.bin/make/Makefile stable/7/usr.bin/make/job.c stable/7/usr.bin/make/make.1 stable/7/usr.bin/make/var.c Directory Properties: stable/7/ (props changed) stable/7/tools/ (props changed) stable/7/tools/regression/usr.bin/ (props changed) stable/7/tools/regression/usr.bin/make/all.sh (props changed) stable/7/tools/regression/usr.bin/make/common.sh (props changed) stable/7/usr.bin/ (props changed) stable/7/usr.bin/make/ (props changed) Copied: stable/7/tools/regression/usr.bin/make/test-new.mk (from r241368, stable/8/tools/regression/usr.bin/make/test-new.mk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/tools/regression/usr.bin/make/test-new.mk Tue Oct 9 13:21:08 2012 (r241372, copy of r241368, stable/8/tools/regression/usr.bin/make/test-new.mk) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +NEW_DIR!= make -C ${.CURDIR}/../../../../usr.bin/make -V .OBJDIR + +all: + rm -rf /tmp/${USER}.make.test + env MAKE_PROG=${NEW_DIR}/make ${.SHELL} ./all.sh + +.include Modified: stable/7/usr.bin/make/Makefile ============================================================================== --- stable/7/usr.bin/make/Makefile Tue Oct 9 12:22:43 2012 (r241371) +++ stable/7/usr.bin/make/Makefile Tue Oct 9 13:21:08 2012 (r241372) @@ -11,7 +11,9 @@ SRCS= arch.c buf.c cond.c dir.c for.c ha WARNS?= 6 NO_SHARED?= YES -CFLAGS+=-DMAKE_VERSION=\"5200408120\" +# Version has the RYYYYMMDDX format, where R is from RELENG_ +CFLAGS+=-DMAKE_VERSION=\"7201210080\" + # There is no obvious performance improvement currently. # CFLAGS+=-DUSE_KQUEUE Modified: stable/7/usr.bin/make/job.c ============================================================================== --- stable/7/usr.bin/make/job.c Tue Oct 9 12:22:43 2012 (r241371) +++ stable/7/usr.bin/make/job.c Tue Oct 9 13:21:08 2012 (r241372) @@ -480,7 +480,7 @@ catch_child(int sig __unused) /** */ void -Proc_Init() +Proc_Init(void) { /* * Catch SIGCHLD so that we get kicked out of select() when we Modified: stable/7/usr.bin/make/make.1 ============================================================================== --- stable/7/usr.bin/make/make.1 Tue Oct 9 12:22:43 2012 (r241371) +++ stable/7/usr.bin/make/make.1 Tue Oct 9 13:21:08 2012 (r241372) @@ -32,7 +32,7 @@ .\" @(#)make.1 8.8 (Berkeley) 6/13/95 .\" $FreeBSD$ .\" -.Dd November 5, 2011 +.Dd May 30, 2012 .Dt MAKE 1 .Os .Sh NAME @@ -290,6 +290,11 @@ Do not build any targets. Multiple instances of this option may be specified; the variables will be printed one per line, with a blank line for each null or undefined variable. +If +.Ar variable +contains a +.Sq Ic $ +then the value will be expanded before printing. .It Fl v Be extra verbose. Print any extra information. @@ -873,6 +878,7 @@ Replaces each word in the variable with .It Cm L Converts variable to lower-case letters. .It Cm M Ns Ar pattern +(deprecated) Select only those words that match the rest of the modifier. The standard shell wildcard characters .Pf ( Ql * , @@ -963,8 +969,13 @@ to be replaced in .Ar new_string . .It Cm T Replaces each word in the variable with its last component. +.It Cm tl +Converts variable to lower-case letters. +.It Cm tu +Converts variable to upper-case letters. .It Cm U Converts variable to upper-case letters. +(deprecated) .It Cm u Remove adjacent duplicate words (like .Xr uniq 1 ) . @@ -1711,6 +1722,19 @@ is set to the same value as .Va .MAKE ; support for this may be removed in the future. .Pp +The use of the +.Cm :L +and +.Cm :U +modifiers will be deprecated +in +.Fx 10.0 +and the more portable (among Pmake decedents) +.Cm :tl +and +.Cm :tu +should be used instead. +.Pp Most of the more esoteric features of .Nm should probably be avoided for greater compatibility. Modified: stable/7/usr.bin/make/var.c ============================================================================== --- stable/7/usr.bin/make/var.c Tue Oct 9 12:22:43 2012 (r241371) +++ stable/7/usr.bin/make/var.c Tue Oct 9 13:21:08 2012 (r241372) @@ -1748,6 +1748,19 @@ ParseModifier(VarParser *vp, char startc case 'C': newStr = modifier_C(vp, value, v); break; + case 't': + /* :tl :tu for OSF ODE & NetBSD make compatibility */ + switch (vp->ptr[1]) { + case 'l': + vp->ptr++; + goto mod_lower; + break; + case 'u': + vp->ptr++; + goto mod_upper; + break; + } + /* FALLTHROUGH */ default: if (vp->ptr[1] != endc && vp->ptr[1] != ':') { #ifdef SUNSHCMD @@ -1776,6 +1789,7 @@ ParseModifier(VarParser *vp, char startc switch (vp->ptr[0]) { case 'L': + mod_lower: { const char *cp; Buffer *buf; @@ -1801,6 +1815,7 @@ ParseModifier(VarParser *vp, char startc vp->ptr++; break; case 'U': + mod_upper: { const char *cp; Buffer *buf; @@ -2580,7 +2595,7 @@ void Var_Print(Lst *vlist, Boolean expandVars) { LstNode *n; - const char *name; + char *name; LST_FOREACH(n, vlist) { name = Lst_Datum(n); @@ -2588,13 +2603,17 @@ Var_Print(Lst *vlist, Boolean expandVars char *value; char *v; - v = emalloc(strlen(name) + 1 + 3); - sprintf(v, "${%s}", name); - + if (*name == '$') { + v = name; + } else { + v = emalloc(strlen(name) + 1 + 3); + sprintf(v, "${%s}", name); + } value = Buf_Peel(Var_Subst(v, VAR_GLOBAL, FALSE)); printf("%s\n", value); - free(v); + if (v != name) + free(v); free(value); } else { const char *value = Var_Value(name, VAR_GLOBAL); From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 14:25:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9594CCE2; Tue, 9 Oct 2012 14:25:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D8768FC18; Tue, 9 Oct 2012 14:25:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q99EPFJT020790; Tue, 9 Oct 2012 14:25:15 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q99EPFS6020787; Tue, 9 Oct 2012 14:25:15 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210091425.q99EPFS6020787@svn.freebsd.org> From: Eitan Adler Date: Tue, 9 Oct 2012 14:25:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241373 - head/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 14:25:15 -0000 Author: eadler Date: Tue Oct 9 14:25:14 2012 New Revision: 241373 URL: http://svn.freebsd.org/changeset/base/241373 Log: Remove undefined behavior from sranddev() and srandomdev(). This doesn't actually work with any modern C compiler: In particular, both clang and modern gcc verisons silently elide any xor operation with 'junk'. Approved by: secteam MFC after: 3 days Modified: head/lib/libc/stdlib/rand.c head/lib/libc/stdlib/random.c Modified: head/lib/libc/stdlib/rand.c ============================================================================== --- head/lib/libc/stdlib/rand.c Tue Oct 9 13:21:08 2012 (r241372) +++ head/lib/libc/stdlib/rand.c Tue Oct 9 14:25:14 2012 (r241373) @@ -130,10 +130,9 @@ sranddev() if (!done) { struct timeval tv; - unsigned long junk; gettimeofday(&tv, NULL); - srand((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ junk); + srand((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec); } } Modified: head/lib/libc/stdlib/random.c ============================================================================== --- head/lib/libc/stdlib/random.c Tue Oct 9 13:21:08 2012 (r241372) +++ head/lib/libc/stdlib/random.c Tue Oct 9 14:25:14 2012 (r241373) @@ -312,10 +312,9 @@ srandomdev(void) if (!done) { struct timeval tv; - volatile unsigned long junk; gettimeofday(&tv, NULL); - srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ junk); + srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec); return; } From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 14:32:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B7F74FF4; Tue, 9 Oct 2012 14:32:31 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CA6E8FC0A; Tue, 9 Oct 2012 14:32:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q99EWV9j021738; Tue, 9 Oct 2012 14:32:31 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q99EWVQm021726; Tue, 9 Oct 2012 14:32:31 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201210091432.q99EWVQm021726@svn.freebsd.org> From: Attilio Rao Date: Tue, 9 Oct 2012 14:32:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241374 - in head/sys: amd64/include gnu/fs/xfs/FreeBSD i386/include kern mips/include pc98/include sparc64/include sys x86/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 14:32:31 -0000 Author: attilio Date: Tue Oct 9 14:32:30 2012 New Revision: 241374 URL: http://svn.freebsd.org/changeset/base/241374 Log: Add an unified macro to deny ability from the compiler to reorder instruction loads/stores at its will. The macro __compiler_membar() is currently supported for both gcc and clang, but kernel compilation will fail otherwise. Reviewed by: bde, kib Discussed with: dim, theraven MFC after: 2 weeks Modified: head/sys/amd64/include/atomic.h head/sys/gnu/fs/xfs/FreeBSD/xfs_compat.h head/sys/gnu/fs/xfs/FreeBSD/xfs_freebsd.h head/sys/i386/include/atomic.h head/sys/kern/kern_rmlock.c head/sys/mips/include/cpufunc.h head/sys/pc98/include/bus.h head/sys/sparc64/include/atomic.h head/sys/sys/cdefs.h head/sys/x86/include/bus.h Modified: head/sys/amd64/include/atomic.h ============================================================================== --- head/sys/amd64/include/atomic.h Tue Oct 9 14:25:14 2012 (r241373) +++ head/sys/amd64/include/atomic.h Tue Oct 9 14:32:30 2012 (r241374) @@ -226,7 +226,7 @@ atomic_fetchadd_long(volatile u_long *p, static __inline void \ atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v)\ { \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ *p = v; \ } \ struct __hack @@ -240,7 +240,7 @@ atomic_load_acq_##TYPE(volatile u_##TYPE u_##TYPE tmp; \ \ tmp = *p; \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ return (tmp); \ } \ struct __hack Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_compat.h ============================================================================== --- head/sys/gnu/fs/xfs/FreeBSD/xfs_compat.h Tue Oct 9 14:25:14 2012 (r241373) +++ head/sys/gnu/fs/xfs/FreeBSD/xfs_compat.h Tue Oct 9 14:32:30 2012 (r241374) @@ -129,10 +129,6 @@ typedef dev_t os_dev_t; #define copy_from_user(dst, src, len) copyin((src), (dst), (len)) #endif -#ifndef barrier -#define barrier() __asm__ __volatile__("": : :"memory") -#endif - /* * Map simple global vairables to FreeBSD kernel equivalents */ Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_freebsd.h ============================================================================== --- head/sys/gnu/fs/xfs/FreeBSD/xfs_freebsd.h Tue Oct 9 14:25:14 2012 (r241373) +++ head/sys/gnu/fs/xfs/FreeBSD/xfs_freebsd.h Tue Oct 9 14:32:30 2012 (r241374) @@ -162,7 +162,7 @@ */ #define EFSCORRUPTED 990 /* Filesystem is corrupted */ -#define SYNCHRONIZE() barrier() +#define SYNCHRONIZE() __compiler_membar() #define __return_address __builtin_return_address(0) /* Modified: head/sys/i386/include/atomic.h ============================================================================== --- head/sys/i386/include/atomic.h Tue Oct 9 14:25:14 2012 (r241373) +++ head/sys/i386/include/atomic.h Tue Oct 9 14:32:30 2012 (r241374) @@ -296,7 +296,7 @@ atomic_fetchadd_int(volatile u_int *p, u static __inline void \ atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v)\ { \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ *p = v; \ } \ struct __hack @@ -310,7 +310,7 @@ atomic_load_acq_##TYPE(volatile u_##TYPE u_##TYPE tmp; \ \ tmp = *p; \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ return (tmp); \ } \ struct __hack Modified: head/sys/kern/kern_rmlock.c ============================================================================== --- head/sys/kern/kern_rmlock.c Tue Oct 9 14:25:14 2012 (r241373) +++ head/sys/kern/kern_rmlock.c Tue Oct 9 14:32:30 2012 (r241374) @@ -65,10 +65,6 @@ __FBSDID("$FreeBSD$"); * does not seem very useful */ -static __inline void compiler_memory_barrier(void) { - __asm __volatile("":::"memory"); -} - static void assert_rm(const struct lock_object *lock, int what); static void lock_rm(struct lock_object *lock, int how); #ifdef KDTRACE_HOOKS @@ -353,7 +349,7 @@ _rm_rlock(struct rmlock *rm, struct rm_p td->td_critnest++; /* critical_enter(); */ - compiler_memory_barrier(); + __compiler_membar(); pc = cpuid_to_pcpu[td->td_oncpu]; /* pcpu_find(td->td_oncpu); */ @@ -361,7 +357,7 @@ _rm_rlock(struct rmlock *rm, struct rm_p sched_pin(); - compiler_memory_barrier(); + __compiler_membar(); td->td_critnest--; Modified: head/sys/mips/include/cpufunc.h ============================================================================== --- head/sys/mips/include/cpufunc.h Tue Oct 9 14:25:14 2012 (r241373) +++ head/sys/mips/include/cpufunc.h Tue Oct 9 14:32:30 2012 (r241374) @@ -70,7 +70,7 @@ static __inline void mips_barrier(void) { #if defined(CPU_CNMIPS) || defined(CPU_RMI) || defined(CPU_NLM) - __asm __volatile("" : : : "memory"); + __compiler_membar(); #else __asm __volatile (".set noreorder\n\t" "nop\n\t" Modified: head/sys/pc98/include/bus.h ============================================================================== --- head/sys/pc98/include/bus.h Tue Oct 9 14:25:14 2012 (r241373) +++ head/sys/pc98/include/bus.h Tue Oct 9 14:32:30 2012 (r241374) @@ -593,7 +593,7 @@ bus_space_barrier(bus_space_tag_t tag, b if (flags & BUS_SPACE_BARRIER_READ) __asm __volatile("lock; addl $0,0(%%esp)" : : : "memory"); else - __asm __volatile("" : : : "memory"); + __compiler_membar(); } #ifdef BUS_SPACE_NO_LEGACY Modified: head/sys/sparc64/include/atomic.h ============================================================================== --- head/sys/sparc64/include/atomic.h Tue Oct 9 14:25:14 2012 (r241373) +++ head/sys/sparc64/include/atomic.h Tue Oct 9 14:32:30 2012 (r241374) @@ -97,7 +97,7 @@ #define atomic_cas_acq(p, e, s, sz) ({ \ itype(sz) v; \ v = atomic_cas((p), (e), (s), sz); \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ v; \ }) @@ -122,7 +122,7 @@ #define atomic_op_acq(p, op, v, sz) ({ \ itype(sz) t; \ t = atomic_op((p), op, (v), sz); \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ t; \ }) @@ -139,7 +139,7 @@ #define atomic_load_acq(p, sz) ({ \ itype(sz) v; \ v = atomic_load((p), sz); \ - __asm __volatile("" : : : "memory"); \ + __compiler_membar(); \ v; \ }) Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Tue Oct 9 14:25:14 2012 (r241373) +++ head/sys/sys/cdefs.h Tue Oct 9 14:32:30 2012 (r241374) @@ -82,6 +82,13 @@ # define __GNUC_VA_LIST_COMPATIBILITY 1 #endif +/* + * Compiler memory barriers, specific to gcc and clang. + */ +#if defined(__GNUC__) +#define __compiler_membar() __asm __volatile(" " : : : "memory") +#endif + #ifndef __INTEL_COMPILER # define __GNUCLIKE_BUILTIN_NEXT_ARG 1 # define __GNUCLIKE_MATH_BUILTIN_RELOPS Modified: head/sys/x86/include/bus.h ============================================================================== --- head/sys/x86/include/bus.h Tue Oct 9 14:25:14 2012 (r241373) +++ head/sys/x86/include/bus.h Tue Oct 9 14:32:30 2012 (r241374) @@ -1014,7 +1014,7 @@ bus_space_barrier(bus_space_tag_t tag __ __asm __volatile("lock; addl $0,0(%%esp)" : : : "memory"); #endif else - __asm __volatile("" : : : "memory"); + __compiler_membar(); #endif } From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 16:09:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 87549465; Tue, 9 Oct 2012 16:09:43 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from felyko.com (unknown [IPv6:2607:f2f8:a528::3:1337:ca7]) by mx1.freebsd.org (Postfix) with ESMTP id 435438FC0A; Tue, 9 Oct 2012 16:09:43 +0000 (UTC) Received: from [IPv6:2601:9:4d00:85:31ca:3bc6:fc9c:e577] (unknown [IPv6:2601:9:4d00:85:31ca:3bc6:fc9c:e577]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 3470439828; Tue, 9 Oct 2012 09:09:36 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: svn commit: r241370 - in head: share/examples/kld/dyn_sysctl share/examples/kld/firmware/fwconsumer share/man/man9 sys/amd64/linux32 sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/compat/svr4 s... From: Rui Paulo In-Reply-To: <201210090827.q998Rfbw069843@svn.freebsd.org> Date: Tue, 9 Oct 2012 09:09:35 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201210090827.q998Rfbw069843@svn.freebsd.org> To: Kevin Lo X-Mailer: Apple Mail (2.1499) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 16:09:43 -0000 On 9 Oct 2012, at 01:27, Kevin Lo wrote: > Author: kevlo > Date: Tue Oct 9 08:27:40 2012 > New Revision: 241370 > URL: http://svn.freebsd.org/changeset/base/241370 >=20 > Log: > Prefer NULL over 0 for pointers Very dubious benefit and no one review this...? Did you even check if the MD5/SHA-1 checksum of the affected files did = not change after your modifications? -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 16:33:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA81DDCE for ; Tue, 9 Oct 2012 16:33:38 +0000 (UTC) (envelope-from ache@vniz.net) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5E6278FC19 for ; Tue, 9 Oct 2012 16:33:37 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so3837050lag.13 for ; Tue, 09 Oct 2012 09:33:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:message-id:disposition-notification-to:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:openpgp :content-type:content-transfer-encoding:x-gm-message-state; bh=7E7OarEG0pKxEk5veo8pPVkb9NIFp9mdnpFrlTCcMQw=; b=gs/3cypaC2ddyWa/nRxtC0fHgs3gLVlfhcwy20z9TfRUVr3X0u3ewNwXSwCgEqGvaM 6b11WrM9QmVhSiTYnBUqnCLm86jdSHDr4/NlhsHVNsTo4SVeUo+OXlyo42hT/hBhHuqG Y/lMl553BRB47gpw1ncwKbVXdHAqQftHvX2ZM3g69omkepXJK6jYEQ1kpZDrqPremN73 YRcw8r3WaCP4z4LvpO+EXJzfpNc0CpuMOo6QozB5EjyiDV4wSd8ZPXPl3d5OBlkVhc7s T15ANxPjBm/UeEg46B3mb/V137psbfEW1oS7HogW4m24g79yO5gnta0VO5tmeedyZTjg aC/g== Received: by 10.152.132.168 with SMTP id ov8mr17273806lab.0.1349800416762; Tue, 09 Oct 2012 09:33:36 -0700 (PDT) Received: from [192.168.1.2] ([89.169.140.97]) by mx.google.com with ESMTPS id h8sm6159426lbk.0.2012.10.09.09.33.36 (version=SSLv3 cipher=OTHER); Tue, 09 Oct 2012 09:33:36 -0700 (PDT) Sender: "Chernov, Andrey" Message-ID: <507451DE.9060909@freebsd.org> Date: Tue, 09 Oct 2012 20:33:34 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: Eitan Adler Subject: Re: svn commit: r241373 - head/lib/libc/stdlib References: <201210091425.q99EPFS6020787@svn.freebsd.org> In-Reply-To: <201210091425.q99EPFS6020787@svn.freebsd.org> OpenPGP: id=964474DD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQnjBOQgzjU63ty7oG43zQQF+aMybBBFg/l5HTivzdYeOttNw5Ad4w1cQulG30JreyCRfhA8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 16:33:39 -0000 Do you check assembler output for _both_ cases? In my testing clang and gcc xor's 'junk' properly in case it have 'volatile' keyword (as in srandomdev()) and elide it without 'volatile'. IMHO this change should be backed out for srandomdev() and adding 'volatile' for sranddev() instead. On 09.10.2012 18:25, Eitan Adler wrote: > Author: eadler > Date: Tue Oct 9 14:25:14 2012 > New Revision: 241373 > URL: http://svn.freebsd.org/changeset/base/241373 > > Log: > Remove undefined behavior from sranddev() and > srandomdev(). This doesn't actually work > with any modern C compiler: > > In particular, both clang and modern gcc > verisons silently elide any xor operation > with 'junk'. > > Approved by: secteam > MFC after: 3 days > > Modified: > head/lib/libc/stdlib/rand.c > head/lib/libc/stdlib/random.c > > Modified: head/lib/libc/stdlib/rand.c > ============================================================================== > --- head/lib/libc/stdlib/rand.c Tue Oct 9 13:21:08 2012 (r241372) > +++ head/lib/libc/stdlib/rand.c Tue Oct 9 14:25:14 2012 (r241373) > @@ -130,10 +130,9 @@ sranddev() > > if (!done) { > struct timeval tv; > - unsigned long junk; > > gettimeofday(&tv, NULL); > - srand((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ junk); > + srand((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec); > } > } > > > Modified: head/lib/libc/stdlib/random.c > ============================================================================== > --- head/lib/libc/stdlib/random.c Tue Oct 9 13:21:08 2012 (r241372) > +++ head/lib/libc/stdlib/random.c Tue Oct 9 14:25:14 2012 (r241373) > @@ -312,10 +312,9 @@ srandomdev(void) > > if (!done) { > struct timeval tv; > - volatile unsigned long junk; > > gettimeofday(&tv, NULL); > - srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ junk); > + srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec); > return; > } > > From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 17:06:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 890496E2; Tue, 9 Oct 2012 17:06:33 +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 722DF8FC0A; Tue, 9 Oct 2012 17:06:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q99H6X4l041476; Tue, 9 Oct 2012 17:06:33 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q99H6XEG041469; Tue, 9 Oct 2012 17:06:33 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210091706.q99H6XEG041469@svn.freebsd.org> From: Alexander Motin Date: Tue, 9 Oct 2012 17:06:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241375 - head/sys/dev/sound/pci/hda X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 17:06:33 -0000 Author: mav Date: Tue Oct 9 17:06:31 2012 New Revision: 241375 URL: http://svn.freebsd.org/changeset/base/241375 Log: Cast vendor-specific spell on VIA VT1818S codecs alike to VT1708S to make analog input loopback and dual-stream playback work by enabling signal mixing by nid 22, as it should be according to info returned by the CODEC. Otherwise pin nid 28 receives only signal from DAC nid 16. PR: kern/169124 MFC after: 1 week Modified: head/sys/dev/sound/pci/hda/hdaa_patches.c Modified: head/sys/dev/sound/pci/hda/hdaa_patches.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdaa_patches.c Tue Oct 9 14:32:30 2012 (r241374) +++ head/sys/dev/sound/pci/hda/hdaa_patches.c Tue Oct 9 17:06:31 2012 (r241375) @@ -608,6 +608,8 @@ hdaa_patch_direct(struct hdaa_devinfo *d /* Enable Mic Boost Volume controls. */ hda_command(dev, HDA_CMD_12BIT(0, devinfo->nid, 0xf98, 0x01)); + /* Fall though */ + case HDA_CODEC_VT1818S: /* Don't bypass mixer. */ hda_command(dev, HDA_CMD_12BIT(0, devinfo->nid, 0xf88, 0xc0)); From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 17:17:02 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1B0FF937; Tue, 9 Oct 2012 17:17:02 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id CB85A8FC0A; Tue, 9 Oct 2012 17:17:01 +0000 (UTC) Received: from [192.168.0.2] (cpc2-cmbg15-2-0-cust445.5-4.cable.virginmedia.com [86.26.13.190]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q99HGrDk003024 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Tue, 9 Oct 2012 17:16:59 GMT (envelope-from theraven@FreeBSD.org) Subject: Re: svn commit: r241373 - head/lib/libc/stdlib Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <507451DE.9060909@freebsd.org> Date: Tue, 9 Oct 2012 18:16:48 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <977E1107-46D4-476F-A04D-AEFD87D1DE53@FreeBSD.org> References: <201210091425.q99EPFS6020787@svn.freebsd.org> <507451DE.9060909@freebsd.org> To: Andrey Chernov X-Mailer: Apple Mail (2.1278) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Eitan Adler X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 17:17:02 -0000 On 9 Oct 2012, at 17:33, Andrey Chernov wrote: > Do you check assembler output for _both_ cases? > In my testing clang and gcc xor's 'junk' properly in case it have > 'volatile' keyword (as in srandomdev()) and elide it without = 'volatile'. > IMHO this change should be backed out for srandomdev() and adding > 'volatile' for sranddev() instead. In it's original form, it is very dangerous - the whole expression = reduces to undefined and so the LLVM IR for the call is: call void @srand(i32 undef) The back end is then free to use any value for the call argument, = including any register value or 0. Since the value is passed in a = register, it will probably just use whatever the last value there is, = which may or may not be anything sensible. On MIPS, for example, this = is most likely to be &tv, and so is 100% deterministic. Adding the volatile means that we are doing an XOR with a value left on = the stack. If this is early on in the application, then it is most = likely to be 0. If it's later on, then there may be a value here, but = it's still not very likely to be something particularly unpredictable. =20= David= From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 17:27:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 166B8DB3; Tue, 9 Oct 2012 17:27:28 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 65AFE8FC0C; Tue, 9 Oct 2012 17:27:27 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so6061994pbb.13 for ; Tue, 09 Oct 2012 10:27:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=7KmQktE6dOBy9XPMk1iqSeshPsfweNF+4vOFZk3w85o=; b=Z8T3QEkHwrYRkc16xbi9h9KlDoNTl0V/JP7AsCrGSj9MxVET559eiRkNUyiRBPOB8O tFysedafKWDOggEfhPGjWKx/TNQQeLBFPq71aQlENzkg73MoC7U83AF6FaIfdvVWydJp g6fp1jadD5lZPe+oLjqd6jHHN8/lTunhI47oyijfqK8A0HWH5SoIxGUm6ut2oISRZyPS YzQASYwbCURPVDv/0WfikFmaCVo3JTE3B2S5a5fQXqAtgZvmnFZXvihbjKKLVj/recX1 qr1tUMHqU5Vs1QlmqdDJ6FVO0oKTAT6lMqYL8Qe0dYyIAFWN7pMSHuy9H/K/H/XgP7ca FQCw== MIME-Version: 1.0 Received: by 10.66.74.65 with SMTP id r1mr54152285pav.75.1349803647206; Tue, 09 Oct 2012 10:27:27 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.68.13.170 with HTTP; Tue, 9 Oct 2012 10:27:27 -0700 (PDT) In-Reply-To: <977E1107-46D4-476F-A04D-AEFD87D1DE53@FreeBSD.org> References: <201210091425.q99EPFS6020787@svn.freebsd.org> <507451DE.9060909@freebsd.org> <977E1107-46D4-476F-A04D-AEFD87D1DE53@FreeBSD.org> Date: Tue, 9 Oct 2012 10:27:27 -0700 X-Google-Sender-Auth: FJsX_n3ohqHxO089cGEl-ATDBcI Message-ID: Subject: Re: svn commit: r241373 - head/lib/libc/stdlib From: mdf@FreeBSD.org To: David Chisnall Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Eitan Adler , svn-src-all@freebsd.org, src-committers@freebsd.org, Andrey Chernov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 17:27:28 -0000 On Tue, Oct 9, 2012 at 10:16 AM, David Chisnall wrot= e: > On 9 Oct 2012, at 17:33, Andrey Chernov wrote: > >> Do you check assembler output for _both_ cases? >> In my testing clang and gcc xor's 'junk' properly in case it have >> 'volatile' keyword (as in srandomdev()) and elide it without 'volatile'. >> IMHO this change should be backed out for srandomdev() and adding >> 'volatile' for sranddev() instead. > > In it's original form, it is very dangerous - the whole expression reduce= s to undefined and so the LLVM IR for the call is: > > call void @srand(i32 undef) > > The back end is then free to use any value for the call argument, includi= ng any register value or 0. Since the value is passed in a register, it wi= ll probably just use whatever the last value there is, which may or may not= be anything sensible. On MIPS, for example, this is most likely to be &tv= , and so is 100% deterministic. > > Adding the volatile means that we are doing an XOR with a value left on t= he stack. If this is early on in the application, then it is most likely t= o be 0. If it's later on, then there may be a value here, but it's still n= ot very likely to be something particularly unpredictable. > The original behavior can be recovered by using inline assembly to fetch the value from a register into a local C variable; this would at least not rely on undefined behavior. But I agree it's of dubious value anyways. From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 17:47:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5B68A3AD for ; Tue, 9 Oct 2012 17:47:51 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx1.freebsd.org (Postfix) with ESMTP id C576E8FC1B for ; Tue, 9 Oct 2012 17:47:50 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id bi1so6024486pad.13 for ; Tue, 09 Oct 2012 10:47:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=lIeh5LcE/O/HgiQOyV76aLryNW/EHoDku1QAycSLd9s=; b=YvhhW4Vk8wNkoh/VKOqkwCveAbVeaOoUMKvU6NBUnbDOqtPmkG6NJwP+j598N5jDox MtuIoufwWxwXw7HGoPZEpLT2H0TdpQoBdyRAC3AVrA2B8sPYQBY1pnmTK38XPbIO84xl Edu9rux7tb/WXd1npEWSyhTCa3RcOshig9nTI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=lIeh5LcE/O/HgiQOyV76aLryNW/EHoDku1QAycSLd9s=; b=M9aIrTTrz2AhUqARnhCi7Yb0Tos2ISoAs+ZwjBLP8/vcnb++nJvIKMH63czIr8oZ03 7XmLMpCiJDatVd/vxxjUfCxvyJk7pDkOVUUNdahRJSsC8g3HCG/PR32MBwKx13tFHxb0 azkBvGS7JYbAQVIc5Vc5x8he7FK/hJ/DvqXVLwuFHji+qKrOJy4+mSSFk+tRrfpbt/DB gmbOeUpqfZ8uJGs3VJ/+kGDBOGj/h5dHr3WqoGUmBOFqNIJO0z3DbsdVyhYJlLx1+KGt nI1w9Wy+/RhIz31FW5/zalPUBsLaykVlRXJhpaHlaUcBFbIrKOTmoxoa0I/8YKeCywRB nbmg== Received: by 10.66.77.40 with SMTP id p8mr54449126paw.78.1349804870329; Tue, 09 Oct 2012 10:47:50 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.161.163 with HTTP; Tue, 9 Oct 2012 10:47:20 -0700 (PDT) In-Reply-To: <507451DE.9060909@freebsd.org> References: <201210091425.q99EPFS6020787@svn.freebsd.org> <507451DE.9060909@freebsd.org> From: Eitan Adler Date: Tue, 9 Oct 2012 13:47:20 -0400 X-Google-Sender-Auth: luk8TWlNzV065ae0uL0Luu8jRX8 Message-ID: Subject: Re: svn commit: r241373 - head/lib/libc/stdlib To: Andrey Chernov Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQkpR3Ik6jkJeAkT81tRqvp5Kfh/MMz+YxCAld3RM7OhxgfbfKkKckfkMtFTg+RC4XBeq9Jx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 17:47:51 -0000 On 9 October 2012 12:33, Andrey Chernov wrote: > Do you check assembler output for _both_ cases? Yes. > In my testing clang and gcc xor's 'junk' properly in case it have > 'volatile' keyword (as in srandomdev()) and elide it without 'volatile'. volatile is still undefined: see 5.1.2.2.3 and 6.7.2.4 of ISO9899 > IMHO this change should be backed out for srandomdev() and adding > 'volatile' for sranddev() instead. http://blog.eitanadler.com/2012/10/reduced-entropy-in-rand-and-random.html for additional details and actual assembler output. -- Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 17:50:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 027AC671 for ; Tue, 9 Oct 2012 17:50:56 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx1.freebsd.org (Postfix) with ESMTP id B62948FC1A for ; Tue, 9 Oct 2012 17:50:55 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id bi1so6028252pad.13 for ; Tue, 09 Oct 2012 10:50:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=4H6sWTB4mfNgbxTFgiovJd1tP1gB+y91aqb70kaDMAU=; b=rXtDJJstmMwi2Hx8f2l10b0V8NBIwNoiRS5mPPlCBEKYJJjMbJOvZqtYdQVTYk9KlN 8GK5l+kEOYSGsJ2LHaAmSoQgNgjtZHddBENAqCbfS1pkc32wgFHu3VSuKQyWvfDmi0hX E9KhZbWzgSGJHJdTvddXF29DJ9RQaxRDRapqw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=4H6sWTB4mfNgbxTFgiovJd1tP1gB+y91aqb70kaDMAU=; b=Vrbj7SNni6ky7ad3fkzLvVXoif4wruGiiRl0hf7qORIl8ap3fg+ZrwVbUjMg2v/hFb aXXAO0HoH4x/D9GUE+CcSVFZgXW8+4+XujXHQHMpv26cSMcWfs1ImSElGIOyu1LWUhcx 8mxkLXbAlOXDd/B2jlb4tgfRieWDX1TXurpe/aXgNnVIj52GCfQv/res46esBaSwsPEJ NTn5EDW/uk2ziXjUG+bZaz5G90ecmOUYkdQxn0tFABw5AYm8HtnGorUt7x970+sLYdxv DxLQlasf8jW4vLFEvxdSkLn+RmJzMU7QxaQ0MflTDXIZ0DBIGMDD2wdzdiWGOE7gkECS j9iQ== Received: by 10.66.81.103 with SMTP id z7mr54602824pax.57.1349805055046; Tue, 09 Oct 2012 10:50:55 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.161.163 with HTTP; Tue, 9 Oct 2012 10:50:24 -0700 (PDT) In-Reply-To: <977E1107-46D4-476F-A04D-AEFD87D1DE53@FreeBSD.org> References: <201210091425.q99EPFS6020787@svn.freebsd.org> <507451DE.9060909@freebsd.org> <977E1107-46D4-476F-A04D-AEFD87D1DE53@FreeBSD.org> From: Eitan Adler Date: Tue, 9 Oct 2012 13:50:24 -0400 X-Google-Sender-Auth: oeThPxwWbcEA7rcNU2ZeyC6BuKo Message-ID: Subject: Re: svn commit: r241373 - head/lib/libc/stdlib To: David Chisnall Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQl6ucR8pxcn4D3tQvv/ZCBShdajGjYobRiD6eHkL4Fcfqb+of5Ai0ikksGUAtf4cw8dQsTJ Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andrey Chernov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 17:50:56 -0000 On 9 October 2012 13:16, David Chisnall wrote: > On 9 Oct 2012, at 17:33, Andrey Chernov wrote: > >> Do you check assembler output for _both_ cases? >> In my testing clang and gcc xor's 'junk' properly in case it have >> 'volatile' keyword (as in srandomdev()) and elide it without 'volatile'. >> IMHO this change should be backed out for srandomdev() and adding >> 'volatile' for sranddev() instead. > > In it's original form, it is very dangerous - the whole expression reduce= s to undefined and so the LLVM IR for the call is: > > call void @srand(i32 undef) > > The back end is then free to use any value for the call argument, includi= ng any register value or 0. In fact, the backend is free to jump to a random location and potentially kill kittens. There is *no* guarantee when it comes to undefined behavior. > Adding the volatile means that we are doing an XOR with a value left on t= he stack. If this is early on in the application, then it is most likely t= o be 0. If it's later on, then there may be a value here, but it's still n= ot very likely to be something particularly unpredictable. volatile only helps by mistake because clang is overly aggressive is turning off optimizers. The code is still undefined. --=20 Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 17:51:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3B0558CE for ; Tue, 9 Oct 2012 17:51:37 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id C18C28FC1A for ; Tue, 9 Oct 2012 17:51:36 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so6091596pbb.13 for ; Tue, 09 Oct 2012 10:51:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=4tmUThP+jrS6LqvrhNEPtQotVfbr6sRr9lI1+3Qd8KU=; b=rHwKXCla/8AxHiA5dgnXkgu2fRscgCo8jtKVFM0+wVHpkA0oeE6z8qa7TZjKRUOn3/ ifcVrkh/JcSfittE/rBgkoXzsW1O5hNmISkJS10MO+hCY8eL3f5nS4TX0eUto0V1Ypsu 89f43RQLP+iOrYijHK/M7/EY+5hNvqV3UqHAw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=4tmUThP+jrS6LqvrhNEPtQotVfbr6sRr9lI1+3Qd8KU=; b=OIkeV2tK/Izkwsw7pDYCb5aDg5pRst3MLMVMYN15GVvMmGifSojkpkclJEf/1wXfjx SvW8pb62Q3/RVaJbPMZeSUrMePDMR5UNWv9msAhQ8s9CWrOSOuj/he+JwdUl38lmIGHQ H2cTNECsjffXp4pKCdSvUO53yAxzEK/A5nczbKtJ0GLUxSgixatzaHT25gtmWshWzTMf Etryev508cQdxjg0u35TapVpU7c4zv0n+NDH90n9g1SYuJqFH/tOaHsX4nZte37Mprew HvxsGN3ZJDDSV7/LEejS0f/e2rpdRjXGRQRicyhzvUZA5qBasjiQNDoZ8wagcJSrJEym elpw== Received: by 10.68.222.105 with SMTP id ql9mr65348787pbc.97.1349805096477; Tue, 09 Oct 2012 10:51:36 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.161.163 with HTTP; Tue, 9 Oct 2012 10:51:05 -0700 (PDT) In-Reply-To: References: <201210091425.q99EPFS6020787@svn.freebsd.org> <507451DE.9060909@freebsd.org> <977E1107-46D4-476F-A04D-AEFD87D1DE53@FreeBSD.org> From: Eitan Adler Date: Tue, 9 Oct 2012 13:51:05 -0400 X-Google-Sender-Auth: nchJqhgrvqBHKR1M2i13oGPkKXw Message-ID: Subject: Re: svn commit: r241373 - head/lib/libc/stdlib To: mdf@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmt5vfcV41XkbFLu5548WyuiQ5dlpr+YF8GQ/tR7/aQNA9VTP15eoo3INJercSIKQbxczUN Cc: svn-src-head@freebsd.org, Andrey Chernov , svn-src-all@freebsd.org, src-committers@freebsd.org, David Chisnall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 17:51:37 -0000 On 9 October 2012 13:27, wrote: > The original behavior can be recovered by using inline assembly to > fetch the value from a register into a local C variable; this would at > least not rely on undefined behavior. But I agree it's of dubious > value anyways. I proposed this (with a patch). We want to move to not using /dev/random and instead make a kernel system call directly. The patch for this is not finished yet though. -- Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 18:02:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5AAB1CB4; Tue, 9 Oct 2012 18:02:06 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27D498FC0C; Tue, 9 Oct 2012 18:02:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q99I26VI048656; Tue, 9 Oct 2012 18:02:06 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q99I25Wq048652; Tue, 9 Oct 2012 18:02:05 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201210091802.q99I25Wq048652@svn.freebsd.org> From: Sean Bruno Date: Tue, 9 Oct 2012 18:02:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241376 - stable/8/sys/dev/e1000 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 18:02:06 -0000 Author: sbruno Date: Tue Oct 9 18:02:05 2012 New Revision: 241376 URL: http://svn.freebsd.org/changeset/base/241376 Log: MFC r240879 This patch fixes a nit in the em, lem, and igb driver statistics. Increment adapter->dropped_pkts instead of if_ierrors because if_ierrors is overwritten by hw stats collection. Submitted by: Andrew Boyer Reviewed by: Jack F Vogel Modified: stable/8/sys/dev/e1000/if_em.c stable/8/sys/dev/e1000/if_igb.c stable/8/sys/dev/e1000/if_lem.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/e1000/ (props changed) Modified: stable/8/sys/dev/e1000/if_em.c ============================================================================== --- stable/8/sys/dev/e1000/if_em.c Tue Oct 9 17:06:31 2012 (r241375) +++ stable/8/sys/dev/e1000/if_em.c Tue Oct 9 18:02:05 2012 (r241376) @@ -4336,7 +4336,7 @@ em_rxeof(struct rx_ring *rxr, int count, if ((cur->errors & E1000_RXD_ERR_FRAME_ERR_MASK) || (rxr->discard == TRUE)) { - ifp->if_ierrors++; + adapter->dropped_pkts++; ++rxr->rx_discarded; if (!eop) /* Catch subsequent segs */ rxr->discard = TRUE; Modified: stable/8/sys/dev/e1000/if_igb.c ============================================================================== --- stable/8/sys/dev/e1000/if_igb.c Tue Oct 9 17:06:31 2012 (r241375) +++ stable/8/sys/dev/e1000/if_igb.c Tue Oct 9 18:02:05 2012 (r241376) @@ -4610,7 +4610,7 @@ igb_rxeof(struct igb_queue *que, int cou /* Make sure all segments of a bad packet are discarded */ if (((staterr & E1000_RXDEXT_ERR_FRAME_ERR_MASK) != 0) || (rxr->discard)) { - ifp->if_ierrors++; + adapter->dropped_pkts++; ++rxr->rx_discarded; if (!eop) /* Catch subsequent segs */ rxr->discard = TRUE; Modified: stable/8/sys/dev/e1000/if_lem.c ============================================================================== --- stable/8/sys/dev/e1000/if_lem.c Tue Oct 9 17:06:31 2012 (r241375) +++ stable/8/sys/dev/e1000/if_lem.c Tue Oct 9 18:02:05 2012 (r241376) @@ -3522,7 +3522,7 @@ skip: adapter->lmp = NULL; } } else { - ifp->if_ierrors++; + adapter->dropped_pkts++; discard: /* Reuse loaded DMA map and just update mbuf chain */ mp = adapter->rx_buffer_area[i].m_head; From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 18:02:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A7A46CB9; Tue, 9 Oct 2012 18:02:10 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 76D718FC14; Tue, 9 Oct 2012 18:02:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q99I2As8048704; Tue, 9 Oct 2012 18:02:10 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q99I2AaZ048700; Tue, 9 Oct 2012 18:02:10 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201210091802.q99I2AaZ048700@svn.freebsd.org> From: Sean Bruno Date: Tue, 9 Oct 2012 18:02:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r241377 - stable/7/sys/dev/e1000 X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 18:02:10 -0000 Author: sbruno Date: Tue Oct 9 18:02:09 2012 New Revision: 241377 URL: http://svn.freebsd.org/changeset/base/241377 Log: MFC r240879 This patch fixes a nit in the em, lem, and igb driver statistics. Increment adapter->dropped_pkts instead of if_ierrors because if_ierrors is overwritten by hw stats collection. Submitted by: Andrew Boyer Reviewed by: Jack F Vogel Modified: stable/7/sys/dev/e1000/if_em.c stable/7/sys/dev/e1000/if_igb.c stable/7/sys/dev/e1000/if_lem.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/e1000/if_em.c ============================================================================== --- stable/7/sys/dev/e1000/if_em.c Tue Oct 9 18:02:05 2012 (r241376) +++ stable/7/sys/dev/e1000/if_em.c Tue Oct 9 18:02:09 2012 (r241377) @@ -4064,7 +4064,7 @@ em_rxeof(struct rx_ring *rxr, int count, if ((cur->errors & E1000_RXD_ERR_FRAME_ERR_MASK) || (rxr->discard == TRUE)) { - ifp->if_ierrors++; + adapter->dropped_pkts++; ++rxr->rx_discarded; if (!eop) /* Catch subsequent segs */ rxr->discard = TRUE; Modified: stable/7/sys/dev/e1000/if_igb.c ============================================================================== --- stable/7/sys/dev/e1000/if_igb.c Tue Oct 9 18:02:05 2012 (r241376) +++ stable/7/sys/dev/e1000/if_igb.c Tue Oct 9 18:02:09 2012 (r241377) @@ -4152,7 +4152,7 @@ igb_rxeof(struct igb_queue *que, int cou /* Make sure all segments of a bad packet are discarded */ if (((staterr & E1000_RXDEXT_ERR_FRAME_ERR_MASK) != 0) || (rxr->discard)) { - ifp->if_ierrors++; + adapter->dropped_pkts++; ++rxr->rx_discarded; if (!eop) /* Catch subsequent segs */ rxr->discard = TRUE; Modified: stable/7/sys/dev/e1000/if_lem.c ============================================================================== --- stable/7/sys/dev/e1000/if_lem.c Tue Oct 9 18:02:05 2012 (r241376) +++ stable/7/sys/dev/e1000/if_lem.c Tue Oct 9 18:02:09 2012 (r241377) @@ -3509,7 +3509,7 @@ skip: adapter->lmp = NULL; } } else { - ifp->if_ierrors++; + adapter->dropped_pkts++; discard: /* Reuse loaded DMA map and just update mbuf chain */ mp = adapter->rx_buffer_area[i].m_head; From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 18:25:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1A4CF933 for ; Tue, 9 Oct 2012 18:25:01 +0000 (UTC) (envelope-from ache@vniz.net) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 82CFB8FC0C for ; Tue, 9 Oct 2012 18:25:00 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id b5so4785689lbd.13 for ; Tue, 09 Oct 2012 11:24:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:message-id:disposition-notification-to:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:openpgp :content-type:content-transfer-encoding:x-gm-message-state; bh=TVjcFz5S/PGFmD+VTcRMCphFZ9Eo0k+AYJLG+DfzOqY=; b=fIDeYpLIroOl0yFJ6ASw5eoSjaQHAxJbM1e0jK/HnSVxkmlQpJ0dl7JvyGBPhVUvZ1 MDd1mANQwOzGo0Q7ztLI8brwb2LRmRlB3rRw1ya9t7R2RK98kB6oKaiq+r6/sQG7bkjM UAUVmHpbk8Vp80tglZt1qHXj50WJzTCLw1FGGvvL7ZHHbKkSpl9wHH3uHu+gj42GZ+JR /SVoq4Y0aEGzmrjd3HisJ/VsEGcyfMNHbIkm9J/QeyLwaBskBXItokPaRQbfOmgdibW+ +YhumPKxUbaQskLXqOEmsdboJ93PtJ78vMw4B0Go5JBTorjyXSZMZoTtbzqNqgs6AP+C rwMQ== Received: by 10.112.38.134 with SMTP id g6mr8483301lbk.39.1349807098838; Tue, 09 Oct 2012 11:24:58 -0700 (PDT) Received: from [192.168.1.2] ([89.169.140.97]) by mx.google.com with ESMTPS id e4sm84017lby.12.2012.10.09.11.24.57 (version=SSLv3 cipher=OTHER); Tue, 09 Oct 2012 11:24:58 -0700 (PDT) Sender: "Chernov, Andrey" Message-ID: <50746BF8.5010307@freebsd.org> Date: Tue, 09 Oct 2012 22:24:56 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: Eitan Adler Subject: Re: svn commit: r241373 - head/lib/libc/stdlib References: <201210091425.q99EPFS6020787@svn.freebsd.org> <507451DE.9060909@freebsd.org> In-Reply-To: OpenPGP: id=964474DD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQlcomfv8X3hQ+GdUa6WWXXuV6Q3Xrf6kFvCxYvvrE0Ns4P5KzOmGRvywbb/sQXLN7Pp5Rot Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, theraven@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 18:25:01 -0000 On 09.10.2012 21:47, Eitan Adler wrote: > On 9 October 2012 12:33, Andrey Chernov wrote: >> Do you check assembler output for _both_ cases? > > Yes. ... > http://blog.eitanadler.com/2012/10/reduced-entropy-in-rand-and-random.html At this URL I see only already known buggy assembler without 'volatile' keyword (which is fixed by adding 'volatile' in srandomdev()). As I already mention, adding 'volatile' helps any gcc and clang finally generated assembler code (checked by cc -S ...). What happens with LLVM intermediate code, I mean mentioned by David call void @srand(i32 undef) is a big question and perhaps clang bug. Please note that we use 'volatile' a lot in the kernel, just 'grep -r volatile /sys'. Some of that potentially can hit the same (probably) bug. And, in case it is the bug, it should be fixed in clang. > volatile is still undefined: see 5.1.2.2.3 and 6.7.2.4 of ISO9899 I don't have ISO9899 nearby, could you directly quote mentioned sections, please? Do you against 'volatile' usage at all? It seems whole kernel (see above) contradicts with such point of view. From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 18:45:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2EBE28FA; Tue, 9 Oct 2012 18:45:09 +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 150D18FC1A; Tue, 9 Oct 2012 18:45:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q99Ij9Lj054577; Tue, 9 Oct 2012 18:45:09 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q99Ij88H054570; Tue, 9 Oct 2012 18:45:08 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210091845.q99Ij88H054570@svn.freebsd.org> From: John Baldwin Date: Tue, 9 Oct 2012 18:45:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241378 - in stable/8/sys/dev: cardbus pci X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 18:45:09 -0000 Author: jhb Date: Tue Oct 9 18:45:08 2012 New Revision: 241378 URL: http://svn.freebsd.org/changeset/base/241378 Log: MFC 201279,201280,201286,213907,214146,220195,222753,223371,225515,235833: Various fixes to managing PCI BARs including proper support for managing PCI ROM BARs: - Teach the PCI bus driver to handle PCIR_BIOS BARs properly and remove special handling for the PCIR_BIOS decoding enable bit from the cardbus driver. The PCIR_BIOS BAR does include type bits like other BARs. Instead, it is always a 32-bit non-prefetchable memory BAR where the low bit is used as a flag to enable decoding. - Explicitly track the state of all known BARs for each PCI device. The PCI bus driver will now remember the size of a BAR obtained during the initial bus scan and use that size when doing lazy resource allocation rather than resizing the BAR. The bus driver will now also report unallocated BARs to userland for display by 'pciconf -lb'. - Add a constant for the offset of the ROM BIOS BAR in PCI-PCI bridges and properly handle ROM BIOS BARs in PCI-PCI bridges. The PCI bus now also properly handles the lack of a ROM BIOS BAR in a PCI-Cardbus bridge. Tested by: John Kozubik john kozubik com Modified: stable/8/sys/dev/cardbus/cardbus_cis.c stable/8/sys/dev/pci/pci.c stable/8/sys/dev/pci/pci_private.h stable/8/sys/dev/pci/pci_user.c stable/8/sys/dev/pci/pcireg.h stable/8/sys/dev/pci/pcivar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/cardbus/ (props changed) stable/8/sys/dev/pci/ (props changed) Modified: stable/8/sys/dev/cardbus/cardbus_cis.c ============================================================================== --- stable/8/sys/dev/cardbus/cardbus_cis.c Tue Oct 9 18:02:09 2012 (r241377) +++ stable/8/sys/dev/cardbus/cardbus_cis.c Tue Oct 9 18:45:08 2012 (r241378) @@ -324,7 +324,7 @@ decode_tuple_bar(device_t cbdev, device_ * hint when the cardbus bridge is a child of pci0 (the main * bus). The PC Card spec seems to indicate that this should * only be done on x86 based machines, which suggests that on - * non-x86 machines the adddresses can be anywhere. Since the + * non-x86 machines the addresses can be anywhere. Since the * hardware can do it on non-x86 machines, it should be able * to do it on x86 machines too. Therefore, we can and should * ignore this hint. Furthermore, the PC Card spec recommends @@ -435,9 +435,7 @@ cardbus_read_tuple_finish(device_t cbdev { if (res != CIS_CONFIG_SPACE) { bus_release_resource(child, SYS_RES_MEMORY, rid, res); - if (rid == PCIM_CIS_ASI_ROM) - pci_write_config(child, rid, pci_read_config(child, - rid, 4) & ~PCIR_BIOS, 4); + bus_delete_resource(child, SYS_RES_MEMORY, rid); } } @@ -474,7 +472,7 @@ cardbus_read_tuple_init(device_t cbdev, } /* allocate the memory space to read CIS */ - res = bus_alloc_resource(child, SYS_RES_MEMORY, rid, 0, ~0, 1, + res = bus_alloc_resource_any(child, SYS_RES_MEMORY, rid, rman_make_alignment_flags(4096) | RF_ACTIVE); if (res == NULL) { device_printf(cbdev, "Unable to allocate resource " @@ -482,9 +480,6 @@ cardbus_read_tuple_init(device_t cbdev, return (NULL); } DEVPRINTF((cbdev, "CIS Mapped to %#lx\n", rman_get_start(res))); - if (*rid == PCIR_BIOS) - pci_write_config(child, *rid, - rman_get_start(res) | PCIM_BIOS_ENABLE, 4); /* Flip to the right ROM image if CIS is in ROM */ if (space == PCIM_CIS_ASI_ROM) { @@ -508,8 +503,8 @@ cardbus_read_tuple_init(device_t cbdev, device_printf(cbdev, "Bad header in rom %d: " "[%x] %04x\n", romnum, imagebase + CARDBUS_EXROM_SIGNATURE, romsig); - bus_release_resource(child, SYS_RES_MEMORY, - *rid, res); + cardbus_read_tuple_finish(cbdev, child, *rid, + res); *rid = 0; return (NULL); } @@ -545,8 +540,8 @@ cardbus_read_tuple_init(device_t cbdev, CARDBUS_EXROM_DATA_INDICATOR) & 0x80) != 0) { device_printf(cbdev, "Cannot find CIS in " "Option ROM\n"); - bus_release_resource(child, SYS_RES_MEMORY, - *rid, res); + cardbus_read_tuple_finish(cbdev, child, *rid, + res); *rid = 0; return (NULL); } Modified: stable/8/sys/dev/pci/pci.c ============================================================================== --- stable/8/sys/dev/pci/pci.c Tue Oct 9 18:02:09 2012 (r241377) +++ stable/8/sys/dev/pci/pci.c Tue Oct 9 18:45:08 2012 (r241378) @@ -91,10 +91,16 @@ __FBSDID("$FreeBSD$"); #endif #endif +#define PCIR_IS_BIOS(cfg, reg) \ + (((cfg)->hdrtype == PCIM_HDRTYPE_NORMAL && reg == PCIR_BIOS) || \ + ((cfg)->hdrtype == PCIM_HDRTYPE_BRIDGE && reg == PCIR_BIOS_1)) + 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 pci_addr_t pci_rombase(uint64_t mapreg); +static int pci_romsize(uint64_t testval); static void pci_fixancient(pcicfgregs *cfg); static int pci_printf(pcicfgregs *cfg, const char *fmt, ...); @@ -162,7 +168,7 @@ static device_method_t pci_methods[] = { DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), DEVMETHOD(bus_release_resource, bus_generic_rl_release_resource), DEVMETHOD(bus_activate_resource, pci_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_deactivate_resource, pci_deactivate_resource), DEVMETHOD(bus_child_pnpinfo_str, pci_child_pnpinfo_str_method), DEVMETHOD(bus_child_location_str, pci_child_location_str_method), DEVMETHOD(bus_remap_intr, pci_remap_intr_method), @@ -324,7 +330,7 @@ static int pci_usb_takeover = 1; static int pci_usb_takeover = 0; #endif TUNABLE_INT("hw.pci.usb_early_takeover", &pci_usb_takeover); -SYSCTL_INT(_hw_pci, OID_AUTO, usb_early_takeover, CTLFLAG_RD | CTLFLAG_TUN, +SYSCTL_INT(_hw_pci, OID_AUTO, usb_early_takeover, CTLFLAG_RDTUN, &pci_usb_takeover, 1, "Enable early takeover of USB controllers.\n\ Disable this if you depend on BIOS emulation of USB devices, that is\n\ you use USB devices (like keyboard or mouse) but do not load USB drivers"); @@ -447,6 +453,34 @@ pci_mapsize(uint64_t testval) return (ln2size); } +/* return base address of device ROM */ + +static pci_addr_t +pci_rombase(uint64_t mapreg) +{ + + return (mapreg & PCIM_BIOS_ADDR_MASK); +} + +/* return log2 of map size decided for device ROM */ + +static int +pci_romsize(uint64_t testval) +{ + int ln2size; + + testval = pci_rombase(testval); + ln2size = 0; + if (testval != 0) { + while ((testval & 1) == 0) + { + ln2size++; + testval >>= 1; + } + } + return (ln2size); +} + /* return log2 of address range supported by map register */ static int @@ -551,6 +585,7 @@ pci_read_device(device_t pcib, int d, in cfg->mfdev = (cfg->hdrtype & PCIM_MFDEV) != 0; cfg->hdrtype &= ~PCIM_MFDEV; + STAILQ_INIT(&cfg->maps); pci_fixancient(cfg); pci_hdrtypedata(pcib, b, s, f, cfg); @@ -2124,6 +2159,7 @@ int pci_freecfg(struct pci_devinfo *dinfo) { struct devlist *devlist_head; + struct pci_map *pm, *next; int i; devlist_head = &pci_devq; @@ -2137,6 +2173,9 @@ pci_freecfg(struct pci_devinfo *dinfo) free(dinfo->cfg.vpd.vpd_w[i].value, M_DEVBUF); free(dinfo->cfg.vpd.vpd_w, M_DEVBUF); } + STAILQ_FOREACH_SAFE(pm, &dinfo->cfg.maps, pm_link, next) { + free(pm, M_DEVBUF); + } STAILQ_REMOVE(devlist_head, dinfo, pci_devinfo, pci_links); free(dinfo, M_DEVBUF); @@ -2411,10 +2450,27 @@ pci_memen(device_t dev) static void pci_read_bar(device_t dev, int reg, pci_addr_t *mapp, pci_addr_t *testvalp) { + struct pci_devinfo *dinfo; pci_addr_t map, testval; int ln2range; uint16_t cmd; + /* + * The device ROM BAR is special. It is always a 32-bit + * memory BAR. Bit 0 is special and should not be set when + * sizing the BAR. + */ + dinfo = device_get_ivars(dev); + if (PCIR_IS_BIOS(&dinfo->cfg, reg)) { + map = pci_read_config(dev, reg, 4); + pci_write_config(dev, reg, 0xfffffffe, 4); + testval = pci_read_config(dev, reg, 4); + pci_write_config(dev, reg, map, 4); + *mapp = map; + *testvalp = testval; + return; + } + map = pci_read_config(dev, reg, 4); ln2range = pci_maprange(map); if (ln2range == 64) @@ -2456,16 +2512,100 @@ pci_read_bar(device_t dev, int reg, pci_ } static void -pci_write_bar(device_t dev, int reg, pci_addr_t base) +pci_write_bar(device_t dev, struct pci_map *pm, pci_addr_t base) { - pci_addr_t map; + struct pci_devinfo *dinfo; int ln2range; - map = pci_read_config(dev, reg, 4); - ln2range = pci_maprange(map); - pci_write_config(dev, reg, base, 4); + /* The device ROM BAR is always a 32-bit memory BAR. */ + dinfo = device_get_ivars(dev); + if (PCIR_IS_BIOS(&dinfo->cfg, pm->pm_reg)) + ln2range = 32; + else + ln2range = pci_maprange(pm->pm_value); + pci_write_config(dev, pm->pm_reg, base, 4); if (ln2range == 64) - pci_write_config(dev, reg + 4, base >> 32, 4); + pci_write_config(dev, pm->pm_reg + 4, base >> 32, 4); + pm->pm_value = pci_read_config(dev, pm->pm_reg, 4); + if (ln2range == 64) + pm->pm_value |= (pci_addr_t)pci_read_config(dev, + pm->pm_reg + 4, 4) << 32; +} + +struct pci_map * +pci_find_bar(device_t dev, int reg) +{ + struct pci_devinfo *dinfo; + struct pci_map *pm; + + dinfo = device_get_ivars(dev); + STAILQ_FOREACH(pm, &dinfo->cfg.maps, pm_link) { + if (pm->pm_reg == reg) + return (pm); + } + return (NULL); +} + +int +pci_bar_enabled(device_t dev, struct pci_map *pm) +{ + struct pci_devinfo *dinfo; + uint16_t cmd; + + dinfo = device_get_ivars(dev); + if (PCIR_IS_BIOS(&dinfo->cfg, pm->pm_reg) && + !(pm->pm_value & PCIM_BIOS_ENABLE)) + return (0); + cmd = pci_read_config(dev, PCIR_COMMAND, 2); + if (PCIR_IS_BIOS(&dinfo->cfg, pm->pm_reg) || PCI_BAR_MEM(pm->pm_value)) + return ((cmd & PCIM_CMD_MEMEN) != 0); + else + return ((cmd & PCIM_CMD_PORTEN) != 0); +} + +static struct pci_map * +pci_add_bar(device_t dev, int reg, pci_addr_t value, pci_addr_t size) +{ + struct pci_devinfo *dinfo; + struct pci_map *pm, *prev; + + dinfo = device_get_ivars(dev); + pm = malloc(sizeof(*pm), M_DEVBUF, M_WAITOK | M_ZERO); + pm->pm_reg = reg; + pm->pm_value = value; + pm->pm_size = size; + STAILQ_FOREACH(prev, &dinfo->cfg.maps, pm_link) { + KASSERT(prev->pm_reg != pm->pm_reg, ("duplicate map %02x", + reg)); + if (STAILQ_NEXT(prev, pm_link) == NULL || + STAILQ_NEXT(prev, pm_link)->pm_reg > pm->pm_reg) + break; + } + if (prev != NULL) + STAILQ_INSERT_AFTER(&dinfo->cfg.maps, prev, pm, pm_link); + else + STAILQ_INSERT_TAIL(&dinfo->cfg.maps, pm, pm_link); + return (pm); +} + +static void +pci_restore_bars(device_t dev) +{ + struct pci_devinfo *dinfo; + struct pci_map *pm; + int ln2range; + + dinfo = device_get_ivars(dev); + STAILQ_FOREACH(pm, &dinfo->cfg.maps, pm_link) { + if (PCIR_IS_BIOS(&dinfo->cfg, pm->pm_reg)) + ln2range = 32; + else + ln2range = pci_maprange(pm->pm_value); + pci_write_config(dev, pm->pm_reg, pm->pm_value, 4); + if (ln2range == 64) + pci_write_config(dev, pm->pm_reg + 4, + pm->pm_value >> 32, 4); + } } /* @@ -2476,12 +2616,24 @@ static int pci_add_map(device_t bus, device_t dev, int reg, struct resource_list *rl, int force, int prefetch) { + struct pci_map *pm; pci_addr_t base, map, testval; pci_addr_t start, end, count; int barlen, basezero, maprange, mapsize, type; uint16_t cmd; struct resource *res; + /* + * The BAR may already exist if the device is a CardBus card + * whose CIS is stored in this BAR. + */ + pm = pci_find_bar(dev, reg); + if (pm != NULL) { + maprange = pci_maprange(pm->pm_value); + barlen = maprange == 64 ? 2 : 1; + return (barlen); + } + pci_read_bar(dev, reg, &map, &testval); if (PCI_BAR_MEM(map)) { type = SYS_RES_MEMORY; @@ -2512,6 +2664,8 @@ pci_add_map(device_t bus, device_t dev, (type == SYS_RES_IOPORT && mapsize < 2)) return (barlen); + /* Save a record of this BAR. */ + pm = pci_add_bar(dev, reg, map, mapsize); if (bootverbose) { printf("\tmap[%02x]: type %s, range %2d, base %#jx, size %2d", reg, pci_maptype(map), maprange, (uintmax_t)base, mapsize); @@ -2573,7 +2727,7 @@ pci_add_map(device_t bus, device_t dev, count = (pci_addr_t)1 << mapsize; if (basezero || base == pci_mapbase(testval)) { start = 0; /* Let the parent decide. */ - end = ~0ULL; + end = ~0ul; } else { start = base; end = base + count - 1; @@ -2601,7 +2755,7 @@ pci_add_map(device_t bus, device_t dev, start = rman_get_start(res); rman_set_device(res, bus); } - pci_write_bar(dev, reg, start); + pci_write_bar(dev, pm, start); return (barlen); } @@ -3037,7 +3191,7 @@ pci_suspend(device_t dev) return (error); for (i = 0; i < numdevs; i++) { child = devlist[i]; - dinfo = (struct pci_devinfo *) device_get_ivars(child); + dinfo = device_get_ivars(child); pci_cfg_save(child, dinfo, 0); } @@ -3454,7 +3608,7 @@ pci_probe_nomatch(device_t dev, device_t } printf(" at device %d.%d (no driver attached)\n", pci_get_slot(child), pci_get_function(child)); - pci_cfg_save(child, (struct pci_devinfo *)device_get_ivars(child), 1); + pci_cfg_save(child, device_get_ivars(child), 1); return; } @@ -3759,24 +3913,41 @@ pci_alloc_map(device_t dev, device_t chi struct resource_list *rl = &dinfo->resources; struct resource_list_entry *rle; struct resource *res; + struct pci_map *pm; pci_addr_t map, testval; int mapsize; - /* - * Weed out the bogons, and figure out how large the BAR/map - * is. Bars that read back 0 here are bogus and unimplemented. - * Note: atapci in legacy mode are special and handled elsewhere - * in the code. If you have a atapci device in legacy mode and - * it fails here, that other code is broken. - */ res = NULL; - pci_read_bar(child, *rid, &map, &testval); + pm = pci_find_bar(child, *rid); + if (pm != NULL) { + /* This is a BAR that we failed to allocate earlier. */ + mapsize = pm->pm_size; + map = pm->pm_value; + } else { + /* + * Weed out the bogons, and figure out how large the + * BAR/map is. BARs that read back 0 here are bogus + * and unimplemented. Note: atapci in legacy mode are + * special and handled elsewhere in the code. If you + * have a atapci device in legacy mode and it fails + * here, that other code is broken. + */ + pci_read_bar(child, *rid, &map, &testval); - /* Ignore a BAR with a base of 0. */ - if (pci_mapbase(testval) == 0) - goto out; + /* + * Determine the size of the BAR and ignore BARs with a size + * of 0. Device ROM BARs use a different mask value. + */ + if (PCIR_IS_BIOS(&dinfo->cfg, *rid)) + mapsize = pci_romsize(testval); + else + mapsize = pci_mapsize(testval); + if (mapsize == 0) + goto out; + pm = pci_add_bar(child, *rid, map, mapsize); + } - if (PCI_BAR_MEM(testval)) { + if (PCI_BAR_MEM(map) || PCIR_IS_BIOS(&dinfo->cfg, *rid)) { if (type != SYS_RES_MEMORY) { if (bootverbose) device_printf(dev, @@ -3803,16 +3974,15 @@ pci_alloc_map(device_t dev, device_t chi * situation where we might allocate the excess to * another driver, which won't work. */ - mapsize = pci_mapsize(testval); count = (pci_addr_t)1 << mapsize; if (RF_ALIGNMENT(flags) < mapsize) flags = (flags & ~RF_ALIGNMENT_MASK) | RF_ALIGNMENT_LOG2(mapsize); - if (PCI_BAR_MEM(testval) && (testval & PCIM_BAR_MEM_PREFETCH)) + if (PCI_BAR_MEM(map) && (map & PCIM_BAR_MEM_PREFETCH)) flags |= RF_PREFETCHABLE; /* * Allocate enough resource, and then write back the - * appropriate bar for that resource. + * appropriate BAR for that resource. */ res = BUS_ALLOC_RESOURCE(device_get_parent(dev), child, type, rid, start, end, count, flags & ~RF_ACTIVE); @@ -3836,7 +4006,7 @@ 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); + pci_write_bar(child, pm, map); out:; return (res); } @@ -3968,6 +4138,7 @@ int pci_activate_resource(device_t dev, device_t child, int type, int rid, struct resource *r) { + struct pci_devinfo *dinfo; int error; error = bus_generic_activate_resource(dev, child, type, rid, r); @@ -3976,6 +4147,11 @@ pci_activate_resource(device_t dev, devi /* Enable decoding in the command register when activating BARs. */ if (device_get_parent(child) == dev) { + /* Device ROMs need their decoding explicitly enabled. */ + dinfo = device_get_ivars(child); + if (type == SYS_RES_MEMORY && PCIR_IS_BIOS(&dinfo->cfg, rid)) + pci_write_bar(child, pci_find_bar(child, rid), + rman_get_start(r) | PCIM_BIOS_ENABLE); switch (type) { case SYS_RES_IOPORT: case SYS_RES_MEMORY: @@ -3986,6 +4162,27 @@ pci_activate_resource(device_t dev, devi return (error); } +int +pci_deactivate_resource(device_t dev, device_t child, int type, + int rid, struct resource *r) +{ + struct pci_devinfo *dinfo; + int error; + + error = bus_generic_deactivate_resource(dev, child, type, rid, r); + if (error) + return (error); + + /* Disable decoding for device ROMs. */ + if (device_get_parent(child) == dev) { + dinfo = device_get_ivars(child); + if (type == SYS_RES_MEMORY && PCIR_IS_BIOS(&dinfo->cfg, rid)) + pci_write_bar(child, pci_find_bar(child, rid), + rman_get_start(r)); + } + return (0); +} + void pci_delete_resource(device_t dev, device_t child, int type, int rid) { @@ -4021,7 +4218,7 @@ pci_delete_resource(device_t dev, device switch (type) { case SYS_RES_IOPORT: case SYS_RES_MEMORY: - pci_write_bar(child, rid, 0); + pci_write_bar(child, pci_find_bar(child, rid), 0); break; } #endif @@ -4128,7 +4325,6 @@ pci_modevent(module_t mod, int what, voi void pci_cfg_restore(device_t dev, struct pci_devinfo *dinfo) { - int i; /* * Only do header type 0 devices. Type 1 devices are bridges, @@ -4148,12 +4344,9 @@ pci_cfg_restore(device_t dev, struct pci * the noise on boot by doing nothing if we are already in * state D0. */ - if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { + if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) pci_set_powerstate(dev, PCI_POWERSTATE_D0); - } - for (i = 0; i < dinfo->cfg.nummaps; i++) - pci_write_config(dev, PCIR_BAR(i), dinfo->cfg.bar[i], 4); - pci_write_config(dev, PCIR_BIOS, dinfo->cfg.bios, 4); + pci_restore_bars(dev); pci_write_config(dev, PCIR_COMMAND, dinfo->cfg.cmdreg, 2); pci_write_config(dev, PCIR_INTLINE, dinfo->cfg.intline, 1); pci_write_config(dev, PCIR_INTPIN, dinfo->cfg.intpin, 1); @@ -4174,7 +4367,6 @@ pci_cfg_restore(device_t dev, struct pci void pci_cfg_save(device_t dev, struct pci_devinfo *dinfo, int setstate) { - int i; uint32_t cls; int ps; @@ -4187,9 +4379,6 @@ pci_cfg_save(device_t dev, struct pci_de */ if (dinfo->cfg.hdrtype != 0) return; - for (i = 0; i < dinfo->cfg.nummaps; i++) - dinfo->cfg.bar[i] = pci_read_config(dev, PCIR_BAR(i), 4); - dinfo->cfg.bios = pci_read_config(dev, PCIR_BIOS, 4); /* * Some drivers apparently write to these registers w/o updating our Modified: stable/8/sys/dev/pci/pci_private.h ============================================================================== --- stable/8/sys/dev/pci/pci_private.h Tue Oct 9 18:02:09 2012 (r241377) +++ stable/8/sys/dev/pci/pci_private.h Tue Oct 9 18:45:08 2012 (r241378) @@ -91,6 +91,8 @@ int pci_release_resource(device_t dev, int rid, struct resource *r); int pci_activate_resource(device_t dev, device_t child, int type, int rid, struct resource *r); +int pci_deactivate_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/8/sys/dev/pci/pci_user.c ============================================================================== --- stable/8/sys/dev/pci/pci_user.c Tue Oct 9 18:02:09 2012 (r241377) +++ stable/8/sys/dev/pci/pci_user.c Tue Oct 9 18:45:08 2012 (r241378) @@ -309,8 +309,7 @@ pci_ioctl(struct cdev *dev, u_long cmd, struct pci_io *io; struct pci_bar_io *bio; struct pci_match_conf *pattern_buf; - struct resource_list_entry *rle; - uint32_t value; + struct pci_map *pm; size_t confsz, iolen, pbufsz; int error, ionum, i, num_patterns; #ifdef PRE7_COMPAT @@ -685,54 +684,14 @@ getconfexit: error = ENODEV; break; } - dinfo = device_get_ivars(pcidev); - - /* - * Look for a resource list entry matching the requested BAR. - * - * XXX: This will not find BARs that are not initialized, but - * maybe that is ok? - */ - rle = resource_list_find(&dinfo->resources, SYS_RES_MEMORY, - bio->pbi_reg); - if (rle == NULL) - rle = resource_list_find(&dinfo->resources, - SYS_RES_IOPORT, bio->pbi_reg); - if (rle == NULL || rle->res == NULL) { + pm = pci_find_bar(pcidev, bio->pbi_reg); + if (pm == NULL) { error = EINVAL; break; } - - /* - * Ok, we have a resource for this BAR. Read the lower - * 32 bits to get any flags. - */ - value = pci_read_config(pcidev, bio->pbi_reg, 4); - if (PCI_BAR_MEM(value)) { - if (rle->type != SYS_RES_MEMORY) { - error = EINVAL; - break; - } - value &= ~PCIM_BAR_MEM_BASE; - } else { - if (rle->type != SYS_RES_IOPORT) { - error = EINVAL; - break; - } - value &= ~PCIM_BAR_IO_BASE; - } - bio->pbi_base = rman_get_start(rle->res) | value; - bio->pbi_length = rman_get_size(rle->res); - - /* - * Check the command register to determine if this BAR - * is enabled. - */ - value = pci_read_config(pcidev, PCIR_COMMAND, 2); - if (rle->type == SYS_RES_MEMORY) - bio->pbi_enabled = (value & PCIM_CMD_MEMEN) != 0; - else - bio->pbi_enabled = (value & PCIM_CMD_PORTEN) != 0; + bio->pbi_base = pm->pm_value; + bio->pbi_length = (pci_addr_t)1 << pm->pm_size; + bio->pbi_enabled = pci_bar_enabled(pcidev, pm); error = 0; break; default: Modified: stable/8/sys/dev/pci/pcireg.h ============================================================================== --- stable/8/sys/dev/pci/pcireg.h Tue Oct 9 18:02:09 2012 (r241377) +++ stable/8/sys/dev/pci/pcireg.h Tue Oct 9 18:45:08 2012 (r241378) @@ -213,6 +213,7 @@ #define PCIM_BRPM_64 0x1 #define PCIM_BRPM_MASK 0xf +#define PCIR_BIOS_1 0x38 #define PCIR_BRIDGECTL_1 0x3e /* config registers for header type 2 (CardBus) devices */ Modified: stable/8/sys/dev/pci/pcivar.h ============================================================================== --- stable/8/sys/dev/pci/pcivar.h Tue Oct 9 18:02:09 2012 (r241377) +++ stable/8/sys/dev/pci/pcivar.h Tue Oct 9 18:45:08 2012 (r241378) @@ -46,7 +46,14 @@ struct pcicfg_pp { uint8_t pp_pmcsr; /* config space address of PMCSR reg */ uint8_t pp_data; /* config space address of PCI power data reg */ }; - + +struct pci_map { + pci_addr_t pm_value; /* Raw BAR value */ + pci_addr_t pm_size; + uint8_t pm_reg; + STAILQ_ENTRY(pci_map) pm_link; +}; + struct vpd_readonly { char keyword[2]; char *value; @@ -120,8 +127,7 @@ struct pcicfg_ht { typedef struct pcicfg { struct device *dev; /* device which owns this */ - uint32_t bar[PCI_MAXMAPS_0]; /* BARs */ - uint32_t bios; /* BIOS mapping */ + STAILQ_HEAD(, pci_map) maps; /* BARs */ uint16_t subvendor; /* card vendor ID */ uint16_t subdevice; /* card device ID, assigned by card vendor */ @@ -480,4 +486,7 @@ STAILQ_HEAD(devlist, pci_devinfo); extern struct devlist pci_devq; extern uint32_t pci_generation; +struct pci_map *pci_find_bar(device_t dev, int reg); +int pci_bar_enabled(device_t dev, struct pci_map *pm); + #endif /* _PCIVAR_H_ */ From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 19:04:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8DEFBD3; Tue, 9 Oct 2012 19:04:24 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3C09D8FC0C; Tue, 9 Oct 2012 19:04:24 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 89016B963; Tue, 9 Oct 2012 15:04:23 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Subject: Re: svn commit: r241378 - in stable/8/sys/dev: cardbus pci Date: Tue, 9 Oct 2012 15:04:13 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210091845.q99Ij88H054570@svn.freebsd.org> In-Reply-To: <201210091845.q99Ij88H054570@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201210091504.13804.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 09 Oct 2012 15:04:23 -0400 (EDT) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-8@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 19:04:24 -0000 On Tuesday, October 09, 2012 2:45:08 pm John Baldwin wrote: > Author: jhb > Date: Tue Oct 9 18:45:08 2012 > New Revision: 241378 > URL: http://svn.freebsd.org/changeset/base/241378 > > Log: > MFC 201279,201280,201286,213907,214146,220195,222753,223371,225515,235833: > Various fixes to managing PCI BARs including proper support for managing > PCI ROM BARs: > - Teach the PCI bus driver to handle PCIR_BIOS BARs properly and remove > special handling for the PCIR_BIOS decoding enable bit from the cardbus > driver. The PCIR_BIOS BAR does include type bits like other BARs. > Instead, it is always a 32-bit non-prefetchable memory BAR where the low > bit is used as a flag to enable decoding. > - Explicitly track the state of all known BARs for each PCI device. The PCI > bus driver will now remember the size of a BAR obtained during the initial > bus scan and use that size when doing lazy resource allocation rather than > resizing the BAR. The bus driver will now also report unallocated BARs to > userland for display by 'pciconf -lb'. > - Add a constant for the offset of the ROM BIOS BAR in PCI-PCI bridges and > properly handle ROM BIOS BARs in PCI-PCI bridges. The PCI bus now also > properly handles the lack of a ROM BIOS BAR in a PCI-Cardbus bridge. > > Tested by: John Kozubik john kozubik com In particular this fixes problems with the cardbus driver not being able to read CIS information from cards that stored their CIS in a PCI ROM BAR. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 19:53:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3FD9C7F4; Tue, 9 Oct 2012 19:53:16 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27DE88FC0C; Tue, 9 Oct 2012 19:53:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q99JrGUx066236; Tue, 9 Oct 2012 19:53:16 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q99JrFJr066234; Tue, 9 Oct 2012 19:53:15 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201210091953.q99JrFJr066234@svn.freebsd.org> From: Jim Harris Date: Tue, 9 Oct 2012 19:53:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241379 - stable/9/sys/dev/tws X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 19:53:16 -0000 Author: jimharris Date: Tue Oct 9 19:53:15 2012 New Revision: 241379 URL: http://svn.freebsd.org/changeset/base/241379 Log: MFC r240900: Specify MTX_RECURSE for the controller's io_lock. Without it, tws(4) immediately panics on boot with INVARIANTS enabled. The driver already clearly expects to be able to recurse on this mutex - the main I/O path is always recursing on this lock. Modified: stable/9/sys/dev/tws/tws.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/tws/tws.c ============================================================================== --- stable/9/sys/dev/tws/tws.c Tue Oct 9 18:45:08 2012 (r241378) +++ stable/9/sys/dev/tws/tws.c Tue Oct 9 19:53:15 2012 (r241379) @@ -197,7 +197,7 @@ tws_attach(device_t dev) mtx_init( &sc->q_lock, "tws_q_lock", NULL, MTX_DEF); mtx_init( &sc->sim_lock, "tws_sim_lock", NULL, MTX_DEF); mtx_init( &sc->gen_lock, "tws_gen_lock", NULL, MTX_DEF); - mtx_init( &sc->io_lock, "tws_io_lock", NULL, MTX_DEF); + mtx_init( &sc->io_lock, "tws_io_lock", NULL, MTX_DEF | MTX_RECURSE); if ( tws_init_trace_q(sc) == FAILURE ) printf("trace init failure\n"); From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 19:55:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A69F89E; Tue, 9 Oct 2012 19:55:13 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6C4F8FC08; Tue, 9 Oct 2012 19:55:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q99JtCDv066671; Tue, 9 Oct 2012 19:55:12 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q99JtCD7066669; Tue, 9 Oct 2012 19:55:12 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201210091955.q99JtCD7066669@svn.freebsd.org> From: Jim Harris Date: Tue, 9 Oct 2012 19:55:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241380 - stable/9/sys/dev/tws X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 19:55:13 -0000 Author: jimharris Date: Tue Oct 9 19:55:12 2012 New Revision: 241380 URL: http://svn.freebsd.org/changeset/base/241380 Log: MFC r240901: Use CAM_SEL_TIMEOUT and CAM_DEV_NOT_THERE to report missing targets or LUNs respectively. This removes a huge number of error messages from CAM during bus scans. Modified: stable/9/sys/dev/tws/tws_cam.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/tws/tws_cam.c ============================================================================== --- stable/9/sys/dev/tws/tws_cam.c Tue Oct 9 19:53:15 2012 (r241379) +++ stable/9/sys/dev/tws/tws_cam.c Tue Oct 9 19:55:12 2012 (r241380) @@ -529,10 +529,10 @@ tws_scsi_err_complete(struct tws_request if ( ccb->ccb_h.target_lun ) { TWS_TRACE_DEBUG(sc, "invalid lun error",0,0); - ccb->ccb_h.status |= CAM_LUN_INVALID; + ccb->ccb_h.status |= CAM_DEV_NOT_THERE; } else { TWS_TRACE_DEBUG(sc, "invalid target error",0,0); - ccb->ccb_h.status |= CAM_TID_INVALID; + ccb->ccb_h.status |= CAM_SEL_TIMEOUT; } } else { From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 19:57:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B40B7960; Tue, 9 Oct 2012 19:57:18 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C4078FC0C; Tue, 9 Oct 2012 19:57:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q99JvIhh067133; Tue, 9 Oct 2012 19:57:18 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q99JvILD067131; Tue, 9 Oct 2012 19:57:18 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201210091957.q99JvILD067131@svn.freebsd.org> From: Jim Harris Date: Tue, 9 Oct 2012 19:57:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241381 - stable/8/sys/dev/tws X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 19:57:18 -0000 Author: jimharris Date: Tue Oct 9 19:57:18 2012 New Revision: 241381 URL: http://svn.freebsd.org/changeset/base/241381 Log: MFC r240900: Specify MTX_RECURSE for the controller's io_lock. Without it, tws(4) immediately panics on boot with INVARIANTS enabled. The driver already clearly expects to be able to recurse on this mutex - the main I/O path is always recursing on this lock. Modified: stable/8/sys/dev/tws/tws.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/tws/ (props changed) Modified: stable/8/sys/dev/tws/tws.c ============================================================================== --- stable/8/sys/dev/tws/tws.c Tue Oct 9 19:55:12 2012 (r241380) +++ stable/8/sys/dev/tws/tws.c Tue Oct 9 19:57:18 2012 (r241381) @@ -197,7 +197,7 @@ tws_attach(device_t dev) mtx_init( &sc->q_lock, "tws_q_lock", NULL, MTX_DEF); mtx_init( &sc->sim_lock, "tws_sim_lock", NULL, MTX_DEF); mtx_init( &sc->gen_lock, "tws_gen_lock", NULL, MTX_DEF); - mtx_init( &sc->io_lock, "tws_io_lock", NULL, MTX_DEF); + mtx_init( &sc->io_lock, "tws_io_lock", NULL, MTX_DEF | MTX_RECURSE); if ( tws_init_trace_q(sc) == FAILURE ) printf("trace init failure\n"); From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 19:59:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C324DA19; Tue, 9 Oct 2012 19:59:22 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB5168FC0A; Tue, 9 Oct 2012 19:59:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q99JxMcG067645; Tue, 9 Oct 2012 19:59:22 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q99JxMTd067643; Tue, 9 Oct 2012 19:59:22 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201210091959.q99JxMTd067643@svn.freebsd.org> From: Jim Harris Date: Tue, 9 Oct 2012 19:59:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241382 - stable/8/sys/dev/tws X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 19:59:22 -0000 Author: jimharris Date: Tue Oct 9 19:59:22 2012 New Revision: 241382 URL: http://svn.freebsd.org/changeset/base/241382 Log: MFC r240901: Use CAM_SEL_TIMEOUT and CAM_DEV_NOT_THERE to report missing targets or LUNs respectively. This removes a huge number of error messages from CAM during bus scans. Modified: stable/8/sys/dev/tws/tws_cam.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/tws/ (props changed) Modified: stable/8/sys/dev/tws/tws_cam.c ============================================================================== --- stable/8/sys/dev/tws/tws_cam.c Tue Oct 9 19:57:18 2012 (r241381) +++ stable/8/sys/dev/tws/tws_cam.c Tue Oct 9 19:59:22 2012 (r241382) @@ -529,10 +529,10 @@ tws_scsi_err_complete(struct tws_request if ( ccb->ccb_h.target_lun ) { TWS_TRACE_DEBUG(sc, "invalid lun error",0,0); - ccb->ccb_h.status |= CAM_LUN_INVALID; + ccb->ccb_h.status |= CAM_DEV_NOT_THERE; } else { TWS_TRACE_DEBUG(sc, "invalid target error",0,0); - ccb->ccb_h.status |= CAM_TID_INVALID; + ccb->ccb_h.status |= CAM_SEL_TIMEOUT; } } else { From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 20:05:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E96FBD4; Tue, 9 Oct 2012 20:05:20 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 769F68FC08; Tue, 9 Oct 2012 20:05:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q99K5KAe069034; Tue, 9 Oct 2012 20:05:20 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q99K5KPW069032; Tue, 9 Oct 2012 20:05:20 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201210092005.q99K5KPW069032@svn.freebsd.org> From: Jim Harris Date: Tue, 9 Oct 2012 20:05:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241383 - stable/9/sys/dev/pci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 20:05:20 -0000 Author: jimharris Date: Tue Oct 9 20:05:19 2012 New Revision: 241383 URL: http://svn.freebsd.org/changeset/base/241383 Log: MFC r240695: Add constants for programming interfaces for NVM/solid state storage controller sub-class code. Reference: PCI Code and ID Assignment Specification Rev 1.2 Modified: stable/9/sys/dev/pci/pcireg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/pci/pcireg.h ============================================================================== --- stable/9/sys/dev/pci/pcireg.h Tue Oct 9 19:59:22 2012 (r241382) +++ stable/9/sys/dev/pci/pcireg.h Tue Oct 9 20:05:19 2012 (r241383) @@ -264,6 +264,8 @@ #define PCIP_STORAGE_SATA_AHCI_1_0 0x01 #define PCIS_STORAGE_SAS 0x07 #define PCIS_STORAGE_NVM 0x08 +#define PCIP_STORAGE_NVM_NVMHCI_1_0 0x01 +#define PCIP_STORAGE_NVM_ENTERPRISE_NVMHCI_1_0 0x02 #define PCIS_STORAGE_OTHER 0x80 #define PCIC_NETWORK 0x02 From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 20:06:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F1585C5D; Tue, 9 Oct 2012 20:06:16 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D93148FC0A; Tue, 9 Oct 2012 20:06:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q99K6GnP069267; Tue, 9 Oct 2012 20:06:16 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q99K6G1A069265; Tue, 9 Oct 2012 20:06:16 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201210092006.q99K6G1A069265@svn.freebsd.org> From: Jim Harris Date: Tue, 9 Oct 2012 20:06:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241384 - stable/8/sys/dev/pci X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 20:06:17 -0000 Author: jimharris Date: Tue Oct 9 20:06:16 2012 New Revision: 241384 URL: http://svn.freebsd.org/changeset/base/241384 Log: MFC r240695: Add constants for programming interfaces for NVM/solid state storage controller sub-class code. Reference: PCI Code and ID Assignment Specification Rev 1.2 Modified: stable/8/sys/dev/pci/pcireg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/pci/ (props changed) Modified: stable/8/sys/dev/pci/pcireg.h ============================================================================== --- stable/8/sys/dev/pci/pcireg.h Tue Oct 9 20:05:19 2012 (r241383) +++ stable/8/sys/dev/pci/pcireg.h Tue Oct 9 20:06:16 2012 (r241384) @@ -265,6 +265,8 @@ #define PCIP_STORAGE_SATA_AHCI_1_0 0x01 #define PCIS_STORAGE_SAS 0x07 #define PCIS_STORAGE_NVM 0x08 +#define PCIP_STORAGE_NVM_NVMHCI_1_0 0x01 +#define PCIP_STORAGE_NVM_ENTERPRISE_NVMHCI_1_0 0x02 #define PCIS_STORAGE_OTHER 0x80 #define PCIC_NETWORK 0x02 From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 20:07:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 56998CF8; Tue, 9 Oct 2012 20:07:25 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FCE38FC14; Tue, 9 Oct 2012 20:07:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q99K7P4F069555; Tue, 9 Oct 2012 20:07:25 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q99K7Pl9069553; Tue, 9 Oct 2012 20:07:25 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201210092007.q99K7Pl9069553@svn.freebsd.org> From: Jim Harris Date: Tue, 9 Oct 2012 20:07:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r241385 - stable/7/sys/dev/pci X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 20:07:25 -0000 Author: jimharris Date: Tue Oct 9 20:07:24 2012 New Revision: 241385 URL: http://svn.freebsd.org/changeset/base/241385 Log: MFC r240695: Add constants for programming interfaces for NVM/solid state storage controller sub-class code. Reference: PCI Code and ID Assignment Specification Rev 1.2 Modified: stable/7/sys/dev/pci/pcireg.h Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/pci/pcireg.h ============================================================================== --- stable/7/sys/dev/pci/pcireg.h Tue Oct 9 20:06:16 2012 (r241384) +++ stable/7/sys/dev/pci/pcireg.h Tue Oct 9 20:07:24 2012 (r241385) @@ -264,6 +264,8 @@ #define PCIP_STORAGE_SATA_AHCI_1_0 0x01 #define PCIS_STORAGE_SAS 0x07 #define PCIS_STORAGE_NVM 0x08 +#define PCIP_STORAGE_NVM_NVMHCI_1_0 0x01 +#define PCIP_STORAGE_NVM_ENTERPRISE_NVMHCI_1_0 0x02 #define PCIS_STORAGE_OTHER 0x80 #define PCIC_NETWORK 0x02 From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 20:24:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B6C6B25F for ; Tue, 9 Oct 2012 20:24:30 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7BD358FC18 for ; Tue, 9 Oct 2012 20:24:30 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id bi1so6210666pad.13 for ; Tue, 09 Oct 2012 13:24:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=Ca0OYCi/v0MHzglnMQ4zy9jxV6ZpsY+v8vX9YBHgEUo=; b=Zc82K1IXO4iBCtL2d0YNLl7x7emCuNa1s4E1SpJVLhJKaAsHk+CvROnqSZj7Hqs8GI UkVZjDkIyzlA1aLdk3MP2M+IC289/8b+P8fjHhZ6MN6KSPvXPZiAfncAeMmR5HZaYfA7 KDjE27TJ/MwE3naqLJ+Zwb/khrWfGWB1W+S/o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=Ca0OYCi/v0MHzglnMQ4zy9jxV6ZpsY+v8vX9YBHgEUo=; b=eJ8FlL8WUnFo/GpGfCBcIPgqDG+stE4x+j7h1dsxQXoR+mQ2nacsY0ZubGpjNek6iZ DkAInQn7/uupbeyetBY17iURbBlHo/+Nu6YArR3w1FiRiriGp6gp1Dpmfhu5QRZq9WKD 9PJlBfISy4i05ZoYq9vWyX9SkZd+zJWFV3Uwb/T7I5vO37vL19vUVFMK8/zJBZmttSYI 8OCMFJzkDToFiR2F2T8pNZTMYNDEXKMyCDVd4dNjuaj928KX/QT6z8KoRmPjvnDjNeCN zljEliNqM228IYqh0gUFudRAsiXcCSfqnmfpegpUkIvsmGMxi8EjLJJfWuZOLhuwWFIa cxXg== Received: by 10.68.129.72 with SMTP id nu8mr66337044pbb.29.1349814269855; Tue, 09 Oct 2012 13:24:29 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.161.163 with HTTP; Tue, 9 Oct 2012 13:23:59 -0700 (PDT) In-Reply-To: <50746BF8.5010307@freebsd.org> References: <201210091425.q99EPFS6020787@svn.freebsd.org> <507451DE.9060909@freebsd.org> <50746BF8.5010307@freebsd.org> From: Eitan Adler Date: Tue, 9 Oct 2012 16:23:59 -0400 X-Google-Sender-Auth: 8QxLwMsR5cHvBMqOH7svtbGDxjI Message-ID: Subject: Re: svn commit: r241373 - head/lib/libc/stdlib To: Andrey Chernov Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQnTCaBq0ZyYnp3h/VKBxmIJI6XkNUqyFcv75wPYoIWSoR7eIe8FXZw8Dc3MkiSCxsIkVGMH Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, theraven@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 20:24:30 -0000 On 9 October 2012 14:24, Andrey Chernov wrote: > I don't have ISO9899 nearby, could you directly quote mentioned > sections, please? Accesses to volatile object (a) produce side effects (b) have implementation defined values. A more careful re-reading of the relevant section leads me to believe I may have been wrong with this comment. It isn't made explicit, but the C standard never says that accesses to uninitialized volatile is defined. On the other hand, the existence of "const volatile" proves me wrong. Interestingly, clang and gcc disagree on whether to warn: [8084 eitan@radar ~ ]%gcc46 -Wall -Wextra -ansi -pedantic a.c [8089 eitan@radar ~ ]%clang -Wall -Wextra -ansi -pedantic a.c a.c:3:9: warning: variable 'a' is uninitialized when used here [-Wuninitialized] I still don't like volatile though here for the other reasons mentioned. In general, the entire piece of code should be replaced with something that can't fail, so this is a moot point. > Do you against 'volatile' usage at all? It seems whole > kernel (see above) contradicts with such point of view. Not, I never said any such thing. Volatile is designed for memory mapped I/O and it makes sense to use for such things. I haven't audited every use of 'volatile' though. -- Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 21:30:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 566FF315; Tue, 9 Oct 2012 21:30:06 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id 02BC98FC18; Tue, 9 Oct 2012 21:30:05 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id q99LPc4a068010; Tue, 9 Oct 2012 14:25:38 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id q99LPcLI068009; Tue, 9 Oct 2012 14:25:38 -0700 (PDT) (envelope-from sgk) Date: Tue, 9 Oct 2012 14:25:38 -0700 From: Steve Kargl To: Eitan Adler Subject: Re: svn commit: r241373 - head/lib/libc/stdlib Message-ID: <20121009212538.GA67848@troutmask.apl.washington.edu> References: <201210091425.q99EPFS6020787@svn.freebsd.org> <507451DE.9060909@freebsd.org> <50746BF8.5010307@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, theraven@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andrey Chernov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 21:30:06 -0000 On Tue, Oct 09, 2012 at 04:23:59PM -0400, Eitan Adler wrote: > On 9 October 2012 14:24, Andrey Chernov wrote: > > I don't have ISO9899 nearby, could you directly quote mentioned > > sections, please? > > Accesses to volatile object (a) produce side effects (b) have > implementation defined values. > > A more careful re-reading of the relevant section leads me to believe > I may have been wrong > with this comment. It isn't made explicit, but the C standard never > says that accesses > to uninitialized volatile is defined. On the other hand, the existence > of "const volatile" proves me wrong. > Interestingly, clang and gcc disagree on whether to warn: > > [8084 eitan@radar ~ ]%gcc46 -Wall -Wextra -ansi -pedantic a.c > [8089 eitan@radar ~ ]%clang -Wall -Wextra -ansi -pedantic a.c > a.c:3:9: warning: variable 'a' is uninitialized when used here > [-Wuninitialized] Given that I cannot see a.c, I'll assume that 'a' is declared with a volatile-qualified type. In that case, it appears that clang has a bug. From 6.7.3, page 109 in n1256.pdf, one finds: An object that has volatile-qualified type may be modified in ways unknown to the implementation or have other unknown side effects. Therefore any expression referring to such an object shall be evaluated strictly according to the rules of the abstract machine, as described in 5.1.2.3. Furthermore, at every sequence point the value last stored in the object shall agree with that prescribed by the abstract machine, except as modified by the unknown factors mentioned previously. 116) 116) A volatile declaration may be used to describe an object corresponding to a memory-mapped input/output port or an object accessed by an asynchronously interrupting function. Actions on objects so declared shall not be ``optimized out'' by an implementation or reordered except as permitted by the rules for evaluating expressions. Clang has no way of determining if 'a' is initialized or not. If David is correct that 'junk' is optimized out by clang/llvm, then it seems that clang violates footnote 116. Yes, I know it is non-normative text. > I still don't like volatile though here for the other reasons > mentioned. In general, the entire piece of code should be replaced > with something that can't fail, so this is a moot point. Agreed. -- Steve From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 22:07:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 125B49D8 for ; Tue, 9 Oct 2012 22:07:36 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id C560B8FC1C for ; Tue, 9 Oct 2012 22:07:32 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so6375860pbb.13 for ; Tue, 09 Oct 2012 15:07:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=1Jq1MyTbcte64Ycjozh71ayKXcInc/HsvnuuO4KiEMY=; b=fQD1VNB6YkAki7UCvwB96ZmT7VTFtk+jIscItg8CjfumnkP9wxdZlkBRt9seH9kHVO Isd0779YffdFT3NA8elIin6TONMcOcBd9JUzzUREzN/trr14cUZpeMeSdbQZU2mzcvj8 9urjbQriQWnkh858XIXozIXWTqyHHSQcYinXk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=1Jq1MyTbcte64Ycjozh71ayKXcInc/HsvnuuO4KiEMY=; b=e9JZg2ex8xHNKahTbckWRiYfuSUQpYwLncyl2DKcbyI4Ma3mLOArlkzPGJsJL5Fcdz Fugs/70trfzL3o0/R8BQzlfS/OeZvZubFzyeXSPHBHxNVf3HF4SN9qeWdZlppco+haDK 4Rfvb3lXa6RQaqMe1t+4ox5Mn0x9Szbzj3c5FI4mJ5ObBWCkLLtgbVULNwhtIBbjIxft g+aDUuJZJM1CE6RCaezlfBXv69RXOUAcviHe7Z3N30VD07EDcPIUVTLIRCo6gQe9I5Oq 8lDrMyT1Fp3Ai9oNsMResVqDWRiPJ35AIq8JAvhnT9u0kiOzAcVqbjMTDPg6cr5eWJXq VvOg== Received: by 10.68.222.105 with SMTP id ql9mr67147769pbc.97.1349820446646; Tue, 09 Oct 2012 15:07:26 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.161.163 with HTTP; Tue, 9 Oct 2012 15:06:55 -0700 (PDT) In-Reply-To: <20121009212538.GA67848@troutmask.apl.washington.edu> References: <201210091425.q99EPFS6020787@svn.freebsd.org> <507451DE.9060909@freebsd.org> <50746BF8.5010307@freebsd.org> <20121009212538.GA67848@troutmask.apl.washington.edu> From: Eitan Adler Date: Tue, 9 Oct 2012 18:06:55 -0400 X-Google-Sender-Auth: bb3HpjCOHUfrfqdZEbyFZzB8ao0 Message-ID: Subject: Re: svn commit: r241373 - head/lib/libc/stdlib To: Steve Kargl Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmsCcwufS/xaB0PokprY0c2MZOMP700vYeR7ETJh3qP5g3cmsoiGz5Mo6/ooHyAKGxp2rEN Cc: svn-src-head@freebsd.org, theraven@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andrey Chernov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 22:07:36 -0000 On 9 October 2012 17:25, Steve Kargl wrote: ... yes, I was misreading the text. > Clang has no way of determining if 'a' is initialized or not. > If David is correct that 'junk' is optimized out by clang/llvm, > then it seems that clang violates footnote 116. Yes, I know > it is non-normative text. Sorry if I was not clear: clang does *not* optimize away the volatile version. I removed it for other reasons. > >> I still don't like volatile though here for the other reasons >> mentioned. In general, the entire piece of code should be replaced >> with something that can't fail, so this is a moot point. > > Agreed. > > -- > Steve > -- Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 22:10:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B6AFFAB0 for ; Tue, 9 Oct 2012 22:10:18 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 73EB08FC12 for ; Tue, 9 Oct 2012 22:10:18 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so6378442pbb.13 for ; Tue, 09 Oct 2012 15:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=GitZfSfwvH+PayGcX1RCIshLQOVZs0IgF57NhrT1rPU=; b=i0a/Oi4BS1sS93Yizqb28wl/SwItFGs3K53OFXPRoJdbLt3jmPNCYCodLNYjcH6VZr YR/FH7939jf46s6lbDBaSmE9MfHNyD24KZ9Vzp/HFX0P6VeNFkqLmZTWK2QG1KInO8aK IvGK4q1jZ4hMgJIQ3sj3/3X6bcQUKyxj1ChmE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=GitZfSfwvH+PayGcX1RCIshLQOVZs0IgF57NhrT1rPU=; b=TAfo+cm1F+yLJWe8Y64maHMmIqir9IeivMq6YUgmT0SyQpx1CNc2QIOsKCHozkq4aN pNcI63+rhF8fSiQm4VD6WQsZeAtS40tSX2tEq49et6dlDxXQvPVWS3eUYfdXUkudAcuV fG8r+eIlDHyKqvcfMrhEEHNeR7+Yr4fGMB33htgeRNnCAWFwwyON6NrKvfzMNIrHGfaR 8oSeQy73/ZFfKy3UCZ80kFaxwnElx+qWwsMLvUrGuxoDircTHy6lNEpfa6DhVaKAbUO2 YcLO3dLtqPZjRllK87hCrYM2CZj++nKvkODFwA8pGTpKtYV7dIl5GKobAyEwSNal11mO MVkg== Received: by 10.66.81.202 with SMTP id c10mr56218578pay.31.1349820618205; Tue, 09 Oct 2012 15:10:18 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.161.163 with HTTP; Tue, 9 Oct 2012 15:09:47 -0700 (PDT) In-Reply-To: References: <201210091425.q99EPFS6020787@svn.freebsd.org> <507451DE.9060909@freebsd.org> <50746BF8.5010307@freebsd.org> <20121009212538.GA67848@troutmask.apl.washington.edu> From: Eitan Adler Date: Tue, 9 Oct 2012 18:09:47 -0400 X-Google-Sender-Auth: t-lgaH4aocFxIamnoFy32MfM6ek Message-ID: Subject: Re: svn commit: r241373 - head/lib/libc/stdlib To: Steve Kargl Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmU7+wDjEtDWjv8sfZkOrPmReoHLfzjdE6ckyyfs8O9xHuhC7IUvlh+sWWofmcEGBltcCep Cc: svn-src-head@freebsd.org, theraven@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andrey Chernov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 22:10:18 -0000 On 9 October 2012 18:06, Eitan Adler wrote: > On 9 October 2012 17:25, Steve Kargl wrote: > > ... yes, I was misreading the text. > >> Clang has no way of determining if 'a' is initialized or not. >> If David is correct that 'junk' is optimized out by clang/llvm, >> then it seems that clang violates footnote 116. Yes, I know >> it is non-normative text. > > Sorry if I was not clear: clang does *not* optimize away the volatile > version. I removed it for other reasons. For those interested in "volatile" you may also want to read: www.cs.utah.edu/~regehr/papers/emsoft08-preprint.pdf -- Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 23:06:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A72B147D for ; Tue, 9 Oct 2012 23:06:36 +0000 (UTC) (envelope-from sender@security.org) Received: from mail.nitschkemold.com (mail.nitschkemold.com [67.52.59.58]) by mx1.freebsd.org (Postfix) with ESMTP id 72FB28FC0C for ; Tue, 9 Oct 2012 23:06:35 +0000 (UTC) Received: from security.org ([24.108.240.211]) by mail.nitschkemold.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 9 Oct 2012 18:05:17 -0500 From: Westpac Bank To: svn-src-all@freebsd.org Subject: Security Update. Date: 09 Oct 2012 16:04:49 -0700 Message-ID: <20121009160449.B8977C2E19B95C04@security.org> X-OriginalArrivalTime: 09 Oct 2012 23:05:24.0087 (UTC) FILETIME=[904A1870:01CDA672] MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 23:06:36 -0000 [westpac-logo.png] You are receiving this e-mail because of our latest update on Wednesday, 10 October 2012. Due to our latest fraud attempts, we updated our security system to a more complex system that will improve security for all Westpac accounts. We are currently performing a full customer database backup, to improve our security measures and reduce the number of inactive accounts. Please follow the link provided in this message and confirm your personal information. [1]Confirm your information now>> Westpac Banking Corporation ABN 33 007 457 141 AFS Licence No. 233714. This e-mail was officialy sent by Westpac Private Bank Executive Team, and your reference number is (4452-3901) References 1. http://bobi.at/tmp/wpac.com.au/ From owner-svn-src-all@FreeBSD.ORG Tue Oct 9 23:08:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7AB3B4FC; Tue, 9 Oct 2012 23:08:12 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id 308938FC0A; Tue, 9 Oct 2012 23:08:12 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id q99N8Bo1068392; Tue, 9 Oct 2012 16:08:11 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id q99N8BBI068391; Tue, 9 Oct 2012 16:08:11 -0700 (PDT) (envelope-from sgk) Date: Tue, 9 Oct 2012 16:08:11 -0700 From: Steve Kargl To: Eitan Adler Subject: Re: svn commit: r241373 - head/lib/libc/stdlib Message-ID: <20121009230811.GA68376@troutmask.apl.washington.edu> References: <201210091425.q99EPFS6020787@svn.freebsd.org> <507451DE.9060909@freebsd.org> <50746BF8.5010307@freebsd.org> <20121009212538.GA67848@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, theraven@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andrey Chernov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2012 23:08:12 -0000 On Tue, Oct 09, 2012 at 06:06:55PM -0400, Eitan Adler wrote: > On 9 October 2012 17:25, Steve Kargl wrote: > > ... yes, I was misreading the text. > > > Clang has no way of determining if 'a' is initialized or not. > > If David is correct that 'junk' is optimized out by clang/llvm, > > then it seems that clang violates footnote 116. Yes, I know > > it is non-normative text. > > Sorry if I was not clear: clang does *not* optimize away the volatile > version. I removed it for other reasons. OK, but clang still has a bug. Clang should not issue a warning that "'a' is uninitialized" because 'a' is volatile and clang has no way of knowning whether 'a' has been initialized by some other means. At most, clang can state "'a' may be uninitialized". -- Steve From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 00:06:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50549C9F; Wed, 10 Oct 2012 00:06:32 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 391C78FC0A; Wed, 10 Oct 2012 00:06:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9A06WRI013348; Wed, 10 Oct 2012 00:06:32 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9A06Wxt013346; Wed, 10 Oct 2012 00:06:32 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201210100006.q9A06Wxt013346@svn.freebsd.org> From: Neel Natu Date: Wed, 10 Oct 2012 00:06:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241386 - head/sys/dev/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 00:06:32 -0000 Author: neel Date: Wed Oct 10 00:06:31 2012 New Revision: 241386 URL: http://svn.freebsd.org/changeset/base/241386 Log: Grab the softc from the ACPI host-pci bridge device instead of from the pci endpoint device. Reviewed by: jhb Modified: head/sys/dev/acpica/acpi_pcib_acpi.c Modified: head/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- head/sys/dev/acpica/acpi_pcib_acpi.c Tue Oct 9 20:07:24 2012 (r241385) +++ head/sys/dev/acpica/acpi_pcib_acpi.c Wed Oct 10 00:06:31 2012 (r241386) @@ -502,7 +502,7 @@ acpi_pcib_map_msi(device_t pcib, device_ if (error) return (error); - sc = device_get_softc(dev); + sc = device_get_softc(pcib); if (sc->ap_addr == -1) return (0); /* XXX: Assumes all bridges are on bus 0. */ From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 01:24:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 43E42D7; Wed, 10 Oct 2012 01:24:03 +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 230CC8FC19; Wed, 10 Oct 2012 01:24:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9A1O2Iw024004; Wed, 10 Oct 2012 01:24:02 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9A1O2JO024001; Wed, 10 Oct 2012 01:24:02 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210100124.q9A1O2JO024001@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 10 Oct 2012 01:24:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241388 - head/sys/dev/bge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 01:24:03 -0000 Author: yongari Date: Wed Oct 10 01:24:02 2012 New Revision: 241388 URL: http://svn.freebsd.org/changeset/base/241388 Log: If the maximum payload size is 256 bytes or more, set the DMA write water mark to 256 bytes. Otherwise controller will encounter DMA write under run errors and would result in RX DMA hang. If the maximum payload size is 128 bytes, the water mark is set to 128 bytes as usual. While here, set maximum read request size to 2048 for BCM5719/BCM5720. For other PCIe devices, use 4096. And reprogram the maximum read request size whenever device reset is performed. Modified: head/sys/dev/bge/if_bge.c head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Wed Oct 10 00:11:06 2012 (r241387) +++ head/sys/dev/bge/if_bge.c Wed Oct 10 01:24:02 2012 (r241388) @@ -1466,8 +1466,10 @@ bge_chipinit(struct bge_softc *sc) dma_rw_ctl = BGE_PCIDMARWCTL_RD_CMD_SHIFT(6) | BGE_PCIDMARWCTL_WR_CMD_SHIFT(7); if (sc->bge_flags & BGE_FLAG_PCIE) { - /* Read watermark not used, 128 bytes for write. */ - dma_rw_ctl |= BGE_PCIDMARWCTL_WR_WAT_SHIFT(3); + if (sc->bge_mps >= 256) + dma_rw_ctl |= BGE_PCIDMARWCTL_WR_WAT_SHIFT(7); + else + dma_rw_ctl |= BGE_PCIDMARWCTL_WR_WAT_SHIFT(3); } else if (sc->bge_flags & BGE_FLAG_PCIX) { if (BGE_IS_5714_FAMILY(sc)) { /* 256 bytes for read and write. */ @@ -3161,11 +3163,16 @@ bge_attach(device_t dev) */ sc->bge_flags |= BGE_FLAG_PCIE; sc->bge_expcap = reg; + /* Extract supported maximum payload size. */ + sc->bge_mps = pci_read_config(dev, sc->bge_expcap + + PCIER_DEVICE_CAP, 2); + sc->bge_mps = 128 << (sc->bge_mps & PCIEM_CAP_MAX_PAYLOAD); if (sc->bge_asicrev == BGE_ASICREV_BCM5719 || sc->bge_asicrev == BGE_ASICREV_BCM5720) - pci_set_max_read_req(dev, 2048); - else if (pci_get_max_read_req(dev) != 4096) - pci_set_max_read_req(dev, 4096); + sc->bge_expmrq = 2048; + else + sc->bge_expmrq = 4096; + pci_set_max_read_req(dev, sc->bge_expmrq); } else { /* * Check if the device is in PCI-X Mode. @@ -3642,6 +3649,7 @@ bge_reset(struct bge_softc *sc) PCIEM_CTL_NOSNOOP_ENABLE); pci_write_config(dev, sc->bge_expcap + PCIER_DEVICE_CTL, devctl, 2); + pci_set_max_read_req(dev, sc->bge_expmrq); /* Clear error status. */ pci_write_config(dev, sc->bge_expcap + PCIER_DEVICE_STA, PCIEM_STA_CORRECTABLE_ERROR | Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Wed Oct 10 00:11:06 2012 (r241387) +++ head/sys/dev/bge/if_bgereg.h Wed Oct 10 01:24:02 2012 (r241388) @@ -2792,6 +2792,7 @@ struct bge_softc { struct resource *bge_res; struct ifmedia bge_ifmedia; /* TBI media info */ int bge_expcap; + int bge_expmrq; int bge_msicap; int bge_pcixcap; uint32_t bge_flags; @@ -2835,6 +2836,7 @@ struct bge_softc { uint32_t bge_chiprev; uint8_t bge_asf_mode; uint8_t bge_asf_count; + uint16_t bge_mps; struct bge_ring_data bge_ldata; /* rings */ struct bge_chain_data bge_cdata; /* mbufs */ uint16_t bge_tx_saved_considx; From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 01:59:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 05D42806; Wed, 10 Oct 2012 01:59:54 +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 C8EA48FC08; Wed, 10 Oct 2012 01:59:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9A1xrtf029181; Wed, 10 Oct 2012 01:59:53 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9A1xrUp029179; Wed, 10 Oct 2012 01:59:53 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210100159.q9A1xrUp029179@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 10 Oct 2012 01:59:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241389 - head/sys/dev/bge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 01:59:54 -0000 Author: yongari Date: Wed Oct 10 01:59:53 2012 New Revision: 241389 URL: http://svn.freebsd.org/changeset/base/241389 Log: On PHY write error use hex number to show the value. Add more comments. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Wed Oct 10 01:24:02 2012 (r241388) +++ head/sys/dev/bge/if_bge.c Wed Oct 10 01:59:53 2012 (r241389) @@ -885,7 +885,7 @@ bge_miibus_writereg(device_t dev, int ph if (i == BGE_TIMEOUT) device_printf(sc->bge_dev, - "PHY write timed out (phy %d, reg %d, val %d)\n", + "PHY write timed out (phy %d, reg %d, val 0x%04x)\n", phy, reg, val); return (0); @@ -2036,6 +2036,7 @@ bge_blockinit(struct bge_softc *sc) if (!(BGE_IS_5705_PLUS(sc))) CSR_WRITE_4(sc, BGE_RXLS_MODE, BGE_RXLSMODE_ENABLE); + /* Turn on DMA, clear stats. */ val = BGE_MACMODE_TXDMA_ENB | BGE_MACMODE_RXDMA_ENB | BGE_MACMODE_RX_STATS_CLEAR | BGE_MACMODE_TX_STATS_CLEAR | BGE_MACMODE_RX_STATS_ENB | BGE_MACMODE_TX_STATS_ENB | @@ -2048,7 +2049,6 @@ bge_blockinit(struct bge_softc *sc) else val |= BGE_PORTMODE_MII; - /* Turn on DMA, clear stats */ CSR_WRITE_4(sc, BGE_MAC_MODE, val); DELAY(40); @@ -4071,10 +4071,12 @@ bge_poll(struct ifnet *ifp, enum poll_cm bus_dmamap_sync(sc->bge_cdata.bge_status_tag, sc->bge_cdata.bge_status_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + /* Fetch updates from the status block. */ rx_prod = sc->bge_ldata.bge_status_block->bge_idx[0].bge_rx_prod_idx; tx_cons = sc->bge_ldata.bge_status_block->bge_idx[0].bge_tx_cons_idx; statusword = sc->bge_ldata.bge_status_block->bge_status; + /* Clear the status so the next pass only sees the changes. */ sc->bge_ldata.bge_status_block->bge_status = 0; bus_dmamap_sync(sc->bge_cdata.bge_status_tag, @@ -4142,11 +4144,12 @@ bge_intr_task(void *arg, int pending) sc->bge_cdata.bge_status_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - /* Save producer/consumer indexess. */ + /* Save producer/consumer indices. */ rx_prod = sc->bge_ldata.bge_status_block->bge_idx[0].bge_rx_prod_idx; tx_cons = sc->bge_ldata.bge_status_block->bge_idx[0].bge_tx_cons_idx; status = sc->bge_ldata.bge_status_block->bge_status; status_tag = sc->bge_ldata.bge_status_block->bge_status_tag << 24; + /* Dirty the status flag. */ sc->bge_ldata.bge_status_block->bge_status = 0; bus_dmamap_sync(sc->bge_cdata.bge_status_tag, sc->bge_cdata.bge_status_map, @@ -5686,7 +5689,7 @@ bge_link_upd(struct bge_softc *sc) bge_miibus_statchg(sc->bge_dev); } - /* Clear the attention. */ + /* Disable MAC attention when link is up. */ CSR_WRITE_4(sc, BGE_MAC_STS, BGE_MACSTAT_SYNC_CHANGED | BGE_MACSTAT_CFG_CHANGED | BGE_MACSTAT_MI_COMPLETE | BGE_MACSTAT_LINK_CHANGED); From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 02:21:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BF981BAF; Wed, 10 Oct 2012 02:21:36 +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 A8D228FC08; Wed, 10 Oct 2012 02:21:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9A2LaMj032266; Wed, 10 Oct 2012 02:21:36 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9A2LarF032264; Wed, 10 Oct 2012 02:21:36 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210100221.q9A2LarF032264@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 10 Oct 2012 02:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241390 - head/sys/dev/bge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 02:21:36 -0000 Author: yongari Date: Wed Oct 10 02:21:36 2012 New Revision: 241390 URL: http://svn.freebsd.org/changeset/base/241390 Log: Honor PHY type fiber for BCM5717/BCM5718/BCM5719/BCM5720. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Wed Oct 10 01:59:53 2012 (r241389) +++ head/sys/dev/bge/if_bge.c Wed Oct 10 02:21:36 2012 (r241390) @@ -3381,7 +3381,7 @@ bge_attach(device_t dev) /* The SysKonnect SK-9D41 is a 1000baseSX card. */ if ((pci_read_config(dev, BGE_PCI_SUBSYS, 4) >> 16) == SK_SUBSYSID_9D41 || (hwcfg & BGE_HWCFG_MEDIA) == BGE_MEDIA_FIBER) { - if (BGE_IS_5714_FAMILY(sc)) + if (BGE_IS_5705_PLUS(sc)) sc->bge_flags |= BGE_FLAG_MII_SERDES; else sc->bge_flags |= BGE_FLAG_TBI; From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 02:35:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AAA04D21; Wed, 10 Oct 2012 02:35:10 +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 938A68FC16; Wed, 10 Oct 2012 02:35:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9A2ZADD034391; Wed, 10 Oct 2012 02:35:10 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9A2ZACd034389; Wed, 10 Oct 2012 02:35:10 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210100235.q9A2ZACd034389@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 10 Oct 2012 02:35:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241391 - head/sys/dev/bge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 02:35:10 -0000 Author: yongari Date: Wed Oct 10 02:35:10 2012 New Revision: 241391 URL: http://svn.freebsd.org/changeset/base/241391 Log: Do not force PCIe 1.0a mode in device reset on BCM5717 and newer controllers. BCM5785 does not require PCI 1.0a mode as well during reset. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Wed Oct 10 02:21:36 2012 (r241390) +++ head/sys/dev/bge/if_bge.c Wed Oct 10 02:35:10 2012 (r241391) @@ -3604,8 +3604,11 @@ bge_reset(struct bge_softc *sc) /* XXX: Broadcom Linux driver. */ if (sc->bge_flags & BGE_FLAG_PCIE) { - if (CSR_READ_4(sc, 0x7E2C) == 0x60) /* PCIE 1.0 */ - CSR_WRITE_4(sc, 0x7E2C, 0x20); + if (sc->bge_asicrev != BGE_ASICREV_BCM5785 && + (sc->bge_flags & BGE_FLAG_5717_PLUS) == 0) { + if (CSR_READ_4(sc, 0x7E2C) == 0x60) /* PCIE 1.0 */ + CSR_WRITE_4(sc, 0x7E2C, 0x20); + } if (sc->bge_chipid != BGE_CHIPID_BCM5750_A0) { /* Prevent PCIE link training during global reset */ CSR_WRITE_4(sc, BGE_MISC_CFG, 1 << 29); From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 04:38:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2024EAD1; Wed, 10 Oct 2012 04:38:30 +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 08C2D8FC14; Wed, 10 Oct 2012 04:38:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9A4cTsk051563; Wed, 10 Oct 2012 04:38:29 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9A4cTam051561; Wed, 10 Oct 2012 04:38:29 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210100438.q9A4cTam051561@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 10 Oct 2012 04:38:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241392 - head/sys/dev/bge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 04:38:30 -0000 Author: yongari Date: Wed Oct 10 04:38:29 2012 New Revision: 241392 URL: http://svn.freebsd.org/changeset/base/241392 Log: Fix a long standing VCPU reset sequence bug on BCM5906. The VCPU(Virtual CPU) of BCM5906 is used to provide a mechanism to control the bootcode execution and to pick up configuration data stored inside the EEPROM. The bootcode of BCM5906 will check the BGE_VCPU_STATUS_DRV_RESET bit to decide which booting procedure to choose. Data sheet indicates the VCPU of BCM5906 should set BGE_VCPU_STATUS_DRV_RESET bit *before* VCPU reset or global reset. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Wed Oct 10 02:35:10 2012 (r241391) +++ head/sys/dev/bge/if_bge.c Wed Oct 10 04:38:29 2012 (r241392) @@ -3616,6 +3616,15 @@ bge_reset(struct bge_softc *sc) } } + if (sc->bge_asicrev == BGE_ASICREV_BCM5906) { + val = CSR_READ_4(sc, BGE_VCPU_STATUS); + CSR_WRITE_4(sc, BGE_VCPU_STATUS, + val | BGE_VCPU_STATUS_DRV_RESET); + val = CSR_READ_4(sc, BGE_VCPU_EXT_CTRL); + CSR_WRITE_4(sc, BGE_VCPU_EXT_CTRL, + val & ~BGE_VCPU_EXT_CTRL_HALT_CPU); + } + /* * Set GPHY Power Down Override to leave GPHY * powered up in D0 uninitialized. @@ -3627,15 +3636,6 @@ bge_reset(struct bge_softc *sc) /* Issue global reset */ write_op(sc, BGE_MISC_CFG, reset); - if (sc->bge_asicrev == BGE_ASICREV_BCM5906) { - val = CSR_READ_4(sc, BGE_VCPU_STATUS); - CSR_WRITE_4(sc, BGE_VCPU_STATUS, - val | BGE_VCPU_STATUS_DRV_RESET); - val = CSR_READ_4(sc, BGE_VCPU_EXT_CTRL); - CSR_WRITE_4(sc, BGE_VCPU_EXT_CTRL, - val & ~BGE_VCPU_EXT_CTRL_HALT_CPU); - } - DELAY(1000); /* XXX: Broadcom Linux driver. */ From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 05:43:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4D58D45E; Wed, 10 Oct 2012 05:43:05 +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 363EC8FC0A; Wed, 10 Oct 2012 05:43:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9A5h5jB060893; Wed, 10 Oct 2012 05:43:05 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9A5h5PB060891; Wed, 10 Oct 2012 05:43:05 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210100543.q9A5h5PB060891@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 10 Oct 2012 05:43:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241393 - head/sys/dev/bge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 05:43:05 -0000 Author: yongari Date: Wed Oct 10 05:43:04 2012 New Revision: 241393 URL: http://svn.freebsd.org/changeset/base/241393 Log: Remove unnecessary delay. I don't see any comments in data sheet that requires 10ms delay after device reset. Because that code was there from day 1, I guess it was added to give enough settlement time after updating BGE_MAC_MODE register. The recommended delay time for BGE_MAC_MODE after updating is 40us and it was already done in r241219. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Wed Oct 10 04:38:29 2012 (r241392) +++ head/sys/dev/bge/if_bge.c Wed Oct 10 05:43:04 2012 (r241393) @@ -3784,7 +3784,6 @@ bge_reset(struct bge_softc *sc) val = CSR_READ_4(sc, 0x7C00); CSR_WRITE_4(sc, 0x7C00, val | (1 << 25)); } - DELAY(10000); if (sc->bge_asicrev == BGE_ASICREV_BCM5720) BGE_CLRBIT(sc, BGE_CPMU_CLCK_ORIDE, From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 08:36:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 695901F6; Wed, 10 Oct 2012 08:36:40 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4DD348FC08; Wed, 10 Oct 2012 08:36:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9A8ae2q088352; Wed, 10 Oct 2012 08:36:40 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9A8adKj088270; Wed, 10 Oct 2012 08:36:39 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201210100836.q9A8adKj088270@svn.freebsd.org> From: Kevin Lo Date: Wed, 10 Oct 2012 08:36:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241394 - in head: share/examples/kld/dyn_sysctl share/examples/kld/firmware/fwconsumer share/man/man9 sys/amd64/linux32 sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/compat/svr4 s... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 08:36:40 -0000 Author: kevlo Date: Wed Oct 10 08:36:38 2012 New Revision: 241394 URL: http://svn.freebsd.org/changeset/base/241394 Log: Revert previous commit... Pointyhat to: kevlo (myself) Modified: head/share/examples/kld/dyn_sysctl/dyn_sysctl.c head/share/examples/kld/firmware/fwconsumer/fw_consumer.c head/share/man/man9/module.9 head/sys/amd64/linux32/linux32_sysvec.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/compat/svr4/svr4_sysvec.c head/sys/contrib/ipfilter/netinet/mlfk_ipl.c head/sys/contrib/rdma/rdma_addr.c head/sys/contrib/rdma/rdma_cma.c head/sys/contrib/rdma/rdma_device.c head/sys/contrib/rdma/rdma_iwcm.c head/sys/crypto/rc4/rc4.c head/sys/dev/bktr/bktr_mem.c head/sys/dev/cxgb/cxgb_t3fw.c head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c head/sys/dev/cxgb/ulp/tom/cxgb_tom.c head/sys/dev/cxgbe/tom/t4_tom.c head/sys/dev/drm2/drm_drv.c head/sys/dev/iscsi/initiator/iscsi.c head/sys/dev/mxge/mxge_eth_z8e.c head/sys/dev/mxge/mxge_ethp_z8e.c head/sys/dev/mxge/mxge_rss_eth_z8e.c head/sys/dev/mxge/mxge_rss_ethp_z8e.c head/sys/dev/nvd/nvd.c head/sys/dev/nvme/nvme.c head/sys/dev/rndtest/rndtest.c head/sys/dev/streams/streams.c head/sys/dev/tdfx/tdfx_linux.c head/sys/dev/usb/net/usb_ethernet.c head/sys/dev/utopia/utopia.c head/sys/dev/virtio/virtio.c head/sys/i386/ibcs2/ibcs2_sysvec.c head/sys/i386/isa/elink.c head/sys/i386/linux/linux_sysvec.c head/sys/net/bridgestp.c head/sys/net/if_arcsubr.c head/sys/net/if_atmsubr.c head/sys/net/if_bridge.c head/sys/net/if_enc.c head/sys/net/if_epair.c head/sys/net/if_ethersubr.c head/sys/net/if_faith.c head/sys/net/if_fddisubr.c head/sys/net/if_fwsubr.c head/sys/net/if_gif.c head/sys/net/if_gre.c head/sys/net/if_iso88025subr.c head/sys/net/if_lagg.c head/sys/net/if_loop.c head/sys/net/if_spppsubr.c head/sys/net/if_stf.c head/sys/net/if_tun.c head/sys/net/if_vlan.c head/sys/net/zlib.c head/sys/net80211/ieee80211_freebsd.c head/sys/net80211/ieee80211_freebsd.h head/sys/netgraph/atm/ngatmbase.c head/sys/netinet/igmp.c head/sys/netinet/ip_carp.c head/sys/netinet/ip_divert.c head/sys/netinet/ip_mroute.c head/sys/netinet/toecore.c head/sys/netinet6/ip6_mroute.c head/sys/netinet6/mld6.c head/sys/netinet6/send.c head/sys/netpfil/ipfw/ip_fw2.c head/sys/netpfil/ipfw/ip_fw_nat.c head/sys/netpfil/pf/if_pflog.c head/sys/netpfil/pf/if_pfsync.c head/sys/netpfil/pf/pf_ioctl.c head/sys/nfs/nfs_nfssvc.c head/sys/nfsserver/nfs_srvsubs.c head/sys/opencrypto/cryptodev.c head/sys/tools/fw_stub.awk head/tools/regression/kthread/kld/kthrdlk.c head/tools/regression/net80211/ccmp/test_ccmp.c head/tools/regression/net80211/tkip/test_tkip.c head/tools/regression/net80211/wep/test_wep.c head/tools/tools/kttcp/sys/kttcp.c Modified: head/share/examples/kld/dyn_sysctl/dyn_sysctl.c ============================================================================== --- head/share/examples/kld/dyn_sysctl/dyn_sysctl.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/share/examples/kld/dyn_sysctl/dyn_sysctl.c Wed Oct 10 08:36:38 2012 (r241394) @@ -163,7 +163,7 @@ load(module_t mod, int cmd, void *arg) static moduledata_t mod_data = { "dyn_sysctl", load, - NULL + 0 }; DECLARE_MODULE(dyn_sysctl, mod_data, SI_SUB_EXEC, SI_ORDER_ANY); Modified: head/share/examples/kld/firmware/fwconsumer/fw_consumer.c ============================================================================== --- head/share/examples/kld/firmware/fwconsumer/fw_consumer.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/share/examples/kld/firmware/fwconsumer/fw_consumer.c Wed Oct 10 08:36:38 2012 (r241394) @@ -71,7 +71,7 @@ fw_consumer_modevent(module_t mod, int t static moduledata_t fw_consumer_mod = { "fw_consumer", fw_consumer_modevent, - NULL + 0 }; DECLARE_MODULE(fw_consumer, fw_consumer_mod, SI_SUB_DRIVERS, SI_ORDER_ANY); MODULE_VERSION(fw_consumer, 1); Modified: head/share/man/man9/module.9 ============================================================================== --- head/share/man/man9/module.9 Wed Oct 10 05:43:04 2012 (r241393) +++ head/share/man/man9/module.9 Wed Oct 10 08:36:38 2012 (r241394) @@ -99,7 +99,7 @@ static int foo_handler(module_t mod, int static moduledata_t mod_data= { "foo", foo_handler, - NULL + 0 }; MODULE_VERSION(foo, 1); Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/amd64/linux32/linux32_sysvec.c Wed Oct 10 08:36:38 2012 (r241394) @@ -1198,7 +1198,7 @@ linux_elf_modevent(module_t mod, int typ static moduledata_t linux_elf_mod = { "linuxelf", linux_elf_modevent, - NULL + 0 }; DECLARE_MODULE_TIED(linuxelf, linux_elf_mod, SI_SUB_EXEC, SI_ORDER_ANY); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Oct 10 08:36:38 2012 (r241394) @@ -5526,7 +5526,7 @@ zfs_modevent(module_t mod, int type, voi static moduledata_t zfs_mod = { "zfsctrl", zfs_modevent, - NULL + 0 }; DECLARE_MODULE(zfsctrl, zfs_mod, SI_SUB_VFS, SI_ORDER_ANY); MODULE_DEPEND(zfsctrl, opensolaris, 1, 1, 1); Modified: head/sys/compat/svr4/svr4_sysvec.c ============================================================================== --- head/sys/compat/svr4/svr4_sysvec.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/compat/svr4/svr4_sysvec.c Wed Oct 10 08:36:38 2012 (r241394) @@ -308,7 +308,7 @@ svr4_elf_modevent(module_t mod, int type static moduledata_t svr4_elf_mod = { "svr4elf", svr4_elf_modevent, - NULL + 0 }; DECLARE_MODULE_TIED(svr4elf, svr4_elf_mod, SI_SUB_EXEC, SI_ORDER_ANY); MODULE_DEPEND(svr4elf, streams, 1, 1, 1); Modified: head/sys/contrib/ipfilter/netinet/mlfk_ipl.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/contrib/ipfilter/netinet/mlfk_ipl.c Wed Oct 10 08:36:38 2012 (r241394) @@ -275,7 +275,7 @@ ipf_modunload() static moduledata_t ipfiltermod = { "ipfilter", ipfilter_modevent, - NULL + 0 }; Modified: head/sys/contrib/rdma/rdma_addr.c ============================================================================== --- head/sys/contrib/rdma/rdma_addr.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/contrib/rdma/rdma_addr.c Wed Oct 10 08:36:38 2012 (r241394) @@ -407,7 +407,7 @@ addr_load(module_t mod, int cmd, void *a static moduledata_t mod_data = { "rdma_addr", addr_load, - NULL + 0 }; MODULE_VERSION(rdma_addr, 1); Modified: head/sys/contrib/rdma/rdma_cma.c ============================================================================== --- head/sys/contrib/rdma/rdma_cma.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/contrib/rdma/rdma_cma.c Wed Oct 10 08:36:38 2012 (r241394) @@ -2990,7 +2990,7 @@ cma_load(module_t mod, int cmd, void *ar static moduledata_t mod_data = { "rdma_cma", cma_load, - NULL + 0 }; MODULE_VERSION(rdma_cma, 1); Modified: head/sys/contrib/rdma/rdma_device.c ============================================================================== --- head/sys/contrib/rdma/rdma_device.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/contrib/rdma/rdma_device.c Wed Oct 10 08:36:38 2012 (r241394) @@ -769,7 +769,7 @@ rdma_core_load(module_t mod, int cmd, vo static moduledata_t mod_data = { "rdma_core", rdma_core_load, - NULL + 0 }; MODULE_VERSION(rdma_core, 1); Modified: head/sys/contrib/rdma/rdma_iwcm.c ============================================================================== --- head/sys/contrib/rdma/rdma_iwcm.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/contrib/rdma/rdma_iwcm.c Wed Oct 10 08:36:38 2012 (r241394) @@ -1078,7 +1078,7 @@ iw_cm_load(module_t mod, int cmd, void * static moduledata_t mod_data = { "rdma_iwcm", iw_cm_load, - NULL + 0 }; MODULE_VERSION(rdma_iwcm, 1); Modified: head/sys/crypto/rc4/rc4.c ============================================================================== --- head/sys/crypto/rc4/rc4.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/crypto/rc4/rc4.c Wed Oct 10 08:36:38 2012 (r241394) @@ -122,7 +122,7 @@ rc4_modevent(module_t mod, int type, voi static moduledata_t rc4_mod = { "rc4", rc4_modevent, - NULL + 0 }; DECLARE_MODULE(rc4, rc4_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); MODULE_VERSION(rc4, 1); Modified: head/sys/dev/bktr/bktr_mem.c ============================================================================== --- head/sys/dev/bktr/bktr_mem.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/dev/bktr/bktr_mem.c Wed Oct 10 08:36:38 2012 (r241394) @@ -182,7 +182,7 @@ bktr_retrieve_address(int unit, int type static moduledata_t bktr_mem_mod = { "bktr_mem", bktr_mem_modevent, - NULL + 0 }; /* Modified: head/sys/dev/cxgb/cxgb_t3fw.c ============================================================================== --- head/sys/dev/cxgb/cxgb_t3fw.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/dev/cxgb/cxgb_t3fw.c Wed Oct 10 08:36:38 2012 (r241394) @@ -43,7 +43,7 @@ cxgb_t3fw_modevent(module_t mod, int typ static moduledata_t cxgb_t3fw_mod = { "cxgb_t3fw", cxgb_t3fw_modevent, - NULL + 0 }; DECLARE_MODULE(cxgb_t3fw, cxgb_t3fw_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); MODULE_VERSION(cxgb_t3fw, 1); @@ -76,7 +76,7 @@ cxgb_t3b_protocol_sram_modevent(module_t static moduledata_t cxgb_t3b_protocol_sram_mod = { "cxgb_t3b_protocol_sram", cxgb_t3b_protocol_sram_modevent, - NULL + 0 }; DECLARE_MODULE(cxgb_t3b_protocol_sram, cxgb_t3b_protocol_sram_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); MODULE_VERSION(cxgb_t3b_protocol_sram, 1); @@ -109,7 +109,7 @@ cxgb_t3b_tp_eeprom_modevent(module_t mod static moduledata_t cxgb_t3b_tp_eeprom_mod = { "cxgb_t3b_tp_eeprom", cxgb_t3b_tp_eeprom_modevent, - NULL + 0 }; DECLARE_MODULE(cxgb_t3b_tp_eeprom, cxgb_t3b_tp_eeprom_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); MODULE_VERSION(cxgb_t3b_tp_eeprom, 1); @@ -142,7 +142,7 @@ cxgb_t3c_protocol_sram_modevent(module_t static moduledata_t cxgb_t3c_protocol_sram_mod = { "cxgb_t3c_protocol_sram", cxgb_t3c_protocol_sram_modevent, - NULL + 0 }; DECLARE_MODULE(cxgb_t3c_protocol_sram, cxgb_t3c_protocol_sram_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); MODULE_VERSION(cxgb_t3c_protocol_sram, 1); @@ -175,7 +175,7 @@ cxgb_t3c_tp_eeprom_modevent(module_t mod static moduledata_t cxgb_t3c_tp_eeprom_mod = { "cxgb_t3c_tp_eeprom", cxgb_t3c_tp_eeprom_modevent, - NULL + 0 }; DECLARE_MODULE(cxgb_t3c_tp_eeprom, cxgb_t3c_tp_eeprom_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); MODULE_VERSION(cxgb_t3c_tp_eeprom, 1); Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c Wed Oct 10 08:36:38 2012 (r241394) @@ -290,7 +290,7 @@ iwch_modevent(module_t mod, int cmd, voi static moduledata_t iwch_mod_data = { "iw_cxgb", iwch_modevent, - NULL + 0 }; MODULE_VERSION(iw_cxgb, 1); Modified: head/sys/dev/cxgb/ulp/tom/cxgb_tom.c ============================================================================== --- head/sys/dev/cxgb/ulp/tom/cxgb_tom.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/dev/cxgb/ulp/tom/cxgb_tom.c Wed Oct 10 08:36:38 2012 (r241394) @@ -387,7 +387,7 @@ t3_tom_modevent(module_t mod, int cmd, v static moduledata_t t3_tom_moddata= { "t3_tom", t3_tom_modevent, - NULL + 0 }; MODULE_VERSION(t3_tom, 1); Modified: head/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/dev/cxgbe/tom/t4_tom.c Wed Oct 10 08:36:38 2012 (r241394) @@ -768,7 +768,7 @@ t4_tom_modevent(module_t mod, int cmd, v static moduledata_t t4_tom_moddata= { "t4_tom", t4_tom_modevent, - NULL + 0 }; MODULE_VERSION(t4_tom, 1); Modified: head/sys/dev/drm2/drm_drv.c ============================================================================== --- head/sys/dev/drm2/drm_drv.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/dev/drm2/drm_drv.c Wed Oct 10 08:36:38 2012 (r241394) @@ -74,7 +74,7 @@ drm_modevent(module_t mod, int type, voi static moduledata_t drm_mod = { "drmn", drm_modevent, - NULL + 0 }; DECLARE_MODULE(drmn, drm_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); MODULE_VERSION(drmn, 1); Modified: head/sys/dev/iscsi/initiator/iscsi.c ============================================================================== --- head/sys/dev/iscsi/initiator/iscsi.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/dev/iscsi/initiator/iscsi.c Wed Oct 10 08:36:38 2012 (r241394) @@ -855,9 +855,9 @@ iscsi_modevent(module_t mod, int what, v } moduledata_t iscsi_mod = { - "iscsi", - (modeventhand_t) iscsi_modevent, - NULL + "iscsi", + (modeventhand_t) iscsi_modevent, + 0 }; #ifdef ISCSI_ROOT Modified: head/sys/dev/mxge/mxge_eth_z8e.c ============================================================================== --- head/sys/dev/mxge/mxge_eth_z8e.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/dev/mxge/mxge_eth_z8e.c Wed Oct 10 08:36:38 2012 (r241394) @@ -39,7 +39,7 @@ mxge_eth_z8e_fw_modevent(module_t mod, i static moduledata_t mxge_eth_z8e_fw_mod = { "mxge_eth_z8e_fw", mxge_eth_z8e_fw_modevent, - NULL + 0 }; DECLARE_MODULE(mxge_eth_z8e_fw, mxge_eth_z8e_fw_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); MODULE_VERSION(mxge_eth_z8e_fw, 1); Modified: head/sys/dev/mxge/mxge_ethp_z8e.c ============================================================================== --- head/sys/dev/mxge/mxge_ethp_z8e.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/dev/mxge/mxge_ethp_z8e.c Wed Oct 10 08:36:38 2012 (r241394) @@ -39,7 +39,7 @@ mxge_ethp_z8e_fw_modevent(module_t mod, static moduledata_t mxge_ethp_z8e_fw_mod = { "mxge_ethp_z8e_fw", mxge_ethp_z8e_fw_modevent, - NULL + 0 }; DECLARE_MODULE(mxge_ethp_z8e_fw, mxge_ethp_z8e_fw_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); MODULE_VERSION(mxge_ethp_z8e_fw, 1); Modified: head/sys/dev/mxge/mxge_rss_eth_z8e.c ============================================================================== --- head/sys/dev/mxge/mxge_rss_eth_z8e.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/dev/mxge/mxge_rss_eth_z8e.c Wed Oct 10 08:36:38 2012 (r241394) @@ -39,7 +39,7 @@ mxge_rss_eth_z8e_fw_modevent(module_t mo static moduledata_t mxge_rss_eth_z8e_fw_mod = { "mxge_rss_eth_z8e_fw", mxge_rss_eth_z8e_fw_modevent, - NULL + 0 }; DECLARE_MODULE(mxge_rss_eth_z8e_fw, mxge_rss_eth_z8e_fw_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); MODULE_VERSION(mxge_rss_eth_z8e_fw, 1); Modified: head/sys/dev/mxge/mxge_rss_ethp_z8e.c ============================================================================== --- head/sys/dev/mxge/mxge_rss_ethp_z8e.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/dev/mxge/mxge_rss_ethp_z8e.c Wed Oct 10 08:36:38 2012 (r241394) @@ -39,7 +39,7 @@ mxge_rss_ethp_z8e_fw_modevent(module_t m static moduledata_t mxge_rss_ethp_z8e_fw_mod = { "mxge_rss_ethp_z8e_fw", mxge_rss_ethp_z8e_fw_modevent, - NULL + 0 }; DECLARE_MODULE(mxge_rss_ethp_z8e_fw, mxge_rss_ethp_z8e_fw_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); MODULE_VERSION(mxge_rss_ethp_z8e_fw, 1); Modified: head/sys/dev/nvd/nvd.c ============================================================================== --- head/sys/dev/nvd/nvd.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/dev/nvd/nvd.c Wed Oct 10 08:36:38 2012 (r241394) @@ -93,7 +93,7 @@ static int nvd_modevent(module_t mod, in moduledata_t nvd_mod = { "nvd", (modeventhand_t)nvd_modevent, - NULL + 0 }; DECLARE_MODULE(nvd, nvd_mod, SI_SUB_DRIVERS, SI_ORDER_ANY); Modified: head/sys/dev/nvme/nvme.c ============================================================================== --- head/sys/dev/nvme/nvme.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/dev/nvme/nvme.c Wed Oct 10 08:36:38 2012 (r241394) @@ -177,7 +177,7 @@ nvme_modevent(module_t mod, int type, vo moduledata_t nvme_mod = { "nvme", (modeventhand_t)nvme_modevent, - NULL + 0 }; DECLARE_MODULE(nvme, nvme_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); Modified: head/sys/dev/rndtest/rndtest.c ============================================================================== --- head/sys/dev/rndtest/rndtest.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/dev/rndtest/rndtest.c Wed Oct 10 08:36:38 2012 (r241394) @@ -402,7 +402,7 @@ rndtest_modevent(module_t mod, int type, static moduledata_t rndtest_mod = { "rndtest", rndtest_modevent, - NULL + 0 }; DECLARE_MODULE(rndtest, rndtest_mod, SI_SUB_DRIVERS, SI_ORDER_ANY); MODULE_VERSION(rndtest, 1); Modified: head/sys/dev/streams/streams.c ============================================================================== --- head/sys/dev/streams/streams.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/dev/streams/streams.c Wed Oct 10 08:36:38 2012 (r241394) @@ -171,7 +171,7 @@ streams_modevent(module_t mod, int type, static moduledata_t streams_mod = { "streams", streams_modevent, - NULL + 0 }; DECLARE_MODULE(streams, streams_mod, SI_SUB_DRIVERS, SI_ORDER_ANY); MODULE_VERSION(streams, 1); Modified: head/sys/dev/tdfx/tdfx_linux.c ============================================================================== --- head/sys/dev/tdfx/tdfx_linux.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/dev/tdfx/tdfx_linux.c Wed Oct 10 08:36:38 2012 (r241394) @@ -78,7 +78,7 @@ tdfx_linux_modevent(struct module *mod _ static moduledata_t tdfx_linux_mod = { "tdfx_linux", tdfx_linux_modevent, - NULL + 0 }; /* As in SYSCALL_MODULE */ Modified: head/sys/dev/usb/net/usb_ethernet.c ============================================================================== --- head/sys/dev/usb/net/usb_ethernet.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/dev/usb/net/usb_ethernet.c Wed Oct 10 08:36:38 2012 (r241394) @@ -549,7 +549,7 @@ uether_modevent(module_t mod, int type, static moduledata_t uether_mod = { "uether", uether_modevent, - NULL + 0 }; struct mbuf * Modified: head/sys/dev/utopia/utopia.c ============================================================================== --- head/sys/dev/utopia/utopia.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/dev/utopia/utopia.c Wed Oct 10 08:36:38 2012 (r241394) @@ -668,7 +668,7 @@ utopia_mod_init(module_t mod, int what, static moduledata_t utopia_mod = { "utopia", utopia_mod_init, - NULL + 0 }; DECLARE_MODULE(utopia, utopia_mod, SI_SUB_INIT_IF, SI_ORDER_ANY); Modified: head/sys/dev/virtio/virtio.c ============================================================================== --- head/sys/dev/virtio/virtio.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/dev/virtio/virtio.c Wed Oct 10 08:36:38 2012 (r241394) @@ -269,7 +269,7 @@ virtio_modevent(module_t mod, int type, static moduledata_t virtio_mod = { "virtio", virtio_modevent, - NULL + 0 }; DECLARE_MODULE(virtio, virtio_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); Modified: head/sys/i386/ibcs2/ibcs2_sysvec.c ============================================================================== --- head/sys/i386/ibcs2/ibcs2_sysvec.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/i386/ibcs2/ibcs2_sysvec.c Wed Oct 10 08:36:38 2012 (r241394) @@ -133,6 +133,6 @@ ibcs2_modevent(module_t mod, int type, v static moduledata_t ibcs2_mod = { "ibcs2", ibcs2_modevent, - NULL + 0 }; DECLARE_MODULE_TIED(ibcs2, ibcs2_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); Modified: head/sys/i386/isa/elink.c ============================================================================== --- head/sys/i386/isa/elink.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/i386/isa/elink.c Wed Oct 10 08:36:38 2012 (r241394) @@ -87,7 +87,7 @@ elink_idseq(u_char p) static moduledata_t elink_mod = { "elink",/* module name */ NULL, /* event handler */ - NULL /* extra data */ + 0 /* extra data */ }; DECLARE_MODULE(elink, elink_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); Modified: head/sys/i386/linux/linux_sysvec.c ============================================================================== --- head/sys/i386/linux/linux_sysvec.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/i386/linux/linux_sysvec.c Wed Oct 10 08:36:38 2012 (r241394) @@ -1173,7 +1173,7 @@ linux_elf_modevent(module_t mod, int typ static moduledata_t linux_elf_mod = { "linuxelf", linux_elf_modevent, - NULL + 0 }; DECLARE_MODULE_TIED(linuxelf, linux_elf_mod, SI_SUB_EXEC, SI_ORDER_ANY); Modified: head/sys/net/bridgestp.c ============================================================================== --- head/sys/net/bridgestp.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net/bridgestp.c Wed Oct 10 08:36:38 2012 (r241394) @@ -2124,7 +2124,7 @@ bstp_modevent(module_t mod, int type, vo static moduledata_t bstp_mod = { "bridgestp", bstp_modevent, - NULL + 0 }; DECLARE_MODULE(bridgestp, bstp_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); Modified: head/sys/net/if_arcsubr.c ============================================================================== --- head/sys/net/if_arcsubr.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net/if_arcsubr.c Wed Oct 10 08:36:38 2012 (r241394) @@ -878,7 +878,7 @@ arc_modevent(module_t mod, int type, voi static moduledata_t arc_mod = { "arcnet", arc_modevent, - NULL + 0 }; DECLARE_MODULE(arcnet, arc_mod, SI_SUB_INIT_IF, SI_ORDER_ANY); Modified: head/sys/net/if_atmsubr.c ============================================================================== --- head/sys/net/if_atmsubr.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net/if_atmsubr.c Wed Oct 10 08:36:38 2012 (r241394) @@ -496,7 +496,7 @@ atm_modevent(module_t mod, int type, voi static moduledata_t atm_mod = { "atm", atm_modevent, - NULL + 0 }; DECLARE_MODULE(atm, atm_mod, SI_SUB_INIT_IF, SI_ORDER_ANY); Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net/if_bridge.c Wed Oct 10 08:36:38 2012 (r241394) @@ -523,7 +523,7 @@ bridge_modevent(module_t mod, int type, static moduledata_t bridge_mod = { "if_bridge", bridge_modevent, - NULL + 0 }; DECLARE_MODULE(if_bridge, bridge_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); Modified: head/sys/net/if_enc.c ============================================================================== --- head/sys/net/if_enc.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net/if_enc.c Wed Oct 10 08:36:38 2012 (r241394) @@ -181,7 +181,7 @@ enc_modevent(module_t mod, int type, voi static moduledata_t enc_mod = { "if_enc", enc_modevent, - NULL + 0 }; DECLARE_MODULE(if_enc, enc_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY); Modified: head/sys/net/if_epair.c ============================================================================== --- head/sys/net/if_epair.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net/if_epair.c Wed Oct 10 08:36:38 2012 (r241394) @@ -978,7 +978,7 @@ epair_modevent(module_t mod, int type, v static moduledata_t epair_mod = { "if_epair", epair_modevent, - NULL + 0 }; DECLARE_MODULE(if_epair, epair_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net/if_ethersubr.c Wed Oct 10 08:36:38 2012 (r241394) @@ -1237,7 +1237,7 @@ ether_modevent(module_t mod, int type, v static moduledata_t ether_mod = { "ether", ether_modevent, - NULL + 0 }; void Modified: head/sys/net/if_faith.c ============================================================================== --- head/sys/net/if_faith.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net/if_faith.c Wed Oct 10 08:36:38 2012 (r241394) @@ -136,7 +136,7 @@ faithmodevent(mod, type, data) static moduledata_t faith_mod = { "if_faith", faithmodevent, - NULL + 0 }; DECLARE_MODULE(if_faith, faith_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); Modified: head/sys/net/if_fddisubr.c ============================================================================== --- head/sys/net/if_fddisubr.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net/if_fddisubr.c Wed Oct 10 08:36:38 2012 (r241394) @@ -792,7 +792,7 @@ fddi_resolvemulti(ifp, llsa, sa) static moduledata_t fddi_mod = { "fddi", /* module name */ NULL, /* event handler */ - NULL /* extra data */ + 0 /* extra data */ }; DECLARE_MODULE(fddi, fddi_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); Modified: head/sys/net/if_fwsubr.c ============================================================================== --- head/sys/net/if_fwsubr.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net/if_fwsubr.c Wed Oct 10 08:36:38 2012 (r241394) @@ -845,7 +845,7 @@ firewire_modevent(module_t mod, int type static moduledata_t firewire_mod = { "if_firewire", firewire_modevent, - NULL + 0 }; DECLARE_MODULE(if_firewire, firewire_mod, SI_SUB_INIT_IF, SI_ORDER_ANY); Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net/if_gif.c Wed Oct 10 08:36:38 2012 (r241394) @@ -272,7 +272,7 @@ gifmodevent(mod, type, data) static moduledata_t gif_mod = { "if_gif", gifmodevent, - NULL + 0 }; DECLARE_MODULE(if_gif, gif_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); Modified: head/sys/net/if_gre.c ============================================================================== --- head/sys/net/if_gre.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net/if_gre.c Wed Oct 10 08:36:38 2012 (r241394) @@ -973,7 +973,7 @@ gremodevent(module_t mod, int type, void static moduledata_t gre_mod = { "if_gre", gremodevent, - NULL + 0 }; DECLARE_MODULE(if_gre, gre_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); Modified: head/sys/net/if_iso88025subr.c ============================================================================== --- head/sys/net/if_iso88025subr.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net/if_iso88025subr.c Wed Oct 10 08:36:38 2012 (r241394) @@ -823,7 +823,7 @@ iso88025_modevent(module_t mod, int type static moduledata_t iso88025_mod = { "iso88025", iso88025_modevent, - NULL + 0 }; DECLARE_MODULE(iso88025, iso88025_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net/if_lagg.c Wed Oct 10 08:36:38 2012 (r241394) @@ -211,7 +211,7 @@ lagg_modevent(module_t mod, int type, vo static moduledata_t lagg_mod = { "if_lagg", lagg_modevent, - NULL + 0 }; DECLARE_MODULE(if_lagg, lagg_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); Modified: head/sys/net/if_loop.c ============================================================================== --- head/sys/net/if_loop.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net/if_loop.c Wed Oct 10 08:36:38 2012 (r241394) @@ -205,7 +205,7 @@ loop_modevent(module_t mod, int type, vo static moduledata_t loop_mod = { "if_lo", loop_modevent, - NULL + 0 }; DECLARE_MODULE(if_lo, loop_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY); Modified: head/sys/net/if_spppsubr.c ============================================================================== --- head/sys/net/if_spppsubr.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net/if_spppsubr.c Wed Oct 10 08:36:38 2012 (r241394) @@ -494,7 +494,7 @@ sppp_modevent(module_t mod, int type, vo static moduledata_t spppmod = { "sppp", sppp_modevent, - NULL + 0 }; MODULE_VERSION(sppp, 1); DECLARE_MODULE(sppp, spppmod, SI_SUB_DRIVERS, SI_ORDER_ANY); Modified: head/sys/net/if_stf.c ============================================================================== --- head/sys/net/if_stf.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net/if_stf.c Wed Oct 10 08:36:38 2012 (r241394) @@ -301,7 +301,7 @@ stfmodevent(mod, type, data) static moduledata_t stf_mod = { "if_stf", stfmodevent, - NULL + 0 }; DECLARE_MODULE(if_stf, stf_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); Modified: head/sys/net/if_tun.c ============================================================================== --- head/sys/net/if_tun.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net/if_tun.c Wed Oct 10 08:36:38 2012 (r241394) @@ -317,7 +317,7 @@ tunmodevent(module_t mod, int type, void static moduledata_t tun_mod = { "if_tun", tunmodevent, - NULL + 0 }; DECLARE_MODULE(if_tun, tun_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net/if_vlan.c Wed Oct 10 08:36:38 2012 (r241394) @@ -762,7 +762,7 @@ vlan_modevent(module_t mod, int type, vo static moduledata_t vlan_mod = { "if_vlan", vlan_modevent, - NULL + 0 }; DECLARE_MODULE(if_vlan, vlan_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); Modified: head/sys/net/zlib.c ============================================================================== --- head/sys/net/zlib.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net/zlib.c Wed Oct 10 08:36:38 2012 (r241394) @@ -5400,7 +5400,7 @@ zlib_modevent(module_t mod, int type, vo static moduledata_t zlib_mod = { "zlib", zlib_modevent, - NULL + 0 }; DECLARE_MODULE(zlib, zlib_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); MODULE_VERSION(zlib, 1); Modified: head/sys/net80211/ieee80211_freebsd.c ============================================================================== --- head/sys/net80211/ieee80211_freebsd.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net80211/ieee80211_freebsd.c Wed Oct 10 08:36:38 2012 (r241394) @@ -822,7 +822,7 @@ wlan_modevent(module_t mod, int type, vo static moduledata_t wlan_mod = { "wlan", wlan_modevent, - NULL + 0 }; DECLARE_MODULE(wlan, wlan_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); MODULE_VERSION(wlan, 1); Modified: head/sys/net80211/ieee80211_freebsd.h ============================================================================== --- head/sys/net80211/ieee80211_freebsd.h Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/net80211/ieee80211_freebsd.h Wed Oct 10 08:36:38 2012 (r241394) @@ -323,7 +323,7 @@ wlan_##name##_modevent(module_t mod, int static moduledata_t name##_mod = { \ "wlan_" #name, \ wlan_##name##_modevent, \ - NULL \ + 0 \ }; \ DECLARE_MODULE(wlan_##name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);\ MODULE_VERSION(wlan_##name, version); \ Modified: head/sys/netgraph/atm/ngatmbase.c ============================================================================== --- head/sys/netgraph/atm/ngatmbase.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/netgraph/atm/ngatmbase.c Wed Oct 10 08:36:38 2012 (r241394) @@ -51,7 +51,7 @@ static int ngatm_handler(module_t, int, static moduledata_t ngatm_data = { "ngatmbase", ngatm_handler, - NULL + 0 }; MODULE_VERSION(ngatmbase, NGATMBASE_VERSION); Modified: head/sys/netinet/igmp.c ============================================================================== --- head/sys/netinet/igmp.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/netinet/igmp.c Wed Oct 10 08:36:38 2012 (r241394) @@ -3644,6 +3644,6 @@ igmp_modevent(module_t mod, int type, vo static moduledata_t igmp_mod = { "igmp", igmp_modevent, - NULL + 0 }; DECLARE_MODULE(igmp, igmp_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/netinet/ip_carp.c Wed Oct 10 08:36:38 2012 (r241394) @@ -2145,7 +2145,7 @@ carp_modevent(module_t mod, int type, vo static moduledata_t carp_mod = { "carp", carp_modevent, - NULL + 0 }; DECLARE_MODULE(carp, carp_mod, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY); Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/netinet/ip_divert.c Wed Oct 10 08:36:38 2012 (r241394) @@ -834,7 +834,7 @@ div_modevent(module_t mod, int type, voi static moduledata_t ipdivertmod = { "ipdivert", div_modevent, - NULL + 0 }; DECLARE_MODULE(ipdivert, ipdivertmod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY); Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/netinet/ip_mroute.c Wed Oct 10 08:36:38 2012 (r241394) @@ -2944,7 +2944,7 @@ ip_mroute_modevent(module_t mod, int typ static moduledata_t ip_mroutemod = { "ip_mroute", ip_mroute_modevent, - NULL + 0 }; DECLARE_MODULE(ip_mroute, ip_mroutemod, SI_SUB_PSEUDO, SI_ORDER_MIDDLE); Modified: head/sys/netinet/toecore.c ============================================================================== --- head/sys/netinet/toecore.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/netinet/toecore.c Wed Oct 10 08:36:38 2012 (r241394) @@ -570,7 +570,7 @@ toecore_mod_handler(module_t mod, int cm static moduledata_t mod_data= { "toecore", toecore_mod_handler, - NULL + 0 }; MODULE_VERSION(toecore, 1); Modified: head/sys/netinet6/ip6_mroute.c ============================================================================== --- head/sys/netinet6/ip6_mroute.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/netinet6/ip6_mroute.c Wed Oct 10 08:36:38 2012 (r241394) @@ -2059,7 +2059,7 @@ ip6_mroute_modevent(module_t mod, int ty static moduledata_t ip6_mroutemod = { "ip6_mroute", ip6_mroute_modevent, - NULL + 0 }; DECLARE_MODULE(ip6_mroute, ip6_mroutemod, SI_SUB_PSEUDO, SI_ORDER_ANY); Modified: head/sys/netinet6/mld6.c ============================================================================== --- head/sys/netinet6/mld6.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/netinet6/mld6.c Wed Oct 10 08:36:38 2012 (r241394) @@ -3309,6 +3309,6 @@ mld_modevent(module_t mod, int type, voi static moduledata_t mld_mod = { "mld", mld_modevent, - NULL + 0 }; DECLARE_MODULE(mld, mld_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); Modified: head/sys/netinet6/send.c ============================================================================== --- head/sys/netinet6/send.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/netinet6/send.c Wed Oct 10 08:36:38 2012 (r241394) @@ -361,7 +361,7 @@ send_modevent(module_t mod, int type, vo static moduledata_t sendmod = { "send", send_modevent, - NULL + 0 }; DECLARE_MODULE(send, sendmod, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY); Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/netpfil/ipfw/ip_fw2.c Wed Oct 10 08:36:38 2012 (r241394) @@ -2756,7 +2756,7 @@ ipfw_modevent(module_t mod, int type, vo static moduledata_t ipfwmod = { "ipfw", ipfw_modevent, - NULL + 0 }; /* Define startup order. */ Modified: head/sys/netpfil/ipfw/ip_fw_nat.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_nat.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/netpfil/ipfw/ip_fw_nat.c Wed Oct 10 08:36:38 2012 (r241394) @@ -651,7 +651,7 @@ ipfw_nat_modevent(module_t mod, int type static moduledata_t ipfw_nat_mod = { "ipfw_nat", ipfw_nat_modevent, - NULL + 0 }; DECLARE_MODULE(ipfw_nat, ipfw_nat_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY); Modified: head/sys/netpfil/pf/if_pflog.c ============================================================================== --- head/sys/netpfil/pf/if_pflog.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/netpfil/pf/if_pflog.c Wed Oct 10 08:36:38 2012 (r241394) @@ -281,7 +281,7 @@ pflog_modevent(module_t mod, int type, v return error; } -static moduledata_t pflog_mod = { "pflog", pflog_modevent, NULL }; +static moduledata_t pflog_mod = { "pflog", pflog_modevent, 0 }; #define PFLOG_MODVER 1 Modified: head/sys/netpfil/pf/if_pfsync.c ============================================================================== --- head/sys/netpfil/pf/if_pfsync.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/netpfil/pf/if_pfsync.c Wed Oct 10 08:36:38 2012 (r241394) @@ -2402,7 +2402,7 @@ pfsync_modevent(module_t mod, int type, static moduledata_t pfsync_mod = { "pfsync", pfsync_modevent, - NULL + 0 }; #define PFSYNC_MODVER 1 Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/netpfil/pf/pf_ioctl.c Wed Oct 10 08:36:38 2012 (r241394) @@ -3722,7 +3722,7 @@ pf_modevent(module_t mod, int type, void static moduledata_t pf_mod = { "pf", pf_modevent, - NULL + 0 }; DECLARE_MODULE(pf, pf_mod, SI_SUB_PSEUDO, SI_ORDER_FIRST); Modified: head/sys/nfs/nfs_nfssvc.c ============================================================================== --- head/sys/nfs/nfs_nfssvc.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/nfs/nfs_nfssvc.c Wed Oct 10 08:36:38 2012 (r241394) @@ -147,7 +147,7 @@ nfssvc_modevent(module_t mod, int type, static moduledata_t nfssvc_mod = { "nfssvc", nfssvc_modevent, - NULL + NULL, }; DECLARE_MODULE(nfssvc, nfssvc_mod, SI_SUB_VFS, SI_ORDER_ANY); Modified: head/sys/nfsserver/nfs_srvsubs.c ============================================================================== --- head/sys/nfsserver/nfs_srvsubs.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/nfsserver/nfs_srvsubs.c Wed Oct 10 08:36:38 2012 (r241394) @@ -552,7 +552,7 @@ nfsrv_modevent(module_t mod, int type, v static moduledata_t nfsserver_mod = { "nfsserver", nfsrv_modevent, - NULL + NULL, }; DECLARE_MODULE(nfsserver, nfsserver_mod, SI_SUB_VFS, SI_ORDER_ANY); Modified: head/sys/opencrypto/cryptodev.c ============================================================================== --- head/sys/opencrypto/cryptodev.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/opencrypto/cryptodev.c Wed Oct 10 08:36:38 2012 (r241394) @@ -1171,7 +1171,7 @@ cryptodev_modevent(module_t mod, int typ static moduledata_t cryptodev_mod = { "cryptodev", cryptodev_modevent, - NULL + 0 }; MODULE_VERSION(cryptodev, 1); DECLARE_MODULE(cryptodev, cryptodev_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); Modified: head/sys/tools/fw_stub.awk ============================================================================== --- head/sys/tools/fw_stub.awk Wed Oct 10 05:43:04 2012 (r241393) +++ head/sys/tools/fw_stub.awk Wed Oct 10 08:36:38 2012 (r241394) @@ -215,7 +215,7 @@ printc("\t\treturn (error);\ static moduledata_t " modname "_fw_mod = {\ \"" modname "_fw\",\ " modname "_fw_modevent,\ - NULL\ + 0\ };\ DECLARE_MODULE(" modname "_fw, " modname "_fw_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);\ MODULE_VERSION(" modname "_fw, 1);\ Modified: head/tools/regression/kthread/kld/kthrdlk.c ============================================================================== --- head/tools/regression/kthread/kld/kthrdlk.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/tools/regression/kthread/kld/kthrdlk.c Wed Oct 10 08:36:38 2012 (r241394) @@ -193,11 +193,12 @@ kthrdlk_handler(module_t mod, int /*mode } static moduledata_t mod_data= { - "kthrdlk", - kthrdlk_handler, - NULL -}; + "kthrdlk", + kthrdlk_handler, + 0 + }; MODULE_VERSION(kthrdlk, 1); DECLARE_MODULE(kthrdlk, mod_data, SI_SUB_EXEC, SI_ORDER_ANY); + Modified: head/tools/regression/net80211/ccmp/test_ccmp.c ============================================================================== --- head/tools/regression/net80211/ccmp/test_ccmp.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/tools/regression/net80211/ccmp/test_ccmp.c Wed Oct 10 08:36:38 2012 (r241394) @@ -742,7 +742,7 @@ test_ccmp_modevent(module_t mod, int typ static moduledata_t test_ccmp_mod = { "test_ccmp", test_ccmp_modevent, - NULL + 0 }; DECLARE_MODULE(test_ccmp, test_ccmp_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); MODULE_VERSION(test_ccmp, 1); Modified: head/tools/regression/net80211/tkip/test_tkip.c ============================================================================== --- head/tools/regression/net80211/tkip/test_tkip.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/tools/regression/net80211/tkip/test_tkip.c Wed Oct 10 08:36:38 2012 (r241394) @@ -381,7 +381,7 @@ test_tkip_modevent(module_t mod, int typ static moduledata_t test_tkip_mod = { "test_tkip", test_tkip_modevent, - NULL + 0 }; DECLARE_MODULE(test_tkip, test_tkip_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); MODULE_VERSION(test_tkip, 1); Modified: head/tools/regression/net80211/wep/test_wep.c ============================================================================== --- head/tools/regression/net80211/wep/test_wep.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/tools/regression/net80211/wep/test_wep.c Wed Oct 10 08:36:38 2012 (r241394) @@ -328,7 +328,7 @@ test_wep_modevent(module_t mod, int type static moduledata_t test_wep_mod = { "test_wep", test_wep_modevent, - NULL + 0 }; DECLARE_MODULE(test_wep, test_wep_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); MODULE_VERSION(test_wep, 1); Modified: head/tools/tools/kttcp/sys/kttcp.c ============================================================================== --- head/tools/tools/kttcp/sys/kttcp.c Wed Oct 10 05:43:04 2012 (r241393) +++ head/tools/tools/kttcp/sys/kttcp.c Wed Oct 10 08:36:38 2012 (r241394) @@ -268,7 +268,7 @@ kttcpdev_modevent(module_t mod, int type static moduledata_t kttcpdev_mod = { "kttcpdev", kttcpdev_modevent, - NULL + 0 }; MODULE_VERSION(kttcpdev, 1); DECLARE_MODULE(kttcpdev, kttcpdev_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 14:47:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7AFC9AFC; Wed, 10 Oct 2012 14:47:47 +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 635788FC14; Wed, 10 Oct 2012 14:47:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AEllnL047183; Wed, 10 Oct 2012 14:47:47 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AEllVK047181; Wed, 10 Oct 2012 14:47:47 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210101447.q9AEllVK047181@svn.freebsd.org> From: John Baldwin Date: Wed, 10 Oct 2012 14:47:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241395 - head/usr.sbin/config X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 14:47:47 -0000 Author: jhb Date: Wed Oct 10 14:47:46 2012 New Revision: 241395 URL: http://svn.freebsd.org/changeset/base/241395 Log: - Fix the error message when a dependency string is not provided to reference a missing dependency rather than a missing compile command. - Don't append a newline to the auto-generated compile command. The compile command has a newline appended when it is later output to the Makefile. MFC after: 2 weeks Modified: head/usr.sbin/config/mkmakefile.c Modified: head/usr.sbin/config/mkmakefile.c ============================================================================== --- head/usr.sbin/config/mkmakefile.c Wed Oct 10 08:36:38 2012 (r241394) +++ head/usr.sbin/config/mkmakefile.c Wed Oct 10 14:47:46 2012 (r241395) @@ -431,7 +431,7 @@ nextparam: next_quoted_word(fp, wd); if (wd == 0) { fprintf(stderr, - "%s: %s missing compile command string.\n", + "%s: %s missing dependency string.\n", fname, this); exit(1); } @@ -762,7 +762,7 @@ do_rules(FILE *f) break; } snprintf(cmd, sizeof(cmd), - "${%s_%c%s}\n", ftype, + "${%s_%c%s}", ftype, toupper(och), ftp->f_flags & NOWERROR ? "_NOWERROR" : ""); compilewith = cmd; From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 16:07:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 25E59DDA; Wed, 10 Oct 2012 16:07:24 +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 0DA608FC0A; Wed, 10 Oct 2012 16:07:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AG7NR4059230; Wed, 10 Oct 2012 16:07:23 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AG7N0Q059228; Wed, 10 Oct 2012 16:07:23 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210101607.q9AG7N0Q059228@svn.freebsd.org> From: John Baldwin Date: Wed, 10 Oct 2012 16:07:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241396 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 16:07:24 -0000 Author: jhb Date: Wed Oct 10 16:07:23 2012 New Revision: 241396 URL: http://svn.freebsd.org/changeset/base/241396 Log: WITH_CTF is now a "normal" build option (WITHOUT_CTF is supported and MK_CTF is used internally). Reviewed by: fjoe Modified: head/share/man/man7/build.7 Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Wed Oct 10 14:47:46 2012 (r241395) +++ head/share/man/man7/build.7 Wed Oct 10 16:07:23 2012 (r241396) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 2, 2012 +.Dd October 10, 2012 .Dt BUILD 7 .Os .Sh NAME @@ -382,12 +382,6 @@ even if the makefile says otherwise. .It Va WITH_CTF If defined, the build process will run the DTrace CTF conversion tools on built objects. -Please note that this WITH_ option is handled differently than all -other WITH_ options (there is no -.Va WITHOUT_CTF , -or corresponding -.Va MK_CTF -in the build system). .El .Pp Additionally, builds in From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 16:52:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 23D90613; Wed, 10 Oct 2012 16:52:40 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CFBA8FC14; Wed, 10 Oct 2012 16:52:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AGqdaA065059; Wed, 10 Oct 2012 16:52:39 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AGqdCV065056; Wed, 10 Oct 2012 16:52:39 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201210101652.q9AGqdCV065056@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 10 Oct 2012 16:52:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241397 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 16:52:40 -0000 Author: np Date: Wed Oct 10 16:52:39 2012 New Revision: 241397 URL: http://svn.freebsd.org/changeset/base/241397 Log: Remove unused item. cxgbe's rx queue's lock was removed a long time ago. MFC after: 3 days Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Wed Oct 10 16:07:23 2012 (r241396) +++ head/sys/dev/cxgbe/adapter.h Wed Oct 10 16:52:39 2012 (r241397) @@ -282,7 +282,6 @@ struct sge_iq { bus_dma_tag_t desc_tag; bus_dmamap_t desc_map; bus_addr_t ba; /* bus address of descriptor ring */ - char lockname[16]; uint32_t flags; uint16_t abs_id; /* absolute SGE id for the iq */ int8_t intr_pktc_idx; /* packet count threshold index */ Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Wed Oct 10 16:07:23 2012 (r241396) +++ head/sys/dev/cxgbe/t4_sge.c Wed Oct 10 16:52:39 2012 (r241397) @@ -120,7 +120,7 @@ static struct mbuf *get_fl_payload(struc int *); static int t4_eth_rx(struct sge_iq *, const struct rss_header *, struct mbuf *); static inline void init_iq(struct sge_iq *, struct adapter *, int, int, int, - int, char *); + int); static inline void init_fl(struct sge_fl *, int, int, char *); static inline void init_eq(struct sge_eq *, int, int, uint8_t, uint16_t, char *); @@ -595,10 +595,8 @@ t4_setup_port_queues(struct port_info *p */ for_each_rxq(pi, i, rxq) { - snprintf(name, sizeof(name), "%s rxq%d-iq", - device_get_nameunit(pi->dev), i); init_iq(&rxq->iq, sc, pi->tmr_idx, pi->pktc_idx, pi->qsize_rxq, - RX_IQ_ESIZE, name); + RX_IQ_ESIZE); snprintf(name, sizeof(name), "%s rxq%d-fl", device_get_nameunit(pi->dev), i); @@ -620,10 +618,8 @@ t4_setup_port_queues(struct port_info *p #ifdef TCP_OFFLOAD for_each_ofld_rxq(pi, i, ofld_rxq) { - snprintf(name, sizeof(name), "%s ofld_rxq%d-iq", - device_get_nameunit(pi->dev), i); init_iq(&ofld_rxq->iq, sc, pi->tmr_idx, pi->pktc_idx, - pi->qsize_rxq, RX_IQ_ESIZE, name); + pi->qsize_rxq, RX_IQ_ESIZE); snprintf(name, sizeof(name), "%s ofld_rxq%d-fl", device_get_nameunit(pi->dev), i); @@ -1478,7 +1474,7 @@ can_resume_tx(struct sge_eq *eq) static inline void init_iq(struct sge_iq *iq, struct adapter *sc, int tmr_idx, int pktc_idx, - int qsize, int esize, char *name) + int qsize, int esize) { KASSERT(tmr_idx >= 0 && tmr_idx < SGE_NTIMERS, ("%s: bad tmr_idx %d", __func__, tmr_idx)); @@ -1495,7 +1491,6 @@ init_iq(struct sge_iq *iq, struct adapte } iq->qsize = roundup(qsize, 16); /* See FW_IQ_CMD/iqsize */ iq->esize = max(esize, 16); /* See FW_IQ_CMD/iqesize */ - strlcpy(iq->lockname, name, sizeof(iq->lockname)); } static inline void @@ -1793,12 +1788,10 @@ alloc_fwq(struct adapter *sc) { int rc, intr_idx; struct sge_iq *fwq = &sc->sge.fwq; - char name[16]; struct sysctl_oid *oid = device_get_sysctl_tree(sc->dev); struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid); - snprintf(name, sizeof(name), "%s fwq", device_get_nameunit(sc->dev)); - init_iq(fwq, sc, 0, 0, FW_IQ_QSIZE, FW_IQ_ESIZE, name); + init_iq(fwq, sc, 0, 0, FW_IQ_QSIZE, FW_IQ_ESIZE); fwq->flags |= IQ_INTR; /* always */ intr_idx = sc->intr_count > 1 ? 1 : 0; rc = alloc_iq_fl(sc->port[0], fwq, NULL, intr_idx, -1); From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 16:54:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 02B66799; Wed, 10 Oct 2012 16:54:15 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E09338FC08; Wed, 10 Oct 2012 16:54:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AGsEin065283; Wed, 10 Oct 2012 16:54:14 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AGsETJ065281; Wed, 10 Oct 2012 16:54:14 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201210101654.q9AGsETJ065281@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 10 Oct 2012 16:54:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241398 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 16:54:15 -0000 Author: np Date: Wed Oct 10 16:54:14 2012 New Revision: 241398 URL: http://svn.freebsd.org/changeset/base/241398 Log: There is no need to report the same error twice. MFC after: 3 days Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Wed Oct 10 16:52:39 2012 (r241397) +++ head/sys/dev/cxgbe/t4_sge.c Wed Oct 10 16:54:14 2012 (r241398) @@ -417,22 +417,14 @@ t4_setup_adapter_queues(struct adapter * * Firmware event queue */ rc = alloc_fwq(sc); - if (rc != 0) { - device_printf(sc->dev, - "failed to create firmware event queue: %d\n", rc); + if (rc != 0) return (rc); - } /* * Management queue. This is just a control queue that uses the fwq as * its associated iq. */ rc = alloc_mgmtq(sc); - if (rc != 0) { - device_printf(sc->dev, - "failed to create management queue: %d\n", rc); - return (rc); - } return (rc); } From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 17:13:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C267E65F; Wed, 10 Oct 2012 17:13:46 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0E118FC0A; Wed, 10 Oct 2012 17:13:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AHDkP2068146; Wed, 10 Oct 2012 17:13:46 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AHDkDV068141; Wed, 10 Oct 2012 17:13:46 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201210101713.q9AHDkDV068141@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 10 Oct 2012 17:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241399 - in head/sys/dev/cxgbe: . common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 17:13:46 -0000 Author: np Date: Wed Oct 10 17:13:46 2012 New Revision: 241399 URL: http://svn.freebsd.org/changeset/base/241399 Log: Add a driver ioctl to read a byte from any device on a port's i2c bus. This lets userspace read arbitrary information from the SFP+ modules etc. on this bus. Reading multiple bytes in the same transaction isn't possible right now. I'll update the driver once the chip's firmware supports this. MFC after: 3 days Modified: head/sys/dev/cxgbe/common/common.h head/sys/dev/cxgbe/common/t4_hw.c head/sys/dev/cxgbe/t4_ioctl.h head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/common/common.h ============================================================================== --- head/sys/dev/cxgbe/common/common.h Wed Oct 10 16:54:14 2012 (r241398) +++ head/sys/dev/cxgbe/common/common.h Wed Oct 10 17:13:46 2012 (r241399) @@ -521,6 +521,8 @@ int t4_enable_vi(struct adapter *adap, u bool rx_en, bool tx_en); int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid, unsigned int nblinks); +int t4_i2c_rd(struct adapter *adap, unsigned int mbox, unsigned int port_id, + u8 dev_addr, u8 offset, u8 *valp); int t4_mdio_rd(struct adapter *adap, unsigned int mbox, unsigned int phy_addr, unsigned int mmd, unsigned int reg, unsigned int *valp); int t4_mdio_wr(struct adapter *adap, unsigned int mbox, unsigned int phy_addr, Modified: head/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- head/sys/dev/cxgbe/common/t4_hw.c Wed Oct 10 16:54:14 2012 (r241398) +++ head/sys/dev/cxgbe/common/t4_hw.c Wed Oct 10 17:13:46 2012 (r241399) @@ -3885,6 +3885,36 @@ int t4_fwaddrspace_write(struct adapter } /** + * t4_i2c_rd - read a byte from an i2c addressable device + * @adap: the adapter + * @mbox: mailbox to use for the FW command + * @port_id: the port id + * @dev_addr: the i2c device address + * @offset: the byte offset to read from + * @valp: where to store the value + */ +int t4_i2c_rd(struct adapter *adap, unsigned int mbox, unsigned int port_id, + u8 dev_addr, u8 offset, u8 *valp) +{ + int ret; + struct fw_ldst_cmd c; + + memset(&c, 0, sizeof(c)); + c.op_to_addrspace = htonl(V_FW_CMD_OP(FW_LDST_CMD) | F_FW_CMD_REQUEST | + F_FW_CMD_READ | + V_FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_FUNC_I2C)); + c.cycles_to_len16 = htonl(FW_LEN16(c)); + c.u.i2c.pid_pkd = V_FW_LDST_CMD_PID(port_id); + c.u.i2c.base = dev_addr; + c.u.i2c.boffset = offset; + + ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); + if (ret == 0) + *valp = c.u.i2c.data; + return ret; +} + +/** * t4_mdio_rd - read a PHY register through MDIO * @adap: the adapter * @mbox: mailbox to use for the FW command Modified: head/sys/dev/cxgbe/t4_ioctl.h ============================================================================== --- head/sys/dev/cxgbe/t4_ioctl.h Wed Oct 10 16:54:14 2012 (r241398) +++ head/sys/dev/cxgbe/t4_ioctl.h Wed Oct 10 17:13:46 2012 (r241399) @@ -49,6 +49,7 @@ enum { T4_GET_SGE_CONTEXT, /* get SGE context for a queue */ T4_LOAD_FW, /* flash firmware */ T4_GET_MEM, /* read memory */ + T4_GET_I2C, /* read from i2c addressible device */ }; struct t4_reg { @@ -69,6 +70,14 @@ struct t4_data { uint8_t *data; }; +struct t4_i2c_data { + uint8_t port_id; + uint8_t dev_addr; + uint8_t offset; + uint8_t len; + uint8_t data[8]; +}; + /* * A hardware filter is some valid combination of these. */ @@ -224,4 +233,5 @@ struct t4_mem_range { struct t4_sge_context) #define CHELSIO_T4_LOAD_FW _IOW('f', T4_LOAD_FW, struct t4_data) #define CHELSIO_T4_GET_MEM _IOW('f', T4_GET_MEM, struct t4_mem_range) +#define CHELSIO_T4_GET_I2C _IOWR('f', T4_GET_I2C, struct t4_i2c_data) #endif Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Wed Oct 10 16:54:14 2012 (r241398) +++ head/sys/dev/cxgbe/t4_main.c Wed Oct 10 17:13:46 2012 (r241399) @@ -349,6 +349,7 @@ static int set_filter_wr(struct adapter static int del_filter_wr(struct adapter *, int); static int get_sge_context(struct adapter *, struct t4_sge_context *); static int read_card_mem(struct adapter *, struct t4_mem_range *); +static int read_i2c(struct adapter *, struct t4_i2c_data *); #ifdef TCP_OFFLOAD static int toe_capability(struct port_info *, int); #endif @@ -5170,6 +5171,27 @@ proceed: return (rc); } +static int +read_i2c(struct adapter *sc, struct t4_i2c_data *i2cd) +{ + int rc; + + ADAPTER_LOCK_ASSERT_OWNED(sc); /* for mbox */ + + if (i2cd->len == 0 || i2cd->port_id >= sc->params.nports) + return (EINVAL); + + if (i2cd->len > 1) { + /* XXX: need fw support for longer reads in one go */ + return (ENOTSUP); + } + + rc = -t4_i2c_rd(sc, sc->mbox, i2cd->port_id, i2cd->dev_addr, + i2cd->offset, &i2cd->data[0]); + + return (rc); +} + int t4_os_find_pci_capability(struct adapter *sc, int cap) { @@ -5373,6 +5395,11 @@ t4_ioctl(struct cdev *dev, unsigned long case CHELSIO_T4_GET_MEM: rc = read_card_mem(sc, (struct t4_mem_range *)data); break; + case CHELSIO_T4_GET_I2C: + ADAPTER_LOCK(sc); + rc = read_i2c(sc, (struct t4_i2c_data *)data); + ADAPTER_UNLOCK(sc); + break; default: rc = EINVAL; } From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 17:15:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 917B4966; Wed, 10 Oct 2012 17:15:35 +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 7A41B8FC16; Wed, 10 Oct 2012 17:15:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AHFZNB068415; Wed, 10 Oct 2012 17:15:35 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AHFZT1068413; Wed, 10 Oct 2012 17:15:35 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210101715.q9AHFZT1068413@svn.freebsd.org> From: Alan Cox Date: Wed, 10 Oct 2012 17:15:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241400 - head/sys/i386/xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 17:15:35 -0000 Author: alc Date: Wed Oct 10 17:15:34 2012 New Revision: 241400 URL: http://svn.freebsd.org/changeset/base/241400 Log: MFi386 r241356 Add several asserts. MFC after: 3 days Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Wed Oct 10 17:13:46 2012 (r241399) +++ head/sys/i386/xen/pmap.c Wed Oct 10 17:15:34 2012 (r241400) @@ -2014,6 +2014,9 @@ pmap_pv_reclaim(pmap_t locked_pmap) pmap_pte_release(pte); if ((tpte & PG_W) != 0) continue; + KASSERT(tpte != 0, + ("pmap_pv_reclaim: pmap %p va %x zero pte", + pmap, va)); if ((tpte & PG_G) != 0) pmap_invalidate_page(pmap, va); m = PHYS_TO_VM_PAGE(tpte & PG_FRAME); @@ -2286,6 +2289,8 @@ pmap_remove_pte(pmap_t pmap, pt_entry_t PMAP_LOCK_ASSERT(pmap, MA_OWNED); oldpte = *ptq; PT_SET_VA_MA(ptq, 0, TRUE); + KASSERT(oldpte != 0, + ("pmap_remove_pte: pmap %p va %x zero pte", pmap, va)); if (oldpte & PG_W) pmap->pm_stats.wired_count -= 1; /* @@ -2470,6 +2475,8 @@ pmap_remove_all(vm_page_t m) pte = pmap_pte_quick(pmap, pv->pv_va); tpte = *pte; PT_SET_VA_MA(pte, 0, TRUE); + KASSERT(tpte != 0, ("pmap_remove_all: pmap %p va %x zero pte", + pmap, pv->pv_va)); if (tpte & PG_W) pmap->pm_stats.wired_count--; if (tpte & PG_A) @@ -3533,6 +3540,8 @@ pmap_remove_pages(pmap_t pmap) PMAP_LOCK(pmap); sched_pin(); TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { + KASSERT(pc->pc_pmap == pmap, ("Wrong pmap %p %p", pmap, + pc->pc_pmap)); allfree = 1; for (field = 0; field < _NPCM; field++) { inuse = ~pc->pc_map[field] & pc_freemask[field]; From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 17:29:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4326121; Wed, 10 Oct 2012 17:29:52 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83EE98FC22; Wed, 10 Oct 2012 17:29:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AHTq7C070398; Wed, 10 Oct 2012 17:29:52 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AHTqYO070396; Wed, 10 Oct 2012 17:29:52 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201210101729.q9AHTqYO070396@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 10 Oct 2012 17:29:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241401 - head/tools/tools/cxgbetool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 17:29:52 -0000 Author: np Date: Wed Oct 10 17:29:51 2012 New Revision: 241401 URL: http://svn.freebsd.org/changeset/base/241401 Log: Add an "i2c" subcommand to cxgbetool. You can use this to read information from the transceivers connected to the ports of a cxgbe(4) based card. # cxgbetool t4nex0 i2c [] For example: # cxgbetool t4nex0 i2c 0 0xa0 3 0x10 [16] (As per SFF-8472 the SFP+ module is at 0xa0 and bit 4 in the value at address 3 indicates it's a 10Gbase-SR module, which it is.) Modified: head/tools/tools/cxgbetool/cxgbetool.c Modified: head/tools/tools/cxgbetool/cxgbetool.c ============================================================================== --- head/tools/tools/cxgbetool/cxgbetool.c Wed Oct 10 17:15:34 2012 (r241400) +++ head/tools/tools/cxgbetool/cxgbetool.c Wed Oct 10 17:29:51 2012 (r241401) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -86,6 +87,7 @@ usage(FILE *fp) "\tfilter delete|clear delete a filter\n" "\tfilter list list all filters\n" "\tfilter mode [] ... get/set global filter mode\n" + "\ti2c [] read from i2c device\n" "\tloadfw install firmware\n" "\tmemdump dump a memory range\n" "\treg
[=] read/write register\n" @@ -1522,6 +1524,60 @@ read_tcb(int argc, const char *argv[]) } static int +read_i2c(int argc, const char *argv[]) +{ + char *p; + long l; + struct t4_i2c_data i2cd; + int rc, i; + + if (argc < 3 || argc > 4) { + warnx("incorrect number of arguments."); + return (EINVAL); + } + + p = str_to_number(argv[0], &l, NULL); + if (*p || l > UCHAR_MAX) { + warnx("invalid port id \"%s\"", argv[0]); + return (EINVAL); + } + i2cd.port_id = l; + + p = str_to_number(argv[1], &l, NULL); + if (*p || l > UCHAR_MAX) { + warnx("invalid i2c device address \"%s\"", argv[1]); + return (EINVAL); + } + i2cd.dev_addr = l; + + p = str_to_number(argv[2], &l, NULL); + if (*p || l > UCHAR_MAX) { + warnx("invalid byte offset \"%s\"", argv[2]); + return (EINVAL); + } + i2cd.offset = l; + + if (argc == 4) { + p = str_to_number(argv[3], &l, NULL); + if (*p || l > sizeof(i2cd.data)) { + warnx("invalid number of bytes \"%s\"", argv[3]); + return (EINVAL); + } + i2cd.len = l; + } else + i2cd.len = 1; + + rc = doit(CHELSIO_T4_GET_I2C, &i2cd); + if (rc != 0) + return (rc); + + for (i = 0; i < i2cd.len; i++) + printf("0x%x [%u]\n", i2cd.data[i], i2cd.data[i]); + + return (0); +} + +static int run_cmd(int argc, const char *argv[]) { int rc = -1; @@ -1547,6 +1603,8 @@ run_cmd(int argc, const char *argv[]) rc = memdump(argc, argv); else if (!strcmp(cmd, "tcb")) rc = read_tcb(argc, argv); + else if (!strcmp(cmd, "i2c")) + rc = read_i2c(argc, argv); else { rc = EINVAL; warnx("invalid command \"%s\"", cmd); From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 17:51:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 542E0DD6; Wed, 10 Oct 2012 17:51:24 +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 3E2608FC16; Wed, 10 Oct 2012 17:51:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AHpOdi073286; Wed, 10 Oct 2012 17:51:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AHpONG073284; Wed, 10 Oct 2012 17:51:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210101751.q9AHpONG073284@svn.freebsd.org> From: Alexander Motin Date: Wed, 10 Oct 2012 17:51:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241402 - head/sys/dev/ata X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 17:51:24 -0000 Author: mav Date: Wed Oct 10 17:51:23 2012 New Revision: 241402 URL: http://svn.freebsd.org/changeset/base/241402 Log: Add checks for ata_sata_scr_read() return statuses. It is mostly to silence Clang Static Analyzer warnings as errors there are usually unlikely. Modified: head/sys/dev/ata/ata-sata.c Modified: head/sys/dev/ata/ata-sata.c ============================================================================== --- head/sys/dev/ata/ata-sata.c Wed Oct 10 17:29:51 2012 (r241401) +++ head/sys/dev/ata/ata-sata.c Wed Oct 10 17:51:23 2012 (r241402) @@ -53,7 +53,8 @@ ata_sata_phy_check_events(device_t dev, struct ata_channel *ch = device_get_softc(dev); u_int32_t error, status; - ata_sata_scr_read(ch, port, ATA_SERROR, &error); + if (ata_sata_scr_read(ch, port, ATA_SERROR, &error)) + return; /* Check that SError value is sane. */ if (error == 0xffffffff) @@ -66,8 +67,9 @@ ata_sata_phy_check_events(device_t dev, /* if we have a connection event deal with it */ if ((error & ATA_SE_PHY_CHANGED) && (ch->pm_level == 0)) { if (bootverbose) { - ata_sata_scr_read(ch, port, ATA_SSTATUS, &status); - if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) && + if (ata_sata_scr_read(ch, port, ATA_SSTATUS, &status)) { + device_printf(dev, "PHYRDY change\n"); + } else if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) && ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) && ((status & ATA_SS_IPM_MASK) == ATA_SS_IPM_ACTIVE)) { device_printf(dev, "CONNECT requested\n"); From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 18:01:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AD768392; Wed, 10 Oct 2012 18:01:56 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94F2F8FC08; Wed, 10 Oct 2012 18:01:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AI1u1q074727; Wed, 10 Oct 2012 18:01:56 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AI1utf074723; Wed, 10 Oct 2012 18:01:56 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201210101801.q9AI1utf074723@svn.freebsd.org> From: Jim Harris Date: Wed, 10 Oct 2012 18:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241403 - head/sys/dev/isci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 18:01:56 -0000 Author: jimharris Date: Wed Oct 10 18:01:56 2012 New Revision: 241403 URL: http://svn.freebsd.org/changeset/base/241403 Log: Add support for locate LED. While here, change ISCI_LED to ISCI_PHY since conceptually the hardware ties the LEDs to a phy and the LEDs for a given phy cannot be controlled independently. Submitted by: Paul Maulberger (with modifications) Modified: head/sys/dev/isci/isci.c head/sys/dev/isci/isci.h head/sys/dev/isci/isci_controller.c Modified: head/sys/dev/isci/isci.c ============================================================================== --- head/sys/dev/isci/isci.c Wed Oct 10 17:51:23 2012 (r241402) +++ head/sys/dev/isci/isci.c Wed Oct 10 18:01:56 2012 (r241403) @@ -223,9 +223,13 @@ isci_detach(device_t device) if (controller->remote_device_memory != NULL) free(controller->remote_device_memory, M_ISCI); - for (phy = 0; phy < SCI_MAX_PHYS; phy++) - if (controller->led[phy].cdev) - led_destroy(controller->led[phy].cdev); + for (phy = 0; phy < SCI_MAX_PHYS; phy++) { + if (controller->phys[phy].cdev_fault) + led_destroy(controller->phys[phy].cdev_fault); + + if (controller->phys[phy].cdev_locate) + led_destroy(controller->phys[phy].cdev_locate); + } while (1) { sci_pool_get(controller->unmap_buffer_pool, unmap_buffer); Modified: head/sys/dev/isci/isci.h ============================================================================== --- head/sys/dev/isci/isci.h Wed Oct 10 17:51:23 2012 (r241402) +++ head/sys/dev/isci/isci.h Wed Oct 10 18:01:56 2012 (r241403) @@ -143,11 +143,14 @@ struct ISCI_INTERRUPT_INFO }; -struct ISCI_LED +struct ISCI_PHY { - struct cdev *cdev; + struct cdev *cdev_fault; + struct cdev *cdev_locate; SCI_CONTROLLER_HANDLE_T handle; int index; + int led_fault; + int led_locate; }; struct ISCI_CONTROLLER @@ -176,7 +179,7 @@ struct ISCI_CONTROLLER uint32_t queue_depth; uint32_t sim_queue_depth; SCI_FAST_LIST_T pending_device_reset_list; - struct ISCI_LED led[SCI_MAX_PHYS]; + struct ISCI_PHY phys[SCI_MAX_PHYS]; SCI_MEMORY_DESCRIPTOR_LIST_HANDLE_T mdl; Modified: head/sys/dev/isci/isci_controller.c ============================================================================== --- head/sys/dev/isci/isci_controller.c Wed Oct 10 17:51:23 2012 (r241402) +++ head/sys/dev/isci/isci_controller.c Wed Oct 10 18:01:56 2012 (r241403) @@ -274,12 +274,24 @@ void isci_controller_construct(struct IS sci_pool_initialize(controller->unmap_buffer_pool); } -static void isci_led_func(void *priv, int onoff) +static void isci_led_fault_func(void *priv, int onoff) { - struct ISCI_LED *led = priv; + struct ISCI_PHY *phy = priv; + + /* map onoff to the fault LED */ + phy->led_fault = onoff; + scic_sgpio_update_led_state(phy->handle, 1 << phy->index, + phy->led_fault, phy->led_locate, 0); +} + +static void isci_led_locate_func(void *priv, int onoff) +{ + struct ISCI_PHY *phy = priv; /* map onoff to the locate LED */ - scic_sgpio_update_led_state(led->handle, 1 << led->index, 0, onoff, 0); + phy->led_locate = onoff; + scic_sgpio_update_led_state(phy->handle, 1 << phy->index, + phy->led_fault, phy->led_locate, 0); } SCI_STATUS isci_controller_initialize(struct ISCI_CONTROLLER *controller) @@ -368,12 +380,20 @@ SCI_STATUS isci_controller_initialize(st mtx_unlock(&controller->lock); for (i = 0; i < SCI_MAX_PHYS; i++) { - controller->led[i].handle = scic_controller_handle; - controller->led[i].index = i; - sprintf(led_name, "isci.bus%d.port%d.locate", - controller->index, i); - controller->led[i].cdev = led_create(isci_led_func, - &controller->led[i], led_name); + controller->phys[i].handle = scic_controller_handle; + controller->phys[i].index = i; + + /* fault */ + controller->phys[i].led_fault = 0; + sprintf(led_name, "isci.bus%d.port%d.fault", controller->index, i); + controller->phys[i].cdev_fault = led_create(isci_led_fault_func, + &controller->phys[i], led_name); + + /* locate */ + controller->phys[i].led_locate = 0; + sprintf(led_name, "isci.bus%d.port%d.locate", controller->index, i); + controller->phys[i].cdev_locate = led_create(isci_led_locate_func, + &controller->phys[i], led_name); } return (scif_controller_initialize(controller->scif_controller_handle)); From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 18:10:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3CBDE7B2; Wed, 10 Oct 2012 18:10:12 +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 2449F8FC23; Wed, 10 Oct 2012 18:10:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AIABuK075787; Wed, 10 Oct 2012 18:10:11 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AIABh8075775; Wed, 10 Oct 2012 18:10:11 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210101810.q9AIABh8075775@svn.freebsd.org> From: Alexander Motin Date: Wed, 10 Oct 2012 18:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241404 - in head/sys/cam: ata scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 18:10:12 -0000 Author: mav Date: Wed Oct 10 18:10:11 2012 New Revision: 241404 URL: http://svn.freebsd.org/changeset/base/241404 Log: Remove 'periph == NULL' check from bunch of periph drivers. This condition can never be true as functions are called from single place and the checks just pollute the code and confuse Clang Static Analyzer. Modified: head/sys/cam/ata/ata_da.c head/sys/cam/ata/ata_pmp.c head/sys/cam/ata/ata_xpt.c head/sys/cam/scsi/scsi_cd.c head/sys/cam/scsi/scsi_ch.c head/sys/cam/scsi/scsi_da.c head/sys/cam/scsi/scsi_pass.c head/sys/cam/scsi/scsi_sa.c head/sys/cam/scsi/scsi_sg.c head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Wed Oct 10 18:01:56 2012 (r241403) +++ head/sys/cam/ata/ata_da.c Wed Oct 10 18:10:11 2012 (r241404) @@ -943,11 +943,6 @@ adaregister(struct cam_periph *periph, v int legacy_id, quirks; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf("adaregister: periph was NULL!!\n"); - return(CAM_REQ_CMP_ERR); - } - if (cgd == NULL) { printf("adaregister: no getdev CCB, can't register device\n"); return(CAM_REQ_CMP_ERR); Modified: head/sys/cam/ata/ata_pmp.c ============================================================================== --- head/sys/cam/ata/ata_pmp.c Wed Oct 10 18:01:56 2012 (r241403) +++ head/sys/cam/ata/ata_pmp.c Wed Oct 10 18:10:11 2012 (r241404) @@ -367,11 +367,6 @@ pmpregister(struct cam_periph *periph, v struct ccb_getdev *cgd; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf("pmpregister: periph was NULL!!\n"); - return(CAM_REQ_CMP_ERR); - } - if (cgd == NULL) { printf("pmpregister: no getdev CCB, can't register device\n"); return(CAM_REQ_CMP_ERR); Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Wed Oct 10 18:01:56 2012 (r241403) +++ head/sys/cam/ata/ata_xpt.c Wed Oct 10 18:10:11 2012 (r241404) @@ -224,11 +224,6 @@ proberegister(struct cam_periph *periph, probe_softc *softc; request_ccb = (union ccb *)arg; - if (periph == NULL) { - printf("proberegister: periph was NULL!!\n"); - return(CAM_REQ_CMP_ERR); - } - if (request_ccb == NULL) { printf("proberegister: no probe CCB, " "can't register device\n"); Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== --- head/sys/cam/scsi/scsi_cd.c Wed Oct 10 18:01:56 2012 (r241403) +++ head/sys/cam/scsi/scsi_cd.c Wed Oct 10 18:10:11 2012 (r241404) @@ -692,10 +692,6 @@ cdregister(struct cam_periph *periph, vo caddr_t match; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf("cdregister: periph was NULL!!\n"); - return(CAM_REQ_CMP_ERR); - } if (cgd == NULL) { printf("cdregister: no getdev CCB, can't register device\n"); return(CAM_REQ_CMP_ERR); Modified: head/sys/cam/scsi/scsi_ch.c ============================================================================== --- head/sys/cam/scsi/scsi_ch.c Wed Oct 10 18:01:56 2012 (r241403) +++ head/sys/cam/scsi/scsi_ch.c Wed Oct 10 18:10:11 2012 (r241404) @@ -324,11 +324,6 @@ chregister(struct cam_periph *periph, vo struct ccb_pathinq cpi; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf("chregister: periph was NULL!!\n"); - return(CAM_REQ_CMP_ERR); - } - if (cgd == NULL) { printf("chregister: no getdev CCB, can't register device\n"); return(CAM_REQ_CMP_ERR); Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Wed Oct 10 18:01:56 2012 (r241403) +++ head/sys/cam/scsi/scsi_da.c Wed Oct 10 18:10:11 2012 (r241404) @@ -1583,11 +1583,6 @@ daregister(struct cam_periph *periph, vo caddr_t match; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf("daregister: periph was NULL!!\n"); - return(CAM_REQ_CMP_ERR); - } - if (cgd == NULL) { printf("daregister: no getdev CCB, can't register device\n"); return(CAM_REQ_CMP_ERR); Modified: head/sys/cam/scsi/scsi_pass.c ============================================================================== --- head/sys/cam/scsi/scsi_pass.c Wed Oct 10 18:01:56 2012 (r241403) +++ head/sys/cam/scsi/scsi_pass.c Wed Oct 10 18:10:11 2012 (r241404) @@ -312,11 +312,6 @@ passregister(struct cam_periph *periph, int no_tags; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf("%s: periph was NULL!!\n", __func__); - return(CAM_REQ_CMP_ERR); - } - if (cgd == NULL) { printf("%s: no getdev CCB, can't register device\n", __func__); return(CAM_REQ_CMP_ERR); Modified: head/sys/cam/scsi/scsi_sa.c ============================================================================== --- head/sys/cam/scsi/scsi_sa.c Wed Oct 10 18:01:56 2012 (r241403) +++ head/sys/cam/scsi/scsi_sa.c Wed Oct 10 18:10:11 2012 (r241404) @@ -1445,11 +1445,6 @@ saregister(struct cam_periph *periph, vo int i; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf("saregister: periph was NULL!!\n"); - return (CAM_REQ_CMP_ERR); - } - if (cgd == NULL) { printf("saregister: no getdev CCB, can't register device\n"); return (CAM_REQ_CMP_ERR); Modified: head/sys/cam/scsi/scsi_sg.c ============================================================================== --- head/sys/cam/scsi/scsi_sg.c Wed Oct 10 18:01:56 2012 (r241403) +++ head/sys/cam/scsi/scsi_sg.c Wed Oct 10 18:10:11 2012 (r241404) @@ -261,11 +261,6 @@ sgregister(struct cam_periph *periph, vo int no_tags; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf("sgregister: periph was NULL!!\n"); - return (CAM_REQ_CMP_ERR); - } - if (cgd == NULL) { printf("sgregister: no getdev CCB, can't register device\n"); return (CAM_REQ_CMP_ERR); Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Wed Oct 10 18:01:56 2012 (r241403) +++ head/sys/cam/scsi/scsi_xpt.c Wed Oct 10 18:10:11 2012 (r241404) @@ -615,11 +615,6 @@ proberegister(struct cam_periph *periph, probe_softc *softc; request_ccb = (union ccb *)arg; - if (periph == NULL) { - printf("proberegister: periph was NULL!!\n"); - return(CAM_REQ_CMP_ERR); - } - if (request_ccb == NULL) { printf("proberegister: no probe CCB, " "can't register device\n"); From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 18:34:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7CE3B2B6; Wed, 10 Oct 2012 18:34:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 66B2C8FC0A; Wed, 10 Oct 2012 18:34:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AIYGmM079117; Wed, 10 Oct 2012 18:34:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AIYGsN079115; Wed, 10 Oct 2012 18:34:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210101834.q9AIYGsN079115@svn.freebsd.org> From: Alexander Motin Date: Wed, 10 Oct 2012 18:34:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241405 - head/sys/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 18:34:16 -0000 Author: mav Date: Wed Oct 10 18:34:15 2012 New Revision: 241405 URL: http://svn.freebsd.org/changeset/base/241405 Log: Really handle xpt_compile_path() error in xpt_bus_register() instead of print error message and probably crash just after it on NULL dereference. Found by: Clang Static Analyzer Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Wed Oct 10 18:10:11 2012 (r241404) +++ head/sys/cam/cam_xpt.c Wed Oct 10 18:34:15 2012 (r241405) @@ -3898,8 +3898,11 @@ xpt_bus_register(struct cam_sim *sim, de status = xpt_compile_path(path, /*periph*/NULL, sim->path_id, CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); - if (status != CAM_REQ_CMP) - printf("xpt_compile_path returned %d\n", status); + if (status != CAM_REQ_CMP) { + xpt_release_bus(new_bus); + free(path, M_CAMXPT); + return (CAM_RESRC_UNAVAIL); + } xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL); cpi.ccb_h.func_code = XPT_PATH_INQ; From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 19:06:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C0AF3A2; Wed, 10 Oct 2012 19:06:12 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F1E18FC16; Wed, 10 Oct 2012 19:06:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AJ6Cof083397; Wed, 10 Oct 2012 19:06:12 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AJ6CAI083391; Wed, 10 Oct 2012 19:06:12 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201210101906.q9AJ6CAI083391@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Wed, 10 Oct 2012 19:06:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241406 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 19:06:12 -0000 Author: melifaro Date: Wed Oct 10 19:06:11 2012 New Revision: 241406 URL: http://svn.freebsd.org/changeset/base/241406 Log: Do not check if found IPv4 rte is dynamic if net.inet.icmp.drop_redirect is enabled. This eliminates one mtx_lock() per each routing lookup thus improving performance in several cases (routing to directly connected interface or routing to default gateway). Icmp redirects should not be used to provide routing direction nowadays, even for end hosts. Routers should not use them too (and this is explicitly restricted in IPv6, see RFC 4861, clause 8.2). Current commit changes rnh_machaddr function to 'stock' rn_match (and back) for every AF_INET routing table in given VNET instance on drop_redirect sysctl change. This change is part of bigger patch eliminating rte locking. Sponsored by: Yandex LLC MFC after: 2 weeks Modified: head/sys/netinet/in_rmx.c head/sys/netinet/in_var.h head/sys/netinet/ip_icmp.c head/sys/netinet/ip_var.h Modified: head/sys/netinet/in_rmx.c ============================================================================== --- head/sys/netinet/in_rmx.c Wed Oct 10 18:34:15 2012 (r241405) +++ head/sys/netinet/in_rmx.c Wed Oct 10 19:06:11 2012 (r241406) @@ -58,6 +58,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include extern int in_inithead(void **head, int off); @@ -340,6 +342,13 @@ in_rtqdrain(void) VNET_LIST_RUNLOCK_NOSLEEP(); } +void +in_setmatchfunc(struct radix_node_head *rnh, int val) +{ + + rnh->rnh_matchaddr = (val != 0) ? rn_match : in_matroute; +} + static int _in_rt_was_here; /* * Initialize our routing tree. @@ -365,7 +374,7 @@ in_inithead(void **head, int off) rnh = *head; rnh->rnh_addaddr = in_addroute; - rnh->rnh_matchaddr = in_matroute; + in_setmatchfunc(rnh, V_drop_redirect); rnh->rnh_close = in_clsroute; if (_in_rt_was_here == 0 ) { callout_init(&V_rtq_timer, CALLOUT_MPSAFE); Modified: head/sys/netinet/in_var.h ============================================================================== --- head/sys/netinet/in_var.h Wed Oct 10 18:34:15 2012 (r241405) +++ head/sys/netinet/in_var.h Wed Oct 10 19:06:11 2012 (r241406) @@ -424,6 +424,7 @@ inm_acquire_locked(struct in_multi *inm) struct rtentry; struct route; struct ip_moptions; +struct radix_node_head; int imo_multi_filter(const struct ip_moptions *, const struct ifnet *, const struct sockaddr *, const struct sockaddr *); @@ -464,6 +465,7 @@ void in_rtredirect(struct sockaddr *, s struct sockaddr *, int, struct sockaddr *, u_int); int in_rtrequest(int, struct sockaddr *, struct sockaddr *, struct sockaddr *, int, struct rtentry **, u_int); +void in_setmatchfunc(struct radix_node_head *, int); #if 0 int in_rt_getifa(struct rt_addrinfo *, u_int fibnum); Modified: head/sys/netinet/ip_icmp.c ============================================================================== --- head/sys/netinet/ip_icmp.c Wed Oct 10 18:34:15 2012 (r241405) +++ head/sys/netinet/ip_icmp.c Wed Oct 10 19:06:11 2012 (r241406) @@ -108,11 +108,7 @@ SYSCTL_VNET_UINT(_net_inet_icmp, OID_AUT &VNET_NAME(icmpmaskfake), 0, "Fake reply to ICMP Address Mask Request packets."); -static VNET_DEFINE(int, drop_redirect) = 0; -#define V_drop_redirect VNET(drop_redirect) -SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, drop_redirect, CTLFLAG_RW, - &VNET_NAME(drop_redirect), 0, - "Ignore ICMP redirects"); +VNET_DEFINE(int, drop_redirect) = 0; static VNET_DEFINE(int, log_redirect) = 0; #define V_log_redirect VNET(log_redirect) @@ -157,6 +153,39 @@ static void icmp_send(struct mbuf *, str extern struct protosw inetsw[]; +static int +sysctl_net_icmp_drop_redir(SYSCTL_HANDLER_ARGS) +{ + int error, new; + int i; + struct radix_node_head *rnh; + + new = V_drop_redirect; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error == 0 && req->newptr) { + new = (new != 0) ? 1 : 0; + + if (new == V_drop_redirect) + return (0); + + for (i = 0; i < rt_numfibs; i++) { + if ((rnh = rt_tables_get_rnh(i, AF_INET)) == NULL) + continue; + RADIX_NODE_HEAD_LOCK(rnh); + in_setmatchfunc(rnh, new); + RADIX_NODE_HEAD_UNLOCK(rnh); + } + + V_drop_redirect = new; + } + + return (error); +} + +SYSCTL_VNET_PROC(_net_inet_icmp, OID_AUTO, drop_redirect, + CTLTYPE_INT|CTLFLAG_RW, 0, 0, + sysctl_net_icmp_drop_redir, "I", "Ignore ICMP redirects"); + /* * Kernel module interface for updating icmpstat. The argument is an index * into icmpstat treated as an array of u_long. While this encodes the Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Wed Oct 10 18:34:15 2012 (r241405) +++ head/sys/netinet/ip_var.h Wed Oct 10 19:06:11 2012 (r241406) @@ -188,6 +188,7 @@ VNET_DECLARE(struct socket *, ip_mrouter extern int (*legal_vif_num)(int); extern u_long (*ip_mcast_src)(int); VNET_DECLARE(int, rsvp_on); +VNET_DECLARE(int, drop_redirect); extern struct pr_usrreqs rip_usrreqs; #define V_ipstat VNET(ipstat) @@ -200,6 +201,7 @@ extern struct pr_usrreqs rip_usrreqs; #define V_ip_rsvpd VNET(ip_rsvpd) #define V_ip_mrouter VNET(ip_mrouter) #define V_rsvp_on VNET(rsvp_on) +#define V_drop_redirect VNET(drop_redirect) void inp_freemoptions(struct ip_moptions *); int inp_getmoptions(struct inpcb *, struct sockopt *); From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 19:07:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1C4A9301; Wed, 10 Oct 2012 19:07:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04F538FC08; Wed, 10 Oct 2012 19:07:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AJ7ulY083717; Wed, 10 Oct 2012 19:07:56 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AJ7uJB083715; Wed, 10 Oct 2012 19:07:56 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210101907.q9AJ7uJB083715@svn.freebsd.org> From: Dimitry Andric Date: Wed, 10 Oct 2012 19:07:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241407 - stable/9/contrib/llvm/tools/clang/lib/Driver X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 19:07:57 -0000 Author: dim Date: Wed Oct 10 19:07:56 2012 New Revision: 241407 URL: http://svn.freebsd.org/changeset/base/241407 Log: MFC r241163: Pull in r164717 from upstream clang trunk: Allow -MF to be used in combination with -E -M or -E -MM. This should help with building the lang/ghc port. Modified: stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Wed Oct 10 19:06:11 2012 (r241406) +++ stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Wed Oct 10 19:07:56 2012 (r241407) @@ -217,11 +217,11 @@ void Clang::AddPreprocessingOptions(Comp (A = Args.getLastArg(options::OPT_MMD))) { // Determine the output location. const char *DepFile; - if (Output.getType() == types::TY_Dependencies) { - DepFile = Output.getFilename(); - } else if (Arg *MF = Args.getLastArg(options::OPT_MF)) { + if (Arg *MF = Args.getLastArg(options::OPT_MF)) { DepFile = MF->getValue(Args); C.addFailureResultFile(DepFile); + } else if (Output.getType() == types::TY_Dependencies) { + DepFile = Output.getFilename(); } else if (A->getOption().matches(options::OPT_M) || A->getOption().matches(options::OPT_MM)) { DepFile = "-"; From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 19:08:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A5DFF47C; Wed, 10 Oct 2012 19:08:46 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C7A18FC08; Wed, 10 Oct 2012 19:08:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AJ8kaJ083861; Wed, 10 Oct 2012 19:08:46 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AJ8kAO083859; Wed, 10 Oct 2012 19:08:46 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201210101908.q9AJ8kAO083859@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 10 Oct 2012 19:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241408 - stable/9/lib/libc/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 19:08:46 -0000 Author: pfg Date: Wed Oct 10 19:08:46 2012 New Revision: 241408 URL: http://svn.freebsd.org/changeset/base/241408 Log: rpc: fix __rpc_getconfip __rpc_getconfip is supposed to return the first netconf entry supporting tcp or udp, respectively. The code will currently return the *last* entry, plus it will leak memory when there is more than one such entry. Tested by: David Wolfskill Obtained from: Bull GNU/linux NFSv4 Project (libtirpc) Modified: stable/9/lib/libc/rpc/rpc_generic.c Modified: stable/9/lib/libc/rpc/rpc_generic.c ============================================================================== --- stable/9/lib/libc/rpc/rpc_generic.c Wed Oct 10 19:07:56 2012 (r241407) +++ stable/9/lib/libc/rpc/rpc_generic.c Wed Oct 10 19:08:46 2012 (r241408) @@ -269,7 +269,8 @@ __rpc_getconfip(nettype) } while ((nconf = getnetconfig(confighandle)) != NULL) { if (strcmp(nconf->nc_protofmly, NC_INET) == 0) { - if (strcmp(nconf->nc_proto, NC_TCP) == 0) { + if (strcmp(nconf->nc_proto, NC_TCP) == 0 && + netid_tcp == NULL) { netid_tcp = strdup(nconf->nc_netid); if (main_thread) netid_tcp_main = netid_tcp; @@ -277,7 +278,8 @@ __rpc_getconfip(nettype) thr_setspecific(tcp_key, (void *) netid_tcp); } else - if (strcmp(nconf->nc_proto, NC_UDP) == 0) { + if (strcmp(nconf->nc_proto, NC_UDP) == 0 && + netid_udp == NULL) { netid_udp = strdup(nconf->nc_netid); if (main_thread) netid_udp_main = netid_udp; From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 19:27:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 35885A24; Wed, 10 Oct 2012 19:27:41 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1EBFC8FC17; Wed, 10 Oct 2012 19:27:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AJReww086315; Wed, 10 Oct 2012 19:27:40 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AJRer9086312; Wed, 10 Oct 2012 19:27:40 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201210101927.q9AJRer9086312@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 10 Oct 2012 19:27:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241409 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 19:27:41 -0000 Author: np Date: Wed Oct 10 19:27:40 2012 New Revision: 241409 URL: http://svn.freebsd.org/changeset/base/241409 Log: Add a driver ioctl to clear a port's MAC statistics. Submitted by: gnn@ MFC after: 3 days Modified: head/sys/dev/cxgbe/t4_ioctl.h head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_ioctl.h ============================================================================== --- head/sys/dev/cxgbe/t4_ioctl.h Wed Oct 10 19:08:46 2012 (r241408) +++ head/sys/dev/cxgbe/t4_ioctl.h Wed Oct 10 19:27:40 2012 (r241409) @@ -50,6 +50,7 @@ enum { T4_LOAD_FW, /* flash firmware */ T4_GET_MEM, /* read memory */ T4_GET_I2C, /* read from i2c addressible device */ + T4_CLEAR_STATS, /* clear a port's MAC statistics */ }; struct t4_reg { @@ -234,4 +235,5 @@ struct t4_mem_range { #define CHELSIO_T4_LOAD_FW _IOW('f', T4_LOAD_FW, struct t4_data) #define CHELSIO_T4_GET_MEM _IOW('f', T4_GET_MEM, struct t4_mem_range) #define CHELSIO_T4_GET_I2C _IOWR('f', T4_GET_I2C, struct t4_i2c_data) +#define CHELSIO_T4_CLEAR_STATS _IOW('f', T4_CLEAR_STATS, uint32_t) #endif Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Wed Oct 10 19:08:46 2012 (r241408) +++ head/sys/dev/cxgbe/t4_main.c Wed Oct 10 19:27:40 2012 (r241409) @@ -5400,6 +5400,15 @@ t4_ioctl(struct cdev *dev, unsigned long rc = read_i2c(sc, (struct t4_i2c_data *)data); ADAPTER_UNLOCK(sc); break; + case CHELSIO_T4_CLEAR_STATS: { + u_int port_id = *(uint32_t *)data; + + if (port_id >= sc->params.nports) + return (EINVAL); + + t4_clr_port_stats(sc, port_id); + break; + } default: rc = EINVAL; } From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 19:32:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 820C3C23; Wed, 10 Oct 2012 19:32:41 +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 6AEB88FC14; Wed, 10 Oct 2012 19:32:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AJWfHU087009; Wed, 10 Oct 2012 19:32:41 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AJWfI6087007; Wed, 10 Oct 2012 19:32:41 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210101932.q9AJWfI6087007@svn.freebsd.org> From: Alexander Motin Date: Wed, 10 Oct 2012 19:32:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241410 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 19:32:41 -0000 Author: mav Date: Wed Oct 10 19:32:40 2012 New Revision: 241410 URL: http://svn.freebsd.org/changeset/base/241410 Log: There are SCSI conditions that are not an errors. In those cases cderror() returns zero while request status is not CAM_REQ_CMP. That could cause partial device attach or other unexpected results. Found by: Clang Static Analyzer Modified: head/sys/cam/scsi/scsi_cd.c Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== --- head/sys/cam/scsi/scsi_cd.c Wed Oct 10 19:27:40 2012 (r241409) +++ head/sys/cam/scsi/scsi_cd.c Wed Oct 10 19:32:40 2012 (r241410) @@ -1741,6 +1741,7 @@ cddone(struct cam_periph *periph, union * bytes. */ struct cd_params *cdp; + int error; cdp = &softc->params; @@ -1749,28 +1750,26 @@ cddone(struct cam_periph *periph, union cdp->disksize = scsi_4btoul (rdcap->addr) + 1; cdp->blksize = scsi_4btoul (rdcap->length); - if ((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { + /* + * Retry any UNIT ATTENTION type errors. They + * are expected at boot. + */ + if ((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP || + (error = cderror(done_ccb, CAM_RETRY_SELTO, + SF_RETRY_UA | SF_NO_PRINT)) == 0) { snprintf(announce_buf, sizeof(announce_buf), "cd present [%lu x %lu byte records]", cdp->disksize, (u_long)cdp->blksize); } else { - int error; - /* - * Retry any UNIT ATTENTION type errors. They - * are expected at boot. - */ - error = cderror(done_ccb, CAM_RETRY_SELTO, - SF_RETRY_UA | SF_NO_PRINT); if (error == ERESTART) { /* * A retry was scheuled, so * just return. */ return; - } else if (error != 0) { - + } else { int asc, ascq; int sense_key, error_code; int have_sense; From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 19:42:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B5C6B1B4; Wed, 10 Oct 2012 19:42: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 9E21C8FC1A; Wed, 10 Oct 2012 19:42:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AJgbQ2088387; Wed, 10 Oct 2012 19:42:37 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AJgbe1088382; Wed, 10 Oct 2012 19:42:37 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210101942.q9AJgbe1088382@svn.freebsd.org> From: Xin LI Date: Wed, 10 Oct 2012 19:42:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r241411 - in vendor/bind9/dist: . bin/named X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 19:42:37 -0000 Author: delphij Date: Wed Oct 10 19:42:37 2012 New Revision: 241411 URL: http://svn.freebsd.org/changeset/base/241411 Log: Vendor import of BIND 9.8.3-P4. Modified: vendor/bind9/dist/CHANGES vendor/bind9/dist/bin/named/query.c vendor/bind9/dist/version Modified: vendor/bind9/dist/CHANGES ============================================================================== --- vendor/bind9/dist/CHANGES Wed Oct 10 19:32:40 2012 (r241410) +++ vendor/bind9/dist/CHANGES Wed Oct 10 19:42:37 2012 (r241411) @@ -1,3 +1,9 @@ + --- 9.8.3-P4 released --- + +3383. [security] A certain combination of records in the RBT could + cause named to hang while populating the additional + section of a response. [RT #31090] + --- 9.8.3-P3 released --- 3364. [security] Named could die on specially crafted record. Modified: vendor/bind9/dist/bin/named/query.c ============================================================================== --- vendor/bind9/dist/bin/named/query.c Wed Oct 10 19:32:40 2012 (r241410) +++ vendor/bind9/dist/bin/named/query.c Wed Oct 10 19:42:37 2012 (r241411) @@ -1119,13 +1119,6 @@ query_isduplicate(ns_client_t *client, d mname = NULL; } - /* - * If the dns_name_t we're looking up is already in the message, - * we don't want to trigger the caller's name replacement logic. - */ - if (name == mname) - mname = NULL; - if (mnamep != NULL) *mnamep = mname; @@ -1324,6 +1317,7 @@ query_addadditional(void *arg, dns_name_ if (dns_rdataset_isassociated(rdataset) && !query_isduplicate(client, fname, type, &mname)) { if (mname != NULL) { + INSIST(mname != fname); query_releasename(client, &fname); fname = mname; } else @@ -1393,11 +1387,13 @@ query_addadditional(void *arg, dns_name_ #endif if (!query_isduplicate(client, fname, dns_rdatatype_a, &mname)) { - if (mname != NULL) { - query_releasename(client, &fname); - fname = mname; - } else - need_addname = ISC_TRUE; + if (mname != fname) { + if (mname != NULL) { + query_releasename(client, &fname); + fname = mname; + } else + need_addname = ISC_TRUE; + } ISC_LIST_APPEND(fname->list, rdataset, link); added_something = ISC_TRUE; if (sigrdataset != NULL && @@ -1450,11 +1446,13 @@ query_addadditional(void *arg, dns_name_ #endif if (!query_isduplicate(client, fname, dns_rdatatype_aaaa, &mname)) { - if (mname != NULL) { - query_releasename(client, &fname); - fname = mname; - } else - need_addname = ISC_TRUE; + if (mname != fname) { + if (mname != NULL) { + query_releasename(client, &fname); + fname = mname; + } else + need_addname = ISC_TRUE; + } ISC_LIST_APPEND(fname->list, rdataset, link); added_something = ISC_TRUE; if (sigrdataset != NULL && @@ -1977,22 +1975,24 @@ query_addadditional2(void *arg, dns_name crdataset->type == dns_rdatatype_aaaa) { if (!query_isduplicate(client, fname, crdataset->type, &mname)) { - if (mname != NULL) { - /* - * A different type of this name is - * already stored in the additional - * section. We'll reuse the name. - * Note that this should happen at most - * once. Otherwise, fname->link could - * leak below. - */ - INSIST(mname0 == NULL); - - query_releasename(client, &fname); - fname = mname; - mname0 = mname; - } else - need_addname = ISC_TRUE; + if (mname != fname) { + if (mname != NULL) { + /* + * A different type of this name is + * already stored in the additional + * section. We'll reuse the name. + * Note that this should happen at most + * once. Otherwise, fname->link could + * leak below. + */ + INSIST(mname0 == NULL); + + query_releasename(client, &fname); + fname = mname; + mname0 = mname; + } else + need_addname = ISC_TRUE; + } ISC_LIST_UNLINK(cfname.list, crdataset, link); ISC_LIST_APPEND(fname->list, crdataset, link); added_something = ISC_TRUE; Modified: vendor/bind9/dist/version ============================================================================== --- vendor/bind9/dist/version Wed Oct 10 19:32:40 2012 (r241410) +++ vendor/bind9/dist/version Wed Oct 10 19:42:37 2012 (r241411) @@ -7,4 +7,4 @@ MAJORVER=9 MINORVER=8 PATCHVER=3 RELEASETYPE=-P -RELEASEVER=3 +RELEASEVER=4 From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 19:43:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F34004BD; Wed, 10 Oct 2012 19:43:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3D308FC14; Wed, 10 Oct 2012 19:43:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AJhjx3088562; Wed, 10 Oct 2012 19:43:45 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AJhjlA088561; Wed, 10 Oct 2012 19:43:45 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210101943.q9AJhjlA088561@svn.freebsd.org> From: Xin LI Date: Wed, 10 Oct 2012 19:43:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r241412 - vendor/bind9/9.8.3-P4 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 19:43:46 -0000 Author: delphij Date: Wed Oct 10 19:43:45 2012 New Revision: 241412 URL: http://svn.freebsd.org/changeset/base/241412 Log: Tag the 9.8.3-P4 release. Added: vendor/bind9/9.8.3-P4/ - copied from r241411, vendor/bind9/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 19:46:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2F76A696; Wed, 10 Oct 2012 19:46:47 +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 180698FC0A; Wed, 10 Oct 2012 19:46:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AJkklg089027; Wed, 10 Oct 2012 19:46:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AJkkvx089025; Wed, 10 Oct 2012 19:46:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210101946.q9AJkkvx089025@svn.freebsd.org> From: Alexander Motin Date: Wed, 10 Oct 2012 19:46:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241413 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 19:46:47 -0000 Author: mav Date: Wed Oct 10 19:46:46 2012 New Revision: 241413 URL: http://svn.freebsd.org/changeset/base/241413 Log: panic() with reasonable message instead of returning zero frequency causing division by zero later if event timer's minimal period is above one second. For now it is just a theoretical possibility. Found by: Clang Static Analyzer Modified: head/sys/kern/kern_clocksource.c Modified: head/sys/kern/kern_clocksource.c ============================================================================== --- head/sys/kern/kern_clocksource.c Wed Oct 10 19:43:45 2012 (r241412) +++ head/sys/kern/kern_clocksource.c Wed Oct 10 19:46:46 2012 (r241413) @@ -602,7 +602,8 @@ round_freq(struct eventtimer *et, int fr freq = (et->et_frequency + div / 2) / div; } if (et->et_min_period.sec > 0) - freq = 0; + panic("Event timer \"%s\" doesn't support sub-second periods!", + et->et_name); else if (et->et_min_period.frac != 0) freq = min(freq, BT2FREQ(&et->et_min_period)); if (et->et_max_period.sec == 0 && et->et_max_period.frac != 0) From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 19:47:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EF529813; Wed, 10 Oct 2012 19:47:52 +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 D76B18FC08; Wed, 10 Oct 2012 19:47:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AJlqZD089209; Wed, 10 Oct 2012 19:47:52 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AJlqQf089205; Wed, 10 Oct 2012 19:47:52 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210101947.q9AJlqQf089205@svn.freebsd.org> From: Xin LI Date: Wed, 10 Oct 2012 19:47:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241414 - in head/contrib/bind9: . bin/named X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 19:47:53 -0000 Author: delphij Date: Wed Oct 10 19:47:52 2012 New Revision: 241414 URL: http://svn.freebsd.org/changeset/base/241414 Log: Upgrade to 9.8.3-P4: Prevents a lockup when queried a deliberately constructed combination of records. [CVE-2012-5166] For more information: https://kb.isc.org/article/AA-00801 Modified: head/contrib/bind9/CHANGES head/contrib/bind9/bin/named/query.c head/contrib/bind9/version Directory Properties: head/contrib/bind9/ (props changed) Modified: head/contrib/bind9/CHANGES ============================================================================== --- head/contrib/bind9/CHANGES Wed Oct 10 19:46:46 2012 (r241413) +++ head/contrib/bind9/CHANGES Wed Oct 10 19:47:52 2012 (r241414) @@ -1,3 +1,9 @@ + --- 9.8.3-P4 released --- + +3383. [security] A certain combination of records in the RBT could + cause named to hang while populating the additional + section of a response. [RT #31090] + --- 9.8.3-P3 released --- 3364. [security] Named could die on specially crafted record. Modified: head/contrib/bind9/bin/named/query.c ============================================================================== --- head/contrib/bind9/bin/named/query.c Wed Oct 10 19:46:46 2012 (r241413) +++ head/contrib/bind9/bin/named/query.c Wed Oct 10 19:47:52 2012 (r241414) @@ -1119,13 +1119,6 @@ query_isduplicate(ns_client_t *client, d mname = NULL; } - /* - * If the dns_name_t we're looking up is already in the message, - * we don't want to trigger the caller's name replacement logic. - */ - if (name == mname) - mname = NULL; - if (mnamep != NULL) *mnamep = mname; @@ -1324,6 +1317,7 @@ query_addadditional(void *arg, dns_name_ if (dns_rdataset_isassociated(rdataset) && !query_isduplicate(client, fname, type, &mname)) { if (mname != NULL) { + INSIST(mname != fname); query_releasename(client, &fname); fname = mname; } else @@ -1393,11 +1387,13 @@ query_addadditional(void *arg, dns_name_ #endif if (!query_isduplicate(client, fname, dns_rdatatype_a, &mname)) { - if (mname != NULL) { - query_releasename(client, &fname); - fname = mname; - } else - need_addname = ISC_TRUE; + if (mname != fname) { + if (mname != NULL) { + query_releasename(client, &fname); + fname = mname; + } else + need_addname = ISC_TRUE; + } ISC_LIST_APPEND(fname->list, rdataset, link); added_something = ISC_TRUE; if (sigrdataset != NULL && @@ -1450,11 +1446,13 @@ query_addadditional(void *arg, dns_name_ #endif if (!query_isduplicate(client, fname, dns_rdatatype_aaaa, &mname)) { - if (mname != NULL) { - query_releasename(client, &fname); - fname = mname; - } else - need_addname = ISC_TRUE; + if (mname != fname) { + if (mname != NULL) { + query_releasename(client, &fname); + fname = mname; + } else + need_addname = ISC_TRUE; + } ISC_LIST_APPEND(fname->list, rdataset, link); added_something = ISC_TRUE; if (sigrdataset != NULL && @@ -1977,22 +1975,24 @@ query_addadditional2(void *arg, dns_name crdataset->type == dns_rdatatype_aaaa) { if (!query_isduplicate(client, fname, crdataset->type, &mname)) { - if (mname != NULL) { - /* - * A different type of this name is - * already stored in the additional - * section. We'll reuse the name. - * Note that this should happen at most - * once. Otherwise, fname->link could - * leak below. - */ - INSIST(mname0 == NULL); - - query_releasename(client, &fname); - fname = mname; - mname0 = mname; - } else - need_addname = ISC_TRUE; + if (mname != fname) { + if (mname != NULL) { + /* + * A different type of this name is + * already stored in the additional + * section. We'll reuse the name. + * Note that this should happen at most + * once. Otherwise, fname->link could + * leak below. + */ + INSIST(mname0 == NULL); + + query_releasename(client, &fname); + fname = mname; + mname0 = mname; + } else + need_addname = ISC_TRUE; + } ISC_LIST_UNLINK(cfname.list, crdataset, link); ISC_LIST_APPEND(fname->list, crdataset, link); added_something = ISC_TRUE; Modified: head/contrib/bind9/version ============================================================================== --- head/contrib/bind9/version Wed Oct 10 19:46:46 2012 (r241413) +++ head/contrib/bind9/version Wed Oct 10 19:47:52 2012 (r241414) @@ -7,4 +7,4 @@ MAJORVER=9 MINORVER=8 PATCHVER=3 RELEASETYPE=-P -RELEASEVER=3 +RELEASEVER=4 From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 19:50:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CF20D9C7; Wed, 10 Oct 2012 19:50:15 +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 AEAE08FC19; Wed, 10 Oct 2012 19:50:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AJoFd9089569; Wed, 10 Oct 2012 19:50:15 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AJoFTu089564; Wed, 10 Oct 2012 19:50:15 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210101950.q9AJoFTu089564@svn.freebsd.org> From: Xin LI Date: Wed, 10 Oct 2012 19:50:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241415 - in stable/9/contrib/bind9: . bin/named X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 19:50:15 -0000 Author: delphij Date: Wed Oct 10 19:50:15 2012 New Revision: 241415 URL: http://svn.freebsd.org/changeset/base/241415 Log: MFC r241414: Upgrade to 9.8.3-P4: Prevents a lockup when queried a deliberately constructed combination of records. [CVE-2012-5166] For more information: https://kb.isc.org/article/AA-00801 Modified: stable/9/contrib/bind9/CHANGES stable/9/contrib/bind9/bin/named/query.c stable/9/contrib/bind9/version Directory Properties: stable/9/contrib/bind9/ (props changed) Modified: stable/9/contrib/bind9/CHANGES ============================================================================== --- stable/9/contrib/bind9/CHANGES Wed Oct 10 19:47:52 2012 (r241414) +++ stable/9/contrib/bind9/CHANGES Wed Oct 10 19:50:15 2012 (r241415) @@ -1,3 +1,9 @@ + --- 9.8.3-P4 released --- + +3383. [security] A certain combination of records in the RBT could + cause named to hang while populating the additional + section of a response. [RT #31090] + --- 9.8.3-P3 released --- 3364. [security] Named could die on specially crafted record. Modified: stable/9/contrib/bind9/bin/named/query.c ============================================================================== --- stable/9/contrib/bind9/bin/named/query.c Wed Oct 10 19:47:52 2012 (r241414) +++ stable/9/contrib/bind9/bin/named/query.c Wed Oct 10 19:50:15 2012 (r241415) @@ -1119,13 +1119,6 @@ query_isduplicate(ns_client_t *client, d mname = NULL; } - /* - * If the dns_name_t we're looking up is already in the message, - * we don't want to trigger the caller's name replacement logic. - */ - if (name == mname) - mname = NULL; - if (mnamep != NULL) *mnamep = mname; @@ -1324,6 +1317,7 @@ query_addadditional(void *arg, dns_name_ if (dns_rdataset_isassociated(rdataset) && !query_isduplicate(client, fname, type, &mname)) { if (mname != NULL) { + INSIST(mname != fname); query_releasename(client, &fname); fname = mname; } else @@ -1393,11 +1387,13 @@ query_addadditional(void *arg, dns_name_ #endif if (!query_isduplicate(client, fname, dns_rdatatype_a, &mname)) { - if (mname != NULL) { - query_releasename(client, &fname); - fname = mname; - } else - need_addname = ISC_TRUE; + if (mname != fname) { + if (mname != NULL) { + query_releasename(client, &fname); + fname = mname; + } else + need_addname = ISC_TRUE; + } ISC_LIST_APPEND(fname->list, rdataset, link); added_something = ISC_TRUE; if (sigrdataset != NULL && @@ -1450,11 +1446,13 @@ query_addadditional(void *arg, dns_name_ #endif if (!query_isduplicate(client, fname, dns_rdatatype_aaaa, &mname)) { - if (mname != NULL) { - query_releasename(client, &fname); - fname = mname; - } else - need_addname = ISC_TRUE; + if (mname != fname) { + if (mname != NULL) { + query_releasename(client, &fname); + fname = mname; + } else + need_addname = ISC_TRUE; + } ISC_LIST_APPEND(fname->list, rdataset, link); added_something = ISC_TRUE; if (sigrdataset != NULL && @@ -1977,22 +1975,24 @@ query_addadditional2(void *arg, dns_name crdataset->type == dns_rdatatype_aaaa) { if (!query_isduplicate(client, fname, crdataset->type, &mname)) { - if (mname != NULL) { - /* - * A different type of this name is - * already stored in the additional - * section. We'll reuse the name. - * Note that this should happen at most - * once. Otherwise, fname->link could - * leak below. - */ - INSIST(mname0 == NULL); - - query_releasename(client, &fname); - fname = mname; - mname0 = mname; - } else - need_addname = ISC_TRUE; + if (mname != fname) { + if (mname != NULL) { + /* + * A different type of this name is + * already stored in the additional + * section. We'll reuse the name. + * Note that this should happen at most + * once. Otherwise, fname->link could + * leak below. + */ + INSIST(mname0 == NULL); + + query_releasename(client, &fname); + fname = mname; + mname0 = mname; + } else + need_addname = ISC_TRUE; + } ISC_LIST_UNLINK(cfname.list, crdataset, link); ISC_LIST_APPEND(fname->list, crdataset, link); added_something = ISC_TRUE; Modified: stable/9/contrib/bind9/version ============================================================================== --- stable/9/contrib/bind9/version Wed Oct 10 19:47:52 2012 (r241414) +++ stable/9/contrib/bind9/version Wed Oct 10 19:50:15 2012 (r241415) @@ -7,4 +7,4 @@ MAJORVER=9 MINORVER=8 PATCHVER=3 RELEASETYPE=-P -RELEASEVER=3 +RELEASEVER=4 From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 20:09:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5AA51617; Wed, 10 Oct 2012 20:09:20 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43F518FC12; Wed, 10 Oct 2012 20:09:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AK9KpQ092195; Wed, 10 Oct 2012 20:09:20 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AK9KZr092193; Wed, 10 Oct 2012 20:09:20 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201210102009.q9AK9KZr092193@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 10 Oct 2012 20:09:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241416 - head/tools/tools/cxgbetool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 20:09:20 -0000 Author: np Date: Wed Oct 10 20:09:19 2012 New Revision: 241416 URL: http://svn.freebsd.org/changeset/base/241416 Log: Add a "clearstats" subcommand to cxgbetool that lets you clear the MAC statistics for any port. For example: # cxgbetool t4nex0 clearstats 0 Submitted by: gnn@ MFC after: 3 days Modified: head/tools/tools/cxgbetool/cxgbetool.c Modified: head/tools/tools/cxgbetool/cxgbetool.c ============================================================================== --- head/tools/tools/cxgbetool/cxgbetool.c Wed Oct 10 19:50:15 2012 (r241415) +++ head/tools/tools/cxgbetool/cxgbetool.c Wed Oct 10 20:09:19 2012 (r241416) @@ -82,6 +82,7 @@ usage(FILE *fp) { fprintf(fp, "Usage: %s [operation]\n", progname); fprintf(fp, + "\tclearstats clear port statistics\n" "\tcontext show an SGE context\n" "\tfilter [ ] ... set a filter\n" "\tfilter delete|clear delete a filter\n" @@ -1578,6 +1579,28 @@ read_i2c(int argc, const char *argv[]) } static int +clearstats(int argc, const char *argv[]) +{ + char *p; + long l; + uint32_t port; + + if (argc != 1) { + warnx("incorrect number of arguments."); + return (EINVAL); + } + + p = str_to_number(argv[0], &l, NULL); + if (*p) { + warnx("invalid port id \"%s\"", argv[0]); + return (EINVAL); + } + port = l; + + return doit(CHELSIO_T4_CLEAR_STATS, &port); +} + +static int run_cmd(int argc, const char *argv[]) { int rc = -1; @@ -1605,6 +1628,8 @@ run_cmd(int argc, const char *argv[]) rc = read_tcb(argc, argv); else if (!strcmp(cmd, "i2c")) rc = read_i2c(argc, argv); + else if (!strcmp(cmd, "clearstats")) + rc = clearstats(argc, argv); else { rc = EINVAL; warnx("invalid command \"%s\"", cmd); From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 20:37:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 92A27F56; Wed, 10 Oct 2012 20:37:58 +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 7221E8FC08; Wed, 10 Oct 2012 20:37:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AKbw5T095918; Wed, 10 Oct 2012 20:37:58 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AKbwk0095914; Wed, 10 Oct 2012 20:37:58 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210102037.q9AKbwk0095914@svn.freebsd.org> From: Xin LI Date: Wed, 10 Oct 2012 20:37:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r241417 - in releng/9.1/contrib/bind9: . bin/named X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 20:37:58 -0000 Author: delphij Date: Wed Oct 10 20:37:57 2012 New Revision: 241417 URL: http://svn.freebsd.org/changeset/base/241417 Log: MFC r241414: Upgrade to 9.8.3-P4: Prevents a lockup when queried a deliberately constructed combination of records. [CVE-2012-5166] For more information: https://kb.isc.org/article/AA-00801 Approved by: re (kib) Modified: releng/9.1/contrib/bind9/CHANGES releng/9.1/contrib/bind9/bin/named/query.c releng/9.1/contrib/bind9/version Directory Properties: releng/9.1/contrib/bind9/ (props changed) Modified: releng/9.1/contrib/bind9/CHANGES ============================================================================== --- releng/9.1/contrib/bind9/CHANGES Wed Oct 10 20:09:19 2012 (r241416) +++ releng/9.1/contrib/bind9/CHANGES Wed Oct 10 20:37:57 2012 (r241417) @@ -1,3 +1,9 @@ + --- 9.8.3-P4 released --- + +3383. [security] A certain combination of records in the RBT could + cause named to hang while populating the additional + section of a response. [RT #31090] + --- 9.8.3-P3 released --- 3364. [security] Named could die on specially crafted record. Modified: releng/9.1/contrib/bind9/bin/named/query.c ============================================================================== --- releng/9.1/contrib/bind9/bin/named/query.c Wed Oct 10 20:09:19 2012 (r241416) +++ releng/9.1/contrib/bind9/bin/named/query.c Wed Oct 10 20:37:57 2012 (r241417) @@ -1119,13 +1119,6 @@ query_isduplicate(ns_client_t *client, d mname = NULL; } - /* - * If the dns_name_t we're looking up is already in the message, - * we don't want to trigger the caller's name replacement logic. - */ - if (name == mname) - mname = NULL; - if (mnamep != NULL) *mnamep = mname; @@ -1324,6 +1317,7 @@ query_addadditional(void *arg, dns_name_ if (dns_rdataset_isassociated(rdataset) && !query_isduplicate(client, fname, type, &mname)) { if (mname != NULL) { + INSIST(mname != fname); query_releasename(client, &fname); fname = mname; } else @@ -1393,11 +1387,13 @@ query_addadditional(void *arg, dns_name_ #endif if (!query_isduplicate(client, fname, dns_rdatatype_a, &mname)) { - if (mname != NULL) { - query_releasename(client, &fname); - fname = mname; - } else - need_addname = ISC_TRUE; + if (mname != fname) { + if (mname != NULL) { + query_releasename(client, &fname); + fname = mname; + } else + need_addname = ISC_TRUE; + } ISC_LIST_APPEND(fname->list, rdataset, link); added_something = ISC_TRUE; if (sigrdataset != NULL && @@ -1450,11 +1446,13 @@ query_addadditional(void *arg, dns_name_ #endif if (!query_isduplicate(client, fname, dns_rdatatype_aaaa, &mname)) { - if (mname != NULL) { - query_releasename(client, &fname); - fname = mname; - } else - need_addname = ISC_TRUE; + if (mname != fname) { + if (mname != NULL) { + query_releasename(client, &fname); + fname = mname; + } else + need_addname = ISC_TRUE; + } ISC_LIST_APPEND(fname->list, rdataset, link); added_something = ISC_TRUE; if (sigrdataset != NULL && @@ -1977,22 +1975,24 @@ query_addadditional2(void *arg, dns_name crdataset->type == dns_rdatatype_aaaa) { if (!query_isduplicate(client, fname, crdataset->type, &mname)) { - if (mname != NULL) { - /* - * A different type of this name is - * already stored in the additional - * section. We'll reuse the name. - * Note that this should happen at most - * once. Otherwise, fname->link could - * leak below. - */ - INSIST(mname0 == NULL); - - query_releasename(client, &fname); - fname = mname; - mname0 = mname; - } else - need_addname = ISC_TRUE; + if (mname != fname) { + if (mname != NULL) { + /* + * A different type of this name is + * already stored in the additional + * section. We'll reuse the name. + * Note that this should happen at most + * once. Otherwise, fname->link could + * leak below. + */ + INSIST(mname0 == NULL); + + query_releasename(client, &fname); + fname = mname; + mname0 = mname; + } else + need_addname = ISC_TRUE; + } ISC_LIST_UNLINK(cfname.list, crdataset, link); ISC_LIST_APPEND(fname->list, crdataset, link); added_something = ISC_TRUE; Modified: releng/9.1/contrib/bind9/version ============================================================================== --- releng/9.1/contrib/bind9/version Wed Oct 10 20:09:19 2012 (r241416) +++ releng/9.1/contrib/bind9/version Wed Oct 10 20:37:57 2012 (r241417) @@ -7,4 +7,4 @@ MAJORVER=9 MINORVER=8 PATCHVER=3 RELEASETYPE=-P -RELEASEVER=3 +RELEASEVER=4 From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 20:41:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5B4C5125; Wed, 10 Oct 2012 20:41:38 +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 45E518FC0C; Wed, 10 Oct 2012 20:41:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AKfcaK096460; Wed, 10 Oct 2012 20:41:38 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AKfc6R096458; Wed, 10 Oct 2012 20:41:38 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210102041.q9AKfc6R096458@svn.freebsd.org> From: Alexander Motin Date: Wed, 10 Oct 2012 20:41:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241418 - head/sys/geom/raid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 20:41:38 -0000 Author: mav Date: Wed Oct 10 20:41:37 2012 New Revision: 241418 URL: http://svn.freebsd.org/changeset/base/241418 Log: NULL-ify last previously used pointer instead of last possible pointer. This should be only a cosmetic change. Found by: Clang Static Analyzer Modified: head/sys/geom/raid/md_promise.c Modified: head/sys/geom/raid/md_promise.c ============================================================================== --- head/sys/geom/raid/md_promise.c Wed Oct 10 20:37:57 2012 (r241417) +++ head/sys/geom/raid/md_promise.c Wed Oct 10 20:41:37 2012 (r241418) @@ -544,7 +544,7 @@ g_raid_md_promise_purge_disks(struct g_r free(pd->pd_meta[i], M_MD_PROMISE); for (j = i; j < pd->pd_subdisks - 1; j++) pd->pd_meta[j] = pd->pd_meta[j + 1]; - pd->pd_meta[PROMISE_MAX_SUBDISKS - 1] = NULL; + pd->pd_meta[pd->pd_subdisks - 1] = NULL; pd->pd_subdisks--; pd->pd_updated = 1; } @@ -650,7 +650,7 @@ g_raid_md_promise_start_disk(struct g_ra free(pd->pd_meta[sdn], M_MD_PROMISE); for (i = sdn; i < pd->pd_subdisks - 1; i++) pd->pd_meta[i] = pd->pd_meta[i + 1]; - pd->pd_meta[PROMISE_MAX_SUBDISKS - 1] = NULL; + pd->pd_meta[pd->pd_subdisks - 1] = NULL; pd->pd_subdisks--; } /* If we are in the start process, that's all for now. */ @@ -1094,7 +1094,7 @@ g_raid_md_taste_promise(struct g_raid_md free(metaarr[i], M_MD_PROMISE); for (j = i; j < subdisks - 1; j++) metaarr[i] = metaarr[j + 1]; - metaarr[PROMISE_MAX_SUBDISKS - 1] = NULL; + metaarr[subdisks - 1] = NULL; subdisks--; } From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 21:20:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 21063E6F; Wed, 10 Oct 2012 21:20:35 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 08F788FC0C; Wed, 10 Oct 2012 21:20:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9ALKYEt003829; Wed, 10 Oct 2012 21:20:34 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9ALKY8k003817; Wed, 10 Oct 2012 21:20:34 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210102120.q9ALKY8k003817@svn.freebsd.org> From: Eitan Adler Date: Wed, 10 Oct 2012 21:20:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241419 - stable/8/usr.bin/procstat X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 21:20:35 -0000 Author: eadler Date: Wed Oct 10 21:20:34 2012 New Revision: 241419 URL: http://svn.freebsd.org/changeset/base/241419 Log: MFC r241117: add SG state type PR: bin/171664 Approved by: cperciva (implicit) Modified: stable/8/usr.bin/procstat/procstat.1 Directory Properties: stable/8/usr.bin/procstat/ (props changed) Modified: stable/8/usr.bin/procstat/procstat.1 ============================================================================== --- stable/8/usr.bin/procstat/procstat.1 Wed Oct 10 20:41:37 2012 (r241418) +++ stable/8/usr.bin/procstat/procstat.1 Wed Oct 10 21:20:34 2012 (r241419) @@ -378,6 +378,8 @@ default device .It ph physical +.It sg +scatter/gather .It sw swap .It vn From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 21:20:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 35A24E70; Wed, 10 Oct 2012 21:20:35 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1ED1D8FC12; Wed, 10 Oct 2012 21:20:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9ALKYcH003831; Wed, 10 Oct 2012 21:20:34 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9ALKYgG003820; Wed, 10 Oct 2012 21:20:34 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210102120.q9ALKYgG003820@svn.freebsd.org> From: Eitan Adler Date: Wed, 10 Oct 2012 21:20:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241420 - stable/9/usr.bin/procstat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 21:20:35 -0000 Author: eadler Date: Wed Oct 10 21:20:34 2012 New Revision: 241420 URL: http://svn.freebsd.org/changeset/base/241420 Log: MFC r241117: add SG state type PR: bin/171664 Approved by: cperciva (implicit) Modified: stable/9/usr.bin/procstat/procstat.1 Directory Properties: stable/9/usr.bin/procstat/ (props changed) Modified: stable/9/usr.bin/procstat/procstat.1 ============================================================================== --- stable/9/usr.bin/procstat/procstat.1 Wed Oct 10 21:20:34 2012 (r241419) +++ stable/9/usr.bin/procstat/procstat.1 Wed Oct 10 21:20:34 2012 (r241420) @@ -418,6 +418,8 @@ default device .It ph physical +.It sg +scatter/gather .It sw swap .It vn From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 21:20:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5606EE71; Wed, 10 Oct 2012 21:20:35 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F6338FC14; Wed, 10 Oct 2012 21:20:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9ALKZvK003839; Wed, 10 Oct 2012 21:20:35 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9ALKZdO003835; Wed, 10 Oct 2012 21:20:35 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210102120.q9ALKZdO003835@svn.freebsd.org> From: Eitan Adler Date: Wed, 10 Oct 2012 21:20:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r241421 - stable/7/usr.bin/procstat X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 21:20:35 -0000 Author: eadler Date: Wed Oct 10 21:20:34 2012 New Revision: 241421 URL: http://svn.freebsd.org/changeset/base/241421 Log: MFC r241117: add SG state type PR: bin/171664 Approved by: cperciva (implicit) Modified: stable/7/usr.bin/procstat/procstat.1 Directory Properties: stable/7/usr.bin/procstat/ (props changed) Modified: stable/7/usr.bin/procstat/procstat.1 ============================================================================== --- stable/7/usr.bin/procstat/procstat.1 Wed Oct 10 21:20:34 2012 (r241420) +++ stable/7/usr.bin/procstat/procstat.1 Wed Oct 10 21:20:34 2012 (r241421) @@ -315,6 +315,8 @@ default device .It ph physical +.It sg +scatter/gather .It sw swap .It vn From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 21:21:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 764F2324; Wed, 10 Oct 2012 21:21:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F70F8FC08; Wed, 10 Oct 2012 21:21:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9ALLsBF004086; Wed, 10 Oct 2012 21:21:54 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9ALLsmv004083; Wed, 10 Oct 2012 21:21:54 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210102121.q9ALLsmv004083@svn.freebsd.org> From: Eitan Adler Date: Wed, 10 Oct 2012 21:21:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241422 - stable/8/usr.bin/mktemp X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 21:21:54 -0000 Author: eadler Date: Wed Oct 10 21:21:53 2012 New Revision: 241422 URL: http://svn.freebsd.org/changeset/base/241422 Log: MFC r241118: Implement the Sun/GNU extension of using a default prefix when no arguments are supplied. Approved by: cperciva (implicit) Modified: stable/8/usr.bin/mktemp/mktemp.1 stable/8/usr.bin/mktemp/mktemp.c Directory Properties: stable/8/usr.bin/mktemp/ (props changed) Modified: stable/8/usr.bin/mktemp/mktemp.1 ============================================================================== --- stable/8/usr.bin/mktemp/mktemp.1 Wed Oct 10 21:20:34 2012 (r241421) +++ stable/8/usr.bin/mktemp/mktemp.1 Wed Oct 10 21:21:53 2012 (r241422) @@ -103,6 +103,14 @@ Care should be taken to ensure that it is appropriate to use an environment variable potentially supplied by the user. .Pp +If no arguments are passed or if only the +.Fl d +flag is passed +.Nm +behaves as if +.Fl t Li tmp +was supplied. +.Pp Any number of temporary files may be created in a single invocation, including one based on the internal template resulting from the .Fl t Modified: stable/8/usr.bin/mktemp/mktemp.c ============================================================================== --- stable/8/usr.bin/mktemp/mktemp.c Wed Oct 10 21:20:34 2012 (r241421) +++ stable/8/usr.bin/mktemp/mktemp.c Wed Oct 10 21:21:53 2012 (r241422) @@ -87,6 +87,11 @@ main(int argc, char **argv) argc -= optind; argv += optind; + if (!tflag && argc < 1) { + tflag = 1; + prefix = "tmp"; + } + if (tflag) { tmpdir = getenv("TMPDIR"); if (tmpdir == NULL) @@ -100,8 +105,6 @@ main(int argc, char **argv) else errx(1, "cannot generate template"); } - } else if (argc < 1) { - usage(); } /* generate all requested files */ From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 21:21:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CCEBA325; Wed, 10 Oct 2012 21:21:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5F728FC0A; Wed, 10 Oct 2012 21:21:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9ALLsGu004112; Wed, 10 Oct 2012 21:21:54 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9ALLs6q004107; Wed, 10 Oct 2012 21:21:54 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210102121.q9ALLs6q004107@svn.freebsd.org> From: Eitan Adler Date: Wed, 10 Oct 2012 21:21:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r241423 - stable/7/usr.bin/mktemp X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 21:21:54 -0000 Author: eadler Date: Wed Oct 10 21:21:54 2012 New Revision: 241423 URL: http://svn.freebsd.org/changeset/base/241423 Log: MFC r241118: Implement the Sun/GNU extension of using a default prefix when no arguments are supplied. Approved by: cperciva (implicit) Modified: stable/7/usr.bin/mktemp/mktemp.1 stable/7/usr.bin/mktemp/mktemp.c Directory Properties: stable/7/usr.bin/mktemp/ (props changed) Modified: stable/7/usr.bin/mktemp/mktemp.1 ============================================================================== --- stable/7/usr.bin/mktemp/mktemp.1 Wed Oct 10 21:21:53 2012 (r241422) +++ stable/7/usr.bin/mktemp/mktemp.1 Wed Oct 10 21:21:54 2012 (r241423) @@ -103,6 +103,14 @@ Care should be taken to ensure that it is appropriate to use an environment variable potentially supplied by the user. .Pp +If no arguments are passed or if only the +.Fl d +flag is passed +.Nm +behaves as if +.Fl t Li tmp +was supplied. +.Pp Any number of temporary files may be created in a single invocation, including one based on the internal template resulting from the .Fl t Modified: stable/7/usr.bin/mktemp/mktemp.c ============================================================================== --- stable/7/usr.bin/mktemp/mktemp.c Wed Oct 10 21:21:53 2012 (r241422) +++ stable/7/usr.bin/mktemp/mktemp.c Wed Oct 10 21:21:54 2012 (r241423) @@ -87,6 +87,11 @@ main(int argc, char **argv) argc -= optind; argv += optind; + if (!tflag && argc < 1) { + tflag = 1; + prefix = "tmp"; + } + if (tflag) { tmpdir = getenv("TMPDIR"); if (tmpdir == NULL) @@ -100,8 +105,6 @@ main(int argc, char **argv) else errx(1, "cannot generate template"); } - } else if (argc < 1) { - usage(); } /* generate all requested files */ From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 21:21:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 051B4326; Wed, 10 Oct 2012 21:21:55 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E1FAF8FC0C; Wed, 10 Oct 2012 21:21:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9ALLsVY004119; Wed, 10 Oct 2012 21:21:54 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9ALLsTv004114; Wed, 10 Oct 2012 21:21:54 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210102121.q9ALLsTv004114@svn.freebsd.org> From: Eitan Adler Date: Wed, 10 Oct 2012 21:21:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241424 - stable/9/usr.bin/mktemp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 21:21:55 -0000 Author: eadler Date: Wed Oct 10 21:21:54 2012 New Revision: 241424 URL: http://svn.freebsd.org/changeset/base/241424 Log: MFC r241118: Implement the Sun/GNU extension of using a default prefix when no arguments are supplied. Approved by: cperciva (implicit) Modified: stable/9/usr.bin/mktemp/mktemp.1 stable/9/usr.bin/mktemp/mktemp.c Directory Properties: stable/9/usr.bin/mktemp/ (props changed) Modified: stable/9/usr.bin/mktemp/mktemp.1 ============================================================================== --- stable/9/usr.bin/mktemp/mktemp.1 Wed Oct 10 21:21:54 2012 (r241423) +++ stable/9/usr.bin/mktemp/mktemp.1 Wed Oct 10 21:21:54 2012 (r241424) @@ -99,6 +99,14 @@ Care should be taken to ensure that it is appropriate to use an environment variable potentially supplied by the user. .Pp +If no arguments are passed or if only the +.Fl d +flag is passed +.Nm +behaves as if +.Fl t Li tmp +was supplied. +.Pp Any number of temporary files may be created in a single invocation, including one based on the internal template resulting from the .Fl t Modified: stable/9/usr.bin/mktemp/mktemp.c ============================================================================== --- stable/9/usr.bin/mktemp/mktemp.c Wed Oct 10 21:21:54 2012 (r241423) +++ stable/9/usr.bin/mktemp/mktemp.c Wed Oct 10 21:21:54 2012 (r241424) @@ -87,6 +87,11 @@ main(int argc, char **argv) argc -= optind; argv += optind; + if (!tflag && argc < 1) { + tflag = 1; + prefix = "tmp"; + } + if (tflag) { tmpdir = getenv("TMPDIR"); if (tmpdir == NULL) @@ -100,8 +105,6 @@ main(int argc, char **argv) else errx(1, "cannot generate template"); } - } else if (argc < 1) { - usage(); } /* generate all requested files */ From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 21:27:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8FB179D3; Wed, 10 Oct 2012 21:27:30 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 793688FC14; Wed, 10 Oct 2012 21:27:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9ALRUt9005054; Wed, 10 Oct 2012 21:27:30 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9ALRUiI005052; Wed, 10 Oct 2012 21:27:30 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210102127.q9ALRUiI005052@svn.freebsd.org> From: Eitan Adler Date: Wed, 10 Oct 2012 21:27:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241425 - stable/8/sys/kern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 21:27:30 -0000 Author: eadler Date: Wed Oct 10 21:27:29 2012 New Revision: 241425 URL: http://svn.freebsd.org/changeset/base/241425 Log: MFC r241119: Provide a generic way to disable devices at boot time PR: kern/119202 Approved by: cperciva (implicit) Modified: stable/8/sys/kern/subr_bus.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/subr_bus.c ============================================================================== --- stable/8/sys/kern/subr_bus.c Wed Oct 10 21:21:54 2012 (r241424) +++ stable/8/sys/kern/subr_bus.c Wed Oct 10 21:27:29 2012 (r241425) @@ -2759,6 +2759,13 @@ device_attach(device_t dev) { int error; + if (resource_disabled(dev->driver->name, dev->unit)) { + device_disable(dev); + if (bootverbose) + device_printf(dev, "disabled via hints entry\n"); + return (ENXIO); + } + device_sysctl_init(dev); if (!device_is_quiet(dev)) device_print_child(dev->parent, dev); From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 21:27:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 186669D4; Wed, 10 Oct 2012 21:27:31 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 021228FC16; Wed, 10 Oct 2012 21:27:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9ALRUrE005068; Wed, 10 Oct 2012 21:27:30 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9ALRUdq005066; Wed, 10 Oct 2012 21:27:30 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210102127.q9ALRUdq005066@svn.freebsd.org> From: Eitan Adler Date: Wed, 10 Oct 2012 21:27:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241426 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 21:27:31 -0000 Author: eadler Date: Wed Oct 10 21:27:30 2012 New Revision: 241426 URL: http://svn.freebsd.org/changeset/base/241426 Log: MFC r241119: Provide a generic way to disable devices at boot time PR: kern/119202 Approved by: cperciva (implicit) Modified: stable/9/sys/kern/subr_bus.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/subr_bus.c ============================================================================== --- stable/9/sys/kern/subr_bus.c Wed Oct 10 21:27:29 2012 (r241425) +++ stable/9/sys/kern/subr_bus.c Wed Oct 10 21:27:30 2012 (r241426) @@ -2752,6 +2752,13 @@ device_attach(device_t dev) { int error; + if (resource_disabled(dev->driver->name, dev->unit)) { + device_disable(dev); + if (bootverbose) + device_printf(dev, "disabled via hints entry\n"); + return (ENXIO); + } + device_sysctl_init(dev); if (!device_is_quiet(dev)) device_print_child(dev->parent, dev); From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 21:29:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6CAD5CC3; Wed, 10 Oct 2012 21:29:01 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 567288FC1C; Wed, 10 Oct 2012 21:29:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9ALT1Ri005299; Wed, 10 Oct 2012 21:29:01 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9ALT1sf005296; Wed, 10 Oct 2012 21:29:01 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210102129.q9ALT1sf005296@svn.freebsd.org> From: Dimitry Andric Date: Wed, 10 Oct 2012 21:29:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241427 - in head/contrib/llvm/lib: Support Target/X86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 21:29:01 -0000 Author: dim Date: Wed Oct 10 21:29:00 2012 New Revision: 241427 URL: http://svn.freebsd.org/changeset/base/241427 Log: Pull in r163710 from upstream llvm trunk: Add support for AMD Geode. MFC after: 3 days Modified: head/contrib/llvm/lib/Support/Host.cpp head/contrib/llvm/lib/Target/X86/X86.td Modified: head/contrib/llvm/lib/Support/Host.cpp ============================================================================== --- head/contrib/llvm/lib/Support/Host.cpp Wed Oct 10 21:27:30 2012 (r241426) +++ head/contrib/llvm/lib/Support/Host.cpp Wed Oct 10 21:29:00 2012 (r241427) @@ -303,6 +303,7 @@ std::string sys::getHostCPUName() { case 8: return "k6-2"; case 9: case 13: return "k6-3"; + case 10: return "geode"; default: return "pentium"; } case 6: Modified: head/contrib/llvm/lib/Target/X86/X86.td ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86.td Wed Oct 10 21:27:30 2012 (r241426) +++ head/contrib/llvm/lib/Target/X86/X86.td Wed Oct 10 21:29:00 2012 (r241427) @@ -227,6 +227,7 @@ def : Proc<"bdver2", [FeatureXO FeatureAES, FeaturePCLMUL, FeatureF16C, FeatureLZCNT, FeaturePOPCNT, FeatureBMI, FeatureFMA]>; +def : Proc<"geode", [Feature3DNowA]>; def : Proc<"winchip-c6", [FeatureMMX]>; def : Proc<"winchip2", [Feature3DNow]>; From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 21:30:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 95F1EE54; Wed, 10 Oct 2012 21:30:26 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DA188FC17; Wed, 10 Oct 2012 21:30:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9ALUQgi005551; Wed, 10 Oct 2012 21:30:26 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9ALUQaT005548; Wed, 10 Oct 2012 21:30:26 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210102130.q9ALUQaT005548@svn.freebsd.org> From: Eitan Adler Date: Wed, 10 Oct 2012 21:30:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241428 - stable/9/usr.sbin/ip6addrctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 21:30:26 -0000 Author: eadler Date: Wed Oct 10 21:30:26 2012 New Revision: 241428 URL: http://svn.freebsd.org/changeset/base/241428 Log: MFC r241134: Fix alignment related warnings reported by gcc Switch from old style arguments to modern C remove WARNS as a result tested with "make universe" Approved by: cperciva (implicit) Modified: stable/9/usr.sbin/ip6addrctl/Makefile stable/9/usr.sbin/ip6addrctl/ip6addrctl.c Directory Properties: stable/9/usr.sbin/ip6addrctl/ (props changed) Modified: stable/9/usr.sbin/ip6addrctl/Makefile ============================================================================== --- stable/9/usr.sbin/ip6addrctl/Makefile Wed Oct 10 21:29:00 2012 (r241427) +++ stable/9/usr.sbin/ip6addrctl/Makefile Wed Oct 10 21:30:26 2012 (r241428) @@ -3,6 +3,4 @@ PROG= ip6addrctl MAN= ip6addrctl.8 -WARNS?= 2 - .include Modified: stable/9/usr.sbin/ip6addrctl/ip6addrctl.c ============================================================================== --- stable/9/usr.sbin/ip6addrctl/ip6addrctl.c Wed Oct 10 21:29:00 2012 (r241427) +++ stable/9/usr.sbin/ip6addrctl/ip6addrctl.c Wed Oct 10 21:30:26 2012 (r241428) @@ -71,12 +71,10 @@ static void plen2mask(struct sockaddr_in static void set_policy(void); static void add_policy(char *, char *, char *); static void delete_policy(char *); -static void flush_policy(); +static void flush_policy(void); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { TAILQ_INIT(&policyhead); @@ -107,11 +105,11 @@ main(argc, argv) } static void -get_policy() +get_policy(void) { int mib[] = { CTL_NET, PF_INET6, IPPROTO_IPV6, IPV6CTL_ADDRCTLPOLICY }; size_t l; - char *buf; + struct in6_addrpolicy *buf; struct in6_addrpolicy *pol, *ep; if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), NULL, &l, NULL, 0) < 0) { @@ -131,8 +129,8 @@ get_policy() /* NOTREACHED */ } - ep = (struct in6_addrpolicy *)(buf + l); - for (pol = (struct in6_addrpolicy *)buf; pol + 1 <= ep; pol++) { + ep = buf + l/sizeof(*buf); + for (pol = buf; pol + 1 <= ep; pol++) { struct policyqueue *new; if ((new = malloc(sizeof(*new))) == NULL) @@ -145,7 +143,7 @@ get_policy() } static void -dump_policy() +dump_policy(void) { size_t addrlen; char addrbuf[NI_MAXHOST]; @@ -201,8 +199,7 @@ dump_policy() } while (0); static void -make_policy_fromfile(conf) - char *conf; +make_policy_fromfile(char *conf) { char line[_POSIX2_LINE_MAX], *cp; char *addrstr; @@ -257,9 +254,7 @@ make_policy_fromfile(conf) } static int -parse_prefix(prefix0, pol) - const char *prefix0; - struct in6_addrpolicy *pol; +parse_prefix(const char *prefix0, struct in6_addrpolicy *pol) { int e = 0, plen; char *prefix, *plenstr; @@ -299,11 +294,9 @@ parse_prefix(prefix0, pol) } static void -plen2mask(mask, plen) - struct sockaddr_in6 *mask; - int plen; +plen2mask(struct sockaddr_in6 *mask, int plen) { - u_char *cp = (char *)&mask->sin6_addr; + u_char *cp = (unsigned char *)&mask->sin6_addr; memset(mask, 0, sizeof(*mask)); mask->sin6_family = AF_INET6; /* just in case */ @@ -316,7 +309,7 @@ plen2mask(mask, plen) } static void -set_policy() +set_policy(void) { struct policyqueue *ent; int s; @@ -334,8 +327,7 @@ set_policy() } static int -mask2plen(mask) - struct sockaddr_in6 *mask; +mask2plen(struct sockaddr_in6 *mask) { int masklen, final = 0; u_char *p, *lim; @@ -394,8 +386,7 @@ mask2plen(mask) } static void -add_policy(prefix, prec, label) - char *prefix, *prec, *label; +add_policy(char *prefix, char *prec, char *label) { struct in6_addrpolicy p; int s; @@ -416,8 +407,7 @@ add_policy(prefix, prec, label) } static void -delete_policy(prefix) - char *prefix; +delete_policy(char *prefix) { struct in6_addrpolicy p; int s; @@ -436,7 +426,7 @@ delete_policy(prefix) } static void -flush_policy() +flush_policy(void) { struct policyqueue *ent; int s; @@ -454,7 +444,7 @@ flush_policy() } static void -usage() +usage(void) { fprintf(stderr, "usage: ip6addrctl [show]\n"); fprintf(stderr, " ip6addrctl add " From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 21:30:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B49DCE55; Wed, 10 Oct 2012 21:30:26 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D0AA8FC18; Wed, 10 Oct 2012 21:30:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9ALUQTY005556; Wed, 10 Oct 2012 21:30:26 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9ALUQiV005553; Wed, 10 Oct 2012 21:30:26 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210102130.q9ALUQiV005553@svn.freebsd.org> From: Eitan Adler Date: Wed, 10 Oct 2012 21:30:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241429 - stable/8/usr.sbin/ip6addrctl X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 21:30:26 -0000 Author: eadler Date: Wed Oct 10 21:30:26 2012 New Revision: 241429 URL: http://svn.freebsd.org/changeset/base/241429 Log: MFC r241134: Fix alignment related warnings reported by gcc Switch from old style arguments to modern C remove WARNS as a result tested with "make universe" Approved by: cperciva (implicit) Modified: stable/8/usr.sbin/ip6addrctl/ip6addrctl.c Directory Properties: stable/8/usr.sbin/ip6addrctl/ (props changed) Modified: stable/8/usr.sbin/ip6addrctl/ip6addrctl.c ============================================================================== --- stable/8/usr.sbin/ip6addrctl/ip6addrctl.c Wed Oct 10 21:30:26 2012 (r241428) +++ stable/8/usr.sbin/ip6addrctl/ip6addrctl.c Wed Oct 10 21:30:26 2012 (r241429) @@ -71,12 +71,10 @@ static void plen2mask(struct sockaddr_in static void set_policy(void); static void add_policy(char *, char *, char *); static void delete_policy(char *); -static void flush_policy(); +static void flush_policy(void); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { TAILQ_INIT(&policyhead); @@ -107,11 +105,11 @@ main(argc, argv) } static void -get_policy() +get_policy(void) { int mib[] = { CTL_NET, PF_INET6, IPPROTO_IPV6, IPV6CTL_ADDRCTLPOLICY }; size_t l; - char *buf; + struct in6_addrpolicy *buf; struct in6_addrpolicy *pol, *ep; if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), NULL, &l, NULL, 0) < 0) { @@ -131,8 +129,8 @@ get_policy() /* NOTREACHED */ } - ep = (struct in6_addrpolicy *)(buf + l); - for (pol = (struct in6_addrpolicy *)buf; pol + 1 <= ep; pol++) { + ep = buf + l/sizeof(*buf); + for (pol = buf; pol + 1 <= ep; pol++) { struct policyqueue *new; if ((new = malloc(sizeof(*new))) == NULL) @@ -145,7 +143,7 @@ get_policy() } static void -dump_policy() +dump_policy(void) { size_t addrlen; char addrbuf[NI_MAXHOST]; @@ -201,8 +199,7 @@ dump_policy() } while (0); static void -make_policy_fromfile(conf) - char *conf; +make_policy_fromfile(char *conf) { char line[_POSIX2_LINE_MAX], *cp; char *addrstr; @@ -257,9 +254,7 @@ make_policy_fromfile(conf) } static int -parse_prefix(prefix0, pol) - const char *prefix0; - struct in6_addrpolicy *pol; +parse_prefix(const char *prefix0, struct in6_addrpolicy *pol) { int e = 0, plen; char *prefix, *plenstr; @@ -299,11 +294,9 @@ parse_prefix(prefix0, pol) } static void -plen2mask(mask, plen) - struct sockaddr_in6 *mask; - int plen; +plen2mask(struct sockaddr_in6 *mask, int plen) { - u_char *cp = (char *)&mask->sin6_addr; + u_char *cp = (unsigned char *)&mask->sin6_addr; memset(mask, 0, sizeof(*mask)); mask->sin6_family = AF_INET6; /* just in case */ @@ -316,7 +309,7 @@ plen2mask(mask, plen) } static void -set_policy() +set_policy(void) { struct policyqueue *ent; int s; @@ -334,8 +327,7 @@ set_policy() } static int -mask2plen(mask) - struct sockaddr_in6 *mask; +mask2plen(struct sockaddr_in6 *mask) { int masklen, final = 0; u_char *p, *lim; @@ -394,8 +386,7 @@ mask2plen(mask) } static void -add_policy(prefix, prec, label) - char *prefix, *prec, *label; +add_policy(char *prefix, char *prec, char *label) { struct in6_addrpolicy p; int s; @@ -416,8 +407,7 @@ add_policy(prefix, prec, label) } static void -delete_policy(prefix) - char *prefix; +delete_policy(char *prefix) { struct in6_addrpolicy p; int s; @@ -436,7 +426,7 @@ delete_policy(prefix) } static void -flush_policy() +flush_policy(void) { struct policyqueue *ent; int s; @@ -454,7 +444,7 @@ flush_policy() } static void -usage() +usage(void) { fprintf(stderr, "usage: ip6addrctl [show]\n"); fprintf(stderr, " ip6addrctl add " From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 21:37:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D815C3F6; Wed, 10 Oct 2012 21:37:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE43F8FC1B; Wed, 10 Oct 2012 21:37:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9ALbLl4006636; Wed, 10 Oct 2012 21:37:21 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9ALbLY0006621; Wed, 10 Oct 2012 21:37:21 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210102137.q9ALbLY0006621@svn.freebsd.org> From: Dimitry Andric Date: Wed, 10 Oct 2012 21:37:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241430 - in head/contrib/llvm: include/llvm/Support lib/CodeGen lib/Target/ARM/MCTargetDesc lib/Target/MBlaze/MCTargetDesc lib/Target/Mips/MCTargetDesc lib/Target/PowerPC/MCTargetDesc ... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 21:37:21 -0000 Author: dim Date: Wed Oct 10 21:37:21 2012 New Revision: 241430 URL: http://svn.freebsd.org/changeset/base/241430 Log: Pull in r164132 from upstream llvm trunk: When creating MCAsmBackend pass the CPU string as well. In X86AsmBackend store this and use it to not emit long nops when the CPU is geode which doesnt support them. Fixes PR11212. Pull in r164133 from upstream clang trunk: Follow up on llvm r164132. This should prevent illegal instructions when building world on Geode CPUs (e.g. Soekris). MFC after: 3 days Modified: head/contrib/llvm/include/llvm/Support/TargetRegistry.h head/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp head/contrib/llvm/tools/llvm-mc/llvm-mc.cpp Modified: head/contrib/llvm/include/llvm/Support/TargetRegistry.h ============================================================================== --- head/contrib/llvm/include/llvm/Support/TargetRegistry.h Wed Oct 10 21:30:26 2012 (r241429) +++ head/contrib/llvm/include/llvm/Support/TargetRegistry.h Wed Oct 10 21:37:21 2012 (r241430) @@ -93,7 +93,9 @@ namespace llvm { CodeGenOpt::Level OL); typedef AsmPrinter *(*AsmPrinterCtorTy)(TargetMachine &TM, MCStreamer &Streamer); - typedef MCAsmBackend *(*MCAsmBackendCtorTy)(const Target &T, StringRef TT); + typedef MCAsmBackend *(*MCAsmBackendCtorTy)(const Target &T, + StringRef TT, + StringRef CPU); typedef MCTargetAsmLexer *(*MCAsmLexerCtorTy)(const Target &T, const MCRegisterInfo &MRI, const MCAsmInfo &MAI); @@ -353,10 +355,10 @@ namespace llvm { /// /// \arg Triple - The target triple string. /// \arg Backend - The target independent assembler object. - MCAsmBackend *createMCAsmBackend(StringRef Triple) const { + MCAsmBackend *createMCAsmBackend(StringRef Triple, StringRef CPU) const { if (!MCAsmBackendCtorFn) return 0; - return MCAsmBackendCtorFn(*this, Triple); + return MCAsmBackendCtorFn(*this, Triple, CPU); } /// createMCAsmLexer - Create a target specific assembly lexer. @@ -1063,8 +1065,9 @@ namespace llvm { } private: - static MCAsmBackend *Allocator(const Target &T, StringRef Triple) { - return new MCAsmBackendImpl(T, Triple); + static MCAsmBackend *Allocator(const Target &T, StringRef Triple, + StringRef CPU) { + return new MCAsmBackendImpl(T, Triple, CPU); } }; Modified: head/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp ============================================================================== --- head/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp Wed Oct 10 21:30:26 2012 (r241429) +++ head/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp Wed Oct 10 21:37:21 2012 (r241430) @@ -172,7 +172,7 @@ bool LLVMTargetMachine::addPassesToEmitF const MCSubtargetInfo &STI = getSubtarget(); MCE = getTarget().createMCCodeEmitter(*getInstrInfo(), MRI, STI, *Context); - MAB = getTarget().createMCAsmBackend(getTargetTriple()); + MAB = getTarget().createMCAsmBackend(getTargetTriple(), TargetCPU); } MCStreamer *S = getTarget().createAsmStreamer(*Context, Out, @@ -191,7 +191,7 @@ bool LLVMTargetMachine::addPassesToEmitF // emission fails. MCCodeEmitter *MCE = getTarget().createMCCodeEmitter(*getInstrInfo(), MRI, STI, *Context); - MCAsmBackend *MAB = getTarget().createMCAsmBackend(getTargetTriple()); + MCAsmBackend *MAB = getTarget().createMCAsmBackend(getTargetTriple(), TargetCPU); if (MCE == 0 || MAB == 0) return true; @@ -266,7 +266,7 @@ bool LLVMTargetMachine::addPassesToEmitM const MCSubtargetInfo &STI = getSubtarget(); MCCodeEmitter *MCE = getTarget().createMCCodeEmitter(*getInstrInfo(), MRI, STI, *Ctx); - MCAsmBackend *MAB = getTarget().createMCAsmBackend(getTargetTriple()); + MCAsmBackend *MAB = getTarget().createMCAsmBackend(getTargetTriple(), TargetCPU); if (MCE == 0 || MAB == 0) return true; Modified: head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp ============================================================================== --- head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp Wed Oct 10 21:30:26 2012 (r241429) +++ head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp Wed Oct 10 21:37:21 2012 (r241430) @@ -674,7 +674,7 @@ void DarwinARMAsmBackend::applyFixup(con } // end anonymous namespace -MCAsmBackend *llvm::createARMAsmBackend(const Target &T, StringRef TT) { +MCAsmBackend *llvm::createARMAsmBackend(const Target &T, StringRef TT, StringRef CPU) { Triple TheTriple(TT); if (TheTriple.isOSDarwin()) { Modified: head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h ============================================================================== --- head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h Wed Oct 10 21:30:26 2012 (r241429) +++ head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h Wed Oct 10 21:37:21 2012 (r241430) @@ -46,7 +46,7 @@ MCCodeEmitter *createARMMCCodeEmitter(co const MCSubtargetInfo &STI, MCContext &Ctx); -MCAsmBackend *createARMAsmBackend(const Target &T, StringRef TT); +MCAsmBackend *createARMAsmBackend(const Target &T, StringRef TT, StringRef CPU); /// createARMELFObjectWriter - Construct an ELF Mach-O object writer. MCObjectWriter *createARMELFObjectWriter(raw_ostream &OS, Modified: head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp ============================================================================== --- head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp Wed Oct 10 21:30:26 2012 (r241429) +++ head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp Wed Oct 10 21:37:21 2012 (r241430) @@ -156,7 +156,8 @@ void ELFMBlazeAsmBackend::applyFixup(con } } // end anonymous namespace -MCAsmBackend *llvm::createMBlazeAsmBackend(const Target &T, StringRef TT) { +MCAsmBackend *llvm::createMBlazeAsmBackend(const Target &T, StringRef TT, + StringRef CPU) { Triple TheTriple(TT); if (TheTriple.isOSDarwin()) Modified: head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.h ============================================================================== --- head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.h Wed Oct 10 21:30:26 2012 (r241429) +++ head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.h Wed Oct 10 21:37:21 2012 (r241430) @@ -35,7 +35,8 @@ MCCodeEmitter *createMBlazeMCCodeEmitter const MCSubtargetInfo &STI, MCContext &Ctx); -MCAsmBackend *createMBlazeAsmBackend(const Target &T, StringRef TT); +MCAsmBackend *createMBlazeAsmBackend(const Target &T, StringRef TT, + StringRef CPU); MCObjectWriter *createMBlazeELFObjectWriter(raw_ostream &OS, uint8_t OSABI); } // End llvm namespace Modified: head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp ============================================================================== --- head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp Wed Oct 10 21:30:26 2012 (r241429) +++ head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp Wed Oct 10 21:37:21 2012 (r241430) @@ -244,22 +244,26 @@ public: } // namespace // MCAsmBackend -MCAsmBackend *llvm::createMipsAsmBackendEL32(const Target &T, StringRef TT) { +MCAsmBackend *llvm::createMipsAsmBackendEL32(const Target &T, StringRef TT, + StringRef CPU) { return new MipsAsmBackend(T, Triple(TT).getOS(), /*IsLittle*/true, /*Is64Bit*/false); } -MCAsmBackend *llvm::createMipsAsmBackendEB32(const Target &T, StringRef TT) { +MCAsmBackend *llvm::createMipsAsmBackendEB32(const Target &T, StringRef TT, + StringRef CPU) { return new MipsAsmBackend(T, Triple(TT).getOS(), /*IsLittle*/false, /*Is64Bit*/false); } -MCAsmBackend *llvm::createMipsAsmBackendEL64(const Target &T, StringRef TT) { +MCAsmBackend *llvm::createMipsAsmBackendEL64(const Target &T, StringRef TT, + StringRef CPU) { return new MipsAsmBackend(T, Triple(TT).getOS(), /*IsLittle*/true, /*Is64Bit*/true); } -MCAsmBackend *llvm::createMipsAsmBackendEB64(const Target &T, StringRef TT) { +MCAsmBackend *llvm::createMipsAsmBackendEB64(const Target &T, StringRef TT, + StringRef CPU) { return new MipsAsmBackend(T, Triple(TT).getOS(), /*IsLittle*/false, /*Is64Bit*/true); } Modified: head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h ============================================================================== --- head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h Wed Oct 10 21:30:26 2012 (r241429) +++ head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h Wed Oct 10 21:37:21 2012 (r241430) @@ -42,10 +42,14 @@ MCCodeEmitter *createMipsMCCodeEmitterEL const MCSubtargetInfo &STI, MCContext &Ctx); -MCAsmBackend *createMipsAsmBackendEB32(const Target &T, StringRef TT); -MCAsmBackend *createMipsAsmBackendEL32(const Target &T, StringRef TT); -MCAsmBackend *createMipsAsmBackendEB64(const Target &T, StringRef TT); -MCAsmBackend *createMipsAsmBackendEL64(const Target &T, StringRef TT); +MCAsmBackend *createMipsAsmBackendEB32(const Target &T, StringRef TT, + StringRef CPU); +MCAsmBackend *createMipsAsmBackendEL32(const Target &T, StringRef TT, + StringRef CPU); +MCAsmBackend *createMipsAsmBackendEB64(const Target &T, StringRef TT, + StringRef CPU); +MCAsmBackend *createMipsAsmBackendEL64(const Target &T, StringRef TT, + StringRef CPU); MCObjectWriter *createMipsELFObjectWriter(raw_ostream &OS, uint8_t OSABI, Modified: head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp Wed Oct 10 21:30:26 2012 (r241429) +++ head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp Wed Oct 10 21:37:21 2012 (r241430) @@ -181,7 +181,7 @@ namespace { -MCAsmBackend *llvm::createPPCAsmBackend(const Target &T, StringRef TT) { +MCAsmBackend *llvm::createPPCAsmBackend(const Target &T, StringRef TT, StringRef CPU) { if (Triple(TT).isOSDarwin()) return new DarwinPPCAsmBackend(T); Modified: head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h Wed Oct 10 21:30:26 2012 (r241429) +++ head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h Wed Oct 10 21:37:21 2012 (r241430) @@ -36,7 +36,7 @@ MCCodeEmitter *createPPCMCCodeEmitter(co const MCSubtargetInfo &STI, MCContext &Ctx); -MCAsmBackend *createPPCAsmBackend(const Target &T, StringRef TT); +MCAsmBackend *createPPCAsmBackend(const Target &T, StringRef TT, StringRef CPU); /// createPPCELFObjectWriter - Construct an PPC ELF object writer. MCObjectWriter *createPPCELFObjectWriter(raw_ostream &OS, Modified: head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp ============================================================================== --- head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp Wed Oct 10 21:30:26 2012 (r241429) +++ head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp Wed Oct 10 21:37:21 2012 (r241430) @@ -66,9 +66,10 @@ public: }; class X86AsmBackend : public MCAsmBackend { + StringRef CPU; public: - X86AsmBackend(const Target &T) - : MCAsmBackend() {} + X86AsmBackend(const Target &T, StringRef _CPU) + : MCAsmBackend(), CPU(_CPU) {} unsigned getNumFixupKinds() const { return X86::NumTargetFixupKinds; @@ -305,6 +306,13 @@ bool X86AsmBackend::writeNopData(uint64_ {0x66, 0x2e, 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00}, }; + // This CPU doesnt support long nops. If needed add more. + if (CPU == "geode") { + for (uint64_t i = 0; i < Count; ++i) + OW->Write8(0x90); + return true; + } + // Write an optimal sequence for the first 15 bytes. const uint64_t OptimalCount = (Count < 16) ? Count : 15; const uint64_t Prefixes = OptimalCount <= 10 ? 0 : OptimalCount - 10; @@ -327,8 +335,8 @@ namespace { class ELFX86AsmBackend : public X86AsmBackend { public: uint8_t OSABI; - ELFX86AsmBackend(const Target &T, uint8_t _OSABI) - : X86AsmBackend(T), OSABI(_OSABI) { + ELFX86AsmBackend(const Target &T, uint8_t _OSABI, StringRef CPU) + : X86AsmBackend(T, CPU), OSABI(_OSABI) { HasReliableSymbolDifference = true; } @@ -340,8 +348,8 @@ public: class ELFX86_32AsmBackend : public ELFX86AsmBackend { public: - ELFX86_32AsmBackend(const Target &T, uint8_t OSABI) - : ELFX86AsmBackend(T, OSABI) {} + ELFX86_32AsmBackend(const Target &T, uint8_t OSABI, StringRef CPU) + : ELFX86AsmBackend(T, OSABI, CPU) {} MCObjectWriter *createObjectWriter(raw_ostream &OS) const { return createX86ELFObjectWriter(OS, /*Is64Bit*/ false, OSABI); @@ -350,8 +358,8 @@ public: class ELFX86_64AsmBackend : public ELFX86AsmBackend { public: - ELFX86_64AsmBackend(const Target &T, uint8_t OSABI) - : ELFX86AsmBackend(T, OSABI) {} + ELFX86_64AsmBackend(const Target &T, uint8_t OSABI, StringRef CPU) + : ELFX86AsmBackend(T, OSABI, CPU) {} MCObjectWriter *createObjectWriter(raw_ostream &OS) const { return createX86ELFObjectWriter(OS, /*Is64Bit*/ true, OSABI); @@ -362,8 +370,8 @@ class WindowsX86AsmBackend : public X86A bool Is64Bit; public: - WindowsX86AsmBackend(const Target &T, bool is64Bit) - : X86AsmBackend(T) + WindowsX86AsmBackend(const Target &T, bool is64Bit, StringRef CPU) + : X86AsmBackend(T, CPU) , Is64Bit(is64Bit) { } @@ -374,14 +382,14 @@ public: class DarwinX86AsmBackend : public X86AsmBackend { public: - DarwinX86AsmBackend(const Target &T) - : X86AsmBackend(T) { } + DarwinX86AsmBackend(const Target &T, StringRef CPU) + : X86AsmBackend(T, CPU) { } }; class DarwinX86_32AsmBackend : public DarwinX86AsmBackend { public: - DarwinX86_32AsmBackend(const Target &T) - : DarwinX86AsmBackend(T) {} + DarwinX86_32AsmBackend(const Target &T, StringRef CPU) + : DarwinX86AsmBackend(T, CPU) {} MCObjectWriter *createObjectWriter(raw_ostream &OS) const { return createX86MachObjectWriter(OS, /*Is64Bit=*/false, @@ -392,8 +400,8 @@ public: class DarwinX86_64AsmBackend : public DarwinX86AsmBackend { public: - DarwinX86_64AsmBackend(const Target &T) - : DarwinX86AsmBackend(T) { + DarwinX86_64AsmBackend(const Target &T, StringRef CPU) + : DarwinX86AsmBackend(T, CPU) { HasReliableSymbolDifference = true; } @@ -439,28 +447,28 @@ public: } // end anonymous namespace -MCAsmBackend *llvm::createX86_32AsmBackend(const Target &T, StringRef TT) { +MCAsmBackend *llvm::createX86_32AsmBackend(const Target &T, StringRef TT, StringRef CPU) { Triple TheTriple(TT); if (TheTriple.isOSDarwin() || TheTriple.getEnvironment() == Triple::MachO) - return new DarwinX86_32AsmBackend(T); + return new DarwinX86_32AsmBackend(T, CPU); if (TheTriple.isOSWindows()) - return new WindowsX86AsmBackend(T, false); + return new WindowsX86AsmBackend(T, false, CPU); uint8_t OSABI = MCELFObjectTargetWriter::getOSABI(TheTriple.getOS()); - return new ELFX86_32AsmBackend(T, OSABI); + return new ELFX86_32AsmBackend(T, OSABI, CPU); } -MCAsmBackend *llvm::createX86_64AsmBackend(const Target &T, StringRef TT) { +MCAsmBackend *llvm::createX86_64AsmBackend(const Target &T, StringRef TT, StringRef CPU) { Triple TheTriple(TT); if (TheTriple.isOSDarwin() || TheTriple.getEnvironment() == Triple::MachO) - return new DarwinX86_64AsmBackend(T); + return new DarwinX86_64AsmBackend(T, CPU); if (TheTriple.isOSWindows()) - return new WindowsX86AsmBackend(T, true); + return new WindowsX86AsmBackend(T, true, CPU); uint8_t OSABI = MCELFObjectTargetWriter::getOSABI(TheTriple.getOS()); - return new ELFX86_64AsmBackend(T, OSABI); + return new ELFX86_64AsmBackend(T, OSABI, CPU); } Modified: head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h ============================================================================== --- head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h Wed Oct 10 21:30:26 2012 (r241429) +++ head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h Wed Oct 10 21:37:21 2012 (r241430) @@ -80,8 +80,8 @@ MCCodeEmitter *createX86MCCodeEmitter(co const MCSubtargetInfo &STI, MCContext &Ctx); -MCAsmBackend *createX86_32AsmBackend(const Target &T, StringRef TT); -MCAsmBackend *createX86_64AsmBackend(const Target &T, StringRef TT); +MCAsmBackend *createX86_32AsmBackend(const Target &T, StringRef TT, StringRef CPU); +MCAsmBackend *createX86_64AsmBackend(const Target &T, StringRef TT, StringRef CPU); /// createX86MachObjectWriter - Construct an X86 Mach-O object writer. MCObjectWriter *createX86MachObjectWriter(raw_ostream &OS, Modified: head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp ============================================================================== --- head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp Wed Oct 10 21:30:26 2012 (r241429) +++ head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp Wed Oct 10 21:37:21 2012 (r241430) @@ -329,7 +329,7 @@ static bool ExecuteAssembler(AssemblerIn MCAsmBackend *MAB = 0; if (Opts.ShowEncoding) { CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, *STI, Ctx); - MAB = TheTarget->createMCAsmBackend(Opts.Triple); + MAB = TheTarget->createMCAsmBackend(Opts.Triple, Opts.CPU); } Str.reset(TheTarget->createAsmStreamer(Ctx, *Out, /*asmverbose*/true, /*useLoc*/ true, @@ -343,7 +343,7 @@ static bool ExecuteAssembler(AssemblerIn assert(Opts.OutputType == AssemblerInvocation::FT_Obj && "Invalid file type!"); MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, *STI, Ctx); - MCAsmBackend *MAB = TheTarget->createMCAsmBackend(Opts.Triple); + MCAsmBackend *MAB = TheTarget->createMCAsmBackend(Opts.Triple, Opts.CPU); Str.reset(TheTarget->createMCObjectStreamer(Opts.Triple, Ctx, *MAB, *Out, CE, Opts.RelaxAll, Opts.NoExecStack)); Modified: head/contrib/llvm/tools/llvm-mc/llvm-mc.cpp ============================================================================== --- head/contrib/llvm/tools/llvm-mc/llvm-mc.cpp Wed Oct 10 21:30:26 2012 (r241429) +++ head/contrib/llvm/tools/llvm-mc/llvm-mc.cpp Wed Oct 10 21:37:21 2012 (r241430) @@ -409,7 +409,7 @@ int main(int argc, char **argv) { MCAsmBackend *MAB = 0; if (ShowEncoding) { CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, *STI, Ctx); - MAB = TheTarget->createMCAsmBackend(TripleName); + MAB = TheTarget->createMCAsmBackend(TripleName, MCPU); } Str.reset(TheTarget->createAsmStreamer(Ctx, FOS, /*asmverbose*/true, /*useLoc*/ true, @@ -422,7 +422,7 @@ int main(int argc, char **argv) { } else { assert(FileType == OFT_ObjectFile && "Invalid file type!"); MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, *STI, Ctx); - MCAsmBackend *MAB = TheTarget->createMCAsmBackend(TripleName); + MCAsmBackend *MAB = TheTarget->createMCAsmBackend(TripleName, MCPU); Str.reset(TheTarget->createMCObjectStreamer(TripleName, Ctx, *MAB, FOS, CE, RelaxAll, NoExecStack)); From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 21:38:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AC2CE591; Wed, 10 Oct 2012 21:38:17 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 93A3D8FC0A; Wed, 10 Oct 2012 21:38:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9ALcH21006788; Wed, 10 Oct 2012 21:38:17 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9ALcHZ4006784; Wed, 10 Oct 2012 21:38:17 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201210102138.q9ALcHZ4006784@svn.freebsd.org> From: Jim Harris Date: Wed, 10 Oct 2012 21:38:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241431 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 21:38:17 -0000 Author: jimharris Date: Wed Oct 10 21:38:17 2012 New Revision: 241431 URL: http://svn.freebsd.org/changeset/base/241431 Log: Add man pages for nvme(4) and nvd(4). Sponsored by: Intel Reviewed by: joel Added: head/share/man/man4/nvd.4 (contents, props changed) head/share/man/man4/nvme.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Wed Oct 10 21:37:21 2012 (r241430) +++ head/share/man/man4/Makefile Wed Oct 10 21:38:17 2012 (r241431) @@ -337,7 +337,9 @@ MAN= aac.4 \ nmdm.4 \ nsp.4 \ null.4 \ + ${_nvd.4} \ ${_nve.4} \ + ${_nvme.4} \ ${_nvram.4} \ ${_nvram2env.4} \ ${_nxge.4} \ @@ -758,7 +760,9 @@ _linux.4= linux.4 _ndis.4= ndis.4 _nfe.4= nfe.4 _nfsmb.4= nfsmb.4 +_nvd.4= nvd.4 _nve.4= nve.4 +_nvme.4= nvme.4 _nvram.4= nvram.4 _nxge.4= nxge.4 _virtio.4= virtio.4 Added: head/share/man/man4/nvd.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/nvd.4 Wed Oct 10 21:38:17 2012 (r241431) @@ -0,0 +1,91 @@ +.\" +.\" Copyright (c) 2012 Intel Corporation +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions, and the following disclaimer, +.\" without modification. +.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer +.\" substantially similar to the "NO WARRANTY" disclaimer below +.\" ("Disclaimer") and any redistribution must be conditioned upon +.\" including a substantially similar Disclaimer requirement for further +.\" binary redistribution. +.\" +.\" NO WARRANTY +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGES. +.\" +.\" nvd driver man page. +.\" +.\" Author: Jim Harris +.\" +.\" $FreeBSD$ +.\" +.Dd October 10, 2012 +.Dt NVD 4 +.Os +.Sh NAME +.Nm nvd +.Nd NVM Express disk driver +.Sh SYNOPSIS +To compile this driver into your kernel, +place the following lines in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device nvme" +.Cd "device nvd" +.Ed +.Pp +Or, to load the driver as a module at boot, place the following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +nvme_load="YES" +nvd_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver exposes NVM Express (NVMe) namespaces as disks to the kernel disk +storage API. +It depends on the +.Xr nvme 4 +driver for notification of existing NVMe namespaces and submission of NVM +I/O commands. +.Sh SEE ALSO +.Xr nvme 4 , +.Xr nvmecontrol 8 , +.Xr disk 9 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was developed by Intel and originally written by +.An Jim Harris Aq jimharris@FreeBSD.org , +with contributions from Joe Golio at EMC. +.Pp +This man page was written by +.An Jim Harris Aq jimharris@FreeBSD.org . +.Sh BUGS +The +.Nm +driver is considered experimental. +Development and testing have been primarily focused on amd64. +The following areas of development and testing are in progress: +.Bl -bullet +.It +testing on i386 +.It +command timeout error handling +.El + Added: head/share/man/man4/nvme.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/nvme.4 Wed Oct 10 21:38:17 2012 (r241431) @@ -0,0 +1,175 @@ +.\" +.\" Copyright (c) 2012 Intel Corporation +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions, and the following disclaimer, +.\" without modification. +.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer +.\" substantially similar to the "NO WARRANTY" disclaimer below +.\" ("Disclaimer") and any redistribution must be conditioned upon +.\" including a substantially similar Disclaimer requirement for further +.\" binary redistribution. +.\" +.\" NO WARRANTY +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR +.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +.\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGES. +.\" +.\" nvme driver man page. +.\" +.\" Author: Jim Harris +.\" +.\" $FreeBSD$ +.\" +.Dd October 10, 2012 +.Dt NVME 4 +.Os +.Sh NAME +.Nm nvme +.Nd NVM Express core driver +.Sh SYNOPSIS +To compile this driver into your kernel, +place the following line in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device nvme" +.Ed +.Pp +Or, to load the driver as a module at boot, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +nvme_load="YES" +.Ed +.Pp +Most users will also want to enable +.Xr nvd 4 +to surface NVM Express namespaces as disk devices. +Note that in NVM Express terms, a namespace is roughly equivalent to a +SCSI LUN. +.Sh DESCRIPTION +The +.Nm +driver provides support for NVM Express (NVMe) controllers, such as: +.Bl -bullet +.It +Hardware initialization +.It +Per-CPU IO queue pairs +.It +API for registering NVMe namespace consumers such as +.Xr nvd 4 +.It +API for submitting NVM commands to namespaces +.It +Ioctls for controller and namespace configuration and management +.Nm +creates controller devices in the format /dev/nvmeX and namespace devices in +the format /dev/nvmeXnsY. +Note that the NVM Express specification starts numbering namespaces at 1, +not 0, and this driver follows that convention. +.El +.Sh CONFIGURATION +By default, +.Nm +will create an I/O queue pair for each CPU, provided enough MSI-X vectors +can be allocated. +To force a single I/O queue pair shared by all CPUs, set the following +tunable value in +.Xr loader.conf 5 : +.Bd -literal -offset indent +hw.nvme.per_cpu_io_queues=0 +.Ed +.Pp +To force legacy interrupts for all +.Nm +driver instances, set the following tunable value in +.Xr loader.conf 5 : +.Bd -literal -offset indent +hw.nvme.force_intx=1 +.Ed +.Pp +Note that use of INTx implies disabling of per-CPU I/O queue pairs. +.Sh SYSCTL VARIABLES +The following controller-level sysctls are currently implemented: +.Bl -tag -width indent +.It Va dev.nvme.0.int_coal_time +(R/W) Interrupt coalescing timer period in microseconds. Set to 0 to disable. +.It Va dev.nvme.0.int_coal_threshold +(R/W) Interrupt coalescing threshold in number of command completions. +Set to 0 to disable. +.El +.Pp +The following queue pair-level sysctls are currently implemented. +Admin queue sysctls take the format of dev.nvme.0.adminq and I/O queue sysctls +take the format of dev.nvme.0.ioq0. +.Bl -tag -width indent +.It Va dev.nvme.0.ioq0.num_entries +(R) Number of entries in this queue pair's command and completion queue. +.It Va dev.nvme.0.ioq0.num_tr +(R) Number of nvme_tracker structures currently allocated for this queue pair. +.It Va dev.nvme.0.ioq0.num_prp_list +(R) Number of nvme_prp_list structures currently allocated for this queue pair. +.It Va dev.nvme.0.ioq0.sq_head +(R) Current location of the submission queue head pointer as observed by +the driver. +The head pointer is incremented by the controller as it takes commands off +of the submission queue. +.It Va dev.nvme.0.ioq0.sq_tail +(R) Current location of the submission queue tail pointer as observed by +the driver. +The driver increments the tail pointer after writing a command +into the submission queue to signal that a new command is ready to be +processed. +.It Va dev.nvme.0.ioq0.cq_head +(R) Current location of the completion queue head pointer as observed by +the driver. +The driver increments the head pointer after finishing +with a completion entry that was posted by the controller. +.It Va dev.nvme.0.ioq0.num_cmds +(R) Number of commands that have been submitted on this queue pair. +.It Va dev.nvme.0.ioq0.dump_debug +(W) Writing 1 to this sysctl will dump the full contents of the submission +and completion queues to the console. +.El +.Sh SEE ALSO +.Xr nvd 4 , +.Xr pci 4 , +.Xr nvmecontrol 8 , +.Xr disk 9 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was developed by Intel and originally written by +.An Jim Harris Aq jimharris@FreeBSD.org , +with contributions from Joe Golio at EMC. +.Pp +This man page was written by +.An Jim Harris Aq jimharris@FreeBSD.org . +.Sh BUGS +The +.Nm +driver is considered experimental. +Development and testing have been primarily focused on amd64. +The following areas of development and testing are in progress: +.Bl -bullet +.It +testing on i386 +.It +asynchronous error reporting +.It +command timeout error handling +.It +controller-level resets +.El From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 22:02:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 59B67EE8; Wed, 10 Oct 2012 22:02:12 +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 431F08FC17; Wed, 10 Oct 2012 22:02:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AM2CRB010155; Wed, 10 Oct 2012 22:02:12 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AM2CiQ010153; Wed, 10 Oct 2012 22:02:12 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210102202.q9AM2CiQ010153@svn.freebsd.org> From: Alexander Motin Date: Wed, 10 Oct 2012 22:02:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241432 - head/sys/dev/usb/storage X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 22:02:12 -0000 Author: mav Date: Wed Oct 10 22:02:11 2012 New Revision: 241432 URL: http://svn.freebsd.org/changeset/base/241432 Log: - Remove ancient checks for sim->softc == NULL. It can't be NULL, as it is set not-NULL during SIM registration and set to UMASS_GONE on destruction. Debug messages there look broken for at least 9 years, as they dereference softc value that was just checked to be equal to NULL. - Remove magic pointer value UMASS_GONE and use simple NULL instead. Found by: Clang Static Analyzer Modified: head/sys/dev/usb/storage/umass.c Modified: head/sys/dev/usb/storage/umass.c ============================================================================== --- head/sys/dev/usb/storage/umass.c Wed Oct 10 21:38:17 2012 (r241431) +++ head/sys/dev/usb/storage/umass.c Wed Oct 10 22:02:11 2012 (r241432) @@ -175,8 +175,6 @@ TUNABLE_INT("hw.usb.umass.debug", &umass #define DPRINTF(...) do { } while (0) #endif -#define UMASS_GONE ((struct umass_softc *)1) - #define UMASS_BULK_SIZE (1 << 17) #define UMASS_CBI_DIAGNOSTIC_CMDLEN 12 /* bytes */ #define UMASS_MAX_CMDLEN MAX(12, CAM_MAX_CDBLEN) /* bytes */ @@ -2109,7 +2107,7 @@ umass_cam_detach_sim(struct umass_softc if (sc->sc_sim != NULL) { if (xpt_bus_deregister(cam_sim_path(sc->sc_sim))) { /* accessing the softc is not possible after this */ - sc->sc_sim->softc = UMASS_GONE; + sc->sc_sim->softc = NULL; cam_sim_free(sc->sc_sim, /* free_devq */ TRUE); } else { panic("%s: CAM layer is busy\n", @@ -2128,63 +2126,11 @@ umass_cam_action(struct cam_sim *sim, un { struct umass_softc *sc = (struct umass_softc *)sim->softc; - if (sc == UMASS_GONE || - (sc != NULL && !usbd_device_attached(sc->sc_udev))) { + if (sc == NULL) { ccb->ccb_h.status = CAM_SEL_TIMEOUT; xpt_done(ccb); return; } - /* - * Verify, depending on the operation to perform, that we either got - * a valid sc, because an existing target was referenced, or - * otherwise the SIM is addressed. - * - * This avoids bombing out at a printf and does give the CAM layer some - * sensible feedback on errors. - */ - switch (ccb->ccb_h.func_code) { - case XPT_SCSI_IO: - case XPT_RESET_DEV: - case XPT_GET_TRAN_SETTINGS: - case XPT_SET_TRAN_SETTINGS: - case XPT_CALC_GEOMETRY: - /* the opcodes requiring a target. These should never occur. */ - if (sc == NULL) { - DPRINTF(sc, UDMASS_GEN, "%s:%d:%d:%d:func_code 0x%04x: " - "Invalid target (target needed)\n", - DEVNAME_SIM, cam_sim_path(sc->sc_sim), - ccb->ccb_h.target_id, ccb->ccb_h.target_lun, - ccb->ccb_h.func_code); - - ccb->ccb_h.status = CAM_TID_INVALID; - xpt_done(ccb); - goto done; - } - break; - case XPT_PATH_INQ: - case XPT_NOOP: - /* - * The opcodes sometimes aimed at a target (sc is valid), - * sometimes aimed at the SIM (sc is invalid and target is - * CAM_TARGET_WILDCARD) - */ - if ((sc == NULL) && - (ccb->ccb_h.target_id != CAM_TARGET_WILDCARD)) { - DPRINTF(sc, UDMASS_SCSI, "%s:%d:%d:%d:func_code 0x%04x: " - "Invalid target (no wildcard)\n", - DEVNAME_SIM, cam_sim_path(sc->sc_sim), - ccb->ccb_h.target_id, ccb->ccb_h.target_lun, - ccb->ccb_h.func_code); - - ccb->ccb_h.status = CAM_TID_INVALID; - xpt_done(ccb); - goto done; - } - break; - default: - /* XXX Hm, we should check the input parameters */ - break; - } /* Perform the requested action */ switch (ccb->ccb_h.func_code) { @@ -2448,7 +2394,7 @@ umass_cam_poll(struct cam_sim *sim) { struct umass_softc *sc = (struct umass_softc *)sim->softc; - if (sc == UMASS_GONE) + if (sc == NULL) return; DPRINTF(sc, UDMASS_SCSI, "CAM poll\n"); From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 23:28:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B2AC4C48; Wed, 10 Oct 2012 23:28:58 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B4228FC08; Wed, 10 Oct 2012 23:28:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9ANSwvI020977; Wed, 10 Oct 2012 23:28:58 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9ANSwn0020974; Wed, 10 Oct 2012 23:28:58 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201210102328.q9ANSwn0020974@svn.freebsd.org> From: Jim Harris Date: Wed, 10 Oct 2012 23:28:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241433 - head/sys/dev/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 23:28:58 -0000 Author: jimharris Date: Wed Oct 10 23:28:58 2012 New Revision: 241433 URL: http://svn.freebsd.org/changeset/base/241433 Log: Put the nvme_qpair mutex on its own cacheline. Sponsored by: Intel Modified: head/sys/dev/nvme/nvme_private.h Modified: head/sys/dev/nvme/nvme_private.h ============================================================================== --- head/sys/dev/nvme/nvme_private.h Wed Oct 10 22:02:11 2012 (r241432) +++ head/sys/dev/nvme/nvme_private.h Wed Oct 10 23:28:58 2012 (r241433) @@ -88,6 +88,10 @@ MALLOC_DECLARE(M_NVME); #define NVME_TIMEOUT_IN_SEC (30) +#ifndef CACHE_LINE_SIZE +#define CACHE_LINE_SIZE (64) +#endif + struct nvme_prp_list { uint64_t prp[NVME_MAX_PRP_LIST_ENTRIES]; SLIST_ENTRY(nvme_prp_list) slist; @@ -131,8 +135,6 @@ struct nvme_qpair { int64_t num_cmds; - struct mtx lock; - struct nvme_command *cmd; struct nvme_completion *cpl; @@ -152,7 +154,10 @@ struct nvme_qpair { struct nvme_tracker **act_tr; SLIST_HEAD(, nvme_prp_list) free_prp_list; -}; + + struct mtx lock __aligned(CACHE_LINE_SIZE); + +} __aligned(CACHE_LINE_SIZE); struct nvme_namespace { From owner-svn-src-all@FreeBSD.ORG Wed Oct 10 23:35:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CB66390; Wed, 10 Oct 2012 23:35:17 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A8F3C8FC0C; Wed, 10 Oct 2012 23:35:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9ANZHEx021775; Wed, 10 Oct 2012 23:35:17 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9ANZHVG021771; Wed, 10 Oct 2012 23:35:17 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201210102335.q9ANZHVG021771@svn.freebsd.org> From: Jim Harris Date: Wed, 10 Oct 2012 23:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241434 - head/sys/dev/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2012 23:35:17 -0000 Author: jimharris Date: Wed Oct 10 23:35:16 2012 New Revision: 241434 URL: http://svn.freebsd.org/changeset/base/241434 Log: Count number of times each queue pair's interrupt handler is invoked. Also add sysctls to query and reset each queue pair's stats, including the new count added here. Sponsored by: Intel Modified: head/sys/dev/nvme/nvme_private.h head/sys/dev/nvme/nvme_qpair.c head/sys/dev/nvme/nvme_sysctl.c Modified: head/sys/dev/nvme/nvme_private.h ============================================================================== --- head/sys/dev/nvme/nvme_private.h Wed Oct 10 23:28:58 2012 (r241433) +++ head/sys/dev/nvme/nvme_private.h Wed Oct 10 23:35:16 2012 (r241434) @@ -134,6 +134,7 @@ struct nvme_qpair { uint32_t cq_head; int64_t num_cmds; + int64_t num_intr_handler_calls; struct nvme_command *cmd; struct nvme_completion *cpl; Modified: head/sys/dev/nvme/nvme_qpair.c ============================================================================== --- head/sys/dev/nvme/nvme_qpair.c Wed Oct 10 23:28:58 2012 (r241433) +++ head/sys/dev/nvme/nvme_qpair.c Wed Oct 10 23:35:16 2012 (r241434) @@ -125,6 +125,8 @@ nvme_qpair_process_completions(struct nv struct nvme_completion *cpl; boolean_t retry, error; + qpair->num_intr_handler_calls++; + while (1) { cpl = &qpair->cpl[qpair->cq_head]; @@ -238,6 +240,7 @@ nvme_qpair_construct(struct nvme_qpair * NULL, NULL, &qpair->dma_tag); qpair->num_cmds = 0; + qpair->num_intr_handler_calls = 0; qpair->num_tr = 0; qpair->num_prp_list = 0; qpair->sq_head = qpair->sq_tail = qpair->cq_head = 0; Modified: head/sys/dev/nvme/nvme_sysctl.c ============================================================================== --- head/sys/dev/nvme/nvme_sysctl.c Wed Oct 10 23:28:58 2012 (r241433) +++ head/sys/dev/nvme/nvme_sysctl.c Wed Oct 10 23:35:16 2012 (r241434) @@ -33,6 +33,16 @@ __FBSDID("$FreeBSD$"); #include "nvme_private.h" +/* + * CTLTYPE_S64 and sysctl_handle_64 were added in r217616. Define these + * explicitly here for older kernels that don't include the r217616 + * changeset. + */ +#ifndef CTLTYPE_S64 +#define CTLTYPE_S64 CTLTYPE_QUAD +#define sysctl_handle_64 sysctl_handle_quad +#endif + static void nvme_dump_queue(struct nvme_qpair *qpair) { @@ -114,6 +124,66 @@ nvme_sysctl_int_coal_threshold(SYSCTL_HA } static void +nvme_qpair_reset_stats(struct nvme_qpair *qpair) +{ + + qpair->num_cmds = 0; + qpair->num_intr_handler_calls = 0; +} + +static int +nvme_sysctl_num_cmds(SYSCTL_HANDLER_ARGS) +{ + struct nvme_controller *ctrlr = arg1; + int64_t num_cmds = 0; + int i; + + num_cmds = ctrlr->adminq.num_cmds; + + for (i = 0; i < ctrlr->num_io_queues; i++) + num_cmds += ctrlr->ioq[i].num_cmds; + + return (sysctl_handle_64(oidp, &num_cmds, 0, req)); +} + +static int +nvme_sysctl_num_intr_handler_calls(SYSCTL_HANDLER_ARGS) +{ + struct nvme_controller *ctrlr = arg1; + int64_t num_intr_handler_calls = 0; + int i; + + num_intr_handler_calls = ctrlr->adminq.num_intr_handler_calls; + + for (i = 0; i < ctrlr->num_io_queues; i++) + num_intr_handler_calls += ctrlr->ioq[i].num_intr_handler_calls; + + return (sysctl_handle_64(oidp, &num_intr_handler_calls, 0, req)); +} + +static int +nvme_sysctl_reset_stats(SYSCTL_HANDLER_ARGS) +{ + struct nvme_controller *ctrlr = arg1; + uint32_t i, val = 0; + + int error = sysctl_handle_int(oidp, &val, 0, req); + + if (error) + return (error); + + if (val != 0) { + nvme_qpair_reset_stats(&ctrlr->adminq); + + for (i = 0; i < ctrlr->num_io_queues; i++) + nvme_qpair_reset_stats(&ctrlr->ioq[i]); + } + + return (0); +} + + +static void nvme_sysctl_initialize_queue(struct nvme_qpair *qpair, struct sysctl_ctx_list *ctrlr_ctx, struct sysctl_oid *que_tree) { @@ -140,6 +210,11 @@ nvme_sysctl_initialize_queue(struct nvme SYSCTL_ADD_QUAD(ctrlr_ctx, que_list, OID_AUTO, "num_cmds", CTLFLAG_RD, &qpair->num_cmds, "Number of commands submitted"); + SYSCTL_ADD_QUAD(ctrlr_ctx, que_list, OID_AUTO, "num_intr_handler_calls", + CTLFLAG_RD, &qpair->num_intr_handler_calls, + "Number of times interrupt handler was invoked (will typically be " + "less than number of actual interrupts generated due to " + "coalescing)"); SYSCTL_ADD_PROC(ctrlr_ctx, que_list, OID_AUTO, "dump_debug", CTLTYPE_UINT | CTLFLAG_RW, qpair, 0, @@ -170,6 +245,22 @@ nvme_sysctl_initialize_ctrlr(struct nvme "int_coal_threshold", CTLTYPE_UINT | CTLFLAG_RW, ctrlr, 0, nvme_sysctl_int_coal_threshold, "IU", "Interrupt coalescing threshold"); + + SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO, + "num_cmds", CTLTYPE_S64 | CTLFLAG_RD, + ctrlr, 0, nvme_sysctl_num_cmds, "IU", + "Number of commands submitted"); + + SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO, + "num_intr_handler_calls", CTLTYPE_S64 | CTLFLAG_RD, + ctrlr, 0, nvme_sysctl_num_intr_handler_calls, "IU", + "Number of times interrupt handler was invoked (will " + "typically be less than number of actual interrupts " + "generated due to coalescing)"); + + SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO, + "reset_stats", CTLTYPE_UINT | CTLFLAG_RW, ctrlr, 0, + nvme_sysctl_reset_stats, "IU", "Reset statistics to zero"); } que_tree = SYSCTL_ADD_NODE(ctrlr_ctx, ctrlr_list, OID_AUTO, "adminq", From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 01:32:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6A2833CD; Thu, 11 Oct 2012 01:32:52 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51A658FC12; Thu, 11 Oct 2012 01:32:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9B1Wq7n036212; Thu, 11 Oct 2012 01:32:52 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9B1WqP0036209; Thu, 11 Oct 2012 01:32:52 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210110132.q9B1WqP0036209@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 11 Oct 2012 01:32:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241435 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 01:32:52 -0000 Author: glebius Date: Thu Oct 11 01:32:51 2012 New Revision: 241435 URL: http://svn.freebsd.org/changeset/base/241435 Log: Merge r241129: There is a complex race in in_pcblookup_hash() and in_pcblookup_group(). Both functions need to obtain lock on the found PCB, and they can't do classic inter-lock with the PCB hash lock, due to lock order reversal. To keep the PCB stable, these functions put a reference on it and after PCB lock is acquired drop it. If the reference was the last one, this means we've raced with in_pcbfree() and the PCB is no longer valid. This approach works okay only if we are acquiring writer-lock on the PCB. In case of reader-lock, the following scenario can happen: - 2 threads locate pcb, and do in_pcbref() on it. - These 2 threads drop the inp hash lock. - Another thread comes to delete pcb via in_pcbfree(), it obtains hash lock, does in_pcbremlists(), drops hash lock, and runs in_pcbrele_wlocked(), which doesn't free the pcb due to two references on it. Then it unlocks the pcb. - 2 aforementioned threads acquire reader lock on the pcb and run in_pcbrele_rlocked(). One gets 1 from in_pcbrele_rlocked() and continues, second gets 0 and considers pcb freed, returns. - The thread that got 1 continutes working with detached pcb, which later leads to panic in the underlying protocol level. To plumb that problem an additional INPCB flag introduced - INP_FREED. We check for that flag in the in_pcbrele_rlocked() and if it is set, we pretend that that was the last reference. Discussed with: rwatson, jhb Reported by: Vladimir Medvedkin Modified: stable/9/sys/netinet/in_pcb.c stable/9/sys/netinet/in_pcb.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/in_pcb.c ============================================================================== --- stable/9/sys/netinet/in_pcb.c Wed Oct 10 23:35:16 2012 (r241434) +++ stable/9/sys/netinet/in_pcb.c Thu Oct 11 01:32:51 2012 (r241435) @@ -1104,8 +1104,17 @@ in_pcbrele_rlocked(struct inpcb *inp) INP_RLOCK_ASSERT(inp); - if (refcount_release(&inp->inp_refcount) == 0) + if (refcount_release(&inp->inp_refcount) == 0) { + /* + * If the inpcb has been freed, let the caller know, even if + * this isn't the last reference. + */ + if (inp->inp_flags2 & INP_FREED) { + INP_RUNLOCK(inp); + return (1); + } return (0); + } KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); @@ -1185,6 +1194,7 @@ in_pcbfree(struct inpcb *inp) inp_freemoptions(inp->inp_moptions); #endif inp->inp_vflag = 0; + inp->inp_flags2 |= INP_FREED; crfree(inp->inp_cred); #ifdef MAC mac_inpcb_destroy(inp); Modified: stable/9/sys/netinet/in_pcb.h ============================================================================== --- stable/9/sys/netinet/in_pcb.h Wed Oct 10 23:35:16 2012 (r241434) +++ stable/9/sys/netinet/in_pcb.h Thu Oct 11 01:32:51 2012 (r241435) @@ -542,6 +542,7 @@ void inp_4tuple_get(struct inpcb *inp, #define INP_RT_VALID 0x00000002 /* cached rtentry is valid */ #define INP_PCBGROUPWILD 0x00000004 /* in pcbgroup wildcard list */ #define INP_REUSEPORT 0x00000008 /* SO_REUSEPORT option is set */ +#define INP_FREED 0x00000010 /* inp itself is not valid */ /* * Flags passed to in_pcblookup*() functions. From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 05:00:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 301B1B5C; Thu, 11 Oct 2012 05:00:35 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id D986C8FC12; Thu, 11 Oct 2012 05:00:32 +0000 (UTC) Received: by mail-vc0-f182.google.com with SMTP id fw7so2151712vcb.13 for ; Wed, 10 Oct 2012 22:00:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=ZkmrbfVPCTLP8C/Mw56sLIDe5Dh8Q8RJuYTEROEpQQk=; b=gHkA8CoNYuER50qrkZCoumb5E+DlX0Pp8Y+8VoFjkyn/hI/yppAXKlzWgxVPy+5sPV HS3B+3luQKX6WEWx25UDS6nLixzYVO/87e+eGGq8QM2InwKXPKrSD6HjvBApPfUfIfJF YI4ywIKKEwcuib01XivHlWKPLkNyRmsDRqwNChgqa/5/a1UM8/saREI6Jl0CeGER0Gap Dhr4kEHWxBjJafxr7CWpbEThNTygdIPovDtCmIUqzSCPHnyMcQx1AgM0xALuIWjx70Qf ILnRYXXcPmYvWyIbqL9eFEvvNc0eFOQ6pMRSJJ+tivmtFGiPaASJ+W+8UiDOUUF8Adax /dkQ== MIME-Version: 1.0 Received: by 10.220.115.138 with SMTP id i10mr10941281vcq.37.1349931626590; Wed, 10 Oct 2012 22:00:26 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.58.247.132 with HTTP; Wed, 10 Oct 2012 22:00:26 -0700 (PDT) In-Reply-To: <5006A7DD.9050509@FreeBSD.org> References: <201207162207.q6GM7UNS087234@svn.freebsd.org> <5006A7DD.9050509@FreeBSD.org> Date: Thu, 11 Oct 2012 07:00:26 +0200 X-Google-Sender-Auth: HV6bh30gsTzcSNKy7qUnuDinK74 Message-ID: Subject: Re: svn commit: r238539 - head/sys/fs/smbfs From: Davide Italiano To: Christian Brueffer Content-Type: text/plain; charset=ISO-8859-1 Cc: attilio@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 05:00:35 -0000 On Wed, Jul 18, 2012 at 2:11 PM, Christian Brueffer wrote: > On 7/17/12 0:10 , Attilio Rao wrote: >> 2012/7/16 Christian Brueffer : >>> Author: brueffer >>> Date: Mon Jul 16 22:07:29 2012 >>> New Revision: 238539 >>> URL: http://svn.freebsd.org/changeset/base/238539 >>> >>> Log: >>> Simply error handling by moving the allocation of np down to where it is >>> actually used. While here, improve style a little. >> >> Too bad that the biggest bug here is still in place. >> Right now smbfs inserts in the mount list half-constructed vnodes. >> Maybe you are interested in fixing this? >> > > I can give it a shot, no promises though. > > Cheers, > > Chris > This patch should fix the half-constructed vnode insertion issue. Can you give it a look, Attilio? http://people.freebsd.org/~davide/ix/smbfs_norollhash.diff Moreover, it makes the code relying on the global vfs_hash table, now it works using an home-made local hash table for vnodes. Thanks Davide From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 05:48:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 595951CA; Thu, 11 Oct 2012 05:48:05 +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 41FE88FC0C; Thu, 11 Oct 2012 05:48:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9B5m5KO067258; Thu, 11 Oct 2012 05:48:05 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9B5m5Zu067255; Thu, 11 Oct 2012 05:48:05 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210110548.q9B5m5Zu067255@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 11 Oct 2012 05:48:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241436 - head/sys/dev/bge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 05:48:05 -0000 Author: yongari Date: Thu Oct 11 05:48:04 2012 New Revision: 241436 URL: http://svn.freebsd.org/changeset/base/241436 Log: Rework controller reset procedure. Previously driver saved BGE_PCI_PCISTATE register before issuing global reset. After issuing reset, it reads BGE_PCI_PCISTATE register again and compares the saved register value and current value. It was used to know whether the global reset operation was completed or not. Unfortunately, this logic caused several issues on recent BCM5717/ 5718/5719 and BCM5720 controllers. It seems APE firmware accesses some registers while global reset is in progress such that reading BGE_PCI_PCISTATE register after reset does not yield old pre-reset state value. This resulted in consuming too much time in global reset and sometimes it couldn't successfully complete reset. The BGE_MISCCFG_RESET_CORE_CLOCKS of BGE_MISC_CFG register is self-clearing bit so driver is able to know the reset completion. But the core-lock reset will disable indirect/flat/standard access modes such that driver cannot poll BGE_MISCCFG_RESET_CORE_CLOCKS bit of BGE_MISC_CFG register. So just wait enough time for core-clock reset to complete. Data sheet says driver should wait 100us for PCI/PCI-X devices and 100ms for PCIe devices. I chose 1ms for PCI/PCI-X since this value was used for many years in bge(4). For PCIe devices, use 100ms as recommended by data sheet. bge_chipinit() also cleared BGE_MAC_MODE register which shall clear firmware configured mode information. I think this will result in losing ASF/IPMI link in device attachment. Let bge_reset() honor firmware configured BGE_MAC_MODE register and don't announce driver is UP in bge_reset(). Firmware should have control over driver until it's fully initialized by driver. While I'm here, enable workaround for PCI-X BCM5704 A0 in bge_reset(). This will prevent internal arbitration logic from switching to the other DMA engine after a retry cycle. Modified: head/sys/dev/bge/if_bge.c head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Thu Oct 11 01:32:51 2012 (r241435) +++ head/sys/dev/bge/if_bge.c Thu Oct 11 05:48:04 2012 (r241436) @@ -1433,10 +1433,6 @@ bge_chipinit(struct bge_softc *sc) misc_ctl |= BGE_PCIMISCCTL_TAGGED_STATUS; pci_write_config(sc->bge_dev, BGE_PCI_MISC_CTL, misc_ctl, 4); - /* Clear the MAC control register */ - CSR_WRITE_4(sc, BGE_MAC_MODE, 0); - DELAY(40); - /* * Clear the MAC statistics block in the NIC's * internal memory. @@ -3560,13 +3556,16 @@ static int bge_reset(struct bge_softc *sc) { device_t dev; - uint32_t cachesize, command, pcistate, reset, val; + uint32_t cachesize, command, mac_mode, mac_mode_mask, reset, val; void (*write_op)(struct bge_softc *, int, int); uint16_t devctl; int i; dev = sc->bge_dev; + mac_mode_mask = BGE_MACMODE_HALF_DUPLEX | BGE_MACMODE_PORTMODE; + mac_mode = CSR_READ_4(sc, BGE_MAC_MODE) & mac_mode_mask; + if (BGE_IS_575X_PLUS(sc) && !BGE_IS_5714_FAMILY(sc) && (sc->bge_asicrev != BGE_ASICREV_BCM5906)) { if (sc->bge_flags & BGE_FLAG_PCIE) @@ -3579,7 +3578,6 @@ bge_reset(struct bge_softc *sc) /* Save some important PCI state. */ cachesize = pci_read_config(dev, BGE_PCI_CACHESZ, 4); command = pci_read_config(dev, BGE_PCI_CMD, 4); - pcistate = pci_read_config(dev, BGE_PCI_PCISTATE, 4); pci_write_config(dev, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_INDIRECT_ACCESS | BGE_PCIMISCCTL_MASK_PCI_INTR | @@ -3636,7 +3634,10 @@ bge_reset(struct bge_softc *sc) /* Issue global reset */ write_op(sc, BGE_MISC_CFG, reset); - DELAY(1000); + if (sc->bge_flags & BGE_FLAG_PCIE) + DELAY(100 * 1000); + else + DELAY(1000); /* XXX: Broadcom Linux driver. */ if (sc->bge_flags & BGE_FLAG_PCIE) { @@ -3664,9 +3665,13 @@ bge_reset(struct bge_softc *sc) pci_write_config(dev, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_INDIRECT_ACCESS | BGE_PCIMISCCTL_MASK_PCI_INTR | BGE_HIF_SWAP_OPTIONS | BGE_PCIMISCCTL_PCISTATE_RW, 4); + val = BGE_PCISTATE_ROM_ENABLE | BGE_PCISTATE_ROM_RETRY_ENABLE; + if (sc->bge_chipid == BGE_CHIPID_BCM5704_A0 && + (sc->bge_flags & BGE_FLAG_PCIX) != 0) + val |= BGE_PCISTATE_RETRY_SAME_DMA; + pci_write_config(dev, BGE_PCI_PCISTATE, val, 4); pci_write_config(dev, BGE_PCI_CACHESZ, cachesize, 4); pci_write_config(dev, BGE_PCI_CMD, command, 4); - write_op(sc, BGE_MISC_CFG, BGE_32BITTIME_66MHZ); /* * Disable PCI-X relaxed ordering to ensure status block update * comes first then packet buffer DMA. Otherwise driver may @@ -3705,6 +3710,14 @@ bge_reset(struct bge_softc *sc) } else CSR_WRITE_4(sc, BGE_MARB_MODE, BGE_MARBMODE_ENABLE); + /* Fix up byte swapping. */ + CSR_WRITE_4(sc, BGE_MODE_CTL, bge_dma_swap_options(sc)); + + val = CSR_READ_4(sc, BGE_MAC_MODE); + val = (val & ~mac_mode_mask) | mac_mode; + CSR_WRITE_4(sc, BGE_MAC_MODE, val); + DELAY(40); + if (sc->bge_asicrev == BGE_ASICREV_BCM5906) { for (i = 0; i < BGE_TIMEOUT; i++) { val = CSR_READ_4(sc, BGE_VCPU_STATUS); @@ -3740,30 +3753,6 @@ bge_reset(struct bge_softc *sc) } /* - * XXX Wait for the value of the PCISTATE register to - * return to its original pre-reset state. This is a - * fairly good indicator of reset completion. If we don't - * wait for the reset to fully complete, trying to read - * from the device's non-PCI registers may yield garbage - * results. - */ - for (i = 0; i < BGE_TIMEOUT; i++) { - if (pci_read_config(dev, BGE_PCI_PCISTATE, 4) == pcistate) - break; - DELAY(10); - } - - /* Fix up byte swapping. */ - CSR_WRITE_4(sc, BGE_MODE_CTL, bge_dma_swap_options(sc)); - - /* Tell the ASF firmware we are up */ - if (sc->bge_asf_mode & ASF_STACKUP) - BGE_SETBIT(sc, BGE_MODE_CTL, BGE_MODECTL_STACKUP); - - CSR_WRITE_4(sc, BGE_MAC_MODE, 0); - DELAY(40); - - /* * The 5704 in TBI mode apparently needs some special * adjustment to insure the SERDES drive level is set * to 1.2V. Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Thu Oct 11 01:32:51 2012 (r241435) +++ head/sys/dev/bge/if_bgereg.h Thu Oct 11 05:48:04 2012 (r241436) @@ -430,10 +430,11 @@ #define BGE_PCISTATE_PCI_BUSMODE 0x00000004 /* 1 = PCI, 0 = PCI-X */ #define BGE_PCISTATE_PCI_BUSSPEED 0x00000008 /* 1 = 66/133, 0 = 33/66 */ #define BGE_PCISTATE_32BIT_BUS 0x00000010 /* 1 = 32bit, 0 = 64bit */ -#define BGE_PCISTATE_WANT_EXPROM 0x00000020 -#define BGE_PCISTATE_EXPROM_RETRY 0x00000040 +#define BGE_PCISTATE_ROM_ENABLE 0x00000020 +#define BGE_PCISTATE_ROM_RETRY_ENABLE 0x00000040 #define BGE_PCISTATE_FLATVIEW_MODE 0x00000100 #define BGE_PCISTATE_PCI_TGT_RETRY_MAX 0x00000E00 +#define BGE_PCISTATE_RETRY_SAME_DMA 0x00002000 /* * PCI Clock Control register -- note, this register is read only From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 06:07:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1A3FA821; Thu, 11 Oct 2012 06:07:49 +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 031058FC08; Thu, 11 Oct 2012 06:07:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9B67mDD069668; Thu, 11 Oct 2012 06:07:48 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9B67mvD069666; Thu, 11 Oct 2012 06:07:48 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210110607.q9B67mvD069666@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 11 Oct 2012 06:07:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241437 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 06:07:49 -0000 Author: yongari Date: Thu Oct 11 06:07:48 2012 New Revision: 241437 URL: http://svn.freebsd.org/changeset/base/241437 Log: For 5717C/5719C/5720C and 57765 PHYs, do not perform any special handling(jumbo, wire speed etc) in brgphy_reset(). Touching BRGPHY_MII_AUXCTL register seems to confuse APE firmware such that it couldn't establish a link. Modified: head/sys/dev/mii/brgphy.c Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Thu Oct 11 05:48:04 2012 (r241436) +++ head/sys/dev/mii/brgphy.c Thu Oct 11 06:07:48 2012 (r241437) @@ -918,6 +918,15 @@ brgphy_reset(struct mii_softc *sc) break; } break; + case MII_OUI_BROADCOM3: + switch (sc->mii_mpd_model) { + case MII_MODEL_BROADCOM3_BCM5717C: + case MII_MODEL_BROADCOM3_BCM5719C: + case MII_MODEL_BROADCOM3_BCM5720C: + case MII_MODEL_BROADCOM3_BCM57765: + return; + } + break; } ifp = sc->mii_pdata->mii_ifp; From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 06:43:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 008391AA; Thu, 11 Oct 2012 06:43:43 +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 975C98FC12; Thu, 11 Oct 2012 06:43:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9B6hhUh074379; Thu, 11 Oct 2012 06:43:43 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9B6hhLW074376; Thu, 11 Oct 2012 06:43:43 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210110643.q9B6hhLW074376@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 11 Oct 2012 06:43:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241438 - head/sys/dev/bge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 06:43:44 -0000 Author: yongari Date: Thu Oct 11 06:43:43 2012 New Revision: 241438 URL: http://svn.freebsd.org/changeset/base/241438 Log: Add APE firmware support and improve firmware handshake procedure. This change will enable IPMI access on 5717/5718/5719/5720 and 5761 controllers. Because ASF is not available when APE firmware is present, bge_allow_asf tunable is ignored when driver detects APE firmware. Also bge(4) no longer performs two resets(one blind reset and the other reset with firmware in mind) in device attach. Now bge(4) performs a reset with enough information in bge_reset(). The APE firmware also needs special handling to make suspend/resume work but it was not implemented yet. With this change, bge(4) should work on any 5717/5718/5719/5720 controllers. Special thanks to Mike Hibler at Emulab who setup remote debugging on Dell R820. Without his help I couldn't be able to address several issues happened on Dell Rx20 systems. And many thanks to Broadcom for continuing to support FreeBSD! Submitted by: davidch (initial version) H/W donated by: Broadcom Tested by: many Tested on: Del R820/R720/R620/R420/R320 and HP Proliant DL 360 G8 Modified: head/sys/dev/bge/if_bge.c head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Thu Oct 11 06:07:48 2012 (r241437) +++ head/sys/dev/bge/if_bge.c Thu Oct 11 06:43:43 2012 (r241438) @@ -461,8 +461,9 @@ static void bge_miibus_statchg(device_t) static int bge_poll(struct ifnet *ifp, enum poll_cmd cmd, int count); #endif -#define BGE_RESET_START 1 -#define BGE_RESET_STOP 2 +#define BGE_RESET_SHUTDOWN 0 +#define BGE_RESET_START 1 +#define BGE_RESET_SUSPEND 2 static void bge_sig_post_reset(struct bge_softc *, int); static void bge_sig_legacy(struct bge_softc *, int); static void bge_sig_pre_reset(struct bge_softc *, int); @@ -470,6 +471,13 @@ static void bge_stop_fw(struct bge_softc static int bge_reset(struct bge_softc *); static void bge_link_upd(struct bge_softc *); +static void bge_ape_lock_init(struct bge_softc *); +static void bge_ape_read_fw_ver(struct bge_softc *); +static int bge_ape_lock(struct bge_softc *, int); +static void bge_ape_unlock(struct bge_softc *, int); +static void bge_ape_send_event(struct bge_softc *, uint32_t); +static void bge_ape_driver_state_change(struct bge_softc *, int); + /* * The BGE_REGISTER_DEBUG option is only for low-level debugging. It may * leak information to untrusted users. It is also known to cause alignment @@ -478,6 +486,7 @@ static void bge_link_upd(struct bge_soft #ifdef BGE_REGISTER_DEBUG static int bge_sysctl_debug_info(SYSCTL_HANDLER_ARGS); static int bge_sysctl_reg_read(SYSCTL_HANDLER_ARGS); +static int bge_sysctl_ape_read(SYSCTL_HANDLER_ARGS); static int bge_sysctl_mem_read(SYSCTL_HANDLER_ARGS); #endif static void bge_add_sysctls(struct bge_softc *); @@ -643,6 +652,318 @@ bge_writembx(struct bge_softc *sc, int o } /* + * Clear all stale locks and select the lock for this driver instance. + */ +static void +bge_ape_lock_init(struct bge_softc *sc) +{ + uint32_t bit, regbase; + int i; + + if (sc->bge_asicrev == BGE_ASICREV_BCM5761) + regbase = BGE_APE_LOCK_GRANT; + else + regbase = BGE_APE_PER_LOCK_GRANT; + + /* Clear any stale locks. */ + for (i = BGE_APE_LOCK_PHY0; i <= BGE_APE_LOCK_GPIO; i++) { + switch (i) { + case BGE_APE_LOCK_PHY0: + case BGE_APE_LOCK_PHY1: + case BGE_APE_LOCK_PHY2: + case BGE_APE_LOCK_PHY3: + bit = BGE_APE_LOCK_GRANT_DRIVER0; + break; + default: + if (sc->bge_func_addr != 0) + bit = BGE_APE_LOCK_GRANT_DRIVER0; + else + bit = (1 << sc->bge_func_addr); + } + APE_WRITE_4(sc, regbase + 4 * i, bit); + } + + /* Select the PHY lock based on the device's function number. */ + switch (sc->bge_func_addr) { + case 0: + sc->bge_phy_ape_lock = BGE_APE_LOCK_PHY0; + break; + case 1: + sc->bge_phy_ape_lock = BGE_APE_LOCK_PHY1; + break; + case 2: + sc->bge_phy_ape_lock = BGE_APE_LOCK_PHY2; + break; + case 3: + sc->bge_phy_ape_lock = BGE_APE_LOCK_PHY3; + break; + default: + device_printf(sc->bge_dev, + "PHY lock not supported on this function\n"); + } +} + +/* + * Check for APE firmware, set flags, and print version info. + */ +static void +bge_ape_read_fw_ver(struct bge_softc *sc) +{ + const char *fwtype; + uint32_t apedata, features; + + /* Check for a valid APE signature in shared memory. */ + apedata = APE_READ_4(sc, BGE_APE_SEG_SIG); + if (apedata != BGE_APE_SEG_SIG_MAGIC) { + sc->bge_mfw_flags &= ~ BGE_MFW_ON_APE; + return; + } + + /* Check if APE firmware is running. */ + apedata = APE_READ_4(sc, BGE_APE_FW_STATUS); + if ((apedata & BGE_APE_FW_STATUS_READY) == 0) { + device_printf(sc->bge_dev, "APE signature found " + "but FW status not ready! 0x%08x\n", apedata); + return; + } + + sc->bge_mfw_flags |= BGE_MFW_ON_APE; + + /* Fetch the APE firwmare type and version. */ + apedata = APE_READ_4(sc, BGE_APE_FW_VERSION); + features = APE_READ_4(sc, BGE_APE_FW_FEATURES); + if ((features & BGE_APE_FW_FEATURE_NCSI) != 0) { + sc->bge_mfw_flags |= BGE_MFW_TYPE_NCSI; + fwtype = "NCSI"; + } else if ((features & BGE_APE_FW_FEATURE_DASH) != 0) { + sc->bge_mfw_flags |= BGE_MFW_TYPE_DASH; + fwtype = "DASH"; + } else + fwtype = "UNKN"; + + /* Print the APE firmware version. */ + device_printf(sc->bge_dev, "APE FW version: %s v%d.%d.%d.%d\n", + fwtype, + (apedata & BGE_APE_FW_VERSION_MAJMSK) >> BGE_APE_FW_VERSION_MAJSFT, + (apedata & BGE_APE_FW_VERSION_MINMSK) >> BGE_APE_FW_VERSION_MINSFT, + (apedata & BGE_APE_FW_VERSION_REVMSK) >> BGE_APE_FW_VERSION_REVSFT, + (apedata & BGE_APE_FW_VERSION_BLDMSK)); +} + +static int +bge_ape_lock(struct bge_softc *sc, int locknum) +{ + uint32_t bit, gnt, req, status; + int i, off; + + if ((sc->bge_mfw_flags & BGE_MFW_ON_APE) == 0) + return (0); + + /* Lock request/grant registers have different bases. */ + if (sc->bge_asicrev == BGE_ASICREV_BCM5761) { + req = BGE_APE_LOCK_REQ; + gnt = BGE_APE_LOCK_GRANT; + } else { + req = BGE_APE_PER_LOCK_REQ; + gnt = BGE_APE_PER_LOCK_GRANT; + } + + off = 4 * locknum; + + switch (locknum) { + case BGE_APE_LOCK_GPIO: + /* Lock required when using GPIO. */ + if (sc->bge_asicrev == BGE_ASICREV_BCM5761) + return (0); + if (sc->bge_func_addr == 0) + bit = BGE_APE_LOCK_REQ_DRIVER0; + else + bit = (1 << sc->bge_func_addr); + break; + case BGE_APE_LOCK_GRC: + /* Lock required to reset the device. */ + if (sc->bge_func_addr == 0) + bit = BGE_APE_LOCK_REQ_DRIVER0; + else + bit = (1 << sc->bge_func_addr); + break; + case BGE_APE_LOCK_MEM: + /* Lock required when accessing certain APE memory. */ + if (sc->bge_func_addr == 0) + bit = BGE_APE_LOCK_REQ_DRIVER0; + else + bit = (1 << sc->bge_func_addr); + break; + case BGE_APE_LOCK_PHY0: + case BGE_APE_LOCK_PHY1: + case BGE_APE_LOCK_PHY2: + case BGE_APE_LOCK_PHY3: + /* Lock required when accessing PHYs. */ + bit = BGE_APE_LOCK_REQ_DRIVER0; + break; + default: + return (EINVAL); + } + + /* Request a lock. */ + APE_WRITE_4(sc, req + off, bit); + + /* Wait up to 1 second to acquire lock. */ + for (i = 0; i < 20000; i++) { + status = APE_READ_4(sc, gnt + off); + if (status == bit) + break; + DELAY(50); + } + + /* Handle any errors. */ + if (status != bit) { + device_printf(sc->bge_dev, "APE lock %d request failed! " + "request = 0x%04x[0x%04x], status = 0x%04x[0x%04x]\n", + locknum, req + off, bit & 0xFFFF, gnt + off, + status & 0xFFFF); + /* Revoke the lock request. */ + APE_WRITE_4(sc, gnt + off, bit); + return (EBUSY); + } + + return (0); +} + +static void +bge_ape_unlock(struct bge_softc *sc, int locknum) +{ + uint32_t bit, gnt; + int off; + + if ((sc->bge_mfw_flags & BGE_MFW_ON_APE) == 0) + return; + + if (sc->bge_asicrev == BGE_ASICREV_BCM5761) + gnt = BGE_APE_LOCK_GRANT; + else + gnt = BGE_APE_PER_LOCK_GRANT; + + off = 4 * locknum; + + switch (locknum) { + case BGE_APE_LOCK_GPIO: + if (sc->bge_asicrev == BGE_ASICREV_BCM5761) + return; + if (sc->bge_func_addr == 0) + bit = BGE_APE_LOCK_GRANT_DRIVER0; + else + bit = (1 << sc->bge_func_addr); + break; + case BGE_APE_LOCK_GRC: + if (sc->bge_func_addr == 0) + bit = BGE_APE_LOCK_GRANT_DRIVER0; + else + bit = (1 << sc->bge_func_addr); + break; + case BGE_APE_LOCK_MEM: + if (sc->bge_func_addr == 0) + bit = BGE_APE_LOCK_GRANT_DRIVER0; + else + bit = (1 << sc->bge_func_addr); + break; + case BGE_APE_LOCK_PHY0: + case BGE_APE_LOCK_PHY1: + case BGE_APE_LOCK_PHY2: + case BGE_APE_LOCK_PHY3: + bit = BGE_APE_LOCK_GRANT_DRIVER0; + break; + default: + return; + } + + APE_WRITE_4(sc, gnt + off, bit); +} + +/* + * Send an event to the APE firmware. + */ +static void +bge_ape_send_event(struct bge_softc *sc, uint32_t event) +{ + uint32_t apedata; + int i; + + /* NCSI does not support APE events. */ + if ((sc->bge_mfw_flags & BGE_MFW_ON_APE) == 0) + return; + + /* Wait up to 1ms for APE to service previous event. */ + for (i = 10; i > 0; i--) { + if (bge_ape_lock(sc, BGE_APE_LOCK_MEM) != 0) + break; + apedata = APE_READ_4(sc, BGE_APE_EVENT_STATUS); + if ((apedata & BGE_APE_EVENT_STATUS_EVENT_PENDING) == 0) { + APE_WRITE_4(sc, BGE_APE_EVENT_STATUS, event | + BGE_APE_EVENT_STATUS_EVENT_PENDING); + bge_ape_unlock(sc, BGE_APE_LOCK_MEM); + APE_WRITE_4(sc, BGE_APE_EVENT, BGE_APE_EVENT_1); + break; + } + bge_ape_unlock(sc, BGE_APE_LOCK_MEM); + DELAY(100); + } + if (i == 0) + device_printf(sc->bge_dev, "APE event 0x%08x send timed out\n", + event); +} + +static void +bge_ape_driver_state_change(struct bge_softc *sc, int kind) +{ + uint32_t apedata, event; + + if ((sc->bge_mfw_flags & BGE_MFW_ON_APE) == 0) + return; + + switch (kind) { + case BGE_RESET_START: + /* If this is the first load, clear the load counter. */ + apedata = APE_READ_4(sc, BGE_APE_HOST_SEG_SIG); + if (apedata != BGE_APE_HOST_SEG_SIG_MAGIC) + APE_WRITE_4(sc, BGE_APE_HOST_INIT_COUNT, 0); + else { + apedata = APE_READ_4(sc, BGE_APE_HOST_INIT_COUNT); + APE_WRITE_4(sc, BGE_APE_HOST_INIT_COUNT, ++apedata); + } + APE_WRITE_4(sc, BGE_APE_HOST_SEG_SIG, + BGE_APE_HOST_SEG_SIG_MAGIC); + APE_WRITE_4(sc, BGE_APE_HOST_SEG_LEN, + BGE_APE_HOST_SEG_LEN_MAGIC); + + /* Add some version info if bge(4) supports it. */ + APE_WRITE_4(sc, BGE_APE_HOST_DRIVER_ID, + BGE_APE_HOST_DRIVER_ID_MAGIC(1, 0)); + APE_WRITE_4(sc, BGE_APE_HOST_BEHAVIOR, + BGE_APE_HOST_BEHAV_NO_PHYLOCK); + APE_WRITE_4(sc, BGE_APE_HOST_HEARTBEAT_INT_MS, + BGE_APE_HOST_HEARTBEAT_INT_DISABLE); + APE_WRITE_4(sc, BGE_APE_HOST_DRVR_STATE, + BGE_APE_HOST_DRVR_STATE_START); + event = BGE_APE_EVENT_STATUS_STATE_START; + break; + case BGE_RESET_SHUTDOWN: + APE_WRITE_4(sc, BGE_APE_HOST_DRVR_STATE, + BGE_APE_HOST_DRVR_STATE_UNLOAD); + event = BGE_APE_EVENT_STATUS_STATE_UNLOAD; + break; + case BGE_RESET_SUSPEND: + event = BGE_APE_EVENT_STATUS_STATE_SUSPEND; + break; + default: + return; + } + + bge_ape_send_event(sc, event | BGE_APE_EVENT_STATUS_DRIVER_EVNT | + BGE_APE_EVENT_STATUS_STATE_CHNGE); +} + +/* * Map a single buffer address. */ @@ -806,6 +1127,9 @@ bge_miibus_readreg(device_t dev, int phy sc = device_get_softc(dev); + if (bge_ape_lock(sc, sc->bge_phy_ape_lock) != 0) + return (0); + /* Clear the autopoll bit if set, otherwise may trigger PCI errors. */ if ((sc->bge_mi_mode & BGE_MIMODE_AUTOPOLL) != 0) { CSR_WRITE_4(sc, BGE_MI_MODE, @@ -840,6 +1164,8 @@ bge_miibus_readreg(device_t dev, int phy DELAY(80); } + bge_ape_unlock(sc, sc->bge_phy_ape_lock); + if (val & BGE_MICOMM_READFAIL) return (0); @@ -858,6 +1184,9 @@ bge_miibus_writereg(device_t dev, int ph (reg == BRGPHY_MII_1000CTL || reg == BRGPHY_MII_AUXCTL)) return (0); + if (bge_ape_lock(sc, sc->bge_phy_ape_lock) != 0) + return (0); + /* Clear the autopoll bit if set, otherwise may trigger PCI errors. */ if ((sc->bge_mi_mode & BGE_MIMODE_AUTOPOLL) != 0) { CSR_WRITE_4(sc, BGE_MI_MODE, @@ -883,6 +1212,8 @@ bge_miibus_writereg(device_t dev, int ph DELAY(80); } + bge_ape_unlock(sc, sc->bge_phy_ape_lock); + if (i == BGE_TIMEOUT) device_printf(sc->bge_dev, "PHY write timed out (phy %d, reg %d, val 0x%04x)\n", @@ -1335,12 +1666,19 @@ bge_sig_pre_reset(struct bge_softc *sc, bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB, BGE_FW_DRV_STATE_START); break; - case BGE_RESET_STOP: + case BGE_RESET_SHUTDOWN: bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB, BGE_FW_DRV_STATE_UNLOAD); break; + case BGE_RESET_SUSPEND: + bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB, + BGE_FW_DRV_STATE_SUSPEND); + break; } } + + if (type == BGE_RESET_START || type == BGE_RESET_SUSPEND) + bge_ape_driver_state_change(sc, type); } static void @@ -1354,12 +1692,14 @@ bge_sig_post_reset(struct bge_softc *sc, BGE_FW_DRV_STATE_START_DONE); /* START DONE */ break; - case BGE_RESET_STOP: + case BGE_RESET_SHUTDOWN: bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB, BGE_FW_DRV_STATE_UNLOAD_DONE); break; } } + if (type == BGE_RESET_SHUTDOWN) + bge_ape_driver_state_change(sc, type); } static void @@ -1372,7 +1712,7 @@ bge_sig_legacy(struct bge_softc *sc, int bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB, BGE_FW_DRV_STATE_START); break; - case BGE_RESET_STOP: + case BGE_RESET_SHUTDOWN: bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB, BGE_FW_DRV_STATE_UNLOAD); break; @@ -1409,11 +1749,6 @@ bge_dma_swap_options(struct bge_softc *s #if BYTE_ORDER == BIG_ENDIAN dma_options |= BGE_MODECTL_BYTESWAP_NONFRAME; #endif - if ((sc)->bge_asicrev == BGE_ASICREV_BCM5720) - dma_options |= BGE_MODECTL_BYTESWAP_B2HRX_DATA | - BGE_MODECTL_WORDSWAP_B2HRX_DATA | BGE_MODECTL_B2HRX_ENABLE | - BGE_MODECTL_HTX2B_ENABLE; - return (dma_options); } @@ -1540,8 +1875,16 @@ bge_chipinit(struct bge_softc *sc) /* * Set up general mode register. */ - mode_ctl = bge_dma_swap_options(sc) | BGE_MODECTL_MAC_ATTN_INTR | - BGE_MODECTL_HOST_SEND_BDS | BGE_MODECTL_TX_NO_PHDR_CSUM; + mode_ctl = bge_dma_swap_options(sc); + if (sc->bge_asicrev == BGE_ASICREV_BCM5720) { + /* Retain Host-2-BMC settings written by APE firmware. */ + mode_ctl |= CSR_READ_4(sc, BGE_MODE_CTL) & + (BGE_MODECTL_BYTESWAP_B2HRX_DATA | + BGE_MODECTL_WORDSWAP_B2HRX_DATA | + BGE_MODECTL_B2HRX_ENABLE | BGE_MODECTL_HTX2B_ENABLE); + } + mode_ctl |= BGE_MODECTL_MAC_ATTN_INTR | BGE_MODECTL_HOST_SEND_BDS | + BGE_MODECTL_TX_NO_PHDR_CSUM; /* * BCM5701 B5 have a bug causing data corruption when using @@ -2045,6 +2388,10 @@ bge_blockinit(struct bge_softc *sc) else val |= BGE_PORTMODE_MII; + /* Allow APE to send/receive frames. */ + if ((sc->bge_mfw_flags & BGE_MFW_ON_APE) != 0) + val |= BGE_MACMODE_APE_RX_EN | BGE_MACMODE_APE_TX_EN; + CSR_WRITE_4(sc, BGE_MAC_MODE, val); DELAY(40); @@ -2866,9 +3213,9 @@ bge_attach(device_t dev) { struct ifnet *ifp; struct bge_softc *sc; - uint32_t hwcfg = 0, misccfg; + uint32_t hwcfg = 0, misccfg, pcistate; u_char eaddr[ETHER_ADDR_LEN]; - int capmask, error, f, msicount, phy_addr, reg, rid, trys; + int capmask, error, msicount, phy_addr, reg, rid, trys; sc = device_get_softc(dev); sc->bge_dev = dev; @@ -2887,12 +3234,13 @@ bge_attach(device_t dev) RF_ACTIVE); if (sc->bge_res == NULL) { - device_printf (sc->bge_dev, "couldn't map memory\n"); + device_printf (sc->bge_dev, "couldn't map BAR0 memory\n"); error = ENXIO; goto fail; } /* Save various chip information. */ + sc->bge_func_addr = pci_get_function(dev); sc->bge_chipid = pci_read_config(dev, BGE_PCI_MISC_CTL, 4) >> BGE_PCIMISCCTL_ASICREV_SHIFT; @@ -2939,25 +3287,32 @@ bge_attach(device_t dev) * BCM5719 | 1 | 8 | 2 | 9 | * BCM5720 | 1 | 8 | 2 | 9 | * + * | F2 Cu | F2 Sr | F3 Cu | F3 Sr | + * ---------+-------+-------+-------+-------+ + * BCM57XX | X | X | X | X | + * BCM5704 | X | X | X | X | + * BCM5717 | X | X | X | X | + * BCM5719 | 3 | 10 | 4 | 11 | + * BCM5720 | X | X | X | X | + * * Other addresses may respond but they are not * IEEE compliant PHYs and should be ignored. */ if (sc->bge_asicrev == BGE_ASICREV_BCM5717 || sc->bge_asicrev == BGE_ASICREV_BCM5719 || sc->bge_asicrev == BGE_ASICREV_BCM5720) { - f = pci_get_function(dev); - if (sc->bge_chipid == BGE_CHIPID_BCM5717_A0) { + if (sc->bge_chipid != BGE_CHIPID_BCM5717_A0) { if (CSR_READ_4(sc, BGE_SGDIG_STS) & BGE_SGDIGSTS_IS_SERDES) - phy_addr = f + 8; + phy_addr = sc->bge_func_addr + 8; else - phy_addr = f + 1; + phy_addr = sc->bge_func_addr + 1; } else { if (CSR_READ_4(sc, BGE_CPMU_PHY_STRAP) & BGE_CPMU_PHY_STRAP_IS_SERDES) - phy_addr = f + 8; + phy_addr = sc->bge_func_addr + 8; else - phy_addr = f + 1; + phy_addr = sc->bge_func_addr + 1; } } @@ -3020,6 +3375,39 @@ bge_attach(device_t dev) break; } + /* Identify chips with APE processor. */ + switch (sc->bge_asicrev) { + case BGE_ASICREV_BCM5717: + case BGE_ASICREV_BCM5719: + case BGE_ASICREV_BCM5720: + case BGE_ASICREV_BCM5761: + sc->bge_flags |= BGE_FLAG_APE; + break; + } + + /* Chips with APE need BAR2 access for APE registers/memory. */ + if ((sc->bge_flags & BGE_FLAG_APE) != 0) { + rid = PCIR_BAR(2); + sc->bge_res2 = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->bge_res2 == NULL) { + device_printf (sc->bge_dev, + "couldn't map BAR2 memory\n"); + error = ENXIO; + goto fail; + } + + /* Enable APE register/memory access by host driver. */ + pcistate = pci_read_config(dev, BGE_PCI_PCISTATE, 4); + pcistate |= BGE_PCISTATE_ALLOW_APE_CTLSPC_WR | + BGE_PCISTATE_ALLOW_APE_SHMEM_WR | + BGE_PCISTATE_ALLOW_APE_PSPACE_WR; + pci_write_config(dev, BGE_PCI_PCISTATE, pcistate, 4); + + bge_ape_lock_init(sc); + bge_ape_read_fw_ver(sc); + } + /* Add SYSCTLs, requires the chipset family to be set. */ bge_add_sysctls(sc); @@ -3239,36 +3627,31 @@ bge_attach(device_t dev) bge_devinfo(sc); - /* Try to reset the chip. */ - if (bge_reset(sc)) { - device_printf(sc->bge_dev, "chip reset failed\n"); - error = ENXIO; - goto fail; - } - sc->bge_asf_mode = 0; - if (bge_allow_asf && (bge_readmem_ind(sc, BGE_SRAM_DATA_SIG) == - BGE_SRAM_DATA_SIG_MAGIC)) { - if (bge_readmem_ind(sc, BGE_SRAM_DATA_CFG) - & BGE_HWCFG_ASF) { - sc->bge_asf_mode |= ASF_ENABLE; - sc->bge_asf_mode |= ASF_STACKUP; - if (BGE_IS_575X_PLUS(sc)) - sc->bge_asf_mode |= ASF_NEW_HANDSHAKE; + /* No ASF if APE present. */ + if ((sc->bge_flags & BGE_FLAG_APE) == 0) { + if (bge_allow_asf && (bge_readmem_ind(sc, BGE_SRAM_DATA_SIG) == + BGE_SRAM_DATA_SIG_MAGIC)) { + if (bge_readmem_ind(sc, BGE_SRAM_DATA_CFG) & + BGE_HWCFG_ASF) { + sc->bge_asf_mode |= ASF_ENABLE; + sc->bge_asf_mode |= ASF_STACKUP; + if (BGE_IS_575X_PLUS(sc)) + sc->bge_asf_mode |= ASF_NEW_HANDSHAKE; + } } } - /* Try to reset the chip again the nice way. */ bge_stop_fw(sc); - bge_sig_pre_reset(sc, BGE_RESET_STOP); + bge_sig_pre_reset(sc, BGE_RESET_START); if (bge_reset(sc)) { device_printf(sc->bge_dev, "chip reset failed\n"); error = ENXIO; goto fail; } - bge_sig_legacy(sc, BGE_RESET_STOP); - bge_sig_post_reset(sc, BGE_RESET_STOP); + bge_sig_legacy(sc, BGE_RESET_START); + bge_sig_post_reset(sc, BGE_RESET_START); if (bge_chipinit(sc)) { device_printf(sc->bge_dev, "chip initialization failed\n"); @@ -3543,6 +3926,10 @@ bge_release_resources(struct bge_softc * bus_release_resource(dev, SYS_RES_MEMORY, PCIR_BAR(0), sc->bge_res); + if (sc->bge_res2 != NULL) + bus_release_resource(dev, SYS_RES_MEMORY, + PCIR_BAR(2), sc->bge_res2); + if (sc->bge_ifp != NULL) if_free(sc->bge_ifp); @@ -3564,6 +3951,8 @@ bge_reset(struct bge_softc *sc) dev = sc->bge_dev; mac_mode_mask = BGE_MACMODE_HALF_DUPLEX | BGE_MACMODE_PORTMODE; + if ((sc->bge_mfw_flags & BGE_MFW_ON_APE) != 0) + mac_mode_mask |= BGE_MACMODE_APE_RX_EN | BGE_MACMODE_APE_TX_EN; mac_mode = CSR_READ_4(sc, BGE_MAC_MODE) & mac_mode_mask; if (BGE_IS_575X_PLUS(sc) && !BGE_IS_5714_FAMILY(sc) && @@ -3575,6 +3964,9 @@ bge_reset(struct bge_softc *sc) } else write_op = bge_writereg_ind; + /* Take APE lock when performing reset. */ + bge_ape_lock(sc, BGE_APE_LOCK_GRC); + /* Save some important PCI state. */ cachesize = pci_read_config(dev, BGE_PCI_CACHESZ, 4); command = pci_read_config(dev, BGE_PCI_CMD, 4); @@ -3669,6 +4061,10 @@ bge_reset(struct bge_softc *sc) if (sc->bge_chipid == BGE_CHIPID_BCM5704_A0 && (sc->bge_flags & BGE_FLAG_PCIX) != 0) val |= BGE_PCISTATE_RETRY_SAME_DMA; + if ((sc->bge_mfw_flags & BGE_MFW_ON_APE) != 0) + val |= BGE_PCISTATE_ALLOW_APE_CTLSPC_WR | + BGE_PCISTATE_ALLOW_APE_SHMEM_WR | + BGE_PCISTATE_ALLOW_APE_PSPACE_WR; pci_write_config(dev, BGE_PCI_PCISTATE, val, 4); pci_write_config(dev, BGE_PCI_CACHESZ, cachesize, 4); pci_write_config(dev, BGE_PCI_CMD, command, 4); @@ -3718,6 +4114,8 @@ bge_reset(struct bge_softc *sc) CSR_WRITE_4(sc, BGE_MAC_MODE, val); DELAY(40); + bge_ape_unlock(sc, BGE_APE_LOCK_GRC); + if (sc->bge_asicrev == BGE_ASICREV_BCM5906) { for (i = 0; i < BGE_TIMEOUT; i++) { val = CSR_READ_4(sc, BGE_VCPU_STATUS); @@ -4290,6 +4688,8 @@ bge_tick(void *xsc) else bge_stats_update(sc); + /* XXX Add APE heartbeat check here? */ + if ((sc->bge_flags & BGE_FLAG_TBI) == 0) { mii = device_get_softc(sc->bge_miibus); /* @@ -5033,7 +5433,10 @@ bge_init_locked(struct bge_softc *sc) DELAY(100); /* Turn on receiver. */ - BGE_SETBIT(sc, BGE_RX_MODE, BGE_RXMODE_ENABLE); + mode = CSR_READ_4(sc, BGE_RX_MODE); + if (BGE_IS_5755_PLUS(sc)) + mode |= BGE_RXMODE_IPV6_ENABLE; + CSR_WRITE_4(sc,BGE_RX_MODE, mode | BGE_RXMODE_ENABLE); DELAY(10); /* @@ -5439,7 +5842,7 @@ bge_stop(struct bge_softc *sc) * Tell firmware we're shutting down. */ bge_stop_fw(sc); - bge_sig_pre_reset(sc, BGE_RESET_STOP); + bge_sig_pre_reset(sc, BGE_RESET_SHUTDOWN); /* * Disable all of the receiver blocks. @@ -5485,8 +5888,8 @@ bge_stop(struct bge_softc *sc) bge_stats_update_regs(sc); bge_reset(sc); - bge_sig_legacy(sc, BGE_RESET_STOP); - bge_sig_post_reset(sc, BGE_RESET_STOP); + bge_sig_legacy(sc, BGE_RESET_SHUTDOWN); + bge_sig_post_reset(sc, BGE_RESET_SHUTDOWN); /* * Keep the ASF firmware running if up. @@ -5528,7 +5931,6 @@ bge_shutdown(device_t dev) sc = device_get_softc(dev); BGE_LOCK(sc); bge_stop(sc); - bge_reset(sc); BGE_UNLOCK(sc); return (0); @@ -5704,7 +6106,11 @@ bge_add_sysctls(struct bge_softc *sc) SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "reg_read", CTLTYPE_INT | CTLFLAG_RW, sc, 0, bge_sysctl_reg_read, "I", - "Register Read"); + "MAC Register Read"); + + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "ape_read", + CTLTYPE_INT | CTLFLAG_RW, sc, 0, bge_sysctl_ape_read, "I", + "APE Register Read"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "mem_read", CTLTYPE_INT | CTLFLAG_RW, sc, 0, bge_sysctl_mem_read, "I", @@ -6103,6 +6509,28 @@ bge_sysctl_reg_read(SYSCTL_HANDLER_ARGS) } static int +bge_sysctl_ape_read(SYSCTL_HANDLER_ARGS) +{ + struct bge_softc *sc; + int error; + uint16_t result; + uint32_t val; + + result = -1; + error = sysctl_handle_int(oidp, &result, 0, req); + if (error || (req->newptr == NULL)) + return (error); + + if (result < 0x8000) { + sc = (struct bge_softc *)arg1; + val = APE_READ_4(sc, result); + printf("reg 0x%06X = 0x%08X\n", result, val); + } + + return (error); +} + +static int bge_sysctl_mem_read(SYSCTL_HANDLER_ARGS) { struct bge_softc *sc; Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Thu Oct 11 06:07:48 2012 (r241437) +++ head/sys/dev/bge/if_bgereg.h Thu Oct 11 06:43:43 2012 (r241438) @@ -435,6 +435,9 @@ #define BGE_PCISTATE_FLATVIEW_MODE 0x00000100 #define BGE_PCISTATE_PCI_TGT_RETRY_MAX 0x00000E00 #define BGE_PCISTATE_RETRY_SAME_DMA 0x00002000 +#define BGE_PCISTATE_ALLOW_APE_CTLSPC_WR 0x00010000 +#define BGE_PCISTATE_ALLOW_APE_SHMEM_WR 0x00020000 +#define BGE_PCISTATE_ALLOW_APE_PSPACE_WR 0x00040000 /* * PCI Clock Control register -- note, this register is read only @@ -460,6 +463,8 @@ #define PCIM_CMD_INTxDIS 0x0400 #endif +/* BAR0 (MAC) Register Definitions */ + /* * High priority mailbox registers * Each mailbox is 64-bits wide, though we only use the @@ -742,6 +747,8 @@ #define BGE_MACMODE_TXDMA_ENB 0x00200000 #define BGE_MACMODE_RXDMA_ENB 0x00400000 #define BGE_MACMODE_FRMHDR_DMA_ENB 0x00800000 +#define BGE_MACMODE_APE_RX_EN 0x08000000 +#define BGE_MACMODE_APE_TX_EN 0x10000000 #define BGE_PORTMODE_NONE 0x00000000 #define BGE_PORTMODE_MII 0x00000004 @@ -829,6 +836,7 @@ #define BGE_RXMODE_RX_PROMISC 0x00000100 #define BGE_RXMODE_RX_NO_CRC_CHECK 0x00000200 #define BGE_RXMODE_RX_KEEP_VLAN_DIAG 0x00000400 +#define BGE_RXMODE_IPV6_ENABLE 0x01000000 /* Receive MAC status register */ #define BGE_RXSTAT_REMOTE_XOFFED 0x00000001 @@ -1578,6 +1586,22 @@ #define BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_BD_4K 0x00030000 #define BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_LSO_4K 0x000C0000 +/* BD Read DMA Mode register */ +#define BGE_RDMA_BD_MODE 0x4A00 +/* BD Read DMA Mode status register */ +#define BGE_RDMA_BD_STATUS 0x4A04 + +#define BGE_RDMA_BD_MODE_RESET 0x00000001 +#define BGE_RDMA_BD_MODE_ENABLE 0x00000002 + +/* Non-LSO Read DMA Mode register */ +#define BGE_RDMA_NON_LSO_MODE 0x4B00 +/* Non-LSO Read DMA Mode status register */ +#define BGE_RDMA_NON_LSO_STATUS 0x4B04 + +#define BGE_RDMA_NON_LSO_MODE_RESET 0x00000001 +#define BGE_RDMA_NON_LSO_MODE_ENABLE 0x00000002 + /* * Write DMA control registers */ @@ -2065,6 +2089,112 @@ #define BGE_MEMWIN_START 0x00008000 #define BGE_MEMWIN_END 0x0000FFFF +/* BAR1 (APE) Register Definitions */ + +#define BGE_APE_GPIO_MSG 0x0008 +#define BGE_APE_EVENT 0x000C +#define BGE_APE_LOCK_REQ 0x002C +#define BGE_APE_LOCK_GRANT 0x004C + +#define BGE_APE_GPIO_MSG_SHIFT 4 + +#define BGE_APE_EVENT_1 0x00000001 + +#define BGE_APE_LOCK_REQ_DRIVER0 0x00001000 + +#define BGE_APE_LOCK_GRANT_DRIVER0 0x00001000 + +/* APE Shared Memory block (writable by APE only) */ +#define BGE_APE_SEG_SIG 0x4000 +#define BGE_APE_FW_STATUS 0x400C +#define BGE_APE_FW_FEATURES 0x4010 +#define BGE_APE_FW_BEHAVIOR 0x4014 +#define BGE_APE_FW_VERSION 0x4018 +#define BGE_APE_FW_HEARTBEAT_INTERVAL 0x4024 +#define BGE_APE_FW_HEARTBEAT 0x4028 +#define BGE_APE_FW_ERROR_FLAGS 0x4074 + +#define BGE_APE_SEG_SIG_MAGIC 0x41504521 + +#define BGE_APE_FW_STATUS_READY 0x00000100 + +#define BGE_APE_FW_FEATURE_DASH 0x00000001 +#define BGE_APE_FW_FEATURE_NCSI 0x00000002 + +#define BGE_APE_FW_VERSION_MAJMSK 0xFF000000 +#define BGE_APE_FW_VERSION_MAJSFT 24 +#define BGE_APE_FW_VERSION_MINMSK 0x00FF0000 +#define BGE_APE_FW_VERSION_MINSFT 16 +#define BGE_APE_FW_VERSION_REVMSK 0x0000FF00 +#define BGE_APE_FW_VERSION_REVSFT 8 +#define BGE_APE_FW_VERSION_BLDMSK 0x000000FF + +/* Host Shared Memory block (writable by host only) */ +#define BGE_APE_HOST_SEG_SIG 0x4200 +#define BGE_APE_HOST_SEG_LEN 0x4204 +#define BGE_APE_HOST_INIT_COUNT 0x4208 +#define BGE_APE_HOST_DRIVER_ID 0x420C +#define BGE_APE_HOST_BEHAVIOR 0x4210 +#define BGE_APE_HOST_HEARTBEAT_INT_MS 0x4214 +#define BGE_APE_HOST_HEARTBEAT_COUNT 0x4218 +#define BGE_APE_HOST_DRVR_STATE 0x421C +#define BGE_APE_HOST_WOL_SPEED 0x4224 + +#define BGE_APE_HOST_SEG_SIG_MAGIC 0x484F5354 + +#define BGE_APE_HOST_SEG_LEN_MAGIC 0x00000020 + +#define BGE_APE_HOST_DRIVER_ID_FBSD 0xF6000000 +#define BGE_APE_HOST_DRIVER_ID_MAGIC(maj, min) \ + (BGE_APE_HOST_DRIVER_ID_FBSD | \ + ((maj) & 0xffd) << 16 | ((min) & 0xff) << 8) + +#define BGE_APE_HOST_BEHAV_NO_PHYLOCK 0x00000001 + +#define BGE_APE_HOST_HEARTBEAT_INT_DISABLE 0 +#define BGE_APE_HOST_HEARTBEAT_INT_5SEC 5000 + +#define BGE_APE_HOST_DRVR_STATE_START 0x00000001 +#define BGE_APE_HOST_DRVR_STATE_UNLOAD 0x00000002 +#define BGE_APE_HOST_DRVR_STATE_WOL 0x00000003 +#define BGE_APE_HOST_DRVR_STATE_SUSPEND 0x00000004 + +#define BGE_APE_HOST_WOL_SPEED_AUTO 0x00008000 + +#define BGE_APE_EVENT_STATUS 0x4300 + +#define BGE_APE_EVENT_STATUS_DRIVER_EVNT 0x00000010 +#define BGE_APE_EVENT_STATUS_STATE_CHNGE 0x00000500 +#define BGE_APE_EVENT_STATUS_STATE_START 0x00010000 +#define BGE_APE_EVENT_STATUS_STATE_UNLOAD 0x00020000 +#define BGE_APE_EVENT_STATUS_STATE_WOL 0x00030000 +#define BGE_APE_EVENT_STATUS_STATE_SUSPEND 0x00040000 +#define BGE_APE_EVENT_STATUS_EVENT_PENDING 0x80000000 + +#define BGE_APE_DEBUG_LOG 0x4E00 +#define BGE_APE_DEBUG_LOG_LEN 0x0100 + +#define BGE_APE_PER_LOCK_REQ 0x8400 +#define BGE_APE_PER_LOCK_GRANT 0x8420 + +#define BGE_APE_LOCK_PER_REQ_DRIVER0 0x00001000 +#define BGE_APE_LOCK_PER_REQ_DRIVER1 0x00000002 +#define BGE_APE_LOCK_PER_REQ_DRIVER2 0x00000004 +#define BGE_APE_LOCK_PER_REQ_DRIVER3 0x00000008 + +#define BGE_APE_PER_LOCK_GRANT_DRIVER0 0x00001000 +#define BGE_APE_PER_LOCK_GRANT_DRIVER1 0x00000002 +#define BGE_APE_PER_LOCK_GRANT_DRIVER2 0x00000004 +#define BGE_APE_PER_LOCK_GRANT_DRIVER3 0x00000008 + +/* APE Mutex Resources */ +#define BGE_APE_LOCK_PHY0 0 +#define BGE_APE_LOCK_GRC 1 +#define BGE_APE_LOCK_PHY1 2 +#define BGE_APE_LOCK_PHY2 3 +#define BGE_APE_LOCK_MEM 4 +#define BGE_APE_LOCK_PHY3 5 +#define BGE_APE_LOCK_GPIO 7 #define BGE_MEMWIN_READ(sc, x, val) \ do { \ @@ -2659,7 +2789,7 @@ struct bge_gib { #define BGE_INC(x, y) (x) = (x + 1) % y /* - * Register access macros. The Tigon always uses memory mapped register + * BAR0 MAC register access macros. The Tigon always uses memory mapped register * accesses and all registers must be accessed with 32 bit operations. */ @@ -2674,6 +2804,18 @@ struct bge_gib { #define BGE_CLRBIT(sc, reg, x) \ CSR_WRITE_4(sc, reg, (CSR_READ_4(sc, reg) & ~(x))) +/* BAR2 APE register access macros. */ +#define APE_WRITE_4(sc, reg, val) \ + bus_write_4(sc->bge_res2, reg, val) + +#define APE_READ_4(sc, reg) \ + bus_read_4(sc->bge_res2, reg) + +#define APE_SETBIT(sc, reg, x) \ + APE_WRITE_4(sc, reg, (APE_READ_4(sc, reg) | (x))) +#define APE_CLRBIT(sc, reg, x) \ + APE_WRITE_4(sc, reg, (APE_READ_4(sc, reg) & ~(x))) + #define PCI_SETBIT(dev, reg, x, s) \ pci_write_config(dev, reg, (pci_read_config(dev, reg, s) | (x)), s) #define PCI_CLRBIT(dev, reg, x, s) \ @@ -2790,7 +2932,8 @@ struct bge_softc { device_t bge_miibus; void *bge_intrhand; struct resource *bge_irq; - struct resource *bge_res; + struct resource *bge_res; /* MAC mapped I/O */ + struct resource *bge_res2; /* APE mapped I/O */ struct ifmedia bge_ifmedia; /* TBI media info */ int bge_expcap; int bge_expmrq; @@ -2804,6 +2947,7 @@ struct bge_softc { #define BGE_FLAG_MII_SERDES 0x00000010 #define BGE_FLAG_CPMU_PRESENT 0x00000020 #define BGE_FLAG_TAGGED_STATUS 0x00000040 +#define BGE_FLAG_APE 0x00000080 #define BGE_FLAG_MSI 0x00000100 #define BGE_FLAG_PCIX 0x00000200 #define BGE_FLAG_PCIE 0x00000400 @@ -2823,6 +2967,13 @@ struct bge_softc { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 07:39:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D046B60; Thu, 11 Oct 2012 07:39:52 +0000 (UTC) (envelope-from stefanf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EFEC78FC17; Thu, 11 Oct 2012 07:39:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9B7dp1Z081627; Thu, 11 Oct 2012 07:39:51 GMT (envelope-from stefanf@svn.freebsd.org) Received: (from stefanf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9B7dpjH081624; Thu, 11 Oct 2012 07:39:51 GMT (envelope-from stefanf@svn.freebsd.org) Message-Id: <201210110739.q9B7dpjH081624@svn.freebsd.org> From: Stefan Farfeleder Date: Thu, 11 Oct 2012 07:39:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241439 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 07:39:52 -0000 Author: stefanf Date: Thu Oct 11 07:39:51 2012 New Revision: 241439 URL: http://svn.freebsd.org/changeset/base/241439 Log: Apply some style. Checked with md5. Modified: head/lib/libc/gen/fstab.c Modified: head/lib/libc/gen/fstab.c ============================================================================== --- head/lib/libc/gen/fstab.c Thu Oct 11 06:43:43 2012 (r241438) +++ head/lib/libc/gen/fstab.c Thu Oct 11 07:39:51 2012 (r241439) @@ -76,7 +76,7 @@ setfstab(const char *file) } const char * -getfstab (void) +getfstab(void) { if (fsp_set) @@ -86,7 +86,7 @@ getfstab (void) } static void -fixfsfile() +fixfsfile(void) { static char buf[sizeof(_PATH_DEV) + MNAMELEN]; struct stat sb; @@ -108,7 +108,7 @@ fixfsfile() } static int -fstabscan() +fstabscan(void) { char *cp, *p; #define MAXLINELENGTH 1024 @@ -119,7 +119,7 @@ fstabscan() for (;;) { if (!(p = fgets(line, sizeof(line), _fs_fp))) - return(0); + return (0); /* OLD_STYLE_FSTAB */ ++LineNo; if (*line == '#' || *line == '\n') @@ -140,7 +140,7 @@ fstabscan() _fs_fstab.fs_freq = atoi(cp); if ((cp = strsep(&p, ":\n")) != NULL) { _fs_fstab.fs_passno = atoi(cp); - return(1); + return (1); } } } @@ -206,7 +206,7 @@ fstabscan() if (typexx) continue; if (cp != NULL) - return(1); + return (1); bad: /* no way to distinguish between EOF and syntax error */ error(EFTYPE); @@ -215,44 +215,45 @@ bad: /* no way to distinguish between E } struct fstab * -getfsent() +getfsent(void) { + if ((!_fs_fp && !setfsent()) || !fstabscan()) - return((struct fstab *)NULL); - return(&_fs_fstab); + return (NULL); + return (&_fs_fstab); } struct fstab * -getfsspec(name) - const char *name; +getfsspec(const char *name) { + if (setfsent()) while (fstabscan()) if (!strcmp(_fs_fstab.fs_spec, name)) - return(&_fs_fstab); - return((struct fstab *)NULL); + return (&_fs_fstab); + return (NULL); } struct fstab * -getfsfile(name) - const char *name; +getfsfile(const char *name) { + if (setfsent()) while (fstabscan()) if (!strcmp(_fs_fstab.fs_file, name)) - return(&_fs_fstab); - return((struct fstab *)NULL); + return (&_fs_fstab); + return (NULL); } -int -setfsent() +int +setfsent(void) { int fd; if (_fs_fp) { rewind(_fs_fp); LineNo = 0; - return(1); + return (1); } if (fsp_set == 0) { if (issetugid()) @@ -268,16 +269,17 @@ setfsent() _fs_fp = fdopen(fd, "r"); if (_fs_fp != NULL) { LineNo = 0; - return(1); + return (1); } error(errno); _close(fd); - return(0); + return (0); } void -endfsent() +endfsent(void) { + if (_fs_fp) { (void)fclose(_fs_fp); _fs_fp = NULL; @@ -287,8 +289,7 @@ endfsent() } static void -error(err) - int err; +error(int err) { char *p; char num[30]; From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 07:54:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 97B33FE3; Thu, 11 Oct 2012 07:54:30 +0000 (UTC) (envelope-from stefanf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 65F788FC0C; Thu, 11 Oct 2012 07:54:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9B7sUiR083533; Thu, 11 Oct 2012 07:54:30 GMT (envelope-from stefanf@svn.freebsd.org) Received: (from stefanf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9B7sUBD083530; Thu, 11 Oct 2012 07:54:30 GMT (envelope-from stefanf@svn.freebsd.org) Message-Id: <201210110754.q9B7sUBD083530@svn.freebsd.org> From: Stefan Farfeleder Date: Thu, 11 Oct 2012 07:54:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241440 - in head: lib/libc/gen share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 07:54:30 -0000 Author: stefanf Date: Thu Oct 11 07:54:29 2012 New Revision: 241440 URL: http://svn.freebsd.org/changeset/base/241440 Log: Decode the first two fstab fields with strunvis(3). This allows having spaces in devices and mount paths, encoded as \s or \040. PR: bin/117687 Submitted by: Martin Kammerhofer Discussed on: arch Modified: head/lib/libc/gen/fstab.c head/share/man/man5/fstab.5 Modified: head/lib/libc/gen/fstab.c ============================================================================== --- head/lib/libc/gen/fstab.c Thu Oct 11 07:39:51 2012 (r241439) +++ head/lib/libc/gen/fstab.c Thu Oct 11 07:54:29 2012 (r241440) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "un-namespace.h" static FILE *_fs_fp; @@ -149,11 +150,15 @@ fstabscan(void) /* OLD_STYLE_FSTAB */ while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0') ; + if (strunvis(cp, cp) < 0) + goto bad; _fs_fstab.fs_spec = cp; if (!_fs_fstab.fs_spec || *_fs_fstab.fs_spec == '#') continue; while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0') ; + if (strunvis(cp, cp) < 0) + goto bad; _fs_fstab.fs_file = cp; fixfsfile(); while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0') Modified: head/share/man/man5/fstab.5 ============================================================================== --- head/share/man/man5/fstab.5 Thu Oct 11 07:39:51 2012 (r241439) +++ head/share/man/man5/fstab.5 Thu Oct 11 07:54:29 2012 (r241440) @@ -32,7 +32,7 @@ .\" @(#)fstab.5 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 7, 2011 +.Dd October 11, 2012 .Dt FSTAB 5 .Os .Sh NAME @@ -66,12 +66,20 @@ The first field, .Pq Fa fs_spec , describes the special device or remote file system to be mounted. +The contents are decoded by the +.Xr strunvis 3 +function. +This allows using spaces or tabs in the device name which would be +interpreted as field separators otherwise. .Pp The second field, .Pq Fa fs_file , describes the mount point for the file system. For swap partitions, this field should be specified as .Dq none . +The contents are decoded by the +.Xr strunvis 3 +function, as above. .Pp The third field, .Pq Fa fs_vfstype , @@ -338,6 +346,7 @@ resides in .Xr mount 8 , .Xr quotacheck 8 , .Xr quotaon 8 , +.Xr strunvis 3 , .Xr swapon 8 , .Xr umount 8 .Sh HISTORY From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 08:18:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D695E68D; Thu, 11 Oct 2012 08:18:28 +0000 (UTC) (envelope-from stefanf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BEC238FC16; Thu, 11 Oct 2012 08:18:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9B8ISlg086765; Thu, 11 Oct 2012 08:18:28 GMT (envelope-from stefanf@svn.freebsd.org) Received: (from stefanf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9B8ISSE086763; Thu, 11 Oct 2012 08:18:28 GMT (envelope-from stefanf@svn.freebsd.org) Message-Id: <201210110818.q9B8ISSE086763@svn.freebsd.org> From: Stefan Farfeleder Date: Thu, 11 Oct 2012 08:18:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241441 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 08:18:28 -0000 Author: stefanf Date: Thu Oct 11 08:18:28 2012 New Revision: 241441 URL: http://svn.freebsd.org/changeset/base/241441 Log: Fix my last commit. Only call strunvis after properly checking the argument is not NULL. Modified: head/lib/libc/gen/fstab.c Modified: head/lib/libc/gen/fstab.c ============================================================================== --- head/lib/libc/gen/fstab.c Thu Oct 11 07:54:29 2012 (r241440) +++ head/lib/libc/gen/fstab.c Thu Oct 11 08:18:28 2012 (r241441) @@ -150,16 +150,18 @@ fstabscan(void) /* OLD_STYLE_FSTAB */ while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0') ; - if (strunvis(cp, cp) < 0) - goto bad; _fs_fstab.fs_spec = cp; - if (!_fs_fstab.fs_spec || *_fs_fstab.fs_spec == '#') + if (_fs_fstab.fs_spec == NULL || *_fs_fstab.fs_spec == '#') continue; + if (strunvis(_fs_fstab.fs_spec, _fs_fstab.fs_spec) < 0) + goto bad; while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0') ; - if (strunvis(cp, cp) < 0) - goto bad; _fs_fstab.fs_file = cp; + if (_fs_fstab.fs_file == NULL) + goto bad; + if (strunvis(_fs_fstab.fs_file, _fs_fstab.fs_file) < 0) + goto bad; fixfsfile(); while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0') ; From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 08:44:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7705EDBD; Thu, 11 Oct 2012 08:44:16 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F7658FC18; Thu, 11 Oct 2012 08:44:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9B8iGXt090466; Thu, 11 Oct 2012 08:44:16 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9B8iG1u090465; Thu, 11 Oct 2012 08:44:16 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201210110844.q9B8iG1u090465@svn.freebsd.org> From: Peter Wemm Date: Thu, 11 Oct 2012 08:44:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r241442 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 08:44:16 -0000 Author: peter Date: Thu Oct 11 08:44:15 2012 New Revision: 241442 URL: http://svn.freebsd.org/changeset/base/241442 Log: Pull in the old access.doc_src file from CVS that was forgotten in the cvs->svn conversion 4 years ago. This is not a commit-bit file as such - it just sends commit/developer mail to doc committers. Approved by: core (implicit) Added: svnadmin/conf/access.doc (contents, props changed) Added: svnadmin/conf/access.doc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ svnadmin/conf/access.doc Thu Oct 11 08:44:15 2012 (r241442) @@ -0,0 +1,26 @@ +# $FreeBSD$ +# +# This is for folks who are doc committers, but who work on docs in +# the src/ tree as well. +# +# Names must not be here without also being in doc repository access file. +# +# This file does not grant access to the src tree - it only causes +# you to get copies of the src commit email and announcements. +# +# All doc committers implicitly have access to the src tree in order +# to commit to man pages etc. +# +# KEEP ALPHABETICALLY SORTED!!! +# +# Changes to email forwards can be made without doceng's approval. +# Please use "Approved by: core (implicit), doceng (implicit)" to that +# type of commits. +# +blackend +chern +jcamou +joel +mwlucas +nik +rushani From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 11:43:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 27E3F129; Thu, 11 Oct 2012 11:43:49 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id D6DA78FC18; Thu, 11 Oct 2012 11:43:48 +0000 (UTC) Received: from localhost (dkz205.neoplus.adsl.tpnet.pl [83.24.29.205]) by mail.dawidek.net (Postfix) with ESMTPSA id B280C7A7; Thu, 11 Oct 2012 13:42:35 +0200 (CEST) Date: Thu, 11 Oct 2012 13:44:25 +0200 From: Pawel Jakub Dawidek To: Eitan Adler Subject: Re: svn commit: r241373 - head/lib/libc/stdlib Message-ID: <20121011114425.GA1562@garage.freebsd.pl> References: <201210091425.q99EPFS6020787@svn.freebsd.org> <507451DE.9060909@freebsd.org> <977E1107-46D4-476F-A04D-AEFD87D1DE53@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: mdf@freebsd.org, src-committers@freebsd.org, Andrey Chernov , svn-src-all@freebsd.org, David Chisnall , svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 11:43:49 -0000 --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 09, 2012 at 01:51:05PM -0400, Eitan Adler wrote: > On 9 October 2012 13:27, wrote: > > The original behavior can be recovered by using inline assembly to > > fetch the value from a register into a local C variable; this would at > > least not rely on undefined behavior. But I agree it's of dubious > > value anyways. >=20 > I proposed this (with a patch). We want to move to not using > /dev/random and instead make a kernel system call directly. The patch > for this is not finished yet though. You should do something similar to: http://people.freebsd.org/~pjd/patches/libc_arc4random.c.patch --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --9jxsPFA5p3P2qPhR Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlB2sRkACgkQForvXbEpPzSBnACgvG0Q0yfOpDozuqgbT3OPRV31 5YgAn2fdSXmd2XtAuNYBuIyosjEJE5Yr =mnYc -----END PGP SIGNATURE----- --9jxsPFA5p3P2qPhR-- From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 13:15:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D15FC883 for ; Thu, 11 Oct 2012 13:15:16 +0000 (UTC) (envelope-from ache@vniz.net) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3B9E18FC1A for ; Thu, 11 Oct 2012 13:15:16 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so1480109lag.13 for ; Thu, 11 Oct 2012 06:15:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:message-id:disposition-notification-to:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:openpgp :content-type:x-gm-message-state; bh=/KF1iq7M1MlAbCQBa/h5Q7LG9IJnijpsrt7SbcchZIs=; b=pSw30QxCrjaSj2A4mnbo52Eh8ODUb24eZJPXbrQVnGwhaV1a8/ctZ+3QFD5CHXkxL8 GQI9K9ucFiq9ORhZMewA4c+tE7V6gwergW1CKx0hcYTCp9sSHyPdkcvGP1VhUj0+g/bx rj23tS3vJbRSiHkdjOQ4qnW/LB8d44cmLH8V5EMlr3POEIbGmuTnmEgVG+zBI5FzKXeh QuXtJXIxqBkduP51vjCUKGS4bGJv577xpCtKNGPvbgT+5CavAnDyyeyX6YLxX/opcUwu jGeMjDFJo4jln9pILOdyjOFe5CM3E8ZL4pvJLZnhzbU5KnaBHm0jW+EFF3+GimlE9cRW du8A== Received: by 10.152.148.8 with SMTP id to8mr860849lab.2.1349961315188; Thu, 11 Oct 2012 06:15:15 -0700 (PDT) Received: from [192.168.1.2] ([89.169.140.97]) by mx.google.com with ESMTPS id mq9sm1348197lab.0.2012.10.11.06.15.14 (version=SSLv3 cipher=OTHER); Thu, 11 Oct 2012 06:15:14 -0700 (PDT) Sender: "Chernov, Andrey" Message-ID: <5076C650.4040508@freebsd.org> Date: Thu, 11 Oct 2012 17:14:56 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: Pawel Jakub Dawidek Subject: Re: svn commit: r241373 - head/lib/libc/stdlib References: <201210091425.q99EPFS6020787@svn.freebsd.org> <507451DE.9060909@freebsd.org> <977E1107-46D4-476F-A04D-AEFD87D1DE53@FreeBSD.org> <20121011114425.GA1562@garage.freebsd.pl> In-Reply-To: <20121011114425.GA1562@garage.freebsd.pl> OpenPGP: id=964474DD Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigEDB188CB1C8DFB9A7472C70D" X-Gm-Message-State: ALoCoQlX+jlp8xDca68SG1/H6lgpar2gFxlrgePpOG6iuK6CTjzxRYqUqDeVE2qPWbw9CHQMuk5p Cc: mdf@freebsd.org, src-committers@freebsd.org, Eitan Adler , svn-src-all@freebsd.org, David Chisnall , svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 13:15:17 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigEDB188CB1C8DFB9A7472C70D Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On 11.10.2012 15:44, Pawel Jakub Dawidek wrote: > On Tue, Oct 09, 2012 at 01:51:05PM -0400, Eitan Adler wrote: >> On 9 October 2012 13:27, wrote: >>> The original behavior can be recovered by using inline assembly to >>> fetch the value from a register into a local C variable; this would a= t >>> least not rely on undefined behavior. But I agree it's of dubious >>> value anyways. >> >> I proposed this (with a patch). We want to move to not using >> /dev/random and instead make a kernel system call directly. The patch >> for this is not finished yet though. >=20 > You should do something similar to: >=20 > http://people.freebsd.org/~pjd/patches/libc_arc4random.c.patch >=20 Already half of year I told people of our serious problem with kernel's arc4 (used here in sysctl) - it have very weak initialization at the kernel start (only from processor clock) which is auto-fixed because of its periodic reseeds, but only at the next reseed which happens late. I post two patches (both working, one using atomic, another don't use it) which reseeds kernel's arc4 as fast as we have enough real entropy. NetBSD don't have this problem because of their different kernel's arc4 implementation. --------------enigEDB188CB1C8DFB9A7472C70D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (MingW32) iEYEARECAAYFAlB2xlkACgkQVg5YK5ZEdN1GTgCfQrBR2jQ7BaHPYWeO9AOC3cuv VGgAnR/pAsZeiS1G02DRWPeXiDgKMLvz =gZBy -----END PGP SIGNATURE----- --------------enigEDB188CB1C8DFB9A7472C70D-- From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 13:25:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A42F0F5D; Thu, 11 Oct 2012 13:25:10 +0000 (UTC) (envelope-from erwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 819B48FC1B; Thu, 11 Oct 2012 13:25:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BDPAJI029215; Thu, 11 Oct 2012 13:25:10 GMT (envelope-from erwin@svn.freebsd.org) Received: (from erwin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BDPA0A029211; Thu, 11 Oct 2012 13:25:10 GMT (envelope-from erwin@svn.freebsd.org) Message-Id: <201210111325.q9BDPA0A029211@svn.freebsd.org> From: Erwin Lansing Date: Thu, 11 Oct 2012 13:25:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241443 - in stable/8/contrib/bind9: . bin/named X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 13:25:10 -0000 Author: erwin (ports committer) Date: Thu Oct 11 13:25:09 2012 New Revision: 241443 URL: http://svn.freebsd.org/changeset/base/241443 Log: Update to 9.6-ESV-R7-P4 Prevents a lockup when queried a deliberately constructed combination of records. [CVE-2012-5166] For more information: https://kb.isc.org/article/AA-00801 Approved by: bz Modified: stable/8/contrib/bind9/CHANGES stable/8/contrib/bind9/bin/named/query.c stable/8/contrib/bind9/version Modified: stable/8/contrib/bind9/CHANGES ============================================================================== --- stable/8/contrib/bind9/CHANGES Thu Oct 11 08:44:15 2012 (r241442) +++ stable/8/contrib/bind9/CHANGES Thu Oct 11 13:25:09 2012 (r241443) @@ -1,3 +1,9 @@ + --- 9.6-ESV-R7-P4 released --- + +3383. [security] A certain combination of records in the RBT could + cause named to hang while populating the additional + section of a response. [RT #31090] + --- 9.6-ESV-R7-P3 released --- 3364. [security] Named could die on specially crafted record. Modified: stable/8/contrib/bind9/bin/named/query.c ============================================================================== --- stable/8/contrib/bind9/bin/named/query.c Thu Oct 11 08:44:15 2012 (r241442) +++ stable/8/contrib/bind9/bin/named/query.c Thu Oct 11 13:25:09 2012 (r241443) @@ -1025,13 +1025,6 @@ query_isduplicate(ns_client_t *client, d mname = NULL; } - /* - * If the dns_name_t we're looking up is already in the message, - * we don't want to trigger the caller's name replacement logic. - */ - if (name == mname) - mname = NULL; - if (mnamep != NULL) *mnamep = mname; @@ -1230,6 +1223,7 @@ query_addadditional(void *arg, dns_name_ if (dns_rdataset_isassociated(rdataset) && !query_isduplicate(client, fname, type, &mname)) { if (mname != NULL) { + INSIST(mname != fname); query_releasename(client, &fname); fname = mname; } else @@ -1292,11 +1286,13 @@ query_addadditional(void *arg, dns_name_ mname = NULL; if (!query_isduplicate(client, fname, dns_rdatatype_a, &mname)) { - if (mname != NULL) { - query_releasename(client, &fname); - fname = mname; - } else - need_addname = ISC_TRUE; + if (mname != fname) { + if (mname != NULL) { + query_releasename(client, &fname); + fname = mname; + } else + need_addname = ISC_TRUE; + } ISC_LIST_APPEND(fname->list, rdataset, link); added_something = ISC_TRUE; if (sigrdataset != NULL && @@ -1338,11 +1334,13 @@ query_addadditional(void *arg, dns_name_ mname = NULL; if (!query_isduplicate(client, fname, dns_rdatatype_aaaa, &mname)) { - if (mname != NULL) { - query_releasename(client, &fname); - fname = mname; - } else - need_addname = ISC_TRUE; + if (mname != fname) { + if (mname != NULL) { + query_releasename(client, &fname); + fname = mname; + } else + need_addname = ISC_TRUE; + } ISC_LIST_APPEND(fname->list, rdataset, link); added_something = ISC_TRUE; if (sigrdataset != NULL && @@ -1865,22 +1863,24 @@ query_addadditional2(void *arg, dns_name crdataset->type == dns_rdatatype_aaaa) { if (!query_isduplicate(client, fname, crdataset->type, &mname)) { - if (mname != NULL) { - /* - * A different type of this name is - * already stored in the additional - * section. We'll reuse the name. - * Note that this should happen at most - * once. Otherwise, fname->link could - * leak below. - */ - INSIST(mname0 == NULL); - - query_releasename(client, &fname); - fname = mname; - mname0 = mname; - } else - need_addname = ISC_TRUE; + if (mname != fname) { + if (mname != NULL) { + /* + * A different type of this name is + * already stored in the additional + * section. We'll reuse the name. + * Note that this should happen at most + * once. Otherwise, fname->link could + * leak below. + */ + INSIST(mname0 == NULL); + + query_releasename(client, &fname); + fname = mname; + mname0 = mname; + } else + need_addname = ISC_TRUE; + } ISC_LIST_UNLINK(cfname.list, crdataset, link); ISC_LIST_APPEND(fname->list, crdataset, link); added_something = ISC_TRUE; Modified: stable/8/contrib/bind9/version ============================================================================== --- stable/8/contrib/bind9/version Thu Oct 11 08:44:15 2012 (r241442) +++ stable/8/contrib/bind9/version Thu Oct 11 13:25:09 2012 (r241443) @@ -7,4 +7,4 @@ MAJORVER=9 MINORVER=6 PATCHVER= RELEASETYPE=-ESV -RELEASEVER=-R7-P3 +RELEASEVER=-R7-P4 From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 15:21:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 63426455; Thu, 11 Oct 2012 15:21:08 +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 4C48C8FC0C; Thu, 11 Oct 2012 15:21:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BFL7bR043351; Thu, 11 Oct 2012 15:21:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BFL7v4043349; Thu, 11 Oct 2012 15:21:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210111521.q9BFL7v4043349@svn.freebsd.org> From: Alexander Motin Date: Thu, 11 Oct 2012 15:21:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241444 - head/sys/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 15:21:08 -0000 Author: mav Date: Thu Oct 11 15:21:07 2012 New Revision: 241444 URL: http://svn.freebsd.org/changeset/base/241444 Log: Increase device CCB queue array size by CAM_RL_VALUES - 1 (4) elements. It is required to store extra recovery requests in case of bus resets. On ATA/SATA this fixes assertion panics on HEAD with INVARIANTS enabled or possible memory corruptions otherwise if timeout/reset happens when device CCB queue is already full. Reported by: gibbs@ MFC after: 1 week Modified: head/sys/cam/cam_queue.c Modified: head/sys/cam/cam_queue.c ============================================================================== --- head/sys/cam/cam_queue.c Thu Oct 11 13:25:09 2012 (r241443) +++ head/sys/cam/cam_queue.c Thu Oct 11 15:21:07 2012 (r241444) @@ -314,7 +314,8 @@ cam_ccbq_resize(struct cam_ccbq *ccbq, i * same size once the outstanding entries have been processed. */ if (space_left < 0 - || camq_resize(&ccbq->queue, new_size) == CAM_REQ_CMP) { + || camq_resize(&ccbq->queue, new_size + (CAM_RL_VALUES - 1)) == + CAM_REQ_CMP) { ccbq->devq_openings += delta; ccbq->dev_openings += delta; return (CAM_REQ_CMP); @@ -327,7 +328,7 @@ int cam_ccbq_init(struct cam_ccbq *ccbq, int openings) { bzero(ccbq, sizeof(*ccbq)); - if (camq_init(&ccbq->queue, openings) != 0) { + if (camq_init(&ccbq->queue, openings + (CAM_RL_VALUES - 1)) != 0) { return (1); } ccbq->devq_openings = openings; From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 15:24:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 537D4631 for ; Thu, 11 Oct 2012 15:24:01 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 630978FC17 for ; Thu, 11 Oct 2012 15:23:59 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so1612262lag.13 for ; Thu, 11 Oct 2012 08:23:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=4vd6n4BcpNlit11/tw6TciCNWvr7db8TVLObNR4D4k8=; b=marf6EFlhrzb/QqpGNhgbFCWa3uCa7nw44n+yvIumBb//P7R9j2HsjDvQQo0MYFSJS SmPYoTpz2vI5+DTv4oW0F1zNHqckAtFJggoKc6jl35I8NoGxW65OgACOGkIXrzz+z+cM RNUj7XT8BEVIV520NXk985uHaG5eKtbllfdcI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=4vd6n4BcpNlit11/tw6TciCNWvr7db8TVLObNR4D4k8=; b=VtSjZPUvGHqmPrS/kH1G87RLXIADPG/R9nIHH2LMbIHj8wbiNfw0iLueRQSf2/IdPa XJe6fMtEvgOAjUhdTc5ueERILUcs5vEvDwOGoFBsbX6aKVEiM6IHoT8zCtGyS2rU1iCj 5vCT/TP1unX5JZYN1QSSm1zWnO+tqRUxmOvF8s8N8icv5bXRe6mMrzn1jn+INqsT5tEB /umpSTyYUpY9CcakDZTuRRDH9/+CiSeEw5FbOnb0GkgYgZ58OJV3e/gYyHn6kDgZxj+C 3zHmGd8Gq274duAOo6jbe+Od16p+5iiNDLVQGxiaNRwOwNRaZv/KxRCwjYkFUNSq0+g3 tj0w== MIME-Version: 1.0 Received: by 10.152.47.112 with SMTP id c16mr1086244lan.50.1349969037959; Thu, 11 Oct 2012 08:23:57 -0700 (PDT) Received: by 10.112.87.106 with HTTP; Thu, 11 Oct 2012 08:23:57 -0700 (PDT) In-Reply-To: <5076C650.4040508@freebsd.org> References: <201210091425.q99EPFS6020787@svn.freebsd.org> <507451DE.9060909@freebsd.org> <977E1107-46D4-476F-A04D-AEFD87D1DE53@FreeBSD.org> <20121011114425.GA1562@garage.freebsd.pl> <5076C650.4040508@freebsd.org> Date: Thu, 11 Oct 2012 08:23:57 -0700 Message-ID: Subject: Re: svn commit: r241373 - head/lib/libc/stdlib From: Peter Wemm To: Andrey Chernov Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkZ3kxOcsDZ2B76a6lhJc26QsLf3Eor5UtSF512YCbskB6RQGaX6FDHqDQCsXt75dC8GN9S Cc: mdf@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek , svn-src-all@freebsd.org, David Chisnall , svn-src-head@freebsd.org, Eitan Adler X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 15:24:01 -0000 On Thu, Oct 11, 2012 at 6:14 AM, Andrey Chernov wrote: > On 11.10.2012 15:44, Pawel Jakub Dawidek wrote: >> On Tue, Oct 09, 2012 at 01:51:05PM -0400, Eitan Adler wrote: >>> On 9 October 2012 13:27, wrote: >>>> The original behavior can be recovered by using inline assembly to >>>> fetch the value from a register into a local C variable; this would at >>>> least not rely on undefined behavior. But I agree it's of dubious >>>> value anyways. >>> >>> I proposed this (with a patch). We want to move to not using >>> /dev/random and instead make a kernel system call directly. The patch >>> for this is not finished yet though. >> >> You should do something similar to: >> >> http://people.freebsd.org/~pjd/patches/libc_arc4random.c.patch >> > > Already half of year I told people of our serious problem with kernel's > arc4 (used here in sysctl) - it have very weak initialization at the > kernel start (only from processor clock) which is auto-fixed because of > its periodic reseeds, but only at the next reseed which happens late. I > post two patches (both working, one using atomic, another don't use it) > which reseeds kernel's arc4 as fast as we have enough real entropy. > NetBSD don't have this problem because of their different kernel's arc4 > implementation. How "late" is late? Since this was a userland patch, has it been reseeded by then? Regardless, this is getting way off topic from using an xor of an uninitialized userland variable and what the compiler optimizer might do with it. Of course that's assuming it is even a memory based stack. The sparc or ia64 register stack makes that xor even more dubious. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 15:40:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8D87994 for ; Thu, 11 Oct 2012 15:40:59 +0000 (UTC) (envelope-from ache@vniz.net) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id E92228FC23 for ; Thu, 11 Oct 2012 15:40:58 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so1629449lag.13 for ; Thu, 11 Oct 2012 08:40:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:message-id:disposition-notification-to:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:openpgp :content-type:content-transfer-encoding:x-gm-message-state; bh=tnLnh6RanL8ZxeLsyVgc9SDcpjVLwwTzLNlYeF+8Eio=; b=ZDH4rvDhSJcEZ7Nphj+dqXVdmVk4mgpGyr7AdUUN/0Ur93XuZIlZswJx4TfL5ZN/GM ydR0L6klQ5mXf2NYZ8HemxGLAcezgusnCzrwkPa9uwEDVDPvwTGQIedxKUsB9W9W+b2f fp0OTQ0A9cPiW4+36I0HLwiE81eOMrZhW/NxAGe0/EJLOLQnl/KLb/blS/qNmRp4usMF 38EX0fIs3A2ZSq6jmskYAFqZUdlALQD8OM5bEtqbUnobgZKMjMmoqzb90uEi4jeDD1Gx Mc/4ph2zGluFEGQ/Mp878tUNULYdRqtty5MG4T1JezO5eV6US81l5RJxojuSDY54uOEg TwdQ== Received: by 10.112.99.37 with SMTP id en5mr642211lbb.1.1349970057271; Thu, 11 Oct 2012 08:40:57 -0700 (PDT) Received: from [192.168.1.2] ([89.169.140.97]) by mx.google.com with ESMTPS id y10sm1529249lbg.4.2012.10.11.08.40.56 (version=SSLv3 cipher=OTHER); Thu, 11 Oct 2012 08:40:56 -0700 (PDT) Sender: "Chernov, Andrey" Message-ID: <5076E880.9010502@freebsd.org> Date: Thu, 11 Oct 2012 19:40:48 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: Peter Wemm Subject: Re: svn commit: r241373 - head/lib/libc/stdlib References: <201210091425.q99EPFS6020787@svn.freebsd.org> <507451DE.9060909@freebsd.org> <977E1107-46D4-476F-A04D-AEFD87D1DE53@FreeBSD.org> <20121011114425.GA1562@garage.freebsd.pl> <5076C650.4040508@freebsd.org> In-Reply-To: OpenPGP: id=964474DD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQljRwCixdxnsR6ZCr5ty31YoI9JL2uMCCdWA4jzG5AcdGhIV4l8L1baBMha5d2J9fpk8EoD Cc: mdf@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek , svn-src-all@freebsd.org, David Chisnall , svn-src-head@freebsd.org, Eitan Adler X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 15:40:59 -0000 On 11.10.2012 19:23, Peter Wemm wrote: > On Thu, Oct 11, 2012 at 6:14 AM, Andrey Chernov wrote: >> On 11.10.2012 15:44, Pawel Jakub Dawidek wrote: >>> On Tue, Oct 09, 2012 at 01:51:05PM -0400, Eitan Adler wrote: >>>> On 9 October 2012 13:27, wrote: >>>>> The original behavior can be recovered by using inline assembly to >>>>> fetch the value from a register into a local C variable; this would at >>>>> least not rely on undefined behavior. But I agree it's of dubious >>>>> value anyways. >>>> >>>> I proposed this (with a patch). We want to move to not using >>>> /dev/random and instead make a kernel system call directly. The patch >>>> for this is not finished yet though. >>> >>> You should do something similar to: >>> >>> http://people.freebsd.org/~pjd/patches/libc_arc4random.c.patch >>> >> >> Already half of year I told people of our serious problem with kernel's >> arc4 (used here in sysctl) - it have very weak initialization at the >> kernel start (only from processor clock) which is auto-fixed because of >> its periodic reseeds, but only at the next reseed which happens late. I >> post two patches (both working, one using atomic, another don't use it) >> which reseeds kernel's arc4 as fast as we have enough real entropy. >> NetBSD don't have this problem because of their different kernel's arc4 >> implementation. > > How "late" is late? Since this was a userland patch, has it been > reseeded by then? See /sys/libkern/arc4random.c #define ARC4_RESEED_SECONDS 300 i.e. first 5 minutes at least it is very bad seeded and vulnerable. But we don't have guarantee to have enough entropy even after first 5 minutes, it very depends of entropy sources turned on the machine configuration at whole (diskless, etc). Moreover, arc4random(3) code have its own reseed happens after arc4_count = 1600000; (divided by 4) iterations which increases bad seeded bytes initially taken from kernel's arc4 until whole count will be exhausted which is _very_ long time (consider that typical application issue only several rare arc4random(3) calls and exits, left arc4_count not decreased globally at all). > Regardless, this is getting way off topic from using an xor of an > uninitialized userland variable and what the compiler optimizer might > do with it. > > Of course that's assuming it is even a memory based stack. The sparc > or ia64 register stack makes that xor even more dubious. I pass this subj to the people who knows clang compiler better to say for sure is it right to generate LLVM intermediate call void @srand(i32 undef) or not. Xoring the stack (or register) there is not essential step. From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 15:49:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AF166344; Thu, 11 Oct 2012 15:49:43 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 905428FC0C; Thu, 11 Oct 2012 15:49:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BFnh3s046718; Thu, 11 Oct 2012 15:49:43 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BFnh6g046710; Thu, 11 Oct 2012 15:49:43 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201210111549.q9BFnh6g046710@svn.freebsd.org> From: Gabor Kovesdan Date: Thu, 11 Oct 2012 15:49:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r241445 - in releng/9.1/release/doc: . de_DE.ISO8859-1/early-adopter de_DE.ISO8859-1/errata de_DE.ISO8859-1/hardware/alpha de_DE.ISO8859-1/hardware/common de_DE.ISO8859-1/hardware/i386 ... X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 15:49:43 -0000 Author: gabor Date: Thu Oct 11 15:49:42 2012 New Revision: 241445 URL: http://svn.freebsd.org/changeset/base/241445 Log: MFC r241096: - Rename files to track the XML migration in the doc tree and make the release notes build again Approved by: re (hrs) Added: releng/9.1/release/doc/de_DE.ISO8859-1/early-adopter/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/early-adopter/article.xml releng/9.1/release/doc/de_DE.ISO8859-1/errata/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/errata/article.xml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/alpha/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.xml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.xml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/common/artheader.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.xml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/common/dev.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/common/dev.xml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/common/intro.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/common/intro.xml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/i386/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/i386/article.xml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.xml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/ia64/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.xml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.xml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/pc98/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.xml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.xml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.xml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.xml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.xml releng/9.1/release/doc/de_DE.ISO8859-1/installation/alpha/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/alpha/article.xml releng/9.1/release/doc/de_DE.ISO8859-1/installation/common/abstract.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/common/abstract.xml releng/9.1/release/doc/de_DE.ISO8859-1/installation/common/artheader.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/common/artheader.xml releng/9.1/release/doc/de_DE.ISO8859-1/installation/common/install.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/common/install.xml releng/9.1/release/doc/de_DE.ISO8859-1/installation/common/layout.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/common/layout.xml releng/9.1/release/doc/de_DE.ISO8859-1/installation/common/trouble.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/common/trouble.xml releng/9.1/release/doc/de_DE.ISO8859-1/installation/common/upgrade.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/common/upgrade.xml releng/9.1/release/doc/de_DE.ISO8859-1/installation/i386/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/i386/article.xml releng/9.1/release/doc/de_DE.ISO8859-1/installation/ia64/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/ia64/article.xml releng/9.1/release/doc/de_DE.ISO8859-1/installation/pc98/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/pc98/article.xml releng/9.1/release/doc/de_DE.ISO8859-1/installation/sparc64/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.xml releng/9.1/release/doc/de_DE.ISO8859-1/installation/sparc64/install.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/installation/sparc64/install.xml releng/9.1/release/doc/de_DE.ISO8859-1/readme/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/readme/article.xml releng/9.1/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.xml releng/9.1/release/doc/de_DE.ISO8859-1/relnotes/common/new.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/relnotes/common/new.xml releng/9.1/release/doc/de_DE.ISO8859-1/relnotes/i386/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.xml releng/9.1/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.xml releng/9.1/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.xml releng/9.1/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.xml - copied unchanged from r241096, head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.xml releng/9.1/release/doc/de_DE.ISO8859-1/share/xml/ - copied from r241096, head/release/doc/de_DE.ISO8859-1/share/xml/ releng/9.1/release/doc/en_US.ISO8859-1/errata/article.xml - copied unchanged from r241096, releng/9.1/release/doc/en_US.ISO8859-1/errata/article.sgml releng/9.1/release/doc/en_US.ISO8859-1/hardware/article.xml - copied unchanged from r241096, releng/9.1/release/doc/en_US.ISO8859-1/hardware/article.sgml releng/9.1/release/doc/en_US.ISO8859-1/installation/article.xml - copied unchanged from r241096, releng/9.1/release/doc/en_US.ISO8859-1/installation/article.sgml releng/9.1/release/doc/en_US.ISO8859-1/readme/article.xml - copied unchanged from r241096, releng/9.1/release/doc/en_US.ISO8859-1/readme/article.sgml releng/9.1/release/doc/en_US.ISO8859-1/relnotes/article.xml - copied unchanged from r241096, releng/9.1/release/doc/en_US.ISO8859-1/relnotes/article.sgml releng/9.1/release/doc/en_US.ISO8859-1/share/xml/ - copied from r241096, head/release/doc/en_US.ISO8859-1/share/xml/ releng/9.1/release/doc/fr_FR.ISO8859-1/early-adopter/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/early-adopter/article.xml releng/9.1/release/doc/fr_FR.ISO8859-1/errata/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/errata/article.xml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.xml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/alpha/proc-alpha.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/alpha/proc-alpha.xml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/common/artheader.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/common/artheader.xml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/common/dev.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.xml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/common/intro.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/common/intro.xml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/i386/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.xml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/i386/proc-i386.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/i386/proc-i386.xml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.xml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/ia64/proc-ia64.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/ia64/proc-ia64.xml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.xml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/pc98/proc-pc98.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/pc98/proc-pc98.xml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.xml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/sparc64/dev-sparc64.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/dev-sparc64.xml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/sparc64/proc-sparc64.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/proc-sparc64.xml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/alpha/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/alpha/article.xml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/common/abstract.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/common/abstract.xml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/common/artheader.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/common/artheader.xml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/common/install.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/common/install.xml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/common/layout.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/common/layout.xml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/common/trouble.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/common/trouble.xml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.xml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/i386/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/i386/article.xml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/pc98/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/pc98/article.xml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.xml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.xml releng/9.1/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.xml releng/9.1/release/doc/fr_FR.ISO8859-1/relnotes/common/new.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/relnotes/common/new.xml releng/9.1/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.xml - copied unchanged from r241096, head/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.xml releng/9.1/release/doc/fr_FR.ISO8859-1/share/xml/ - copied from r241096, head/release/doc/fr_FR.ISO8859-1/share/xml/ releng/9.1/release/doc/ja_JP.eucJP/errata/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/errata/article.xml releng/9.1/release/doc/ja_JP.eucJP/hardware/alpha/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/alpha/article.xml releng/9.1/release/doc/ja_JP.eucJP/hardware/amd64/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/amd64/article.xml releng/9.1/release/doc/ja_JP.eucJP/hardware/amd64/proc-amd64.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/amd64/proc-amd64.xml releng/9.1/release/doc/ja_JP.eucJP/hardware/common/artheader.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/common/artheader.xml releng/9.1/release/doc/ja_JP.eucJP/hardware/common/dev.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/common/dev.xml releng/9.1/release/doc/ja_JP.eucJP/hardware/common/intro.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/common/intro.xml releng/9.1/release/doc/ja_JP.eucJP/hardware/i386/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/i386/article.xml releng/9.1/release/doc/ja_JP.eucJP/hardware/i386/proc-i386.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/i386/proc-i386.xml releng/9.1/release/doc/ja_JP.eucJP/hardware/ia64/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/ia64/article.xml releng/9.1/release/doc/ja_JP.eucJP/hardware/ia64/proc-ia64.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/ia64/proc-ia64.xml releng/9.1/release/doc/ja_JP.eucJP/hardware/pc98/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/pc98/article.xml releng/9.1/release/doc/ja_JP.eucJP/hardware/pc98/proc-pc98.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/pc98/proc-pc98.xml releng/9.1/release/doc/ja_JP.eucJP/hardware/sparc64/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/sparc64/article.xml releng/9.1/release/doc/ja_JP.eucJP/hardware/sparc64/proc-sparc64.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/hardware/sparc64/proc-sparc64.xml releng/9.1/release/doc/ja_JP.eucJP/relnotes/alpha/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/relnotes/alpha/article.xml releng/9.1/release/doc/ja_JP.eucJP/relnotes/amd64/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/relnotes/amd64/article.xml releng/9.1/release/doc/ja_JP.eucJP/relnotes/common/new.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/relnotes/common/new.xml releng/9.1/release/doc/ja_JP.eucJP/relnotes/i386/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/relnotes/i386/article.xml releng/9.1/release/doc/ja_JP.eucJP/relnotes/ia64/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/relnotes/ia64/article.xml releng/9.1/release/doc/ja_JP.eucJP/relnotes/pc98/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/relnotes/pc98/article.xml releng/9.1/release/doc/ja_JP.eucJP/relnotes/sparc64/article.xml - copied unchanged from r241096, head/release/doc/ja_JP.eucJP/relnotes/sparc64/article.xml releng/9.1/release/doc/ja_JP.eucJP/share/xml/ - copied from r241096, head/release/doc/ja_JP.eucJP/share/xml/ releng/9.1/release/doc/ru_RU.KOI8-R/errata/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/errata/article.xml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/alpha/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/alpha/article.xml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/amd64/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/amd64/article.xml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/amd64/proc-amd64.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/amd64/proc-amd64.xml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/common/artheader.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/common/artheader.xml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/common/dev.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/common/dev.xml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/common/intro.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/common/intro.xml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/i386/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/i386/article.xml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/i386/proc-i386.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/i386/proc-i386.xml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/ia64/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/ia64/article.xml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/ia64/proc-ia64.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/ia64/proc-ia64.xml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/pc98/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/pc98/article.xml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/pc98/proc-pc98.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/pc98/proc-pc98.xml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/sparc64/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/sparc64/article.xml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/sparc64/proc-sparc64.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/hardware/sparc64/proc-sparc64.xml releng/9.1/release/doc/ru_RU.KOI8-R/installation/alpha/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/alpha/article.xml releng/9.1/release/doc/ru_RU.KOI8-R/installation/amd64/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/amd64/article.xml releng/9.1/release/doc/ru_RU.KOI8-R/installation/common/abstract.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/common/abstract.xml releng/9.1/release/doc/ru_RU.KOI8-R/installation/common/artheader.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/common/artheader.xml releng/9.1/release/doc/ru_RU.KOI8-R/installation/common/install.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/common/install.xml releng/9.1/release/doc/ru_RU.KOI8-R/installation/common/layout.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/common/layout.xml releng/9.1/release/doc/ru_RU.KOI8-R/installation/common/trouble.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/common/trouble.xml releng/9.1/release/doc/ru_RU.KOI8-R/installation/common/upgrade.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/common/upgrade.xml releng/9.1/release/doc/ru_RU.KOI8-R/installation/i386/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/i386/article.xml releng/9.1/release/doc/ru_RU.KOI8-R/installation/ia64/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/ia64/article.xml releng/9.1/release/doc/ru_RU.KOI8-R/installation/pc98/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/pc98/article.xml releng/9.1/release/doc/ru_RU.KOI8-R/installation/sparc64/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/installation/sparc64/article.xml releng/9.1/release/doc/ru_RU.KOI8-R/readme/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/readme/article.xml releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/alpha/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/relnotes/alpha/article.xml releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/amd64/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/relnotes/amd64/article.xml releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/common/new.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/relnotes/common/new.xml releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/i386/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/relnotes/i386/article.xml releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/ia64/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/relnotes/ia64/article.xml releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/pc98/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/relnotes/pc98/article.xml releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/sparc64/article.xml - copied unchanged from r241096, head/release/doc/ru_RU.KOI8-R/relnotes/sparc64/article.xml releng/9.1/release/doc/ru_RU.KOI8-R/share/xml/ - copied from r241096, head/release/doc/ru_RU.KOI8-R/share/xml/ releng/9.1/release/doc/share/xml/ - copied from r241096, head/release/doc/share/xml/ releng/9.1/release/doc/zh_CN.GB2312/errata/article.xml - copied unchanged from r241096, head/release/doc/zh_CN.GB2312/errata/article.xml releng/9.1/release/doc/zh_CN.GB2312/hardware/article.xml - copied unchanged from r241096, head/release/doc/zh_CN.GB2312/hardware/article.xml releng/9.1/release/doc/zh_CN.GB2312/readme/article.xml - copied unchanged from r241096, head/release/doc/zh_CN.GB2312/readme/article.xml releng/9.1/release/doc/zh_CN.GB2312/relnotes/article.xml - copied unchanged from r241096, head/release/doc/zh_CN.GB2312/relnotes/article.xml releng/9.1/release/doc/zh_CN.GB2312/share/xml/ - copied from r241096, head/release/doc/zh_CN.GB2312/share/xml/ Deleted: releng/9.1/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml releng/9.1/release/doc/de_DE.ISO8859-1/errata/article.sgml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.sgml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/common/artheader.sgml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/common/dev.sgml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/common/intro.sgml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.sgml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.sgml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.sgml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.sgml releng/9.1/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.sgml releng/9.1/release/doc/de_DE.ISO8859-1/installation/alpha/article.sgml releng/9.1/release/doc/de_DE.ISO8859-1/installation/common/abstract.sgml releng/9.1/release/doc/de_DE.ISO8859-1/installation/common/artheader.sgml releng/9.1/release/doc/de_DE.ISO8859-1/installation/common/install.sgml releng/9.1/release/doc/de_DE.ISO8859-1/installation/common/layout.sgml releng/9.1/release/doc/de_DE.ISO8859-1/installation/common/trouble.sgml releng/9.1/release/doc/de_DE.ISO8859-1/installation/common/upgrade.sgml releng/9.1/release/doc/de_DE.ISO8859-1/installation/i386/article.sgml releng/9.1/release/doc/de_DE.ISO8859-1/installation/ia64/article.sgml releng/9.1/release/doc/de_DE.ISO8859-1/installation/pc98/article.sgml releng/9.1/release/doc/de_DE.ISO8859-1/installation/sparc64/article.sgml releng/9.1/release/doc/de_DE.ISO8859-1/installation/sparc64/install.sgml releng/9.1/release/doc/de_DE.ISO8859-1/readme/article.sgml releng/9.1/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.sgml releng/9.1/release/doc/de_DE.ISO8859-1/relnotes/common/new.sgml releng/9.1/release/doc/de_DE.ISO8859-1/relnotes/i386/article.sgml releng/9.1/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.sgml releng/9.1/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.sgml releng/9.1/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.sgml releng/9.1/release/doc/de_DE.ISO8859-1/share/sgml/ releng/9.1/release/doc/en_US.ISO8859-1/errata/article.sgml releng/9.1/release/doc/en_US.ISO8859-1/hardware/article.sgml releng/9.1/release/doc/en_US.ISO8859-1/installation/article.sgml releng/9.1/release/doc/en_US.ISO8859-1/readme/article.sgml releng/9.1/release/doc/en_US.ISO8859-1/relnotes/article.sgml releng/9.1/release/doc/en_US.ISO8859-1/share/sgml/ releng/9.1/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/errata/article.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/alpha/proc-alpha.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/common/artheader.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/common/dev.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/common/intro.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/i386/article.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/i386/proc-i386.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/ia64/proc-ia64.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/pc98/proc-pc98.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/sparc64/dev-sparc64.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/sparc64/proc-sparc64.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/alpha/article.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/common/abstract.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/common/artheader.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/common/install.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/common/layout.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/common/trouble.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/i386/article.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/pc98/article.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/relnotes/common/new.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.sgml releng/9.1/release/doc/fr_FR.ISO8859-1/share/sgml/ releng/9.1/release/doc/ja_JP.eucJP/errata/article.sgml releng/9.1/release/doc/ja_JP.eucJP/hardware/alpha/article.sgml releng/9.1/release/doc/ja_JP.eucJP/hardware/amd64/article.sgml releng/9.1/release/doc/ja_JP.eucJP/hardware/amd64/proc-amd64.sgml releng/9.1/release/doc/ja_JP.eucJP/hardware/common/artheader.sgml releng/9.1/release/doc/ja_JP.eucJP/hardware/common/dev.sgml releng/9.1/release/doc/ja_JP.eucJP/hardware/common/intro.sgml releng/9.1/release/doc/ja_JP.eucJP/hardware/i386/article.sgml releng/9.1/release/doc/ja_JP.eucJP/hardware/i386/proc-i386.sgml releng/9.1/release/doc/ja_JP.eucJP/hardware/ia64/article.sgml releng/9.1/release/doc/ja_JP.eucJP/hardware/ia64/proc-ia64.sgml releng/9.1/release/doc/ja_JP.eucJP/hardware/pc98/article.sgml releng/9.1/release/doc/ja_JP.eucJP/hardware/pc98/proc-pc98.sgml releng/9.1/release/doc/ja_JP.eucJP/hardware/sparc64/article.sgml releng/9.1/release/doc/ja_JP.eucJP/hardware/sparc64/proc-sparc64.sgml releng/9.1/release/doc/ja_JP.eucJP/relnotes/alpha/article.sgml releng/9.1/release/doc/ja_JP.eucJP/relnotes/amd64/article.sgml releng/9.1/release/doc/ja_JP.eucJP/relnotes/common/new.sgml releng/9.1/release/doc/ja_JP.eucJP/relnotes/i386/article.sgml releng/9.1/release/doc/ja_JP.eucJP/relnotes/ia64/article.sgml releng/9.1/release/doc/ja_JP.eucJP/relnotes/pc98/article.sgml releng/9.1/release/doc/ja_JP.eucJP/relnotes/sparc64/article.sgml releng/9.1/release/doc/ja_JP.eucJP/share/sgml/ releng/9.1/release/doc/ru_RU.KOI8-R/errata/article.sgml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/alpha/article.sgml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/amd64/article.sgml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/amd64/proc-amd64.sgml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/common/artheader.sgml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/common/dev.sgml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/common/intro.sgml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/i386/article.sgml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/i386/proc-i386.sgml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/ia64/article.sgml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/ia64/proc-ia64.sgml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/pc98/article.sgml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/pc98/proc-pc98.sgml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/sparc64/article.sgml releng/9.1/release/doc/ru_RU.KOI8-R/hardware/sparc64/proc-sparc64.sgml releng/9.1/release/doc/ru_RU.KOI8-R/installation/alpha/article.sgml releng/9.1/release/doc/ru_RU.KOI8-R/installation/amd64/article.sgml releng/9.1/release/doc/ru_RU.KOI8-R/installation/common/abstract.sgml releng/9.1/release/doc/ru_RU.KOI8-R/installation/common/artheader.sgml releng/9.1/release/doc/ru_RU.KOI8-R/installation/common/install.sgml releng/9.1/release/doc/ru_RU.KOI8-R/installation/common/layout.sgml releng/9.1/release/doc/ru_RU.KOI8-R/installation/common/trouble.sgml releng/9.1/release/doc/ru_RU.KOI8-R/installation/common/upgrade.sgml releng/9.1/release/doc/ru_RU.KOI8-R/installation/i386/article.sgml releng/9.1/release/doc/ru_RU.KOI8-R/installation/ia64/article.sgml releng/9.1/release/doc/ru_RU.KOI8-R/installation/pc98/article.sgml releng/9.1/release/doc/ru_RU.KOI8-R/installation/sparc64/article.sgml releng/9.1/release/doc/ru_RU.KOI8-R/readme/article.sgml releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/alpha/article.sgml releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/amd64/article.sgml releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/common/new.sgml releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/i386/article.sgml releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/ia64/article.sgml releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/pc98/article.sgml releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/sparc64/article.sgml releng/9.1/release/doc/ru_RU.KOI8-R/share/sgml/ releng/9.1/release/doc/share/sgml/ releng/9.1/release/doc/zh_CN.GB2312/errata/article.sgml releng/9.1/release/doc/zh_CN.GB2312/hardware/article.sgml releng/9.1/release/doc/zh_CN.GB2312/readme/article.sgml releng/9.1/release/doc/zh_CN.GB2312/relnotes/article.sgml releng/9.1/release/doc/zh_CN.GB2312/share/sgml/ Modified: releng/9.1/release/doc/Makefile releng/9.1/release/doc/README releng/9.1/release/doc/de_DE.ISO8859-1/early-adopter/Makefile releng/9.1/release/doc/de_DE.ISO8859-1/errata/Makefile releng/9.1/release/doc/de_DE.ISO8859-1/hardware/alpha/Makefile releng/9.1/release/doc/de_DE.ISO8859-1/hardware/common/hw.ent releng/9.1/release/doc/de_DE.ISO8859-1/hardware/i386/Makefile releng/9.1/release/doc/de_DE.ISO8859-1/hardware/ia64/Makefile releng/9.1/release/doc/de_DE.ISO8859-1/hardware/pc98/Makefile releng/9.1/release/doc/de_DE.ISO8859-1/hardware/sparc64/Makefile releng/9.1/release/doc/de_DE.ISO8859-1/installation/alpha/Makefile releng/9.1/release/doc/de_DE.ISO8859-1/installation/common/install.ent releng/9.1/release/doc/de_DE.ISO8859-1/installation/i386/Makefile releng/9.1/release/doc/de_DE.ISO8859-1/installation/ia64/Makefile releng/9.1/release/doc/de_DE.ISO8859-1/installation/pc98/Makefile releng/9.1/release/doc/de_DE.ISO8859-1/installation/sparc64/Makefile releng/9.1/release/doc/de_DE.ISO8859-1/readme/Makefile releng/9.1/release/doc/de_DE.ISO8859-1/relnotes/alpha/Makefile releng/9.1/release/doc/de_DE.ISO8859-1/relnotes/common/relnotes.ent releng/9.1/release/doc/de_DE.ISO8859-1/relnotes/i386/Makefile releng/9.1/release/doc/de_DE.ISO8859-1/relnotes/ia64/Makefile releng/9.1/release/doc/de_DE.ISO8859-1/relnotes/pc98/Makefile releng/9.1/release/doc/de_DE.ISO8859-1/relnotes/sparc64/Makefile releng/9.1/release/doc/en_US.ISO8859-1/errata/Makefile releng/9.1/release/doc/en_US.ISO8859-1/hardware/Makefile releng/9.1/release/doc/en_US.ISO8859-1/installation/Makefile releng/9.1/release/doc/en_US.ISO8859-1/readme/Makefile releng/9.1/release/doc/en_US.ISO8859-1/relnotes/Makefile releng/9.1/release/doc/fr_FR.ISO8859-1/early-adopter/Makefile releng/9.1/release/doc/fr_FR.ISO8859-1/errata/Makefile releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/alpha/Makefile releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/common/hw.ent releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/i386/Makefile releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/ia64/Makefile releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/pc98/Makefile releng/9.1/release/doc/fr_FR.ISO8859-1/hardware/sparc64/Makefile releng/9.1/release/doc/fr_FR.ISO8859-1/installation/alpha/Makefile releng/9.1/release/doc/fr_FR.ISO8859-1/installation/common/install.ent releng/9.1/release/doc/fr_FR.ISO8859-1/installation/i386/Makefile releng/9.1/release/doc/fr_FR.ISO8859-1/installation/pc98/Makefile releng/9.1/release/doc/fr_FR.ISO8859-1/installation/sparc64/Makefile releng/9.1/release/doc/fr_FR.ISO8859-1/relnotes/alpha/Makefile releng/9.1/release/doc/fr_FR.ISO8859-1/relnotes/common/relnotes.ent releng/9.1/release/doc/fr_FR.ISO8859-1/relnotes/i386/Makefile releng/9.1/release/doc/ja_JP.eucJP/errata/Makefile releng/9.1/release/doc/ja_JP.eucJP/hardware/alpha/Makefile releng/9.1/release/doc/ja_JP.eucJP/hardware/amd64/Makefile releng/9.1/release/doc/ja_JP.eucJP/hardware/common/hw.ent releng/9.1/release/doc/ja_JP.eucJP/hardware/i386/Makefile releng/9.1/release/doc/ja_JP.eucJP/hardware/ia64/Makefile releng/9.1/release/doc/ja_JP.eucJP/hardware/pc98/Makefile releng/9.1/release/doc/ja_JP.eucJP/hardware/sparc64/Makefile releng/9.1/release/doc/ja_JP.eucJP/relnotes/alpha/Makefile releng/9.1/release/doc/ja_JP.eucJP/relnotes/amd64/Makefile releng/9.1/release/doc/ja_JP.eucJP/relnotes/common/relnotes.ent releng/9.1/release/doc/ja_JP.eucJP/relnotes/i386/Makefile releng/9.1/release/doc/ja_JP.eucJP/relnotes/ia64/Makefile releng/9.1/release/doc/ja_JP.eucJP/relnotes/pc98/Makefile releng/9.1/release/doc/ja_JP.eucJP/relnotes/sparc64/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/errata/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/hardware/alpha/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/hardware/amd64/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/hardware/common/hw.ent releng/9.1/release/doc/ru_RU.KOI8-R/hardware/i386/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/hardware/ia64/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/hardware/pc98/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/hardware/sparc64/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/installation/alpha/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/installation/amd64/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/installation/common/install.ent releng/9.1/release/doc/ru_RU.KOI8-R/installation/i386/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/installation/ia64/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/installation/pc98/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/installation/sparc64/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/readme/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/alpha/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/amd64/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/common/relnotes.ent releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/i386/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/ia64/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/pc98/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/relnotes/sparc64/Makefile releng/9.1/release/doc/ru_RU.KOI8-R/share/examples/dev-auto-translate.pl releng/9.1/release/doc/share/mk/doc.relnotes.mk releng/9.1/release/doc/zh_CN.GB2312/errata/Makefile releng/9.1/release/doc/zh_CN.GB2312/hardware/Makefile releng/9.1/release/doc/zh_CN.GB2312/readme/Makefile releng/9.1/release/doc/zh_CN.GB2312/relnotes/Makefile Directory Properties: releng/9.1/release/ (props changed) releng/9.1/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: releng/9.1/release/doc/Makefile ============================================================================== --- releng/9.1/release/doc/Makefile Thu Oct 11 15:21:07 2012 (r241444) +++ releng/9.1/release/doc/Makefile Thu Oct 11 15:49:42 2012 (r241445) @@ -8,7 +8,7 @@ SUBDIR+= ${RELNOTES_LANG} .else SUBDIR+= en_US.ISO8859-1 .endif -SUBDIR+= share/sgml +SUBDIR+= share/xml RELN_ROOT?= ${.CURDIR} Modified: releng/9.1/release/doc/README ============================================================================== --- releng/9.1/release/doc/README Thu Oct 11 15:21:07 2012 (r241444) +++ releng/9.1/release/doc/README Thu Oct 11 15:49:42 2012 (r241445) @@ -24,34 +24,34 @@ share/mk/doc.relnotes.mk Common Makefile definitions for RELNOTESng. These definitions mostly accommodate the fact that we're building DocProj-like documents outside the doc/ tree. -share/sgml/catalog +share/xml/catalog Main SGML catalog for all language-neutral (and default EN) stylesheet and entity files. Can be overridden if needed for translations. -share/sgml/default.dsl +share/xml/default.dsl All documents build with this file as a stylesheet. All it does is to make it possible to use the document catalogs to locate the "real" stylesheet by reference, rather than having to specify it by pathname. -share/sgml/release.dsl +share/xml/release.dsl Language-neutral stylesheet. This stylesheet supports the arch= attribute on (all?) DocBook elements; elements with an arch= attribute are only included in the output if their value is equal to the value of the &arch; entity. In the future, arch= could be a list of possible &arch; entity values that match, such as "i386,sparc64". -share/sgml/release.ent +share/xml/release.ent Release information. Need to update the entry definitions in this file when rolling new revisions; these should take effect in all documents. -en_US.ISO8859-1/share/sgml/release.dsl +en_US.ISO8859-1/share/xml/release.dsl Language-dependent stylesheet for en, but also the default for translations if they don't override the settings here. This stylesheet sets the email footer at the bottom of HTML pages, as well as a few other parameters. If necessary for translations, this file can be overridden with - */share/sgml/release.dsl and */share/sgml/catalog. + */share/xml/release.dsl and */share/xml/catalog. */relnotes/common/ Directory for multi-architecture release notes files. @@ -88,7 +88,7 @@ tree. For example: % make DOC_PREFIX=/usr/doc all All definition of the "current" version of FreeBSD is contained in the -share/sgml/release.ent file; release engineers should peruse the +share/xml/release.ent file; release engineers should peruse the contents of this file carefully when doing version number bumps. When creating content for the architecture-dependent files, authors @@ -108,9 +108,9 @@ When creating a translation, make a new directory with a language code (paralleling the DocProj directory structure). If necessary, new language-dependent HTML footers can be generated by making a new language-dependent -${LANG}/share/sgml/release.dsl, a ${LANG}/share/sgml/catalog that +${LANG}/share/xml/release.dsl, a ${LANG}/share/xml/catalog that points to it, and a new definition in the Makefiles that adds -${LANG}/share/sgml/catalog to EXTRA_CATALOGS. Except for the Makefile +${LANG}/share/xml/catalog to EXTRA_CATALOGS. Except for the Makefile changes, this is the same procedure that is used for creating a new translation for DocProj files. Modified: releng/9.1/release/doc/de_DE.ISO8859-1/early-adopter/Makefile ============================================================================== --- releng/9.1/release/doc/de_DE.ISO8859-1/early-adopter/Makefile Thu Oct 11 15:21:07 2012 (r241444) +++ releng/9.1/release/doc/de_DE.ISO8859-1/early-adopter/Makefile Thu Oct 11 15:49:42 2012 (r241445) @@ -17,7 +17,7 @@ FORMATS?= html INSTALL_COMPRESSED?=gz INSTALL_ONLY_COMPRESSED?= -SRCS+= article.sgml +SRCS+= article.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied: releng/9.1/release/doc/de_DE.ISO8859-1/early-adopter/article.xml (from r241096, head/release/doc/de_DE.ISO8859-1/early-adopter/article.xml) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/9.1/release/doc/de_DE.ISO8859-1/early-adopter/article.xml Thu Oct 11 15:49:42 2012 (r241445, copy of r241096, head/release/doc/de_DE.ISO8859-1/early-adopter/article.xml) @@ -0,0 +1,544 @@ + + +%entities; + +%release; + +X"> +X"> +]> + + + +
+ + Hinweise für die ersten Anwender von &os; + &release.current; + + + The &os; Release Engineering Team + + + $FreeBSD$ + + + 2002 + 2003 + The &os; Release + Engineering Team + + + + Dieser Artikel enthält Informationen über den + Status von &os; &release.current; für die Anwender, die + bisher noch keine Erfahrung mit den &release.5x; Versionen + oder &os; sammeln konnten. Er enthält einige + Hintergrundinformationen über die vor und während + einer Veröffentlichung ablaufende Prozesse, nennt die + wichtigsten Neuerungen und die Stellen, an denen die ersten + Anwender Probleme haben könnten. Weiterhin gibt es + Informationen über die Pläne für weitere + Veröffentlichungen im Entwicklungszweig 4-STABLE und + ein paar Hinweise für die Aktualisierung bestehender + Systeme. + + + + + Einführung + + Nach über zwei Jahren steht mit &os; &release.5x; + wieder eine komplett neue &os;-Version zur Verfügung. Sie + bietet nicht nur diverse neue Möglichkeiten, auch und + gerade unter der Haube hat sich einiges + verbessert. Der Nachteil dieser Neuerungen ist, daß + große Teile des Systems neu und nicht ausreichend getestet + sind. Im Vergleich zu den existierenden &release.4x; Versionen + kann der Schritt zu den ersten &release.5x; Versionen zu + Verschlechterungen in den Bereichen Stabilität, Leistung + und teilweise auch Funktionalität führen. + + Aus diesen Gründen warnen wir alle Anwender, ihre + Systeme nicht von älteren &os;-Versionen auf 5.0 zu + aktualisieren, wenn sie die "Problemzonen" nicht kennen + oder nicht bereit sind, die Einschränkungen in den neuesten + Versionen in Kauf zu nehmen. Gerade konservative Anwender + sollten in der nahen Zukunft &release.4x;-Versionen (wie + 4.8-RELEASE) benutzen. Wir meinen, daß diese Anwender + erst zu &release.5x; wechseln sollten, nachdem der + Entwicklungszweig 5-STABLE existiert; dies wird wahrscheinlich + nach der Veröffentlichung von 5.2-RELEASE + passieren. + + Hier zeigt sich das Henne und Ei Problem bei + der Veröffentlichung von &os; &release.5x;. Alle am &os; + Project beteiligten Personen wollen ein &os;, das möglichst + stabil und zuverlässig ist. Um dieses Ziel zu erreichen, + müssen die neue Version und speziell die neuen Komponenten + von möglichst vielen Anwendern getestet werden. + Dummerweise gibt es bei realistischer Betrachtung nur eine + Möglichkeit, eine größere Anzahl an Anwender + für einen Test zu gewinnen: Die Veröffentlichung der + zu testenden Version! + + Dieser Artikel beschreibt einige der Probleme, die bei der + Installation und Benutzung von &os; &release.current; auftreten + können. Zuerst wird beschrieben, wie eine neue FreeBSD + Version veröffentlicht wird. Dann werden die + interessanteren Neuerungen in FreeBSD &release.current; und die + Bereiche, in denen (gerade für unvorsichtige Anwender) + Probleme auftreten können, vorgestellt. Anwender, die erst + einmal bei Systemen auf Basis von 4-STABLE bleiben möchten, + erhalten einen kurzen Ausblick auf die kurz- und mittelfristigen + Planungen für diesen Entwicklungszweig. Zuletzt wird + besprochen, was bei einer Aktualisierung eines existierenden + &release.4x; Systems auf 5.0 beachtet werden muß. + + + + Veröffentlichung neuer &os;-Versionen + + Das Prinzip der &os;-Entwicklung ist die Verwendung mehrerer + Entwicklungszweige innerhalb eines CVS + Repository. Der Hauptzweig wird CURRENT + genannt und innerhalb des Repository mit dem symbolischen Namen + HEAD referenziert. Neuerungen werden + zunächst in diesen Zweig eingebracht. Das bedeutet zwar, + daß neue Möglichkeiten zunächst einmal nur in + CURRENT zur Verfügung stehen, es bedeutet allerdings auch, + daß dieser Zweig von Zeit zu Zeit Kummer bereitet, + während die Neuerungen getestet und ihre Fehler entfernt + werden. + + Wenn eine neue &os;-Version veröffentlicht wird, + basiert diese in der Regel auf einem der STABLE + (stabil) genannten Entwicklungszweige. Neuerungen werden nur in + diese Entwicklungszweige übernommen, nachdem sie in CURRENT + getestet wurden. Zur Zeit gibt es nur einen aktiven STABLE + Entwicklungszweig: 4-STABLE; dieser Zweig war + die Grundlage für alle &release.4x; Versionen. Dieser + Zweig wird innerhalb des CVS Repository durch den symbolischen + Namen RELENG_4 gekennzeichnet. + + Die Basis für &os; 5.0 und 5.1 ist der + Entwicklungszweig CURRENT. Damit wird zum ersten Mal nach + über zwei Jahren eine neue Version auf Basis dieses + Entwicklungszweiges erscheinen (die letzte war &os; 4.0, im + März 2000). + + Einige Zeit nach der Veröffentlichung von &os; 5.0 wird + im &os; CVS Repository der Zweig 5-STABLE mit dem + symbolischen Namen RELENG_5 erzeugt werden. + Die letzten beiden Entwicklungszweige dieser Art (3-STABLE und + 4-STABLE) wurden unmittelbar nach der Veröffentlichung der + jeweiligen Punkt Null Versionen (3.0 bzw. 4.0) + erzeugt. Rückblickend müssen wir feststellen, + daß dadurch in beiden Fällen nicht genug Zeit war, um + CURRENT zu stabilisieren, bevor der neue Entwicklungszweig + eingerichtet wurde. Dies führte zu unnötiger + Mehrarbeit, da Fehlerkorrekturen von einem Zweig in den anderen + Zweig übertragen werden mußten; außerdem kam + es zu einigen Änderungen in der Architektur, die nicht in + den jeweils anderen Zweig übernommen werden konnten. + + Aus diesem Grund wird das Release Engineering Team den neuen + 5-STABLE Entwicklungszweig erst dann im CVS Repository + einrichten, wenn eine solide Grundlage zur Verfügung steht. + Es ist sehr wahrscheinlich, daß vorher mehrere + &release.5x; Versionen erscheinen werden; zur Zeit rechnen wir + damit, daß 5-STABLE nach dem Erscheinen von 5.2-RELEASE + erzeugt werden wird. + + Weitere Informationen über den Ablauf bei der + Veröffentlichung einer neuen &os; Version finden Sie auf + den Release + Engineering Web pages und im Artikel &os; + Release Engineering. Informationen über den + geplanten Entwicklungszweig 5-STABLE finden Sie auf der The + Roadmap for 5-STABLE. + + + + Neuerungen + + Die Glanzpunkte von &os; &release.5x; sind die vielen Neuerungen. + Diese Neuerungen und die neue Funktionalität basieren zum + größten Teil auf massiven Änderungen der + Systemarchitektur, die nicht in den Entwicklungszweig 4-STABLE + eingepflegt wurden. Viele in sich abgeschlossene + Änderungen wie Treiber für neue Geräte oder neue + Benutzerprogramme wurden dagegen schon nach 4-STABLE + übernommen. Die folgende Liste enthält eine kurze + Übersicht über die wichtigsten Neuerungen in &os; + 5.0: + + + + SMPng: Die nächste Generation der + Unterstützung für Systeme mit mehreren Prozessoren + (noch nicht abgeschlossen). Es ist jetzt möglich, + daß mehrere Prozessoren gleichzeitig den Kernel + nutzen. + + + + KSE: Die Kernel Scheduled Entities + erlauben es einem Prozess, mehrere Threads auf Kernel-Ebene + zu nutzen, analog zur Aktivierung via Scheduler. Die + (experimentellen) Bibliotheken libkse + und libthr erlauben auch normalen + Programmen mit mehreren Threads, diese Erweiterung zu + nutzen. + + + + Neue Plattformen: Zusätzlich zu i386, pc98 und + Alpha werden jetzt auch sparc64 und ia64 Systeme + unterstützt. + + + + GCC: Der Compiler und die dazugehörigen Werkzeuge + basieren jetzt auf GCC 3.2.2 und nicht mehr auf GCC + 2.95.X. + + + + MAC: Unterstützung für erweiterbare + Mandatory Access Control Regelwerke. + + + + GEOM: Ein flexibles Gerüst zur Manipulation von + Daten beim Transfer von und zu Festplatten. Auf dieser + Basis wurde ein experimentelles Modul zur + Verschlüsselung des Festplatteninhaltes + entwickelt. + + + + FFS: Das Dateisystem unterstützt jetzt + Hintergrund-&man.fsck.8; (um das System nach einem Absturz + schneller verfügbar zu machen) sowie + Schnappschüsse. + + + + UFS2: Dieses neue Dateisystem unterstützt + größere Dateien und zusätzliche + Dateiberechtigungen. &man.newfs.8; erzeugt jetzt + standardmäßig UFS2 Dateisysteme und auf allen + Plattformen außer PC98 gilt dies auch für + Dateisysteme, die mit &man.sysinstall.8; erzeugt + werden. + + + + Cardbus: Cardbus wird jetzt unterstützt. + + + + Eine ausführlichere Übersicht über die + Neuerungen finden Sie in den Release Notes + für &os; &release.prev; und &release.current;. + + + + Nachteile für frühe Anwender + + Ein Nachteil der Neuerungen in &os; &release.5x; ist, + daß es in einigen Bereichen auf Grund der noch nicht + abgeschlossenen Entwicklung zu Problemen oder zu unerwarteten + Effekten kommen kann. Einige (aber nicht alle) der Problemzonen + sind in der folgenden Liste zusammengefaßt: + + + + Die Arbeit an diversen Neuerungen ist noch nicht + abgeschlossen, dazu gehören unter anderem SMPng und + KSE. Diese Erweiterungen sind zwar für Test- und + Experimentalzwecke ausreichend stabil, aber unter + Umständen nicht stabil genug für den + Produktionsbetrieb. + + + + Durch die Änderungen in den Datenstrukturen des + Kernels und der Schnittstellen für Anwendungen und + Programmierer (ABI/API), müssen Treiber anderer + Hersteller angepaßt werden, damit sie korrekt mit &os; + 5.0 zusammenarbeiten. Es ist nicht ausgeschlossen, + daß es bis zum Erscheinen des Entwicklungszweiges + 5-STABLE weitere kleinere Änderungen am ABI/API geben + wird. + + + + Einige Teile des &os; Basissystems wurden in die Ports + Collection verschoben. Dazu gehören insbesondere + Perl, + UUCP und die meisten (nicht alle) + Spiele. Diese Programme werden zwar weiterhin entwickelt + und unterstützt, es kann aber verwirren, daß sie + nicht mehr Teil des Basissystems sind. + + + + Einige Teile des &os;-Basissystems wurden nicht mehr + gepflegt, weil es nicht genügend Anwender und/oder + Entwickler gab. Diese Teile mußten entfernt werden, + dazu zählen unter anderem die Erzeugung von Programmen + im Format a.out;, die XNS-Netzwerkprotokolle und der Treiber + für den X-10 Controller. + + + + Viele Ports und Packages, die mit &os; 4-STABLE noch + korrekt liefen, können mit &os; 5.0 nicht genutzt oder + nicht kompiliert werden. Der Grund ist in der Regel der + neue Compiler oder die Aufräumarbeiten in den + Header-Dateien. + + + + Viele der Neuerungen in &os; &release.5x; wurden bisher + nur auf relativ wenigen Systemen getestet. Viele dieser + Neuerungen (wie SMPng) haben Auswirkungen auf große + Bereiche des Kernels. + + + + Die Neuerungen in &os; 5.0 enthalten noch Routinen + zur Unterstützung bei der Fehlersuche und Diagnose. + Dadurch kann es dazu kommen, daß ein System mit + &os; 5.0 langsamer ist als mit 4-STABLE. + + + + Neuerungen werden erst in den Entwicklungszweig 4-STABLE + übernommen, nachdem sie eine Zeit lang in -CURRENT + gereift sind. Bei &os; 5.0 fehlt dieser + stabilisierende Effekt eines -STABLE Entwicklungszweiges. + Der Entwicklungszweig 5-STABLE wird wahrscheinlich erst + einige Zeit nach der Veröffentlichung von 5.2-RELEASE + eingerichtet werden. + + + + Die Dokumentation (wie z.B. das &os; Handbuch + und der FAQ) + ist teilweise noch nicht auf dem Stand von + &os; &release.5x;. + + + + Da einige dieser Probleme auch negative Auswirkungen auf die + Stabilität des Systems haben, rät das Release + Engineering Team konservativen Anwendern und Firmen, Versionen + aus dem Entwicklungszweig 4-STABLE zu verwenden, bis die + &release.5x; Versionen zuverlässiger + geworden sind. + + + + Die Zukunft des Entwicklungszweiges 4-STABLE + + Die Veröffentlichung von &os; 5.0 bedeutete nicht das + Ende des Entwicklungszweiges 4-STABLE: &os; 4.8 erschien im + April 2003, zwei Monate nach der Veröffentlichung von &os; + 5.0. Es wird wahrscheinlich noch eine weitere Version auf der + Basis dieses Entwicklungszweiges geben: Das für den Sommer + 2003 geplante 4.9-RELEASE. Auch eine Version 4.10 liegt im + Bereich des Möglichen. Dies hängt von mehreren + Faktoren ab, der wichtigste davon ist die Existenz und + Stabilität des Entwicklungszweiges 5-STABLE. Wenn CURRENT + nicht stabil genug ist, um einen Entwicklungszweig 5-STABLE zu + rechtfertigen, werden weitere Versionen auf Basis des + Entwicklungszweiges 4-STABLE möglich und notwendig sein. + Bis zum Erscheinen der offiziell letzten Version auf Basis von + 4-STABLE bleibt es den Entwicklern überlassen, ob sie + Neuerungen aus HEAD in 4-STABLE einpflegen + (im Rahmen der schon bestehenden Regelungen). + + Bis zu einem gewissen Grad werden das Release Engineering + Team und die Entwickler auch die Wünsche der Benutzer nach + weiteren Versionen auf Basis von 4-STABLE beachten. Allerdings + nur, so weit dies im Rahmen der beschränkten Ressourcen + möglich ist. + + Neue Versionen auf Basis des Entwicklungszweiges 4-STABLE + werden vom &a.security-officer; im üblichen Rahmen + unterstützt werden, genauere Informationen dazu finden Sie + auf der Security + page auf der &os; Webseite. In der Regel werden die + letzten beiden Versionen jedes Entwicklungszweiges durch die + Veröffentlichung von Sicherheitshinweisen und Patches + unterstützt; dem Team ist es allerdings freigestellt, diese + Unterstützung auf weitere Versionen oder spezielle Probleme + auszudehnen. + + + + Hinweise für die Aktualisierung von &os; &release.4x; + + Dieses Kapitel enthält Hinweise für Anwender, die + ihr bestehendes &os; &release.4x; System auf &os; &release.5x; + aktualisieren wollen. Wie bei jeder Aktualisierung ist es auf + jeden Fall notwendig, vorher die Release Notes und die Errata der + neuen Version zu lesen; bei Aktualisierung über den + Quellcode ist src/UPDATING + Pflichtlektüre. + + + Aktualisierung ohne Quellcode + + Der einfachste Ansatz ist immer noch + Sicherheitskopien erstellen, Platte formatieren, neues + System installieren, Daten wieder einspielen. Dadurch + werden alle Probleme mit veralteten und nicht kompatiblen + Programmen und Konfigurationsdateien umgangen. Die neuen + Dateisysteme können maximalen Nutzen aus den diversen + Neuerungen (speziell UFS2) ziehen. + + Zum gegenwärtigen Zeitpunkt hat noch niemand + ausführlich getestet, ob und wie gut die + Upgrade-Option in &man.sysinstall.8; bei einem + Update von 4.0 zu 5.0 funktioniert. Wir raten daher dringend + von der Verwendung dieser Funktion ab. Eines der + Hauptprobleme ist, daß bei dieser Variante diverse + Dateien nicht gelöscht werden, die zwar von &release.4x; + genutzt wurden, aber in &release.5x; nicht mehr vorhanden + sind. Diese Altlasten können zu Problemen + führen. + + Auf i386 und pc98 Systemen kann die Konfiguration von ISA + Geräten beim Systemstart mit dem Werkzeug UserConfig + eingestellt werden, dies gilt auch beim Start von einem + Installations-Medium. Dieses Programm wurde in &os; 5.0 durch + &man.device.hints.5; ersetzt; dieses stellt zwar die gleiche + Funktionalität bereit, ist aber von der Bedienung her + völlig verschieden. + + Bei einer Installation von Diskette kann es notwendig + werden, die neue Treiber-Diskette zu benutzen. Das + drivers.flp Diskettenimage sollte im + allgemeinen überall dort verfügbar sein, wo auch + schon die bekannten kern.flp und + mfsroot.flp verfügbar sind. + + Bei einer Installation von CD-ROM auf einem i386-System + wird jetzt ein neues Startprogramm mit dem Namen + no-emulation boot loader genutzt. Dadurch ist + es unter anderem möglich, auf der CD den Standardkernel + (GENERIC) statt des auf den Disketten + verwendeten Mini-Kernels zu nutzen. Jedes System, das von den + Installations-CDs für Windows NT 4.0 booten kann, sollte + auch mit den &os; &release.5x; CD-ROMs zurechtkommen. + + + + Aktualisierung mit Quellcode + + Es ist auf jeden Fall erforderlich, vor der Aktualisierung + src/UPDATING zu lesen. Der Abschnitt + To upgrade from 4.x-stable to current + enthält eine Schritt-für-Schritt Anleitung, der Sie + unbedingt folgen müssen, die Nutzung der üblichen + Abkürzungen ist nicht + möglich. + + + + Allgemeine Hinweise + + Perl wurde aus dem Basissystem + entfernt und sollte entweder als Package oder über die + Ports Collection installiert werden. Die bisher übliche + Praxis, Perl als Teil des Basissystems zu behandeln und mit ihm + zusammen zu kompilieren, führte zu diversen Problemen, + die eine Aktualisierung von Perl erschwerten. Die im + Standardsystem vorhandenen Programme, die Perl + benötigten, wurden entweder in einer anderen Sprache neu + geschrieben (wenn sie noch benötigt wurden) oder + ersatzlos entfernt (wenn sie überflüssig waren). Da + &man.sysinstall.8; das Perl Package bei den meisten + Distributionen automatisch mit installiert, sollte diese + Änderung kaum Auswirkungen auf die Anwender + haben. + + Einige Scripte verlassen sich darauf, daß der + Perl-Interpreter als /usr/bin/perl + verfügbar ist. Der Perl Port enthält das Programm + use.perl, mit dem ein passender Satz + symbolischer Links für diese Scripte erzeugt werden kann. + Nach dem Aufruf von use.perl port sollte + alles wie erwartet funktionieren. + + Es ist zwar möglich, für &release.4x; + geschriebene Programme unter &release.5x; zu nutzen, + allerdings muß dazu die Distribution + compat4x installiert sein. Damit + könnte es auch möglich sein, + alte Ports zu benutzen. + + Bei der Aktualisierung eines bestehenden Systems auf Basis + von 4-STABLE, ist es unbedingt notwendig, die alten Dateien in + /usr/include zu löschen. Im + allgemeinen ist es ausreichend, dieses Verzeichnis vor der + Installation bzw. vor dem + installworld zu entfernen. Wird das + Verzeichnis nicht entfernt, kann es zu Problemen kommen + (speziell mit C++-Programmen), da der Compiler dann einen Mix + aus alten und neuen Headerdateien verwendet. + + Es gibt kein MAKEDEV mehr, weil es + nicht mehr benötigt wird. &os; &release.5x; benutzt ein + spezielles Dateisystem für Geräte, das die + entsprechenden Device Nodes bei Bedarf automatisch erzeugt. + Weitere Informationen finden Sie in &man.devfs.5;. + + Alle mit &man.newfs.8; erzeugten Dateisysteme werden + standardmäßig im Format UFS2 angelegt. Diese gilt + auf allen Plattformen außer PC98 auch für + Dateisysteme, die mit &man.sysinstall.8; erzeugt werden. Da + &os; &release.4x; nur UFS1 lesen kann, müssen alle + Dateisysteme, die sowohl mit &release.4x; als auch mit + &release.5x; nutzbar sein sollen, im Format UFS1 erzeugt + werden. Dieser Fall tritt typischerweise auf Systemen auf, + auf denen &release.4x; und &release.5x; installiert und + abwechselnd betrieben werden. In &man.newfs.8; steht dazu die + Option zur Verfügung, auch + &man.sysinstall.8; enthält eine entsprechende Option. + Bitte beachten Sie, daß es kein Konvertierungsprogramm + zur Umwandlung von UFS1 nach UFS2 (oder umgekehrt) gibt, nur + die Variante Backup, Formatieren, Restore. + + + + + Zusammenfassung + + &os; &release.current; enthält zwar viele interessante + Neuerungen, aber es ist noch nicht für alle Anwender + geeignet. Aus diesem Grund haben wir in diesem Dokument + Informationen über die Abläufe bei der + Veröffentlichung einer neuen Version, die interessantesten + Neuerungen in den &release.5x; Versionen und wahrscheinliche + Probleme gegeben. Weiterhin enthielt er einen Ausblick auf die + Zukunft des Entwicklungszweiges 4-STABLE und Informationen + für Anwender, die schon jetzt umsteigen wollen. + +
Modified: releng/9.1/release/doc/de_DE.ISO8859-1/errata/Makefile ============================================================================== --- releng/9.1/release/doc/de_DE.ISO8859-1/errata/Makefile Thu Oct 11 15:21:07 2012 (r241444) +++ releng/9.1/release/doc/de_DE.ISO8859-1/errata/Makefile Thu Oct 11 15:49:42 2012 (r241445) @@ -16,7 +16,7 @@ INSTALL_COMPRESSED?= gz INSTALL_ONLY_COMPRESSED?= # SGML content -SRCS+= article.sgml +SRCS+= article.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied: releng/9.1/release/doc/de_DE.ISO8859-1/errata/article.xml (from r241096, head/release/doc/de_DE.ISO8859-1/errata/article.xml) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/9.1/release/doc/de_DE.ISO8859-1/errata/article.xml Thu Oct 11 15:49:42 2012 (r241445, copy of r241096, head/release/doc/de_DE.ISO8859-1/errata/article.xml) @@ -0,0 +1,406 @@ + + +%entities; + +%release; +]> + + + +
+ + + &os; +<![ %release.type.snapshot [ + &release.prev; +]]> +<![ %release.type.release [ + &release.current; +]]> + Errata + + + Das &os; Projekt + + + $FreeBSD$ + + + 2000 + 2001 + 2002 + 2003 + The FreeBSD Documentation Project + + + + 2001 + 2002 + 2003 + The FreeBSD German Documentation Project + + + + + Dieses Dokument enthält die Errata für &os; + + + + also wichtige Informationen, die kurz vor bzw. erst nach + der Veröffentlichung bekannt wurden. Dazu gehören + Ratschläge zur Sicherheit sowie Änderungen in der + Software oder Dokumentation, welche die Stabilität und die + Nutzung beeinträchtigen könnten. Sie sollten immer + die aktuelle Version dieses Dokumentes lesen, bevor sie diese + Version von &os; installieren. + + Diese Errata für &os; + + + + werden bis zum + Erscheinen von &os; 5.1-RELEASE weiter aktualisiert + werden. + + + + Einleitung + + Diese Errata enthalten brandheiße + Informationen über &os; + + + + Bevor Sie diese + Version installieren, sollten Sie auf jeden Fall dieses Dokument + lesen, um über Probleme informiert zu werden, die erst nach + der Veröffentlichung entdeckt (und vielleicht auch schon + behoben) wurden. + + Die zusammen mit der Veröffentlichung erschienene + Version dieses Dokumentes (zum Beispiel die Version auf der + CDROM) ist per Definition veraltet. Allerdings sind im Internet + aktualisierte Versionen verfügbar, die die aktuellen + Errata für diese Version sind. Diese Versionen + sind bei + und allen aktuellen Mirrors dieser Webseite + verfügbar. + + Die Snapshots von &os; &release.branch; (sowohl die der + Quelltexte als auch die der ausführbaren Programme) + enthalten ebenfalls die zum Zeitpunkt ihrer + Veröffentlichung aktuelle Version dieses + Dokumentes. + + Die Liste der &os; CERT security advisories finden Sie bei + oder + . + + + + Sicherheitshinweise + + Ein über das Netzwerk nutzbarer Fehler in + CVS könnte dazu führen, + daß ein Angreifer beliebige Programme auf dem CVS Server + ausführen kann. Weitere Informationen finden Sie in FreeBSD-SA-03:01. + + Durch Auswertung der Antwortzeiten von + OpenSSL wäre es einem Angreifer + mit sehr viel Rechenleistung möglich gewesen, unter + bestimmten Umständen den Klartext der übermittelten + Daten zu erhalten. Dieser Fehler wurde in &os; + &release.current; durch die neue + OpenSSL Version 0.9.7 behoben. Auf + den für Sicherheitsprobleme unterstützten + Entwicklungszweigen wurde der Fehler durch die neue + OpenSSL Version 0.9.6i behoben. + Weitere Informationen finden Sie in FreeBSD-SA-03:02 + + Es ist theoretisch möglich, daß ein Angreifer den + geheimen Schlüssel ermittelt, der von der Erweiterung + syncookies genutzt wird. Dadurch sinkt deren + Effektivität beim Schutz vor TCP SYN Flood + Denial-of-Service Angriffen. Hinweise, wie sie das Problem + umgehen können und weitere Informationen finden Sie in + FreeBSD-SA-03:03. + + Durch diverse Puffer-Überläufe in den von + sendmail genutzten Routinen zum + Parsen des Headers war es einen Angreifer möglich, eine + speziell konstruierte Nachricht an &man.sendmail.8; zu senden + und so beliebige Programme ausführen zu lassen. Diese + Programme verfügten über die Rechte des Benutzers, + unter dessen Kennung &man.sendmail.8; lief, also typischerweise + root. Weitere Informationen und Verweise + auf Patches finden Sie in FreeBSD-SA-03:04 + und FreeBSD-SA-03:07. + + Durch einen Puffer-Überlauf im XDR Kodierer/Dekodierer + war es einem Angreifer möglich, den Service zum Absturz zu + bringen. Informationen, wie Sie den Fehler beheben, finden Sie + in FreeBSD-SA-03:05. + + OpenSSL enthält zwei + Schwachstellen, die erst vor kurzer Zeit bekannt gemacht wurden. + Informationen, wie Sie die Probleme umgehen können und + weitere Informationen finden Sie in FreeBSD-SA-03:06. + + + + Aktuelle Informationen + + GEOM + + Die auf &man.geom.4; basierenden Routinen des Kernel zur + Partitionierung erlauben es nicht, eine aktive Partition zu + überschreiben. Mit anderen Worten, es ist in der Regel + nicht möglich, den Bootsektor einer Festplatte mit + disklabel -B zu aktualisieren, da die + Partition a auch den Bereich enthält, in + dem die Bootsektoren gespeichert sind. Um dieses Problem zu + umgehen, sollten Sie von einer anderen Platte, einer CD oder der + Fixit-Diskette booten. + + &man.dump.8; + + Werden Festplatten und ähnliche Medien mit einer + Blockgröße von mehr als 512 Byte benutzt (zum + Beispiel mit &man.geom.4; verschlüsselte Partitionen), + behandelt &man.dump.8; die größeren Sektoren nicht + korrekt und kann daher das Dateisystem nicht dumpen. Eine + Möglichkeit, das Problem zu umgehen, ist die Erzeugung einer + rohen Kopie des gesamten Dateisystems, die dann + als Eingabedatei für &man.dump.8; dient. Es ist + möglich, ein komplettes Dateisystem in einer normalen Datei + zu speichern: + + &prompt.root; dd if=/dev/ad0s1d.bde of=/junk/ad0.dd bs=1m +&prompt.root; dump 0f - /junk/ad0.dd | ... + + Eine etwas einfachere Lösung ist, &man.tar.1; oder + &man.cpio.1; zur Erzeugung des Backups zu verwende. + + &man.mly.4; + + Es gibt Berichte, daß sich Systeme bei der + Installation von &os; 5.0 Snapshots auf RAIDs an + &man.mly.4;-kompatiblen Controller aufgehängt haben, obwohl + die Systeme problemlos mit 4.7-RELEASE zusammenarbeiten. Dieser + Fehler wurde in &os; &release.current; bereits behoben. + + NETNCP/Unterstützung des + Dateisystems + + NETNCP und nwfs sind offenbar noch nicht an KSE + angepaßt worden und funktionieren daher nicht. Dieser + Fehler wurde in &os; &release.current; bereits behoben. + + &man.iir.4; Controller + + Bei der Installation scheinen &man.iir.4;-Controller korrekt + erkannt zu werden, allerdings finden Sie keine der + angeschlossenen Festplatten. + + Timing-Probleme in + &man.truss.1; + + Es scheint ein Timing-Problem beim Start des Debuggings mit + &man.truss.1; zu geben, durch das &man.truss.1; manchmal nicht + in der Lage ist, eine Verbindung zu einem Prozeß + aufzubauen, bevor er gestartet wird. In diesem Fall meldet + &man.truss.1;, daß es die &man.procfs.5; Node für den + zu debuggenden Prozeß nicht öffnen kann. Es scheint + einen weiteren Fehler zu geben, durch den &man.truss.1; sich + aufhängt, wenn &man.execve.2; den Wert + ENOENT zurückgibt. Ein weiteres + Timing-Problem führt dazu, daß &man.truss.1; beim + Start manchmal PIOCWAIT: Input/output + error meldet. Es existieren zwar Korrekturen + für diese Probleme, da diese aber zu sehr in die Routinen + zur Ausführung von Prozessen eingreifen, werden sie erst + nach dem Erscheinen von 5.0 ins System aufgenommen. + + Partitionierung von Festplatten durch + das Installationsprogramm + + Es gibt einige Meldungen über Fehler bei der + Partitionierung von Festplatten mit &man.sysinstall.8;. Eines + der Probleme ist, daß &man.sysinstall.8; den freien Platz + auf einer Festplatten nicht neu berechnen kann, nachdem der Typ + einer FDISK-Partition geändert wurde. + + Veraltete Dokumentation + + In einigen Fällen wurde die Dokumentation (wie zum + Beispiel die FAQ und das Handbuch) nicht aktualisiert und geht + nicht auf die Neuerungen in &os; &release.prev; ein. Zum + Beispiel fehlt noch Dokumentation zu &man.gbde.8; und den neuen + fast IPsec Routinen. + + SMB Dateisystem + + Ab und zu kommt beim Versuch, die Verbindung zu einem SMBFS + Share zu trennen, die Meldung Device + busy, obwohl das Share nicht benutzt wird. Die + einzige Lösung für dieses Problem ist, die Operation + so lange zu wiederholen, bis die Verbindung getrennt wird. + Dieser Fehler wurde in &release.current; bereits behoben. + + Der Versuch, die Trennung der Verbindung zu einem SMBFS + Share mit umount -f zu erzwingen, kann zu + einer Kernel Panic führen. Dieser Fehler wurde in + &release.current; bereits behoben. + + &man.fstat.2; + + Wird &man.fstat.2; auf einen Socket angewendet, für den + bereits eine Verbindung besteht, sollte es die Anzahl der zum + Lesen verfügbaren Zeichen in dem Feld + st_size der Struktur struct + stat zurückgeben. Leider wird bei TCP Sockets immer ein + st_size von 0 gemeldet. + Dieser Fehler wurde in &release.current; bereits behoben. + + Kernel Event Queues + + Der zu &man.kqueue.2; gehörende Filter + EVFILT_READ meldet fälschlicherweise + immer, daß an einem TCP Socket 0 + Zeichen zum Lesen bereitstehen, auch wenn in Wirklichkeit + Zeichen zum Lesen verfügbar sind. Die bei + EVFILT_READ verfügbare Option + NOTE_LOWAT arbeitet bei TCP Sockets ebenfalls + fehlerhaft. Dieser Fehler wurde in &release.current; bereits + behoben. + + POSIX Named Semaphores + + Eine der Neuerungen in &os; &release.prev; ist die + Unterstützung für Named Semaphores nach POSIX. Die + Routinen enthalten leider einen Fehler, durch den sich + &man.sem.open.3; falsch verhalten kann, wenn eine Semaphore von + einem Prozeß mehrfach geöffnet wird und durch den + &man.sem.close.3; zum Absturz des Programms führen kann. + Dieser Fehler wurde in &release.current; bereits behoben. + + Zugriffsrechte für + /dev/tty + + &os; &release.prev; enthält einen kleinen Fehler im + Bereich der Berechtigungen von /dev/tty. + Dieser Fehler tritt auf, wenn sich ein Benutzer einloggt, der + weder root noch Mitglied der Gruppe + tty ist. Wechselt dieser Benutzer nun mit + &man.su.1; zu einer anderen Benutzerkennung, die ebenfalls + weder root noch Mitglied der Gruppe + tty ist, kann er &man.ssh.1; nicht + nutzen, da es /dev/tty nicht öffnen + kann. Dieser Fehler wurde in &release.current; bereits + behoben. + + &man.growfs.8; + + &man.growfs.8; funktioniert auf &man.vinum.4; Partitionen + nicht mehr, da auf ihnen kein Disklabel mehr emuliert wird und + &man.growfs.8; das Disklabel analysieren will. Das Problem + betrifft wahrscheinlich auch alle anderen Massenspeicher, + für die &man.geom.4; benutzt wird. + + IPFW + + &man.ipfw.4; skipto Regeln funktionieren + nicht, wenn gleichzeitig das Schlüsselwort + log verwendet wird. Auch die *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 16:15:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9BA105F3; Thu, 11 Oct 2012 16:15:19 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 560A58FC08; Thu, 11 Oct 2012 16:15:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BGFJTC049965; Thu, 11 Oct 2012 16:15:19 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BGFJ58049961; Thu, 11 Oct 2012 16:15:19 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201210111615.q9BGFJ58049961@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Thu, 11 Oct 2012 16:15:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241446 - head/sys/netgraph/netflow X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 16:15:19 -0000 Author: melifaro Date: Thu Oct 11 16:15:18 2012 New Revision: 241446 URL: http://svn.freebsd.org/changeset/base/241446 Log: Add NG_NETFLOW_V9INFO_TYPE command to be able to request netflowv9-specific data. Submitted by: Dmitry Luhtionov MFC after: 2 weeks Modified: head/sys/netgraph/netflow/netflow_v9.c head/sys/netgraph/netflow/ng_netflow.c head/sys/netgraph/netflow/ng_netflow.h Modified: head/sys/netgraph/netflow/netflow_v9.c ============================================================================== --- head/sys/netgraph/netflow/netflow_v9.c Thu Oct 11 15:49:42 2012 (r241445) +++ head/sys/netgraph/netflow/netflow_v9.c Thu Oct 11 16:15:18 2012 (r241446) @@ -480,3 +480,14 @@ ng_netflow_v9_cache_flush(priv_p priv) for (i = 0; i < priv->flowsets_count; i++) free(priv->v9_flowsets[i], M_NETFLOW_GENERAL); } + +/* Get a snapshot of NetFlow v9 settings */ +void +ng_netflow_copyv9info(priv_p priv, struct ng_netflow_v9info *i) +{ + + i->templ_time = priv->templ_time; + i->templ_packets = priv->templ_packets; + i->mtu = priv->mtu; +} + Modified: head/sys/netgraph/netflow/ng_netflow.c ============================================================================== --- head/sys/netgraph/netflow/ng_netflow.c Thu Oct 11 15:49:42 2012 (r241445) +++ head/sys/netgraph/netflow/ng_netflow.c Thu Oct 11 16:15:18 2012 (r241446) @@ -138,6 +138,14 @@ static const struct ng_parse_type ng_net &ng_netflow_setmtu_type_fields }; +/* Parse type for struct ng_netflow_v9info */ +static const struct ng_parse_struct_field ng_netflow_v9info_type_fields[] + = NG_NETFLOW_V9INFO_TYPE; +static const struct ng_parse_type ng_netflow_v9info_type = { + &ng_parse_struct_type, + &ng_netflow_v9info_type_fields +}; + /* List of commands and how to convert arguments to/from ASCII */ static const struct ng_cmdlist ng_netflow_cmds[] = { { @@ -196,6 +204,13 @@ static const struct ng_cmdlist ng_netflo &ng_netflow_setmtu_type, NULL }, + { + NGM_NETFLOW_COOKIE, + NGM_NETFLOW_V9INFO, + "v9info", + NULL, + &ng_netflow_v9info_type + }, { 0 } }; @@ -526,6 +541,17 @@ ng_netflow_rcvmsg (node_p node, item_p i break; } + case NGM_NETFLOW_V9INFO: + { + struct ng_netflow_v9info *i; + + NG_MKRESPONSE(resp, msg, sizeof(struct ng_netflow_v9info), + M_NOWAIT); + i = (struct ng_netflow_v9info *)resp->data; + ng_netflow_copyv9info(priv, i); + + break; + } default: ERROUT(EINVAL); /* unknown command */ break; Modified: head/sys/netgraph/netflow/ng_netflow.h ============================================================================== --- head/sys/netgraph/netflow/ng_netflow.h Thu Oct 11 15:49:42 2012 (r241445) +++ head/sys/netgraph/netflow/ng_netflow.h Thu Oct 11 16:15:18 2012 (r241446) @@ -34,6 +34,7 @@ #define NG_NETFLOW_NODE_TYPE "netflow" #define NGM_NETFLOW_COOKIE 1309868867 +#define NGM_NETFLOW_V9_COOKIE 1349865386 #define NG_NETFLOW_MAXIFACES USHRT_MAX @@ -58,6 +59,7 @@ enum { NGM_NETFLOW_SETCONFIG = 7, /* set flow generation options */ NGM_NETFLOW_SETTEMPLATE = 8, /* set v9 flow template periodic */ NGM_NETFLOW_SETMTU = 9, /* set outgoing interface MTU */ + NGM_NETFLOW_V9INFO = 10|NGM_READONLY|NGM_HASREPLY, /* get v9 info */ }; /* This structure is returned by the NGM_NETFLOW_INFO message */ @@ -147,6 +149,13 @@ struct ngnf_show_header { uint32_t nentries; /* number of records in response */ }; +/* This structure is used in NGM_NETFLOW_V9INFO message */ +struct ng_netflow_v9info { + uint16_t templ_packets; /* v9 template packets */ + uint16_t templ_time; /* v9 template time */ + uint16_t mtu; /* v9 MTU */ +}; + /* XXXGL * Somewhere flow_rec6 is casted to flow_rec, and flow6_entry_data is * casted to flow_entry_data. After casting, fle->r.fib is accessed. @@ -347,6 +356,14 @@ struct flow6_entry { { NULL } \ } +/* Parse the v9info structure */ +#define NG_NETFLOW_V9INFO_TYPE { \ + { "v9 template packets", &ng_parse_uint16_type },\ + { "v9 template time", &ng_parse_uint16_type },\ + { "v9 MTU", &ng_parse_uint16_type },\ + { NULL } \ +} + /* Private hook data */ struct ng_netflow_iface { hook_p hook; /* NULL when disconnected */ @@ -422,6 +439,7 @@ struct netflow { fib_export_p *fib_data; /* array of pointers to per-fib data */ uint16_t maxfibs; /* number of allocated fibs */ + /* Netflow v9 configuration options */ /* * RFC 3954 clause 7.3 * "Both options MUST be configurable by the user on the Exporter." @@ -472,6 +490,7 @@ void ng_netflow_cache_init(priv_p); void ng_netflow_cache_flush(priv_p); int ng_netflow_fib_init(priv_p priv, int fib); void ng_netflow_copyinfo(priv_p, struct ng_netflow_info *); +void ng_netflow_copyv9info(priv_p, struct ng_netflow_v9info *); timeout_t ng_netflow_expire; int ng_netflow_flow_add(priv_p, fib_export_p, struct ip *, caddr_t, uint8_t, uint8_t, unsigned int); int ng_netflow_flow6_add(priv_p, fib_export_p, struct ip6_hdr *, caddr_t , uint8_t, uint8_t, unsigned int); From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 18:01:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EAD1674E; Thu, 11 Oct 2012 18:01:31 +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 D1BB58FC14; Thu, 11 Oct 2012 18:01:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BI1VUt062627; Thu, 11 Oct 2012 18:01:31 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BI1V8X062623; Thu, 11 Oct 2012 18:01:31 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210111801.q9BI1V8X062623@svn.freebsd.org> From: Xin LI Date: Thu, 11 Oct 2012 18:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r241448 - in vendor/bind9/dist-9.6: . bin/named X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 18:01:32 -0000 Author: delphij Date: Thu Oct 11 18:01:31 2012 New Revision: 241448 URL: http://svn.freebsd.org/changeset/base/241448 Log: Vendor import of BIND 9.6-ESV-R7-P4. Modified: vendor/bind9/dist-9.6/CHANGES vendor/bind9/dist-9.6/bin/named/query.c vendor/bind9/dist-9.6/version Modified: vendor/bind9/dist-9.6/CHANGES ============================================================================== --- vendor/bind9/dist-9.6/CHANGES Thu Oct 11 17:32:03 2012 (r241447) +++ vendor/bind9/dist-9.6/CHANGES Thu Oct 11 18:01:31 2012 (r241448) @@ -1,3 +1,9 @@ + --- 9.6-ESV-R7-P4 released --- + +3383. [security] A certain combination of records in the RBT could + cause named to hang while populating the additional + section of a response. [RT #31090] + --- 9.6-ESV-R7-P3 released --- 3364. [security] Named could die on specially crafted record. Modified: vendor/bind9/dist-9.6/bin/named/query.c ============================================================================== --- vendor/bind9/dist-9.6/bin/named/query.c Thu Oct 11 17:32:03 2012 (r241447) +++ vendor/bind9/dist-9.6/bin/named/query.c Thu Oct 11 18:01:31 2012 (r241448) @@ -1025,13 +1025,6 @@ query_isduplicate(ns_client_t *client, d mname = NULL; } - /* - * If the dns_name_t we're looking up is already in the message, - * we don't want to trigger the caller's name replacement logic. - */ - if (name == mname) - mname = NULL; - if (mnamep != NULL) *mnamep = mname; @@ -1230,6 +1223,7 @@ query_addadditional(void *arg, dns_name_ if (dns_rdataset_isassociated(rdataset) && !query_isduplicate(client, fname, type, &mname)) { if (mname != NULL) { + INSIST(mname != fname); query_releasename(client, &fname); fname = mname; } else @@ -1292,11 +1286,13 @@ query_addadditional(void *arg, dns_name_ mname = NULL; if (!query_isduplicate(client, fname, dns_rdatatype_a, &mname)) { - if (mname != NULL) { - query_releasename(client, &fname); - fname = mname; - } else - need_addname = ISC_TRUE; + if (mname != fname) { + if (mname != NULL) { + query_releasename(client, &fname); + fname = mname; + } else + need_addname = ISC_TRUE; + } ISC_LIST_APPEND(fname->list, rdataset, link); added_something = ISC_TRUE; if (sigrdataset != NULL && @@ -1338,11 +1334,13 @@ query_addadditional(void *arg, dns_name_ mname = NULL; if (!query_isduplicate(client, fname, dns_rdatatype_aaaa, &mname)) { - if (mname != NULL) { - query_releasename(client, &fname); - fname = mname; - } else - need_addname = ISC_TRUE; + if (mname != fname) { + if (mname != NULL) { + query_releasename(client, &fname); + fname = mname; + } else + need_addname = ISC_TRUE; + } ISC_LIST_APPEND(fname->list, rdataset, link); added_something = ISC_TRUE; if (sigrdataset != NULL && @@ -1865,22 +1863,24 @@ query_addadditional2(void *arg, dns_name crdataset->type == dns_rdatatype_aaaa) { if (!query_isduplicate(client, fname, crdataset->type, &mname)) { - if (mname != NULL) { - /* - * A different type of this name is - * already stored in the additional - * section. We'll reuse the name. - * Note that this should happen at most - * once. Otherwise, fname->link could - * leak below. - */ - INSIST(mname0 == NULL); - - query_releasename(client, &fname); - fname = mname; - mname0 = mname; - } else - need_addname = ISC_TRUE; + if (mname != fname) { + if (mname != NULL) { + /* + * A different type of this name is + * already stored in the additional + * section. We'll reuse the name. + * Note that this should happen at most + * once. Otherwise, fname->link could + * leak below. + */ + INSIST(mname0 == NULL); + + query_releasename(client, &fname); + fname = mname; + mname0 = mname; + } else + need_addname = ISC_TRUE; + } ISC_LIST_UNLINK(cfname.list, crdataset, link); ISC_LIST_APPEND(fname->list, crdataset, link); added_something = ISC_TRUE; Modified: vendor/bind9/dist-9.6/version ============================================================================== --- vendor/bind9/dist-9.6/version Thu Oct 11 17:32:03 2012 (r241447) +++ vendor/bind9/dist-9.6/version Thu Oct 11 18:01:31 2012 (r241448) @@ -7,4 +7,4 @@ MAJORVER=9 MINORVER=6 PATCHVER= RELEASETYPE=-ESV -RELEASEVER=-R7-P3 +RELEASEVER=-R7-P4 From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 18:05:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 353D994E; Thu, 11 Oct 2012 18:05:21 +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 04FA18FC0A; Thu, 11 Oct 2012 18:05:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BI5KES063128; Thu, 11 Oct 2012 18:05:20 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BI5KPJ063127; Thu, 11 Oct 2012 18:05:20 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210111805.q9BI5KPJ063127@svn.freebsd.org> From: Xin LI Date: Thu, 11 Oct 2012 18:05:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r241449 - vendor/bind9/9.6-ESV-R7-P4 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 18:05:21 -0000 Author: delphij Date: Thu Oct 11 18:05:20 2012 New Revision: 241449 URL: http://svn.freebsd.org/changeset/base/241449 Log: Tag the 9.6-ESV-R7-P4 release. Added: vendor/bind9/9.6-ESV-R7-P4/ - copied from r241448, vendor/bind9/dist-9.6/ From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 18:11:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A027CC6B; Thu, 11 Oct 2012 18:11:38 +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 6F5488FC08; Thu, 11 Oct 2012 18:11:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BIBcE0064007; Thu, 11 Oct 2012 18:11:38 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BIBcZE064006; Thu, 11 Oct 2012 18:11:38 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210111811.q9BIBcZE064006@svn.freebsd.org> From: Xin LI Date: Thu, 11 Oct 2012 18:11:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241450 - stable/8/contrib/bind9 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 18:11:38 -0000 Author: delphij Date: Thu Oct 11 18:11:38 2012 New Revision: 241450 URL: http://svn.freebsd.org/changeset/base/241450 Log: Record mergeinfo for r241443 to ease future imports. Modified: Directory Properties: stable/8/contrib/bind9/ (props changed) From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 18:41:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1BAD187C; Thu, 11 Oct 2012 18:41:33 +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 04EFE8FC08; Thu, 11 Oct 2012 18:41:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BIfWD6067499; Thu, 11 Oct 2012 18:41:32 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BIfWdk067497; Thu, 11 Oct 2012 18:41:32 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201210111841.q9BIfWdk067497@svn.freebsd.org> From: Ed Maste Date: Thu, 11 Oct 2012 18:41:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241451 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 18:41:33 -0000 Author: emaste Date: Thu Oct 11 18:41:32 2012 New Revision: 241451 URL: http://svn.freebsd.org/changeset/base/241451 Log: Exclude potential circular symlink when creating src tarball. Normal release builds are not affected by this but it can happen if using these release bits against a work tree. Sponsored by: ADARA Networks Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Thu Oct 11 18:11:38 2012 (r241450) +++ head/release/Makefile Thu Oct 11 18:41:32 2012 (r241451) @@ -84,7 +84,7 @@ src.txz: mkdir -p ${DISTDIR}/usr ln -fs ${WORLDDIR} ${DISTDIR}/usr/src cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/src.txz --exclude .svn \ - --exclude CVS usr/src + --exclude CVS --exclude @ usr/src ports.txz: mkdir -p ${DISTDIR}/usr From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 19:50:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 886FCE69 for ; Thu, 11 Oct 2012 19:50:47 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-da0-f54.google.com (mail-da0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 269DC8FC1A for ; Thu, 11 Oct 2012 19:50:46 +0000 (UTC) Received: by mail-da0-f54.google.com with SMTP id z9so1006540dad.13 for ; Thu, 11 Oct 2012 12:50:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=CQukY16j5Omfr5zDK8/M8gSqNx2SiZfu9Ohz1cMAL0U=; b=HcsHCF58BbHpwyMVAzimflwCy2gd3zj4gBBkwLf1CB2MsaJ+eRIhos2rmiRonm0AJj 135huQCBTQre+v/N1B3Cp6FARMGg3wyozWBM5oRluxtXvUuX+auQLGvmqD5z3g+5kQj0 S8jmzQOQ+oWxZTd9gLXy0E2j+buO+QlSMDnZ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=CQukY16j5Omfr5zDK8/M8gSqNx2SiZfu9Ohz1cMAL0U=; b=Id/KyVy9xHg270c112nzjWrnWFkoA5AGVObyyPz5L8Fw3wTBpOfIP9GLrZNZxdrFJZ HJNFvAvrJeeOUkpT8qX38sG2LnV1AfAX4j8oBXEfTGk1rPMuldis7vSXUhRy3bDz2+PY 3tZFNy9vmf4/indsaZO2icErVdNPbdpel5sx8+DP3XfyC7aPGwBvBYUi3pF0fDxMWqFQ 0Z/EmlIeUgMEERKm0EvsffUfNLYptSJAZpI9p/ZBR8XmhLVnND4/TKgvCfoi2+dpo+d5 XRW1nufqLmK+OuK3ODk6iWJAcgvtiLpoXd+9Si0O2XUQXLCTIbf5rmRxhF4IBqDC05Wy nQcA== Received: by 10.66.90.65 with SMTP id bu1mr5070060pab.31.1349985046592; Thu, 11 Oct 2012 12:50:46 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.161.163 with HTTP; Thu, 11 Oct 2012 12:50:15 -0700 (PDT) In-Reply-To: <20121011114425.GA1562@garage.freebsd.pl> References: <201210091425.q99EPFS6020787@svn.freebsd.org> <507451DE.9060909@freebsd.org> <977E1107-46D4-476F-A04D-AEFD87D1DE53@FreeBSD.org> <20121011114425.GA1562@garage.freebsd.pl> From: Eitan Adler Date: Thu, 11 Oct 2012 15:50:15 -0400 X-Google-Sender-Auth: XsG1IbJ7nqzAkBU3iTqIeOVqixQ Message-ID: Subject: Re: svn commit: r241373 - head/lib/libc/stdlib To: Pawel Jakub Dawidek Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmCwWMKjFVdGjOs3kMoFskUAtKC1vg7A5grR6zEIPRoWRKJ5hbBGi9ajfS0d5LUFV1Frg6S Cc: mdf@freebsd.org, src-committers@freebsd.org, Andrey Chernov , svn-src-all@freebsd.org, David Chisnall , svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 19:50:47 -0000 On 11 October 2012 07:44, Pawel Jakub Dawidek wrote: > On Tue, Oct 09, 2012 at 01:51:05PM -0400, Eitan Adler wrote: >> On 9 October 2012 13:27, wrote: >> > The original behavior can be recovered by using inline assembly to >> > fetch the value from a register into a local C variable; this would at >> > least not rely on undefined behavior. But I agree it's of dubious >> > value anyways. >> >> I proposed this (with a patch). We want to move to not using >> /dev/random and instead make a kernel system call directly. The patch >> for this is not finished yet though. > > You should do something similar to: > > http://people.freebsd.org/~pjd/patches/libc_arc4random.c.patch Yes, this is exactly the proposed "correct" fix. I haven't had time to properly write and test such a patch though, so I opted for this one in the meantime. FWIW, the man page *used* to contain the text The srandomdev() routine initializes a state array using the random(4) random number device which returns good random numbers, suitable for cryptographic use. which made this problem 'worse' as it mislead people into believing rand/random could be used for crpyto. des@ fixed this problem already -- Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 19:57:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9D986256; Thu, 11 Oct 2012 19:57:12 +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 85E3A8FC08; Thu, 11 Oct 2012 19:57:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BJvCqc077012; Thu, 11 Oct 2012 19:57:12 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BJvCjC077008; Thu, 11 Oct 2012 19:57:12 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210111957.q9BJvCjC077008@svn.freebsd.org> From: Alexander Motin Date: Thu, 11 Oct 2012 19:57:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241455 - in head/sys/cam: . ata scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 19:57:12 -0000 Author: mav Date: Thu Oct 11 19:57:11 2012 New Revision: 241455 URL: http://svn.freebsd.org/changeset/base/241455 Log: Don't duplicate path/ccb allocation code, use existing functions. Modified: head/sys/cam/ata/ata_xpt.c head/sys/cam/cam_xpt.c head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Thu Oct 11 19:39:54 2012 (r241454) +++ head/sys/cam/ata/ata_xpt.c Thu Oct 11 19:57:11 2012 (r241455) @@ -1462,29 +1462,20 @@ ata_scan_lun(struct cam_periph *periph, } if (request_ccb == NULL) { - request_ccb = malloc(sizeof(union ccb), M_CAMXPT, M_NOWAIT); + request_ccb = xpt_alloc_ccb_nowait(); if (request_ccb == NULL) { xpt_print(path, "xpt_scan_lun: can't allocate CCB, " "can't continue\n"); return; } - new_path = malloc(sizeof(*new_path), M_CAMXPT, M_NOWAIT); - if (new_path == NULL) { - xpt_print(path, "xpt_scan_lun: can't allocate path, " - "can't continue\n"); - free(request_ccb, M_CAMXPT); - return; - } - status = xpt_compile_path(new_path, xpt_periph, + status = xpt_create_path(&new_path, xpt_periph, path->bus->path_id, path->target->target_id, path->device->lun_id); - if (status != CAM_REQ_CMP) { - xpt_print(path, "xpt_scan_lun: can't compile path, " + xpt_print(path, "xpt_scan_lun: can't create path, " "can't continue\n"); - free(request_ccb, M_CAMXPT); - free(new_path, M_CAMXPT); + xpt_free_ccb(request_ccb); return; } xpt_setup_ccb(&request_ccb->ccb_h, new_path, CAM_PRIORITY_XPT); @@ -1524,9 +1515,9 @@ ata_scan_lun(struct cam_periph *periph, static void xptscandone(struct cam_periph *periph, union ccb *done_ccb) { - xpt_release_path(done_ccb->ccb_h.path); - free(done_ccb->ccb_h.path, M_CAMXPT); - free(done_ccb, M_CAMXPT); + + xpt_free_path(done_ccb->ccb_h.path); + xpt_free_ccb(done_ccb); } static struct cam_ed * Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Oct 11 19:39:54 2012 (r241454) +++ head/sys/cam/cam_xpt.c Thu Oct 11 19:57:11 2012 (r241455) @@ -3857,12 +3857,6 @@ xpt_bus_register(struct cam_sim *sim, de /* Couldn't satisfy request */ return (CAM_RESRC_UNAVAIL); } - path = (struct cam_path *)malloc(sizeof(*path), M_CAMXPT, M_NOWAIT); - if (path == NULL) { - free(new_bus, M_CAMXPT); - return (CAM_RESRC_UNAVAIL); - } - if (strcmp(sim->sim_name, "xpt") != 0) { sim->path_id = xptpathid(sim->sim_name, sim->unit_number, sim->bus_id); @@ -3896,7 +3890,7 @@ xpt_bus_register(struct cam_sim *sim, de */ new_bus->xport = &xport_default; - status = xpt_compile_path(path, /*periph*/NULL, sim->path_id, + status = xpt_create_path(&path, /*periph*/NULL, sim->path_id, CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); if (status != CAM_REQ_CMP) { xpt_release_bus(new_bus); Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Thu Oct 11 19:39:54 2012 (r241454) +++ head/sys/cam/scsi/scsi_xpt.c Thu Oct 11 19:57:11 2012 (r241455) @@ -2243,29 +2243,20 @@ scsi_scan_lun(struct cam_periph *periph, } if (request_ccb == NULL) { - request_ccb = malloc(sizeof(union ccb), M_CAMXPT, M_NOWAIT); + request_ccb = xpt_alloc_ccb_nowait(); if (request_ccb == NULL) { xpt_print(path, "scsi_scan_lun: can't allocate CCB, " "can't continue\n"); return; } - new_path = malloc(sizeof(*new_path), M_CAMXPT, M_NOWAIT); - if (new_path == NULL) { - xpt_print(path, "scsi_scan_lun: can't allocate path, " - "can't continue\n"); - free(request_ccb, M_CAMXPT); - return; - } - status = xpt_compile_path(new_path, xpt_periph, + status = xpt_create_path(&new_path, xpt_periph, path->bus->path_id, path->target->target_id, path->device->lun_id); - if (status != CAM_REQ_CMP) { - xpt_print(path, "scsi_scan_lun: can't compile path, " + xpt_print(path, "scsi_scan_lun: can't create path, " "can't continue\n"); - free(request_ccb, M_CAMXPT); - free(new_path, M_CAMXPT); + xpt_free_ccb(request_ccb); return; } xpt_setup_ccb(&request_ccb->ccb_h, new_path, CAM_PRIORITY_XPT); @@ -2304,9 +2295,9 @@ scsi_scan_lun(struct cam_periph *periph, static void xptscandone(struct cam_periph *periph, union ccb *done_ccb) { - xpt_release_path(done_ccb->ccb_h.path); - free(done_ccb->ccb_h.path, M_CAMXPT); - free(done_ccb, M_CAMXPT); + + xpt_free_path(done_ccb->ccb_h.path); + xpt_free_ccb(done_ccb); } static struct cam_ed * From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 20:14:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1A2B573C; Thu, 11 Oct 2012 20:14:12 +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 028378FC0A; Thu, 11 Oct 2012 20:14:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BKEBfa079262; Thu, 11 Oct 2012 20:14:11 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BKEBZi079259; Thu, 11 Oct 2012 20:14:11 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210112014.q9BKEBZi079259@svn.freebsd.org> From: Alexander Motin Date: Thu, 11 Oct 2012 20:14:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241456 - head/sys/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 20:14:12 -0000 Author: mav Date: Thu Oct 11 20:14:11 2012 New Revision: 241456 URL: http://svn.freebsd.org/changeset/base/241456 Log: Use separate malloc buckets for CAM devices, CCBs and paths. This will make it easier to track down the source of any use after free problems. Submitted by: ken@ Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Oct 11 19:57:11 2012 (r241455) +++ head/sys/cam/cam_xpt.c Thu Oct 11 20:14:11 2012 (r241456) @@ -78,6 +78,9 @@ __FBSDID("$FreeBSD$"); /* Datastructures internal to the xpt layer */ MALLOC_DEFINE(M_CAMXPT, "CAM XPT", "CAM XPT buffers"); +MALLOC_DEFINE(M_CAMDEV, "CAM DEV", "CAM devices"); +MALLOC_DEFINE(M_CAMCCB, "CAM CCB", "CAM CCBs"); +MALLOC_DEFINE(M_CAMPATH, "CAM path", "CAM paths"); /* Object for defering XPT actions to a taskqueue */ struct xpt_task { @@ -3397,7 +3400,7 @@ xpt_create_path(struct cam_path **new_pa struct cam_path *path; cam_status status; - path = (struct cam_path *)malloc(sizeof(*path), M_CAMXPT, M_NOWAIT); + path = (struct cam_path *)malloc(sizeof(*path), M_CAMPATH, M_NOWAIT); if (path == NULL) { status = CAM_RESRC_UNAVAIL; @@ -3405,7 +3408,7 @@ xpt_create_path(struct cam_path **new_pa } status = xpt_compile_path(path, perph, path_id, target_id, lun_id); if (status != CAM_REQ_CMP) { - free(path, M_CAMXPT); + free(path, M_CAMPATH); path = NULL; } *new_path_ptr = path; @@ -3422,7 +3425,7 @@ xpt_create_path_unlocked(struct cam_path cam_status status; int need_unlock = 0; - path = (struct cam_path *)malloc(sizeof(*path), M_CAMXPT, M_WAITOK); + path = (struct cam_path *)malloc(sizeof(*path), M_CAMPATH, M_WAITOK); if (path_id != CAM_BUS_WILDCARD) { bus = xpt_find_bus(path_id); @@ -3437,7 +3440,7 @@ xpt_create_path_unlocked(struct cam_path xpt_release_bus(bus); } if (status != CAM_REQ_CMP) { - free(path, M_CAMXPT); + free(path, M_CAMPATH); path = NULL; } *new_path_ptr = path; @@ -3540,7 +3543,7 @@ xpt_free_path(struct cam_path *path) CAM_DEBUG(path, CAM_DEBUG_TRACE, ("xpt_free_path\n")); xpt_release_path(path); - free(path, M_CAMXPT); + free(path, M_CAMPATH); } void @@ -4377,7 +4380,7 @@ xpt_alloc_ccb() { union ccb *new_ccb; - new_ccb = malloc(sizeof(*new_ccb), M_CAMXPT, M_ZERO|M_WAITOK); + new_ccb = malloc(sizeof(*new_ccb), M_CAMCCB, M_ZERO|M_WAITOK); return (new_ccb); } @@ -4386,14 +4389,14 @@ xpt_alloc_ccb_nowait() { union ccb *new_ccb; - new_ccb = malloc(sizeof(*new_ccb), M_CAMXPT, M_ZERO|M_NOWAIT); + new_ccb = malloc(sizeof(*new_ccb), M_CAMCCB, M_ZERO|M_NOWAIT); return (new_ccb); } void xpt_free_ccb(union ccb *free_ccb) { - free(free_ccb, M_CAMXPT); + free(free_ccb, M_CAMCCB); } @@ -4545,7 +4548,7 @@ xpt_alloc_device(struct cam_eb *bus, str device = NULL; } else { device = (struct cam_ed *)malloc(sizeof(*device), - M_CAMXPT, M_NOWAIT|M_ZERO); + M_CAMDEV, M_NOWAIT|M_ZERO); } if (device != NULL) { @@ -4558,13 +4561,13 @@ xpt_alloc_device(struct cam_eb *bus, str device->sim = bus->sim; /* Initialize our queues */ if (camq_init(&device->drvq, 0) != 0) { - free(device, M_CAMXPT); + free(device, M_CAMDEV); return (NULL); } if (cam_ccbq_init(&device->ccbq, bus->sim->max_dev_openings) != 0) { camq_fini(&device->drvq); - free(device, M_CAMXPT); + free(device, M_CAMDEV); return (NULL); } SLIST_INIT(&device->asyncs); @@ -4628,7 +4631,7 @@ xpt_release_device(struct cam_ed *device free(device->serial_num, M_CAMXPT); xpt_release_target(device->target); - free(device, M_CAMXPT); + free(device, M_CAMDEV); } else device->refcount--; } From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 20:46:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 96EF6D6A; Thu, 11 Oct 2012 20:46:05 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 803838FC16; Thu, 11 Oct 2012 20:46:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BKk5F2083254; Thu, 11 Oct 2012 20:46:05 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BKk5H7083252; Thu, 11 Oct 2012 20:46:05 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201210112046.q9BKk5H7083252@svn.freebsd.org> From: Peter Wemm Date: Thu, 11 Oct 2012 20:46:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241457 - head/etc/sendmail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 20:46:05 -0000 Author: peter Date: Thu Oct 11 20:46:04 2012 New Revision: 241457 URL: http://svn.freebsd.org/changeset/base/241457 Log: Point freebsd.org cluster machines to mx1 for their smarthost. Modified: head/etc/sendmail/freefall.mc Modified: head/etc/sendmail/freefall.mc ============================================================================== --- head/etc/sendmail/freefall.mc Thu Oct 11 20:14:11 2012 (r241456) +++ head/etc/sendmail/freefall.mc Thu Oct 11 20:46:04 2012 (r241457) @@ -43,5 +43,5 @@ divert(0)dnl VERSIONID(`$FreeBSD$') OSTYPE(freebsd6) -FEATURE(nullclient, hub.$m) +FEATURE(nullclient, mx1.$m) MASQUERADE_AS(FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 20:48:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5AABFF18; Thu, 11 Oct 2012 20:48:46 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 429678FC16; Thu, 11 Oct 2012 20:48:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BKmkUM083597; Thu, 11 Oct 2012 20:48:46 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BKmk6o083595; Thu, 11 Oct 2012 20:48:46 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201210112048.q9BKmk6o083595@svn.freebsd.org> From: Peter Wemm Date: Thu, 11 Oct 2012 20:48:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241458 - stable/9/etc/sendmail X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 20:48:46 -0000 Author: peter Date: Thu Oct 11 20:48:45 2012 New Revision: 241458 URL: http://svn.freebsd.org/changeset/base/241458 Log: Point freebsd.org nullclient cluster machines to mx1 Modified: stable/9/etc/sendmail/freefall.mc Modified: stable/9/etc/sendmail/freefall.mc ============================================================================== --- stable/9/etc/sendmail/freefall.mc Thu Oct 11 20:46:04 2012 (r241457) +++ stable/9/etc/sendmail/freefall.mc Thu Oct 11 20:48:45 2012 (r241458) @@ -43,5 +43,5 @@ divert(0)dnl VERSIONID(`$FreeBSD$') OSTYPE(freebsd6) -FEATURE(nullclient, hub.$m) +FEATURE(nullclient, mx1.$m) MASQUERADE_AS(FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 20:51:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4E5E714B; Thu, 11 Oct 2012 20:51:00 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 366208FC0A; Thu, 11 Oct 2012 20:51:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BKp0vo083901; Thu, 11 Oct 2012 20:51:00 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BKp0hV083899; Thu, 11 Oct 2012 20:51:00 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201210112051.q9BKp0hV083899@svn.freebsd.org> From: Peter Wemm Date: Thu, 11 Oct 2012 20:51:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241459 - stable/8/etc/sendmail X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 20:51:00 -0000 Author: peter Date: Thu Oct 11 20:50:59 2012 New Revision: 241459 URL: http://svn.freebsd.org/changeset/base/241459 Log: Switch freebsd.org nullhost cluster machines from hub to mx1. Modified: stable/8/etc/sendmail/freefall.mc Modified: stable/8/etc/sendmail/freefall.mc ============================================================================== --- stable/8/etc/sendmail/freefall.mc Thu Oct 11 20:48:45 2012 (r241458) +++ stable/8/etc/sendmail/freefall.mc Thu Oct 11 20:50:59 2012 (r241459) @@ -43,5 +43,5 @@ divert(0)dnl VERSIONID(`$FreeBSD$') OSTYPE(freebsd6) -FEATURE(nullclient, hub.$m) +FEATURE(nullclient, mx1.$m) MASQUERADE_AS(FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 20:52:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 92DE42C7; Thu, 11 Oct 2012 20:52:23 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A62A8FC1B; Thu, 11 Oct 2012 20:52:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BKqN10084107; Thu, 11 Oct 2012 20:52:23 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BKqN6Y084104; Thu, 11 Oct 2012 20:52:23 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201210112052.q9BKqN6Y084104@svn.freebsd.org> From: Peter Wemm Date: Thu, 11 Oct 2012 20:52:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r241460 - stable/7/etc/sendmail X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 20:52:23 -0000 Author: peter Date: Thu Oct 11 20:52:23 2012 New Revision: 241460 URL: http://svn.freebsd.org/changeset/base/241460 Log: Switch freebsd.org nullhost cluster machines from hub to mx1 Modified: stable/7/etc/sendmail/freefall.mc Modified: stable/7/etc/sendmail/freefall.mc ============================================================================== --- stable/7/etc/sendmail/freefall.mc Thu Oct 11 20:50:59 2012 (r241459) +++ stable/7/etc/sendmail/freefall.mc Thu Oct 11 20:52:23 2012 (r241460) @@ -43,5 +43,5 @@ divert(0)dnl VERSIONID(`$FreeBSD$') OSTYPE(freebsd6) -FEATURE(nullclient, hub.$m) +FEATURE(nullclient, mx1.$m) MASQUERADE_AS(FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 20:53:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0F116556; Thu, 11 Oct 2012 20:53:12 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC4B58FC0C; Thu, 11 Oct 2012 20:53:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BKrBrf084241; Thu, 11 Oct 2012 20:53:11 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BKrBkN084238; Thu, 11 Oct 2012 20:53:11 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201210112053.q9BKrBkN084238@svn.freebsd.org> From: Peter Wemm Date: Thu, 11 Oct 2012 20:53:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org Subject: svn commit: r241461 - stable/6/etc/sendmail X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 20:53:12 -0000 Author: peter Date: Thu Oct 11 20:53:11 2012 New Revision: 241461 URL: http://svn.freebsd.org/changeset/base/241461 Log: Switch freebsd.org nullhost cluster machines from hub to mx1 Modified: stable/6/etc/sendmail/freefall.mc Modified: stable/6/etc/sendmail/freefall.mc ============================================================================== --- stable/6/etc/sendmail/freefall.mc Thu Oct 11 20:52:23 2012 (r241460) +++ stable/6/etc/sendmail/freefall.mc Thu Oct 11 20:53:11 2012 (r241461) @@ -43,5 +43,5 @@ divert(0)dnl VERSIONID(`$FreeBSD$') OSTYPE(freebsd6) -FEATURE(nullclient, hub.$m) +FEATURE(nullclient, mx1.$m) MASQUERADE_AS(FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 21:15:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 24DFECDF; Thu, 11 Oct 2012 21:15:55 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CE538FC19; Thu, 11 Oct 2012 21:15:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BLFs1i086932; Thu, 11 Oct 2012 21:15:54 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BLFsg2086930; Thu, 11 Oct 2012 21:15:54 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201210112115.q9BLFsg2086930@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 11 Oct 2012 21:15:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241462 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 21:15:55 -0000 Author: np Date: Thu Oct 11 21:15:54 2012 New Revision: 241462 URL: http://svn.freebsd.org/changeset/base/241462 Log: MFC r233850: - Remove redundant call to pr_ctloutput from code that handles SO_SETFIB. - Add a check for errors during copyin while here. Modified: stable/9/sys/kern/uipc_socket.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/uipc_socket.c ============================================================================== --- stable/9/sys/kern/uipc_socket.c Thu Oct 11 20:53:11 2012 (r241461) +++ stable/9/sys/kern/uipc_socket.c Thu Oct 11 21:15:54 2012 (r241462) @@ -2498,20 +2498,19 @@ sosetopt(struct socket *so, struct socko case SO_SETFIB: error = sooptcopyin(sopt, &optval, sizeof optval, sizeof optval); + if (error) + goto bad; + if (optval < 0 || optval >= rt_numfibs) { error = EINVAL; goto bad; } if (((so->so_proto->pr_domain->dom_family == PF_INET) || (so->so_proto->pr_domain->dom_family == PF_INET6) || - (so->so_proto->pr_domain->dom_family == PF_ROUTE))) { + (so->so_proto->pr_domain->dom_family == PF_ROUTE))) so->so_fibnum = optval; - /* Note: ignore error */ - if (so->so_proto->pr_ctloutput) - (*so->so_proto->pr_ctloutput)(so, sopt); - } else { + else so->so_fibnum = 0; - } break; case SO_USER_COOKIE: From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 21:19:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6C227FDD; Thu, 11 Oct 2012 21:19:43 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 549BF8FC0C; Thu, 11 Oct 2012 21:19:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BLJhKr087600; Thu, 11 Oct 2012 21:19:43 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BLJhmi087598; Thu, 11 Oct 2012 21:19:43 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201210112119.q9BLJhmi087598@svn.freebsd.org> From: Aleksandr Rybalko Date: Thu, 11 Oct 2012 21:19:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241463 - head/sys/dev/etherswitch/arswitch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 21:19:43 -0000 Author: ray Date: Thu Oct 11 21:19:42 2012 New Revision: 241463 URL: http://svn.freebsd.org/changeset/base/241463 Log: Fix tiypo. Submitted by: Luiz Otavio O Souza Approved by: adrian (mentor) Modified: head/sys/dev/etherswitch/arswitch/arswitchvar.h Modified: head/sys/dev/etherswitch/arswitch/arswitchvar.h ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitchvar.h Thu Oct 11 21:15:54 2012 (r241462) +++ head/sys/dev/etherswitch/arswitch/arswitchvar.h Thu Oct 11 21:19:42 2012 (r241463) @@ -70,7 +70,7 @@ struct arswitch_softc { #define ARSWITCH_UNLOCK(_sc) \ mtx_unlock(&(_sc)->sc_mtx) #define ARSWITCH_LOCK_ASSERT(_sc, _what) \ - mtx_assert(&(_s)c->sc_mtx, (_what)) + mtx_assert(&(_sc)->sc_mtx, (_what)) #define ARSWITCH_TRYLOCK(_sc) \ mtx_trylock(&(_sc)->sc_mtx) From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 21:24:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 88B1B20D; Thu, 11 Oct 2012 21:24:08 +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 71C218FC0A; Thu, 11 Oct 2012 21:24:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BLO83r088419; Thu, 11 Oct 2012 21:24:08 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BLO80Y088417; Thu, 11 Oct 2012 21:24:08 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201210112124.q9BLO80Y088417@svn.freebsd.org> From: Ed Maste Date: Thu, 11 Oct 2012 21:24:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241464 - head/tools/tools/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 21:24:08 -0000 Author: emaste Date: Thu Oct 11 21:24:07 2012 New Revision: 241464 URL: http://svn.freebsd.org/changeset/base/241464 Log: Make local function static. Modified: head/tools/tools/netmap/pcap.c Modified: head/tools/tools/netmap/pcap.c ============================================================================== --- head/tools/tools/netmap/pcap.c Thu Oct 11 21:19:42 2012 (r241463) +++ head/tools/tools/netmap/pcap.c Thu Oct 11 21:24:07 2012 (r241464) @@ -49,7 +49,7 @@ int verbose = 0; __FUNCTION__, __LINE__, ##__VA_ARGS__); \ } while (0) -inline void prefetch (const void *x) +static inline void prefetch (const void *x) { __asm volatile("prefetcht0 %0" :: "m" (*(const unsigned long *)x)); } From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 21:29:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 60BC63E4; Thu, 11 Oct 2012 21:29:12 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 45EA88FC17; Thu, 11 Oct 2012 21:29:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BLTCGn089066; Thu, 11 Oct 2012 21:29:12 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BLTCUw089062; Thu, 11 Oct 2012 21:29:12 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201210112129.q9BLTCUw089062@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 11 Oct 2012 21:29:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241465 - in stable/9/sys: dev/cxgbe/common dev/cxgbe/firmware modules/cxgbe/firmware X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 21:29:12 -0000 Author: np Date: Thu Oct 11 21:29:11 2012 New Revision: 241465 URL: http://svn.freebsd.org/changeset/base/241465 Log: MFC r240443: Update interface to firmware 1.6.2 and include the firmware in the driver. Added: stable/9/sys/dev/cxgbe/firmware/t4fw-1.6.2.0.bin.uu - copied unchanged from r240443, head/sys/dev/cxgbe/firmware/t4fw-1.6.2.0.bin.uu Modified: stable/9/sys/dev/cxgbe/common/common.h stable/9/sys/dev/cxgbe/firmware/t4fw_interface.h stable/9/sys/modules/cxgbe/firmware/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/9/sys/dev/cxgbe/common/common.h Thu Oct 11 21:24:07 2012 (r241464) +++ stable/9/sys/dev/cxgbe/common/common.h Thu Oct 11 21:29:11 2012 (r241465) @@ -64,7 +64,7 @@ enum { }; #define FW_VERSION_MAJOR 1 -#define FW_VERSION_MINOR 5 +#define FW_VERSION_MINOR 6 #define FW_VERSION_MICRO 2 struct port_stats { Copied: stable/9/sys/dev/cxgbe/firmware/t4fw-1.6.2.0.bin.uu (from r240443, head/sys/dev/cxgbe/firmware/t4fw-1.6.2.0.bin.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/dev/cxgbe/firmware/t4fw-1.6.2.0.bin.uu Thu Oct 11 21:29:11 2012 (r241465, copy of r240443, head/sys/dev/cxgbe/firmware/t4fw-1.6.2.0.bin.uu) @@ -0,0 +1,7600 @@ +/*- + * Copyright (c) 2012 Chelsio Communications, Inc. + * 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. + */ +begin-base64 644 t4fw +AAADSwEGAgAAAQkBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAzADPwNGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAENoZWxzaW8gRlcgUlVOTUVNIERFQlVHPTAgKEJ1aWx0IE1vbiBBdWcgMTMgMTM6 +MjU6MDYgUERUIDIwMTIgb24gY2xlb3BhdHJhLmFzaWNkZXNpZ25lcnMuY29tOi9ob21lL2ZlbGl4 +L3cvdDRmdy1yZWxlYXNlKSwgVmVyc2lvbiBUNHh4IDAxLjA2LjAyLjAwAAAAAAAAAAAAAGp9qktg +ALwAH/zhQIAAAAHhAHtwAAAQAB//9fjhAGAQ4QGUcCAAAADhAZwE4QB5AAACAEDhAHmAAAYAQAAC +AAoABgAK4QB5BAAKAACAAAEA4QB7POEAe0ThAHvk4gAAAAABAADhAHuQIAAAAAAAgADhAHsAAABA +AeEAe5wAAEAAREREQuAAAADjAARjREREQOMACAAgAAJcAAAAAB//ixAAAAAAH/+LFAAAAAAf/4sY +AAAAAB//ixwf/8AAAAAAAAAAAADAABH/0BL/0JIQEf/QEv/QkhAR/9AB9DER/9CQEBH/zyIK/5IQ +AOQxAAUxAQIAEv/MAucxAhYAEf/LgRABAV/AIQIRAckREf/IEv/IkhAR/8gS/8iSEGAADxH/wxL/ +x5IQEf/DEv/GkhCBEBH/xcAgkhES/8SSEsAgkhMS/8OSEIIQAvJQZS/3Ef/Bxy+SEBH/wJIQEv/A +E//AkyDAMpMhE/+/kyKCIhL/vhP/vpMgIyIhFP+9BDMByTgT/7yDMAODFAgzERT/uqQzkyET/66T +ImAACMIwkyET/6uTIhL/tZAgkCGQIpAjkCSQJZAmkCeQKJApkCqQK5AskC2QLpAvICYQICYRgiIS +/6jAMC03MC03NC03OC03PCM9AXIz7QACABL/pSMKAC83AC83EC83IC83MCM9AXIz7QACABL/msAw +KDcwKDc0KDc4KDc8Iz0BcjPtAwIAEv+YwDAnNwAnNxAnNyAnNzAjPQFyM+0DAgAS/5IV/5MW/5PA +MNcgBWYBYAAeAAAAAAAAAAAAAAAABDYFAAIA0w/TDwUzDG47FAdHFAcEQ3Yx5gQ2BQUzDG877QAC +ABL/hBX/giMKAAInAgcEQwQ+BQUzDAdHFG878AMCABL/fskugyCEIYUivCJ0Ow6GULRVljC0M3Qz +9GP/5gBlP+JlX98S/3LAMgMuBQMCABL/acAwKDdAKDdEKDdIKDdMIz0BcjPtAwIAAAIAEv9sLScA +wBEBSTEASDEBAgDAABT/aATSMRX/Z5RQFP9nBNMxFf9nlFAU/2YE1DEV/2aUUBT/ZgTVMRX/ZZRQ +EP9lAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf/AAA +H/wAAOMACfgf/AAAH/wAAOMACfgf/AAAH/wAAOMACfgf/4AAH/+F4OMACfgf/4XgH/+F4OMAD9gf +/4XgH/+F4OMAD9gf/4XgH/+HFOMAD9gf/4cUH/+LEOMAEQwf/4sQH/+gNOMAFQgf/6A0H/+gNOMA +Kiwf/8AAH//29eMAKiwgAAAAIAABauMAYSQgAAF4IAABfOMAYpAgAAF8IAABheMAYpQgAAGYIAAB +nOMAYqAgAAGcIAABpeMAYqQgAAG4IAABvOMAYrAgAAG8IAABxeMAYrQgAAHYIAAB2OMAYsAgAAHc +IAAB4uMAYsAgAAH4IAAB+OMAYsggAAH8IAAB/OMAYsggAAIYIAACGOMAYsggAAIcIAACHOMAYsgg +AAI4IAACOOMAYsggAAI8IAACPOMAYsggAAJYIAACWOMAYsggAAJcIAACYuMAYsggAAJ4IAACeOMA +YtAgAAJ8IAACguMAYtAgAAKYIAEewOMAYtggAoAAIAKTUOMBfwAgApNQIAKTUOMBklAgApNQIAYW +sOMBklAgBhawIAYbIOMFFbAgBoAAIAaNQOMFGiAgBo1AIAdScOMFJ2AgB1JwIAdTPOMF7JAgCMAA +IAjAAOMF7VwgCMAAIAjAAOMF7VwgCMAAIAkyJeMF7VwAAAAAAAAAAAAAAAAgAA8nIAAPGCAAEz0g +AA8YIAASqCAADxggAA/RIAASQiAAEcIgAA8YIAARbSAAERwgABCxIAAPBSAAEFwgAA8YIAAPGCAA +DxggAA/yAAAAACAAHk4gACCkIAAglSAAIIUgACB1IAAfpyAAH5ggAB47IAAeOyAAHjsgAB47IAAe +OyAAHjsgAB47IAAeOyAAHjsgAB47IAAe+CAAHukgAB47IAAeOyAAHjsgAB47IAAeOyAAHjsgAB47 +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 +H//ziB//84gf//OIH//ziB//7zAf//G0H//wYB//8GAf//BgIAXwAAAAAAAAAAAAAAAAAAAAAAAg +BfJoIAXyaAAAAAAAAAAAAAAAAAAAAAAgAQdgIAXwAB//8rQf//K0H//ytB//8rQf//K0H//ytAAA +AAAf/+84AAAAAAAAAAAAAAAAAAAAAAIBAAAAAAAAAAAAAAAAAAAEAAAAAAAAAIGAAAAAAAAQBQAA +AAAAAAQAAAAAAAAAAAAAAAAAAAAAgQAAAAAAABgFAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAQAAAAAAAACgQAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgCgAR8XcT8XfTDwPmMQECABbxdRfxdndrBpBgtGZ3Y/hU +DRVVlXsPFABj//kAAABsEAYpIAUqIAf4YKQVoBtFAPsgCt1hqgEAiyIuIBQc8WjxcjwN4AeVAAym +EaxmLWKe96AKW+IAnQAtYp3r1AAGilGAACnCrmSRFS3CrWTRD6TuDg5HLiQU9cALpdIAnQAf8Vku +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 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 22:30:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EE817251; Thu, 11 Oct 2012 22:30:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBA598FC18; Thu, 11 Oct 2012 22:30:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BMUAlf096485; Thu, 11 Oct 2012 22:30:10 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BMUA9l096481; Thu, 11 Oct 2012 22:30:10 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201210112230.q9BMUA9l096481@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 11 Oct 2012 22:30:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241466 - stable/9/sys/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 22:30:11 -0000 Author: np Date: Thu Oct 11 22:30:10 2012 New Revision: 241466 URL: http://svn.freebsd.org/changeset/base/241466 Log: MFC r240451: Allow cxgbe to be built into a kernel with "device cxgbe." Modified: stable/9/sys/conf/files stable/9/sys/conf/kern.pre.mk Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Thu Oct 11 21:29:11 2012 (r241465) +++ stable/9/sys/conf/files Thu Oct 11 22:30:10 2012 (r241466) @@ -923,6 +923,40 @@ dev/cxgbe/t4_l2t.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/common/t4_hw.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" +t4fw_cfg.c optional cxgbe \ + compile-with "${AWK} -f $S/tools/fw_stub.awk t4fw_cfg.fw:t4fw_cfg t4fw_cfg_uwire.fw:t4fw_cfg_uwire t4fw.fw:t4fw -mt4fw_cfg -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "t4fw_cfg.c" +t4fw_cfg.fwo optional cxgbe \ + dependency "t4fw_cfg.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "t4fw_cfg.fwo" +t4fw_cfg.fw optional cxgbe \ + dependency "$S/dev/cxgbe/firmware/t4fw_cfg.txt" \ + compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ + no-obj no-implicit-rule \ + clean "t4fw_cfg.fw" +t4fw_cfg_uwire.fwo optional cxgbe \ + dependency "t4fw_cfg_uwire.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "t4fw_cfg_uwire.fwo" +t4fw_cfg_uwire.fw optional cxgbe \ + dependency "$S/dev/cxgbe/firmware/t4fw_cfg_uwire.txt" \ + compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ + no-obj no-implicit-rule \ + clean "t4fw_cfg_uwire.fw" +t4fw.fwo optional cxgbe \ + dependency "t4fw.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "t4fw.fwo" +t4fw.fw optional cxgbe \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.6.2.0.bin.uu" \ + compile-with "${NORMAL_FW}" \ + no-obj no-implicit-rule \ + clean "t4fw.fw" dev/cy/cy.c optional cy dev/cy/cy_isa.c optional cy isa dev/cy/cy_pci.c optional cy pci Modified: stable/9/sys/conf/kern.pre.mk ============================================================================== --- stable/9/sys/conf/kern.pre.mk Thu Oct 11 21:29:11 2012 (r241465) +++ stable/9/sys/conf/kern.pre.mk Thu Oct 11 22:30:10 2012 (r241466) @@ -18,6 +18,7 @@ LDSCRIPT?= $S/conf/${LDSCRIPT_NAME} M= ${MACHINE_CPUARCH} AWK?= awk +CP?= cp LINT?= lint NM?= nm OBJCOPY?= objcopy From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 22:46:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6CCFACAF; Thu, 11 Oct 2012 22:46:21 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A0E38FC0A; Thu, 11 Oct 2012 22:46:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BMkLEv098409; Thu, 11 Oct 2012 22:46:21 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BMkL6U098404; Thu, 11 Oct 2012 22:46:21 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201210112246.q9BMkL6U098404@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 11 Oct 2012 22:46:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241467 - in stable/9/sys/dev/cxgbe: . tom X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 22:46:21 -0000 Author: np Date: Thu Oct 11 22:46:20 2012 New Revision: 241467 URL: http://svn.freebsd.org/changeset/base/241467 Log: MFC r240452-240453. r240452: Use native FreeBSD facilities everywhere except the shared code in common/ r240453: Install interrupt handlers early, during attach, for the reason explained in r239913 by jhb. Modified: stable/9/sys/dev/cxgbe/osdep.h stable/9/sys/dev/cxgbe/t4_l2t.h stable/9/sys/dev/cxgbe/t4_main.c stable/9/sys/dev/cxgbe/tom/t4_ddp.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/osdep.h ============================================================================== --- stable/9/sys/dev/cxgbe/osdep.h Thu Oct 11 22:30:10 2012 (r241466) +++ stable/9/sys/dev/cxgbe/osdep.h Thu Oct 11 22:46:20 2012 (r241467) @@ -83,7 +83,7 @@ typedef boolean_t bool; #define simple_strtoul strtoul #define DIV_ROUND_UP(x, y) howmany(x, y) -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#define ARRAY_SIZE(x) nitems(x) #define container_of(p, s, f) ((s *)(((uint8_t *)(p)) - offsetof(s, f))) #define swab16(x) bswap16(x) Modified: stable/9/sys/dev/cxgbe/t4_l2t.h ============================================================================== --- stable/9/sys/dev/cxgbe/t4_l2t.h Thu Oct 11 22:30:10 2012 (r241466) +++ stable/9/sys/dev/cxgbe/t4_l2t.h Thu Oct 11 22:46:20 2012 (r241467) @@ -94,7 +94,7 @@ int do_l2t_write_rpl(struct sge_iq *, co static inline void t4_l2t_release(struct l2t_entry *e) { - struct l2t_data *d = container_of(e, struct l2t_data, l2tab[e->idx]); + struct l2t_data *d = member2struct(l2t_data, l2tab[e->idx], e); if (atomic_fetchadd_int(&e->refcnt, -1) == 1) atomic_add_int(&d->nfree, 1); Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Thu Oct 11 22:30:10 2012 (r241466) +++ stable/9/sys/dev/cxgbe/t4_main.c Thu Oct 11 22:46:20 2012 (r241467) @@ -288,6 +288,7 @@ static int cxgbe_init_locked(struct port static int cxgbe_init_synchronized(struct port_info *); static int cxgbe_uninit_locked(struct port_info *); static int cxgbe_uninit_synchronized(struct port_info *); +static int setup_intr_handlers(struct adapter *); static int adapter_full_init(struct adapter *); static int adapter_full_uninit(struct adapter *); static int port_full_init(struct port_info *); @@ -381,8 +382,8 @@ CTASSERT(offsetof(struct sge_ofld_rxq, f #endif /* No easy way to include t4_msg.h before adapter.h so we check this way */ -CTASSERT(ARRAY_SIZE(((struct adapter *)0)->cpl_handler) == NUM_CPL_CMDS); -CTASSERT(ARRAY_SIZE(((struct adapter *)0)->fw_msg_handler) == NUM_FW6_TYPES); +CTASSERT(nitems(((struct adapter *)0)->cpl_handler) == NUM_CPL_CMDS); +CTASSERT(nitems(((struct adapter *)0)->fw_msg_handler) == NUM_FW6_TYPES); static int t4_probe(device_t dev) @@ -399,7 +400,7 @@ t4_probe(device_t dev) if (d == 0xa000 && f != 0) return (ENXIO); - for (i = 0; i < ARRAY_SIZE(t4_pciids); i++) { + for (i = 0; i < nitems(t4_pciids); i++) { if (d == t4_pciids[i].device) { device_set_desc(dev, t4_pciids[i].desc); return (BUS_PROBE_DEFAULT); @@ -459,9 +460,9 @@ t4_attach(device_t dev) memset(sc->chan_map, 0xff, sizeof(sc->chan_map)); sc->an_handler = an_not_handled; - for (i = 0; i < ARRAY_SIZE(sc->cpl_handler); i++) + for (i = 0; i < nitems(sc->cpl_handler); i++) sc->cpl_handler[i] = cpl_not_handled; - for (i = 0; i < ARRAY_SIZE(sc->fw_msg_handler); i++) + for (i = 0; i < nitems(sc->fw_msg_handler); i++) sc->fw_msg_handler[i] = fw_msg_not_handled; t4_register_cpl_handler(sc, CPL_SET_TCB_RPL, t4_filter_rpl); @@ -701,6 +702,13 @@ t4_attach(device_t dev) #endif } + rc = setup_intr_handlers(sc); + if (rc != 0) { + device_printf(dev, + "failed to setup interrupt handlers: %d\n", rc); + goto done; + } + rc = bus_generic_attach(dev); if (rc != 0) { device_printf(dev, @@ -760,6 +768,9 @@ t4_detach(device_t dev) return (rc); } + for (i = 0; i < sc->intr_count; i++) + t4_free_irq(sc, &sc->irq[i]); + for (i = 0; i < MAX_NPORTS; i++) { pi = sc->port[i]; if (pi) { @@ -1839,12 +1850,7 @@ get_params__pre_init(struct adapter *sc) } sc->params.portvec = val[0]; - sc->params.nports = 0; - while (val[0]) { - sc->params.nports++; - val[0] &= val[0] - 1; - } - + sc->params.nports = bitcount32(val[0]); sc->params.vpd.cclk = val[1]; /* Read device log parameters. */ @@ -2365,16 +2371,14 @@ cxgbe_uninit_synchronized(struct port_in return (0); } -#define T4_ALLOC_IRQ(sc, irq, rid, handler, arg, name) do { \ - rc = t4_alloc_irq(sc, irq, rid, handler, arg, name); \ - if (rc != 0) \ - goto done; \ -} while (0) - +/* + * It is ok for this function to fail midway and return right away. t4_detach + * will walk the entire sc->irq list and clean up whatever is valid. + */ static int -adapter_full_init(struct adapter *sc) +setup_intr_handlers(struct adapter *sc) { - int rc, i, rid, p, q; + int rc, rid, p, q; char s[8]; struct irq *irq; struct port_info *pi; @@ -2383,30 +2387,6 @@ adapter_full_init(struct adapter *sc) struct sge_ofld_rxq *ofld_rxq; #endif - ADAPTER_LOCK_ASSERT_NOTOWNED(sc); - KASSERT((sc->flags & FULL_INIT_DONE) == 0, - ("%s: FULL_INIT_DONE already", __func__)); - - /* - * queues that belong to the adapter (not any particular port). - */ - rc = t4_setup_adapter_queues(sc); - if (rc != 0) - goto done; - - for (i = 0; i < ARRAY_SIZE(sc->tq); i++) { - sc->tq[i] = taskqueue_create("t4 taskq", M_NOWAIT, - taskqueue_thread_enqueue, &sc->tq[i]); - if (sc->tq[i] == NULL) { - device_printf(sc->dev, - "failed to allocate task queue %d\n", i); - rc = ENOMEM; - goto done; - } - taskqueue_start_threads(&sc->tq[i], 1, PI_NET, "%s tq%d", - device_get_nameunit(sc->dev), i); - } - /* * Setup interrupts. */ @@ -2416,19 +2396,26 @@ adapter_full_init(struct adapter *sc) KASSERT(!(sc->flags & INTR_DIRECT), ("%s: single interrupt && INTR_DIRECT?", __func__)); - T4_ALLOC_IRQ(sc, irq, rid, t4_intr_all, sc, "all"); + rc = t4_alloc_irq(sc, irq, rid, t4_intr_all, sc, "all"); + if (rc != 0) + return (rc); } else { /* Multiple interrupts. */ KASSERT(sc->intr_count >= T4_EXTRA_INTR + sc->params.nports, ("%s: too few intr.", __func__)); /* The first one is always error intr */ - T4_ALLOC_IRQ(sc, irq, rid, t4_intr_err, sc, "err"); + rc = t4_alloc_irq(sc, irq, rid, t4_intr_err, sc, "err"); + if (rc != 0) + return (rc); irq++; rid++; /* The second one is always the firmware event queue */ - T4_ALLOC_IRQ(sc, irq, rid, t4_intr_evt, &sc->sge.fwq, "evt"); + rc = t4_alloc_irq(sc, irq, rid, t4_intr_evt, &sc->sge.fwq, + "evt"); + if (rc != 0) + return (rc); irq++; rid++; @@ -2455,7 +2442,10 @@ adapter_full_init(struct adapter *sc) rxq = &sc->sge.rxq[pi->first_rxq]; for (q = 0; q < pi->nrxq; q++, rxq++) { snprintf(s, sizeof(s), "%d.%d", p, q); - T4_ALLOC_IRQ(sc, irq, rid, t4_intr, rxq, s); + rc = t4_alloc_irq(sc, irq, rid, t4_intr, rxq, + s); + if (rc != 0) + return (rc); irq++; rid++; } @@ -2471,7 +2461,10 @@ ofld_queues: ofld_rxq = &sc->sge.ofld_rxq[pi->first_ofld_rxq]; for (q = 0; q < pi->nofldrxq; q++, ofld_rxq++) { snprintf(s, sizeof(s), "%d,%d", p, q); - T4_ALLOC_IRQ(sc, irq, rid, t4_intr, ofld_rxq, s); + rc = t4_alloc_irq(sc, irq, rid, t4_intr, + ofld_rxq, s); + if (rc != 0) + return (rc); irq++; rid++; } @@ -2479,6 +2472,38 @@ ofld_queues: } } + return (0); +} + +static int +adapter_full_init(struct adapter *sc) +{ + int rc, i; + + ADAPTER_LOCK_ASSERT_NOTOWNED(sc); + KASSERT((sc->flags & FULL_INIT_DONE) == 0, + ("%s: FULL_INIT_DONE already", __func__)); + + /* + * queues that belong to the adapter (not any particular port). + */ + rc = t4_setup_adapter_queues(sc); + if (rc != 0) + goto done; + + for (i = 0; i < nitems(sc->tq); i++) { + sc->tq[i] = taskqueue_create("t4 taskq", M_NOWAIT, + taskqueue_thread_enqueue, &sc->tq[i]); + if (sc->tq[i] == NULL) { + device_printf(sc->dev, + "failed to allocate task queue %d\n", i); + rc = ENOMEM; + goto done; + } + taskqueue_start_threads(&sc->tq[i], 1, PI_NET, "%s tq%d", + device_get_nameunit(sc->dev), i); + } + t4_intr_enable(sc); sc->flags |= FULL_INIT_DONE; done: @@ -2487,7 +2512,6 @@ done: return (rc); } -#undef T4_ALLOC_IRQ static int adapter_full_uninit(struct adapter *sc) @@ -2498,10 +2522,7 @@ adapter_full_uninit(struct adapter *sc) t4_teardown_adapter_queues(sc); - for (i = 0; i < sc->intr_count; i++) - t4_free_irq(sc, &sc->irq[i]); - - for (i = 0; i < ARRAY_SIZE(sc->tq) && sc->tq[i]; i++) { + for (i = 0; i < nitems(sc->tq) && sc->tq[i]; i++) { taskqueue_free(sc->tq[i]); sc->tq[i] = NULL; } @@ -2925,7 +2946,7 @@ t4_get_regs(struct adapter *sc, struct t }; regs->version = 4 | (sc->params.rev << 10); - for (i = 0; i < ARRAY_SIZE(reg_ranges); i += 2) + for (i = 0; i < nitems(reg_ranges); i += 2) reg_block_dump(sc, buf, reg_ranges[i], reg_ranges[i + 1]); } @@ -3001,7 +3022,7 @@ t4_register_cpl_handler(struct adapter * { uintptr_t *loc, new; - if (opcode >= ARRAY_SIZE(sc->cpl_handler)) + if (opcode >= nitems(sc->cpl_handler)) return (EINVAL); new = h ? (uintptr_t)h : (uintptr_t)cpl_not_handled; @@ -3055,7 +3076,7 @@ t4_register_fw_msg_handler(struct adapte { uintptr_t *loc, new; - if (type >= ARRAY_SIZE(sc->fw_msg_handler)) + if (type >= nitems(sc->fw_msg_handler)) return (EINVAL); new = h ? (uintptr_t)h : (uintptr_t)fw_msg_not_handled; @@ -3829,9 +3850,9 @@ sysctl_devlog(SYSCTL_HANDLER_ARGS) sbuf_printf(sb, "%10d %15ju %8s %8s ", e->seqno, e->timestamp, - (e->level < ARRAY_SIZE(devlog_level_strings) ? + (e->level < nitems(devlog_level_strings) ? devlog_level_strings[e->level] : "UNKNOWN"), - (e->facility < ARRAY_SIZE(devlog_facility_strings) ? + (e->facility < nitems(devlog_facility_strings) ? devlog_facility_strings[e->facility] : "UNKNOWN")); sbuf_printf(sb, e->fmt, e->params[0], e->params[1], e->params[2], e->params[3], e->params[4], @@ -3973,7 +3994,7 @@ sysctl_lb_stats(SYSCTL_HANDLER_ARGS) sbuf_printf(sb, "%s Loopback %u" " Loopback %u", i == 0 ? "" : "\n", i, i + 1); - for (j = 0; j < ARRAY_SIZE(stat_name); j++) + for (j = 0; j < nitems(stat_name); j++) sbuf_printf(sb, "\n%-17s %20ju %20ju", stat_name[j], *p0++, *p1++); } @@ -4028,7 +4049,7 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) "ULPTX state:", "On-chip queues:" }; struct mem_desc avail[3]; - struct mem_desc mem[ARRAY_SIZE(region) + 3]; /* up to 3 holes */ + struct mem_desc mem[nitems(region) + 3]; /* up to 3 holes */ struct mem_desc *md = mem; rc = sysctl_wire_old_buffer(req, 0); @@ -4039,7 +4060,7 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) if (sb == NULL) return (ENOMEM); - for (i = 0; i < ARRAY_SIZE(mem); i++) { + for (i = 0; i < nitems(mem); i++) { mem[i].limit = 0; mem[i].idx = i; } @@ -4101,7 +4122,7 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) md->limit = (sc->tids.ntids - hi) * 16 + md->base - 1; } else { md->base = 0; - md->idx = ARRAY_SIZE(region); /* hide it */ + md->idx = nitems(region); /* hide it */ } md++; @@ -4130,7 +4151,7 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) if (sc->vres.ocq.size) md->limit = md->base + sc->vres.ocq.size - 1; else - md->idx = ARRAY_SIZE(region); /* hide it */ + md->idx = nitems(region); /* hide it */ md++; /* add any address-space holes, there can be up to 3 */ @@ -4149,7 +4170,7 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) sbuf_printf(sb, "\n"); for (i = 0; i < n; i++) { - if (mem[i].idx >= ARRAY_SIZE(region)) + if (mem[i].idx >= nitems(region)) continue; /* skip holes */ if (!mem[i].limit) mem[i].limit = i < n - 1 ? mem[i + 1].base - 1 : ~0; @@ -5197,7 +5218,7 @@ t4_os_portmod_changed(const struct adapt if_printf(pi->ifp, "unknown transceiver inserted.\n"); else if (pi->mod_type == FW_PORT_MOD_TYPE_NOTSUPPORTED) if_printf(pi->ifp, "unsupported transceiver inserted.\n"); - else if (pi->mod_type > 0 && pi->mod_type < ARRAY_SIZE(mod_str)) { + else if (pi->mod_type > 0 && pi->mod_type < nitems(mod_str)) { if_printf(pi->ifp, "%s transceiver inserted.\n", mod_str[pi->mod_type]); } else { Modified: stable/9/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- stable/9/sys/dev/cxgbe/tom/t4_ddp.c Thu Oct 11 22:30:10 2012 (r241466) +++ stable/9/sys/dev/cxgbe/tom/t4_ddp.c Thu Oct 11 22:46:20 2012 (r241467) @@ -197,7 +197,7 @@ release_ddp_resources(struct toepcb *toe { int i; - for (i = 0; i < ARRAY_SIZE(toep->db); i++) { + for (i = 0; i < nitems(toep->db); i++) { if (toep->db[i] != NULL) { free_ddp_buffer(toep->td, toep->db[i]); toep->db[i] = NULL; @@ -662,7 +662,7 @@ alloc_ddp_buffer(struct tom_data *td, vm return (NULL); } - for (idx = ARRAY_SIZE(t4_ddp_pgsz) - 1; idx > 0; idx--) { + for (idx = nitems(t4_ddp_pgsz) - 1; idx > 0; idx--) { if (hcf % t4_ddp_pgsz[idx] == 0) break; } @@ -745,7 +745,7 @@ write_page_pods(struct adapter *sc, stru V_PPOD_OFST(db->offset)); ppod->rsvd = 0; idx = i * PPOD_PAGES * (ddp_pgsz / PAGE_SIZE); - for (k = 0; k < ARRAY_SIZE(ppod->addr); k++) { + for (k = 0; k < nitems(ppod->addr); k++) { if (idx < db->npages) { ppod->addr[k] = htobe64(db->pages[idx]->phys_addr); @@ -782,7 +782,7 @@ select_ddp_buffer(struct adapter *sc, st int i, empty_slot = -1; /* Try to reuse */ - for (i = 0; i < ARRAY_SIZE(toep->db); i++) { + for (i = 0; i < nitems(toep->db); i++) { if (bufcmp(toep->db[i], pages, npages, db_off, db_len) == 0) { free(pages, M_CXGBE); return (i); /* pages still held */ @@ -805,7 +805,7 @@ select_ddp_buffer(struct adapter *sc, st i = empty_slot; if (i < 0) { - i = arc4random() % ARRAY_SIZE(toep->db); + i = arc4random() % nitems(toep->db); free_ddp_buffer(td, toep->db[i]); } toep->db[i] = db; From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 23:02:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DAA95981; Thu, 11 Oct 2012 23:02:35 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C22A78FC08; Thu, 11 Oct 2012 23:02:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BN2Z4S000464; Thu, 11 Oct 2012 23:02:35 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BN2Zik000462; Thu, 11 Oct 2012 23:02:35 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201210112302.q9BN2Zik000462@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 11 Oct 2012 23:02:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241468 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 23:02:35 -0000 Author: np Date: Thu Oct 11 23:02:35 2012 New Revision: 241468 URL: http://svn.freebsd.org/changeset/base/241468 Log: MFC r239624: Allow nmbjumbop, nmbjumbo9, and nmbjumbo16 to be set directly via loader tunables. Modified: stable/9/sys/kern/kern_mbuf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_mbuf.c ============================================================================== --- stable/9/sys/kern/kern_mbuf.c Thu Oct 11 22:46:20 2012 (r241467) +++ stable/9/sys/kern/kern_mbuf.c Thu Oct 11 23:02:35 2012 (r241468) @@ -110,14 +110,23 @@ struct mbstat mbstat; static void tunable_mbinit(void *dummy) { - TUNABLE_INT_FETCH("kern.ipc.nmbclusters", &nmbclusters); /* This has to be done before VM init. */ + TUNABLE_INT_FETCH("kern.ipc.nmbclusters", &nmbclusters); if (nmbclusters == 0) nmbclusters = 1024 + maxusers * 64; - nmbjumbop = nmbclusters / 2; - nmbjumbo9 = nmbjumbop / 2; - nmbjumbo16 = nmbjumbo9 / 2; + + TUNABLE_INT_FETCH("kern.ipc.nmbjumbop", &nmbjumbop); + if (nmbjumbop == 0) + nmbjumbop = nmbclusters / 2; + + TUNABLE_INT_FETCH("kern.ipc.nmbjumbo9", &nmbjumbo9); + if (nmbjumbo9 == 0) + nmbjumbo9 = nmbclusters / 4; + + TUNABLE_INT_FETCH("kern.ipc.nmbjumbo16", &nmbjumbo16); + if (nmbjumbo16 == 0) + nmbjumbo16 = nmbclusters / 8; } SYSINIT(tunable_mbinit, SI_SUB_TUNABLES, SI_ORDER_MIDDLE, tunable_mbinit, NULL); From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 23:03:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 18912B8A; Thu, 11 Oct 2012 23:03:43 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01C508FC0A; Thu, 11 Oct 2012 23:03:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BN3gen000622; Thu, 11 Oct 2012 23:03:42 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BN3gpb000620; Thu, 11 Oct 2012 23:03:42 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201210112303.q9BN3gpb000620@svn.freebsd.org> From: Peter Grehan Date: Thu, 11 Oct 2012 23:03:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241469 - head/sys/dev/virtio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 23:03:43 -0000 Author: grehan Date: Thu Oct 11 23:03:42 2012 New Revision: 241469 URL: http://svn.freebsd.org/changeset/base/241469 Log: Patch from Bryan to fix a virtqueue issue: virtqueue: Fix non-indirect virtqueues We really must walk the entire descriptor chain in order to append the to be free'd chain to the existing free chain. Submitted by: Bryan Venteicher (bryanv@daemoninthecloset.org) Reported by: cognet Modified: head/sys/dev/virtio/virtqueue.c Modified: head/sys/dev/virtio/virtqueue.c ============================================================================== --- head/sys/dev/virtio/virtqueue.c Thu Oct 11 23:02:35 2012 (r241468) +++ head/sys/dev/virtio/virtqueue.c Thu Oct 11 23:03:42 2012 (r241469) @@ -780,8 +780,8 @@ vq_ring_free_chain(struct virtqueue *vq, VQ_RING_ASSERT_CHAIN_TERM(vq); vq->vq_free_cnt += dxp->ndescs; + dxp->ndescs--; -#ifdef INVARIANTS if ((dp->flags & VRING_DESC_F_INDIRECT) == 0) { while (dp->flags & VRING_DESC_F_NEXT) { VQ_RING_ASSERT_VALID_IDX(vq, dp->next); @@ -789,10 +789,9 @@ vq_ring_free_chain(struct virtqueue *vq, dxp->ndescs--; } } - VQASSERT(vq, dxp->ndescs == 1, + + VQASSERT(vq, dxp->ndescs == 0, "failed to free entire desc chain, remaining: %d", dxp->ndescs); -#endif - dxp->ndescs = 0; /* * We must append the existing free chain, if any, to the end of From owner-svn-src-all@FreeBSD.ORG Thu Oct 11 23:41:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C16E3274; Thu, 11 Oct 2012 23:41:18 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A70088FC14; Thu, 11 Oct 2012 23:41:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9BNfISv005019; Thu, 11 Oct 2012 23:41:18 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9BNfIss005013; Thu, 11 Oct 2012 23:41:18 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201210112341.q9BNfIss005013@svn.freebsd.org> From: Peter Grehan Date: Thu, 11 Oct 2012 23:41:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241470 - in head: share/man/man4 sys/dev/virtio sys/dev/virtio/scsi sys/modules/virtio sys/modules/virtio/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2012 23:41:18 -0000 Author: grehan Date: Thu Oct 11 23:41:18 2012 New Revision: 241470 URL: http://svn.freebsd.org/changeset/base/241470 Log: Virtio SCSI driver Submitted by: Bryan Venteicher bryanv at daemoninthecloset dot org Reviewed by: grehan Added: head/share/man/man4/virtio_scsi.4 (contents, props changed) head/sys/dev/virtio/scsi/ head/sys/dev/virtio/scsi/virtio_scsi.c (contents, props changed) head/sys/dev/virtio/scsi/virtio_scsi.h (contents, props changed) head/sys/dev/virtio/scsi/virtio_scsivar.h (contents, props changed) head/sys/modules/virtio/scsi/ head/sys/modules/virtio/scsi/Makefile (contents, props changed) Modified: head/share/man/man4/Makefile head/share/man/man4/virtio.4 head/sys/dev/virtio/virtio.c head/sys/dev/virtio/virtio.h head/sys/modules/virtio/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu Oct 11 23:03:42 2012 (r241469) +++ head/share/man/man4/Makefile Thu Oct 11 23:41:18 2012 (r241470) @@ -531,6 +531,7 @@ MAN= aac.4 \ ${_virtio.4} \ ${_virtio_balloon.4} \ ${_virtio_blk.4} \ + ${_virtio_scsi.4} \ vkbd.4 \ vlan.4 \ vpo.4 \ @@ -768,6 +769,7 @@ _nxge.4= nxge.4 _virtio.4= virtio.4 _virtio_balloon.4=virtio_balloon.4 _virtio_blk.4= virtio_blk.4 +_virtio_scsi.4= virtio_scsi.4 _vtnet.4= vtnet.4 _vxge.4= vxge.4 _padlock.4= padlock.4 Modified: head/share/man/man4/virtio.4 ============================================================================== --- head/share/man/man4/virtio.4 Thu Oct 11 23:03:42 2012 (r241469) +++ head/share/man/man4/virtio.4 Thu Oct 11 23:41:18 2012 (r241470) @@ -72,6 +72,10 @@ device driver. An emulated disk controller is provided by the .Xr virtio_blk 4 device driver. +.It Nm SCSI +An emulated SCSI HBA is provided by the +.Xr virtio_scsi 4 +device driver. .It Nm Balloon A pseudo-device to allow the VM to release memory back to the hypervisor is provided by the @@ -81,6 +85,7 @@ device driver. .Sh SEE ALSO .Xr virtio_balloon 4 , .Xr virtio_blk 4 , +.Xr virtio_scsi 4 , .Xr vtnet 4 .Sh HISTORY Support for VirtIO first appeared in Added: head/share/man/man4/virtio_scsi.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/virtio_scsi.4 Thu Oct 11 23:41:18 2012 (r241470) @@ -0,0 +1,92 @@ +.\" Copyright (c) 2012 Bryan Venteicher +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 24, 2012 +.Dt VIRTIO_SCSI 4 +.Os +.Sh NAME +.Nm virtio_scsi +.Nd VirtIO SCSI driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device virtio_scsi" +.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 +virtio_scsi_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +device driver provides support for VirtIO SCSI devices. +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width "xxxxxx" +.It Va hw.vtscsi.bus_reset_disable +In the initial QEMU release with VirtIO SCSI support, in-flight +operations were not aborted when stopping the device, rendering +bus reset ineffective. This tunable disables attempts to issue +reset bus commands. The default value is 1. +.El +.Sh DEBUGGING +To enable debugging prints from the +.Nm +driver, set the +.Bd -literal -offset indent +hw.vtscsi.X.debug_level +.Ed +.Pp +variable, where X is the adapter number, either in +.Xr loader.conf 5 +or via +.Xr sysctl 8 . +The following bits have the described effects: +.Bl -tag -width 6n -offset indent +.It 0x01 +Enable informational prints. +.It 0x02 +Enable prints for driver errors. +.It 0x04 +Enable tracing prints. +.El +.Sh SEE ALSO +.Xr virtio 4 +.Sh HISTORY +The +.Nm +driver was written by +.An Bryan Venteicher Aq bryanv@daemoninthecloset.org . +It first appeared in +.Fx 10.0 . Added: head/sys/dev/virtio/scsi/virtio_scsi.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/virtio/scsi/virtio_scsi.c Thu Oct 11 23:41:18 2012 (r241470) @@ -0,0 +1,2367 @@ +/*- + * Copyright (c) 2012, Bryan Venteicher + * 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 unmodified, 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. + */ + +/* Driver for VirtIO SCSI devices. */ + +#include +__FBSDID("$FreeBSD$"); + +#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 + +#include "virtio_if.h" + +static int vtscsi_modevent(module_t, int, void *); + +static int vtscsi_probe(device_t); +static int vtscsi_attach(device_t); +static int vtscsi_detach(device_t); +static int vtscsi_suspend(device_t); +static int vtscsi_resume(device_t); + +static void vtscsi_negotiate_features(struct vtscsi_softc *); +static int vtscsi_maximum_segments(struct vtscsi_softc *, int); +static int vtscsi_alloc_virtqueues(struct vtscsi_softc *); +static void vtscsi_write_device_config(struct vtscsi_softc *); +static int vtscsi_reinit(struct vtscsi_softc *); + +static int vtscsi_alloc_cam(struct vtscsi_softc *); +static int vtscsi_register_cam(struct vtscsi_softc *); +static void vtscsi_free_cam(struct vtscsi_softc *); +static void vtscsi_cam_async(void *, uint32_t, struct cam_path *, void *); +static int vtscsi_register_async(struct vtscsi_softc *); +static void vtscsi_deregister_async(struct vtscsi_softc *); +static void vtscsi_cam_action(struct cam_sim *, union ccb *); +static void vtscsi_cam_poll(struct cam_sim *); + +static void vtscsi_cam_scsi_io(struct vtscsi_softc *, struct cam_sim *, + union ccb *); +static void vtscsi_cam_get_tran_settings(struct vtscsi_softc *, + union ccb *); +static void vtscsi_cam_reset_bus(struct vtscsi_softc *, union ccb *); +static void vtscsi_cam_reset_dev(struct vtscsi_softc *, union ccb *); +static void vtscsi_cam_abort(struct vtscsi_softc *, union ccb *); +static void vtscsi_cam_path_inquiry(struct vtscsi_softc *, + struct cam_sim *, union ccb *); + +static int vtscsi_sg_append_scsi_buf(struct vtscsi_softc *, + struct sglist *, struct ccb_scsiio *); +static int vtscsi_fill_scsi_cmd_sglist(struct vtscsi_softc *, + struct vtscsi_request *, int *, int *); +static int vtscsi_execute_scsi_cmd(struct vtscsi_softc *, + struct vtscsi_request *); +static int vtscsi_start_scsi_cmd(struct vtscsi_softc *, union ccb *); +static void vtscsi_complete_abort_timedout_scsi_cmd(struct vtscsi_softc *, + struct vtscsi_request *); +static int vtscsi_abort_timedout_scsi_cmd(struct vtscsi_softc *, + struct vtscsi_request *); +static void vtscsi_timedout_scsi_cmd(void *); +static cam_status vtscsi_scsi_cmd_cam_status(struct virtio_scsi_cmd_resp *); +static cam_status vtscsi_complete_scsi_cmd_response(struct vtscsi_softc *, + struct ccb_scsiio *, struct virtio_scsi_cmd_resp *); +static void vtscsi_complete_scsi_cmd(struct vtscsi_softc *, + struct vtscsi_request *); + +static void vtscsi_poll_ctrl_req(struct vtscsi_softc *, + struct vtscsi_request *); +static int vtscsi_execute_ctrl_req(struct vtscsi_softc *, + struct vtscsi_request *, struct sglist *, int, int, int); +static void vtscsi_complete_abort_task_cmd(struct vtscsi_softc *c, + struct vtscsi_request *); +static int vtscsi_execute_abort_task_cmd(struct vtscsi_softc *, + struct vtscsi_request *); +static int vtscsi_execute_reset_dev_cmd(struct vtscsi_softc *, + struct vtscsi_request *); + +static void vtscsi_get_request_lun(uint8_t lun[], target_id_t *, lun_id_t *); +static void vtscsi_set_request_lun(struct ccb_hdr *, uint8_t []); +static void vtscsi_init_scsi_cmd_req(struct ccb_scsiio *, + struct virtio_scsi_cmd_req *); +static void vtscsi_init_ctrl_tmf_req(struct ccb_hdr *, uint32_t, + uintptr_t, struct virtio_scsi_ctrl_tmf_req *); + +static void vtscsi_freeze_simq(struct vtscsi_softc *, int); +static int vtscsi_thaw_simq(struct vtscsi_softc *, int); + +static void vtscsi_announce(struct vtscsi_softc *, uint32_t, target_id_t, + lun_id_t); +static void vtscsi_execute_rescan(struct vtscsi_softc *, target_id_t, + lun_id_t); +static void vtscsi_execute_rescan_bus(struct vtscsi_softc *); + +static void vtscsi_handle_event(struct vtscsi_softc *, + struct virtio_scsi_event *); +static int vtscsi_enqueue_event_buf(struct vtscsi_softc *, + struct virtio_scsi_event *); +static int vtscsi_init_event_vq(struct vtscsi_softc *); +static void vtscsi_reinit_event_vq(struct vtscsi_softc *); +static void vtscsi_drain_event_vq(struct vtscsi_softc *); + +static void vtscsi_complete_vqs_locked(struct vtscsi_softc *); +static void vtscsi_complete_vqs(struct vtscsi_softc *); +static void vtscsi_drain_vqs(struct vtscsi_softc *); +static void vtscsi_cancel_request(struct vtscsi_softc *, + struct vtscsi_request *); +static void vtscsi_drain_vq(struct vtscsi_softc *, struct virtqueue *); +static void vtscsi_stop(struct vtscsi_softc *); +static int vtscsi_reset_bus(struct vtscsi_softc *); + +static void vtscsi_init_request(struct vtscsi_softc *, + struct vtscsi_request *); +static int vtscsi_alloc_requests(struct vtscsi_softc *); +static void vtscsi_free_requests(struct vtscsi_softc *); +static void vtscsi_enqueue_request(struct vtscsi_softc *, + struct vtscsi_request *); +static struct vtscsi_request * vtscsi_dequeue_request(struct vtscsi_softc *); + +static void vtscsi_complete_request(struct vtscsi_request *); +static void vtscsi_complete_vq(struct vtscsi_softc *, struct virtqueue *); +static void vtscsi_control_vq_task(void *, int); +static void vtscsi_event_vq_task(void *, int); +static void vtscsi_request_vq_task(void *, int); + +static int vtscsi_control_vq_intr(void *); +static int vtscsi_event_vq_intr(void *); +static int vtscsi_request_vq_intr(void *); +static void vtscsi_disable_vqs_intr(struct vtscsi_softc *); +static void vtscsi_enable_vqs_intr(struct vtscsi_softc *); + +static void vtscsi_get_tunables(struct vtscsi_softc *); +static void vtscsi_add_sysctl(struct vtscsi_softc *); + +static void vtscsi_printf_req(struct vtscsi_request *, const char *, + const char *, ...); + +/* Global tunables. */ +/* + * The current QEMU VirtIO SCSI implementation does not cancel in-flight + * IO during virtio_stop(). So in-flight requests still complete after the + * device reset. We would have to wait for all the in-flight IO to complete, + * which defeats the typical purpose of a bus reset. We could simulate the + * bus reset with either I_T_NEXUS_RESET of all the targets, or with + * LOGICAL_UNIT_RESET of all the LUNs (assuming there is space in the + * control virtqueue). But this isn't very useful if things really go off + * the rails, so default to disabled for now. + */ +static int vtscsi_bus_reset_disable = 1; +TUNABLE_INT("hw.vtscsi.bus_reset_disable", &vtscsi_bus_reset_disable); + +static struct virtio_feature_desc vtscsi_feature_desc[] = { + { VIRTIO_SCSI_F_INOUT, "InOut" }, + { VIRTIO_SCSI_F_HOTPLUG, "Hotplug" }, + + { 0, NULL } +}; + +static device_method_t vtscsi_methods[] = { + /* Device methods. */ + DEVMETHOD(device_probe, vtscsi_probe), + DEVMETHOD(device_attach, vtscsi_attach), + DEVMETHOD(device_detach, vtscsi_detach), + DEVMETHOD(device_suspend, vtscsi_suspend), + DEVMETHOD(device_resume, vtscsi_resume), + + DEVMETHOD_END +}; + +static driver_t vtscsi_driver = { + "vtscsi", + vtscsi_methods, + sizeof(struct vtscsi_softc) +}; +static devclass_t vtscsi_devclass; + +DRIVER_MODULE(virtio_scsi, virtio_pci, vtscsi_driver, vtscsi_devclass, + vtscsi_modevent, 0); +MODULE_VERSION(virtio_scsi, 1); +MODULE_DEPEND(virtio_scsi, virtio, 1, 1, 1); +MODULE_DEPEND(virtio_scsi, cam, 1, 1, 1); + +static int +vtscsi_modevent(module_t mod, int type, void *unused) +{ + int error; + + switch (type) { + case MOD_LOAD: + case MOD_QUIESCE: + case MOD_UNLOAD: + case MOD_SHUTDOWN: + error = 0; + break; + default: + error = EOPNOTSUPP; + break; + } + + return (error); +} + +static int +vtscsi_probe(device_t dev) +{ + + if (virtio_get_device_type(dev) != VIRTIO_ID_SCSI) + return (ENXIO); + + device_set_desc(dev, "VirtIO SCSI Adapter"); + + return (BUS_PROBE_DEFAULT); +} + +static int +vtscsi_attach(device_t dev) +{ + struct vtscsi_softc *sc; + struct virtio_scsi_config scsicfg; + int error; + + sc = device_get_softc(dev); + sc->vtscsi_dev = dev; + + VTSCSI_LOCK_INIT(sc, device_get_nameunit(dev)); + TAILQ_INIT(&sc->vtscsi_req_free); + + vtscsi_get_tunables(sc); + vtscsi_add_sysctl(sc); + + virtio_set_feature_desc(dev, vtscsi_feature_desc); + vtscsi_negotiate_features(sc); + + if (virtio_with_feature(dev, VIRTIO_RING_F_INDIRECT_DESC)) + sc->vtscsi_flags |= VTSCSI_FLAG_INDIRECT; + if (virtio_with_feature(dev, VIRTIO_SCSI_F_INOUT)) + sc->vtscsi_flags |= VTSCSI_FLAG_BIDIRECTIONAL; + if (virtio_with_feature(dev, VIRTIO_SCSI_F_HOTPLUG)) + sc->vtscsi_flags |= VTSCSI_FLAG_HOTPLUG; + + virtio_read_device_config(dev, 0, &scsicfg, + sizeof(struct virtio_scsi_config)); + + sc->vtscsi_max_channel = scsicfg.max_channel; + sc->vtscsi_max_target = scsicfg.max_target; + sc->vtscsi_max_lun = scsicfg.max_lun; + sc->vtscsi_event_buf_size = scsicfg.event_info_size; + + vtscsi_write_device_config(sc); + + sc->vtscsi_max_nsegs = vtscsi_maximum_segments(sc, scsicfg.seg_max); + sc->vtscsi_sglist = sglist_alloc(sc->vtscsi_max_nsegs, M_NOWAIT); + if (sc->vtscsi_sglist == NULL) { + error = ENOMEM; + device_printf(dev, "cannot allocate sglist\n"); + goto fail; + } + + error = vtscsi_alloc_virtqueues(sc); + if (error) { + device_printf(dev, "cannot allocate virtqueues\n"); + goto fail; + } + + error = vtscsi_init_event_vq(sc); + if (error) { + device_printf(dev, "cannot populate the eventvq\n"); + goto fail; + } + + error = vtscsi_alloc_requests(sc); + if (error) { + device_printf(dev, "cannot allocate requests\n"); + goto fail; + } + + error = vtscsi_alloc_cam(sc); + if (error) { + device_printf(dev, "cannot allocate CAM structures\n"); + goto fail; + } + + TASK_INIT(&sc->vtscsi_control_intr_task, 0, + vtscsi_control_vq_task, sc); + TASK_INIT(&sc->vtscsi_event_intr_task, 0, + vtscsi_event_vq_task, sc); + TASK_INIT(&sc->vtscsi_request_intr_task, 0, + vtscsi_request_vq_task, sc); + + sc->vtscsi_tq = taskqueue_create_fast("vtscsi_taskq", M_NOWAIT, + taskqueue_thread_enqueue, &sc->vtscsi_tq); + if (sc->vtscsi_tq == NULL) { + error = ENOMEM; + device_printf(dev, "cannot allocate taskqueue\n"); + goto fail; + } + error = taskqueue_start_threads(&sc->vtscsi_tq, 1, PI_DISK, "%s taskq", + device_get_nameunit(dev)); + if (error) { + device_printf(dev, "cannot start taskqueue threads\n"); + goto fail; + } + + error = virtio_setup_intr(dev, INTR_TYPE_CAM); + if (error) { + device_printf(dev, "cannot setup virtqueue interrupts\n"); + goto fail; + } + + vtscsi_enable_vqs_intr(sc); + + /* + * Register with CAM after interrupts are enabled so we will get + * notified of the probe responses. + */ + error = vtscsi_register_cam(sc); + if (error) { + device_printf(dev, "cannot register with CAM\n"); + goto fail; + } + +fail: + if (error) + vtscsi_detach(dev); + + return (error); +} + +static int +vtscsi_detach(device_t dev) +{ + struct vtscsi_softc *sc; + + sc = device_get_softc(dev); + + VTSCSI_LOCK(sc); + sc->vtscsi_flags |= VTSCSI_FLAG_DETACH; + if (device_is_attached(dev)) + vtscsi_stop(sc); + VTSCSI_UNLOCK(sc); + + if (sc->vtscsi_tq != NULL) { + taskqueue_drain(sc->vtscsi_tq, &sc->vtscsi_control_intr_task); + taskqueue_drain(sc->vtscsi_tq, &sc->vtscsi_event_intr_task); + taskqueue_drain(sc->vtscsi_tq, &sc->vtscsi_request_intr_task); + taskqueue_free(sc->vtscsi_tq); + sc->vtscsi_tq = NULL; + } + + vtscsi_complete_vqs(sc); + vtscsi_drain_vqs(sc); + + vtscsi_free_cam(sc); + vtscsi_free_requests(sc); + + if (sc->vtscsi_sglist != NULL) { + sglist_free(sc->vtscsi_sglist); + sc->vtscsi_sglist = NULL; + } + + VTSCSI_LOCK_DESTROY(sc); + + return (0); +} + +static int +vtscsi_suspend(device_t dev) +{ + + return (0); +} + +static int +vtscsi_resume(device_t dev) +{ + + return (0); +} + +static void +vtscsi_negotiate_features(struct vtscsi_softc *sc) +{ + device_t dev; + uint64_t features; + + dev = sc->vtscsi_dev; + features = virtio_negotiate_features(dev, VTSCSI_FEATURES); + sc->vtscsi_features = features; +} + +static int +vtscsi_maximum_segments(struct vtscsi_softc *sc, int seg_max) +{ + int nsegs; + + nsegs = VTSCSI_MIN_SEGMENTS; + + if (seg_max > 0) { + nsegs += MIN(seg_max, MAXPHYS / PAGE_SIZE + 1); + if (sc->vtscsi_flags & VTSCSI_FLAG_INDIRECT) + nsegs = MIN(nsegs, VIRTIO_MAX_INDIRECT); + } else + nsegs += 1; + + return (nsegs); +} + +static int +vtscsi_alloc_virtqueues(struct vtscsi_softc *sc) +{ + device_t dev; + struct vq_alloc_info vq_info[3]; + int nvqs; + + dev = sc->vtscsi_dev; + nvqs = 3; + + VQ_ALLOC_INFO_INIT(&vq_info[0], 0, vtscsi_control_vq_intr, sc, + &sc->vtscsi_control_vq, "%s control", device_get_nameunit(dev)); + + VQ_ALLOC_INFO_INIT(&vq_info[1], 0, vtscsi_event_vq_intr, sc, + &sc->vtscsi_event_vq, "%s event", device_get_nameunit(dev)); + + VQ_ALLOC_INFO_INIT(&vq_info[2], sc->vtscsi_max_nsegs, + vtscsi_request_vq_intr, sc, &sc->vtscsi_request_vq, + "%s request", device_get_nameunit(dev)); + + return (virtio_alloc_virtqueues(dev, 0, nvqs, vq_info)); +} + +static void +vtscsi_write_device_config(struct vtscsi_softc *sc) +{ + + virtio_write_dev_config_4(sc->vtscsi_dev, + offsetof(struct virtio_scsi_config, sense_size), + VIRTIO_SCSI_SENSE_SIZE); + + /* + * This is the size in the virtio_scsi_cmd_req structure. Note + * this value (32) is larger than the maximum CAM CDB size (16). + */ + virtio_write_dev_config_4(sc->vtscsi_dev, + offsetof(struct virtio_scsi_config, cdb_size), + VIRTIO_SCSI_CDB_SIZE); +} + +static int +vtscsi_reinit(struct vtscsi_softc *sc) +{ + device_t dev; + int error; + + dev = sc->vtscsi_dev; + + error = virtio_reinit(dev, sc->vtscsi_features); + if (error == 0) { + vtscsi_write_device_config(sc); + vtscsi_reinit_event_vq(sc); + virtio_reinit_complete(dev); + + vtscsi_enable_vqs_intr(sc); + } + + vtscsi_dprintf(sc, VTSCSI_TRACE, "error=%d\n", error); + + return (error); +} + +static int +vtscsi_alloc_cam(struct vtscsi_softc *sc) +{ + device_t dev; + struct cam_devq *devq; + int openings; + + dev = sc->vtscsi_dev; + openings = sc->vtscsi_nrequests - VTSCSI_RESERVED_REQUESTS; + + devq = cam_simq_alloc(openings); + if (devq == NULL) { + device_printf(dev, "cannot allocate SIM queue\n"); + return (ENOMEM); + } + + sc->vtscsi_sim = cam_sim_alloc(vtscsi_cam_action, vtscsi_cam_poll, + "vtscsi", sc, device_get_unit(dev), VTSCSI_MTX(sc), 1, + openings, devq); + if (sc->vtscsi_sim == NULL) { + cam_simq_free(devq); + device_printf(dev, "cannot allocate SIM\n"); + return (ENOMEM); + } + + return (0); +} + +static int +vtscsi_register_cam(struct vtscsi_softc *sc) +{ + device_t dev; + int registered, error; + + dev = sc->vtscsi_dev; + registered = 0; + + VTSCSI_LOCK(sc); + + if (xpt_bus_register(sc->vtscsi_sim, dev, 0) != CAM_SUCCESS) { + error = ENOMEM; + device_printf(dev, "cannot register XPT bus\n"); + goto fail; + } + + registered = 1; + + if (xpt_create_path(&sc->vtscsi_path, NULL, + cam_sim_path(sc->vtscsi_sim), CAM_TARGET_WILDCARD, + CAM_LUN_WILDCARD) != CAM_REQ_CMP) { + error = ENOMEM; + device_printf(dev, "cannot create bus path\n"); + goto fail; + } + + VTSCSI_UNLOCK(sc); + + /* + * The async register apparently needs to be done without + * the lock held, otherwise it can recurse on the lock. + */ + if (vtscsi_register_async(sc) != CAM_REQ_CMP) { + error = EIO; + device_printf(dev, "cannot register async callback\n"); + VTSCSI_LOCK(sc); + goto fail; + } + + return (0); + +fail: + if (sc->vtscsi_path != NULL) { + xpt_free_path(sc->vtscsi_path); + sc->vtscsi_path = NULL; + } + + if (registered != 0) + xpt_bus_deregister(cam_sim_path(sc->vtscsi_sim)); + + VTSCSI_UNLOCK(sc); + + return (error); +} + +static void +vtscsi_free_cam(struct vtscsi_softc *sc) +{ + + VTSCSI_LOCK(sc); + + if (sc->vtscsi_path != NULL) { + vtscsi_deregister_async(sc); + + xpt_free_path(sc->vtscsi_path); + sc->vtscsi_path = NULL; + + xpt_bus_deregister(cam_sim_path(sc->vtscsi_sim)); + } + + if (sc->vtscsi_sim != NULL) { + cam_sim_free(sc->vtscsi_sim, 1); + sc->vtscsi_sim = NULL; + } + + VTSCSI_UNLOCK(sc); +} + +static void +vtscsi_cam_async(void *cb_arg, uint32_t code, struct cam_path *path, void *arg) +{ + struct cam_sim *sim; + struct vtscsi_softc *sc; + + sim = cb_arg; + sc = cam_sim_softc(sim); + + vtscsi_dprintf(sc, VTSCSI_TRACE, "code=%u\n", code); + + /* + * TODO Once QEMU supports event reporting, we should + * (un)subscribe to events here. + */ + switch (code) { + case AC_FOUND_DEVICE: + break; + case AC_LOST_DEVICE: + break; + } +} + +static int +vtscsi_register_async(struct vtscsi_softc *sc) +{ + struct ccb_setasync csa; + + VTSCSI_LOCK_NOTOWNED(sc); + + xpt_setup_ccb(&csa.ccb_h, sc->vtscsi_path, 5); + csa.ccb_h.func_code = XPT_SASYNC_CB; + csa.event_enable = AC_LOST_DEVICE | AC_FOUND_DEVICE; + csa.callback = vtscsi_cam_async; + csa.callback_arg = sc->vtscsi_sim; + + xpt_action((union ccb *) &csa); + + return (csa.ccb_h.status); +} + +static void +vtscsi_deregister_async(struct vtscsi_softc *sc) +{ + struct ccb_setasync csa; + + xpt_setup_ccb(&csa.ccb_h, sc->vtscsi_path, 5); + csa.ccb_h.func_code = XPT_SASYNC_CB; + csa.event_enable = 0; + csa.callback = vtscsi_cam_async; + csa.callback_arg = sc->vtscsi_sim; + + xpt_action((union ccb *) &csa); +} + +static void +vtscsi_cam_action(struct cam_sim *sim, union ccb *ccb) +{ + struct vtscsi_softc *sc; + struct ccb_hdr *ccbh; + + sc = cam_sim_softc(sim); + ccbh = &ccb->ccb_h; + + VTSCSI_LOCK_OWNED(sc); + + if (sc->vtscsi_flags & VTSCSI_FLAG_DETACH) { + /* + * The VTSCSI_MTX is briefly dropped between setting + * VTSCSI_FLAG_DETACH and deregistering with CAM, so + * drop any CCBs that come in during that window. + */ + ccbh->status = CAM_NO_HBA; + xpt_done(ccb); + return; + } + + switch (ccbh->func_code) { + case XPT_SCSI_IO: + vtscsi_cam_scsi_io(sc, sim, ccb); + break; + + case XPT_SET_TRAN_SETTINGS: + ccbh->status = CAM_FUNC_NOTAVAIL; + xpt_done(ccb); + break; + + case XPT_GET_TRAN_SETTINGS: + vtscsi_cam_get_tran_settings(sc, ccb); + break; + + case XPT_RESET_BUS: + vtscsi_cam_reset_bus(sc, ccb); + break; + + case XPT_RESET_DEV: + vtscsi_cam_reset_dev(sc, ccb); + break; + + case XPT_ABORT: + vtscsi_cam_abort(sc, ccb); + break; + + case XPT_CALC_GEOMETRY: + cam_calc_geometry(&ccb->ccg, 1); + xpt_done(ccb); + break; + + case XPT_PATH_INQ: + vtscsi_cam_path_inquiry(sc, sim, ccb); + break; + + default: + vtscsi_dprintf(sc, VTSCSI_ERROR, + "invalid ccb=%p func=%#x\n", ccb, ccbh->func_code); + + ccbh->status = CAM_REQ_INVALID; + xpt_done(ccb); + break; + } +} + +static void +vtscsi_cam_poll(struct cam_sim *sim) +{ + struct vtscsi_softc *sc; + + sc = cam_sim_softc(sim); + + vtscsi_complete_vqs_locked(sc); +} + +static void +vtscsi_cam_scsi_io(struct vtscsi_softc *sc, struct cam_sim *sim, + union ccb *ccb) +{ + struct ccb_hdr *ccbh; + struct ccb_scsiio *csio; + int error; + + ccbh = &ccb->ccb_h; + csio = &ccb->csio; + + if (csio->cdb_len > VIRTIO_SCSI_CDB_SIZE) { + error = EINVAL; + ccbh->status = CAM_REQ_INVALID; + goto done; + } + + if ((ccbh->flags & CAM_DIR_MASK) == CAM_DIR_BOTH && + (sc->vtscsi_flags & VTSCSI_FLAG_BIDIRECTIONAL) == 0) { + error = EINVAL; + ccbh->status = CAM_REQ_INVALID; + goto done; + } + + error = vtscsi_start_scsi_cmd(sc, ccb); + +done: + if (error) { + vtscsi_dprintf(sc, VTSCSI_ERROR, + "error=%d ccb=%p status=%#x\n", error, ccb, ccbh->status); + xpt_done(ccb); + } +} + +static void +vtscsi_cam_get_tran_settings(struct vtscsi_softc *sc, union ccb *ccb) +{ + struct ccb_trans_settings *cts; + struct ccb_trans_settings_scsi *scsi; + + cts = &ccb->cts; + scsi = &cts->proto_specific.scsi; + + cts->protocol = PROTO_SCSI; + cts->protocol_version = SCSI_REV_SPC3; + cts->transport = XPORT_SAS; + cts->transport_version = 0; + + scsi->valid = CTS_SCSI_VALID_TQ; + scsi->flags = CTS_SCSI_FLAGS_TAG_ENB; + + ccb->ccb_h.status = CAM_REQ_CMP; + xpt_done(ccb); +} + +static void +vtscsi_cam_reset_bus(struct vtscsi_softc *sc, union ccb *ccb) +{ + int error; + + error = vtscsi_reset_bus(sc); + if (error == 0) + ccb->ccb_h.status = CAM_REQ_CMP; + else + ccb->ccb_h.status = CAM_REQ_CMP_ERR; + + vtscsi_dprintf(sc, VTSCSI_TRACE, "error=%d ccb=%p status=%#x\n", + error, ccb, ccb->ccb_h.status); + + xpt_done(ccb); +} + +static void +vtscsi_cam_reset_dev(struct vtscsi_softc *sc, union ccb *ccb) +{ + struct ccb_hdr *ccbh; + struct vtscsi_request *req; + int error; + + ccbh = &ccb->ccb_h; + + req = vtscsi_dequeue_request(sc); + if (req == NULL) { + error = EAGAIN; + vtscsi_freeze_simq(sc, VTSCSI_REQUEST); + goto fail; + } + + req->vsr_ccb = ccb; + + error = vtscsi_execute_reset_dev_cmd(sc, req); + if (error == 0) + return; + + vtscsi_enqueue_request(sc, req); + +fail: + vtscsi_dprintf(sc, VTSCSI_ERROR, "error=%d req=%p ccb=%p\n", + error, req, ccb); + + if (error == EAGAIN) + ccbh->status = CAM_RESRC_UNAVAIL; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 01:31:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 780C2D4D; Fri, 12 Oct 2012 01:31:03 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F9458FC08; Fri, 12 Oct 2012 01:31:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9C1V32c018801; Fri, 12 Oct 2012 01:31:03 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9C1V3jM018799; Fri, 12 Oct 2012 01:31:03 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201210120131.q9C1V3jM018799@svn.freebsd.org> From: Kevin Lo Date: Fri, 12 Oct 2012 01:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241471 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 01:31:03 -0000 Author: kevlo Date: Fri Oct 12 01:31:02 2012 New Revision: 241471 URL: http://svn.freebsd.org/changeset/base/241471 Log: Since the moduledata structure member priv is a void pointer, using NULL instead of 0 when dealing with pointers. Modified: head/share/man/man9/module.9 Modified: head/share/man/man9/module.9 ============================================================================== --- head/share/man/man9/module.9 Thu Oct 11 23:41:18 2012 (r241470) +++ head/share/man/man9/module.9 Fri Oct 12 01:31:02 2012 (r241471) @@ -99,7 +99,7 @@ static int foo_handler(module_t mod, int static moduledata_t mod_data= { "foo", foo_handler, - 0 + NULL }; MODULE_VERSION(foo, 1); From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 02:10:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B63F9DD2; Fri, 12 Oct 2012 02:10:27 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 854048FC08; Fri, 12 Oct 2012 02:10:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9C2AR51023551; Fri, 12 Oct 2012 02:10:27 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9C2ARLD023544; Fri, 12 Oct 2012 02:10:27 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210120210.q9C2ARLD023544@svn.freebsd.org> From: Eitan Adler Date: Fri, 12 Oct 2012 02:10:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241472 - stable/8/usr.sbin/syslogd X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 02:10:27 -0000 Author: eadler Date: Fri Oct 12 02:10:26 2012 New Revision: 241472 URL: http://svn.freebsd.org/changeset/base/241472 Log: MFC r240389,r240409: - Add support for ipv6 addresses as destination - Add documentation for IPv6 support PR: docs/171580 Approved by: cperciva (implicit) Modified: stable/8/usr.sbin/syslogd/syslog.conf.5 stable/8/usr.sbin/syslogd/syslogd.c Directory Properties: stable/8/usr.sbin/syslogd/ (props changed) Modified: stable/8/usr.sbin/syslogd/syslog.conf.5 ============================================================================== --- stable/8/usr.sbin/syslogd/syslog.conf.5 Fri Oct 12 01:31:02 2012 (r241471) +++ stable/8/usr.sbin/syslogd/syslog.conf.5 Fri Oct 12 02:10:26 2012 (r241472) @@ -28,7 +28,7 @@ .\" @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd December 23, 2008 +.Dd September 12, 2012 .Dt SYSLOG.CONF 5 .Os .Sh NAME @@ -347,6 +347,14 @@ If a port number is added after a colon .Pq Ql :\& then that port will be used as the destination port rather than the usual syslog port. +IPv6 addresses can be used +by surrounding the address portion with +square brackets +.Po +.Ql [\& +and +.Ql ]\& +.Pc . .It A comma separated list of users. Selected messages are written to those users Modified: stable/8/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/8/usr.sbin/syslogd/syslogd.c Fri Oct 12 01:31:02 2012 (r241471) +++ stable/8/usr.sbin/syslogd/syslogd.c Fri Oct 12 02:10:26 2012 (r241472) @@ -1939,6 +1939,7 @@ cfline(const char *line, struct filed *f case '@': { char *tp; + char endkey = ':'; /* * scan forward to see if there is a port defined. * so we can't use strlcpy.. @@ -1947,9 +1948,19 @@ cfline(const char *line, struct filed *f tp = f->f_un.f_forw.f_hname; p++; - while (*p && (*p != ':') && (i-- > 0)) { + /* + * an ipv6 address should start with a '[' in that case + * we should scan for a ']' + */ + if (*p == '[') { + p++; + endkey = ']'; + } + while (*p && (*p != endkey) && (i-- > 0)) { *tp++ = *p++; } + if (endkey == ']' && *p == endkey) + p++; *tp = '\0'; } /* See if we copied a domain and have a port */ From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 02:10:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C1BD1DD4; Fri, 12 Oct 2012 02:10:27 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90E6C8FC0A; Fri, 12 Oct 2012 02:10:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9C2ARtb023552; Fri, 12 Oct 2012 02:10:27 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9C2AR5h023548; Fri, 12 Oct 2012 02:10:27 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210120210.q9C2AR5h023548@svn.freebsd.org> From: Eitan Adler Date: Fri, 12 Oct 2012 02:10:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241473 - stable/9/usr.sbin/syslogd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 02:10:27 -0000 Author: eadler Date: Fri Oct 12 02:10:27 2012 New Revision: 241473 URL: http://svn.freebsd.org/changeset/base/241473 Log: MFC r240389,r240409: - Add support for ipv6 addresses as destination - Add documentation for IPv6 support PR: docs/171580 Approved by: cperciva (implicit) Modified: stable/9/usr.sbin/syslogd/syslog.conf.5 stable/9/usr.sbin/syslogd/syslogd.c Directory Properties: stable/9/usr.sbin/syslogd/ (props changed) Modified: stable/9/usr.sbin/syslogd/syslog.conf.5 ============================================================================== --- stable/9/usr.sbin/syslogd/syslog.conf.5 Fri Oct 12 02:10:26 2012 (r241472) +++ stable/9/usr.sbin/syslogd/syslog.conf.5 Fri Oct 12 02:10:27 2012 (r241473) @@ -28,7 +28,7 @@ .\" @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd December 23, 2008 +.Dd September 12, 2012 .Dt SYSLOG.CONF 5 .Os .Sh NAME @@ -347,6 +347,14 @@ If a port number is added after a colon .Pq Ql :\& then that port will be used as the destination port rather than the usual syslog port. +IPv6 addresses can be used +by surrounding the address portion with +square brackets +.Po +.Ql [\& +and +.Ql ]\& +.Pc . .It A comma separated list of users. Selected messages are written to those users Modified: stable/9/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/9/usr.sbin/syslogd/syslogd.c Fri Oct 12 02:10:26 2012 (r241472) +++ stable/9/usr.sbin/syslogd/syslogd.c Fri Oct 12 02:10:27 2012 (r241473) @@ -1931,6 +1931,7 @@ cfline(const char *line, struct filed *f case '@': { char *tp; + char endkey = ':'; /* * scan forward to see if there is a port defined. * so we can't use strlcpy.. @@ -1939,9 +1940,19 @@ cfline(const char *line, struct filed *f tp = f->f_un.f_forw.f_hname; p++; - while (*p && (*p != ':') && (i-- > 0)) { + /* + * an ipv6 address should start with a '[' in that case + * we should scan for a ']' + */ + if (*p == '[') { + p++; + endkey = ']'; + } + while (*p && (*p != endkey) && (i-- > 0)) { *tp++ = *p++; } + if (endkey == ']' && *p == endkey) + p++; *tp = '\0'; } /* See if we copied a domain and have a port */ From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 02:10:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 53FE9DE3; Fri, 12 Oct 2012 02:10:28 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2393F8FC0C; Fri, 12 Oct 2012 02:10:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9C2ARSv023570; Fri, 12 Oct 2012 02:10:27 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9C2ARnS023567; Fri, 12 Oct 2012 02:10:27 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210120210.q9C2ARnS023567@svn.freebsd.org> From: Eitan Adler Date: Fri, 12 Oct 2012 02:10:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r241474 - stable/7/usr.sbin/syslogd X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 02:10:28 -0000 Author: eadler Date: Fri Oct 12 02:10:27 2012 New Revision: 241474 URL: http://svn.freebsd.org/changeset/base/241474 Log: MFC r240389,r240409: - Add support for ipv6 addresses as destination - Add documentation for IPv6 support PR: docs/171580 Approved by: cperciva (implicit) Modified: stable/7/usr.sbin/syslogd/syslog.conf.5 stable/7/usr.sbin/syslogd/syslogd.c Directory Properties: stable/7/usr.sbin/syslogd/ (props changed) Modified: stable/7/usr.sbin/syslogd/syslog.conf.5 ============================================================================== --- stable/7/usr.sbin/syslogd/syslog.conf.5 Fri Oct 12 02:10:27 2012 (r241473) +++ stable/7/usr.sbin/syslogd/syslog.conf.5 Fri Oct 12 02:10:27 2012 (r241474) @@ -28,7 +28,7 @@ .\" @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd December 23, 2008 +.Dd September 12, 2012 .Dt SYSLOG.CONF 5 .Os .Sh NAME @@ -347,6 +347,14 @@ If a port number is added after a colon .Pq Ql :\& then that port will be used as the destination port rather than the usual syslog port. +IPv6 addresses can be used +by surrounding the address portion with +square brackets +.Po +.Ql [\& +and +.Ql ]\& +.Pc . .It A comma separated list of users. Selected messages are written to those users Modified: stable/7/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/7/usr.sbin/syslogd/syslogd.c Fri Oct 12 02:10:27 2012 (r241473) +++ stable/7/usr.sbin/syslogd/syslogd.c Fri Oct 12 02:10:27 2012 (r241474) @@ -1935,6 +1935,7 @@ cfline(const char *line, struct filed *f case '@': { char *tp; + char endkey = ':'; /* * scan forward to see if there is a port defined. * so we can't use strlcpy.. @@ -1943,9 +1944,19 @@ cfline(const char *line, struct filed *f tp = f->f_un.f_forw.f_hname; p++; - while (*p && (*p != ':') && (i-- > 0)) { + /* + * an ipv6 address should start with a '[' in that case + * we should scan for a ']' + */ + if (*p == '[') { + p++; + endkey = ']'; + } + while (*p && (*p != endkey) && (i-- > 0)) { *tp++ = *p++; } + if (endkey == ']' && *p == endkey) + p++; *tp = '\0'; } /* See if we copied a domain and have a port */ From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 02:12:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 80AE553B; Fri, 12 Oct 2012 02:12:53 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A2868FC18; Fri, 12 Oct 2012 02:12:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9C2CrhV023957; Fri, 12 Oct 2012 02:12:53 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9C2Crlp023954; Fri, 12 Oct 2012 02:12:53 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210120212.q9C2Crlp023954@svn.freebsd.org> From: Eitan Adler Date: Fri, 12 Oct 2012 02:12:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241475 - stable/8/lib/libc/stdlib X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 02:12:53 -0000 Author: eadler Date: Fri Oct 12 02:12:52 2012 New Revision: 241475 URL: http://svn.freebsd.org/changeset/base/241475 Log: MFC r241373: Remove undefined behavior from sranddev() and srandomdev(). This doesn't actually work with any modern C compiler: In particular, both clang and modern gcc verisons silently elide any xor operation with 'junk'. Approved by: cperciva (implicit) Modified: stable/8/lib/libc/stdlib/rand.c Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/stdlib/rand.c ============================================================================== --- stable/8/lib/libc/stdlib/rand.c Fri Oct 12 02:10:27 2012 (r241474) +++ stable/8/lib/libc/stdlib/rand.c Fri Oct 12 02:12:52 2012 (r241475) @@ -130,10 +130,9 @@ sranddev() if (!done) { struct timeval tv; - unsigned long junk; gettimeofday(&tv, NULL); - srand((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ junk); + srand((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec); } } From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 02:12:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E49FB53E; Fri, 12 Oct 2012 02:12:53 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD3E28FC1A; Fri, 12 Oct 2012 02:12:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9C2CrLs023981; Fri, 12 Oct 2012 02:12:53 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9C2Crst023978; Fri, 12 Oct 2012 02:12:53 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210120212.q9C2Crst023978@svn.freebsd.org> From: Eitan Adler Date: Fri, 12 Oct 2012 02:12:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241476 - stable/9/lib/libc/stdlib X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 02:12:54 -0000 Author: eadler Date: Fri Oct 12 02:12:53 2012 New Revision: 241476 URL: http://svn.freebsd.org/changeset/base/241476 Log: MFC r241373: Remove undefined behavior from sranddev() and srandomdev(). This doesn't actually work with any modern C compiler: In particular, both clang and modern gcc verisons silently elide any xor operation with 'junk'. Approved by: cperciva (implicit) Modified: stable/9/lib/libc/stdlib/rand.c stable/9/lib/libc/stdlib/random.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/stdlib/rand.c ============================================================================== --- stable/9/lib/libc/stdlib/rand.c Fri Oct 12 02:12:52 2012 (r241475) +++ stable/9/lib/libc/stdlib/rand.c Fri Oct 12 02:12:53 2012 (r241476) @@ -130,10 +130,9 @@ sranddev() if (!done) { struct timeval tv; - unsigned long junk; gettimeofday(&tv, NULL); - srand((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ junk); + srand((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec); } } Modified: stable/9/lib/libc/stdlib/random.c ============================================================================== --- stable/9/lib/libc/stdlib/random.c Fri Oct 12 02:12:52 2012 (r241475) +++ stable/9/lib/libc/stdlib/random.c Fri Oct 12 02:12:53 2012 (r241476) @@ -315,10 +315,9 @@ srandomdev() if (!done) { struct timeval tv; - volatile unsigned long junk; gettimeofday(&tv, NULL); - srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ junk); + srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec); return; } From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 02:12:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C97C53F; Fri, 12 Oct 2012 02:12:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E84638FC1B; Fri, 12 Oct 2012 02:12:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9C2CrSE023985; Fri, 12 Oct 2012 02:12:53 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9C2Creo023983; Fri, 12 Oct 2012 02:12:53 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210120212.q9C2Creo023983@svn.freebsd.org> From: Eitan Adler Date: Fri, 12 Oct 2012 02:12:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r241477 - stable/7/lib/libc/stdlib X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 02:12:54 -0000 Author: eadler Date: Fri Oct 12 02:12:53 2012 New Revision: 241477 URL: http://svn.freebsd.org/changeset/base/241477 Log: MFC r241373: Remove undefined behavior from sranddev() and srandomdev(). This doesn't actually work with any modern C compiler: In particular, both clang and modern gcc verisons silently elide any xor operation with 'junk'. Approved by: cperciva (implicit) Modified: stable/7/lib/libc/stdlib/rand.c Directory Properties: stable/7/lib/libc/ (props changed) Modified: stable/7/lib/libc/stdlib/rand.c ============================================================================== --- stable/7/lib/libc/stdlib/rand.c Fri Oct 12 02:12:53 2012 (r241476) +++ stable/7/lib/libc/stdlib/rand.c Fri Oct 12 02:12:53 2012 (r241477) @@ -130,10 +130,9 @@ sranddev() if (!done) { struct timeval tv; - unsigned long junk; gettimeofday(&tv, NULL); - srand((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ junk); + srand((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec); } } From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 03:10:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E2BF1E9; Fri, 12 Oct 2012 03:10: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 E91A78FC16; Fri, 12 Oct 2012 03:09:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9C39xc4030818; Fri, 12 Oct 2012 03:09:59 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9C39xSJ030816; Fri, 12 Oct 2012 03:09:59 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210120309.q9C39xSJ030816@svn.freebsd.org> From: Alan Cox Date: Fri, 12 Oct 2012 03:09:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241478 - stable/9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 03:10:00 -0000 Author: alc Date: Fri Oct 12 03:09:59 2012 New Revision: 241478 URL: http://svn.freebsd.org/changeset/base/241478 Log: MFC r241155 Update some of the comments. In particular, use "sleep" in preference to "block" where appropriate. Eliminate some unnecessary casts. Make a few whitespace changes for consistency. Modified: stable/9/sys/vm/vm_page.c Modified: stable/9/sys/vm/vm_page.c ============================================================================== --- stable/9/sys/vm/vm_page.c Fri Oct 12 02:12:53 2012 (r241477) +++ stable/9/sys/vm/vm_page.c Fri Oct 12 03:09:59 2012 (r241478) @@ -904,11 +904,10 @@ vm_page_splay(vm_pindex_t pindex, vm_pag * * The pagetables are not updated but will presumably fault the page * in if necessary, or if a kernel page the caller will at some point - * enter the page into the kernel's pmap. We are not allowed to block + * enter the page into the kernel's pmap. We are not allowed to sleep * here so we *can't* do this anyway. * - * The object and page must be locked. - * This routine may not block. + * The object must be locked. */ void vm_page_insert(vm_page_t m, vm_object_t object, vm_pindex_t pindex) @@ -952,14 +951,15 @@ vm_page_insert(vm_page_t m, vm_object_t object->root = m; /* - * show that the object has one more resident page. + * Show that the object has one more resident page. */ object->resident_page_count++; + /* * Hold the vnode until the last page is released. */ if (object->resident_page_count == 1 && object->type == OBJT_VNODE) - vhold((struct vnode *)object->handle); + vhold(object->handle); /* * Since we are inserting a new and possibly dirty page, @@ -971,15 +971,14 @@ vm_page_insert(vm_page_t m, vm_object_t /* * vm_page_remove: - * NOTE: used by device pager as well -wfj * * Removes the given mem entry from the object/offset-page * table and the object page list, but do not invalidate/terminate * the backing store. * - * The object and page must be locked. * The underlying pmap entry (if any) is NOT removed here. - * This routine may not block. + * + * The object must be locked. The page must be locked if it is managed. */ void vm_page_remove(vm_page_t m) @@ -1042,11 +1041,12 @@ vm_page_remove(vm_page_t m) * And show that the object has one fewer resident page. */ object->resident_page_count--; + /* * The vnode may now be recycled. */ if (object->resident_page_count == 0 && object->type == OBJT_VNODE) - vdrop((struct vnode *)object->handle); + vdrop(object->handle); m->object = NULL; } @@ -1058,8 +1058,6 @@ vm_page_remove(vm_page_t m) * pair specified; if none is found, NULL is returned. * * The object must be locked. - * This routine may not block. - * This is a critical path routine */ vm_page_t vm_page_lookup(vm_object_t object, vm_pindex_t pindex) @@ -1082,7 +1080,6 @@ vm_page_lookup(vm_object_t object, vm_pi * greater than or equal to the parameter pindex, or NULL. * * The object must be locked. - * The routine may not block. */ vm_page_t vm_page_find_least(vm_object_t object, vm_pindex_t pindex) @@ -1142,9 +1139,6 @@ vm_page_prev(vm_page_t m) * Move the given memory entry from its * current object to the specified target object/offset. * - * The object must be locked. - * This routine may not block. - * * Note: swap associated with the page must be invalidated by the move. We * have to do this for several reasons: (1) we aren't freeing the * page, (2) we are dirtying the page, (3) the VM system is probably @@ -1156,6 +1150,8 @@ vm_page_prev(vm_page_t m) * swap. If the page is on the cache, we have to deactivate it * or vm_page_dirty() will panic. Dirty pages are not allowed * on the cache. + * + * The objects must be locked. The page must be locked if it is managed. */ void vm_page_rename(vm_page_t m, vm_object_t new_object, vm_pindex_t new_pindex) @@ -1675,7 +1671,7 @@ vm_page_alloc_freelist(int flind, int re /* * vm_wait: (also see VM_WAIT macro) * - * Block until free pages are available for allocation + * Sleep until free pages are available for allocation. * - Called in various places before memory allocations. */ void @@ -1700,7 +1696,7 @@ vm_wait(void) /* * vm_waitpfault: (also see VM_WAITPFAULT macro) * - * Block until free pages are available for allocation + * Sleep until free pages are available for allocation. * - Called only in vm_fault so that processes page faulting * can be easily tracked. * - Sleeps at a lower priority than vm_wait() so that vm_wait()ing @@ -1767,7 +1763,6 @@ vm_page_queue_remove(int queue, vm_page_ * Remove a page from its queue. * * The given page must be locked. - * This routine may not block. */ void vm_pageq_remove(vm_page_t m) @@ -1809,7 +1804,6 @@ vm_page_enqueue(int queue, vm_page_t m) * mess with it. * * The page must be locked. - * This routine may not block. */ void vm_page_activate(vm_page_t m) @@ -1844,7 +1838,6 @@ vm_page_activate(vm_page_t m) * queues. * * The page queues must be locked. - * This routine may not block. */ static inline void vm_page_free_wakeup(void) @@ -1877,10 +1870,8 @@ vm_page_free_wakeup(void) * Returns the given page to the free list, * disassociating it with any VM object. * - * Object and page must be locked prior to entry. - * This routine may not block. + * The object must be locked. The page must be locked if it is managed. */ - void vm_page_free_toq(vm_page_t m) { @@ -1898,7 +1889,7 @@ vm_page_free_toq(vm_page_t m) panic("vm_page_free: freeing busy page %p", m); /* - * unqueue, then remove page. Note that we cannot destroy + * Unqueue, then remove page. Note that we cannot destroy * the page here because we do not want to call the pager's * callback routine until after we've put the page on the * appropriate free queue. @@ -1964,7 +1955,6 @@ vm_page_free_toq(vm_page_t m) * If the page is fictitious, then its wire count must remain one. * * The page must be locked. - * This routine may not block. */ void vm_page_wire(vm_page_t m) @@ -2053,7 +2043,7 @@ vm_page_unwire(vm_page_t m, int activate * to 1 if we want this page to be 'as if it were placed in the cache', * except without unmapping it from the process address space. * - * This routine may not block. + * The page must be locked. */ static inline void _vm_page_deactivate(vm_page_t m, int athead) @@ -2145,7 +2135,7 @@ vm_page_try_to_free(vm_page_t m) * * Put the specified page onto the page cache queue (if appropriate). * - * This routine may not block. + * The object and page must be locked. */ void vm_page_cache(vm_page_t m) @@ -2302,6 +2292,8 @@ vm_page_cache(vm_page_t m) * system to balance the queues, potentially recovering other unrelated * space from active. The idea is to not force this to happen too * often. + * + * The object and page must be locked. */ void vm_page_dontneed(vm_page_t m) @@ -2365,7 +2357,10 @@ vm_page_dontneed(vm_page_t m) * The caller must always specify the VM_ALLOC_RETRY flag. This is intended * to facilitate its eventual removal. * - * This routine may block. + * This routine may sleep. + * + * The object must be locked on entry. The lock will, however, be released + * and reacquired if the routine sleeps. */ vm_page_t vm_page_grab(vm_object_t object, vm_pindex_t pindex, int allocflags) @@ -2413,8 +2408,7 @@ retrylookup: } /* - * Mapping function for valid bits or for dirty bits in - * a page. May not block. + * Mapping function for valid or dirty bits in a page. * * Inputs are required to range within a page. */ @@ -2553,8 +2547,6 @@ vm_page_clear_dirty_mask(vm_page_t m, vm * of any partial chunks touched by the range. The invalid portion of * such chunks will be zero'd. * - * This routine may not block. - * * (base + size) must be less then or equal to PAGE_SIZE. */ void @@ -2647,8 +2639,6 @@ vm_page_clear_dirty(vm_page_t m, int bas * * Invalidates DEV_BSIZE'd chunks within a page. Both the * valid and dirty bits for the effected areas are cleared. - * - * May not block. */ void vm_page_set_invalid(vm_page_t m, int base, int size) @@ -2717,8 +2707,6 @@ vm_page_zero_invalid(vm_page_t m, boolea * Is (partial) page valid? Note that the case where size == 0 * will return FALSE in the degenerate case where the page is * entirely invalid, and TRUE otherwise. - * - * May not block. */ int vm_page_is_valid(vm_page_t m, int base, int size) @@ -2734,7 +2722,7 @@ vm_page_is_valid(vm_page_t m, int base, } /* - * update dirty bits from pmap/mmu. May not block. + * Set the page's dirty bits if the page is modified. */ void vm_page_test_dirty(vm_page_t m) From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 03:24:40 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5CC52659; Fri, 12 Oct 2012 03:24:40 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from ns.kevlo.org (kevlo.org [220.128.136.52]) by mx1.freebsd.org (Postfix) with ESMTP id 3006D8FC0A; Fri, 12 Oct 2012 03:24:39 +0000 (UTC) Received: from srg.kevlo.org (git.kevlo.org [220.128.136.52]) by ns.kevlo.org (8.14.5/8.14.5) with ESMTP id q9C3Oa36004846; Fri, 12 Oct 2012 11:24:36 +0800 (CST) (envelope-from kevlo@FreeBSD.org) Message-ID: <50778D75.7060009@FreeBSD.org> Date: Fri, 12 Oct 2012 11:24:37 +0800 From: Kevin Lo User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:15.0) Gecko/20121009 Thunderbird/15.0.1 MIME-Version: 1.0 To: Eitan Adler Subject: Re: Re: svn commit: r241373 - head/lib/libc/stdlib References: <201210091425.q99EPFS6020787@svn.freebsd.org> <507451DE.9060909@freebsd.org> <977E1107-46D4-476F-A04D-AEFD87D1DE53@FreeBSD.org> <20121011114425.GA1562@garage.freebsd.pl> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: mdf@FreeBSD.org, src-committers@FreeBSD.org, Andrey Chernov , svn-src-all@FreeBSD.org, David Chisnall , svn-src-head@FreeBSD.org, Pawel Jakub Dawidek X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 03:24:40 -0000 On 2012/10/12 03:50, Eitan Adler wrote: > On 11 October 2012 07:44, Pawel Jakub Dawidek wrote: >> On Tue, Oct 09, 2012 at 01:51:05PM -0400, Eitan Adler wrote: >>> On 9 October 2012 13:27, wrote: >>>> The original behavior can be recovered by using inline assembly to >>>> fetch the value from a register into a local C variable; this would at >>>> least not rely on undefined behavior. But I agree it's of dubious >>>> value anyways. >>> I proposed this (with a patch). We want to move to not using >>> /dev/random and instead make a kernel system call directly. The patch >>> for this is not finished yet though. >> You should do something similar to: >> >> http://people.freebsd.org/~pjd/patches/libc_arc4random.c.patch > Yes, this is exactly the proposed "correct" fix. I haven't had time to > properly write and test such a patch though, so I opted for this one > in the meantime. > > FWIW, the man page *used* to contain the text > > The srandomdev() routine initializes a state array using the random(4) > random number device which returns good random numbers, suitable for > cryptographic use. > > which made this problem 'worse' as it mislead people into believing > rand/random could be used for crpyto. > > des@ fixed this problem already As you may already know, this issue was pointed out by Xi Wang in his paper "Undefined Behavior: Who Moved My Code?" at APSYS 2012 conference: http://apsys2012.kaist.ac.kr/media/papers/apsys2012-final42.pdf The bottom line is don't use uninitialized memory as a source of entropy :-) Kevin From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 04:55:31 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CD221374; Fri, 12 Oct 2012 04:55:31 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 443768FC12; Fri, 12 Oct 2012 04:55:31 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q9C4tU6U098645; Fri, 12 Oct 2012 08:55:30 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q9C4tU4t098644; Fri, 12 Oct 2012 08:55:30 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 12 Oct 2012 08:55:30 +0400 From: Gleb Smirnoff To: Kevin Lo Subject: Re: svn commit: r241471 - head/share/man/man9 Message-ID: <20121012045530.GK89655@FreeBSD.org> References: <201210120131.q9C1V3jM018799@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201210120131.q9C1V3jM018799@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 04:55:31 -0000 On Fri, Oct 12, 2012 at 01:31:03AM +0000, Kevin Lo wrote: K> Author: kevlo K> Date: Fri Oct 12 01:31:02 2012 K> New Revision: 241471 K> URL: http://svn.freebsd.org/changeset/base/241471 K> K> Log: K> Since the moduledata structure member priv is a void pointer, using K> NULL instead of 0 when dealing with pointers. K> K> Modified: K> head/share/man/man9/module.9 K> K> Modified: head/share/man/man9/module.9 K> ============================================================================== K> --- head/share/man/man9/module.9 Thu Oct 11 23:41:18 2012 (r241470) K> +++ head/share/man/man9/module.9 Fri Oct 12 01:31:02 2012 (r241471) K> @@ -99,7 +99,7 @@ static int foo_handler(module_t mod, int K> static moduledata_t mod_data= { K> "foo", K> foo_handler, K> - 0 K> + NULL K> }; K> K> MODULE_VERSION(foo, 1); I think we should provide C99 sparse initializers for structures in all manpages in section 9, as well as use only such initializers in any new code added to tree. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 06:16:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8D6116AB; Fri, 12 Oct 2012 06:16:52 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 753EB8FC0A; Fri, 12 Oct 2012 06:16:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9C6Gq2V052736; Fri, 12 Oct 2012 06:16:52 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9C6GqCi052733; Fri, 12 Oct 2012 06:16:52 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201210120616.q9C6GqCi052733@svn.freebsd.org> From: Joel Dahl Date: Fri, 12 Oct 2012 06:16:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241479 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 06:16:52 -0000 Author: joel (doc committer) Date: Fri Oct 12 06:16:51 2012 New Revision: 241479 URL: http://svn.freebsd.org/changeset/base/241479 Log: Remove whitespace. Modified: head/share/man/man4/nvd.4 head/share/man/man4/nvme.4 Modified: head/share/man/man4/nvd.4 ============================================================================== --- head/share/man/man4/nvd.4 Fri Oct 12 03:09:59 2012 (r241478) +++ head/share/man/man4/nvd.4 Fri Oct 12 06:16:51 2012 (r241479) @@ -64,7 +64,7 @@ driver for notification of existing NVMe I/O commands. .Sh SEE ALSO .Xr nvme 4 , -.Xr nvmecontrol 8 , +.Xr nvmecontrol 8 , .Xr disk 9 . .Sh AUTHORS .An -nosplit @@ -85,7 +85,6 @@ The following areas of development and t .Bl -bullet .It testing on i386 -.It +.It command timeout error handling .El - Modified: head/share/man/man4/nvme.4 ============================================================================== --- head/share/man/man4/nvme.4 Fri Oct 12 03:09:59 2012 (r241478) +++ head/share/man/man4/nvme.4 Fri Oct 12 06:16:51 2012 (r241479) @@ -152,7 +152,7 @@ and completion queues to the console. The .Nm driver was developed by Intel and originally written by -.An Jim Harris Aq jimharris@FreeBSD.org , +.An Jim Harris Aq jimharris@FreeBSD.org , with contributions from Joe Golio at EMC. .Pp This man page was written by From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 09:24:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D23ABBCD; Fri, 12 Oct 2012 09:24:24 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A23B88FC12; Fri, 12 Oct 2012 09:24:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9C9OObR076099; Fri, 12 Oct 2012 09:24:24 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9C9OOQj076094; Fri, 12 Oct 2012 09:24:24 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210120924.q9C9OOQj076094@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 12 Oct 2012 09:24:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241480 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 09:24:24 -0000 Author: glebius Date: Fri Oct 12 09:24:24 2012 New Revision: 241480 URL: http://svn.freebsd.org/changeset/base/241480 Log: In ip_stripoptions(): - Remove unused argument and incorrect comment. - Fixup ip_len after stripping. Modified: head/sys/netinet/ip_options.c head/sys/netinet/ip_options.h head/sys/netinet/tcp_input.c head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/ip_options.c ============================================================================== --- head/sys/netinet/ip_options.c Fri Oct 12 06:16:51 2012 (r241479) +++ head/sys/netinet/ip_options.c Fri Oct 12 09:24:24 2012 (r241480) @@ -453,14 +453,10 @@ ip_srcroute(struct mbuf *m0) } /* - * Strip out IP options, at higher level protocol in the kernel. Second - * argument is buffer to which options will be moved, and return value is - * their length. - * - * XXX should be deleted; last arg currently ignored. + * Strip out IP options, at higher level protocol in the kernel. */ void -ip_stripoptions(struct mbuf *m, struct mbuf *mopt) +ip_stripoptions(struct mbuf *m) { int i; struct ip *ip = mtod(m, struct ip *); @@ -476,6 +472,7 @@ ip_stripoptions(struct mbuf *m, struct m m->m_pkthdr.len -= olen; ip->ip_v = IPVERSION; ip->ip_hl = sizeof(struct ip) >> 2; + ip->ip_len -= olen; } /* Modified: head/sys/netinet/ip_options.h ============================================================================== --- head/sys/netinet/ip_options.h Fri Oct 12 06:16:51 2012 (r241479) +++ head/sys/netinet/ip_options.h Fri Oct 12 09:24:24 2012 (r241480) @@ -54,7 +54,7 @@ int ip_dooptions(struct mbuf *, int); struct mbuf *ip_insertoptions(struct mbuf *, struct mbuf *, int *); int ip_optcopy(struct ip *, struct ip *); int ip_pcbopts(struct inpcb *, int, struct mbuf *); -void ip_stripoptions(struct mbuf *, struct mbuf *); +void ip_stripoptions(struct mbuf *); struct mbuf *ip_srcroute(struct mbuf *); #endif /* !_NETINET_IP_OPTIONS_H_ */ Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Fri Oct 12 06:16:51 2012 (r241479) +++ head/sys/netinet/tcp_input.c Fri Oct 12 09:24:24 2012 (r241480) @@ -632,7 +632,7 @@ tcp_input(struct mbuf *m, int off0) * Note: IP leaves IP header in first mbuf. */ if (off0 > sizeof (struct ip)) { - ip_stripoptions(m, (struct mbuf *)0); + ip_stripoptions(m); off0 = sizeof(struct ip); } if (m->m_len < sizeof (struct tcpiphdr)) { Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Fri Oct 12 06:16:51 2012 (r241479) +++ head/sys/netinet/udp_usrreq.c Fri Oct 12 09:24:24 2012 (r241480) @@ -354,7 +354,7 @@ udp_input(struct mbuf *m, int off) * check the checksum with options still present. */ if (iphlen > sizeof (struct ip)) { - ip_stripoptions(m, (struct mbuf *)0); + ip_stripoptions(m); iphlen = sizeof(struct ip); } From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 09:32:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 12B65F14; Fri, 12 Oct 2012 09:32:39 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0C7C8FC0C; Fri, 12 Oct 2012 09:32:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9C9WcBf077029; Fri, 12 Oct 2012 09:32:38 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9C9WcpF077027; Fri, 12 Oct 2012 09:32:38 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210120932.q9C9WcpF077027@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 12 Oct 2012 09:32:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241481 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 09:32:39 -0000 Author: glebius Date: Fri Oct 12 09:32:38 2012 New Revision: 241481 URL: http://svn.freebsd.org/changeset/base/241481 Log: Revert fixup of ip_len from r241480. Now stack isn't yet ready for that change. Modified: head/sys/netinet/ip_options.c Modified: head/sys/netinet/ip_options.c ============================================================================== --- head/sys/netinet/ip_options.c Fri Oct 12 09:24:24 2012 (r241480) +++ head/sys/netinet/ip_options.c Fri Oct 12 09:32:38 2012 (r241481) @@ -472,7 +472,6 @@ ip_stripoptions(struct mbuf *m) m->m_pkthdr.len -= olen; ip->ip_v = IPVERSION; ip->ip_hl = sizeof(struct ip) >> 2; - ip->ip_len -= olen; } /* From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 12:27:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 632EC90A; Fri, 12 Oct 2012 12:27:31 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BED78FC0A; Fri, 12 Oct 2012 12:27:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9CCRV2I002172; Fri, 12 Oct 2012 12:27:31 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9CCRVng002170; Fri, 12 Oct 2012 12:27:31 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210121227.q9CCRVng002170@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 12 Oct 2012 12:27:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241482 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 12:27:31 -0000 Author: glebius Date: Fri Oct 12 12:27:30 2012 New Revision: 241482 URL: http://svn.freebsd.org/changeset/base/241482 Log: Be more explicit on how "intact" incoming packets in raw sockets are. Modified: head/share/man/man4/ip.4 Modified: head/share/man/man4/ip.4 ============================================================================== --- head/share/man/man4/ip.4 Fri Oct 12 09:32:38 2012 (r241481) +++ head/share/man/man4/ip.4 Fri Oct 12 12:27:30 2012 (r241482) @@ -32,7 +32,7 @@ .\" @(#)ip.4 8.2 (Berkeley) 11/30/93 .\" $FreeBSD$ .\" -.Dd September 20, 2012 +.Dd Ocotber 12, 2012 .Dt IP 4 .Os .Sh NAME @@ -761,7 +761,11 @@ unless the option has been set. Incoming packets are received with .Tn IP -header and options intact. +header and options intact, except for +.Va ip_len +and +.Va ip_off +fields converted to host byte order. .Pp .Dv IP_HDRINCL indicates the complete IP header is included with the data From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 13:17:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 666FBDDA; Fri, 12 Oct 2012 13:17:20 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E2B08FC08; Fri, 12 Oct 2012 13:17:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9CDHKGo009412; Fri, 12 Oct 2012 13:17:20 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9CDHKtY009410; Fri, 12 Oct 2012 13:17:20 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201210121317.q9CDHKtY009410@svn.freebsd.org> From: "Andrey A. Chernov" Date: Fri, 12 Oct 2012 13:17:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241483 - stable/9/lib/libc/stdlib X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 13:17:20 -0000 Author: ache Date: Fri Oct 12 13:17:19 2012 New Revision: 241483 URL: http://svn.freebsd.org/changeset/base/241483 Log: MFC r241137,r241154 Using putenv() and later direct pointer contents modification it is possibe to craft environment variables with similar names like that: a=1 a=2 ... unsetenv("a") should remove them all to make later getenv("a") impossible. Fix it to do so (this is GNU autoconf test #3 failure too). PR: 172273 Modified: stable/9/lib/libc/stdlib/getenv.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/stdlib/getenv.c ============================================================================== --- stable/9/lib/libc/stdlib/getenv.c Fri Oct 12 12:27:30 2012 (r241482) +++ stable/9/lib/libc/stdlib/getenv.c Fri Oct 12 13:17:19 2012 (r241483) @@ -662,6 +662,7 @@ unsetenv(const char *name) { int envNdx; size_t nameLen; + int newEnvActive; /* Check for malformed name. */ if (name == NULL || (nameLen = __strleneq(name)) == 0) { @@ -674,13 +675,18 @@ unsetenv(const char *name) return (-1); /* Deactivate specified variable. */ + /* Remove all occurrences. */ envNdx = envVarsTotal - 1; - if (__findenv(name, nameLen, &envNdx, true) != NULL) { + newEnvActive = envActive; + while (__findenv(name, nameLen, &envNdx, true) != NULL) { envVars[envNdx].active = false; if (envVars[envNdx].putenv) __remove_putenv(envNdx); - __rebuild_environ(envActive - 1); + envNdx--; + newEnvActive--; } + if (newEnvActive != envActive) + __rebuild_environ(newEnvActive); return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 14:51:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C08108E5; Fri, 12 Oct 2012 14:51:06 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 772188FC14; Fri, 12 Oct 2012 14:51:06 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so3244098pbb.13 for ; Fri, 12 Oct 2012 07:51:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=9a4egDtGJEbp5m1TvEVhGm0w/7Dca2MQpMxA5naD7AA=; b=gUKZ19uSwEdzKMvqyEqNlO+v3Q8zEdc73hiA1Vf0jqfPN1y0hOwE/idHbHkZek/Uz6 AUf8+Tlni6TRo22E4MtXgVVk0omd2qZCZo1fo1nO5/C6SFA4RXabsRGk7KtzccW/jLyI R778U+HL+RRA98Qi+zr9p1BjjyYE8Oftve9Mz/NpX4CBPtoncXROGBeZJ9t3Tmdgtu10 iYdt0RV/JX9ZnnPu2zheq/Kxu9reYhIi7sXgtnC1eXVC0Q5fAZvgPuTS6O56wqj/oI8q 7scVUl0r3FjDxXXAbfY+h/b70t1tfQShTuyLnaVtV6OQV81rp2oZmQFcdgemtZPWtS10 2kYw== MIME-Version: 1.0 Received: by 10.68.233.196 with SMTP id ty4mr14099235pbc.23.1350053465831; Fri, 12 Oct 2012 07:51:05 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.68.223.105 with HTTP; Fri, 12 Oct 2012 07:51:05 -0700 (PDT) In-Reply-To: <20121012045530.GK89655@FreeBSD.org> References: <201210120131.q9C1V3jM018799@svn.freebsd.org> <20121012045530.GK89655@FreeBSD.org> Date: Fri, 12 Oct 2012 07:51:05 -0700 X-Google-Sender-Auth: v6STCyl-zo_ptqhjfXOK8qOjl_k Message-ID: Subject: Re: svn commit: r241471 - head/share/man/man9 From: mdf@FreeBSD.org To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, Kevin Lo , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 14:51:06 -0000 On Thu, Oct 11, 2012 at 9:55 PM, Gleb Smirnoff wrote: > On Fri, Oct 12, 2012 at 01:31:03AM +0000, Kevin Lo wrote: > K> Author: kevlo > K> Date: Fri Oct 12 01:31:02 2012 > K> New Revision: 241471 > K> URL: http://svn.freebsd.org/changeset/base/241471 > K> > K> Log: > K> Since the moduledata structure member priv is a void pointer, using > K> NULL instead of 0 when dealing with pointers. > K> > K> Modified: > K> head/share/man/man9/module.9 > K> > K> Modified: head/share/man/man9/module.9 > K> ============================================================================== > K> --- head/share/man/man9/module.9 Thu Oct 11 23:41:18 2012 (r241470) > K> +++ head/share/man/man9/module.9 Fri Oct 12 01:31:02 2012 (r241471) > K> @@ -99,7 +99,7 @@ static int foo_handler(module_t mod, int > K> static moduledata_t mod_data= { > K> "foo", > K> foo_handler, > K> - 0 > K> + NULL > K> }; > K> > K> MODULE_VERSION(foo, 1); > > I think we should provide C99 sparse initializers for structures in > all manpages in section 9, as well as use only such initializers in any new > code added to tree. For man pages and .c files, that'd be fine. But since it's still possible to build C++ kernel modules, header files can't do this since named initializers don't have the same syntax in C++ (unless they fixed this in C++11?) Thanks, matthew From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 15:03:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8B45FC98; Fri, 12 Oct 2012 15:03:29 +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 736928FC08; Fri, 12 Oct 2012 15:03:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9CF3TPj024589; Fri, 12 Oct 2012 15:03:29 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9CF3TaZ024587; Fri, 12 Oct 2012 15:03:29 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201210121503.q9CF3TaZ024587@svn.freebsd.org> From: Ed Maste Date: Fri, 12 Oct 2012 15:03:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241484 - head/usr.bin/w X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 15:03:29 -0000 Author: emaste Date: Fri Oct 12 15:03:28 2012 New Revision: 241484 URL: http://svn.freebsd.org/changeset/base/241484 Log: Use CLOCK_UPTIME to get the uptime. Modified: head/usr.bin/w/w.c Modified: head/usr.bin/w/w.c ============================================================================== --- head/usr.bin/w/w.c Fri Oct 12 13:17:19 2012 (r241483) +++ head/usr.bin/w/w.c Fri Oct 12 15:03:28 2012 (r241484) @@ -447,7 +447,7 @@ pr_header(time_t *nowp, int nusers) /* * Print how long system has been up. */ - if (clock_gettime(CLOCK_MONOTONIC, &tp) != -1) { + if (clock_gettime(CLOCK_UPTIME, &tp) != -1) { uptime = tp.tv_sec; if (uptime > 60) uptime += 30; From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 17:18:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DA47A702; Fri, 12 Oct 2012 17:18:24 +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 C2BAF8FC0A; Fri, 12 Oct 2012 17:18:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9CHIOLG044133; Fri, 12 Oct 2012 17:18:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9CHIOmV044128; Fri, 12 Oct 2012 17:18:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210121718.q9CHIOmV044128@svn.freebsd.org> From: Alexander Motin Date: Fri, 12 Oct 2012 17:18:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241485 - in head/sys/cam: . ata scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 17:18:25 -0000 Author: mav Date: Fri Oct 12 17:18:24 2012 New Revision: 241485 URL: http://svn.freebsd.org/changeset/base/241485 Log: Protect xpt_getattr() calls with the SIM lock and assert that. Submitted by: ken@ (earlier version) Modified: head/sys/cam/ata/ata_da.c head/sys/cam/cam_xpt.c head/sys/cam/scsi/scsi_da.c head/sys/cam/scsi/scsi_pass.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Fri Oct 12 15:03:28 2012 (r241484) +++ head/sys/cam/ata/ata_da.c Fri Oct 12 17:18:24 2012 (r241485) @@ -914,17 +914,17 @@ adasysctlinit(void *context, int pending static int adagetattr(struct bio *bp) { - int ret = -1; + int ret; struct cam_periph *periph; - if (bp->bio_disk == NULL || bp->bio_disk->d_drv1 == NULL) - return ENXIO; periph = (struct cam_periph *)bp->bio_disk->d_drv1; - if (periph->path == NULL) - return ENXIO; + if (periph == NULL) + return (ENXIO); + cam_periph_lock(periph); ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute, periph->path); + cam_periph_unlock(periph); if (ret == 0) bp->bio_completed = bp->bio_length; return ret; Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Fri Oct 12 15:03:28 2012 (r241484) +++ head/sys/cam/cam_xpt.c Fri Oct 12 17:18:24 2012 (r241485) @@ -1111,6 +1111,8 @@ xpt_getattr(char *buf, size_t len, const int ret = -1; struct ccb_dev_advinfo cdai; + mtx_assert(path->bus->sim->mtx, MA_OWNED); + memset(&cdai, 0, sizeof(cdai)); xpt_setup_ccb(&cdai.ccb_h, path, CAM_PRIORITY_NORMAL); cdai.ccb_h.func_code = XPT_DEV_ADVINFO; Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Fri Oct 12 15:03:28 2012 (r241484) +++ head/sys/cam/scsi/scsi_da.c Fri Oct 12 17:18:24 2012 (r241485) @@ -1211,17 +1211,17 @@ dadump(void *arg, void *virtual, vm_offs static int dagetattr(struct bio *bp) { - int ret = -1; + int ret; struct cam_periph *periph; - if (bp->bio_disk == NULL || bp->bio_disk->d_drv1 == NULL) - return ENXIO; periph = (struct cam_periph *)bp->bio_disk->d_drv1; - if (periph->path == NULL) - return ENXIO; + if (periph == NULL) + return (ENXIO); + cam_periph_lock(periph); ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute, periph->path); + cam_periph_unlock(periph); if (ret == 0) bp->bio_completed = bp->bio_length; return ret; Modified: head/sys/cam/scsi/scsi_pass.c ============================================================================== --- head/sys/cam/scsi/scsi_pass.c Fri Oct 12 15:03:28 2012 (r241484) +++ head/sys/cam/scsi/scsi_pass.c Fri Oct 12 17:18:24 2012 (r241485) @@ -212,27 +212,26 @@ pass_add_physpath(void *context, int pen */ periph = context; softc = periph->softc; + physpath = malloc(MAXPATHLEN, M_DEVBUF, M_WAITOK); cam_periph_lock(periph); if (periph->flags & CAM_PERIPH_INVALID) { cam_periph_unlock(periph); - return; + goto out; } - cam_periph_unlock(periph); - physpath = malloc(MAXPATHLEN, M_DEVBUF, M_WAITOK); if (xpt_getattr(physpath, MAXPATHLEN, "GEOM::physpath", periph->path) == 0 && strlen(physpath) != 0) { + cam_periph_unlock(periph); make_dev_physpath_alias(MAKEDEV_WAITOK, &softc->alias_dev, softc->dev, softc->alias_dev, physpath); + cam_periph_lock(periph); } - free(physpath, M_DEVBUF); /* * Now that we've made our alias, we no longer have to have a * reference to the device. */ - cam_periph_lock(periph); if ((softc->flags & PASS_FLAG_INITIAL_PHYSPATH) == 0) { softc->flags |= PASS_FLAG_INITIAL_PHYSPATH; cam_periph_unlock(periph); @@ -240,6 +239,9 @@ pass_add_physpath(void *context, int pen } else cam_periph_unlock(periph); + +out: + free(physpath, M_DEVBUF); } static void From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 18:21:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 233FD2AA; Fri, 12 Oct 2012 18:21:32 +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 E6CB48FC16; Fri, 12 Oct 2012 18:21:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9CILVOR053196; Fri, 12 Oct 2012 18:21:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9CILV5T053194; Fri, 12 Oct 2012 18:21:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210121821.q9CILV5T053194@svn.freebsd.org> From: Alexander Motin Date: Fri, 12 Oct 2012 18:21:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241488 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 18:21:32 -0000 Author: mav Date: Fri Oct 12 18:21:31 2012 New Revision: 241488 URL: http://svn.freebsd.org/changeset/base/241488 Log: Get SIM lock in several places while calling CAM functions. This fixes several use-after-free panics on systems with SAS enclosures. Submitted by: ken@, mav@ Modified: head/sys/cam/scsi/scsi_enc_ses.c Modified: head/sys/cam/scsi/scsi_enc_ses.c ============================================================================== --- head/sys/cam/scsi/scsi_enc_ses.c Fri Oct 12 18:14:54 2012 (r241487) +++ head/sys/cam/scsi/scsi_enc_ses.c Fri Oct 12 18:21:31 2012 (r241488) @@ -886,6 +886,7 @@ ses_path_iter_devid_callback(enc_softc_t struct device_match_result *device_match; struct device_match_pattern *device_pattern; ses_path_iter_args_t *args; + struct cam_sim *sim; args = (ses_path_iter_args_t *)arg; match_pattern.type = DEV_MATCH_DEVICE; @@ -920,14 +921,18 @@ ses_path_iter_devid_callback(enc_softc_t return; device_match = &match_result.result.device_result; - if (xpt_create_path(&cdm.ccb_h.path, /*periph*/NULL, - device_match->path_id, - device_match->target_id, - device_match->target_lun) != CAM_REQ_CMP) + if (xpt_create_path_unlocked(&cdm.ccb_h.path, /*periph*/NULL, + device_match->path_id, + device_match->target_id, + device_match->target_lun) != CAM_REQ_CMP) return; args->callback(enc, elem, cdm.ccb_h.path, args->callback_arg); + + sim = xpt_path_sim(cdm.ccb_h.path); + CAM_SIM_LOCK(sim); xpt_free_path(cdm.ccb_h.path); + CAM_SIM_UNLOCK(sim); } /** @@ -999,7 +1004,7 @@ ses_setphyspath_callback(enc_softc_t *en args = (ses_setphyspath_callback_args_t *)arg; old_physpath = malloc(MAXPATHLEN, M_SCSIENC, M_WAITOK|M_ZERO); - + cam_periph_lock(enc->periph); xpt_setup_ccb(&cdai.ccb_h, path, CAM_PRIORITY_NORMAL); cdai.ccb_h.func_code = XPT_DEV_ADVINFO; cdai.buftype = CDAI_TYPE_PHYS_PATH; @@ -1024,6 +1029,7 @@ ses_setphyspath_callback(enc_softc_t *en if (cdai.ccb_h.status == CAM_REQ_CMP) args->num_set++; } + cam_periph_unlock(enc->periph); free(old_physpath, M_SCSIENC); } @@ -1063,9 +1069,11 @@ ses_set_physpath(enc_softc_t *enc, enc_e ret = ENOMEM; goto out; } + cam_periph_lock(enc->periph); xpt_action((union ccb *)&cdai); if ((cdai.ccb_h.status & CAM_DEV_QFRZN) != 0) cam_release_devq(cdai.ccb_h.path, 0, 0, 0, FALSE); + cam_periph_unlock(enc->periph); if (cdai.ccb_h.status != CAM_REQ_CMP) goto out; From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 19:53:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 263565D1; Fri, 12 Oct 2012 19:53:14 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E96678FC0C; Fri, 12 Oct 2012 19:53:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9CJrDKC065944; Fri, 12 Oct 2012 19:53:13 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9CJrD77065942; Fri, 12 Oct 2012 19:53:13 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210121953.q9CJrD77065942@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 12 Oct 2012 19:53:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241491 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 19:53:14 -0000 Author: glebius Date: Fri Oct 12 19:53:13 2012 New Revision: 241491 URL: http://svn.freebsd.org/changeset/base/241491 Log: Fix type in last commit. Submitted by: brueffer Modified: head/share/man/man4/ip.4 Modified: head/share/man/man4/ip.4 ============================================================================== --- head/share/man/man4/ip.4 Fri Oct 12 18:49:07 2012 (r241490) +++ head/share/man/man4/ip.4 Fri Oct 12 19:53:13 2012 (r241491) @@ -32,7 +32,7 @@ .\" @(#)ip.4 8.2 (Berkeley) 11/30/93 .\" $FreeBSD$ .\" -.Dd Ocotber 12, 2012 +.Dd October 12, 2012 .Dt IP 4 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 21:31:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 98E58DC4; Fri, 12 Oct 2012 21:31:45 +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 7FF7A8FC0C; Fri, 12 Oct 2012 21:31:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9CLVjjP079361; Fri, 12 Oct 2012 21:31:45 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9CLVjEQ079353; Fri, 12 Oct 2012 21:31:45 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210122131.q9CLVjEQ079353@svn.freebsd.org> From: John Baldwin Date: Fri, 12 Oct 2012 21:31:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241492 - head/sys/dev/advansys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 21:31:45 -0000 Author: jhb Date: Fri Oct 12 21:31:44 2012 New Revision: 241492 URL: http://svn.freebsd.org/changeset/base/241492 Log: Add locking to adv(4) driver and mark it MPSAFE. - Disable the support for the second channel on twin-channel EISA cards as the current incarnation can't possibly work correctly (it hasn't worked since switching to new-bus where new-bus allocates the softc). If anyone bothers to test this again it can be fixed properly and brought back. - Use device_printf() and device_get_nameunit() instead of adv_name(). - Remove use of explicit bus space handles and tags. - Use PCI bus accessors and helper routines rather than accessing config registers directly. - Handle failures from adv_attach(). Tested by: no one (hope it works) Modified: head/sys/dev/advansys/adv_eisa.c head/sys/dev/advansys/adv_isa.c head/sys/dev/advansys/adv_pci.c head/sys/dev/advansys/advansys.c head/sys/dev/advansys/advansys.h head/sys/dev/advansys/advlib.c head/sys/dev/advansys/advlib.h Modified: head/sys/dev/advansys/adv_eisa.c ============================================================================== --- head/sys/dev/advansys/adv_eisa.c Fri Oct 12 19:53:13 2012 (r241491) +++ head/sys/dev/advansys/adv_eisa.c Fri Oct 12 21:31:44 2012 (r241492) @@ -131,17 +131,27 @@ adv_eisa_probe(device_t dev) return 0; } +/* + * The adv_b stuff to handle twin-channel cards will not work in its current + * incarnation. It tries to reuse the same softc since adv_alloc() doesn't + * actually allocate a softc. It also tries to reuse the same unit number + * for both sims. This can be re-enabled if someone fixes it properly. + */ static int adv_eisa_attach(device_t dev) { struct adv_softc *adv; +#if 0 struct adv_softc *adv_b; +#endif struct resource *io; struct resource *irq; int rid, error; void *ih; +#if 0 adv_b = NULL; +#endif rid = 0; io = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); @@ -162,8 +172,8 @@ adv_eisa_attach(device_t dev) switch (eisa_get_id(dev) & ~0xF) { case EISA_DEVICE_ID_ADVANSYS_750: - adv_b = adv_alloc(dev, rman_get_bustag(io), - rman_get_bushandle(io) + ADV_EISA_OFFSET_CHAN2); +#if 0 + adv_b = adv_alloc(dev, io, ADV_EISA_OFFSET_CHAN2); if (adv_b == NULL) goto bad; @@ -183,26 +193,28 @@ adv_eisa_attach(device_t dev) /* nsegments */ ~0, /* maxsegsz */ ADV_EISA_MAX_DMA_COUNT, /* flags */ 0, - /* lockfunc */ busdma_lock_mutex, - /* lockarg */ &Giant, + /* lockfunc */ NULL, + /* lockarg */ NULL, &adv_b->parent_dmat); if (error != 0) { - printf("%s: Could not allocate DMA tag - error %d\n", - adv_name(adv_b), error); + device_printf(dev, "Could not allocate DMA tag - error %d\n", + error); adv_free(adv_b); goto bad; } adv_b->init_level++; +#endif /* FALLTHROUGH */ case EISA_DEVICE_ID_ADVANSYS_740: - adv = adv_alloc(dev, rman_get_bustag(io), - rman_get_bushandle(io) + ADV_EISA_OFFSET_CHAN1); + adv = adv_alloc(dev, io, ADV_EISA_OFFSET_CHAN1); if (adv == NULL) { +#if 0 if (adv_b != NULL) adv_free(adv_b); +#endif goto bad; } @@ -222,13 +234,13 @@ adv_eisa_attach(device_t dev) /* nsegments */ ~0, /* maxsegsz */ ADV_EISA_MAX_DMA_COUNT, /* flags */ 0, - /* lockfunc */ busdma_lock_mutex, - /* lockarg */ &Giant, + /* lockfunc */ NULL, + /* lockarg */ NULL, &adv->parent_dmat); if (error != 0) { - printf("%s: Could not allocate DMA tag - error %d\n", - adv_name(adv), error); + device_printf(dev, "Could not allocate DMA tag - error %d\n", + error); adv_free(adv); goto bad; } @@ -244,7 +256,7 @@ adv_eisa_attach(device_t dev) if (overrun_buf == NULL) { /* Need to allocate our overrun buffer */ if (bus_dma_tag_create( - /* parent */ adv->parent_dmat, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 8, /* boundary */ 0, /* lowaddr */ ADV_EISA_MAX_DMA_ADDR, @@ -255,8 +267,8 @@ adv_eisa_attach(device_t dev) /* nsegments */ 1, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ 0, - /* lockfunc */ busdma_lock_mutex, - /* lockarg */ &Giant, + /* lockfunc */ NULL, + /* lockarg */ NULL, &overrun_dmat) != 0) { adv_free(adv); goto bad; @@ -292,14 +304,17 @@ adv_eisa_attach(device_t dev) if (adv_init(adv) != 0) { adv_free(adv); +#if 0 if (adv_b != NULL) adv_free(adv_b); - return(-1); +#endif + goto bad; } adv->max_dma_count = ADV_EISA_MAX_DMA_COUNT; adv->max_dma_addr = ADV_EISA_MAX_DMA_ADDR; +#if 0 if (adv_b != NULL) { /* * Stop the chip. @@ -317,24 +332,33 @@ adv_eisa_attach(device_t dev) adv_b->max_dma_addr = ADV_EISA_MAX_DMA_ADDR; } } +#endif /* * Enable our interrupt handler. */ - bus_setup_intr(dev, irq, INTR_TYPE_CAM|INTR_ENTROPY, NULL, adv_intr, - adv, &ih); + if (bus_setup_intr(dev, irq, INTR_TYPE_CAM|INTR_ENTROPY|INTR_MPSAFE, NULL, + adv_intr, adv, &ih) != 0) { + adv_free(adv); + goto bad; + } - /* Attach sub-devices - always succeeds */ - adv_attach(adv); + /* Attach sub-devices */ + if (adv_attach(adv) != 0) { + adv_free(adv); + goto bad; + } +#if 0 if (adv_b != NULL) adv_attach(adv_b); +#endif return 0; bad: bus_release_resource(dev, SYS_RES_IOPORT, 0, io); bus_release_resource(dev, SYS_RES_IRQ, 0, irq); - return -1; + return ENXIO; } static device_method_t adv_eisa_methods[] = { Modified: head/sys/dev/advansys/adv_isa.c ============================================================================== --- head/sys/dev/advansys/adv_isa.c Fri Oct 12 19:53:13 2012 (r241491) +++ head/sys/dev/advansys/adv_isa.c Fri Oct 12 21:31:44 2012 (r241492) @@ -135,12 +135,13 @@ adv_isa_probe(device_t dev) if ((port_index > max_port_index) || (iobase != adv_isa_ioports[port_index])) { if (bootverbose) - printf("adv%d: Invalid baseport of 0x%lx specified. " - "Nearest valid baseport is 0x%x. Failing " - "probe.\n", device_get_unit(dev), iobase, - (port_index <= max_port_index) ? - adv_isa_ioports[port_index] : - adv_isa_ioports[max_port_index]); + device_printf(dev, + "Invalid baseport of 0x%lx specified. " + "Nearest valid baseport is 0x%x. Failing " + "probe.\n", iobase, + (port_index <= max_port_index) ? + adv_isa_ioports[port_index] : + adv_isa_ioports[max_port_index]); return ENXIO; } max_port_index = port_index; @@ -169,8 +170,7 @@ adv_isa_probe(device_t dev) if (iores == NULL) continue; - if (adv_find_signature(rman_get_bustag(iores), - rman_get_bushandle(iores)) == 0) { + if (adv_find_signature(iores) == 0) { bus_release_resource(dev, SYS_RES_IOPORT, 0, iores); continue; } @@ -179,8 +179,7 @@ adv_isa_probe(device_t dev) * Got one. Now allocate our softc * and see if we can initialize the card. */ - adv = adv_alloc(dev, rman_get_bustag(iores), - rman_get_bushandle(iores)); + adv = adv_alloc(dev, iores, 0); if (adv == NULL) { bus_release_resource(dev, SYS_RES_IOPORT, 0, iores); break; @@ -238,13 +237,13 @@ adv_isa_probe(device_t dev) /* nsegments */ ~0, /* maxsegsz */ maxsegsz, /* flags */ 0, - /* lockfunc */ busdma_lock_mutex, - /* lockarg */ &Giant, + /* lockfunc */ NULL, + /* lockarg */ NULL, &adv->parent_dmat); if (error != 0) { - printf("%s: Could not allocate DMA tag - error %d\n", - adv_name(adv), error); + device_printf(dev, + "Could not allocate DMA tag - error %d\n", error); adv_free(adv); bus_release_resource(dev, SYS_RES_IOPORT, 0, iores); break; @@ -335,8 +334,11 @@ adv_isa_probe(device_t dev) irqres = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); if (irqres == NULL || - bus_setup_intr(dev, irqres, INTR_TYPE_CAM|INTR_ENTROPY, - NULL, adv_intr, adv, &ih)) { + bus_setup_intr(dev, irqres, INTR_TYPE_CAM|INTR_ENTROPY| + INTR_MPSAFE, NULL, adv_intr, adv, &ih) != 0) { + if (irqres != NULL) + bus_release_resource(dev, SYS_RES_IRQ, rid, + irqres); bus_dmamap_unload(overrun_dmat, overrun_dmamap); bus_dmamem_free(overrun_dmat, overrun_buf, overrun_dmamap); Modified: head/sys/dev/advansys/adv_pci.c ============================================================================== --- head/sys/dev/advansys/adv_pci.c Fri Oct 12 19:53:13 2012 (r241491) +++ head/sys/dev/advansys/adv_pci.c Fri Oct 12 21:31:44 2012 (r241492) @@ -138,7 +138,6 @@ adv_pci_attach(device_t dev) { struct adv_softc *adv; u_int32_t id; - u_int32_t command; int error, rid, irqrid; void *ih; struct resource *iores, *irqres; @@ -146,19 +145,8 @@ adv_pci_attach(device_t dev) /* * Determine the chip version. */ - id = pci_read_config(dev, PCIR_DEVVENDOR, /*bytes*/4); - command = pci_read_config(dev, PCIR_COMMAND, /*bytes*/1); - - /* - * These cards do not allow memory mapped accesses, so we must - * ensure that I/O accesses are available or we won't be able - * to talk to them. - */ - if ((command & (PCIM_CMD_PORTEN|PCIM_CMD_BUSMASTEREN)) - != (PCIM_CMD_PORTEN|PCIM_CMD_BUSMASTEREN)) { - command |= PCIM_CMD_PORTEN|PCIM_CMD_BUSMASTEREN; - pci_write_config(dev, PCIR_COMMAND, command, /*bytes*/1); - } + id = pci_get_devid(dev); + pci_enable_busmaster(dev); /* * Early chips can't handle non-zero latency timer settings. @@ -174,13 +162,12 @@ adv_pci_attach(device_t dev) if (iores == NULL) return ENXIO; - if (adv_find_signature(rman_get_bustag(iores), - rman_get_bushandle(iores)) == 0) { + if (adv_find_signature(iores) == 0) { bus_release_resource(dev, SYS_RES_IOPORT, rid, iores); return ENXIO; } - adv = adv_alloc(dev, rman_get_bustag(iores), rman_get_bushandle(iores)); + adv = adv_alloc(dev, iores, 0); if (adv == NULL) { bus_release_resource(dev, SYS_RES_IOPORT, rid, iores); return ENXIO; @@ -199,13 +186,13 @@ adv_pci_attach(device_t dev) /* nsegments */ ~0, /* maxsegsz */ ADV_PCI_MAX_DMA_COUNT, /* flags */ 0, - /* lockfunc */ busdma_lock_mutex, - /* lockarg */ &Giant, + /* lockfunc */ NULL, + /* lockarg */ NULL, &adv->parent_dmat); if (error != 0) { - printf("%s: Could not allocate DMA tag - error %d\n", - adv_name(adv), error); + device_printf(dev, "Could not allocate DMA tag - error %d\n", + error); adv_free(adv); bus_release_resource(dev, SYS_RES_IOPORT, rid, iores); return ENXIO; @@ -227,8 +214,8 @@ adv_pci_attach(device_t dev) /* nsegments */ 1, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ 0, - /* lockfunc */ busdma_lock_mutex, - /* lockarg */ &Giant, + /* lockfunc */ NULL, + /* lockarg */ NULL, &overrun_dmat) != 0) { bus_dma_tag_destroy(adv->parent_dmat); adv_free(adv); @@ -308,14 +295,22 @@ adv_pci_attach(device_t dev) irqres = bus_alloc_resource_any(dev, SYS_RES_IRQ, &irqrid, RF_SHAREABLE | RF_ACTIVE); if (irqres == NULL || - bus_setup_intr(dev, irqres, INTR_TYPE_CAM|INTR_ENTROPY, NULL, - adv_intr, adv, &ih)) { + bus_setup_intr(dev, irqres, INTR_TYPE_CAM|INTR_ENTROPY|INTR_MPSAFE, + NULL, adv_intr, adv, &ih) != 0) { + if (irqres != NULL) + bus_release_resource(dev, SYS_RES_IRQ, irqrid, irqres); adv_free(adv); bus_release_resource(dev, SYS_RES_IOPORT, rid, iores); return ENXIO; } - adv_attach(adv); + if (adv_attach(adv) != 0) { + bus_teardown_intr(dev, irqres, ih); + bus_release_resource(dev, SYS_RES_IRQ, irqrid, irqres); + adv_free(adv); + bus_release_resource(dev, SYS_RES_IOPORT, rid, iores); + return ENXIO; + } return 0; } Modified: head/sys/dev/advansys/advansys.c ============================================================================== --- head/sys/dev/advansys/advansys.c Fri Oct 12 19:53:13 2012 (r241491) +++ head/sys/dev/advansys/advansys.c Fri Oct 12 21:31:44 2012 (r241492) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -79,6 +80,7 @@ __FBSDID("$FreeBSD$"); static void adv_action(struct cam_sim *sim, union ccb *ccb); static void adv_execute_ccb(void *arg, bus_dma_segment_t *dm_segs, int nsegments, int error); +static void adv_intr_locked(struct adv_softc *adv); static void adv_poll(struct cam_sim *sim); static void adv_run_doneq(struct adv_softc *adv); static struct adv_ccb_info * @@ -97,15 +99,14 @@ static __inline struct adv_ccb_info * adv_get_ccb_info(struct adv_softc *adv) { struct adv_ccb_info *cinfo; - int opri; - opri = splcam(); + if (!dumping) + mtx_assert(&adv->lock, MA_OWNED); if ((cinfo = SLIST_FIRST(&adv->free_ccb_infos)) != NULL) { SLIST_REMOVE_HEAD(&adv->free_ccb_infos, links); } else { cinfo = adv_alloc_ccb_info(adv); } - splx(opri); return (cinfo); } @@ -113,12 +114,11 @@ adv_get_ccb_info(struct adv_softc *adv) static __inline void adv_free_ccb_info(struct adv_softc *adv, struct adv_ccb_info *cinfo) { - int opri; - opri = splcam(); + if (!dumping) + mtx_assert(&adv->lock, MA_OWNED); cinfo->state = ACCB_FREE; SLIST_INSERT_HEAD(&adv->free_ccb_infos, cinfo, links); - splx(opri); } static __inline void @@ -139,6 +139,9 @@ adv_clear_state(struct adv_softc *adv, u static void adv_clear_state_really(struct adv_softc *adv, union ccb* ccb) { + + if (!dumping) + mtx_assert(&adv->lock, MA_OWNED); if ((adv->state & ADV_BUSDMA_BLOCK_CLEARED) != 0) adv->state &= ~(ADV_BUSDMA_BLOCK_CLEARED|ADV_BUSDMA_BLOCK); if ((adv->state & ADV_RESOURCE_SHORTAGE) != 0) { @@ -164,13 +167,14 @@ adv_clear_state_really(struct adv_softc */ ccb_h = LIST_FIRST(&adv->pending_ccbs); while (ccb_h != NULL) { - ccb_h->timeout_ch = - timeout(adv_timeout, (caddr_t)ccb_h, - (ccb_h->timeout * hz) / 1000); + cinfo = ccb_h->ccb_cinfo_ptr; + callout_reset(&cinfo->timer, + ccb_h->timeout * hz / 1000, adv_timeout, + ccb_h); ccb_h = LIST_NEXT(ccb_h, sim_links.le); } adv->state &= ~ADV_IN_TIMEOUT; - printf("%s: No longer in timeout\n", adv_name(adv)); + device_printf(adv->dev, "No longer in timeout\n"); } } if (adv->state == 0) @@ -186,15 +190,6 @@ adv_map(void *arg, bus_dma_segment_t *se *physaddr = segs->ds_addr; } -char * -adv_name(struct adv_softc *adv) -{ - static char name[10]; - - snprintf(name, sizeof(name), "adv%d", adv->unit); - return (name); -} - static void adv_action(struct cam_sim *sim, union ccb *ccb) { @@ -203,6 +198,7 @@ adv_action(struct cam_sim *sim, union cc CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, ("adv_action\n")); adv = (struct adv_softc *)cam_sim_softc(sim); + mtx_assert(&adv->lock, MA_OWNED); switch (ccb->ccb_h.func_code) { /* Common cases first */ @@ -229,10 +225,8 @@ adv_action(struct cam_sim *sim, union cc * to a single buffer */ if ((ccb_h->flags & CAM_DATA_PHYS) == 0) { - int s; int error; - s = splsoftvm(); error = bus_dmamap_load(adv->buffer_dmat, cinfo->dmamap, @@ -250,7 +244,6 @@ adv_action(struct cam_sim *sim, union cc adv_set_state(adv, ADV_BUSDMA_BLOCK); } - splx(s); } else { struct bus_dma_segment seg; @@ -299,7 +292,6 @@ adv_action(struct cam_sim *sim, union cc target_bit_vector targ_mask; struct adv_transinfo *tconf; u_int update_type; - int s; cts = &ccb->cts; targ_mask = ADV_TID_TO_TARGET_MASK(cts->ccb_h.target_id); @@ -320,7 +312,6 @@ adv_action(struct cam_sim *sim, union cc break; } - s = splcam(); scsi = &cts->proto_specific.scsi; spi = &cts->xport_specific.spi; if ((update_type & ADV_TRANS_GOAL) != 0) { @@ -387,7 +378,6 @@ adv_action(struct cam_sim *sim, union cc spi->sync_offset, update_type); } - splx(s); ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; @@ -400,7 +390,6 @@ adv_action(struct cam_sim *sim, union cc struct ccb_trans_settings *cts; struct adv_transinfo *tconf; target_bit_vector target_mask; - int s; cts = &ccb->cts; target_mask = ADV_TID_TO_TARGET_MASK(cts->ccb_h.target_id); @@ -416,7 +405,6 @@ adv_action(struct cam_sim *sim, union cc scsi->flags &= ~CTS_SCSI_FLAGS_TAG_ENB; spi->flags &= ~CTS_SPI_FLAGS_DISC_ENB; - s = splcam(); if (cts->type == CTS_TYPE_CURRENT_SETTINGS) { tconf = &adv->tinfo[cts->ccb_h.target_id].current; if ((adv->disc_enable & target_mask) != 0) @@ -432,7 +420,6 @@ adv_action(struct cam_sim *sim, union cc } spi->sync_period = tconf->period; spi->sync_offset = tconf->offset; - splx(s); spi->bus_width = MSG_EXT_WDTR_BUS_8_BIT; spi->valid = CTS_SPI_VALID_SYNC_RATE | CTS_SPI_VALID_SYNC_OFFSET @@ -454,13 +441,10 @@ adv_action(struct cam_sim *sim, union cc } case XPT_RESET_BUS: /* Reset the specified SCSI bus */ { - int s; - s = splcam(); adv_stop_execution(adv); adv_reset_bus(adv, /*initiate_reset*/TRUE); adv_start_execution(adv); - splx(s); ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); @@ -521,13 +505,14 @@ adv_execute_ccb(void *arg, bus_dma_segme struct adv_ccb_info *cinfo; struct adv_scsi_q scsiq; struct adv_sg_head sghead; - int s; csio = (struct ccb_scsiio *)arg; ccb_h = &csio->ccb_h; sim = xpt_path_sim(ccb_h->path); adv = (struct adv_softc *)cam_sim_softc(sim); cinfo = (struct adv_ccb_info *)csio->ccb_h.ccb_cinfo_ptr; + if (!dumping) + mtx_assert(&adv->lock, MA_OWNED); /* * Setup our done routine to release the simq on @@ -596,8 +581,6 @@ adv_execute_ccb(void *arg, bus_dma_segme scsiq.sg_head = NULL; } - s = splcam(); - /* * Last time we need to check if this SCB needs to * be aborted. @@ -608,7 +591,6 @@ adv_execute_ccb(void *arg, bus_dma_segme adv_clear_state(adv, (union ccb *)csio); adv_free_ccb_info(adv, cinfo); xpt_done((union ccb *)csio); - splx(s); return; } @@ -621,16 +603,14 @@ adv_execute_ccb(void *arg, bus_dma_segme adv_clear_state(adv, (union ccb *)csio); adv_free_ccb_info(adv, cinfo); xpt_done((union ccb *)csio); - splx(s); return; } cinfo->state |= ACCB_ACTIVE; ccb_h->status |= CAM_SIM_QUEUED; LIST_INSERT_HEAD(&adv->pending_ccbs, ccb_h, sim_links.le); /* Schedule our timeout */ - ccb_h->timeout_ch = - timeout(adv_timeout, csio, (ccb_h->timeout * hz)/1000); - splx(s); + callout_reset(&cinfo->timer, ccb_h->timeout * hz /1000, adv_timeout, + csio); } static struct adv_ccb_info * @@ -641,11 +621,12 @@ adv_alloc_ccb_info(struct adv_softc *adv cinfo = &adv->ccb_infos[adv->ccb_infos_allocated]; cinfo->state = ACCB_FREE; + callout_init_mtx(&cinfo->timer, &adv->lock, 0); error = bus_dmamap_create(adv->buffer_dmat, /*flags*/0, &cinfo->dmamap); if (error != 0) { - printf("%s: Unable to allocate CCB info " - "dmamap - error %d\n", adv_name(adv), error); + device_printf(adv->dev, "Unable to allocate CCB info " + "dmamap - error %d\n", error); return (NULL); } adv->ccb_infos_allocated++; @@ -655,28 +636,28 @@ adv_alloc_ccb_info(struct adv_softc *adv static void adv_destroy_ccb_info(struct adv_softc *adv, struct adv_ccb_info *cinfo) { + + callout_drain(&cinfo->timer); bus_dmamap_destroy(adv->buffer_dmat, cinfo->dmamap); } void adv_timeout(void *arg) { - int s; union ccb *ccb; struct adv_softc *adv; - struct adv_ccb_info *cinfo; + struct adv_ccb_info *cinfo, *cinfo2; ccb = (union ccb *)arg; adv = (struct adv_softc *)xpt_path_sim(ccb->ccb_h.path)->softc; cinfo = (struct adv_ccb_info *)ccb->ccb_h.ccb_cinfo_ptr; + mtx_assert(&adv->lock, MA_OWNED); xpt_print_path(ccb->ccb_h.path); printf("Timed out\n"); - s = splcam(); /* Have we been taken care of already?? */ if (cinfo == NULL || cinfo->state == ACCB_FREE) { - splx(s); return; } @@ -702,7 +683,8 @@ adv_timeout(void *arg) ccb_h = LIST_FIRST(&adv->pending_ccbs); while (ccb_h != NULL) { - untimeout(adv_timeout, ccb_h, ccb_h->timeout_ch); + cinfo2 = ccb_h->ccb_cinfo_ptr; + callout_stop(&cinfo2->timer); ccb_h = LIST_NEXT(ccb_h, sim_links.le); } @@ -713,8 +695,7 @@ adv_timeout(void *arg) adv_abort_ccb(adv, ccb->ccb_h.target_id, ccb->ccb_h.target_lun, ccb, CAM_CMD_TIMEOUT, /*queued_only*/FALSE); - ccb->ccb_h.timeout_ch = - timeout(adv_timeout, ccb, 2 * hz); + callout_reset(&cinfo->timer, 2 * hz, adv_timeout, ccb); } else { /* Our attempt to perform an abort failed, go for a reset */ xpt_print_path(ccb->ccb_h.path); @@ -724,11 +705,10 @@ adv_timeout(void *arg) adv_reset_bus(adv, /*initiate_reset*/TRUE); } adv_start_execution(adv); - splx(s); } struct adv_softc * -adv_alloc(device_t dev, bus_space_tag_t tag, bus_space_handle_t bsh) +adv_alloc(device_t dev, struct resource *res, long offset) { struct adv_softc *adv = device_get_softc(dev); @@ -738,9 +718,9 @@ adv_alloc(device_t dev, bus_space_tag_t LIST_INIT(&adv->pending_ccbs); SLIST_INIT(&adv->free_ccb_infos); adv->dev = dev; - adv->unit = device_get_unit(dev); - adv->tag = tag; - adv->bsh = bsh; + adv->res = res; + adv->reg_off = offset; + mtx_init(&adv->lock, "adv", NULL, MTX_DEF); return(adv); } @@ -773,6 +753,7 @@ adv_free(struct adv_softc *adv) if (adv->ccb_infos != NULL) free(adv->ccb_infos, M_DEVBUF); case 0: + mtx_destroy(&adv->lock); break; } } @@ -786,6 +767,7 @@ adv_init(struct adv_softc *adv) u_int16_t config_lsw; u_int16_t config_msw; + mtx_lock(&adv->lock); adv_lib_init(adv); /* @@ -794,14 +776,16 @@ adv_init(struct adv_softc *adv) adv_write_lram_16(adv, ADV_HALTCODE_W, 0x00FE); adv_stop_execution(adv); if (adv_stop_chip(adv) == 0 || adv_is_chip_halted(adv) == 0) { - printf("adv%d: Unable to halt adapter. Initialization" - "failed\n", adv->unit); + mtx_unlock(&adv->lock); + device_printf(adv->dev, + "Unable to halt adapter. Initialization failed\n"); return (1); } ADV_OUTW(adv, ADV_REG_PROG_COUNTER, ADV_MCODE_START_ADDR); if (ADV_INW(adv, ADV_REG_PROG_COUNTER) != ADV_MCODE_START_ADDR) { - printf("adv%d: Unable to set program counter. Initialization" - "failed\n", adv->unit); + mtx_unlock(&adv->lock); + device_printf(adv->dev, + "Unable to set program counter. Initialization failed\n"); return (1); } @@ -876,8 +860,8 @@ adv_init(struct adv_softc *adv) } else { u_int8_t sync_data; - printf("adv%d: Warning EEPROM Checksum mismatch. " - "Using default device parameters\n", adv->unit); + device_printf(adv->dev, "Warning EEPROM Checksum mismatch. " + "Using default device parameters\n"); /* Set reasonable defaults since we can't read the EEPROM */ adv->isa_dma_speed = /*ADV_DEF_ISA_DMA_SPEED*/1; @@ -940,13 +924,15 @@ adv_init(struct adv_softc *adv) * to be 100% correct. */ if (adv_set_eeprom_config(adv, &eeprom_config) != 0) - printf("%s: WARNING! Failure writing to EEPROM.\n", - adv_name(adv)); + device_printf(adv->dev, + "WARNING! Failure writing to EEPROM.\n"); #endif adv_set_chip_scsiid(adv, adv->scsi_id); - if (adv_init_lram_and_mcode(adv)) + if (adv_init_lram_and_mcode(adv)) { + mtx_unlock(&adv->lock); return (1); + } adv->disc_enable = adv->user_disc_enable; @@ -969,10 +955,12 @@ adv_init(struct adv_softc *adv) } adv_write_lram_8(adv, ADVV_USE_TAGGED_QNG_B, TARGET_BIT_VECTOR_SET); adv_write_lram_8(adv, ADVV_CAN_TAGGED_QNG_B, TARGET_BIT_VECTOR_SET); - printf("adv%d: AdvanSys %s Host Adapter, SCSI ID %d, queue depth %d\n", - adv->unit, (adv->type & ADV_ULTRA) && (max_sync == 0) - ? "Ultra SCSI" : "SCSI", - adv->scsi_id, adv->max_openings); + device_printf(adv->dev, + "AdvanSys %s Host Adapter, SCSI ID %d, queue depth %d\n", + (adv->type & ADV_ULTRA) && (max_sync == 0) + ? "Ultra SCSI" : "SCSI", + adv->scsi_id, adv->max_openings); + mtx_unlock(&adv->lock); return (0); } @@ -980,14 +968,24 @@ void adv_intr(void *arg) { struct adv_softc *adv; + + adv = arg; + mtx_lock(&adv->lock); + adv_intr_locked(adv); + mtx_unlock(&adv->lock); +} + +void +adv_intr_locked(struct adv_softc *adv) +{ u_int16_t chipstat; u_int16_t saved_ram_addr; u_int8_t ctrl_reg; u_int8_t saved_ctrl_reg; u_int8_t host_flag; - adv = (struct adv_softc *)arg; - + if (!dumping) + mtx_assert(&adv->lock, MA_OWNED); chipstat = ADV_INW(adv, ADV_CHIP_STATUS); /* Is it for us? */ @@ -1000,7 +998,7 @@ adv_intr(void *arg) ADV_CC_TEST)); if ((chipstat & (ADV_CSW_SCSI_RESET_LATCH|ADV_CSW_SCSI_RESET_ACTIVE))) { - printf("Detected Bus Reset\n"); + device_printf(adv->dev, "Detected Bus Reset\n"); adv_reset_bus(adv, /*initiate_reset*/FALSE); return; } @@ -1128,9 +1126,11 @@ adv_done(struct adv_softc *adv, union cc { struct adv_ccb_info *cinfo; + if (!dumping) + mtx_assert(&adv->lock, MA_OWNED); cinfo = (struct adv_ccb_info *)ccb->ccb_h.ccb_cinfo_ptr; LIST_REMOVE(&ccb->ccb_h, sim_links.le); - untimeout(adv_timeout, ccb, ccb->ccb_h.timeout_ch); + callout_stop(&cinfo->timer); if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) { bus_dmasync_op_t op; @@ -1239,7 +1239,7 @@ adv_done(struct adv_softc *adv, union cc case QHSTA_M_MICRO_CODE_ERROR_HALT: default: panic("%s: Unhandled Host status error %x", - adv_name(adv), host_stat); + device_get_nameunit(adv->dev), host_stat); /* NOTREACHED */ } break; @@ -1280,7 +1280,8 @@ adv_done(struct adv_softc *adv, union cc static void adv_poll(struct cam_sim *sim) { - adv_intr(cam_sim_softc(sim)); + + adv_intr_locked(cam_sim_softc(sim)); } /* @@ -1350,7 +1351,7 @@ adv_attach(adv) /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, /* lockfunc */ busdma_lock_mutex, - /* lockarg */ &Giant, + /* lockarg */ &adv->lock, &adv->buffer_dmat) != 0) { return (ENXIO); } @@ -1371,7 +1372,7 @@ adv_attach(adv) /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ 0, /* lockfunc */ busdma_lock_mutex, - /* lockarg */ &Giant, + /* lockarg */ &adv->lock, &adv->sense_dmat) != 0) { return (ENXIO); } @@ -1398,8 +1399,8 @@ adv_attach(adv) * Fire up the chip */ if (adv_start_chip(adv) != 1) { - printf("adv%d: Unable to start on board processor. Aborting.\n", - adv->unit); + device_printf(adv->dev, + "Unable to start on board processor. Aborting.\n"); return (ENXIO); } @@ -1413,8 +1414,8 @@ adv_attach(adv) /* * Construct our SIM entry. */ - adv->sim = cam_sim_alloc(adv_action, adv_poll, "adv", adv, adv->unit, - &Giant, 1, adv->max_openings, devq); + adv->sim = cam_sim_alloc(adv_action, adv_poll, "adv", adv, + device_get_unit(adv->dev), &adv->lock, 1, adv->max_openings, devq); if (adv->sim == NULL) return (ENOMEM); @@ -1423,8 +1424,10 @@ adv_attach(adv) * * XXX Twin Channel EISA Cards??? */ + mtx_lock(&adv->lock); if (xpt_bus_register(adv->sim, adv->dev, 0) != CAM_SUCCESS) { cam_sim_free(adv->sim, /*free devq*/TRUE); + mtx_unlock(&adv->lock); return (ENXIO); } @@ -1433,6 +1436,7 @@ adv_attach(adv) != CAM_REQ_CMP) { xpt_bus_deregister(cam_sim_path(adv->sim)); cam_sim_free(adv->sim, /*free devq*/TRUE); + mtx_unlock(&adv->lock); return (ENXIO); } @@ -1442,6 +1446,7 @@ adv_attach(adv) csa.callback = advasync; csa.callback_arg = adv; xpt_action((union ccb *)&csa); + mtx_unlock(&adv->lock); return (0); } MODULE_DEPEND(adv, cam, 1, 1, 1); Modified: head/sys/dev/advansys/advansys.h ============================================================================== --- head/sys/dev/advansys/advansys.h Fri Oct 12 19:53:13 2012 (r241491) +++ head/sys/dev/advansys/advansys.h Fri Oct 12 21:31:44 2012 (r241492) @@ -38,9 +38,7 @@ #include -struct adv_softc * adv_alloc(device_t dev, bus_space_tag_t tag, - bus_space_handle_t bsh); -char * adv_name(struct adv_softc *adv); +struct adv_softc * adv_alloc(device_t dev, struct resource *res, long offset); void adv_map(void *arg, bus_dma_segment_t *segs, int nseg, int error); void adv_free(struct adv_softc *adv); @@ -50,6 +48,6 @@ int adv_attach(struct adv_softc *adv); void adv_done(struct adv_softc *adv, union ccb* ccb, u_int done_stat, u_int host_stat, u_int scsi_stat, u_int q_no); -timeout_t adv_timeout; +void adv_timeout(void *arg); #endif /* _ADVANSYS_H_ */ Modified: head/sys/dev/advansys/advlib.c ============================================================================== --- head/sys/dev/advansys/advlib.c Fri Oct 12 19:53:13 2012 (r241491) +++ head/sys/dev/advansys/advlib.c Fri Oct 12 21:31:44 2012 (r241492) @@ -45,7 +45,10 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include +#include #include #include @@ -298,6 +301,7 @@ advasync(void *callback_arg, u_int32_t c struct adv_softc *adv; adv = (struct adv_softc *)callback_arg; + mtx_assert(&adv->lock, MA_OWNED); switch (code) { case AC_FOUND_DEVICE: { @@ -460,12 +464,12 @@ adv_write_lram_16(struct adv_softc *adv, * found, 0 otherwise. */ int -adv_find_signature(bus_space_tag_t tag, bus_space_handle_t bsh) +adv_find_signature(struct resource *res) { u_int16_t signature; - if (bus_space_read_1(tag, bsh, ADV_SIGNATURE_BYTE) == ADV_1000_ID1B) { - signature = bus_space_read_2(tag, bsh, ADV_SIGNATURE_WORD); + if (bus_read_1(res, ADV_SIGNATURE_BYTE) == ADV_1000_ID1B) { + signature = bus_read_2(res, ADV_SIGNATURE_WORD); if ((signature == ADV_1000_ID0W) || (signature == ADV_1000_ID0W_FIX)) return (1); @@ -594,8 +598,8 @@ adv_init_lram_and_mcode(struct adv_softc retval = adv_load_microcode(adv, 0, (u_int16_t *)adv_mcode, adv_mcode_size); if (retval != adv_mcode_chksum) { - printf("adv%d: Microcode download failed checksum!\n", - adv->unit); + device_printf(adv->dev, + "Microcode download failed checksum!\n"); return (1); } @@ -692,6 +696,8 @@ adv_execute_scsi_queue(struct adv_softc u_int8_t sg_entry_cnt_minus_one; u_int8_t tid_no; + if (!dumping) + mtx_assert(&adv->lock, MA_OWNED); scsiq->q1.q_no = 0; retval = 1; /* Default to error case */ target_ix = scsiq->q2.target_ix; @@ -938,6 +944,8 @@ adv_isr_chip_halted(struct adv_softc *ad u_int8_t q_cntl; u_int8_t tid_no; + if (!dumping) + mtx_assert(&adv->lock, MA_OWNED); int_halt_code = adv_read_lram_16(adv, ADVV_HALTCODE_W); halt_qp = adv_read_lram_8(adv, ADVV_CURCDB_B); halt_q_addr = ADV_QNO_TO_QADDR(halt_qp); @@ -966,6 +974,7 @@ adv_isr_chip_halted(struct adv_softc *ad target_mask, tid_no); } else if (int_halt_code == ADV_HALT_CHK_CONDITION) { struct adv_target_transinfo* tinfo; + struct adv_ccb_info *cinfo; union ccb *ccb; u_int32_t cinfo_index; u_int8_t tag_code; @@ -1008,6 +1017,7 @@ adv_isr_chip_halted(struct adv_softc *ad */ cinfo_index = adv_read_lram_32(adv, halt_q_addr + ADV_SCSIQ_D_CINFO_IDX); + cinfo = &adv->ccb_infos[cinfo_index]; ccb = adv->ccb_infos[cinfo_index].ccb; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 21:48:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 55BE335E; Fri, 12 Oct 2012 21:48:22 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3EECD8FC18; Fri, 12 Oct 2012 21:48:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9CLmM8P081639; Fri, 12 Oct 2012 21:48:22 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9CLmLfh081636; Fri, 12 Oct 2012 21:48:21 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201210122148.q9CLmLfh081636@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 12 Oct 2012 21:48:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241493 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 21:48:22 -0000 Author: np Date: Fri Oct 12 21:48:21 2012 New Revision: 241493 URL: http://svn.freebsd.org/changeset/base/241493 Log: Use global knob in the TP_PARA_REG3 register to disable congestion drops if the user has chosen this behaviour. MFC after: 3 days Modified: head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Oct 12 21:31:44 2012 (r241492) +++ head/sys/dev/cxgbe/t4_main.c Fri Oct 12 21:48:21 2012 (r241493) @@ -527,10 +527,6 @@ t4_attach(device_t dev) t4_write_reg(sc, A_ULP_RX_TDDP_PSZ, V_HPZ0(0) | V_HPZ1(2) | V_HPZ2(4) | V_HPZ3(6)); t4_set_reg_field(sc, A_ULP_RX_CTL, F_TDDPTAGTCB, F_TDDPTAGTCB); - t4_set_reg_field(sc, A_TP_PARA_REG3, F_TUNNELCNGDROP0 | - F_TUNNELCNGDROP1 | F_TUNNELCNGDROP2 | F_TUNNELCNGDROP3, - F_TUNNELCNGDROP0 | F_TUNNELCNGDROP1 | F_TUNNELCNGDROP2 | - F_TUNNELCNGDROP3); t4_set_reg_field(sc, A_TP_PARA_REG5, V_INDICATESIZE(M_INDICATESIZE) | F_REARMDDPOFFSET | F_RESETDDPOFFSET, Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Fri Oct 12 21:31:44 2012 (r241492) +++ head/sys/dev/cxgbe/t4_sge.c Fri Oct 12 21:48:21 2012 (r241493) @@ -319,6 +319,12 @@ t4_sge_init(struct adapter *sc) t4_write_reg(sc, A_SGE_TIMER_VALUE_4_AND_5, V_TIMERVALUE4(us_to_core_ticks(sc, intr_timer[4])) | V_TIMERVALUE5(us_to_core_ticks(sc, intr_timer[5]))); + + if (cong_drop == 0) { + t4_set_reg_field(sc, A_TP_PARA_REG3, F_TUNNELCNGDROP0 | + F_TUNNELCNGDROP1 | F_TUNNELCNGDROP2 | + F_TUNNELCNGDROP3, 0); + } } v = t4_read_reg(sc, A_SGE_CONTROL); From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 21:58:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4931B7A8; Fri, 12 Oct 2012 21:58:22 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 323478FC14; Fri, 12 Oct 2012 21:58:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9CLwMXZ083138; Fri, 12 Oct 2012 21:58:22 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9CLwMkx083136; Fri, 12 Oct 2012 21:58:22 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201210122158.q9CLwMkx083136@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 12 Oct 2012 21:58:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241494 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 21:58:22 -0000 Author: np Date: Fri Oct 12 21:58:21 2012 New Revision: 241494 URL: http://svn.freebsd.org/changeset/base/241494 Log: Temporary fix for kern/172364. PR: kern/172364 MFC after: 3 days Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Oct 12 21:48:21 2012 (r241493) +++ head/sys/dev/cxgbe/t4_main.c Fri Oct 12 21:58:21 2012 (r241494) @@ -2992,7 +2992,7 @@ cxgbe_vlan_config(void *arg, struct ifne { struct ifnet *vlan; - if (arg != ifp) + if (arg != ifp || ifp->if_type != IFT_ETHER) return; vlan = VLAN_DEVAT(ifp, vid); From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 22:06:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 131FDADC; Fri, 12 Oct 2012 22:06:07 +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 EF5398FC14; Fri, 12 Oct 2012 22:06:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9CM66f0084297; Fri, 12 Oct 2012 22:06:06 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9CM66aM084295; Fri, 12 Oct 2012 22:06:06 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210122206.q9CM66aM084295@svn.freebsd.org> From: Alexander Motin Date: Fri, 12 Oct 2012 22:06:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241495 - head/sys/dev/virtio/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 22:06:07 -0000 Author: mav Date: Fri Oct 12 22:06:06 2012 New Revision: 241495 URL: http://svn.freebsd.org/changeset/base/241495 Log: Fix build with PAE enabled. I doubt any code uses CAM_SCATTER_VALID or CAM_DATA_PHYS, or they ever correctly worked, but make this build at least. Modified: head/sys/dev/virtio/scsi/virtio_scsi.c Modified: head/sys/dev/virtio/scsi/virtio_scsi.c ============================================================================== --- head/sys/dev/virtio/scsi/virtio_scsi.c Fri Oct 12 21:58:21 2012 (r241494) +++ head/sys/dev/virtio/scsi/virtio_scsi.c Fri Oct 12 22:06:06 2012 (r241495) @@ -971,7 +971,8 @@ vtscsi_sg_append_scsi_buf(struct vtscsi_ csio->data_ptr, csio->dxfer_len); else error = sglist_append_phys(sg, - (vm_paddr_t) csio->data_ptr, csio->dxfer_len); + (vm_paddr_t)(vm_offset_t) csio->data_ptr, + csio->dxfer_len); } else { for (i = 0; i < csio->sglist_cnt && error == 0; i++) { @@ -979,7 +980,8 @@ vtscsi_sg_append_scsi_buf(struct vtscsi_ if ((ccbh->flags & CAM_SG_LIST_PHYS) == 0) error = sglist_append(sg, - (void *) dseg->ds_addr, dseg->ds_len); + (void *)(vm_offset_t) dseg->ds_addr, + dseg->ds_len); else error = sglist_append_phys(sg, (vm_paddr_t) dseg->ds_addr, dseg->ds_len); From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 22:08:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 757FECAC; Fri, 12 Oct 2012 22:08:47 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id D129C8FC0A; Fri, 12 Oct 2012 22:08:46 +0000 (UTC) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by alto.onthenet.com.au (Postfix) with ESMTPS id 943B511DD3; Sat, 13 Oct 2012 08:08:39 +1000 (EST) Received: from brycem-pc.hq.netapp.com (pos-ext.netapp.com [198.95.226.40]) by dommail.onthenet.com.au (MOS 4.2.4-GA) with ESMTP id BHB09255 (AUTH peterg@ptree32.com.au); Sat, 13 Oct 2012 08:08:37 +1000 Message-ID: <507894E1.1030802@freebsd.org> Date: Fri, 12 Oct 2012 16:08:33 -0600 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 MIME-Version: 1.0 To: Alexander Motin Subject: Re: svn commit: r241495 - head/sys/dev/virtio/scsi References: <201210122206.q9CM66aM084295@svn.freebsd.org> In-Reply-To: <201210122206.q9CM66aM084295@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Junkmail-Info: SPF_SOFTFAIL X-Junkmail-Status: score=6/51, host=dommail.onthenet.com.au Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 22:08:47 -0000 > Fix build with PAE enabled. I doubt any code uses CAM_SCATTER_VALID or > CAM_DATA_PHYS, or they ever correctly worked, but make this build at least. Doh, didn't test build with PAE - I will next time. Thanks for the fix ! later, Peter. From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 22:48:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 16BF3916; Fri, 12 Oct 2012 22:48:34 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F19728FC12; Fri, 12 Oct 2012 22:48:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9CMmXRf090089; Fri, 12 Oct 2012 22:48:33 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9CMmXHq090087; Fri, 12 Oct 2012 22:48:33 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <201210122248.q9CMmXHq090087@svn.freebsd.org> From: Nick Hibma Date: Fri, 12 Oct 2012 22:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241496 - head/usr.sbin/ppp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 22:48:34 -0000 Author: n_hibma Date: Fri Oct 12 22:48:33 2012 New Revision: 241496 URL: http://svn.freebsd.org/changeset/base/241496 Log: Some 3G modems return the wrong signature in echo packets and make it impossible to use LQR/ECHO. They return want_magic instead. With this change it is now possible to use enable lqr set lqrperiod 5 enable echo set echoperiod 5 in your ppp.conf file. MFC after: 3 days Modified: head/usr.sbin/ppp/lqr.c Modified: head/usr.sbin/ppp/lqr.c ============================================================================== --- head/usr.sbin/ppp/lqr.c Fri Oct 12 22:06:06 2012 (r241495) +++ head/usr.sbin/ppp/lqr.c Fri Oct 12 22:48:33 2012 (r241496) @@ -108,7 +108,8 @@ lqr_RecvEcho(struct fsm *fp, struct mbuf * die as a result. */ } - if (lqr.signature == SIGNATURE) { + if (lqr.signature == SIGNATURE + || lqr.signature == lcp->want_magic) { /* some implementations return the wrong magic */ /* careful not to update lqm.echo.seq_recv with older values */ if ((hdlc->lqm.echo.seq_recv > (u_int32_t)0 - 5 && lqr.sequence < 5) || (hdlc->lqm.echo.seq_recv <= (u_int32_t)0 - 5 && From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 23:26:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 39FA641C; Fri, 12 Oct 2012 23:26:01 +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 2120D8FC08; Fri, 12 Oct 2012 23:26:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9CNQ1Ru095254; Fri, 12 Oct 2012 23:26:01 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9CNQ0cD095249; Fri, 12 Oct 2012 23:26:01 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210122326.q9CNQ0cD095249@svn.freebsd.org> From: Alan Cox Date: Fri, 12 Oct 2012 23:26:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241498 - head/sys/i386/xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2012 23:26:01 -0000 Author: alc Date: Fri Oct 12 23:26:00 2012 New Revision: 241498 URL: http://svn.freebsd.org/changeset/base/241498 Log: Replace all uses of the vm page queues lock by a new R/W lock. Unfortunately, this lock cannot be defined as static under Xen because it is (ab)used to serialize queued page table changes. Tested by: sbruno Modified: head/sys/i386/xen/mp_machdep.c head/sys/i386/xen/pmap.c head/sys/i386/xen/xen_machdep.c Modified: head/sys/i386/xen/mp_machdep.c ============================================================================== --- head/sys/i386/xen/mp_machdep.c Fri Oct 12 23:12:19 2012 (r241497) +++ head/sys/i386/xen/mp_machdep.c Fri Oct 12 23:26:00 2012 (r241498) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -804,6 +805,7 @@ smp_trap_init(trap_info_t *trap_ctxt) } } +extern struct rwlock pvh_global_lock; extern int nkpt; static void cpu_initialize_context(unsigned int cpu) @@ -862,7 +864,7 @@ cpu_initialize_context(unsigned int cpu) xen_pgdpt_pin(VM_PAGE_TO_MACH(m[NPGPTD + 1])); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); for (i = 0; i < 4; i++) { int pdir = (PTDPTDI + i) / NPDEPG; int curoffset = (PTDPTDI + i) % NPDEPG; @@ -872,7 +874,7 @@ cpu_initialize_context(unsigned int cpu) ma[i]); } PT_UPDATES_FLUSH(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); memset(&ctxt, 0, sizeof(ctxt)); ctxt.flags = VGCF_IN_KERNEL; Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Fri Oct 12 23:12:19 2012 (r241497) +++ head/sys/i386/xen/pmap.c Fri Oct 12 23:26:00 2012 (r241498) @@ -111,6 +111,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -220,6 +221,13 @@ static SYSCTL_NODE(_vm, OID_AUTO, pmap, static int pat_works; /* Is page attribute table sane? */ /* + * This lock is defined as static in other pmap implementations. It cannot, + * however, be defined as static here, because it is (ab)used to serialize + * queued page table changes in other sources files. + */ +struct rwlock pvh_global_lock; + +/* * Data for the pv entry allocation mechanism */ static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); @@ -380,6 +388,12 @@ pmap_bootstrap(vm_paddr_t firstaddr) #endif CPU_FILL(&kernel_pmap->pm_active); /* don't allow deactivation */ TAILQ_INIT(&kernel_pmap->pm_pvchunk); + + /* + * Initialize the global pv list lock. + */ + rw_init_flags(&pvh_global_lock, "pmap pv global", RW_RECURSE); + LIST_INIT(&allpmaps); mtx_init(&allpmaps_lock, "allpmaps", NULL, MTX_SPIN); mtx_lock_spin(&allpmaps_lock); @@ -979,9 +993,9 @@ pmap_pte_release(pt_entry_t *pte) if ((pt_entry_t *)((vm_offset_t)pte & ~PAGE_MASK) == PADDR2) { CTR1(KTR_PMAP, "pmap_pte_release: pte=0x%jx", *PMAP2); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PT_SET_VA(PMAP2, 0, TRUE); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); mtx_unlock(&PMAP2mutex); } } @@ -1001,7 +1015,7 @@ invlcaddr(void *caddr) * scans are across different pmaps. It is very wasteful * to do an entire invltlb for checking a single mapping. * - * If the given pmap is not the current pmap, vm_page_queue_mtx + * If the given pmap is not the current pmap, pvh_global_lock * must be held and curthread pinned to a CPU. */ static pt_entry_t * @@ -1017,7 +1031,7 @@ pmap_pte_quick(pmap_t pmap, vm_offset_t /* are we current address space or kernel? */ if (pmap_is_current(pmap)) return (vtopte(va)); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); newpf = *pde & PG_FRAME; if ((*PMAP1 & PG_FRAME) != newpf) { @@ -1299,7 +1313,7 @@ pmap_qremove(vm_offset_t sva, int count) CTR2(KTR_PMAP, "pmap_qremove: sva=0x%x count=%d", sva, count); va = sva; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); critical_enter(); while (count-- > 0) { pmap_kremove(va); @@ -1308,7 +1322,7 @@ pmap_qremove(vm_offset_t sva, int count) PT_UPDATES_FLUSH(); pmap_invalidate_range(kernel_pmap, sva, va); critical_exit(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /*************************************************** @@ -1511,7 +1525,7 @@ pmap_pinit(pmap_t pmap) #ifdef PAE PT_SET_MA(pmap->pm_pdpt, *vtopte((vm_offset_t)pmap->pm_pdpt) & ~PG_RW); #endif - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); xen_flush_queue(); xen_pgdpt_pin(VM_PAGE_TO_MACH(ptdpg[NPGPTD])); for (i = 0; i < NPGPTD; i++) { @@ -1519,7 +1533,7 @@ pmap_pinit(pmap_t pmap) PT_SET_VA_MA(&pmap->pm_pdir[PTDPTDI + i], ma | PG_V | PG_A, FALSE); } xen_flush_queue(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); CPU_ZERO(&pmap->pm_active); TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); @@ -1551,9 +1565,9 @@ _pmap_allocpte(pmap_t pmap, u_int ptepin VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) { if (flags & M_WAITOK) { PMAP_UNLOCK(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); VM_WAIT; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); } @@ -1884,14 +1898,14 @@ pmap_growkernel(vm_offset_t addr) pmap_zero_page(nkpg); ptppaddr = VM_PAGE_TO_PHYS(nkpg); newpdir = (pd_entry_t) (ptppaddr | PG_V | PG_RW | PG_A | PG_M); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PD_SET_VA(kernel_pmap, (kernel_vm_end >> PDRSHIFT), newpdir, TRUE); mtx_lock_spin(&allpmaps_lock); LIST_FOREACH(pmap, &allpmaps, pm_list) PD_SET_VA(pmap, (kernel_vm_end >> PDRSHIFT), newpdir, TRUE); mtx_unlock_spin(&allpmaps_lock); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); kernel_vm_end = (kernel_vm_end + NBPDR) & ~PDRMASK; if (kernel_vm_end - 1 >= kernel_map->max_offset) { @@ -2094,7 +2108,7 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv struct pv_chunk *pc; int idx, field, bit; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); PV_STAT(pv_entry_frees++); PV_STAT(pv_entry_spare++); @@ -2154,7 +2168,7 @@ get_pv_entry(pmap_t pmap, boolean_t try) vm_page_t m; PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PV_STAT(pv_entry_allocs++); pv_entry_count++; if (pv_entry_count > pv_entry_high_water) @@ -2224,7 +2238,7 @@ pmap_pvh_remove(struct md_page *pvh, pma { pv_entry_t pv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { if (pmap == PV_PMAP(pv) && va == pv->pv_va) { TAILQ_REMOVE(&pvh->pv_list, pv, pv_list); @@ -2248,7 +2262,7 @@ static void pmap_remove_entry(pmap_t pmap, vm_page_t m, vm_offset_t va) { - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); pmap_pvh_free(&m->md, pmap, va); if (TAILQ_EMPTY(&m->md.pv_list)) vm_page_aflag_clear(m, PGA_WRITEABLE); @@ -2263,7 +2277,7 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm pv_entry_t pv; PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); if (pv_entry_count < pv_entry_high_water && (pv = get_pv_entry(pmap, TRUE)) != NULL) { pv->pv_va = va; @@ -2285,7 +2299,7 @@ pmap_remove_pte(pmap_t pmap, pt_entry_t CTR3(KTR_PMAP, "pmap_remove_pte: pmap=%p *ptq=0x%x va=0x%x", pmap, (u_long)*ptq, va); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); oldpte = *ptq; PT_SET_VA_MA(ptq, 0, TRUE); @@ -2322,7 +2336,7 @@ pmap_remove_page(pmap_t pmap, vm_offset_ CTR2(KTR_PMAP, "pmap_remove_page: pmap=%p va=0x%x", pmap, va); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); PMAP_LOCK_ASSERT(pmap, MA_OWNED); if ((pte = pmap_pte_quick(pmap, va)) == NULL || (*pte & PG_V) == 0) @@ -2360,7 +2374,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva anyvalid = 0; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); PMAP_LOCK(pmap); @@ -2437,7 +2451,7 @@ out: if (anyvalid) pmap_invalidate_all(pmap); sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); pmap_free_zero_pages(free); } @@ -2466,7 +2480,7 @@ pmap_remove_all(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_remove_all: page %p is not managed", m)); free = NULL; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { pmap = PV_PMAP(pv); @@ -2498,7 +2512,7 @@ pmap_remove_all(vm_page_t m) if (*PMAP1) PT_SET_MA(PADDR1, 0); sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); pmap_free_zero_pages(free); } @@ -2533,7 +2547,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sv anychanged = 0; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); PMAP_LOCK(pmap); for (; sva < eva; sva = pdnxt) { @@ -2617,7 +2631,7 @@ retry: if (anychanged) pmap_invalidate_all(pmap); sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -2658,7 +2672,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, mpte = NULL; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); sched_pin(); @@ -2831,7 +2845,7 @@ validate: if (*PMAP1) PT_SET_VA_MA(PMAP1, 0, TRUE); sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -2861,7 +2875,7 @@ pmap_enter_object(pmap_t pmap, vm_offset psize = atop(end - start); mpte = NULL; m = m_start; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { mpte = pmap_enter_quick_locked(&mclp, &count, pmap, start + ptoa(diff), m, @@ -2878,7 +2892,7 @@ pmap_enter_object(pmap_t pmap, vm_offset error = HYPERVISOR_multicall(mcl, count); KASSERT(error == 0, ("bad multicall %d", error)); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -2901,12 +2915,12 @@ pmap_enter_quick(pmap_t pmap, vm_offset_ CTR4(KTR_PMAP, "pmap_enter_quick: pmap=%p va=0x%x m=%p prot=0x%x", pmap, va, m, prot); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); (void)pmap_enter_quick_locked(&mclp, &count, pmap, va, m, prot, NULL); if (count) HYPERVISOR_multicall(&mcl, count); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -2952,7 +2966,7 @@ pmap_enter_quick_locked(multicall_entry_ KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || (m->oflags & VPO_UNMANAGED) != 0, ("pmap_enter_quick_locked: managed mapping within the clean submap")); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); /* @@ -3168,7 +3182,7 @@ pmap_change_wiring(pmap_t pmap, vm_offse { pt_entry_t *pte; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); pte = pmap_pte(pmap, va); @@ -3186,7 +3200,7 @@ pmap_change_wiring(pmap_t pmap, vm_offse */ pmap_pte_release(pte); PMAP_UNLOCK(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } @@ -3225,7 +3239,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm mtx_lock(&createdelete_lock); #endif - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); if (dst_pmap < src_pmap) { PMAP_LOCK(dst_pmap); PMAP_LOCK(src_pmap); @@ -3315,7 +3329,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm out: PT_UPDATES_FLUSH(); sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(src_pmap); PMAP_UNLOCK(dst_pmap); @@ -3451,7 +3465,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_page_exists_quick: page %p is not managed", m)); rv = FALSE; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { if (PV_PMAP(pv) == pmap) { rv = TRUE; @@ -3461,7 +3475,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p if (loops >= 16) break; } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -3482,7 +3496,7 @@ pmap_page_wired_mappings(vm_page_t m) count = 0; if ((m->oflags & VPO_UNMANAGED) != 0) return (count); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { pmap = PV_PMAP(pv); @@ -3493,7 +3507,7 @@ pmap_page_wired_mappings(vm_page_t m) PMAP_UNLOCK(pmap); } sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (count); } @@ -3535,7 +3549,7 @@ pmap_remove_pages(pmap_t pmap) printf("warning: pmap_remove_pages called with non-current pmap\n"); return; } - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); KASSERT(pmap_is_current(pmap), ("removing pages from non-current pmap")); PMAP_LOCK(pmap); sched_pin(); @@ -3615,7 +3629,7 @@ pmap_remove_pages(pmap_t pmap) sched_unpin(); pmap_invalidate_all(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); pmap_free_zero_pages(free); } @@ -3647,7 +3661,7 @@ pmap_is_modified(vm_page_t m) if ((m->oflags & VPO_BUSY) == 0 && (m->aflags & PGA_WRITEABLE) == 0) return (rv); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { pmap = PV_PMAP(pv); @@ -3661,7 +3675,7 @@ pmap_is_modified(vm_page_t m) if (*PMAP1) PT_SET_MA(PADDR1, 0); sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -3708,7 +3722,7 @@ pmap_is_referenced(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_is_referenced: page %p is not managed", m)); rv = FALSE; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { pmap = PV_PMAP(pv); @@ -3722,7 +3736,7 @@ pmap_is_referenced(vm_page_t m) if (*PMAP1) PT_SET_MA(PADDR1, 0); sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -3733,9 +3747,9 @@ pmap_map_readonly(pmap_t pmap, vm_offset for (i = 0; i < npages; i++) { pt_entry_t *pte; pte = pmap_pte(pmap, (vm_offset_t)(va + i*PAGE_SIZE)); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); pte_store(pte, xpmap_mtop(*pte & ~(PG_RW|PG_M))); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_MARK_PRIV(xpmap_mtop(*pte)); pmap_pte_release(pte); } @@ -3749,9 +3763,9 @@ pmap_map_readwrite(pmap_t pmap, vm_offse pt_entry_t *pte; pte = pmap_pte(pmap, (vm_offset_t)(va + i*PAGE_SIZE)); PMAP_MARK_UNPRIV(xpmap_mtop(*pte)); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); pte_store(pte, xpmap_mtop(*pte) | (PG_RW|PG_M)); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); pmap_pte_release(pte); } } @@ -3778,7 +3792,7 @@ pmap_remove_write(vm_page_t m) if ((m->oflags & VPO_BUSY) == 0 && (m->aflags & PGA_WRITEABLE) == 0) return; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { pmap = PV_PMAP(pv); @@ -3809,7 +3823,7 @@ retry: if (*PMAP1) PT_SET_MA(PADDR1, 0); sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* @@ -3834,7 +3848,7 @@ pmap_ts_referenced(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_ts_referenced: page %p is not managed", m)); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); if ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { pvf = pv; @@ -3859,7 +3873,7 @@ pmap_ts_referenced(vm_page_t m) if (*PMAP1) PT_SET_MA(PADDR1, 0); sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rtval); } @@ -3886,7 +3900,7 @@ pmap_clear_modify(vm_page_t m) */ if ((m->aflags & PGA_WRITEABLE) == 0) return; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { pmap = PV_PMAP(pv); @@ -3904,7 +3918,7 @@ pmap_clear_modify(vm_page_t m) PMAP_UNLOCK(pmap); } sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* @@ -3921,7 +3935,7 @@ pmap_clear_reference(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_clear_reference: page %p is not managed", m)); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { pmap = PV_PMAP(pv); @@ -3939,7 +3953,7 @@ pmap_clear_reference(vm_page_t m) PMAP_UNLOCK(pmap); } sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* Modified: head/sys/i386/xen/xen_machdep.c ============================================================================== --- head/sys/i386/xen/xen_machdep.c Fri Oct 12 23:12:19 2012 (r241497) +++ head/sys/i386/xen/xen_machdep.c Fri Oct 12 23:26:00 2012 (r241498) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -428,13 +429,15 @@ _xen_machphys_update(vm_paddr_t mfn, vm_ critical_exit(); } +extern struct rwlock pvh_global_lock; + void _xen_queue_pt_update(vm_paddr_t ptr, vm_paddr_t val, char *file, int line) { SET_VCPU(); if (__predict_true(gdtset)) - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); KASSERT((ptr & 7) == 0, ("misaligned update")); From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 03:56:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A3EF35EA; Sat, 13 Oct 2012 03:56:34 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82AC28FC08; Sat, 13 Oct 2012 03:56:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9D3uYdl033830; Sat, 13 Oct 2012 03:56:34 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9D3uY9Y033828; Sat, 13 Oct 2012 03:56:34 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201210130356.q9D3uY9Y033828@svn.freebsd.org> From: Devin Teske Date: Sat, 13 Oct 2012 03:56:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241499 - head/usr.sbin/bsdconfig/dot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 03:56:34 -0000 Author: dteske Date: Sat Oct 13 03:56:33 2012 New Revision: 241499 URL: http://svn.freebsd.org/changeset/base/241499 Log: SVN r240684 broke the ability of the dot module to map include dependencies. Teach the dot module about the new location these includes moved to (as part of r240684) and clean things up a bit. Reviewed by: adrian (co-mentor) Approved by: adrian (co-mentor) Modified: head/usr.sbin/bsdconfig/dot/dot Modified: head/usr.sbin/bsdconfig/dot/dot ============================================================================== --- head/usr.sbin/bsdconfig/dot/dot Fri Oct 12 23:26:00 2012 (r241498) +++ head/usr.sbin/bsdconfig/dot/dot Sat Oct 13 03:56:33 2012 (r241499) @@ -229,6 +229,11 @@ done # [Optionally] Calculate list of include files # if [ "$SHOW_INCLUDES" ]; then + print_includes_awk=' + BEGIN { regex = "^f_include \\$BSDCFG_SHARE/" } + ( $0 ~ regex ) { sub(regex, ""); print } + ' # END-QUOTE + # # Build list of files in which to search for includes # @@ -249,17 +254,8 @@ if [ "$SHOW_INCLUDES" ]; then include_file_list= for file in $file_list; do include_file_list="$include_file_list $( - awk -v file="$file" -v item="${file%%/*}" ' - BEGIN { regex = "^f_include \\$BSDCFG_LIBE/" } - ( $0 ~ regex "include/" ) { - sub(regex, "") - print - } - ( $0 ~ regex "\\$APP_DIR/include/" ) { - sub(regex "\\$APP_DIR", item) - print - } - ' $file + awk -v file="$file" -v item="${file%%/*}" \ + "$print_includes_awk" $file )" done @@ -277,17 +273,8 @@ if [ "$SHOW_INCLUDES" ]; then # for file in $include_file_list; do include_file_list="$include_file_list $( - awk -v file="$file" -v item="${file%%/*}" ' - BEGIN { regex = "^f_include \\$BSDCFG_LIBE/" } - ( $0 ~ regex "include/" ) { - sub(regex, "") - print - } - ( $0 ~ regex "\\$APP_DIR/include/" ) { - sub(regex "\\$APP_DIR", item) - print - } - ' $file + awk -v file="$file" -v item="${file%%/*}" \ + "$print_includes_awk" $BSDCFG_SHARE/$file )" done @@ -431,7 +418,7 @@ if [ "$SHOW_INCLUDES" ]; then printf '\t\tconstraint = false;\n' for include_file in $include_file_list; do print_node "$include_file" \ - "label = \"${include_file#*include/}\"" + "label = \"${include_file##*/}\"" done end_nodelist fi @@ -444,6 +431,7 @@ if [ "$SHOW_INCLUDES" ]; then shape=oval color=black fillcolor=white style=filled edge_color=grey begin_nodelist "$shape" "$color" "$fillcolor" "$style" print_node edge "style = dashed" "color = $edge_color" + print_node edge "label = \"\\T\"" "fontsize = 9" file_list=$( for file in \ $BSDCONFIG \ @@ -452,6 +440,8 @@ if [ "$SHOW_INCLUDES" ]; then $cmd_program_list \ $include_file_list \ ; do + [ -f "$BSDCFG_SHARE/$file" ] && + echo $BSDCFG_SHARE/$file [ -e "$file" ] && echo $file done | sort -u ) @@ -460,31 +450,17 @@ if [ "$SHOW_INCLUDES" ]; then grep -qlI f_include $file || continue awk \ - -v file="$file" \ - -v item="${file%%/*}" \ + -v file="${file#$BSDCFG_SHARE/}" \ -v bsdconfig="$BSDCONFIG" \ ' - BEGIN { regex = "^f_include \\$BSDCFG_LIBE/" } - ( $0 ~ regex "include/" ) { + BEGIN { regex = "^f_include \\$BSDCFG_SHARE/" } + ( $0 ~ regex ) { sub(regex, "") if ( file == bsdconfig ) sub(".*/", "", file) printf "\t\t\"%s\" -> \"%s\";\n", $0, file } - ( $0 ~ regex "\\$APP_DIR/include/" ) { - sub(regex "\\$APP_DIR", item) - if ( file == bsdconfig ) sub(".*/", "", file) - printf "\t\t\"%s\" -> \"%s\";\n", $0, file - } ' $file - done | sort | awk ' - BEGIN { found = 0 } - { - # If already found or no-match... just spew - if ( found ) { print; next } - if ( $0 !~ /^[[:space:]]*"include\// ) { print; next } - printf "\t\tedge [ label = \"\\T\", fontsize = 9 ];\n" - print; found = 1 - }' + done | sort end_nodelist fi @@ -554,14 +530,58 @@ printf '\t\tlabel = "bsdconfig(8)";\n' printf '\t\ttooltip = "bsdconfig(8)";\n' print_node "bsdconfig" if [ "$SHOW_INCLUDES" ]; then - printf '\t\tsubgraph "cluster_bsdconfig_includes" {\n' + printf '\t\tsubgraph "cluster_includes" {\n' printf '\t\t\tbgcolor = "%s";\n' "$bgcolor_includes" printf '\t\t\tlabel = "%s";\n' "$msg_includes" + for include_file in $include_file_list; do - case "$include_file" in - include/*) printf '\t\t\t"%s";\n' "$include_file";; - esac - done + echo $include_file + done | awk -v bgcolor="$bgcolor_bsdconfig" ' + BEGIN { created = 0 } + function end_subgraph() { printf "\t\t\t};\n" } + ( $0 !~ "/" ) { + if ( ! created ) + { + printf "\t\t\tsubgraph \"%s\" {\n", + "cluster_bsdconfig_includes" + printf "\t\t\t\tbgcolor = \"%s\";\n", bgcolor + printf "\t\t\t\tlabel = \"bsdconfig\";\n" + created++ + } + printf "\t\t\t\t\"%s\";\n", $1 + } + END { created && end_subgraph() }' + + for include_file in $include_file_list; do + echo $include_file + done | awk ' + BEGIN { created = 0 } + function end_subgraph() { printf "\t\t\t};\n" } + ( $0 ~ "/" ) { + include_dir_tmp = $1 + sub("/[^/]*$", "", include_dir_tmp) + gsub(/[^[:alnum:]_]/, "_", include_dir_tmp) + + if ( created && include_dir != include_dir_tmp ) + { + end_subgraph() + created = 0 + } + + if ( ! created ) + { + include_dir = include_dir_tmp + printf "\t\t\tsubgraph \"cluster_%s_includes\" {\n", + include_dir + printf "\t\t\t\tbgcolor = \"white\";\n" + printf "\t\t\t\tlabel = \"%s\";\n", include_dir + created++ + } + + printf "\t\t\t\t\"%s\";\n", $1 + } + END { created && end_subgraph() }' + printf '\t\t};\n' fi end_nodelist From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 06:27:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 29B23C50; Sat, 13 Oct 2012 06:27:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1200F8FC08; Sat, 13 Oct 2012 06:27:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9D6RY90054559; Sat, 13 Oct 2012 06:27:34 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9D6RYgB054557; Sat, 13 Oct 2012 06:27:34 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210130627.q9D6RYgB054557@svn.freebsd.org> From: Adrian Chadd Date: Sat, 13 Oct 2012 06:27:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241500 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 06:27:35 -0000 Author: adrian Date: Sat Oct 13 06:27:34 2012 New Revision: 241500 URL: http://svn.freebsd.org/changeset/base/241500 Log: Fix the non-TDMA build. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Sat Oct 13 03:56:33 2012 (r241499) +++ head/sys/dev/ath/if_ath_tx.c Sat Oct 13 06:27:34 2012 (r241500) @@ -809,12 +809,11 @@ ath_tx_handoff_hw(struct ath_softc *sc, } #else ATH_TXQ_INSERT_TAIL(txq, bf, bf_list); - ATH_KTR(sc, ATH_KTR_TX, 4, - "ath_tx_handoff: non-tdma: txq=%u, add bf=%p, qbusy=%d, " + ATH_KTR(sc, ATH_KTR_TX, 3, + "ath_tx_handoff: non-tdma: txq=%u, add bf=%p " "depth=%d", txq->axq_qnum, bf, - qbusy, txq->axq_depth); if (txq->axq_link == NULL) { ath_hal_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 09:25:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 62527E1D; Sat, 13 Oct 2012 09:25:30 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A5F58FC16; Sat, 13 Oct 2012 09:25:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9D9PUlG082988; Sat, 13 Oct 2012 09:25:30 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9D9PUWu082985; Sat, 13 Oct 2012 09:25:30 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201210130925.q9D9PUWu082985@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Sat, 13 Oct 2012 09:25:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241501 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 09:25:30 -0000 Author: melifaro Date: Sat Oct 13 09:25:29 2012 New Revision: 241501 URL: http://svn.freebsd.org/changeset/base/241501 Log: Add forgotten documentation for new NGM_NETFLOW_V9INFO message. Submitted by: Dmitry Luhtionov MFC with: r241446 Modified: head/share/man/man4/ng_netflow.4 Modified: head/share/man/man4/ng_netflow.4 ============================================================================== --- head/share/man/man4/ng_netflow.4 Sat Oct 13 06:27:34 2012 (r241500) +++ head/share/man/man4/ng_netflow.4 Sat Oct 13 09:25:29 2012 (r241501) @@ -257,6 +257,9 @@ not directly from See also .Sx BUGS section. +.It Dv NGM_NETFLOW_V9INFO +Returns some NetFlow v9 related values in a +.Vt "struct ng_netflow_v9info" . .El .Sh ASCII CONTROL MESSAGES Most binary control messages have an From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 09:31:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E6CD0FFC; Sat, 13 Oct 2012 09:31:01 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B4C098FC0A; Sat, 13 Oct 2012 09:31:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9D9V15q083830; Sat, 13 Oct 2012 09:31:01 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9D9V1AQ083827; Sat, 13 Oct 2012 09:31:01 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201210130931.q9D9V1AQ083827@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Sat, 13 Oct 2012 09:31:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241502 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 09:31:02 -0000 Author: melifaro Date: Sat Oct 13 09:31:01 2012 New Revision: 241502 URL: http://svn.freebsd.org/changeset/base/241502 Log: Cleanup documentation: cloning route support has been removed in r186119. MFC after: 2 weeks Modified: head/sys/netinet/in_rmx.c head/sys/netinet6/in6_rmx.c Modified: head/sys/netinet/in_rmx.c ============================================================================== --- head/sys/netinet/in_rmx.c Sat Oct 13 09:25:29 2012 (r241501) +++ head/sys/netinet/in_rmx.c Sat Oct 13 09:31:01 2012 (r241502) @@ -27,19 +27,6 @@ * SUCH DAMAGE. */ -/* - * This code does two things necessary for the enhanced TCP metrics to - * function in a useful manner: - * 1) It marks all non-host routes as `cloning', thus ensuring that - * every actual reference to such a route actually gets turned - * into a reference to a host route to the specific destination - * requested. - * 2) When such routes lose all their references, it arranges for them - * to be deleted in some random collection of circumstances, so that - * a large quantity of stale routing data is not kept in kernel memory - * indefinitely. See in_rtqtimo() below for the exact mechanism. - */ - #include __FBSDID("$FreeBSD$"); Modified: head/sys/netinet6/in6_rmx.c ============================================================================== --- head/sys/netinet6/in6_rmx.c Sat Oct 13 09:25:29 2012 (r241501) +++ head/sys/netinet6/in6_rmx.c Sat Oct 13 09:31:01 2012 (r241502) @@ -59,19 +59,6 @@ * */ -/* - * This code does two things necessary for the enhanced TCP metrics to - * function in a useful manner: - * 1) It marks all non-host routes as `cloning', thus ensuring that - * every actual reference to such a route actually gets turned - * into a reference to a host route to the specific destination - * requested. - * 2) When such routes lose all their references, it arranges for them - * to be deleted in some random collection of circumstances, so that - * a large quantity of stale routing data is not kept in kernel memory - * indefinitely. See in6_rtqtimo() below for the exact mechanism. - */ - #include __FBSDID("$FreeBSD$"); From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 10:18:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 49AD7770; Sat, 13 Oct 2012 10:18: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 18F718FC14; Sat, 13 Oct 2012 10:18:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9DAIaL5091887; Sat, 13 Oct 2012 10:18:36 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9DAIarq091884; Sat, 13 Oct 2012 10:18:36 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210131018.q9DAIarq091884@svn.freebsd.org> From: Alexander Motin Date: Sat, 13 Oct 2012 10:18:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241503 - in head/sys/cam: . scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 10:18:37 -0000 Author: mav Date: Sat Oct 13 10:18:36 2012 New Revision: 241503 URL: http://svn.freebsd.org/changeset/base/241503 Log: XPT_DEV_MATCH is probably the only xpt_action() method that is called without holding SIM lock. It really doesn't need that lock, but adding it removes that specific exception, allowing to assert locking there later. Submitted by: ken@ (earlier version) Modified: head/sys/cam/cam_xpt.c head/sys/cam/scsi/scsi_enc_ses.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Sat Oct 13 09:31:01 2012 (r241502) +++ head/sys/cam/cam_xpt.c Sat Oct 13 10:18:36 2012 (r241503) @@ -582,7 +582,9 @@ xptioctl(struct cdev *dev, u_long cmd, c /* * This is an immediate CCB, we can send it on directly. */ + CAM_SIM_LOCK(xpt_path_sim(xpt_periph->path)); xpt_action(inccb); + CAM_SIM_UNLOCK(xpt_path_sim(xpt_periph->path)); /* * Map the buffers back into user space. @@ -2818,6 +2820,11 @@ xpt_action_default(union ccb *start_ccb) position_type = CAM_DEV_POS_PDRV; } + /* + * Note that we drop the SIM lock here, because the EDT + * traversal code needs to do its own locking. + */ + CAM_SIM_UNLOCK(xpt_path_sim(cdm->ccb_h.path)); switch(position_type & CAM_DEV_POS_TYPEMASK) { case CAM_DEV_POS_EDT: xptedtmatch(cdm); @@ -2829,6 +2836,7 @@ xpt_action_default(union ccb *start_ccb) cdm->status = CAM_DEV_MATCH_ERROR; break; } + CAM_SIM_LOCK(xpt_path_sim(cdm->ccb_h.path)); if (cdm->status == CAM_DEV_MATCH_ERROR) start_ccb->ccb_h.status = CAM_REQ_CMP_ERR; Modified: head/sys/cam/scsi/scsi_enc_ses.c ============================================================================== --- head/sys/cam/scsi/scsi_enc_ses.c Sat Oct 13 09:31:01 2012 (r241502) +++ head/sys/cam/scsi/scsi_enc_ses.c Sat Oct 13 10:18:36 2012 (r241503) @@ -899,9 +899,10 @@ ses_path_iter_devid_callback(enc_softc_t device_pattern->data.devid_pat.id_len); memset(&cdm, 0, sizeof(cdm)); - if (xpt_create_path(&cdm.ccb_h.path, /*periph*/NULL, CAM_XPT_PATH_ID, - CAM_TARGET_WILDCARD, - CAM_LUN_WILDCARD) != CAM_REQ_CMP) + if (xpt_create_path_unlocked(&cdm.ccb_h.path, /*periph*/NULL, + CAM_XPT_PATH_ID, + CAM_TARGET_WILDCARD, + CAM_LUN_WILDCARD) != CAM_REQ_CMP) return; cdm.ccb_h.func_code = XPT_DEV_MATCH; @@ -911,8 +912,11 @@ ses_path_iter_devid_callback(enc_softc_t cdm.match_buf_len = sizeof(match_result); cdm.matches = &match_result; + sim = xpt_path_sim(cdm.ccb_h.path); + CAM_SIM_LOCK(sim); xpt_action((union ccb *)&cdm); xpt_free_path(cdm.ccb_h.path); + CAM_SIM_UNLOCK(sim); if ((cdm.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP || (cdm.status != CAM_DEV_MATCH_LAST From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 11:23:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5DD88725; Sat, 13 Oct 2012 11:23:17 +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 2D59B8FC0C; Sat, 13 Oct 2012 11:23:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9DBNHGA001656; Sat, 13 Oct 2012 11:23:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9DBNGjK001654; Sat, 13 Oct 2012 11:23:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210131123.q9DBNGjK001654@svn.freebsd.org> From: Alexander Motin Date: Sat, 13 Oct 2012 11:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241504 - head/sys/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 11:23:17 -0000 Author: mav Date: Sat Oct 13 11:23:16 2012 New Revision: 241504 URL: http://svn.freebsd.org/changeset/base/241504 Log: Fix XPT_DEBUG paths operations locking: - Extend the lock to cover xpt_path_release() for the new path. - While xpt_action() is called while holding right SIM lock for the new bus, the old path release may require different SIM lock. So we have to temporary drop the new lock and get the old one. Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Sat Oct 13 10:18:36 2012 (r241503) +++ head/sys/cam/cam_xpt.c Sat Oct 13 11:23:16 2012 (r241504) @@ -533,9 +533,9 @@ xptioctl(struct cdev *dev, u_long cmd, c xpt_merge_ccb(&ccb, inccb); ccb.ccb_h.cbfcnp = xptdone; xpt_action(&ccb); - CAM_SIM_UNLOCK(bus->sim); bcopy(&ccb, inccb, sizeof(union ccb)); xpt_free_path(ccb.ccb_h.path); + CAM_SIM_UNLOCK(bus->sim); break; } @@ -2989,34 +2989,42 @@ xpt_action_default(union ccb *start_ccb) break; } case XPT_DEBUG: { + struct cam_path *oldpath; + struct cam_sim *oldsim; + /* Check that all request bits are supported. */ if (start_ccb->cdbg.flags & ~(CAM_DEBUG_COMPILE)) { start_ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; break; } - cam_dflags = start_ccb->cdbg.flags; + cam_dflags = CAM_DEBUG_NONE; if (cam_dpath != NULL) { - xpt_free_path(cam_dpath); + /* To release the old path we must hold proper lock. */ + oldpath = cam_dpath; cam_dpath = NULL; + oldsim = xpt_path_sim(oldpath); + CAM_SIM_UNLOCK(xpt_path_sim(start_ccb->ccb_h.path)); + CAM_SIM_LOCK(oldsim); + xpt_free_path(oldpath); + CAM_SIM_UNLOCK(oldsim); + CAM_SIM_LOCK(xpt_path_sim(start_ccb->ccb_h.path)); } - if (cam_dflags != CAM_DEBUG_NONE) { + if (start_ccb->cdbg.flags != CAM_DEBUG_NONE) { if (xpt_create_path(&cam_dpath, xpt_periph, start_ccb->ccb_h.path_id, start_ccb->ccb_h.target_id, start_ccb->ccb_h.target_lun) != CAM_REQ_CMP) { start_ccb->ccb_h.status = CAM_RESRC_UNAVAIL; - cam_dflags = CAM_DEBUG_NONE; } else { + cam_dflags = start_ccb->cdbg.flags; start_ccb->ccb_h.status = CAM_REQ_CMP; xpt_print(cam_dpath, "debugging flags now %x\n", cam_dflags); } - } else { - cam_dpath = NULL; + } else start_ccb->ccb_h.status = CAM_REQ_CMP; - } break; } case XPT_FREEZE_QUEUE: From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 12:56:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6D84A5B4; Sat, 13 Oct 2012 12:56:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5504F8FC0A; Sat, 13 Oct 2012 12:56:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9DCu57i016872; Sat, 13 Oct 2012 12:56:05 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9DCu5og016869; Sat, 13 Oct 2012 12:56:05 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210131256.q9DCu5og016869@svn.freebsd.org> From: Dimitry Andric Date: Sat, 13 Oct 2012 12:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241505 - in stable/9/contrib/llvm/lib: Support Target/X86 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 12:56:05 -0000 Author: dim Date: Sat Oct 13 12:56:04 2012 New Revision: 241505 URL: http://svn.freebsd.org/changeset/base/241505 Log: MFC r241427: Pull in r163710 from upstream llvm trunk: Add support for AMD Geode. Modified: stable/9/contrib/llvm/lib/Support/Host.cpp stable/9/contrib/llvm/lib/Target/X86/X86.td Directory Properties: stable/9/contrib/llvm/ (props changed) Modified: stable/9/contrib/llvm/lib/Support/Host.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Support/Host.cpp Sat Oct 13 11:23:16 2012 (r241504) +++ stable/9/contrib/llvm/lib/Support/Host.cpp Sat Oct 13 12:56:04 2012 (r241505) @@ -284,6 +284,7 @@ std::string sys::getHostCPUName() { case 8: return "k6-2"; case 9: case 13: return "k6-3"; + case 10: return "geode"; default: return "pentium"; } case 6: Modified: stable/9/contrib/llvm/lib/Target/X86/X86.td ============================================================================== --- stable/9/contrib/llvm/lib/Target/X86/X86.td Sat Oct 13 11:23:16 2012 (r241504) +++ stable/9/contrib/llvm/lib/Target/X86/X86.td Sat Oct 13 12:56:04 2012 (r241505) @@ -227,6 +227,7 @@ def : Proc<"bdver2", [FeatureSS FeatureAES, FeatureCLMUL, FeatureXOP, FeatureF16C, FeatureLZCNT, FeaturePOPCNT, FeatureBMI]>; +def : Proc<"geode", [Feature3DNowA]>; def : Proc<"winchip-c6", [FeatureMMX]>; def : Proc<"winchip2", [Feature3DNow]>; From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 13:00:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1D486771; Sat, 13 Oct 2012 13:00:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 016FE8FC12; Sat, 13 Oct 2012 13:00:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9DD0php017765; Sat, 13 Oct 2012 13:00:51 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9DD0pDY017749; Sat, 13 Oct 2012 13:00:51 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210131300.q9DD0pDY017749@svn.freebsd.org> From: Dimitry Andric Date: Sat, 13 Oct 2012 13:00:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241506 - in stable/9/contrib/llvm: include/llvm/Support lib/CodeGen lib/Target/ARM/MCTargetDesc lib/Target/MBlaze/MCTargetDesc lib/Target/Mips/MCTargetDesc lib/Target/PowerPC/MCTargetD... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 13:00:52 -0000 Author: dim Date: Sat Oct 13 13:00:51 2012 New Revision: 241506 URL: http://svn.freebsd.org/changeset/base/241506 Log: MFC r241430: Pull in r164132 from upstream llvm trunk: When creating MCAsmBackend pass the CPU string as well. In X86AsmBackend store this and use it to not emit long nops when the CPU is geode which doesnt support them. Fixes PR11212. Pull in r164133 from upstream clang trunk: Follow up on llvm r164132. This should prevent illegal instructions when building world on Geode CPUs (e.g. Soekris). Modified: stable/9/contrib/llvm/include/llvm/Support/TargetRegistry.h stable/9/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.h stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h stable/9/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp stable/9/contrib/llvm/tools/llvm-mc/llvm-mc.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/9/contrib/llvm/include/llvm/Support/TargetRegistry.h ============================================================================== --- stable/9/contrib/llvm/include/llvm/Support/TargetRegistry.h Sat Oct 13 12:56:04 2012 (r241505) +++ stable/9/contrib/llvm/include/llvm/Support/TargetRegistry.h Sat Oct 13 13:00:51 2012 (r241506) @@ -93,7 +93,9 @@ namespace llvm { CodeGenOpt::Level OL); typedef AsmPrinter *(*AsmPrinterCtorTy)(TargetMachine &TM, MCStreamer &Streamer); - typedef MCAsmBackend *(*MCAsmBackendCtorTy)(const Target &T, StringRef TT); + typedef MCAsmBackend *(*MCAsmBackendCtorTy)(const Target &T, + StringRef TT, + StringRef CPU); typedef MCTargetAsmLexer *(*MCAsmLexerCtorTy)(const Target &T, const MCRegisterInfo &MRI, const MCAsmInfo &MAI); @@ -352,10 +354,10 @@ namespace llvm { /// /// \arg Triple - The target triple string. /// \arg Backend - The target independent assembler object. - MCAsmBackend *createMCAsmBackend(StringRef Triple) const { + MCAsmBackend *createMCAsmBackend(StringRef Triple, StringRef CPU) const { if (!MCAsmBackendCtorFn) return 0; - return MCAsmBackendCtorFn(*this, Triple); + return MCAsmBackendCtorFn(*this, Triple, CPU); } /// createMCAsmLexer - Create a target specific assembly lexer. @@ -1046,8 +1048,9 @@ namespace llvm { } private: - static MCAsmBackend *Allocator(const Target &T, StringRef Triple) { - return new MCAsmBackendImpl(T, Triple); + static MCAsmBackend *Allocator(const Target &T, StringRef Triple, + StringRef CPU) { + return new MCAsmBackendImpl(T, Triple, CPU); } }; Modified: stable/9/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp Sat Oct 13 12:56:04 2012 (r241505) +++ stable/9/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp Sat Oct 13 13:00:51 2012 (r241506) @@ -181,7 +181,7 @@ bool LLVMTargetMachine::addPassesToEmitF if (ShowMCEncoding) { const MCSubtargetInfo &STI = getSubtarget(); MCE = getTarget().createMCCodeEmitter(*getInstrInfo(), STI, *Context); - MAB = getTarget().createMCAsmBackend(getTargetTriple()); + MAB = getTarget().createMCAsmBackend(getTargetTriple(), TargetCPU); } MCStreamer *S = getTarget().createAsmStreamer(*Context, Out, @@ -200,7 +200,7 @@ bool LLVMTargetMachine::addPassesToEmitF // emission fails. MCCodeEmitter *MCE = getTarget().createMCCodeEmitter(*getInstrInfo(), STI, *Context); - MCAsmBackend *MAB = getTarget().createMCAsmBackend(getTargetTriple()); + MCAsmBackend *MAB = getTarget().createMCAsmBackend(getTargetTriple(), TargetCPU); if (MCE == 0 || MAB == 0) return true; @@ -274,7 +274,7 @@ bool LLVMTargetMachine::addPassesToEmitM const MCSubtargetInfo &STI = getSubtarget(); MCCodeEmitter *MCE = getTarget().createMCCodeEmitter(*getInstrInfo(),STI, *Ctx); - MCAsmBackend *MAB = getTarget().createMCAsmBackend(getTargetTriple()); + MCAsmBackend *MAB = getTarget().createMCAsmBackend(getTargetTriple(), TargetCPU); if (MCE == 0 || MAB == 0) return true; Modified: stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp Sat Oct 13 12:56:04 2012 (r241505) +++ stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp Sat Oct 13 13:00:51 2012 (r241506) @@ -629,7 +629,7 @@ void DarwinARMAsmBackend::applyFixup(con } // end anonymous namespace -MCAsmBackend *llvm::createARMAsmBackend(const Target &T, StringRef TT) { +MCAsmBackend *llvm::createARMAsmBackend(const Target &T, StringRef TT, StringRef CPU) { Triple TheTriple(TT); if (TheTriple.isOSDarwin()) { Modified: stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h Sat Oct 13 12:56:04 2012 (r241505) +++ stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h Sat Oct 13 13:00:51 2012 (r241506) @@ -44,7 +44,7 @@ MCCodeEmitter *createARMMCCodeEmitter(co const MCSubtargetInfo &STI, MCContext &Ctx); -MCAsmBackend *createARMAsmBackend(const Target &T, StringRef TT); +MCAsmBackend *createARMAsmBackend(const Target &T, StringRef TT, StringRef CPU); /// createARMELFObjectWriter - Construct an ELF Mach-O object writer. MCObjectWriter *createARMELFObjectWriter(raw_ostream &OS, Modified: stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp Sat Oct 13 12:56:04 2012 (r241505) +++ stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp Sat Oct 13 13:00:51 2012 (r241506) @@ -156,7 +156,8 @@ void ELFMBlazeAsmBackend::applyFixup(con } } // end anonymous namespace -MCAsmBackend *llvm::createMBlazeAsmBackend(const Target &T, StringRef TT) { +MCAsmBackend *llvm::createMBlazeAsmBackend(const Target &T, StringRef TT, + StringRef CPU) { Triple TheTriple(TT); if (TheTriple.isOSDarwin()) Modified: stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.h ============================================================================== --- stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.h Sat Oct 13 12:56:04 2012 (r241505) +++ stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.h Sat Oct 13 13:00:51 2012 (r241506) @@ -33,7 +33,8 @@ MCCodeEmitter *createMBlazeMCCodeEmitter const MCSubtargetInfo &STI, MCContext &Ctx); -MCAsmBackend *createMBlazeAsmBackend(const Target &T, StringRef TT); +MCAsmBackend *createMBlazeAsmBackend(const Target &T, StringRef TT, + StringRef CPU); MCObjectWriter *createMBlazeELFObjectWriter(raw_ostream &OS, uint8_t OSABI); } // End llvm namespace Modified: stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp Sat Oct 13 12:56:04 2012 (r241505) +++ stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp Sat Oct 13 13:00:51 2012 (r241506) @@ -213,22 +213,26 @@ public: } // namespace // MCAsmBackend -MCAsmBackend *llvm::createMipsAsmBackendEL32(const Target &T, StringRef TT) { +MCAsmBackend *llvm::createMipsAsmBackendEL32(const Target &T, StringRef TT, + StringRef CPU) { return new MipsAsmBackend(T, Triple(TT).getOS(), /*IsLittle*/true, /*Is64Bit*/false); } -MCAsmBackend *llvm::createMipsAsmBackendEB32(const Target &T, StringRef TT) { +MCAsmBackend *llvm::createMipsAsmBackendEB32(const Target &T, StringRef TT, + StringRef CPU) { return new MipsAsmBackend(T, Triple(TT).getOS(), /*IsLittle*/false, /*Is64Bit*/false); } -MCAsmBackend *llvm::createMipsAsmBackendEL64(const Target &T, StringRef TT) { +MCAsmBackend *llvm::createMipsAsmBackendEL64(const Target &T, StringRef TT, + StringRef CPU) { return new MipsAsmBackend(T, Triple(TT).getOS(), /*IsLittle*/true, /*Is64Bit*/true); } -MCAsmBackend *llvm::createMipsAsmBackendEB64(const Target &T, StringRef TT) { +MCAsmBackend *llvm::createMipsAsmBackendEB64(const Target &T, StringRef TT, + StringRef CPU) { return new MipsAsmBackend(T, Triple(TT).getOS(), /*IsLittle*/false, /*Is64Bit*/true); } Modified: stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h ============================================================================== --- stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h Sat Oct 13 12:56:04 2012 (r241505) +++ stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h Sat Oct 13 13:00:51 2012 (r241506) @@ -39,10 +39,14 @@ MCCodeEmitter *createMipsMCCodeEmitterEL const MCSubtargetInfo &STI, MCContext &Ctx); -MCAsmBackend *createMipsAsmBackendEB32(const Target &T, StringRef TT); -MCAsmBackend *createMipsAsmBackendEL32(const Target &T, StringRef TT); -MCAsmBackend *createMipsAsmBackendEB64(const Target &T, StringRef TT); -MCAsmBackend *createMipsAsmBackendEL64(const Target &T, StringRef TT); +MCAsmBackend *createMipsAsmBackendEB32(const Target &T, StringRef TT, + StringRef CPU); +MCAsmBackend *createMipsAsmBackendEL32(const Target &T, StringRef TT, + StringRef CPU); +MCAsmBackend *createMipsAsmBackendEB64(const Target &T, StringRef TT, + StringRef CPU); +MCAsmBackend *createMipsAsmBackendEL64(const Target &T, StringRef TT, + StringRef CPU); MCObjectWriter *createMipsELFObjectWriter(raw_ostream &OS, uint8_t OSABI, Modified: stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp Sat Oct 13 12:56:04 2012 (r241505) +++ stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp Sat Oct 13 13:00:51 2012 (r241506) @@ -181,7 +181,7 @@ namespace { -MCAsmBackend *llvm::createPPCAsmBackend(const Target &T, StringRef TT) { +MCAsmBackend *llvm::createPPCAsmBackend(const Target &T, StringRef TT, StringRef CPU) { if (Triple(TT).isOSDarwin()) return new DarwinPPCAsmBackend(T); Modified: stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h ============================================================================== --- stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h Sat Oct 13 12:56:04 2012 (r241505) +++ stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h Sat Oct 13 13:00:51 2012 (r241506) @@ -34,7 +34,7 @@ MCCodeEmitter *createPPCMCCodeEmitter(co const MCSubtargetInfo &STI, MCContext &Ctx); -MCAsmBackend *createPPCAsmBackend(const Target &T, StringRef TT); +MCAsmBackend *createPPCAsmBackend(const Target &T, StringRef TT, StringRef CPU); /// createPPCELFObjectWriter - Construct an PPC ELF object writer. MCObjectWriter *createPPCELFObjectWriter(raw_ostream &OS, Modified: stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp Sat Oct 13 12:56:04 2012 (r241505) +++ stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp Sat Oct 13 13:00:51 2012 (r241506) @@ -66,9 +66,10 @@ public: }; class X86AsmBackend : public MCAsmBackend { + StringRef CPU; public: - X86AsmBackend(const Target &T) - : MCAsmBackend() {} + X86AsmBackend(const Target &T, StringRef _CPU) + : MCAsmBackend(), CPU(_CPU) {} unsigned getNumFixupKinds() const { return X86::NumTargetFixupKinds; @@ -305,6 +306,13 @@ bool X86AsmBackend::writeNopData(uint64_ {0x66, 0x2e, 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00}, }; + // This CPU doesnt support long nops. If needed add more. + if (CPU == "geode") { + for (uint64_t i = 0; i < Count; ++i) + OW->Write8(0x90); + return true; + } + // Write an optimal sequence for the first 15 bytes. const uint64_t OptimalCount = (Count < 16) ? Count : 15; const uint64_t Prefixes = OptimalCount <= 10 ? 0 : OptimalCount - 10; @@ -327,8 +335,8 @@ namespace { class ELFX86AsmBackend : public X86AsmBackend { public: uint8_t OSABI; - ELFX86AsmBackend(const Target &T, uint8_t _OSABI) - : X86AsmBackend(T), OSABI(_OSABI) { + ELFX86AsmBackend(const Target &T, uint8_t _OSABI, StringRef CPU) + : X86AsmBackend(T, CPU), OSABI(_OSABI) { HasReliableSymbolDifference = true; } @@ -340,8 +348,8 @@ public: class ELFX86_32AsmBackend : public ELFX86AsmBackend { public: - ELFX86_32AsmBackend(const Target &T, uint8_t OSABI) - : ELFX86AsmBackend(T, OSABI) {} + ELFX86_32AsmBackend(const Target &T, uint8_t OSABI, StringRef CPU) + : ELFX86AsmBackend(T, OSABI, CPU) {} MCObjectWriter *createObjectWriter(raw_ostream &OS) const { return createX86ELFObjectWriter(OS, /*Is64Bit*/ false, OSABI); @@ -350,8 +358,8 @@ public: class ELFX86_64AsmBackend : public ELFX86AsmBackend { public: - ELFX86_64AsmBackend(const Target &T, uint8_t OSABI) - : ELFX86AsmBackend(T, OSABI) {} + ELFX86_64AsmBackend(const Target &T, uint8_t OSABI, StringRef CPU) + : ELFX86AsmBackend(T, OSABI, CPU) {} MCObjectWriter *createObjectWriter(raw_ostream &OS) const { return createX86ELFObjectWriter(OS, /*Is64Bit*/ true, OSABI); @@ -362,8 +370,8 @@ class WindowsX86AsmBackend : public X86A bool Is64Bit; public: - WindowsX86AsmBackend(const Target &T, bool is64Bit) - : X86AsmBackend(T) + WindowsX86AsmBackend(const Target &T, bool is64Bit, StringRef CPU) + : X86AsmBackend(T, CPU) , Is64Bit(is64Bit) { } @@ -374,14 +382,14 @@ public: class DarwinX86AsmBackend : public X86AsmBackend { public: - DarwinX86AsmBackend(const Target &T) - : X86AsmBackend(T) { } + DarwinX86AsmBackend(const Target &T, StringRef CPU) + : X86AsmBackend(T, CPU) { } }; class DarwinX86_32AsmBackend : public DarwinX86AsmBackend { public: - DarwinX86_32AsmBackend(const Target &T) - : DarwinX86AsmBackend(T) {} + DarwinX86_32AsmBackend(const Target &T, StringRef CPU) + : DarwinX86AsmBackend(T, CPU) {} MCObjectWriter *createObjectWriter(raw_ostream &OS) const { return createX86MachObjectWriter(OS, /*Is64Bit=*/false, @@ -392,8 +400,8 @@ public: class DarwinX86_64AsmBackend : public DarwinX86AsmBackend { public: - DarwinX86_64AsmBackend(const Target &T) - : DarwinX86AsmBackend(T) { + DarwinX86_64AsmBackend(const Target &T, StringRef CPU) + : DarwinX86AsmBackend(T, CPU) { HasReliableSymbolDifference = true; } @@ -439,28 +447,28 @@ public: } // end anonymous namespace -MCAsmBackend *llvm::createX86_32AsmBackend(const Target &T, StringRef TT) { +MCAsmBackend *llvm::createX86_32AsmBackend(const Target &T, StringRef TT, StringRef CPU) { Triple TheTriple(TT); if (TheTriple.isOSDarwin() || TheTriple.getEnvironment() == Triple::MachO) - return new DarwinX86_32AsmBackend(T); + return new DarwinX86_32AsmBackend(T, CPU); if (TheTriple.isOSWindows()) - return new WindowsX86AsmBackend(T, false); + return new WindowsX86AsmBackend(T, false, CPU); uint8_t OSABI = MCELFObjectTargetWriter::getOSABI(TheTriple.getOS()); - return new ELFX86_32AsmBackend(T, OSABI); + return new ELFX86_32AsmBackend(T, OSABI, CPU); } -MCAsmBackend *llvm::createX86_64AsmBackend(const Target &T, StringRef TT) { +MCAsmBackend *llvm::createX86_64AsmBackend(const Target &T, StringRef TT, StringRef CPU) { Triple TheTriple(TT); if (TheTriple.isOSDarwin() || TheTriple.getEnvironment() == Triple::MachO) - return new DarwinX86_64AsmBackend(T); + return new DarwinX86_64AsmBackend(T, CPU); if (TheTriple.isOSWindows()) - return new WindowsX86AsmBackend(T, true); + return new WindowsX86AsmBackend(T, true, CPU); uint8_t OSABI = MCELFObjectTargetWriter::getOSABI(TheTriple.getOS()); - return new ELFX86_64AsmBackend(T, OSABI); + return new ELFX86_64AsmBackend(T, OSABI, CPU); } Modified: stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h ============================================================================== --- stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h Sat Oct 13 12:56:04 2012 (r241505) +++ stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h Sat Oct 13 13:00:51 2012 (r241506) @@ -79,8 +79,8 @@ MCCodeEmitter *createX86MCCodeEmitter(co const MCSubtargetInfo &STI, MCContext &Ctx); -MCAsmBackend *createX86_32AsmBackend(const Target &T, StringRef TT); -MCAsmBackend *createX86_64AsmBackend(const Target &T, StringRef TT); +MCAsmBackend *createX86_32AsmBackend(const Target &T, StringRef TT, StringRef CPU); +MCAsmBackend *createX86_64AsmBackend(const Target &T, StringRef TT, StringRef CPU); /// createX86MachObjectWriter - Construct an X86 Mach-O object writer. MCObjectWriter *createX86MachObjectWriter(raw_ostream &OS, Modified: stable/9/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp Sat Oct 13 12:56:04 2012 (r241505) +++ stable/9/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp Sat Oct 13 13:00:51 2012 (r241506) @@ -329,7 +329,7 @@ static bool ExecuteAssembler(AssemblerIn MCAsmBackend *MAB = 0; if (Opts.ShowEncoding) { CE = TheTarget->createMCCodeEmitter(*MCII, *STI, Ctx); - MAB = TheTarget->createMCAsmBackend(Opts.Triple); + MAB = TheTarget->createMCAsmBackend(Opts.Triple, Opts.CPU); } Str.reset(TheTarget->createAsmStreamer(Ctx, *Out, /*asmverbose*/true, /*useLoc*/ true, @@ -343,7 +343,7 @@ static bool ExecuteAssembler(AssemblerIn assert(Opts.OutputType == AssemblerInvocation::FT_Obj && "Invalid file type!"); MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *STI, Ctx); - MCAsmBackend *MAB = TheTarget->createMCAsmBackend(Opts.Triple); + MCAsmBackend *MAB = TheTarget->createMCAsmBackend(Opts.Triple, Opts.CPU); Str.reset(TheTarget->createMCObjectStreamer(Opts.Triple, Ctx, *MAB, *Out, CE, Opts.RelaxAll, Opts.NoExecStack)); Modified: stable/9/contrib/llvm/tools/llvm-mc/llvm-mc.cpp ============================================================================== --- stable/9/contrib/llvm/tools/llvm-mc/llvm-mc.cpp Sat Oct 13 12:56:04 2012 (r241505) +++ stable/9/contrib/llvm/tools/llvm-mc/llvm-mc.cpp Sat Oct 13 13:00:51 2012 (r241506) @@ -431,7 +431,7 @@ int main(int argc, char **argv) { MCAsmBackend *MAB = 0; if (ShowEncoding) { CE = TheTarget->createMCCodeEmitter(*MCII, *STI, Ctx); - MAB = TheTarget->createMCAsmBackend(TripleName); + MAB = TheTarget->createMCAsmBackend(TripleName, MCPU); } Str.reset(TheTarget->createAsmStreamer(Ctx, FOS, /*asmverbose*/true, /*useLoc*/ true, @@ -444,7 +444,7 @@ int main(int argc, char **argv) { } else { assert(FileType == OFT_ObjectFile && "Invalid file type!"); MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *STI, Ctx); - MCAsmBackend *MAB = TheTarget->createMCAsmBackend(TripleName); + MCAsmBackend *MAB = TheTarget->createMCAsmBackend(TripleName, MCPU); Str.reset(TheTarget->createMCObjectStreamer(TripleName, Ctx, *MAB, FOS, CE, RelaxAll, NoExecStack)); From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 13:54:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F8C2934; Sat, 13 Oct 2012 13:54:49 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id E063C8FC0A; Sat, 13 Oct 2012 13:54:48 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 142ABED2; Sat, 13 Oct 2012 15:53:28 +0200 (CEST) Date: Sat, 13 Oct 2012 15:55:18 +0200 From: Pawel Jakub Dawidek To: Alan Cox Subject: Re: svn commit: r241498 - head/sys/i386/xen Message-ID: <20121013135518.GC1383@garage.freebsd.pl> References: <201210122326.q9CNQ0cD095249@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GPJrCs/72TxItFYR" Content-Disposition: inline In-Reply-To: <201210122326.q9CNQ0cD095249@svn.freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 13:54:49 -0000 --GPJrCs/72TxItFYR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 12, 2012 at 11:26:00PM +0000, Alan Cox wrote: > Author: alc > Date: Fri Oct 12 23:26:00 2012 > New Revision: 241498 > URL: http://svn.freebsd.org/changeset/base/241498 >=20 > Log: > Replace all uses of the vm page queues lock by a new R/W lock. > Unfortunately, this lock cannot be defined as static under Xen because = it > is (ab)used to serialize queued page table changes. I couldn't help but notice that this lock is always write-locked, but I guess this is going to change at some point? > Tested by: sbruno >=20 > Modified: > head/sys/i386/xen/mp_machdep.c > head/sys/i386/xen/pmap.c > head/sys/i386/xen/xen_machdep.c >=20 > Modified: head/sys/i386/xen/mp_machdep.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/i386/xen/mp_machdep.c Fri Oct 12 23:12:19 2012 (r241497) > +++ head/sys/i386/xen/mp_machdep.c Fri Oct 12 23:26:00 2012 (r241498) > @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -804,6 +805,7 @@ smp_trap_init(trap_info_t *trap_ctxt) > } > } > =20 > +extern struct rwlock pvh_global_lock; > extern int nkpt; > static void > cpu_initialize_context(unsigned int cpu) > @@ -862,7 +864,7 @@ cpu_initialize_context(unsigned int cpu) > =20 > =20 > xen_pgdpt_pin(VM_PAGE_TO_MACH(m[NPGPTD + 1])); > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > for (i =3D 0; i < 4; i++) { > int pdir =3D (PTDPTDI + i) / NPDEPG; > int curoffset =3D (PTDPTDI + i) % NPDEPG; > @@ -872,7 +874,7 @@ cpu_initialize_context(unsigned int cpu) > ma[i]); > } > PT_UPDATES_FLUSH(); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > =09 > memset(&ctxt, 0, sizeof(ctxt)); > ctxt.flags =3D VGCF_IN_KERNEL; >=20 > Modified: head/sys/i386/xen/pmap.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/i386/xen/pmap.c Fri Oct 12 23:12:19 2012 (r241497) > +++ head/sys/i386/xen/pmap.c Fri Oct 12 23:26:00 2012 (r241498) > @@ -111,6 +111,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -220,6 +221,13 @@ static SYSCTL_NODE(_vm, OID_AUTO, pmap,=20 > static int pat_works; /* Is page attribute table sane? */ > =20 > /* > + * This lock is defined as static in other pmap implementations. It can= not, > + * however, be defined as static here, because it is (ab)used to seriali= ze > + * queued page table changes in other sources files. > + */ > +struct rwlock pvh_global_lock; > + > +/* > * Data for the pv entry allocation mechanism > */ > static TAILQ_HEAD(pch, pv_chunk) pv_chunks =3D TAILQ_HEAD_INITIALIZER(pv= _chunks); > @@ -380,6 +388,12 @@ pmap_bootstrap(vm_paddr_t firstaddr) > #endif > CPU_FILL(&kernel_pmap->pm_active); /* don't allow deactivation */ > TAILQ_INIT(&kernel_pmap->pm_pvchunk); > + > + /* > + * Initialize the global pv list lock. > + */ > + rw_init_flags(&pvh_global_lock, "pmap pv global", RW_RECURSE); > + > LIST_INIT(&allpmaps); > mtx_init(&allpmaps_lock, "allpmaps", NULL, MTX_SPIN); > mtx_lock_spin(&allpmaps_lock); > @@ -979,9 +993,9 @@ pmap_pte_release(pt_entry_t *pte) > if ((pt_entry_t *)((vm_offset_t)pte & ~PAGE_MASK) =3D=3D PADDR2) { > CTR1(KTR_PMAP, "pmap_pte_release: pte=3D0x%jx", > *PMAP2); > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > PT_SET_VA(PMAP2, 0, TRUE); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > mtx_unlock(&PMAP2mutex); > } > } > @@ -1001,7 +1015,7 @@ invlcaddr(void *caddr) > * scans are across different pmaps. It is very wasteful > * to do an entire invltlb for checking a single mapping. > * > - * If the given pmap is not the current pmap, vm_page_queue_mtx > + * If the given pmap is not the current pmap, pvh_global_lock > * must be held and curthread pinned to a CPU. > */ > static pt_entry_t * > @@ -1017,7 +1031,7 @@ pmap_pte_quick(pmap_t pmap, vm_offset_t=20 > /* are we current address space or kernel? */ > if (pmap_is_current(pmap)) > return (vtopte(va)); > - mtx_assert(&vm_page_queue_mtx, MA_OWNED); > + rw_assert(&pvh_global_lock, RA_WLOCKED); > KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); > newpf =3D *pde & PG_FRAME; > if ((*PMAP1 & PG_FRAME) !=3D newpf) { > @@ -1299,7 +1313,7 @@ pmap_qremove(vm_offset_t sva, int count) > =20 > CTR2(KTR_PMAP, "pmap_qremove: sva=3D0x%x count=3D%d", sva, count); > va =3D sva; > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > critical_enter(); > while (count-- > 0) { > pmap_kremove(va); > @@ -1308,7 +1322,7 @@ pmap_qremove(vm_offset_t sva, int count) > PT_UPDATES_FLUSH(); > pmap_invalidate_range(kernel_pmap, sva, va); > critical_exit(); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > } > =20 > /*************************************************** > @@ -1511,7 +1525,7 @@ pmap_pinit(pmap_t pmap) > #ifdef PAE=09 > PT_SET_MA(pmap->pm_pdpt, *vtopte((vm_offset_t)pmap->pm_pdpt) & ~PG_RW); > #endif > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > xen_flush_queue(); > xen_pgdpt_pin(VM_PAGE_TO_MACH(ptdpg[NPGPTD])); > for (i =3D 0; i < NPGPTD; i++) { > @@ -1519,7 +1533,7 @@ pmap_pinit(pmap_t pmap) > PT_SET_VA_MA(&pmap->pm_pdir[PTDPTDI + i], ma | PG_V | PG_A, FALSE); > } > xen_flush_queue(); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > CPU_ZERO(&pmap->pm_active); > TAILQ_INIT(&pmap->pm_pvchunk); > bzero(&pmap->pm_stats, sizeof pmap->pm_stats); > @@ -1551,9 +1565,9 @@ _pmap_allocpte(pmap_t pmap, u_int ptepin > VM_ALLOC_WIRED | VM_ALLOC_ZERO)) =3D=3D NULL) { > if (flags & M_WAITOK) { > PMAP_UNLOCK(pmap); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > VM_WAIT; > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > PMAP_LOCK(pmap); > } > =20 > @@ -1884,14 +1898,14 @@ pmap_growkernel(vm_offset_t addr) > pmap_zero_page(nkpg); > ptppaddr =3D VM_PAGE_TO_PHYS(nkpg); > newpdir =3D (pd_entry_t) (ptppaddr | PG_V | PG_RW | PG_A | PG_M); > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > PD_SET_VA(kernel_pmap, (kernel_vm_end >> PDRSHIFT), newpdir, TRUE); > mtx_lock_spin(&allpmaps_lock); > LIST_FOREACH(pmap, &allpmaps, pm_list) > PD_SET_VA(pmap, (kernel_vm_end >> PDRSHIFT), newpdir, TRUE); > =20 > mtx_unlock_spin(&allpmaps_lock); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > =20 > kernel_vm_end =3D (kernel_vm_end + NBPDR) & ~PDRMASK; > if (kernel_vm_end - 1 >=3D kernel_map->max_offset) { > @@ -2094,7 +2108,7 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv > struct pv_chunk *pc; > int idx, field, bit; > =20 > - mtx_assert(&vm_page_queue_mtx, MA_OWNED); > + rw_assert(&pvh_global_lock, RA_WLOCKED); > PMAP_LOCK_ASSERT(pmap, MA_OWNED); > PV_STAT(pv_entry_frees++); > PV_STAT(pv_entry_spare++); > @@ -2154,7 +2168,7 @@ get_pv_entry(pmap_t pmap, boolean_t try) > vm_page_t m; > =20 > PMAP_LOCK_ASSERT(pmap, MA_OWNED); > - mtx_assert(&vm_page_queue_mtx, MA_OWNED); > + rw_assert(&pvh_global_lock, RA_WLOCKED); > PV_STAT(pv_entry_allocs++); > pv_entry_count++; > if (pv_entry_count > pv_entry_high_water) > @@ -2224,7 +2238,7 @@ pmap_pvh_remove(struct md_page *pvh, pma > { > pv_entry_t pv; > =20 > - mtx_assert(&vm_page_queue_mtx, MA_OWNED); > + rw_assert(&pvh_global_lock, RA_WLOCKED); > TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { > if (pmap =3D=3D PV_PMAP(pv) && va =3D=3D pv->pv_va) { > TAILQ_REMOVE(&pvh->pv_list, pv, pv_list); > @@ -2248,7 +2262,7 @@ static void > pmap_remove_entry(pmap_t pmap, vm_page_t m, vm_offset_t va) > { > =20 > - mtx_assert(&vm_page_queue_mtx, MA_OWNED); > + rw_assert(&pvh_global_lock, RA_WLOCKED); > pmap_pvh_free(&m->md, pmap, va); > if (TAILQ_EMPTY(&m->md.pv_list)) > vm_page_aflag_clear(m, PGA_WRITEABLE); > @@ -2263,7 +2277,7 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm > pv_entry_t pv; > =20 > PMAP_LOCK_ASSERT(pmap, MA_OWNED); > - mtx_assert(&vm_page_queue_mtx, MA_OWNED); > + rw_assert(&pvh_global_lock, RA_WLOCKED); > if (pv_entry_count < pv_entry_high_water &&=20 > (pv =3D get_pv_entry(pmap, TRUE)) !=3D NULL) { > pv->pv_va =3D va; > @@ -2285,7 +2299,7 @@ pmap_remove_pte(pmap_t pmap, pt_entry_t=20 > CTR3(KTR_PMAP, "pmap_remove_pte: pmap=3D%p *ptq=3D0x%x va=3D0x%x", > pmap, (u_long)*ptq, va); > =09 > - mtx_assert(&vm_page_queue_mtx, MA_OWNED); > + rw_assert(&pvh_global_lock, RA_WLOCKED); > PMAP_LOCK_ASSERT(pmap, MA_OWNED); > oldpte =3D *ptq; > PT_SET_VA_MA(ptq, 0, TRUE); > @@ -2322,7 +2336,7 @@ pmap_remove_page(pmap_t pmap, vm_offset_ > CTR2(KTR_PMAP, "pmap_remove_page: pmap=3D%p va=3D0x%x", > pmap, va); > =09 > - mtx_assert(&vm_page_queue_mtx, MA_OWNED); > + rw_assert(&pvh_global_lock, RA_WLOCKED); > KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); > PMAP_LOCK_ASSERT(pmap, MA_OWNED); > if ((pte =3D pmap_pte_quick(pmap, va)) =3D=3D NULL || (*pte & PG_V) =3D= =3D 0) > @@ -2360,7 +2374,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva > =20 > anyvalid =3D 0; > =20 > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > sched_pin(); > PMAP_LOCK(pmap); > =20 > @@ -2437,7 +2451,7 @@ out: > if (anyvalid) > pmap_invalidate_all(pmap); > sched_unpin(); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > PMAP_UNLOCK(pmap); > pmap_free_zero_pages(free); > } > @@ -2466,7 +2480,7 @@ pmap_remove_all(vm_page_t m) > KASSERT((m->oflags & VPO_UNMANAGED) =3D=3D 0, > ("pmap_remove_all: page %p is not managed", m)); > free =3D NULL; > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > sched_pin(); > while ((pv =3D TAILQ_FIRST(&m->md.pv_list)) !=3D NULL) { > pmap =3D PV_PMAP(pv); > @@ -2498,7 +2512,7 @@ pmap_remove_all(vm_page_t m) > if (*PMAP1) > PT_SET_MA(PADDR1, 0); > sched_unpin(); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > pmap_free_zero_pages(free); > } > =20 > @@ -2533,7 +2547,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sv > =20 > anychanged =3D 0; > =20 > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > sched_pin(); > PMAP_LOCK(pmap); > for (; sva < eva; sva =3D pdnxt) { > @@ -2617,7 +2631,7 @@ retry: > if (anychanged) > pmap_invalidate_all(pmap); > sched_unpin(); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > PMAP_UNLOCK(pmap); > } > =20 > @@ -2658,7 +2672,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va,=20 > =20 > mpte =3D NULL; > =20 > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > PMAP_LOCK(pmap); > sched_pin(); > =20 > @@ -2831,7 +2845,7 @@ validate: > if (*PMAP1) > PT_SET_VA_MA(PMAP1, 0, TRUE); > sched_unpin(); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > PMAP_UNLOCK(pmap); > } > =20 > @@ -2861,7 +2875,7 @@ pmap_enter_object(pmap_t pmap, vm_offset > psize =3D atop(end - start); > mpte =3D NULL; > m =3D m_start; > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > PMAP_LOCK(pmap); > while (m !=3D NULL && (diff =3D m->pindex - m_start->pindex) < psize) { > mpte =3D pmap_enter_quick_locked(&mclp, &count, pmap, start + ptoa(dif= f), m, > @@ -2878,7 +2892,7 @@ pmap_enter_object(pmap_t pmap, vm_offset > error =3D HYPERVISOR_multicall(mcl, count); > KASSERT(error =3D=3D 0, ("bad multicall %d", error)); > } > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > PMAP_UNLOCK(pmap); > } > =20 > @@ -2901,12 +2915,12 @@ pmap_enter_quick(pmap_t pmap, vm_offset_ > CTR4(KTR_PMAP, "pmap_enter_quick: pmap=3D%p va=3D0x%x m=3D%p prot=3D0x%= x", > pmap, va, m, prot); > =09 > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > PMAP_LOCK(pmap); > (void)pmap_enter_quick_locked(&mclp, &count, pmap, va, m, prot, NULL); > if (count) > HYPERVISOR_multicall(&mcl, count); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > PMAP_UNLOCK(pmap); > } > =20 > @@ -2952,7 +2966,7 @@ pmap_enter_quick_locked(multicall_entry_ > KASSERT(va < kmi.clean_sva || va >=3D kmi.clean_eva || > (m->oflags & VPO_UNMANAGED) !=3D 0, > ("pmap_enter_quick_locked: managed mapping within the clean submap"= )); > - mtx_assert(&vm_page_queue_mtx, MA_OWNED); > + rw_assert(&pvh_global_lock, RA_WLOCKED); > PMAP_LOCK_ASSERT(pmap, MA_OWNED); > =20 > /* > @@ -3168,7 +3182,7 @@ pmap_change_wiring(pmap_t pmap, vm_offse > { > pt_entry_t *pte; > =20 > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > PMAP_LOCK(pmap); > pte =3D pmap_pte(pmap, va); > =20 > @@ -3186,7 +3200,7 @@ pmap_change_wiring(pmap_t pmap, vm_offse > */ > pmap_pte_release(pte); > PMAP_UNLOCK(pmap); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > } > =20 > =20 > @@ -3225,7 +3239,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm > mtx_lock(&createdelete_lock); > #endif > =20 > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > if (dst_pmap < src_pmap) { > PMAP_LOCK(dst_pmap); > PMAP_LOCK(src_pmap); > @@ -3315,7 +3329,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm > out: > PT_UPDATES_FLUSH(); > sched_unpin(); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > PMAP_UNLOCK(src_pmap); > PMAP_UNLOCK(dst_pmap); > =20 > @@ -3451,7 +3465,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p > KASSERT((m->oflags & VPO_UNMANAGED) =3D=3D 0, > ("pmap_page_exists_quick: page %p is not managed", m)); > rv =3D FALSE; > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { > if (PV_PMAP(pv) =3D=3D pmap) { > rv =3D TRUE; > @@ -3461,7 +3475,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p > if (loops >=3D 16) > break; > } > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > return (rv); > } > =20 > @@ -3482,7 +3496,7 @@ pmap_page_wired_mappings(vm_page_t m) > count =3D 0; > if ((m->oflags & VPO_UNMANAGED) !=3D 0) > return (count); > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > sched_pin(); > TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { > pmap =3D PV_PMAP(pv); > @@ -3493,7 +3507,7 @@ pmap_page_wired_mappings(vm_page_t m) > PMAP_UNLOCK(pmap); > } > sched_unpin(); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > return (count); > } > =20 > @@ -3535,7 +3549,7 @@ pmap_remove_pages(pmap_t pmap) > printf("warning: pmap_remove_pages called with non-current pmap\n"); > return; > } > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > KASSERT(pmap_is_current(pmap), ("removing pages from non-current pmap")= ); > PMAP_LOCK(pmap); > sched_pin(); > @@ -3615,7 +3629,7 @@ pmap_remove_pages(pmap_t pmap) > =20 > sched_unpin(); > pmap_invalidate_all(pmap); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > PMAP_UNLOCK(pmap); > pmap_free_zero_pages(free); > } > @@ -3647,7 +3661,7 @@ pmap_is_modified(vm_page_t m) > if ((m->oflags & VPO_BUSY) =3D=3D 0 && > (m->aflags & PGA_WRITEABLE) =3D=3D 0) > return (rv); > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > sched_pin(); > TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { > pmap =3D PV_PMAP(pv); > @@ -3661,7 +3675,7 @@ pmap_is_modified(vm_page_t m) > if (*PMAP1) > PT_SET_MA(PADDR1, 0); > sched_unpin(); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > return (rv); > } > =20 > @@ -3708,7 +3722,7 @@ pmap_is_referenced(vm_page_t m) > KASSERT((m->oflags & VPO_UNMANAGED) =3D=3D 0, > ("pmap_is_referenced: page %p is not managed", m)); > rv =3D FALSE; > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > sched_pin(); > TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { > pmap =3D PV_PMAP(pv); > @@ -3722,7 +3736,7 @@ pmap_is_referenced(vm_page_t m) > if (*PMAP1) > PT_SET_MA(PADDR1, 0); > sched_unpin(); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > return (rv); > } > =20 > @@ -3733,9 +3747,9 @@ pmap_map_readonly(pmap_t pmap, vm_offset > for (i =3D 0; i < npages; i++) { > pt_entry_t *pte; > pte =3D pmap_pte(pmap, (vm_offset_t)(va + i*PAGE_SIZE)); > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > pte_store(pte, xpmap_mtop(*pte & ~(PG_RW|PG_M))); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > PMAP_MARK_PRIV(xpmap_mtop(*pte)); > pmap_pte_release(pte); > } > @@ -3749,9 +3763,9 @@ pmap_map_readwrite(pmap_t pmap, vm_offse > pt_entry_t *pte; > pte =3D pmap_pte(pmap, (vm_offset_t)(va + i*PAGE_SIZE)); > PMAP_MARK_UNPRIV(xpmap_mtop(*pte)); > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > pte_store(pte, xpmap_mtop(*pte) | (PG_RW|PG_M)); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > pmap_pte_release(pte); > } > } > @@ -3778,7 +3792,7 @@ pmap_remove_write(vm_page_t m) > if ((m->oflags & VPO_BUSY) =3D=3D 0 && > (m->aflags & PGA_WRITEABLE) =3D=3D 0) > return; > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > sched_pin(); > TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { > pmap =3D PV_PMAP(pv); > @@ -3809,7 +3823,7 @@ retry: > if (*PMAP1) > PT_SET_MA(PADDR1, 0); > sched_unpin(); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > } > =20 > /* > @@ -3834,7 +3848,7 @@ pmap_ts_referenced(vm_page_t m) > =20 > KASSERT((m->oflags & VPO_UNMANAGED) =3D=3D 0, > ("pmap_ts_referenced: page %p is not managed", m)); > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > sched_pin(); > if ((pv =3D TAILQ_FIRST(&m->md.pv_list)) !=3D NULL) { > pvf =3D pv; > @@ -3859,7 +3873,7 @@ pmap_ts_referenced(vm_page_t m) > if (*PMAP1) > PT_SET_MA(PADDR1, 0); > sched_unpin(); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > return (rtval); > } > =20 > @@ -3886,7 +3900,7 @@ pmap_clear_modify(vm_page_t m) > */ > if ((m->aflags & PGA_WRITEABLE) =3D=3D 0) > return; > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > sched_pin(); > TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { > pmap =3D PV_PMAP(pv); > @@ -3904,7 +3918,7 @@ pmap_clear_modify(vm_page_t m) > PMAP_UNLOCK(pmap); > } > sched_unpin(); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > } > =20 > /* > @@ -3921,7 +3935,7 @@ pmap_clear_reference(vm_page_t m) > =20 > KASSERT((m->oflags & VPO_UNMANAGED) =3D=3D 0, > ("pmap_clear_reference: page %p is not managed", m)); > - vm_page_lock_queues(); > + rw_wlock(&pvh_global_lock); > sched_pin(); > TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { > pmap =3D PV_PMAP(pv); > @@ -3939,7 +3953,7 @@ pmap_clear_reference(vm_page_t m) > PMAP_UNLOCK(pmap); > } > sched_unpin(); > - vm_page_unlock_queues(); > + rw_wunlock(&pvh_global_lock); > } > =20 > /* >=20 > Modified: head/sys/i386/xen/xen_machdep.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/i386/xen/xen_machdep.c Fri Oct 12 23:12:19 2012 (r241497) > +++ head/sys/i386/xen/xen_machdep.c Fri Oct 12 23:26:00 2012 (r241498) > @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > =20 > #include > @@ -428,13 +429,15 @@ _xen_machphys_update(vm_paddr_t mfn, vm_ > critical_exit(); > } > =20 > +extern struct rwlock pvh_global_lock; > + > void > _xen_queue_pt_update(vm_paddr_t ptr, vm_paddr_t val, char *file, int lin= e) > { > SET_VCPU(); > =20 > if (__predict_true(gdtset))=09 > - mtx_assert(&vm_page_queue_mtx, MA_OWNED); > + rw_assert(&pvh_global_lock, RA_WLOCKED); > =20 > KASSERT((ptr & 7) =3D=3D 0, ("misaligned update")); > =09 --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --GPJrCs/72TxItFYR Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlB5csYACgkQForvXbEpPzSZCwCeP1SoVY8sYPVkYeBk7l/t1j2G Z6wAn0x6PGnN+tkRsrYvSBhN9ORdtLnF =5zhD -----END PGP SIGNATURE----- --GPJrCs/72TxItFYR-- From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 14:45:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2FDF3333; Sat, 13 Oct 2012 14:45:43 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1802C8FC08; Sat, 13 Oct 2012 14:45:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9DEjgVr038489; Sat, 13 Oct 2012 14:45:42 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9DEjg0m038486; Sat, 13 Oct 2012 14:45:42 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201210131445.q9DEjg0m038486@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sat, 13 Oct 2012 14:45:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241507 - head/etc/periodic/daily X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 14:45:43 -0000 Author: ume Date: Sat Oct 13 14:45:42 2012 New Revision: 241507 URL: http://svn.freebsd.org/changeset/base/241507 Log: Make a command for pkg_info changeable like pkg_version in /etc/periodic/weekly/400.status-pkg to be friendly with pkgng. MFC after: 1 week Modified: head/etc/periodic/daily/490.status-pkg-changes Modified: head/etc/periodic/daily/490.status-pkg-changes ============================================================================== --- head/etc/periodic/daily/490.status-pkg-changes Sat Oct 13 13:00:51 2012 (r241506) +++ head/etc/periodic/daily/490.status-pkg-changes Sat Oct 13 14:45:42 2012 (r241507) @@ -23,7 +23,7 @@ case "$daily_status_pkg_changes_enable" if [ -f $bak/pkg_info.bak ]; then mv -f $bak/pkg_info.bak $bak/pkg_info.bak2 fi - /usr/sbin/pkg_info > $bak/pkg_info.bak + ${pkg_info:-/usr/sbin/pkg_info} > $bak/pkg_info.bak cmp -sz $bak/pkg_info.bak $bak/pkg_info.bak2 if [ $? -eq 1 ]; then From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 17:29:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E8CBDA7A; Sat, 13 Oct 2012 17:29:38 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh1.mail.rice.edu (mh1.mail.rice.edu [128.42.201.20]) by mx1.freebsd.org (Postfix) with ESMTP id B53E88FC14; Sat, 13 Oct 2012 17:29:38 +0000 (UTC) Received: from mh1.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh1.mail.rice.edu (Postfix) with ESMTP id 847EB461960; Sat, 13 Oct 2012 12:29:32 -0500 (CDT) Received: from mh1.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh1.mail.rice.edu (Postfix) with ESMTP id 81CE2461935; Sat, 13 Oct 2012 12:29:32 -0500 (CDT) X-Virus-Scanned: by amavis-2.7.0 at mh1.mail.rice.edu, auth channel Received: from mh1.mail.rice.edu ([127.0.0.1]) by mh1.mail.rice.edu (mh1.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id 11yV__VzZh52; Sat, 13 Oct 2012 12:29:32 -0500 (CDT) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh1.mail.rice.edu (Postfix) with ESMTPSA id 8FAE1460F94; Sat, 13 Oct 2012 12:29:31 -0500 (CDT) Message-ID: <5079A4FA.20005@rice.edu> Date: Sat, 13 Oct 2012 12:29:30 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:8.0) Gecko/20111113 Thunderbird/8.0 MIME-Version: 1.0 To: Pawel Jakub Dawidek Subject: Re: svn commit: r241498 - head/sys/i386/xen References: <201210122326.q9CNQ0cD095249@svn.freebsd.org> <20121013135518.GC1383@garage.freebsd.pl> In-Reply-To: <20121013135518.GC1383@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alan Cox , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 17:29:39 -0000 On 10/13/2012 08:55, Pawel Jakub Dawidek wrote: > On Fri, Oct 12, 2012 at 11:26:00PM +0000, Alan Cox wrote: >> Author: alc >> Date: Fri Oct 12 23:26:00 2012 >> New Revision: 241498 >> URL: http://svn.freebsd.org/changeset/base/241498 >> >> Log: >> Replace all uses of the vm page queues lock by a new R/W lock. >> Unfortunately, this lock cannot be defined as static under Xen because it >> is (ab)used to serialize queued page table changes. > I couldn't help but notice that this lock is always write-locked, but I > guess this is going to change at some point? Yes, take a look at the amd64 pmap in HEAD and 9-STABLE (post 9.1) to see how the use of this lock changes to support fine-grained locking on the PV lists. However, my near term objective is really elsewhere. I want to create separate locks on the active and inactive page queues in the machine-independent layer. To do this, I first need to eliminate any use of the existing vm_page_queue_mtx from every pmap in the tree. >> Tested by: sbruno >> >> Modified: >> head/sys/i386/xen/mp_machdep.c >> head/sys/i386/xen/pmap.c >> head/sys/i386/xen/xen_machdep.c >> >> Modified: head/sys/i386/xen/mp_machdep.c >> ============================================================================== >> --- head/sys/i386/xen/mp_machdep.c Fri Oct 12 23:12:19 2012 (r241497) >> +++ head/sys/i386/xen/mp_machdep.c Fri Oct 12 23:26:00 2012 (r241498) >> @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); >> #include >> #include >> #include >> +#include >> #include >> #include >> #include >> @@ -804,6 +805,7 @@ smp_trap_init(trap_info_t *trap_ctxt) >> } >> } >> >> +extern struct rwlock pvh_global_lock; >> extern int nkpt; >> static void >> cpu_initialize_context(unsigned int cpu) >> @@ -862,7 +864,7 @@ cpu_initialize_context(unsigned int cpu) >> >> >> xen_pgdpt_pin(VM_PAGE_TO_MACH(m[NPGPTD + 1])); >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> for (i = 0; i< 4; i++) { >> int pdir = (PTDPTDI + i) / NPDEPG; >> int curoffset = (PTDPTDI + i) % NPDEPG; >> @@ -872,7 +874,7 @@ cpu_initialize_context(unsigned int cpu) >> ma[i]); >> } >> PT_UPDATES_FLUSH(); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> >> memset(&ctxt, 0, sizeof(ctxt)); >> ctxt.flags = VGCF_IN_KERNEL; >> >> Modified: head/sys/i386/xen/pmap.c >> ============================================================================== >> --- head/sys/i386/xen/pmap.c Fri Oct 12 23:12:19 2012 (r241497) >> +++ head/sys/i386/xen/pmap.c Fri Oct 12 23:26:00 2012 (r241498) >> @@ -111,6 +111,7 @@ __FBSDID("$FreeBSD$"); >> #include >> #include >> #include >> +#include >> #include >> #include >> #include >> @@ -220,6 +221,13 @@ static SYSCTL_NODE(_vm, OID_AUTO, pmap, >> static int pat_works; /* Is page attribute table sane? */ >> >> /* >> + * This lock is defined as static in other pmap implementations. It cannot, >> + * however, be defined as static here, because it is (ab)used to serialize >> + * queued page table changes in other sources files. >> + */ >> +struct rwlock pvh_global_lock; >> + >> +/* >> * Data for the pv entry allocation mechanism >> */ >> static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); >> @@ -380,6 +388,12 @@ pmap_bootstrap(vm_paddr_t firstaddr) >> #endif >> CPU_FILL(&kernel_pmap->pm_active); /* don't allow deactivation */ >> TAILQ_INIT(&kernel_pmap->pm_pvchunk); >> + >> + /* >> + * Initialize the global pv list lock. >> + */ >> + rw_init_flags(&pvh_global_lock, "pmap pv global", RW_RECURSE); >> + >> LIST_INIT(&allpmaps); >> mtx_init(&allpmaps_lock, "allpmaps", NULL, MTX_SPIN); >> mtx_lock_spin(&allpmaps_lock); >> @@ -979,9 +993,9 @@ pmap_pte_release(pt_entry_t *pte) >> if ((pt_entry_t *)((vm_offset_t)pte& ~PAGE_MASK) == PADDR2) { >> CTR1(KTR_PMAP, "pmap_pte_release: pte=0x%jx", >> *PMAP2); >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> PT_SET_VA(PMAP2, 0, TRUE); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> mtx_unlock(&PMAP2mutex); >> } >> } >> @@ -1001,7 +1015,7 @@ invlcaddr(void *caddr) >> * scans are across different pmaps. It is very wasteful >> * to do an entire invltlb for checking a single mapping. >> * >> - * If the given pmap is not the current pmap, vm_page_queue_mtx >> + * If the given pmap is not the current pmap, pvh_global_lock >> * must be held and curthread pinned to a CPU. >> */ >> static pt_entry_t * >> @@ -1017,7 +1031,7 @@ pmap_pte_quick(pmap_t pmap, vm_offset_t >> /* are we current address space or kernel? */ >> if (pmap_is_current(pmap)) >> return (vtopte(va)); >> - mtx_assert(& , MA_OWNED); >> + rw_assert(&pvh_global_lock, RA_WLOCKED); >> KASSERT(curthread->td_pinned> 0, ("curthread not pinned")); >> newpf = *pde& PG_FRAME; >> if ((*PMAP1& PG_FRAME) != newpf) { >> @@ -1299,7 +1313,7 @@ pmap_qremove(vm_offset_t sva, int count) >> >> CTR2(KTR_PMAP, "pmap_qremove: sva=0x%x count=%d", sva, count); >> va = sva; >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> critical_enter(); >> while (count--> 0) { >> pmap_kremove(va); >> @@ -1308,7 +1322,7 @@ pmap_qremove(vm_offset_t sva, int count) >> PT_UPDATES_FLUSH(); >> pmap_invalidate_range(kernel_pmap, sva, va); >> critical_exit(); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> } >> >> /*************************************************** >> @@ -1511,7 +1525,7 @@ pmap_pinit(pmap_t pmap) >> #ifdef PAE >> PT_SET_MA(pmap->pm_pdpt, *vtopte((vm_offset_t)pmap->pm_pdpt)& ~PG_RW); >> #endif >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> xen_flush_queue(); >> xen_pgdpt_pin(VM_PAGE_TO_MACH(ptdpg[NPGPTD])); >> for (i = 0; i< NPGPTD; i++) { >> @@ -1519,7 +1533,7 @@ pmap_pinit(pmap_t pmap) >> PT_SET_VA_MA(&pmap->pm_pdir[PTDPTDI + i], ma | PG_V | PG_A, FALSE); >> } >> xen_flush_queue(); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> CPU_ZERO(&pmap->pm_active); >> TAILQ_INIT(&pmap->pm_pvchunk); >> bzero(&pmap->pm_stats, sizeof pmap->pm_stats); >> @@ -1551,9 +1565,9 @@ _pmap_allocpte(pmap_t pmap, u_int ptepin >> VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) { >> if (flags& M_WAITOK) { >> PMAP_UNLOCK(pmap); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> VM_WAIT; >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> PMAP_LOCK(pmap); >> } >> >> @@ -1884,14 +1898,14 @@ pmap_growkernel(vm_offset_t addr) >> pmap_zero_page(nkpg); >> ptppaddr = VM_PAGE_TO_PHYS(nkpg); >> newpdir = (pd_entry_t) (ptppaddr | PG_V | PG_RW | PG_A | PG_M); >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> PD_SET_VA(kernel_pmap, (kernel_vm_end>> PDRSHIFT), newpdir, TRUE); >> mtx_lock_spin(&allpmaps_lock); >> LIST_FOREACH(pmap,&allpmaps, pm_list) >> PD_SET_VA(pmap, (kernel_vm_end>> PDRSHIFT), newpdir, TRUE); >> >> mtx_unlock_spin(&allpmaps_lock); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> >> kernel_vm_end = (kernel_vm_end + NBPDR)& ~PDRMASK; >> if (kernel_vm_end - 1>= kernel_map->max_offset) { >> @@ -2094,7 +2108,7 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv >> struct pv_chunk *pc; >> int idx, field, bit; >> >> - mtx_assert(&vm_page_queue_mtx, MA_OWNED); >> + rw_assert(&pvh_global_lock, RA_WLOCKED); >> PMAP_LOCK_ASSERT(pmap, MA_OWNED); >> PV_STAT(pv_entry_frees++); >> PV_STAT(pv_entry_spare++); >> @@ -2154,7 +2168,7 @@ get_pv_entry(pmap_t pmap, boolean_t try) >> vm_page_t m; >> >> PMAP_LOCK_ASSERT(pmap, MA_OWNED); >> - mtx_assert(&vm_page_queue_mtx, MA_OWNED); >> + rw_assert(&pvh_global_lock, RA_WLOCKED); >> PV_STAT(pv_entry_allocs++); >> pv_entry_count++; >> if (pv_entry_count> pv_entry_high_water) >> @@ -2224,7 +2238,7 @@ pmap_pvh_remove(struct md_page *pvh, pma >> { >> pv_entry_t pv; >> >> - mtx_assert(&vm_page_queue_mtx, MA_OWNED); >> + rw_assert(&pvh_global_lock, RA_WLOCKED); >> TAILQ_FOREACH(pv,&pvh->pv_list, pv_list) { >> if (pmap == PV_PMAP(pv)&& va == pv->pv_va) { >> TAILQ_REMOVE(&pvh->pv_list, pv, pv_list); >> @@ -2248,7 +2262,7 @@ static void >> pmap_remove_entry(pmap_t pmap, vm_page_t m, vm_offset_t va) >> { >> >> - mtx_assert(&vm_page_queue_mtx, MA_OWNED); >> + rw_assert(&pvh_global_lock, RA_WLOCKED); >> pmap_pvh_free(&m->md, pmap, va); >> if (TAILQ_EMPTY(&m->md.pv_list)) >> vm_page_aflag_clear(m, PGA_WRITEABLE); >> @@ -2263,7 +2277,7 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm >> pv_entry_t pv; >> >> PMAP_LOCK_ASSERT(pmap, MA_OWNED); >> - mtx_assert(&vm_page_queue_mtx, MA_OWNED); >> + rw_assert(&pvh_global_lock, RA_WLOCKED); >> if (pv_entry_count< pv_entry_high_water&& >> (pv = get_pv_entry(pmap, TRUE)) != NULL) { >> pv->pv_va = va; >> @@ -2285,7 +2299,7 @@ pmap_remove_pte(pmap_t pmap, pt_entry_t >> CTR3(KTR_PMAP, "pmap_remove_pte: pmap=%p *ptq=0x%x va=0x%x", >> pmap, (u_long)*ptq, va); >> >> - mtx_assert(&vm_page_queue_mtx, MA_OWNED); >> + rw_assert(&pvh_global_lock, RA_WLOCKED); >> PMAP_LOCK_ASSERT(pmap, MA_OWNED); >> oldpte = *ptq; >> PT_SET_VA_MA(ptq, 0, TRUE); >> @@ -2322,7 +2336,7 @@ pmap_remove_page(pmap_t pmap, vm_offset_ >> CTR2(KTR_PMAP, "pmap_remove_page: pmap=%p va=0x%x", >> pmap, va); >> >> - mtx_assert(&vm_page_queue_mtx, MA_OWNED); >> + rw_assert(&pvh_global_lock, RA_WLOCKED); >> KASSERT(curthread->td_pinned> 0, ("curthread not pinned")); >> PMAP_LOCK_ASSERT(pmap, MA_OWNED); >> if ((pte = pmap_pte_quick(pmap, va)) == NULL || (*pte& PG_V) == 0) >> @@ -2360,7 +2374,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva >> >> anyvalid = 0; >> >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> sched_pin(); >> PMAP_LOCK(pmap); >> >> @@ -2437,7 +2451,7 @@ out: >> if (anyvalid) >> pmap_invalidate_all(pmap); >> sched_unpin(); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> PMAP_UNLOCK(pmap); >> pmap_free_zero_pages(free); >> } >> @@ -2466,7 +2480,7 @@ pmap_remove_all(vm_page_t m) >> KASSERT((m->oflags& VPO_UNMANAGED) == 0, >> ("pmap_remove_all: page %p is not managed", m)); >> free = NULL; >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> sched_pin(); >> while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { >> pmap = PV_PMAP(pv); >> @@ -2498,7 +2512,7 @@ pmap_remove_all(vm_page_t m) >> if (*PMAP1) >> PT_SET_MA(PADDR1, 0); >> sched_unpin(); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> pmap_free_zero_pages(free); >> } >> >> @@ -2533,7 +2547,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sv >> >> anychanged = 0; >> >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> sched_pin(); >> PMAP_LOCK(pmap); >> for (; sva< eva; sva = pdnxt) { >> @@ -2617,7 +2631,7 @@ retry: >> if (anychanged) >> pmap_invalidate_all(pmap); >> sched_unpin(); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> PMAP_UNLOCK(pmap); >> } >> >> @@ -2658,7 +2672,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, >> >> mpte = NULL; >> >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> PMAP_LOCK(pmap); >> sched_pin(); >> >> @@ -2831,7 +2845,7 @@ validate: >> if (*PMAP1) >> PT_SET_VA_MA(PMAP1, 0, TRUE); >> sched_unpin(); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> PMAP_UNLOCK(pmap); >> } >> >> @@ -2861,7 +2875,7 @@ pmap_enter_object(pmap_t pmap, vm_offset >> psize = atop(end - start); >> mpte = NULL; >> m = m_start; >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> PMAP_LOCK(pmap); >> while (m != NULL&& (diff = m->pindex - m_start->pindex)< psize) { >> mpte = pmap_enter_quick_locked(&mclp,&count, pmap, start + ptoa(diff), m, >> @@ -2878,7 +2892,7 @@ pmap_enter_object(pmap_t pmap, vm_offset >> error = HYPERVISOR_multicall(mcl, count); >> KASSERT(error == 0, ("bad multicall %d", error)); >> } >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> PMAP_UNLOCK(pmap); >> } >> >> @@ -2901,12 +2915,12 @@ pmap_enter_quick(pmap_t pmap, vm_offset_ >> CTR4(KTR_PMAP, "pmap_enter_quick: pmap=%p va=0x%x m=%p prot=0x%x", >> pmap, va, m, prot); >> >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> PMAP_LOCK(pmap); >> (void)pmap_enter_quick_locked(&mclp,&count, pmap, va, m, prot, NULL); >> if (count) >> HYPERVISOR_multicall(&mcl, count); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> PMAP_UNLOCK(pmap); >> } >> >> @@ -2952,7 +2966,7 @@ pmap_enter_quick_locked(multicall_entry_ >> KASSERT(va< kmi.clean_sva || va>= kmi.clean_eva || >> (m->oflags& VPO_UNMANAGED) != 0, >> ("pmap_enter_quick_locked: managed mapping within the clean submap")); >> - mtx_assert(&vm_page_queue_mtx, MA_OWNED); >> + rw_assert(&pvh_global_lock, RA_WLOCKED); >> PMAP_LOCK_ASSERT(pmap, MA_OWNED); >> >> /* >> @@ -3168,7 +3182,7 @@ pmap_change_wiring(pmap_t pmap, vm_offse >> { >> pt_entry_t *pte; >> >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> PMAP_LOCK(pmap); >> pte = pmap_pte(pmap, va); >> >> @@ -3186,7 +3200,7 @@ pmap_change_wiring(pmap_t pmap, vm_offse >> */ >> pmap_pte_release(pte); >> PMAP_UNLOCK(pmap); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> } >> >> >> @@ -3225,7 +3239,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm >> mtx_lock(&createdelete_lock); >> #endif >> >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> if (dst_pmap< src_pmap) { >> PMAP_LOCK(dst_pmap); >> PMAP_LOCK(src_pmap); >> @@ -3315,7 +3329,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm >> out: >> PT_UPDATES_FLUSH(); >> sched_unpin(); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> PMAP_UNLOCK(src_pmap); >> PMAP_UNLOCK(dst_pmap); >> >> @@ -3451,7 +3465,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p >> KASSERT((m->oflags& VPO_UNMANAGED) == 0, >> ("pmap_page_exists_quick: page %p is not managed", m)); >> rv = FALSE; >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> TAILQ_FOREACH(pv,&m->md.pv_list, pv_list) { >> if (PV_PMAP(pv) == pmap) { >> rv = TRUE; >> @@ -3461,7 +3475,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p >> if (loops>= 16) >> break; >> } >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> return (rv); >> } >> >> @@ -3482,7 +3496,7 @@ pmap_page_wired_mappings(vm_page_t m) >> count = 0; >> if ((m->oflags& VPO_UNMANAGED) != 0) >> return (count); >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> sched_pin(); >> TAILQ_FOREACH(pv,&m->md.pv_list, pv_list) { >> pmap = PV_PMAP(pv); >> @@ -3493,7 +3507,7 @@ pmap_page_wired_mappings(vm_page_t m) >> PMAP_UNLOCK(pmap); >> } >> sched_unpin(); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> return (count); >> } >> >> @@ -3535,7 +3549,7 @@ pmap_remove_pages(pmap_t pmap) >> printf("warning: pmap_remove_pages called with non-current pmap\n"); >> return; >> } >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> KASSERT(pmap_is_current(pmap), ("removing pages from non-current pmap")); >> PMAP_LOCK(pmap); >> sched_pin(); >> @@ -3615,7 +3629,7 @@ pmap_remove_pages(pmap_t pmap) >> >> sched_unpin(); >> pmap_invalidate_all(pmap); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> PMAP_UNLOCK(pmap); >> pmap_free_zero_pages(free); >> } >> @@ -3647,7 +3661,7 @@ pmap_is_modified(vm_page_t m) >> if ((m->oflags& VPO_BUSY) == 0&& >> (m->aflags& PGA_WRITEABLE) == 0) >> return (rv); >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> sched_pin(); >> TAILQ_FOREACH(pv,&m->md.pv_list, pv_list) { >> pmap = PV_PMAP(pv); >> @@ -3661,7 +3675,7 @@ pmap_is_modified(vm_page_t m) >> if (*PMAP1) >> PT_SET_MA(PADDR1, 0); >> sched_unpin(); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> return (rv); >> } >> >> @@ -3708,7 +3722,7 @@ pmap_is_referenced(vm_page_t m) >> KASSERT((m->oflags& VPO_UNMANAGED) == 0, >> ("pmap_is_referenced: page %p is not managed", m)); >> rv = FALSE; >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> sched_pin(); >> TAILQ_FOREACH(pv,&m->md.pv_list, pv_list) { >> pmap = PV_PMAP(pv); >> @@ -3722,7 +3736,7 @@ pmap_is_referenced(vm_page_t m) >> if (*PMAP1) >> PT_SET_MA(PADDR1, 0); >> sched_unpin(); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> return (rv); >> } >> >> @@ -3733,9 +3747,9 @@ pmap_map_readonly(pmap_t pmap, vm_offset >> for (i = 0; i< npages; i++) { >> pt_entry_t *pte; >> pte = pmap_pte(pmap, (vm_offset_t)(va + i*PAGE_SIZE)); >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> pte_store(pte, xpmap_mtop(*pte& ~(PG_RW|PG_M))); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> PMAP_MARK_PRIV(xpmap_mtop(*pte)); >> pmap_pte_release(pte); >> } >> @@ -3749,9 +3763,9 @@ pmap_map_readwrite(pmap_t pmap, vm_offse >> pt_entry_t *pte; >> pte = pmap_pte(pmap, (vm_offset_t)(va + i*PAGE_SIZE)); >> PMAP_MARK_UNPRIV(xpmap_mtop(*pte)); >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> pte_store(pte, xpmap_mtop(*pte) | (PG_RW|PG_M)); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> pmap_pte_release(pte); >> } >> } >> @@ -3778,7 +3792,7 @@ pmap_remove_write(vm_page_t m) >> if ((m->oflags& VPO_BUSY) == 0&& >> (m->aflags& PGA_WRITEABLE) == 0) >> return; >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> sched_pin(); >> TAILQ_FOREACH(pv,&m->md.pv_list, pv_list) { >> pmap = PV_PMAP(pv); >> @@ -3809,7 +3823,7 @@ retry: >> if (*PMAP1) >> PT_SET_MA(PADDR1, 0); >> sched_unpin(); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> } >> >> /* >> @@ -3834,7 +3848,7 @@ pmap_ts_referenced(vm_page_t m) >> >> KASSERT((m->oflags& VPO_UNMANAGED) == 0, >> ("pmap_ts_referenced: page %p is not managed", m)); >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> sched_pin(); >> if ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { >> pvf = pv; >> @@ -3859,7 +3873,7 @@ pmap_ts_referenced(vm_page_t m) >> if (*PMAP1) >> PT_SET_MA(PADDR1, 0); >> sched_unpin(); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> return (rtval); >> } >> >> @@ -3886,7 +3900,7 @@ pmap_clear_modify(vm_page_t m) >> */ >> if ((m->aflags& PGA_WRITEABLE) == 0) >> return; >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> sched_pin(); >> TAILQ_FOREACH(pv,&m->md.pv_list, pv_list) { >> pmap = PV_PMAP(pv); >> @@ -3904,7 +3918,7 @@ pmap_clear_modify(vm_page_t m) >> PMAP_UNLOCK(pmap); >> } >> sched_unpin(); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> } >> >> /* >> @@ -3921,7 +3935,7 @@ pmap_clear_reference(vm_page_t m) >> >> KASSERT((m->oflags& VPO_UNMANAGED) == 0, >> ("pmap_clear_reference: page %p is not managed", m)); >> - vm_page_lock_queues(); >> + rw_wlock(&pvh_global_lock); >> sched_pin(); >> TAILQ_FOREACH(pv,&m->md.pv_list, pv_list) { >> pmap = PV_PMAP(pv); >> @@ -3939,7 +3953,7 @@ pmap_clear_reference(vm_page_t m) >> PMAP_UNLOCK(pmap); >> } >> sched_unpin(); >> - vm_page_unlock_queues(); >> + rw_wunlock(&pvh_global_lock); >> } >> >> /* >> >> Modified: head/sys/i386/xen/xen_machdep.c >> ============================================================================== >> --- head/sys/i386/xen/xen_machdep.c Fri Oct 12 23:12:19 2012 (r241497) >> +++ head/sys/i386/xen/xen_machdep.c Fri Oct 12 23:26:00 2012 (r241498) >> @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); >> #include >> #include >> #include >> +#include >> #include >> >> #include >> @@ -428,13 +429,15 @@ _xen_machphys_update(vm_paddr_t mfn, vm_ >> critical_exit(); >> } >> >> +extern struct rwlock pvh_global_lock; >> + >> void >> _xen_queue_pt_update(vm_paddr_t ptr, vm_paddr_t val, char *file, int line) >> { >> SET_VCPU(); >> >> if (__predict_true(gdtset)) >> - mtx_assert(&vm_page_queue_mtx, MA_OWNED); >> + rw_assert(&pvh_global_lock, RA_WLOCKED); >> >> KASSERT((ptr& 7) == 0, ("misaligned update")); >> From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 17:55:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BDC80193; Sat, 13 Oct 2012 17:55:07 +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 8DFC98FC14; Sat, 13 Oct 2012 17:55:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9DHt7Z8074670; Sat, 13 Oct 2012 17:55:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9DHt7TA074668; Sat, 13 Oct 2012 17:55:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210131755.q9DHt7TA074668@svn.freebsd.org> From: Alexander Motin Date: Sat, 13 Oct 2012 17:55:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241508 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 17:55:07 -0000 Author: mav Date: Sat Oct 13 17:55:06 2012 New Revision: 241508 URL: http://svn.freebsd.org/changeset/base/241508 Log: Extend SIM lock coverage during the bus registration process. Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_cam_sim.c Sat Oct 13 14:45:42 2012 (r241507) +++ head/sys/cam/ctl/ctl_frontend_cam_sim.c Sat Oct 13 17:55:06 2012 (r241508) @@ -175,8 +175,8 @@ cfcs_init(void) if (retval != 0) { printf("%s: ctl_frontend_register() failed with error %d!\n", __func__, retval); - retval = 1; - goto bailout; + mtx_destroy(&softc->lock); + return (1); } /* @@ -207,7 +207,7 @@ cfcs_init(void) softc->wwpn = fe->wwpn; } - + mtx_lock(&softc->lock); softc->devq = cam_simq_alloc(fe->num_requested_ctl_io); if (softc->devq == NULL) { printf("%s: error allocating devq\n", __func__); @@ -224,9 +224,7 @@ cfcs_init(void) goto bailout; } - mtx_lock(&softc->lock); if (xpt_bus_register(softc->sim, NULL, 0) != CAM_SUCCESS) { - mtx_unlock(&softc->lock); printf("%s: error registering SIM\n", __func__); retval = ENOMEM; goto bailout; @@ -236,15 +234,12 @@ cfcs_init(void) cam_sim_path(softc->sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { - mtx_unlock(&softc->lock); printf("%s: error creating path\n", __func__); xpt_bus_deregister(cam_sim_path(softc->sim)); retval = 1; goto bailout; } - mtx_unlock(&softc->lock); - xpt_setup_ccb(&csa.ccb_h, softc->path, /*priority*/ 5); csa.ccb_h.func_code = XPT_SASYNC_CB; csa.event_enable = AC_LOST_DEVICE; @@ -252,6 +247,8 @@ cfcs_init(void) csa.callback_arg = softc->sim; xpt_action((union ccb *)&csa); + mtx_unlock(&softc->lock); + return (retval); bailout: @@ -259,6 +256,8 @@ bailout: cam_sim_free(softc->sim, /*free_devq*/ TRUE); else if (softc->devq) cam_simq_free(softc->devq); + mtx_unlock(&softc->lock); + mtx_destroy(&softc->lock); return (retval); } From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 18:11:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2DC3B9E5; Sat, 13 Oct 2012 18:11:51 +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 170388FC12; Sat, 13 Oct 2012 18:11:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9DIBo3S077457; Sat, 13 Oct 2012 18:11:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9DIBon5077455; Sat, 13 Oct 2012 18:11:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210131811.q9DIBon5077455@svn.freebsd.org> From: Alexander Motin Date: Sat, 13 Oct 2012 18:11:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241509 - head/sys/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 18:11:51 -0000 Author: mav Date: Sat Oct 13 18:11:50 2012 New Revision: 241509 URL: http://svn.freebsd.org/changeset/base/241509 Log: Use xpt_create_path_unlocked() for initial debug path compilation because we are not holding respective SIM lock. Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Sat Oct 13 17:55:06 2012 (r241508) +++ head/sys/cam/cam_xpt.c Sat Oct 13 18:11:50 2012 (r241509) @@ -4797,12 +4797,7 @@ xpt_config(void *arg) /* Setup debugging path */ if (cam_dflags != CAM_DEBUG_NONE) { - /* - * Locking is specifically omitted here. No SIMs have - * registered yet, so xpt_create_path will only be searching - * empty lists of targets and devices. - */ - if (xpt_create_path(&cam_dpath, xpt_periph, + if (xpt_create_path_unlocked(&cam_dpath, xpt_periph, CAM_DEBUG_BUS, CAM_DEBUG_TARGET, CAM_DEBUG_LUN) != CAM_REQ_CMP) { printf("xpt_config: xpt_create_path() failed for debug" From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 18:24:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6FD6AFBE; Sat, 13 Oct 2012 18:24:53 +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 589B58FC1B; Sat, 13 Oct 2012 18:24:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9DIOrNN079530; Sat, 13 Oct 2012 18:24:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9DIOrVg079528; Sat, 13 Oct 2012 18:24:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210131824.q9DIOrVg079528@svn.freebsd.org> From: Alexander Motin Date: Sat, 13 Oct 2012 18:24:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241510 - head/sys/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 18:24:53 -0000 Author: mav Date: Sat Oct 13 18:24:52 2012 New Revision: 241510 URL: http://svn.freebsd.org/changeset/base/241510 Log: Don't exclude XPT SIM from locking in xpt_create_path_unlocked(). We don't want xpt periph, device, target or bus disappeared because of incorrect reference counting. Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Sat Oct 13 18:11:50 2012 (r241509) +++ head/sys/cam/cam_xpt.c Sat Oct 13 18:24:52 2012 (r241510) @@ -3441,19 +3441,14 @@ xpt_create_path_unlocked(struct cam_path struct cam_path *path; struct cam_eb *bus = NULL; cam_status status; - int need_unlock = 0; path = (struct cam_path *)malloc(sizeof(*path), M_CAMPATH, M_WAITOK); - if (path_id != CAM_BUS_WILDCARD) { - bus = xpt_find_bus(path_id); - if (bus != NULL) { - need_unlock = 1; - CAM_SIM_LOCK(bus->sim); - } - } + bus = xpt_find_bus(path_id); + if (bus != NULL) + CAM_SIM_LOCK(bus->sim); status = xpt_compile_path(path, periph, path_id, target_id, lun_id); - if (need_unlock) { + if (bus != NULL) { CAM_SIM_UNLOCK(bus->sim); xpt_release_bus(bus); } From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 18:40:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C76B0A83; Sat, 13 Oct 2012 18:40:39 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95C478FC0C; Sat, 13 Oct 2012 18:40:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9DIedTd082240; Sat, 13 Oct 2012 18:40:39 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9DIedeg082236; Sat, 13 Oct 2012 18:40:39 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201210131840.q9DIedeg082236@svn.freebsd.org> From: Gabor Kovesdan Date: Sat, 13 Oct 2012 18:40:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241511 - in head: . contrib/gnu-sort gnu/usr.bin gnu/usr.bin/sort tools/build/options usr.bin/sort X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 18:40:39 -0000 Author: gabor Date: Sat Oct 13 18:40:39 2012 New Revision: 241511 URL: http://svn.freebsd.org/changeset/base/241511 Log: - Remove GNU sort and the WITH_GNU_SORT knob Deleted: head/contrib/gnu-sort/ head/gnu/usr.bin/sort/ head/tools/build/options/WITH_GNU_SORT Modified: head/UPDATING head/gnu/usr.bin/Makefile head/usr.bin/sort/Makefile Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Oct 13 18:24:52 2012 (r241510) +++ head/UPDATING Sat Oct 13 18:40:39 2012 (r241511) @@ -24,6 +24,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20121013: + The GNU sort(1) program has been removed since the BSD-licensed + sort(1) has been the default for quite some time and no serious + problems have been reported. The corresponding WITH_GNU_SORT + knob has als gone. + 20121006: The pfil(9) API/ABI for AF_INET family has been changed. Packet filtering modules: pf(4), ipfw(4), ipfilter(4) need to be recompiled Modified: head/gnu/usr.bin/Makefile ============================================================================== --- head/gnu/usr.bin/Makefile Sat Oct 13 18:24:52 2012 (r241510) +++ head/gnu/usr.bin/Makefile Sat Oct 13 18:40:39 2012 (r241511) @@ -17,7 +17,6 @@ SUBDIR= ${_binutils} \ ${_rcs} \ sdiff \ send-pr \ - sort \ ${_texinfo} .if ${MK_CXX} != "no" Modified: head/usr.bin/sort/Makefile ============================================================================== --- head/usr.bin/sort/Makefile Sat Oct 13 18:24:52 2012 (r241510) +++ head/usr.bin/sort/Makefile Sat Oct 13 18:40:39 2012 (r241511) @@ -2,15 +2,7 @@ .include -.if ${MK_GNU_SORT} != "yes" PROG= sort -.else -PROG= bsdsort -CLEANFILES+= bsdsort.1 - -bsdsort.1: sort.1 - cp ${.ALLSRC} ${.TARGET} -.endif SRCS= bwstring.c coll.c file.c mem.c radixsort.c sort.c vsort.c From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 18:46:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 86503E00; Sat, 13 Oct 2012 18:46:47 +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 55E578FC0A; Sat, 13 Oct 2012 18:46:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9DIklAA083650; Sat, 13 Oct 2012 18:46:47 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9DIklla083645; Sat, 13 Oct 2012 18:46:47 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210131846.q9DIklla083645@svn.freebsd.org> From: Alan Cox Date: Sat, 13 Oct 2012 18:46:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241512 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 18:46:47 -0000 Author: alc Date: Sat Oct 13 18:46:46 2012 New Revision: 241512 URL: http://svn.freebsd.org/changeset/base/241512 Log: Eliminate the conditional for releasing the page queues lock in vm_page_sleep(). vm_page_sleep() is no longer called with this lock held. Eliminate assertions that the page queues lock is NOT held. These assertions won't translate well to having distinct locks on the active and inactive page queues, and they really aren't that useful. MFC after: 3 weeks Modified: head/sys/vm/vm_object.c head/sys/vm/vm_page.c head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Sat Oct 13 18:40:39 2012 (r241511) +++ head/sys/vm/vm_object.c Sat Oct 13 18:46:46 2012 (r241512) @@ -820,7 +820,6 @@ vm_object_page_clean(vm_object_t object, int curgeneration, n, pagerflags; boolean_t clearobjflags, eio, res; - mtx_assert(&vm_page_queue_mtx, MA_NOTOWNED); VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); KASSERT(object->type == OBJT_VNODE, ("Not a vnode object")); if ((object->flags & OBJ_MIGHTBEDIRTY) == 0 || @@ -906,7 +905,6 @@ vm_object_page_collect_flush(vm_object_t vm_page_t ma[vm_pageout_page_count], p_first, tp; int count, i, mreq, runlen; - mtx_assert(&vm_page_queue_mtx, MA_NOTOWNED); vm_page_lock_assert(p, MA_NOTOWNED); VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sat Oct 13 18:40:39 2012 (r241511) +++ head/sys/vm/vm_page.c Sat Oct 13 18:46:46 2012 (r241512) @@ -736,7 +736,7 @@ vm_page_readahead_finish(vm_page_t m) /* * vm_page_sleep: * - * Sleep and release the page and page queues locks. + * Sleep and release the page lock. * * The object containing the given page must be locked. */ @@ -745,8 +745,6 @@ vm_page_sleep(vm_page_t m, const char *m { VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); - if (mtx_owned(&vm_page_queue_mtx)) - vm_page_unlock_queues(); if (mtx_owned(vm_page_lockptr(m))) vm_page_unlock(m); @@ -2933,7 +2931,6 @@ vm_page_cowfault(vm_page_t m) vm_object_t object; vm_pindex_t pindex; - mtx_assert(&vm_page_queue_mtx, MA_NOTOWNED); vm_page_lock_assert(m, MA_OWNED); object = m->object; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sat Oct 13 18:40:39 2012 (r241511) +++ head/sys/vm/vm_pageout.c Sat Oct 13 18:46:46 2012 (r241512) @@ -476,7 +476,6 @@ vm_pageout_flush(vm_page_t *mc, int coun int i, runlen; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_NOTOWNED); /* * Initiate I/O. Bump the vm_page_t->busy counter and From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 19:29:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B3CCFF69; Sat, 13 Oct 2012 19:29:08 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83CF08FC1B; Sat, 13 Oct 2012 19:29:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9DJT8eH091430; Sat, 13 Oct 2012 19:29:08 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9DJT85B091428; Sat, 13 Oct 2012 19:29:08 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201210131929.q9DJT85B091428@svn.freebsd.org> From: Gabor Kovesdan Date: Sat, 13 Oct 2012 19:29:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241513 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 19:29:08 -0000 Author: gabor Date: Sat Oct 13 19:29:07 2012 New Revision: 241513 URL: http://svn.freebsd.org/changeset/base/241513 Log: - Remove WITH_GNU_SORT support Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Sat Oct 13 18:46:46 2012 (r241512) +++ head/share/mk/bsd.own.mk Sat Oct 13 19:29:07 2012 (r241513) @@ -428,7 +428,6 @@ __DEFAULT_NO_OPTIONS = \ CLANG_EXTRAS \ CLANG_IS_CC \ CTF \ - GNU_SORT \ HESIOD \ ICONV \ IDEA \ From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 19:29:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A8D6F154; Sat, 13 Oct 2012 19:29:38 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 926808FC17; Sat, 13 Oct 2012 19:29:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9DJTcUL091543; Sat, 13 Oct 2012 19:29:38 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9DJTcW9091541; Sat, 13 Oct 2012 19:29:38 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201210131929.q9DJTcW9091541@svn.freebsd.org> From: Gabor Kovesdan Date: Sat, 13 Oct 2012 19:29:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241514 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 19:29:38 -0000 Author: gabor Date: Sat Oct 13 19:29:38 2012 New Revision: 241514 URL: http://svn.freebsd.org/changeset/base/241514 Log: - Regen after GNU sort removal Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sat Oct 13 19:29:07 2012 (r241513) +++ head/share/man/man5/src.conf.5 Sat Oct 13 19:29:38 2012 (r241514) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb .\" $FreeBSD$ -.Dd October 6, 2012 +.Dd October 13, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -449,9 +449,6 @@ When set, it also enforces the following .It .Va WITHOUT_GNU_SUPPORT .El -.It Va WITH_GNU_SORT -.\" from FreeBSD: head/tools/build/options/WITH_GNU_SORT 237629 2012-06-27 05:59:01Z gabor -Install GNU-licensed sort as 'sort' instead of BSD sort. .It Va WITHOUT_GNU_SUPPORT .\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without optional GNU support. From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 19:37:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 443534BB; Sat, 13 Oct 2012 19:37:59 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D5F18FC18; Sat, 13 Oct 2012 19:37:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9DJbx5K092908; Sat, 13 Oct 2012 19:37:59 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9DJbwqW092906; Sat, 13 Oct 2012 19:37:58 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201210131937.q9DJbwqW092906@svn.freebsd.org> From: Gabor Kovesdan Date: Sat, 13 Oct 2012 19:37:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241515 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 19:37:59 -0000 Author: gabor Date: Sat Oct 13 19:37:58 2012 New Revision: 241515 URL: http://svn.freebsd.org/changeset/base/241515 Log: - Fix typo Spotted by: glebius Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Oct 13 19:29:38 2012 (r241514) +++ head/UPDATING Sat Oct 13 19:37:58 2012 (r241515) @@ -28,7 +28,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 The GNU sort(1) program has been removed since the BSD-licensed sort(1) has been the default for quite some time and no serious problems have been reported. The corresponding WITH_GNU_SORT - knob has als gone. + knob has also gone. 20121006: The pfil(9) API/ABI for AF_INET family has been changed. Packet From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 19:53:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1BC95805; Sat, 13 Oct 2012 19:53:12 +0000 (UTC) (envelope-from kargl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DFEFE8FC0A; Sat, 13 Oct 2012 19:53:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9DJrBEC096284; Sat, 13 Oct 2012 19:53:11 GMT (envelope-from kargl@svn.freebsd.org) Received: (from kargl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9DJrBi0096282; Sat, 13 Oct 2012 19:53:11 GMT (envelope-from kargl@svn.freebsd.org) Message-Id: <201210131953.q9DJrBi0096282@svn.freebsd.org> From: Steve Kargl Date: Sat, 13 Oct 2012 19:53:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241516 - head/lib/msun/ld80 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 19:53:12 -0000 Author: kargl Date: Sat Oct 13 19:53:11 2012 New Revision: 241516 URL: http://svn.freebsd.org/changeset/base/241516 Log: * Update the comment that explains the choice of values in the table and the requirement on trailing zero bits. * Remove the __aligned() compiler directives as these were found to have a negative effect on the produced code. Submitted by: bde Approved by: das (mentor) Modified: head/lib/msun/ld80/s_expl.c Modified: head/lib/msun/ld80/s_expl.c ============================================================================== --- head/lib/msun/ld80/s_expl.c Sat Oct 13 19:37:58 2012 (r241515) +++ head/lib/msun/ld80/s_expl.c Sat Oct 13 19:53:11 2012 (r241516) @@ -64,7 +64,7 @@ o_threshold = LD80C(0xb17217f7d1cf79ab, /* log(2**(-16381-64-1)) rounded towards zero: */ u_threshold = LD80C(0xb21dfe7f09e2baa9, 13, -11399.4985314888605581L); -static const double __aligned(64) +static const double /* * ln2/INTERVALS = L1+L2 (hi+lo decomposition for multiplication). L1 must * have at least 22 (= log2(|LDBL_MIN_EXP-extras|) + log2(INTERVALS)) lowest @@ -86,17 +86,18 @@ P6 = 1.3888891738560272e-3; /* 0x16c1 /* * 2^(i/INTERVALS) for i in [0,INTERVALS] is represented by two values where - * the first 53 bits of the significand is stored in hi and the next 53 - * bits are in lo. Tang's paper states that the trailing 6 bits of hi should + * the first 53 bits of the significand are stored in hi and the next 53 + * bits are in lo. Tang's paper states that the trailing 6 bits of hi must * be zero for his algorithm in both single and double precision, because * the table is re-used in the implementation of expm1() where a floating - * point addition involving hi must be exact. The conversion of a 53-bit - * double into a 64-bit long double gives 11 trailing bit, which are zero. + * point addition involving hi must be exact. Here hi is double, so + * converting it to long double gives 11 trailing zero bits. */ static const struct { double hi; double lo; -} s[INTERVALS] __aligned(16) = { +/* XXX should rename 's'. */ +} s[INTERVALS] = { 0x1p+0, 0x0p+0, 0x1.0163da9fb3335p+0, 0x1.b61299ab8cdb7p-54, 0x1.02c9a3e778060p+0, 0x1.dcdef95949ef4p-53, From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 20:19:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B73E6D93; Sat, 13 Oct 2012 20:19:43 +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 950DB8FC08; Sat, 13 Oct 2012 20:19:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9DKJhW2000751; Sat, 13 Oct 2012 20:19:43 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9DKJh3e000747; Sat, 13 Oct 2012 20:19:43 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210132019.q9DKJh3e000747@svn.freebsd.org> From: Alan Cox Date: Sat, 13 Oct 2012 20:19:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241517 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 20:19:43 -0000 Author: alc Date: Sat Oct 13 20:19:43 2012 New Revision: 241517 URL: http://svn.freebsd.org/changeset/base/241517 Log: Move vm_page_requeue() to the only file that uses it. MFC after: 3 weeks Modified: head/sys/vm/vm_page.c head/sys/vm/vm_page.h head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sat Oct 13 19:53:11 2012 (r241516) +++ head/sys/vm/vm_page.c Sat Oct 13 20:19:43 2012 (r241517) @@ -1868,28 +1868,6 @@ vm_waitpfault(void) } /* - * vm_page_requeue: - * - * Move the given page to the tail of its present page queue. - * - * The page queues must be locked. - */ -void -vm_page_requeue(vm_page_t m) -{ - struct vpgqueues *vpq; - int queue; - - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - queue = m->queue; - KASSERT(queue != PQ_NONE, - ("vm_page_requeue: page %p is not queued", m)); - vpq = &vm_page_queues[queue]; - TAILQ_REMOVE(&vpq->pl, m, pageq); - TAILQ_INSERT_TAIL(&vpq->pl, m, pageq); -} - -/* * vm_page_queue_remove: * * Remove the given page from the specified queue. Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Sat Oct 13 19:53:11 2012 (r241516) +++ head/sys/vm/vm_page.h Sat Oct 13 20:19:43 2012 (r241517) @@ -392,7 +392,6 @@ void vm_page_readahead_finish(vm_page_t void vm_page_reference(vm_page_t m); void vm_page_remove (vm_page_t); void vm_page_rename (vm_page_t, vm_object_t, vm_pindex_t); -void vm_page_requeue(vm_page_t m); void vm_page_set_valid_range(vm_page_t m, int base, int size); void vm_page_sleep(vm_page_t m, const char *msg); vm_page_t vm_page_splay(vm_pindex_t, vm_page_t); Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sat Oct 13 19:53:11 2012 (r241516) +++ head/sys/vm/vm_pageout.c Sat Oct 13 20:19:43 2012 (r241517) @@ -218,6 +218,7 @@ static void vm_req_vmdaemon(int req); #endif static boolean_t vm_pageout_page_lock(vm_page_t, vm_page_t *); static void vm_pageout_page_stats(void); +static void vm_pageout_requeue(vm_page_t m); /* * Initialize a dummy page for marking the caller's place in the specified @@ -749,7 +750,7 @@ vm_pageout_object_deactivate_pages(pmap_ vm_page_deactivate(p); } else { vm_page_lock_queues(); - vm_page_requeue(p); + vm_pageout_requeue(p); vm_page_unlock_queues(); } } else { @@ -758,7 +759,7 @@ vm_pageout_object_deactivate_pages(pmap_ ACT_ADVANCE) p->act_count += ACT_ADVANCE; vm_page_lock_queues(); - vm_page_requeue(p); + vm_pageout_requeue(p); vm_page_unlock_queues(); } } else if (p->queue == PQ_INACTIVE) @@ -855,6 +856,26 @@ vm_pageout_map_deactivate_pages(map, des #endif /* !defined(NO_SWAPPING) */ /* + * vm_pageout_requeue: + * + * Move the specified page to the tail of its present page queue. + * + * The page queues must be locked. + */ +static void +vm_pageout_requeue(vm_page_t m) +{ + struct vpgqueues *vpq; + + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + KASSERT(m->queue != PQ_NONE, + ("vm_pageout_requeue: page %p is not queued", m)); + vpq = &vm_page_queues[m->queue]; + TAILQ_REMOVE(&vpq->pl, m, pageq); + TAILQ_INSERT_TAIL(&vpq->pl, m, pageq); +} + +/* * vm_pageout_scan does the dirty work for the pageout daemon. */ static void @@ -1097,7 +1118,7 @@ vm_pageout_scan(int pass) m->flags |= PG_WINATCFLS; vm_page_lock_queues(); queues_locked = TRUE; - vm_page_requeue(m); + vm_pageout_requeue(m); } else if (maxlaunder > 0) { /* * We always want to try to flush some dirty pages if @@ -1128,7 +1149,7 @@ vm_pageout_scan(int pass) vm_page_unlock(m); VM_OBJECT_UNLOCK(object); queues_locked = TRUE; - vm_page_requeue(m); + vm_pageout_requeue(m); goto relock_queues; } @@ -1216,7 +1237,7 @@ vm_pageout_scan(int pass) */ if (m->hold_count) { vm_page_unlock(m); - vm_page_requeue(m); + vm_pageout_requeue(m); if (object->flags & OBJ_MIGHTBEDIRTY) vnodes_skipped++; goto unlock_and_continue; @@ -1321,7 +1342,7 @@ relock_queues: (m->hold_count != 0)) { vm_page_unlock(m); VM_OBJECT_UNLOCK(object); - vm_page_requeue(m); + vm_pageout_requeue(m); m = next; continue; } @@ -1358,7 +1379,7 @@ relock_queues: * page activation count stats. */ if (actcount && (object->ref_count != 0)) { - vm_page_requeue(m); + vm_pageout_requeue(m); } else { m->act_count -= min(m->act_count, ACT_DECLINE); if (vm_pageout_algorithm || @@ -1376,7 +1397,7 @@ relock_queues: vm_page_deactivate(m); } } else { - vm_page_requeue(m); + vm_pageout_requeue(m); } } vm_page_unlock(m); @@ -1588,7 +1609,7 @@ vm_pageout_page_stats() (m->hold_count != 0)) { vm_page_unlock(m); VM_OBJECT_UNLOCK(object); - vm_page_requeue(m); + vm_pageout_requeue(m); m = next; continue; } @@ -1604,7 +1625,7 @@ vm_pageout_page_stats() m->act_count += ACT_ADVANCE + actcount; if (m->act_count > ACT_MAX) m->act_count = ACT_MAX; - vm_page_requeue(m); + vm_pageout_requeue(m); } else { if (m->act_count == 0) { /* @@ -1620,7 +1641,7 @@ vm_pageout_page_stats() vm_page_deactivate(m); } else { m->act_count -= min(m->act_count, ACT_DECLINE); - vm_page_requeue(m); + vm_pageout_requeue(m); } } vm_page_unlock(m); From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 21:17:54 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8C13DDE8; Sat, 13 Oct 2012 21:17:54 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [8.8.178.135]) by mx1.freebsd.org (Postfix) with ESMTP id 6BD968FC0A; Sat, 13 Oct 2012 21:17:54 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q9DLHs6n085555; Sat, 13 Oct 2012 21:17:54 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q9DLHsUQ085554; Sat, 13 Oct 2012 21:17:54 GMT (envelope-from bapt@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f Date: Sat, 13 Oct 2012 23:17:52 +0200 From: Baptiste Daroussin To: Eitan Adler Subject: Re: svn commit: r241474 - stable/7/usr.sbin/syslogd Message-ID: <20121013211752.GE43011@ithaqua.etoilebsd.net> References: <201210120210.q9C2ARnS023567@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jKBxcB1XkHIR0Eqt" Content-Disposition: inline In-Reply-To: <201210120210.q9C2ARnS023567@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 21:17:54 -0000 --jKBxcB1XkHIR0Eqt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 12, 2012 at 02:10:27AM +0000, Eitan Adler wrote: > Author: eadler > Date: Fri Oct 12 02:10:27 2012 > New Revision: 241474 > URL: http://svn.freebsd.org/changeset/base/241474 >=20 > Log: > MFC r240389,r240409: > - Add support for ipv6 addresses as destination > - Add documentation for IPv6 support > =20 > PR: docs/171580 > Approved by: cperciva (implicit) >=20 > Modified: > stable/7/usr.sbin/syslogd/syslog.conf.5 > stable/7/usr.sbin/syslogd/syslogd.c > Directory Properties: > stable/7/usr.sbin/syslogd/ (props changed) >=20 > Modified: stable/7/usr.sbin/syslogd/syslog.conf.5 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/7/usr.sbin/syslogd/syslog.conf.5 Fri Oct 12 02:10:27 2012 (r24= 1473) > +++ stable/7/usr.sbin/syslogd/syslog.conf.5 Fri Oct 12 02:10:27 2012 (r24= 1474) > @@ -28,7 +28,7 @@ > .\" @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93 > .\" $FreeBSD$ > .\" > -.Dd December 23, 2008 > +.Dd September 12, 2012 > .Dt SYSLOG.CONF 5 > .Os > .Sh NAME > @@ -347,6 +347,14 @@ If a port number is added after a colon > .Pq Ql :\& > then that port will be used as the destination port > rather than the usual syslog port. > +IPv6 addresses can be used > +by surrounding the address portion with > +square brackets > +.Po > +.Ql [\& > +and > +.Ql ]\& > +.Pc . > .It > A comma separated list of users. > Selected messages are written to those users >=20 > Modified: stable/7/usr.sbin/syslogd/syslogd.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 > --- stable/7/usr.sbin/syslogd/syslogd.c Fri Oct 12 02:10:27 2012 (r241473) > +++ stable/7/usr.sbin/syslogd/syslogd.c Fri Oct 12 02:10:27 2012 (r241474) > @@ -1935,6 +1935,7 @@ cfline(const char *line, struct filed *f > case '@': > { > char *tp; > + char endkey =3D ':'; > /* > * scan forward to see if there is a port defined. > * so we can't use strlcpy.. > @@ -1943,9 +1944,19 @@ cfline(const char *line, struct filed *f > tp =3D f->f_un.f_forw.f_hname; > p++; > =20 > - while (*p && (*p !=3D ':') && (i-- > 0)) { > + /* > + * an ipv6 address should start with a '[' in that case > + * we should scan for a ']' > + */ > + if (*p =3D=3D '[') { > + p++; > + endkey =3D ']'; > + } > + while (*p && (*p !=3D endkey) && (i-- > 0)) { > *tp++ =3D *p++; > } > + if (endkey =3D=3D ']' && *p =3D=3D endkey) > + p++; > *tp =3D '\0'; > } > /* See if we copied a domain and have a port */ > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" This is missing the information about the original PR: bin/150530 which should btw have been closed. Anyway thanks for the MFC. regards, Bapt --jKBxcB1XkHIR0Eqt Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlB52oAACgkQ8kTtMUmk6ExEagCfThDRirT0SMfBjeEprMzBh7xZ wQ8An1rtjSZEeg1vawhP57VO1E400Nsu =3JWn -----END PGP SIGNATURE----- --jKBxcB1XkHIR0Eqt-- From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 22:22:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6D413BB6; Sat, 13 Oct 2012 22:22:54 +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 4AE8B8FC0A; Sat, 13 Oct 2012 22:22:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9DMMsm2020627; Sat, 13 Oct 2012 22:22:54 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9DMMsql020624; Sat, 13 Oct 2012 22:22:54 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210132222.q9DMMsql020624@svn.freebsd.org> From: Alan Cox Date: Sat, 13 Oct 2012 22:22:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241518 - in stable/9/sys/i386: i386 xen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 22:22:54 -0000 Author: alc Date: Sat Oct 13 22:22:53 2012 New Revision: 241518 URL: http://svn.freebsd.org/changeset/base/241518 Log: MFC r241353, r241356, r241400 To avoid page table page corruption, change pmap_pv_reclaim()'s method of mapping page table pages. Add some assertions that were helpful in debugging the page table page corruption. Modified: stable/9/sys/i386/i386/pmap.c stable/9/sys/i386/xen/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/i386/i386/pmap.c ============================================================================== --- stable/9/sys/i386/i386/pmap.c Sat Oct 13 20:19:43 2012 (r241517) +++ stable/9/sys/i386/i386/pmap.c Sat Oct 13 22:22:53 2012 (r241518) @@ -482,7 +482,8 @@ pmap_bootstrap(vm_paddr_t firstaddr) KPTmap -= i386_btop(KPTDI << PDRSHIFT); /* - * ptemap is used for pmap_pte_quick + * PADDR1 and PADDR2 are used by pmap_pte_quick() and pmap_pte(), + * respectively. */ SYSMAP(pt_entry_t *, PMAP1, PADDR1, 1) SYSMAP(pt_entry_t *, PMAP2, PADDR2, 1) @@ -2235,7 +2236,6 @@ pmap_pv_reclaim(pmap_t locked_pmap) pmap = NULL; free = m_pc = NULL; TAILQ_INIT(&newtail); - sched_pin(); while ((pc = TAILQ_FIRST(&pv_chunks)) != NULL && (pv_vafree == 0 || free == NULL)) { TAILQ_REMOVE(&pv_chunks, pc, pc_lru); @@ -2269,10 +2269,16 @@ pmap_pv_reclaim(pmap_t locked_pmap) pde = pmap_pde(pmap, va); if ((*pde & PG_PS) != 0) continue; - pte = pmap_pte_quick(pmap, va); - if ((*pte & PG_W) != 0) + pte = pmap_pte(pmap, va); + tpte = *pte; + if ((tpte & PG_W) == 0) + tpte = pte_load_clear(pte); + pmap_pte_release(pte); + if ((tpte & PG_W) != 0) continue; - tpte = pte_load_clear(pte); + KASSERT(tpte != 0, + ("pmap_pv_reclaim: pmap %p va %x zero pte", + pmap, va)); if ((tpte & PG_G) != 0) pmap_invalidate_page(pmap, va); m = PHYS_TO_VM_PAGE(tpte & PG_FRAME); @@ -2330,7 +2336,6 @@ pmap_pv_reclaim(pmap_t locked_pmap) } } out: - sched_unpin(); TAILQ_CONCAT(&pv_chunks, &newtail, pc_lru); if (pmap != NULL) { pmap_invalidate_all(pmap); @@ -2870,6 +2875,8 @@ pmap_remove_pte(pmap_t pmap, pt_entry_t rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); oldpte = pte_load_clear(ptq); + KASSERT(oldpte != 0, + ("pmap_remove_pte: pmap %p va %x zero pte", pmap, va)); if (oldpte & PG_W) pmap->pm_stats.wired_count -= 1; /* @@ -3074,6 +3081,8 @@ small_mappings: " a 4mpage in page %p's pv list", m)); pte = pmap_pte_quick(pmap, pv->pv_va); tpte = pte_load_clear(pte); + KASSERT(tpte != 0, ("pmap_remove_all: pmap %p va %x zero pte", + pmap, pv->pv_va)); if (tpte & PG_W) pmap->pm_stats.wired_count--; if (tpte & PG_A) @@ -4373,6 +4382,8 @@ pmap_remove_pages(pmap_t pmap) PMAP_LOCK(pmap); sched_pin(); TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { + KASSERT(pc->pc_pmap == pmap, ("Wrong pmap %p %p", pmap, + pc->pc_pmap)); allfree = 1; for (field = 0; field < _NPCM; field++) { inuse = ~pc->pc_map[field] & pc_freemask[field]; Modified: stable/9/sys/i386/xen/pmap.c ============================================================================== --- stable/9/sys/i386/xen/pmap.c Sat Oct 13 20:19:43 2012 (r241517) +++ stable/9/sys/i386/xen/pmap.c Sat Oct 13 22:22:53 2012 (r241518) @@ -437,7 +437,8 @@ pmap_bootstrap(vm_paddr_t firstaddr) SYSMAP(struct msgbuf *, unused, msgbufp, atop(round_page(msgbufsize))) /* - * ptemap is used for pmap_pte_quick + * PADDR1 and PADDR2 are used by pmap_pte_quick() and pmap_pte(), + * respectively. */ SYSMAP(pt_entry_t *, PMAP1, PADDR1, 1) SYSMAP(pt_entry_t *, PMAP2, PADDR2, 1) @@ -1986,7 +1987,6 @@ pmap_pv_reclaim(pmap_t locked_pmap) pmap = NULL; free = m_pc = NULL; TAILQ_INIT(&newtail); - sched_pin(); while ((pc = TAILQ_FIRST(&pv_chunks)) != NULL && (pv_vafree == 0 || free == NULL)) { TAILQ_REMOVE(&pv_chunks, pc, pc_lru); @@ -2017,10 +2017,16 @@ pmap_pv_reclaim(pmap_t locked_pmap) bit = bsfl(inuse); pv = &pc->pc_pventry[field * 32 + bit]; va = pv->pv_va; - pte = pmap_pte_quick(pmap, va); - if ((*pte & PG_W) != 0) + pte = pmap_pte(pmap, va); + tpte = *pte; + if ((tpte & PG_W) == 0) + tpte = pte_load_clear(pte); + pmap_pte_release(pte); + if ((tpte & PG_W) != 0) continue; - tpte = pte_load_clear(pte); + KASSERT(tpte != 0, + ("pmap_pv_reclaim: pmap %p va %x zero pte", + pmap, va)); if ((tpte & PG_G) != 0) pmap_invalidate_page(pmap, va); m = PHYS_TO_VM_PAGE(tpte & PG_FRAME); @@ -2072,7 +2078,6 @@ pmap_pv_reclaim(pmap_t locked_pmap) } } out: - sched_unpin(); TAILQ_CONCAT(&pv_chunks, &newtail, pc_lru); if (pmap != NULL) { pmap_invalidate_all(pmap); @@ -2294,6 +2299,8 @@ pmap_remove_pte(pmap_t pmap, pt_entry_t PMAP_LOCK_ASSERT(pmap, MA_OWNED); oldpte = *ptq; PT_SET_VA_MA(ptq, 0, TRUE); + KASSERT(oldpte != 0, + ("pmap_remove_pte: pmap %p va %x zero pte", pmap, va)); if (oldpte & PG_W) pmap->pm_stats.wired_count -= 1; /* @@ -2478,6 +2485,8 @@ pmap_remove_all(vm_page_t m) pte = pmap_pte_quick(pmap, pv->pv_va); tpte = *pte; PT_SET_VA_MA(pte, 0, TRUE); + KASSERT(tpte != 0, ("pmap_remove_all: pmap %p va %x zero pte", + pmap, pv->pv_va)); if (tpte & PG_W) pmap->pm_stats.wired_count--; if (tpte & PG_A) @@ -3541,6 +3550,8 @@ pmap_remove_pages(pmap_t pmap) PMAP_LOCK(pmap); sched_pin(); TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { + KASSERT(pc->pc_pmap == pmap, ("Wrong pmap %p %p", pmap, + pc->pc_pmap)); allfree = 1; for (field = 0; field < _NPCM; field++) { inuse = ~pc->pc_map[field] & pc_freemask[field]; From owner-svn-src-all@FreeBSD.ORG Sat Oct 13 23:54:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 49DC0EBF; Sat, 13 Oct 2012 23:54:27 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F4FB8FC0A; Sat, 13 Oct 2012 23:54:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9DNsREq034604; Sat, 13 Oct 2012 23:54:27 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9DNsQLJ034593; Sat, 13 Oct 2012 23:54:26 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201210132354.q9DNsQLJ034593@svn.freebsd.org> From: Attilio Rao Date: Sat, 13 Oct 2012 23:54:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241519 - in head: . sbin sbin/mount_fusefs sys/conf sys/fs/fuse sys/modules sys/modules/fuse X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 13 Oct 2012 23:54:27 -0000 Author: attilio Date: Sat Oct 13 23:54:26 2012 New Revision: 241519 URL: http://svn.freebsd.org/changeset/base/241519 Log: Import a FreeBSD port of the FUSE Linux module. This has been developed during 2 summer of code mandates and being revived by gnn recently. The functionality in this commit mirrors entirely content of fusefs-kmod port, which doesn't need to be installed anymore for -CURRENT setups. In order to get some sparse technical notes, please refer to: http://lists.freebsd.org/pipermail/freebsd-fs/2012-March/013876.html or to the project branch: svn://svn.freebsd.org/base/projects/fuse/ which also contains granular history of changes happened during port refinements. This commit does not came from the branch reintegration itself because it seems svn is not behaving properly for this functionaly at the moment. Partly Sponsored by: Google, Summer of Code program 2005, 2011 Originally submitted by: ilya, Csaba Henk In collabouration with: pho Tested by: flo, gnn, Gustau Perez, Kevin Oberman MFC after: 2 months Added: head/sbin/mount_fusefs/ head/sbin/mount_fusefs/Makefile (contents, props changed) head/sbin/mount_fusefs/mount_fusefs.8 (contents, props changed) head/sbin/mount_fusefs/mount_fusefs.c (contents, props changed) head/sys/fs/fuse/ head/sys/fs/fuse/fuse.h (contents, props changed) head/sys/fs/fuse/fuse_debug.h (contents, props changed) head/sys/fs/fuse/fuse_device.c (contents, props changed) head/sys/fs/fuse/fuse_file.c (contents, props changed) head/sys/fs/fuse/fuse_file.h (contents, props changed) head/sys/fs/fuse/fuse_internal.c (contents, props changed) head/sys/fs/fuse/fuse_internal.h (contents, props changed) head/sys/fs/fuse/fuse_io.c (contents, props changed) head/sys/fs/fuse/fuse_io.h (contents, props changed) head/sys/fs/fuse/fuse_ipc.c (contents, props changed) head/sys/fs/fuse/fuse_ipc.h (contents, props changed) head/sys/fs/fuse/fuse_kernel.h (contents, props changed) head/sys/fs/fuse/fuse_main.c (contents, props changed) head/sys/fs/fuse/fuse_node.c (contents, props changed) head/sys/fs/fuse/fuse_node.h (contents, props changed) head/sys/fs/fuse/fuse_param.h (contents, props changed) head/sys/fs/fuse/fuse_vfsops.c (contents, props changed) head/sys/fs/fuse/fuse_vnops.c (contents, props changed) head/sys/modules/fuse/ head/sys/modules/fuse/Makefile (contents, props changed) Modified: head/UPDATING head/sbin/Makefile head/sys/conf/NOTES head/sys/conf/files head/sys/conf/options head/sys/modules/Makefile Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Oct 13 22:22:53 2012 (r241518) +++ head/UPDATING Sat Oct 13 23:54:26 2012 (r241519) @@ -24,6 +24,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20121014: + Import the FUSE kernel and userland support into base system. + 20121013: The GNU sort(1) program has been removed since the BSD-licensed sort(1) has been the default for quite some time and no serious Modified: head/sbin/Makefile ============================================================================== --- head/sbin/Makefile Sat Oct 13 22:22:53 2012 (r241518) +++ head/sbin/Makefile Sat Oct 13 23:54:26 2012 (r241519) @@ -49,6 +49,7 @@ SUBDIR=adjkerntz \ mksnap_ffs \ mount \ mount_cd9660 \ + mount_fusefs \ mount_msdosfs \ mount_nfs \ mount_ntfs \ Added: head/sbin/mount_fusefs/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/mount_fusefs/Makefile Sat Oct 13 23:54:26 2012 (r241519) @@ -0,0 +1,33 @@ +# $FreeBSD$ + +.if defined(DEBUG) +DEBUG_FLAGS+= -D_DEBUG -g +.endif + +.if defined(DEBUG2G) +DEBUG_FLAGS+= -D_DEBUG2G -g +.endif + +.if defined(DEBUG3G) +DEBUG_FLAGS+= -D_DEBUG3G -g +.endif + +.if defined(DEBUG_MSG) +DEBUG_FLAGS+= -D_DEBUG_MSG +.endif + +.if defined(F4BVERS) +DEBUG_FLAGS+= -DFUSE4BSD_VERSION="\"${F4BVERS}\"" +.endif + +PROG= mount_fusefs +SRCS= mount_fusefs.c getmntopts.c +MAN8= mount_fusefs.8 +NO_MANCOMPRESS?= yes + +MOUNT= ${.CURDIR}/../mount +CFLAGS+= -I${MOUNT} + +.PATH: ${MOUNT} + +.include Added: head/sbin/mount_fusefs/mount_fusefs.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/mount_fusefs/mount_fusefs.8 Sat Oct 13 23:54:26 2012 (r241519) @@ -0,0 +1,363 @@ +.\" Copyright (c) 1980, 1989, 1991, 1993 +.\" The Regents of the University of California. +.\" Copyright (c) 2005, 2006 Csaba Henk +.\" 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. +.\" 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$ +.\" +.Dd October 11, 2012 +.Dt MOUNT_FUSEFS 8 +.Os +.Sh NAME +.Nm mount_fusefs +.Nd mount a Fuse file system daemon +.Sh SYNOPSIS +.Nm +.Op Fl A +.Op Fl S +.Op Fl v +.Op Fl D Ar fuse_daemon +.Op Fl O Ar daemon_opts +.Op Fl s Ar special +.Op Fl m Ar node +.Op Fl h +.Op Fl V +.Op Fl o Ar option ... +.Ar special node +.Op Ar fuse_daemon ... +.Sh DESCRIPTION +Basic usage is to start a fuse daemon on the given +.Ar special +file. In practice, the daemon is assigned a +.Ar special +file automatically, which can then be indentified via +.Xr fstat 1 . +That special file can then be mounted by +.Nm . +.Pp +However, the procedure of spawning a daemon will usually be automated +so that it is performed by +.Nm . +If the command invoking a given +.Ar fuse_daemon +is appended to the list of arguments, +.Nm +will call the +.Ar fuse_daemon +via that command. In that way the +.Ar fuse_daemon +will be instructed to attach itself to +.Ar special . +From that on mounting goes as in the simple case. (See +.Sx DAEMON MOUNTS . ) +.Pp +The +.Ar special +argument normally will be treated as the path of the special file to mount. +.Pp +However, if +.Pa auto +is passed as +.Ar special , +then +.Nm +will look for a suitable free fuse device by itself. +.Pp +Finally, if +.Ar special +is an integer it will be interpreted as the number +of the file descriptor of an already open fuse device +(used when the Fuse library invokes +.Nm . +(See +.Sx DAEMON MOUNTS ) . +.Pp +The options are as follows: +.Bl -tag -width indent +.It Fl A , Ic --reject-allow_other +Prohibit the +.Cm allow_other +mount flag. Intended for use in scripts and the +.Xr sudoers 5 +file. +.It Fl S , Ic --safe +Run in safe mode (i.e. reject invoking a filesystem daemon) +.It Fl v +Be verbose +.It Fl D, Ic --daemon Ar daemon +Call the specified +.Ar daemon +.It Fl O, Ic --daemon_opts Ar opts +Add +.Ar opts +to the daemon's command line +.It Fl s, Ic --special Ar special +Use +.Ar special +as special +.It Fl m, Ic --mountpath Ar node +Mount on +.Ar node +.It Fl h, Ic --help +Show help +.It Fl V, Ic --version +Show version information +.It Fl o +Mount options are specified via +.Fl o . +The following options are available (and also their negated versions, +by prefixing them with +.Dq no ) : +.Bl -tag -width indent +.It Cm default_permissions +Enable traditional (file mode based) permission checking in kernel +.It Cm allow_other +Do not apply +.Sx STRICT ACCESS POLICY . +Only root can use this option +.It Cm max_read Ns = Ns Ar n +Limit size of read requests to +.Ar n +.It Cm private +Refuse shared mounting of the daemon. This is the default behaviour, +to allow sharing, expicitly use +.Fl o Cm noprivate +.It Cm neglect_shares +Don't refuse unmounting if there are secondary mounts +.It Cm push_symlinks_in +Prefix absolute symlinks with the mountpoint +.El +.Pp +.El +.Pp +Besides the above mount options, there is a set of pseudo-mount options which +are supported by the Fuse library. One can list these by passing +.Fl h +to a Fuse daemon. Most of these options have effect only on the behaviour of +the daemon (that is, their scope is limited to userspace). However, +there are some which do require in-kernel support. +Currently the options supported by the kernel are: +.Bl -tag -width indent +.It Cm direct_io +Bypass the buffer cache system +.It Cm kernel_cache +By default cached buffers of a given file are flushed at each +.Xr open 2 . +This option disables this behaviour +.El +.Sh DAEMON MOUNTS +Usually users don't need to use +.Nm +directly, as the Fuse library enables Fuse daemons to invoke +.Nm . +That is, +.Pp +.Dl fuse_daemon device mountpoint +.Pp +has the same effect as +.Pp +.Dl mount_fusefs auto mountpoint fuse_daemon +.Pp +This is the recommended usage when you want basic usage +(eg, run the daemon at a low privilege level but mount it as root). +.Sh STRICT ACCESS POLICY +The strict access policy for Fuse filesystems lets one to use the filesystem +only if the filesystem daemon has the same credentials (uid, real uid, gid, +real gid) as the user. +.Pp +This is applied for Fuse mounts by default and only root can mount without +the strict access policy (ie. the +.Cm allow_other +mount option). +.Pp +This is to shield users from the daemon +.Dq spying +on their I/O activities. +.Pp +Users might opt to willingly relax strict access policy (as far they +are concerned) by doing their own secondary mount (See +.Sx SHARED MOUNTS ) . +.Sh SHARED MOUNTS +A Fuse daemon can be shared (ie. mounted multiple times). +When doing the first (primary) mount, the spawner and the mounter of the daemon +must have the same uid, or the mounter should be the superuser. +.Pp +After the primary mount is in place, secondary mounts can be done by anyone +unless this feature is disabled by +.Cm private . +The behaviour of a secondary mount is analogous to that of symbolic +links: they redirect all filesystem operations to the primary mount. +.Pp +Doing a secondary mount is like signing an agreement: by this action, the mounter +agrees that the Fuse daemon can trace her I/O activities. From then on +she is not banned from using the filesystem (either via her own mount or +via the primary mount), regardless whether +.Cm allow_other +is used or not. +.Pp +The device name of a secondary mount is the device name of the corresponding +primary mount, followed by a '#' character and the index of the secondary +mount; e.g. +.Pa /dev/fuse0#3 . +.Sh SECURITY +System administrators might want to use a custom mount policy (ie., one going +beyond the +.Va vfs.usermount +sysctl). The primary tool for such purposes is +.Xr sudo 8 . +However, given that +.Nm +is capable of invoking an arbitrary program, one must be careful when doing this. +.Nm +is designed in a way such that it makes that easy. For this purpose, +there are options which disable certain risky features (ie. +.Fl S +and +.Fl A ) , +and command line parsing is done in a flexible way: mixing options and +non-options is allowed, but processing them stops at the third non-option +argument (after the first two has been utilized as device and mountpoint). +The rest of the command line specifies the daemon and its arguments. +(Alternatively, the daemon, the special and the mount path can be +specified using the respective options.) Note that +.Nm +ignores the environment variable +.Ev POSIXLY_CORRECT +and always behaves as described. +.Pp +In general, to be as scripting / +.Xr sudoers 5 +friendly as possible, no information has a fixed +position in the command line, but once a given piece of information is +provided, subsequent arguments/options cannot override it (with the +exception of some non-critical ones). +.Sh ENVIRONMENT +.Bl -tag -width ".Ev MOUNT_FUSEFS_SAFE" +.It Ev MOUNT_FUSEFS_SAFE +This has the same effect as the +.Fl S +option. +.It Ev MOUNT_FUSEFS_VERBOSE +This has the same effect as the +.Fl v +option. +.It Ev MOUNT_FUSEFS_IGNORE_UNKNOWN +If set, +.Nm +will ignore uknown mount options. +.It Ev MOUNT_FUSEFS_CALL_BY_LIB +Adjust behaviour to the needs of the FUSE library. Currently it effects +help output. +.El +.Pp +Although the following variables don't have any effect on +.Nm +itself, they affect the behaviour of fuse daemons: +.Bl -tag -width ".Ev FUSE_DEV_NAME" +.It Ev FUSE_DEV_NAME +Device to attach. If not set, the multiplexer path +.Ar /dev/fuse +is used. +.It Ev FUSE_DEV_FD +File desciptor of an opened Fuse device to use. Overrides +.Ev FUSE_DEV_NAME . +.It Ev FUSE_NO_MOUNT +If set, the library won't attempt to mount the filesystem, even +if a mountpoint argument is supplied. +.El +.Sh FILES +.Bl -tag -width /dev/fuse +.It Pa /dev/fuse +Fuse device with which the kernel and Fuse daemons can communicate. +.It Pa /dev/fuse +The multiplexer path. An +.Xr open 2 +performed on it automatically is passed to a free Fuse device by the kernel +(which might be created just for this puprose). +.El +.Sh EXAMPLES +Mount the example filesystem in the Fuse distribution (from its directory): +either +.Pp +.Dl ./fusexmp /mnt/fuse +.Pp +or +.Pp +.Dl mount_fusefs auto /mnt/fuse ./fusexmp +.Pp +Doing the same in two steps, using +.Pa /dev/fuse0 : +.Pp +.Dl FUSE_DEV_NAME=/dev/fuse ./fusexmp && +.Dl mount_fusefs /dev/fuse /mnt/fuse +.Pp +A script wrapper for fusexmp which ensures that +.Nm +doesn't call any external utility and also provides a hacky +(non race-free) automatic device selection: +.Pp +.Dl #!/bin/sh -e +.Pp +.Dl FUSE_DEV_NAME=/dev/fuse fusexmp +.Dl mount_fusefs -S /dev/fuse /mnt/fuse \(lq$@\(rq +.Sh SEE ALSO +.Xr fstat 1 , +.Xr mount 8 , +.Xr umount 8 , +.Xr sudo 8 +.Sh CAVEATS +Secondary mounts should be unmounted via their device name. If an attempt is +made to be unmount them via their filesystem root path, the unmount request +will be forwarded to the primary mount path. +In general, unmounting by device name is less error-prone than by mount path +(although the latter will also work under normal circumstances). +.Pp +If the daemon is specified via the +.Fl D +and +.Fl O +options, it will be invoked via +.Xr system 3 , +and the daemon's command line will also have an +.Dq & +control operator appended, so that we don't have to wait for its termination. +You should use a simple command line when invoking the daemon via these options. +.Sh HISTORY +.Nm +appears as the part of the FreeBSD implementation of the Fuse userspace filesystem +framework (see http://fuse.sourceforge.net). This user interface is FreeBSD specific. +.Sh BUGS +.Ar special +is treated as a multiplexer if and only if it is literally the same as +.Pa auto +or +.Pa /dev/fuse . +Other paths which are equivalent with +.Pa /dev/fuse +(eg., +.Pa /../dev/fuse ) +are not. Added: head/sbin/mount_fusefs/mount_fusefs.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/mount_fusefs/mount_fusefs.c Sat Oct 13 23:54:26 2012 (r241519) @@ -0,0 +1,504 @@ +/*- + * Copyright (c) 2005 Jean-Sebastien Pedron + * Copyright (c) 2005 Csaba Henk + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "mntopts.h" + +#ifndef FUSE4BSD_VERSION +#define FUSE4BSD_VERSION "0.3.9-pre1" +#endif + +void __usage_short(void); +void usage(void); +void helpmsg(void); +void showversion(void); +int init_backgrounded(void); + +struct mntopt mopts[] = { + #define ALTF_PRIVATE 0x01 + { "private", 0, ALTF_PRIVATE, 1 }, + { "neglect_shares", 0, 0x02, 1 }, + { "push_symlinks_in", 0, 0x04, 1 }, + { "allow_other", 0, 0x08, 1 }, + { "default_permissions", 0, 0x10, 1 }, + #define ALTF_MAXREAD 0x20 + { "max_read=", 0, ALTF_MAXREAD, 1 }, + #define ALTF_SUBTYPE 0x40 + { "subtype=", 0, ALTF_SUBTYPE, 1 }, + #define ALTF_SYNC_UNMOUNT 0x80 + { "sync_unmount", 0, ALTF_SYNC_UNMOUNT, 1 }, + /* Linux specific options, we silently ignore them */ + { "fsname=", 0, 0x00, 1 }, + { "fd=", 0, 0x00, 1 }, + { "rootmode=", 0, 0x00, 1 }, + { "user_id=", 0, 0x00, 1 }, + { "group_id=", 0, 0x00, 1 }, + { "large_read", 0, 0x00, 1 }, + /* "nonempty", just the first two chars are stripped off during parsing */ + { "nempty", 0, 0x00, 1 }, + MOPT_STDOPTS, + MOPT_END +}; + +struct mntval { + int mv_flag; + void *mv_value; + int mv_len; +}; + +struct mntval mvals[] = { + { ALTF_MAXREAD, NULL, 0 }, + { ALTF_SUBTYPE, NULL, 0 }, + { 0, NULL, 0 } +}; + +char *progname; + +#define DEFAULT_MOUNT_FLAGS ALTF_PRIVATE | ALTF_SYNC_UNMOUNT + +int +main(int argc, char *argv[]) +{ + struct iovec *iov; + char ch = '\0'; + int mntflags, iovlen, verbose = 0; + char *dev = NULL, *dir = NULL, mntpath[MAXPATHLEN]; + char *devo = NULL, *diro = NULL; + char ndev[128], fdstr[15]; + int i, done = 0, reject_allow_other = 0, safe_level = 0; + int altflags = DEFAULT_MOUNT_FLAGS; + int __altflags = DEFAULT_MOUNT_FLAGS; + struct mntopt *mo; + struct mntval *mv; + static struct option longopts[] = { + {"reject-allow_other", no_argument, NULL, 'A'}, + {"safe", no_argument, NULL, 'S'}, + {"daemon", required_argument, NULL, 'D'}, + {"daemon_opts", required_argument, NULL, 'O'}, + {"special", required_argument, NULL, 's'}, + {"mountpath", required_argument, NULL, 'm'}, + {"version", no_argument, NULL, 'V'}, + {"help", no_argument, NULL, 'h'}, + {0,0,0,0} + }; + int pid = 0; + int fd = -1, fdx; + char *ep; + char *daemon_str = NULL, *daemon_opts = NULL; + + progname = argv[0]; + + /* + * We want a parsing routine which is not sensitive to + * the position of args/opts; it should extract the + * first two args and stop at the beginning of the rest. + * (This makes it easier to call mount_fusefs from external + * utils than it is with a strict "util flags args" syntax.) + */ + + iov = NULL; + iovlen = 0; + mntflags = 0; + /* All in all, I feel it more robust this way... */ + unsetenv("POSIXLY_CORRECT"); + if (getenv("MOUNT_FUSEFS_IGNORE_UNKNOWN")) + getmnt_silent = 1; + if (getenv("MOUNT_FUSEFS_VERBOSE")) + verbose = 1; + + do { + for (i = 0; i < 3; i++) { + if (optind < argc && argv[optind][0] != '-') { + if (dir) { + done = 1; + break; + } + if (dev) + dir = argv[optind]; + else + dev = argv[optind]; + optind++; + } + } + switch(ch) { + case 'A': + reject_allow_other = 1; + break; + case 'S': + safe_level = 1; + break; + case 'D': + if (daemon_str) + errx(1, "daemon specified inconsistently"); + daemon_str = optarg; + break; + case 'O': + if (daemon_opts) + errx(1, "daemon opts specified inconsistently"); + daemon_opts = optarg; + break; + case 'o': + getmntopts(optarg, mopts, &mntflags, &altflags); + for (mv = mvals; mv->mv_flag; ++mv) { + if (! (altflags & mv->mv_flag)) + continue; + for (mo = mopts; mo->m_flag; ++mo) { + char *p, *q; + + if (mo->m_flag != mv->mv_flag) + continue; + p = strstr(optarg, mo->m_option); + if (p) { + p += strlen(mo->m_option); + q = p; + while (*q != '\0' && *q != ',') + q++; + mv->mv_len = q - p + 1; + mv->mv_value = malloc(mv->mv_len); + memcpy(mv->mv_value, p, mv->mv_len - 1); + ((char *)mv->mv_value)[mv->mv_len - 1] = '\0'; + break; + } + } + } + break; + case 's': + if (devo) + errx(1, "special specified inconsistently"); + devo = optarg; + break; + case 'm': + if (diro) + errx(1, "mount path specified inconsistently"); + diro = optarg; + break; + case 'v': + verbose = 1; + break; + case 'h': + helpmsg(); + break; + case 'V': + showversion(); + break; + case '\0': + break; + case '?': + default: + usage(); + } + if (done) + break; + } while ((ch = getopt_long(argc, argv, "AvVho:SD:O:s:m:", longopts, NULL)) != -1); + + argc -= optind; + argv += optind; + + if (devo) { + if (dev) + errx(1, "special specified inconsistently"); + dev = devo; + } else if (diro) + errx(1, "if mountpoint is given via an option, special should also be given via an option"); + + if (diro) { + if (dir) + errx(1, "mount path specified inconsistently"); + dir = diro; + } + + if ((! dev) && argc > 0) { + dev = *argv++; + argc--; + } + + if ((! dir) && argc > 0) { + dir = *argv++; + argc--; + } + + if (! (dev && dir)) + errx(1, "missing special and/or mountpoint"); + + for (mo = mopts; mo->m_flag; ++mo) { + if (altflags & mo->m_flag) { + int iov_done = 0; + + if (reject_allow_other && + strcmp(mo->m_option, "allow_other") == 0) + /* + * reject_allow_other is stronger than a + * negative of allow_other: if this is set, + * allow_other is blocked, period. + */ + errx(1, "\"allow_other\" usage is banned by respective option"); + + for (mv = mvals; mv->mv_flag; ++mv) { + if (mo->m_flag != mv->mv_flag) + continue; + if (mv->mv_value) { + build_iovec(&iov, &iovlen, mo->m_option, mv->mv_value, mv->mv_len); + iov_done = 1; + break; + } + } + if (! iov_done) + build_iovec(&iov, &iovlen, mo->m_option, + __DECONST(void *, ""), -1); + } + if (__altflags & mo->m_flag) { + char *uscore_opt; + + if (asprintf(&uscore_opt, "__%s", mo->m_option) == -1) + err(1, "failed to allocate memory"); + build_iovec(&iov, &iovlen, uscore_opt, + __DECONST(void *, ""), -1); + free(uscore_opt); + } + } + + if (getenv("MOUNT_FUSEFS_SAFE")) + safe_level = 1; + + if (safe_level > 0 && (argc > 0 || daemon_str || daemon_opts)) + errx(1, "safe mode, spawning daemon not allowed"); + + if ((argc > 0 && (daemon_str || daemon_opts)) || + (daemon_opts && ! daemon_str)) + errx(1, "daemon specified inconsistently"); + + /* + * Resolve the mountpoint with realpath(3) and remove unnecessary + * slashes from the devicename if there are any. + */ + if (checkpath(dir, mntpath) != 0) + err(1, "%s", mntpath); + (void)rmslashes(dev, dev); + + if (strcmp(dev, "auto") == 0) + dev = __DECONST(char *, "/dev/fuse"); + + if (strcmp(dev, "/dev/fuse") == 0) { + if (! (argc > 0 || daemon_str)) { + fprintf(stderr, "Please also specify the fuse daemon to run when mounting via the multiplexer!\n"); + usage(); + } + if ((fd = open(dev, O_RDWR)) < 0) + err(1, "failed to open fuse device"); + } else { + fdx = strtol(dev, &ep, 10); + if (*ep == '\0') + fd = fdx; + } + + /* Identifying device */ + if (fd >= 0) { + struct stat sbuf; + char *ndevbas, *lep; + + if (fstat(fd, &sbuf) == -1) + err(1, "cannot stat device file descriptor"); + + strcpy(ndev, _PATH_DEV); + ndevbas = ndev + strlen(_PATH_DEV); + devname_r(sbuf.st_rdev, S_IFCHR, ndevbas, + sizeof(ndev) - strlen(_PATH_DEV)); + + if (strncmp(ndevbas, "fuse", 4)) + errx(1, "mounting inappropriate device"); + + strtol(ndevbas + 4, &lep, 10); + if (*lep != '\0') + errx(1, "mounting inappropriate device"); + + dev = ndev; + } + + if (argc > 0 || daemon_str) { + char *fds; + + if (fd < 0 && (fd = open(dev, O_RDWR)) < 0) + err(1, "failed to open fuse device"); + + if (asprintf(&fds, "%d", fd) == -1) + err(1, "failed to allocate memory"); + setenv("FUSE_DEV_FD", fds, 1); + free(fds); + setenv("FUSE_NO_MOUNT", "1", 1); + + if (daemon_str) { + char *bgdaemon; + int len; + + if (! daemon_opts) + daemon_opts = __DECONST(char *, ""); + + len = strlen(daemon_str) + 1 + strlen(daemon_opts) + + 2 + 1; + bgdaemon = calloc(1, len); + + if (! bgdaemon) + err(1, "failed to allocate memory"); + + strlcpy(bgdaemon, daemon_str, len); + strlcat(bgdaemon, " ", len); + strlcat(bgdaemon, daemon_opts, len); + strlcat(bgdaemon, " &", len); + + if (system(bgdaemon)) + err(1, "failed to call fuse daemon"); + } else { + if ((pid = fork()) < 0) + err(1, "failed to fork for fuse daemon"); + + if (pid == 0) { + execvp(argv[0], argv); + err(1, "failed to exec fuse daemon"); + } + } + } + + if (fd >= 0 && ! init_backgrounded() && close(fd) < 0) { + if (pid) + kill(pid, SIGKILL); + err(1, "failed to close fuse device"); + } + + /* Prepare the options vector for nmount(). build_iovec() is declared + * in mntopts.h. */ + sprintf(fdstr, "%d", fd); + build_iovec(&iov, &iovlen, "fstype", __DECONST(void *, "fusefs"), -1); + build_iovec(&iov, &iovlen, "fspath", mntpath, -1); + build_iovec(&iov, &iovlen, "from", dev, -1); + build_iovec(&iov, &iovlen, "fd", fdstr, -1); + + if (verbose) + fprintf(stderr, "mounting fuse daemon on device %s\n", dev); + + if (nmount(iov, iovlen, mntflags) < 0) + err(EX_OSERR, "%s on %s", dev, mntpath); + + exit(0); +} + +void +__usage_short(void) { + fprintf(stderr, + "usage:\n%s [-A|-S|-v|-V|-h|-D daemon|-O args|-s special|-m node|-o option...] special node [daemon args...]\n\n", + basename(progname)); +} + +void +usage(void) +{ + struct mntopt *mo; + + __usage_short(); + + fprintf(stderr, "known options:\n"); + for (mo = mopts; mo->m_flag; ++mo) + fprintf(stderr, "\t%s\n", mo->m_option); + + fprintf(stderr, "\n(use -h for a detailed description of these options)\n"); + exit(EX_USAGE); +} + +void +helpmsg(void) +{ + if (! getenv("MOUNT_FUSEFS_CALL_BY_LIB")) { + __usage_short(); + fprintf(stderr, "description of options:\n"); + } + + /* + * The main use case of this function is giving info embedded in general + * FUSE lib help output. Therefore the style and the content of the output + * tries to fit there as much as possible. + */ + fprintf(stderr, + " -o allow_other allow access to other users\n" + /* " -o nonempty allow mounts over non-empty file/dir\n" */ + " -o default_permissions enable permission checking by kernel\n" + /* + " -o fsname=NAME set filesystem name\n" + " -o large_read issue large read requests (2.4 only)\n" + */ + " -o subtype=NAME set filesystem type\n" + " -o max_read=N set maximum size of read requests\n" + " -o noprivate allow secondary mounting of the filesystem\n" + " -o neglect_shares don't report EBUSY when unmount attempted\n" + " in presence of secondary mounts\n" + " -o push_symlinks_in prefix absolute symlinks with mountpoint\n" + " -o sync_unmount do unmount synchronously\n" + ); + exit(EX_USAGE); +} + +void +showversion(void) +{ + puts("mount_fusefs [fuse4bsd] version: " FUSE4BSD_VERSION); + exit(EX_USAGE); +} + +int +init_backgrounded(void) +{ + int ibg; + size_t len; + + len = sizeof(ibg); + + if (sysctlbyname("vfs.fuse.init_backgrounded", &ibg, &len, NULL, 0)) + return (0); + + return (ibg); +} Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sat Oct 13 22:22:53 2012 (r241518) +++ head/sys/conf/NOTES Sat Oct 13 23:54:26 2012 (r241519) @@ -1003,6 +1003,7 @@ options NFSCLIENT #Network File System # The rest are optional: options CD9660 #ISO 9660 filesystem options FDESCFS #File descriptor filesystem +options FUSE #FUSE support module options HPFS #OS/2 File system options MSDOSFS #MS DOS File System (FAT, FAT32) options NFSSERVER #Network File System server Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Oct 13 22:22:53 2012 (r241518) +++ head/sys/conf/files Sat Oct 13 23:54:26 2012 (r241519) @@ -2317,6 +2317,15 @@ fs/devfs/devfs_vnops.c standard fs/fdescfs/fdesc_vfsops.c optional fdescfs fs/fdescfs/fdesc_vnops.c optional fdescfs fs/fifofs/fifo_vnops.c standard +fs/fuse/fuse_device.c optional fuse +fs/fuse/fuse_file.c optional fuse +fs/fuse/fuse_internal.c optional fuse +fs/fuse/fuse_io.c optional fuse +fs/fuse/fuse_ipc.c optional fuse +fs/fuse/fuse_main.c optional fuse +fs/fuse/fuse_node.c optional fuse +fs/fuse/fuse_vfsops.c optional fuse +fs/fuse/fuse_vnops.c optional fuse fs/hpfs/hpfs_alsubr.c optional hpfs fs/hpfs/hpfs_lookup.c optional hpfs fs/hpfs/hpfs_subr.c optional hpfs Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sat Oct 13 22:22:53 2012 (r241518) +++ head/sys/conf/options Sat Oct 13 23:54:26 2012 (r241519) @@ -211,6 +211,7 @@ CODA opt_dontuse.h EXT2FS opt_dontuse.h FDESCFS opt_dontuse.h FFS opt_dontuse.h +FUSE opt_dontuse.h HPFS opt_dontuse.h MSDOSFS opt_dontuse.h NANDFS opt_dontuse.h Added: head/sys/fs/fuse/fuse.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/fs/fuse/fuse.h Sat Oct 13 23:54:26 2012 (r241519) @@ -0,0 +1,223 @@ +/* + * Copyright (c) 2007-2009 Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of Google Inc. 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 + * OWNER 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 *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***